/**
 * Tunnel management for exposing the local Drawlatch server to the internet.
 *
 * Spawns a `cloudflared tunnel` process that creates a free Cloudflare Quick
 * Tunnel, parses the assigned public URL from its stderr output, and provides
 * graceful start/stop lifecycle management.
 *
 * The tunnel URL is injected into `process.env.DRAWLATCH_TUNNEL_URL` so that
 * webhook ingestors can reference it during secret resolution (e.g., setting
 * TRELLO_CALLBACK_URL=${DRAWLATCH_TUNNEL_URL}/webhooks/trello in .env).
 */
export interface TunnelOptions {
    /** Local port the server is listening on. */
    port: number;
    /** Local host the server is bound to. */
    host: string;
    /** Timeout (ms) to wait for the tunnel URL to be assigned. Default: 15 000. */
    timeout?: number;
}
export interface TunnelResult {
    /** The public HTTPS URL assigned by Cloudflare (e.g. https://abc.trycloudflare.com). */
    url: string;
    /** Gracefully stop the tunnel process. */
    stop: () => Promise<void>;
}
/**
 * Check whether the `cloudflared` binary is available on the system PATH.
 * Resolves to `true` if available, `false` otherwise.
 */
export declare function isCloudflaredAvailable(): Promise<boolean>;
/**
 * Start a Cloudflare Quick Tunnel that forwards traffic from a public
 * `*.trycloudflare.com` URL to the local Drawlatch server.
 *
 * Resolves once the tunnel URL has been parsed from cloudflared's output.
 * Rejects if `cloudflared` is not installed, fails to start, or does not
 * emit a URL within the configured timeout.
 */
export declare function startTunnel(options: TunnelOptions): Promise<TunnelResult>;
/**
 * Wait for a tunnel to be fully connected by probing a URL through it.
 *
 * cloudflared emits the tunnel URL before the QUIC connection is fully
 * established. Services like Trello validate the callback URL at registration
 * time, so callers should wait until the tunnel is actually reachable before
 * starting webhook ingestors.
 *
 * @param tunnelUrl  The public tunnel URL to probe (e.g. https://abc.trycloudflare.com).
 * @param timeoutMs  How long to wait before giving up (default: 10 000 ms).
 * @param probePath  Path to probe on the tunnel (default: "/health").
 */
export declare function waitForTunnelReady(tunnelUrl: string, timeoutMs?: number, probePath?: string): Promise<void>;
//# sourceMappingURL=tunnel.d.ts.map