/**
 * Bisector — auto-locate the change that introduced an eval regression.
 *
 * Two shapes:
 *   - `commitBisect` — walk an ordered SHA list, binary-search for the
 *     first commit that fails.
 *   - `promptBisect` — given a good and bad prompt, progressively port
 *     paragraphs from good→bad to localize the breaking change.
 *
 * Generic `bisect<T>` lets callers drive any ordered state space
 * (dataset versions, config files, CLI flag combinations).
 */
export interface BisectOptions<T> {
    /** State known to pass. */
    good: T;
    /** State known to fail. */
    bad: T;
    /** Equality test on state values — default Object.is. */
    equals?: (a: T, b: T) => boolean;
    /** Pick the halfway state between good + bad. Return null when no further
     *  split is possible (e.g. adjacent commits). */
    halfway: (good: T, bad: T) => T | null;
    /** Produce a verdict for a state. */
    runEval: (state: T) => Promise<{
        score: number;
        pass: boolean;
    }>;
    /** Hard cap on iterations (default 40 — covers ~1T ordered states). */
    maxIterations?: number;
}
export interface BisectStep<T> {
    state: T;
    score: number;
    pass: boolean;
}
export interface BisectResult<T> {
    /** The first bad state — typically `bad` in the final (good, bad) adjacent pair. */
    culprit: T;
    /** Ordered trace of all states evaluated. */
    path: BisectStep<T>[];
    /** True when we narrowed to an adjacent (good, bad) pair. */
    converged: boolean;
    /** True when `good` itself failed or `bad` itself passed — the caller's
     *  premise was broken. */
    inputInconsistent: boolean;
}
export declare function bisect<T>(options: BisectOptions<T>): Promise<BisectResult<T>>;
/**
 * Commit bisect — `commits` is an ordered SHA list, oldest to newest.
 * `good` and `bad` must both be present in the list.
 */
export declare function commitBisect(options: {
    commits: string[];
    good: string;
    bad: string;
    runEval: (sha: string) => Promise<{
        score: number;
        pass: boolean;
    }>;
    maxIterations?: number;
}): Promise<BisectResult<string>>;
/**
 * Prompt bisect — splits the good and bad prompts into paragraphs, then
 * progressively replaces paragraphs in `good` with their counterparts
 * from `bad` to localize the offending change. Only works when the two
 * prompts have the same paragraph count (a common editorial workflow
 * constraint — one paragraph = one change unit).
 */
export declare function promptBisect(options: {
    good: string;
    bad: string;
    runEval: (prompt: string) => Promise<{
        score: number;
        pass: boolean;
    }>;
    maxIterations?: number;
    paragraphSplitter?: (prompt: string) => string[];
}): Promise<BisectResult<string> & {
    offendingParagraphIndex?: number;
}>;
//# sourceMappingURL=bisector.d.ts.map