import type { RunEvalOptions } from '../campaign/presets/run-eval';
import type { CampaignResult, DispatchContext, JudgeConfig, MutableSurface, Scenario } from '../campaign/types';
import type { HostedTenant } from '../hosted/client';
import { type SelfImproveBudget, type SelfImproveLlm, type SelfImproveOptions, type SelfImproveResult } from './self-improve';
export type AgentEvalAgent<TScenario extends Scenario, TArtifact> = (surface: MutableSurface, scenario: TScenario, ctx: DispatchContext) => Promise<TArtifact>;
export type DefineAgentEvalOptions<TScenario extends Scenario, TArtifact> = SelfImproveOptions<TScenario, TArtifact>;
export interface AgentEvalEvaluateOptions<TScenario extends Scenario, TArtifact> extends Omit<RunEvalOptions<TScenario, TArtifact>, 'dispatch' | 'judges' | 'runDir' | 'scenarios'> {
    /** Scenario set to evaluate. Defaults to the scenarios passed to `defineAgentEval`. */
    scenarios?: TScenario[];
    /** Surface to evaluate. Defaults to the baseline surface passed to `defineAgentEval`. */
    surface?: MutableSurface;
    /** Agent to evaluate. Defaults to the agent passed to `defineAgentEval`. */
    agent?: AgentEvalAgent<TScenario, TArtifact>;
    /** Single judge override. Ignored when `judges` is set. */
    judge?: JudgeConfig<TArtifact, TScenario>;
    /** Full judge list override. Defaults to the single judge passed to `defineAgentEval`. */
    judges?: JudgeConfig<TArtifact, TScenario>[];
    /** Logical or filesystem run directory. Defaults to an in-memory run. */
    runDir?: string;
}
export type AgentEvalImproveOptions<TScenario extends Scenario, TArtifact> = Omit<Partial<SelfImproveOptions<TScenario, TArtifact>>, 'budget' | 'hostedTenant' | 'llm'> & {
    budget?: Partial<SelfImproveBudget>;
    hostedTenant?: Partial<HostedTenant>;
    llm?: Partial<SelfImproveLlm>;
};
export interface DefinedAgentEval<TScenario extends Scenario, TArtifact> {
    /** The default scenarios used by `evaluate()` and `improve()`. */
    readonly scenarios: readonly TScenario[];
    /** The default baseline surface used by `evaluate()` and `improve()`. */
    readonly baselineSurface: MutableSurface;
    /**
     * Run one scored evaluation. Use this for a baseline score or to score one
     * candidate surface without running an improvement loop.
     */
    evaluate(opts?: AgentEvalEvaluateOptions<TScenario, TArtifact>): Promise<CampaignResult<TArtifact, TScenario>>;
    /**
     * Run the closed improvement loop. Per-call overrides replace the definition
     * except for nested config objects (`budget`, `llm`, `hostedTenant`), which
     * are merged field-by-field so callers can override one knob without
     * repeating secrets or budget defaults.
     */
    improve(opts?: AgentEvalImproveOptions<TScenario, TArtifact>): Promise<SelfImproveResult<TScenario, TArtifact>>;
}
/**
 * Define an agent eval once, then either score a surface with `evaluate()` or
 * run the closed loop with `improve()`.
 *
 * This is a DX wrapper only: it delegates to `runEval()` and `selfImprove()` and
 * returns their native result shapes.
 */
export declare function defineAgentEval<TScenario extends Scenario, TArtifact>(defaults: DefineAgentEvalOptions<TScenario, TArtifact>): DefinedAgentEval<TScenario, TArtifact>;
//# sourceMappingURL=define-agent-eval.d.ts.map