import type { LLMToolDef, ONIModelToolCall } from "../../models/types.js"; import type { ToolDefinition } from "../../tools/types.js"; import type { LoopToolResult, LoopMessage, AgentLoopConfig } from "../types.js"; /** Convert ToolDefinition[] to LLMToolDef[] for the model adapter. */ export declare function buildLLMTools(tools: ToolDefinition[]): LLMToolDef[]; /** Build a name → ToolDefinition lookup map. */ export declare function buildToolMap(tools: ToolDefinition[]): Map; export interface ToolExecutionContext { sessionId: string; threadId: string; turn: number; config: AgentLoopConfig; toolMap: Map; hasMemoryLoader: boolean; } /** * Execute all tool calls for a turn. * Returns tool results and any yield-able events (tool_start, tool_metadata). * * When all tools in the batch have `parallelSafe !== false` (the default), * pre-flight checks run serially but the actual `execute()` calls are * dispatched concurrently via `Promise.allSettled()`. When any tool has * `parallelSafe === false`, the entire batch falls back to fully serial * execution to avoid data races. */ export declare function executeTools(toolCalls: ONIModelToolCall[], ctx: ToolExecutionContext): Promise<{ toolResults: LoopToolResult[]; events: LoopMessage[]; }>; //# sourceMappingURL=tools.d.ts.map