@johpaz/hive-agents 0.0.47 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (322) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +128 -897
  3. package/dist/hive.js +222237 -206295
  4. package/dist/tool-worker.js +226 -927
  5. package/dist/ui/assets/A2UIPage-D4nzp5NV.js +8 -0
  6. package/dist/ui/assets/AgentCreateForm-M2RhjeA1.js +1 -0
  7. package/dist/ui/assets/AgentDetailPage-DkFRtj8g.js +1 -0
  8. package/dist/ui/assets/AgentNewPage-CfBU7puz.js +1 -0
  9. package/dist/ui/assets/AgentsPage-Ctzq2LWx.js +10 -0
  10. package/dist/ui/assets/ApiClientPage-DKbGO1QW.js +3 -0
  11. package/dist/ui/assets/ChannelsPage-H6rgr8DQ.js +8 -0
  12. package/dist/ui/assets/DashboardPage-BIjYGf4m.js +6 -0
  13. package/dist/ui/assets/{LoginPage-BTxJdFVG.js → LoginPage-DazoxtBJ.js} +1 -1
  14. package/dist/ui/assets/{LogsPage-DVV2eHbh.js → LogsPage-DMZ6KtQ3.js} +1 -1
  15. package/dist/ui/assets/MeetingPage-CSLFvHL7.js +1 -0
  16. package/dist/ui/assets/ModelSelector-BCfvugHB.js +1 -0
  17. package/dist/ui/assets/{NotFound-BIUDlIXU.js → NotFound-Bpr12V51.js} +1 -1
  18. package/dist/ui/assets/Office3DPage-BE6Epe0d.js +4614 -0
  19. package/dist/ui/assets/Office3DPage-C3SIzd2H.css +1 -0
  20. package/dist/ui/assets/ProvidersPage-D0cApfM1.js +1 -0
  21. package/dist/ui/assets/{RecoverPage-7YDQysBL.js → RecoverPage-BVUPHG9z.js} +1 -1
  22. package/dist/ui/assets/SettingsPage-DCZ4nql4.js +9 -0
  23. package/dist/ui/assets/SetupPage-In19p30M.js +1 -0
  24. package/dist/ui/assets/WebChatPage-ByVBSzxL.js +29 -0
  25. package/dist/ui/assets/{activity-c3pNngT_.js → activity-BIIli7ET.js} +1 -1
  26. package/dist/ui/assets/agentCapabilities-D1PD9yFH.js +1 -0
  27. package/dist/ui/assets/alert-CQlRq6sv.js +1 -0
  28. package/dist/ui/assets/arrow-left-BfcnX8Er.js +1 -0
  29. package/dist/ui/assets/arrow-right-Q-dzAn8k.js +1 -0
  30. package/dist/ui/assets/arrow-up-right-Bf-8wrUQ.js +1 -0
  31. package/dist/ui/assets/badge-DKGZbVZJ.js +1 -0
  32. package/dist/ui/assets/{calendar-B-KZ9RQO.js → calendar-S9-_Q6QR.js} +1 -1
  33. package/dist/ui/assets/{card-CNf6BS2e.js → card-D3Nw3kh3.js} +1 -1
  34. package/dist/ui/assets/check-CryV78SQ.js +1 -0
  35. package/dist/ui/assets/chevron-down-QCtMs-Af.js +1 -0
  36. package/dist/ui/assets/chevron-left-dTGbyl5G.js +1 -0
  37. package/dist/ui/assets/chevron-right-D0GjXbnO.js +1 -0
  38. package/dist/ui/assets/chevron-up-Cg0jO8uT.js +1 -0
  39. package/dist/ui/assets/{circle-alert-KuAm2FWh.js → circle-alert-DTVW4R94.js} +1 -1
  40. package/dist/ui/assets/circle-check-BAolxswA.js +1 -0
  41. package/dist/ui/assets/{circle-x-DjLkFDO8.js → circle-x-CJXbXzRh.js} +1 -1
  42. package/dist/ui/assets/{copy-Bu5d7C-0.js → copy-X_TPpA-A.js} +1 -1
  43. package/dist/ui/assets/{dialog-Jk4bieO4.js → dialog-uUBz_NIB.js} +1 -1
  44. package/dist/ui/assets/dist-CD_qfA30.js +1 -0
  45. package/dist/ui/assets/{download-Cjbk4Rek.js → download-C-fXu08w.js} +1 -1
  46. package/dist/ui/assets/earth-CTsVjCmp.js +1 -0
  47. package/dist/ui/assets/ellipsis-vertical-5zBh5yzc.js +1 -0
  48. package/dist/ui/assets/{external-link-6sTlRDUR.js → external-link-CvpRhwC_.js} +1 -1
  49. package/dist/ui/assets/{eye-Df8o0tkC.js → eye-CM-HQEWU.js} +1 -1
  50. package/dist/ui/assets/{file-text-lnxnjBp0.js → file-text-lwkvYGtA.js} +1 -1
  51. package/dist/ui/assets/{gateway-url-DwzPmoc8.js → gateway-url-BlnabM5e.js} +1 -1
  52. package/dist/ui/assets/gauge-CB-cas-h.js +1 -0
  53. package/dist/ui/assets/{history-CAF_R34_.js → history-eSHspWRr.js} +1 -1
  54. package/dist/ui/assets/index-D489S18g.css +2 -0
  55. package/dist/ui/assets/index-ZjAc-KQS.js +116 -0
  56. package/dist/ui/assets/{info-WjromB4Y.js → info-DTgFQ_jA.js} +1 -1
  57. package/dist/ui/assets/key-CeM9JJkq.js +1 -0
  58. package/dist/ui/assets/label-k0jYxoWW.js +1 -0
  59. package/dist/ui/assets/loader-circle-Dtfz4FWw.js +1 -0
  60. package/dist/ui/assets/lock-open-B089GUAJ.js +1 -0
  61. package/dist/ui/assets/mail--gNFIe4M.js +1 -0
  62. package/dist/ui/assets/{pause-VqeUmp2Z.js → pause-DjT1nwQM.js} +1 -1
  63. package/dist/ui/assets/pencil-6PRgdjiU.js +1 -0
  64. package/dist/ui/assets/play-tOrP0xUJ.js +1 -0
  65. package/dist/ui/assets/plus-Cnom3j47.js +1 -0
  66. package/dist/ui/assets/progress-DrI2UDu-.js +1 -0
  67. package/dist/ui/assets/radio-D-joO9J0.js +1 -0
  68. package/dist/ui/assets/{refresh-cw-CCzDCAuz.js → refresh-cw-BRrzoHQW.js} +1 -1
  69. package/dist/ui/assets/scroll-area-CfHn94Vb.js +1 -0
  70. package/dist/ui/assets/search-D277MUP0.js +1 -0
  71. package/dist/ui/assets/select-BOR8MsSL.js +1 -0
  72. package/dist/ui/assets/{send-BPk9XbIq.js → send-DIlj81PT.js} +1 -1
  73. package/dist/ui/assets/{settings-BGfrZ_zM.js → settings-CkBjgAEm.js} +1 -1
  74. package/dist/ui/assets/{shield-CxhcUT39.js → shield-U0hIjGzm.js} +1 -1
  75. package/dist/ui/assets/slider-CmE_z1Ii.js +1 -0
  76. package/dist/ui/assets/{sparkles-BhwlS1pc.js → sparkles-VXHGDbNh.js} +1 -1
  77. package/dist/ui/assets/{square-DMNWw4Hi.js → square-OHeetvN3.js} +1 -1
  78. package/dist/ui/assets/switch-DXcELPsM.js +1 -0
  79. package/dist/ui/assets/tabs-CxiybXcw.js +1 -0
  80. package/dist/ui/assets/terminal-C6YPcJl_.js +1 -0
  81. package/dist/ui/assets/{textarea-B6Z1Zc6W.js → textarea-rp6vsOZl.js} +1 -1
  82. package/dist/ui/assets/{trash-2-xD2o4SgX.js → trash-2-DQxm7DUM.js} +1 -1
  83. package/dist/ui/assets/{triangle-alert-pVIJGjga.js → triangle-alert-Dj8ZhmWj.js} +1 -1
  84. package/dist/ui/assets/{useHiveAgentsModelLoad-BnC4jLE-.js → useHiveAgentsModelLoad-COLvs-Ho.js} +1 -1
  85. package/dist/ui/assets/useOfficeModel-Cy7cAyEn.js +1 -0
  86. package/dist/ui/assets/useProviders-q6iROeWE.js +1 -0
  87. package/dist/ui/assets/utils-Dyb7SC2_.js +1 -0
  88. package/dist/ui/assets/vendor-charts-K3xcRl0X.js +60 -0
  89. package/dist/ui/assets/{vendor-query-DsWPbQdG.js → vendor-query-Dj8xYhQD.js} +1 -1
  90. package/dist/ui/assets/vendor-radix-D0s_k6Gp.js +63 -0
  91. package/dist/ui/assets/vendor-react-CPJEWbIG.js +1 -0
  92. package/dist/ui/assets/{vendor-router-gqiZ7xhx.js → vendor-router-zpB-76nT.js} +1 -1
  93. package/dist/ui/assets/volume-x-Bm735CXN.js +1 -0
  94. package/dist/ui/assets/wifi-DklBfOZ6.js +1 -0
  95. package/dist/ui/assets/{zap-B4RaNNO5.js → zap-BEZNJ0i0.js} +1 -1
  96. package/dist/ui/index.html +16 -13
  97. package/dist/ui/logoblack.png +0 -0
  98. package/dist/ui/logocolor-dark.png +0 -0
  99. package/dist/ui/logocolorbg.png +0 -0
  100. package/dist/ui/logodoradobg.png +0 -0
  101. package/package.json +18 -15
  102. package/packages/cli/src/adapters/config.ts +1 -80
  103. package/packages/cli/src/adapters/factory.ts +0 -45
  104. package/packages/cli/src/adapters/index.ts +0 -8
  105. package/packages/cli/src/commands/doctor.ts +156 -1
  106. package/packages/cli/src/commands/gateway.ts +2 -9
  107. package/packages/cli/src/commands/onboard.ts +126 -59
  108. package/packages/cli/src/index.ts +9 -11
  109. package/packages/cli/src/ui-bundle.generated.ts +9 -92
  110. package/packages/core/src/agent/acceptance-checks.ts +172 -0
  111. package/packages/core/src/agent/agent-catalog.ts +348 -0
  112. package/packages/core/src/agent/agent-loop.ts +204 -28
  113. package/packages/core/src/agent/capability-search.ts +5 -5
  114. package/packages/core/src/agent/catalog-selector.ts +103 -0
  115. package/packages/core/src/agent/compaction.ts +52 -42
  116. package/packages/core/src/agent/context-compiler.ts +185 -63
  117. package/packages/core/src/agent/conversation-store.ts +56 -3
  118. package/packages/core/src/agent/curator.ts +129 -34
  119. package/packages/core/src/agent/delegation-runtime.ts +241 -0
  120. package/packages/core/src/agent/goal-runner.ts +111 -32
  121. package/packages/core/src/agent/index.ts +17 -0
  122. package/packages/core/src/agent/llm-client.ts +34 -2
  123. package/packages/core/src/agent/llm-providers/anthropic.ts +10 -7
  124. package/packages/core/src/agent/llm-providers/hiveagents.ts +1 -1
  125. package/packages/core/src/agent/llm-providers/interface.ts +16 -5
  126. package/packages/core/src/agent/llm-providers/modelscope.ts +5 -0
  127. package/packages/core/src/agent/llm-providers/openai-compat-base.ts +1 -1
  128. package/packages/core/src/agent/llm-providers/z-ai.ts +5 -0
  129. package/packages/core/src/agent/minimal-loadout.ts +47 -0
  130. package/packages/core/src/agent/playbook-selector.ts +1 -1
  131. package/packages/core/src/agent/prompt-builder.ts +4 -0
  132. package/packages/core/src/agent/proof-packet.ts +6 -1
  133. package/packages/core/src/agent/providers/index.ts +9 -4
  134. package/packages/core/src/agent/routing-intent.ts +22 -0
  135. package/packages/core/src/agent/run-store.ts +24 -3
  136. package/packages/core/src/agent/service.ts +2 -2
  137. package/packages/core/src/agent/skill-selector.ts +12 -31
  138. package/packages/core/src/agent/tool-selector.ts +61 -36
  139. package/packages/core/src/agent/tracer.ts +5 -1
  140. package/packages/core/src/artifacts/store.ts +162 -0
  141. package/packages/core/src/canvas/canvas-manager.ts +5 -234
  142. package/packages/core/src/canvas/emitter.ts +121 -69
  143. package/packages/core/src/canvas/index.ts +0 -2
  144. package/packages/core/src/channels/base.ts +3 -1
  145. package/packages/core/src/channels/manager.ts +117 -25
  146. package/packages/core/src/channels/webchat.ts +4 -8
  147. package/packages/core/src/channels/whatsapp.ts +6 -1
  148. package/packages/core/src/config/loader.ts +13 -23
  149. package/packages/core/src/events/agent-bus.ts +0 -31
  150. package/packages/core/src/events/channel-narration.ts +150 -0
  151. package/packages/core/src/events/narration.ts +82 -0
  152. package/packages/core/src/events/tool-narration.ts +62 -0
  153. package/packages/core/src/gateway/channel-notify.ts +43 -10
  154. package/packages/core/src/gateway/delegation-groups.ts +258 -0
  155. package/packages/core/src/gateway/delegation-notify.ts +103 -0
  156. package/packages/core/src/gateway/durable-queue.ts +33 -2
  157. package/packages/core/src/gateway/helpers/index.ts +2 -2
  158. package/packages/core/src/gateway/helpers/narration.ts +4 -57
  159. package/packages/core/src/gateway/helpers/redact.ts +1 -1
  160. package/packages/core/src/gateway/helpers/ui-source.ts +67 -0
  161. package/packages/core/src/gateway/initializer.ts +15 -13
  162. package/packages/core/src/gateway/job-executors.ts +197 -104
  163. package/packages/core/src/gateway/lane-queue.ts +1 -1
  164. package/packages/core/src/gateway/notification-inbox.ts +57 -0
  165. package/packages/core/src/gateway/resolver.ts +11 -25
  166. package/packages/core/src/gateway/routes/agents.ts +91 -1
  167. package/packages/core/src/gateway/routes/auth.ts +21 -42
  168. package/packages/core/src/gateway/routes/channels.ts +15 -1
  169. package/packages/core/src/gateway/routes/chat.ts +6 -6
  170. package/packages/core/src/gateway/routes/cron-api.ts +0 -4
  171. package/packages/core/src/gateway/routes/mcp.ts +0 -63
  172. package/packages/core/src/gateway/routes/meeting.ts +245 -0
  173. package/packages/core/src/gateway/routes/models.ts +69 -12
  174. package/packages/core/src/gateway/routes/providers.ts +111 -28
  175. package/packages/core/src/gateway/routes/setup.ts +92 -35
  176. package/packages/core/src/gateway/routes/skills.ts +2 -2
  177. package/packages/core/src/gateway/routes/system.ts +31 -10
  178. package/packages/core/src/gateway/routes/users.ts +24 -1
  179. package/packages/core/src/gateway/routes/voice.ts +3 -0
  180. package/packages/core/src/gateway/server.ts +207 -141
  181. package/packages/core/src/gateway/session.ts +6 -4
  182. package/packages/core/src/gateway/slash-commands.ts +7 -6
  183. package/packages/core/src/gateway/webchat-turn.ts +63 -13
  184. package/packages/core/src/index.ts +3 -0
  185. package/packages/core/src/mcp/hot-reload.ts +14 -7
  186. package/packages/core/src/mcp/singleton.ts +0 -3
  187. package/packages/core/src/mcp/tool-sync.ts +2 -2
  188. package/packages/core/src/resilience/retry.ts +1 -1
  189. package/packages/core/src/scheduler/CronScheduler.ts +3 -1
  190. package/packages/core/src/scheduler/integration.ts +1 -1
  191. package/packages/core/src/storage/bootstrap.ts +34 -10
  192. package/packages/core/src/storage/collections.ts +167 -27
  193. package/packages/core/src/storage/crypto.ts +147 -58
  194. package/packages/core/src/storage/hivedb.ts +9 -0
  195. package/packages/core/src/storage/model-id.ts +53 -0
  196. package/packages/core/src/storage/onboarding.ts +160 -34
  197. package/packages/core/src/storage/reconcile.ts +2 -5
  198. package/packages/core/src/storage/seed.ts +436 -158
  199. package/packages/core/src/storage/usage.ts +61 -132
  200. package/packages/core/src/storage/user-email.ts +11 -0
  201. package/packages/core/src/tool-runtime/index.ts +69 -23
  202. package/packages/core/src/tool-runtime/worker-tools.ts +4 -2
  203. package/packages/core/src/{canvas/a2ui-tools.ts → tools/a2ui/index.ts} +17 -8
  204. package/packages/core/src/tools/agents/index.ts +566 -85
  205. package/packages/core/src/tools/core/index.ts +28 -10
  206. package/packages/core/src/tools/cron/index.ts +1 -6
  207. package/packages/core/src/tools/index.ts +19 -46
  208. package/packages/core/src/tools/types.ts +1 -1
  209. package/packages/core/src/tools/web/artifact-inspect.ts +23 -0
  210. package/packages/core/src/tools/web/browser-backend.ts +129 -0
  211. package/packages/core/src/tools/web/browser-screenshot.ts +26 -5
  212. package/packages/core/src/tools/web/browser-service.ts +75 -35
  213. package/packages/core/src/tools/web/index.ts +3 -0
  214. package/packages/core/src/tools/web/webview-backend.ts +412 -0
  215. package/packages/core/src/utils/logger.ts +58 -30
  216. package/packages/core/src/utils/toon.ts +0 -20
  217. package/packages/core/src/voice/index.ts +108 -17
  218. package/packages/mcp/src/manager.ts +8 -7
  219. package/packages/mcp/src/transports/sse.ts +0 -4
  220. package/packages/mcp/src/transports/websocket.ts +0 -6
  221. package/packages/skills/src/bundled/{canvas → a2ui}/a2ui_dashboard/SKILL.md +4 -4
  222. package/packages/skills/src/bundled/{canvas → a2ui}/a2ui_form/SKILL.md +4 -4
  223. package/packages/skills/src/bundled/{canvas → a2ui}/a2ui_interactive/SKILL.md +5 -5
  224. package/packages/skills/src/bundled/agents/agent_spawner/SKILL.md +24 -18
  225. package/packages/skills/src/bundled/agents/task_orchestrator/SKILL.md +48 -148
  226. package/packages/skills/src/bundled/cli/cli_pipeline/SKILL.md +9 -10
  227. package/packages/skills/src/bundled/cli/cli_safe_exec/SKILL.md +1 -1
  228. package/packages/skills/src/bundled/cli/software_engineering/SKILL.md +23 -0
  229. package/packages/skills/src/bundled/cron_manager/SKILL.md +2 -2
  230. package/packages/skills/src/bundled/cron_reminder/SKILL.md +7 -7
  231. package/packages/skills/src/bundled/filesystem/file_read_and_summarize/SKILL.md +11 -10
  232. package/packages/skills/src/bundled/filesystem/file_writer/SKILL.md +29 -35
  233. package/packages/skills/src/bundled/filesystem/workspace_file_operator/SKILL.md +22 -0
  234. package/packages/skills/src/bundled/search_knowledge/capability_discovery/SKILL.md +5 -4
  235. package/packages/skills/src/bundled-data.generated.ts +640 -1226
  236. package/dist/ui/assets/AgentCreateForm-DzaIT-dA.js +0 -1
  237. package/dist/ui/assets/AgentDetailPage-DgqcJceY.js +0 -1
  238. package/dist/ui/assets/AgentNewPage-CNSpoOSA.js +0 -1
  239. package/dist/ui/assets/AgentsPage-BMUJzTD6.js +0 -10
  240. package/dist/ui/assets/ApiClientPage-Cum_a_3j.js +0 -3
  241. package/dist/ui/assets/CanvasPage-o6oCP6uq.js +0 -33
  242. package/dist/ui/assets/ChannelsPage-WrB0zwLq.js +0 -8
  243. package/dist/ui/assets/DashboardPage-BCd6kNw0.js +0 -6
  244. package/dist/ui/assets/MeetingPage-BULIAWzq.js +0 -1
  245. package/dist/ui/assets/ModelSelector-BMYOChYb.js +0 -1
  246. package/dist/ui/assets/ProvidersPage-BVN5UZrI.js +0 -1
  247. package/dist/ui/assets/SettingsPage-CYmpFfDn.js +0 -9
  248. package/dist/ui/assets/SetupPage-Dnmb1Lbv.js +0 -1
  249. package/dist/ui/assets/WebChatPage-DmmdFhIC.js +0 -16
  250. package/dist/ui/assets/accordion-CnLzKNHK.js +0 -1
  251. package/dist/ui/assets/alert-B9J6KHmt.js +0 -1
  252. package/dist/ui/assets/alert-dialog-KcYQWcJ6.js +0 -1
  253. package/dist/ui/assets/arrow-left-CBcbX5EZ.js +0 -1
  254. package/dist/ui/assets/badge-88dRb4M8.js +0 -1
  255. package/dist/ui/assets/bell-8BqRYmzf.js +0 -1
  256. package/dist/ui/assets/chevron-down-DIosfU_U.js +0 -1
  257. package/dist/ui/assets/chevron-left-D4U-5A27.js +0 -1
  258. package/dist/ui/assets/chevron-right-CR4Skrf3.js +0 -1
  259. package/dist/ui/assets/chevron-up-CI-W21Fy.js +0 -1
  260. package/dist/ui/assets/circle-check-6Ard1-2z.js +0 -1
  261. package/dist/ui/assets/dropdown-menu-DDiaHg5y.js +0 -1
  262. package/dist/ui/assets/es-4I-joeZz.js +0 -1
  263. package/dist/ui/assets/folder-open-DJBLDFjv.js +0 -1
  264. package/dist/ui/assets/format-DsLPBxvt.js +0 -1
  265. package/dist/ui/assets/gauge-B8Tj43rC.js +0 -1
  266. package/dist/ui/assets/hexagon-6L79pgVK.js +0 -1
  267. package/dist/ui/assets/index-BmwTAwOF.css +0 -2
  268. package/dist/ui/assets/index-Cyw7L0Li.js +0 -116
  269. package/dist/ui/assets/key-DyKOoQh5.js +0 -1
  270. package/dist/ui/assets/label-B_15zZlR.js +0 -1
  271. package/dist/ui/assets/loader-circle-BmBOgYze.js +0 -1
  272. package/dist/ui/assets/lock-BS6OLXPv.js +0 -1
  273. package/dist/ui/assets/play-zJpWuhrr.js +0 -1
  274. package/dist/ui/assets/plus-BZQX26Dr.js +0 -1
  275. package/dist/ui/assets/progress-D5c-Eilm.js +0 -1
  276. package/dist/ui/assets/scroll-area-CihOx0cb.js +0 -1
  277. package/dist/ui/assets/search-DzDptO9s.js +0 -1
  278. package/dist/ui/assets/select-BQCOjM2j.js +0 -1
  279. package/dist/ui/assets/slider-bcUiUfx0.js +0 -14
  280. package/dist/ui/assets/switch-BR30E4ej.js +0 -1
  281. package/dist/ui/assets/table-B3aGEaVp.js +0 -1
  282. package/dist/ui/assets/tabs-LQidMKRS.js +0 -1
  283. package/dist/ui/assets/terminal--7G943As.js +0 -1
  284. package/dist/ui/assets/useProviders-C1xVKLxB.js +0 -1
  285. package/dist/ui/assets/utils-3pnRFmFe.js +0 -1
  286. package/dist/ui/assets/vendor-charts-Bu2lyBKP.js +0 -65
  287. package/dist/ui/assets/vendor-radix-D6rA7xKY.js +0 -63
  288. package/dist/ui/assets/vendor-react-BU5iQU4f.js +0 -1
  289. package/dist/ui/assets/volume-2-BekVQl6P.js +0 -1
  290. package/packages/core/src/agent/context-guard.ts +0 -91
  291. package/packages/core/src/agent/hooks.ts +0 -166
  292. package/packages/core/src/agent/providers.ts +0 -1
  293. package/packages/core/src/auth/auth.ts +0 -111
  294. package/packages/core/src/auth/index.ts +0 -1
  295. package/packages/core/src/canvas/canvas-tools.ts +0 -448
  296. package/packages/core/src/gateway/router.ts +0 -126
  297. package/packages/core/src/scheduler/dag/AgentExecutor.ts +0 -53
  298. package/packages/core/src/scheduler/dag/DAGScheduler.ts +0 -250
  299. package/packages/core/src/scheduler/dag/EventBridge.ts +0 -122
  300. package/packages/core/src/scheduler/dag/TaskGraph.ts +0 -192
  301. package/packages/core/src/scheduler/dag/TaskNode.ts +0 -97
  302. package/packages/core/src/scheduler/dag/TaskResult.ts +0 -22
  303. package/packages/core/src/scheduler/dag/errors.ts +0 -37
  304. package/packages/core/src/scheduler/dag/index.ts +0 -26
  305. package/packages/core/src/scheduler/dag/presets/ResearchPreset.ts +0 -97
  306. package/packages/core/src/scheduler/dag/strategies/ParallelStrategy.ts +0 -21
  307. package/packages/core/src/scheduler/dag/strategies/PriorityStrategy.ts +0 -46
  308. package/packages/core/src/scheduler/index.ts +0 -22
  309. package/packages/core/src/scheduler/task-driver.ts +0 -216
  310. package/packages/core/src/tools/canvas/index.ts +0 -420
  311. package/packages/core/src/tools/meeting/index.ts +0 -336
  312. package/packages/core/src/tools/projects/index.ts +0 -348
  313. package/packages/core/src/tools/voice/index.ts +0 -104
  314. package/packages/core/src/utils/index.ts +0 -5
  315. package/packages/skills/src/bundled/agents/code_delegator/SKILL.md +0 -156
  316. package/packages/skills/src/bundled/canvas/canvas_dashboard/SKILL.md +0 -146
  317. package/packages/skills/src/bundled/canvas/canvas_interact/SKILL.md +0 -148
  318. package/packages/skills/src/bundled/canvas/canvas_report/SKILL.md +0 -146
  319. package/packages/skills/src/bundled/meeting/meeting_transcription/SKILL.md +0 -213
  320. package/packages/skills/src/bundled/voice/voice_assistant/SKILL.md +0 -174
  321. package/packages/skills/src/bundled/voice/voice_input/SKILL.md +0 -146
  322. package/packages/skills/src/bundled/voice/voice_output/SKILL.md +0 -151
@@ -35,6 +35,16 @@ function checkNode(): { ok: boolean; version: string } {
35
35
  }
36
36
  }
37
37
 
38
+ /** Tamaño total de un directorio, recursivo. */
39
+ function dirSize(dir: string): number {
40
+ let total = 0;
41
+ for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
42
+ const full = path.join(dir, entry.name);
43
+ total += entry.isDirectory() ? dirSize(full) : fs.statSync(full).size;
44
+ }
45
+ return total;
46
+ }
47
+
38
48
  function isGatewayRunning(): boolean {
39
49
  if (!fs.existsSync(getPidFile())) return false;
40
50
  const pid = parseInt(fs.readFileSync(getPidFile(), "utf-8").trim(), 10);
@@ -135,7 +145,7 @@ export async function doctor(): Promise<void> {
135
145
  if (fs.existsSync(getHiveDirConst())) {
136
146
  checks.push({ category: "Sistema", name: "Directorio Hive", status: "ok", message: getHiveDirConst() });
137
147
  } else {
138
- checks.push({ category: "Sistema", name: "Directorio Hive", status: "error", message: "no existe", hint: "Ejecuta 'hive onboard'" });
148
+ checks.push({ category: "Sistema", name: "Directorio Hive", status: "error", message: "no existe", hint: "Ejecuta 'hive start' — abre el asistente de configuración si es la primera vez" });
139
149
  }
140
150
 
141
151
  // Base de Datos
@@ -145,6 +155,78 @@ export async function doctor(): Promise<void> {
145
155
  checks.push({ category: "Sistema", name: "Base de Datos", status: "warn", message: "hivedb no existe" });
146
156
  }
147
157
 
158
+ // Integridad de la BD — HiveDB es un directorio con varios componentes que
159
+ // tienen que estar los cuatro: el store de documentos, el índice de texto, el
160
+ // vectorial y el meta. Que falte uno no impide abrir la base, pero deja
161
+ // búsquedas mudas en vez de errores, que es peor.
162
+ if (fs.existsSync(getDbFile())) {
163
+ const componentes = ["collections.redb", "meta.json", "fts", "vec"];
164
+ const faltantes = componentes.filter((c) => !fs.existsSync(path.join(getDbFile(), c)));
165
+
166
+ if (faltantes.length > 0) {
167
+ checks.push({
168
+ category: "Integridad",
169
+ name: "Componentes",
170
+ status: "error",
171
+ message: `faltan: ${faltantes.join(", ")}`,
172
+ hint: "La base está incompleta. Restaurá una copia o reiniciá para re-sembrar.",
173
+ });
174
+ } else {
175
+ const bytes = dirSize(getDbFile());
176
+ checks.push({
177
+ category: "Integridad",
178
+ name: "Componentes",
179
+ status: "ok",
180
+ message: `${componentes.length}/4 presentes — ${(bytes / 1024 / 1024).toFixed(1)} MB`,
181
+ });
182
+ }
183
+
184
+ // Lectura real: que los archivos existan no prueba que se puedan leer.
185
+ try {
186
+ const { ensureHiveDb } = await import("@johpaz/hive-agents-core/storage/bootstrap");
187
+ const { col } = await import("@johpaz/hive-agents-core/storage/hive");
188
+ await ensureHiveDb();
189
+
190
+ let filas = 0;
191
+ for (const nombre of ["agents", "models", "providers", "tools", "skills"]) {
192
+ filas += await (await col(nombre)).count();
193
+ }
194
+ checks.push({
195
+ category: "Integridad",
196
+ name: "Lectura",
197
+ status: "ok",
198
+ message: `${filas} filas leídas de 5 colecciones`,
199
+ });
200
+ } catch (e) {
201
+ const mensaje = (e as Error).message;
202
+ // "Cannot acquire lock" significa que otro proceso la tiene abierta —el
203
+ // gateway, o un `bun -e` que quedó colgado—, no que esté rota. Tratarlo
204
+ // como corrupción manda a restaurar un backup sin motivo.
205
+ const enUso = /already open|acquire lock|locked/i.test(mensaje);
206
+ checks.push({
207
+ category: "Integridad",
208
+ name: "Lectura",
209
+ status: enUso ? "warn" : "error",
210
+ message: enUso ? "en uso por otro proceso — no se pudo verificar" : `la base no se pudo leer: ${mensaje}`,
211
+ hint: enUso
212
+ ? "Detené el gateway (hive stop) y volvé a correr el diagnóstico."
213
+ : "Puede haber quedado corrupta. Si tenés una copia de <HIVE_HOME>/data, restaurala.",
214
+ });
215
+ }
216
+
217
+ // No hay backup automático: hive-db 0.3.1 no expone snapshot ni checkpoint,
218
+ // y copiar el directorio con el gateway corriendo puede dar una copia
219
+ // desgarrada entre collections.redb y los índices. Mejor decirlo que
220
+ // simularlo.
221
+ checks.push({
222
+ category: "Integridad",
223
+ name: "Backup",
224
+ status: "warn",
225
+ message: "sin copia automática",
226
+ hint: `Con el gateway detenido: cp -r "${getDbFile()}" "${getDbFile()}.bak"`,
227
+ });
228
+ }
229
+
148
230
  // Configuración (In-memory/Env)
149
231
  try {
150
232
  const config = loadConfig();
@@ -280,6 +362,79 @@ export async function doctor(): Promise<void> {
280
362
  });
281
363
  }
282
364
 
365
+ // Agentes — propuestas pendientes del curador ACE (agentProposals). El
366
+ // curador nunca deshabilita un agente de catálogo por su cuenta: cuando
367
+ // harmful_count supera a helpful_count, deja una propuesta "disable_agent"
368
+ // para que una persona decida. Nada la resuelve automáticamente, así que
369
+ // se acumulan hasta que alguien las revisa — doctor las saca a la luz.
370
+ try {
371
+ const { ensureHiveDb } = await import("@johpaz/hive-agents-core/storage/bootstrap");
372
+ const { col } = await import("@johpaz/hive-agents-core/storage/hive");
373
+ await ensureHiveDb();
374
+
375
+ const proposalsCol = await col<{ status: string; type: string; agent_id: string }>("agentProposals");
376
+ const pending = (await proposalsCol.scan({})).filter(
377
+ (entry) => entry.doc.status === "proposed" && entry.doc.type === "disable_agent"
378
+ );
379
+
380
+ if (pending.length > 0) {
381
+ const agentsCol = await col<{ name: string }>("agents");
382
+ const names = await Promise.all(
383
+ pending.map(async (entry) => (await agentsCol.get(entry.doc.agent_id))?.doc.name ?? entry.doc.agent_id)
384
+ );
385
+ checks.push({
386
+ category: "Agentes",
387
+ name: "Propuestas del curador",
388
+ status: "warn",
389
+ message: `${pending.length} agente(s) marcado(s) para revisión: ${names.join(", ")}`,
390
+ hint: "Revisá el panel 'Salud del Enjambre' en el Dashboard — no hay todavía un comando para aprobar/descartar propuestas.",
391
+ });
392
+ } else {
393
+ checks.push({
394
+ category: "Agentes",
395
+ name: "Propuestas del curador",
396
+ status: "ok",
397
+ message: "sin propuestas pendientes",
398
+ });
399
+ }
400
+ } catch {
401
+ checks.push({
402
+ category: "Agentes",
403
+ name: "Propuestas del curador",
404
+ status: "warn",
405
+ message: "No se pudo verificar (BD no disponible)",
406
+ });
407
+ }
408
+
409
+ // Navegador — qué backend va a usar el agente y si el elegido es viable acá.
410
+ try {
411
+ const { resolveBackendKind, isWebViewSupported, findChrome } = await import(
412
+ "@johpaz/hive-agents-core/tools/web/browser-backend"
413
+ );
414
+ const config = loadConfig();
415
+ const kind = resolveBackendKind(config.tools?.browser?.backend);
416
+
417
+ if (kind === "webview" && !isWebViewSupported()) {
418
+ checks.push({
419
+ category: "Navegador",
420
+ name: "Backend",
421
+ status: "error",
422
+ message: "webview elegido pero no hay motor disponible",
423
+ hint: "WebKit sólo existe en macOS. Instalá Chrome, definí BUN_CHROME_PATH, o usá el backend agent-browser.",
424
+ });
425
+ } else {
426
+ const detalle = kind === "webview" ? `motor ${findChrome() ? "chrome" : "webkit"}, in-process` : "Chrome via CLI";
427
+ checks.push({ category: "Navegador", name: "Backend", status: "ok", message: `${kind} (${detalle})` });
428
+ }
429
+ } catch (e) {
430
+ checks.push({
431
+ category: "Navegador",
432
+ name: "Backend",
433
+ status: "warn",
434
+ message: `no se pudo determinar: ${(e as Error).message}`,
435
+ });
436
+ }
437
+
283
438
  // Gateway
284
439
  const running = isGatewayRunning();
285
440
  checks.push({ category: "Gateway", name: "Estado", status: running ? "ok" : "warn", message: running ? "corriendo" : "detenido" });
@@ -46,13 +46,6 @@ async function getAdapter(): Promise<InstallationAdapter> {
46
46
  return _adapter;
47
47
  }
48
48
 
49
- /**
50
- * Reset the cached adapter (for testing or forced re-detection)
51
- */
52
- export function resetAdapter(): void {
53
- _adapter = null;
54
- }
55
-
56
49
  /**
57
50
  * Start UI server with embedded or filesystem assets
58
51
  */
@@ -253,7 +246,7 @@ async function isRunning(): Promise<boolean> {
253
246
  // HTTP health check first — if the port responds, something is running
254
247
  // regardless of PID file or adapter state
255
248
  try {
256
- const coreConfig = await loadConfig().catch(() => null);
249
+ const coreConfig = loadConfig();
257
250
  const port = coreConfig?.gateway?.port ?? 18790;
258
251
  const res = await fetch(`http://127.0.0.1:${port}/health`, {
259
252
  signal: AbortSignal.timeout(600),
@@ -594,7 +587,7 @@ async function handleDevMode(
594
587
  ║ UI: ${url.padEnd(24)}║
595
588
  ║ API: http://127.0.0.1:18790 ║
596
589
  ║ WebSocket: ws://127.0.0.1:18790/ws ║
597
- ║ Canvas: ws://127.0.0.1:18790/canvas║
590
+ ║ Actividad: ws://127.0.0.1:18790/canvas║
598
591
  ║ Vite HMR: http://localhost:5173 ║
599
592
  ╠════════════════════════════════════════╣
600
593
  ║ ${setupMode ? "🎉 Primer arranque — abriendo setup..." : "Administra tu Hive aquí "}║
@@ -15,6 +15,38 @@ import {
15
15
  import { generateAuthToken } from "../utils/token";
16
16
  import { getHiveDir } from "../../../core/src/config/loader";
17
17
 
18
+ /**
19
+ * Modelos de voz que ofrece el asistente, con el id **tal como se llama la fila
20
+ * del catálogo**.
21
+ *
22
+ * Los `value` se guardan verbatim en `channels.stt_provider`/`tts_provider`, así
23
+ * que un id que no exista en `models` rompe tres cosas a la vez y en silencio:
24
+ * el modelo no se activa, `saveVoiceConfig` no resuelve el provider y por eso
25
+ * **no guarda la API key**, y el canal queda apuntando a una fila inexistente.
26
+ * Groq revende, así que sus filas llevan el prefijo `groq/`.
27
+ *
28
+ * `tests/voice-groq.test.ts` verifica que cada value de acá exista en el seed.
29
+ */
30
+ export const ONBOARDING_STT_OPTIONS = [
31
+ { value: "groq/whisper-large-v3-turbo", label: "Groq Whisper Large V3 Turbo", hint: "Recomendado - rápido" },
32
+ { value: "groq/whisper-large-v3", label: "Groq Whisper Large V3", hint: "Máxima precisión" },
33
+ { value: "whisper-1", label: "OpenAI Whisper 1", hint: "Alternativa" },
34
+ ] as const;
35
+
36
+ export const ONBOARDING_TTS_OPTIONS = [
37
+ { value: "eleven_flash_v2_5", label: "ElevenLabs Flash V2.5", hint: "Tiempo real - recomendado" },
38
+ { value: "eleven_turbo_v2_5", label: "ElevenLabs Turbo V2.5", hint: "Balance calidad/velocidad" },
39
+ { value: "eleven_multilingual_v2", label: "ElevenLabs Multilingual V2", hint: "Alta calidad" },
40
+ { value: "eleven_v3", label: "ElevenLabs V3", hint: "Más expresivo" },
41
+ { value: "groq/canopylabs/orpheus-v1-english", label: "Orpheus V1 English (Groq)", hint: "Expresivo - inglés" },
42
+ { value: "qwen3-tts-instruct-flash", label: "Qwen TTS Flash", hint: "Gratis - recomendado" },
43
+ { value: "gpt-4o-mini-tts", label: "OpenAI GPT-4o Mini TTS", hint: "Usa tu API key" },
44
+ { value: "tts-1", label: "OpenAI TTS-1", hint: "Estándar" },
45
+ { value: "tts-1-hd", label: "OpenAI TTS-1 HD", hint: "Alta calidad" },
46
+ { value: "gemini-2.5-flash-preview-tts", label: "Gemini 2.5 Flash TTS", hint: "Google" },
47
+ { value: "gemini-2.5-pro-preview-tts", label: "Gemini 2.5 Pro TTS", hint: "Google Pro" },
48
+ ] as const;
49
+
18
50
  // Log helper for @clack/prompts v0.5.1 (log export not available)
19
51
  const log = {
20
52
  success: (msg: string) => console.log(`\x1b[32m✔\x1b[0m ${msg}`),
@@ -50,16 +82,21 @@ function reloadEnvToProcess(hiveDir: string): void {
50
82
  }
51
83
  }
52
84
 
85
+ // Cada valor debe existir en SEED_DATA.models (packages/core/src/storage/seed.ts):
86
+ // el onboarding guarda esto como model_id del coordinador, y un id que no esté en
87
+ // el catálogo queda desvinculado en el próximo re-seed.
53
88
  const DEFAULT_MODELS: Record<string, string> = {
54
- anthropic: "claude-sonnet-4-6",
55
- openai: "gpt-5.2",
56
- gemini: "gemini-3.1-flash-preview",
89
+ anthropic: "claude-sonnet-5",
90
+ openai: "gpt-5.6-luna",
91
+ gemini: "gemini-3.6-flash",
57
92
  mistral: "mistral-large-latest",
58
- deepseek: "deepseek-chat",
59
- kimi: "kimi-k2.5",
60
- openrouter: "meta-llama/llama-3.3-70b-instruct",
93
+ deepseek: "deepseek-v4-flash",
94
+ kimi: "kimi-k3",
95
+ openrouter: "openrouter/anthropic/claude-sonnet-5",
61
96
  ollama: "llama3.3:8b",
62
- nvidia: "meta/llama-3.3-70b-instruct",
97
+ nvidia: "nvidia/nvidia/nemotron-3-super-120b-a12b",
98
+ "z-ai": "glm-5.2",
99
+ minimax: "MiniMax-M3",
63
100
  hiveagents: "Qwen-AgentWorld-35B-A3B-UD-Q4_K_M.gguf",
64
101
  };
65
102
 
@@ -69,10 +106,12 @@ const PROVIDER_BASE_URLS: Record<string, string> = {
69
106
  gemini: "https://generativelanguage.googleapis.com",
70
107
  mistral: "https://api.mistral.ai/v1",
71
108
  deepseek: "https://api.deepseek.com",
72
- kimi: "https://api.moonshot.cn",
109
+ kimi: "https://api.moonshot.ai/v1",
73
110
  openrouter: "https://openrouter.ai/api",
74
111
  ollama: "http://localhost:11434",
75
112
  nvidia: "https://integrate.api.nvidia.com/v1",
113
+ "z-ai": "https://api.z.ai/api/paas/v4",
114
+ minimax: "https://api.minimaxi.com/v1",
76
115
  hiveagents: "https://llm.hiveagents.io/v1",
77
116
  };
78
117
 
@@ -86,6 +125,8 @@ const API_KEY_PLACEHOLDERS: Record<string, string> = {
86
125
  openrouter: "sk-or-...",
87
126
  ollama: "",
88
127
  nvidia: "nvapi-...",
128
+ "z-ai": "sk-...",
129
+ minimax: "sk-...",
89
130
  hiveagents: "Bearer token...",
90
131
  };
91
132
 
@@ -95,31 +136,33 @@ const API_KEY_LINKS: Record<string, string> = {
95
136
  gemini: "https://aistudio.google.com/app/apikey",
96
137
  mistral: "https://console.mistral.ai/api-keys",
97
138
  deepseek: "https://platform.deepseek.com/api_keys",
98
- kimi: "https://platform.moonshot.cn/console/api-keys",
139
+ kimi: "https://platform.kimi.ai/console/api-keys",
99
140
  openrouter: "https://openrouter.ai/keys",
100
141
  ollama: "",
101
142
  nvidia: "https://build.nvidia.com/",
143
+ "z-ai": "https://z.ai/manage-apikey/apikey-list",
144
+ minimax: "https://platform.minimaxi.com/user-center/basic-information/interface-key",
102
145
  hiveagents: "",
103
146
  };
104
147
 
105
148
  const AVAILABLE_MODELS: Record<string, Array<{ value: string; label: string; hint?: string }>> = {
106
149
  anthropic: [
107
- { value: "claude-sonnet-4-6", label: "Claude Sonnet 4.6", hint: "Recomendado — mejor equilibrio, 1M contexto" },
108
- { value: "claude-opus-4-6", label: "Claude Opus 4.6", hint: "Más potente — agentic coding, 1M contexto" },
109
- { value: "claude-haiku-4-6", label: "Claude Haiku 4.6", hint: "Más rápido y económico" },
150
+ { value: "claude-sonnet-5", label: "Claude Sonnet 5", hint: "Recomendado — mejor equilibrio, 1M contexto" },
151
+ { value: "claude-opus-5", label: "Claude Opus 5", hint: "Más potente — agentic coding, 1M contexto" },
152
+ { value: "claude-fable-5", label: "Claude Fable 5", hint: "Máxima capacidad — agentes de larga duración" },
153
+ { value: "claude-haiku-4-5-20251001", label: "Claude Haiku 4.5", hint: "Más rápido y económico — 200K contexto" },
110
154
  ],
111
155
  openai: [
112
- { value: "gpt-5.2", label: "GPT-5.2", hint: "Recomendado — 400K contexto, latest" },
113
- { value: "gpt-5.1", label: "GPT-5.1", hint: "Versión anterior estable" },
114
- { value: "gpt-5.2-codex", label: "GPT-5.2 Codex", hint: "Especializado en código" },
115
- { value: "o4-mini", label: "o4-mini", hint: "Razonamiento avanzado, económico" },
156
+ { value: "gpt-5.6-luna", label: "GPT-5.6 Luna", hint: "Recomendado — mejor calidad/precio, 1M contexto" },
157
+ { value: "gpt-5.6-terra", label: "GPT-5.6 Terra", hint: "Equilibrio inteligencia/costo" },
158
+ { value: "gpt-5.6-sol", label: "GPT-5.6 Sol", hint: "Frontier — razonamiento y código complejos" },
116
159
  ],
117
160
  gemini: [
118
- { value: "gemini-3.1-flash-lite-preview", label: "Gemini 3.1 Flash (Preview)", hint: "Frontier-class, muy económico" },
119
- { value: "gemini-3-flash-preview", label: "Gemini 3 Flash (Preview)", hint: "Frontier-class, muy económico" },
120
- { value: "gemini-2.5-flash", label: "Gemini 2.5 Flash", hint: "Recomendado — estable, rápido" },
121
- { value: "gemini-2.5-pro", label: "Gemini 2.5 Pro", hint: "Más potente — razonamiento profundo" },
122
- { value: "gemini-3.1-pro-preview", label: "Gemini 3.1 Pro (Preview)", hint: "Latest — tareas complejas" },
161
+ { value: "gemini-3.6-flash", label: "Gemini 3.6 Flash", hint: "Recomendado — el más nuevo, agentic, 1M contexto" },
162
+ { value: "gemini-3.5-flash", label: "Gemini 3.5 Flash", hint: "Máxima inteligencia sostenida, 1M contexto" },
163
+ { value: "gemini-3.5-flash-lite", label: "Gemini 3.5 Flash Lite", hint: "El más económico de la serie 3.5" },
164
+ { value: "gemini-3.1-pro-preview", label: "Gemini 3.1 Pro (Preview)", hint: "Problemas complejos" },
165
+ { value: "gemini-3.1-flash-lite", label: "Gemini 3.1 Flash Lite", hint: "Frontier-class, muy económico" },
123
166
  ],
124
167
  mistral: [
125
168
  { value: "mistral-large-latest", label: "Mistral Large", hint: "Recomendado — potente, 1M contexto" },
@@ -127,20 +170,19 @@ const AVAILABLE_MODELS: Record<string, Array<{ value: string; label: string; hin
127
170
  { value: "pixtral-large-latest", label: "Pixtral Large", hint: "Multimodal — visión" },
128
171
  ],
129
172
  deepseek: [
130
- { value: "deepseek-chat", label: "DeepSeek-V3", hint: "Recomendado — muy económico, capaz" },
131
- { value: "deepseek-reasoner", label: "DeepSeek-R1", hint: "Razonamiento profundo" },
132
- { value: "deepseek-coder", label: "DeepSeek Coder", hint: "Especializado en código" },
173
+ { value: "deepseek-v4-flash", label: "DeepSeek V4 Flash", hint: "Recomendado — muy económico, 1M contexto" },
174
+ { value: "deepseek-v4-pro", label: "DeepSeek V4 Pro", hint: "Más potente — código y agentes, 1M contexto" },
133
175
  ],
134
176
  kimi: [
135
- { value: "kimi-k2.5", label: "Kimi K2.5", hint: "Recomendado — multimodal, agentic, 1T params" },
136
- { value: "kimi-k2-thinking", label: "Kimi K2 Thinking", hint: "Largo razonamiento" },
137
- { value: "kimi-k2-turbo-preview", label: "Kimi K2 Turbo", hint: "Rápido, preview" },
177
+ { value: "kimi-k3", label: "Kimi K3", hint: "Recomendado — flagship, 1M contexto" },
178
+ { value: "kimi-k2.7-code", label: "Kimi K2.7 Code", hint: "Multimodal, especializado en código" },
179
+ { value: "kimi-k2.6", label: "Kimi K2.6", hint: "Agentic tool use — 256K contexto" },
138
180
  ],
139
181
  openrouter: [
140
- { value: "meta-llama/llama-3.3-70b-instruct", label: "Llama 3.3 70B", hint: "Gratis — GPT-4 level" },
141
- { value: "google/gemini-2.0-flash-exp:free", label: "Gemini 2.0 Flash", hint: "Gratis — 1M contexto" },
142
- { value: "deepseek/deepseek-r1:free", label: "DeepSeek R1", hint: "Gratis — razonamiento fuerte" },
143
- { value: "anthropic/claude-sonnet-4-6", label: "Claude Sonnet 4.6", hint: "Vía OpenRouter" },
182
+ { value: "openrouter/anthropic/claude-sonnet-5", label: "Claude Sonnet 5", hint: "Recomendado — vía OpenRouter" },
183
+ { value: "openrouter/openai/gpt-5.6-sol", label: "GPT-5.6 Sol", hint: "Flagship de OpenAI" },
184
+ { value: "openrouter/google/gemini-3.6-flash", label: "Gemini 3.6 Flash", hint: "Rápido — 1M contexto" },
185
+ { value: "openrouter/deepseek/deepseek-v4-flash", label: "DeepSeek V4 Flash", hint: "Económico — 1M contexto" },
144
186
  ],
145
187
  ollama: [
146
188
  { value: "llama3.3:8b", label: "Llama 3.3 8B", hint: "Recomendado — general, ~5GB RAM" },
@@ -149,12 +191,21 @@ const AVAILABLE_MODELS: Record<string, Array<{ value: string; label: string; hin
149
191
  { value: "phi4:14b", label: "Phi-4 14B", hint: "Mejor calidad, ~8GB RAM" },
150
192
  ],
151
193
  nvidia: [
152
- { value: "meta/llama-3.3-70b-instruct", label: "Llama 3.3 70B", hint: "General — 128K contexto" },
153
- { value: "nvidia/llama-3.1-nemotron-ultra-253b-v1", label: "Nemotron Ultra 253B", hint: "NVIDIA flagship — reasoning" },
154
- { value: "deepseek-ai/deepseek-v3.2", label: "DeepSeek V3.2", hint: "Multimodal, código — 128K" },
155
- { value: "qwen/qwen3-coder-480b-a35b-instruct", label: "Qwen3 Coder 480B", hint: "Especializado en código" },
156
- { value: "google/gemma-4-31b-it", label: "Gemma 4 31B", hint: "Multimodal — 256K contexto" },
157
- { value: "moonshotai/kimi-k2-thinking", label: "Kimi K2 Thinking", hint: "Razonamiento profundo — 256K" },
194
+ { value: "nvidia/nvidia/nemotron-3-super-120b-a12b", label: "Nemotron 3 Super 120B", hint: "Recomendado — agentic, 1M contexto" },
195
+ { value: "nvidia/nvidia/nemotron-3-ultra-550b-a55b", label: "Nemotron 3 Ultra 550B", hint: "NVIDIA flagship — 1M contexto" },
196
+ { value: "nvidia/z-ai/glm-5.2", label: "GLM 5.2", hint: "Agentic workflows y código" },
197
+ { value: "nvidia/moonshotai/kimi-k2.6", label: "Kimi K2.6", hint: "Agentic tool use — 256K" },
198
+ { value: "nvidia/minimaxai/minimax-m3", label: "MiniMax M3", hint: "Multimodal — tool calling" },
199
+ { value: "nvidia/deepseek-ai/deepseek-v4-pro", label: "DeepSeek V4 Pro", hint: "Código y agentes — 1M contexto" },
200
+ ],
201
+ "z-ai": [
202
+ { value: "glm-5.2", label: "GLM 5.2", hint: "Recomendado — 1M contexto, 128K salida" },
203
+ { value: "glm-5.1", label: "GLM 5.1", hint: "Generación anterior — 200K contexto" },
204
+ { value: "glm-5", label: "GLM 5", hint: "200K contexto" },
205
+ ],
206
+ minimax: [
207
+ { value: "MiniMax-M3", label: "MiniMax M3", hint: "Recomendado — multimodal, 1M contexto" },
208
+ { value: "MiniMax-M2.7", label: "MiniMax M2.7", hint: "200K contexto" },
158
209
  ],
159
210
  hiveagents: [
160
211
  { value: "Qwen-AgentWorld-35B-A3B-UD-Q4_K_M.gguf", label: "Qwen-AgentWorld 35B MoE (Recomendado)", hint: "MoE 22.1GB — optimizado para agentes, tool use y MCP" },
@@ -1160,19 +1211,17 @@ async function runFullWizard(): Promise<void> {
1160
1211
  // Ask for STT provider (speech-to-text)
1161
1212
  const sttProvider = await p.select({
1162
1213
  message: "¿Qué servicio de transcripción de voz (STT)?",
1163
- options: [
1164
- { value: "whisper-large-v3-turbo", label: "Groq Whisper Large V3 Turbo", hint: "Recomendado - rápido" },
1165
- { value: "whisper-large-v3", label: "Groq Whisper Large V3", hint: "Máxima precisión" },
1166
- { value: "distil-whisper-large-v3-en", label: "Groq Distil Whisper Large V3", hint: "Solo inglés" },
1167
- { value: "whisper-1", label: "OpenAI Whisper 1", hint: "Alternativa" },
1168
- ],
1169
- initialValue: state.sttProvider || "whisper-large-v3-turbo",
1214
+ options: [...ONBOARDING_STT_OPTIONS],
1215
+ initialValue: state.sttProvider || "groq/whisper-large-v3-turbo",
1170
1216
  });
1171
1217
  if (p.isCancel(sttProvider)) { p.cancel("Onboarding cancelado."); process.exit(0); }
1172
1218
  state.sttProvider = sttProvider as string;
1173
1219
 
1174
- // Ask for API key based on STT provider
1175
- const isGroqStt = ["whisper-large-v3", "whisper-large-v3-turbo", "distil-whisper-large-v3-en"].includes(sttProvider);
1220
+ // Ask for API key based on STT provider. Se aceptan también los ids sin
1221
+ // prefijo y el distil-whisper que Groq deprecó, porque una config vieja
1222
+ // los tiene guardados y igual necesita su GROQ_API_KEY.
1223
+ const isGroqStt = sttProvider.startsWith("groq/")
1224
+ || ["whisper-large-v3", "whisper-large-v3-turbo", "distil-whisper-large-v3-en"].includes(sttProvider);
1176
1225
  const isOpenAiStt = sttProvider === "whisper-1";
1177
1226
 
1178
1227
  if (isGroqStt) {
@@ -1238,30 +1287,48 @@ async function runFullWizard(): Promise<void> {
1238
1287
  // Ask for TTS provider (text-to-speech)
1239
1288
  const ttsProvider = await p.select({
1240
1289
  message: "¿Qué servicio de síntesis de voz (TTS)?",
1241
- options: [
1242
- { value: "eleven_flash_v2_5", label: "ElevenLabs Flash V2.5", hint: "Tiempo real - recomendado" },
1243
- { value: "eleven_turbo_v2_5", label: "ElevenLabs Turbo V2.5", hint: "Balance calidad/velocidad" },
1244
- { value: "eleven_multilingual_v2", label: "ElevenLabs Multilingual V2", hint: "Alta calidad" },
1245
- { value: "eleven_v3", label: "ElevenLabs V3", hint: "Más expresivo" },
1246
- { value: "qwen3-tts-instruct-flash", label: "Qwen TTS Flash", hint: "Gratis - recomendado" },
1247
- { value: "gpt-4o-mini-tts", label: "OpenAI GPT-4o Mini TTS", hint: "Usa tu API key" },
1248
- { value: "tts-1", label: "OpenAI TTS-1", hint: "Estándar" },
1249
- { value: "tts-1-hd", label: "OpenAI TTS-1 HD", hint: "Alta calidad" },
1250
- { value: "gemini-2.5-flash-preview-tts", label: "Gemini 2.5 Flash TTS", hint: "Google" },
1251
- { value: "gemini-2.5-pro-preview-tts", label: "Gemini 2.5 Pro TTS", hint: "Google Pro" },
1252
- ],
1290
+ options: [...ONBOARDING_TTS_OPTIONS],
1253
1291
  initialValue: state.ttsProvider || "eleven_flash_v2_5",
1254
1292
  });
1255
1293
  if (p.isCancel(ttsProvider)) { p.cancel("Onboarding cancelado."); process.exit(0); }
1256
1294
  state.ttsProvider = ttsProvider as string;
1257
1295
 
1258
1296
  // Ask for API key based on TTS provider
1297
+ const isGroqTts = ttsProvider.startsWith("groq/");
1259
1298
  const isElevenLabs = ["eleven_flash_v2_5", "eleven_turbo_v2_5", "eleven_multilingual_v2", "eleven_v3"].includes(ttsProvider);
1260
1299
  const isOpenAI = ["gpt-4o-mini-tts", "tts-1", "tts-1-hd"].includes(ttsProvider);
1261
1300
  const isGemini = ["gemini-2.5-flash-preview-tts", "gemini-2.5-pro-preview-tts"].includes(ttsProvider);
1262
1301
  const isQwen = ["qwen3-tts-instruct-flash", "qwen3-tts-flash", "qwen-tts"].includes(ttsProvider);
1263
1302
 
1264
- if (isElevenLabs) {
1303
+ if (isGroqTts) {
1304
+ // La misma clave que el STT: si ya la pidió arriba, no vuelve a pedirla.
1305
+ const existingGroqKey = getEnvApiKey("GROQ_API_KEY");
1306
+ let groqKey: string | null = existingGroqKey;
1307
+
1308
+ if (!groqKey) {
1309
+ const groqKeyInput = await p.password({
1310
+ message: "Ingresa tu GROQ_API_KEY:",
1311
+ validate: (value) => {
1312
+ if (!value || value.length < 10) return "API key inválida";
1313
+ },
1314
+ });
1315
+ if (p.isCancel(groqKeyInput)) { p.cancel("Onboarding cancelado."); process.exit(0); }
1316
+ groqKey = groqKeyInput as string;
1317
+
1318
+ const hiveDir = getHiveDir();
1319
+ const envPath = path.join(hiveDir, ".env");
1320
+ const envContent = fs.existsSync(envPath) ? fs.readFileSync(envPath, "utf-8") : "";
1321
+ const newEnv = envContent.includes("GROQ_API_KEY")
1322
+ ? envContent.replace(/GROQ_API_KEY=.*/g, `GROQ_API_KEY=${groqKey}`)
1323
+ : envContent + `\nGROQ_API_KEY=${groqKey}`;
1324
+ fs.writeFileSync(envPath, newEnv);
1325
+ reloadEnvToProcess(hiveDir);
1326
+ log.success("✅ API key de Groq guardada en .env");
1327
+ } else {
1328
+ log.info("✅ GROQ_API_KEY ya configurada en .env");
1329
+ }
1330
+ ttsApiKeyValue = groqKey;
1331
+ } else if (isElevenLabs) {
1265
1332
  const existingElevenKey = getEnvApiKey("ELEVENLABS_API_KEY");
1266
1333
  let elevenKey: string | null = existingElevenKey;
1267
1334
 
@@ -1,5 +1,4 @@
1
1
  #!/usr/bin/env bun
2
- import { onboard } from "./commands/onboard";
3
2
  import { start, stop, status, reload } from "./commands/gateway";
4
3
  import { dev } from "./commands/dev";
5
4
  import { agents } from "./commands/agents";
@@ -33,7 +32,6 @@ Gateway:
33
32
  stop Detener el Gateway
34
33
  reload Recargar config sin reiniciar
35
34
  status Estado del Gateway y agentes
36
- onboard Asistente de configuración inicial paso a paso
37
35
 
38
36
  Chat y mensajes:
39
37
  chat [--agent <id>] Chat directo en terminal
@@ -69,9 +67,8 @@ Skills:
69
67
  skills update Actualizar todas las skills
70
68
 
71
69
  Configuración:
72
- config get <key> Leer valor de config
73
- config set <key> <value> Escribir valor de config
74
70
  config show Mostrar config completa
71
+ config edit Mostrar mecanismos de configuración admitidos
75
72
 
76
73
  Sesiones y cron:
77
74
  sessions list Listar sesiones de conversación
@@ -79,8 +76,12 @@ Sesiones y cron:
79
76
  sessions prune Eliminar sesiones inactivas
80
77
  cron list Listar tareas programadas
81
78
  cron add Añadir tarea programada
82
- cron remove <id> Eliminar tarea programada
83
- cron logs Ver logs de ejecuciones cron
79
+ cron pause <id|name> Pausar una tarea programada
80
+ cron resume <id|name> Reanudar una tarea programada
81
+ cron delete <id|name> Eliminar una tarea programada
82
+ cron trigger <id|name> Ejecutar una tarea ahora
83
+ cron history <id|name> Ver historial de ejecuciones
84
+ cron status Estado del scheduler
84
85
  causal watch [--agent <id>] [--stream <id>]
85
86
  Live-tail del event log causal G9 (sin replay histórico)
86
87
 
@@ -96,8 +97,8 @@ Options:
96
97
  --version, -v Mostrar versión
97
98
 
98
99
  Examples:
99
- hive start Arrancar Hive (el browser se abre automáticamente)
100
- hive onboard Configurar Hive por primera vez
100
+ hive start Arrancar Hive (el browser se abre automáticamente,
101
+ y abre el asistente de configuración si es la primera vez)
101
102
  hive chat Chatear con el agente en terminal
102
103
  hive message send --to 123 --content "Hola"
103
104
  hive agent run --message "Analiza README.md" --wait
@@ -121,9 +122,6 @@ async function main(): Promise<void> {
121
122
  const flags = normalizedArgs.filter((a) => a.startsWith("--"));
122
123
 
123
124
  switch (command) {
124
- case "onboard":
125
- await onboard();
126
- break;
127
125
  case "dev":
128
126
  await dev();
129
127
  break;