/**
 * Manual agent loop for the built-in agent (#626).
 *
 * Wraps `scope.models.generate({ ..., toolMode: 'return' })` and dispatches
 * any tool calls the model returns. This is a temporary stand-in for the
 * unified `toolMode: 'auto'` orchestrator landing in #612 — when that ships,
 * tool-call dispatch and the per-turn loop collapse into a single
 * `generate({ ..., toolMode: 'auto' })` call. The approval/abort gates here
 * still live in the component (the orchestrator won't know about
 * `destructive` or operator approval semantics).
 *
 * Per-session serialization (one concurrent run per session) is handled
 * here via {@link runAgent}'s in-flight map. Multiple sessions interleave
 * on the event loop naturally because each turn is mostly awaiting the LLM
 * or a tool's I/O.
 */
import type { GenerateOpts, Models } from '../resources/models/types.ts';
import type { AgentScopes, AgentTool } from './types.ts';
export interface RunAgentOpts {
    sessionId: string;
    models: Pick<Models, 'generate'>;
    tools: AgentTool[];
    scopes: AgentScopes;
    maxTurns: number;
    /** When false, destructive tools pause the loop with a pending approval instead of executing. */
    autoApprove?: boolean;
    signal?: AbortSignal;
    generateOpts?: Omit<GenerateOpts, 'toolMode' | 'signal'>;
    /** System prompt injected as the first turn when the transcript is empty. */
    systemPrompt?: string;
}
export declare function runAgent(opts: RunAgentOpts): Promise<void>;
/** Test-only: clear the in-flight tracking map. */
export declare function _resetInFlightForTests(): void;
