import type { JudgeConfig, ProgressCallback, Report, Sample } from '../types/index.js';
interface WeakSample {
    sample_id: string;
    compositeScore: number;
    llmReason: string | null;
    failedAssertions: string[];
    dimensions: Record<string, number> | null;
    diagnostic?: {
        summary?: string;
        expected?: string;
        actual?: string;
        rootCause?: string[];
        skillSuggestion?: string;
        sampleSuggestion?: string;
        none?: string;
    };
}
export declare function extractWeakSamples(report: Report, variantKey: string, count?: number): WeakSample[];
export declare function allNonTripwireAssertionsPass(report: Report, variantKey: string): boolean;
export declare function buildImprovementPrompt(skillContent: string, score: number, weakSamples: WeakSample[]): string;
/** @deprecated Use ProgressCallback from evaluation-core.ts */
export type EvolveProgressInfo = Parameters<ProgressCallback>[0];
export interface EvolveRoundProgressInfo {
    round: number;
    totalRounds: number;
    phase: string;
    score?: number;
    delta?: number;
    accepted?: boolean;
    costUSD?: number;
    /** False = exec 或 judge executor 不报 cost(如 codex)→ costUSD 是占位 0。
     *  CLI 输出据此把 "$0.0000" 改成「—」。 */
    costReported?: boolean;
    error?: string;
    reused?: boolean;
}
interface EvolveOptions {
    skillPath: string;
    samplesPath: string;
    rounds?: number;
    target?: number | null;
    stopOnAssertionsPass?: boolean;
    autoFixSamples?: boolean;
    sampleFixMaxAttempts?: number;
    reuseLatestEval?: boolean;
    model?: string;
    /** Single-judge config. evolve 不支持 ensemble — CLI 在 length>=2 时 exit 2,
     *  programmatic API 在 evolveSkill 入口同样 throw,二者一致。Default
     *  `[{ executor: <executorName>, model: 'haiku' }]`. */
    judgeModels?: JudgeConfig[];
    improveModel?: string;
    /** 改写策略。'agent' 用 agent 工具增量 Edit；'rewrite' 用单次 LLM 输出全文。默认 'agent'。 */
    improveMode?: 'agent' | 'rewrite';
    executorName?: string;
    concurrency?: number;
    timeoutMs?: number;
    skipConnectivity?: boolean;
    /** 控被评测 LLM 的扩展思考预算。默认 'low' 跟 omk eval 一致。 */
    effort?: 'low' | 'medium' | 'high' | 'xhigh' | 'max';
    /** 关闭 diagnostic LLM 调用。默认 false。 */
    noDiagnostic?: boolean;
    /** 跳过 doctor 健康检查门禁。默认 false。 */
    skipDoctor?: boolean;
    onProgress?: ProgressCallback | null;
    onRoundProgress?: ((progress: EvolveRoundProgressInfo) => void) | null;
}
interface TrajectoryEntry {
    round: number;
    score: number;
    delta: number;
    accepted: boolean;
    costUSD: number;
}
export interface EvolveResult {
    startScore: number;
    finalScore: number;
    bestRound: number;
    totalRounds: number;
    totalCostUSD: number;
    stopReason?: 'target' | 'assertions-pass' | 'consecutive-rejects' | 'rounds';
    sampleFixes?: Array<{
        round: number;
        fixedCount: number;
        costUSD: number;
    }>;
    reusedBaselineReportId?: string;
    /** False = 任一轮的 exec / judge 不报 cost → totalCostUSD 是 lower-bound 而非真值。 */
    costReported?: boolean;
    trajectory: TrajectoryEntry[];
    bestSkillPath: string;
    allVersions: string[];
    reportId?: string;
}
export interface RoundReport {
    round: number;
    accepted: boolean;
    report: Report;
}
export declare function mergeEvolveReports(roundReports: RoundReport[], skillName: string, totalCostUSD: number, samples?: Sample[], skillPath?: string): Report;
export declare function evolveSkill({ skillPath, samplesPath, rounds, target, stopOnAssertionsPass, autoFixSamples, sampleFixMaxAttempts, reuseLatestEval, model, judgeModels, improveModel, improveMode, executorName, concurrency, timeoutMs, skipConnectivity, effort, noDiagnostic, skipDoctor, onProgress, onRoundProgress, }: EvolveOptions): Promise<EvolveResult>;
export {};
//# sourceMappingURL=evolver.d.ts.map