/** * Ring Buffer for incoming messages. * * Fixed-capacity circular buffer. Oldest messages are overwritten * when capacity is exceeded. O(1) push, O(n) scan. */ import type { ChannelMessage } from './adapter.js'; export declare class MessageBuffer { private capacity; private buffer; private head; private count; constructor(capacity?: number); /** Push a message. Overwrites oldest if at capacity. */ push(message: ChannelMessage): void; /** Get messages newer than the given timestamp. */ getSince(timestamp: number): ChannelMessage[]; /** Get the most recent N messages (newest last). */ getRecent(limit: number): ChannelMessage[]; /** Get all messages in chronological order. */ toArray(): ChannelMessage[]; /** Clear all messages. */ clear(): void; get size(): number; } //# sourceMappingURL=buffer.d.ts.map