@desplega.ai/agent-swarm 1.173.0 → 2.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 (432) hide show
  1. package/README.md +1 -1
  2. package/dist/{acp-adapter-ccm9xrep.js → acp-adapter-sj2g0m84.js} +17 -16
  3. package/dist/{actions-sgeyv08k.js → actions-fegk44gr.js} +39 -34
  4. package/dist/{amp-adapter-gpxp3kc9.js → amp-adapter-ad8ft89x.js} +8 -7
  5. package/dist/{app-km9qnv2f.js → app-kfvgbvzy.js} +18 -14
  6. package/dist/{assistant-5r8tcvvd.js → assistant-z7zdy9ja.js} +40 -35
  7. package/dist/{boot-reembed-swwzdgd7.js → boot-reembed-5c2z0mbe.js} +10 -9
  8. package/dist/{boot-reembed-16rv9843.js → boot-reembed-j8xa181e.js} +10 -9
  9. package/dist/{boot-scrub-sweep-zkr6vkqb.js → boot-scrub-sweep-hnkn3rgt.js} +11 -10
  10. package/dist/{boot-seeds-d8sp49t2.js → boot-seeds-kwjq4d2z.js} +14 -13
  11. package/dist/{claude-adapter-yzzzh8jp.js → claude-adapter-9vmvpvgd.js} +19 -18
  12. package/dist/{claude-managed-adapter-xgxhqrt2.js → claude-managed-adapter-k9qae05j.js} +7 -5
  13. package/dist/{claude-managed-setup-bnmjarjc.js → claude-managed-setup-q54zx5q2.js} +6 -4
  14. package/dist/{claude-sdk-session-4whxere4.js → claude-sdk-session-9jye6cxr.js} +11881 -11472
  15. package/dist/{cli-94b48jhk.js → cli-03gedhng.js} +16 -14
  16. package/dist/{cli-1w0vj3gw.js → cli-1e4b6bzh.js} +7 -7
  17. package/dist/{cli-d603qf86.js → cli-29jc5q7w.js} +10 -8
  18. package/dist/cli-2m1ktfzz.js +17795 -0
  19. package/dist/{cli-x119kdba.js → cli-3dj8k4vy.js} +1 -1
  20. package/dist/{cli-srqq3gc5.js → cli-3fbmmawm.js} +5 -5
  21. package/dist/{cli-gmdajfw5.js → cli-4jxm2qtz.js} +4987 -1708
  22. package/dist/{cli-tadfgd0t.js → cli-5hkm7whv.js} +33 -4
  23. package/dist/{cli-42qhyvwx.js → cli-5t4f29ez.js} +3 -3
  24. package/dist/{cli-7a0sde2x.js → cli-6cagzc96.js} +9 -0
  25. package/dist/cli-6cvfxs8r.js +47 -0
  26. package/dist/{cli-0kxf81jj.js → cli-6jyj59nb.js} +2 -2
  27. package/dist/{cli-w1apjecb.js → cli-6razj6t4.js} +2 -2
  28. package/dist/{cli-anzdk0z4.js → cli-74ahz61x.js} +2 -2
  29. package/dist/{cli-m89t9jdf.js → cli-7x0g4sn1.js} +15416 -16024
  30. package/dist/{cli-yatxqynm.js → cli-9ha6hs2d.js} +1 -290
  31. package/dist/{cli-81r1wjyv.js → cli-9nfx44eh.js} +1 -1
  32. package/dist/cli-9traj3dn.js +638 -0
  33. package/dist/{cli-smcrrmhy.js → cli-agzebbd5.js} +9 -9
  34. package/dist/{cli-na2pxe4f.js → cli-apx87jne.js} +2 -2
  35. package/dist/{cli-rfz2ve55.js → cli-bzszjf2p.js} +2855 -862
  36. package/dist/{cli-c5km5znr.js → cli-c8r3kzzb.js} +1 -1
  37. package/dist/{cli-hsem16hb.js → cli-cgtksawx.js} +7 -4
  38. package/dist/{cli-db3m6zdt.js → cli-d2qr7aj4.js} +1 -1
  39. package/dist/{cli-rfs4vddv.js → cli-d5f9ed5c.js} +5 -5
  40. package/dist/cli-e3g5mbkz.js +776 -0
  41. package/dist/{cli-7jykv7ef.js → cli-e6mpjhed.js} +1 -1
  42. package/dist/{cli-7a93cv8c.js → cli-ee9gtz70.js} +98 -23
  43. package/dist/{cli-3nxdmjrc.js → cli-eejsgvm4.js} +4 -4
  44. package/dist/{cli-fmhj1ehj.js → cli-ef1hg1wv.js} +470 -51
  45. package/dist/cli-f527ce74.js +781 -0
  46. package/dist/{cli-ppy4nnnh.js → cli-f7kr7svz.js} +2 -2
  47. package/dist/cli-hjwmhcg1.js +10622 -0
  48. package/dist/{cli-2bw3w47j.js → cli-hnhtk6cj.js} +1 -1
  49. package/dist/{cli-ywm1azg9.js → cli-hnmhtzvh.js} +6 -4
  50. package/dist/{cli-h7k0xtry.js → cli-hvqbtna4.js} +4 -1256
  51. package/dist/{cli-s8z6x4b4.js → cli-j0pfptdp.js} +218 -102
  52. package/dist/cli-jta2eyzc.js +619 -0
  53. package/dist/{cli-5er5gjbm.js → cli-k382tshb.js} +10 -11
  54. package/dist/{cli-v3zhnxsb.js → cli-k3dp5tpf.js} +2 -2
  55. package/dist/{cli-wd0hz6ah.js → cli-kbrt8gqa.js} +9 -91
  56. package/dist/cli-kceah1eh.js +92 -0
  57. package/dist/{cli-ne7smj1b.js → cli-ke896fcf.js} +10 -10
  58. package/dist/{cli-xc7p7s3g.js → cli-kt6zqg0e.js} +6 -6
  59. package/dist/{cli-wrh08zjd.js → cli-m50t4309.js} +5 -18
  60. package/dist/cli-n2wq4j7m.js +6985 -0
  61. package/dist/{cli-bv2etw2y.js → cli-n3hzg89b.js} +46 -15
  62. package/dist/{cli-tmhsxhb8.js → cli-n5vwg842.js} +23 -6
  63. package/dist/{cli-qm1448f9.js → cli-ne236afy.js} +8 -8
  64. package/dist/{cli-d161g69q.js → cli-p1x85d2t.js} +50 -2
  65. package/dist/{cli-7pz3b7x5.js → cli-przpmdgr.js} +25 -0
  66. package/dist/{cli-0a7mm3zp.js → cli-q0ke1yww.js} +25 -21
  67. package/dist/{cli-e3pmyt39.js → cli-q50942rs.js} +1 -1
  68. package/dist/{cli-r44t9wqc.js → cli-r106725k.js} +2 -2
  69. package/dist/{cli-phcqp1b9.js → cli-r2pnvj8g.js} +2 -2
  70. package/dist/{cli-jpc4r224.js → cli-r62a35ea.js} +19 -3
  71. package/dist/{cli-cd0hv9nh.js → cli-ra0xzggj.js} +2 -2
  72. package/dist/cli-rhs9pz33.js +294 -0
  73. package/dist/{cli-r4fqfpwf.js → cli-s2sp957d.js} +50 -27
  74. package/dist/{cli-1x7da0de.js → cli-s4setq91.js} +8 -8
  75. package/dist/{cli-6thk4jz3.js → cli-se8w6wny.js} +6 -6
  76. package/dist/cli-skxvvpap.js +10140 -0
  77. package/dist/{cli-014vns2y.js → cli-stfs0k5s.js} +208 -525
  78. package/dist/{cli-0p3enk35.js → cli-tqaazemc.js} +9 -1
  79. package/dist/{cli-nwrdx840.js → cli-tr4sxp68.js} +3 -3
  80. package/dist/{cli-r0byd61h.js → cli-tsde1hdr.js} +15 -15
  81. package/dist/{cli-b07hr3bt.js → cli-txqb9s38.js} +2 -2
  82. package/dist/{cli-6r2f7edk.js → cli-v1yb0rqb.js} +6 -6
  83. package/dist/{cli-saqyage0.js → cli-vatyhshy.js} +179 -27
  84. package/dist/{cli-5wpw4rab.js → cli-vdach5a9.js} +5 -5
  85. package/dist/{cli-7avy4v8w.js → cli-w1q7h2r2.js} +5 -3
  86. package/dist/{cli-rcp5aqdw.js → cli-w7m81tb7.js} +1 -1
  87. package/dist/{cli-c3rk1v0x.js → cli-wayw93nt.js} +3 -3
  88. package/dist/cli-wmgrkscj.js +23254 -0
  89. package/dist/{cli-9xf7fdtp.js → cli-z5jjpaxw.js} +29 -6
  90. package/dist/{cli-451ks6aw.js → cli-zkpks3r3.js} +1 -1
  91. package/dist/cli.js +29 -45
  92. package/dist/{codex-adapter-r3dn4fp5.js → codex-adapter-y81sssk0.js} +15 -14
  93. package/dist/{codex-login-841kv5fk.js → codex-login-f2rcfpp9.js} +3 -2
  94. package/dist/{codex-session-runner-fwt793h4.js → codex-session-runner-8vx4j6a9.js} +15 -14
  95. package/dist/{commands-z8fq9qna.js → commands-kcpvpcrr.js} +11 -10
  96. package/dist/{controller-hq5ggpcp.js → controller-ywrmt6yd.js} +5 -4
  97. package/dist/{controllers-connect-3mf2btyj.js → controllers-connect-kwpvj3rf.js} +42 -37
  98. package/dist/{cursor-adapter-q8pgv5qa.js → cursor-adapter-cehv1qns.js} +7 -6
  99. package/dist/{db-yyhqqrbf.js → db-k8ankj20.js} +12 -11
  100. package/dist/{db-qfpq4bt7.js → db-ww5d7jq3.js} +28 -9
  101. package/dist/{devin-adapter-xgtj680j.js → devin-adapter-x1022qb1.js} +3 -2
  102. package/dist/{dispatcher-x0x7qfcq.js → dispatcher-e8gq5m68.js} +38 -33
  103. package/dist/{docker-f503k9p0.js → docker-ff6y1190.js} +3 -2
  104. package/dist/{dsh-adapter-34etvb5m.js → dsh-adapter-3epjm3af.js} +7 -6
  105. package/dist/{e2b-66xra4az.js → e2b-8ygwhg0f.js} +4 -3
  106. package/dist/{e2b-xwhyj8cw.js → e2b-swhnpw3n.js} +4 -3
  107. package/dist/{event-bus-vjtv82gm.js → event-bus-6axnngdj.js} +3 -2
  108. package/dist/{external-channel-h1fjecwe.js → external-channel-h3359cwn.js} +11 -10
  109. package/dist/{google-generative-ai-szdxbpqg.js → google-generative-ai-g8db7x0f.js} +4 -2
  110. package/dist/{google-vertex-qzw3p36d.js → google-vertex-r2692q0r.js} +4 -2
  111. package/dist/{grok-adapter-e7mr287e.js → grok-adapter-0d4x7gkx.js} +18 -17
  112. package/dist/{handlers-znb9n7d4.js → handlers-an1gzv21.js} +41 -36
  113. package/dist/{heartbeat-bm4qkn8d.js → heartbeat-6dakeb61.js} +43 -38
  114. package/dist/{hook-254r4mza.js → hook-6v6cv6d5.js} +11 -23
  115. package/dist/{hook-xaa3q80s.js → hook-sa5xye4y.js} +12 -11
  116. package/dist/{http-3dgrgp8y.js → http-r7f3eky0.js} +1499 -251
  117. package/dist/index-52j1aja4.js +3465 -0
  118. package/dist/{index-fx3jqq1e.js → index-7ep4gzdk.js} +38 -33
  119. package/dist/index-9gw58n4k.js +193 -0
  120. package/dist/index-9j87mcm8.js +56305 -0
  121. package/dist/index-bsmcresk.js +79424 -0
  122. package/dist/index-mh85qhec.js +475 -0
  123. package/dist/{index-g2byveez.js → index-rmpw9a8q.js} +38 -33
  124. package/dist/{index-2ybk7khy.js → index-s2wxgzr0.js} +468 -683
  125. package/dist/{index-bdsqa799.js → index-v1v6n7hg.js} +43 -38
  126. package/dist/index-we27kd31.js +12810 -0
  127. package/dist/{index-jd7sejm2.js → index-zk96aq1k.js} +10 -9
  128. package/dist/{keepalive-6ywhpja1.js → keepalive-be9vwy5h.js} +12 -11
  129. package/dist/{lead-cw45n21s.js → lead-0861cwrf.js} +61 -56
  130. package/dist/{maintenance-ss1a1ge9.js → maintenance-mzzgc8bn.js} +10 -9
  131. package/dist/{node-fkajaq96.js → node-mn1zs7an.js} +2 -1
  132. package/dist/{oauth-refresh-sweep-3c6f8vyy.js → oauth-refresh-sweep-cpdnfwdj.js} +11 -10
  133. package/dist/{onboard-8hzdhc1k.js → onboard-fh8qs4r3.js} +11 -3
  134. package/dist/{opencode-adapter-qbchbcfz.js → opencode-adapter-nm42wwj8.js} +18 -13
  135. package/dist/{otel-impl-e6mnvc4v.js → otel-impl-x6c1c9g4.js} +242 -868
  136. package/dist/{pi-mono-adapter-3c9g9snh.js → pi-mono-adapter-9n2ya240.js} +244 -106
  137. package/dist/{pricing-refresh-gedkjdw0.js → pricing-refresh-qb0rv0ap.js} +12 -11
  138. package/dist/{rbac-roles-dt4vh1yy.js → rbac-roles-1gzdwbh1.js} +11 -10
  139. package/dist/{rbac-roles-eszdg6pm.js → rbac-roles-3mraey52.js} +12 -11
  140. package/dist/{render-v2-907cy6sa.js → render-v2-agpa45zz.js} +18 -14
  141. package/dist/{resume-42stcaz0.js → resume-x0ydy9s9.js} +25 -21
  142. package/dist/{runtime-qfry88v2.js → runtime-sa2vr16g.js} +2 -2
  143. package/dist/{setup-adbc1c10.js → setup-as9ga0d6.js} +2 -2
  144. package/dist/{virtual-modules-rtmt494q.js → virtual-modules-9gkxqrap.js} +6 -5
  145. package/dist/{work-objects-wpj8ck95.js → work-objects-y5g1y7ev.js} +41 -36
  146. package/dist/{worker-bzdra9rf.js → worker-860c3e38.js} +61 -56
  147. package/dist/{x-qfmygqqv.js → x-m477fr0h.js} +3 -2
  148. package/openapi.json +523 -344
  149. package/package.json +10 -11
  150. package/src/be/config-refs.ts +60 -0
  151. package/src/be/db/page-versions.ts +15 -0
  152. package/src/be/db/runtime.ts +35 -8
  153. package/src/be/db/skill-name-resolution.ts +36 -0
  154. package/src/be/db/tasks/read.ts +230 -0
  155. package/src/be/db/tasks/write.ts +7 -0
  156. package/src/be/db.ts +52 -7
  157. package/src/be/migrations/215_swarm_config_export_to_env.sql +34 -0
  158. package/src/be/migrations/216_task_resolved_effort.sql +5 -0
  159. package/src/be/migrations/217_chat_sdk_state.sql +104 -0
  160. package/src/be/model-catalog-store.ts +5 -1
  161. package/src/be/model-tier-resolution.ts +12 -1
  162. package/src/be/model-validation.ts +5 -2
  163. package/src/be/models-catalog.ts +26 -1
  164. package/src/be/modelsdev-cache.json +198 -63
  165. package/src/be/modelsdev-cache.ts +9 -1
  166. package/src/be/script-credential-broker.ts +39 -2
  167. package/src/be/scripts/run-saved.ts +1 -0
  168. package/src/be/scripts/typecheck.ts +10 -8
  169. package/src/be/seed/runner.ts +13 -1
  170. package/src/be/seed/state-db.ts +5 -0
  171. package/src/be/seed/types.ts +6 -0
  172. package/src/be/seed-pricing.ts +19 -2
  173. package/src/be/seed-scripts/catalog/ops-catalog-audit.inline.ts +1 -1
  174. package/src/be/seed-scripts/catalog/ops-catalog-audit.ts +1 -1
  175. package/src/be/seed-skills/bundled-files.generated.json +0 -18
  176. package/src/be/seed-skills/index.ts +104 -3
  177. package/src/be/swarm-config-guard.ts +52 -0
  178. package/src/cli.tsx +0 -16
  179. package/src/commands/onboard/non-interactive.ts +4 -2
  180. package/src/commands/provider-credentials.ts +52 -6
  181. package/src/commands/runner.ts +190 -54
  182. package/src/e2b/env.ts +5 -0
  183. package/src/extensions/contract-types.generated.ts +1 -1
  184. package/src/extensions/contract.ts +45 -0
  185. package/src/extensions/dispatcher.ts +7 -0
  186. package/src/extensions/post-bridge.ts +40 -0
  187. package/src/github/handlers.ts +11 -4
  188. package/src/heartbeat/templates.ts +8 -5
  189. package/src/hooks/hook.ts +0 -26
  190. package/src/http/all-routes.ts +0 -1
  191. package/src/http/config.ts +36 -17
  192. package/src/http/core.ts +4 -0
  193. package/src/http/index.ts +14 -2
  194. package/src/http/integrations.ts +88 -1
  195. package/src/http/mcp.ts +15 -5
  196. package/src/http/page-proxy.ts +2 -4
  197. package/src/http/pages-public.ts +3 -3
  198. package/src/http/pages.ts +3 -13
  199. package/src/http/poll.ts +28 -68
  200. package/src/http/requested-by.ts +54 -0
  201. package/src/http/scripts.ts +1 -0
  202. package/src/http/stats.ts +1 -30
  203. package/src/http/tasks.ts +61 -5
  204. package/src/http/utils.ts +14 -0
  205. package/src/http/webhooks.ts +159 -1
  206. package/src/http/x.ts +1 -0
  207. package/src/integrations/chat-sdk/adapters.ts +129 -0
  208. package/src/integrations/chat-sdk/attachments.ts +232 -0
  209. package/src/integrations/chat-sdk/background.ts +36 -0
  210. package/src/integrations/chat-sdk/commands.ts +194 -0
  211. package/src/integrations/chat-sdk/config.ts +198 -0
  212. package/src/integrations/chat-sdk/discord-api.ts +63 -0
  213. package/src/integrations/chat-sdk/discord-gateway.ts +185 -0
  214. package/src/integrations/chat-sdk/handlers.ts +28 -0
  215. package/src/integrations/chat-sdk/inbound.ts +426 -0
  216. package/src/integrations/chat-sdk/limits.ts +48 -0
  217. package/src/integrations/chat-sdk/logger.ts +81 -0
  218. package/src/integrations/chat-sdk/outbound.ts +123 -0
  219. package/src/integrations/chat-sdk/relay.ts +172 -0
  220. package/src/integrations/chat-sdk/router.ts +169 -0
  221. package/src/integrations/chat-sdk/runtime.ts +351 -0
  222. package/src/integrations/chat-sdk/schema.ts +245 -0
  223. package/src/integrations/chat-sdk/state.ts +243 -0
  224. package/src/integrations/chat-sdk/status.ts +244 -0
  225. package/src/integrations/chat-sdk/steering.ts +58 -0
  226. package/src/integrations/chat-sdk/teams-origin.ts +77 -0
  227. package/src/integrations/chat-sdk/telegram-api.ts +56 -0
  228. package/src/integrations/chat-sdk/templates.ts +16 -0
  229. package/src/integrations/chat-sdk/test-hooks.ts +37 -0
  230. package/src/integrations/chat-sdk/thread-buffer.ts +100 -0
  231. package/src/integrations/chat-sdk/typing.ts +65 -0
  232. package/src/pages/version.ts +4 -5
  233. package/src/prompts/base-prompt.ts +111 -45
  234. package/src/providers/acp-target-catalog.ts +6 -0
  235. package/src/providers/acp-targets.ts +55 -2
  236. package/src/providers/amp-adapter.ts +1 -1
  237. package/src/providers/claude-adapter.ts +1 -1
  238. package/src/providers/claude-flag-settings.ts +17 -5
  239. package/src/providers/claude-managed-adapter.ts +1 -1
  240. package/src/providers/claude-session-events.ts +6 -1
  241. package/src/providers/dsh-adapter.ts +1 -1
  242. package/src/providers/opencode-adapter.ts +243 -26
  243. package/src/providers/opencode-swarm-plugin.ts +31 -0
  244. package/src/providers/pi-mono-adapter.ts +398 -153
  245. package/src/providers/pricing-sources.md +33 -2
  246. package/src/providers/reasoning-effort.ts +27 -0
  247. package/src/providers/types.ts +6 -2
  248. package/src/rbac/legacy-policy.ts +8 -2
  249. package/src/rbac/permissions.ts +21 -0
  250. package/src/scheduler/scheduler.ts +4 -2
  251. package/src/scripts-runtime/loader.ts +19 -7
  252. package/src/scripts-runtime/sdk-allowlist.ts +8 -6
  253. package/src/scripts-runtime/swarm-sdk.ts +0 -11
  254. package/src/scripts-runtime/types/stdlib.d.ts +27 -15
  255. package/src/scripts-runtime/types/swarm-extension.d.ts +63 -1
  256. package/src/scripts-runtime/types/swarm-sdk.d.ts +27 -15
  257. package/src/server.ts +52 -18
  258. package/src/slack/event-dedup.ts +1 -1
  259. package/src/tasks/additive-buffer.ts +4 -2
  260. package/src/tasks/context-key.ts +60 -1
  261. package/src/tasks/model-pin.ts +67 -0
  262. package/src/tasks/worker-follow-up.ts +4 -31
  263. package/src/tests/acp-adapter.test.ts +42 -0
  264. package/src/tests/api-drain-worker-e2e.test.ts +1 -6
  265. package/src/tests/base-prompt.test.ts +58 -54
  266. package/src/tests/chat-sdk-commands.test.ts +191 -0
  267. package/src/tests/chat-sdk-config.test.ts +334 -0
  268. package/src/tests/chat-sdk-discord-api.test.ts +68 -0
  269. package/src/tests/chat-sdk-discord-gateway.test.ts +252 -0
  270. package/src/tests/chat-sdk-discord-webhook.test.ts +126 -0
  271. package/src/tests/chat-sdk-fields-sync.test.ts +50 -0
  272. package/src/tests/chat-sdk-harness.ts +146 -0
  273. package/src/tests/chat-sdk-inbound.test.ts +363 -0
  274. package/src/tests/chat-sdk-relay.test.ts +470 -0
  275. package/src/tests/chat-sdk-reload.test.ts +128 -0
  276. package/src/tests/chat-sdk-shutdown.test.ts +220 -0
  277. package/src/tests/chat-sdk-slack.test.ts +268 -0
  278. package/src/tests/chat-sdk-state.test.ts +163 -0
  279. package/src/tests/chat-sdk-status-route.test.ts +382 -0
  280. package/src/tests/chat-sdk-teams.test.ts +277 -0
  281. package/src/tests/chat-sdk-tools.test.ts +520 -0
  282. package/src/tests/chat-sdk-typing.test.ts +120 -0
  283. package/src/tests/chat-sdk-webhook-telegram.test.ts +200 -0
  284. package/src/tests/claude-adapter-binary.test.ts +9 -4
  285. package/src/tests/claude-flag-settings.test.ts +11 -3
  286. package/src/tests/claude-managed-adapter.test.ts +1 -1
  287. package/src/tests/claude-sdk-lifecycle.test.ts +9 -3
  288. package/src/tests/claude-thinking-tokens.test.ts +57 -0
  289. package/src/tests/claude-worker-parity.test.ts +2 -7
  290. package/src/tests/config-env-export-chat-sdk.test.ts +11 -0
  291. package/src/tests/config-refs.test.ts +66 -0
  292. package/src/tests/context-key.test.ts +19 -0
  293. package/src/tests/cors-allowlist.test.ts +25 -0
  294. package/src/tests/create-page-tool.test.ts +18 -0
  295. package/src/tests/credential-check.test.ts +139 -0
  296. package/src/tests/credentials.test.ts +21 -0
  297. package/src/tests/db-runtime.test.ts +61 -0
  298. package/src/tests/db-task-read-contract.test.ts +20 -0
  299. package/src/tests/db-task-write-contract.test.ts +10 -0
  300. package/src/tests/docs-index-footprint.test.js +3 -3
  301. package/src/tests/dsh-adapter.test.ts +1 -1
  302. package/src/tests/enabled-capabilities.test.ts +20 -0
  303. package/src/tests/entrypoint-api-readiness.test.ts +14 -8
  304. package/src/tests/entrypoint-config-env-export.test.ts +5 -2
  305. package/src/tests/entrypoint-export-to-env.test.ts +78 -0
  306. package/src/tests/explicit-model-validation.test.ts +105 -1
  307. package/src/tests/extensions-example-route-chat-channel.test.ts +154 -0
  308. package/src/tests/extensions-post-bridge.test.ts +51 -0
  309. package/src/tests/fetch-resolved-env.test.ts +128 -0
  310. package/src/tests/fixtures/chat-sdk/telegram-private-text.json +10 -0
  311. package/src/tests/fixtures/extensions/route-chat-channel-to-agent/hooks.ts +27 -0
  312. package/src/tests/fixtures/extensions/route-chat-channel-to-agent/manifest.json +9 -0
  313. package/src/tests/fixtures/openai-compatible-registry-extension.child.ts +146 -0
  314. package/src/tests/fixtures/runner-legacy-resume-prompt.ts +122 -0
  315. package/src/tests/github-handlers.test.ts +35 -0
  316. package/src/tests/harness-provider-resolution.test.ts +12 -0
  317. package/src/tests/heartbeat-checklist.test.ts +3 -2
  318. package/src/tests/hook-runtime-close.test.ts +0 -2
  319. package/src/tests/http-api-integration.test.ts +0 -25
  320. package/src/tests/migration-046-budgets.test.ts +17 -16
  321. package/src/tests/migration-217-chat-sdk-state.test.ts +113 -0
  322. package/src/tests/model-tier-resolution.test.ts +93 -0
  323. package/src/tests/models-catalog.test.ts +42 -1
  324. package/src/tests/openai-compatible-providers.test.ts +134 -0
  325. package/src/tests/openai-compatible-registry-extension.test.ts +42 -0
  326. package/src/tests/opencode-adapter.test.ts +216 -2
  327. package/src/tests/opencode-helmcode-sdk.test.ts +201 -0
  328. package/src/tests/opencode-shell-env.test.ts +145 -0
  329. package/src/tests/openrouter-base-url.test.ts +101 -151
  330. package/src/tests/page-proxy.test.ts +1 -1
  331. package/src/tests/pages-browser-sdk.test.ts +76 -0
  332. package/src/tests/pages-feedback.test.ts +1 -1
  333. package/src/tests/paused-tasks-requested-by.test.ts +102 -0
  334. package/src/tests/pi-custom-provider-fake-server.test.ts +442 -0
  335. package/src/tests/pi-mono-adapter.test.ts +385 -5
  336. package/src/tests/pi-shell-env.test.ts +170 -0
  337. package/src/tests/prompt-template-remaining.test.ts +35 -0
  338. package/src/tests/rbac-engine.test.ts +11 -3
  339. package/src/tests/runner-exit-after-tasks.test.ts +0 -4
  340. package/src/tests/runner-legacy-resume-prompt.test.ts +64 -0
  341. package/src/tests/script-connections.test.ts +2 -0
  342. package/src/tests/scripts-http.test.ts +201 -1
  343. package/src/tests/scripts-only-gating.test.ts +2 -3
  344. package/src/tests/scripts-runtime.test.ts +58 -40
  345. package/src/tests/secret-scrubber.test.ts +86 -0
  346. package/src/tests/seed-skills-bundled-files.test.ts +45 -53
  347. package/src/tests/seed-skills-retire.test.ts +182 -0
  348. package/src/tests/send-task-requester-gate.test.ts +58 -0
  349. package/src/tests/session-cost-recompute-unit.test.ts +46 -0
  350. package/src/tests/skill-get-name-resolution.test.ts +137 -0
  351. package/src/tests/sonnet-5-5-registry.test.ts +9 -1
  352. package/src/tests/swarm-config-export-to-env.test.ts +267 -0
  353. package/src/tests/swarm-config-reserved-keys.test.ts +16 -0
  354. package/src/tests/swarm-diff.test.ts +1 -1
  355. package/src/tests/task-model-effort-rerun.test.ts +164 -0
  356. package/src/tests/task-session-prompts.test.ts +132 -0
  357. package/src/tests/task-tool-manifest.test.ts +14 -0
  358. package/src/tests/task-tools-ctx.test.ts +2 -0
  359. package/src/tests/tool-annotations.test.ts +6 -6
  360. package/src/tests/ui-logs-parser.test.ts +43 -0
  361. package/src/tests/used-by-route.test.ts +6 -0
  362. package/src/tests/vercel-ai-gateway.test.ts +149 -0
  363. package/src/tests/workflow-swarm-script.test.ts +38 -0
  364. package/src/tests/workflow-wait-filter.test.ts +5 -3
  365. package/src/tools/chat-access.ts +41 -0
  366. package/src/tools/chat-open-dm.ts +59 -0
  367. package/src/tools/chat-post.ts +74 -0
  368. package/src/tools/chat-read-thread.ts +100 -0
  369. package/src/tools/chat-reply.ts +75 -0
  370. package/src/tools/create-page.ts +3 -13
  371. package/src/tools/model-catalog/index.ts +2 -1
  372. package/src/tools/register-chat-channel.ts +139 -0
  373. package/src/tools/send-task.ts +24 -0
  374. package/src/tools/skills/skill-get.ts +17 -9
  375. package/src/tools/swarm-config/get-config.ts +2 -1
  376. package/src/tools/swarm-config/list-config.ts +2 -1
  377. package/src/tools/swarm-config/set-config.ts +16 -3
  378. package/src/tools/tool-config.ts +8 -6
  379. package/src/types.ts +12 -2
  380. package/src/utils/config-env-export.ts +74 -0
  381. package/src/utils/credentials.test.ts +92 -0
  382. package/src/utils/credentials.ts +52 -4
  383. package/src/utils/harness-provider.ts +15 -6
  384. package/src/utils/runtime-model-catalog.ts +11 -1
  385. package/src/utils/secret-scrubber.ts +71 -2
  386. package/src/utils/task-tool-manifest.ts +19 -2
  387. package/src/workflows/executors/swarm-script.ts +1 -0
  388. package/templates/skills/agent-browser/SKILL.md +1 -1
  389. package/templates/skills/agent-browser/content.md +1 -1
  390. package/templates/skills/apps/SKILL.md +8 -1
  391. package/templates/skills/apps/content.md +8 -1
  392. package/templates/skills/chat-sdk/config.json +14 -0
  393. package/templates/skills/chat-sdk/content.md +84 -0
  394. package/templates/skills/composio-gmail/content.md +7 -0
  395. package/templates/skills/composio-google-docs/content.md +1 -1
  396. package/templates/skills/email-domain-health/config.json +14 -0
  397. package/templates/skills/email-domain-health/content.md +131 -0
  398. package/templates/skills/kv-storage/content.md +2 -2
  399. package/templates/skills/pages/content.md +8 -10
  400. package/templates/skills/swarm-extensions/content.md +2 -0
  401. package/templates/skills/swarm-scripts/SKILL.md +4 -2
  402. package/templates/skills/swarm-scripts/config.json +1 -1
  403. package/templates/skills/swarm-scripts/content.md +4 -2
  404. package/templates/skills/workflow-iterate/content.md +38 -0
  405. package/dist/artifact-eczsknc3.js +0 -3843
  406. package/dist/cli-bd957dgb.js +0 -153
  407. package/dist/cli-q51yprfq.js +0 -1104
  408. package/dist/cli-t1ze64h3.js +0 -811
  409. package/dist/cli-tcc4wd5d.js +0 -56471
  410. package/dist/index-9ch1n761.js +0 -1102
  411. package/src/artifact-sdk/index.ts +0 -2
  412. package/src/artifact-sdk/localtunnel.d.ts +0 -20
  413. package/src/artifact-sdk/port.ts +0 -12
  414. package/src/artifact-sdk/server.ts +0 -183
  415. package/src/artifact-sdk/tunnel.ts +0 -19
  416. package/src/commands/artifact.ts +0 -249
  417. package/src/http/ecosystem.ts +0 -77
  418. package/src/tests/artifact-commands.test.ts +0 -92
  419. package/src/tests/artifact-sdk.test.ts +0 -793
  420. package/src/tests/register-service-security.test.ts +0 -194
  421. package/src/tools/list-services.ts +0 -107
  422. package/src/tools/register-service.ts +0 -177
  423. package/src/tools/unregister-service.ts +0 -73
  424. package/src/tools/update-service-status.ts +0 -96
  425. package/templates/skills/artifacts/config.json +0 -14
  426. package/templates/skills/artifacts/content.md +0 -344
  427. package/templates/skills/artifacts/files/examples/approval-flow.ts +0 -34
  428. package/templates/skills/artifacts/files/examples/hono-dashboard.ts +0 -31
  429. package/templates/skills/artifacts/files/examples/multi-artifact.ts +0 -20
  430. package/templates/skills/artifacts/files/examples/static-report.sh +0 -17
  431. /package/src/{artifact-sdk → pages}/browser-sdk.ts +0 -0
  432. /package/src/{artifact-sdk → pages}/feedback-overlay.ts +0 -0
package/openapi.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "openapi": "3.1.0",
3
3
  "info": {
4
4
  "title": "Agent Swarm API",
5
- "version": "1.173.0",
5
+ "version": "2.0.0",
6
6
  "description": "Multi-agent orchestration API for Claude Code, Codex, and Gemini CLI. Enables task distribution, agent communication, and service discovery.\n\nMCP tools are documented separately in [MCP.md](./MCP.md)."
7
7
  },
8
8
  "servers": [
@@ -172,7 +172,8 @@
172
172
  "workflow",
173
173
  "linear",
174
174
  "jira",
175
- "comb"
175
+ "comb",
176
+ "chat"
176
177
  ],
177
178
  "default": "mcp"
178
179
  },
@@ -375,6 +376,17 @@
375
376
  "modelAlias": {
376
377
  "type": "string"
377
378
  },
379
+ "resolvedEffort": {
380
+ "type": "string",
381
+ "enum": [
382
+ "off",
383
+ "low",
384
+ "medium",
385
+ "high",
386
+ "xhigh",
387
+ "max"
388
+ ]
389
+ },
378
390
  "scheduleId": {
379
391
  "type": "string"
380
392
  },
@@ -1399,6 +1411,9 @@
1399
1411
  },
1400
1412
  "encrypted": {
1401
1413
  "type": "boolean"
1414
+ },
1415
+ "exportToEnv": {
1416
+ "type": "boolean"
1402
1417
  }
1403
1418
  },
1404
1419
  "required": [
@@ -1412,7 +1427,8 @@
1412
1427
  "description",
1413
1428
  "createdAt",
1414
1429
  "lastUpdatedAt",
1415
- "encrypted"
1430
+ "encrypted",
1431
+ "exportToEnv"
1416
1432
  ]
1417
1433
  },
1418
1434
  "ContextSnapshot": {
@@ -2923,7 +2939,8 @@
2923
2939
  "mcp",
2924
2940
  "script",
2925
2941
  "slack",
2926
- "api"
2942
+ "api",
2943
+ "chat"
2927
2944
  ]
2928
2945
  },
2929
2946
  "senderLabel": {
@@ -3044,6 +3061,20 @@
3044
3061
  "createdAt"
3045
3062
  ]
3046
3063
  },
3064
+ "UserCommsPrefs": {
3065
+ "type": "object",
3066
+ "properties": {
3067
+ "tone": {
3068
+ "type": "string"
3069
+ },
3070
+ "language": {
3071
+ "type": "string"
3072
+ },
3073
+ "verbosity": {
3074
+ "type": "string"
3075
+ }
3076
+ }
3077
+ },
3047
3078
  "Page": {
3048
3079
  "type": "object",
3049
3080
  "properties": {
@@ -3330,20 +3361,6 @@
3330
3361
  "changeReason"
3331
3362
  ]
3332
3363
  },
3333
- "UserCommsPrefs": {
3334
- "type": "object",
3335
- "properties": {
3336
- "tone": {
3337
- "type": "string"
3338
- },
3339
- "language": {
3340
- "type": "string"
3341
- },
3342
- "verbosity": {
3343
- "type": "string"
3344
- }
3345
- }
3346
- },
3347
3364
  "BudgetRefusedTrigger": {
3348
3365
  "type": "object",
3349
3366
  "properties": {
@@ -4415,93 +4432,6 @@
4415
4432
  "installedAt"
4416
4433
  ]
4417
4434
  },
4418
- "Service": {
4419
- "type": "object",
4420
- "properties": {
4421
- "id": {
4422
- "type": "string",
4423
- "format": "uuid"
4424
- },
4425
- "agentId": {
4426
- "type": "string"
4427
- },
4428
- "name": {
4429
- "type": "string",
4430
- "minLength": 1,
4431
- "maxLength": 50
4432
- },
4433
- "port": {
4434
- "type": "integer",
4435
- "minimum": 1,
4436
- "maximum": 65535,
4437
- "default": 3000
4438
- },
4439
- "description": {
4440
- "type": "string"
4441
- },
4442
- "url": {
4443
- "type": "string",
4444
- "format": "uri"
4445
- },
4446
- "healthCheckPath": {
4447
- "type": "string",
4448
- "default": "/health"
4449
- },
4450
- "status": {
4451
- "type": "string",
4452
- "enum": [
4453
- "starting",
4454
- "healthy",
4455
- "unhealthy",
4456
- "stopped"
4457
- ],
4458
- "default": "starting"
4459
- },
4460
- "script": {
4461
- "type": "string",
4462
- "minLength": 1
4463
- },
4464
- "cwd": {
4465
- "type": "string"
4466
- },
4467
- "interpreter": {
4468
- "type": "string"
4469
- },
4470
- "args": {
4471
- "type": "array",
4472
- "items": {
4473
- "type": "string"
4474
- }
4475
- },
4476
- "env": {
4477
- "type": "object",
4478
- "additionalProperties": {
4479
- "type": "string"
4480
- }
4481
- },
4482
- "metadata": {
4483
- "type": "object",
4484
- "additionalProperties": {},
4485
- "default": {}
4486
- },
4487
- "createdAt": {
4488
- "type": "string",
4489
- "format": "date-time"
4490
- },
4491
- "lastUpdatedAt": {
4492
- "type": "string",
4493
- "format": "date-time"
4494
- }
4495
- },
4496
- "required": [
4497
- "id",
4498
- "agentId",
4499
- "name",
4500
- "script",
4501
- "createdAt",
4502
- "lastUpdatedAt"
4503
- ]
4504
- },
4505
4435
  "TaskTemplate": {
4506
4436
  "type": "object",
4507
4437
  "properties": {
@@ -10255,7 +10185,6 @@
10255
10185
  "prompt-templates",
10256
10186
  "mcp",
10257
10187
  "profiles",
10258
- "services",
10259
10188
  "scheduling",
10260
10189
  "memory",
10261
10190
  "workflows",
@@ -10269,6 +10198,7 @@
10269
10198
  "repo",
10270
10199
  "agentmail",
10271
10200
  "kapso",
10201
+ "chat-sdk",
10272
10202
  "swarm-x"
10273
10203
  ]
10274
10204
  }
@@ -10318,7 +10248,6 @@
10318
10248
  "prompt-templates",
10319
10249
  "mcp",
10320
10250
  "profiles",
10321
- "services",
10322
10251
  "scheduling",
10323
10252
  "memory",
10324
10253
  "workflows",
@@ -10332,6 +10261,7 @@
10332
10261
  "repo",
10333
10262
  "agentmail",
10334
10263
  "kapso",
10264
+ "chat-sdk",
10335
10265
  "swarm-x"
10336
10266
  ]
10337
10267
  }
@@ -15734,6 +15664,10 @@
15734
15664
  "string",
15735
15665
  "null"
15736
15666
  ]
15667
+ },
15668
+ "exportToEnv": {
15669
+ "type": "boolean",
15670
+ "description": "Export this row into agent process env (default true on create, false for a few server-side secrets; omitted on update keeps the stored flag). Rejected as true for keys only the API server reads."
15737
15671
  }
15738
15672
  },
15739
15673
  "required": [
@@ -16674,71 +16608,97 @@
16674
16608
  }
16675
16609
  }
16676
16610
  },
16677
- "/ecosystem": {
16678
- "get": {
16679
- "summary": "Get PM2 ecosystem config for agent services",
16611
+ "/api/keys/report-usage": {
16612
+ "post": {
16613
+ "summary": "Record which API key was used for a task",
16680
16614
  "tags": [
16681
- "Ecosystem"
16615
+ "API Keys"
16682
16616
  ],
16683
16617
  "security": [
16684
16618
  {
16685
16619
  "bearerAuth": []
16686
16620
  }
16687
16621
  ],
16622
+ "requestBody": {
16623
+ "content": {
16624
+ "application/json": {
16625
+ "schema": {
16626
+ "type": "object",
16627
+ "properties": {
16628
+ "keyType": {
16629
+ "type": "string"
16630
+ },
16631
+ "keySuffix": {
16632
+ "type": "string",
16633
+ "minLength": 1,
16634
+ "maxLength": 10
16635
+ },
16636
+ "keyIndex": {
16637
+ "type": "integer",
16638
+ "minimum": 0
16639
+ },
16640
+ "taskId": {
16641
+ "type": "string",
16642
+ "format": "uuid"
16643
+ },
16644
+ "scope": {
16645
+ "type": "string"
16646
+ },
16647
+ "scopeId": {
16648
+ "type": "string"
16649
+ },
16650
+ "plan": {
16651
+ "type": "string",
16652
+ "maxLength": 40
16653
+ }
16654
+ },
16655
+ "required": [
16656
+ "keyType",
16657
+ "keySuffix",
16658
+ "keyIndex"
16659
+ ]
16660
+ }
16661
+ }
16662
+ }
16663
+ },
16688
16664
  "responses": {
16689
16665
  "200": {
16690
- "description": "PM2 ecosystem config",
16666
+ "description": "Usage recorded",
16691
16667
  "content": {
16692
16668
  "application/json": {
16693
16669
  "schema": {
16694
16670
  "type": "object",
16695
16671
  "properties": {
16696
- "apps": {
16697
- "type": "array",
16698
- "items": {
16699
- "type": "object",
16700
- "properties": {
16701
- "name": {
16702
- "type": "string"
16703
- },
16704
- "script": {
16705
- "type": "string"
16706
- },
16707
- "cwd": {
16708
- "type": "string"
16709
- },
16710
- "interpreter": {
16711
- "type": "string"
16712
- },
16713
- "args": {
16714
- "type": "array",
16715
- "items": {
16716
- "type": "string"
16717
- }
16718
- },
16719
- "env": {
16720
- "type": "object",
16721
- "additionalProperties": {
16722
- "type": "string"
16723
- }
16724
- }
16725
- },
16726
- "required": [
16727
- "name",
16728
- "script"
16729
- ]
16730
- }
16672
+ "success": {
16673
+ "type": "boolean",
16674
+ "enum": [
16675
+ true
16676
+ ]
16677
+ },
16678
+ "message": {
16679
+ "type": "string"
16731
16680
  }
16732
16681
  },
16733
16682
  "required": [
16734
- "apps"
16683
+ "success",
16684
+ "message"
16735
16685
  ]
16736
16686
  }
16737
16687
  }
16738
16688
  }
16739
16689
  },
16740
16690
  "400": {
16741
- "description": "Missing X-Agent-ID",
16691
+ "description": "Validation error",
16692
+ "content": {
16693
+ "application/json": {
16694
+ "schema": {
16695
+ "$ref": "#/components/schemas/ErrorResponse"
16696
+ }
16697
+ }
16698
+ }
16699
+ },
16700
+ "401": {
16701
+ "description": "Unauthorized",
16742
16702
  "content": {
16743
16703
  "application/json": {
16744
16704
  "schema": {
@@ -16750,9 +16710,9 @@
16750
16710
  }
16751
16711
  }
16752
16712
  },
16753
- "/api/keys/report-usage": {
16713
+ "/api/keys/report-rate-limit": {
16754
16714
  "post": {
16755
- "summary": "Record which API key was used for a task",
16715
+ "summary": "Mark an API key as rate-limited",
16756
16716
  "tags": [
16757
16717
  "API Keys"
16758
16718
  ],
@@ -16779,25 +16739,22 @@
16779
16739
  "type": "integer",
16780
16740
  "minimum": 0
16781
16741
  },
16782
- "taskId": {
16742
+ "rateLimitedUntil": {
16783
16743
  "type": "string",
16784
- "format": "uuid"
16744
+ "format": "date-time"
16785
16745
  },
16786
16746
  "scope": {
16787
16747
  "type": "string"
16788
16748
  },
16789
16749
  "scopeId": {
16790
16750
  "type": "string"
16791
- },
16792
- "plan": {
16793
- "type": "string",
16794
- "maxLength": 40
16795
16751
  }
16796
16752
  },
16797
16753
  "required": [
16798
16754
  "keyType",
16799
16755
  "keySuffix",
16800
- "keyIndex"
16756
+ "keyIndex",
16757
+ "rateLimitedUntil"
16801
16758
  ]
16802
16759
  }
16803
16760
  }
@@ -16805,7 +16762,7 @@
16805
16762
  },
16806
16763
  "responses": {
16807
16764
  "200": {
16808
- "description": "Usage recorded",
16765
+ "description": "Key marked as rate-limited",
16809
16766
  "content": {
16810
16767
  "application/json": {
16811
16768
  "schema": {
@@ -16852,9 +16809,9 @@
16852
16809
  }
16853
16810
  }
16854
16811
  },
16855
- "/api/keys/report-rate-limit": {
16812
+ "/api/keys/report-auth-failure": {
16856
16813
  "post": {
16857
- "summary": "Mark an API key as rate-limited",
16814
+ "summary": "Record an auth failure for a pooled key; bench it after 2 in a row",
16858
16815
  "tags": [
16859
16816
  "API Keys"
16860
16817
  ],
@@ -16881,9 +16838,9 @@
16881
16838
  "type": "integer",
16882
16839
  "minimum": 0
16883
16840
  },
16884
- "rateLimitedUntil": {
16841
+ "taskId": {
16885
16842
  "type": "string",
16886
- "format": "date-time"
16843
+ "format": "uuid"
16887
16844
  },
16888
16845
  "scope": {
16889
16846
  "type": "string"
@@ -16895,8 +16852,7 @@
16895
16852
  "required": [
16896
16853
  "keyType",
16897
16854
  "keySuffix",
16898
- "keyIndex",
16899
- "rateLimitedUntil"
16855
+ "keyIndex"
16900
16856
  ]
16901
16857
  }
16902
16858
  }
@@ -16904,7 +16860,7 @@
16904
16860
  },
16905
16861
  "responses": {
16906
16862
  "200": {
16907
- "description": "Key marked as rate-limited",
16863
+ "description": "Failure recorded",
16908
16864
  "content": {
16909
16865
  "application/json": {
16910
16866
  "schema": {
@@ -16916,122 +16872,24 @@
16916
16872
  true
16917
16873
  ]
16918
16874
  },
16919
- "message": {
16920
- "type": "string"
16875
+ "consecutiveAuthFailures": {
16876
+ "type": "integer"
16877
+ },
16878
+ "benched": {
16879
+ "type": "boolean"
16880
+ },
16881
+ "rateLimitedUntil": {
16882
+ "type": [
16883
+ "string",
16884
+ "null"
16885
+ ]
16921
16886
  }
16922
16887
  },
16923
16888
  "required": [
16924
16889
  "success",
16925
- "message"
16926
- ]
16927
- }
16928
- }
16929
- }
16930
- },
16931
- "400": {
16932
- "description": "Validation error",
16933
- "content": {
16934
- "application/json": {
16935
- "schema": {
16936
- "$ref": "#/components/schemas/ErrorResponse"
16937
- }
16938
- }
16939
- }
16940
- },
16941
- "401": {
16942
- "description": "Unauthorized",
16943
- "content": {
16944
- "application/json": {
16945
- "schema": {
16946
- "$ref": "#/components/schemas/ErrorResponse"
16947
- }
16948
- }
16949
- }
16950
- }
16951
- }
16952
- }
16953
- },
16954
- "/api/keys/report-auth-failure": {
16955
- "post": {
16956
- "summary": "Record an auth failure for a pooled key; bench it after 2 in a row",
16957
- "tags": [
16958
- "API Keys"
16959
- ],
16960
- "security": [
16961
- {
16962
- "bearerAuth": []
16963
- }
16964
- ],
16965
- "requestBody": {
16966
- "content": {
16967
- "application/json": {
16968
- "schema": {
16969
- "type": "object",
16970
- "properties": {
16971
- "keyType": {
16972
- "type": "string"
16973
- },
16974
- "keySuffix": {
16975
- "type": "string",
16976
- "minLength": 1,
16977
- "maxLength": 10
16978
- },
16979
- "keyIndex": {
16980
- "type": "integer",
16981
- "minimum": 0
16982
- },
16983
- "taskId": {
16984
- "type": "string",
16985
- "format": "uuid"
16986
- },
16987
- "scope": {
16988
- "type": "string"
16989
- },
16990
- "scopeId": {
16991
- "type": "string"
16992
- }
16993
- },
16994
- "required": [
16995
- "keyType",
16996
- "keySuffix",
16997
- "keyIndex"
16998
- ]
16999
- }
17000
- }
17001
- }
17002
- },
17003
- "responses": {
17004
- "200": {
17005
- "description": "Failure recorded",
17006
- "content": {
17007
- "application/json": {
17008
- "schema": {
17009
- "type": "object",
17010
- "properties": {
17011
- "success": {
17012
- "type": "boolean",
17013
- "enum": [
17014
- true
17015
- ]
17016
- },
17017
- "consecutiveAuthFailures": {
17018
- "type": "integer"
17019
- },
17020
- "benched": {
17021
- "type": "boolean"
17022
- },
17023
- "rateLimitedUntil": {
17024
- "type": [
17025
- "string",
17026
- "null"
17027
- ]
17028
- }
17029
- },
17030
- "required": [
17031
- "success",
17032
- "consecutiveAuthFailures",
17033
- "benched",
17034
- "rateLimitedUntil"
16890
+ "consecutiveAuthFailures",
16891
+ "benched",
16892
+ "rateLimitedUntil"
17035
16893
  ]
17036
16894
  }
17037
16895
  }
@@ -21106,6 +20964,247 @@
21106
20964
  }
21107
20965
  }
21108
20966
  },
20967
+ "/api/integrations/chat/status": {
20968
+ "get": {
20969
+ "summary": "Chat SDK channel status: enabled flag, Slack clash, per-adapter health and webhook URL.",
20970
+ "tags": [
20971
+ "Integrations"
20972
+ ],
20973
+ "security": [
20974
+ {
20975
+ "bearerAuth": []
20976
+ }
20977
+ ],
20978
+ "responses": {
20979
+ "200": {
20980
+ "description": "Per-adapter status. `health` is `disabled` for an adapter that is not running. Never contains secret values.",
20981
+ "content": {
20982
+ "application/json": {
20983
+ "schema": {
20984
+ "type": "object",
20985
+ "properties": {
20986
+ "enabled": {
20987
+ "type": "boolean"
20988
+ },
20989
+ "slackClash": {
20990
+ "type": "boolean"
20991
+ },
20992
+ "error": {
20993
+ "type": "string"
20994
+ },
20995
+ "adapters": {
20996
+ "type": "array",
20997
+ "items": {
20998
+ "type": "object",
20999
+ "properties": {
21000
+ "name": {
21001
+ "type": "string",
21002
+ "enum": [
21003
+ "telegram",
21004
+ "slack",
21005
+ "discord",
21006
+ "teams"
21007
+ ]
21008
+ },
21009
+ "configured": {
21010
+ "type": "boolean"
21011
+ },
21012
+ "enabled": {
21013
+ "type": "boolean"
21014
+ },
21015
+ "health": {
21016
+ "type": "string",
21017
+ "enum": [
21018
+ "ok",
21019
+ "error",
21020
+ "disabled",
21021
+ "incomplete"
21022
+ ]
21023
+ },
21024
+ "error": {
21025
+ "type": "string"
21026
+ },
21027
+ "webhookUrl": {
21028
+ "type": "string"
21029
+ },
21030
+ "mode": {
21031
+ "type": "string"
21032
+ },
21033
+ "gateway": {
21034
+ "type": "object",
21035
+ "properties": {
21036
+ "state": {
21037
+ "type": "string",
21038
+ "enum": [
21039
+ "running",
21040
+ "backoff",
21041
+ "stopped"
21042
+ ]
21043
+ },
21044
+ "since": {
21045
+ "type": "string"
21046
+ },
21047
+ "restarts": {
21048
+ "type": "number"
21049
+ }
21050
+ },
21051
+ "required": [
21052
+ "state",
21053
+ "since",
21054
+ "restarts"
21055
+ ]
21056
+ },
21057
+ "guilds": {
21058
+ "type": "object",
21059
+ "properties": {
21060
+ "count": {
21061
+ "type": "number"
21062
+ },
21063
+ "names": {
21064
+ "type": "array",
21065
+ "items": {
21066
+ "type": "string"
21067
+ }
21068
+ }
21069
+ },
21070
+ "required": [
21071
+ "count",
21072
+ "names"
21073
+ ]
21074
+ }
21075
+ },
21076
+ "required": [
21077
+ "name",
21078
+ "configured",
21079
+ "enabled",
21080
+ "health",
21081
+ "webhookUrl"
21082
+ ]
21083
+ }
21084
+ }
21085
+ },
21086
+ "required": [
21087
+ "enabled",
21088
+ "slackClash",
21089
+ "adapters"
21090
+ ]
21091
+ }
21092
+ }
21093
+ }
21094
+ }
21095
+ }
21096
+ }
21097
+ },
21098
+ "/api/integrations/chat/telegram/register-webhook": {
21099
+ "post": {
21100
+ "summary": "Register this swarm's public Telegram webhook URL and secret token with the Bot API (setWebhook), then return getWebhookInfo.",
21101
+ "tags": [
21102
+ "Integrations"
21103
+ ],
21104
+ "security": [
21105
+ {
21106
+ "bearerAuth": []
21107
+ }
21108
+ ],
21109
+ "requestBody": {
21110
+ "content": {
21111
+ "application/json": {
21112
+ "schema": {
21113
+ "type": "object",
21114
+ "properties": {}
21115
+ }
21116
+ }
21117
+ }
21118
+ },
21119
+ "responses": {
21120
+ "200": {
21121
+ "description": "Webhook registered",
21122
+ "content": {
21123
+ "application/json": {
21124
+ "schema": {
21125
+ "type": "object",
21126
+ "properties": {
21127
+ "webhookUrl": {
21128
+ "type": "string"
21129
+ },
21130
+ "webhookInfo": {
21131
+ "type": "object",
21132
+ "properties": {
21133
+ "url": {
21134
+ "type": "string"
21135
+ },
21136
+ "has_custom_certificate": {
21137
+ "type": "boolean"
21138
+ },
21139
+ "pending_update_count": {
21140
+ "type": "number"
21141
+ },
21142
+ "last_error_date": {
21143
+ "type": "number"
21144
+ },
21145
+ "last_error_message": {
21146
+ "type": "string"
21147
+ },
21148
+ "max_connections": {
21149
+ "type": "number"
21150
+ },
21151
+ "ip_address": {
21152
+ "type": "string"
21153
+ },
21154
+ "allowed_updates": {
21155
+ "type": "array",
21156
+ "items": {
21157
+ "type": "string"
21158
+ }
21159
+ }
21160
+ },
21161
+ "required": [
21162
+ "url"
21163
+ ],
21164
+ "additionalProperties": {}
21165
+ }
21166
+ },
21167
+ "required": [
21168
+ "webhookUrl",
21169
+ "webhookInfo"
21170
+ ]
21171
+ }
21172
+ }
21173
+ }
21174
+ },
21175
+ "400": {
21176
+ "description": "Telegram is not configured for webhook mode",
21177
+ "content": {
21178
+ "application/json": {
21179
+ "schema": {
21180
+ "$ref": "#/components/schemas/ErrorResponse"
21181
+ }
21182
+ }
21183
+ }
21184
+ },
21185
+ "403": {
21186
+ "description": "Only the lead agent or a dashboard user can register the webhook",
21187
+ "content": {
21188
+ "application/json": {
21189
+ "schema": {
21190
+ "$ref": "#/components/schemas/ErrorResponse"
21191
+ }
21192
+ }
21193
+ }
21194
+ },
21195
+ "502": {
21196
+ "description": "The Telegram Bot API rejected the call",
21197
+ "content": {
21198
+ "application/json": {
21199
+ "schema": {
21200
+ "$ref": "#/components/schemas/ErrorResponse"
21201
+ }
21202
+ }
21203
+ }
21204
+ }
21205
+ }
21206
+ }
21207
+ },
21109
21208
  "/api/kv/{key}": {
21110
21209
  "get": {
21111
21210
  "summary": "Get a KV entry by key (namespace resolved from request headers)",
@@ -29856,7 +29955,8 @@
29856
29955
  "workflow",
29857
29956
  "linear",
29858
29957
  "jira",
29859
- "comb"
29958
+ "comb",
29959
+ "chat"
29860
29960
  ],
29861
29961
  "default": "mcp"
29862
29962
  },
@@ -29929,6 +30029,17 @@
29929
30029
  "max"
29930
30030
  ]
29931
30031
  },
30032
+ "resolvedEffort": {
30033
+ "type": "string",
30034
+ "enum": [
30035
+ "off",
30036
+ "low",
30037
+ "medium",
30038
+ "high",
30039
+ "xhigh",
30040
+ "max"
30041
+ ]
30042
+ },
29932
30043
  "provider": {
29933
30044
  "type": "string",
29934
30045
  "enum": [
@@ -30170,7 +30281,8 @@
30170
30281
  "workflow",
30171
30282
  "linear",
30172
30283
  "jira",
30173
- "comb"
30284
+ "comb",
30285
+ "chat"
30174
30286
  ]
30175
30287
  },
30176
30288
  "outputSchema": {
@@ -30242,6 +30354,16 @@
30242
30354
  }
30243
30355
  }
30244
30356
  },
30357
+ "403": {
30358
+ "description": "An agent caller names a parentTaskId it neither owns nor created, or a non-lead agent binds the task to a chat thread",
30359
+ "content": {
30360
+ "application/json": {
30361
+ "schema": {
30362
+ "$ref": "#/components/schemas/ErrorResponse"
30363
+ }
30364
+ }
30365
+ }
30366
+ },
30245
30367
  "422": {
30246
30368
  "description": "Task creation blocked by an extension",
30247
30369
  "content": {
@@ -30426,6 +30548,21 @@
30426
30548
  "model": {
30427
30549
  "type": "string"
30428
30550
  },
30551
+ "effort": {
30552
+ "type": [
30553
+ "string",
30554
+ "null"
30555
+ ],
30556
+ "enum": [
30557
+ "off",
30558
+ "low",
30559
+ "medium",
30560
+ "high",
30561
+ "xhigh",
30562
+ "max",
30563
+ null
30564
+ ]
30565
+ },
30429
30566
  "providerMeta": {
30430
30567
  "type": "object",
30431
30568
  "properties": {
@@ -30613,7 +30750,8 @@
30613
30750
  "mcp",
30614
30751
  "script",
30615
30752
  "slack",
30616
- "api"
30753
+ "api",
30754
+ "chat"
30617
30755
  ]
30618
30756
  },
30619
30757
  "requestedByUserId": {
@@ -31530,6 +31668,33 @@
31530
31668
  "items": {
31531
31669
  "$ref": "#/components/schemas/TaskAttachment"
31532
31670
  }
31671
+ },
31672
+ "requestedBy": {
31673
+ "type": "object",
31674
+ "properties": {
31675
+ "id": {
31676
+ "type": "string"
31677
+ },
31678
+ "name": {
31679
+ "type": "string",
31680
+ "minLength": 1
31681
+ },
31682
+ "email": {
31683
+ "type": "string"
31684
+ },
31685
+ "role": {
31686
+ "type": "string"
31687
+ },
31688
+ "notes": {
31689
+ "type": "string"
31690
+ },
31691
+ "comms": {
31692
+ "$ref": "#/components/schemas/UserCommsPrefs"
31693
+ }
31694
+ },
31695
+ "required": [
31696
+ "name"
31697
+ ]
31533
31698
  }
31534
31699
  },
31535
31700
  "required": [
@@ -46110,7 +46275,8 @@
46110
46275
  "workflow",
46111
46276
  "linear",
46112
46277
  "jira",
46113
- "comb"
46278
+ "comb",
46279
+ "chat"
46114
46280
  ],
46115
46281
  "default": "mcp"
46116
46282
  },
@@ -51429,68 +51595,6 @@
51429
51595
  }
51430
51596
  }
51431
51597
  },
51432
- "/api/services": {
51433
- "get": {
51434
- "summary": "List all registered services",
51435
- "tags": [
51436
- "Stats"
51437
- ],
51438
- "security": [
51439
- {
51440
- "bearerAuth": []
51441
- }
51442
- ],
51443
- "parameters": [
51444
- {
51445
- "schema": {
51446
- "type": "string"
51447
- },
51448
- "required": false,
51449
- "name": "status",
51450
- "in": "query"
51451
- },
51452
- {
51453
- "schema": {
51454
- "type": "string"
51455
- },
51456
- "required": false,
51457
- "name": "agentId",
51458
- "in": "query"
51459
- },
51460
- {
51461
- "schema": {
51462
- "type": "string"
51463
- },
51464
- "required": false,
51465
- "name": "name",
51466
- "in": "query"
51467
- }
51468
- ],
51469
- "responses": {
51470
- "200": {
51471
- "description": "Service list",
51472
- "content": {
51473
- "application/json": {
51474
- "schema": {
51475
- "type": "object",
51476
- "properties": {
51477
- "services": {
51478
- "type": "array",
51479
- "items": {
51480
- "$ref": "#/components/schemas/Service"
51481
- }
51482
- }
51483
- },
51484
- "required": [
51485
- "services"
51486
- ]
51487
- }
51488
- }
51489
- }
51490
- }
51491
- }
51492
- }
51493
- },
51494
51598
  "/api/scheduled-tasks": {
51495
51599
  "get": {
51496
51600
  "summary": "List scheduled tasks",
@@ -56515,6 +56619,81 @@
56515
56619
  }
56516
56620
  }
56517
56621
  },
56622
+ "/api/integrations/chat/{adapter}/webhook": {
56623
+ "post": {
56624
+ "summary": "Handle Chat SDK platform webhooks (Telegram, Slack, Discord, Teams)",
56625
+ "tags": [
56626
+ "Webhooks"
56627
+ ],
56628
+ "parameters": [
56629
+ {
56630
+ "schema": {
56631
+ "type": "string",
56632
+ "description": "Chat SDK adapter name, e.g. telegram"
56633
+ },
56634
+ "required": true,
56635
+ "description": "Chat SDK adapter name, e.g. telegram",
56636
+ "name": "adapter",
56637
+ "in": "path"
56638
+ }
56639
+ ],
56640
+ "responses": {
56641
+ "200": {
56642
+ "description": "Adapter response"
56643
+ },
56644
+ "401": {
56645
+ "description": "Invalid platform signature or secret token",
56646
+ "content": {
56647
+ "application/json": {
56648
+ "schema": {
56649
+ "$ref": "#/components/schemas/ErrorResponse"
56650
+ }
56651
+ }
56652
+ }
56653
+ },
56654
+ "403": {
56655
+ "description": "Teams activity whose serviceUrl is not a Bot Framework host",
56656
+ "content": {
56657
+ "application/json": {
56658
+ "schema": {
56659
+ "$ref": "#/components/schemas/ErrorResponse"
56660
+ }
56661
+ }
56662
+ }
56663
+ },
56664
+ "404": {
56665
+ "description": "Chat SDK disabled or adapter not configured",
56666
+ "content": {
56667
+ "application/json": {
56668
+ "schema": {
56669
+ "$ref": "#/components/schemas/ErrorResponse"
56670
+ }
56671
+ }
56672
+ }
56673
+ },
56674
+ "413": {
56675
+ "description": "Body exceeds 1 MiB",
56676
+ "content": {
56677
+ "application/json": {
56678
+ "schema": {
56679
+ "$ref": "#/components/schemas/ErrorResponse"
56680
+ }
56681
+ }
56682
+ }
56683
+ },
56684
+ "503": {
56685
+ "description": "Adapter configured but failed to start",
56686
+ "content": {
56687
+ "application/json": {
56688
+ "schema": {
56689
+ "$ref": "#/components/schemas/ErrorResponse"
56690
+ }
56691
+ }
56692
+ }
56693
+ }
56694
+ }
56695
+ }
56696
+ },
56518
56697
  "/api/workflow-runs/{runId}/events": {
56519
56698
  "post": {
56520
56699
  "summary": "Fire a run-scoped event signal",