import { ToolCall, ToolDefinition } from "./Tool.js"; import { ToolExecutionMode } from "../constants.js"; import { ToolExecutionResult } from "./ToolHandler.js"; import { Middleware, MiddlewareContext } from "../types/Middleware.js"; export type ToolCallOutcome = { kind: "cancelled"; toolCall: ToolCall; } | { kind: "success"; toolCall: ToolCall; toolResult: ToolExecutionResult; } | { kind: "error"; toolCall: ToolCall; error: unknown; }; export interface ToolCallExecutionOptions { tools?: ToolDefinition[]; toolExecution?: ToolExecutionMode; onConfirmToolCall?: (toolCall: unknown) => Promise | boolean; onToolCallStart?: (toolCall: unknown) => void; onToolCallEnd?: (toolCall: unknown, result: unknown) => void; } /** * Confirm mode stays sequential since approval is interactive; concurrency * only kicks in for AUTO/DRY_RUN turns with more than one independent call. */ export declare function shouldRunToolCallsConcurrently(toolConcurrency: boolean | undefined, toolExecution: ToolExecutionMode | undefined, callCount: number): boolean; export declare function executeToolCallOutcomes(toolCalls: ToolCall[], options: ToolCallExecutionOptions, middlewares: Middleware[], context: MiddlewareContext, concurrent: boolean): Promise; //# sourceMappingURL=ToolCallOutcome.d.ts.map