export declare const ORPHAN_GRACE_SEC = 30; export declare const STUCK_GRACE_SEC = 90; export interface KeychainProcessSnapshot { pid: number; ppid: number; elapsedSec: number; startTime: string | null; isHelper: boolean; isWatchLock?: boolean; } export interface StuckParentCandidate { pid: number; startTime: string | null; helperPid: number; helperStartTime: string | null; firstSeenAt: number; stage: 'watch' | 'escalate'; } export interface ReapPlan { kill: number[]; nextCandidates: Map; } export declare function planKeychainReap(snapshots: KeychainProcessSnapshot[], now: number, prevCandidates: ReadonlyMap): ReapPlan; export declare function parseEtimeToSeconds(raw: string): number | null; export declare function isReapableHelperCommand(command: string, helperPath: string): boolean; export declare function isWatchLockHelperCommand(command: string, helperPath: string): boolean; export declare function resetKeychainReaperCandidatesForTest(): void; export declare function reapOrphanedKeychainProcesses(): Promise<{ reaped: number; details: string[]; plan: ReapPlan; }>;