import type { WorkflowRun, NodeResult, RecoveredState, HistoryEntry } from './types.js';
export declare class RunStore {
    private readonly baseDir;
    private wals;
    private runs;
    private appendCount;
    private retryCounts;
    constructor(baseDir: string);
    create(workflow: string, args: string, workspacePath: string, artifactsPath: string, projectPath: string, workflowYaml?: string, branchName?: string): WorkflowRun;
    updateNode(runId: string, nodeId: string, result: Partial<NodeResult>, opts?: {
        retryCount?: number;
    }): void;
    save(runId: string): void;
    complete(runId: string): void;
    fail(runId: string): void;
    resetNode(runId: string, nodeId: string): void;
    load(runId: string): WorkflowRun | undefined;
    recover(runId: string): RecoveredState | null;
    listAll(): WorkflowRun[];
    listResumable(): Array<{
        runId: string;
        workflow: string;
        status: string;
        startedAt: string;
    }>;
    deleteRun(runId: string): void;
    sweepMarked(): number;
    listFailed(): Array<{
        runId: string;
        workflow: string;
        status: string;
        startedAt: string;
    }>;
    snapshotSync(runId: string): void;
    /** Capture a summary of the run and append to history.jsonl (call before deleteRun). */
    appendHistory(runId: string): void;
    /** Read all history entries. Most recent last. */
    listHistory(limit?: number): HistoryEntry[];
    private getWAL;
    private getRun;
    private statusToEventType;
    private maybeSnapshot;
    private writeSnapshotNow;
}
//# sourceMappingURL=run-store.d.ts.map