import type { SqliteDatabase, SqliteRow } from '../db/adapter.js'; import { type AppendAck, type LedgerStoreOptions, type RunRecord, type RunStatus } from './types.js'; interface EventRow extends SqliteRow { event_id: string; run_id: string; sequence: number; source_event_id: string | null; source_sequence: number | null; event_type: string; source_type: string | null; actor: string; outcome: string | null; occurred_at: string | null; ingested_at: string; payload_json: string; redaction_json: string; previous_hash: string; event_hash: string; } export declare class LedgerStore { private readonly database; private readonly options; constructor(database: SqliteDatabase, options?: LedgerStoreOptions); /** Run a standalone operation in the store's top-level transaction. */ withTransaction(operation: () => T): T; createRun(input: unknown): RunRecord; /** Caller-owned transaction primitive; it deliberately does not begin or commit a transaction. */ createRunInTransaction(input: unknown, now?: string): RunRecord; readRun(runId: string, workspace?: string): RunRecord | undefined; getRunStatus(runId: string, workspace?: string): RunStatus | undefined; updateRunStatus(runId: string, status: RunStatus, endedAt?: string): RunRecord; updateRunStatusInTransaction(runId: string, status: RunStatus, endedAt?: string): RunRecord; appendBatch(runId: string, input: unknown): AppendAck; /** Caller-owned transaction primitive; a savepoint isolates this batch without committing or rolling back the outer transaction. */ appendBatchInTransaction(runId: string, input: unknown): AppendAck; readEvents(runId: string): EventRow[]; verifyChain(runId: string): boolean; private now; private prepareRun; private insertPreparedRun; private appendPreparedBatchInTransaction; private ackFromRows; } export {}; //# sourceMappingURL=store.d.ts.map