@pellux/goodvibes-tui 1.27.1 → 2.0.1

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.
Files changed (405) hide show
  1. package/CHANGELOG.md +116 -2
  2. package/README.md +7 -9
  3. package/bin/goodvibes +2 -2
  4. package/bin/launcher-support.js +8 -4
  5. package/docs/README.md +11 -2
  6. package/docs/foundation-artifacts/operator-contract.json +6403 -2347
  7. package/package.json +14 -25
  8. package/scripts/postinstall.js +35 -35
  9. package/src/audio/spoken-turn-model-routing.ts +1 -1
  10. package/src/cli/bundle-command.ts +5 -5
  11. package/src/cli/completions/generate.ts +1 -1
  12. package/src/cli/doctor.ts +3 -3
  13. package/src/cli/entrypoint.ts +12 -7
  14. package/src/cli/help.ts +4 -5
  15. package/src/cli/hooks-command.ts +1 -1
  16. package/src/cli/index.ts +1 -4
  17. package/src/cli/launch-auto-update.ts +59 -7
  18. package/src/cli/management-commands.ts +6 -6
  19. package/src/cli/management-utils.ts +5 -5
  20. package/src/cli/management.ts +7 -7
  21. package/src/cli/network-posture.ts +1 -1
  22. package/src/cli/package-verification.ts +7 -6
  23. package/src/cli/plugin-bundles-command.ts +1 -1
  24. package/src/cli/plugin-command.ts +2 -2
  25. package/src/cli/service-command.ts +2 -2
  26. package/src/cli/service-posture.ts +4 -4
  27. package/src/cli/status.ts +9 -8
  28. package/src/cli/surface-command.ts +4 -4
  29. package/src/cli/tui-startup.ts +3 -3
  30. package/src/cli-flags.ts +3 -3
  31. package/src/config/goodvibes-home-audit.ts +0 -2
  32. package/src/config/secret-config.ts +37 -5
  33. package/src/config/tui-extension-settings.ts +1 -1
  34. package/src/core/approval-alert.ts +2 -2
  35. package/src/core/budget-breach-notifier.ts +3 -3
  36. package/src/core/conversation-compaction-render.ts +1 -1
  37. package/src/core/conversation-line-cache.ts +1 -1
  38. package/src/core/conversation-render-context.ts +1 -1
  39. package/src/core/conversation-rendering.ts +2 -2
  40. package/src/core/conversation.ts +10 -10
  41. package/src/core/long-task-notifier.ts +2 -2
  42. package/src/core/memory-diagnostics-gateway.ts +1 -1
  43. package/src/core/scriptable-statusline.ts +1 -1
  44. package/src/core/session-auto-titler.ts +1 -1
  45. package/src/core/session-resume-core.ts +2 -2
  46. package/src/core/stream-event-wiring.ts +24 -44
  47. package/src/core/terminal-notifier.ts +3 -3
  48. package/src/core/turn-cancellation.ts +1 -1
  49. package/src/core/turn-event-wiring.ts +5 -5
  50. package/src/input/command-registry.ts +6 -6
  51. package/src/input/commands/channel-pairing.ts +1 -1
  52. package/src/input/commands/cluster-runtime.ts +1 -1
  53. package/src/input/commands/codebase-runtime.ts +1 -1
  54. package/src/input/commands/devices-runtime.ts +1 -1
  55. package/src/input/commands/hosted-runtime.ts +330 -0
  56. package/src/input/commands/local-setup-review.ts +1 -1
  57. package/src/input/commands/local-setup-transfer.ts +2 -2
  58. package/src/input/commands/local-setup.ts +3 -3
  59. package/src/input/commands/managed-runtime.ts +2 -2
  60. package/src/input/commands/operator-rpc.ts +24 -110
  61. package/src/input/commands/payment-card-intake.ts +1 -1
  62. package/src/input/commands/permissions-provenance.ts +2 -2
  63. package/src/input/commands/plugin-runtime.ts +1 -1
  64. package/src/input/commands/provider.ts +1 -1
  65. package/src/input/commands/relay-runtime.ts +18 -9
  66. package/src/input/commands/rewind-runtime.ts +1 -1
  67. package/src/input/commands/runtime-services.ts +1 -1
  68. package/src/input/commands/services-runtime.ts +1 -1
  69. package/src/input/commands/session-workflow.ts +1 -1
  70. package/src/input/commands/settings-sync-runtime.ts +2 -2
  71. package/src/input/commands/share-runtime.ts +1 -1
  72. package/src/input/commands/tasks-runtime.ts +145 -55
  73. package/src/input/commands/update-runtime.ts +31 -28
  74. package/src/input/commands/work-plan-runtime.ts +2 -2
  75. package/src/input/commands/workstream-attempts.ts +1 -1
  76. package/src/input/commands/workstream-runtime.ts +2 -2
  77. package/src/input/commands.ts +2 -0
  78. package/src/input/feature-unit-layout.ts +1 -1
  79. package/src/input/feed-context-factory.ts +3 -3
  80. package/src/input/handler-content-actions.ts +2 -2
  81. package/src/input/handler-feed-routes.ts +1 -1
  82. package/src/input/handler-feed.ts +3 -3
  83. package/src/input/handler-modal-token-routes.ts +1 -1
  84. package/src/input/handler-onboarding-daemon-adopt.ts +3 -2
  85. package/src/input/handler-onboarding.ts +1 -1
  86. package/src/input/handler-types.ts +2 -2
  87. package/src/input/handler-ui-state.ts +1 -1
  88. package/src/input/handler.ts +4 -4
  89. package/src/input/input-history.ts +1 -1
  90. package/src/input/onboarding/onboarding-feature-units.ts +2 -2
  91. package/src/input/onboarding/onboarding-runtime-status.ts +15 -1
  92. package/src/input/onboarding/onboarding-wizard-apply.ts +17 -8
  93. package/src/input/onboarding/onboarding-wizard-cloudflare-step.ts +5 -3
  94. package/src/input/onboarding/onboarding-wizard-external-surfaces.ts +1 -1
  95. package/src/input/onboarding/onboarding-wizard-types.ts +1 -1
  96. package/src/input/payments-config.ts +6 -6
  97. package/src/input/search.ts +1 -1
  98. package/src/input/session-picker-modal.ts +46 -0
  99. package/src/input/settings-modal-activation.ts +1 -1
  100. package/src/input/settings-modal-behavior.ts +4 -4
  101. package/src/input/settings-modal-commit.ts +11 -0
  102. package/src/input/settings-modal-data.ts +13 -80
  103. package/src/input/settings-modal-mutations.ts +33 -0
  104. package/src/input/settings-modal-secrets.ts +34 -0
  105. package/src/input/settings-modal-subscriptions.ts +1 -1
  106. package/src/input/settings-modal-types.ts +15 -1
  107. package/src/input/settings-modal.ts +28 -3
  108. package/src/input/worktree-setup-config.ts +1 -1
  109. package/src/main.ts +11 -9
  110. package/src/panels/agent-inspector-shared.ts +2 -2
  111. package/src/panels/base-panel.ts +2 -2
  112. package/src/panels/builtin/operations.ts +6 -8
  113. package/src/panels/builtin/session.ts +17 -0
  114. package/src/panels/builtin/shared.ts +5 -5
  115. package/src/panels/builtin-modals.ts +3 -3
  116. package/src/panels/confirm-state.ts +1 -1
  117. package/src/panels/cost-tracker-panel.ts +4 -4
  118. package/src/panels/diff-panel.ts +2 -2
  119. package/src/panels/diff-review-panel.ts +2 -2
  120. package/src/panels/expandable-list-panel.ts +2 -2
  121. package/src/panels/fleet-acts.ts +1 -1
  122. package/src/panels/fleet-observed-render.ts +1 -1
  123. package/src/panels/fleet-panel-format.ts +1 -1
  124. package/src/panels/fleet-panel.ts +1 -1
  125. package/src/panels/fleet-spawn.ts +1 -1
  126. package/src/panels/fleet-steer.ts +1 -1
  127. package/src/panels/fleet-transcript.ts +1 -1
  128. package/src/panels/git-panel.ts +1 -1
  129. package/src/panels/hosted-session-feed.ts +352 -0
  130. package/src/panels/hosted-session-panel.ts +221 -0
  131. package/src/panels/local-auth-panel.ts +3 -3
  132. package/src/panels/modals/devices-modal.ts +1 -1
  133. package/src/panels/modals/local-auth-modal.ts +1 -1
  134. package/src/panels/modals/pairing-modal.ts +1 -1
  135. package/src/panels/modals/services-modal.ts +1 -1
  136. package/src/panels/modals/settings-sync-modal.ts +1 -1
  137. package/src/panels/modals/subscription-modal.ts +1 -1
  138. package/src/panels/modals/work-plan-modal.ts +1 -1
  139. package/src/panels/notifications-panel.ts +1 -1
  140. package/src/panels/panel-confirm-overlay.ts +1 -1
  141. package/src/panels/plugins-panel.ts +2 -2
  142. package/src/panels/polish-core.ts +2 -2
  143. package/src/panels/polish-tables.ts +1 -1
  144. package/src/panels/polish.ts +2 -2
  145. package/src/panels/scrollable-list-panel.ts +3 -3
  146. package/src/panels/skills-panel.ts +3 -3
  147. package/src/panels/token-budget-panel.ts +5 -5
  148. package/src/panels/types.ts +1 -2
  149. package/src/permissions/prompt.ts +1 -1
  150. package/src/renderer/autocomplete-overlay.ts +1 -1
  151. package/src/renderer/block-actions-overlay.ts +1 -1
  152. package/src/renderer/bookmark-modal.ts +1 -1
  153. package/src/renderer/buffer.ts +1 -1
  154. package/src/renderer/code-block.ts +1 -1
  155. package/src/renderer/composer-fragments.ts +1 -1
  156. package/src/renderer/compositor.ts +2 -2
  157. package/src/renderer/config-modal.ts +1 -1
  158. package/src/renderer/context-inspector.ts +1 -1
  159. package/src/renderer/conversation-layout.ts +2 -2
  160. package/src/renderer/conversation-overlays.ts +1 -1
  161. package/src/renderer/conversation-surface.ts +2 -2
  162. package/src/renderer/diff-view.ts +1 -1
  163. package/src/renderer/diff.ts +1 -1
  164. package/src/renderer/file-picker-overlay.ts +1 -1
  165. package/src/renderer/fleet-tab-strip.ts +1 -1
  166. package/src/renderer/fullscreen-primitives.ts +2 -2
  167. package/src/renderer/fullscreen-workspace.ts +1 -1
  168. package/src/renderer/header-line.ts +1 -1
  169. package/src/renderer/help-overlay.ts +1 -1
  170. package/src/renderer/history-search-overlay.ts +2 -2
  171. package/src/renderer/layout.ts +5 -8
  172. package/src/renderer/markdown-inline.ts +1 -1
  173. package/src/renderer/markdown-table.ts +1 -1
  174. package/src/renderer/markdown.ts +1 -1
  175. package/src/renderer/mcp-workspace.ts +1 -1
  176. package/src/renderer/modal-factory.ts +2 -2
  177. package/src/renderer/model-workspace.ts +2 -2
  178. package/src/renderer/onboarding/onboarding-wizard.ts +1 -1
  179. package/src/renderer/overlay-box.ts +1 -1
  180. package/src/renderer/panel-composite.ts +1 -1
  181. package/src/renderer/panel-workspace-bar.ts +1 -1
  182. package/src/renderer/process-indicator.ts +1 -1
  183. package/src/renderer/profile-picker-modal.ts +1 -1
  184. package/src/renderer/search-overlay.ts +2 -2
  185. package/src/renderer/selection-modal-overlay.ts +1 -1
  186. package/src/renderer/session-picker-modal.ts +124 -3
  187. package/src/renderer/settings-modal-helpers.ts +2 -0
  188. package/src/renderer/settings-modal.ts +2 -2
  189. package/src/renderer/shell-surface.ts +2 -2
  190. package/src/renderer/system-message.ts +1 -1
  191. package/src/renderer/tab-strip.ts +1 -1
  192. package/src/renderer/theme-mode-config.ts +1 -1
  193. package/src/renderer/theme.ts +11 -12
  194. package/src/renderer/thinking.ts +1 -1
  195. package/src/renderer/tool-call.ts +2 -2
  196. package/src/renderer/tool-result-expanded-lines.ts +1 -1
  197. package/src/renderer/turn-injection.ts +7 -8
  198. package/src/renderer/ui-factory.ts +3 -3
  199. package/src/runtime/bootstrap-command-context.ts +4 -4
  200. package/src/runtime/bootstrap-command-parts.ts +5 -5
  201. package/src/runtime/bootstrap-core.ts +30 -30
  202. package/src/runtime/bootstrap-shell.ts +4 -4
  203. package/src/runtime/bootstrap.ts +128 -157
  204. package/src/runtime/client/approval-updates.ts +82 -0
  205. package/src/runtime/client/build-floors.ts +167 -0
  206. package/src/runtime/client/daemon-attach-handshake.ts +115 -0
  207. package/src/runtime/client/fleet-union.ts +147 -0
  208. package/src/runtime/client/host-service-status.ts +71 -0
  209. package/src/runtime/client/hosted-exit.ts +86 -0
  210. package/src/runtime/client/hosted-roster.ts +110 -0
  211. package/src/runtime/client/hosted-session-stream.ts +178 -0
  212. package/src/runtime/client/hosted-sessions.ts +187 -0
  213. package/src/runtime/client/operator-endpoint.ts +213 -0
  214. package/src/runtime/client/spine-adoption.ts +99 -0
  215. package/src/runtime/cloudflare-control-plane.ts +1 -1
  216. package/src/runtime/context-accounting-source.ts +1 -1
  217. package/src/runtime/context.ts +2 -2
  218. package/src/runtime/conversation-rewind-port.ts +42 -14
  219. package/src/runtime/daemon-attach-notices.ts +55 -19
  220. package/src/runtime/diagnostics/panels/ops.ts +1 -1
  221. package/src/runtime/disposal-wiring.ts +4 -24
  222. package/src/runtime/index.ts +119 -105
  223. package/src/runtime/install-self-check-startup.ts +2 -2
  224. package/src/runtime/interaction-seams.ts +1 -1
  225. package/src/runtime/knowledge-services.ts +8 -2
  226. package/src/runtime/legacy-daemon-migration.ts +4 -3
  227. package/src/runtime/legacy-daemon-reconcile.ts +3 -2
  228. package/src/runtime/memory-spine-transport.ts +37 -267
  229. package/src/runtime/notification-dispatch.ts +2 -2
  230. package/src/runtime/onboarding/apply.ts +2 -2
  231. package/src/runtime/onboarding/derivation.ts +2 -2
  232. package/src/runtime/onboarding/markers.ts +2 -2
  233. package/src/runtime/onboarding/progress.ts +2 -2
  234. package/src/runtime/onboarding/snapshot.ts +1 -1
  235. package/src/runtime/onboarding/state.ts +2 -2
  236. package/src/runtime/onboarding/types.ts +2 -2
  237. package/src/runtime/orchestrator-core-services.ts +1 -1
  238. package/src/runtime/path-shadow-startup.ts +28 -221
  239. package/src/runtime/power-keepawake-remote.ts +3 -2
  240. package/src/runtime/process-lifecycle.ts +2 -2
  241. package/src/runtime/provider-fallback.ts +10 -66
  242. package/src/runtime/recovery-autosave.ts +1 -1
  243. package/src/runtime/recovery-offer-wiring.ts +39 -23
  244. package/src/runtime/recovery-prompt.ts +31 -17
  245. package/src/runtime/relay-reachability-bridge.ts +53 -42
  246. package/src/runtime/release-artifacts.ts +2 -1
  247. package/src/runtime/runtime-services-types.ts +82 -35
  248. package/src/runtime/services.ts +305 -300
  249. package/src/runtime/session-resume-liveness-confirm.ts +1 -1
  250. package/src/runtime/ui-services.ts +7 -6
  251. package/src/runtime/update-check.ts +23 -43
  252. package/src/runtime/workspace-checkpointing.ts +1 -1
  253. package/src/runtime/wrfc-persistence.ts +2 -2
  254. package/src/shell/ui-openers.ts +30 -7
  255. package/src/utils/clipboard.ts +1 -1
  256. package/src/verification/verification-ledger.ts +10 -8
  257. package/src/version.ts +1 -1
  258. package/bin/goodvibes-daemon +0 -90
  259. package/src/cli/config-overrides.ts +0 -267
  260. package/src/cli/endpoints.ts +0 -109
  261. package/src/cli/parser.ts +0 -395
  262. package/src/cli/redaction.ts +0 -170
  263. package/src/cli/types.ts +0 -84
  264. package/src/cluster/commands.ts +0 -382
  265. package/src/cluster/remote-daemon-target.ts +0 -225
  266. package/src/cluster/render.ts +0 -268
  267. package/src/config/atomic-write.ts +0 -70
  268. package/src/config/credential-availability.ts +0 -122
  269. package/src/config/goodvibes-home.ts +0 -149
  270. package/src/config/index.ts +0 -88
  271. package/src/config/provider-model.ts +0 -23
  272. package/src/config/read-versioned.ts +0 -228
  273. package/src/core/alert-gating.ts +0 -67
  274. package/src/core/consolidation-receipt.ts +0 -41
  275. package/src/core/focus-tracker.ts +0 -41
  276. package/src/core/history.ts +0 -45
  277. package/src/core/memory-status.ts +0 -118
  278. package/src/core/orchestrator.ts +0 -7
  279. package/src/core/pairing-devices.ts +0 -49
  280. package/src/core/pairing-handoff.ts +0 -101
  281. package/src/core/pairing-offers.ts +0 -83
  282. package/src/core/pairing-origin.ts +0 -78
  283. package/src/core/rewind-turn-anchors.ts +0 -311
  284. package/src/core/session-recovery.ts +0 -210
  285. package/src/core/stable-host.ts +0 -171
  286. package/src/core/transcript-journal.ts +0 -503
  287. package/src/daemon/cli.ts +0 -693
  288. package/src/daemon/fatal-boot-report.ts +0 -111
  289. package/src/daemon/handlers/context.ts +0 -29
  290. package/src/daemon/handlers/contracts.ts +0 -77
  291. package/src/daemon/handlers/credentials.ts +0 -139
  292. package/src/daemon/handlers/drafts/draft-store.ts +0 -427
  293. package/src/daemon/handlers/drafts/index.ts +0 -17
  294. package/src/daemon/handlers/drafts/register.ts +0 -331
  295. package/src/daemon/handlers/errors.ts +0 -18
  296. package/src/daemon/handlers/inbox/cursor-store.ts +0 -457
  297. package/src/daemon/handlers/inbox/index.ts +0 -284
  298. package/src/daemon/handlers/inbox/mapping.ts +0 -192
  299. package/src/daemon/handlers/inbox/poller.ts +0 -212
  300. package/src/daemon/handlers/inbox/provider-adapter.ts +0 -156
  301. package/src/daemon/handlers/inbox/providers/discord.ts +0 -252
  302. package/src/daemon/handlers/inbox/providers/email.ts +0 -152
  303. package/src/daemon/handlers/inbox/providers/imap-client.ts +0 -300
  304. package/src/daemon/handlers/inbox/providers/route-util.ts +0 -24
  305. package/src/daemon/handlers/inbox/providers/slack.ts +0 -263
  306. package/src/daemon/handlers/index.ts +0 -117
  307. package/src/daemon/handlers/register.ts +0 -168
  308. package/src/daemon/handlers/remote/backends/cloud-terminal.ts +0 -142
  309. package/src/daemon/handlers/remote/backends/docker.ts +0 -79
  310. package/src/daemon/handlers/remote/backends/index.ts +0 -40
  311. package/src/daemon/handlers/remote/backends/local-process.ts +0 -113
  312. package/src/daemon/handlers/remote/backends/process-runner.ts +0 -127
  313. package/src/daemon/handlers/remote/backends/ssh.ts +0 -125
  314. package/src/daemon/handlers/remote/backends/types.ts +0 -97
  315. package/src/daemon/handlers/remote/dispatcher.ts +0 -181
  316. package/src/daemon/handlers/remote/index.ts +0 -119
  317. package/src/daemon/handlers/remote/peer-registry.ts +0 -357
  318. package/src/daemon/handlers/remote/service.ts +0 -191
  319. package/src/daemon/handlers/routing/inbox-bridge.ts +0 -71
  320. package/src/daemon/handlers/routing/index.ts +0 -261
  321. package/src/daemon/handlers/routing/route-store.ts +0 -319
  322. package/src/daemon/handlers/routing/routing-resolver.ts +0 -75
  323. package/src/daemon/handlers/sqlite-store.ts +0 -278
  324. package/src/daemon/handlers/triage/index.ts +0 -57
  325. package/src/daemon/handlers/triage/integration.ts +0 -213
  326. package/src/daemon/handlers/triage/pipeline.ts +0 -274
  327. package/src/daemon/handlers/triage/scorer.ts +0 -287
  328. package/src/daemon/handlers/triage/tagger/discord.ts +0 -187
  329. package/src/daemon/handlers/triage/tagger/imap.ts +0 -384
  330. package/src/daemon/handlers/triage/tagger/index.ts +0 -184
  331. package/src/daemon/handlers/triage/tagger/shared.ts +0 -70
  332. package/src/daemon/handlers/triage/tagger/slack.ts +0 -69
  333. package/src/daemon/handlers/triage/types.ts +0 -50
  334. package/src/daemon/lifecycle.ts +0 -41
  335. package/src/daemon/provision-wake-model.ts +0 -81
  336. package/src/daemon/safe-serve.ts +0 -61
  337. package/src/daemon/send/channels.ts +0 -200
  338. package/src/daemon/send/command.ts +0 -332
  339. package/src/daemon/send/composition.ts +0 -99
  340. package/src/daemon/send/failure-text.ts +0 -93
  341. package/src/daemon/send/inert-text.ts +0 -225
  342. package/src/daemon/send/stdin.ts +0 -24
  343. package/src/daemon/service-commands.ts +0 -329
  344. package/src/export/cost-utils.ts +0 -319
  345. package/src/input/selection.ts +0 -135
  346. package/src/plugins/loader.ts +0 -15
  347. package/src/renderer/bottom-bar.ts +0 -58
  348. package/src/renderer/conversation-tree.ts +0 -228
  349. package/src/runtime/agent-graph-composition.ts +0 -78
  350. package/src/runtime/channel-composition.ts +0 -46
  351. package/src/runtime/cluster-composition.ts +0 -124
  352. package/src/runtime/cluster-group-composition.ts +0 -284
  353. package/src/runtime/code-index-services.ts +0 -167
  354. package/src/runtime/daemon-handler-composition.ts +0 -76
  355. package/src/runtime/device-posture-composition.ts +0 -110
  356. package/src/runtime/durability-housekeeping.ts +0 -183
  357. package/src/runtime/durability-services.ts +0 -155
  358. package/src/runtime/embedded-service-factories.ts +0 -74
  359. package/src/runtime/feature-settings.ts +0 -154
  360. package/src/runtime/fleet-needs-input-push.ts +0 -70
  361. package/src/runtime/fleet-services.ts +0 -41
  362. package/src/runtime/idle-power-services.ts +0 -85
  363. package/src/runtime/mail-composition.ts +0 -65
  364. package/src/runtime/memory-fold.ts +0 -55
  365. package/src/runtime/operator-token-cleanup.ts +0 -109
  366. package/src/runtime/path-shadow.ts +0 -418
  367. package/src/runtime/perf/panel-health-monitor.ts +0 -18
  368. package/src/runtime/provider-optimizer-wiring.ts +0 -55
  369. package/src/runtime/reachability-notice.ts +0 -100
  370. package/src/runtime/remote-execution-composition.ts +0 -62
  371. package/src/runtime/session-liveness-marker.ts +0 -257
  372. package/src/runtime/session-pointer-surface.ts +0 -22
  373. package/src/runtime/session-storage-services.ts +0 -41
  374. package/src/runtime/surface-feature-flags.ts +0 -96
  375. package/src/runtime/terminal-output-guard.ts +0 -235
  376. package/src/runtime/trust/workspace-registration.ts +0 -192
  377. package/src/runtime/trust/workspace-trust.ts +0 -229
  378. package/src/runtime/ui/index.ts +0 -39
  379. package/src/runtime/ui/model-picker/data-provider.ts +0 -182
  380. package/src/runtime/ui/model-picker/health-enrichment.ts +0 -231
  381. package/src/runtime/ui/model-picker/index.ts +0 -59
  382. package/src/runtime/ui/model-picker/types.ts +0 -153
  383. package/src/runtime/ui/provider-health/data-provider.ts +0 -244
  384. package/src/runtime/ui/provider-health/fallback-visualizer.ts +0 -71
  385. package/src/runtime/ui/provider-health/index.ts +0 -46
  386. package/src/runtime/ui/provider-health/types.ts +0 -146
  387. package/src/runtime/ui-events.ts +0 -1
  388. package/src/runtime/ui-read-model-helpers.ts +0 -1
  389. package/src/runtime/ui-read-models-observability-maintenance.ts +0 -1
  390. package/src/runtime/ui-read-models-observability-options.ts +0 -1
  391. package/src/runtime/ui-read-models-observability-remote.ts +0 -1
  392. package/src/runtime/ui-read-models-observability-security.ts +0 -1
  393. package/src/runtime/ui-read-models-observability-system.ts +0 -1
  394. package/src/runtime/ui-read-models-observability.ts +0 -1
  395. package/src/runtime/ui-service-queries.ts +0 -1
  396. package/src/runtime/voice-setup-services.ts +0 -98
  397. package/src/runtime/workstream-attempts-validation.ts +0 -77
  398. package/src/runtime/workstream-draft-edits.ts +0 -95
  399. package/src/runtime/workstream-draft-store.ts +0 -274
  400. package/src/runtime/workstream-draft-types.ts +0 -42
  401. package/src/runtime/workstream-services.ts +0 -373
  402. package/src/tools/index.ts +0 -1
  403. package/src/types/grid.ts +0 -48
  404. package/src/types/sql-js.d.ts +0 -15
  405. package/src/work-plans/work-plan-store.ts +0 -702
package/package.json CHANGED
@@ -1,12 +1,11 @@
1
1
  {
2
2
  "name": "@pellux/goodvibes-tui",
3
- "version": "1.27.1",
4
- "description": "Terminal-native GoodVibes product for coding, operations, automation, knowledge, channels, and daemon-backed control-plane workflows.",
3
+ "version": "2.0.1",
4
+ "description": "Terminal-native GoodVibes client for coding, operations, knowledge and channel workflows — a pure client of the GoodVibes daemon.",
5
5
  "type": "module",
6
6
  "main": "src/main.ts",
7
7
  "bin": {
8
- "goodvibes": "bin/goodvibes",
9
- "goodvibes-daemon": "bin/goodvibes-daemon"
8
+ "goodvibes": "bin/goodvibes"
10
9
  },
11
10
  "files": [
12
11
  "bin",
@@ -25,7 +24,6 @@
25
24
  ],
26
25
  "scripts": {
27
26
  "dev": "bun run src/main.ts",
28
- "daemon": "bun run src/daemon/cli.ts",
29
27
  "dev:watch": "bun --watch src/main.ts",
30
28
  "prebuild": "bun run scripts/prebuild.ts",
31
29
  "build": "bun build src/main.ts --compile --outfile dist/goodvibes",
@@ -33,11 +31,6 @@
33
31
  "build:linux-arm64": "bun build src/main.ts --compile --target=bun-linux-arm64 --outfile dist/goodvibes-linux-arm64",
34
32
  "build:macos-x64": "bun build src/main.ts --compile --target=bun-darwin-x64 --outfile dist/goodvibes-macos-x64",
35
33
  "build:macos-arm64": "bun build src/main.ts --compile --target=bun-darwin-arm64 --outfile dist/goodvibes-macos-arm64",
36
- "build:daemon:linux-x64": "goodvibes-build-binaries --target daemon-linux-x64",
37
- "build:daemon:linux-arm64": "goodvibes-build-binaries --target daemon-linux-arm64",
38
- "build:daemon:macos-x64": "goodvibes-build-binaries --target daemon-macos-x64",
39
- "build:daemon:macos-arm64": "goodvibes-build-binaries --target daemon-macos-arm64",
40
- "smoke:daemon": "bun run scripts/post-build-smoke.ts",
41
34
  "smoke:tui": "goodvibes-post-build-smoke",
42
35
  "build:windows": "bun build src/main.ts --compile --target=bun-windows-x64 --outfile dist/goodvibes-windows.exe",
43
36
  "build:all-shell": "bun run build:linux-x64 && bun run build:linux-arm64 && bun run build:macos-x64 && bun run build:macos-arm64 && bun run build:windows",
@@ -88,9 +81,6 @@
88
81
  "goodvibes",
89
82
  "tui",
90
83
  "bun",
91
- "daemon",
92
- "control-plane",
93
- "automation",
94
84
  "ai"
95
85
  ],
96
86
  "publishConfig": {
@@ -101,21 +91,20 @@
101
91
  "bun": ">=1.3.10"
102
92
  },
103
93
  "dependencies": {
104
- "@agentclientprotocol/sdk": "^0.16.1",
105
- "@anthropic-ai/bedrock-sdk": "^0.28.1",
106
- "@anthropic-ai/sdk": "^0.82.0",
107
- "@anthropic-ai/vertex-sdk": "^0.16.0",
94
+ "@agentclientprotocol/sdk": "^0.21.0",
95
+ "@anthropic-ai/bedrock-sdk": "^0.29.1",
96
+ "@anthropic-ai/sdk": "^0.92.0",
108
97
  "@ast-grep/napi": "^0.42.0",
109
- "@aws/bedrock-token-generator": "^1.1.0",
110
- "@pellux/goodvibes-sdk": "1.21.0",
111
- "@pellux/goodvibes-terminal-shell": "1.21.0",
98
+ "@pellux/goodvibes-sdk": "2.0.0",
99
+ "@pellux/goodvibes-terminal-shell": "2.0.0",
112
100
  "bash-language-server": "^5.6.0",
113
101
  "fuse.js": "^7.1.0",
102
+ "@pellux/goodvibes-daemon": "1.28.1",
114
103
  "graphql": "^16.13.2",
115
104
  "jszip": "^3.10.1",
116
105
  "node-edge-tts": "^1.2.10",
117
106
  "onnxruntime-web": "^1.27.0",
118
- "openai": "^6.29.0",
107
+ "openai": "6.46.0",
119
108
  "pyright": "^1.1.408",
120
109
  "simple-git": "^3.33.0",
121
110
  "sql.js": "^1.14.1",
@@ -135,10 +124,10 @@
135
124
  "typescript": "^5.9.3"
136
125
  },
137
126
  "optionalDependencies": {
138
- "@pellux/goodvibes-tui-linux-x64": "1.27.1",
139
- "@pellux/goodvibes-tui-linux-arm64": "1.27.1",
140
- "@pellux/goodvibes-tui-darwin-x64": "1.27.1",
141
- "@pellux/goodvibes-tui-darwin-arm64": "1.27.1"
127
+ "@pellux/goodvibes-tui-linux-x64": "2.0.1",
128
+ "@pellux/goodvibes-tui-linux-arm64": "2.0.1",
129
+ "@pellux/goodvibes-tui-darwin-x64": "2.0.1",
130
+ "@pellux/goodvibes-tui-darwin-arm64": "2.0.1"
142
131
  },
143
132
  "trustedDependencies": [],
144
133
  "overrides": {
@@ -60,9 +60,15 @@ async function downloadText(url) {
60
60
  }
61
61
 
62
62
  /**
63
- * Copy the prebuilt binaries (and sqlite-vec addon, if present) out of the
63
+ * Copy the prebuilt binary (and sqlite-vec addon, if present) out of the
64
64
  * installed platform package into vendor/. Returns true when it handled the
65
65
  * install, false when no platform package is available (fall back to download).
66
+ *
67
+ * The daemon binary is NOT here any more. The daemon is its own product with
68
+ * its own npm package (`goodvibes-daemon`), which this package declares as a
69
+ * dependency — so an npm install still brings the whole suite, and the daemon's
70
+ * own postinstall places the daemon's own binary. Two packages each placing
71
+ * a copy of `goodvibes-daemon` is exactly how a machine ends up with two.
66
72
  */
67
73
  function installFromPlatformPackage(artifacts, vendorDir) {
68
74
  const pkgName = PLATFORM_PACKAGE_NAMES[`${process.platform}-${process.arch}`];
@@ -78,17 +84,14 @@ function installFromPlatformPackage(artifacts, vendorDir) {
78
84
  }
79
85
 
80
86
  const app = join(pkgBinDir, artifacts.app);
81
- const daemon = join(pkgBinDir, artifacts.daemon);
82
- if (!existsSync(app) || !existsSync(daemon)) {
87
+ if (!existsSync(app)) {
83
88
  return false;
84
89
  }
85
90
 
86
- for (const artifactName of [artifacts.app, artifacts.daemon]) {
87
- const destination = join(vendorDir, artifactName);
88
- rmSync(destination, { force: true });
89
- copyFileSync(join(pkgBinDir, artifactName), destination);
90
- prepareBinary(destination);
91
- }
91
+ const destination = join(vendorDir, artifacts.app);
92
+ rmSync(destination, { force: true });
93
+ copyFileSync(app, destination);
94
+ prepareBinary(destination);
92
95
 
93
96
  // Carry the sqlite-vec native addon (bin/lib/...) beside the vendored binary
94
97
  // so semantic memory keeps working (resolved as <execDir>/lib/...).
@@ -123,16 +126,14 @@ async function installPlatformBinaries() {
123
126
 
124
127
  const localSourceDir = process.env.GOODVIBES_ASSET_SOURCE_DIR?.trim();
125
128
  if (localSourceDir) {
126
- for (const artifactName of [artifacts.app, artifacts.daemon]) {
127
- const sourcePath = join(localSourceDir, artifactName);
128
- if (!existsSync(sourcePath)) {
129
- throw new Error(`missing local release artifact for postinstall smoke: ${sourcePath}`);
130
- }
131
- const destination = join(vendorDir, artifactName);
132
- copyFileSync(sourcePath, destination);
133
- prepareBinary(destination);
129
+ const sourcePath = join(localSourceDir, artifacts.app);
130
+ if (!existsSync(sourcePath)) {
131
+ throw new Error(`missing local release artifact for postinstall smoke: ${sourcePath}`);
134
132
  }
135
- console.log(`postinstall: installed local smoke-test binaries for ${process.platform}-${process.arch}`);
133
+ const destination = join(vendorDir, artifacts.app);
134
+ copyFileSync(sourcePath, destination);
135
+ prepareBinary(destination);
136
+ console.log(`postinstall: installed the local smoke-test binary for ${process.platform}-${process.arch}`);
136
137
  return;
137
138
  }
138
139
 
@@ -153,26 +154,25 @@ async function installPlatformBinaries() {
153
154
  writeFileSync(join(vendorDir, 'SHA256SUMS.txt'), checksumText);
154
155
  const checksums = parseChecksumFile(checksumText);
155
156
 
156
- for (const artifactName of [artifacts.app, artifacts.daemon]) {
157
- const destination = join(vendorDir, artifactName);
158
- const tempDestination = `${destination}.download`;
159
- rmSync(tempDestination, { force: true });
160
- await downloadFile(`${releaseBaseUrl}/${artifactName}`, tempDestination);
161
- const actual = sha256(readFileSync(tempDestination));
162
- const expected = checksums.get(artifactName);
163
- try {
164
- verifyChecksum(artifactName, actual, expected);
165
- } catch (error) {
166
- rmSync(tempDestination, { force: true });
167
- throw error;
168
- }
169
- rmSync(destination, { force: true });
170
- copyFileSync(tempDestination, destination);
157
+ const artifactName = artifacts.app;
158
+ const destination = join(vendorDir, artifactName);
159
+ const tempDestination = `${destination}.download`;
160
+ rmSync(tempDestination, { force: true });
161
+ await downloadFile(`${releaseBaseUrl}/${artifactName}`, tempDestination);
162
+ const actual = sha256(readFileSync(tempDestination));
163
+ const expected = checksums.get(artifactName);
164
+ try {
165
+ verifyChecksum(artifactName, actual, expected);
166
+ } catch (error) {
171
167
  rmSync(tempDestination, { force: true });
172
- prepareBinary(destination);
168
+ throw error;
173
169
  }
170
+ rmSync(destination, { force: true });
171
+ copyFileSync(tempDestination, destination);
172
+ rmSync(tempDestination, { force: true });
173
+ prepareBinary(destination);
174
174
 
175
- console.log(`postinstall: installed release binaries for ${process.platform}-${process.arch}`);
175
+ console.log(`postinstall: installed the release binary for ${process.platform}-${process.arch}`);
176
176
  }
177
177
 
178
178
  function deployBundledFiles() {
@@ -1,7 +1,7 @@
1
1
  import type { ConfigManager } from '@pellux/goodvibes-sdk/platform/config';
2
2
  import type { ModelDefinition, ProviderRegistry } from '@pellux/goodvibes-sdk/platform/providers';
3
3
  import type { ContentPart } from '@pellux/goodvibes-sdk/platform/providers';
4
- import type { Orchestrator, OrchestratorUserInputOptions } from '../core/orchestrator.ts';
4
+ import type { Orchestrator, OrchestratorUserInputOptions } from '@pellux/goodvibes-sdk/platform/core';
5
5
 
6
6
  const SPOKEN_TURN_SOURCE = 'tts';
7
7
 
@@ -6,15 +6,15 @@ import { listProviderRuntimeSnapshots } from '@pellux/goodvibes-sdk/platform/pro
6
6
  import { createRuntimeServices } from '../runtime/services.ts';
7
7
  import { createRuntimeStore } from '../runtime/store/index.ts';
8
8
  import { getOnboardingCheckMarkerPath } from '../runtime/onboarding/index.ts';
9
- import { CONFIG_SCHEMA } from '../config/index.ts';
9
+ import { CONFIG_SCHEMA } from '@pellux/goodvibes-sdk/platform/config';
10
10
  import { SecretsManager } from '../config/secrets.ts';
11
- import type { ConfigKey } from '../config/index.ts';
12
- import type { CliCommandRuntime } from './types.ts';
13
- import type { CliCommandOutput } from './types.ts';
11
+ import type { ConfigKey } from '@pellux/goodvibes-sdk/platform/config';
12
+ import type { CliCommandRuntime } from '@pellux/goodvibes-terminal-shell';
13
+ import type { CliCommandOutput } from '@pellux/goodvibes-terminal-shell';
14
14
  import { getPackageVersion } from './help.ts';
15
15
  import { classifyProviderSetup } from '../providers/provider-classification.ts';
16
16
  import { buildCliServicePosture } from './service-posture.ts';
17
- import { REDACTED_VALUE, collectSensitiveConfigValues, isRedactedValue, redactConfig, redactSerializedSecrets } from './redaction.ts';
17
+ import { REDACTED_VALUE, collectSensitiveConfigValues, isRedactedValue, redactConfig, redactSerializedSecrets } from '@pellux/goodvibes-terminal-shell';
18
18
  import { summarizeError } from '@pellux/goodvibes-sdk/platform/utils';
19
19
 
20
20
  interface BundleInspectSummary {
@@ -23,7 +23,7 @@
23
23
  * `"completions": "bun run src/cli/completions/generate.ts"` to write files.
24
24
  */
25
25
 
26
- import type { GoodVibesCliCommand } from '../types.ts';
26
+ import type { GoodVibesCliCommand } from '@pellux/goodvibes-terminal-shell';
27
27
 
28
28
  // ---------------------------------------------------------------------------
29
29
  // Typed completion data surface
package/src/cli/doctor.ts CHANGED
@@ -2,10 +2,10 @@ import type { ConfigManager } from '@pellux/goodvibes-sdk/platform/config';
2
2
  import { PermissionManager, createPermissionConfigReader } from '@pellux/goodvibes-sdk/platform/permissions';
3
3
  import type { PermissionCategory, PermissionCheckResult } from '@pellux/goodvibes-sdk/platform/permissions';
4
4
  import { PolicyRuntimeState, createFeatureFlagManager, deriveFeatureStates } from '@/runtime/index.ts';
5
- import { getProviderIdFromModel } from '../config/provider-model.ts';
5
+ import { getProviderIdFromModel } from '@pellux/goodvibes-sdk/platform/providers';
6
6
  import { describeConfiguredEffort } from '../providers/reasoning-effort-surface.ts';
7
- import type { CliCommandOutput } from './types.ts';
8
- import type { GoodVibesCliOutputFormat } from './types.ts';
7
+ import type { CliCommandOutput } from '@pellux/goodvibes-terminal-shell';
8
+ import type { GoodVibesCliOutputFormat } from '@pellux/goodvibes-terminal-shell';
9
9
  import { buildHooksValidation } from './hooks-report.ts';
10
10
 
11
11
  // ---------------------------------------------------------------------------
@@ -1,7 +1,7 @@
1
1
  import { existsSync } from 'node:fs';
2
2
  import { join } from 'node:path';
3
- import { ConfigManager } from '../config/index.ts';
4
- import { formatProviderModel, getModelIdFromProviderModel, getProviderIdFromModel } from '../config/provider-model.ts';
3
+ import { ConfigManager } from '@pellux/goodvibes-sdk/platform/config';
4
+ import { formatProviderModel, getModelIdFromProviderModel, getProviderIdFromModel } from '@pellux/goodvibes-sdk/platform/providers';
5
5
  import { readOnboardingCheckMarkers } from '../runtime/onboarding/index.ts';
6
6
  import { GlobalNetworkTransportInstaller } from '@/runtime/index.ts';
7
7
  import { createShellPathService } from '@/runtime/index.ts';
@@ -25,14 +25,15 @@ import {
25
25
  } from './index.ts';
26
26
  import { buildCliServicePosture, getGoodVibesPackageRoot, resolveGoodVibesDaemonExecutable } from './service-posture.ts';
27
27
  import { runInstallSelfCheck } from '../runtime/install-self-check.ts';
28
- import { readPersistedWorkspaceTrust } from '../runtime/trust/workspace-trust.ts';
29
- import { WorkspaceRegistrationManager } from '../runtime/trust/workspace-registration.ts';
28
+ import { readPersistedWorkspaceTrust } from '@pellux/goodvibes-sdk/platform/runtime/operations';
29
+ import { WorkspaceRegistrationManager } from '@pellux/goodvibes-sdk/platform/runtime/operations';
30
30
  import type { CliWorkspaceStatus, CliSandboxStatus, CliRelayStatus } from './status.ts';
31
31
  import { detectSandboxAvailability, probeSandboxHost } from '@pellux/goodvibes-sdk/platform/tools/exec/sandbox';
32
32
  import { createFeatureFlagManager, deriveFeatureStates } from '@/runtime/index.ts';
33
33
  import { ensureGoodvibesGitignore } from './ensure-goodvibes-gitignore.ts';
34
34
  import { runDaemonConfigMigration } from '../config/run-daemon-config-migration.ts';
35
35
  import { describeDaemonConfigMigration } from '@pellux/goodvibes-sdk/platform/config';
36
+ import { GOODVIBES_TUI_SURFACE_ROOT } from '../config/surface.ts';
36
37
 
37
38
  type ShellEntrypointOwnership = {
38
39
  readonly workingDirectory: string;
@@ -97,8 +98,12 @@ export async function prepareShellCliRuntime(
97
98
  }
98
99
 
99
100
  if (cli.command === 'serve') {
100
- await import('../daemon/cli.ts');
101
- return new Promise<PreparedShellCliRuntime>(() => {});
101
+ // The daemon is its own product and its own binary. This app is a client:
102
+ // it never hosts one, so `serve` names something it cannot do. Say which
103
+ // command to run instead rather than starting a daemon that would be a
104
+ // second, drifting copy of the real one.
105
+ console.error('`goodvibes serve` is gone: the daemon is a separate program now. Run `goodvibes-daemon serve` (installed alongside this app), or `goodvibes service start` to start the installed service.');
106
+ process.exit(2);
102
107
  }
103
108
 
104
109
  const {
@@ -180,7 +185,7 @@ export async function prepareShellCliRuntime(
180
185
  // Read-only workspace posture for the report: the trust reader never
181
186
  // persists (no grandfathering side effect), and registration resolve() is
182
187
  // read-only, so `status`/`doctor` observe state without mutating it.
183
- const trustView = readPersistedWorkspaceTrust(shellPaths);
188
+ const trustView = readPersistedWorkspaceTrust(shellPaths, GOODVIBES_TUI_SURFACE_ROOT);
184
189
  const registrationEvaluation = await new WorkspaceRegistrationManager({ shellPaths }).evaluate();
185
190
  const workspaceStatus: CliWorkspaceStatus = {
186
191
  trustLevel: trustView.level,
package/src/cli/help.ts CHANGED
@@ -58,7 +58,6 @@ export function renderGoodVibesHelp(binary = 'goodvibes'): string {
58
58
  'Commands:',
59
59
  ' tui [path] Start the interactive TUI (default)',
60
60
  ' run|exec [prompt] Run non-interactively with text/json/stream-json output',
61
- ' serve|daemon Start the daemon/API host',
62
61
  ' web Show browser surface bind URL and enablement',
63
62
  ' service Inspect/manage daemon service lifecycle',
64
63
  ' status Print config, provider, service, and onboarding posture',
@@ -134,7 +133,7 @@ export function renderGoodVibesHelp(binary = 'goodvibes'): string {
134
133
  ` ${binary} control-plane status`,
135
134
  ` ${binary} subscription providers`,
136
135
  ` ${binary} subscription login openai start --open`,
137
- ` ${binary} serve --hostname 0.0.0.0 --port 3421`,
136
+ ` goodvibes-daemon --hostname 0.0.0.0 --port 3421`,
138
137
  ].join('\n');
139
138
  }
140
139
 
@@ -247,9 +246,9 @@ const COMMAND_HELP: Record<string, CommandHelp> = {
247
246
  examples: ['completion bash', 'completion zsh'],
248
247
  },
249
248
  serve: {
250
- usage: ['serve [--hostname <host>] [--port <port>]', 'daemon [--hostname <host>] [--port <port>]'],
251
- summary: 'Start the headless GoodVibes daemon/API host.',
252
- examples: ['serve', 'serve --hostname 0.0.0.0 --port 3421'],
249
+ usage: ['serve'],
250
+ summary: 'Not served here: the daemon is its own program. Run `goodvibes-daemon` (or manage the installed service with `goodvibes service`).',
251
+ examples: [],
253
252
  },
254
253
  remote: {
255
254
  usage: ['remote', 'bridge'],
@@ -1,5 +1,5 @@
1
1
  import { buildHooksValidation } from './hooks-report.ts';
2
- import type { CliCommandOutput, CliCommandRuntime } from './types.ts';
2
+ import type { CliCommandOutput, CliCommandRuntime } from '@pellux/goodvibes-terminal-shell';
3
3
 
4
4
  // ---------------------------------------------------------------------------
5
5
  // `goodvibes hooks validate` — validate the user's hooks.json against the
package/src/cli/index.ts CHANGED
@@ -1,10 +1,7 @@
1
- export * from './types.ts';
2
- export * from './parser.ts';
1
+ export * from '@pellux/goodvibes-terminal-shell';
3
2
  export * from './help.ts';
4
3
  export * from './status.ts';
5
4
  export * from './completion.ts';
6
- export * from './config-overrides.ts';
7
- export * from './endpoints.ts';
8
5
  export * from './surface-command.ts';
9
6
  export * from './service-command.ts';
10
7
  export * from './bundle-command.ts';
@@ -3,7 +3,7 @@
3
3
  * an installed binary never drifts behind. At TUI launch (before any runtime
4
4
  * bootstrap or terminal mode change) this runs a quick version check and, when
5
5
  * a newer release exists, installs it through the SAME checksum-verified
6
- * download/verify/swap path `/update apply` and scripts/install.sh use
6
+ * download/verify/swap path `/update apply` and the suite installer use
7
7
  * (src/input/commands/update-runtime.ts — there is deliberately no second
8
8
  * updater), then asks the caller to restart onto the new binary.
9
9
  *
@@ -44,7 +44,9 @@ import {
44
44
  type ApplyUpdateOptions,
45
45
  } from '../input/commands/update-runtime.ts';
46
46
  import { readUpdateSettings, type UpdateSettings } from '../config/tui-extension-settings.ts';
47
- import type { ConfigManager } from '../config/index.ts';
47
+ import { runDaemonHandover, type DaemonHandoverOutcome } from '@pellux/goodvibes-sdk/platform/runtime/client';
48
+ import { resolveGoodVibesDaemonExecutable } from './service-posture.ts';
49
+ import type { ConfigManager } from '@pellux/goodvibes-sdk/platform/config';
48
50
  import { VERSION } from '../version.ts';
49
51
 
50
52
  /**
@@ -217,19 +219,21 @@ export interface SelfUpdateAtLaunchParams {
217
219
  */
218
220
  export async function selfUpdateAtLaunch(params: SelfUpdateAtLaunchParams): Promise<readonly string[]> {
219
221
  const lines: string[] = [];
222
+ const print = (line: string): void => {
223
+ lines.push(line);
224
+ params.stdout.write(`${line}\n`);
225
+ };
226
+ const settings = readUpdateSettings(params.configManager);
220
227
  const outcome = await runLaunchAutoUpdate({
221
228
  fetchImpl: fetch as UpdateFetchLike,
222
229
  execPath: process.execPath,
223
230
  platform: process.platform,
224
231
  arch: process.arch,
225
232
  currentVersion: VERSION,
226
- settings: readUpdateSettings(params.configManager),
233
+ settings,
227
234
  env: process.env,
228
235
  configManager: params.configManager,
229
- print: (line) => {
230
- lines.push(line);
231
- params.stdout.write(`${line}\n`);
232
- },
236
+ print,
233
237
  });
234
238
  if (outcome.action === 'restart') {
235
239
  process.exit(
@@ -241,9 +245,57 @@ export async function selfUpdateAtLaunch(params: SelfUpdateAtLaunchParams): Prom
241
245
  }),
242
246
  );
243
247
  }
248
+ // Runs AFTER the restart branch, so on a launch that updated this binary the
249
+ // handover happens in the restarted process rather than in one that is about
250
+ // to be replaced.
251
+ await handDaemonOverAtLaunch({ configManager: params.configManager, settings, print });
244
252
  return lines;
245
253
  }
246
254
 
255
+ export interface HandDaemonOverAtLaunchParams {
256
+ readonly configManager: Pick<ConfigManager, 'get'>;
257
+ readonly settings: UpdateSettings;
258
+ readonly print: (line: string) => void;
259
+ }
260
+
261
+ /**
262
+ * The launch wiring for the old→new daemon handover (src/runtime/daemon-handover.ts).
263
+ *
264
+ * A daemon binary from before the split cannot update itself onto its own
265
+ * release line — the releases URL baked into it names this repository, which no
266
+ * longer builds daemons, and pointing it at the daemon's repository instead
267
+ * still fails because its shipped updater insists on downloading the terminal
268
+ * binary beside it, which that repository does not publish. So the terminal
269
+ * hands it over directly, once, and the path goes quiet afterwards.
270
+ *
271
+ * Gated on the SAME `update.autoUpdateAtLaunch` setting as this binary's own
272
+ * launch update: that setting is the operator's "do not swap binaries while I
273
+ * am starting up" answer, and it means the same thing for the daemon installed
274
+ * beside this one. No second switch is introduced for one migration.
275
+ *
276
+ * Only a binary install acts. A source or package-managed terminal has no
277
+ * business replacing a daemon binary on the host it happens to be running on.
278
+ */
279
+ export async function handDaemonOverAtLaunch(
280
+ params: HandDaemonOverAtLaunchParams,
281
+ ): Promise<DaemonHandoverOutcome> {
282
+ if (!(params.settings.autoUpdateAtLaunch ?? true)) {
283
+ return { action: 'skipped', reason: 'disabled' };
284
+ }
285
+ if (detectInstallKind(process.execPath) !== 'binary') {
286
+ return { action: 'skipped', reason: 'not-swappable-install' };
287
+ }
288
+ const resolved = resolveGoodVibesDaemonExecutable();
289
+ return await runDaemonHandover({
290
+ fetchImpl: fetch as UpdateFetchLike,
291
+ binaryPath: resolved.absolute ? resolved.command : null,
292
+ platform: process.platform,
293
+ arch: process.arch,
294
+ configManager: params.configManager,
295
+ print: params.print,
296
+ });
297
+ }
298
+
247
299
  export interface RestartOntoUpdatedBinaryOptions {
248
300
  readonly execPath: string;
249
301
  readonly argv: readonly string[];
@@ -6,13 +6,13 @@ import { getSubscriptionProviderConfig, listAvailableSubscriptionProviders } fro
6
6
  import { beginOpenAICodexLogin, exchangeOpenAICodexCode } from '@pellux/goodvibes-sdk/platform/config';
7
7
  import { inspectProviderAuth } from '@/runtime/index.ts';
8
8
  import { generateQrMatrix, renderQrToString, PAIRING_HANDOFF_OFFER_KINDS, type PairingHandoffOfferKind } from '@pellux/goodvibes-sdk/platform/pairing';
9
- import { ensurePublicBaseUrl } from '../core/pairing-origin.ts';
10
- import { formatPairingOffers, formatPostureCapabilities, pairingPostureNotice } from '../core/pairing-offers.ts';
11
- import { defaultPairingTokenName } from '../core/pairing-handoff.ts';
12
- import { stableUrlHostForBindHost } from '../core/stable-host.ts';
13
- import { formatRuntimeEndpointBinding, resolveRuntimeEndpointBinding } from './endpoints.ts';
9
+ import { ensurePublicBaseUrl } from '@pellux/goodvibes-sdk/platform/pairing';
10
+ import { formatPairingOffers, formatPostureCapabilities, pairingPostureNotice } from '@pellux/goodvibes-sdk/platform/pairing';
11
+ import { defaultPairingTokenName } from '@pellux/goodvibes-sdk/platform/pairing';
12
+ import { stableUrlHostForBindHost } from '@pellux/goodvibes-sdk/platform/pairing';
13
+ import { formatRuntimeEndpointBinding, resolveRuntimeEndpointBinding } from '@pellux/goodvibes-terminal-shell';
14
14
  import { classifyBindPosture, isNetworkFacing } from './network-posture.ts';
15
- import type { CliCommandRuntime } from './types.ts';
15
+ import type { CliCommandRuntime } from '@pellux/goodvibes-terminal-shell';
16
16
  import type { RuntimeServices } from '../runtime/services.ts';
17
17
  import { extractAuthorizationCode, formatJsonOrText, hasCommandFlag, openBrowser, probeTcp, readAuthPaths, readOptionValue, runNonInteractiveAgent, withRuntimeServices, yesNo } from './management-utils.ts';
18
18
 
@@ -18,7 +18,7 @@ import { join } from 'node:path';
18
18
  import net from 'node:net';
19
19
  import { spawn } from 'node:child_process';
20
20
  import { networkInterfaces } from 'node:os';
21
- import type { ConfigManager, GoodVibesConfig } from '../config/index.ts';
21
+ import type { ConfigManager, GoodVibesConfig } from '@pellux/goodvibes-sdk/platform/config';
22
22
  import { bootstrapRuntime } from '../runtime/bootstrap.ts';
23
23
  import { refreshMemoryRecallSnapshot } from '../runtime/orchestrator-core-services.ts';
24
24
  import { createRuntimeServices } from '../runtime/services.ts';
@@ -26,10 +26,10 @@ import { createRuntimeStore } from '../runtime/store/index.ts';
26
26
  import type { RuntimeServices } from '../runtime/services.ts';
27
27
  import { RuntimeEventBus, type TurnEvent, createShellPathService, configureRuntimeEventBusDefaults, runtimeEventBusOptionsFrom } from '@/runtime/index.ts';
28
28
  import { summarizeError } from '@pellux/goodvibes-sdk/platform/utils';
29
- import { resolveRuntimeEndpointBinding } from './endpoints.ts';
30
- import { applyRuntimeEndpointFlagOverrides } from './config-overrides.ts';
31
- import type { RuntimeEndpointId } from './endpoints.ts';
32
- import type { CliCommandRuntime, GoodVibesCliParseResult } from './types.ts';
29
+ import { resolveRuntimeEndpointBinding } from '@pellux/goodvibes-terminal-shell';
30
+ import { applyRuntimeEndpointFlagOverrides } from '@pellux/goodvibes-terminal-shell';
31
+ import type { RuntimeEndpointId } from '@pellux/goodvibes-terminal-shell';
32
+ import type { CliCommandRuntime, GoodVibesCliParseResult } from '@pellux/goodvibes-terminal-shell';
33
33
  import { openBrowser as _openBrowser } from '../utils/browser.ts';
34
34
 
35
35
  type Formatter = (value: unknown, text: string) => string;
@@ -1,8 +1,8 @@
1
1
  import { mkdirSync, readFileSync, writeFileSync } from 'node:fs';
2
2
  import { dirname } from 'node:path';
3
- import type { ConfigManager, ConfigKey, GoodVibesConfig } from '../config/index.ts';
4
- import { CONFIG_SCHEMA } from '../config/index.ts';
5
- import { formatProviderModel, getModelIdFromProviderModel } from '../config/provider-model.ts';
3
+ import type { ConfigManager, ConfigKey, GoodVibesConfig } from '@pellux/goodvibes-sdk/platform/config';
4
+ import { CONFIG_SCHEMA } from '@pellux/goodvibes-sdk/platform/config';
5
+ import { formatProviderModel, getModelIdFromProviderModel } from '@pellux/goodvibes-sdk/platform/providers';
6
6
  import { SecretsManager } from '../config/secrets.ts';
7
7
  import { summarizeError } from '@pellux/goodvibes-sdk/platform/utils';
8
8
  import { listProviderRuntimeSnapshots } from '@pellux/goodvibes-sdk/platform/providers';
@@ -11,12 +11,12 @@ import { BUILTIN_SECRET_PROVIDER_SOURCES, describeSecretRef, isSecretRefInput, r
11
11
  import { getSubscriptionProviderConfig, listAvailableSubscriptionProviders } from '@pellux/goodvibes-sdk/platform/config';
12
12
  import { beginOpenAICodexLogin, exchangeOpenAICodexCode } from '@pellux/goodvibes-sdk/platform/config';
13
13
  import { inspectProviderAuth } from '@/runtime/index.ts';
14
- import type { CliCommandRuntime, GoodVibesCliParseResult } from './types.ts';
14
+ import type { CliCommandRuntime, GoodVibesCliParseResult } from '@pellux/goodvibes-terminal-shell';
15
15
  import { formatProviderAuthRoute, summarizeProviderAuthRoutes } from './provider-auth-routes.ts';
16
16
  import { classifyProviderSetup } from '../providers/provider-classification.ts';
17
- import { resolveRuntimeEndpointBinding } from './endpoints.ts';
18
- import { applyRuntimeEndpointFlagOverrides } from './config-overrides.ts';
19
- import type { RuntimeEndpointId } from './endpoints.ts';
17
+ import { resolveRuntimeEndpointBinding } from '@pellux/goodvibes-terminal-shell';
18
+ import { applyRuntimeEndpointFlagOverrides } from '@pellux/goodvibes-terminal-shell';
19
+ import type { RuntimeEndpointId } from '@pellux/goodvibes-terminal-shell';
20
20
  import { handleServiceCommand } from './service-command.ts';
21
21
  import { handleBundleCommand } from './bundle-command.ts';
22
22
  import { handleHooksCommand } from './hooks-command.ts';
@@ -1,4 +1,4 @@
1
- import type { RuntimeEndpointBinding } from './endpoints.ts';
1
+ import type { RuntimeEndpointBinding } from '@pellux/goodvibes-terminal-shell';
2
2
 
3
3
  export type BindPostureKind = 'local' | 'local-network' | 'custom-network';
4
4
 
@@ -3,7 +3,7 @@ import { existsSync, readFileSync, statSync } from 'node:fs';
3
3
  import { join } from 'node:path';
4
4
 
5
5
  export interface PackageCliBinVerification {
6
- readonly command: 'goodvibes' | 'goodvibes-daemon';
6
+ readonly command: 'goodvibes';
7
7
  readonly target: string;
8
8
  readonly exists: boolean;
9
9
  readonly executable: boolean;
@@ -27,15 +27,16 @@ export interface PackageCliVerificationReport {
27
27
  readonly issues: readonly string[];
28
28
  }
29
29
 
30
- const REQUIRED_BIN_COMMANDS = ['goodvibes', 'goodvibes-daemon'] as const;
30
+ // One bin, one entry point. The daemon ships as its own package with its own
31
+ // binary; this package carrying a second wrapper is what let two daemons exist
32
+ // on one machine, built from one tree and drifting apart.
33
+ const REQUIRED_BIN_COMMANDS = ['goodvibes'] as const;
31
34
  const REQUIRED_TARBALL_PATHS = [
32
35
  'README.md',
33
36
  'CHANGELOG.md',
34
37
  'package.json',
35
38
  'src/main.ts',
36
- 'src/daemon/cli.ts',
37
39
  'bin/goodvibes',
38
- 'bin/goodvibes-daemon',
39
40
  'scripts/check-bun.sh',
40
41
  'scripts/postinstall.js',
41
42
  '.goodvibes/GOODVIBES.md',
@@ -53,8 +54,8 @@ function hasExecutableBit(path: string): boolean {
53
54
  function verifyBin(root: string, command: typeof REQUIRED_BIN_COMMANDS[number], target: string | undefined): PackageCliBinVerification {
54
55
  const binPath = target ? join(root, target) : '';
55
56
  const source = target && existsSync(binPath) ? readFileSync(binPath, 'utf-8') : '';
56
- const expectedLocalBuild = command === 'goodvibes' ? "dist', 'goodvibes'" : "dist', 'goodvibes-daemon'";
57
- const expectedSource = command === 'goodvibes' ? "src', 'main.ts'" : "src', 'daemon', 'cli.ts'";
57
+ const expectedLocalBuild = "dist', 'goodvibes'";
58
+ const expectedSource = "src', 'main.ts'";
58
59
  return {
59
60
  command,
60
61
  target: target ?? '',
@@ -11,7 +11,7 @@ import {
11
11
  type BundleActivationPlan,
12
12
  } from '@pellux/goodvibes-sdk/platform/runtime/ecosystem';
13
13
  import { summarizeError } from '@pellux/goodvibes-sdk/platform/utils';
14
- import type { CliCommandOutput, CliCommandRuntime } from './types.ts';
14
+ import type { CliCommandOutput, CliCommandRuntime } from '@pellux/goodvibes-terminal-shell';
15
15
 
16
16
  // ---------------------------------------------------------------------------
17
17
  // `goodvibes plugin bundles browse|install|list` — the capability-bundle
@@ -1,10 +1,10 @@
1
1
  import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';
2
2
  import { dirname, join, resolve } from 'node:path';
3
3
  import { tmpdir } from 'node:os';
4
- import { discoverPlugins } from '../plugins/loader.ts';
4
+ import { discoverPlugins } from '@pellux/goodvibes-sdk/platform/plugins';
5
5
  import { validateManifestV2 } from '@/runtime/index.ts';
6
6
  import { summarizeError } from '@pellux/goodvibes-sdk/platform/utils';
7
- import type { CliCommandOutput, CliCommandRuntime } from './types.ts';
7
+ import type { CliCommandOutput, CliCommandRuntime } from '@pellux/goodvibes-terminal-shell';
8
8
  import { handlePluginBundlesCommand } from './plugin-bundles-command.ts';
9
9
 
10
10
  // ---------------------------------------------------------------------------
@@ -1,7 +1,7 @@
1
1
  import { mkdirSync } from 'node:fs';
2
- import type { CliCommandRuntime } from './types.ts';
2
+ import type { CliCommandRuntime } from '@pellux/goodvibes-terminal-shell';
3
3
  import { buildCliServicePosture, createPlatformServiceManager, formatCliServicePosture, getServiceStateRoot } from './service-posture.ts';
4
- import type { CliCommandOutput } from './types.ts';
4
+ import type { CliCommandOutput } from '@pellux/goodvibes-terminal-shell';
5
5
 
6
6
  function enableServicePosture(runtime: CliCommandRuntime): void {
7
7
  runtime.configManager.setDynamic('service.enabled', true);