import type { RunState } from "../mcp/run-manager.js"; /** * Atomically write a RunState to .bober/runs//state.json * via a temp-file + rename to prevent partial-write corruption. * * Uses process.pid + Date.now() in the temp filename to avoid collisions * when multiple writes to the same runId race (e.g. concurrent progress * updates in tests). */ export declare function writeRunState(projectRoot: string, state: RunState): Promise; /** * Read a RunState from disk. Returns null if the file does not exist * or contains invalid JSON — never throws. */ export declare function readRunState(projectRoot: string, runId: string): Promise; /** * Enumerate all RunState files under .bober/runs/. * * Returns an empty array if the directory does not exist. * Silently skips any entry whose state.json is missing or malformed. */ export declare function listRunStateFiles(projectRoot: string): Promise; /** * Cross-project read-only RunState enumeration for the cockpit * discovery tools (get-project-state, list-projects). * * UNLIKE the RunManager-backed APIs, this helper does NOT use the * in-memory singleton — it always walks .bober/runs//state.json * on the supplied projectRoot. The discovery tools call it with * arbitrary projectPath values; we cannot assume RunManager has been * load()'d for that root. * * Implementation: delegates to listRunStateFiles. Provided as a named * alias because: * 1. It documents the cockpit intent (cross-project, read-only). * 2. Future call sites can filter without touching listRunStateFiles. */ export declare function readRunStatesFromDisk(projectRoot: string): Promise; //# sourceMappingURL=run-state.d.ts.map