@adhdev/daemon-core 1.0.28-rc.4 → 1.0.28-rc.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adhdev/daemon-core",
3
- "version": "1.0.28-rc.4",
3
+ "version": "1.0.28-rc.5",
4
4
  "description": "ADHDev daemon core — CDP, IDE detection, providers, command execution",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -47,8 +47,8 @@
47
47
  "author": "vilmire",
48
48
  "license": "AGPL-3.0-or-later",
49
49
  "dependencies": {
50
- "@adhdev/mesh-shared": "1.0.28-rc.4",
51
- "@adhdev/session-host-core": "1.0.28-rc.4",
50
+ "@adhdev/mesh-shared": "1.0.28-rc.5",
51
+ "@adhdev/session-host-core": "1.0.28-rc.5",
52
52
  "@agentclientprotocol/sdk": "^0.16.1",
53
53
  "ajv": "^8.20.0",
54
54
  "ajv-formats": "^3.0.1",
@@ -595,7 +595,21 @@ async function runDaemonUpgradeHelper(payload: DaemonUpgradeHelperPayload): Prom
595
595
  await waitForPidExit(payload.parentPid, 15000);
596
596
  }
597
597
 
598
- await stopSessionHostProcesses(sessionHostAppName);
598
+ // The only reason to kill the session-host during an upgrade is the Windows
599
+ // EBUSY hazard: node-pty's `conpty.node` (and the ghostty VT dll) stay
600
+ // EXCLUSIVELY locked while the host has them memory-mapped, so npm's
601
+ // copy-to-staging fails until the host exits (see stopSessionHostProcesses).
602
+ // POSIX can replace an open file freely — the running host keeps its handles
603
+ // to the old inode and keeps serving — so killing it there only tears down
604
+ // every hosted CLI session (coordinator + workers) for no benefit. Leave the
605
+ // host running on POSIX; on the next boot `ensureSessionHostReady()` reuses
606
+ // the still-listening socket and `cliManager.restoreHostedSessions()` rebinds
607
+ // the live runtimes. Windows keeps the kill unchanged.
608
+ if (process.platform === 'win32') {
609
+ await stopSessionHostProcesses(sessionHostAppName);
610
+ } else {
611
+ appendUpgradeLog('POSIX — session-host left running (survives upgrade; sessions rebind on next boot)');
612
+ }
599
613
  removeDaemonPidFile();
600
614
  // Scope the Windows atomic-upgrade layout to THIS daemon's instance so
601
615
  // `adhdev-preview update` rotates only the preview prefix/pointer/tools tree