import { AgencyConfig } from "../config.js";
import { Tag, AgencyProgram, AgencyNode, PromptSegment } from "../types.js";
import { OptimizerIO } from "./optimizerIO.js";
type OptimizeOptions = {
    iterations: number;
    earlyStopThreshold: number;
    earlyStopPatience: number;
};
export type OptimizeTarget = {
    node: AgencyNode;
    llmCall: AgencyNode | null;
    tag: Tag;
    promptValue?: string;
    configKeys?: string[];
};
export type FeedbackEntry = {
    input: Record<string, any>;
    output: any;
    score: number | null;
    feedback: string;
    promptUsed: string;
};
export declare function getPromptValue(target: OptimizeTarget): string;
export declare function updatePrompt(target: OptimizeTarget, newPrompt: string): void;
export declare function writeBack(filename: string, program: AgencyProgram): void;
export declare function parsePromptToSegments(prompt: string): PromptSegment[];
export declare function optimize(config: AgencyConfig, target: string, opts?: Partial<OptimizeOptions>, io?: OptimizerIO): Promise<void>;
export declare function findGoalTag(program: AgencyProgram, nodeName: string): Tag | null;
export declare function findOptimizeTargets(program: AgencyProgram, nodeName: string): OptimizeTarget[];
export {};
