import type { StateDatabase } from "../state/database.js"; import { type WorkflowMessage } from "../state/workflow-messages.js"; export declare const MAX_SUBMISSION_REMINDERS = 2; export declare const MAX_RECOVERY_LAUNCHES = 2; export declare const RECOVERY_ACTIVE_TIMEOUT_MS: number; type RecoverySource = { rootRunId: string; messageId: string; runId: string; }; type Clock = { monotonic(): number; now(): number; }; /** Session recovery uses the existing run, message, and turn records. */ export declare class WorkflowRecovery { private readonly state; private readonly clock; private readonly timeoutMs; private readonly messages; private readonly active; constructor(state: StateDatabase, clock?: Clock, timeoutMs?: number); root(runId: string): string; stopped(messageId: string): boolean; sourceForLaunch(sessionId: string): RecoverySource | undefined; attach(runId: string, source: RecoverySource | undefined): void; launchCount(rootRunId: string): number; cancel(runId: string): void; begin(turnId: string): void; sample(): void; suspendSession(sessionId: string): void; resumeSession(sessionId: string): void; end(message: WorkflowMessage, stopReason: string): void; private notice; } export declare function recoveryStopped(state: StateDatabase, messageId: string): boolean; export {};