import '../assert_dev_env.js';
import { type WsClient } from './ws_client.js';
/** Construction options for `create_ws_transport`. */
export interface WsTransportOptions {
    /** Base URL the binary is reachable at — e.g. `http://localhost:8788`. Converted to `ws://` for the upgrade. */
    readonly base_url: string;
    /** WebSocket endpoint path on the binary (e.g. `/api/ws`). */
    readonly ws_path: string;
    /**
     * Session cookie values (full `Set-Cookie` strings as
     * `FetchTransport.cookies()` returns them) threaded onto the upgrade
     * `Cookie` header. Without these the upgrade is anonymous and
     * per-action auth fails on the first message.
     */
    readonly cookies: ReadonlyArray<string>;
    /**
     * Origin header for the upgrade. Backends running with
     * `ALLOWED_ORIGINS=http://localhost:*` accept `http://localhost:<port>`.
     * Defaults to `base_url` — acceptable because cross-process tests
     * always run against `localhost`.
     */
    readonly origin?: string;
    /**
     * Optional per-call default for `wait_for` timeouts. Falls back to
     * `WS_CLIENT_DEFAULT_TIMEOUT_MS` if omitted.
     */
    readonly default_timeout_ms?: number;
}
/**
 * Build a real-upgrade WS client pinned to `options.base_url` + `ws_path`.
 *
 * Resolves once the upgrade succeeds and the socket is in `OPEN` state;
 * rejects if the upgrade is refused (401, allowlist rejection, network
 * failure). Incoming messages are JSON-parsed and pushed onto the
 * `messages` array; `wait_for` checks already-received messages first
 * before waiting for new arrivals.
 *
 * @throws Error if the upgrade fails (status, network) — the rejection
 *   message carries the underlying error so the test surfaces the real
 *   cause rather than hanging.
 */
export declare const create_ws_transport: (options: WsTransportOptions) => Promise<WsClient>;
//# sourceMappingURL=ws_transport.d.ts.map