import { IndexedDBService } from './indexedDb.service'; import type { CrashBuffer, CrashBufferEventMap, CrashBufferEventName, CrashBufferOtelSpanBatchPayload, CrashBufferRrwebEventPayload, CrashBufferSnapshot } from '@multiplayer-app/session-recorder-common'; export declare class CrashBufferService implements CrashBuffer { private readonly db; private readonly tabId; private readonly windowMs; private lastPruneAt; private pruneInFlight; private isActive; private frozenAtTs; private lastSeenEventTs; private requiresFullSnapshot; private lastTouchAt; private listeners; constructor(db: IndexedDBService, tabId: string, windowMs: number); private _safe; appendEvent(payload: CrashBufferRrwebEventPayload, _windowMs?: number): Promise; appendSpans(payload: CrashBufferOtelSpanBatchPayload, _windowMs?: number): Promise; on(event: E, listener: (payload: CrashBufferEventMap[E]) => void): () => void; off(event: E, listener: (payload: CrashBufferEventMap[E]) => void): void; private _emit; snapshot(_windowMs?: number, now?: number): Promise; clear(): Promise; needsFullSnapshot(): boolean; /** * Mark the tab as active/inactive. * * - When inactive, we freeze the buffer and keep the last active `windowMs` indefinitely. * - When re-activated, we resume buffering but require a new FullSnapshot to start a replayable segment. */ setActive(active: boolean): void; private pruneSoon; } //# sourceMappingURL=crashBuffer.service.d.ts.map