import type { Server } from 'node:http';
export interface ListenWithProbeOpts {
    server: Server;
    /** Preferred port to try first. */
    port: number;
    host: string;
    /** Max upward probes on EADDRINUSE before rejecting (default 20). */
    maxProbe?: number;
    log?: (msg: string) => void;
}
/**
 * Bind `server` to `port`, walking port+1, port+2 … up to `maxProbe` times when
 * the port is already in use, and resolve with the actually-bound port.
 *
 * Why this exists: several daemon/dashboard listeners (dashboard-ipc-server.ts,
 * dashboard.ts) historically did a single `server.listen(fixedPort)` with no
 * 'error' listener / no probe, so on a shared machine a second botmux instance
 * binding the same default port emitted an UNHANDLED 'error' that crashed the
 * whole process (the IPC bind even took the daemon down at startup). This
 * mirrors the already-proven probe in core/terminal-proxy.ts so those binds
 * self-heal to a free port; callers MUST advertise the returned (bound) port to
 * their consumers (the IPC port via the daemon descriptor, the dashboard port
 * via ~/.botmux/.dashboard-port) since it may differ from the requested one.
 */
export declare function listenWithProbe(opts: ListenWithProbeOpts): Promise<number>;
//# sourceMappingURL=listen-with-probe.d.ts.map