@pellux/goodvibes-tui 1.27.0 → 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 (404) hide show
  1. package/CHANGELOG.md +125 -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 +12 -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 +15 -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 -641
  288. package/src/daemon/handlers/context.ts +0 -29
  289. package/src/daemon/handlers/contracts.ts +0 -77
  290. package/src/daemon/handlers/credentials.ts +0 -139
  291. package/src/daemon/handlers/drafts/draft-store.ts +0 -427
  292. package/src/daemon/handlers/drafts/index.ts +0 -17
  293. package/src/daemon/handlers/drafts/register.ts +0 -331
  294. package/src/daemon/handlers/errors.ts +0 -18
  295. package/src/daemon/handlers/inbox/cursor-store.ts +0 -457
  296. package/src/daemon/handlers/inbox/index.ts +0 -284
  297. package/src/daemon/handlers/inbox/mapping.ts +0 -192
  298. package/src/daemon/handlers/inbox/poller.ts +0 -212
  299. package/src/daemon/handlers/inbox/provider-adapter.ts +0 -156
  300. package/src/daemon/handlers/inbox/providers/discord.ts +0 -252
  301. package/src/daemon/handlers/inbox/providers/email.ts +0 -152
  302. package/src/daemon/handlers/inbox/providers/imap-client.ts +0 -300
  303. package/src/daemon/handlers/inbox/providers/route-util.ts +0 -24
  304. package/src/daemon/handlers/inbox/providers/slack.ts +0 -263
  305. package/src/daemon/handlers/index.ts +0 -117
  306. package/src/daemon/handlers/register.ts +0 -168
  307. package/src/daemon/handlers/remote/backends/cloud-terminal.ts +0 -142
  308. package/src/daemon/handlers/remote/backends/docker.ts +0 -79
  309. package/src/daemon/handlers/remote/backends/index.ts +0 -40
  310. package/src/daemon/handlers/remote/backends/local-process.ts +0 -113
  311. package/src/daemon/handlers/remote/backends/process-runner.ts +0 -127
  312. package/src/daemon/handlers/remote/backends/ssh.ts +0 -125
  313. package/src/daemon/handlers/remote/backends/types.ts +0 -97
  314. package/src/daemon/handlers/remote/dispatcher.ts +0 -181
  315. package/src/daemon/handlers/remote/index.ts +0 -119
  316. package/src/daemon/handlers/remote/peer-registry.ts +0 -357
  317. package/src/daemon/handlers/remote/service.ts +0 -191
  318. package/src/daemon/handlers/routing/inbox-bridge.ts +0 -71
  319. package/src/daemon/handlers/routing/index.ts +0 -261
  320. package/src/daemon/handlers/routing/route-store.ts +0 -319
  321. package/src/daemon/handlers/routing/routing-resolver.ts +0 -75
  322. package/src/daemon/handlers/sqlite-store.ts +0 -278
  323. package/src/daemon/handlers/triage/index.ts +0 -57
  324. package/src/daemon/handlers/triage/integration.ts +0 -213
  325. package/src/daemon/handlers/triage/pipeline.ts +0 -274
  326. package/src/daemon/handlers/triage/scorer.ts +0 -287
  327. package/src/daemon/handlers/triage/tagger/discord.ts +0 -187
  328. package/src/daemon/handlers/triage/tagger/imap.ts +0 -384
  329. package/src/daemon/handlers/triage/tagger/index.ts +0 -184
  330. package/src/daemon/handlers/triage/tagger/shared.ts +0 -70
  331. package/src/daemon/handlers/triage/tagger/slack.ts +0 -69
  332. package/src/daemon/handlers/triage/types.ts +0 -50
  333. package/src/daemon/lifecycle.ts +0 -41
  334. package/src/daemon/provision-wake-model.ts +0 -81
  335. package/src/daemon/safe-serve.ts +0 -61
  336. package/src/daemon/send/channels.ts +0 -200
  337. package/src/daemon/send/command.ts +0 -332
  338. package/src/daemon/send/composition.ts +0 -99
  339. package/src/daemon/send/failure-text.ts +0 -93
  340. package/src/daemon/send/inert-text.ts +0 -225
  341. package/src/daemon/send/stdin.ts +0 -24
  342. package/src/daemon/service-commands.ts +0 -329
  343. package/src/export/cost-utils.ts +0 -319
  344. package/src/input/selection.ts +0 -135
  345. package/src/plugins/loader.ts +0 -15
  346. package/src/renderer/bottom-bar.ts +0 -58
  347. package/src/renderer/conversation-tree.ts +0 -228
  348. package/src/runtime/agent-graph-composition.ts +0 -78
  349. package/src/runtime/channel-composition.ts +0 -46
  350. package/src/runtime/cluster-composition.ts +0 -124
  351. package/src/runtime/cluster-group-composition.ts +0 -284
  352. package/src/runtime/code-index-services.ts +0 -167
  353. package/src/runtime/daemon-handler-composition.ts +0 -76
  354. package/src/runtime/device-posture-composition.ts +0 -110
  355. package/src/runtime/durability-housekeeping.ts +0 -183
  356. package/src/runtime/durability-services.ts +0 -155
  357. package/src/runtime/embedded-service-factories.ts +0 -58
  358. package/src/runtime/feature-settings.ts +0 -154
  359. package/src/runtime/fleet-needs-input-push.ts +0 -70
  360. package/src/runtime/fleet-services.ts +0 -41
  361. package/src/runtime/idle-power-services.ts +0 -85
  362. package/src/runtime/mail-composition.ts +0 -65
  363. package/src/runtime/memory-fold.ts +0 -55
  364. package/src/runtime/operator-token-cleanup.ts +0 -109
  365. package/src/runtime/path-shadow.ts +0 -418
  366. package/src/runtime/perf/panel-health-monitor.ts +0 -18
  367. package/src/runtime/provider-optimizer-wiring.ts +0 -55
  368. package/src/runtime/reachability-notice.ts +0 -100
  369. package/src/runtime/remote-execution-composition.ts +0 -62
  370. package/src/runtime/session-liveness-marker.ts +0 -257
  371. package/src/runtime/session-pointer-surface.ts +0 -22
  372. package/src/runtime/session-storage-services.ts +0 -41
  373. package/src/runtime/surface-feature-flags.ts +0 -96
  374. package/src/runtime/terminal-output-guard.ts +0 -235
  375. package/src/runtime/trust/workspace-registration.ts +0 -192
  376. package/src/runtime/trust/workspace-trust.ts +0 -229
  377. package/src/runtime/ui/index.ts +0 -39
  378. package/src/runtime/ui/model-picker/data-provider.ts +0 -182
  379. package/src/runtime/ui/model-picker/health-enrichment.ts +0 -231
  380. package/src/runtime/ui/model-picker/index.ts +0 -59
  381. package/src/runtime/ui/model-picker/types.ts +0 -153
  382. package/src/runtime/ui/provider-health/data-provider.ts +0 -244
  383. package/src/runtime/ui/provider-health/fallback-visualizer.ts +0 -71
  384. package/src/runtime/ui/provider-health/index.ts +0 -46
  385. package/src/runtime/ui/provider-health/types.ts +0 -146
  386. package/src/runtime/ui-events.ts +0 -1
  387. package/src/runtime/ui-read-model-helpers.ts +0 -1
  388. package/src/runtime/ui-read-models-observability-maintenance.ts +0 -1
  389. package/src/runtime/ui-read-models-observability-options.ts +0 -1
  390. package/src/runtime/ui-read-models-observability-remote.ts +0 -1
  391. package/src/runtime/ui-read-models-observability-security.ts +0 -1
  392. package/src/runtime/ui-read-models-observability-system.ts +0 -1
  393. package/src/runtime/ui-read-models-observability.ts +0 -1
  394. package/src/runtime/ui-service-queries.ts +0 -1
  395. package/src/runtime/voice-setup-services.ts +0 -98
  396. package/src/runtime/workstream-attempts-validation.ts +0 -77
  397. package/src/runtime/workstream-draft-edits.ts +0 -95
  398. package/src/runtime/workstream-draft-store.ts +0 -274
  399. package/src/runtime/workstream-draft-types.ts +0 -42
  400. package/src/runtime/workstream-services.ts +0 -373
  401. package/src/tools/index.ts +0 -1
  402. package/src/types/grid.ts +0 -48
  403. package/src/types/sql-js.d.ts +0 -15
  404. package/src/work-plans/work-plan-store.ts +0 -702
@@ -1,6 +1,6 @@
1
1
  import { mkdirSync, readFileSync, writeFileSync } from 'node:fs';
2
2
  import { dirname, join, resolve } from 'node:path';
3
- import { atomicWriteFileSync } from '../../config/atomic-write.ts';
3
+ import { atomicWriteFileSync } from '@pellux/goodvibes-sdk/platform/config';
4
4
  import type { CommandRegistry } from '../command-registry.ts';
5
5
  import type { SelectionAction, SelectionItem } from '../selection-modal.ts';
6
6
  import { openCommandPanel, requireServiceRegistry, requireShellPaths } from './runtime-services.ts';
@@ -8,7 +8,7 @@ import type { SessionReturnContextSummary } from '@/runtime/index.ts';
8
8
  import { formatReturnContextForDisplay, getReturnContextMode, maybeAssistReturnContextSummary } from '@/runtime/index.ts';
9
9
  import { requirePanelManager, requireProviderApi, requireSessionManager, requireSurface } from './runtime-services.ts';
10
10
  import { resumeSessionCore, reopenPanelsWithModalSkip, DEFAULT_PANEL_REOPEN_LIMIT } from '../../core/session-resume-core.ts';
11
- import { checkSessionLiveness } from '../../runtime/session-liveness-marker.ts';
11
+ import { checkSessionLiveness } from '@pellux/goodvibes-sdk/platform/runtime/operations';
12
12
  import { summarizeError } from '@pellux/goodvibes-sdk/platform/utils';
13
13
 
14
14
  function parseTranscriptKind(raw: string | undefined): TranscriptEventKind | 'all' {
@@ -15,8 +15,8 @@ import {
15
15
  setManagedSettingLock,
16
16
  type SettingsSyncBundle,
17
17
  } from '@/runtime/index.ts';
18
- import { getProviderIdFromModel } from '../../config/provider-model.ts';
19
- import { type ConfigKey } from '../../config/index.ts';
18
+ import { getProviderIdFromModel } from '@pellux/goodvibes-sdk/platform/providers';
19
+ import { type ConfigKey } from '@pellux/goodvibes-sdk/platform/config';
20
20
  import { CONFIG_KEYS } from '@pellux/goodvibes-sdk/platform/config';
21
21
  import type { CommandRegistry } from '../command-registry.ts';
22
22
  import { openCommandPanel, requireShellPaths } from './runtime-services.ts';
@@ -10,7 +10,7 @@ import {
10
10
  import { logger } from '@pellux/goodvibes-sdk/platform/utils';
11
11
  import { requireShellPaths } from './runtime-services.ts';
12
12
  import { summarizeError } from '@pellux/goodvibes-sdk/platform/utils';
13
- import { calcSessionCost, isModelPriced } from '../../export/cost-utils.ts';
13
+ import { calcSessionCost, isModelPriced } from '@pellux/goodvibes-sdk/platform/providers';
14
14
  import {
15
15
  GistUploadTarget,
16
16
  NO_TOKEN_GUIDANCE,
@@ -1,17 +1,41 @@
1
- import type { CommandRegistry } from '../command-registry.ts';
1
+ /**
2
+ * tasks-runtime.ts — `/tasks`.
3
+ *
4
+ * The reads are a UNION now: this surface's own runtime tasks (the exec, agent
5
+ * and ACP work the loop here spawned) plus the daemon's (scheduled work,
6
+ * channel-driven runs, tasks other surfaces submitted). Before the daemon
7
+ * became its own product one registry held both, and `tasks.list(500)` off the
8
+ * in-process transport answered synchronously. It no longer holds both, so this
9
+ * command crosses a wire and is async — the same shape `/ci` and the fleet act
10
+ * verbs already use.
11
+ *
12
+ * The list output is unchanged for a local-only fleet: same header, same
13
+ * columns, same 20-row cap, same filter semantics. What is added is the daemon
14
+ * half, and one honest line when the daemon could not be reached — a partial
15
+ * list of real tasks beats an error page, but it must not read as complete.
16
+ *
17
+ * Writes do NOT degrade that way. A lifecycle act against a task this terminal
18
+ * does not own is routed to the daemon's verb where one exists (cancel, retry)
19
+ * and refused by name where none does (update, complete, fail, pause and
20
+ * resume have no wire verb). Applying one locally would report success and
21
+ * change nothing on the process that actually runs the task.
22
+ */
23
+ import type { CommandRegistry, CommandContext } from '../command-registry.ts';
2
24
  import type { RuntimeTask, TaskLifecycleState } from '@/runtime/index.ts';
3
25
  import { reviewWorktreeAttachments } from '@/runtime/index.ts';
4
26
  import { requireOperatorClient, requireOpsApi, requirePanelManager, requireShellPaths } from './runtime-services.ts';
27
+ import { createTasksClient, type TasksClient, type UnionTask } from '@pellux/goodvibes-sdk/platform/runtime/client';
28
+ import { createDaemonVerbCaller } from '../../runtime/client/operator-endpoint.ts';
5
29
  import { summarizeError } from '@pellux/goodvibes-sdk/platform/utils';
6
30
 
7
- function sortRuntimeTasks(tasks: RuntimeTask[]): RuntimeTask[] {
31
+ function sortRuntimeTasks(tasks: readonly UnionTask[]): UnionTask[] {
8
32
  const statusOrder: TaskLifecycleState[] = ['running', 'queued', 'blocked', 'failed', 'completed', 'cancelled'];
9
33
  const ranking = new Map(statusOrder.map((status, index) => [status, index] as const));
10
34
  return [...tasks].sort((a, b) => {
11
- const rankDelta = (ranking.get(a.status) ?? 99) - (ranking.get(b.status) ?? 99);
35
+ const rankDelta = (ranking.get(a.task.status) ?? 99) - (ranking.get(b.task.status) ?? 99);
12
36
  if (rankDelta !== 0) return rankDelta;
13
- const aWhen = a.startedAt ?? a.queuedAt;
14
- const bWhen = b.startedAt ?? b.queuedAt;
37
+ const aWhen = a.task.startedAt ?? a.task.queuedAt;
38
+ const bWhen = b.task.startedAt ?? b.task.queuedAt;
15
39
  return bWhen - aWhen;
16
40
  });
17
41
  }
@@ -28,13 +52,38 @@ function summarizeTaskResult(task: RuntimeTask): string {
28
52
  return normalized.length <= 140 ? normalized : `${normalized.slice(0, 137)}...`;
29
53
  }
30
54
 
55
+ /** The union reader: the in-process source plus this workspace's daemon. */
56
+ function tasksClientFor(ctx: CommandContext): TasksClient {
57
+ const operatorClient = requireOperatorClient(ctx);
58
+ return createTasksClient({
59
+ local: {
60
+ list: (limit) => operatorClient.tasks.list(limit),
61
+ get: (taskId) => operatorClient.tasks.get(taskId),
62
+ },
63
+ verbs: createDaemonVerbCaller({
64
+ configManager: ctx.platform.configManager,
65
+ // Lazy, matching getOperatorRpc: a disabled-daemon context with no shell
66
+ // paths wired still gets the honest reason instead of a throw.
67
+ homeDirectory: () => requireShellPaths(ctx).homeDirectory,
68
+ }),
69
+ });
70
+ }
71
+
72
+ /** The five lifecycle acts the operator contract carries no verb for. */
73
+ const LOCAL_ONLY_ACTS = new Set(['update', 'complete', 'fail', 'pause', 'resume']);
74
+
75
+ function refuseDaemonOwnedAct(taskId: string, subcommand: string): string {
76
+ return `${taskId} runs on the daemon, and the operator contract carries no ${subcommand} verb to reach it with. `
77
+ + 'Cancel and retry are available; the rest act on this terminal\'s own tasks.';
78
+ }
79
+
31
80
  export function registerTasksRuntimeCommands(registry: CommandRegistry): void {
32
81
  registry.register({
33
82
  name: 'tasks',
34
83
  aliases: ['task'],
35
84
  description: 'Inspect and control runtime tasks',
36
85
  usage: '[list [status|kind] | show <taskId> | output <taskId> | create <kind> <owner> <title...> | update <taskId> <title|description|result> <value...> | complete <taskId> [result] | fail <taskId> <error...> | cancel <taskId> [note] | pause <taskId> [note] | resume <taskId> [note] | retry <taskId> [note]]',
37
- handler(args, ctx) {
86
+ async handler(args, ctx) {
38
87
  if (args.length === 0) {
39
88
  if (ctx.showPanel) ctx.showPanel('tasks');
40
89
  else {
@@ -46,20 +95,31 @@ export function registerTasksRuntimeCommands(registry: CommandRegistry): void {
46
95
  return;
47
96
  }
48
97
 
49
- const operatorClient = requireOperatorClient(ctx);
50
- const tasks = sortRuntimeTasks([...operatorClient.tasks.list(500)]);
51
98
  const subcommand = args[0]?.toLowerCase() ?? 'list';
99
+ const tasksClient = tasksClientFor(ctx);
52
100
 
53
101
  if (subcommand === 'list') {
102
+ const { tasks: union, daemonUnavailable } = await tasksClient.list(500);
103
+ const tasks = sortRuntimeTasks(union);
54
104
  const filter = args[1]?.toLowerCase();
55
- const filtered = tasks.filter((task) => !filter || task.status === filter || task.kind === filter);
105
+ const filtered = tasks.filter((entry) => !filter || entry.task.status === filter || entry.task.kind === filter);
106
+ // The daemon note rides ALONGSIDE whatever was found rather than
107
+ // replacing it: the local half is real work, and hiding it behind an
108
+ // error would lose tasks that are genuinely running here.
109
+ const daemonNote = daemonUnavailable
110
+ ? [` (the daemon's tasks are not included: ${daemonUnavailable})`]
111
+ : [];
56
112
  if (filtered.length === 0) {
57
- ctx.print(filter ? `No tasks matched "${filter}".` : 'No tasks recorded yet.');
113
+ ctx.print([
114
+ filter ? `No tasks matched "${filter}".` : 'No tasks recorded yet.',
115
+ ...daemonNote,
116
+ ].join('\n'));
58
117
  return;
59
118
  }
60
119
  ctx.print([
61
120
  `Runtime Tasks (${filtered.length})`,
62
- ...filtered.slice(0, 20).map((task) => ` ${task.id} ${task.status.padEnd(9)} ${task.kind.padEnd(11)} ${task.owner} ${task.title}`),
121
+ ...filtered.slice(0, 20).map(({ task }) => ` ${task.id} ${task.status.padEnd(9)} ${task.kind.padEnd(11)} ${task.owner} ${task.title}`),
122
+ ...daemonNote,
63
123
  ].join('\n'));
64
124
  return;
65
125
  }
@@ -70,17 +130,19 @@ export function registerTasksRuntimeCommands(registry: CommandRegistry): void {
70
130
  ctx.print('Usage: /tasks show <taskId>');
71
131
  return;
72
132
  }
73
- const task = operatorClient.tasks.get(taskId);
74
- if (!task) {
133
+ const found = await tasksClient.get(taskId);
134
+ if (!found) {
75
135
  ctx.print(`Unknown task: ${taskId}`);
76
136
  return;
77
137
  }
138
+ const { task, origin } = found;
78
139
  ctx.print([
79
140
  `Task ${task.id}`,
80
141
  ` title: ${task.title}`,
81
142
  ` kind: ${task.kind}`,
82
143
  ` status: ${task.status}`,
83
144
  ` owner: ${task.owner}`,
145
+ ` runs on: ${origin === 'local' ? 'this terminal' : 'the daemon'}`,
84
146
  ` cancellable: ${task.cancellable ? 'yes' : 'no'}`,
85
147
  ` queuedAt: ${new Date(task.queuedAt).toISOString()}`,
86
148
  ` startedAt: ${task.startedAt ? new Date(task.startedAt).toISOString() : 'n/a'}`,
@@ -111,11 +173,12 @@ export function registerTasksRuntimeCommands(registry: CommandRegistry): void {
111
173
  ctx.print('Usage: /tasks output <taskId>');
112
174
  return;
113
175
  }
114
- const task = operatorClient.tasks.get(taskId);
115
- if (!task) {
176
+ const found = await tasksClient.get(taskId);
177
+ if (!found) {
116
178
  ctx.print(`Unknown task: ${taskId}`);
117
179
  return;
118
180
  }
181
+ const { task } = found;
119
182
  const payload = typeof task.result === 'string'
120
183
  ? task.result
121
184
  : task.result !== undefined
@@ -139,6 +202,10 @@ export function registerTasksRuntimeCommands(registry: CommandRegistry): void {
139
202
  ctx.print(`Unknown task kind: ${kind}`);
140
203
  return;
141
204
  }
205
+ // Created HERE on purpose: a task this command creates is one this
206
+ // terminal's loop is expected to drive, so it belongs in the registry
207
+ // that drives it. Submitting work TO the daemon is what /schedule and
208
+ // the channel surfaces do.
142
209
  const task = opsApi.tasks.create({
143
210
  kind: kind as import('@/runtime/index.ts').TaskKind,
144
211
  owner,
@@ -149,58 +216,81 @@ export function registerTasksRuntimeCommands(registry: CommandRegistry): void {
149
216
  return;
150
217
  }
151
218
 
152
- if (subcommand === 'update') {
153
- const opsApi = requireOpsApi(ctx);
154
- const taskId = args[1];
155
- const field = args[2];
156
- const value = args.slice(3).join(' ').trim();
157
- if (!taskId || !field || !value) {
158
- ctx.print('Usage: /tasks update <taskId> <title|description|result> <value...>');
159
- return;
160
- }
161
- if (field !== 'title' && field !== 'description' && field !== 'result') {
162
- ctx.print(`Unsupported task update field: ${field}`);
163
- return;
164
- }
165
- opsApi.tasks.update(taskId, field === 'result' ? { result: value } : { [field]: value });
166
- ctx.print(`Updated task ${taskId} field ${field}.`);
219
+ const taskId = args[1];
220
+ if (!taskId) {
221
+ ctx.print(subcommand === 'update'
222
+ ? 'Usage: /tasks update <taskId> <title|description|result> <value...>'
223
+ : `Usage: /tasks ${subcommand} <taskId> [note]`);
167
224
  return;
168
225
  }
169
226
 
170
- if (subcommand === 'complete') {
171
- const opsApi = requireOpsApi(ctx);
172
- const taskId = args[1];
173
- if (!taskId) {
174
- ctx.print('Usage: /tasks complete <taskId> [result]');
175
- return;
176
- }
177
- const result = args.slice(2).join(' ').trim() || undefined;
178
- opsApi.tasks.complete(taskId, result);
179
- ctx.print(`Completed task ${taskId}.`);
227
+ // Which registry owns this id decides what may be done to it. An act
228
+ // aimed at a daemon task must never be applied to a local record that
229
+ // does not exist — that reports success and changes nothing.
230
+ const found = await tasksClient.get(taskId);
231
+ if (!found) {
232
+ ctx.print(`Unknown task: ${taskId}`);
180
233
  return;
181
234
  }
182
235
 
183
- if (subcommand === 'fail') {
184
- const opsApi = requireOpsApi(ctx);
185
- const taskId = args[1];
186
- const errorText = args.slice(2).join(' ').trim();
187
- if (!taskId || !errorText) {
188
- ctx.print('Usage: /tasks fail <taskId> <error...>');
236
+ if (found.origin === 'daemon') {
237
+ if (LOCAL_ONLY_ACTS.has(subcommand)) {
238
+ ctx.print(refuseDaemonOwnedAct(taskId, subcommand));
239
+ return;
240
+ }
241
+ try {
242
+ switch (subcommand) {
243
+ case 'cancel':
244
+ await tasksClient.cancel(taskId);
245
+ ctx.print(`Cancelled task ${taskId} on the daemon.`);
246
+ return;
247
+ case 'retry':
248
+ await tasksClient.retry(taskId);
249
+ ctx.print(`Re-queued task ${taskId} on the daemon.`);
250
+ return;
251
+ default:
252
+ ctx.print(`Unknown tasks subcommand: ${subcommand}`);
253
+ return;
254
+ }
255
+ } catch (error) {
256
+ ctx.print(summarizeError(error));
189
257
  return;
190
258
  }
191
- opsApi.tasks.fail(taskId, { error: errorText });
192
- ctx.print(`Failed task ${taskId}.`);
193
- return;
194
259
  }
195
260
 
196
- const taskId = args[1];
197
- const note = args.slice(2).join(' ').trim() || undefined;
198
- if (!taskId) {
199
- ctx.print(`Usage: /tasks ${subcommand} <taskId> [note]`);
200
- return;
201
- }
202
261
  const opsApi = requireOpsApi(ctx);
203
262
  try {
263
+ if (subcommand === 'update') {
264
+ const field = args[2];
265
+ const value = args.slice(3).join(' ').trim();
266
+ if (!field || !value) {
267
+ ctx.print('Usage: /tasks update <taskId> <title|description|result> <value...>');
268
+ return;
269
+ }
270
+ if (field !== 'title' && field !== 'description' && field !== 'result') {
271
+ ctx.print(`Unsupported task update field: ${field}`);
272
+ return;
273
+ }
274
+ opsApi.tasks.update(taskId, field === 'result' ? { result: value } : { [field]: value });
275
+ ctx.print(`Updated task ${taskId} field ${field}.`);
276
+ return;
277
+ }
278
+ if (subcommand === 'complete') {
279
+ opsApi.tasks.complete(taskId, args.slice(2).join(' ').trim() || undefined);
280
+ ctx.print(`Completed task ${taskId}.`);
281
+ return;
282
+ }
283
+ if (subcommand === 'fail') {
284
+ const errorText = args.slice(2).join(' ').trim();
285
+ if (!errorText) {
286
+ ctx.print('Usage: /tasks fail <taskId> <error...>');
287
+ return;
288
+ }
289
+ opsApi.tasks.fail(taskId, { error: errorText });
290
+ ctx.print(`Failed task ${taskId}.`);
291
+ return;
292
+ }
293
+ const note = args.slice(2).join(' ').trim() || undefined;
204
294
  switch (subcommand) {
205
295
  case 'cancel':
206
296
  opsApi.tasks.cancel(taskId, note);
@@ -3,29 +3,36 @@
3
3
  * download-verify-swap mechanics are the SDK's canonical update policy
4
4
  * module (platform/runtime/self-update — hoisted from this file's
5
5
  * semantics), the same mechanism the daemon's hourly loop and
6
- * scripts/install.sh follow: one update mechanism everywhere. This file owns
6
+ * the suite installer follow: one update mechanism everywhere. This file owns
7
7
  * only the /update UX: install-kind gating, target selection, and the
8
8
  * printed report.
9
9
  *
10
10
  * Subcommands:
11
11
  * /update [check] — resolve the latest release tag and report
12
12
  * whether this build is already current.
13
- * /update apply — for a binary install (scripts/install.sh),
14
- * download + verify + atomically swap the
15
- * app and daemon binaries, and refresh the
16
- * sqlite-vec native addon in lockstep so the
17
- * vector index never goes stale beside a new
18
- * binary. Every swap parks the outgoing file
19
- * at `<path>.previous`, so the replaced
20
- * version is always kept. For any other
21
- * install kind, prints the exact command to
22
- * run instead — it never attempts a swap it
23
- * can't do safely.
13
+ * /update apply — for a binary install (the curl installer),
14
+ * download + verify + atomically swap THIS
15
+ * app's binary, and refresh the sqlite-vec
16
+ * native addon in lockstep so the vector index
17
+ * never goes stale beside a new binary. Every
18
+ * swap parks the outgoing file at
19
+ * `<path>.previous`, so the replaced version is
20
+ * always kept. For any other install kind,
21
+ * prints the exact command to run instead — it
22
+ * never attempts a swap it can't do safely.
24
23
  * /update rollback — exchange each installed file with its kept
25
24
  * `.previous` counterpart: one command back to
26
25
  * the version that ran before the last update
27
26
  * (and, being an exchange, one more command
28
27
  * forward again).
28
+ *
29
+ * IT DOES NOT UPDATE THE DAEMON. `goodvibes-daemon` used to sit beside this
30
+ * binary as part of the same release, and this command swapped both. The daemon
31
+ * is its own product now, released from its own repository on its own version
32
+ * line, and it updates itself on an hourly loop. A swap from here would fetch
33
+ * an asset this repository's releases do not publish — and if one ever appeared
34
+ * under that name, would overwrite a working daemon with a build from the wrong
35
+ * line. The daemon is a neighbour in the install directory, not cargo.
29
36
  * /update review — install/subscription/sandbox posture,
30
37
  * unrelated to the update mechanics above.
31
38
  * /update bundle export|inspect <path> — portable posture bundle, as before.
@@ -301,8 +308,6 @@ export async function applyUpdate(options: ApplyUpdateOptions): Promise<void> {
301
308
  const baseUrl = releaseDownloadBaseUrl(latestTag);
302
309
  const io = options.io ?? realUpdateFileIo;
303
310
  const appBinaryPath = options.execPath;
304
- const daemonBinaryPath = join(dirname(appBinaryPath), 'goodvibes-daemon');
305
- const daemonBinaryPresent = io.exists(daemonBinaryPath);
306
311
 
307
312
  // The sqlite-vec native addon travels with the binaries: refresh it in the
308
313
  // same download-verify-swap pass so /update never leaves a new binary beside a
@@ -326,9 +331,6 @@ export async function applyUpdate(options: ApplyUpdateOptions): Promise<void> {
326
331
 
327
332
  const targets: UpdateTarget[] = [
328
333
  { label: 'app binary', path: appBinaryPath, assetName: artifacts.app, executable: true },
329
- ...(daemonBinaryPresent
330
- ? [{ label: 'daemon binary', path: daemonBinaryPath, assetName: artifacts.daemon, executable: true }]
331
- : []),
332
334
  ...(addon && addonTargetPath
333
335
  ? [{ label: 'vector addon', path: addonTargetPath, assetName: addon.assetName, executable: false }]
334
336
  : []),
@@ -360,15 +362,14 @@ export async function applyUpdate(options: ApplyUpdateOptions): Promise<void> {
360
362
  [
361
363
  `Updated to ${latestTag}.`,
362
364
  ` app binary: ${appBinaryPath}`,
363
- daemonBinaryPresent
364
- ? ` daemon binary: ${daemonBinaryPath}`
365
- : ` daemon binary: not found at ${daemonBinaryPath} — left untouched`,
366
365
  ...(addonTargetPath ? [` vector addon: ${addonTargetPath}`] : []),
367
366
  '',
368
367
  'Restart goodvibes to run the new version.',
368
+ // Named, not silently omitted: someone who used to see two binaries swap
369
+ // here should read why only one did.
369
370
  serviceInfo.managed
370
- ? `The daemon is managed by systemd — restart it with: ${serviceInfo.restartCommand}`
371
- : 'The daemon restarts automatically the next time goodvibes launches.',
371
+ ? `The daemon updates itself on its own release line — this changed nothing about it (it runs under ${serviceInfo.unitName}.service).`
372
+ : 'The daemon updates itself on its own release line — this changed nothing about it.',
372
373
  ].join('\n'),
373
374
  );
374
375
  }
@@ -387,9 +388,9 @@ export interface RollbackUpdateOptions {
387
388
  /**
388
389
  * One-command rollback to the version that ran before the last update,
389
390
  * delegating the exchange mechanics to the SDK's rollbackKeptPrevious (the
390
- * same module the swap uses): every installed file (app binary, daemon
391
- * binary, vector addon) that has a kept `.previous` counterpart is EXCHANGED
392
- * with it — the previous version becomes live, and the version being rolled
391
+ * same module the swap uses): every installed file this command owns (the app
392
+ * binary and the vector addon) that has a kept `.previous` counterpart is
393
+ * EXCHANGED with it — the previous version becomes live, and the version being rolled
393
394
  * back is itself kept at `.previous`, so a second `/update rollback` rolls
394
395
  * forward again. Files without a kept counterpart are reported and left
395
396
  * untouched; nothing is downloaded.
@@ -408,9 +409,11 @@ export function rollbackUpdate(options: RollbackUpdateOptions): void {
408
409
 
409
410
  const io = options.io ?? realUpdateFileIo;
410
411
  const addon = resolveSqliteVecAsset(options.platform, options.arch);
412
+ // The daemon binary is deliberately absent: this command never replaced it,
413
+ // so it has nothing here to restore. Rolling back a file another product owns
414
+ // would undo an update this app did not perform.
411
415
  const targets = [
412
416
  { label: 'app binary', path: options.execPath },
413
- { label: 'daemon binary', path: join(dirname(options.execPath), 'goodvibes-daemon') },
414
417
  ...(addon ? [{ label: 'vector addon', path: join(dirname(options.execPath), 'lib', addon.dirName, addon.fileName) }] : []),
415
418
  ];
416
419
 
@@ -431,8 +434,8 @@ export function rollbackUpdate(options: RollbackUpdateOptions): void {
431
434
  '',
432
435
  'Restart goodvibes to run the restored version.',
433
436
  serviceInfo.managed
434
- ? `The daemon is managed by systemd — restart it with: ${serviceInfo.restartCommand}`
435
- : 'The daemon restarts automatically the next time goodvibes launches.',
437
+ ? `The daemon was not rolled back — it updates itself on its own release line (it runs under ${serviceInfo.unitName}.service).`
438
+ : 'The daemon was not rolled back — it updates itself on its own release line.',
436
439
  ].join('\n'),
437
440
  );
438
441
  }
@@ -1,6 +1,6 @@
1
1
  import type { CommandRegistry } from '../command-registry.ts';
2
- import type { WorkPlanItemStatus, WorkPlanStore } from '../../work-plans/work-plan-store.ts';
3
- import { WORK_PLAN_STATUSES } from '../../work-plans/work-plan-store.ts';
2
+ import type { WorkPlanItemStatus, WorkPlanStore } from '@pellux/goodvibes-sdk/platform/workflow';
3
+ import { WORK_PLAN_STATUSES } from '@pellux/goodvibes-sdk/platform/workflow';
4
4
  import { openModalCommand } from './runtime-services.ts';
5
5
  import { summarizeError } from '@pellux/goodvibes-sdk/platform/utils';
6
6
 
@@ -23,7 +23,7 @@ import type {
23
23
  import { AttemptError } from '@pellux/goodvibes-sdk/platform/orchestration';
24
24
  import { summarizeError } from '@pellux/goodvibes-sdk/platform/utils';
25
25
  import type { CommandContext } from '../command-registry.ts';
26
- import type { WorkstreamCommandService } from '../../runtime/workstream-services.ts';
26
+ import type { WorkstreamCommandService } from '@pellux/goodvibes-sdk/platform/orchestration';
27
27
  import { requirePanelManager } from './runtime-services.ts';
28
28
  import { describeFailureReason, isTurnBudgetReason } from '../../core/turn-budget-outcome.ts';
29
29
  import { type AttemptGraphItem, renderDependentHoldLines } from './workstream-attempt-dependents.ts';
@@ -26,8 +26,8 @@
26
26
 
27
27
  import { AdaptivePlanner } from '@pellux/goodvibes-sdk/platform/core';
28
28
  import type { CreateWorkstreamInput, PhaseKind, PhaseRole, WorkItem, WorkItemState, Workstream, WorkstreamIsolation } from '@pellux/goodvibes-sdk/platform/orchestration';
29
- import type { WorkstreamCommandService, WorkstreamDraft, WorkstreamDraftProvenance } from '../../runtime/workstream-services.ts';
30
- import { validateAttempts } from '../../runtime/workstream-attempts-validation.ts';
29
+ import type { WorkstreamCommandService, WorkstreamDraft, WorkstreamDraftProvenance } from '@pellux/goodvibes-sdk/platform/orchestration';
30
+ import { validateAttempts } from '@pellux/goodvibes-sdk/platform/orchestration';
31
31
  import { handleAttemptsSubcommand } from './workstream-attempts.ts';
32
32
  import type { CommandContext, CommandRegistry } from '../command-registry.ts';
33
33
  import { describeOperatorRpcError, getOperatorRpc } from './operator-rpc.ts';
@@ -80,6 +80,7 @@ import { registerReviewRuntimeCommands } from './commands/review-runtime.ts';
80
80
  import { registerPaletteRuntimeCommands } from './commands/palette-runtime.ts';
81
81
  import { registerCiRuntimeCommands } from './commands/ci-runtime.ts';
82
82
  import { registerCheckinRuntimeCommands } from './commands/checkin-runtime.ts';
83
+ import { registerHostedRuntimeCommands } from './commands/hosted-runtime.ts';
83
84
  import { registerMailRuntimeCommands } from './commands/mail-runtime.ts';
84
85
  import { registerCalendarRuntimeCommands } from './commands/calendar-runtime.ts';
85
86
  import { registerPrincipalsRuntimeCommands } from './commands/principals-runtime.ts';
@@ -188,6 +189,7 @@ export const BUILTIN_COMMAND_GROUPS: readonly BuiltinCommandGroup[] = [
188
189
  { category: 'Policy', register: (registry) => registry.register(policyCommand) },
189
190
  { category: 'Providers', register: (registry) => registry.register(providerCommand) },
190
191
  { category: 'Eval', register: (registry) => registry.register(evalCommand) },
192
+ { category: 'Sessions & Replay', register: registerHostedRuntimeCommands },
191
193
  { category: 'Sessions & Replay', register: (registry) => registry.register(sessionCommand) },
192
194
  { category: 'Sessions & Replay', register: (registry) => registry.register(resumeCommand) },
193
195
  { category: 'Memory', register: (registry) => registry.register(recallCommand) },
@@ -22,7 +22,7 @@
22
22
  import { FEATURE_SETTINGS } from '@pellux/goodvibes-sdk/platform/runtime/state';
23
23
  import type { FeatureSetting } from '@pellux/goodvibes-sdk/platform/runtime/state';
24
24
  import type { ConfigSetting } from '@pellux/goodvibes-sdk/platform/config';
25
- import { getConfigSchemaSetting } from '../runtime/feature-settings.ts';
25
+ import { getConfigSchemaSetting } from '@pellux/goodvibes-terminal-shell';
26
26
  import type { FlagEntry, SettingEntry, SettingsCategory } from './settings-modal-types.ts';
27
27
 
28
28
  /** Every enablement key — these rows render as feature headers, never as plain sub-rows. */
@@ -11,8 +11,8 @@
11
11
  * already-allocated context before each feed() dispatch.
12
12
  */
13
13
  import type { InputFeedContext } from './handler-feed.ts';
14
- import type { SelectionManager } from './selection.ts';
15
- import type { InfiniteBuffer } from '../core/history.ts';
14
+ import type { SelectionManager } from '@pellux/goodvibes-terminal-shell';
15
+ import type { InfiniteBuffer } from '@pellux/goodvibes-terminal-shell';
16
16
  import type { CommandRegistry, CommandContext } from './command-registry.ts';
17
17
  import type { AutocompleteEngine } from './autocomplete.ts';
18
18
  import type { FilePickerModal } from './file-picker.ts';
@@ -38,7 +38,7 @@ import type { KeybindingsManager } from './keybindings.ts';
38
38
  import type { ModelPickerTarget } from './model-picker.ts';
39
39
  import type { KillRing } from './kill-ring.ts';
40
40
  import type { PanelMouseLayout } from './handler-feed-routes.ts';
41
- import type { FocusTracker } from '../core/focus-tracker.ts';
41
+ import type { FocusTracker } from '@pellux/goodvibes-sdk/platform/runtime/operations';
42
42
  import type { PanelBurstGuardState } from './panel-paste-flood-guard.ts';
43
43
 
44
44
  /**
@@ -1,6 +1,6 @@
1
1
  import { readFileSync, writeFileSync, existsSync } from 'node:fs';
2
2
  import { copyToClipboard, pasteFromClipboard, pasteImageFromClipboard } from '../utils/clipboard.ts';
3
- import type { InfiniteBuffer } from '../core/history.ts';
3
+ import type { InfiniteBuffer } from '@pellux/goodvibes-terminal-shell';
4
4
  import type { BlockMeta, ConversationManager } from '../core/conversation';
5
5
  import type { PermissionCategory } from '@pellux/goodvibes-sdk/platform/permissions';
6
6
  import type { ContentPart } from '@pellux/goodvibes-sdk/platform/providers';
@@ -9,7 +9,7 @@ import type { BookmarkManager } from '@pellux/goodvibes-sdk/platform/bookmarks';
9
9
  import { resolveAndValidatePath } from '@pellux/goodvibes-sdk/platform/utils';
10
10
  import { analyzePermissionRequest } from '@pellux/goodvibes-sdk/platform/permissions';
11
11
  import { logger } from '@pellux/goodvibes-sdk/platform/utils';
12
- import type { SelectionManager } from './selection.ts';
12
+ import type { SelectionManager } from '@pellux/goodvibes-terminal-shell';
13
13
  import { summarizeError } from '@pellux/goodvibes-sdk/platform/utils';
14
14
 
15
15
  export const MARKER_REGEX = /\[(TEXT|IMAGE): [^\]]+\]/g;
@@ -4,7 +4,7 @@ import type { InputHistory } from './input-history.ts';
4
4
  import type { ContentPart } from '@pellux/goodvibes-sdk/platform/providers';
5
5
  import type { CommandRegistry, CommandContext } from './command-registry.ts';
6
6
  import type { AutocompleteEngine } from './autocomplete.ts';
7
- import type { SelectionManager } from './selection.ts';
7
+ import type { SelectionManager } from '@pellux/goodvibes-terminal-shell';
8
8
  import type { WrappedPromptInfo } from './handler-prompt-buffer.ts';
9
9
  import {
10
10
  ensureInputCursorVisible as computeInputScrollTop,
@@ -1,5 +1,5 @@
1
1
  import type { InputToken } from '@pellux/goodvibes-sdk/platform/core';
2
- import type { InfiniteBuffer } from '../core/history.ts';
2
+ import type { InfiniteBuffer } from '@pellux/goodvibes-terminal-shell';
3
3
  import type { CommandContext, CommandRegistry } from './command-registry.ts';
4
4
  import { AutocompleteEngine } from './autocomplete.ts';
5
5
  import { FilePickerModal } from './file-picker.ts';
@@ -40,12 +40,12 @@ import { handleCommandModeToken } from './handler-command-route.ts';
40
40
  import { handleGlobalShortcutToken } from './handler-shortcuts.ts';
41
41
  import type { Panel } from '../panels/types.ts';
42
42
  import { handlePanelIntegrationAction } from './panel-integration-actions.ts';
43
- import { SelectionManager } from './selection.ts';
43
+ import { SelectionManager } from '@pellux/goodvibes-terminal-shell';
44
44
  import type { PanelManager } from '../panels/panel-manager.ts';
45
45
  import type { KeybindingsManager } from './keybindings.ts';
46
46
  import type { ModelPickerTarget } from './model-picker.ts';
47
47
  import type { KillRing } from './kill-ring.ts';
48
- import type { FocusTracker } from '../core/focus-tracker.ts';
48
+ import type { FocusTracker } from '@pellux/goodvibes-sdk/platform/runtime/operations';
49
49
 
50
50
  /**
51
51
  * InputFeedContext — The single long-lived context object passed to feedInputTokens
@@ -1,5 +1,5 @@
1
1
  import type { InputToken } from '@pellux/goodvibes-sdk/platform/core';
2
- import type { InfiniteBuffer } from '../core/history.ts';
2
+ import type { InfiniteBuffer } from '@pellux/goodvibes-terminal-shell';
3
3
  import type { ConversationManager } from '../core/conversation';
4
4
  import type { SelectionResult, SelectionModal } from './selection-modal.ts';
5
5
  import type { BookmarkModal } from './bookmark-modal.ts';
@@ -6,7 +6,7 @@
6
6
  */
7
7
  import { join } from 'node:path';
8
8
  import { summarizeError } from '@pellux/goodvibes-sdk/platform/utils';
9
- import { resolveDaemonCompanionToken } from '../runtime/operator-token-cleanup.ts';
9
+ import { resolveDaemonCompanionToken } from '@pellux/goodvibes-sdk/platform/runtime/operations';
10
10
  import { isLoopbackAddress } from './onboarding/onboarding-wizard-helpers.ts';
11
11
  import {
12
12
  buildManagedDaemonServiceManager,
@@ -22,6 +22,7 @@ import {
22
22
  isRuntimeEndpointActive,
23
23
  runtimePortDiagnostic,
24
24
  } from './onboarding/onboarding-runtime-status.ts';
25
+ import { GOODVIBES_TUI_SURFACE_ROOT } from '../config/surface.ts';
25
26
 
26
27
  /**
27
28
  * Immediately (not deferred to the final wizard Apply):
@@ -60,7 +61,7 @@ export async function handleConnectExistingDaemonForHandler(handler: InputHandle
60
61
  handler.requestRender();
61
62
  try {
62
63
  const daemonHomeDir = join(handler.uiServices.environment.homeDirectory, '.goodvibes', 'daemon');
63
- resolveDaemonCompanionToken(daemonHomeDir, token);
64
+ resolveDaemonCompanionToken(daemonHomeDir, GOODVIBES_TUI_SURFACE_ROOT, token);
64
65
  // hostMode has to move with the host. The control-plane URL is DERIVED from
65
66
  // hostMode/host/port, and 'local' pins the dial target to 127.0.0.1 no
66
67
  // matter what host is stored — so adopting a daemon on another machine
@@ -1,7 +1,7 @@
1
1
  import { createOAuthLocalListener, resolveDaemonEnabled } from '@pellux/goodvibes-sdk/platform/config';
2
2
  import { beginOpenAICodexLogin, exchangeOpenAICodexCode } from '@pellux/goodvibes-sdk/platform/config';
3
3
  import { summarizeError, openExternalUrl } from '@pellux/goodvibes-sdk/platform/utils';
4
- import { getProviderIdFromModel } from '../config/provider-model.ts';
4
+ import { getProviderIdFromModel } from '@pellux/goodvibes-sdk/platform/providers';
5
5
  import { buildProviderAccountSnapshot } from '@/runtime/index.ts';
6
6
  import { enrichProviderAccountsSnapshot } from '../runtime/onboarding/provider-key-capture.ts';
7
7
  import { handleConnectExistingDaemonForHandler, handleMigrateLegacyDaemonServiceForHandler } from './handler-onboarding-daemon-adopt.ts';