export declare const DEVBOX_NOVNC_PROXY_PORT = 6080; export declare const DEVBOX_VNC_PORT = 5900; export declare const DEVBOX_NOVNC_INTERNAL_PORT = 6081; /** * Total ports a Sandbox can actually expose, verified against the live API. * * Three sources disagree, so this is the measured one. The installed 3.1.0 * declaration comments "up to 15 ports"; the request schema refuses more than * 15 with a clean 400 ("`ports` should NOT have more than 15 items"); and an * update carrying exactly 15 fails with an opaque 500 every time, with any * port values. 14 is the largest set the service provisions, so devbox refuses * a 15th here with an actionable message instead of surfacing that 500. * See scripts/vercel/app-port-uat.mjs for the reproduction. */ export declare const MAX_VERCEL_SANDBOX_PORTS = 14; export interface ParsedDevcontainerPorts { ports: number[]; labels: Record; } export declare class VercelPortsError extends Error { readonly code = "invalid_ports"; constructor(message: string); } export declare function assertSdkPorts(ports: number[]): number[]; /** Refuse the private VNC / internal noVNC ports that must never be exposed. */ export declare function assertPublicSandboxPort(port: number, prefix: string): void; export declare function normalizeContainerPort(value: unknown): number; export declare function parseDevcontainerPorts(source: string, filePath?: string): ParsedDevcontainerPorts; export declare function resolveDevcontainerPorts(repoRoot: string): Promise; /** App ports available beside the always-reserved authenticated noVNC route. */ export declare const MAX_VERCEL_SANDBOX_APP_PORTS: number; /** * Parse a `--expose-ports` value: a non-empty comma-separated list of decimal * ports with optional surrounding whitespace. * * The flag is the non-interactive opt-in, so it validates rather than guesses: * non-decimal entries, out-of-range ports, private ports, and duplicates are * all refused before anything reaches the Sandbox. */ export declare function parseExposePortsList(value: string): number[]; /** * Union the trusted configured ports with the accepted app ports. * * Configured ports are the explicit host-configuration path and are always * retained; accepted candidates are additive. `assertSdkPorts` adds the * reserved noVNC route exactly once and enforces the service maximum, so the * whole desired set is validated before any route update is attempted. */ export declare function buildDesiredPortSet(configured: readonly number[], selected: readonly number[]): number[]; /** Ports exposed beyond the reserved noVNC route, in ascending order. */ export declare function appPortsOf(ports: readonly number[]): number[]; /** Stable equality for a full desired/actual port set. */ export declare function samePortSet(left: readonly number[], right: readonly number[]): boolean;