/** * Poll the daemon's /health endpoint until it returns 200 or timeout. */ export declare function waitForHealth(port: number, timeoutMs: number): Promise; export interface VersionResult { /** The daemon reported `expected` within the budget. */ ok: boolean; /** Last version the daemon reported, if /version answered at least once. */ served?: string; /** True if /version answered at all (even with a mismatched version). Lets * the caller distinguish "never answered" (busy/crash → timeout) from * "answered the wrong version" (stale shadow install / corrupt release). */ responded: boolean; } /** * Poll the daemon's public /version endpoint until it reports `expected` or the * budget expires. This REPLACES the old single one-shot `fetch(/version)` whose * fixed 3s timeout aborted the whole reinstall (rolling back the repoint) if the * daemon's event loop was momentarily busy — which it reliably is right after * boot, when job recovery requeues distill/consolidate jobs and they start * firing LLM calls. /health can be up (waitForHealth already passed) while a * single /version shot still catches a busy window. Polling with a per-attempt * timeout and retry rides that out, and also tolerates the brief race where the * OLD daemon still answers the port before the new one takes over. */ export declare function waitForVersion(port: number, expected: string, timeoutMs: number): Promise;