/** * Tool call execution for the agent loop. * * `executeToolCalls` runs every tool call of an assistant message — * sequentially (`toolExecution: "sequential"` or any tool declaring * `executionMode: "sequential"`) or in parallel — and returns the * `ToolResultMessage`s plus a `terminate` flag for the loop. * * Extracted from `sdk/agent-core/agent-loop.ts` — the loop module * re-exports `hasMissingRequiredArguments` so existing imports keep * working. */ import { type AssistantMessage, type ToolResultMessage } from "../ai/index.js"; import type { AgentContext, AgentLoopConfig, AgentTool, AgentToolCall } from "./types.js"; import type { AgentEventSink } from "./agent-loop.js"; /** * Execute tool calls from an assistant message. */ export declare function executeToolCalls(currentContext: AgentContext, assistantMessage: AssistantMessage, config: AgentLoopConfig, signal: AbortSignal | undefined, emit: AgentEventSink): Promise; type ExecutedToolCallBatch = { messages: ToolResultMessage[]; terminate: boolean; }; /** * Detects whether a tool call is missing any required parameter, indicating the * provider truncated the response before the tool arguments were fully emitted. * Used together with `stopReason === "length"` to short-circuit tool validation * when a streamed tool call is incomplete (which would otherwise throw * `Validation failed ... You provided: {}`). */ export declare function hasMissingRequiredArguments(tool: AgentTool, toolCall: AgentToolCall): boolean; export {}; //# sourceMappingURL=tool-execution.d.ts.map