import { type WorkflowRetentionSettings } from "./types.js"; import { type BorrowedWorktreeBinding, type PersistedRun } from "./persistence.js"; export interface RetentionCleanupOptions { cwd: string; sessionId: string; home?: string; allSessions?: boolean; retention: Readonly; now?: number; } export interface RetentionCleanupReport { candidates: readonly string[]; deleted: readonly string[]; } /** The runs this run cannot outlive: its parent, its retry lineage, and every run it borrows a named worktree from. */ export declare function runDependencyIds(run: Pick, borrowed: readonly BorrowedWorktreeBinding[]): string[]; export declare function retainTerminalRuns(options: RetentionCleanupOptions): Promise;