import { type Objective, type ParetoResult } from './pareto';
import { type RunTrace } from './run-critic';
import { type RunScore, type RunScoreWeights } from './run-score';
import type { SteeringBundle } from './steering';
export type HarnessIntervention = 'continue' | 'plan' | 'audit' | 'recover' | 'repair' | 'verify' | 'final_gate' | 'wait_for_measurement' | 'abort';
export interface WorkflowTopology {
    id: string;
    interventions: HarnessIntervention[];
    maxParallelBranches?: number;
    metadata?: Record<string, unknown>;
}
export interface MeasurementPolicy {
    required: string[];
    optional?: string[];
    promoteOn?: Array<keyof RunScore | 'aggregate'>;
}
export interface HarnessVariant {
    id: string;
    steering?: SteeringBundle;
    topology?: WorkflowTopology;
    measurement?: MeasurementPolicy;
    budgets?: Record<string, number>;
    models?: Record<string, string>;
    reviewers?: Record<string, string>;
    metadata?: Record<string, unknown>;
}
export interface HarnessScenario {
    id: string;
    task: string;
    split?: 'train' | 'validation' | 'test' | string;
    metadata?: Record<string, unknown>;
}
export interface HarnessRunRequest {
    variant: HarnessVariant;
    scenario: HarnessScenario;
    trialIndex: number;
}
export interface HarnessAdapter {
    run(request: HarnessRunRequest): Promise<RunTrace>;
}
export interface HarnessRunResult {
    variant: HarnessVariant;
    scenario: HarnessScenario;
    trialIndex: number;
    trace: RunTrace;
    score: RunScore;
    aggregate: number;
}
export interface HarnessVariantReport {
    variant: HarnessVariant;
    runs: HarnessRunResult[];
    aggregateMean: number;
    passRate: number;
    costUsdMean: number;
    wallSecondsMean: number;
    scoreMean: RunScore;
}
export interface HarnessSelection {
    winner: HarnessVariantReport;
    frontier: ParetoResult<HarnessVariantReport>;
    reports: HarnessVariantReport[];
}
export interface HarnessExperimentResult {
    results: HarnessRunResult[];
    selection: HarnessSelection;
}
export interface HarnessExperimentConfig {
    adapter: HarnessAdapter;
    variants: HarnessVariant[];
    scenarios: HarnessScenario[];
    trialsPerScenario?: number;
    parallelism?: number;
    weights?: Partial<RunScoreWeights>;
    objectives?: Array<Objective<HarnessVariantReport>>;
    score?: (trace: RunTrace, request: HarnessRunRequest) => RunScore | Promise<RunScore>;
    onResult?: (result: HarnessRunResult) => void | Promise<void>;
}
export declare const DEFAULT_HARNESS_OBJECTIVES: Array<Objective<HarnessVariantReport>>;
export declare function runHarnessExperiment(config: HarnessExperimentConfig): Promise<HarnessExperimentResult>;
export declare function selectHarnessVariant(results: HarnessRunResult[], objectives?: Array<Objective<HarnessVariantReport>>): HarnessSelection;
export declare function summarizeHarnessResults(results: HarnessRunResult[]): HarnessVariantReport[];
//# sourceMappingURL=harness-optimizer.d.ts.map