/** * Shared liveness seam between the intake route and the LongRunningSupervisor. * * The route writes via touch(); the supervisor reads via lastAliveAt(). Both * reference the same MapLivenessStore instance — no channel, no IPC, just a * plain in-process Map. * * Silence-kill contract (from the supervisor spec). On silence the supervisor * kills the scaffold child process (python `-m scaffold`) for that scanner; the * resulting exit feeds the normal restart-with-backoff path (subject to the * crash-loop guard), which relaunches it: * - null → heartbeat not yet started; silence-kill stays disarmed. * - 0 → a real epoch-ms timestamp (boundary value, not "never"). * - >0 → last POST timestamp; kill the scaffold child if * Date.now() - ts >= maxSilenceMs. */ export interface LivenessStore { /** Called by the route's updateLiveness on every accepted POST. */ touch(scannerId: string, now: number): void; /** Called by the supervisor's lastAliveAt callback on every silence poll. */ lastAliveAt(scannerId: string): number | null; } /** * Default Map-backed implementation. A future durable store will * implement the same interface; swap without touching callers. */ export declare class MapLivenessStore implements LivenessStore { private readonly store; touch(scannerId: string, now: number): void; lastAliveAt(scannerId: string): number | null; } //# sourceMappingURL=liveness-store.d.ts.map