export declare const TOOL_OUTPUT_FRAME_INTERVAL_MS = 100; export declare const TOOL_OUTPUT_REPLACE_INTERVAL_MS = 500; export declare const TOOL_OUTPUT_MAX_APPEND_CHARS: number; export declare const MAX_LIVE_TOOLS = 64; export declare const MAX_FINISHED_TOOLS = 16; export declare const TOOL_OUTPUT_TAIL_CHARS: number; export declare const MAX_FINAL_SOURCE_CHARS: number; export interface ToolOutputTarget { runId: string; toolCallId: string; } export interface ToolOutputFrame { kind: 'replace' | 'append'; text: string; truncated: boolean; running: boolean; toolCallId: string; runId: string; } export interface ToolOutputFinishInput extends ToolOutputTarget { finalOutput?: string; truncated?: boolean; isError?: boolean; } export declare function tailOutputText(text: string, maxChars?: number): { text: string; truncated: boolean; }; /** * In-memory bypass hub for high-frequency streaming tool output. * Buffers bounded 64 KiB tails per active tool call and delivers coalesced, * throttled frames only to active on-demand subscribers. */ export declare class ToolOutputHub { private readonly tails; private readonly finished; private readonly finishedRuns; private readonly evictedFinishedKeys; private readonly subscribers; private readonly liveKeysByRun; private closed; append(input: ToolOutputTarget & { chunk: string; }): void; finish(input: ToolOutputFinishInput): void; finishRun(runId: string): void; subscribe(target: ToolOutputTarget, onFrame: (frame: ToolOutputFrame) => void): () => void; close(): void; private removeLiveKeyFromRun; private clearSubscriberTimers; private removeSubscriber; private scheduleFlush; private flushSubscriber; }