/** * Event handlers for tool execution events: * tool_start, tool_approval_required, tool_update, shell_output, * tool_input_start, tool_input_delta, tool_input_end, tool_end. * * Also includes formatToolResult helper. */ import { SubagentExecutionComponent } from '../components/subagent-execution.js'; import type { EventHandlerContext } from './types.js'; export declare function isTaskMutationTool(toolName: string): boolean; export declare function clearPendingShellOutputs(): void; export declare function clearToolInputParsers(): void; export declare function createStaticSubagentComponent(ctx: EventHandlerContext, toolCallId: string, toolName: string, args: unknown): SubagentExecutionComponent | undefined; export declare function formatToolResult(result: unknown): string; export declare function handleToolApprovalRequired(ctx: EventHandlerContext, toolCallId: string, toolName: string, args: unknown): void; export declare function handleToolStart(ctx: EventHandlerContext, toolCallId: string, toolName: string, args: unknown): void; export declare function handleToolUpdate(ctx: EventHandlerContext, toolCallId: string, partialResult: unknown): void; /** * Handle streaming shell output from execute_command tool. */ export declare function handleShellOutput(ctx: EventHandlerContext, toolCallId: string, output: string, _stream: 'stdout' | 'stderr'): void; /** * Handle the start of streaming tool call input arguments. * Creates the tool component early so partial args can render as they arrive. */ export declare function handleToolInputStart(ctx: EventHandlerContext, toolCallId: string, toolName: string): void; /** * Handle an incremental delta of tool call input arguments. * Feeds only the incoming JSON fragment to the stateful parser. */ export declare function handleToolInputDelta(ctx: EventHandlerContext, toolCallId: string, argsTextDelta: string): void; /** * Clean up the input buffer when tool input streaming ends. */ export declare function handleToolInputEnd(ctx: EventHandlerContext, toolCallId: string): void; export declare function handleToolEnd(ctx: EventHandlerContext, toolCallId: string, result: unknown, isError: boolean): void; //# sourceMappingURL=tool.d.ts.map