@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
@@ -1,448 +0,0 @@
1
- import type { Tool } from "../agent/native-tools.ts";
2
- import type { Config } from "../config/loader.ts";
3
- import { canvasManager } from "./canvas-manager.ts";
4
- import { logger } from "../utils/logger.ts";
5
-
6
- export function createCanvasRenderTool(_config: Config): Tool {
7
- const log = logger.child("canvas-render");
8
-
9
- return {
10
- name: "canvas_render",
11
- description: "Render a component on the user's canvas",
12
- parameters: {
13
- type: "object",
14
- properties: {
15
- sessionId: {
16
- type: "string",
17
- description: "Session ID to render to (auto-resolved from user context if omitted)",
18
- },
19
- component: {
20
- type: "object",
21
- properties: {
22
- id: {
23
- type: "string",
24
- description: "Unique component ID",
25
- },
26
- type: {
27
- type: "string",
28
- enum: ["button", "form", "chart", "table", "markdown", "text", "image"],
29
- description: "Component type",
30
- },
31
- props: {
32
- type: "object",
33
- description: "Component properties",
34
- },
35
- span: {
36
- type: "string",
37
- enum: ["full", "half"],
38
- description: "Width span: 'full' for full-width component, 'half' for half width. Default: single column",
39
- },
40
- },
41
- required: ["id", "type", "props"],
42
- },
43
- },
44
- required: ["component"],
45
- },
46
- execute: async (params: Record<string, unknown>, config?: any) => {
47
- const userId = config?.configurable?.user_id;
48
- const rawSessionId = params.sessionId as string;
49
- const sessionId = rawSessionId
50
- ? (rawSessionId.startsWith("canvas:") ? rawSessionId : `canvas:${rawSessionId}`)
51
- : (userId ? `canvas:${userId}` : (() => { throw new Error("No session or user ID provided"); })());
52
- const component = params.component as {
53
- id: string;
54
- type: "button" | "form" | "chart" | "table" | "markdown" | "text" | "image" | "card" | "progress" | "list" | "confirm";
55
- props: Record<string, unknown>;
56
- span?: "full" | "half";
57
- };
58
-
59
- log.debug(`Rendering component ${component.id} to session ${sessionId}`);
60
-
61
- // Check if session is connected, if not try to render to any available session
62
- if (!canvasManager.isSessionConnected(sessionId)) {
63
- const connectedSessions = canvasManager.getConnectedSessions();
64
- if (connectedSessions.length > 0) {
65
- log.warn(`Session ${sessionId} not connected, using first available: ${connectedSessions[0]}`);
66
- } else {
67
- log.warn(`No canvas sessions connected. Rendering to ${sessionId} anyway.`);
68
- }
69
- }
70
-
71
- await canvasManager.render(sessionId, {
72
- id: component.id,
73
- type: component.type as any,
74
- props: component.props,
75
- span: component.span,
76
- });
77
-
78
- return {
79
- success: true,
80
- componentId: component.id,
81
- sessionId,
82
- };
83
- },
84
- };
85
- }
86
-
87
- export function createCanvasAskTool(_config: Config): Tool {
88
- const log = logger.child("canvas-ask");
89
-
90
- return {
91
- name: "canvas_ask",
92
- description: "Display a form and wait for user response",
93
- parameters: {
94
- type: "object",
95
- properties: {
96
- sessionId: {
97
- type: "string",
98
- description: "Session ID",
99
- },
100
- title: {
101
- type: "string",
102
- description: "Form title",
103
- },
104
- fields: {
105
- type: "array",
106
- items: {
107
- type: "object",
108
- properties: {
109
- name: { type: "string" },
110
- label: { type: "string" },
111
- type: { type: "string", enum: ["text", "email", "textarea", "select"] },
112
- required: { type: "boolean" },
113
- options: {
114
- type: "array",
115
- items: {
116
- type: "object",
117
- properties: {
118
- label: { type: "string" },
119
- value: { type: "string" },
120
- },
121
- },
122
- },
123
- },
124
- required: ["name", "label", "type"],
125
- },
126
- description: "Form fields",
127
- },
128
- timeout: {
129
- type: "number",
130
- description: "Timeout in milliseconds (default: 300000)",
131
- },
132
- },
133
- required: ["fields"],
134
- },
135
- execute: async (params: Record<string, unknown>, config?: any) => {
136
- const userId = config?.configurable?.user_id;
137
- const rawSessionId = params.sessionId as string;
138
- const sessionId = rawSessionId
139
- ? (rawSessionId.startsWith("canvas:") ? rawSessionId : `canvas:${rawSessionId}`)
140
- : (userId ? `canvas:${userId}` : (() => { throw new Error("No session or user ID provided"); })());
141
- const title = (params.title as string) ?? "Form";
142
- const fields = params.fields as Array<{
143
- name: string;
144
- label: string;
145
- type: string;
146
- required?: boolean;
147
- options?: Array<{ label: string; value: string }>;
148
- }>;
149
- const timeout = (params.timeout as number) ?? 300000;
150
-
151
- const formId = `form-${Date.now()}`;
152
-
153
- log.debug(`Asking user via form ${formId}`);
154
-
155
- await canvasManager.render(sessionId, {
156
- id: formId,
157
- type: "form",
158
- props: { title, fields },
159
- });
160
-
161
- try {
162
- const response = await canvasManager.waitForInteraction(sessionId, formId, timeout);
163
-
164
- return {
165
- success: true,
166
- formId,
167
- data: response,
168
- };
169
- } catch (error) {
170
- return {
171
- success: false,
172
- formId,
173
- error: (error as Error).message,
174
- };
175
- }
176
- },
177
- };
178
- }
179
-
180
- export function createCanvasClearTool(_config: Config): Tool {
181
- const log = logger.child("canvas-clear");
182
-
183
- return {
184
- name: "canvas_clear",
185
- description: "Clear the canvas for a session",
186
- parameters: {
187
- type: "object",
188
- properties: {
189
- sessionId: {
190
- type: "string",
191
- description: "Session ID to clear",
192
- },
193
- },
194
- required: [],
195
- },
196
- execute: async (params: Record<string, unknown>, config?: any) => {
197
- const userId = config?.configurable?.user_id;
198
- const rawSessionId = params.sessionId as string;
199
- const sessionId = rawSessionId
200
- ? (rawSessionId.startsWith("canvas:") ? rawSessionId : `canvas:${rawSessionId}`)
201
- : (userId ? `canvas:${userId}` : (() => { throw new Error("No session or user ID provided"); })());
202
-
203
- log.debug(`Clearing canvas for session ${sessionId}`);
204
-
205
- await canvasManager.clear(sessionId);
206
-
207
- return { success: true, sessionId };
208
- },
209
- };
210
- }
211
-
212
- export function createCanvasTools(config: Config): Tool[] {
213
- return [
214
- createCanvasRenderTool(config),
215
- createCanvasAskTool(config),
216
- createCanvasClearTool(config),
217
- createCanvasCardTool(config),
218
- createCanvasProgressTool(config),
219
- createCanvasListTool(config),
220
- createCanvasConfirmTool(config),
221
- ];
222
- }
223
-
224
- // ═══════════════════════════════════════════════════════════════════════════
225
- // Extended Canvas Tools for A2UI
226
- // ═══════════════════════════════════════════════════════════════════════════
227
-
228
- export function createCanvasCardTool(_config: Config): Tool {
229
- const log = logger.child("canvas-card");
230
-
231
- return {
232
- name: "canvas_show_card",
233
- description: "Display a card with labeled items (useful for showing status, summaries)",
234
- parameters: {
235
- type: "object",
236
- properties: {
237
- sessionId: { type: "string", description: "Session ID" },
238
- title: { type: "string", description: "Card title" },
239
- items: {
240
- type: "array",
241
- items: {
242
- type: "object",
243
- properties: {
244
- label: { type: "string" },
245
- value: { type: "string" },
246
- variant: { type: "string", enum: ["default", "success", "warning", "danger"] },
247
- },
248
- },
249
- },
250
- actions: {
251
- type: "array",
252
- items: {
253
- type: "object",
254
- properties: {
255
- id: { type: "string" },
256
- label: { type: "string" },
257
- variant: { type: "string", enum: ["primary", "secondary", "danger", "success"] },
258
- },
259
- },
260
- },
261
- span: {
262
- type: "string",
263
- enum: ["full", "half"],
264
- description: "Width span: 'full' for full-width card, 'half' for half width. Default: single column",
265
- },
266
- },
267
- required: ["items"],
268
- },
269
- execute: async (params: Record<string, unknown>, config?: any) => {
270
- const userId = config?.configurable?.user_id;
271
- const rawSessionId = params.sessionId as string;
272
- const sessionId = rawSessionId
273
- ? (rawSessionId.startsWith("canvas:") ? rawSessionId : `canvas:${rawSessionId}`)
274
- : (userId ? `canvas:${userId}` : (() => { throw new Error("No session or user ID provided"); })());
275
- const title = (params.title as string) ?? "Information";
276
- const items = (params.items as Array<{ label: string; value: string; variant?: string }>) ?? [];
277
- const actions = (params.actions as Array<{ id: string; label: string; variant?: string }>) ?? [];
278
- const span = params.span as "full" | "half" | undefined;
279
-
280
- const cardId = `card-${Date.now()}`;
281
-
282
- await canvasManager.render(sessionId, {
283
- id: cardId,
284
- type: "card",
285
- props: { title, items, actions },
286
- span,
287
- });
288
-
289
- return { success: true, cardId, sessionId };
290
- },
291
- };
292
- }
293
-
294
- export function createCanvasProgressTool(_config: Config): Tool {
295
- const log = logger.child("canvas-progress");
296
-
297
- return {
298
- name: "canvas_show_progress",
299
- description: "Display progress bars for tasks (useful for multi-step operations)",
300
- parameters: {
301
- type: "object",
302
- properties: {
303
- sessionId: { type: "string", description: "Session ID" },
304
- tasks: {
305
- type: "array",
306
- items: {
307
- type: "object",
308
- properties: {
309
- id: { type: "string" },
310
- name: { type: "string" },
311
- progress: { type: "number" },
312
- status: { type: "string", enum: ["pending", "running", "completed", "error"] },
313
- },
314
- },
315
- },
316
- span: {
317
- type: "string",
318
- enum: ["full", "half"],
319
- description: "Width span: 'full' for full-width, 'half' for half width. Default: single column",
320
- },
321
- },
322
- required: ["tasks"],
323
- },
324
- execute: async (params: Record<string, unknown>, config?: any) => {
325
- const userId = config?.configurable?.user_id;
326
- const rawSessionId = params.sessionId as string;
327
- const sessionId = rawSessionId
328
- ? (rawSessionId.startsWith("canvas:") ? rawSessionId : `canvas:${rawSessionId}`)
329
- : (userId ? `canvas:${userId}` : (() => { throw new Error("No session or user ID provided"); })());
330
- const tasks = (params.tasks as Array<{ id: string; name: string; progress: number; status?: string }>) ?? [];
331
- const span = params.span as "full" | "half" | undefined;
332
-
333
- const progressId = `progress-${Date.now()}`;
334
-
335
- await canvasManager.render(sessionId, {
336
- id: progressId,
337
- type: "progress",
338
- props: { tasks },
339
- span,
340
- });
341
-
342
- return { success: true, progressId, sessionId };
343
- },
344
- };
345
- }
346
-
347
- export function createCanvasListTool(_config: Config): Tool {
348
- const log = logger.child("canvas-list");
349
-
350
- return {
351
- name: "canvas_show_list",
352
- description: "Display a list of key-value pairs (useful for configuration display)",
353
- parameters: {
354
- type: "object",
355
- properties: {
356
- sessionId: { type: "string", description: "Session ID" },
357
- title: { type: "string", description: "List title" },
358
- items: {
359
- type: "array",
360
- items: {
361
- type: "object",
362
- properties: {
363
- key: { type: "string" },
364
- value: { type: "string" },
365
- },
366
- },
367
- },
368
- span: {
369
- type: "string",
370
- enum: ["full", "half"],
371
- description: "Width span: 'full' for full-width, 'half' for half width. Default: single column",
372
- },
373
- },
374
- required: ["items"],
375
- },
376
- execute: async (params: Record<string, unknown>, config?: any) => {
377
- const userId = config?.configurable?.user_id;
378
- const rawSessionId = params.sessionId as string;
379
- const sessionId = rawSessionId
380
- ? (rawSessionId.startsWith("canvas:") ? rawSessionId : `canvas:${rawSessionId}`)
381
- : (userId ? `canvas:${userId}` : (() => { throw new Error("No session or user ID provided"); })());
382
- const title = (params.title as string) ?? "Details";
383
- const items = (params.items as Array<{ key: string; value: string }>) ?? [];
384
- const span = params.span as "full" | "half" | undefined;
385
-
386
- const listId = `list-${Date.now()}`;
387
-
388
- await canvasManager.render(sessionId, {
389
- id: listId,
390
- type: "list",
391
- props: { title, items },
392
- span,
393
- });
394
-
395
- return { success: true, listId, sessionId };
396
- },
397
- };
398
- }
399
-
400
- export function createCanvasConfirmTool(_config: Config): Tool {
401
- const log = logger.child("canvas-confirm");
402
-
403
- return {
404
- name: "canvas_confirm",
405
- description: "Show a confirmation dialog and wait for user response",
406
- parameters: {
407
- type: "object",
408
- properties: {
409
- sessionId: { type: "string", description: "Session ID" },
410
- title: { type: "string", description: "Dialog title" },
411
- message: { type: "string", description: "Confirmation message" },
412
- confirmLabel: { type: "string", description: "Confirm button label" },
413
- cancelLabel: { type: "string", description: "Cancel button label" },
414
- danger: { type: "boolean", description: "Show as dangerous action" },
415
- timeout: { type: "number", description: "Timeout in ms (default: 60000)" },
416
- },
417
- required: ["message"],
418
- },
419
- execute: async (params: Record<string, unknown>, config?: any) => {
420
- const userId = config?.configurable?.user_id;
421
- const rawSessionId = params.sessionId as string;
422
- const sessionId = rawSessionId
423
- ? (rawSessionId.startsWith("canvas:") ? rawSessionId : `canvas:${rawSessionId}`)
424
- : (userId ? `canvas:${userId}` : (() => { throw new Error("No session or user ID provided"); })());
425
- const title = (params.title as string) ?? "Confirm";
426
- const message = params.message as string;
427
- const confirmLabel = (params.confirmLabel as string) ?? "Confirm";
428
- const cancelLabel = (params.cancelLabel as string) ?? "Cancel";
429
- const danger = (params.danger as boolean) ?? false;
430
- const timeout = (params.timeout as number) ?? 60000;
431
-
432
- const confirmId = `confirm-${Date.now()}`;
433
-
434
- await canvasManager.render(sessionId, {
435
- id: confirmId,
436
- type: "confirm",
437
- props: { title, message, confirmLabel, cancelLabel, danger },
438
- });
439
-
440
- try {
441
- const response = await canvasManager.waitForInteraction(sessionId, confirmId, timeout);
442
- return { success: true, confirmed: response === true, confirmId, sessionId };
443
- } catch (error) {
444
- return { success: false, confirmed: false, confirmId, error: (error as Error).message, sessionId };
445
- }
446
- },
447
- };
448
- }
@@ -1,126 +0,0 @@
1
- import type { Config, Binding } from "../config/loader.ts";
2
- import { homedir } from "node:os";
3
- import * as path from "node:path";
4
-
5
- export interface RoutingContext {
6
- channel: string;
7
- accountId?: string;
8
- peerKind?: "direct" | "group";
9
- peerId?: string;
10
- guildId?: string;
11
- teamId?: string;
12
- roles?: string[];
13
- }
14
-
15
- export function matchBinding(binding: Binding, ctx: RoutingContext): number {
16
- const match = binding.match;
17
- let score = 0;
18
-
19
- if (match.peer?.id && match.peer?.kind) {
20
- if (ctx.peerId === match.peer.id && ctx.peerKind === match.peer.kind) {
21
- score += 1000;
22
- } else {
23
- return 0;
24
- }
25
- } else if (match.peer?.id) {
26
- if (ctx.peerId === match.peer.id) {
27
- score += 900;
28
- } else {
29
- return 0;
30
- }
31
- } else if (match.peer?.kind) {
32
- if (ctx.peerKind === match.peer.kind) {
33
- score += 50;
34
- } else {
35
- return 0;
36
- }
37
- }
38
-
39
- if (match.guildId && match.roles && match.roles.length > 0) {
40
- if (ctx.guildId === match.guildId && ctx.roles?.some((r) => match.roles?.includes(r))) {
41
- score += 800;
42
- } else {
43
- return 0;
44
- }
45
- } else if (match.guildId) {
46
- if (ctx.guildId === match.guildId) {
47
- score += 200;
48
- } else {
49
- return 0;
50
- }
51
- }
52
-
53
- if (match.teamId) {
54
- if (ctx.teamId === match.teamId) {
55
- score += 300;
56
- } else {
57
- return 0;
58
- }
59
- }
60
-
61
- if (match.accountId) {
62
- if (ctx.accountId === match.accountId) {
63
- score += 400;
64
- } else {
65
- return 0;
66
- }
67
- }
68
-
69
- if (match.channel) {
70
- if (ctx.channel === match.channel) {
71
- score += 100;
72
- } else {
73
- return 0;
74
- }
75
- }
76
-
77
- return score || 1;
78
- }
79
-
80
- export function resolveAgent(
81
- config: Config,
82
- ctx: RoutingContext
83
- ): string {
84
- const bindings = config.bindings ?? [];
85
-
86
- if (bindings.length === 0) {
87
- return config.agent?.defaultAgentId ?? "main";
88
- }
89
-
90
- let bestMatch: { agentId: string; score: number } | null = null;
91
-
92
- for (const binding of bindings) {
93
- const score = matchBinding(binding, ctx);
94
- if (score > 0 && (!bestMatch || score > bestMatch.score)) {
95
- bestMatch = { agentId: binding.agentId, score };
96
- }
97
- }
98
-
99
- if (bestMatch) {
100
- return bestMatch.agentId;
101
- }
102
-
103
- return config.agent?.defaultAgentId ?? "main";
104
- }
105
-
106
- export class Router {
107
- constructor(private config: Config) {}
108
-
109
- route(ctx: RoutingContext): string {
110
- return resolveAgent(this.config, ctx);
111
- }
112
-
113
- getAgentWorkspace(agentId: string): string {
114
- const agents = this.config.agents?.list ?? [];
115
- const agent = agents.find((a) => a.id === agentId);
116
-
117
- if (agent?.workspace) {
118
- return agent.workspace.replace(/^~/, homedir());
119
- }
120
-
121
- const baseDir = this.config.agent?.baseDir?.replace(/^~/, homedir())
122
- ?? path.join(homedir(), ".hive", "agents");
123
-
124
- return path.join(baseDir, agentId, "workspace");
125
- }
126
- }
@@ -1,53 +0,0 @@
1
- /**
2
- * DAGScheduler — AgentExecutor
3
- *
4
- * Bridges the DAGScheduler to the existing runAgentIsolated() call.
5
- * Adds timeout enforcement via Promise.race().
6
- *
7
- * NOTE: There are no Bun Worker threads in Hive OSS. "Workers" are logical
8
- * agents stored in the DB and executed as async calls in the same process.
9
- * Parallelism is achieved by launching multiple runAgentIsolated() calls
10
- * concurrently without awaiting each one serially.
11
- */
12
-
13
- import { runAgentIsolated } from "../../agent/agent-loop"
14
- import { TaskNode } from "./TaskNode"
15
- import { TaskTimeoutError } from "./errors"
16
-
17
- export class AgentExecutor {
18
- /**
19
- * Execute a TaskNode.
20
- * Injects dependency results into the task description as context.
21
- * Returns the final text output from the agent.
22
- */
23
- async execute(
24
- node: TaskNode,
25
- depResults: Record<string, string>,
26
- threadId: string
27
- ): Promise<string> {
28
- const hasDeps = Object.keys(depResults).length > 0
29
- const contextBlock = hasDeps
30
- ? `\n\n---\nContext from completed dependencies:\n${JSON.stringify(depResults, null, 2)}\n---`
31
- : ""
32
-
33
- const taskDescription = node.taskDescription + contextBlock
34
-
35
- const agentPromise = runAgentIsolated({
36
- agentId: node.agentId,
37
- taskDescription,
38
- threadId,
39
- })
40
-
41
- const timeoutPromise = new Promise<never>((_, reject) => {
42
- const t = setTimeout(() => {
43
- reject(new TaskTimeoutError(node.id, node.timeout))
44
- }, node.timeout)
45
- // Ensure the timeout timer doesn't prevent process exit
46
- if (typeof t === "object" && t !== null && "unref" in t) {
47
- (t as any).unref()
48
- }
49
- })
50
-
51
- return Promise.race([agentPromise, timeoutPromise])
52
- }
53
- }