/**
 * Cloud Relay Client — WebSocket tunnel from mobile device to backend
 *
 * Maintains a persistent WebSocket connection to the qontinui.io backend.
 * Receives tunneled HTTP requests from runners, calls the local NativeUIBridgeServer,
 * and sends responses back through the tunnel.
 */
import type { NativeUIBridgeServer } from '../server/http-server';
export interface CloudRelayConfig {
    /** WebSocket URL for the device bridge endpoint */
    relayUrl: string;
    /** Stable device identifier */
    deviceId: string;
    /** Authentication token */
    authToken: string;
    /** Reference to the local UI Bridge server for processing requests */
    uiBridgeServer: NativeUIBridgeServer;
}
/**
 * Manages a WebSocket tunnel from the mobile device to the qontinui.io backend.
 *
 * When a runner sends an HTTP request to a cloud device it is serialised as a
 * `TunnelRequest` JSON frame by the backend and forwarded here. This client
 * deserializes it, calls `NativeUIBridgeServer.handleRequest()` directly
 * (avoiding loopback TCP overhead), and sends the `TunnelResponse` back.
 */
export declare class CloudRelayClient {
    private ws;
    private config;
    private reconnectDelay;
    private maxReconnectDelay;
    private stopped;
    private _isConnected;
    private reconnectTimer;
    constructor(config: CloudRelayConfig);
    /** Whether the relay WebSocket is currently connected */
    get isConnected(): boolean;
    /** Connect to the relay and start processing tunneled requests. */
    start(): void;
    /** Disconnect and stop reconnecting. */
    stop(): void;
    private connect;
    private onMessage;
    /**
     * Process a tunneled HTTP request by calling the local NativeUIBridgeServer
     * directly (no loopback TCP involved).
     */
    private handleTunneledRequest;
    private scheduleReconnect;
}
//# sourceMappingURL=CloudRelayClient.d.ts.map