/** * Listen-port env so nested CLI agents can detect sidecar (no TTY). * startSidecar() stamps SIDECAR_PORT while a sidecar is active (including * default 9100, programmatic options.port, and ephemeral 0). close() restores * the inherited value so later default binds and Cursor MCP gating do not leak. */ export declare function resolveSidecarListenPort(optionsPort?: number, env?: NodeJS.ProcessEnv): number; /** * Stamp SIDECAR_PORT so Cursor --approve-mcps sidecar detection cannot miss. * Returns a disposer that restores the inherited value when this sidecar (and * any concurrent ones sharing the env) have closed. */ export declare function ensureSidecarPortEnv(port: number, env?: NodeJS.ProcessEnv): () => void;