import WebSocket from "ws"; import { isLoopbackHost } from "../gateway/net.js"; export { isLoopbackHost }; export type CdpSendFn = (method: string, params?: Record, sessionId?: string) => Promise; export declare function getHeadersWithAuth(url: string, headers?: Record): { [x: string]: string; }; export declare function appendCdpPath(cdpUrl: string, path: string): string; export declare function fetchJson(url: string, timeoutMs?: number, init?: RequestInit): Promise; export declare function fetchCdpChecked(url: string, timeoutMs?: number, init?: RequestInit): Promise; export declare function fetchOk(url: string, timeoutMs?: number, init?: RequestInit): Promise; export declare function openCdpWebSocket(wsUrl: string, opts?: { headers?: Record; handshakeTimeoutMs?: number; }): WebSocket; export declare function withCdpSocket(wsUrl: string, fn: (send: CdpSendFn) => Promise, opts?: { headers?: Record; handshakeTimeoutMs?: number; }): Promise;