/**
 * Declarative oracles — ground-truth assertions without an LLM.
 *
 * Lifted from browser-agent-driver's _oracle.mjs. When you know the
 * expected outcome exactly (a URL, a text fragment, a JSON shape), you
 * don't need an LLM judge — you need a regex. These oracles are
 * composable pass/fail checks over an observation bundle.
 *
 * Each oracle returns { pass, detail, evidence? } and has a short
 * `id` for reporting. `evaluateOracles` runs a batch and aggregates.
 */
export interface OracleObservation {
    /** Final observable text output from the agent (response, page snapshot, stdout). */
    text?: string;
    /** Final URL — for browser-style scenarios. */
    url?: string;
    /** Any structured JSON the agent produced. */
    json?: unknown;
    /** Free-form context used by custom oracles. */
    context?: Record<string, unknown>;
}
export interface OracleResult {
    id: string;
    pass: boolean;
    detail: string;
    evidence?: string;
}
export interface Oracle {
    id: string;
    check(obs: OracleObservation): OracleResult;
}
export declare function textInSnapshot(needle: string, opts?: {
    caseSensitive?: boolean;
}): Oracle;
export declare function urlContains(fragment: string): Oracle;
export declare function jsonShape(expected: Record<string, unknown>): Oracle;
export declare function regexMatches(pattern: RegExp): Oracle;
/**
 * Anti-bot detector — distinguishes genuine failures from blocked navigation
 * (cloudflare, recaptcha, etc). Returns an Oracle that PASSES when no block
 * marker is present; on block, detail names the blocker so runners can tag
 * results as "blocked" rather than "failed". Lifted from browser-agent-driver.
 */
export declare function notBlocked(): Oracle;
export interface OracleReport {
    results: OracleResult[];
    pass: boolean;
    passCount: number;
    failCount: number;
    /** 0-1 ratio of oracles passed. */
    score: number;
}
/** Run all oracles against one observation and aggregate. */
export declare function evaluateOracles(obs: OracleObservation, oracles: Oracle[]): OracleReport;
//# sourceMappingURL=oracle.d.ts.map