@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
@@ -6,11 +6,11 @@ import { fileURLToPath } from 'node:url';
6
6
  import { PlatformServiceManager } from '@pellux/goodvibes-sdk/platform/daemon';
7
7
  import type { ManagedServiceStatus } from '@pellux/goodvibes-sdk/platform/daemon';
8
8
  import { resolveDaemonEnabled } from '@pellux/goodvibes-sdk/platform/config';
9
- import type { ConfigManager } from '../config/index.ts';
10
- import { formatRuntimeEndpointBinding, resolveRuntimeEndpointBinding } from './endpoints.ts';
11
- import type { RuntimeEndpointBinding, RuntimeEndpointId } from './endpoints.ts';
9
+ import type { ConfigManager } from '@pellux/goodvibes-sdk/platform/config';
10
+ import { formatRuntimeEndpointBinding, resolveRuntimeEndpointBinding } from '@pellux/goodvibes-terminal-shell';
11
+ import type { RuntimeEndpointBinding, RuntimeEndpointId } from '@pellux/goodvibes-terminal-shell';
12
12
  import { classifyBindPosture, isNetworkFacing } from './network-posture.ts';
13
- import { redactText } from './redaction.ts';
13
+ import { redactText } from '@pellux/goodvibes-terminal-shell';
14
14
  import { summarizeError } from '@pellux/goodvibes-sdk/platform/utils';
15
15
 
16
16
  export interface CliServiceRuntime {
package/src/cli/status.ts CHANGED
@@ -1,13 +1,13 @@
1
1
  import type { ConfigManager } from '@pellux/goodvibes-sdk/platform/config';
2
2
  import { resolveDaemonEnabled } from '@pellux/goodvibes-sdk/platform/config';
3
3
  import type { OnboardingCheckMarkersState } from '../runtime/onboarding/index.ts';
4
- import { formatRuntimeEndpointBinding, resolveRuntimeEndpointBinding } from './endpoints.ts';
5
- import type { RuntimeEndpointBinding, RuntimeEndpointId } from './endpoints.ts';
4
+ import { formatRuntimeEndpointBinding, resolveRuntimeEndpointBinding } from '@pellux/goodvibes-terminal-shell';
5
+ import type { RuntimeEndpointBinding, RuntimeEndpointId } from '@pellux/goodvibes-terminal-shell';
6
6
  import { classifyBindPosture, isNetworkFacing } from './network-posture.ts';
7
- import type { GoodVibesCliOutputFormat } from './types.ts';
7
+ import type { GoodVibesCliOutputFormat } from '@pellux/goodvibes-terminal-shell';
8
8
  import type { CliServicePosture } from './service-posture.ts';
9
9
  import type { InstallSelfCheckFinding } from '../runtime/install-self-check.ts';
10
- import { getProviderIdFromModel } from '../config/provider-model.ts';
10
+ import { getProviderIdFromModel } from '@pellux/goodvibes-sdk/platform/providers';
11
11
  import { describeConfiguredEffort } from '../providers/reasoning-effort-surface.ts';
12
12
 
13
13
  export interface CliStatusOptions {
@@ -228,10 +228,11 @@ function renderSandboxSection(sandbox: CliSandboxStatus | null): string[] {
228
228
  }
229
229
 
230
230
  /**
231
- * The `Relay:` block — config + feature-flag gate only. This CLI invocation is
232
- * a separate one-shot process from any running daemon, so it cannot read the
233
- * daemon's live in-memory connection state (see /relay status in the TUI for
234
- * that). "active" here means the gate that lets a running daemon register.
231
+ * The `Relay:` block — config + feature-flag gate only. The live registration
232
+ * state lives in the running daemon's memory and no verb exposes it, so no
233
+ * client reads it: this CLI reports the gate, and `/relay status` in the
234
+ * terminal app reports the same gate plus an honest "not readable here" for the
235
+ * live half. "active" means the gate that lets a running daemon register.
235
236
  */
236
237
  function renderRelaySection(relay: CliRelayStatus | null): string[] {
237
238
  if (!relay) return [];
@@ -1,14 +1,14 @@
1
- import type { ConfigKey } from '../config/index.ts';
1
+ import type { ConfigKey } from '@pellux/goodvibes-sdk/platform/config';
2
2
  import {
3
3
  GOODVIBES_NTFY_AGENT_TOPIC,
4
4
  GOODVIBES_NTFY_CHAT_TOPIC,
5
5
  GOODVIBES_NTFY_REMOTE_TOPIC,
6
6
  resolveGoodVibesNtfyTopics,
7
7
  } from '@pellux/goodvibes-sdk/platform/integrations';
8
- import { enableFeatureFlags, getMissingSurfaceFeatureFlags, getServerSurfaceFeatureFlags, surfaceFeatureGateSettingsKeys } from '../runtime/surface-feature-flags.ts';
9
- import { formatRuntimeEndpointBinding, resolveRuntimeEndpointBinding } from './endpoints.ts';
8
+ import { enableFeatureFlags, getMissingSurfaceFeatureFlags, getServerSurfaceFeatureFlags, surfaceFeatureGateSettingsKeys } from '@pellux/goodvibes-sdk/platform/runtime/operations';
9
+ import { formatRuntimeEndpointBinding, resolveRuntimeEndpointBinding } from '@pellux/goodvibes-terminal-shell';
10
10
  import { classifyBindPosture, isNetworkFacing } from './network-posture.ts';
11
- import type { CliCommandRuntime } from './types.ts';
11
+ import type { CliCommandRuntime } from '@pellux/goodvibes-terminal-shell';
12
12
  import {
13
13
  applyTargetEndpointFlagsOrDefault,
14
14
  enableEndpointLanDefault,
@@ -1,17 +1,17 @@
1
1
  import type { CommandContext, CommandRegistry } from '../input/command-registry.ts';
2
2
  import type { InputHandler } from '../input/handler.ts';
3
3
  import type { SelectionItem } from '../input/selection-modal.ts';
4
- import type { WorkspaceRegistrationManager } from '../runtime/trust/workspace-registration.ts';
4
+ import type { WorkspaceRegistrationManager } from '@pellux/goodvibes-sdk/platform/runtime/operations';
5
5
  import { hasResumableWizardProgress, readOnboardingCheckMarker, readWizardProgress } from '../runtime/onboarding/index.ts';
6
6
  import { startOnboardingFastPath } from '../runtime/onboarding/fast-path.ts';
7
7
  import { checkRecoveryForSession, readLastSessionPointer, type SessionSurface } from '@/runtime/index.ts';
8
8
  import { logger } from '@pellux/goodvibes-sdk/platform/utils';
9
- import { writeFatalLine } from '../daemon/fatal-boot-report.ts';
9
+ import { writeFatalLine } from '@pellux/goodvibes-sdk/platform/daemon';
10
10
  import { offerRecoverySnapshot } from '../runtime/recovery-prompt.ts';
11
11
  import { buildRecoveryOfferWiring } from '../runtime/recovery-offer-wiring.ts';
12
12
  import type { ConversationManager } from '../core/conversation.ts';
13
13
  import type { SessionManager } from '@pellux/goodvibes-sdk/platform/sessions';
14
- import type { GoodVibesCliParseResult } from './types.ts';
14
+ import type { GoodVibesCliParseResult } from '@pellux/goodvibes-terminal-shell';
15
15
 
16
16
  export type TuiStartupShellPaths = Parameters<typeof readOnboardingCheckMarker>[0] & {
17
17
  readonly workingDirectory: string;
package/src/cli-flags.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  // Compatibility wrapper for older imports. New CLI code lives in src/cli.
2
- export type { GoodVibesCliFlags as CliFlags } from './cli/types.ts';
2
+ export type { GoodVibesCliFlags as CliFlags } from '@pellux/goodvibes-terminal-shell';
3
3
  export {
4
4
  applyRuntimeConfigDefault,
5
5
  applyRuntimeConfigOverrides,
@@ -14,8 +14,8 @@ export {
14
14
  renderGoodVibesVersion,
15
15
  } from './cli/index.ts';
16
16
 
17
- import { parseGoodVibesCli } from './cli/parser.ts';
18
- import type { GoodVibesCliFlags } from './cli/types.ts';
17
+ import { parseGoodVibesCli } from '@pellux/goodvibes-terminal-shell';
18
+ import type { GoodVibesCliFlags } from '@pellux/goodvibes-terminal-shell';
19
19
 
20
20
  export function parseCliFlags(argv: readonly string[], binary = 'goodvibes'): GoodVibesCliFlags {
21
21
  return parseGoodVibesCli(argv, binary).flags;
@@ -117,8 +117,6 @@ const KNOWN_DYNAMIC_KEYS = [
117
117
  /^featureFlags(?:\.|$)/,
118
118
  /^notifications\.webhookUrls$/,
119
119
  /^wrfc\.gates$/,
120
- // TUI-bridged setting awaiting SDK schema registration (handoff Item 5b)
121
- /^tts\.speed$/,
122
120
  ];
123
121
 
124
122
  export const GOODVIBES_ALLOWED_WRITE_ROOTS = ['tui/', 'daemon/'] as const;
@@ -1,5 +1,5 @@
1
1
  import { isSecretRefInput, isDaemonOwnedConfigKey } from '@pellux/goodvibes-sdk/platform/config';
2
- import type { ConfigKey } from './index.ts';
2
+ import type { ConfigKey } from '@pellux/goodvibes-sdk/platform/config';
3
3
  import type { SecretScope, SecretStorageMedium } from './secrets.ts';
4
4
 
5
5
  export const SECRET_CONFIG_KEYS = new Set<ConfigKey>([
@@ -43,9 +43,9 @@ export const SECRET_CONFIG_KEYS = new Set<ConfigKey>([
43
43
  'surfaces.mattermost.botToken',
44
44
  'surfaces.matrix.accessToken',
45
45
  // TUI-local synthetic sub-keys, one level under the SDK's real `payments`
46
- // section (not yet a scalar CONFIG_SCHEMA entry — same situation as
47
- // tts.speed, behavior.notifyAfterSeconds, etc. in settings-modal-data.ts),
48
- // hence the cast. See input/payments-config.ts for why these are named flat
46
+ // section (not a scalar CONFIG_SCHEMA entry — same situation as
47
+ // behavior.notifyAfterSeconds and the other synthetics in
48
+ // settings-modal-data.ts), hence the cast. See input/payments-config.ts for why these are named flat
49
49
  // (payments.cardNumber, not payments.card.number): a flat one-level leaf is
50
50
  // the shape the real ConfigManager tolerates for an undeclared key.
51
51
  'payments.cardNumber' as ConfigKey,
@@ -147,15 +147,47 @@ export function defaultSecretBackedScope(configKey: ConfigKey): SecretScope {
147
147
  return isDaemonOwnedConfigKey(configKey) ? 'daemon' : 'user';
148
148
  }
149
149
 
150
+ /**
151
+ * How a DAEMON-scoped credential reaches the daemon that will use it.
152
+ *
153
+ * One call, not two: `credentials.set` derives the store key, writes the value,
154
+ * reads it back to verify, and only then points the config key at it. Doing
155
+ * those halves separately from here would leave a window where the config
156
+ * names a reference that resolves to nothing — which every reader treats as a
157
+ * configured-but-broken credential.
158
+ */
159
+ export interface DaemonCredentialWriter {
160
+ set(configKey: string, value: string): Promise<unknown>;
161
+ clear(configKey: string): Promise<void>;
162
+ }
163
+
150
164
  export async function persistSecretBackedConfigValue(
151
165
  configManager: SecretBackedConfigManager,
152
166
  secretsManager: SecretBackedSecretStore | null | undefined,
153
167
  configKey: ConfigKey,
154
168
  rawValue: string,
155
- options: { readonly scope?: SecretScope } = {},
169
+ options: { readonly scope?: SecretScope; readonly daemonWriter?: DaemonCredentialWriter | null | undefined } = {},
156
170
  ): Promise<string> {
157
171
  const update = buildSecretBackedConfigUpdate(configKey, rawValue);
158
172
  const scope = options.scope ?? defaultSecretBackedScope(configKey);
173
+
174
+ // A daemon-scoped credential is the daemon's to store, and the daemon does
175
+ // the whole reference-and-value sequence atomically. This surface neither
176
+ // writes the config key nor the secret in that case — it would be writing
177
+ // both into a tree the daemon never reads.
178
+ if (scope === 'daemon' && options.daemonWriter) {
179
+ const trimmed = rawValue.trim();
180
+ if (trimmed.length === 0) {
181
+ await options.daemonWriter.clear(configKey);
182
+ return '';
183
+ }
184
+ // Already a reference: the caller pasted one rather than a secret, so there
185
+ // is nothing to store — the config value is the whole write.
186
+ if (isSecretReferenceValue(trimmed)) return trimmed;
187
+ await options.daemonWriter.set(configKey, rawValue);
188
+ return update.configValue;
189
+ }
190
+
159
191
  const medium = getSecretWriteMedium(configManager.get('storage.secretPolicy'));
160
192
 
161
193
  // 1. Validate config write first. If setDynamic throws, no secret is written (avoids orphans).
@@ -17,7 +17,7 @@
17
17
  * owned by their real consumer instead of being duplicated in the TUI.
18
18
  */
19
19
 
20
- import type { ConfigManager } from './index.ts';
20
+ import type { ConfigManager } from '@pellux/goodvibes-sdk/platform/config';
21
21
 
22
22
  type RawRecord = Record<string, unknown>;
23
23
 
@@ -22,8 +22,8 @@ import { notifyCompletion } from '@pellux/goodvibes-sdk/platform/utils';
22
22
  import { logger } from '@pellux/goodvibes-sdk/platform/utils';
23
23
  import type { WebhookNotifier } from '@pellux/goodvibes-sdk/platform/integrations';
24
24
  import type { PermissionRequestHandler, PermissionPromptRequest } from '@pellux/goodvibes-sdk/platform/permissions';
25
- import type { FocusTracker } from './focus-tracker.ts';
26
- import { shouldFireAlert, FORCE_NOTIFY_DURATION_MS, type ConfigGet } from './alert-gating.ts';
25
+ import type { FocusTracker } from '@pellux/goodvibes-sdk/platform/runtime/operations';
26
+ import { shouldFireAlert, FORCE_NOTIFY_DURATION_MS, type ConfigGet } from '@pellux/goodvibes-sdk/platform/runtime/operations';
27
27
  import type { TerminalNotifier } from './terminal-notifier.ts';
28
28
 
29
29
  export interface ApprovalAlertDeps {
@@ -22,9 +22,9 @@
22
22
  import { notifyCompletion } from '@pellux/goodvibes-sdk/platform/utils';
23
23
  import { logger } from '@pellux/goodvibes-sdk/platform/utils';
24
24
  import type { WebhookNotifier } from '@pellux/goodvibes-sdk/platform/integrations';
25
- import { calcSessionCost, computeBudgetBreach, isModelPriced } from '../export/cost-utils.ts';
26
- import type { FocusTracker } from './focus-tracker.ts';
27
- import { shouldFireAlert, FORCE_NOTIFY_DURATION_MS, type ConfigGet } from './alert-gating.ts';
25
+ import { calcSessionCost, computeBudgetBreach, isModelPriced } from '@pellux/goodvibes-sdk/platform/providers';
26
+ import type { FocusTracker } from '@pellux/goodvibes-sdk/platform/runtime/operations';
27
+ import { shouldFireAlert, FORCE_NOTIFY_DURATION_MS, type ConfigGet } from '@pellux/goodvibes-sdk/platform/runtime/operations';
28
28
 
29
29
  export interface BudgetBreachUsageSnapshot {
30
30
  readonly input: number;
@@ -11,7 +11,7 @@ import { activeTheme } from '../renderer/theme.ts';
11
11
  import { renderMarkdownTracked } from '../renderer/markdown.ts';
12
12
  import { renderConversationCollapsedFragment, renderConversationEventLine } from '../renderer/conversation-surface.ts';
13
13
  import { GLYPHS } from '../renderer/ui-primitives.ts';
14
- import type { Line } from '../types/grid.ts';
14
+ import type { Line } from '@pellux/goodvibes-sdk/platform/types';
15
15
  import type { BlockMeta } from './conversation-types.ts';
16
16
 
17
17
  /**
@@ -45,7 +45,7 @@
45
45
  * are replayed at the same buffer offsets a cold render would have produced.
46
46
  */
47
47
 
48
- import { createEmptyLine, type Line } from '../types/grid.ts';
48
+ import { createEmptyLine, type Line } from '@pellux/goodvibes-sdk/platform/types';
49
49
  import type { BlockMeta } from './conversation-types.ts';
50
50
  import type { ConversationRenderContext } from './conversation-rendering.ts';
51
51
  import {
@@ -8,7 +8,7 @@
8
8
  * type-only, which is what makes this a leaf of the import graph.
9
9
  */
10
10
 
11
- import type { Line } from '../types/grid.ts';
11
+ import type { Line } from '@pellux/goodvibes-sdk/platform/types';
12
12
  import type { BlockMeta } from './conversation-types.ts';
13
13
  import type { AssistantTurnMembership } from './conversation-turn-structure.ts';
14
14
  import type { SplashOptions } from '../utils/splash-lines.ts';
@@ -7,7 +7,7 @@ import { summarizeToolResult } from '../renderer/tool-result-summary.ts';
7
7
  import type { ToolCall } from '@pellux/goodvibes-sdk/platform/types';
8
8
  import { renderThinkingBlock } from '../renderer/thinking.ts';
9
9
  import { renderSystemMessage } from '../renderer/system-message.ts';
10
- import { createEmptyLine, type Line, type Cell } from '../types/grid.ts';
10
+ import { createEmptyLine, type Line, type Cell } from '@pellux/goodvibes-sdk/platform/types';
11
11
  import { getSplashLines, type SplashOptions } from '../utils/splash-lines.ts';
12
12
  import { interpolateColor, getDisplayWidth, wrapText } from '../utils/terminal-width.ts';
13
13
  import { LAYOUT, TOOL_STATUS } from '../renderer/layout.ts';
@@ -21,7 +21,7 @@ import {
21
21
  type ConversationRenderContext,
22
22
  } from './conversation-render-context.ts';
23
23
  import { renderCompactionContinuationMessage } from './conversation-compaction-render.ts';
24
- import { drawTreeRails, treeIndentCols, treeTextCol } from '../renderer/conversation-tree.ts';
24
+ import { drawTreeRails, treeIndentCols, treeTextCol } from '@pellux/goodvibes-terminal-shell';
25
25
  import {
26
26
  MAX_NEST_DEPTH,
27
27
  buildRenderPlan,
@@ -1,5 +1,5 @@
1
- import { InfiniteBuffer } from './history.ts';
2
- import { createEmptyLine, type Line, type Cell } from '../types/grid.ts';
1
+ import { InfiniteBuffer } from '@pellux/goodvibes-terminal-shell';
2
+ import { createEmptyLine, type Line, type Cell } from '@pellux/goodvibes-sdk/platform/types';
3
3
  import type { SplashOptions } from '../utils/splash-lines.ts';
4
4
  import type { ToolCall, ToolResult } from '@pellux/goodvibes-sdk/platform/types';
5
5
  import type { ProviderMessage, ContentPart } from '@pellux/goodvibes-sdk/platform/providers';
@@ -53,14 +53,14 @@ export type { BlockMeta };
53
53
  import type { ConversationMessageSnapshot } from '@pellux/goodvibes-sdk/platform/core';
54
54
  type Message = ConversationMessageSnapshot;
55
55
 
56
- /** Matches Orchestrator.usage's shape (SDK platform/core/orchestrator.ts). Not
57
- * exported by the SDK as a standalone type, so mirrored here. */
58
- export interface OrchestratorUsageTotals {
59
- input: number;
60
- output: number;
61
- cacheRead: number;
62
- cacheWrite: number;
63
- }
56
+ /**
57
+ * `Orchestrator.usage`'s own type, re-exported under the name this module's
58
+ * callers already use. It was four fields written out here, because the shape
59
+ * was an inferred object literal on the class with no name to import; it has
60
+ * one now.
61
+ */
62
+ import type { OrchestratorUsageTotals } from '@pellux/goodvibes-sdk/platform/core';
63
+ export type { OrchestratorUsageTotals };
64
64
 
65
65
  /**
66
66
  * sumConversationUsage - Fold every assistant message's per-turn usage into
@@ -31,8 +31,8 @@
31
31
  import { notifyCompletion } from '@pellux/goodvibes-sdk/platform/utils';
32
32
  import { logger } from '@pellux/goodvibes-sdk/platform/utils';
33
33
  import type { WebhookNotifier } from '@pellux/goodvibes-sdk/platform/integrations';
34
- import type { FocusTracker } from './focus-tracker.ts';
35
- import { readNotifyOnlyWhenUnfocused, type ConfigGet } from './alert-gating.ts';
34
+ import type { FocusTracker } from '@pellux/goodvibes-sdk/platform/runtime/operations';
35
+ import { readNotifyOnlyWhenUnfocused, type ConfigGet } from '@pellux/goodvibes-sdk/platform/runtime/operations';
36
36
 
37
37
  /** Default threshold in seconds. Turns shorter than this do not notify. */
38
38
  export const NOTIFY_AFTER_SECONDS_DEFAULT = 60;
@@ -19,7 +19,7 @@
19
19
  import type { ConfigManager } from '@pellux/goodvibes-sdk/platform/config';
20
20
  import { GoodVibesSdkError } from '@pellux/goodvibes-sdk';
21
21
  import { resolveOperatorRpc, describeOperatorRpcError } from '../input/commands/operator-rpc.ts';
22
- import { memoryStatusLines, type MemoryGovernorSnapshotResult } from './memory-status.ts';
22
+ import { memoryStatusLines, type MemoryGovernorSnapshotResult } from '@pellux/goodvibes-sdk/platform/runtime/memory';
23
23
 
24
24
  /** The narrow async verb surface the /health memory (doctor) surface drives. */
25
25
  export interface MemoryDiagnosticsGateway {
@@ -14,7 +14,7 @@
14
14
  * status area does not show stale text.
15
15
  */
16
16
 
17
- import type { ConfigManager } from '../config/index.ts';
17
+ import type { ConfigManager } from '@pellux/goodvibes-sdk/platform/config';
18
18
  import { readStatuslineSettings, STATUSLINE_DEFAULT_TIMEOUT_MS, type StatuslineSettings } from '../config/tui-extension-settings.ts';
19
19
 
20
20
  /** Runs the shell command and resolves its raw stdout, or throws on failure/timeout. */
@@ -9,7 +9,7 @@
9
9
  */
10
10
 
11
11
  import type { ConversationMessageSnapshot } from '@pellux/goodvibes-sdk/platform/core';
12
- import type { ConfigManager } from '../config/index.ts';
12
+ import type { ConfigManager } from '@pellux/goodvibes-sdk/platform/config';
13
13
  import { readSessionSettings } from '../config/tui-extension-settings.ts';
14
14
 
15
15
  /** Minimal conversation surface the titler needs. */
@@ -29,8 +29,8 @@
29
29
  import type { SessionManager, SessionMeta } from '@pellux/goodvibes-sdk/platform/sessions';
30
30
  import type { SessionSurface } from '@/runtime/index.ts';
31
31
  import type { ConversationManager } from './conversation.ts';
32
- import { restoreTurnAnchors } from './rewind-turn-anchors.ts';
33
- import { replayJournalForSession, type ReplayIntoConversationResult } from './session-recovery.ts';
32
+ import { restoreTurnAnchors } from '@pellux/goodvibes-sdk/platform/rewind';
33
+ import { replayJournalForSession, type ReplayIntoConversationResult } from '@pellux/goodvibes-sdk/platform/runtime/operations';
34
34
 
35
35
  export interface SessionResumeRuntime {
36
36
  sessionId: string;
@@ -53,11 +53,11 @@ export interface StreamMetrics {
53
53
  */
54
54
  stallEpisode: number;
55
55
  /**
56
- * Populated from the SDK's STREAM_RETRY event when present. SDK 0.35.0 (the
57
- * pinned dependency) has no such event on the TurnEvent union yet — these
58
- * fields are consumed structurally (see looseTurnsFeed below) and stay
59
- * undefined until a future SDK version emits it. Cleared on STREAM_DELTA
60
- * (a byte arriving means the reconnect, if any, succeeded).
56
+ * Populated from the SDK's STREAM_RETRY event, which fires when an in-flight
57
+ * provider call reconnects after a transport error rather than failing the
58
+ * turn. Read structurally off the event feed (see looseTurnsFeed below), so a
59
+ * turn that never retries simply leaves these undefined. Cleared on
60
+ * STREAM_DELTA — a byte arriving means the reconnect succeeded.
61
61
  */
62
62
  reconnectAttempt: number | undefined;
63
63
  reconnectMaxAttempts: number | undefined;
@@ -133,31 +133,16 @@ interface StreamSystemMessageRouter {
133
133
 
134
134
  /**
135
135
  * Loosely-typed variant of the turns event feed, used only to subscribe to
136
- * event names not yet present in the SDK's TurnEvent union (STREAM_RETRY,
137
- * STREAM_STALL — see the structural-consumption comment at the subscription
138
- * site below). `events.turns.on` itself stays fully typed against the real
139
- * TurnEvent union everywhere else in this file.
136
+ * STREAM_STALL — a proposed event the SDK's TurnEvent union does not carry, so
137
+ * `events.turns.on` rejects the name at compile time. See the subscription site
138
+ * below. `events.turns.on` stays fully typed against the real union everywhere
139
+ * else in this file, STREAM_RETRY included.
140
140
  */
141
141
  interface LooseTurnEventFeed {
142
142
  on(type: string, listener: (payload: unknown) => void): () => void;
143
143
  }
144
144
 
145
- /** Payload shape expected from a future SDK STREAM_RETRY event. */
146
- interface StreamRetryLikePayload {
147
- readonly attempt: number;
148
- readonly maxAttempts: number;
149
- }
150
-
151
145
  /** Runtime guard validating an unknown STREAM_RETRY-like payload's shape. */
152
- function isStreamRetryLikePayload(payload: unknown): payload is StreamRetryLikePayload {
153
- return (
154
- typeof payload === 'object' &&
155
- payload !== null &&
156
- typeof (payload as Record<string, unknown>).attempt === 'number' &&
157
- typeof (payload as Record<string, unknown>).maxAttempts === 'number'
158
- );
159
- }
160
-
161
146
  /**
162
147
  * Minimal cost lookup surface for attaching cost-delta information to failover notices.
163
148
  * Returns USD-per-1M-token pricing for the given model ID, or null when the
@@ -708,29 +693,24 @@ export function wireStreamEventMetrics(
708
693
  });
709
694
  unsubs.push(() => stallWatchdog.dispose());
710
695
 
711
- // --- Structural consumption of STREAM_RETRY / STREAM_STALL ---
712
- // Neither event exists on the pinned SDK's (0.35.0) TurnEvent union today —
713
- // both are proposed additions for the transport-level withRetry() callback
714
- // (see the stall-honesty audit brief). The typed `events.turns.on` feed
715
- // rejects unknown event names at compile time, so this casts the feed to a
716
- // loosely-typed variant and validates each payload with a runtime guard
717
- // instead of importing a type name that doesn't exist yet — same pattern
718
- // used elsewhere in this codebase for settings pending SDK schema additions
719
- // (see src/input/settings-modal-data.ts). Compiles today against 0.35.0;
720
- // lights up automatically once the SDK adds the real event.
721
- const looseTurnsFeed = events.turns as unknown as LooseTurnEventFeed;
722
- unsubs.push(looseTurnsFeed.on('STREAM_RETRY', (payload) => {
723
- if (!isStreamRetryLikePayload(payload)) return;
724
- metrics.reconnectAttempt = payload.attempt;
725
- metrics.reconnectMaxAttempts = payload.maxAttempts;
696
+ // A provider call that reconnected mid-stream rather than failing the turn.
697
+ // The attempt counter rides into the thinking fragment so a long silence
698
+ // reads as "retrying 2/3" instead of as a hang; STREAM_DELTA clears it,
699
+ // because a byte arriving means the reconnect worked.
700
+ unsubs.push(events.turns.on('STREAM_RETRY', (event) => {
701
+ metrics.reconnectAttempt = event.attempt;
702
+ metrics.reconnectMaxAttempts = event.maxAttempts;
726
703
  render();
727
704
  }));
705
+ // STREAM_STALL is a proposed SDK event and is not on the TurnEvent union, so
706
+ // the typed feed rejects the name at compile time. Subscribing through the
707
+ // loose variant means the SDK's own signal is observed the day it lands
708
+ // rather than silently dropped. Informational only: the local
709
+ // createStreamStallWatchdog above is the authoritative no-delta detector and
710
+ // already drives the visible indicator via streamMetrics.stallEpisode, so
711
+ // this repaints and does not duplicate or fight it.
712
+ const looseTurnsFeed = events.turns as unknown as LooseTurnEventFeed;
728
713
  unsubs.push(looseTurnsFeed.on('STREAM_STALL', () => {
729
- // Informational only: the TUI's own createStreamStallWatchdog above is
730
- // the authoritative no-delta detector and already drives the visible
731
- // indicator via streamMetrics.stallEpisode. This subscription exists so
732
- // the SDK's own signal (once it lands) is observed rather than silently
733
- // dropped, without duplicating or fighting the local watchdog.
734
714
  render();
735
715
  }));
736
716
 
@@ -27,9 +27,9 @@
27
27
  * positioning is involved, so an OSC 9 emitted between frames is safe.
28
28
  */
29
29
  import { logger } from '@pellux/goodvibes-sdk/platform/utils';
30
- import { allowTerminalWrite } from '../runtime/terminal-output-guard.ts';
31
- import { readBooleanConfig, type ConfigGet } from './alert-gating.ts';
32
- import type { FocusTracker } from './focus-tracker.ts';
30
+ import { allowTerminalWrite } from '@pellux/goodvibes-terminal-shell/terminal-output-guard';
31
+ import { readBooleanConfig, type ConfigGet } from '@pellux/goodvibes-sdk/platform/runtime/operations';
32
+ import type { FocusTracker } from '@pellux/goodvibes-sdk/platform/runtime/operations';
33
33
 
34
34
  export type TerminalNotifySignal = 'approval-wait' | 'turn-end' | 'agent-blocked';
35
35
 
@@ -1,4 +1,4 @@
1
- import type { Orchestrator } from './orchestrator';
1
+ import type { Orchestrator } from '@pellux/goodvibes-sdk/platform/core';
2
2
  import type { SpokenTurnRuntime } from '../audio/spoken-turn-wiring.ts';
3
3
 
4
4
  /**
@@ -2,20 +2,20 @@ import type { UiRuntimeEvents, RuntimeEventBus } from '@/runtime/index.ts';
2
2
  import { buildPersistedSessionContext, persistConversation } from '@/runtime/index.ts';
3
3
  import { buildCompactionReceiptBlock } from './compaction-receipt.ts';
4
4
  import { workstreamFailureNotification } from './workstream-notification.ts';
5
- import { persistTurnAnchors, recordTurnAnchor, summarizeTurnLabel } from './rewind-turn-anchors.ts';
5
+ import { persistTurnAnchors, recordTurnAnchor, summarizeTurnLabel } from '@pellux/goodvibes-sdk/platform/rewind';
6
6
  import { logger } from '@pellux/goodvibes-sdk/platform/utils';
7
7
  import { summarizeError } from '@pellux/goodvibes-sdk/platform/utils';
8
8
  import type { HookDispatcher, HookPhase, HookCategory, HookEventPath } from '@pellux/goodvibes-sdk/platform/hooks';
9
9
  import type { ConversationManager } from './conversation.ts';
10
10
  import type { SessionSurface } from '@/runtime/index.ts';
11
- import { journalPathFor, openTranscriptJournal, type TranscriptJournal } from './transcript-journal.ts';
11
+ import { journalPathFor, openTranscriptJournal, type TranscriptJournal } from '@pellux/goodvibes-sdk/platform/runtime/operations';
12
12
  import type { WebhookNotifier } from '@pellux/goodvibes-sdk/platform/integrations';
13
13
  import { notifyCompletion } from '@pellux/goodvibes-sdk/platform/utils';
14
14
  import { maybeNotifyLongTask, readNotifyAfterSeconds, type LongTaskStatus } from './long-task-notifier.ts';
15
- import type { FocusTracker } from './focus-tracker.ts';
16
- import { shouldFireAlert, FORCE_NOTIFY_DURATION_MS } from './alert-gating.ts';
15
+ import type { FocusTracker } from '@pellux/goodvibes-sdk/platform/runtime/operations';
16
+ import { shouldFireAlert, FORCE_NOTIFY_DURATION_MS } from '@pellux/goodvibes-sdk/platform/runtime/operations';
17
17
  import { createBudgetBreachNotifier, type BudgetBreachNotifier } from './budget-breach-notifier.ts';
18
- import { readBudgetAlertUsd } from '../export/cost-utils.ts';
18
+ import { readBudgetAlertUsd } from '@pellux/goodvibes-sdk/platform/providers';
19
19
 
20
20
  /** Minimal orchestrator surface required by turn-event wiring. */
21
21
  interface TurnOrchestrator {
@@ -1,8 +1,8 @@
1
1
  import type { McpRegistry } from '@pellux/goodvibes-sdk/platform/mcp';
2
2
  import type { ProviderRegistry } from '@pellux/goodvibes-sdk/platform/providers';
3
3
  import type { ConversationManager } from '../core/conversation';
4
- import type { ConfigManager } from '../config/index.ts';
5
- import type { DeepReadonly, GoodVibesConfig } from '../config/index.ts';
4
+ import type { ConfigManager } from '@pellux/goodvibes-sdk/platform/config';
5
+ import type { DeepReadonly, GoodVibesConfig } from '@pellux/goodvibes-sdk/platform/config';
6
6
  import type { ToolRegistry } from '@pellux/goodvibes-sdk/platform/tools';
7
7
  import type { PermissionRequestHandler } from '@pellux/goodvibes-sdk/platform/permissions';
8
8
  import type { SelectionItem, SelectionResult, SelectionAction } from './selection-modal.ts';
@@ -266,7 +266,7 @@ export interface CommandSessionServices {
266
266
  */
267
267
  readonly hydrateSessionUsage?: () => void;
268
268
  /** The orchestration engine's command-facing facade — see runtime/workstream-services.ts. */
269
- readonly workstreamEngine?: import('../runtime/workstream-services.ts').WorkstreamCommandService;
269
+ readonly workstreamEngine?: import('@pellux/goodvibes-sdk/platform/orchestration').WorkstreamCommandService;
270
270
  /** The repo source-tree code index — see runtime/code-index-services.ts. */
271
271
  readonly codeIndexStore?: import('@pellux/goodvibes-sdk/platform/state').CodeIndexStore;
272
272
  /** Tool-site reindex scheduler — `/codebase status` reports its last activity. */
@@ -308,14 +308,14 @@ export interface CommandWorkspaceUiServices {
308
308
  workspaceCheckpointManager?: WorkspaceCheckpointManager;
309
309
  /** In-process gateway catalog — the /review hunk-revert flow invokes checkpoints.revertHunk(Preview) over it. */
310
310
  gatewayMethods?: GatewayMethodCatalog;
311
- workspaceTrustManager?: import('../runtime/trust/workspace-trust.ts').WorkspaceTrustManager;
312
- workspaceRegistrationManager?: import('../runtime/trust/workspace-registration.ts').WorkspaceRegistrationManager;
311
+ workspaceTrustManager?: import('@pellux/goodvibes-sdk/platform/runtime/operations').WorkspaceTrustManager;
312
+ workspaceRegistrationManager?: import('@pellux/goodvibes-sdk/platform/runtime/operations').WorkspaceRegistrationManager;
313
313
  panelManager?: PanelManager;
314
314
  profileManager?: import('@pellux/goodvibes-sdk/platform/profiles').ProfileManager;
315
315
  bookmarkManager?: import('@pellux/goodvibes-sdk/platform/bookmarks').BookmarkManager;
316
316
  projectPlanningService?: import('@pellux/goodvibes-sdk/platform/knowledge').ProjectPlanningService;
317
317
  projectPlanningProjectId?: string;
318
- workPlanStore?: import('../work-plans/work-plan-store.ts').WorkPlanStore;
318
+ workPlanStore?: import('@pellux/goodvibes-sdk/platform/workflow').WorkPlanStore;
319
319
  }
320
320
 
321
321
  export interface CommandWorkspaceServices
@@ -20,7 +20,7 @@
20
20
  import { getBuiltinSetupSchema } from '@pellux/goodvibes-sdk/platform/channels';
21
21
  import type { ChannelSetupFieldDescriptor, ChannelSetupSchema, ChannelSurface } from '@pellux/goodvibes-sdk/platform/channels';
22
22
  import type { CommandContext } from '../command-registry.ts';
23
- import type { ConfigManager, ConfigKey } from '../../config/index.ts';
23
+ import type { ConfigManager, ConfigKey } from '@pellux/goodvibes-sdk/platform/config';
24
24
  import { persistSecretBackedConfigValue } from '../../config/secret-config.ts';
25
25
  import { describeOperatorRpcError, getOperatorRpc } from './operator-rpc.ts';
26
26
 
@@ -12,7 +12,7 @@
12
12
  * shared caller already reports for any non-interactive invocation.
13
13
  */
14
14
  import { resolveDaemonHomeDir } from '@pellux/goodvibes-sdk/platform/workspace';
15
- import { runClusterCommand, CLUSTER_SUBCOMMANDS } from '../../cluster/commands.ts';
15
+ import { runClusterCommand, CLUSTER_SUBCOMMANDS } from '@pellux/goodvibes-terminal-shell';
16
16
  import type { CommandRegistry } from '../command-registry.ts';
17
17
 
18
18
  /** Subcommand → argument hint, surfaced as the operator types. */
@@ -21,7 +21,7 @@
21
21
 
22
22
  import type { CodeIndexStats, CodeContextResult, CodeIndexReindexActivity } from '@pellux/goodvibes-sdk/platform/state';
23
23
  import type { ConfigManager } from '@pellux/goodvibes-sdk/platform/config';
24
- import { isCodeIndexAutoStartEnabled, CODE_INDEX_MAX_FILES, CODE_INDEX_MAX_FILE_BYTES, CODE_INDEX_MAX_TOTAL_BYTES } from '../../runtime/code-index-services.ts';
24
+ import { isCodeIndexAutoStartEnabled, CODE_INDEX_MAX_FILES, CODE_INDEX_MAX_FILE_BYTES, CODE_INDEX_MAX_TOTAL_BYTES } from '@pellux/goodvibes-sdk/platform/runtime/operations';
25
25
  import type { CommandContext, CommandRegistry } from '../command-registry.ts';
26
26
 
27
27
  // ---------------------------------------------------------------------------
@@ -1,5 +1,5 @@
1
1
  import type { CommandContext, CommandRegistry } from '../command-registry.ts';
2
- import { formatDeviceLine, resolveTokenByIdPrefix } from '../../core/pairing-devices.ts';
2
+ import { formatDeviceLine, resolveTokenByIdPrefix } from '@pellux/goodvibes-sdk/platform/pairing';
3
3
 
4
4
  /**
5
5
  * Register the /devices command — manage the per-device pairing tokens minted by