import { WebSocket } from "ws";
import { createTunnelHandler, TunnelHandler } from "@tyvm/knowhow-tunnel";
import { getConfig } from "./config";
import { WorkerPasskeyAuthService } from "./workers/auth/WorkerPasskeyAuth";
export declare function extractTunnelDomain(apiUrl: string): {
    domain: string;
    useHttps: boolean;
};
export declare function initTunnelHandler(tunnelConnection: WebSocket, tunnelConfig: Parameters<typeof createTunnelHandler>[1]): Promise<TunnelHandler>;
export declare function resolveTunnelConfig(config: Awaited<ReturnType<typeof getConfig>>, isInsideDocker: boolean): {
    tunnelLocalHost: string;
    portMapping: Record<string, number>;
};
export interface TunnelWebSocketOptions {
    tunnelDomain: string;
    tunnelUseHttps: boolean;
    tunnelLocalHost: string;
    portMapping: Record<string, number>;
    config: Awaited<ReturnType<typeof getConfig>>;
    headers: Record<string, string>;
    onOpen?: (handler: TunnelHandler) => void;
    onClose?: (code: number, reason: string) => void;
    onError?: (error: Error) => void;
    authService?: WorkerPasskeyAuthService | null;
}
export declare function connectTunnelWebSocket(options: TunnelWebSocketOptions): WebSocket;
export declare const TUNNEL_MINIMAL_TOOLS: string[];
