UNPKG

@bitkyc08/opencodex

Version:

Universal provider proxy for OpenAI Codex & Claude Code — use any LLM with Codex CLI/App/SDK and Claude Code

11 lines (9 loc) • 575 B
import type { OcxConfig } from "../../types"; export interface NativeCompatibilityOwner { hostname: string; port: number; loopbackPort?: number; config: OcxConfig } let owner: NativeCompatibilityOwner | null = null; /** Bound sockets, not persisted desired ports, identify this process's native routing target. */ export function bindNativeCompatibilityOwner(value: NativeCompatibilityOwner): () => void { owner = value; return () => { if (owner === value) owner = null; }; } export function nativeCompatibilityOwner(): NativeCompatibilityOwner | null { return owner; }