/**
 * The engine that runs the agent's turn cycle.
 *
 * Throughout this module the conversation is carried as AgentMessage values.
 * They are only flattened into the provider's Message[] representation at the
 * last possible moment — immediately before a model call inside
 * streamAssistantResponse — and never anywhere else.
 */
import { EventStream } from "../ml/index.js";
import type { AgentContext, AgentEvent, AgentLoopConfig, AgentMessage, StreamFn } from "./types.js";
/**
 * Conservative static allow-list of tools that only read state, never mutate
 * it. Consecutive runs of these within a single assistant turn are safe to
 * dispatch concurrently. Anything not on this list — mutating tools (edit,
 * write, bash), and every dynamic / MCP / composio tool whose behavior the
 * loop can't statically vouch for — runs serially in request order.
 *
 * Callers can supply their own set through `AgentLoopConfig.readOnlyToolNames`.
 */
export declare const READ_ONLY_TOOL_NAMES: ReadonlySet<string>;
/**
 * Begin a brand-new run. The supplied prompt messages are appended to the
 * conversation up front, then the turn cycle starts.
 */
export declare function agentLoop(prompts: AgentMessage[], context: AgentContext, config: AgentLoopConfig, signal?: AbortSignal, streamFn?: StreamFn): EventStream<AgentEvent, AgentMessage[]>;
/**
 * Pick a run back up from wherever the context currently sits, without adding
 * any new prompt messages.
 */
export declare function agentLoopContinue(context: AgentContext, config: AgentLoopConfig, signal?: AbortSignal, streamFn?: StreamFn): EventStream<AgentEvent, AgentMessage[]>;
