/**
 * CI gate — evaluate a corpus against threshold contracts and generate
 * a human-readable PR/build comment.
 *
 * Three layers:
 *   1. `ThresholdContract` declarations (YAML-equivalent TS objects)
 *   2. `evaluateContract` runs the contracts against a TraceStore and
 *      returns a structured report + overall pass/fail.
 *   3. `renderMarkdownReport` formats the report for GitHub PR comments.
 *
 * Consumers wrap this in their own `gh pr comment` / CI integration —
 * we don't ship the GitHub Action binary, just the library call that
 * the action invokes.
 */
import type { BaselineReport } from './baseline';
import { type Slo, type SloReport } from './slo';
import type { Run } from './trace/schema';
import type { RunFilter, TraceStore } from './trace/store';
export interface ContractMetric {
    /** Metric id matching either a predefined key or a custom extractor. */
    metric: string;
    higherIsBetter: boolean;
    /** Max tolerated regression (e.g. 0.02 = 2pp worse than baseline). */
    maxRegression?: number;
    /** Optional extractor if the metric isn't in the default set. */
    extract?: (run: Run, store: TraceStore) => Promise<number | null>;
}
export interface ThresholdContract {
    name: string;
    baseline: RunFilter;
    candidate: RunFilter;
    metrics: ContractMetric[];
    slos?: Slo[];
}
export interface ContractReport {
    name: string;
    baselineReport: BaselineReport;
    sloReport?: SloReport;
    breaches: string[];
    pass: boolean;
}
export declare function evaluateContract(store: TraceStore, contract: ThresholdContract): Promise<ContractReport>;
export declare function renderMarkdownReport(reports: ContractReport[]): string;
//# sourceMappingURL=ci-gate.d.ts.map