import type { Server as HttpServer } from "node:http"; import type { ChannelConnection, ChannelTransport } from "./connection.ts"; export interface WebSocketChannelTransportOptions { /** Port to bind (the app's own port). Use 0 for an ephemeral port. Ignored if `server` is set. */ port?: number; /** Host/interface to bind. Ignored if `server` is set. */ host?: string; /** Path the channel is served on. Default `/agentic`. */ path?: string; /** Attach to an existing app HTTP server (share the app's port) instead of binding a new one. */ server?: HttpServer; } export declare class WebSocketChannelTransport implements ChannelTransport { #private; constructor(options?: WebSocketChannelTransportOptions); onConnection(listener: (conn: ChannelConnection) => void): void; /** Resolve once the server is listening on its port. */ ready(): Promise; get address(): { readonly port: number; } | null; close(): Promise; }