codex-session-tui 0.2.5 → 0.2.7

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.
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  const { spawnSync } = require("node:child_process");
4
- const { existsSync } = require("node:fs");
4
+ const { chmodSync, existsSync } = require("node:fs");
5
5
  const { join } = require("node:path");
6
6
 
7
7
  const platform = process.platform;
@@ -26,8 +26,15 @@ if (!target) {
26
26
  process.exit(1);
27
27
  }
28
28
 
29
- const binName = platform === "win32" ? "codex-session-explorer.exe" : "codex-session-explorer";
30
- const binPath = join(__dirname, "..", "dist", target, binName);
29
+ const binName = platform === "win32" ? "codex-session-tui.exe" : "codex-session-tui";
30
+ const legacyBinName = platform === "win32" ? "codex-session-explorer.exe" : "codex-session-explorer";
31
+ let binPath = join(__dirname, "..", "dist", target, binName);
32
+ if (!existsSync(binPath)) {
33
+ const legacyPath = join(__dirname, "..", "dist", target, legacyBinName);
34
+ if (existsSync(legacyPath)) {
35
+ binPath = legacyPath;
36
+ }
37
+ }
31
38
 
32
39
  if (!existsSync(binPath)) {
33
40
  console.error(`Binary not found: ${binPath}`);
@@ -35,6 +42,14 @@ if (!existsSync(binPath)) {
35
42
  process.exit(1);
36
43
  }
37
44
 
45
+ if (platform !== "win32") {
46
+ try {
47
+ chmodSync(binPath, 0o755);
48
+ } catch (_) {
49
+ // Ignore chmod failures and let spawn report a concrete error.
50
+ }
51
+ }
52
+
38
53
  const result = spawnSync(binPath, process.argv.slice(2), {
39
54
  stdio: "inherit"
40
55
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codex-session-tui",
3
- "version": "0.2.5",
3
+ "version": "0.2.7",
4
4
  "description": "Prebuilt codex-session-tui binaries for macOS, Linux, and Windows.",
5
5
  "license": "MIT",
6
6
  "bin": {