/** * Problem: * When tool execution is backgrounded or turns complete without an explicit terminal tool update, * upstream `agy_acp_server` never emits a `tool_call_update` with `status: "completed"`, * causing editor client interfaces to display an infinite active running spinner. * * Solution: * Tracks active in-flight tool calls, auto-completing backgrounded commands and flushing any * remaining dangling tool calls immediately upon assistant text streaming or turn completion. */ import { type AcpFix, type AcpStreamMessage } from "../../core/types.js"; export declare class ToolCallTracker { private readonly activeToolCalls; private readonly toolTitles; private readonly sessionMessageIds; private readonly streamingSessions; setTitle(toolCallId: string, title: string): void; getTitle(toolCallId: string): string | undefined; getOrCreateMessageId(sessionId: string): string; clearMessageId(sessionId: string): void; isStreaming(sessionId: string): boolean; setStreaming(sessionId: string, streaming: boolean): void; recordToolCall(sessionId: string, toolCallId: string): void; resolveToolCall(sessionId: string, toolCallId: string): void; hasActiveToolCalls(sessionId: string): boolean; getActiveToolCalls(sessionId: string): string[]; clearSession(sessionId: string): void; flushDangling(sessionId: string, exceptToolCallId?: string): AcpStreamMessage[]; dispose(): void; } export declare function createDanglingToolCallsFix(): AcpFix & { tracker: ToolCallTracker; }; export declare const danglingToolCallsFix: AcpFix & { tracker: ToolCallTracker; }; export declare const createToolCallCleanupFix: typeof createDanglingToolCallsFix; export declare const toolCallCleanupFix: AcpFix & { tracker: ToolCallTracker; }; //# sourceMappingURL=index.d.ts.map