- 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.
- 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
Replace direct store.getState().clientIds access with a shared utility:
- getClientsFromStore(store) for daemon/local usage
- getClientsList() for remote CLI usage via daemon API
This ensures integration refresh logic and client management work
consistently whether running inside the daemon or connecting to a
remote daemon where store access is unavailable.
Updated:
- src/daemon/index.ts: use getClientsFromStore for integration refresh
- src/daemon/http/index.ts: use getClientsFromStore in /clients endpoints
- src/utils/daemon-client.ts: use getClientsList in ensureDaemonClient
- src/cli.ts: use getClientsList in clients list command
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
- 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
- Add mode to /status endpoint response
- Add fetchStatus() to retrieve daemon status
- Display System Status box next to Balance box in overview tab
- Show daemon state, wallet state, and current mode
- Color code status values (green/red for healthy/error states)
- Add mode config option (xcashu, lazyrefund, apikeys) to RoutstrdConfig
- Pass mode parameter to routeRequests in daemon HTTP handler
- Add 'routstrd mode' CLI command to set mode interactively
- Mode command shows current mode, prompts for selection, updates config,
and restarts the daemon
- Add getClientIdFromRequest helper to extract API key from Authorization header
- Look up clientId from store's clientIds array
- Include client field in both streaming and non-streaming usage entries
- Enables per-client usage tracking for integrations