/**
 * AgentController loop with post-stream parallel tool dispatch.
 *
 * Tool calls are collected while the assistant response streams, then executed
 * concurrently after the message completes.
 *
 * Steering is checked once after all tools complete, not between each tool.
 */
import { EventStream } from '../ai/event-stream.js';
import type { AssistantMessage, ToolCall } from '../ai/types.js';
import { type AgentContext, type AgentLoopConfig, type AgentLoopEvent, type AgentMessage, type StreamFn } from './core-types.js';
/**
 * Start an agent loop with a new prompt message.
 * The prompt is added to the context and events are emitted for it.
 */
export declare function agentLoop(prompts: AgentMessage[], context: AgentContext, config: AgentLoopConfig, signal?: AbortSignal, streamFn?: StreamFn): EventStream<AgentLoopEvent, AgentMessage[]>;
/**
 * Continue an agent loop from the current context without adding a new message.
 * Used for retries - context already has user message or tool results.
 *
 * **Important:** The last message in context must convert to a `user` or `toolResult` message
 * via `convertToLlm`. If it doesn't, the LLM provider will reject the request.
 * This cannot be validated here since `convertToLlm` is only called once per turn.
 */
export declare function agentLoopContinue(context: AgentContext, config: AgentLoopConfig, signal?: AbortSignal, streamFn?: StreamFn): EventStream<AgentLoopEvent, AgentMessage[]>;
/**
 * Get an assistant response via streaming.
 * Emits message_start, message_update deltas, then message_end.
 *
 * The optional `onToolCallReady` callback fires each time a complete tool call
 * arrives during streaming, enabling the caller to record tool calls before
 * the full response is available.
 */
export declare function streamAssistantResponse(context: AgentContext, config: AgentLoopConfig, signal: AbortSignal | undefined, stream: EventStream<AgentLoopEvent, AgentMessage[]>, streamFn?: StreamFn, onToolCallReady?: (toolCall: ToolCall) => void): Promise<AssistantMessage>;
//# sourceMappingURL=agent-loop.d.ts.map