import type { StepRecord, RunState, RunFilter, RunRef } from './types.js'; export declare class LogConflictError extends Error { readonly runId: string; readonly expectedIndex: number; readonly actualIndex: number; constructor(runId: string, expectedIndex: number, actualIndex: number); } export declare class SuspendError extends Error { readonly waitingFor: string; constructor(waitingFor: string); } export declare class RunNotFoundError extends Error { constructor(runId: string); } export declare class StepNotFoundError extends Error { constructor(runId: string, key: string); } export declare class RunNotTerminalError extends Error { readonly runId: string; readonly status: RunState['status']; constructor(runId: string, status: RunState['status']); } export interface DeleteRunOptions { force?: boolean; } export declare function isTerminalRunStatus(status: RunState['status']): boolean; export interface StepFinalizePatch { status: 'finished' | 'error'; result?: unknown; error?: { name: string; message: string; }; finishedAt?: number; } export interface RunStore { appendStep(runId: string, record: StepRecord): Promise; finalizeStep(runId: string, key: string, patch: StepFinalizePatch): Promise; getSteps(runId: string): Promise; getRunState(runId: string): Promise; putRunState(state: RunState): Promise; initRun?(state: RunState): Promise; pruneStepsBeforeEpoch?(runId: string, keepEpoch: number): Promise; reserveSteps?(runId: string, count: number): Promise; listRuns(filter: RunFilter): AsyncIterable; deleteRun(runId: string, options?: DeleteRunOptions): Promise; }