export interface BoundedBufferOptions { headLimitBytes?: number; tailLimitBytes?: number; } export interface BoundedBuffer { /** Retains a chunk, dropping bytes from the middle once both ends are full. */ append: (chunk: Buffer) => void; /** Renders the retained bytes, with a marker naming the dropped count standing in for what was dropped. */ toBuffer: () => Buffer; } /** * Creates an accumulator that retains the first and last bytes it is fed and drops the middle. * Both ends are kept because a failing command's first error and its trailing summary each carry signal * that the other end does not. */ export declare function createBoundedBuffer(options?: BoundedBufferOptions): BoundedBuffer;