/** * Authoritative runtime status route. * * The Viewer's System views used to assemble "what is running" from a stale * client-side model registry and a config read, which meant the screen could * confidently name a backend/model the daemon was not using. This route is the * ONE answer: a snapshot supplied by the running daemon, serialized verbatim. * * The handler owns no state and reads no config, PID or credential. Everything * it reports comes from the injected supplier, so the route can never invent a * value the runtime did not produce. */ import { Router } from 'express'; export type RuntimeBackend = 'claude' | 'codex' | 'cline'; export type RuntimeConnectorState = 'connected' | 'disconnected' | 'unknown'; export interface RuntimeConnectorStatus { name: string; enabled: boolean; state: RuntimeConnectorState; } export interface RuntimeStatusSnapshot { running: boolean; backend: RuntimeBackend; model: string; startedAt: number; /** * Nullable on purpose: the daemon boots with `healthService: HealthScoreService | null` * (api-server-init.ts). When there is no health service the answer is "unavailable", * never a fabricated score. */ health: { score: number; status: string; } | null; connectors: RuntimeConnectorStatus[]; } export interface RuntimeStatusRouterOptions { getRuntimeStatus: () => RuntimeStatusSnapshot; } export declare function createRuntimeStatusRouter(options: RuntimeStatusRouterOptions): Router; //# sourceMappingURL=runtime-status-handler.d.ts.map