@mmmbuto/codex-vl 0.138.0-alpha.4 → 0.138.0-alpha.6

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.
Files changed (2) hide show
  1. package/bin/codex.js +21 -13
  2. package/package.json +2 -2
package/bin/codex.js CHANGED
@@ -87,14 +87,18 @@ function findCodexExecutable() {
87
87
  vendorRoot = path.join(__dirname, "..", "vendor");
88
88
  }
89
89
 
90
- const codexExecutable = path.join(
91
- vendorRoot,
92
- targetTriple,
93
- "bin",
94
- process.platform === "win32" ? "codex.exe" : "codex",
95
- );
96
- if (existsSync(codexExecutable)) {
97
- return codexExecutable;
90
+ const exeName = process.platform === "win32" ? "codex.exe" : "codex";
91
+ // Upstream 0.138 launcher expects vendor/<triple>/bin/<exe>; the fork CI
92
+ // payloads ship vendor/<triple>/codex/<exe> (pre-0.138 layout). Accept
93
+ // both so a launcher/payload layout drift can never brick the install.
94
+ const candidates = [
95
+ path.join(vendorRoot, targetTriple, "bin", exeName),
96
+ path.join(vendorRoot, targetTriple, "codex", exeName),
97
+ ];
98
+ for (const codexExecutable of candidates) {
99
+ if (existsSync(codexExecutable)) {
100
+ return codexExecutable;
101
+ }
98
102
  }
99
103
 
100
104
  const packageManager = detectPackageManager();
@@ -306,20 +310,24 @@ if (skipNativeExec) {
306
310
  process.exit(0);
307
311
  }
308
312
 
309
- const env = { ...process.env, PATH: updatedPath };
310
- if (platform === "android") {
311
- env.CODEX_SELF_EXE = binaryPath;
312
- env.LD_LIBRARY_PATH = sanitizeAndroidLdLibraryPath(path.dirname(binaryPath));
313
- }
314
313
  const packageManagerEnvVar =
315
314
  detectPackageManager() === "bun"
316
315
  ? "CODEX_MANAGED_BY_BUN"
317
316
  : "CODEX_MANAGED_BY_NPM";
317
+ // Single env: the fork launcher needs (PATH update, Android self-exe and
318
+ // LD_LIBRARY_PATH) merged with upstream's managed-package markers — the
319
+ // 0.138.0-alpha.3 merge briefly kept both declarations and broke the
320
+ // launcher with a duplicate `const env`.
318
321
  const env = {
319
322
  ...process.env,
323
+ PATH: updatedPath,
320
324
  [packageManagerEnvVar]: "1",
321
325
  CODEX_MANAGED_PACKAGE_ROOT: realpathSync(path.join(__dirname, "..")),
322
326
  };
327
+ if (platform === "android") {
328
+ env.CODEX_SELF_EXE = binaryPath;
329
+ env.LD_LIBRARY_PATH = sanitizeAndroidLdLibraryPath(path.dirname(binaryPath));
330
+ }
323
331
 
324
332
  const child = spawn(binaryPath, process.argv.slice(2), {
325
333
  stdio: "inherit",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mmmbuto/codex-vl",
3
- "version": "0.138.0-alpha.4",
3
+ "version": "0.138.0-alpha.6",
4
4
  "license": "Apache-2.0",
5
5
  "bin": {
6
6
  "codex-vl": "bin/codex.js",
@@ -25,4 +25,4 @@
25
25
  "@mmmbuto/codex-vl-linux-arm64": "npm:@mmmbuto/codex-vl@0.138.0-alpha.4-linux-arm64",
26
26
  "@mmmbuto/codex-vl-android-arm64": "npm:@mmmbuto/codex-vl@0.138.0-alpha.4-android-arm64"
27
27
  }
28
- }
28
+ }