import type { AutomationJob } from '../jobs.js'; import { type AutomationStorePathConfig } from './paths.js'; interface AutomationJobsSnapshot extends Record { version: 1; jobs: AutomationJob[]; } export interface AutomationJobStoreConfig { readonly path?: string | undefined; readonly configManager?: AutomationStorePathConfig | undefined; } export declare class AutomationJobStore { private readonly store; /** Whole-file writes run one at a time, in call order. See StoreWriteQueue. */ private readonly writes; constructor(config?: string | AutomationJobStoreConfig); load(): Promise; /** * Replace the file with `jobs` as they are at THIS call, after every write * already queued has finished. * * `PersistentStore.persist` is atomic but unordered, and this file has four * concurrent writers by design: `automation.maxConcurrentRuns` defaults to 4, * and every run's start, finish, failure-count update and schedule advance * saves the whole job map. Unordered, a long write started by one run could * land after a shorter one started later and put its older view of the jobs * back on disk. The snapshot is taken here rather than deferred to write * time, because callers mutate their map and then save, so each snapshot is * at least as new as the one queued before it. */ save(jobs: readonly AutomationJob[]): Promise; } export {}; //# sourceMappingURL=jobs.d.ts.map