import type { EvaluationReport } from '../types/report.js'; import type { ToolCallInfo } from '../types/index.js'; export interface FixContext { sampleId: string; originalSample: Record; diagnosticSummary: string; expected: string; actual: string; suggestionSample: string; rootCause: string[]; failedAssertions: Array<{ type: string; value: string; passed: boolean; }>; toolCalls: Array>; } export interface FixSamplesOptions { skillContent: string; samples: Record[]; report: EvaluationReport; treatmentKey: string; executor: (opts: { model: string; system: string; prompt: string; timeoutMs: number; lean?: boolean; }) => Promise<{ ok: boolean; text: string; costUSD: number; costReported?: boolean; }>; model: string; maxAttemptsPerSample?: number; } export interface FixSamplesResult { samples: Record[]; fixedCount: number; costUSD: number; /** false 表示 costUSD 只是执行器已上报部分的下界。 */ costReported: boolean; fixes: Array<{ sampleId: string; changed: boolean; error?: string; }>; } export declare function sampleFixWithinScope(previous: Record, next: Record): boolean; export declare function stampFixMetadata(sample: Record, reportId: string): void; export declare function fixSamples(options: FixSamplesOptions): Promise;