/**
 * Correlation study — "does our eval score predict real-world outcomes?"
 *
 * This is the load-bearing signal. Takes a TraceStore + OutcomeStore,
 * joins on runId, computes Pearson + Spearman + bootstrap CI for every
 * (evalMetric, outcomeMetric) pair the caller declares.
 *
 * Without this number the framework is ornamental. With it and r > 0.6
 * the framework is a moat — no other agent-eval tool publishes one.
 */
import type { Run } from '../trace/schema';
import type { TraceStore } from '../trace/store';
import type { OutcomeFilter, OutcomeStore } from './outcome-store';
export interface EvalMetricSpec {
    id: string;
    /** Extract a scalar from a run (defaults cover score/pass/durationMs/costUsd/tokens). */
    extract?: (run: Run, store: TraceStore) => Promise<number | null>;
}
export interface OutcomePair {
    evalMetric: string;
    outcomeMetric: string;
}
export interface CorrelationResult {
    evalMetric: string;
    outcomeMetric: string;
    n: number;
    pearson: number;
    spearman: number;
    /** 95% bootstrap CI for Pearson. */
    pearsonCi95: {
        lower: number;
        upper: number;
    };
    /** Rough verdict: 'strong' ≥ 0.7, 'moderate' ≥ 0.4, else 'weak'. */
    verdict: 'strong' | 'moderate' | 'weak';
}
export interface CorrelationStudyResult {
    pairs: CorrelationResult[];
    joinedSamples: number;
    skippedRuns: number;
}
export interface CorrelationStudyOptions {
    /** Only join outcomes captured within this window after run.startedAt. */
    maxCaptureLagMs?: number;
    /** Restrict to a subset of outcomes (cohort, region, source). */
    outcomeFilter?: OutcomeFilter;
    /** Which outcome per run to use when multiple exist. Default 'latest'. */
    reduction?: 'latest' | 'mean' | 'max';
    /** Bootstrap iterations for the CI. Default 500. */
    bootstrapIterations?: number;
}
export declare function correlationStudy(traceStore: TraceStore, outcomeStore: OutcomeStore, evalMetrics: EvalMetricSpec[], outcomeMetricNames: string[], options?: CorrelationStudyOptions): Promise<CorrelationStudyResult>;
//# sourceMappingURL=correlation-study.d.ts.map