import type { WorkflowRunRow, WorkflowStepRow } from './types.js';
import type { WorkflowDb } from './runner.js';
/**
 * JSONL-backed WorkflowDb for the CLI.
 *
 * Each insert/update appends a line to the file. On read, we scan from the
 * bottom and take the last record for each ID — so updates naturally shadow
 * earlier inserts without rewriting the file.
 *
 * This makes writes O(1) and reads O(n) where n = number of lines (small for
 * typical workflows). Resume only reads once at startup, so the read cost is
 * paid once per CLI invocation.
 *
 * File: .agent-relay/workflow-runs.jsonl in the workflow cwd.
 */
export declare class JsonFileWorkflowDb implements WorkflowDb {
    private readonly filePath;
    /** Whether the storage directory is writable. False = silent no-op mode. */
    private readonly writable;
    constructor(filePath: string);
    /** Returns false if the storage directory could not be created (permission error). */
    isWritable(): boolean;
    private append;
    /** Read all lines and build the latest snapshot for each ID. */
    private snapshot;
    insertRun(run: WorkflowRunRow): Promise<void>;
    updateRun(id: string, patch: Partial<WorkflowRunRow>): Promise<void>;
    getRun(id: string): Promise<WorkflowRunRow | null>;
    insertStep(step: WorkflowStepRow): Promise<void>;
    updateStep(id: string, patch: Partial<WorkflowStepRow>): Promise<void>;
    getStepsByRunId(runId: string): Promise<WorkflowStepRow[]>;
}
//# sourceMappingURL=file-db.d.ts.map