import type { ToolCall, ToolResult } from "../../types.js"; import type { McpRuntime } from "../../mcp/runtime.js"; import type { SingleToolResult } from "./contracts.js"; export interface McpAgentToolPorts { readonly askMode: boolean; readonly showCall: (toolEventId: string, call: ToolCall) => void; readonly writeOutput: (toolEventId: string, chunk: string) => void; readonly emitResult: (toolEventId: string, result: ToolResult, contextOutput: string) => void; readonly confirm: (call: ToolCall) => Promise; readonly recordAttempt: (call: ToolCall, ok: boolean, output: string) => void; } export declare const mcpAgentToolTarget: (args: Record) => string | readonly string[] | undefined; export declare const runMcpAgentTool: (mcp: McpRuntime, call: ToolCall) => Promise; export declare const mcpAgentOutput: (call: ToolCall, result: ToolResult) => string; export declare const isReadOnlyMcpAgentTool: (call: ToolCall) => boolean; export declare const createMcpAgentToolExecutor: (ports: McpAgentToolPorts) => (runtime: McpRuntime, call: ToolCall, toolEventId: string) => Promise; export declare const createMcpAgentCallFailure: (ports: McpAgentToolPorts) => (toolEventId: string, call: ToolCall, reason: string, cancelled?: boolean) => SingleToolResult;