import { BaseOptimizer, type BaseOptimizerDeps } from "../baseOptimizer.js"; import { type ReflectionSections } from "../gepaReflect.js"; import type { AgencyRunner } from "../grading/agencyRunner.js"; import type { Input } from "../grading/types.js"; import type { BaseOptimizerConfig } from "../optimizer.js"; import { type OptimizeMutationOperation, type OptimizeMutationPreview } from "../sourceMutator.js"; import { type OptimizeTargetSet } from "../targets.js"; import type { MutationProposal, OptimizeResult } from "../types.js"; export type GepaConfig = BaseOptimizerConfig & { minibatch: number; paretoSet?: Input[]; moduleSelection?: "round-robin" | "all"; }; export type GepaDeps = BaseOptimizerDeps & { propose?: (runAgency: AgencyRunner, sections: ReflectionSections) => Promise; preview?: (targetSet: OptimizeTargetSet, operations: OptimizeMutationOperation[]) => OptimizeMutationPreview; }; /** GEPA: reflective evolution with a Pareto candidate pool and minibatched promotion. */ export declare class Gepa extends BaseOptimizer { private readonly gepaDeps; readonly name = "gepa"; private readonly gepaConfig; constructor(config: GepaConfig, gepaDeps?: GepaDeps); protected optimizeTargets(source: OptimizeTargetSet, inputs: Input[]): Promise; /** Run the optimization loop, threading the pool. */ private evolve; /** One reflective iteration: propose → validate → minibatch filter → (maybe) full eval. */ private attempt; /** Round-robin one target per iteration (SelectModule); `"all"` shows every target. */ private selectTargets; /** The parent's weakest minibatch inputs (by reference), weakest first; falls back to all. */ private focus; /** Grade a candidate `files` map (the overlay) on `inputs`. */ private makeCandidate; }