/** * Behavioral proof — the "prove the fix" half of reproduce→prove. * * Given a bug_pattern that declares a `simulation:` block, the backend spawns * two reference handler containers (a buggy one and a fixed one), fires the * pattern's probes at both, and returns the side-by-side diff — e.g. the buggy * handler double-charges on a duplicate webhook, the fixed one dedupes. * * Call this AFTER run_workflow reproduces a failure, to prove a known fix * actually survives it (not just that the failure happened). Pass sandbox_id + * flow_run_id from the run so the diff is saved onto that run's receipt. * * Calls POST /api/mcp/verify_behavior. The buggy/fixed handlers are * FetchSandbox reference implementations, NOT the user's code — the diff proves * the pattern is real and the brain's fix_pattern works; the user applies that * fix_pattern to inherit the behavior. */ export interface VerifyBehaviorInput { bug_pattern_id: string; prompt?: string; sandbox_id?: string; flow_run_id?: string; } interface BackendProbe { name?: string; buggy_response?: { status?: number; body?: string; error?: string | null; }; fixed_response?: { status?: number; body?: string; error?: string | null; }; expected_diff_observed?: boolean; verdict?: string; } interface BackendVerifyResponse { /** Typed next step from the server. Every entry point carries the exit: * a finding is a hypothesis until prove_fix measures it. */ next_actions?: unknown; prove_instructions?: string; pattern_id?: string; mode?: string; disclaimer?: string; probes?: BackendProbe[]; /** Present only for `mode: order_fuzz`, which returns no probes at all — * the per-side verdict over every permutation and duplicate variant. */ order_fuzz?: { confirmed?: boolean; confirmed_by?: string[]; order_independence_confirmed?: boolean; terminal_safety_confirmed?: boolean; idempotency_confirmed?: boolean; events_tested?: string[]; minimized_sequence?: unknown; buggy?: Record; fixed?: Record; }; duration_ms?: number; error?: string | null; classification?: unknown; } export interface NormalizedVerifyResult { /** Typed next step from the server. Every entry point carries the exit: * a finding is a hypothesis until prove_fix measures it. */ next_actions?: unknown; prove_instructions?: string; pattern_id?: string; mode?: string; confirmed: boolean; /** Which property the fuzzer flipped, when the simulation was an order_fuzz. * A receipt must never claim a property this run did not prove. */ confirmed_by?: string[]; order_fuzz?: BackendVerifyResponse["order_fuzz"]; disclaimer?: string; probes: Array<{ name?: string; buggy_status?: number; fixed_status?: number; matched_expectation: boolean; divergent: boolean; verdict?: string; }>; duration_ms?: number; } export declare const verifyBehaviorTool: { readonly name: "verify_behavior"; readonly description: string; readonly inputSchema: { readonly type: "object"; readonly properties: { readonly bug_pattern_id: { readonly type: "string"; readonly description: string; }; readonly prompt: { readonly type: "string"; readonly description: string; }; readonly sandbox_id: { readonly type: "string"; readonly description: string; }; readonly flow_run_id: { readonly type: "string"; readonly description: string; }; }; readonly required: readonly ["bug_pattern_id"]; readonly additionalProperties: false; }; }; export declare function runVerifyBehavior(input: VerifyBehaviorInput): Promise; export {};