@bitkyc08/opencodex
Version:
Universal provider proxy for OpenAI Codex & Claude Code — use any LLM with Codex CLI/App/SDK and Claude Code
40 lines (39 loc) • 1.95 kB
text/typescript
export interface OrchestratedExpect {
home: string;
cliRoot: string;
servingRoot: string | null;
runtimePid: number | null;
planToken: string;
/** Store fields are present only for a global virtual-store owner. */
pnpmOwner?: { commandPath: string; packagePath: string; globalDir: string; globalRoot: string; globalBinDir: string; store?: string; storePath?: string; virtualStoreDirs?: string[] };
}
export declare function encodeOrchestratedExpect(value: OrchestratedExpect): string;
export declare function decodeOrchestratedExpect(encoded: string): OrchestratedExpect;
export interface OrchestratedResultChannel {
directory: string;
resultPath: string;
capability: string;
read(): Record<string, unknown> | null;
dispose(): void;
}
export declare function createOrchestratedResultChannel(): OrchestratedResultChannel;
export declare function issueOrchestratedResultCapability(path: string): { capability: string; identity: import("node:fs").BigIntStats };
export declare function createOrchestratedChildSession(options: {
home: string;
resultPath: string;
resultCapability: string;
expect: OrchestratedExpect;
notAfter?: number;
now?: () => number;
pid?: number;
verifyIdentity: () => boolean | Promise<boolean>;
}): {
start(): { ok: true } | { ok: false; error: "sync-in-progress" | "update-in-flight"; staleMarker?: true };
finishPreflight(): void;
enterMutation(): Promise<{ ok: true } | { ok: false; error: "sync-in-progress" | "update-in-flight" | "deadline-passed" | "plan-changed" }>;
noteUntrackedInstaller(): void;
confirmInstallerExit(): void;
retainInstallerFence(): void;
finish(outcome: ({ phase: "installed"; activeRoot: string } | { phase: "failed"; error?: string; rollbackPerformed?: boolean }) & { terminationConfirmed?: boolean }): void;
};
export declare function createLegacyUpdateSession(options: { home: string }): ReturnType<typeof createOrchestratedChildSession>;