/** * CircularOutputBuffer - Efficient circular buffer for terminal output * * Maintains a rolling buffer of terminal output data with a configurable * maximum size. Older data is automatically discarded when the buffer * exceeds its limit. */ /** Maximum output buffer size per session (1 MB) */ export declare const MAX_OUTPUT_BUFFER_SIZE: number; /** * Circular buffer for terminal output * * Efficiently manages terminal output with automatic size limiting. * Maintains insertion order while discarding oldest data when full. */ export declare class CircularOutputBuffer { private chunks; private totalSize; private readonly maxSize; /** * Create a new circular output buffer * @param maxSize Maximum buffer size in bytes (default: 1MB) */ constructor(maxSize?: number); /** * Push data into the buffer */ push(data: Buffer | string): void; /** * Get the complete buffer contents * @param maxBytes Optional maximum bytes to return (from the end) */ get(maxBytes?: number): Buffer; /** Get the current buffer size in bytes */ get size(): number; /** Get the maximum buffer size */ get capacity(): number; /** Check if the buffer is empty */ get isEmpty(): boolean; /** Clear all buffer contents */ clear(): void; /** Get the number of chunks in the buffer */ get chunkCount(): number; /** Trim buffer to stay within max size */ private trim; /** Compact the buffer into a single chunk (reduces memory fragmentation) */ compact(): void; } /** * Create a new output buffer with default settings */ export declare function createOutputBuffer(maxSize?: number): CircularOutputBuffer; //# sourceMappingURL=output-buffer.d.ts.map