ghostterm 1.2.1 → 1.2.2

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/CHANGELOG.md CHANGED
@@ -1,9 +1,14 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.2.2 (2026-03-17)
4
+
5
+ ### Bug Fixes
6
+ - **Windows fully hidden** — use VBS launcher instead of `windowsHide` (which still showed in taskbar)
7
+
3
8
  ## 1.2.1 (2026-03-17)
4
9
 
5
10
  ### Bug Fixes
6
- - **Windows background mode** — fixed node-pty crash in detached mode by using `windowsHide` instead of raw detach
11
+ - **Windows background mode** — fixed node-pty crash in detached mode
7
12
  - **Supervisor crash loop** — fixed `--supervisor` arg being caught by "already running" check
8
13
 
9
14
  ## 1.2.0 (2026-03-17)
package/bin/ghostterm.js CHANGED
@@ -510,17 +510,24 @@ function handleSubcommand() {
510
510
  const out = fs.openSync(LOG_FILE, 'a');
511
511
 
512
512
  if (os.platform() === 'win32') {
513
- // Windows: spawn with hidden window (windowsHide) but NOT detached
514
- // node-pty requires a console; detached:true removes the console and crashes
515
- // windowsHide:true creates a hidden console window
516
- const child = spawn(process.execPath, [__filename, '--supervisor'], {
517
- detached: true,
518
- windowsHide: true,
519
- stdio: ['ignore', out, out],
520
- env: { ...process.env },
521
- });
522
- child.unref();
523
- fs.writeFileSync(PID_FILE, String(child.pid));
513
+ // Windows: use VBS to launch completely hidden (no taskbar, no window)
514
+ // node-pty needs a console; VBS ws.Run with 0 = hidden window
515
+ const vbsFile = path.join(CRED_DIR, 'launcher.vbs');
516
+ const cmd = `"${process.execPath}" "${__filename}" --supervisor`;
517
+ fs.writeFileSync(vbsFile,
518
+ `Set ws = CreateObject("WScript.Shell")\n` +
519
+ `ws.Run "${cmd.replace(/"/g, '""')}", 0, False\n`
520
+ );
521
+ require('child_process').execSync(`cscript //nologo "${vbsFile}"`, { stdio: 'ignore' });
522
+ // Wait for supervisor to write PID file
523
+ const waitUntil = Date.now() + 10000;
524
+ while (Date.now() < waitUntil) {
525
+ if (fs.existsSync(PID_FILE)) {
526
+ const pid = fs.readFileSync(PID_FILE, 'utf8').trim();
527
+ if (pid && isRunning(parseInt(pid))) break;
528
+ }
529
+ Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, 500);
530
+ }
524
531
  } else {
525
532
  // macOS/Linux: detached works fine
526
533
  const child = spawn(process.execPath, [__filename, '--supervisor'], {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ghostterm",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "description": "Mobile terminal for Claude Code — control your PC from your phone",
5
5
  "bin": {
6
6
  "ghostterm": "bin/ghostterm.js"