import { type RunRecord } from '../../runtime-protocol.js'; import { PDRuntimeError } from '../../error-categories.js'; import type { SqliteConnection } from '../sqlite-connection.js'; import type { DegradedRunInfo, RunStore, TolerantRunListResult } from './run-store.js'; export declare class MalformedRunError extends PDRuntimeError { readonly validRuns: RunRecord[]; readonly degradedRuns: DegradedRunInfo[]; constructor(message: string, validRuns: RunRecord[], degradedRuns: DegradedRunInfo[]); } export declare class SqliteRunStore implements RunStore { private readonly connection; constructor(connection: SqliteConnection); createRun(record: Omit): Promise; getRun(runId: string): Promise; updateRun(runId: string, patch: Partial>): Promise; listRunsByTask(taskId: string): Promise; listValidRunsByTaskTolerant(taskId: string): Promise; deleteRun(runId: string): Promise; /** * Convert a raw DB row into a validated RunRecord. * * Public so the integrity-repair detection pass can reuse the EXACT same * validation logic as the production read path (EP-01: no duplicated * schema validation that can drift from the real one). * * Trust boundary (ERR-001, ERR-005): the row is UNTRUSTED data. We must NOT * use String()/Number() coercion — that washes missing fields into legal * strings/numbers (e.g. `String(undefined)` → `"undefined"` passes Type.String()), * hiding malformed rows from detection. Instead each field is read with a * runtime guard; required fields fail loud, optional fields only accept their * declared nullable shape, and enum fields are passed through as-is so TypeBox * is the single authority on enum validity. * * @throws PDRuntimeError{storage_unavailable} if the row fails schema validation. */ static rowToRecord(row: Record): RunRecord; } //# sourceMappingURL=sqlite-run-store.d.ts.map