import type { AutomationRun } from '../runs.js'; import { type AutomationStorePathConfig } from './paths.js'; interface AutomationRunsSnapshot extends Record { version: 1; runs: AutomationRun[]; } export interface AutomationRunStoreConfig { readonly path?: string | undefined; readonly configManager?: AutomationStorePathConfig | undefined; } export declare class AutomationRunStore { private readonly store; /** Whole-file writes run one at a time, in call order. See StoreWriteQueue. */ private readonly writes; constructor(config?: string | AutomationRunStoreConfig); load(): Promise; /** * Replace the file with `runs` as they are at THIS call, after every write * already queued has finished. * * `PersistentStore.persist` is atomic but unordered, and the run store is * written by every concurrent run (`automation.maxConcurrentRuns` defaults to * 4) plus the 2-second reconcile timer. Unordered, a write started while a * run was still 'running' could land after the write that recorded it * 'completed', so the completed run reads back as running; the reconciler * then treats it as work that never finished and executes the job again. The * snapshot is taken here rather than at write time, because callers mutate * their map and then save. */ save(runs: readonly AutomationRun[]): Promise; } export {}; //# sourceMappingURL=runs.d.ts.map