/** * GET /api/status — aggregated health snapshot used by the SPA's dashboard. * * All inputs are in-memory subsystem state — no disk reads on each call. * The response budget is < 5 ms; favour `getStatus()` over `testReachability()`. */ import type { FastifyInstance } from 'fastify'; import type { HostProcessOrchestrator } from '../../orchestrator/index.js'; import type { ManagedNodeInfo } from '../../orchestrator/types.js'; import type { NatService } from '../../nat/index.js'; import type { NatStatusSnapshot } from '../../nat/types.js'; import type { UpdateService } from '../../update/index.js'; export interface StatusRouteOptions { orchestrator: HostProcessOrchestrator; nat: NatService; update?: UpdateService; } export interface StatusResponse { service: { name: 'cadre-host'; version: string; uptimeSeconds: number; }; nodes: Array<{ id: string; partyId: string; status: ManagedNodeInfo['status']; profile: ManagedNodeInfo['profile']; }>; connectivity: NatStatusSnapshot; update?: { available?: string; lastChecked?: string; }; } export declare function registerStatusRoute(app: FastifyInstance, opts: StatusRouteOptions): void;