import { type NestedRepoPatch } from "../task/worktree.js";
import type { ToolSession } from "../tools/index.js";
import type { JsStatusEvent } from "./js/shared/types.js";
import "../tools/review.js";
/** Synthetic bridge name reserved for the `agent()` helper across both runtimes. */
export declare const EVAL_AGENT_BRIDGE_NAME = "__agent__";
/**
 * Hard recursion ceiling for eval-driven subagents. The user setting
 * `task.maxRecursionDepth` is honored on top of this — whichever is tighter
 * wins, so a maintainer-friendly cap can't get raised by a user setting.
 */
export declare const EVAL_AGENT_MAX_DEPTH = 3;
export interface EvalAgentBridgeOptions {
    session: ToolSession;
    signal?: AbortSignal;
    emitStatus?: (event: JsStatusEvent) => void;
}
export interface EvalAgentResult {
    text: string;
    details: {
        agent: string;
        id: string;
        model?: string | string[];
        structured: boolean;
        /** True iff this run executed inside an isolation worktree. */
        isolated?: boolean;
        /** Captured patch artifact (patch mode) — surfaced regardless of `apply`. */
        patchPath?: string;
        /** Captured branch (branch mode) — surfaced regardless of `apply`. */
        branchName?: string;
        /** Captured nested repository patches — surfaced for isolated `apply=false` manual application. */
        nestedPatches?: NestedRepoPatch[];
        /**
         * Tri-state apply outcome for isolated runs:
         * - `true`  — apply ran (or had nothing to do) and left the repo clean.
         * - `false` — apply attempted and failed; artifacts preserved.
         * - `null`  — caller opted out via `apply=false`.
         * Omitted for non-isolated runs.
         */
        changesApplied?: boolean | null;
        /** Human-readable isolation apply/merge summary; kept out of schema-backed `text`. */
        isolationSummary?: string;
    };
}
/**
 * Run a single subagent on behalf of an eval cell's `agent()` call.
 */
export declare function runEvalAgent(args: unknown, options: EvalAgentBridgeOptions): Promise<EvalAgentResult>;
