import type { Engine } from "../shared/types.js"; import type { TurnSurface } from "../sessions/turn/types.js"; export interface StatusReconcilerDeps { engines: Map; /** The transport seam a settled turn reports through — the web runner's own, so there is no second emit site. */ surfaceFor: (sessionId: string) => TurnSurface; intervalMs?: number; staleMs?: number; /** Test override. */ now?: () => number; /** Carry-over between sweeps: sessions seen stuck once. A session is only * reset on the SECOND consecutive sweep that finds it stuck — a single * observation can be the benign seconds between a turn's process exiting * and the gateway persisting its final status. Created by * startStatusReconciler; tests may pass their own. */ pendingStuck?: Set; } /** One sweep: unstick sessions stuck at status:"running" with no live turn, by * settling them through the one completion path. Returns the number settled — * a session whose fence was lost is not a fix. Exported for tests. */ export declare function sweepOnce(deps: StatusReconcilerDeps): Promise; /** Start the periodic sweep. Returns a stop function. */ export declare function startStatusReconciler(deps: StatusReconcilerDeps): () => void; //# sourceMappingURL=status-reconciler.d.ts.map