import { JsonValue } from './types.js';

declare const RIDDLE_PROOF_CAPTURE_DIAGNOSTIC_VERSION: "riddle-proof.capture-diagnostic.v1";
declare const DEFAULT_DIAGNOSTIC_STRING_LIMIT = 2000;
declare const DEFAULT_DIAGNOSTIC_ARRAY_LIMIT = 50;
declare const DEFAULT_DIAGNOSTIC_HISTORY_LIMIT = 20;
interface RiddleProofDiagnosticRedactionOptions {
    string_limit?: number;
    array_limit?: number;
    redacted_value?: string;
    sensitive_key_pattern?: RegExp;
}
interface RiddleProofArtifactSummary {
    name: string;
    kind?: string;
    role?: string;
    url?: string;
    path?: string;
    content_type?: string;
    size_bytes?: number;
    metadata_keys?: string[];
    source?: "outputs" | "screenshots" | "artifacts" | (string & {});
}
interface RiddleProofCaptureArtifactSummary {
    outputs: RiddleProofArtifactSummary[];
    screenshots: RiddleProofArtifactSummary[];
    artifacts: RiddleProofArtifactSummary[];
    result_keys: string[];
    artifact_json: string[];
    artifact_errors: Record<string, string>;
    proof_script_error: boolean;
    console_summary?: JsonValue;
}
interface RiddleProofCaptureDiagnostic {
    version: typeof RIDDLE_PROOF_CAPTURE_DIAGNOSTIC_VERSION;
    label?: string;
    tool?: string;
    captured_at: string;
    ok?: boolean;
    timeout?: boolean;
    error?: string;
    route?: string;
    preview_url?: string;
    wait_for_selector?: string;
    args?: JsonValue;
    artifact_summary: RiddleProofCaptureArtifactSummary;
    evidence?: JsonValue;
    notes?: string[];
}
interface CreateCaptureDiagnosticInput {
    label?: string;
    tool?: string;
    captured_at?: string;
    ok?: boolean;
    timeout?: boolean;
    error?: unknown;
    args?: unknown;
    payload?: unknown;
    evidence?: unknown;
    route?: string;
    preview_url?: string;
    wait_for_selector?: string;
    notes?: string[];
    redaction?: RiddleProofDiagnosticRedactionOptions;
}
declare function redactForProofDiagnostics(value: unknown, options?: RiddleProofDiagnosticRedactionOptions): JsonValue;
declare function summarizeCaptureArtifacts(payload: unknown): RiddleProofCaptureArtifactSummary;
declare function createCaptureDiagnostic(input: CreateCaptureDiagnosticInput): RiddleProofCaptureDiagnostic;
declare function appendCaptureDiagnostic<T extends {
    capture_diagnostics?: RiddleProofCaptureDiagnostic[];
}>(state: T, input: CreateCaptureDiagnosticInput, historyLimit?: number): RiddleProofCaptureDiagnostic;

export { type CreateCaptureDiagnosticInput, DEFAULT_DIAGNOSTIC_ARRAY_LIMIT, DEFAULT_DIAGNOSTIC_HISTORY_LIMIT, DEFAULT_DIAGNOSTIC_STRING_LIMIT, RIDDLE_PROOF_CAPTURE_DIAGNOSTIC_VERSION, type RiddleProofArtifactSummary, type RiddleProofCaptureArtifactSummary, type RiddleProofCaptureDiagnostic, type RiddleProofDiagnosticRedactionOptions, appendCaptureDiagnostic, createCaptureDiagnostic, redactForProofDiagnostics, summarizeCaptureArtifacts };
