/** * Startup stage timestamps: where the time goes between process start and a * runner that is online with its models and Python ready. * * Stages (first mark wins, epoch ms): * process_start the Node process began (performance.timeOrigin) * config options parsed and the token is in hand * socket_connected the Socket.IO handshake succeeded * online hello sent, relay up: the server can route work here * python_ready a supported Python interpreter is resolved * discovery_done the local model scan finished and was published * * The socket no longer waits for Python or discovery, so the last two usually * land after `online`. Reported to the desktop app (log line + a "timings" * host message) and printed with --diagnostics. */ export declare const STARTUP_STAGES: readonly ["process_start", "config", "socket_connected", "online", "python_ready", "discovery_done"]; export type StartupStage = (typeof STARTUP_STAGES)[number]; /** Record a stage once. Later marks of the same stage are ignored. */ export declare function markStage(stage: StartupStage, at?: number): void; /** Called after every new stage mark. Returns an unsubscribe function. */ export declare function onStage(cb: (stage: StartupStage, at: number) => void): () => void; export declare function stageMarked(stage: StartupStage): boolean; /** True once every stage has been recorded. */ export declare function startupComplete(): boolean; /** Epoch timestamps and offsets from process start, in stage order. */ export declare function startupTimings(): { at: Partial>; sinceStartMs: Partial>; }; /** Human-readable timeline, one stage per line. */ export declare function formatStartupTimings(): string; /** Test seam. */ export declare function _resetStartupTimings(): void;