/** * Golden Test Pattern — Record and verify golden runs. * * Record a "golden" (reference) run, then verify subsequent runs * match the golden in terms of tools called, output similarity, and token budget. */ import type { AgentTrace, AssertionResult } from './types'; export interface GoldenSnapshot { trace_id: string; recorded_at: string; tools_called: string[]; tool_sequence: string[]; output: string; total_tokens: number; total_steps: number; metadata: Record; } export interface GoldenVerifyOptions { /** Max allowed deviation in token count (fraction, e.g. 0.2 = 20%) */ token_tolerance?: number; /** Max allowed deviation in step count */ step_tolerance?: number; /** Require exact same tools (order-insensitive) */ exact_tools?: boolean; /** Require exact same tool sequence (order-sensitive) */ exact_sequence?: boolean; /** Require output contains same key phrases */ check_output?: boolean; } /** * Record a golden snapshot from a trace. */ export declare function recordGolden(trace: AgentTrace): GoldenSnapshot; /** * Save golden snapshot to disk. */ export declare function saveGolden(golden: GoldenSnapshot, outputDir: string, testName: string): string; /** * Load golden snapshot from disk. */ export declare function loadGolden(goldenDir: string, testName: string): GoldenSnapshot | null; /** * Verify a trace against a golden snapshot. */ export declare function verifyGolden(trace: AgentTrace, golden: GoldenSnapshot, opts?: GoldenVerifyOptions): AssertionResult[]; //# sourceMappingURL=golden.d.ts.map