import { type RunRecord } from './store.ts'; /** * The READ-ONLY half of `runs.json`, for the workspace-level run index (`GET * /workspace/runs-index`) — the one place that must read a project's runs WITHOUT owning it. * * `RunStore.open` cannot be used here and the reason is the whole point of this module. Opening a * store `mkdir`s `/runs/`, and the caller that opens one goes on to build a * `ProjectContext` — which prunes orphan worktrees and calls `manager.recover()`, resuming * interrupted runs. Building the workspace index must never do any of that: answering "which * tasks exist" would restart agents across every registered project, and typing into a search box * would spend tokens. Cold projects are precisely the ones the index exists to reach, so * `contexts.peek()` (which returns nothing for them) is not an answer either. * * What this does share with the store is the schema and `reconcileLoadedRun`, so a `running` row * left behind by a crashed process reads as interrupted here exactly as it would once the project * were opened for real. A second, subtly different parse of that field would show a task as * running in the palette and failed the moment you clicked it. */ export declare function readRunIndexFromDisk(dataDir: string): RunRecord[];