/** Public API contract for log level. */ export type LogLevel = "debug" | "info" | "warn" | "error"; /** Entry shape for log. */ export interface LogEntry { id: string; level: LogLevel; message: string; data?: Record; timestamp: number; source: string; } /** Filter options for reading buffered log entries. */ export interface LogFilter { level?: LogLevel | LogLevel[]; source?: string | string[]; pattern?: string | RegExp; since?: number; limit?: number; } /** Public API contract for log subscriber. */ export type LogSubscriber = (entry: LogEntry) => void; /** Implement log buffer. */ export declare class LogBuffer { private entries; private subscribers; private idCounter; private maxSize; constructor(options?: { maxSize?: number; }); private generateId; append(entry: Omit): LogEntry; debug(message: string, source?: string, data?: Record): LogEntry; info(message: string, source?: string, data?: Record): LogEntry; warn(message: string, source?: string, data?: Record): LogEntry; error(message: string, source?: string, data?: Record): LogEntry; query(filter?: LogFilter): LogEntry[]; tail(count?: number): LogEntry[]; getAll(): LogEntry[]; clear(): void; get count(): number; countByLevel(): Record; subscribe(callback: LogSubscriber): () => void; toJSON(): LogEntry[]; format(entries?: LogEntry[]): string; } /** Return log buffer. */ export declare function getLogBuffer(): LogBuffer; /** Reset the in-memory log buffer. */ export declare function resetLogBuffer(): void; /** Capture console output in the log buffer. */ export declare function interceptConsole(buffer: LogBuffer, source?: string): () => void; //# sourceMappingURL=log-buffer.d.ts.map