/** * state/recovery — crash recovery and stale run detection. * * On session start, scans for incomplete runs. If the parent Pi * process is no longer alive, marks the run as abandoned. Completed * runs older than 7 days are cleaned up automatically. */ import { type RunManifest } from "./persistence.js"; export interface RecoveryResult { /** Runs that were active and can be resumed. */ readonly resumable: RunManifest[]; /** Runs that were abandoned (dead parent process). */ readonly abandoned: RunManifest[]; /** Runs that were cleaned up (expired completed runs). */ readonly cleanedUp: string[]; } /** * Run recovery on session start. * * - Marks stale "running" runs as abandoned. * - Cleans up expired completed runs. * - Returns lists of resumable and abandoned runs. */ export declare function recoverRuns(cwd: string): RecoveryResult; /** * Get resumable agent IDs from a run. * Returns a map of agentId → last known status. * * #126: each agentId read from the manifest is validated against the safe * id pattern before any filesystem operation. A corrupted manifest with * `agentIds: ["../../etc/passwd"]` would otherwise escape the agents * directory during path construction. Invalid entries are logged and * skipped, never silently dropped. */ export declare function getResumableAgents(swarmRoot: string, runId: string): Map; //# sourceMappingURL=recovery.d.ts.map