import type * as models from '../models/index.js';
import type { APITool, Tool, ToolExecutionResult } from './tool-types.js';
/**
 * Options for tool execution
 */
export interface ToolExecutionOptions {
    onPreliminaryResult?: (toolCallId: string, result: unknown) => void;
}
/**
 * Result of the tool execution loop
 */
export interface ToolOrchestrationResult {
    finalResponse: models.OpenResponsesResult;
    allResponses: models.OpenResponsesResult[];
    toolExecutionResults: ToolExecutionResult<Tool>[];
    conversationInput: models.InputsUnion;
}
/**
 * Execute tool calls and manage multi-turn conversations
 * This orchestrates the loop of: request -> tool calls -> execute -> send results -> repeat
 *
 * @param sendRequest - Function to send a request and get a response
 * @param initialInput - Starting input for the conversation
 * @param initialRequest - Full initial request with all parameters
 * @param tools - Enhanced tools with Zod schemas and execute functions
 * @param apiTools - Converted tools in API format (JSON Schema)
 * @param options - Execution options
 * @returns Result containing final response and all execution data
 */
export declare function executeToolLoop(sendRequest: (input: models.InputsUnion, tools: APITool[]) => Promise<models.OpenResponsesResult>, initialInput: models.InputsUnion, initialRequest: models.ResponsesRequest, tools: Tool[], apiTools: APITool[], options?: ToolExecutionOptions): Promise<ToolOrchestrationResult>;
/**
 * Convert tool execution results to a map for easy lookup
 */
export declare function toolResultsToMap(results: ToolExecutionResult<Tool>[]): Map<string, {
    result: unknown;
    preliminaryResults?: unknown[];
}>;
/**
 * Build a summary of tool executions for debugging/logging
 */
export declare function summarizeToolExecutions(results: ToolExecutionResult<Tool>[]): string;
/**
 * Check if any tool executions had errors
 */
export declare function hasToolExecutionErrors(results: ToolExecutionResult<Tool>[]): boolean;
/**
 * Get all tool execution errors
 */
export declare function getToolExecutionErrors(results: ToolExecutionResult<Tool>[]): Error[];
//# sourceMappingURL=tool-orchestrator.d.ts.map