/** * Fixed-capacity ring buffer. * * When the buffer is full, the oldest item is overwritten. * No array allocations on overflow (unlike slice-based approaches). * * Used for task output line storage — bounded memory, O(1) append. */ export declare class RingBuffer { private readonly items; private head; private count; readonly capacity: number; constructor(capacity: number); /** * Append an item. If at capacity, overwrites the oldest item. */ push(item: T): void; /** * Number of items currently in the buffer. */ get length(): number; /** * Whether the buffer is at capacity. */ get isFull(): boolean; /** * Get all items in order (oldest first). * Returns a new array — safe to mutate. */ toArray(): T[]; /** * Get the last N items (newest first → reversed to oldest first). */ last(n: number): T[]; /** * Clear all items. */ clear(): void; } //# sourceMappingURL=ring-buffer.d.ts.map