Commit Graph
135 Commits
Author SHA1 Message Date
redshift 8d6a7d7f21 feat(cli): NIP-98 auth for remote daemon URLs
- Add nostr-tools dependency for NIP-98 event signing
- Add nsec field to RoutstrdConfig for remote daemon authentication
- Extract NIP-98 auth utilities into src/utils/nip98.ts (parseSecretKey,
  createNIP98Authorization with SHA-256 payload tags)
- Wire NIP-98 Authorization headers into callDaemon and isDaemonRunning
  whenever both daemonUrl and nsec are configured
- Refactor refund command to use callDaemon instead of hardcoded localhost
  so it works correctly with remote daemon URLs
2026-04-28 10:02:45 +05:30
redshift 7dfed2c052 Add daemonUrl config for remote daemon support
- Add optional daemonUrl field to RoutstrdConfig
- Update callDaemon and isDaemonRunning to use configurable base URL
- Disable auto-start when daemonUrl is set (Option A)
- Gate local-only commands: onboard, start, restart, mode, logs, service install
2026-04-28 09:26:50 +05:30
redshiftandGitHub bf82a99957 Merge pull request #11 from Routstr/fix/dynamic-version
fix(cli): dynamically read version from package.json
2026-04-27 17:17:36 +00:00
redshift 927ec863bf feat(wallet): support COCOD_DIR env var for config dir
Allow overriding the default cocod config directory (~/.cocod)
via the COCOD_DIR environment variable. Falls back to existing
HOME/USERPROFILE logic when unset.

Bump version to 0.2.6.
2026-04-27 22:20:33 +05:30
redshift 2b6876ccd6 feat: add clients delete command
Add 'routstrd clients delete <id>' CLI command and POST /clients/delete
HTTP endpoint to remove a client by its ID.
2026-04-27 19:22:56 +05:30
redshift 3d390fe541 refactor: split cli-shared into utils/daemon-client and cli.ts
- Moved daemon communication helpers (loadConfig, callDaemon,
  isDaemonRunning, startDaemonProcess, ensureDaemonRunning,
  handleDaemonCommand) from cli-shared.ts to src/utils/daemon-client.ts
- Moved the refund command from cli-shared.ts into cli.ts with the
  rest of the CLI commands
- cli.ts now imports program directly from commander and daemon
  helpers from utils/daemon-client
- TUI imports are updated to use utils/daemon-client
- Removed src/cli-shared.ts
2026-04-26 20:58:12 +05:30
redshift 51c80c6d3d fix(cli): dynamically read version from package.json 2026-04-25 22:12:08 +05:30
redshift 57bfa94c58 fix: include /v1 suffix in all localhost URLs shown to users
Updates all user-facing log messages to include the /v1 path suffix,
so clients know to use http://localhost:${port}/v1 when configuring
their API endpoints.

- src/cli.ts:717 — clients add --setup-all flow
- src/cli.ts:757 — clients add -n ${name} flow
- src/daemon/index.ts:206 — daemon startup message
- src/start-daemon.ts:29 — daemon already running message
2026-04-25 15:45:23 +05:30
redshift b306086a6d added instrcutions to add new clients via CLI easily. Updated skill as well. 2026-04-23 18:41:06 +05:30
redshift 293f1098a5 fixed issues with cocod init 2026-04-23 17:12:58 +05:30
redshift 3a81b97371 models read frmo routstr21 2026-04-23 17:09:27 +05:30
redshift c88da1080e added shortcuts for wallet commands 2026-04-23 02:35:27 +05:30
redshift 3a5d760b37 replaced routeRequestsNodeResponse with just routeRequests. 2026-04-22 23:39:57 +05:30
redshift 41993831af changed the refund interval to 42 mins 2026-04-21 18:07:23 +02:00
redshift 9ece12d565 removed duplicate entries for rpoviders and clients endpoints. 2026-04-21 08:10:56 +02:00
redshift 86eab89871 fixed the long error trace 2026-04-20 20:05:21 +02:00
redshift 5c9665eaea added claude integration 2026-04-20 20:05:06 +02:00
redshift 5866a55d7d fixed command for logs 2026-04-17 12:05:52 +01:00
redshift 3cebd6c4b4 fix: improve daemon path resolution for PM2 service installation 2026-04-14 16:41:21 +01:00
redshift 003cde2f89 docs: suggest 'service install' in onboard for reboot persistence 2026-04-14 16:36:53 +01:00
redshift ac149bd1f7 feat: add 'top' as alias for 'monitor' command 2026-04-14 16:34:46 +01:00
redshift 8fb7ac580e feat: add PM2 service management commands for daemon persistence 2026-04-14 16:33:21 +01:00
redshift f60afed4c3 fix: display prompt/completion pricing as sats per million tokens 2026-04-09 16:48:51 +01:00
redshift 7d439967ce feat(models): add model provider lookup with pricing info
Add -m/--model option to models serving a
specific model with their pricing details (prompt, completion, request,
max_cost in sats). Providers are sorted by max_cost (cheapest first).

New endpoint: GET /models/:id/providers
New function: getModelProviders() in model service
2026-04-09 16:45:32 +01:00
redshift 633f555e09 disabled xcashu agian since its not battle tested 2026-04-06 19:04:58 +01:00
redshift 238f6cdb9d disabled refunding for now. 2026-04-06 18:53:44 +01:00
redshift 5e984e3f5e routstrd skill. decreased refresh interval to 21 mins.
centralized config in registry.
2026-04-03 23:50:10 +02:00
redshift d1574b6e9c integrations are updated automatically on model refresh. 2026-04-03 14:56:40 +02:00
redshift 557489ba4f removed logs 2026-04-03 13:11:56 +02:00
redshift dc363b1c20 Merge branch 'main' of github.com-red:Routstr/routstrd 2026-04-03 13:11:41 +02:00
redshift c04eaf0981 provdier list debugging 2026-04-03 13:11:04 +02:00
Evan Yang 81a1e969fe fix(wallet): silence cocod transport logs in CLI 2026-04-03 14:27:55 +08:00
Evan Yang 249075ad49 fix(wallet): harden cocod response parsing and receive error propagation 2026-04-03 14:27:55 +08:00
redshift cbaf26bda0 allowing xcashu mode right now and removed logs. 2026-04-02 22:45:52 +02:00
redshift 42274f8990 Merge branch 'main' of github.com-red:Routstr/routstrd 2026-04-02 15:33:16 +02:00
redshift b0030b826a logs stored correctly in correct file 2026-04-02 15:33:13 +02:00
Evan Yang f40b0ba4e5 fix(wallet): treat cocod body errors as failures 2026-04-02 21:06:51 +08:00
redshift ae80f94afe logging changed to date based 2026-04-02 14:17:04 +02:00
redshift c0d3063bca added logs 2026-04-02 00:10:27 +02:00
redshift fcae75fa7c provider manage instnace is now persisted across calls. 2026-04-01 21:11:19 +02:00
redshift f7fadaefd2 fix: handle daemon /usage endpoint returning array directly
The daemon's /usage endpoint returns { output: [...] } where output IS
the entries array directly, not an object with entries/totalEntries/etc.
Both the CLI usage command and TUI monitor expected the wrong shape,
causing entries.reduce to fail with 'is not a function'.

- Fix fetchUsage() to parse the array response correctly
- Fix CLI usage command to handle the array response
- Add defensive check in getTotals() for undefined/non-array input
2026-04-01 18:12:48 +02:00
redshift fe61ea43c0 fix: remove createUsageTracker, use usageTrackingDriver consistently
- Removed broken merge artifact with createUsageTracker
- Updated createDaemonRequestHandler to use usageTrackingDriver for all usage tracking
- Added walletClient to deps type
- Removed unused runWalletCommand and parseBalances from deps type
- Cleaned up unused imports in daemon/index.ts
2026-04-01 16:18:06 +02:00
redshift 243967f7a5 fixing merge issues 2026-04-01 16:14:11 +02:00
redshift dca3ca992f Merge branch 'wallet-integration' of github.com-red:Routstr/routstrd 2026-04-01 15:55:35 +02:00
redshift d0784a5c53 added automatic refund 2026-03-31 11:44:30 +01:00
redshift 849a4b6850 fixed the data limit 2026-03-30 21:54:57 +01:00
redshift 4917ff2f91 mode chagnes 2026-03-30 21:20:29 +01:00
redshift 07adab2265 added a way to add clients 2026-03-30 21:06:30 +01:00
redshift e8dfb2b05b formatting 2026-03-29 15:11:59 +01:00
redshift 20981ca9d6 TUI total costs fix 2026-03-29 15:03:19 +01:00