/** * Seven days: a checkpoint only matters until the next session picks the work * up, and pending handoffs are kept regardless. At October 2026 rates (about * 230 sessions and 140 MB a day on one Mac) 14 days would hold about 2 GB. */ export declare const CHECKPOINT_RETENTION_DAYS = 7; export declare const CHECKPOINT_RETENTION_MS: number; export declare const CHECKPOINT_PRUNE_INTERVAL_MS: number; /** Wall-clock cap for one background run; the rest waits for the next day. */ export declare const CHECKPOINT_PRUNE_BUDGET_MS = 20000; /** Records the last background run. Readers skip dot-names in the root. */ export declare const CHECKPOINT_PRUNE_MARKER = ".retention"; export interface CheckpointPruneOptions { now?: number; maxAgeMs?: number; /** Delete; otherwise only report what would go. */ apply?: boolean; /** Stop deleting after this many milliseconds. */ budgetMs?: number; } export interface CheckpointPruneResult { applied: boolean; /** Session folders removed (or that would be). */ sessions: number; /** Their size in bytes. */ bytes: number; /** Studio pointers removed (or that would be). */ pointers: number; /** Session folders kept: recent, or holding a pending handoff. */ kept: number; /** Folders kept only because they hold a pending handoff. */ pendingHandoffs: number; /** The time budget ran out before every candidate was removed. */ partial: boolean; } /** Remove (or count) expired session folders and the Studio pointers left without a checkpoint. */ export declare function pruneCheckpoints(root: string, opts?: CheckpointPruneOptions): CheckpointPruneResult; /** * At most once a day, prune with a time budget. Called from the detached * checkpoint supervisor, never from a hook; every error is swallowed. */ export declare function maybePruneCheckpoints(root: string, opts?: { now?: number; }): CheckpointPruneResult | undefined; //# sourceMappingURL=checkpoint-retention.d.ts.map