/**
 * SessionRecorder manages real-time RRWeb session recording with WebSocket streaming
 */
export declare class SessionRecorder {
    private ws;
    private reconnectAttempts;
    private maxReconnectAttempts;
    private reconnectDelay;
    private maxReconnectDelay;
    private reconnectTimer;
    private eventQueue;
    private readonly MAX_QUEUE_SIZE;
    private sessionId;
    private stopRecording;
    private isRecording;
    private wsUrl;
    private connectionId;
    private metadataSent;
    private metadataAcknowledged;
    private metadataSendPromise;
    private metadataAckResolver;
    private startPromise;
    private stopRequested;
    private readonly TAB_ID_STORAGE_KEY;
    constructor(wsUrl: string, connectionId: number);
    /**
     * Get marketrix_tab_id from sessionStorage (string, not UUID)
     * Must be in format: tab_${timestamp}_${random}
     */
    private getTabId;
    /**
     * Get chat_id from StorageService
     */
    private getMarketrixChatId;
    /**
     * Get chat_id or throw. Called only after external code has confirmed chat_id exists.
     */
    private requireChatId;
    /**
     * Connect to WebSocket server with exponential backoff reconnection
     */
    private connect;
    /**
     * Schedule reconnection with exponential backoff
     */
    private scheduleReconnect;
    /**
     * Send event over WebSocket or queue if connection is not ready
     */
    private sendEvent;
    /**
     * Push event to queue with size limit to prevent memory leaks
     */
    private pushToQueue;
    /**
     * Send session metadata before the first event (async version)
     */
    private sendMetadataAsync;
    /**
     * Flush queued events when connection is established
     * Only flushes if metadata has been sent AND acknowledged
     */
    private flushEventQueue;
    /**
     * Start recording session
     * Will wait for marketrix_chat_id to be available before sending metadata.
     * Safe against concurrent calls (returns existing startPromise).
     */
    start(): Promise<void>;
    /**
     * Internal start implementation. Checks stopRequested at each async boundary.
     */
    private doStart;
    /**
     * Stop recording session.
     * When recording is not yet started but start() is in-flight, sets stopRequested and aborts
     * connections so doStart() will throw and not resurrect recording.
     */
    stop(): void;
    /**
     * Get current session ID
     */
    getSessionId(): string;
    /**
     * Check if recording is active
     */
    isActive(): boolean;
    /**
     * Get WebSocket connection state
     */
    getConnectionState(): number | null;
}
//# sourceMappingURL=SessionRecorder.d.ts.map