@coseung2/opencodex 2.8.0-cs.1 → 2.8.0-cs.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -47,6 +47,15 @@ license and attribution while shipping fork-specific integration work. The same
47
47
  includes the Windows x64 `ocx-notch` launcher and native executable; the standalone
48
48
  `@coseung2/ocx-notch@0.1.1` package remains available for compatibility.
49
49
 
50
+ ### Fork maintenance policy
51
+
52
+ This fork is the product source of truth for the `@coseung2/opencodex` npm distribution and its
53
+ integrated OCX Notch. Upstream changes are reviewed and selectively integrated when they are useful;
54
+ the fork is not replaced wholesale by an upstream branch. Updates must preserve fork-owned behavior,
55
+ package identity, release automation, configuration compatibility, and the Notch source and binary.
56
+ Prefer narrowly scoped cherry-picks or manual ports with focused tests, and resolve overlapping
57
+ upstream changes against the fork's existing contracts instead of overwriting local development.
58
+
50
59
  opencodex is a lightweight local proxy that translates Codex's Responses API into whatever your
51
60
  provider speaks — streaming, tool calls, reasoning tokens, images, in both directions. Use Claude,
52
61
  Gemini, Grok, GLM, DeepSeek, Kimi, Qwen, Ollama, or any other LLM with Codex, Claude Code, Claude
package/bin/ocx-notch.mjs CHANGED
@@ -66,13 +66,39 @@ if (!existsSync(nativeBinary)) {
66
66
 
67
67
  const child = spawn(nativeBinary, process.argv.slice(2), {
68
68
  detached: true,
69
+ env: {
70
+ ...process.env,
71
+ OCX_PACKAGE_VERSION: packageVersion(),
72
+ },
69
73
  stdio: "ignore",
70
74
  windowsHide: true,
71
75
  });
72
76
 
77
+ let settled = false;
78
+
73
79
  child.once("error", error => {
80
+ settled = true;
74
81
  console.error(`ocx-notch: failed to launch the native executable: ${error.message}`);
75
82
  process.exitCode = 1;
76
83
  });
77
84
 
78
- child.unref();
85
+ child.once("exit", (code, signal) => {
86
+ if (settled) return;
87
+ settled = true;
88
+ if (!signal && code === 0) return;
89
+ const reason = signal ? `signal ${signal}` : `exit code ${code}`;
90
+ console.error(
91
+ `ocx-notch: the native executable exited during startup (${reason}). `
92
+ + "See \"%LOCALAPPDATA%\\OCX Notch\\ocx-notch.log\" for details.",
93
+ );
94
+ process.exitCode = code && code !== 0 ? code : 1;
95
+ });
96
+
97
+ child.once("spawn", () => {
98
+ setTimeout(() => {
99
+ if (settled) return;
100
+ settled = true;
101
+ child.removeAllListeners("exit");
102
+ child.unref();
103
+ }, 1500);
104
+ });
package/bin/ocx.mjs CHANGED
File without changes