import type { OrckitConfig } from '../config/schema.js'; import { type PortHolderInfo } from './port.js'; /** * A local TCP port the upcoming boot needs to be free, and why. * Sources, in collection order: * - `ready-check`: the local endpoint of an `http`/`tcp` ready check — if * something else is listening there, the probe would falsely succeed * against it while the real process fails to bind. * - `ports`: the process's declared `ports` list. * - `mcp` / `web`: orckit's own built-in servers (a stale `orc start` from a * previous session is the classic holder). */ export interface ExpectedPort { port: number; /** Process name (or `orckit` for the built-in mcp/web listeners). */ owner: string; source: 'ready-check' | 'ports' | 'mcp' | 'web'; /** * Whether the boot cannot proceed without this port. False for orckit's own * mcp/web listeners: those are conveniences the CLI already degrades over * (it warns and continues), so a busy one must never abort a boot — that * would make a second project's `orc start` fail just because the first is * running. */ required: boolean; } /** * All ports the boot of `names` is expected to bind, de-duplicated (first * source wins). Pure — consults only the config. */ export declare function collectExpectedPorts(config: OrckitConfig, names: Iterable): ExpectedPort[]; export interface BlockedPort extends ExpectedPort { holders: PortHolderInfo[]; } /** * Which of `expected` currently have a listener, with pid/command/start-time * info per holder so a caller can show the user exactly what is in the way. * Best-effort and POSIX-only (lsof); resolves to [] where lsof is unavailable. */ export declare function findBlockedPorts(expected: ExpectedPort[]): Promise; /** * True when the listener looks like a container platform's port proxy * (Docker Desktop, OrbStack, colima/lima VMs). Killing that pid would wound * the VM manager, NOT free the port — the fix is removing the container that * publishes the port. */ export declare function isContainerProxy(command: string): boolean; //# sourceMappingURL=blocked-ports.d.ts.map