@johpaz/hive-agents 0.0.45 → 1.0.0

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 (298) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +119 -852
  3. package/dist/hive.js +59290 -58797
  4. package/dist/tool-worker.js +220 -925
  5. package/dist/ui/assets/A2UIPage-D4nUFe5q.js +8 -0
  6. package/dist/ui/assets/AgentCreateForm-g1mQnIoJ.js +1 -0
  7. package/dist/ui/assets/AgentDetailPage-C3XkU4Ll.js +1 -0
  8. package/dist/ui/assets/AgentNewPage-CEkLeA79.js +1 -0
  9. package/dist/ui/assets/AgentsPage-CNA778Eo.js +10 -0
  10. package/dist/ui/assets/ApiClientPage-t5DpKhmA.js +3 -0
  11. package/dist/ui/assets/ChannelsPage-yY6t0YTU.js +8 -0
  12. package/dist/ui/assets/DashboardPage-BSeNSYg5.js +6 -0
  13. package/dist/ui/assets/{LoginPage-BTxJdFVG.js → LoginPage-eT5zDRDa.js} +1 -1
  14. package/dist/ui/assets/{LogsPage-DVV2eHbh.js → LogsPage-Gczzzsdh.js} +1 -1
  15. package/dist/ui/assets/MeetingPage-Bu4aMMNR.js +1 -0
  16. package/dist/ui/assets/ModelSelector-nNOrW3te.js +1 -0
  17. package/dist/ui/assets/{NotFound-BIUDlIXU.js → NotFound-Bpr12V51.js} +1 -1
  18. package/dist/ui/assets/Office3DPage-B_iXEbyv.js +4614 -0
  19. package/dist/ui/assets/Office3DPage-C3SIzd2H.css +1 -0
  20. package/dist/ui/assets/ProvidersPage-BupHs5yO.js +1 -0
  21. package/dist/ui/assets/{RecoverPage-7YDQysBL.js → RecoverPage-DMqSasKk.js} +1 -1
  22. package/dist/ui/assets/SettingsPage-B6FTSkOn.js +9 -0
  23. package/dist/ui/assets/SetupPage-DhcRbGgg.js +1 -0
  24. package/dist/ui/assets/WebChatPage-CWXjW4Hn.js +29 -0
  25. package/dist/ui/assets/{activity-c3pNngT_.js → activity-CQuPevhB.js} +1 -1
  26. package/dist/ui/assets/agentCapabilities-CDC6y91E.js +1 -0
  27. package/dist/ui/assets/alert-CQlRq6sv.js +1 -0
  28. package/dist/ui/assets/arrow-left-0EBE7nsF.js +1 -0
  29. package/dist/ui/assets/arrow-right-5QIaph-z.js +1 -0
  30. package/dist/ui/assets/arrow-up-right-DQQCY007.js +1 -0
  31. package/dist/ui/assets/badge-DKGZbVZJ.js +1 -0
  32. package/dist/ui/assets/{calendar-B-KZ9RQO.js → calendar-Be23hQGc.js} +1 -1
  33. package/dist/ui/assets/{card-CNf6BS2e.js → card-D3Nw3kh3.js} +1 -1
  34. package/dist/ui/assets/check-Dp6tzwax.js +1 -0
  35. package/dist/ui/assets/chevron-down-33N886NY.js +1 -0
  36. package/dist/ui/assets/chevron-left-C6itJXh3.js +1 -0
  37. package/dist/ui/assets/chevron-right-CFodBS-b.js +1 -0
  38. package/dist/ui/assets/chevron-up-BvSmyBEs.js +1 -0
  39. package/dist/ui/assets/{circle-alert-KuAm2FWh.js → circle-alert-BDVHxmAz.js} +1 -1
  40. package/dist/ui/assets/circle-check-BJWNbLuF.js +1 -0
  41. package/dist/ui/assets/{circle-x-DjLkFDO8.js → circle-x-Cb2Yer4s.js} +1 -1
  42. package/dist/ui/assets/{copy-Bu5d7C-0.js → copy-33tZrzc9.js} +1 -1
  43. package/dist/ui/assets/{dialog-Jk4bieO4.js → dialog-KOZKWbib.js} +1 -1
  44. package/dist/ui/assets/dist-CD_qfA30.js +1 -0
  45. package/dist/ui/assets/{download-Cjbk4Rek.js → download-CiQqqXyz.js} +1 -1
  46. package/dist/ui/assets/earth-DCvN7ynm.js +1 -0
  47. package/dist/ui/assets/ellipsis-vertical-BybFZDk2.js +1 -0
  48. package/dist/ui/assets/{external-link-6sTlRDUR.js → external-link-0iNNBvZm.js} +1 -1
  49. package/dist/ui/assets/{eye-Df8o0tkC.js → eye-C8sKSSkg.js} +1 -1
  50. package/dist/ui/assets/{file-text-lnxnjBp0.js → file-text-DO8jqiJK.js} +1 -1
  51. package/dist/ui/assets/{gateway-url-DwzPmoc8.js → gateway-url-BlnabM5e.js} +1 -1
  52. package/dist/ui/assets/gauge-BRGwuN8G.js +1 -0
  53. package/dist/ui/assets/{history-CAF_R34_.js → history-BtTD1kDo.js} +1 -1
  54. package/dist/ui/assets/index-Bejlp-R1.js +116 -0
  55. package/dist/ui/assets/index-XoTT41Hr.css +2 -0
  56. package/dist/ui/assets/{info-WjromB4Y.js → info-mpk1tsNC.js} +1 -1
  57. package/dist/ui/assets/key-CoQ0qtXt.js +1 -0
  58. package/dist/ui/assets/label-k0jYxoWW.js +1 -0
  59. package/dist/ui/assets/loader-circle-BhqRN2nO.js +1 -0
  60. package/dist/ui/assets/lock-open-Cd2aqwOd.js +1 -0
  61. package/dist/ui/assets/mail-BG0RYSkL.js +1 -0
  62. package/dist/ui/assets/{pause-VqeUmp2Z.js → pause-Cme88_9s.js} +1 -1
  63. package/dist/ui/assets/pencil-f1nJ1xhs.js +1 -0
  64. package/dist/ui/assets/play-CfYDHD6h.js +1 -0
  65. package/dist/ui/assets/plus-C5BxJeOX.js +1 -0
  66. package/dist/ui/assets/progress-DrI2UDu-.js +1 -0
  67. package/dist/ui/assets/radio-B5SpKJ-J.js +1 -0
  68. package/dist/ui/assets/{refresh-cw-CCzDCAuz.js → refresh-cw-CroGQY62.js} +1 -1
  69. package/dist/ui/assets/scroll-area-CfHn94Vb.js +1 -0
  70. package/dist/ui/assets/search-rfBcmohK.js +1 -0
  71. package/dist/ui/assets/select-BhbW0stK.js +1 -0
  72. package/dist/ui/assets/{send-BPk9XbIq.js → send-D6whYpw-.js} +1 -1
  73. package/dist/ui/assets/{settings-BGfrZ_zM.js → settings-BX6q3MGB.js} +1 -1
  74. package/dist/ui/assets/{shield-CxhcUT39.js → shield-BnGyu1xf.js} +1 -1
  75. package/dist/ui/assets/slider-CmE_z1Ii.js +1 -0
  76. package/dist/ui/assets/{sparkles-BhwlS1pc.js → sparkles-BcaOs_Jk.js} +1 -1
  77. package/dist/ui/assets/{square-DMNWw4Hi.js → square-ju5H8nrT.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-Bjfu-TkS.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-DjQXac_0.js} +1 -1
  83. package/dist/ui/assets/{triangle-alert-pVIJGjga.js → triangle-alert-B04mgMcg.js} +1 -1
  84. package/dist/ui/assets/{useHiveAgentsModelLoad-BnC4jLE-.js → useHiveAgentsModelLoad-DT5-4CCj.js} +1 -1
  85. package/dist/ui/assets/useOfficeModel-Cy7cAyEn.js +1 -0
  86. package/dist/ui/assets/useProviders-DSX7eVsz.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-qnVxkRSM.js +1 -0
  94. package/dist/ui/assets/wifi-BA1m2dGO.js +1 -0
  95. package/dist/ui/assets/{zap-B4RaNNO5.js → zap-DT7cM7YS.js} +1 -1
  96. package/dist/ui/index.html +10 -9
  97. package/package.json +8 -9
  98. package/packages/cli/src/adapters/config.ts +1 -80
  99. package/packages/cli/src/adapters/factory.ts +0 -45
  100. package/packages/cli/src/adapters/index.ts +0 -8
  101. package/packages/cli/src/commands/doctor.ts +45 -1
  102. package/packages/cli/src/commands/gateway.ts +2 -9
  103. package/packages/cli/src/index.ts +9 -11
  104. package/packages/core/src/agent/acceptance-verifier.ts +300 -0
  105. package/packages/core/src/agent/agent-catalog.ts +384 -0
  106. package/packages/core/src/agent/agent-loop.ts +185 -28
  107. package/packages/core/src/agent/capability-search.ts +5 -5
  108. package/packages/core/src/agent/catalog-selector.ts +104 -0
  109. package/packages/core/src/agent/compaction.ts +36 -41
  110. package/packages/core/src/agent/context-compiler.ts +182 -62
  111. package/packages/core/src/agent/conversation-store.ts +56 -3
  112. package/packages/core/src/agent/curator.ts +129 -34
  113. package/packages/core/src/agent/delegation-runtime.ts +248 -0
  114. package/packages/core/src/agent/index.ts +17 -0
  115. package/packages/core/src/agent/llm-providers/hiveagents.ts +1 -1
  116. package/packages/core/src/agent/llm-providers/interface.ts +3 -3
  117. package/packages/core/src/agent/llm-providers/openai-compat-base.ts +1 -1
  118. package/packages/core/src/agent/minimal-loadout.ts +46 -0
  119. package/packages/core/src/agent/playbook-selector.ts +1 -1
  120. package/packages/core/src/agent/prompt-builder.ts +4 -0
  121. package/packages/core/src/agent/proof-packet.ts +15 -1
  122. package/packages/core/src/agent/providers/index.ts +8 -3
  123. package/packages/core/src/agent/routing-intent.ts +22 -0
  124. package/packages/core/src/agent/run-store.ts +24 -3
  125. package/packages/core/src/agent/service.ts +2 -2
  126. package/packages/core/src/agent/skill-selector.ts +12 -31
  127. package/packages/core/src/agent/tool-selector.ts +36 -35
  128. package/packages/core/src/agent/tracer.ts +5 -1
  129. package/packages/core/src/artifacts/store.ts +162 -0
  130. package/packages/core/src/canvas/canvas-manager.ts +5 -234
  131. package/packages/core/src/canvas/emitter.ts +165 -69
  132. package/packages/core/src/canvas/index.ts +0 -2
  133. package/packages/core/src/channels/base.ts +3 -1
  134. package/packages/core/src/channels/webchat.ts +4 -8
  135. package/packages/core/src/config/loader.ts +0 -22
  136. package/packages/core/src/events/agent-bus.ts +0 -31
  137. package/packages/core/src/events/narration.ts +82 -0
  138. package/packages/core/src/gateway/channel-notify.ts +34 -5
  139. package/packages/core/src/gateway/delegation-groups.ts +245 -0
  140. package/packages/core/src/gateway/delegation-notify.ts +103 -0
  141. package/packages/core/src/gateway/durable-queue.ts +33 -2
  142. package/packages/core/src/gateway/helpers/index.ts +2 -2
  143. package/packages/core/src/gateway/helpers/narration.ts +12 -7
  144. package/packages/core/src/gateway/helpers/redact.ts +1 -1
  145. package/packages/core/src/gateway/initializer.ts +15 -13
  146. package/packages/core/src/gateway/job-executors.ts +232 -101
  147. package/packages/core/src/gateway/lane-queue.ts +1 -1
  148. package/packages/core/src/gateway/notification-inbox.ts +57 -0
  149. package/packages/core/src/gateway/resolver.ts +1 -23
  150. package/packages/core/src/gateway/routes/agents.ts +91 -1
  151. package/packages/core/src/gateway/routes/auth.ts +21 -42
  152. package/packages/core/src/gateway/routes/chat.ts +6 -6
  153. package/packages/core/src/gateway/routes/cron-api.ts +0 -4
  154. package/packages/core/src/gateway/routes/mcp.ts +0 -63
  155. package/packages/core/src/gateway/routes/meeting.ts +245 -0
  156. package/packages/core/src/gateway/routes/providers.ts +1 -0
  157. package/packages/core/src/gateway/routes/setup.ts +29 -24
  158. package/packages/core/src/gateway/routes/skills.ts +2 -2
  159. package/packages/core/src/gateway/routes/system.ts +23 -5
  160. package/packages/core/src/gateway/routes/users.ts +24 -1
  161. package/packages/core/src/gateway/server.ts +153 -117
  162. package/packages/core/src/gateway/session.ts +6 -4
  163. package/packages/core/src/gateway/slash-commands.ts +7 -6
  164. package/packages/core/src/gateway/webchat-turn.ts +34 -8
  165. package/packages/core/src/index.ts +3 -0
  166. package/packages/core/src/mcp/hot-reload.ts +14 -7
  167. package/packages/core/src/mcp/singleton.ts +0 -3
  168. package/packages/core/src/mcp/tool-sync.ts +2 -2
  169. package/packages/core/src/resilience/retry.ts +1 -1
  170. package/packages/core/src/scheduler/CronScheduler.ts +3 -1
  171. package/packages/core/src/scheduler/integration.ts +1 -1
  172. package/packages/core/src/storage/bootstrap.ts +25 -5
  173. package/packages/core/src/storage/collections.ts +201 -27
  174. package/packages/core/src/storage/onboarding.ts +147 -32
  175. package/packages/core/src/storage/reconcile.ts +2 -5
  176. package/packages/core/src/storage/seed.ts +202 -38
  177. package/packages/core/src/storage/usage.ts +0 -9
  178. package/packages/core/src/storage/user-email.ts +11 -0
  179. package/packages/core/src/tool-runtime/index.ts +69 -23
  180. package/packages/core/src/tool-runtime/worker-tools.ts +4 -2
  181. package/packages/core/src/{canvas/a2ui-tools.ts → tools/a2ui/index.ts} +17 -8
  182. package/packages/core/src/tools/agents/get-available-models.ts +11 -3
  183. package/packages/core/src/tools/agents/index.ts +404 -86
  184. package/packages/core/src/tools/core/index.ts +28 -10
  185. package/packages/core/src/tools/cron/index.ts +1 -6
  186. package/packages/core/src/tools/index.ts +17 -45
  187. package/packages/core/src/tools/types.ts +1 -1
  188. package/packages/core/src/tools/web/artifact-inspect.ts +23 -0
  189. package/packages/core/src/tools/web/browser-screenshot.ts +26 -5
  190. package/packages/core/src/tools/web/index.ts +3 -0
  191. package/packages/core/src/utils/logger.ts +58 -30
  192. package/packages/core/src/utils/toon.ts +0 -20
  193. package/packages/mcp/src/manager.ts +8 -7
  194. package/packages/mcp/src/transports/sse.ts +0 -4
  195. package/packages/mcp/src/transports/websocket.ts +0 -6
  196. package/packages/skills/src/bundled/{canvas → a2ui}/a2ui_dashboard/SKILL.md +4 -4
  197. package/packages/skills/src/bundled/{canvas → a2ui}/a2ui_form/SKILL.md +4 -4
  198. package/packages/skills/src/bundled/{canvas → a2ui}/a2ui_interactive/SKILL.md +5 -5
  199. package/packages/skills/src/bundled/agents/acceptance_verification/SKILL.md +26 -0
  200. package/packages/skills/src/bundled/agents/agent_spawner/SKILL.md +24 -18
  201. package/packages/skills/src/bundled/agents/task_orchestrator/SKILL.md +47 -148
  202. package/packages/skills/src/bundled/cli/cli_pipeline/SKILL.md +9 -10
  203. package/packages/skills/src/bundled/cli/cli_safe_exec/SKILL.md +1 -1
  204. package/packages/skills/src/bundled/cli/software_engineering/SKILL.md +23 -0
  205. package/packages/skills/src/bundled/cron_manager/SKILL.md +2 -2
  206. package/packages/skills/src/bundled/cron_reminder/SKILL.md +7 -7
  207. package/packages/skills/src/bundled/filesystem/file_read_and_summarize/SKILL.md +11 -10
  208. package/packages/skills/src/bundled/filesystem/file_writer/SKILL.md +29 -35
  209. package/packages/skills/src/bundled/filesystem/workspace_file_operator/SKILL.md +22 -0
  210. package/packages/skills/src/bundled/search_knowledge/capability_discovery/SKILL.md +5 -4
  211. package/packages/skills/src/bundled-data.generated.ts +155 -720
  212. package/dist/ui/assets/AgentCreateForm-DzaIT-dA.js +0 -1
  213. package/dist/ui/assets/AgentDetailPage-DgqcJceY.js +0 -1
  214. package/dist/ui/assets/AgentNewPage-CNSpoOSA.js +0 -1
  215. package/dist/ui/assets/AgentsPage-BMUJzTD6.js +0 -10
  216. package/dist/ui/assets/ApiClientPage-Cum_a_3j.js +0 -3
  217. package/dist/ui/assets/CanvasPage-o6oCP6uq.js +0 -33
  218. package/dist/ui/assets/ChannelsPage-WrB0zwLq.js +0 -8
  219. package/dist/ui/assets/DashboardPage-BCd6kNw0.js +0 -6
  220. package/dist/ui/assets/MeetingPage-BULIAWzq.js +0 -1
  221. package/dist/ui/assets/ModelSelector-BMYOChYb.js +0 -1
  222. package/dist/ui/assets/ProvidersPage-BVN5UZrI.js +0 -1
  223. package/dist/ui/assets/SettingsPage-CYmpFfDn.js +0 -9
  224. package/dist/ui/assets/SetupPage-Dnmb1Lbv.js +0 -1
  225. package/dist/ui/assets/WebChatPage-DmmdFhIC.js +0 -16
  226. package/dist/ui/assets/accordion-CnLzKNHK.js +0 -1
  227. package/dist/ui/assets/alert-B9J6KHmt.js +0 -1
  228. package/dist/ui/assets/alert-dialog-KcYQWcJ6.js +0 -1
  229. package/dist/ui/assets/arrow-left-CBcbX5EZ.js +0 -1
  230. package/dist/ui/assets/badge-88dRb4M8.js +0 -1
  231. package/dist/ui/assets/bell-8BqRYmzf.js +0 -1
  232. package/dist/ui/assets/chevron-down-DIosfU_U.js +0 -1
  233. package/dist/ui/assets/chevron-left-D4U-5A27.js +0 -1
  234. package/dist/ui/assets/chevron-right-CR4Skrf3.js +0 -1
  235. package/dist/ui/assets/chevron-up-CI-W21Fy.js +0 -1
  236. package/dist/ui/assets/circle-check-6Ard1-2z.js +0 -1
  237. package/dist/ui/assets/dropdown-menu-DDiaHg5y.js +0 -1
  238. package/dist/ui/assets/es-4I-joeZz.js +0 -1
  239. package/dist/ui/assets/folder-open-DJBLDFjv.js +0 -1
  240. package/dist/ui/assets/format-DsLPBxvt.js +0 -1
  241. package/dist/ui/assets/gauge-B8Tj43rC.js +0 -1
  242. package/dist/ui/assets/hexagon-6L79pgVK.js +0 -1
  243. package/dist/ui/assets/index-BmwTAwOF.css +0 -2
  244. package/dist/ui/assets/index-Cyw7L0Li.js +0 -116
  245. package/dist/ui/assets/key-DyKOoQh5.js +0 -1
  246. package/dist/ui/assets/label-B_15zZlR.js +0 -1
  247. package/dist/ui/assets/loader-circle-BmBOgYze.js +0 -1
  248. package/dist/ui/assets/lock-BS6OLXPv.js +0 -1
  249. package/dist/ui/assets/play-zJpWuhrr.js +0 -1
  250. package/dist/ui/assets/plus-BZQX26Dr.js +0 -1
  251. package/dist/ui/assets/progress-D5c-Eilm.js +0 -1
  252. package/dist/ui/assets/scroll-area-CihOx0cb.js +0 -1
  253. package/dist/ui/assets/search-DzDptO9s.js +0 -1
  254. package/dist/ui/assets/select-BQCOjM2j.js +0 -1
  255. package/dist/ui/assets/slider-bcUiUfx0.js +0 -14
  256. package/dist/ui/assets/switch-BR30E4ej.js +0 -1
  257. package/dist/ui/assets/table-B3aGEaVp.js +0 -1
  258. package/dist/ui/assets/tabs-LQidMKRS.js +0 -1
  259. package/dist/ui/assets/terminal--7G943As.js +0 -1
  260. package/dist/ui/assets/useProviders-C1xVKLxB.js +0 -1
  261. package/dist/ui/assets/utils-3pnRFmFe.js +0 -1
  262. package/dist/ui/assets/vendor-charts-Bu2lyBKP.js +0 -65
  263. package/dist/ui/assets/vendor-radix-D6rA7xKY.js +0 -63
  264. package/dist/ui/assets/vendor-react-BU5iQU4f.js +0 -1
  265. package/dist/ui/assets/volume-2-BekVQl6P.js +0 -1
  266. package/packages/core/src/agent/context-guard.ts +0 -91
  267. package/packages/core/src/agent/hooks.ts +0 -166
  268. package/packages/core/src/agent/providers.ts +0 -1
  269. package/packages/core/src/auth/auth.ts +0 -111
  270. package/packages/core/src/auth/index.ts +0 -1
  271. package/packages/core/src/canvas/canvas-tools.ts +0 -448
  272. package/packages/core/src/gateway/router.ts +0 -126
  273. package/packages/core/src/scheduler/dag/AgentExecutor.ts +0 -53
  274. package/packages/core/src/scheduler/dag/DAGScheduler.ts +0 -250
  275. package/packages/core/src/scheduler/dag/EventBridge.ts +0 -122
  276. package/packages/core/src/scheduler/dag/TaskGraph.ts +0 -192
  277. package/packages/core/src/scheduler/dag/TaskNode.ts +0 -97
  278. package/packages/core/src/scheduler/dag/TaskResult.ts +0 -22
  279. package/packages/core/src/scheduler/dag/errors.ts +0 -37
  280. package/packages/core/src/scheduler/dag/index.ts +0 -26
  281. package/packages/core/src/scheduler/dag/presets/ResearchPreset.ts +0 -97
  282. package/packages/core/src/scheduler/dag/strategies/ParallelStrategy.ts +0 -21
  283. package/packages/core/src/scheduler/dag/strategies/PriorityStrategy.ts +0 -46
  284. package/packages/core/src/scheduler/index.ts +0 -22
  285. package/packages/core/src/scheduler/task-driver.ts +0 -216
  286. package/packages/core/src/tools/canvas/index.ts +0 -420
  287. package/packages/core/src/tools/meeting/index.ts +0 -336
  288. package/packages/core/src/tools/projects/index.ts +0 -348
  289. package/packages/core/src/tools/voice/index.ts +0 -104
  290. package/packages/core/src/utils/index.ts +0 -5
  291. package/packages/skills/src/bundled/agents/code_delegator/SKILL.md +0 -156
  292. package/packages/skills/src/bundled/canvas/canvas_dashboard/SKILL.md +0 -146
  293. package/packages/skills/src/bundled/canvas/canvas_interact/SKILL.md +0 -148
  294. package/packages/skills/src/bundled/canvas/canvas_report/SKILL.md +0 -146
  295. package/packages/skills/src/bundled/meeting/meeting_transcription/SKILL.md +0 -213
  296. package/packages/skills/src/bundled/voice/voice_assistant/SKILL.md +0 -174
  297. package/packages/skills/src/bundled/voice/voice_input/SKILL.md +0 -146
  298. package/packages/skills/src/bundled/voice/voice_output/SKILL.md +0 -151
@@ -1,37 +0,0 @@
1
- /**
2
- * DAGScheduler — Custom errors
3
- */
4
-
5
- export class CyclicDependencyError extends Error {
6
- readonly cycle: string[]
7
-
8
- constructor(cycle: string[]) {
9
- super(`Cyclic dependency detected: ${cycle.join(" → ")}`)
10
- this.name = "CyclicDependencyError"
11
- this.cycle = cycle
12
- }
13
- }
14
-
15
- export class TaskTimeoutError extends Error {
16
- readonly nodeId: string
17
- readonly timeoutMs: number
18
-
19
- constructor(nodeId: string, timeoutMs: number) {
20
- super(`Task "${nodeId}" timed out after ${timeoutMs}ms`)
21
- this.name = "TaskTimeoutError"
22
- this.nodeId = nodeId
23
- this.timeoutMs = timeoutMs
24
- }
25
- }
26
-
27
- export class TaskFailureError extends Error {
28
- readonly nodeId: string
29
- readonly cause: Error
30
-
31
- constructor(nodeId: string, cause: Error) {
32
- super(`Task "${nodeId}" failed: ${cause.message}`)
33
- this.name = "TaskFailureError"
34
- this.nodeId = nodeId
35
- this.cause = cause
36
- }
37
- }
@@ -1,26 +0,0 @@
1
- /**
2
- * DAGScheduler — Public API
3
- *
4
- * Usage:
5
- * import { DAGScheduler, TaskGraph, ParallelStrategy } from "./dag"
6
- */
7
-
8
- export { DAGScheduler } from "./DAGScheduler"
9
- export type { DAGSchedulerOptions } from "./DAGScheduler"
10
-
11
- export { TaskGraph } from "./TaskGraph"
12
- export { TaskNode } from "./TaskNode"
13
- export type { TaskNodeConfig, NodeStatus } from "./TaskNode"
14
- export type { DAGResult, NodeSummary } from "./TaskResult"
15
-
16
- export { AgentExecutor } from "./AgentExecutor"
17
- export { EventBridge } from "./EventBridge"
18
-
19
- export { CyclicDependencyError, TaskTimeoutError, TaskFailureError } from "./errors"
20
-
21
- export { ParallelStrategy } from "./strategies/ParallelStrategy"
22
- export type { ExecutionStrategy } from "./strategies/ParallelStrategy"
23
- export { PriorityStrategy } from "./strategies/PriorityStrategy"
24
-
25
- export { createResearchGraph } from "./presets/ResearchPreset"
26
- export type { ResearchAgentIds } from "./presets/ResearchPreset"
@@ -1,97 +0,0 @@
1
- /**
2
- * ResearchPreset — Pre-configured DAG for general research swarms
3
- *
4
- * Dependency graph:
5
- * ResearchAgent ─┐
6
- * StrategyAgent ├── SynthesisAgent (all three run in parallel)
7
- * DesignAgent ─┘
8
- *
9
- * All three parallel agents are fully independent. SynthesisAgent
10
- * waits for all three and combines their outputs into a final deliverable.
11
- *
12
- * Usage:
13
- * const graph = createResearchGraph(
14
- * { research: "agent-uuid-1", strategy: "agent-uuid-2",
15
- * design: "agent-uuid-3", synthesis: "agent-uuid-4" },
16
- * "Design a distributed caching strategy for the platform"
17
- * )
18
- * await scheduler.execute(graph, { projectId, coordinatorId })
19
- */
20
-
21
- import { TaskGraph } from "../TaskGraph"
22
- import type { TaskNodeConfig } from "../TaskNode"
23
-
24
- export interface ResearchAgentIds {
25
- research: string
26
- strategy: string
27
- design: string
28
- synthesis: string
29
- }
30
-
31
- export function createResearchGraph(
32
- agentIds: ResearchAgentIds,
33
- topic: string,
34
- options: {
35
- researchTimeout?: number
36
- strategyTimeout?: number
37
- designTimeout?: number
38
- synthesisTimeout?: number
39
- } = {}
40
- ): TaskGraph {
41
- const nodes: TaskNodeConfig[] = [
42
- {
43
- id: "research",
44
- agentId: agentIds.research,
45
- name: "ResearchAgent",
46
- taskDescription:
47
- `Research the following topic using available knowledge bases and sources: "${topic}".` +
48
- ` Output: { findings: string[], sources: string[], keyInsights: string[] }.`,
49
- deps: [],
50
- timeout: options.researchTimeout ?? 120_000,
51
- maxRetries: 1,
52
- priority: 8,
53
- },
54
- {
55
- id: "strategy",
56
- agentId: agentIds.strategy,
57
- name: "StrategyAgent",
58
- taskDescription:
59
- `Design a strategic framework or approach for: "${topic}".` +
60
- ` Work independently — you will NOT have the research findings yet.` +
61
- ` Output: { approach: string, phases: string[], risks: string[], successMetrics: string[] }.`,
62
- deps: [],
63
- timeout: options.strategyTimeout ?? 90_000,
64
- maxRetries: 1,
65
- priority: 8,
66
- },
67
- {
68
- id: "design",
69
- agentId: agentIds.design,
70
- name: "DesignAgent",
71
- taskDescription:
72
- `Design the structure or architecture for: "${topic}".` +
73
- ` Work independently — focus on structure, not content.` +
74
- ` Output: { structure: string, components: string[], diagram: string (ASCII or Mermaid) }.`,
75
- deps: [],
76
- timeout: options.designTimeout ?? 90_000,
77
- maxRetries: 1,
78
- priority: 8,
79
- },
80
- {
81
- id: "synthesis",
82
- agentId: agentIds.synthesis,
83
- name: "SynthesisAgent",
84
- taskDescription:
85
- `Synthesize the research findings, strategic framework, and design structure into a cohesive deliverable.` +
86
- ` The dependency context contains all three agents' outputs.` +
87
- ` Topic: "${topic}".` +
88
- ` Output a comprehensive, well-structured document that combines all inputs coherently.`,
89
- deps: ["research", "strategy", "design"],
90
- timeout: options.synthesisTimeout ?? 150_000,
91
- maxRetries: 2,
92
- priority: 0,
93
- },
94
- ]
95
-
96
- return new TaskGraph(nodes)
97
- }
@@ -1,21 +0,0 @@
1
- /**
2
- * ParallelStrategy — executes DAG nodes in parallel as slots become available
3
- *
4
- * Picks nodes from the READY queue in FIFO order.
5
- * Nodes are launched immediately when a worker slot is available,
6
- * otherwise they wait in the queue.
7
- */
8
-
9
- import { TaskNode } from "../TaskNode"
10
-
11
- export interface ExecutionStrategy {
12
- pick(queue: TaskNode[]): TaskNode | undefined
13
- /** Called once at graph start to allow strategy-level initialization */
14
- initialize?(nodes: Map<string, TaskNode>): void
15
- }
16
-
17
- export class ParallelStrategy implements ExecutionStrategy {
18
- pick(queue: TaskNode[]): TaskNode | undefined {
19
- return queue.shift()
20
- }
21
- }
@@ -1,46 +0,0 @@
1
- /**
2
- * PriorityStrategy — for research swarms
3
- *
4
- * Boosts the priority of nodes on the critical path so they run first
5
- * when slots are limited. Within same effective priority, FIFO order applies.
6
- */
7
-
8
- import { TaskNode } from "../TaskNode"
9
- import { TaskGraph } from "../TaskGraph"
10
- import type { ExecutionStrategy } from "./ParallelStrategy"
11
-
12
- export class PriorityStrategy implements ExecutionStrategy {
13
- private criticalPathSet = new Set<string>()
14
- private readonly CRITICAL_BOOST = 1000
15
-
16
- initialize(nodes: Map<string, TaskNode>): void {
17
- // Build a temporary graph for critical path calculation
18
- const configs = [...nodes.values()].map(n => ({
19
- id: n.id,
20
- agentId: n.agentId,
21
- name: n.name,
22
- taskDescription: n.taskDescription,
23
- deps: n.deps,
24
- timeout: n.timeout,
25
- maxRetries: n.maxRetries,
26
- priority: n.priority,
27
- }))
28
- const graph = new TaskGraph(configs)
29
- for (const id of graph.getCriticalPath()) {
30
- this.criticalPathSet.add(id)
31
- }
32
- }
33
-
34
- pick(queue: TaskNode[]): TaskNode | undefined {
35
- if (queue.length === 0) return undefined
36
-
37
- // Sort: critical path nodes first, then by node.priority desc, then FIFO (stable)
38
- queue.sort((a, b) => {
39
- const aBoost = this.criticalPathSet.has(a.id) ? this.CRITICAL_BOOST : 0
40
- const bBoost = this.criticalPathSet.has(b.id) ? this.CRITICAL_BOOST : 0
41
- return (b.priority + bBoost) - (a.priority + aBoost)
42
- })
43
-
44
- return queue.shift()
45
- }
46
- }
@@ -1,22 +0,0 @@
1
- /**
2
- * Hive Scheduler Module
3
- *
4
- * Croner-based scheduling system for Hive.
5
- * Supports recurring and one-shot cron jobs with HiveDB persistence.
6
- */
7
-
8
- export { CronScheduler } from "./CronScheduler";
9
- export { executeScheduledTask, createTaskHandler, notifyTaskCompletion, setSchedulerForCleanup } from "./integration";
10
- export type {
11
- CronJob,
12
- TaskRun,
13
- CreateCronJobInput,
14
- UpdateCronJobInput,
15
- CronJobStatus,
16
- CronJobExecutionHandler,
17
- CronJobExecutionResult,
18
- TaskType,
19
- TaskStatus,
20
- TaskRunStatus,
21
- CronerOptions,
22
- } from "./types";
@@ -1,216 +0,0 @@
1
- /**
2
- * TaskDriver — event-driven project/task execution engine.
3
- *
4
- * Source of truth: HiveDB (tasks collection) + durable queue (jobQueue).
5
- * NOT an in-memory DAGScheduler — the driver just picks up tasks whose
6
- * dependencies are met and enqueues project_task jobs.
7
- *
8
- * Two triggers:
9
- * 1. Event-driven: kick() called when a job completes (from job-executors)
10
- * 2. Polling backup: every 10s, scan for ready tasks (handles edge cases
11
- * where events are missed)
12
- *
13
- * On each kick/poll:
14
- * - Find tasks with status=pending
15
- * - For each: check all deps are completed → claim OCC → enqueue project_task
16
- * - If a dep failed → mark dependents as blocked
17
- * - When all tasks done → update project status to "done" or "failed"
18
- */
19
-
20
- import { col, updateDoc } from "../storage/hive";
21
- import type { TaskDoc, ProjectDoc } from "../storage/collections";
22
- import { logger } from "../utils/logger";
23
- import { getDurableQueue } from "../gateway/durable-queue";
24
- import { createRun } from "../agent/run-store";
25
- import { resolveAgentId } from "../storage/onboarding";
26
-
27
- const log = logger.child("task-driver");
28
-
29
- const POLL_INTERVAL_MS = 10_000;
30
-
31
- export class TaskDriver {
32
- private pollTimer: ReturnType<typeof setInterval> | null = null;
33
- private running = false;
34
-
35
- start(): void {
36
- if (this.pollTimer) return;
37
- this.pollTimer = setInterval(() => {
38
- this.kick("poll").catch((err) => {
39
- log.error(`[poll] Error: ${(err as Error).message}`);
40
- });
41
- }, POLL_INTERVAL_MS);
42
- log.info(`[start] TaskDriver polling every ${POLL_INTERVAL_MS}ms`);
43
- }
44
-
45
- stop(): void {
46
- if (this.pollTimer) {
47
- clearInterval(this.pollTimer);
48
- this.pollTimer = null;
49
- }
50
- }
51
-
52
- /**
53
- * Scan for ready tasks and enqueue them. Called after a job completes
54
- * (event-driven) or by the polling timer (backup).
55
- */
56
- async kick(reason: string = "event"): Promise<number> {
57
- if (this.running) return 0;
58
- this.running = true;
59
-
60
- try {
61
- const tasksCol = await col<TaskDoc>("tasks");
62
- const pending = (await tasksCol.scan({})).filter((e) => e.doc.status === "pending");
63
- let enqueued = 0;
64
-
65
- for (const entry of pending) {
66
- const task = entry.doc;
67
-
68
- // Check dependencies
69
- if (task.depends_on) {
70
- const deps: string[] = JSON.parse(task.depends_on);
71
- const depResults = await Promise.all(deps.map(async (depId) => {
72
- const dep = await tasksCol.get(depId);
73
- return dep ? dep.doc.status : "missing";
74
- }));
75
-
76
- // If any dep failed → mark this task as blocked
77
- if (depResults.some((s) => s === "failed" || s === "missing")) {
78
- await updateDoc<TaskDoc>("tasks", task.id, {
79
- status: "blocked",
80
- error: "A dependency failed or is missing",
81
- updated_at: Date.now(),
82
- } as Partial<TaskDoc>).catch(() => {});
83
- continue;
84
- }
85
-
86
- // If any dep is not completed → skip
87
- if (depResults.some((s) => s !== "completed")) {
88
- continue;
89
- }
90
- }
91
-
92
- // All deps completed (or no deps) → claim + enqueue project_task
93
- const workerId = task.agent_id && task.agent_id !== "__none__"
94
- ? task.agent_id
95
- : (await resolveAgentId(null)) || "main";
96
-
97
- // OCC claim pending→queued BEFORE enqueueing: the job may wait in the
98
- // queue past the next poll, and a still-"pending" task would be
99
- // enqueued again on every kick.
100
- try {
101
- await tasksCol.put(task.id, {
102
- ...task,
103
- status: "queued",
104
- updated_at: Date.now(),
105
- }, { expectedVersion: entry.version });
106
- } catch {
107
- continue; // another kick claimed it first
108
- }
109
-
110
- try {
111
- const run = await createRun({
112
- thread_id: `project-${task.project_id}-${task.id}`,
113
- agent_id: workerId,
114
- user_id: "",
115
- channel: null,
116
- kind: "project",
117
- max_iterations: 20,
118
- resume_policy: "resume",
119
- });
120
-
121
- const queue = getDurableQueue();
122
- await queue.enqueue({
123
- lane: `task:${task.id}`,
124
- type: "project_task",
125
- run_id: run.id,
126
- payload: {
127
- taskId: task.id,
128
- workerId,
129
- taskDescription: task.description ?? task.name,
130
- },
131
- priority: task.priority,
132
- });
133
- } catch (err) {
134
- // Claim succeeded but enqueue failed — release the task so a later
135
- // kick can retry it.
136
- await updateDoc<TaskDoc>("tasks", task.id, {
137
- status: "pending",
138
- updated_at: Date.now(),
139
- } as Partial<TaskDoc>).catch(() => {});
140
- throw err;
141
- }
142
-
143
- enqueued++;
144
- log.info(`[kick:${reason}] Enqueued project_task for task ${task.id} (${task.name})`);
145
- }
146
-
147
- // Check if any projects are fully done
148
- await this.updateProjectStatuses();
149
-
150
- return enqueued;
151
- } finally {
152
- this.running = false;
153
- }
154
- }
155
-
156
- /**
157
- * For each active project: if all tasks are completed → mark project as done.
158
- * If any task failed and no other tasks can proceed → mark project as failed.
159
- */
160
- private async updateProjectStatuses(): Promise<void> {
161
- try {
162
- const projectsCol = await col<ProjectDoc>("projects");
163
- const activeProjects = (await projectsCol.findBy("status", "active")).filter(
164
- (e) => e.doc.status === "active"
165
- );
166
-
167
- const tasksCol = await col<TaskDoc>("tasks");
168
-
169
- for (const projectEntry of activeProjects) {
170
- const project = projectEntry.doc;
171
- const taskEntries = await tasksCol.findBy("project_id", project.id);
172
- const tasks = taskEntries.map((e) => e.doc);
173
-
174
- if (tasks.length === 0) continue;
175
-
176
- const allCompleted = tasks.every((t) => t.status === "completed");
177
- const anyFailed = tasks.some((t) => t.status === "failed" || t.status === "blocked");
178
- const anyPending = tasks.some((t) => t.status === "pending" || t.status === "queued" || t.status === "in_progress");
179
-
180
- if (allCompleted) {
181
- await updateDoc<ProjectDoc>("projects", project.id, {
182
- status: "done",
183
- progress: 100,
184
- completed_at: Date.now(),
185
- updated_at: Date.now(),
186
- } as Partial<ProjectDoc>).catch(() => {});
187
- log.info(`[updateProjectStatuses] Project ${project.id} (${project.name}) → done`);
188
- } else if (anyFailed && !anyPending) {
189
- await updateDoc<ProjectDoc>("projects", project.id, {
190
- status: "failed",
191
- updated_at: Date.now(),
192
- } as Partial<ProjectDoc>).catch(() => {});
193
- log.warn(`[updateProjectStatuses] Project ${project.id} (${project.name}) → failed`);
194
- }
195
- }
196
- } catch (err) {
197
- log.warn(`[updateProjectStatuses] Error: ${(err as Error).message}`);
198
- }
199
- }
200
- }
201
-
202
- // Singleton
203
- let _taskDriver: TaskDriver | null = null;
204
-
205
- export function getTaskDriver(): TaskDriver {
206
- if (!_taskDriver) {
207
- _taskDriver = new TaskDriver();
208
- }
209
- return _taskDriver;
210
- }
211
-
212
- export function initTaskDriver(): TaskDriver {
213
- _taskDriver = new TaskDriver();
214
- _taskDriver.start();
215
- return _taskDriver;
216
- }