import { type GrubTaskState, type PersistedGrubState } from "./grub-types.js"; export declare function grubRoot(cwd: string): string; export declare function stateFilePathFor(harnessDirectory: string): string; export declare function persistState(task: GrubTaskState, createdAt?: number): void; export declare function loadState(stateFilePath: string): PersistedGrubState | null; /** * Scan every ".grub//state.json" under cwd and return each persisted * record whose task.status is "running". Invalid or unreadable files are * skipped silently. */ export declare function discoverActiveTasks(cwd: string): PersistedGrubState[]; /** * Remove ".grub//" directories whose state is terminal and older than * maxAgeMs. Returns the number of directories pruned. Missing or malformed * state files are treated as expired regardless of age to avoid orphans. */ export declare function pruneStale(cwd: string, maxAgeMs?: number): number;