100 Commits
Author SHA1 Message Date
redshift e07098ae8c feat: check for version updates before installing; show update banner in TUI
- Extract version-checking logic into src/utils/update-checker.ts (shared
  between CLI and TUI)
- Updating routstrd...
bun add v1.2.22 (6bafe260)

installed routstrd@0.3.10 with binaries:
 - routstrd

[649.00ms] done
routstrd updated successfully.

Updating cocod...
bun add v1.2.22 (6bafe260)

installed @routstr/cocod@0.0.24 with binaries:
 - cocod

[692.00ms] done
cocod updated successfully.

Both routstrd and cocod have been updated!

Using remote daemon — skipping routstrd daemon restart.

cocod daemon was not running — skipping restart.

✓ All daemons restarted successfully. now checks npm for the latest version of each package
  and only reinstalls when a newer version is available; skips daemon
  restart when nothing was updated
- TUI shows a bold yellow 'UPDATE AVAILABLE' banner below the header on
  all tabs when a new version is detected
- TUI checks for updates at most every 210 minutes to avoid spamming the
  npm registry; first check fires 3s after startup (non-blocking)
- Bump version to 0.3.11
2026-07-20 20:52:34 +01:00
redshift 755dabbc3c Fix: Router for Teams -> Routstr for Teams 2026-07-16 19:41:13 +08:00
redshift 58288114f0 Add Router for Teams section linking to routstrd-auth 2026-07-16 19:39:49 +08:00
redshift 2a31fef10b chore: bump version to 0.3.10 2026-07-12 08:26:44 +05:30
redshift a7de201330 chore: bump version to 0.3.9 2026-07-10 12:57:30 +05:30
redshift 9e8f8178a9 chore: bump version to 0.3.8 2026-07-09 12:27:30 +05:30
redshift 60bc8b4cb2 fix: capture daemon crash logs and prevent silent crashes
- Redirect detached daemon stdout/stderr to ~/.routstrd/debug.log
  instead of ignoring them, so uncaught exception stack traces are
  no longer lost
- Add process-level uncaughtException/unhandledRejection handlers
  that log to the file logger before the process dies
- Wrap setInterval async callbacks (model refresh + refund jobs) in
  IIFE catch chains so rejected promises can't escape and kill the
  process silently
2026-07-09 00:07:13 +08:00
redshift cf1ca5941a feat(update): restart daemons after update
The update command previously only downloaded and installed new
binaries for routstrd and cocod without restarting the running
daemons, so updates would not take effect until a manual restart.

- Add restartDaemonsAfterUpdate() helper that gracefully stops and
  restarts both daemons after a successful update
- routstrd: uses POST /stop (drains active connections), polls for
    shutdown, then calls startDaemon() with configured port/provider
- cocod: runs 'cocod stop', then spawns 'cocod daemon' detached,
    polls 'cocod ping' until it comes back up
- Skips restart for daemons that weren't running
- Skips routstrd daemon restart when using a remote daemon
- Collects and reports failures without rolling back the update
- Bump @routstr/sdk to 0.3.15
- Bump routstrd version to 0.3.7

Closes nostr task: update-restart
2026-07-08 16:39:31 +08:00
redshift f58e807807 Add 'update' command to upgrade routstrd and cocod globally 2026-07-06 18:27:00 +08:00
redshift 1a06093b96 bump version to 0.3.5, update @routstr/sdk to 0.3.14 2026-07-06 11:37:34 +05:30
redshift 1ff3b9a4e1 Fix renderToday definite-assignment and usage-summary stale fixtures
renderToday declared todayStats/recentDays/hourlyMap with let but only
assigned inside if (stats.summary); TypeScript flagged them as used
before assignment (TS2454). Initialize with sensible defaults so the
function degrades gracefully when summary is missing.

The usage-summary tz-bucketing test used hardcoded May 2026 timestamps
with a comment dated 2026-06-02. Those entries aged out of
getUsageSummary's 30-day rolling window, so days came back empty.
Recompute timestamps relative to now and assert on dynamically-derived
local-day date strings.
2026-07-05 21:27:20 +05:30
redshift b2738109e3 Sync daemon with SDK discovery adapter API 2026-07-04 21:11:56 +05:30
redshift 3c6161d9bf fix: add periodic Nostr event refresh to daemon
Calls refreshNostrEvents() after initial bootstrap and in the 21-minute
recurring job, covering provider discovery (38421) and lgtm reviews
(38425) which were previously only refreshed on manual trigger.
2026-06-28 10:33:52 +08:00
redshift a5be3b06e9 bump version to 0.3.4 and @routstr/sdk to 0.3.12 2026-06-22 20:09:31 +08:00
redshift 9cc3b76483 refactor(tui): separate async fetching from sync rendering
Split the monolithic render() into two distinct functions:
- fetchData(): async background fetch that updates state and triggers
  a repaint, guarded against overlapping calls
- render(): synchronous paint that reads current state and writes to
  stdout, safe to call from key handlers without blocking

Run all four daemon calls concurrently via Promise.all to cut the
blocked window. Remove redundant isDaemonRunning() checks from each
fetch function in data.ts — the single check now lives in fetchData().

Key handlers now call the sync render() directly instead of
void render(false), so scrolling and tab switching feel instant.
2026-06-22 16:39:58 +08:00
redshift d8385d5c2e verson bump 2026-06-20 17:40:16 +08:00
redshift f15e18cf05 Adapt request response logging to SDK sink 2026-06-20 17:00:52 +08:00
redshift 1735d97a9e feat: configure raw request response logging 2026-06-20 10:10:21 +08:00
redshift 8c52c90f94 addeed npub filtering for /usage as well 2026-06-11 09:31:32 +08:00
redshift 61acc0b5fb added npub based filter! 2026-06-11 09:17:13 +08:00
redshift 764d2dd826 removed old functions with benchmark which is clearly not needed 2026-06-11 08:49:15 +08:00
redshift 829681ffca removed legacy usage support 2026-06-11 08:33:15 +08:00
redshift ae91c46f01 fix(usage-summary): compute size buckets in JS after SDK removed token-range filters
The SDK dropped minTotalTokens/maxTotalTokens from AggregateUsageOptions
(routstr-sdk c98de6b), so replace the five aggregate() calls with a single
list() and bucket entries in-process.
2026-06-10 17:29:19 +08:00
redshift 6536333224 Merge remote-tracking branch 'origin/main' into pr-43
# Conflicts:
#	package.json
#	src/daemon/index.ts
2026-06-10 17:14:24 +08:00
redshift 0ab608bf88 fixed provider disabling not working while running 2026-06-08 09:43:15 +08:00
redshift d87a911241 viisble lgos 2026-06-07 11:25:02 +08:00
redshift 4a66af87da feat(providers): add --refresh flag to providers list
routstrd providers list --refresh now:
- Re-fetches Nostr kind 38421 provider discovery events
- Re-fetches Nostr kind 38423 routstr21 model list
- Re-fetches Nostr kind 38425 review events (applies LGTM-based disable)
- Fetches models from all discovered providers
- Syncs fresh provider list and disabled status into the store

Usage: routstrd providers list --refresh
2026-06-07 11:13:39 +08:00
redshift 27b13c30b0 made relays configurable 2026-06-07 10:56:06 +08:00
redshift 70230d9030 cached otkens now appear on the TUI 2026-06-07 09:06:53 +08:00
redshift d86a231ed3 fix: use Bun-safe SDK entrypoints for ModelManager and storage
- Import ModelManager from @routstr/sdk/bun instead of @routstr/sdk
- Import storage helpers from @routstr/sdk/storage/bun instead of @routstr/sdk/storage
- Fix createBunSqliteUsageTrackingDriver call: async and no longer needs
  manual bun:sqlite import (now handled internally by the sdk entrypoint)
- Verified sharded discovery adapter setup matches SDK pattern in
  scripts/routstr-daemon.ts at 6077aa7
2026-06-06 18:13:06 +08:00
redshift fec0d99d72 fix: switch clients commands back to callDaemon
Clients management endpoints (/clients, /clients/add, /clients/delete)
should route through the daemon directly, not the auth proxy.
2026-06-01 16:07:44 +08:00
redshift dfc7fbf1f3 added nsec creation during onboarding. 2026-06-01 00:01:23 +08:00
redshift f9412af8b3 version bump and using the new adapters and a local eventsDb. 2026-05-30 18:25:18 +08:00
redshift 17529e762e feat: add context window support to pi integration
- Add optional contextWindow field to PiModelEntry type
- Map model.context_length to contextWindow when available
- Add context_length to RoutstrModel type in registry
2026-05-30 14:04:24 +08:00
redshift 94cd2ff15d feat: add authUrl config for routing management commands to auth proxy
Adds an authUrl field to RoutstrdConfig so CLI management commands
(npubs, clients, usage) can be directed to the routstrd-auth proxy
instead of the daemon. This fixes 'routstrd npubs list' failing with
'Only POST is supported' when the auth proxy and daemon run on
separate ports (e.g., Cloudron setup: proxy on 8008, daemon on 8009).

Changes:
- config.ts: add authUrl to RoutstrdConfig
- daemon-client.ts: add getAuthBaseUrl(), callAuth(), refactor callDaemon
- cli.ts: npubs/usage commands use callAuth, remote command accepts --auth-url
- clients.ts: clients commands use callAuth
2026-05-30 05:30:42 +00:00
redshift 8db3b3cf8b lock 2026-05-25 08:57:57 +08:00
redshift ba52a3c52e bumped version 2026-05-25 08:26:56 +08:00
redshift e9775c10d4 Display cooldown in minutes instead of milliseconds
- Add cooldownMinutes field to /nwc/status and /nwc/auto-refill responses
- Change auto-refill log from ms to minutes display
- Keep cooldownMs internally for calculations
2026-05-24 10:23:29 +08:00
redshift 789fd9db2b fix(auto-refill): broken backoff and preimage crash causing payment spam
Two bugs caused the auto-refill loop to retry every 5s regardless of outcome:

1) Backoff used lastRefillAt which was only set on success. On failure
   it stayed at 0, so now - 0 < backoffInterval never blocked once the
   daemon had been running > 30s. Switched to a separate lastAttemptAt
   that is updated on every attempt (success or failure).

2) preimage.slice() crashed when NWC returned a payment result without
   a preimage field. This turned successful payments into exceptions,
   triggering retries and causing the wallet to be charged repeatedly.
   Guard preimage with an if-check before calling .slice().
2026-05-24 10:16:16 +08:00
redshift 99244a8bdb feat: hot-reload NWC connection (remove restart requirement)
- Add reconnect() method to wallet adapter that tears down old
  WalletConnect/RelayPool and creates a new one on the fly
- Auto-refill loop now uses a getWallet() getter so it always
  references the latest wallet instance after reconnect
- POST /nwc/connect and /nwc/disconnect handlers call reconnect()
  after saving config, no restart needed
- Remove 'Run routstrd restart' messages from CLI connect/disconnect
2026-05-24 09:22:45 +08:00
redshift 5799c5c5b0 auto-refill: update wallet auto-refill logic 2026-05-24 09:11:13 +08:00
redshift e5f5c0995d auto-refill: add error categorization, exponential backoff, and fatal error handling 2026-05-23 23:13:52 +08:00
redshift 92ca9a7cb0 chore: remove legacy NWC client, fix auto-refill getter 2026-05-23 23:03:48 +08:00
redshift c98709e383 feat: auto-refill no longer requires daemon restart
Changed startAutoRefillLoop to accept a config getter instead of a static
config object. The getter reads config from disk on every check cycle, so
CLI changes (nwc auto-refill on/off) take effect immediately.

- auto-refill.ts: config parameter replaced with getConfig() callback
- wallet/index.ts: always start loop when wallet exists, use getter
- daemon/index.ts: pass getAutoRefillConfig reading from disk sync
- config-store.ts: added loadDaemonConfigSync() for sync disk reads
- http/index.ts + cli.ts: removed 'Restart daemon to apply' messages
2026-05-23 22:37:43 +08:00
redshift b9d30b12a9 nwc: add progress logs to fundFromNWC, trim response to amount+balance
- Add step-by-step logging to fundFromNWC (initial/final balance, invoice,
  payment status, fees) matching pay_invoice.mts pattern
- Remove invoice and preimage from POST /nwc/fund response
- Add final wallet balance to the response after funding completes
2026-05-23 22:26:10 +08:00
redshift 5ee6a39567 refactor: replace custom NwcClient with applesauce-wallet-connect
- auto-refill.ts: use WalletConnect instance directly instead of
  NwcClient + RelayPool; check wallet.service for connection state
- wallet/index.ts: create single shared WalletConnect for auto-refill,
  fundFromNWC, and getNwcStatus; remove NwcClient entirely
- daemon/index.ts: strip all NwcClient creation/connect/logging/cleanup;
  auto-refill now gates on connectionString alone
- add applesauce-wallet-connect dependency
2026-05-23 22:14:15 +08:00
redshift fd07a688fa simplify NWC client: NIP-04 only, remove encryption negotiation, trim test 2026-05-23 14:42:28 +08:00
redshift 47afe3ac7b trim test_nwc.ts to minimal make_invoice + pay_invoice test 2026-05-23 14:28:59 +08:00
redshift 62bd014836 feat: rewrite NWC client with encryption auto-negotiation, EOSE waiting, add test script
- Encryption auto-detection: reads wallet info event (kind 13194) on connect
  to choose NIP-04 vs NIP-44 per NIP-47 spec
- Subscription readiness: wait for EOSE before resolving connect()
- Dual NIP-04 / NIP-44 encrypt/decrypt support
- Proper encryption tags on NIP-44 requests
- test_nwc.ts: standalone NWC test script for make_invoice + pay_invoice
2026-05-23 14:26:45 +08:00
redshift cd9b724ca6 fix(nwc): double hex-encoding of client pubkey and unused connection secret
Two bugs caused NWC responses to never arrive:

1. getPublicKey() in nostr-tools v2 already returns a hex string, but
   the code wrapped it with Buffer.from().toString('hex'), producing a
   double-encoded 128-char string. The relay rejected the REQ filter
   with 'filter item too large' because the #p tag value was invalid.

2. The 'secret' from the NWC connection string (the pre-shared client
   private key per NIP-47) was parsed but never used. Instead a new
   random keypair was generated on every restart, so the wallet service
   would see requests from an unexpected pubkey.

Also removed 'since' from the subscription filter (simpler, some relays
choke on it) and added debug logging for the REQ filter.
2026-05-19 02:00:18 +08:00
redshift 44e6dd884f Merge branch 'main' of github.com-red:Routstr/routstrd into feat/nwc-integration 2026-05-19 01:26:04 +08:00
redshift cee4666f6e nwc integration 2026-05-19 01:25:27 +08:00
redshift 8ae0288d95 docker now has current repo and also added xcashu refunds to the cli 2026-05-19 01:25:00 +08:00
redshift 3f14ae8084 Merge branch 'main' of github.com-red:Routstr/routstrd 2026-05-17 11:49:39 +08:00
redshift fdf65ab0c9 reusing routstrclietn 2026-05-17 11:49:28 +08:00
redshift 5069fcac43 bumpd version 2026-05-16 16:47:20 +05:30
redshift 390701b5ea chore: bump @routstr/sdk to ^0.3.7 2026-05-16 14:20:26 +05:30
redshift 747911c6f6 bumped cashu vferison 2026-05-16 16:25:53 +08:00
redshift fd8f433a36 feat: add Docker dev environment and fix logging/cashu-ts
- Add Dockerfile, docker-compose.yml, and .dockerignore for Bun dev container
- Fix sdkLogger to use logger.warn instead of logger.log for warnings
- Add proper warn method to logger (writes to file instead of console)
- Use console.log for daemon startup messages to keep them visible
- Update cashu-ts getDecodedToken call with explicit well-known-pubkeys
- Use proof.amount.toNumber() for updated cashu-ts Amount type
2026-05-16 16:22:16 +08:00
redshift 8e9013ac7d version bumps 2026-05-15 13:55:24 +05:30
redshift f427cc75ea feat: pass routstrPubkey from config to routeRequests when set 2026-05-14 17:43:30 +05:30
redshift bcbf5bfc44 feat(daemon): wire SdkLogger through daemon with per-request reqId prefixing
- daemon/index.ts: add makeSdkLogger() factory, wire daemonSdkLogger into
  createBunSqliteDriver, createProviderRegistryFromStore, ModelManager, ProviderManager
- daemon/http/index.ts: add makeSdkLogger() factory, generate per-request
  reqId via randomBytes(4), pass reqLogger = sdkLogger.child("req:${reqId}")
  to routeRequests so every log line from a request is prefixed [req:XXXXXXXX]
- start-daemon.ts: remove >> logfile 2>&1 redirect and getTodayLogFile();
  all file logging now goes through the daemon's writeLog() with daily rotation

Result: Every log line from a request is prefixed [req:XXXXXXXX], all entries
have [ISO] [INFO/ERROR/DEBUG] timestamps, no duplicates, and the log file
rotates correctly at midnight.
2026-05-08 19:20:00 +08:00
redshift d098d25bc0 feat(tui): add Npubs tab grouping usage by ownerNpub
- Add 'npubs' tab between Clients and Recent (key 7)
- Tab is hidden when no clients have ownerNpub set
- Groups usage entries by ownerNpub via client-id → npub mapping
- Shows truncated npub (first 10 + … + last 6) with full npub on detail line
- Displays requests, cost, tokens, avg cost per npub with bar charts
- Includes 'Top Models per Npub' sub-section
- Tab keys dynamically renumbered (1-7 without npubs, 1-8 with)
- Falls back to Clients tab if Npubs becomes unavailable on refresh
2026-05-08 18:59:17 +08:00
redshiftandClaude Opus 4.7 7a3ae208cd feat: move client column to last position and widen to 14 chars
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-08 16:58:07 +08:00
redshift c6290eb356 bump 2026-05-07 21:00:54 +05:30
redshiftandClaude Opus 4.7 5aec1af79b feat: add client column to recent transactions in TUI
Adds a CLIENT column between TIME and MODEL in the Recent Requests tab,
color-coded using CLIENT_COLORS. Entries without a client show "unknown".

Closes #25

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-07 12:38:21 +08:00
redshiftandClaude Sonnet 4 622afb04a5 fix: sync bootstrapped providers into store so providers list is complete
After bootstrapProviders runs, newly discovered URLs (e.g. privateprovider.xyz)
were only known to the ModelManager cache and never written into the store's
baseUrlsList. This caused `providers list` and `models -m <id>` to show
different sets of providers. Now the bootstrap step merges any new URLs into
the store so both commands draw from the same source of truth.

Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>
2026-05-06 20:29:40 +08:00
redshiftandClaude Sonnet 4 3abc028395 fix: surface cocod "Not enough proofs" as InsufficientBalanceError
When cocod cannot assemble enough proofs to send (e.g. due to
denomination fragmentation or stale proof state), it returns
"Send failed: Not enough proofs to send". This was propagating
as a generic Error, causing the HTTP handler to return 500 instead
of the structured 402 insufficient_balance response.

Map that cocod error to InsufficientBalanceError in walletAdapter.sendToken
so the existing handler path returns the correct 402.

Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>
2026-05-06 18:32:46 +08:00
redshift 5771a47054 feat: show available flags when clients add is called without options 2026-05-04 16:11:57 +00:00
redshift a0ba9f337b feat: add --hermes flag to clients add CLI command 2026-05-04 16:03:39 +00:00
redshift ba3d5ff336 Merge branch 'main' of https://github.com/Routstr/routstrd into feat/hermes-integration 2026-05-04 15:55:52 +00:00
redshift a89ff52cbb fix: handle unwrapped response in npubs update command
PATCH /npubs returns { npub, pubkey, role } at the top level, not
wrapped in { output }. Use result.output ?? result to handle both
response formats.
2026-05-04 20:56:36 +05:30
redshift 52dcecbefe working on adding role update feature 2026-05-04 20:48:53 +05:30
redshift 26fd7d3808 bump version to 0.2.15 2026-05-04 11:40:10 +08:00
redshift aaad1162de Merge branch 'main' of github.com-red:Routstr/routstrd 2026-05-04 11:36:12 +08:00
redshift 4cdd05fd98 feat: show role in npubs list output
- Updated npubs list to display role (admin/user) for each npub
- Changed header from 'Admin npubs' to 'Npubs' to reflect all roles
- Updated command descriptions to reflect broader scope
- Also fixed 'admin npub' message in add command output
2026-05-04 11:35:44 +08:00
redshift 84fd05f2d5 fix: properly print npub objects in 'npubs list' command
The daemon now returns npubs as objects with npub/role fields, not plain
strings. Updated the CLI to handle the new NpubEntry type format.
2026-05-04 01:09:11 +08:00
redshift e8f46c79dc bumped version 2026-05-03 16:22:47 +05:30
redshift 9fac004f05 refactor(usage): remove CLI-side suffix filtering now that auth proxy handles it
The auth proxy intercepts GET /usage and returns only entries belonging to
the authenticated npub's clients, with owner suffixes stripped. The TUI no
longer needs to filter entries client-side.

- Remove getNpubSuffix and loadConfig from tui/usage/data.ts imports
- Remove old suffix-based filtering logic from fetchUsage()
- Remove unused getNpubSuffix from cli.ts imports
2026-05-03 16:21:38 +08:00
redshift 306dec5943 feat(clients): support ownerNpub field and remove CLI-side suffixing
- Add ownerNpub?: string to ClientEntry and DaemonClient interfaces
- Update getClientsFromStore() to preserve ownerNpub field
- GET /clients: include ownerNpub in daemon response
- POST /clients/add: accept and store ownerNpub from auth proxy
- Remove getNpubSuffix/addSuffixToId/removeSuffixFromId from clients.ts (moved to auth proxy)
- Remove CLI-side suffixing in addDaemonClient and deleteClientAction
- Remove config loading from getClientsList (no longer needed for filtering)
- CLI output now shows raw client IDs without suffix stripping
2026-05-03 15:04:57 +08:00
redshift 10937f851c feat: add Hermes integration
- Add new installHermesIntegration to write ~/.hermes/config.yaml
- Prepend model block with base_url/api_key/default model at top
- Append custom_providers block at the bottom
- Use 3rd model in daemon list as default
- Add Hermes to setup menu and registry
2026-04-30 21:42:53 +05:30
redshift 9a520efb24 added a register command. 2026-04-30 16:45:31 +05:30
redshift a3508b9667 bumped version and also fixed matching clientid to existing ones 2026-04-30 16:16:57 +05:30
redshift 790bf925bb added the suffixed client id. a tiny miss in the code. 2026-04-30 14:06:07 +05:30
redshift 1d556c42e3 version bump 2026-04-30 14:00:38 +05:30
redshift 9628c6bfbd fixed the suffix not being added bug. 2026-04-30 13:59:14 +05:30
redshift 240706f6f1 bumped version. 2026-04-30 13:47:35 +05:30
redshift cdfde85595 fix: prevent race condition spawning multiple cocod and routstrd instances
When multiple routstrd processes (or CLI auto-starts) bootstrap simultaneously,
each process found cocod/routstrd unreachable, spawned its own copy, and
contended for the same database socket. The paired ~200ms burst timestamps
in the logs were the symptom.

Fixes applied:

- Add cross-process startup lock (process-lock.ts)
  - Uses atomic mkdir as the lock primitive.
  - Stores PID + UUID token; verifies ownership on release to avoid
    removing a lock taken by a new process after the original crashed.
  - Removes stale locks (unreachable PID or lock older than staleAfterMs).
  - Exports withCrossProcessLock() for simple RAII-style usage.

- Fix cocod startup race (cocod-client.ts)
  - Wrap ensureDaemonRunning() in a socket-derived lock path.
  - Re-ping inside the lock before spawning; if another process just started
    cocod, the current process detects it and connects instead of spawning.
  - Switch from 'cocod daemon' to 'cocod init' for cleaner daemonization.
  - Allow exit code 0 from 'cocod init' (normal daemon exit without error).

- Consolidate routstrd daemon startup (daemon-client.ts)
  - startDaemonProcess() now delegates to startDaemon() from start-daemon.ts,
    sharing the same lock and health-check logic.

- Add cross-process lock to routstrd daemon startup (start-daemon.ts)
  - Performs pre-lock isDaemonHealthy() check to skip lock entirely when
    already running.
  - Performs re-check inside the lock before spawning to avoid duplicate
    daemon processes.
2026-04-30 13:36:16 +05:30
redshift 55dbb1a6b5 docs: update SKILL.md with new npubs, remote, clients delete, and refresh commands 2026-04-30 12:40:43 +05:30
redshift aa75f1394e docs: rename Usage to Use Routstrd Skill 2026-04-30 12:39:36 +05:30
redshift 40bca1ec72 docs: add skill tip and fix heading formatting 2026-04-30 12:37:53 +05:30
redshift 4862f4e1f2 docs: format OR between install options 2026-04-30 12:29:13 +05:30
redshift d17e732c8d docs: reorganize install into 3 steps 2026-04-30 12:28:47 +05:30
redshift 973f50cb38 docs: use routstrd receive instead of cocod 2026-04-30 12:25:23 +05:30
redshift 2264089ca7 docs: update README with install instructions 2026-04-30 12:24:08 +05:30
redshift 1a620f988b fix build: export getNpubSuffix in daemon-client.ts 2026-04-30 12:13:17 +05:30
redshift c1c72bc147 Add 'refresh' CLI command to refresh models and integrations
- Added 'routstrd refresh' command that:
  - Calls /v1/models?refresh=true to refresh routstr21 models
  - Calls runIntegrationsForClients() for all registered clients
- Fixed type signature in refreshModelsAndIntegrations (returns any[] not void)
- Imports getClientsList and runIntegrationsForClients in cli.ts
2026-04-30 12:04:13 +05:30
redshift a5d68ccd0d Extract refreshModelsAndIntegrations into src/integrations/index.ts
- Created reusable refreshModelsAndIntegrations() function that combines
  model refresh with client integration refresh
- Updated src/daemon/index.ts to use the new function in both the scheduled
  refresh job and the initial bootstrap refresh
- Merged two chained .then() calls into one in the initial bootstrap flow
- Removed redundant imports (runIntegrationsForClients, getClientsList) from
  daemon/index.ts since they're now encapsulated in the function
2026-04-30 11:56:09 +05:30
redshift a14e24417a fixed a few thigns 2026-04-30 11:31:12 +05:30
redshift 91384b633e fix: use hyphen in addSuffixToId to match removeSuffixFromId 2026-04-30 11:20:16 +05:30