import type { RunEvent, RunObserver, RunSnapshot, StepDetailSnapshot, WorkflowDefinition } from "./types.js";
export interface RunArchiveInfo {
    path: string;
    runId: string;
}
export interface ArchiveRecord {
    type: "metadata" | "event" | "snapshot";
    occurredAt: string;
    data: Record<string, unknown>;
}
export declare function defaultRunArchiveDirectory(): string;
export declare function createRunArchive(workflow: WorkflowDefinition, runId: string, directory?: string): RunArchive & RunArchiveInfo;
export declare class RunArchive implements RunObserver {
    readonly path: string;
    constructor(path: string);
    writeMetadata(workflow: WorkflowDefinition, runId: string): void;
    onEvent(event: RunEvent): void;
    onSnapshot(snapshot: RunSnapshot, stepDetails: StepDetailSnapshot[]): void;
    onLog(): void;
}
export declare function readRunArchive(filePath: string): ArchiveRecord[] | string;
