import { type CloudflaredBinary } from './cloudflared.ts'; export interface Tunnel { /** The public HTTPS origin Cloudflare assigned. */ url: string; /** Whether the public viewer answered during the initial readiness probe. */ ready: boolean; /** Bounded cloudflared output when the edge is still propagating. */ cloudflaredLog?: string; /** Terminate the tunnel. Safe to call more than once. */ stop: () => Promise; /** Which cloudflared ran, and whether we had to fetch it. */ binary: CloudflaredBinary; } /** * Open a quick tunnel to `http://127.0.0.1:` and resolve once * Cloudflare has assigned a hostname. * * Rejects with an actionable message when `cloudflared` is not installed, * exits early, or never reports a hostname. */ export declare function startTunnel(port: number, { autoInstall, probePath, readyPollMs, readyTimeoutMs, }?: { autoInstall?: boolean; /** Public path that must answer before the tunnel is returned. */ probePath?: string; /** Test-only timing override. */ readyPollMs?: number; /** Test-only timing override. */ readyTimeoutMs?: number; }): Promise;