/** * Read a JSON state file from disk. * Returns null if the file does not exist or cannot be parsed. */ export declare function readJsonState(filePath: string): T | null; /** * Write a JSON state file to disk, creating intermediate directories as needed. */ export declare function writeJsonState(filePath: string, data: T): void; /** * Returns true if a saved-at timestamp is older than maxAgeMs (default: 7 days). */ export declare function isStateStale(savedAt: string, maxAgeMs?: number): boolean; /** Minimal interface shared by task state. Full interface in run-task.ts. */ export interface TaskStateBase { taskId: string; savedAt: string; } /** * Build the canonical state file path for a run-task session. * Exported so run-task.ts can use it without duplicating the path logic. */ export declare function taskStateFilePath(cwd: string, taskId: string): string; /** Minimal interface shared by sprint state. Full interface in run-sprint.ts. */ export interface SprintStateBase { sprintId: string; savedAt: string; } /** * Build the canonical state file path for a run-sprint session. * Exported so run-sprint.ts can use it without duplicating the path logic. */ export declare function sprintStateFilePath(cwd: string, sprintId: string): string;