import { type Ocr18Finding, type Ocr18Summary } from './ocr-multilang-adapter.js'; export type DelegateFinding = Ocr18Finding & { readonly attribution: 'ocr-delegate'; }; export type DelegateFindingsDocument = { readonly schema_version: '1'; readonly mode: 'delegate'; readonly state: 'recorded'; readonly attribution: 'ocr-delegate'; readonly rid: string; readonly session: string; readonly packet: string; readonly findings: readonly DelegateFinding[]; readonly summary: Ocr18Summary; }; export type EnvelopeResult = { readonly ok: true; readonly packet: string; readonly findings: readonly DelegateFinding[]; } | { readonly ok: false; readonly message: string; }; /** Validate the envelope. Pure: no filesystem, so every refusal is unit-testable. */ export declare function parseEnvelope(text: string): EnvelopeResult; export type RecordRefusalCode = 'ENVELOPE_INVALID' | 'PACKET_INVALID' | 'PACKET_MISMATCH'; export type RecordDelegateOptions = { readonly projectRoot: string; readonly packetPath: string; readonly envelopeText: string; }; export type RecordDelegateResult = { readonly ok: true; readonly document: DelegateFindingsDocument; readonly findingsPath: string; readonly replaced: boolean; } | { readonly ok: false; readonly code: RecordRefusalCode; readonly message: string; }; export declare function recordDelegateFindings(options: RecordDelegateOptions): RecordDelegateResult;