import type { OutputChunkRef, ToolCallId } from "./app-event.js"; export interface BoundedTextState { readonly tail: string; readonly totalBytes: number; readonly droppedBytes: number; readonly truncated: boolean; } export declare class BoundedText { private readonly maxChars; private tailBuf; private total; private dropped; /** * @param maxChars Finite positive cap keeps only the last N chars. * Defaults to 256 KiB; use Infinity only in explicitly controlled tests. */ constructor(maxChars?: number); append(chunk: string): void; /** Replace with an authoritative body while preserving the configured cap. */ replace(text: string): void; get tail(): string; get totalBytes(): number; get droppedBytes(): number; get truncated(): boolean; snapshot(): BoundedTextState; } export declare class OutputSpool { private readonly maxCharsPerTool; private readonly maxTools; private readonly byTool; /** Finite production defaults; full bodies remain available in tool artifacts. */ constructor(maxCharsPerTool?: number, maxTools?: number); private bufferFor; append(toolCallId: ToolCallId, chunk: string): OutputChunkRef; replace(toolCallId: ToolCallId, text: string): OutputChunkRef; tail(toolCallId: ToolCallId): string; state(toolCallId: ToolCallId): BoundedTextState | undefined; has(toolCallId: ToolCallId): boolean; clear(): void; }