@pellux/goodvibes-tui 0.18.4

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 (732) hide show
  1. package/.goodvibes/GOODVIBES.md +35 -0
  2. package/.goodvibes/agents/reviewer.md +89 -0
  3. package/.goodvibes/skills/add-provider/SKILL.md +199 -0
  4. package/CHANGELOG.md +1681 -0
  5. package/README.md +1607 -0
  6. package/bin/goodvibes +66 -0
  7. package/docs/README.md +32 -0
  8. package/docs/foundation-artifacts/README.md +16 -0
  9. package/docs/foundation-artifacts/knowledge-graphql.graphql +397 -0
  10. package/docs/foundation-artifacts/knowledge-store.sql +183 -0
  11. package/docs/foundation-artifacts/operator-contract.json +55157 -0
  12. package/docs/foundation-artifacts/peer-contract.json +2384 -0
  13. package/package.json +114 -0
  14. package/scripts/postinstall.mjs +203 -0
  15. package/src/acp/connection.ts +447 -0
  16. package/src/acp/index.ts +7 -0
  17. package/src/acp/manager.ts +133 -0
  18. package/src/adapters/bluebubbles/index.ts +127 -0
  19. package/src/adapters/discord/index.ts +297 -0
  20. package/src/adapters/github/index.ts +73 -0
  21. package/src/adapters/google-chat/index.ts +119 -0
  22. package/src/adapters/imessage/index.ts +92 -0
  23. package/src/adapters/index.ts +15 -0
  24. package/src/adapters/matrix/index.ts +116 -0
  25. package/src/adapters/mattermost/index.ts +151 -0
  26. package/src/adapters/msteams/index.ts +180 -0
  27. package/src/adapters/ntfy/index.ts +118 -0
  28. package/src/adapters/signal/index.ts +92 -0
  29. package/src/adapters/slack/index.ts +323 -0
  30. package/src/adapters/telegram/index.ts +160 -0
  31. package/src/adapters/types.ts +97 -0
  32. package/src/adapters/webhook/index.ts +178 -0
  33. package/src/adapters/whatsapp/index.ts +135 -0
  34. package/src/agents/message-bus-core.ts +312 -0
  35. package/src/agents/message-bus.ts +2 -0
  36. package/src/agents/orchestrator-prompts.ts +351 -0
  37. package/src/agents/orchestrator-runner.ts +668 -0
  38. package/src/agents/orchestrator.ts +437 -0
  39. package/src/agents/session.ts +108 -0
  40. package/src/agents/worktree.ts +153 -0
  41. package/src/agents/wrfc-config.ts +47 -0
  42. package/src/agents/wrfc-controller.ts +747 -0
  43. package/src/agents/wrfc-gate-runtime.ts +75 -0
  44. package/src/agents/wrfc-reporting.ts +284 -0
  45. package/src/agents/wrfc-runtime-events.ts +150 -0
  46. package/src/agents/wrfc-types.ts +67 -0
  47. package/src/automation/delivery-manager.ts +368 -0
  48. package/src/automation/index.ts +72 -0
  49. package/src/automation/manager-runtime-delivery.ts +139 -0
  50. package/src/automation/manager-runtime-events.ts +131 -0
  51. package/src/automation/manager-runtime-execution.ts +511 -0
  52. package/src/automation/manager-runtime-helpers.ts +433 -0
  53. package/src/automation/manager-runtime-job-mutations.ts +175 -0
  54. package/src/automation/manager-runtime-reconcile.ts +148 -0
  55. package/src/automation/manager-runtime-scheduling.ts +189 -0
  56. package/src/automation/manager-runtime-sync.ts +54 -0
  57. package/src/automation/manager-runtime.ts +721 -0
  58. package/src/automation/manager.ts +10 -0
  59. package/src/automation/service.ts +242 -0
  60. package/src/channels/builtin/account-actions.ts +490 -0
  61. package/src/channels/builtin/accounts.ts +433 -0
  62. package/src/channels/builtin/contracts.ts +405 -0
  63. package/src/channels/builtin/plugins.ts +308 -0
  64. package/src/channels/builtin/rendering.ts +174 -0
  65. package/src/channels/builtin/setup-schema.ts +504 -0
  66. package/src/channels/builtin/shared.ts +96 -0
  67. package/src/channels/builtin/surfaces.ts +57 -0
  68. package/src/channels/builtin/targets.ts +693 -0
  69. package/src/channels/builtin-runtime.ts +443 -0
  70. package/src/channels/delivery/shared.ts +199 -0
  71. package/src/channels/delivery/strategies-bridge.ts +246 -0
  72. package/src/channels/delivery/strategies-core.ts +299 -0
  73. package/src/channels/delivery/strategies-enterprise.ts +178 -0
  74. package/src/channels/delivery/types.ts +59 -0
  75. package/src/channels/delivery-router.ts +127 -0
  76. package/src/channels/index.ts +77 -0
  77. package/src/channels/plugin-registry.ts +551 -0
  78. package/src/channels/provider-runtime.ts +330 -0
  79. package/src/channels/reply-pipeline.ts +522 -0
  80. package/src/channels/route-manager.ts +340 -0
  81. package/src/channels/surface-registry.ts +186 -0
  82. package/src/config/helper-model.ts +233 -0
  83. package/src/config/index.ts +193 -0
  84. package/src/config/manager.ts +404 -0
  85. package/src/config/secrets.ts +547 -0
  86. package/src/config/service-registry.ts +329 -0
  87. package/src/config/subscription-auth.ts +31 -0
  88. package/src/config/subscription-providers.ts +127 -0
  89. package/src/config/tool-llm.ts +110 -0
  90. package/src/control-plane/approval-broker.ts +351 -0
  91. package/src/control-plane/gateway.ts +713 -0
  92. package/src/control-plane/index.ts +54 -0
  93. package/src/control-plane/media-contract-schemas.ts +208 -0
  94. package/src/control-plane/method-catalog-admin.ts +136 -0
  95. package/src/control-plane/method-catalog-channels.ts +591 -0
  96. package/src/control-plane/method-catalog-control-automation.ts +475 -0
  97. package/src/control-plane/method-catalog-control-core.ts +594 -0
  98. package/src/control-plane/method-catalog-control.ts +8 -0
  99. package/src/control-plane/method-catalog-events.ts +74 -0
  100. package/src/control-plane/method-catalog-knowledge.ts +531 -0
  101. package/src/control-plane/method-catalog-media.ts +279 -0
  102. package/src/control-plane/method-catalog-runtime.ts +304 -0
  103. package/src/control-plane/method-catalog-shared.ts +223 -0
  104. package/src/control-plane/method-catalog.ts +242 -0
  105. package/src/control-plane/operator-contract-schemas-admin.ts +639 -0
  106. package/src/control-plane/operator-contract-schemas-channels.ts +375 -0
  107. package/src/control-plane/operator-contract-schemas-control.ts +226 -0
  108. package/src/control-plane/operator-contract-schemas-domains.ts +4 -0
  109. package/src/control-plane/operator-contract-schemas-knowledge.ts +582 -0
  110. package/src/control-plane/operator-contract-schemas-media.ts +297 -0
  111. package/src/control-plane/operator-contract-schemas-permissions.ts +100 -0
  112. package/src/control-plane/operator-contract-schemas-remote.ts +38 -0
  113. package/src/control-plane/operator-contract-schemas-runtime.ts +563 -0
  114. package/src/control-plane/operator-contract-schemas-shared.ts +85 -0
  115. package/src/control-plane/operator-contract-schemas-telemetry.ts +349 -0
  116. package/src/control-plane/operator-contract-schemas.ts +6 -0
  117. package/src/control-plane/operator-contract.ts +163 -0
  118. package/src/control-plane/session-broker.ts +780 -0
  119. package/src/core/compaction-sections.ts +492 -0
  120. package/src/core/compaction-types.ts +147 -0
  121. package/src/core/composer-state.ts +59 -0
  122. package/src/core/context-compaction.ts +542 -0
  123. package/src/core/conversation-compaction.ts +68 -0
  124. package/src/core/conversation-diff.ts +55 -0
  125. package/src/core/conversation-rendering.ts +343 -0
  126. package/src/core/conversation-utils.ts +72 -0
  127. package/src/core/conversation.ts +775 -0
  128. package/src/core/event-replay.ts +287 -0
  129. package/src/core/orchestrator-context-runtime.ts +407 -0
  130. package/src/core/orchestrator-follow-up-runtime.ts +134 -0
  131. package/src/core/orchestrator-runtime.ts +132 -0
  132. package/src/core/orchestrator-tool-runtime.ts +468 -0
  133. package/src/core/orchestrator-turn-helpers.ts +355 -0
  134. package/src/core/orchestrator-turn-loop.ts +443 -0
  135. package/src/core/orchestrator.ts +733 -0
  136. package/src/core/plan-command-handler.ts +169 -0
  137. package/src/core/system-message-router.ts +210 -0
  138. package/src/core/transcript-events/classify.ts +95 -0
  139. package/src/core/transcript-events/index.ts +15 -0
  140. package/src/daemon/cli.ts +88 -0
  141. package/src/daemon/control-plane.ts +522 -0
  142. package/src/daemon/facade-composition.ts +397 -0
  143. package/src/daemon/facade.ts +638 -0
  144. package/src/daemon/helpers.ts +74 -0
  145. package/src/daemon/http/router-route-contexts.ts +370 -0
  146. package/src/daemon/http/router.ts +531 -0
  147. package/src/daemon/http-listener.ts +301 -0
  148. package/src/daemon/index.ts +3 -0
  149. package/src/daemon/server.ts +1 -0
  150. package/src/daemon/service-manager.ts +413 -0
  151. package/src/daemon/surface-actions.ts +183 -0
  152. package/src/daemon/surface-delivery.ts +530 -0
  153. package/src/daemon/surface-policy.ts +60 -0
  154. package/src/daemon/transport-events.ts +110 -0
  155. package/src/daemon/types.ts +191 -0
  156. package/src/export/markdown.ts +213 -0
  157. package/src/export/session-export.ts +633 -0
  158. package/src/git/index.ts +1 -0
  159. package/src/git/service.ts +414 -0
  160. package/src/hooks/chain-engine.ts +414 -0
  161. package/src/hooks/dispatcher.ts +414 -0
  162. package/src/hooks/hook-api.ts +170 -0
  163. package/src/hooks/index.ts +48 -0
  164. package/src/hooks/runners/agent.ts +93 -0
  165. package/src/hooks/runners/prompt.ts +69 -0
  166. package/src/hooks/workbench.ts +360 -0
  167. package/src/input/autocomplete.ts +96 -0
  168. package/src/input/bookmark-modal.ts +115 -0
  169. package/src/input/command-registry.ts +300 -0
  170. package/src/input/commands/branch-runtime.ts +72 -0
  171. package/src/input/commands/config.ts +515 -0
  172. package/src/input/commands/control-room-runtime.ts +255 -0
  173. package/src/input/commands/conversation-runtime.ts +207 -0
  174. package/src/input/commands/diff-runtime.ts +161 -0
  175. package/src/input/commands/discovery-runtime.ts +45 -0
  176. package/src/input/commands/eval.ts +204 -0
  177. package/src/input/commands/experience-runtime.ts +278 -0
  178. package/src/input/commands/git-runtime.ts +81 -0
  179. package/src/input/commands/guidance-runtime.ts +101 -0
  180. package/src/input/commands/health-runtime.ts +434 -0
  181. package/src/input/commands/hooks-runtime.ts +148 -0
  182. package/src/input/commands/incident-runtime.ts +95 -0
  183. package/src/input/commands/integration-runtime.ts +394 -0
  184. package/src/input/commands/intelligence-runtime.ts +223 -0
  185. package/src/input/commands/knowledge.ts +368 -0
  186. package/src/input/commands/local-auth-runtime.ts +105 -0
  187. package/src/input/commands/local-provider-runtime.ts +170 -0
  188. package/src/input/commands/local-runtime.ts +458 -0
  189. package/src/input/commands/local-setup-review.ts +192 -0
  190. package/src/input/commands/local-setup-transfer.ts +134 -0
  191. package/src/input/commands/local-setup.ts +292 -0
  192. package/src/input/commands/managed-runtime.ts +208 -0
  193. package/src/input/commands/marketplace-runtime.ts +290 -0
  194. package/src/input/commands/mcp-runtime.ts +202 -0
  195. package/src/input/commands/memory-product-runtime.ts +111 -0
  196. package/src/input/commands/memory.ts +151 -0
  197. package/src/input/commands/notify-runtime.ts +83 -0
  198. package/src/input/commands/operator-panel-runtime.ts +141 -0
  199. package/src/input/commands/operator-runtime.ts +392 -0
  200. package/src/input/commands/permissions-runtime.ts +104 -0
  201. package/src/input/commands/planning-runtime.ts +97 -0
  202. package/src/input/commands/platform-access-runtime.ts +422 -0
  203. package/src/input/commands/platform-runtime.ts +6 -0
  204. package/src/input/commands/platform-sandbox-qemu.ts +137 -0
  205. package/src/input/commands/platform-sandbox-runtime.ts +406 -0
  206. package/src/input/commands/platform-sandbox-session.ts +128 -0
  207. package/src/input/commands/platform-services-runtime.ts +246 -0
  208. package/src/input/commands/policy-dispatch.ts +339 -0
  209. package/src/input/commands/policy.ts +17 -0
  210. package/src/input/commands/product-runtime.ts +351 -0
  211. package/src/input/commands/profile-sync-runtime.ts +99 -0
  212. package/src/input/commands/provider-accounts-runtime.ts +113 -0
  213. package/src/input/commands/provider.ts +363 -0
  214. package/src/input/commands/quit-shared.ts +162 -0
  215. package/src/input/commands/recall-bundle.ts +132 -0
  216. package/src/input/commands/recall-capture.ts +152 -0
  217. package/src/input/commands/recall-query.ts +229 -0
  218. package/src/input/commands/recall-review.ts +98 -0
  219. package/src/input/commands/recall-shared.ts +22 -0
  220. package/src/input/commands/remote-runtime-pool.ts +106 -0
  221. package/src/input/commands/remote-runtime-setup.ts +199 -0
  222. package/src/input/commands/remote-runtime.ts +531 -0
  223. package/src/input/commands/replay-runtime.ts +18 -0
  224. package/src/input/commands/runtime-services.ts +279 -0
  225. package/src/input/commands/schedule-runtime.ts +332 -0
  226. package/src/input/commands/services-runtime.ts +207 -0
  227. package/src/input/commands/session-content.ts +408 -0
  228. package/src/input/commands/session-workflow.ts +464 -0
  229. package/src/input/commands/session.ts +376 -0
  230. package/src/input/commands/settings-sync-runtime.ts +173 -0
  231. package/src/input/commands/share-runtime.ts +114 -0
  232. package/src/input/commands/shell-core.ts +320 -0
  233. package/src/input/commands/skills-runtime.ts +221 -0
  234. package/src/input/commands/subscription-runtime.ts +434 -0
  235. package/src/input/commands/tasks-runtime.ts +230 -0
  236. package/src/input/commands/teamwork-runtime.ts +374 -0
  237. package/src/input/commands/teleport-runtime.ts +57 -0
  238. package/src/input/commands/worktree-runtime.ts +137 -0
  239. package/src/input/commands.ts +127 -0
  240. package/src/input/file-picker.ts +192 -0
  241. package/src/input/handler-command-route.ts +106 -0
  242. package/src/input/handler-content-actions.ts +465 -0
  243. package/src/input/handler-feed-routes.ts +541 -0
  244. package/src/input/handler-feed.ts +361 -0
  245. package/src/input/handler-modal-routes.ts +335 -0
  246. package/src/input/handler-modal-stack.ts +237 -0
  247. package/src/input/handler-modal-token-routes.ts +272 -0
  248. package/src/input/handler-picker-routes.ts +416 -0
  249. package/src/input/handler-prompt-buffer.ts +320 -0
  250. package/src/input/handler-shortcuts.ts +195 -0
  251. package/src/input/handler-ui-state.ts +294 -0
  252. package/src/input/handler.ts +798 -0
  253. package/src/input/input-history.ts +267 -0
  254. package/src/input/keybindings.ts +256 -0
  255. package/src/input/model-picker.ts +730 -0
  256. package/src/input/panel-integration-actions.ts +77 -0
  257. package/src/input/profile-picker-modal.ts +222 -0
  258. package/src/input/search.ts +100 -0
  259. package/src/input/selection-modal.ts +163 -0
  260. package/src/input/selection.ts +135 -0
  261. package/src/input/session-picker-modal.ts +136 -0
  262. package/src/input/settings-modal.ts +718 -0
  263. package/src/input/submission-intent.ts +18 -0
  264. package/src/input/submission-router.ts +64 -0
  265. package/src/integrations/index.ts +42 -0
  266. package/src/integrations/notifier.ts +206 -0
  267. package/src/integrations/webhooks.ts +177 -0
  268. package/src/knowledge/consolidation.ts +346 -0
  269. package/src/knowledge/graphql.ts +324 -0
  270. package/src/knowledge/index.ts +60 -0
  271. package/src/knowledge/ingest-compile.ts +386 -0
  272. package/src/knowledge/ingest-context.ts +18 -0
  273. package/src/knowledge/ingest-inputs.ts +387 -0
  274. package/src/knowledge/ingest.ts +20 -0
  275. package/src/knowledge/internal.ts +257 -0
  276. package/src/knowledge/knowledge-api.ts +432 -0
  277. package/src/knowledge/lint.ts +121 -0
  278. package/src/knowledge/memory-sync.ts +62 -0
  279. package/src/knowledge/packet.ts +370 -0
  280. package/src/knowledge/scheduling.ts +283 -0
  281. package/src/knowledge/service.ts +715 -0
  282. package/src/main.ts +798 -0
  283. package/src/mcp/client.ts +383 -0
  284. package/src/mcp/index.ts +12 -0
  285. package/src/mcp/mcp-api.ts +90 -0
  286. package/src/mcp/registry.ts +508 -0
  287. package/src/media/builtin-image-understanding.ts +303 -0
  288. package/src/media/builtin-providers.ts +26 -0
  289. package/src/media/index.ts +18 -0
  290. package/src/multimodal/index.ts +13 -0
  291. package/src/multimodal/service.ts +492 -0
  292. package/src/panels/agent-inspector-panel.ts +515 -0
  293. package/src/panels/agent-inspector-shared.ts +94 -0
  294. package/src/panels/agent-logs-panel.ts +539 -0
  295. package/src/panels/agent-logs-shared.ts +129 -0
  296. package/src/panels/approval-panel.ts +169 -0
  297. package/src/panels/automation-control-panel.ts +253 -0
  298. package/src/panels/base-panel.ts +72 -0
  299. package/src/panels/builtin/agent.ts +88 -0
  300. package/src/panels/builtin/development.ts +111 -0
  301. package/src/panels/builtin/knowledge.ts +26 -0
  302. package/src/panels/builtin/operations.ts +385 -0
  303. package/src/panels/builtin/session.ts +61 -0
  304. package/src/panels/builtin/shared.ts +240 -0
  305. package/src/panels/builtin-panels.ts +23 -0
  306. package/src/panels/cockpit-panel.ts +183 -0
  307. package/src/panels/communication-panel.ts +191 -0
  308. package/src/panels/context-visualizer-panel.ts +199 -0
  309. package/src/panels/control-plane-panel.ts +266 -0
  310. package/src/panels/cost-tracker-panel.ts +444 -0
  311. package/src/panels/debug-panel.ts +432 -0
  312. package/src/panels/diff-panel.ts +518 -0
  313. package/src/panels/docs-panel.ts +283 -0
  314. package/src/panels/eval-panel.ts +399 -0
  315. package/src/panels/file-explorer-panel.ts +556 -0
  316. package/src/panels/file-preview-panel.ts +412 -0
  317. package/src/panels/forensics-panel.ts +364 -0
  318. package/src/panels/git-panel.ts +630 -0
  319. package/src/panels/hooks-panel.ts +274 -0
  320. package/src/panels/incident-review-panel.ts +247 -0
  321. package/src/panels/index.ts +48 -0
  322. package/src/panels/intelligence-panel.ts +176 -0
  323. package/src/panels/knowledge-panel.ts +328 -0
  324. package/src/panels/local-auth-panel.ts +146 -0
  325. package/src/panels/marketplace-panel.ts +223 -0
  326. package/src/panels/mcp-panel.ts +260 -0
  327. package/src/panels/memory-panel.ts +293 -0
  328. package/src/panels/ops-control-panel.ts +184 -0
  329. package/src/panels/ops-strategy-panel.ts +235 -0
  330. package/src/panels/orchestration-panel.ts +254 -0
  331. package/src/panels/panel-list-panel.ts +508 -0
  332. package/src/panels/panel-manager.ts +538 -0
  333. package/src/panels/panel-picker.ts +106 -0
  334. package/src/panels/plan-dashboard-panel.ts +272 -0
  335. package/src/panels/plugins-panel.ts +201 -0
  336. package/src/panels/policy-panel.ts +308 -0
  337. package/src/panels/polish.ts +668 -0
  338. package/src/panels/provider-account-snapshot.ts +259 -0
  339. package/src/panels/provider-accounts-panel.ts +221 -0
  340. package/src/panels/provider-health-domains.ts +211 -0
  341. package/src/panels/provider-health-panel.ts +725 -0
  342. package/src/panels/provider-health-tracker.ts +115 -0
  343. package/src/panels/provider-stats-panel.ts +366 -0
  344. package/src/panels/remote-panel.ts +449 -0
  345. package/src/panels/routes-panel.ts +228 -0
  346. package/src/panels/sandbox-panel.ts +289 -0
  347. package/src/panels/schedule-panel.ts +344 -0
  348. package/src/panels/search-focus.ts +32 -0
  349. package/src/panels/security-panel.ts +329 -0
  350. package/src/panels/services-panel.ts +271 -0
  351. package/src/panels/session-browser-panel.ts +399 -0
  352. package/src/panels/session-maintenance.ts +125 -0
  353. package/src/panels/settings-sync-panel.ts +164 -0
  354. package/src/panels/skills-panel.ts +475 -0
  355. package/src/panels/subscription-panel.ts +273 -0
  356. package/src/panels/symbol-outline-panel.ts +486 -0
  357. package/src/panels/system-messages-panel.ts +224 -0
  358. package/src/panels/tasks-panel.ts +448 -0
  359. package/src/panels/thinking-panel.ts +304 -0
  360. package/src/panels/token-budget-panel.ts +469 -0
  361. package/src/panels/tool-inspector-panel.ts +434 -0
  362. package/src/panels/types.ts +44 -0
  363. package/src/panels/watchers-panel.ts +241 -0
  364. package/src/panels/welcome-panel.ts +64 -0
  365. package/src/panels/worktree-panel.ts +180 -0
  366. package/src/panels/wrfc-panel.ts +480 -0
  367. package/src/permissions/briefs/build.ts +88 -0
  368. package/src/permissions/manager.ts +356 -0
  369. package/src/permissions/prompt.ts +184 -0
  370. package/src/plugins/api.ts +383 -0
  371. package/src/plugins/loader.ts +304 -0
  372. package/src/plugins/manager.ts +481 -0
  373. package/src/profiles/shape.ts +58 -0
  374. package/src/providers/amazon-bedrock-mantle.ts +50 -0
  375. package/src/providers/amazon-bedrock.ts +61 -0
  376. package/src/providers/anthropic-compat.ts +373 -0
  377. package/src/providers/anthropic-sdk-provider.ts +230 -0
  378. package/src/providers/anthropic-vertex.ts +59 -0
  379. package/src/providers/anthropic.ts +469 -0
  380. package/src/providers/auto-register.ts +417 -0
  381. package/src/providers/builtin-catalog.ts +326 -0
  382. package/src/providers/builtin-registry.ts +575 -0
  383. package/src/providers/cache-planner.ts +258 -0
  384. package/src/providers/capabilities.ts +601 -0
  385. package/src/providers/custom-loader.ts +425 -0
  386. package/src/providers/discovered-compat.ts +18 -0
  387. package/src/providers/discovered-factory.ts +61 -0
  388. package/src/providers/discovered-traits.ts +138 -0
  389. package/src/providers/gemini.ts +462 -0
  390. package/src/providers/github-copilot.ts +254 -0
  391. package/src/providers/index.ts +47 -0
  392. package/src/providers/interface.ts +185 -0
  393. package/src/providers/llama-cpp.ts +402 -0
  394. package/src/providers/lm-studio-helpers.ts +367 -0
  395. package/src/providers/lm-studio.ts +484 -0
  396. package/src/providers/model-catalog-cache.ts +221 -0
  397. package/src/providers/model-catalog-notifications.ts +97 -0
  398. package/src/providers/model-catalog-synthetic.ts +202 -0
  399. package/src/providers/model-catalog.ts +211 -0
  400. package/src/providers/model-limits.ts +280 -0
  401. package/src/providers/ollama.ts +469 -0
  402. package/src/providers/openai-codex.ts +472 -0
  403. package/src/providers/openai-compat.ts +615 -0
  404. package/src/providers/openai.ts +231 -0
  405. package/src/providers/optimizer.ts +381 -0
  406. package/src/providers/provider-api.ts +553 -0
  407. package/src/providers/registry-helpers.ts +34 -0
  408. package/src/providers/registry-models.ts +77 -0
  409. package/src/providers/registry-types.ts +67 -0
  410. package/src/providers/registry.ts +729 -0
  411. package/src/providers/runtime-metadata.ts +149 -0
  412. package/src/providers/runtime-snapshot.ts +130 -0
  413. package/src/providers/synthetic.ts +561 -0
  414. package/src/providers/tier-prompts.ts +84 -0
  415. package/src/providers/tool-formats.ts +414 -0
  416. package/src/renderer/agent-detail-modal.ts +285 -0
  417. package/src/renderer/autocomplete-overlay.ts +154 -0
  418. package/src/renderer/block-actions.ts +76 -0
  419. package/src/renderer/bookmark-modal.ts +101 -0
  420. package/src/renderer/bottom-bar.ts +58 -0
  421. package/src/renderer/buffer.ts +34 -0
  422. package/src/renderer/code-block.ts +373 -0
  423. package/src/renderer/compositor.ts +261 -0
  424. package/src/renderer/context-inspector.ts +219 -0
  425. package/src/renderer/conversation-layout.ts +67 -0
  426. package/src/renderer/conversation-overlays.ts +123 -0
  427. package/src/renderer/conversation-surface.ts +260 -0
  428. package/src/renderer/diff-view.ts +132 -0
  429. package/src/renderer/diff.ts +122 -0
  430. package/src/renderer/file-picker-overlay.ts +101 -0
  431. package/src/renderer/file-tree.ts +153 -0
  432. package/src/renderer/git-status.ts +89 -0
  433. package/src/renderer/help-overlay.ts +247 -0
  434. package/src/renderer/history-search-overlay.ts +73 -0
  435. package/src/renderer/layout-engine.ts +97 -0
  436. package/src/renderer/layout.ts +32 -0
  437. package/src/renderer/live-tail-modal.ts +156 -0
  438. package/src/renderer/markdown.ts +777 -0
  439. package/src/renderer/modal-factory.ts +467 -0
  440. package/src/renderer/modal-utils.ts +24 -0
  441. package/src/renderer/model-picker-overlay.ts +396 -0
  442. package/src/renderer/overlay-box.ts +165 -0
  443. package/src/renderer/overlay-viewport.ts +104 -0
  444. package/src/renderer/panel-composite.ts +80 -0
  445. package/src/renderer/panel-picker-overlay.ts +202 -0
  446. package/src/renderer/panel-tab-bar.ts +69 -0
  447. package/src/renderer/panel-workspace-bar.ts +38 -0
  448. package/src/renderer/process-indicator.ts +96 -0
  449. package/src/renderer/process-modal.ts +295 -0
  450. package/src/renderer/profile-picker-modal.ts +129 -0
  451. package/src/renderer/progress.ts +98 -0
  452. package/src/renderer/search-overlay.ts +54 -0
  453. package/src/renderer/selection-modal-overlay.ts +214 -0
  454. package/src/renderer/semantic-diff.ts +369 -0
  455. package/src/renderer/session-picker-modal.ts +127 -0
  456. package/src/renderer/settings-modal.ts +701 -0
  457. package/src/renderer/shell-surface.ts +88 -0
  458. package/src/renderer/surface-layout.ts +101 -0
  459. package/src/renderer/syntax-highlighter.ts +542 -0
  460. package/src/renderer/system-message.ts +83 -0
  461. package/src/renderer/tab-strip.ts +108 -0
  462. package/src/renderer/text-layout.ts +31 -0
  463. package/src/renderer/thinking.ts +17 -0
  464. package/src/renderer/tool-call.ts +233 -0
  465. package/src/renderer/ui-factory.ts +524 -0
  466. package/src/renderer/ui-primitives.ts +96 -0
  467. package/src/runtime/auth/inspection.ts +125 -0
  468. package/src/runtime/bootstrap-background.ts +147 -0
  469. package/src/runtime/bootstrap-command-context.ts +265 -0
  470. package/src/runtime/bootstrap-command-parts.ts +357 -0
  471. package/src/runtime/bootstrap-core.ts +375 -0
  472. package/src/runtime/bootstrap-helpers.ts +88 -0
  473. package/src/runtime/bootstrap-hook-bridge.ts +271 -0
  474. package/src/runtime/bootstrap-runtime-events.ts +254 -0
  475. package/src/runtime/bootstrap-services.ts +197 -0
  476. package/src/runtime/bootstrap-shell.ts +262 -0
  477. package/src/runtime/bootstrap.ts +488 -0
  478. package/src/runtime/compaction/index.ts +90 -0
  479. package/src/runtime/compaction/lifecycle.ts +167 -0
  480. package/src/runtime/compaction/manager.ts +474 -0
  481. package/src/runtime/compaction/quality-score.ts +279 -0
  482. package/src/runtime/compaction/resume-repair.ts +183 -0
  483. package/src/runtime/compaction/strategies/autocompact.ts +65 -0
  484. package/src/runtime/compaction/strategies/boundary-commit.ts +106 -0
  485. package/src/runtime/compaction/strategies/collapse.ts +90 -0
  486. package/src/runtime/compaction/strategies/index.ts +23 -0
  487. package/src/runtime/compaction/strategies/microcompact.ts +74 -0
  488. package/src/runtime/compaction/strategies/reactive.ts +89 -0
  489. package/src/runtime/compaction/types.ts +221 -0
  490. package/src/runtime/context.ts +158 -0
  491. package/src/runtime/diagnostics/actions.ts +776 -0
  492. package/src/runtime/diagnostics/index.ts +99 -0
  493. package/src/runtime/diagnostics/panels/agents.ts +252 -0
  494. package/src/runtime/diagnostics/panels/events.ts +188 -0
  495. package/src/runtime/diagnostics/panels/health.ts +242 -0
  496. package/src/runtime/diagnostics/panels/index.ts +24 -0
  497. package/src/runtime/diagnostics/panels/ops.ts +156 -0
  498. package/src/runtime/diagnostics/panels/policy.ts +176 -0
  499. package/src/runtime/diagnostics/panels/tasks.ts +251 -0
  500. package/src/runtime/diagnostics/panels/tool-calls.ts +267 -0
  501. package/src/runtime/diagnostics/provider.ts +262 -0
  502. package/src/runtime/ecosystem/catalog.ts +606 -0
  503. package/src/runtime/ecosystem/recommendations.ts +117 -0
  504. package/src/runtime/emitters/agents.ts +96 -0
  505. package/src/runtime/emitters/automation.ts +112 -0
  506. package/src/runtime/emitters/communication.ts +53 -0
  507. package/src/runtime/emitters/compaction.ts +161 -0
  508. package/src/runtime/emitters/control-plane.ts +65 -0
  509. package/src/runtime/emitters/deliveries.ts +65 -0
  510. package/src/runtime/emitters/forensics.ts +17 -0
  511. package/src/runtime/emitters/index.ts +59 -0
  512. package/src/runtime/emitters/knowledge.ts +129 -0
  513. package/src/runtime/emitters/mcp.ts +95 -0
  514. package/src/runtime/emitters/ops.ts +163 -0
  515. package/src/runtime/emitters/orchestration.ts +87 -0
  516. package/src/runtime/emitters/permissions.ts +98 -0
  517. package/src/runtime/emitters/planner.ts +23 -0
  518. package/src/runtime/emitters/plugins.ts +78 -0
  519. package/src/runtime/emitters/providers.ts +30 -0
  520. package/src/runtime/emitters/routes.ts +57 -0
  521. package/src/runtime/emitters/security.ts +53 -0
  522. package/src/runtime/emitters/session.ts +93 -0
  523. package/src/runtime/emitters/surfaces.ts +57 -0
  524. package/src/runtime/emitters/tasks.ts +69 -0
  525. package/src/runtime/emitters/tools.ts +140 -0
  526. package/src/runtime/emitters/transport.ts +78 -0
  527. package/src/runtime/emitters/turn.ts +155 -0
  528. package/src/runtime/emitters/ui.ts +57 -0
  529. package/src/runtime/emitters/watchers.ts +57 -0
  530. package/src/runtime/emitters/workflows.ts +79 -0
  531. package/src/runtime/eval/index.ts +48 -0
  532. package/src/runtime/eval/runner.ts +163 -0
  533. package/src/runtime/eval/suites.ts +264 -0
  534. package/src/runtime/events/domain-map.ts +148 -0
  535. package/src/runtime/events/index.ts +194 -0
  536. package/src/runtime/events/turn.ts +60 -0
  537. package/src/runtime/events/workflows.ts +17 -0
  538. package/src/runtime/forensics/collector.ts +693 -0
  539. package/src/runtime/forensics/index.ts +23 -0
  540. package/src/runtime/foundation-clients.ts +78 -0
  541. package/src/runtime/foundation-services.ts +96 -0
  542. package/src/runtime/guidance.ts +183 -0
  543. package/src/runtime/health/effect-handlers.ts +189 -0
  544. package/src/runtime/health/index.ts +70 -0
  545. package/src/runtime/health/wiring.ts +115 -0
  546. package/src/runtime/index.ts +174 -0
  547. package/src/runtime/integration/helpers.ts +640 -0
  548. package/src/runtime/lifecycle.ts +107 -0
  549. package/src/runtime/mcp/index.ts +68 -0
  550. package/src/runtime/mcp/manager.ts +513 -0
  551. package/src/runtime/network/inbound.ts +131 -0
  552. package/src/runtime/network/index.ts +30 -0
  553. package/src/runtime/network/outbound.ts +292 -0
  554. package/src/runtime/network/shared.ts +82 -0
  555. package/src/runtime/operator-client.ts +235 -0
  556. package/src/runtime/ops/control-plane.ts +363 -0
  557. package/src/runtime/ops/index.ts +122 -0
  558. package/src/runtime/ops/playbooks/index.ts +10 -0
  559. package/src/runtime/ops/playbooks/session-unrecoverable.ts +196 -0
  560. package/src/runtime/ops/playbooks/stuck-turn.ts +197 -0
  561. package/src/runtime/ops/runtime-context.ts +100 -0
  562. package/src/runtime/ops-api.ts +27 -0
  563. package/src/runtime/orchestration/spawn-policy.ts +83 -0
  564. package/src/runtime/peer-client.ts +404 -0
  565. package/src/runtime/perf/index.ts +57 -0
  566. package/src/runtime/perf/slo-collector.ts +375 -0
  567. package/src/runtime/permissions/index.ts +190 -0
  568. package/src/runtime/permissions/policy-runtime.ts +175 -0
  569. package/src/runtime/permissions/preflight.ts +101 -0
  570. package/src/runtime/permissions/rule-suggestions.ts +36 -0
  571. package/src/runtime/plugins/hot-reload.ts +221 -0
  572. package/src/runtime/plugins/index.ts +84 -0
  573. package/src/runtime/plugins/lifecycle.ts +95 -0
  574. package/src/runtime/plugins/manager.ts +474 -0
  575. package/src/runtime/plugins/manifest.ts +167 -0
  576. package/src/runtime/plugins/quarantine.ts +202 -0
  577. package/src/runtime/plugins/trust.ts +291 -0
  578. package/src/runtime/plugins/types.ts +205 -0
  579. package/src/runtime/provider-accounts/registry.ts +326 -0
  580. package/src/runtime/remote/distributed-runtime-contract-schemas.ts +386 -0
  581. package/src/runtime/remote/index.ts +488 -0
  582. package/src/runtime/remote/runner-registry.ts +438 -0
  583. package/src/runtime/remote/supervisor.ts +70 -0
  584. package/src/runtime/runtime-hook-api.ts +5 -0
  585. package/src/runtime/runtime-knowledge-api.ts +14 -0
  586. package/src/runtime/runtime-mcp-api.ts +5 -0
  587. package/src/runtime/runtime-ops-api.ts +86 -0
  588. package/src/runtime/runtime-provider-api.ts +18 -0
  589. package/src/runtime/sandbox/backend.ts +291 -0
  590. package/src/runtime/sandbox/manager.ts +364 -0
  591. package/src/runtime/sandbox/provisioning.ts +422 -0
  592. package/src/runtime/sandbox/session-registry.ts +289 -0
  593. package/src/runtime/services.ts +541 -0
  594. package/src/runtime/session-maintenance.ts +188 -0
  595. package/src/runtime/session-persistence.ts +288 -0
  596. package/src/runtime/session-return-context.ts +195 -0
  597. package/src/runtime/settings/control-plane-store.ts +258 -0
  598. package/src/runtime/settings/control-plane.ts +599 -0
  599. package/src/runtime/shell-command-extensions.ts +54 -0
  600. package/src/runtime/shell-command-ops.ts +207 -0
  601. package/src/runtime/shell-command-platform.ts +47 -0
  602. package/src/runtime/shell-command-services.ts +143 -0
  603. package/src/runtime/shell-command-workspace.ts +31 -0
  604. package/src/runtime/store/domains/conversation.ts +181 -0
  605. package/src/runtime/store/domains/domain-read-matrix.ts +17 -0
  606. package/src/runtime/store/domains/index.ts +222 -0
  607. package/src/runtime/store/domains/panels.ts +117 -0
  608. package/src/runtime/store/domains/permissions.ts +143 -0
  609. package/src/runtime/store/domains/ui-perf.ts +103 -0
  610. package/src/runtime/store/helpers/reducers/conversation.ts +228 -0
  611. package/src/runtime/store/helpers/reducers/lifecycle.ts +440 -0
  612. package/src/runtime/store/helpers/reducers/shared.ts +60 -0
  613. package/src/runtime/store/helpers/reducers/sync.ts +555 -0
  614. package/src/runtime/store/helpers/reducers.ts +30 -0
  615. package/src/runtime/store/index.ts +304 -0
  616. package/src/runtime/store/selectors/index.ts +354 -0
  617. package/src/runtime/store/state.ts +137 -0
  618. package/src/runtime/tasks/adapters/acp-adapter.ts +211 -0
  619. package/src/runtime/tasks/adapters/agent-adapter.ts +208 -0
  620. package/src/runtime/tasks/adapters/index.ts +16 -0
  621. package/src/runtime/tasks/adapters/process-adapter.ts +214 -0
  622. package/src/runtime/tasks/adapters/scheduler-adapter.ts +193 -0
  623. package/src/runtime/tasks/index.ts +68 -0
  624. package/src/runtime/tasks/manager.ts +415 -0
  625. package/src/runtime/telemetry/api-helpers.ts +517 -0
  626. package/src/runtime/telemetry/api.ts +768 -0
  627. package/src/runtime/telemetry/index.ts +178 -0
  628. package/src/runtime/telemetry/instrumentation/domain-bridge-agent-session.ts +440 -0
  629. package/src/runtime/telemetry/instrumentation/domain-bridge-plugin-mcp.ts +200 -0
  630. package/src/runtime/telemetry/instrumentation/domain-bridge-shared.ts +18 -0
  631. package/src/runtime/telemetry/instrumentation/domain-bridge-transport-task.ts +204 -0
  632. package/src/runtime/telemetry/instrumentation/domain-bridge.ts +125 -0
  633. package/src/runtime/telemetry/instrumentation/index.ts +67 -0
  634. package/src/runtime/tools/context.ts +114 -0
  635. package/src/runtime/tools/index.ts +46 -0
  636. package/src/runtime/tools/phased-executor.ts +448 -0
  637. package/src/runtime/tools/phases/budget.ts +130 -0
  638. package/src/runtime/tools/phases/execute.ts +69 -0
  639. package/src/runtime/tools/phases/index.ts +13 -0
  640. package/src/runtime/tools/phases/map-output.ts +98 -0
  641. package/src/runtime/tools/phases/permission.ts +133 -0
  642. package/src/runtime/tools/phases/posthook.ts +57 -0
  643. package/src/runtime/tools/phases/prehook.ts +68 -0
  644. package/src/runtime/tools/phases/validate.ts +53 -0
  645. package/src/runtime/transports/direct.ts +73 -0
  646. package/src/runtime/transports/http-helpers.ts +218 -0
  647. package/src/runtime/transports/http-types.ts +364 -0
  648. package/src/runtime/transports/http.ts +629 -0
  649. package/src/runtime/transports/realtime.ts +50 -0
  650. package/src/runtime/transports/remote-events.ts +16 -0
  651. package/src/runtime/transports/shared.ts +39 -0
  652. package/src/runtime/transports/ui-runtime-events.ts +35 -0
  653. package/src/runtime/ui/index.ts +39 -0
  654. package/src/runtime/ui/model-picker/data-provider.ts +182 -0
  655. package/src/runtime/ui/model-picker/health-enrichment.ts +228 -0
  656. package/src/runtime/ui/model-picker/index.ts +59 -0
  657. package/src/runtime/ui/model-picker/types.ts +149 -0
  658. package/src/runtime/ui/provider-health/data-provider.ts +244 -0
  659. package/src/runtime/ui/provider-health/fallback-visualizer.ts +69 -0
  660. package/src/runtime/ui/provider-health/index.ts +46 -0
  661. package/src/runtime/ui/provider-health/types.ts +146 -0
  662. package/src/runtime/ui-events.ts +46 -0
  663. package/src/runtime/ui-read-model-helpers.ts +32 -0
  664. package/src/runtime/ui-read-models-core.ts +95 -0
  665. package/src/runtime/ui-read-models-observability-maintenance.ts +81 -0
  666. package/src/runtime/ui-read-models-observability-options.ts +5 -0
  667. package/src/runtime/ui-read-models-observability-remote.ts +73 -0
  668. package/src/runtime/ui-read-models-observability-security.ts +172 -0
  669. package/src/runtime/ui-read-models-observability-system.ts +217 -0
  670. package/src/runtime/ui-read-models-observability.ts +59 -0
  671. package/src/runtime/ui-read-models-operations.ts +203 -0
  672. package/src/runtime/ui-read-models.ts +61 -0
  673. package/src/runtime/ui-service-queries.ts +114 -0
  674. package/src/runtime/ui-services.ts +163 -0
  675. package/src/runtime/worktree/registry.ts +252 -0
  676. package/src/scripts/process-messages.ts +42 -0
  677. package/src/sessions/manager.ts +388 -0
  678. package/src/shell/blocking-input.ts +89 -0
  679. package/src/shell/ui-openers.ts +163 -0
  680. package/src/state/file-watcher.ts +294 -0
  681. package/src/state/index.ts +56 -0
  682. package/src/state/knowledge-injection.ts +214 -0
  683. package/src/state/memory-embedding-http.ts +642 -0
  684. package/src/state/memory-embeddings.ts +312 -0
  685. package/src/state/memory-ingest.ts +132 -0
  686. package/src/state/memory-registry.ts +111 -0
  687. package/src/state/memory-store-helpers.ts +160 -0
  688. package/src/state/memory-store.ts +728 -0
  689. package/src/state/memory-vector-store.ts +418 -0
  690. package/src/templates/manager.ts +187 -0
  691. package/src/tools/agent/index.ts +610 -0
  692. package/src/tools/agent/manager.ts +476 -0
  693. package/src/tools/analyze/git-modes.ts +380 -0
  694. package/src/tools/analyze/index.ts +128 -0
  695. package/src/tools/channel/agent-tools.ts +16 -0
  696. package/src/tools/channel/index.ts +268 -0
  697. package/src/tools/control/index.ts +90 -0
  698. package/src/tools/edit/core.ts +619 -0
  699. package/src/tools/edit/index.ts +4 -0
  700. package/src/tools/edit/phased.ts +33 -0
  701. package/src/tools/fetch/index.ts +3 -0
  702. package/src/tools/fetch/phased.ts +34 -0
  703. package/src/tools/fetch/runtime.ts +499 -0
  704. package/src/tools/index.ts +186 -0
  705. package/src/tools/mcp/index.ts +190 -0
  706. package/src/tools/remote-trigger/index.ts +130 -0
  707. package/src/tools/repl/index.ts +318 -0
  708. package/src/tools/shared/auto-heal.ts +282 -0
  709. package/src/tools/state/index.ts +688 -0
  710. package/src/tools/web-search/index.ts +38 -0
  711. package/src/tools/write/index.ts +604 -0
  712. package/src/tools/write/phased.ts +41 -0
  713. package/src/types/generated/foundation-client-types.ts +22 -0
  714. package/src/types/sql-js.d.ts +15 -0
  715. package/src/utils/splash-lines.ts +46 -0
  716. package/src/version.ts +17 -0
  717. package/src/watchers/index.ts +11 -0
  718. package/src/watchers/registry.ts +517 -0
  719. package/src/web-search/index.ts +26 -0
  720. package/src/web-search/provider-registry.ts +64 -0
  721. package/src/web-search/providers/brave.ts +100 -0
  722. package/src/web-search/providers/duckduckgo.ts +270 -0
  723. package/src/web-search/providers/exa.ts +77 -0
  724. package/src/web-search/providers/firecrawl.ts +90 -0
  725. package/src/web-search/providers/perplexity.ts +86 -0
  726. package/src/web-search/providers/searxng.ts +88 -0
  727. package/src/web-search/providers/shared.ts +249 -0
  728. package/src/web-search/providers/tavily.ts +90 -0
  729. package/src/web-search/service.ts +142 -0
  730. package/src/widget/index.ts +2 -0
  731. package/src/widget/types.ts +9 -0
  732. package/src/widget/widget.ts +8 -0
package/README.md ADDED
@@ -0,0 +1,1607 @@
1
+ # goodvibes-tui
2
+
3
+ [![CI](https://github.com/mgd34msu/goodvibes-tui/actions/workflows/ci.yml/badge.svg)](https://github.com/mgd34msu/goodvibes-tui/actions/workflows/ci.yml)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5
+ [![Version](https://img.shields.io/badge/version-0.18.4-blue.svg)](https://github.com/mgd34msu/goodvibes-tui)
6
+
7
+ A terminal-native AI coding, operations, automation, knowledge, and integration console with a typed runtime, omnichannel surfaces, structured memory/knowledge, and a raw ANSI renderer.
8
+
9
+ <!-- screenshot -->
10
+
11
+ ---
12
+
13
+ ## Start Here
14
+
15
+ Install from npm:
16
+
17
+ ```sh
18
+ npm install -g @pellux/goodvibes-tui
19
+ goodvibes
20
+ ```
21
+
22
+ Or run from source:
23
+
24
+ ```sh
25
+ git clone https://github.com/mgd34msu/goodvibes-tui.git
26
+ cd goodvibes-tui
27
+ bun install
28
+ export OPENAI_API_KEY=...
29
+ bun run dev
30
+ ```
31
+
32
+ Common entrypoints:
33
+
34
+ - `bun run dev` — run the TUI from source
35
+ - `bun run daemon` — run the headless daemon/API host from source
36
+ - `bun run build` — compile the TUI entrypoint into `dist/goodvibes`
37
+ - `./dist/goodvibes` — run the compiled TUI binary
38
+
39
+ Release distribution:
40
+
41
+ - GitHub Releases are the primary distribution path for compiled binaries
42
+ - `npm install -g @pellux/goodvibes-tui` is supported on Linux, macOS, and WSL by downloading the matching prebuilt release binary during install
43
+ - native Windows is not supported; use WSL on Windows
44
+
45
+ Common paths:
46
+
47
+ - global settings: `~/.goodvibes/tui/settings.json`
48
+ - project settings: `.goodvibes/tui/settings.json`
49
+ - secure secrets: `~/.goodvibes/tui/secrets.enc` or `.goodvibes/tui/secrets.enc`
50
+ - compatibility secrets: `~/.goodvibes/goodvibes.secrets.json`
51
+ - services: `.goodvibes/tui/services.json`
52
+ - custom providers: `~/.goodvibes/tui/providers/*.json`
53
+ - schedules: `.goodvibes/tui/schedules.json`
54
+ - direct TLS certs: `~/.goodvibes/tui/certs/fullchain.pem` and `~/.goodvibes/tui/certs/privkey.pem`
55
+
56
+ Deployment shapes:
57
+
58
+ - local TUI only
59
+ - TUI with in-process daemon/API host
60
+ - source-run headless daemon/API host
61
+ - omnichannel runtime with Slack, Discord, Telegram, webhook, Teams, Matrix, and other surfaces
62
+ - remote peer/node-host runtime for distributed execution
63
+
64
+ Typical workflows:
65
+
66
+ - code inside the TUI with `read`, `edit`, `find`, `analyze`, `exec`, and live control-room visibility
67
+ - expose the daemon/API host for browser-based operator access, channels, webhooks, and future external clients
68
+ - consume the daemon/API host through stable typed contract artifacts and shared transport seams that back external SDK and companion-app clients
69
+ - ingest URLs, bookmarks, docs, spreadsheets, and artifacts into the structured knowledge system for later retrieval
70
+ - dispatch and review work across remote peers and node-host runners
71
+
72
+ The compiled binary is the TUI entrypoint built from `src/main.ts`. When `danger.daemon` and/or `danger.httpListener` are enabled, that same binary starts the daemon and HTTP listener in-process. `bun run daemon` uses the separate headless daemon entrypoint from source.
73
+
74
+ Inbound TLS can run in `off`, `proxy`, or `direct` mode. Direct mode defaults to the certificate files above unless explicit paths are configured. Outbound HTTPS trust uses Bun’s bundled roots by default and can be extended or replaced with custom CA files/directories for internal or enterprise endpoints. Operator auth now supports bearer headers and local session cookies across REST, SSE, and control-plane WebSocket flows.
75
+
76
+ ---
77
+
78
+ ## Documentation
79
+
80
+ - [Docs index](docs/README.md)
81
+ - [Getting started](docs/getting-started.md)
82
+ - [Deployment and services](docs/deployment-and-services.md)
83
+ - [Providers and routing](docs/providers-and-routing.md)
84
+ - [Knowledge, artifacts, and multimodal](docs/knowledge-artifacts-and-multimodal.md)
85
+ - [Channels, remote runtime, and API](docs/channels-remote-and-api.md)
86
+ - [Tools and commands](docs/tools-and-commands.md)
87
+ - [Release and publishing](docs/release-and-publishing.md)
88
+ - [Foundation artifacts](docs/foundation-artifacts/README.md)
89
+
90
+ ---
91
+
92
+ ## What is this
93
+
94
+ goodvibes-tui is a terminal-native product for coding, operations, automation, knowledge work, and integrations. The codebase is built around:
95
+
96
+ - terminal-native rendering
97
+ - Unicode-rich, cell-accurate UI primitives
98
+ - compact, token-efficient transcript behavior
99
+ - operator-facing control rooms for non-conversational state
100
+ - explicit runtime visibility for permissions, routing, health, remote execution, knowledge, and orchestration
101
+ - backend-first external surfaces for channels, future web clients, automation, and remote peers
102
+
103
+ The interface is rendered directly to the alternate screen buffer with raw ANSI escape sequences. Conversation, panels, modals, overlays, and the footer all share the same renderer foundation.
104
+
105
+ The runtime is organized around typed store domains, typed runtime events, a shared control plane for permissions and orchestration, and product surfaces for reviewing and repairing state. Agents run in-process with isolated histories, scoped tools, and optional worktrees. Operational state such as provider routing, local auth, daemon/gateway posture, channels, search, artifacts, structured knowledge, multimodal analysis, remote sessions, settings control-plane state, and task execution is routed into dedicated panels and APIs.
106
+
107
+ The TUI now consumes the extracted `@pellux/goodvibes-sdk` platform layer for shared contracts, daemon route surfaces, transports, remote runtime contracts, and other reusable runtime code. The repo keeps the terminal UI, host wiring, and product-specific composition while future surfaces consume the same SDK-backed runtime foundation.
108
+
109
+ ---
110
+
111
+ ## Features
112
+
113
+ ### Multi-Provider Models And Routing
114
+ - Native OpenAI, Anthropic, OpenAI Codex, Gemini, InceptionLabs, Amazon Bedrock, Amazon Bedrock Mantle, Anthropic Vertex, and GitHub Copilot support plus a broad OpenAI-compatible/gateway layer
115
+ - Dynamic model catalog with benchmark metadata, provider auto-registration, custom provider JSON, and hot-reload
116
+ - Interactive model and provider pickers with family, capability, availability, and tier filtering
117
+ - Synthetic-provider failover that preserves free / paid / subscription boundaries
118
+ - Provider account control room with route posture, auth freshness, fallback risk, and recovery actions
119
+
120
+ ### Terminal-Native UI System
121
+ - Raw ANSI renderer with direct terminal control
122
+ - Shared Unicode glyph primitives for borders, cursors, meters, markers, and selection states
123
+ - Conversation, panels, and modals built on the same low-level renderer
124
+ - Width-aware overlays, stable bottom docking above the prompt, half-height message surfaces, and structured footer layers
125
+ - Shared panel workspace layout budgeting with renderer-owned visible-row budgets
126
+ - Copy/selection logic that strips decorative gutters and visual scaffolding from clipboard output
127
+
128
+ ### Conversation And Transcript Workflow
129
+ - Markdown rendering, syntax highlighting, inline diffs, collapsible blocks, bookmarks, block copy, and block save
130
+ - Transcript event navigation by family for operational browsing of long sessions
131
+ - Search overlays, compact line-number modes (`all`, `code`, `off`), and block-level collapse/expand
132
+ - Presentation routing for non-conversational runtime chatter into control-room panels
133
+ - Tracked assistant-message rendering that supports markdown tables, including tolerant handling of slightly malformed LLM-generated separator rows
134
+
135
+ ### Panels, Control Rooms, And Workspaces
136
+ - Split-pane panel system with panel picker, layout control, and keyboard-first focus behavior
137
+ - Dedicated control rooms for provider accounts, provider health, local auth, settings sync, remote, MCP, marketplace, orchestration, tasks, intelligence, worktrees, approvals, forensics, security, policy, cockpit, system messages, and more
138
+ - Summary-first heavy panels with posture, issues, next actions, and detail regions
139
+ - Routed system-message workspace for startup discovery and operational notices
140
+ - Cross-panel actions between Explorer, Preview, and Symbols so file browsing can open previews and jump to symbol locations directly from panel focus
141
+ - Live panels stay subscribed while open, so agent, tool, and thinking updates continue while the panel is visible
142
+ - Dedicated `Agents` panel provides a view-only live peek into running agent sessions while the background-process strip remains the fast-access surface below the prompt
143
+
144
+ ### Modal And Selection UX
145
+ - Modal stack navigation that unwinds correctly back to the slash-command menu and prior nested modals
146
+ - Search/list focus ownership in searchable modals, so typing only targets filter input when that row is actually focused
147
+ - Toggleable selection-modal behavior with `Space` / `Enter` for primary actions, `Left` / `Right` for booleans, enums, and numeric adjustments, and `Shift+Left` / `Shift+Right` for step-by-10 number changes
148
+ - Slash-command menu close behavior that fully clears command mode and prompt state on `Esc`
149
+
150
+ ### Token And Usage Visibility
151
+ - Live thinking-strip token output that continues to advance even when visible response streaming is disabled
152
+ - Fresh-input versus cached-context accounting in the footer and token surfaces, so request counts separate new input from cache-read context while the context bar still reflects the full prompt footprint
153
+ - Reasoning-heavy OpenAI/OpenAI-compatible streams advance live token/output indicators for reasoning-delta providers
154
+
155
+ ### Agents, Tasks, And WRFC
156
+ - In-process agents with isolated history, scoped tools, optional worktrees, and structured communication lanes
157
+ - Archetype registry that supports built-ins and user-defined markdown archetypes
158
+ - Task lifecycle tracking across exec, agent, MCP, plugin, integration, daemon, scheduler, and ACP work
159
+ - Automated WRFC loops with review/fix/check chains, configurable gates, and explicit evidence in completion reports
160
+ - Built-in planning/strategy layer with execution plans, adaptive plan modes, and status/explain/override controls
161
+
162
+ ### Tools And Intelligence
163
+ - Built-in native tools include `read`, `write`, `edit`, `find`, `exec`, `fetch`, `web-search`, `analyze`, `inspect`, `agent`, `state`, `workflow`, `registry`, `task`, `team`, `worklist`, `mcp`, `packet`, `query`, `remote`, `repl`, `control`, and `channel`
164
+ - Native file tooling with notebook-aware read/write/edit, AST-aware editing, validation hooks, undo, and compact output shaping
165
+ - Sandbox-backed REPL/eval tooling with bounded JavaScript, TypeScript, Python, SQL, and GraphQL runtimes plus persisted REPL history
166
+ - Durable memory plus a structured knowledge backend with connectors, extractors, projection rendering, GraphQL, consolidation, and task-time packet injection
167
+ - Provider-backed web search with DuckDuckGo default plus SearXNG, Brave, Exa, Firecrawl, Tavily, and Perplexity adapters
168
+ - Artifact/file runtime for ingesting, storing, delivering, and reusing documents, images, audio, video, spreadsheets, JSON, markdown, and generated outputs
169
+ - Unified multimodal analysis runtime that routes images through media understanding, audio through STT, documents through TS extractors, and video through keyframe/transcript fusion
170
+ - Language intelligence with bundled LSP servers, tree-sitter grammars, diagnostics, symbols, references, hover, and outline support
171
+ - Intelligence control room with readiness, workflow entry points, and recovery guidance
172
+
173
+ ### Security, Auth, And Operational Controls
174
+ - Prompt / allow-all / custom permission modes with layered evaluation and risk analysis
175
+ - Policy bundle loading, signing, verification, divergence simulation, and rule-suggestion flows for permission changes
176
+ - Secure-secret hierarchy with `preferred_secure` storage policy by default
177
+ - Local daemon/listener auth with bootstrap credentials, local user management, password rotation, session revocation, bearer-or-cookie operator auth, and review surfaces
178
+ - Config-gated private-host remote fetches for multimodal and knowledge ingest so internal-network URL access is explicit instead of ambient
179
+ - Health, policy, security, and setup control surfaces for reviewing and repairing runtime posture
180
+
181
+ ### Ecosystem, MCP, And Remote
182
+ - Curated marketplace, plugin trust model, quarantine engine, rollback flows, recommendations, and product-control commands
183
+ - MCP lifecycle with trust posture, quarantine, reconnect behavior, repair flows, and tool projection into the main registry
184
+ - Distributed peer/node-host runtime with pairing, scoped tokens, work pull/complete flows, replay/review artifacts, and operator-facing remote inspection/recovery surfaces
185
+
186
+ ### Runtime Foundations
187
+ - Typed runtime store and typed runtime-event system with domain-specific dispatch
188
+ - Bootstrap composition root with explicit initialization order
189
+ - App-scoped runtime service graph with explicit operator and peer contract ownership instead of ambient singleton wiring
190
+ - Stable operator and peer client surfaces with direct, HTTP, SSE, and WebSocket transports for future terminal, web, and mobile shells
191
+ - Checked-in foundation artifacts for the operator contract, peer contract, canonical knowledge GraphQL schema, and canonical knowledge SQL schema under [`docs/foundation-artifacts`](docs/foundation-artifacts/README.md)
192
+ - Reference in-process and HTTP consumer examples under [`examples/reference-operator-client`](examples/reference-operator-client/README.md), [`examples/reference-http-client`](examples/reference-http-client/README.md), and [`examples/reference-node-host`](examples/reference-node-host/README.md)
193
+ - Explicit session submit/steer/follow-up semantics with lifecycle-state tracking, correlation/causation IDs, return-context summaries, knowledge capture, compaction, guidance, diagnostics, notifications, retention, idempotency, and integration-helper APIs
194
+ - Feature flags, profiles, profile sync bundles, live settings editing, and UI routing controls for system / operational / WRFC messages
195
+ - Performance budgets, panel-health contracts, telemetry exporters, and operator playbooks for stuck turns, reconnect failures, permission deadlocks, plugin degradation, and recovery scenarios
196
+
197
+ ### Evaluation, Replay, And Incident Analysis
198
+ - Evaluation harness with built-in suites, baselines, scorecards, and regression gates
199
+ - Deterministic replay tooling with load / step / seek / diff / export flows
200
+ - Forensics collector and registry with incident bundles, replay mismatch evidence, root-cause summaries, and export/capture flows
201
+ - State inspector and telemetry substrate with transition logs, time-travel buffers, hotspot sampling, and local ledger exporters
202
+
203
+ ### Integrations, Notifications, And Delivery
204
+ - Omnichannel delivery/runtime surfaces for `web`, `slack`, `discord`, `ntfy`, `webhook`, `telegram`, `google-chat`, `signal`, `whatsapp`, `imessage`, `msteams`, `bluebubbles`, `mattermost`, and `matrix`
205
+ - Shared reply pipeline for progress, reasoning, tool output, and final replies across TUI, web, webhook, and channel-native surfaces
206
+ - GitHub automation webhook plus daemon/gateway surfaces for future web clients, companion apps, and remote node/device peers
207
+ - Delivery queue, dead-letter handling, delivery classification, and notification routing policies
208
+ - Local notification/webhook front doors plus portable remote/session handoff bundles
209
+ - Optional voice surface, TTS/STT/realtime providers, and teleport bundle workflows for adjacent operator experiences
210
+ - Managed hook workflows, contract inspection, hook simulation, and cron-like scheduled agent tasks
211
+
212
+ ---
213
+
214
+ ## Supported Providers & Models
215
+
216
+ Models are sourced dynamically from [models.dev](https://models.dev). The model catalog is larger than the built-in runtime list below; the tables here describe the provider/search/voice/media surfaces shipped in source today.
217
+
218
+ ### Native chat/runtime providers
219
+
220
+ | Provider | Type | Notes |
221
+ |----------|------|-------|
222
+ | `openai` | Native | GPT-4/GPT-5 family, tool calling, TTS/STT/realtime voice coverage |
223
+ | `anthropic` | Native | Claude family |
224
+ | `openai-codex` | Native | OpenAI subscription/Codex path |
225
+ | `gemini` | Native | Gemini family, chat + embeddings |
226
+ | `inceptionlabs` | OpenAI-compat | Inception/Mercury models |
227
+ | `amazon-bedrock` | Native | Direct Bedrock route |
228
+ | `amazon-bedrock-mantle` | Native | Bedrock Mantle route |
229
+ | `anthropic-vertex` | Native | Anthropic via Google Vertex |
230
+ | `github-copilot` | Native | Copilot-backed chat/runtime integration |
231
+ | `synthetic` | Failover | Virtual provider; routes to the best available backend while preserving billing boundaries |
232
+
233
+ ### Built-in compatible and gateway providers
234
+
235
+ These register automatically when configured and participate in the same routing/model picker/runtime metadata surface:
236
+
237
+ - `openrouter`, `aihubmix`, `groq`, `cerebras`, `mistral`, `ollama-cloud`, `huggingface`, `nvidia`, `llm7`
238
+ - `deepseek`, `fireworks`, `microsoft-foundry`, `minimax`, `moonshot`, `qianfan`, `qwen`, `sglang`, `stepfun`, `together`, `venice`, `volcengine`, `xai`, `xiaomi`, `zai`
239
+ - gateway/proxy-style integrations: `cloudflare-ai-gateway`, `vercel-ai-gateway`, `litellm`, `copilot-proxy`
240
+
241
+ **Provider aliases**: Catalog/provider aliases such as `inception -> inceptionlabs`, `copilot -> github-copilot`, `dashscope -> qwen`, `x-ai -> xai`, and `z-ai -> zai` are normalized automatically.
242
+
243
+ ### Web search providers
244
+
245
+ | Provider | Notes |
246
+ |----------|-------|
247
+ | `duckduckgo` | Built-in no-key default using Lite search + Instant Answer enrichment |
248
+ | `searxng` | Good self-hosted/meta-search option |
249
+ | `brave` | Structured web search API |
250
+ | `exa` | LLM-oriented search/research API |
251
+ | `firecrawl` | Search plus crawl/extraction workflows |
252
+ | `tavily` | LLM-oriented search/evidence API |
253
+ | `perplexity` | Search/research provider surface |
254
+
255
+ ### Voice providers
256
+
257
+ | Provider | Capabilities |
258
+ |----------|--------------|
259
+ | `openai` | `tts`, `stt`, `realtime` |
260
+ | `elevenlabs` | `tts`, `stt`, `realtime` |
261
+ | `deepgram` | `stt` |
262
+ | `google` | `stt` |
263
+ | `microsoft` | `tts` |
264
+ | `vydra` | `tts` |
265
+
266
+ ### Media understanding and generation
267
+
268
+ - Image understanding providers: `openai`, `gemini`, `anthropic`, and local OpenAI-compatible multimodal backends
269
+ - Generation providers: `byteplus`, `runway`, `alibaba`, `fal`, `comfy`
270
+ - Multimodal analysis combines media providers, voice STT providers, and built-in document extractors behind one packet/write-back surface
271
+
272
+ ### Local Server Discovery
273
+
274
+ goodvibes-tui auto-discovers local inference servers on startup. Supported server types:
275
+
276
+ - **Ollama** (port 11434)
277
+ - **LM Studio** (port 1234)
278
+ - **vLLM** (detected via `x-vllm-*` response headers)
279
+ - **llama.cpp** / **LocalAI** (detected via server header)
280
+ - **Text Generation Inference (TGI)**
281
+ - **Jan**, **GPT4All**, **KoboldCpp**, **Aphrodite**
282
+
283
+ Discovered servers are registered automatically as OpenAI-compatible providers at startup.
284
+
285
+ ### Synthetic Failover Provider
286
+
287
+ The `synthetic` provider groups the same model across multiple backends under a single selectable entry. When one backend hits a rate limit or error, requests fail over automatically to the next. Models are cataloged from models.dev (4,000+ models, 100+ providers) with a 24-hour TTL cache.
288
+
289
+ Many model providers support configurable reasoning effort levels. Selectable options include: `instant`, `low`, `medium`, `high`.
290
+
291
+ ### Custom Providers
292
+
293
+ Any OpenAI-compatible API can be added by dropping a JSON file in `~/.goodvibes/tui/providers/`:
294
+
295
+ ```json
296
+ {
297
+ "name": "openrouter",
298
+ "displayName": "OpenRouter",
299
+ "type": "openai-compat",
300
+ "baseURL": "https://openrouter.ai/api/v1",
301
+ "apiKeyEnv": "OPENROUTER_API_KEY",
302
+ "models": [
303
+ {
304
+ "id": "anthropic/claude-sonnet-4-6",
305
+ "displayName": "Claude Sonnet 4.6 (via OpenRouter)",
306
+ "description": "Anthropic Claude Sonnet 4.6 via OpenRouter",
307
+ "contextWindow": 200000,
308
+ "capabilities": {
309
+ "toolCalling": true,
310
+ "codeEditing": true,
311
+ "reasoning": true,
312
+ "multimodal": true
313
+ }
314
+ }
315
+ ]
316
+ }
317
+ ```
318
+
319
+ Provider configs are hot-reloaded on file change. Use the `/add-provider` skill for interactive guided setup with smart defaults for popular providers.
320
+
321
+ ---
322
+
323
+ ## Setup
324
+
325
+ ### Prerequisites
326
+
327
+ - [Bun](https://bun.sh) v1.0 or later
328
+ - **Optional**: [Go](https://go.dev) for Go LSP support (gopls auto-installs via `go install`)
329
+ - **Optional**: For Rust development, `rust-analyzer` is auto-downloaded from GitHub releases
330
+
331
+ ### Install
332
+
333
+ ```sh
334
+ git clone https://github.com/mgd34msu/goodvibes-tui.git
335
+ cd goodvibes-tui
336
+ bun install
337
+ ```
338
+
339
+ ### Configure API Keys
340
+
341
+ API keys resolve from environment variables first, then from the GoodVibes secret store. The local store can hold encrypted values directly or provider-backed secret references for Bitwarden, Vaultwarden, Bitwarden Secrets Manager, 1Password, files, and command-backed resolvers.
342
+
343
+ Set environment variables:
344
+
345
+ | Provider | Primary Env Var | Accepted Aliases | Type |
346
+ |----------|----------------|-----------------|------|
347
+ | Anthropic | `ANTHROPIC_API_KEY` | `CLAUDE_API_KEY` | Paid |
348
+ | OpenAI | `OPENAI_API_KEY` | `OPENAI_KEY` | Paid |
349
+ | Google Gemini | `GEMINI_API_KEY` | `GOOGLE_API_KEY`, `GOOGLE_GEMINI_API_KEY` | Paid |
350
+ | InceptionLabs | `INCEPTION_API_KEY` | — | Paid |
351
+ | Mistral | `MISTRAL_API_KEY` | — | Paid |
352
+ | OpenRouter | `OPENROUTER_API_KEY` | — | Free tier available |
353
+ | Groq | `GROQ_API_KEY` | — | Free (LPU inference) |
354
+ | Cerebras | `CEREBRAS_API_KEY` | — | Free (wafer-scale inference) |
355
+ | AIHubMix | `AIHUBMIX_API_KEY` | — | Free tier (rate-limited) |
356
+ | HuggingFace | `HF_API_KEY` | `HUGGINGFACE_API_KEY`, `HF_TOKEN` | Free tier (rate-limited) |
357
+ | Ollama Cloud | `OLLAMA_CLOUD_API_KEY` | `OLLAMA_API_KEY` | Free |
358
+ | NVIDIA NIM | `NVIDIA_API_KEY` | — | 1000 free credits |
359
+ | LLM7 | `LLM7_API_KEY` | — | Free |
360
+
361
+ Additional built-in integrations resolve from the same env/secrets path:
362
+
363
+ - LLM/gateway providers: `AWS_BEARER_TOKEN_BEDROCK`, `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, `GOOGLE_APPLICATION_CREDENTIALS`, `ANTHROPIC_VERTEX_PROJECT_ID`, `GOOGLE_CLOUD_PROJECT`, `COPILOT_GITHUB_TOKEN`, `GH_TOKEN`, `GITHUB_TOKEN`, `DEEPSEEK_API_KEY`, `FIREWORKS_API_KEY`, `AZURE_OPENAI_API_KEY`, `MINIMAX_API_KEY`, `MOONSHOT_API_KEY`, `QIANFAN_API_KEY`, `QWEN_API_KEY`, `DASHSCOPE_API_KEY`, `MODELSTUDIO_API_KEY`, `SGLANG_API_KEY`, `STEPFUN_API_KEY`, `TOGETHER_API_KEY`, `VENICE_API_KEY`, `VOLCANO_ENGINE_API_KEY`, `XAI_API_KEY`, `XIAOMI_API_KEY`, `ZAI_API_KEY`, `CLOUDFLARE_AI_GATEWAY_API_KEY`, `AI_GATEWAY_API_KEY`, `LITELLM_API_KEY`, `COPILOT_PROXY_API_KEY`
364
+ - Search and media: `PERPLEXITY_API_KEY`, `DEEPGRAM_API_KEY`, `ELEVENLABS_API_KEY`, `XI_API_KEY`, `VYDRA_API_KEY`, `BYTEPLUS_API_KEY`, `FAL_KEY`, `FAL_API_KEY`, `COMFY_API_KEY`, `RUNWAYML_API_SECRET`, `RUNWAY_API_KEY`
365
+
366
+ Alternatively, store keys encrypted using the `/secrets` command. Environment variables take precedence when both are set:
367
+
368
+ ```sh
369
+ /secrets set OPENAI_API_KEY sk-...
370
+ ```
371
+
372
+ For self-hosted or external secret managers, link a GoodVibes key to a provider-backed SecretRef:
373
+
374
+ ```sh
375
+ /secrets link OPENAI_API_KEY bw://GoodVibes%20OpenAI/password?sessionEnv=BW_SESSION
376
+ /secrets link SLACK_BOT_TOKEN vaultwarden://GoodVibes%20Slack/password?server=https%3A%2F%2Fvault.example.test
377
+ /secrets link STRIPE_TOKEN bws://00000000-0000-0000-0000-000000000000/value?accessTokenEnv=BWS_ACCESS_TOKEN
378
+ /secrets link OPENAI_API_KEY op://Private/GoodVibes%20OpenAI/API%20Key
379
+ ```
380
+
381
+ Use `/secrets providers` for supported provider shapes and `/secrets test <secret-ref>` to validate a ref without printing its value.
382
+
383
+ ### Synthetic Failover Provider
384
+
385
+ The `synthetic` provider groups models available from multiple backends. When one provider hits a rate limit, requests fail over automatically to the next. To enable failover, set API keys for multiple free providers:
386
+
387
+ ```sh
388
+ # Recommended minimum for failover
389
+ export GROQ_API_KEY="..."
390
+ export HF_API_KEY="..."
391
+ export NVIDIA_API_KEY="..."
392
+ export OLLAMA_CLOUD_API_KEY="..."
393
+ export OPENROUTER_API_KEY="..."
394
+ export AIHUBMIX_API_KEY="..."
395
+ ```
396
+
397
+ Then select any model from the `synthetic` provider (e.g., `gpt-oss-120b`, `kimi-k2.5`, `qwen-3.5-397b`). See [Synthetic Provider & Intelligent Failover](#synthetic-provider--intelligent-failover) for full details on failover behavior.
398
+
399
+ ### Run
400
+
401
+ ```sh
402
+ bun run dev
403
+ ```
404
+
405
+ ### Run the optional daemon/API host
406
+
407
+ ```sh
408
+ GOODVIBES_DAEMON_TOKEN=... GOODVIBES_HTTP_TOKEN=... bun run daemon
409
+ ```
410
+
411
+ The daemon/gateway surface is optional, but it is what powers omnichannel routes, the browser-based operator surface, remote peers, knowledge/media APIs, and future external clients.
412
+
413
+ ### Build a standalone binary
414
+
415
+ ```sh
416
+ bun run build
417
+ # outputs dist/goodvibes
418
+ ```
419
+
420
+ `bun run build` compiles `src/main.ts` into `dist/goodvibes`. The compiled binary runs the TUI and can also host the daemon and HTTP listener in-process when `danger.daemon` and/or `danger.httpListener` are enabled in config. The default build does not produce a separate compiled daemon-only executable.
421
+
422
+ ---
423
+
424
+ ## Synthetic Provider & Intelligent Failover
425
+
426
+ ### What are synthetic models?
427
+
428
+ Synthetic models are models available from multiple providers, automatically grouped by the system under a single selectable entry. When you pick a synthetic model, the system routes your request to the best available backend — you never need to think about which provider is serving it.
429
+
430
+ - Models with different naming across providers (e.g., `GPT-4o` vs `gpt 4o`) are automatically merged into one entry
431
+ - Each synthetic model shows how many providers are available for failover in the model picker
432
+
433
+ ### Transparent failover
434
+
435
+ Failover behavior:
436
+
437
+ - **Rate limit (429)** — immediately retries the next provider in the pool
438
+ - **Server error (500) or network error** — retries the next provider after a 5-second cooldown
439
+ - **Client error (400 Bad Request)** — does NOT trigger failover; the error indicates a problem with the request itself, not the provider
440
+ - **All providers temporarily exhausted with short cooldowns (≤120s)** — the system automatically waits for the shortest cooldown to expire and retries
441
+
442
+ Failover is silent by default. The model name in the status bar does not change when switching backends for the same synthetic model.
443
+
444
+ ### Cross-model failover (free models only)
445
+
446
+ When every provider for a free synthetic model is exhausted and cooldowns are too long to wait:
447
+
448
+ - The system automatically falls back to the next-best free model, ranked by benchmark score
449
+ - The user is notified inline (non-blocking) about the model change
450
+ - This cascading continues until a working free model is found
451
+ - Free/paid/subscription tiers never mix — cross-model failover only happens within the free tier
452
+
453
+ #### **IMPORTANT NOTE**:
454
+ This system is not perfect, and there are ways it could result in charges accruing.
455
+
456
+ This includes but is not limited to when a provider moves a model from free to paid and you have kept the goodvibes-tui session running for longer than 24 hours (and have not run a model refresh manually in that time period). The system will not know that the model is now a paid model.
457
+
458
+ Refreshes happen automatically if a new session is started (or session is resumed) after the 24-hour TTL expires for the model list. For long-running sessions, please ensure that the models are refreshed daily.
459
+
460
+ ### Paid and subscription model exhaustion
461
+
462
+ Paid and subscription models do **not** auto-failover to a different model. The user made a deliberate, cost-conscious choice.
463
+
464
+ When a paid or subscription model is exhausted, the system shows a clear message with recovery options:
465
+
466
+ - Wait for the cooldown to expire and retry
467
+ - Switch to a different model with `/model`
468
+ - Switch to a free synthetic model
469
+
470
+ ### Model picker grouping
471
+
472
+ - Synthetic models are split into **Top Models** (S-tier or A-tier by benchmark) and **All Synthetic**
473
+ - Each entry shows the number of providers available (e.g., `4 providers`)
474
+ - Quality tier badges [S/A/B/C] are displayed next to model names based on composite benchmark score
475
+
476
+ ---
477
+
478
+ ## Configuration
479
+
480
+ Settings are layered, not stored in a single working-directory file:
481
+
482
+ - defaults
483
+ - global TUI settings: `~/.goodvibes/tui/settings.json`
484
+ - project overrides: `.goodvibes/tui/settings.json`
485
+ - CLI/runtime overrides
486
+
487
+ The shared file `~/.goodvibes/goodvibes.json` is reserved for future cross-app state; TUI settings do not live there. You can view and edit settings live with `/config` or the `/settings` modal.
488
+
489
+ Related storage paths:
490
+
491
+ - secure secrets: `~/.goodvibes/tui/secrets.enc` and project/ancestor `.goodvibes/tui/secrets.enc`
492
+ - plaintext compatibility secrets: `~/.goodvibes/goodvibes.secrets.json` and project/ancestor `.goodvibes/goodvibes.secrets.json`
493
+ - service registry: `.goodvibes/tui/services.json`, with service-backed auth/account surfaces in the TUI and daemon
494
+ - custom provider JSON: `~/.goodvibes/tui/providers/*.json`
495
+ - keybindings: `~/.goodvibes/tui/keybindings.json`
496
+ - REPL history: `.goodvibes/tui/repl-history.json`
497
+ - schedules: `.goodvibes/tui/schedules.json`
498
+
499
+ ### Key Settings
500
+
501
+ | Key | Default | Description |
502
+ |-----|---------|-------------|
503
+ | `display.stream` | `true` | Stream responses token by token |
504
+ | `display.lineNumbers` | `off` | Line-number mode: `off`, `code`, or `all` |
505
+ | `display.collapseThreshold` | `30` | Lines before a block auto-collapses |
506
+ | `display.theme` | `vaporwave` | Color theme |
507
+ | `display.showThinking` | `false` | Show model thinking traces |
508
+ | `display.showTokenSpeed` | `false` | Show tokens/sec in status bar |
509
+ | `provider.model` | `openrouter/free` | Active model ID |
510
+ | `provider.reasoningEffort` | `medium` | Reasoning depth for supported models |
511
+ | `provider.systemPromptFile` | `` | Path to a custom system prompt file |
512
+ | `behavior.autoApprove` | `false` | Auto-approve all tool permission prompts |
513
+ | `behavior.autoCompactThreshold` | `80` | Context % before auto-compact triggers |
514
+ | `behavior.saveHistory` | `true` | Persist conversation history |
515
+ | `behavior.returnContextMode` | `off` | Session return-context mode: `off`, `local`, `assisted` |
516
+ | `behavior.guidanceMode` | `minimal` | Operational guidance mode: `off`, `minimal`, `guided` |
517
+ | `storage.secretPolicy` | `preferred_secure` | Secret storage policy: prefer secure backing store, fall back when allowed |
518
+ | `permissions.mode` | `prompt` | Permission mode: `prompt`, `allow-all`, `custom` |
519
+ | `ui.systemMessages` | `panel` | Route general system messages to `panel`, `conversation`, or `both` |
520
+ | `ui.operationalMessages` | `panel` | Route operational runtime notices to `panel`, `conversation`, or `both` |
521
+ | `ui.wrfcMessages` | `both` | Route WRFC/orchestration updates to `panel`, `conversation`, or `both` |
522
+ | `danger.agentRecursion` | `false` | Allow agents to spawn subagents |
523
+ | `danger.maxGlobalAgents` | `8` | Max simultaneous agents |
524
+ | `danger.daemon` | `false` | Enable daemon mode (POST /task) |
525
+ | `danger.httpListener` | `false` | Enable HTTP webhook listener |
526
+ | `tools.autoHeal` | `false` | Auto-fix syntax errors on write/edit |
527
+ | `tools.hooksFile` | `hooks.json` | Hook configuration file name |
528
+ | `cache.enabled` | `true` | Enable provider-aware prompt caching |
529
+ | `cache.stableTtl` | `1h` | TTL for stable content (system prompt + tools) |
530
+ | `cache.monitorHitRate` | `true` | Track and warn on low cache hit rates |
531
+ | `helper.enabled` | `false` | Route grunt work to a cheaper helper model |
532
+ | `helper.globalProvider` | `` | Helper model provider (e.g., `ollama`) |
533
+ | `helper.globalModel` | `` | Helper model ID (e.g., `llama3.2:3b`) |
534
+
535
+ ### Permission Modes
536
+
537
+ - **`prompt`** (default) — ask before write, edit, exec, fetch, agent, workflow, and MCP calls
538
+ - **`allow-all`** — never prompt, allow everything
539
+ - **`custom`** — per-tool overrides using `permissions.tools.<name>` keys
540
+
541
+ Per-tool values: `allow`, `prompt`, `deny`.
542
+
543
+ ---
544
+
545
+ ## Control Rooms, Routing, And Operator Surfaces
546
+
547
+ GoodVibes is built around routing runtime state to the right surface.
548
+
549
+ The current product ships dedicated workspaces for:
550
+
551
+ - provider accounts and provider health
552
+ - local auth and local service posture
553
+ - settings sync and managed-settings review
554
+ - remote peers, node-host contracts, work queues, and artifacts
555
+ - knowledge, memory review, and structured projection surfaces
556
+ - channels, deliveries, route bindings, and surface setup/doctor flows
557
+ - voice, media, search, and multimodal runtime posture
558
+ - sandbox posture, presets, setup, and recovery
559
+ - MCP posture, trust, reconnect, and repair
560
+ - marketplace, plugins, hooks, orchestration, tasks, intelligence, worktrees, approvals, and system messages
561
+
562
+ Heavy operational surfaces are summary-first:
563
+
564
+ - posture
565
+ - current issues
566
+ - next actions
567
+ - then deeper detail
568
+
569
+ Routing is configurable with:
570
+
571
+ - `ui.systemMessages`
572
+ - `ui.operationalMessages`
573
+ - `ui.wrfcMessages`
574
+
575
+ This is how startup discovery, runtime notices, and orchestration chatter can be sent to a panel, the conversation, or both.
576
+
577
+ The gateway/event layer is also a first-class product surface. Runtime domains such as `session`, `tasks`, `agents`, `automation`, `routes`, `control-plane`, `deliveries`, `surfaces`, `watchers`, `transport`, `ops`, and `knowledge` are exposed through the control plane.
578
+
579
+ The notification layer applies policy-aware routing, batching, and visibility controls:
580
+
581
+ - quiet-while-typing suppression
582
+ - adaptive batching and burst control
583
+ - domain verbosity settings
584
+ - panel jump and dismiss actions
585
+ - routing decisions that favor control rooms for low-signal operational noise
586
+
587
+ That routing stack lives under `src/runtime/notifications/*` and helps keep the conversation surface compact even when the runtime is busy.
588
+
589
+ Underneath those surfaces, GoodVibes uses a typed runtime store backed by `zustand/vanilla`. Conversation, session, permissions, tasks, agents, orchestration, communication, plugins, MCP, ACP/daemon transport, integrations, intelligence, and other domains are updated through typed dispatch paths.
590
+
591
+ ---
592
+
593
+ ## Sandbox, Isolation, And QEMU
594
+
595
+ GoodVibes includes a real sandbox control plane for both evaluation runtimes and MCP isolation.
596
+
597
+ Isolation controls:
598
+
599
+ - REPL isolation: `shared-vm` or `per-runtime-vm`
600
+ - MCP isolation: `disabled`, `shared-vm`, `hybrid`, `per-server-vm`
601
+ - host posture on Windows: `native-basic` or `require-wsl`
602
+ - VM backend: `local` or `qemu`
603
+
604
+ The QEMU path includes:
605
+
606
+ - setup bundle generation
607
+ - first-run bootstrap scaffolding
608
+ - `qemu-img` image creation helpers
609
+ - host-side wrapper generation
610
+ - guest-test and wrapper-test validation
611
+ - session-backed command execution
612
+ - guest bundle export / inspect flows
613
+ - setup manifest export / apply flows
614
+ - `attach` and `launch-per-command` execution modes
615
+
616
+ Key commands:
617
+
618
+ - `/setup sandbox`
619
+ - `/sandbox review`
620
+ - `/sandbox recommend`
621
+ - `/sandbox doctor`
622
+ - `/sandbox probe`
623
+ - `/sandbox qemu setup <dir>`
624
+ - `/sandbox qemu bootstrap <dir> [size-gb]`
625
+ - `/sandbox qemu create-image <path> [size-gb]`
626
+ - `/sandbox qemu inspect-setup <manifest>`
627
+ - `/sandbox qemu apply-setup <manifest>`
628
+ - `/sandbox session ...`
629
+ - `/sandbox guest-bundle export <path>`
630
+ - `/sandbox guest-bundle inspect <path>`
631
+
632
+ Typical first-run path:
633
+
634
+ ```sh
635
+ /sandbox qemu bootstrap .goodvibes/tui/sandbox 20
636
+ /sandbox doctor
637
+ /sandbox guest-test eval-js
638
+ ```
639
+
640
+ ---
641
+
642
+ ## Remote, Local Services, And Integration Helpers
643
+
644
+ ### Omnichannel surfaces
645
+
646
+ GoodVibes includes a shared channel/runtime layer.
647
+
648
+ Current surfaces:
649
+
650
+ - `tui`
651
+ - `web`
652
+ - `slack`
653
+ - `discord`
654
+ - `ntfy`
655
+ - `webhook`
656
+ - `telegram`
657
+ - `google-chat`
658
+ - `signal`
659
+ - `whatsapp`
660
+ - `imessage`
661
+ - `msteams`
662
+ - `bluebubbles`
663
+ - `mattermost`
664
+ - `matrix`
665
+
666
+ Inbound adapters, target resolution, account/setup metadata, doctor hooks, routing, and delivery are all driven through the channel runtime.
667
+
668
+ ### Remote runtime
669
+
670
+ The remote runtime is a distributed peer system with:
671
+
672
+ - pair requests and challenge verification
673
+ - peer tokens, scopes, heartbeat, and disconnect/revoke flows
674
+ - work queues with claim/lease/complete lifecycle
675
+ - node-host contract inspection
676
+ - remote review artifacts and recovery posture
677
+ - capability inspection and rerun-local-from-artifact flows
678
+
679
+ Key commands:
680
+
681
+ - `/remote`
682
+ - `/remote show <runner>`
683
+ - `/remote capabilities [runner]`
684
+ - `/remote recover [runner]`
685
+ - `/remote dispatch ...`
686
+ - `/remote dispatch-pool <pool> ...`
687
+ - `/remote export <runner>`
688
+ - `/remote artifact show <id>`
689
+ - `/remote import <path>`
690
+
691
+ ### Local daemon and HTTP listener
692
+
693
+ Local service surfaces are opt-in:
694
+
695
+ - `danger.daemon`
696
+ - `danger.httpListener`
697
+
698
+ They are protected by local auth, which includes:
699
+
700
+ - bootstrap credentials written to the bootstrap file
701
+ - local user management
702
+ - password rotation
703
+ - session revocation
704
+ - review surfaces in both commands and panels
705
+
706
+ Once enabled, the daemon exposes a substantial backend surface for:
707
+
708
+ - provider accounts, usage, routing, and health
709
+ - gateway/operator state and browser-based operator review
710
+ - knowledge ingest/search/GraphQL/projections/jobs/schedules
711
+ - artifacts, media generation, voice, web search, and multimodal analysis
712
+ - channels, deliveries, and route bindings
713
+ - remote peer pairing, work dispatch, and node-host contracts
714
+
715
+ The control-plane surface is typed and transport-aware:
716
+
717
+ - `/api/control-plane` for the live gateway snapshot
718
+ - `/api/control-plane/methods` and `/api/control-plane/events/catalog` for method/event discovery
719
+ - `/api/control-plane/events` for SSE subscriptions
720
+ - `/api/control-plane/ws` for WebSocket clients
721
+ - `/api/control-plane/web` for the built-in browser/operator shell
722
+
723
+ Key commands:
724
+
725
+ - `/auth local review`
726
+ - `/auth local add-user <username> <password> [roles]`
727
+ - `/auth local rotate-password <username> <password>`
728
+ - `/auth local revoke-session <token>`
729
+ - `/auth local clear-bootstrap-file`
730
+
731
+ ### Integration helpers
732
+
733
+ GoodVibes also exposes integration-helper APIs for future clients and helpers:
734
+
735
+ - another GoodVibes instance
736
+ - a future web frontend or companion app
737
+ - setup/auth helpers
738
+ - operational integrations that need session, approval, account, health, knowledge, search, artifact, or delivery posture
739
+
740
+ This layer is meant to expose control/state APIs, not a UI protocol.
741
+
742
+ The adjacent local-product access layer also includes dedicated front doors for:
743
+
744
+ - provider login/logout flows
745
+ - install and update posture review
746
+ - trust review bundles
747
+ - bridge status/review/export/import paths
748
+ - setup deep links and portable install/update/auth review bundles
749
+ - deeplink review and bundle packaging for operator surfaces
750
+
751
+ Key commands:
752
+
753
+ - `/login`
754
+ - `/logout`
755
+ - `/install`
756
+ - `/update`
757
+ - `/trust`
758
+ - `/bridge`
759
+ - `/profilesync`
760
+
761
+ The setup surface is also broader than a single readiness screen:
762
+
763
+ - onboarding and doctor flows
764
+ - service, hook, remote, and sandbox review
765
+ - support-bundle export
766
+ - setup-transfer export / inspect / import
767
+ - deep links for cockpit, security, remote, knowledge, incident, hooks, orchestration, and tasks
768
+
769
+ ---
770
+
771
+ ## Policy, Permissions, And Trust
772
+
773
+ The permission system is more than a prompt toggle. The runtime includes:
774
+
775
+ - layered policy evaluation for prefix rules, arg-shape rules, path scope, network scope, and mode constraints
776
+ - decision logs for audit and review
777
+ - policy preflight review before applying bundles
778
+ - rule suggestion generation from actual approval decisions
779
+ - policy signing and signature verification
780
+ - simulation and divergence reporting for candidate policy bundles before promotion
781
+ - policy runtime state with bundle lifecycle, promote, rollback, and diff support
782
+
783
+ The adjacent trust layer covers:
784
+
785
+ - plugin trust tiers
786
+ - quarantine and degraded posture
787
+ - marketplace and MCP trust review
788
+ - security/policy control-room surfaces for review and remediation
789
+
790
+ The result is that approvals, policy rollout, trust posture, and plugin degradation are inspectable product behavior.
791
+
792
+ ---
793
+
794
+ ## Automation, Hooks, And Scheduling
795
+
796
+ GoodVibes includes an automation layer with:
797
+
798
+ - managed hooks with scaffold, chain, enable/disable, inspect, import/export, and simulation flows
799
+ - hook-point contracts with execution authority, mutation/injection permissions, timeout policy, and failure policy metadata
800
+ - workflow state machines such as `wrfc`, `fix_loop`, `test_then_fix`, and `review_only`
801
+ - cron-like scheduled agent tasks with timezone-aware schedules, missed-run tracking, run history, and manual trigger support
802
+ - planning commands with active-plan review, mode/explain/override/status controls, and model-authored execution-plan generation
803
+
804
+ Key commands:
805
+
806
+ - `/hooks`
807
+ - `/workflow`
808
+ - `/schedule`
809
+ - `/plan`
810
+
811
+ The goal is to make recurring operational work, review loops, and reaction policies explicit, inspectable, and schedulable.
812
+
813
+ ---
814
+
815
+ ## Services, Profiles, And Setup Transfer
816
+
817
+ The services/config side is also productized beyond a flat JSON file:
818
+
819
+ - named service registry with inspect, auth resolution, connectivity tests, auth review, and doctor output
820
+ - first-class SecretRef-backed service credentials through env, GoodVibes local storage, file, exec, 1Password, Bitwarden, Vaultwarden, and Bitwarden Secrets Manager providers
821
+ - live profile management plus portable profile sync bundle export/import
822
+ - setup transfer bundles that can move config/services/ecosystem posture between environments
823
+
824
+ Key commands:
825
+
826
+ - `/services inspect|test|resolve|auth|auth-review|doctor|export|import`
827
+ - `/profiles`
828
+ - `/profilesync`
829
+ - `/setup transfer export|inspect|import`
830
+
831
+ Service entries can use existing `tokenKey` fields, a SecretRef in the key field, or explicit `tokenRef` / `passwordRef` / `webhookUrlRef` / `signingSecretRef` / `publicKeyRef` fields:
832
+
833
+ ```json
834
+ {
835
+ "slack": {
836
+ "name": "slack",
837
+ "authType": "bearer",
838
+ "tokenKey": "SLACK_BOT_TOKEN",
839
+ "tokenRef": {
840
+ "source": "vaultwarden",
841
+ "item": "GoodVibes Slack",
842
+ "field": "password",
843
+ "server": "https://vault.example.test"
844
+ }
845
+ }
846
+ }
847
+ ```
848
+
849
+ ---
850
+
851
+ ## Marketplace, Plugins, And Curated Ecosystem Paths
852
+
853
+ The ecosystem layer is broader than a basic enable/disable plugin list.
854
+
855
+ Current capabilities include:
856
+
857
+ - local plugin discovery across configured search directories
858
+ - plugin inspect/review output with trust tier, quarantine posture, capability counts, and signature fingerprint visibility
859
+ - curated ecosystem catalogs with publish-local, unpublish, catalog review, install, update, uninstall, and installed-receipt flows
860
+ - local-first curated plugin distribution via `.goodvibes/tui/ecosystem/*.json`
861
+ - recommendations tied to installed state, denials, and missing capabilities
862
+
863
+ Key commands:
864
+
865
+ - `/plugin list|inspect|review|browse|catalog-review|publish-local|install|update|uninstall`
866
+ - `/marketplace`
867
+
868
+ So the product supports both direct local plugins and a curated local-first ecosystem channel with review and receipt tracking.
869
+
870
+ ---
871
+
872
+ ## Tools
873
+
874
+ goodvibes-tui ships 20+ built-in tools. They cover native file and shell operations, bounded eval, coordination/work management, channels, search, MCP/remote control, planning artifacts, and product-control inspection surfaces.
875
+
876
+ ### REPL / Eval runtimes
877
+
878
+ GoodVibes also ships a live bounded `repl` tool backed by the sandbox/session layer. The current runtimes are:
879
+
880
+ - JavaScript
881
+ - TypeScript
882
+ - Python
883
+ - SQL
884
+ - GraphQL
885
+
886
+ These are real runtime profiles wired through sandbox profiles such as `eval-js`, `eval-ts`, `eval-py`, `eval-sql`, and `eval-graphql`, and REPL history is persisted under `.goodvibes/tui/repl-history.json`.
887
+
888
+ The important nuance is that the runtimes are intentionally bounded:
889
+
890
+ - JavaScript and TypeScript evaluate inside the sandbox exec path
891
+ - Python runs in an ephemeral virtualenv
892
+ - SQL evaluates against an ephemeral in-memory SQLite database
893
+ - GraphQL currently provides bounded GraphQL expression analysis/normalization through the REPL path
894
+
895
+ ### Durable memory / knowledge
896
+
897
+ GoodVibes has three distinct context layers:
898
+
899
+ - session memory for lightweight pinned notes that only live for the current session
900
+ - durable reviewed memory stored in SQLite for reuse, review, export, and task-time injection
901
+ - a structured knowledge store with sources, nodes, edges, issues, extractions, usage records, consolidation candidates/reports, schedules, GraphQL, and markdown/wiki-style projections
902
+
903
+ Durable record classes currently include:
904
+
905
+ - `decision`
906
+ - `constraint`
907
+ - `incident`
908
+ - `pattern`
909
+ - `fact`
910
+ - `risk`
911
+ - `runbook`
912
+ - `architecture`
913
+ - `ownership`
914
+
915
+ Key capabilities:
916
+
917
+ - scopes: `session`, `project`, `team`
918
+ - review states: `fresh`, `reviewed`, `stale`, `contradicted`
919
+ - confidence scores
920
+ - provenance links back to sessions, turns, tasks, events, and files
921
+ - links between memory records
922
+ - review queues and promotion flows
923
+ - bundle export/import and handoff export/import
924
+ - task-time knowledge selection and injection based on task text, write scope, graph relations, and usage scoring
925
+ - structured capture from incidents, policy preflight, MCP posture, and plugin posture
926
+ - connector-based ingest for URLs, bookmark exports, URL lists, and artifacts
927
+ - TS extractors for HTML/text/markdown/JSON/CSV/TSV/XML/YAML/PDF text/DOCX/XLSX/PPTX
928
+ - GraphQL schema + query/mutation surface over the knowledge store
929
+ - projection rendering/materialization for overview pages, rollups, backlinks, source health, and exportable markdown/wiki bundles
930
+ - scheduled knowledge jobs including `lint`, `reindex`, `refresh-stale`, `refresh-bookmarks`, `rebuild-projections`, `light-consolidation`, and `deep-consolidation`
931
+ - usage-ledger and consolidation pipeline for candidate scoring, promotion, and report generation
932
+ - reviewed memory mirrored into structured knowledge for later retrieval and packet building
933
+ - sqlite-vec indexing backed by a pluggable embedding registry with providers for local hashed embeddings, OpenAI, OpenAI-compatible/LM Studio, Gemini, Mistral, and Ollama
934
+
935
+ There is also a genuine self-improvement loop here:
936
+
937
+ - failures and incidents can be captured into durable memory
938
+ - policy, MCP, and plugin posture can be promoted into durable reviewed knowledge
939
+ - operators can review, mark stale, contradict, or promote records
940
+ - knowledge jobs can refresh stale sources, rebuild projections, reindex reviewed memory, and run light/deep consolidation
941
+ - future tasks can receive automatically selected reviewed knowledge injections
942
+ - the runtime can explain exactly which knowledge records it would inject for a task and why
943
+
944
+ The system supports iterative operator review and reuse of lessons learned in later work.
945
+
946
+ Key commands:
947
+
948
+ - `/recall add ...`
949
+ - `/recall search ...`
950
+ - `/recall queue`
951
+ - `/recall review ...`
952
+ - `/recall explain ...`
953
+ - `/recall promote ...`
954
+ - `/recall capture ...`
955
+ - `/recall export ...`
956
+ - `/recall import ...`
957
+ - `/recall handoff-export ...`
958
+ - `/recall handoff-import ...`
959
+ - `/knowledge status|ingest-url|import-bookmarks|import-urls|list|search|get|queue|candidates|reports|schedules|lint|packet|explain|reindex|consolidate`
960
+
961
+ This is a reviewed knowledge substrate used by the runtime when preparing task context.
962
+
963
+ There are also dedicated front doors for memory workflows outside `/recall`:
964
+
965
+ - `/memory-sync` for durable export/import
966
+ - `/handoff` for reviewable handoff bundles
967
+ - `/session-memory` for session-scoped review/capture
968
+ - `/team-memory` for shared/team-oriented exchange
969
+
970
+ ### Web search, artifacts, voice, and multimodal
971
+
972
+ These systems are first-class runtime families.
973
+
974
+ - `web-search`: provider-backed search with verbosity control, evidence shaping, optional source fetching, and normalized results across DuckDuckGo, SearXNG, Brave, Exa, Firecrawl, Tavily, and Perplexity
975
+ - `artifacts`: durable file/object storage for markdown, text, JSON, CSV, spreadsheets, PDFs, images, audio, video, and generated outputs, with metadata, content access, and delivery reuse
976
+ - `voice`: provider-backed TTS/STT/realtime negotiation with OpenAI, ElevenLabs, Deepgram, Google, Microsoft, and Vydra
977
+ - `multimodal`: unified image/audio/video/document analysis with packet building and optional knowledge write-back
978
+
979
+ These surfaces are exposed through the daemon/API as well as the TUI panels and commands, giving future web and companion clients the same backend runtime.
980
+
981
+ ### read
982
+
983
+ Read files with token-efficient extraction modes.
984
+
985
+ - 5 extract modes: `content` (full text), `outline` (signatures only, significant token savings), `symbols` (exported names, even greater savings), `ast` (structural), `lines` (specific ranges)
986
+ - Tree-sitter powered outline and symbol extraction with regex fallback
987
+ - Token-budget pagination for large batch reads — request N files, get pages that fit within a budget
988
+ - Built-in image, PDF, and Jupyter notebook reading
989
+ - Per-file caching with optimistic concurrency control (OCC) conflict detection — tracks what you've read and warns if it changed externally
990
+
991
+ ### write
992
+
993
+ Write files with atomic operations, backup modes, and auto-heal.
994
+
995
+ - Atomic writes via temp file + rename — no partial writes on crash
996
+ - Three overwrite modes: `fail_if_exists`, `overwrite`, `backup` (copies original to `.goodvibes/.backups/`)
997
+ - Auto-heal pipeline: if a written file has syntax errors and `tools.autoHeal` is enabled, runs formatter → linter → LLM fix automatically
998
+ - Base64 content support for files with special characters
999
+ - Batch writes in a single call with per-file mode control
1000
+
1001
+ ### edit
1002
+
1003
+ Structural code editing with AST matching, scope hints, and transactional rollback.
1004
+
1005
+ - 5 match modes: `exact`, `fuzzy` (whitespace-insensitive), `regex` (with capture groups), `ast` (tree-sitter structural), `ast_pattern` (ast-grep with metavariables like `$VAR` and `$$$ARGS`)
1006
+ - Scope hints: `in_function`, `in_class`, `near_line` — disambiguate matches without increasing context
1007
+ - Occurrence selection: `first`, `last`, `all`, or specific Nth occurrence — with ambiguity guard by default
1008
+ - Atomic transactions: all edits succeed or all roll back. Also supports `partial` and `none` modes
1009
+ - Pre/post validation: run `typecheck`, `lint`, `test`, or `build` before and after edits — auto-rollback on failure
1010
+ - Auto-heal on validation failure (same pipeline as write)
1011
+
1012
+ ### find
1013
+
1014
+ Multi-mode search: files, content, symbols, references, and structural AST patterns.
1015
+
1016
+ - 5 search modes in one tool: `files` (glob), `content` (regex grep), `symbols` (exported declarations), `references` (find all references via LSP with grep fallback), `structural` (AST pattern matching via ast-grep)
1017
+ - Structural search uses ast-grep to find code patterns like `console.log($$$ARGS)` across TypeScript, JavaScript, CSS, and HTML
1018
+ - Scope expansion: expand content matches to their enclosing `function` or `class` using tree-sitter
1019
+ - Multiple queries per call executed in parallel
1020
+ - Progressive output: `count_only` → `files_only` → `locations` → `matches` → `context`
1021
+
1022
+ ### exec
1023
+
1024
+ Shell execution with background processes, retry, progress tracking, and file operations.
1025
+
1026
+ - Background execution with process tracking — spawn, poll status, read output, kill
1027
+ - Retry with exponential backoff on transient failures
1028
+ - `until` pattern: watch stdout for a regex match, then stop or promote to background
1029
+ - Pre-command file operations: copy, move, delete files before running commands
1030
+ - Progress file streaming for long-running commands (auto-enabled above 30s)
1031
+ - Fail-fast mode: stop sequential execution on first failure, report remaining as skipped
1032
+
1033
+ ### fetch
1034
+
1035
+ HTTP client with extraction modes, service registry auth, and batch operations.
1036
+
1037
+ - 11 extraction modes: `raw`, `text`, `json`, `markdown`, `readable` (strips nav/sidebar/footer), `code_blocks`, `links`, `tables`, `metadata` (og-tags), `structured` (CSS selectors), `pdf`
1038
+ - Named service registry: configure API credentials once in `.goodvibes/tui/services.json`, reference by name in fetch calls
1039
+ - Inline auth: `bearer`, `basic`, `api-key` per-request
1040
+ - Batch parallel fetches in a single tool call
1041
+
1042
+ ### web_search
1043
+
1044
+ Higher-level provider-backed search built on top of the lower-level fetch/runtime stack.
1045
+
1046
+ - Normalized ranked search results
1047
+ - Verbosity modes from compact URL lists through richer snippet/evidence bundles
1048
+ - Optional instant-answer enrichment and optional fetched evidence for top-ranked sources
1049
+ - Provider routing across DuckDuckGo, SearXNG, Brave, Exa, Firecrawl, Tavily, and Perplexity
1050
+ - Safer split between `fetch` as the HTTP/extraction primitive and `web_search` as the search/evidence surface
1051
+
1052
+ ### analyze
1053
+
1054
+ 15-mode code analysis suite — from impact analysis to upgrade compatibility.
1055
+
1056
+ - `impact`: trace exported symbols across the project to find what breaks when you change a file
1057
+ - `dependencies`: build import graph, detect circular dependencies, list external packages
1058
+ - `dead_code`: find exported symbols with zero references outside their own file
1059
+ - `security`: scan for hardcoded secrets, world-writable files, and missing .env keys
1060
+ - `breaking`: compare git refs and detect removed/changed export signatures
1061
+ - `semantic_diff`: LLM-powered diff summary with risk assessment (low/medium/high)
1062
+ - `upgrade`: check npm registry for outdated packages and flag breaking version bumps
1063
+ - Also: `coverage` (lcov/istanbul parse), `bundle` (stats.json), `surface` (public API), `preview` (dry-run edit), `diff` (git ref diff), `permissions` (dangerous pattern scan), `env_audit` (.env key comparison), `test_find` (locate test files for source files)
1064
+
1065
+ ### inspect
1066
+
1067
+ 21-mode project and frontend inspection tool.
1068
+
1069
+ - `project`: detect project type, package manager, test framework, entry points, monorepo status
1070
+ - `api` + `api_spec` + `api_validate` + `api_sync`: discover API routes across Next.js (App + Pages Router), Express, Fastify, and Hono → generate OpenAPI 3.0 specs → validate specs against code → detect frontend/backend drift by scanning fetch() calls
1071
+ - `database`: parse Prisma schemas into structured model/field/relation data
1072
+ - `components`: extract React component tree with props, hooks, and child components
1073
+ - `scaffold`: generate module skeleton (types, implementation, tests, barrel export) with dry-run
1074
+ - Frontend analysis: `layout` (CSS/Tailwind layout hierarchy), `accessibility` (a11y issue detection), `component_state` (useState/useReducer/useContext tracing), `render_triggers` (what causes re-renders), `hooks` (dependency array auditing with missing-dep detection), `overflow`/`sizing`/`stacking` (CSS issue detection), `responsive` (Tailwind breakpoint analysis), `events` (handler analysis), `tailwind` (class conflict detection), `client_boundary` (Next.js directive analysis), `error_boundary` (coverage analysis)
1075
+
1076
+ ### agent
1077
+
1078
+ In-process subagent system with 15 management modes.
1079
+
1080
+ - Spawn agents from named archetypes (`engineer`, `reviewer`, `tester`, `researcher`, `general`) or custom archetypes from `.goodvibes/agents/*.md`
1081
+ - Full lifecycle management: `spawn`, `status`, `cancel`, `list`, `get` (detailed view with recent messages), `wait` (block until completion with timeout)
1082
+ - Inter-agent messaging via `message` mode
1083
+ - Token budget estimation via `budget` mode
1084
+ - Execution plan introspection via `plan` mode
1085
+ - Git worktree isolation: each agent can work in its own branch, merged back on completion
1086
+ - Batch spawning via `batch-spawn` mode
1087
+ - WRFC chain introspection via `wrfc-chains` and `wrfc-history` modes
1088
+ - Cohort tracking via `cohort-status` and `cohort-report` modes
1089
+
1090
+ ### state
1091
+
1092
+ Session state, persistent memory, telemetry, hooks, and output modes — all in one tool.
1093
+
1094
+ - KV state: session-scoped key-value store with atomic persistence
1095
+ - Durable memory posture: inspect the reviewed knowledge substrate and related runtime state, while the full durable-memory workflow lives under `/recall` and the knowledge panels
1096
+ - Hook management: list, enable, disable, add, and remove hooks at runtime
1097
+ - Output mode switching: switch between `default`, `vibecoding`, and `justvibes` verbosity presets
1098
+ - Analytics: record tool calls, query by filter, export as JSON/CSV, dashboard view — backed by WASM SQLite
1099
+ - Context and budget reporting for token usage awareness
1100
+
1101
+ ### workflow
1102
+
1103
+ Workflow state machines, automation triggers, and scheduled tasks.
1104
+
1105
+ - Named workflow definitions: `wrfc` (work-review-fix cycle), `fix_loop`, `test_then_fix`, `review_only`
1106
+ - State machine with validated transitions — prevents invalid state changes
1107
+ - Automation triggers: fire shell commands when specific hook events occur, with optional JS conditions
1108
+ - Cron scheduler: full 5-field cron expressions with IANA timezone support, missed-run detection, per-task run history, and enable/disable control. Persists to `.goodvibes/tui/schedules.json`
1109
+ - Full lifecycle: start, transition, cancel, list active instances
1110
+
1111
+ ### task / team / worklist
1112
+
1113
+ Structured execution and coordination tools beyond a single conversation turn.
1114
+
1115
+ - `task`: create, inspect, block, cancel, depend, and hand off tasks across sessions
1116
+ - `team`: define teams, members, lanes, and role assignments
1117
+ - `worklist`: manage durable worklists with ownership and priority
1118
+
1119
+ ### packet / query
1120
+
1121
+ Durable planning and operator-communication artifacts.
1122
+
1123
+ - `packet`: create, revise, publish, and list implementation packets / execution packets
1124
+ - `query`: track operator queries, answers, escalation targets, and closure state
1125
+
1126
+ ### mcp / remote / control
1127
+
1128
+ Additional product-control tools that expose runtime breadth directly.
1129
+
1130
+ - `mcp`: inspect MCP servers, tools, schema freshness, security posture, auth posture, and quarantine controls
1131
+ - `remote`: inspect and manage distributed peers, node-host contracts, work queues, artifacts, and review flows
1132
+ - `control`: inspect packaged command families, panel/control-room families, built-in subscription providers, and sandbox presets
1133
+
1134
+ ### channel
1135
+
1136
+ The `channel` tool exposes the omnichannel runtime directly to the model and operator flows.
1137
+
1138
+ - list accounts per surface and inspect individual account/setup state
1139
+ - run account lifecycle actions such as setup, inspect, retest, connect, disconnect, login, and logout
1140
+ - query shared channel directories and resolve targets across supported surfaces
1141
+ - inspect channel capabilities, tools, agent-tools, and operator actions
1142
+ - run channel-owned tools/actions and perform authorization checks through the same surface registry used by the daemon and reply pipeline
1143
+
1144
+ ### registry
1145
+
1146
+ Discover and introspect skills, agents, and tools.
1147
+
1148
+ - Fuzzy search across skills (`.goodvibes/skills/*.md`), agents (`.goodvibes/agents/*.md`), and built-in tools
1149
+ - Task-based recommendations: describe what you want to do, get ranked suggestions
1150
+ - Dependency chain resolution for skills
1151
+ - Full content retrieval for any registry item
1152
+
1153
+ ---
1154
+
1155
+ ## Evaluation, Replay, Diagnostics, And Incidents
1156
+
1157
+ GoodVibes includes a substantial post-execution and operator-repair stack:
1158
+
1159
+ - `/eval` runs built-in evaluation suites, compares baselines, and applies regression gates
1160
+ - `/replay` loads and steps deterministic replay runs
1161
+ - `/incident` opens, exports, and captures forensics bundles
1162
+ - `Health` and diagnostics surfaces expose repair actions, transport issues, task failure state, and replay hooks
1163
+ - the state inspector subsystem tracks transitions, time-travel snapshots, and selector hotspots
1164
+ - telemetry exporters can write to local ledgers, console sinks, or OTLP bridges
1165
+ - retention and pruning policy keeps checkpoint/snapshot growth bounded
1166
+ - idempotency keys prevent duplicate tool execution across replay, reconnect, and retry scenarios
1167
+ - operational playbooks describe symptoms, checks, and resolution steps for runtime failure classes
1168
+
1169
+ The product also includes validation, replay, incident, telemetry, and repair infrastructure.
1170
+
1171
+ The adjacent reliability subsystems include:
1172
+
1173
+ - notifications
1174
+ - performance budgets and panel-health monitoring
1175
+ - retention and pruning
1176
+ - idempotency protection
1177
+ - machine-readable recovery playbooks
1178
+
1179
+ Those pieces cover conversation-noise routing, panel-health/performance budgets, snapshot pruning, duplicate-execution protection, and machine-readable recovery playbooks used by the diagnostics surface.
1180
+
1181
+ ---
1182
+
1183
+ ## Slash Commands
1184
+
1185
+ | Command | Aliases | Description |
1186
+ |---------|---------|-------------|
1187
+ | `/model [id]` | `/m` | Select or display the current LLM model |
1188
+ | `/provider [name]` | `/p` | Switch provider, or `add <name> <baseURL> [apiKey]` / `remove <name>` |
1189
+ | `/effort [level]` | `/e` | Show or set reasoning effort level |
1190
+ | `/config [key] [value]` | `/cfg` | Show, set, or reset config values. Subcommands: `profile`, `diff`, `reset` |
1191
+ | `/debug` | — | Toggle debug mode |
1192
+ | `/lines [all\|code\|off]` | — | Cycle or set line-number mode |
1193
+ | `/expand [type]` | — | Expand blocks by type (all/thinking/tool/code) |
1194
+ | `/collapse [type]` | — | Collapse blocks by type |
1195
+ | `/bookmarks` | `/bm` | List bookmarked blocks |
1196
+ | `/settings` | `/cfg-ui` | Open the config/settings browser modal |
1197
+ | `/clear` | `/cls` | Clear the conversation display (keeps LLM context) |
1198
+ | `/reset` | — | Full reset: clear display and conversation context |
1199
+ | `/compact` | — | Compact conversation context using hybrid structured compaction (v2) |
1200
+ | `/export [format] [path]` | — | Export conversation (markdown by default) |
1201
+ | `/share [format] [path]` | `/shr` | Export session as shareable html, json, or md (supports `--redact`) |
1202
+ | `/title [text]` | — | Show or set the conversation title |
1203
+ | `/save [name]` | — | Save current session |
1204
+ | `/load <name>` | — | Load a saved session |
1205
+ | `/sessions` | — | List saved sessions |
1206
+ | `/session [action]` | `/sess` | Full session management: list, rename, resume, fork, save, info, export, search, delete |
1207
+ | `/undo [file]` | `/u` | Remove last turn, or `/undo file` to revert last file write/edit |
1208
+ | `/redo [file]` | — | Restore last undone turn, or `/redo file` to re-apply last reverted file |
1209
+ | `/retry [text]` | `/r` | Re-send the last user message |
1210
+ | `/template` | `/tmpl` | Manage prompt templates: save, use, list, edit, delete |
1211
+ | `/tools` | `/t` | List available tools |
1212
+ | `/permissions` | `/perms` | Show or set permission mode and per-tool settings |
1213
+ | `/secrets` | — | Manage encrypted and provider-backed API key secrets (set/link/get/test/list/delete) |
1214
+ | `/services` | `/svc` | Manage API service configurations |
1215
+ | `/accounts [action]` | — | Review provider-account routes, auth posture, and repair actions |
1216
+ | `/auth [action]` | — | Review auth posture and manage local service auth users/sessions |
1217
+ | `/memory [action]` | — | Session memory management: `list`, `add <text>`, `remove <id>` |
1218
+ | `/recall [action]` | `/rc` | Durable knowledge and memory substrate: capture, review, explain, export, import, and handoff |
1219
+ | `/knowledge [action]` | `/know`, `/kb` | Structured knowledge graph: ingest URLs/bookmarks, inspect issues, build packets, and run consolidation jobs |
1220
+ | `/context` | `/ctx` | Inspect context window usage (token breakdown per message) |
1221
+ | `/next-error` | `/ne` | Jump to the next error message in the conversation |
1222
+ | `/prev-error` | `/pe` | Jump to the previous error message in the conversation |
1223
+ | `/profiles` | `/profile` | Browse and load config profiles |
1224
+ | `/pin [id]` | — | Pin a model as favorite |
1225
+ | `/unpin [id]` | — | Remove a model from favorites |
1226
+ | `/git [action]` | `/g` | Git commands: status, log, diff. Opens git panel if no action given |
1227
+ | `/scan` | — | Scan for local LLM servers |
1228
+ | `/plan [task]` | — | Manage execution plans: create, list, or `show <id>` |
1229
+ | `/panel [action]` | `/panels` | Panel management: open, close, list, toggle, move, focus, split, width, height |
1230
+ | `/plugin [action]` | — | Manage plugins (enable/disable/reload/list) |
1231
+ | `/marketplace [action]` | — | Browse curated plugin, skill, hook-pack, and policy-pack surfaces |
1232
+ | `/branch [name]` | `/br` | List conversation branches or switch to one |
1233
+ | `/fork [name]` | `/branch-save` | Save a named snapshot of the current conversation |
1234
+ | `/merge <name>` | — | Append messages from a branch after the fork point |
1235
+ | `/agents` | — | List active and completed agents |
1236
+ | `/wrfc` | — | Show WRFC chain status |
1237
+ | `/health [action]` | — | Unified runtime health review and repair entry point |
1238
+ | `/guidance [action]` | — | Contextual operational guidance without cluttering the conversation |
1239
+ | `/remote [action]` | — | Distributed peer, node-host contract, work-queue, and artifact control room |
1240
+ | `/sandbox [action]` | — | Isolation presets, doctor/probe, sessions, and QEMU setup flows |
1241
+ | `/setup [action]` | — | First-run readiness, services, sandbox, transfer bundles, and deep links |
1242
+ | `/worktree [action]` | — | Inspect orchestrator-owned worktrees and recovery posture |
1243
+ | `/eval [action]` | — | Evaluation harness: suites, baselines, and regression gates |
1244
+ | `/replay [action]` | `/rep` | Deterministic replay load / step / seek / diff / export |
1245
+ | `/incident [action]` | — | Incident bundle review, export, and durable-memory capture |
1246
+ | `/teleport [action]` | — | Portable remote-session handoff bundles |
1247
+ | `/commands` | `/cmds` | Browse all commands in a scrollable list |
1248
+ | `/shortcuts` | `/keys`, `/keybinds` | Show keyboard shortcuts reference |
1249
+ | `/keybindings` | `/kb` | List current keyboard bindings and their config file path |
1250
+ | `/danger [key] [value]` | — | Danger zone settings (agent recursion, daemon, HTTP listener) |
1251
+ | `/schedule [action]` | `/sched` | Manage scheduled agent tasks (cron): add, list, remove, enable, disable, run |
1252
+ | `/image <path>` | `/img` | Attach an image file to the next message |
1253
+ | `/refresh-models` | — | Refresh model catalog, benchmarks, and token limits |
1254
+ | `/notify [action]` | `/ntf` | Manage webhook notifications (ntfy.sh): add, remove, list, clear, test |
1255
+ | `/voice [action]` | — | Review optional voice posture and export/inspect voice bundles |
1256
+ | `/diff [target]` | `/d` | Show unified diff: session, head, working, staged, or a git ref |
1257
+ | `/mcp [tools]` | — | List connected MCP servers and their tools |
1258
+ | `/help [command]` | `/h`, `/?` | Show available commands and keyboard shortcuts |
1259
+ | `/quit` | `/q`, `/:q` | Exit the application |
1260
+
1261
+ > **Tip:** Use the `/add-provider` skill for interactive guided provider setup with smart defaults for popular providers.
1262
+ >
1263
+ > Additional front doors exist for narrower product surfaces, including `approval`, `knowledge`, `memory-review`, `memory-sync`, `session-memory`, `team-memory`, `remote-setup`, `remote-env`, `runner-pool`, `bootstrap`, `tunnel`, `voice`, `hooks`, `security`, `policy`, `orchestration`, `communication`, `ops`, `cockpit`, `trust`, `welcome`, `login`, `logout`, `bridge`, `install`, `update`, and related setup/review helpers.
1264
+
1265
+ ---
1266
+
1267
+ ## Keyboard Shortcuts
1268
+
1269
+ All shortcuts are customizable via `~/.goodvibes/tui/keybindings.json`. Use `/keybindings` to view current bindings.
1270
+
1271
+ ### Input & Editing
1272
+
1273
+ | Key | Action |
1274
+ |-----|--------|
1275
+ | `Enter` | Send message |
1276
+ | `Shift+Enter` | Insert newline |
1277
+ | `Tab` | Toggle block collapse / path completion |
1278
+ | `Ctrl+U` | Clear the prompt line |
1279
+ | `Ctrl+W` | Delete word backward |
1280
+ | `Ctrl+K` | Kill to end of line |
1281
+ | `Ctrl+Z` | Undo prompt edit |
1282
+ | `Ctrl+Shift+Z` | Redo prompt edit |
1283
+ | `Ctrl+V` | Paste (image or text) |
1284
+ | `@` | Open file picker (insert file path) |
1285
+ | `?` | Open help/command picker (empty prompt) |
1286
+
1287
+ ### Navigation
1288
+
1289
+ | Key | Action |
1290
+ |-----|--------|
1291
+ | `Arrow Up / Down` | Scroll conversation / recall input history |
1292
+ | `PageUp / PageDown` | Scroll by page |
1293
+ | `Ctrl+R` | Reverse input history search |
1294
+ | `Ctrl+E` | Move to end of line / next error |
1295
+ | `Ctrl+A` | Move to start of line / apply nearest diff |
1296
+ | `Mouse wheel` | Scroll |
1297
+ | `Click drag` | Select text |
1298
+ | `Middle click` | Paste |
1299
+ | `Escape` | Exit current mode (search, command, modal) |
1300
+
1301
+ ### Blocks & Content
1302
+
1303
+ | Key | Action |
1304
+ |-----|--------|
1305
+ | `Ctrl+Y` | Copy nearest block to clipboard |
1306
+ | `Ctrl+S` | Save nearest block to file |
1307
+ | `Ctrl+B` | Bookmark nearest block |
1308
+ | `Ctrl+F` | Open conversation search overlay |
1309
+ | `Ctrl+L` | Clear screen |
1310
+ | `Ctrl+Shift+C` | Copy selection |
1311
+
1312
+ ### Panels
1313
+
1314
+ | Key | Action |
1315
+ |-----|--------|
1316
+ | `Ctrl+P` | Toggle panel sidebar |
1317
+ | `Ctrl+}` | Next panel tab |
1318
+ | `Ctrl+~` | Previous panel tab |
1319
+ | `,` / `.` | Cycle panel tabs (when panel focused) |
1320
+
1321
+ ### System
1322
+
1323
+ | Key | Action |
1324
+ |-----|--------|
1325
+ | `Ctrl+C` | Clear input / cancel generation / exit (double-press to quit) |
1326
+
1327
+ ---
1328
+
1329
+ ## Agent System
1330
+
1331
+ Agents are in-process subagents with isolated conversation history, a scoped tool registry, and optional git worktree. They run asynchronously and report back through the agent message bus.
1332
+
1333
+ ### Built-In Archetypes
1334
+
1335
+ | Archetype | Tools | Description |
1336
+ |-----------|-------|-------------|
1337
+ | `engineer` | read, write, edit, find, exec, analyze | Full-stack implementation agent |
1338
+ | `reviewer` | read, find, analyze | Code review and quality assessment |
1339
+ | `tester` | read, write, find, exec | Test writing and execution |
1340
+ | `researcher` | read, find, analyze, inspect | Codebase exploration and analysis |
1341
+ | `general` | read, write, edit, find, exec | General purpose agent |
1342
+
1343
+ ### Custom Archetypes
1344
+
1345
+ Drop a Markdown file into `.goodvibes/agents/` with YAML frontmatter:
1346
+
1347
+ ```markdown
1348
+ ---
1349
+ name: documenter
1350
+ description: API documentation writer
1351
+ tools: [read, find, write]
1352
+ model: claude-haiku-4-5
1353
+ ---
1354
+
1355
+ You are a technical documentation specialist. Focus on clarity and completeness.
1356
+ ```
1357
+
1358
+ The markdown body becomes the agent's system prompt.
1359
+
1360
+ ### Spawning an Agent
1361
+
1362
+ Use the `agent` tool from within a conversation:
1363
+
1364
+ ```
1365
+ spawn an engineer agent to refactor src/utils.ts
1366
+ ```
1367
+
1368
+ Or use the tool directly with the `agent` tool's spawn mode, specifying an archetype and task.
1369
+
1370
+ ### Git Worktree Isolation
1371
+
1372
+ When an agent is spawned, it can be given its own git worktree. On completion, changes are merged back. On cancellation or error, the worktree is cleaned up.
1373
+
1374
+ ---
1375
+
1376
+ ## Hook System
1377
+
1378
+ Hooks fire on lifecycle events throughout a session. They are configured in `.goodvibes/hooks.json` (or a custom file set in `tools.hooksFile`).
1379
+
1380
+ ### Event Path Format
1381
+
1382
+ ```
1383
+ Phase:Category:Specific
1384
+ ```
1385
+
1386
+ - **Phases**: `Pre`, `Post`, `Fail`, `Change`, `Lifecycle`
1387
+ - **Categories**: `tool`, `file`, `git`, `agent`, `compact`, `llm`, `mcp`, `config`, `budget`, `session`, `workflow`
1388
+ - Wildcards are supported: `Pre:tool:*` matches all pre-tool events
1389
+
1390
+ ### Hook Types
1391
+
1392
+ | Type | Description |
1393
+ |------|-------------|
1394
+ | `command` | Run a shell command. Event data passed via stdin as JSON. |
1395
+ | `prompt` | Send a prompt to an LLM. `$ARGUMENTS` is replaced with the event JSON. |
1396
+ | `agent` | Spawn a subagent to handle the event. |
1397
+ | `http` | POST the event payload to a URL. |
1398
+ | `ts` | Execute a TypeScript module that exports a default handler function. |
1399
+
1400
+ ### Example hooks.json
1401
+
1402
+ ```json
1403
+ {
1404
+ "hooks": {
1405
+ "Post:tool:write": [
1406
+ {
1407
+ "type": "command",
1408
+ "command": "echo 'File written: $FILE' >> .goodvibes/write-log.txt",
1409
+ "async": true,
1410
+ "description": "Log all file writes"
1411
+ }
1412
+ ],
1413
+ "Pre:tool:exec": [
1414
+ {
1415
+ "type": "prompt",
1416
+ "prompt": "Review this command for safety: $ARGUMENTS",
1417
+ "model": "claude-haiku-4-5",
1418
+ "description": "Safety check before exec"
1419
+ }
1420
+ ]
1421
+ }
1422
+ }
1423
+ ```
1424
+
1425
+ ### Hook Chains
1426
+
1427
+ Chains trigger an action only after a sequence of events occurs, with optional time windows and conditions:
1428
+
1429
+ ```json
1430
+ {
1431
+ "chains": [
1432
+ {
1433
+ "name": "notify-after-agent-completes",
1434
+ "steps": [
1435
+ { "match": "Lifecycle:agent:spawned" },
1436
+ { "match": "Lifecycle:agent:completed", "within": "5m" }
1437
+ ],
1438
+ "action": {
1439
+ "type": "command",
1440
+ "command": "notify-send 'Agent finished'"
1441
+ }
1442
+ }
1443
+ ]
1444
+ }
1445
+ ```
1446
+
1447
+ Hook properties: `match`, `type`, `command`/`prompt`/`url`/`path`, `async`, `once`, `timeout`, `enabled`, `name`.
1448
+
1449
+ ---
1450
+
1451
+ ## MCP Integration
1452
+
1453
+ Connect to any MCP-compatible server by adding it to `.goodvibes/mcp.json`:
1454
+
1455
+ ```json
1456
+ {
1457
+ "servers": [
1458
+ {
1459
+ "name": "filesystem",
1460
+ "command": "npx",
1461
+ "args": ["-y", "@modelcontextprotocol/server-filesystem", "/tmp"]
1462
+ },
1463
+ {
1464
+ "name": "github",
1465
+ "command": "npx",
1466
+ "args": ["-y", "@modelcontextprotocol/server-github"],
1467
+ "env": {
1468
+ "GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_..."
1469
+ }
1470
+ }
1471
+ ]
1472
+ }
1473
+ ```
1474
+
1475
+ MCP tools appear in the tool registry as `mcp:<server-name>:<tool-name>`. Tool schemas are loaded progressively — names and descriptions at startup, full parameter schemas on first use. Connections are auto-restarted on crash.
1476
+
1477
+ MCP tool calls respect the `permissions.tools.mcp` setting (default: `prompt`).
1478
+
1479
+ Current MCP product loops also include:
1480
+
1481
+ - trust posture and quarantine review
1482
+ - auth-review and reconnect flows
1483
+ - sandbox-backed execution when isolation is configured
1484
+ - routing into dedicated MCP and Health workspaces
1485
+
1486
+ Useful commands:
1487
+
1488
+ - `/mcp`
1489
+ - `/mcp review`
1490
+ - `/mcp auth-review`
1491
+ - `/mcp repair`
1492
+
1493
+ ---
1494
+
1495
+ ## Plugin System
1496
+
1497
+ Extend goodvibes-tui with custom plugins. Place plugin folders in `~/.goodvibes/tui/plugins/`:
1498
+
1499
+ Each plugin has a `manifest.json` and an entry file (default: `index.ts`):
1500
+
1501
+ ```json
1502
+ {
1503
+ "name": "my-plugin",
1504
+ "version": "1.0.0",
1505
+ "description": "My custom plugin"
1506
+ }
1507
+ ```
1508
+
1509
+ Plugins receive a sandboxed API with:
1510
+ - `registerCommand()` — add custom slash commands
1511
+ - `registerProvider()` / `registerProviderInstance()` — add OpenAI-compatible or fully custom LLM providers
1512
+ - `registerTool()` — add custom tools available to the LLM
1513
+ - `registerGatewayMethod()` — add control-plane/API methods
1514
+ - `registerChannelPlugin()` / `registerDeliveryStrategy()` — extend omnichannel surfaces
1515
+ - `registerMemoryEmbeddingProvider()` — extend sqlite-vec-backed memory indexing
1516
+ - `registerVoiceProvider()` / `registerMediaProvider()` / `registerWebSearchProvider()` — extend voice, media, and search families
1517
+ - `onEvent()` — subscribe to typed runtime events
1518
+ - `getConfig()` — read plugin-specific settings
1519
+ - `log()` — emit structured plugin logs
1520
+
1521
+ Manage via `/plugin enable|disable|reload|list`.
1522
+
1523
+ ---
1524
+
1525
+ ## Architecture
1526
+
1527
+ ```text
1528
+ src/
1529
+ ├── main.ts / core/ — terminal entrypoint, orchestrator, transcript lifecycle
1530
+ ├── renderer/ / panels/ — raw ANSI UI, overlays, control rooms, panel workspaces
1531
+ ├── input/ — slash commands, keybindings, prompt/input routing
1532
+ ├── providers/ — native providers, compat providers, discovery, synthetic failover, model catalog
1533
+ ├── tools/ — built-in tool implementations and schemas
1534
+ ├── agents/ — in-process agents, WRFC, archetypes, worktrees, reports
1535
+ ├── automation/ — schedules, routes, job persistence, managed automation runtime
1536
+ ├── channels/ / adapters/ — channel plugins, reply pipeline, delivery routing, webhook adapters
1537
+ ├── daemon/ / control-plane/ — local daemon host, HTTP routes, gateway/catalog/operator surfaces
1538
+ ├── artifacts/ — durable file/object storage used by media, knowledge, export, and delivery
1539
+ ├── knowledge/ — connectors, extractors, SQL-backed graph store, GraphQL, projections, consolidation
1540
+ ├── web-search/ — provider-backed search runtime and normalization layer
1541
+ ├── voice/ — TTS/STT/realtime provider runtime
1542
+ ├── media/ — media understanding/generation provider registry
1543
+ ├── multimodal/ — unified image/audio/video/document analysis and packet/write-back logic
1544
+ ├── runtime/ — typed store, events, emitters, tasks, notifications, auth, diagnostics, eval, remote, sandbox
1545
+ ├── config/ / security/ — settings, secrets, services, subscriptions, local auth
1546
+ ├── hooks/ / mcp/ / plugins/ — extensibility and external tool surfaces
1547
+ ├── export/ / profiles/ / sessions/ — data export, profiles, persistence
1548
+ └── discovery/ / intelligence/ — local server discovery plus tree-sitter/LSP intelligence
1549
+ ```
1550
+
1551
+ ### Key Design Decisions
1552
+
1553
+ - **Bun runtime** — native TypeScript execution, fast startup, built-in test runner
1554
+ - **Raw ANSI renderer** — direct control over every byte sent to the terminal
1555
+ - **In-process agents** — agents share the same process and memory, avoiding IPC overhead while maintaining isolation through scoped registries and namespaced state
1556
+ - **Tree-sitter for code intelligence** — 17 language grammars (TypeScript, TSX, JavaScript, Python, Rust, Go, Java, C, C++, Ruby, Bash, JSON, YAML, TOML, CSS, HTML, Markdown) for structural analysis, outline extraction, and AST-level edits — with 6 (TypeScript, TSX, JavaScript, Python, JSON, CSS) embedded as WASM for instant startup
1557
+ - **Bundled language servers** — TypeScript, Python, Bash, CSS, HTML, and JSON language servers ship as npm dependencies and work out of the box. Rust (`rust-analyzer`) and Go (`gopls`) are downloaded automatically on first use with SHA256 integrity verification. No manual LSP setup required.
1558
+ - **SQL.js for analytics** — WASM SQLite for in-process tool call telemetry
1559
+ - **Zustand vanilla store** — a plain Zustand store with typed selectors and dispatch paths, usable from agents, tools, renderer, hooks, channels, and daemon surfaces
1560
+ - **Agent Client Protocol** — subagents communicate via @agentclientprotocol/sdk over stdio ndJsonStream
1561
+ - **Backend-first external surface** — the daemon/control plane exposes typed HTTP/gateway methods for knowledge, artifacts, media, search, channels, and remote peers so future clients do not have to reimplement runtime logic
1562
+ - **Plugin system** — manifest.json + sandboxed API surface for commands, providers, tools, gateway methods, channels, embeddings, voice, media, and search
1563
+ - **Crash recovery** — periodic JSONL snapshots with recovery prompt on next startup
1564
+
1565
+ ---
1566
+
1567
+ ## Development
1568
+
1569
+ ### Run in dev mode
1570
+
1571
+ ```sh
1572
+ bun run dev
1573
+ ```
1574
+
1575
+ ### Run tests
1576
+
1577
+ ```sh
1578
+ bun test
1579
+ ```
1580
+
1581
+ 6,900+ tests across contract, security, release gate, runtime, renderer, panel, integration, and UX anti-regression suites. Performance budget gate runs as part of CI — the build fails if any of the 5 perf budgets (store update latency, event dispatch latency, tool execution overhead, compaction duration, startup time) are exceeded.
1582
+
1583
+ ### Build standalone binary
1584
+
1585
+ ```sh
1586
+ bun run build
1587
+ # outputs dist/goodvibes
1588
+ ```
1589
+
1590
+ ### Project structure conventions
1591
+
1592
+ - Tool implementations live in `src/tools/<name>/index.ts`
1593
+ - Tool parameter schemas live in `src/tools/<name>/schema.ts`
1594
+ - Tests mirror the source tree under `src/test/`
1595
+ - Project runtime data such as sessions, hooks, MCP config, artifacts, and local state lives under `.goodvibes/` in the working directory
1596
+ - Global TUI settings live in `~/.goodvibes/tui/settings.json`; project overrides live in `.goodvibes/tui/settings.json`
1597
+ - Secure secrets live in `.goodvibes/tui/secrets.enc` or `~/.goodvibes/tui/secrets.enc`; plaintext compatibility stores use `.goodvibes/goodvibes.secrets.json`
1598
+ - Service registry entries live in `.goodvibes/tui/services.json`; custom provider JSON lives in `~/.goodvibes/tui/providers/`
1599
+ - Agent archetypes go in `.goodvibes/agents/*.md`
1600
+ - MCP server config goes in `.goodvibes/mcp.json`
1601
+ - Hook config goes in `.goodvibes/hooks.json` (or the file set in `tools.hooksFile`)
1602
+
1603
+ ---
1604
+
1605
+ ## License
1606
+
1607
+ MIT