/** * RelayTransport — WebSocket client that connects the RN app to a cloud relay * server for production usage. * * Uses React Native's built-in WebSocket global (no native modules needed). * * The transport: * - Connects to the relay as a "device" client * - Receives command messages from controllers via the relay * - Sends responses back through the relay * - Auto-reconnects with exponential backoff on disconnect */ export type MessageHandler = (message: string) => Promise; export interface RelayTransportConfig { /** Full WebSocket URL of the relay server */ relayUrl: string; /** Channel ID for pairing with CLI controllers */ channelId: string; /** Shared secret for channel authentication */ channelSecret?: string; /** Callback when a command message arrives; must return a response string */ onMessage: MessageHandler; /** Called when connection state changes */ onStatusChange?: (connected: boolean) => void; } export declare class RelayTransport { private config; private ws; private reconnectDelay; private reconnectTimer; private isStopped; private _isConnected; constructor(config: RelayTransportConfig); /** Start connecting to the relay */ start(): void; /** Stop the transport and close the connection */ stop(): void; /** Whether the transport is currently connected to the relay */ get isConnected(): boolean; private connect; private scheduleReconnect; private setConnected; } //# sourceMappingURL=RelayTransport.d.ts.map