/** * WebSocket implementation of BaseConnection */ import { BaseConnection } from "../internal/connection/BaseConnection"; import { type SessionConfig } from "../internal/connection/types"; import { type OutgoingSocketMessage } from "../events/Events"; export interface WebSocketConnectionConfig extends SessionConfig { serverUrl: string; auth: { sessionToken: string; sessionId: string; }; reconnect?: boolean; reconnectAttempts?: number; reconnectDelay?: number; } export declare class WebSocketConnection extends BaseConnection { readonly conversationId: string; private socket; private config; private authenticated; constructor(config: WebSocketConnectionConfig); /** * Establish WebSocket connection */ private connect; /** * Build WebSocket connection URL with session config */ private buildConnectionUrl; /** * Handle WebSocket open event */ private handleOpen; /** * Handle incoming WebSocket messages */ private handleSocketMessage; /** * Handle WebSocket errors */ private handleError; /** * Handle WebSocket close event */ private handleClose; /** * Send a message through the WebSocket */ sendMessage(message: OutgoingSocketMessage): void; /** * Close the WebSocket connection */ close(): void; /** * Check if the WebSocket is connected */ isConnected(): boolean; handleConnected(): void; }