/**
 * Verify-phase audit recorder. Captures schema-validation passes,
 * structural-check results, and retry events at the moments they happen
 * during analyse-runner execution.
 *
 * Forward-logging discipline (engines 6.22.x+): validation results are
 * recorded by the runValidate wrapper at the moment of validation;
 * structural-check results are recorded by the check pass after each
 * successful schema validation; retry events are recorded by the retry
 * loop when it triggers. No backward inference.
 *
 * Sidecars produced (by analyse-runner at end of run):
 *   - verify/invariants.json: each check + result + items requiring review
 *   - verify/retries.json: retry events with error categories and deltas
 */
export interface ValidationPass {
    /** Sequence ordinal across validate calls in this run. */
    ordinal: number;
    /** What kind of validation. schema-validation = spv-validate; infer = spv infer; structural = invariant library. */
    kind: 'schema-validation' | 'infer' | 'structural';
    ok: boolean;
    errorCount: number;
    errors: string[];
    /** Optional: timing in ms. */
    durationMs?: number;
}
export interface StructuralCheckResult {
    name: string;
    description: string;
    ok: boolean;
    violations: Array<{
        path: string;
        issue: string;
    }>;
}
export interface HumanReviewItem {
    severity: 'error' | 'warning' | 'info';
    kind: string;
    path?: string;
    message: string;
}
export interface RetryEvent {
    ordinal: number;
    trigger: string;
    errorCount: number;
    errorCategories: Record<string, number>;
    tokenCountIn?: number;
    tokenCountOut?: number;
    latencyMs?: number;
    /** A short summary of the diff between before/after. Full diff lives in
     *  the retry's prompt + draft files, not in this sidecar. */
    itemsChangedSummary?: string;
    ok: boolean;
}
export interface VerifyInvariantsDocument {
    schemaVersion: '1.0';
    stage: 'verify';
    passes: ValidationPass[];
    structuralChecks: StructuralCheckResult[];
    humanReviewItems: HumanReviewItem[];
}
export interface VerifyRetriesDocument {
    schemaVersion: '1.0';
    stage: 'verify';
    retries: RetryEvent[];
}
export declare class InMemoryVerifyRecorder {
    private passes;
    private structuralChecks;
    private humanReviewItems;
    private retries;
    private nextPassOrdinal;
    private nextRetryOrdinal;
    recordPass(args: Omit<ValidationPass, 'ordinal'>): ValidationPass;
    recordStructuralCheck(check: StructuralCheckResult): void;
    recordHumanReviewItem(item: HumanReviewItem): void;
    recordRetry(args: Omit<RetryEvent, 'ordinal'>): RetryEvent;
    buildInvariants(): VerifyInvariantsDocument;
    buildRetries(): VerifyRetriesDocument;
}
/** Categorise a validation error string by pattern match. Used for
 *  retry-event analytics. */
export declare function categoriseValidationError(errorText: string): Record<string, number>;
//# sourceMappingURL=verify-recorder.d.ts.map