export declare const WAIT_FOR_PR_CHECKS_SCHEMA_VERSION: 1;
export type PrCheckRow = {
    name: string;
    state: string;
    link?: string;
    workflow?: string;
};
export type WaitForPrChecksTerminalState = "passed" | "failed" | "timeout" | "no-checks-yet";
export type WaitForPrChecksResult = {
    schemaVersion: typeof WAIT_FOR_PR_CHECKS_SCHEMA_VERSION;
    pr: number;
    state: WaitForPrChecksTerminalState;
    failedChecks: Array<{
        name: string;
        state: string;
        link?: string;
    }>;
    elapsedSec: number;
    pollCount: number;
    checks: PrCheckRow[];
};
export declare function parsePrChecksJson(raw: string | null): PrCheckRow[] | null;
export declare function evaluatePrChecks(rows: PrCheckRow[] | null): {
    state: "pending" | "passed" | "failed";
    failedChecks: Array<{
        name: string;
        state: string;
        link?: string;
    }>;
};
export type GhChecksRunner = (workspacePath: string, pr: number, requiredOnly: boolean) => {
    ok: true;
    raw: string;
} | {
    ok: false;
    code: "gh-unavailable" | "no-checks-yet" | "gh-error";
    message?: string;
};
export declare function defaultGhChecksRunner(workspacePath: string, pr: number, requiredOnly: boolean): ReturnType<GhChecksRunner>;
export declare function waitForPrChecks(args: {
    workspacePath: string;
    pr: number;
    timeoutSec: number;
    intervalSec: number;
    requiredOnly: boolean;
    runGh?: GhChecksRunner;
    nowMs?: () => number;
    sleepMs?: (ms: number) => void;
}): WaitForPrChecksResult;
