/** * Ring Buffer * * Fixed-capacity circular buffer with O(1) push. * Used for always-on console/network/dialog event capture. */ export declare class RingBuffer { private readonly capacity; private buffer; private head; private count; private totalPushed; constructor(capacity?: number); /** Add an item. Overwrites oldest if at capacity. */ push(item: T): void; /** Get all items in insertion order (oldest first). */ toArray(): T[]; /** Get items matching a predicate. */ filter(predicate: (item: T) => boolean): T[]; /** Get the last N items. */ last(n: number): T[]; /** * Get items added after an absolute cursor from `cursor`. * If the cursor predates retained entries, returns all currently retained items. */ since(cursor: number): T[]; /** * Like since(), but also reports how many entries were dropped due to * overflow between the cursor and the earliest retained entry. Callers * (e.g. session manifest writers) can surface this so a "0 events" tail * isn't silently misreported when the buffer wrapped mid-recording. */ sinceWithDropped(cursor: number): { items: T[]; dropped: number; }; /** Clear all items. */ clear(): void; /** Current number of items. */ get size(): number; /** Absolute insertion cursor for session-scoped reads. */ get cursor(): number; } //# sourceMappingURL=ringBuffer.d.ts.map