claude-code-session-manager 0.31.0 → 0.32.0

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/dist/index.html CHANGED
@@ -7,7 +7,7 @@
7
7
  <link rel="preconnect" href="https://fonts.googleapis.com">
8
8
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
9
9
  <link href="https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;0,6..72,600;0,6..72,700;1,6..72,400&family=Geist:wght@300;400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap" rel="stylesheet">
10
- <script type="module" crossorigin src="./assets/index-hreMRE8u.js"></script>
10
+ <script type="module" crossorigin src="./assets/index-CHTpW79G.js"></script>
11
11
  <link rel="modulepreload" crossorigin href="./assets/monaco-editor-BW5C4Iv1.js">
12
12
  <link rel="stylesheet" crossorigin href="./assets/monaco-editor-BTnBOi8r.css">
13
13
  <link rel="stylesheet" crossorigin href="./assets/index-DMIi9YZH.css">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-code-session-manager",
3
- "version": "0.31.0",
3
+ "version": "0.32.0",
4
4
  "description": "Local cockpit for the Claude Code CLI — multi-tab terminal, full config surface, scheduler, voice dictation, and live observability.",
5
5
  "type": "module",
6
6
  "main": "src/main/index.cjs",
@@ -12,13 +12,22 @@
12
12
  */
13
13
 
14
14
  const { spawnSync } = require('node:child_process');
15
+ const fs = require('node:fs');
16
+ const path = require('node:path');
17
+
18
+ // Resolve the electron-rebuild bin from THIS package's own node_modules first,
19
+ // so a global install never has `npx` reach out to the registry (and risk
20
+ // pulling the wrong/deprecated `electron-rebuild` package). Fall back to npx.
21
+ function rebuildArgv() {
22
+ const pkgRoot = path.join(__dirname, '..');
23
+ const local = path.join(pkgRoot, 'node_modules', '.bin', process.platform === 'win32' ? 'electron-rebuild.cmd' : 'electron-rebuild');
24
+ if (fs.existsSync(local)) return [local, ['-f', '-w', 'node-pty']];
25
+ return [process.platform === 'win32' ? 'npx.cmd' : 'npx', ['electron-rebuild', '-f', '-w', 'node-pty']];
26
+ }
15
27
 
16
28
  function run() {
17
- const r = spawnSync(
18
- process.platform === 'win32' ? 'npx.cmd' : 'npx',
19
- ['electron-rebuild', '-f', '-w', 'node-pty'],
20
- { stdio: 'inherit' },
21
- );
29
+ const [cmd, args] = rebuildArgv();
30
+ const r = spawnSync(cmd, args, { stdio: 'inherit', cwd: path.join(__dirname, '..') });
22
31
  return r.status === 0 && !r.error;
23
32
  }
24
33
 
@@ -25,10 +25,14 @@ function userBinDirs() {
25
25
  ];
26
26
  }
27
27
 
28
- /** Electron's PATH prefixed with the user/Homebrew bin dirs the value to put
29
- * in a spawned child's PATH so `claude`, node, git, etc. resolve on macOS. */
28
+ /** Electron's PATH with the user/Homebrew bin dirs APPENDED as a fallback — the
29
+ * value to put in a spawned child's PATH so `claude`, node, git, etc. resolve
30
+ * on macOS even under a stripped Finder/Dock PATH. Appended (not prepended) so
31
+ * a user's version manager (nvm/asdf/volta/mise) earlier in PATH still wins and
32
+ * isn't shadowed by /opt/homebrew. */
30
33
  function pathWithUserBins() {
31
- return `${userBinDirs().join(':')}:${process.env.PATH || ''}`;
34
+ const base = process.env.PATH || '';
35
+ return base ? `${base}:${userBinDirs().join(':')}` : userBinDirs().join(':');
32
36
  }
33
37
 
34
38
  function cleanChildEnv(extra = {}) {
@@ -17,7 +17,16 @@
17
17
  */
18
18
 
19
19
  const { ipcMain } = require('electron');
20
- const pty = require('node-pty');
20
+ // Guard like pty.cjs: a node-pty ABI mismatch must not crash the whole app at
21
+ // module load (index.cjs requires this unconditionally). install() reports a
22
+ // clean error if the native module is unavailable.
23
+ let pty = null;
24
+ try {
25
+ pty = require('node-pty');
26
+ } catch (e) {
27
+ // eslint-disable-next-line no-console
28
+ console.error('[pluginInstall] node-pty failed to load:', e?.message);
29
+ }
21
30
  const path = require('node:path');
22
31
  const os = require('node:os');
23
32
  const fs = require('node:fs');
@@ -72,6 +81,10 @@ function childEnv() {
72
81
  */
73
82
  function runStep({ slug, args, register, unregister }) {
74
83
  return new Promise((resolve) => {
84
+ if (!pty) {
85
+ resolve({ ok: false, exitCode: -1, error: 'node-pty unavailable (native module failed to load)' });
86
+ return;
87
+ }
75
88
  const claudeBin = resolveClaudeBin();
76
89
  let proc;
77
90
  try {