import type { Session } from "./session.js";
export interface HostPortTunnelOptions {
    sandboxBindAddress?: string;
    sandboxPort?: number;
    hostDialTargetLabel?: string;
}
export type TunnelTerminationReason = "sdk_closed" | "host_closed" | "host_error" | "engine_terminated" | "engine_draining" | "transport_error" | "timeout";
export interface HostPortTunnelTermination {
    reason: TunnelTerminationReason;
    detail?: string;
    error?: unknown;
}
export type HostPortTunnelEndpoint = readonly [address: string, port: number];
export interface HostPortTunnel {
    sandboxPort: number;
    sandboxAddress: string;
    close(): Promise<void>;
    terminated: Promise<HostPortTunnelTermination>;
    onTerminated(cb: (termination: HostPortTunnelTermination) => void): void;
}
export declare function exposeHostPort(session: Session, hostAddr: string, options?: HostPortTunnelOptions): Promise<HostPortTunnel>;
export declare function hostPortTunnel(session: Session, host: string, port: number, options?: HostPortTunnelOptions): Promise<HostPortTunnel>;
