--- date: 2026-10-16 pr: pending feature: Phase 004 - remove the desktop shell and bundled hermes CLI impact: No chat-chain behavior change; the bridge manager only loses an unused HERMES_DESKTOP helper, and gateway autostart no longer branches on desktop mode. --- # Phase 004 — Remove the desktop shell Phase: `docs/phases/phase_004.md` ## What Changed Phase 004 removes Electron packaging, the version-management UI, and the bundled hermes CLI. Two chat-chain-adjacent files were touched: - `packages/server/src/services/hermes/agent-bridge/manager.ts` — deleted the unused `isDesktopRuntime()` helper (it read `HERMES_DESKTOP`; no call site remained after earlier cleanup). Gateway IPC readiness, spawn, and kill paths are unchanged. - `packages/server/src/services/hermes/gateway-autostart.ts` — removed the Windows desktop orphan-recovery branch (`shouldRecoverWindowsDesktopGatewayOrphans` / `recoverWindowsDesktopGatewayOrphans`) and its `HERMES_DESKTOP` gating. Managed gateway recovery on other platforms keeps its existing behavior. ## Contract Check `/chat-run` event names, field names, field types, and emission timing are unchanged. No run dispatch, session, or usage-recording behavior changed. ## Verification ```bash npm run harness:check npm run build npm run test ```