@desplega.ai/agent-swarm 2.9.1 → 2.10.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 (315) hide show
  1. package/dist/acp-adapter-bht22g3k.js +16 -0
  2. package/dist/{acp-targets-ny75x1qy.js → acp-targets-arrwv4f0.js} +6 -6
  3. package/dist/{actions-b9qgrmeq.js → actions-y0d2n1c2.js} +49 -28
  4. package/dist/{agent-fs-provision-b5dhdsbd.js → agent-fs-provision-tpj7sktd.js} +4 -4
  5. package/dist/{amp-adapter-vtax2c9s.js → amp-adapter-vmmnmw8d.js} +1 -1
  6. package/dist/{anthropic-messages-r5xf5hqw.js → anthropic-messages-zdca3gv1.js} +13 -13
  7. package/dist/{app-g2z15hax.js → app-wb7w45dq.js} +3 -3
  8. package/dist/{approval-notifications-yt13wp8r.js → approval-notifications-7mqr6vbd.js} +5 -5
  9. package/dist/{assistant-2cgfxsgk.js → assistant-gf60454p.js} +19 -19
  10. package/dist/{boot-args-schema-3gwy0f60.js → boot-args-schema-qxmd59sr.js} +1 -1
  11. package/dist/{boot-reembed-mywmyp4s.js → boot-reembed-5tmeskj2.js} +1 -1
  12. package/dist/{boot-reembed-92g7s5zp.js → boot-reembed-wb44vc3s.js} +1 -1
  13. package/dist/boot-scrub-sweep-25bxhnw4.js +9 -0
  14. package/dist/{boot-seeds-ce7rvgq1.js → boot-seeds-nj9za0vk.js} +4 -4
  15. package/dist/{claude-adapter-3m4q7735.js → claude-adapter-d3krpdyb.js} +5 -5
  16. package/dist/{claude-managed-setup-c217draw.js → claude-managed-setup-7y4pwd81.js} +1 -1
  17. package/dist/{claude-sdk-session-7fbqm51z.js → claude-sdk-session-d138zy0e.js} +5 -5
  18. package/dist/{cli-tvc4jag9.js → cli-01k6wpr9.js} +3 -3
  19. package/dist/{cli-2xs8tsf7.js → cli-124ntmf0.js} +42 -36
  20. package/dist/{cli-jm0hvmz2.js → cli-2rnd5j3t.js} +1 -1
  21. package/dist/{cli-32djehja.js → cli-2spnz7ye.js} +8 -8
  22. package/dist/{cli-2dq9yv8p.js → cli-2v2zdm0a.js} +1 -1
  23. package/dist/{cli-fkef327x.js → cli-3caf7pmg.js} +2 -2
  24. package/dist/{cli-mw620q3n.js → cli-3et6fmfe.js} +1 -1
  25. package/dist/{cli-h9yqfzx9.js → cli-3f8zbtqa.js} +3 -3
  26. package/dist/{cli-mhapr559.js → cli-43evxwj4.js} +1 -1
  27. package/dist/{cli-pyjn0qhk.js → cli-539h29es.js} +138 -21
  28. package/dist/{cli-bnqncekd.js → cli-5qhfv9rw.js} +2 -2
  29. package/dist/{cli-p4kckx1z.js → cli-6037prsx.js} +6 -6
  30. package/dist/{cli-zr6qy15y.js → cli-6cwr32fe.js} +17 -17
  31. package/dist/{cli-1jykg0py.js → cli-7r162fxe.js} +22 -15
  32. package/dist/{cli-sn650d7x.js → cli-8st34zhr.js} +20 -10
  33. package/dist/{cli-rq5rpv6k.js → cli-91pkxres.js} +1 -1
  34. package/dist/{cli-m7zvgt57.js → cli-9fjr27ez.js} +10 -10
  35. package/dist/{cli-f8x9drqr.js → cli-aw83sr40.js} +19 -5
  36. package/dist/{cli-jkw6ptfw.js → cli-cc93xzes.js} +5 -5
  37. package/dist/{cli-gfy38pvt.js → cli-fcfbct2j.js} +5 -5
  38. package/dist/{cli-nafvvsp8.js → cli-fq2rr3jb.js} +5 -5
  39. package/dist/{boot-scrub-sweep-7dkdzqxx.js → cli-had1p04a.js} +8 -9
  40. package/dist/{cli-bg63qmsx.js → cli-j6te8keb.js} +4 -4
  41. package/dist/{cli-br0924pw.js → cli-jrbq4djp.js} +1 -1
  42. package/dist/{cli-kxx4k2jw.js → cli-k3q2va86.js} +2 -2
  43. package/dist/{cli-jaw5v1sy.js → cli-k5yewqgd.js} +3 -3
  44. package/dist/cli-kbtzfrxj.js +404 -0
  45. package/dist/{cli-td9tb872.js → cli-m9cvf7vs.js} +7 -7
  46. package/dist/{cli-f3jyzq4g.js → cli-md50mj0r.js} +2 -2
  47. package/dist/{cli-xag7btpe.js → cli-mk7c5ac4.js} +1 -1
  48. package/dist/cli-mys27d03.js +321 -0
  49. package/dist/{cli-nbt14he0.js → cli-nstkanmx.js} +5 -5
  50. package/dist/{cli-wn13hhdt.js → cli-nv4xsvmk.js} +4 -4
  51. package/dist/{cli-vyff45ve.js → cli-p0c3vtch.js} +2 -2
  52. package/dist/{cli-2czxfnvj.js → cli-p0n7b5rz.js} +662 -93
  53. package/dist/{cli-j7svy295.js → cli-q5srsxq2.js} +12 -12
  54. package/dist/{cli-vt89089n.js → cli-qrta34nb.js} +4 -4
  55. package/dist/{cli-ysvspf5e.js → cli-qx4f057j.js} +2 -2
  56. package/dist/{cli-zh0e5x7p.js → cli-s1khw52h.js} +11 -11
  57. package/dist/{cli-mkwkwq81.js → cli-s1zqk1aj.js} +18 -11
  58. package/dist/{cli-f9gz2vyj.js → cli-sb4426be.js} +7 -7
  59. package/dist/{cli-dgs10ttj.js → cli-th1dkc2v.js} +1 -1
  60. package/dist/{cli-3j873zxq.js → cli-tr27kwyg.js} +2 -2
  61. package/dist/{cli-6945ywhr.js → cli-tvgqesec.js} +6 -4
  62. package/dist/{cli-fjggej24.js → cli-v46zsvqk.js} +1 -1
  63. package/dist/{cli-67mwzr35.js → cli-v8z0yga9.js} +4 -4
  64. package/dist/{cli-pb2ay3sh.js → cli-vfqvrd82.js} +5 -5
  65. package/dist/{cli-fh97xn30.js → cli-vq2eg24x.js} +2 -2
  66. package/dist/{cli-v57d7fmm.js → cli-vsw91x06.js} +23 -22
  67. package/dist/{cli-2yjj3e31.js → cli-w1q68d8x.js} +9 -7
  68. package/dist/{cli-y2ewxhth.js → cli-wafmk3fn.js} +10 -10
  69. package/dist/{cli-ctx0b85j.js → cli-wwp1bd3n.js} +257 -101
  70. package/dist/{cli-bkjdknnp.js → cli-y4ccxtz5.js} +37 -5
  71. package/dist/{cli-w4n323t3.js → cli-y8p78ekx.js} +7 -7
  72. package/dist/{cli-8zh9nrew.js → cli-z0m452jr.js} +1 -1
  73. package/dist/{cli-mjw0yf82.js → cli-zeh2mhkg.js} +1 -1
  74. package/dist/{cli-jwampxxq.js → cli-zk7v5s89.js} +2 -2
  75. package/dist/cli.js +16 -16
  76. package/dist/{cloudflare-workers-ai-system-one-9y1zx3pt.js → cloudflare-workers-ai-system-one-4aysy6rh.js} +2 -2
  77. package/dist/{codex-adapter-n656pvb8.js → codex-adapter-exfdbj73.js} +4 -4
  78. package/dist/{codex-session-runner-p0fbv5y9.js → codex-session-runner-xhznc4g3.js} +4 -4
  79. package/dist/{commands-gwea8z5p.js → commands-d8g349v4.js} +3 -3
  80. package/dist/{controller-t67c3grh.js → controller-mwgdmb8y.js} +3 -3
  81. package/dist/{controllers-connect-ks155r0h.js → controllers-connect-5v7qx04j.js} +19 -19
  82. package/dist/core-sxy4epp2.js +38 -0
  83. package/dist/{cursor-adapter-ygwrtmkv.js → cursor-adapter-p2q5h35d.js} +1 -1
  84. package/dist/{db-rb2xqdb1.js → db-qpganbeb.js} +3 -3
  85. package/dist/{db-kpmx06s9.js → db-wcw0b2j8.js} +2 -2
  86. package/dist/{dispatcher-31sm0ej2.js → dispatcher-8d8s49yz.js} +17 -17
  87. package/dist/{dsh-adapter-qyxh0w31.js → dsh-adapter-me0twn13.js} +1 -1
  88. package/dist/{easter-egg-3d-00wjscn6.js → easter-egg-3d-wv7w5ty6.js} +1 -1
  89. package/dist/{embedding-space-qhw4g68n.js → embedding-space-e48xchqa.js} +6 -6
  90. package/dist/{embeddings-zdv9ke6x.js → embeddings-tgq2afbq.js} +1 -1
  91. package/dist/{execute-zna8wwr7.js → execute-8rhwrk7f.js} +1 -1
  92. package/dist/{external-channel-1ac6t56s.js → external-channel-8bt3j2pm.js} +2 -2
  93. package/dist/{fx-adapter-sk7n0fzc.js → fx-adapter-adtdb3jb.js} +8 -8
  94. package/dist/{grok-adapter-sjbcm5ew.js → grok-adapter-accnn9km.js} +8 -8
  95. package/dist/handlers-1x77561e.js +35 -0
  96. package/dist/{heartbeat-2f6z4kdx.js → heartbeat-x0056ra5.js} +20 -20
  97. package/dist/{hook-w1skzaqc.js → hook-a7vmn2st.js} +4 -4
  98. package/dist/{hook-8y0gvtp1.js → hook-mrd2ayxv.js} +5 -5
  99. package/dist/{http-wghxvpef.js → http-ym9c5svp.js} +676 -273
  100. package/dist/{index-s71ez27v.js → index-01ns1pkw.js} +1 -1
  101. package/dist/index-48qzcqzj.js +35 -0
  102. package/dist/{index-9zkchs9t.js → index-ny60jcat.js} +186 -14
  103. package/dist/{index-rv89fvzf.js → index-p46tvwtx.js} +21 -21
  104. package/dist/index-rkvaambe.js +36 -0
  105. package/dist/{index-8zn8nxn5.js → index-x6azjwm8.js} +1 -1
  106. package/dist/{index-25pvya7q.js → index-xj1mq27m.js} +17 -17
  107. package/dist/k8s-m56sw868.js +217 -0
  108. package/dist/{keepalive-sh02349h.js → keepalive-7yxg8z4c.js} +3 -3
  109. package/dist/lead-enzn86bz.js +74 -0
  110. package/dist/{maintenance-yj0dcjja.js → maintenance-6tefxmk1.js} +1 -1
  111. package/dist/{oauth-refresh-sweep-d9xedk66.js → oauth-refresh-sweep-70cavc3a.js} +2 -2
  112. package/dist/{onboard-dpgjn03r.js → onboard-fja65z08.js} +5 -5
  113. package/dist/{openai-decisions-q3hh60wr.js → openai-decisions-ytp6w6xh.js} +1 -1
  114. package/dist/{opencode-adapter-2d31cpjc.js → opencode-adapter-hakkm7yh.js} +5 -5
  115. package/dist/{otel-impl-1skarpfq.js → otel-impl-7zhnt6gj.js} +1 -1
  116. package/dist/{pending-bfmxtx0g.js → pending-h01yzpx4.js} +18 -18
  117. package/dist/{pi-mono-adapter-gvppnasy.js → pi-mono-adapter-f52hz743.js} +6 -6
  118. package/dist/{pricing-refresh-c6b325mk.js → pricing-refresh-fzxvk2zf.js} +2 -2
  119. package/dist/{rbac-roles-h80qbdbs.js → rbac-roles-9v6vhgbs.js} +3 -3
  120. package/dist/{rbac-roles-zfcx68tx.js → rbac-roles-hfgh8sba.js} +2 -2
  121. package/dist/{render-v2-nx20t3rb.js → render-v2-1rgspxzf.js} +3 -3
  122. package/dist/{resume-5ep8agan.js → resume-tqy61x24.js} +7 -7
  123. package/dist/{runtime-r3pj4mce.js → runtime-exkxyx5f.js} +1 -1
  124. package/dist/{session-access-n7p3m15b.js → session-access-3act7vt4.js} +4 -4
  125. package/dist/{session-source-backfill-v8mt0zwn.js → session-source-backfill-82qe7fqq.js} +2 -2
  126. package/dist/{setup-z1psaqhe.js → setup-ry1vfdef.js} +1 -1
  127. package/dist/thread-buffer-3x93yexa.js +38 -0
  128. package/dist/{typesafe-system-one-f2en2knd.js → typesafe-system-one-vcfj2ak8.js} +2 -2
  129. package/dist/user-merge-jobs-bx6bf7db.js +22 -0
  130. package/dist/{virtual-modules-rrbjdpxn.js → virtual-modules-s0rjzcqq.js} +3 -3
  131. package/dist/{work-objects-4aghh73z.js → work-objects-z2e5tv03.js} +20 -20
  132. package/dist/{worker-follow-up-166zmex1.js → worker-follow-up-y3xeg89w.js} +17 -17
  133. package/dist/worker-zfcv2wbf.js +74 -0
  134. package/openapi.json +1630 -388
  135. package/package.json +3 -3
  136. package/src/be/boot-seeds.ts +7 -1
  137. package/src/be/db/model-groups.ts +238 -0
  138. package/src/be/db/model-profiles.ts +26 -8
  139. package/src/be/db/session-costs.ts +8 -2
  140. package/src/be/db/tasks/read.ts +3 -2
  141. package/src/be/db/tasks/write.ts +2 -1
  142. package/src/be/db/user-references.ts +75 -0
  143. package/src/be/db/users/references.ts +185 -0
  144. package/src/be/db-client.ts +70 -19
  145. package/src/be/db.ts +32 -57
  146. package/src/be/key-window-usage.ts +1 -0
  147. package/src/be/memory/demotion-evidence.ts +34 -0
  148. package/src/be/memory/reranker.ts +34 -12
  149. package/src/be/memory/review-recall-filter.ts +83 -0
  150. package/src/be/memory/search-candidates.ts +19 -6
  151. package/src/be/memory/types.ts +11 -0
  152. package/src/be/migrations/312_task_ui_action_runs_repeatable.sql +6 -0
  153. package/src/be/migrations/314_model_groups.sql +85 -0
  154. package/src/be/migrations/318_superseded_workflow_cut_backfill.sql +22 -0
  155. package/src/be/migrations/319_user_fk_indexes.sql +153 -0
  156. package/src/be/migrations/320_session_costs_kind.sql +4 -0
  157. package/src/be/migrations/321_user_merge_jobs.sql +52 -0
  158. package/src/be/pricing-normalize.ts +2 -0
  159. package/src/be/rbac-roles.ts +6 -4
  160. package/src/be/runtime-pools/db.ts +20 -5
  161. package/src/be/runtime-pools/supervisor.ts +15 -1
  162. package/src/be/scripts/db.ts +11 -0
  163. package/src/be/scripts/typecheck.ts +2 -0
  164. package/src/be/seed-model-groups.ts +86 -0
  165. package/src/be/seed-model-profiles.ts +20 -13
  166. package/src/be/seed-scripts/catalog/dreaming-gather.ts +165 -1
  167. package/src/be/swarm-config-guard.ts +34 -0
  168. package/src/be/task-ui-spec.ts +102 -1
  169. package/src/be/user-merge-jobs.ts +564 -0
  170. package/src/be/users.ts +41 -23
  171. package/src/commands/onboard/agent-fs-version.ts +1 -1
  172. package/src/commands/onboard/compose-generator.ts +1 -1
  173. package/src/commands/onboard/env-generator.ts +1 -1
  174. package/src/commands/provider-credentials.ts +1 -1
  175. package/src/extensions/contract-types.generated.ts +1 -1
  176. package/src/extensions/contract.ts +15 -0
  177. package/src/extensions/dispatcher.ts +14 -4
  178. package/src/github/handlers.ts +57 -0
  179. package/src/github/types.ts +4 -0
  180. package/src/http/all-routes.ts +2 -0
  181. package/src/http/approval-requests.ts +5 -1
  182. package/src/http/auth.ts +3 -1
  183. package/src/http/config.ts +34 -1
  184. package/src/http/index.ts +13 -0
  185. package/src/http/memory.ts +19 -6
  186. package/src/http/model-groups.ts +277 -0
  187. package/src/http/model-profiles.ts +30 -13
  188. package/src/http/tasks.ts +41 -6
  189. package/src/http/tool-hooks.ts +140 -0
  190. package/src/http/users.ts +142 -19
  191. package/src/http/workflows.ts +19 -1
  192. package/src/integrations/chat-sdk/inbound.ts +8 -2
  193. package/src/integrations/chat-sdk/limits.ts +8 -3
  194. package/src/providers/acp-targets.ts +2 -2
  195. package/src/providers/amp-adapter.ts +1 -1
  196. package/src/providers/pricing-sources.md +9 -0
  197. package/src/rbac/legacy-policy.ts +1 -0
  198. package/src/rbac/permissions.ts +5 -0
  199. package/src/runtime-providers/index.ts +7 -5
  200. package/src/runtime-providers/k8s.ts +250 -0
  201. package/src/scripts-runtime/types/stdlib.d.ts +2 -0
  202. package/src/scripts-runtime/types/swarm-extension.d.ts +16 -1
  203. package/src/scripts-runtime/types/swarm-sdk.d.ts +2 -0
  204. package/src/slack/actions.ts +33 -10
  205. package/src/slack/blocks.ts +23 -2
  206. package/src/slack/render-v2.ts +47 -0
  207. package/src/tests/acp-adapter.test.ts +26 -0
  208. package/src/tests/chat-sdk-relay.test.ts +21 -1
  209. package/src/tests/check-pr-body.test.ts +43 -0
  210. package/src/tests/credential-check.test.ts +14 -6
  211. package/src/tests/db-client.test.ts +146 -0
  212. package/src/tests/deploy-guard.test.ts +7 -7
  213. package/src/tests/deploy-select.test.ts +83 -0
  214. package/src/tests/dreaming-gather-corrections.test.ts +467 -0
  215. package/src/tests/event-loop-lag.test.ts +9 -7
  216. package/src/tests/fixtures/extensions/native-tool-recorder/hooks.ts +26 -0
  217. package/src/tests/fixtures/extensions/native-tool-recorder/manifest.json +10 -0
  218. package/src/tests/fixtures/onboard/content.compose.yml.txt +1 -1
  219. package/src/tests/fixtures/onboard/content.env.txt +1 -1
  220. package/src/tests/fixtures/onboard/dev.compose.yml.txt +1 -1
  221. package/src/tests/fixtures/onboard/dev.env.txt +1 -1
  222. package/src/tests/fixtures/onboard/full-all.compose.yml.txt +1 -1
  223. package/src/tests/fixtures/onboard/full-all.env.txt +1 -1
  224. package/src/tests/fixtures/onboard/full.compose.yml.txt +1 -1
  225. package/src/tests/fixtures/onboard/full.env.txt +1 -1
  226. package/src/tests/fixtures/onboard/research.compose.yml.txt +1 -1
  227. package/src/tests/fixtures/onboard/research.env.txt +1 -1
  228. package/src/tests/fixtures/onboard/solo.compose.yml.txt +1 -1
  229. package/src/tests/fixtures/onboard/solo.env.txt +1 -1
  230. package/src/tests/github-event-filter.test.ts +8 -0
  231. package/src/tests/github-handlers-inline-comments.test.ts +2 -0
  232. package/src/tests/github-handlers-reactions.test.ts +4 -0
  233. package/src/tests/github-handlers.test.ts +3 -0
  234. package/src/tests/github-sender-trust.test.ts +223 -0
  235. package/src/tests/http-users.test.ts +142 -41
  236. package/src/tests/k8s-pool-smoke.test.ts +190 -0
  237. package/src/tests/key-window-usage.test.ts +15 -0
  238. package/src/tests/memory-rater-store.test.ts +35 -1
  239. package/src/tests/memory-reranker.test.ts +39 -4
  240. package/src/tests/memory-review-recall-filter.test.ts +205 -0
  241. package/src/tests/migration-318-superseded-workflow-cut-backfill.test.ts +74 -0
  242. package/src/tests/model-groups-api.test.ts +415 -0
  243. package/src/tests/model-profiles-api.test.ts +1 -0
  244. package/src/tests/operator-granted-credentials.test.ts +7 -2
  245. package/src/tests/operator-granted-role-wire.test.ts +2 -1
  246. package/src/tests/rbac-engine.test.ts +1 -0
  247. package/src/tests/runtime-k8s-pools.test.ts +142 -0
  248. package/src/tests/runtime-pools-db.test.ts +42 -2
  249. package/src/tests/runtime-pools-http.test.ts +47 -2
  250. package/src/tests/runtime-provider-registration.test.ts +5 -14
  251. package/src/tests/runtime-providers-k8s.test.ts +303 -0
  252. package/src/tests/script-connections.test.ts +13 -1
  253. package/src/tests/short-id.test.ts +23 -0
  254. package/src/tests/slack-blocks.test.ts +69 -0
  255. package/src/tests/slack-render-v2.test.ts +54 -0
  256. package/src/tests/spec-base-url.test.ts +13 -1
  257. package/src/tests/system-one-decide-session-cost.test.ts +196 -0
  258. package/src/tests/task-ui-action-route.test.ts +59 -1
  259. package/src/tests/task-ui-script-actions.test.ts +517 -0
  260. package/src/tests/tool-hooks-http.test.ts +187 -0
  261. package/src/tests/ui-spec-script-actions-config.test.ts +196 -0
  262. package/src/tests/user-delete-perf.test.ts +321 -0
  263. package/src/tests/user-merge-jobs.test.ts +680 -0
  264. package/src/tests/vcs-provider.test.ts +25 -5
  265. package/src/tests/vendored-openapi.test.ts +13 -1
  266. package/src/tests/workflow-agent-task-retry.test.ts +62 -0
  267. package/src/tests/workflow-foreach-supersede-retry.test.ts +10 -0
  268. package/src/tests/workflow-http-v2.test.ts +27 -0
  269. package/src/tests/workflow-replay.test.ts +10 -1
  270. package/src/tests/workflow-triggers-v2.test.ts +128 -0
  271. package/src/tests/workflow-wait-event.test.ts +109 -1
  272. package/src/tools/memory-search.ts +14 -3
  273. package/src/tools/store-progress.ts +26 -26
  274. package/src/tools/swarm-config/delete-config.ts +12 -1
  275. package/src/tools/swarm-config/set-config.ts +8 -0
  276. package/src/tools/system-one-decide.ts +113 -3
  277. package/src/tools/utils.ts +4 -1
  278. package/src/tools/workflows/create-workflow.ts +2 -0
  279. package/src/tools/workflows/update-workflow.ts +3 -1
  280. package/src/types.ts +86 -2
  281. package/src/ui-spec/actions.ts +30 -4
  282. package/src/ui-spec/schema.ts +38 -0
  283. package/src/ui-spec/script-actions.ts +340 -0
  284. package/src/ui-spec/script-allowlist.ts +48 -0
  285. package/src/utils/short-id.ts +20 -14
  286. package/src/utils/task-ui-spec.ts +16 -4
  287. package/src/vcs/index.ts +12 -2
  288. package/src/workflows/executors/system-one-decision.ts +2 -2
  289. package/src/workflows/resume.ts +3 -2
  290. package/src/workflows/task-step-routing.ts +30 -10
  291. package/src/workflows/triggers.ts +35 -3
  292. package/templates/extensions/manifest.schema.json +13 -0
  293. package/templates/skills/swarm-docs/content.md +2 -0
  294. package/templates/skills/ui-spec/content.md +7 -1
  295. package/templates/workflows/dreaming/content.md +1 -1
  296. package/dist/acp-adapter-g909b5hw.js +0 -16
  297. package/dist/cli-b91nz213.js +0 -93
  298. package/dist/handlers-yzy0c87x.js +0 -35
  299. package/dist/index-2t4859r5.js +0 -35
  300. package/dist/index-cxca2t8y.js +0 -36
  301. package/dist/lead-gk4h5eg7.js +0 -74
  302. package/dist/thread-buffer-a1re2r9r.js +0 -38
  303. package/dist/worker-3dyyb8ev.js +0 -74
  304. package/dist/{azure-openai-responses-590s1eea.js → azure-openai-responses-b3y7fz36.js} +8 -8
  305. package/dist/{cli-m7c2380k.js → cli-3aaeb78m.js} +4 -4
  306. package/dist/{cli-g0vv9dg4.js → cli-8y43jx2r.js} +8 -8
  307. package/dist/{cli-m0cy2vyf.js → cli-k6nejceb.js} +4 -4
  308. package/dist/{google-generative-ai-maq6c9bf.js → google-generative-ai-bh0djqjp.js} +4 -4
  309. package/dist/{google-vertex-2jgsw2nb.js → google-vertex-prjbw8dj.js} +8 -8
  310. package/dist/{mistral-conversations-0c30em7t.js → mistral-conversations-tm2vd4gc.js} +8 -8
  311. package/dist/{node-dqm4xgxw.js → node-2wfcey7d.js} +0 -0
  312. package/dist/{openai-codex-responses-bkcd8pjj.js → openai-codex-responses-sxjv60xx.js} +4 -4
  313. package/dist/{openai-completions-f3n69rep.js → openai-completions-0c7qnhsx.js} +20 -20
  314. package/dist/{openai-responses-gbh0wfqe.js → openai-responses-a7h29chp.js} +15 -15
  315. package/dist/{pi-messages-zebyt7gb.js → pi-messages-2j0fpqwq.js} +5 -5
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": "2.9.1",
5
+ "version": "2.10.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": [
@@ -2252,6 +2252,18 @@
2252
2252
  "author": {
2253
2253
  "type": "string",
2254
2254
  "minLength": 1
2255
+ },
2256
+ "toolSources": {
2257
+ "type": "array",
2258
+ "items": {
2259
+ "type": "string",
2260
+ "enum": [
2261
+ "mcp",
2262
+ "native"
2263
+ ]
2264
+ },
2265
+ "minItems": 1,
2266
+ "description": "Which tool calls reach this extension's `pre.tool.call` and `post.tool.call` handlers: `\"mcp\"` for swarm MCP tools, `\"native\"` for harness built-ins (bash, read, write, edit) reported through `POST /api/tool-hooks`. Default `[\"mcp\"]`."
2255
2267
  }
2256
2268
  },
2257
2269
  "required": [
@@ -3531,6 +3543,7 @@
3531
3543
  "task_follow_up_gate_shadow",
3532
3544
  "task_citation_check_refused",
3533
3545
  "task_ui_spec_check_refused",
3546
+ "task_ui_script_action_failed",
3534
3547
  "channel_message",
3535
3548
  "service_registered",
3536
3549
  "service_unregistered",
@@ -3987,7 +4000,8 @@
3987
4000
  "amp",
3988
4001
  "cursor",
3989
4002
  "grok",
3990
- "fx"
4003
+ "fx",
4004
+ "system-one"
3991
4005
  ]
3992
4006
  },
3993
4007
  "model": {
@@ -4448,6 +4462,14 @@
4448
4462
  ],
4449
4463
  "default": "harness"
4450
4464
  },
4465
+ "kind": {
4466
+ "type": "string",
4467
+ "enum": [
4468
+ "harness",
4469
+ "system-one"
4470
+ ],
4471
+ "default": "harness"
4472
+ },
4451
4473
  "harnessCostUsd": {
4452
4474
  "type": [
4453
4475
  "number",
@@ -5261,6 +5283,12 @@
5261
5283
  ],
5262
5284
  "default": "active"
5263
5285
  },
5286
+ "mergedIntoUserId": {
5287
+ "type": [
5288
+ "string",
5289
+ "null"
5290
+ ]
5291
+ },
5264
5292
  "createdAt": {
5265
5293
  "type": "string",
5266
5294
  "format": "date-time"
@@ -5277,6 +5305,85 @@
5277
5305
  "lastUpdatedAt"
5278
5306
  ]
5279
5307
  },
5308
+ "UserMergeJob": {
5309
+ "type": "object",
5310
+ "properties": {
5311
+ "id": {
5312
+ "type": "string"
5313
+ },
5314
+ "sourceUserId": {
5315
+ "type": "string"
5316
+ },
5317
+ "targetUserId": {
5318
+ "type": "string"
5319
+ },
5320
+ "status": {
5321
+ "type": "string",
5322
+ "enum": [
5323
+ "pending",
5324
+ "running",
5325
+ "done",
5326
+ "failed"
5327
+ ]
5328
+ },
5329
+ "phase": {
5330
+ "type": [
5331
+ "string",
5332
+ "null"
5333
+ ]
5334
+ },
5335
+ "progress": {
5336
+ "type": "object",
5337
+ "additionalProperties": {
5338
+ "type": "number"
5339
+ }
5340
+ },
5341
+ "error": {
5342
+ "type": [
5343
+ "string",
5344
+ "null"
5345
+ ]
5346
+ },
5347
+ "attempts": {
5348
+ "type": "number"
5349
+ },
5350
+ "nextAttemptAt": {
5351
+ "type": [
5352
+ "string",
5353
+ "null"
5354
+ ]
5355
+ },
5356
+ "createdAt": {
5357
+ "type": "string"
5358
+ },
5359
+ "startedAt": {
5360
+ "type": [
5361
+ "string",
5362
+ "null"
5363
+ ]
5364
+ },
5365
+ "finishedAt": {
5366
+ "type": [
5367
+ "string",
5368
+ "null"
5369
+ ]
5370
+ }
5371
+ },
5372
+ "required": [
5373
+ "id",
5374
+ "sourceUserId",
5375
+ "targetUserId",
5376
+ "status",
5377
+ "phase",
5378
+ "progress",
5379
+ "error",
5380
+ "attempts",
5381
+ "nextAttemptAt",
5382
+ "createdAt",
5383
+ "startedAt",
5384
+ "finishedAt"
5385
+ ]
5386
+ },
5280
5387
  "WorkflowDefinition": {
5281
5388
  "type": "object",
5282
5389
  "properties": {
@@ -5568,6 +5675,19 @@
5568
5675
  }
5569
5676
  ],
5570
5677
  "description": "Optional webhook verification format. Omit to keep legacy HMAC-SHA256 behavior with fallback header scanning."
5678
+ },
5679
+ "events": {
5680
+ "type": "array",
5681
+ "items": {
5682
+ "type": "string",
5683
+ "minLength": 1
5684
+ },
5685
+ "description": "Optional event allowlist, matched exactly against the eventHeader value after signature verification. A delivery whose event is not listed (or that has no event header) gets a 2xx `skipped` reply and creates no run. Omit or leave empty to accept every event."
5686
+ },
5687
+ "eventHeader": {
5688
+ "type": "string",
5689
+ "minLength": 1,
5690
+ "description": "Request header holding the event name for `events` (case-insensitive lookup). Defaults to X-GitHub-Event."
5571
5691
  }
5572
5692
  },
5573
5693
  "required": [
@@ -6333,6 +6453,19 @@
6333
6453
  }
6334
6454
  ],
6335
6455
  "description": "Optional webhook verification format. Omit to keep legacy HMAC-SHA256 behavior with fallback header scanning."
6456
+ },
6457
+ "events": {
6458
+ "type": "array",
6459
+ "items": {
6460
+ "type": "string",
6461
+ "minLength": 1
6462
+ },
6463
+ "description": "Optional event allowlist, matched exactly against the eventHeader value after signature verification. A delivery whose event is not listed (or that has no event header) gets a 2xx `skipped` reply and creates no run. Omit or leave empty to accept every event."
6464
+ },
6465
+ "eventHeader": {
6466
+ "type": "string",
6467
+ "minLength": 1,
6468
+ "description": "Request header holding the event name for `events` (case-insensitive lookup). Defaults to X-GitHub-Event."
6336
6469
  }
6337
6470
  },
6338
6471
  "required": [
@@ -30388,10 +30521,10 @@
30388
30521
  }
30389
30522
  }
30390
30523
  },
30391
- "/api/model-profiles": {
30524
+ "/api/model-groups": {
30392
30525
  "get": {
30393
- "summary": "List model profiles",
30394
- "description": "Every model profile, ordered by harness then name. Filter by `harness` to see what an agent on that harness can run.",
30526
+ "summary": "List model groups",
30527
+ "description": "Every model group with its member profiles in order, by name.",
30395
30528
  "tags": [
30396
30529
  "Models"
30397
30530
  ],
@@ -30400,39 +30533,15 @@
30400
30533
  "bearerAuth": []
30401
30534
  }
30402
30535
  ],
30403
- "parameters": [
30404
- {
30405
- "schema": {
30406
- "type": "string",
30407
- "enum": [
30408
- "claude",
30409
- "codex",
30410
- "pi",
30411
- "devin",
30412
- "claude-managed",
30413
- "opencode",
30414
- "acp",
30415
- "dsh",
30416
- "amp",
30417
- "cursor",
30418
- "grok",
30419
- "fx"
30420
- ]
30421
- },
30422
- "required": false,
30423
- "name": "harness",
30424
- "in": "query"
30425
- }
30426
- ],
30427
30536
  "responses": {
30428
30537
  "200": {
30429
- "description": "Model profiles",
30538
+ "description": "Model groups",
30430
30539
  "content": {
30431
30540
  "application/json": {
30432
30541
  "schema": {
30433
30542
  "type": "object",
30434
30543
  "properties": {
30435
- "profiles": {
30544
+ "groups": {
30436
30545
  "type": "array",
30437
30546
  "items": {
30438
30547
  "type": "object",
@@ -30443,44 +30552,6 @@
30443
30552
  "name": {
30444
30553
  "type": "string"
30445
30554
  },
30446
- "harness": {
30447
- "type": "string",
30448
- "enum": [
30449
- "claude",
30450
- "codex",
30451
- "pi",
30452
- "devin",
30453
- "claude-managed",
30454
- "opencode",
30455
- "acp",
30456
- "dsh",
30457
- "amp",
30458
- "cursor",
30459
- "grok",
30460
- "fx"
30461
- ]
30462
- },
30463
- "model": {
30464
- "type": "string"
30465
- },
30466
- "effort": {
30467
- "type": [
30468
- "string",
30469
- "null"
30470
- ],
30471
- "enum": [
30472
- "off",
30473
- "low",
30474
- "medium",
30475
- "high",
30476
- "xhigh",
30477
- "max",
30478
- null
30479
- ]
30480
- },
30481
- "allowCustomModel": {
30482
- "type": "boolean"
30483
- },
30484
30555
  "description": {
30485
30556
  "type": [
30486
30557
  "string",
@@ -30493,22 +30564,7 @@
30493
30564
  "null"
30494
30565
  ]
30495
30566
  },
30496
- "credentials": {
30497
- "type": [
30498
- "object",
30499
- "null"
30500
- ],
30501
- "additionalProperties": {
30502
- "type": "array",
30503
- "items": {
30504
- "type": "string",
30505
- "minLength": 5,
30506
- "maxLength": 5
30507
- },
30508
- "minItems": 1
30509
- }
30510
- },
30511
- "fallbacks": {
30567
+ "members": {
30512
30568
  "type": "array",
30513
30569
  "items": {
30514
30570
  "type": "string"
@@ -30524,14 +30580,9 @@
30524
30580
  "required": [
30525
30581
  "id",
30526
30582
  "name",
30527
- "harness",
30528
- "model",
30529
- "effort",
30530
- "allowCustomModel",
30531
30583
  "description",
30532
30584
  "seededFrom",
30533
- "credentials",
30534
- "fallbacks",
30585
+ "members",
30535
30586
  "createdAt",
30536
30587
  "lastUpdatedAt"
30537
30588
  ]
@@ -30539,7 +30590,7 @@
30539
30590
  }
30540
30591
  },
30541
30592
  "required": [
30542
- "profiles"
30593
+ "groups"
30543
30594
  ]
30544
30595
  }
30545
30596
  }
@@ -30548,8 +30599,8 @@
30548
30599
  }
30549
30600
  },
30550
30601
  "post": {
30551
- "summary": "Create a model profile",
30552
- "description": "A profile runs on one harness. `model` must run on that harness and be in the model catalog unless `allowCustomModel` is true (a gateway id, a fresh launch); a `latest:` alias is accepted and resolves at claim. `effort` must be a level the harness and model support. `credentials` pins which pooled keys the profile uses: per credential var of the harness, the last 5 characters of each allowed key (`CODEX_OAUTH` is not supported). `fallbacks` lists profiles on the same harness, in order, that a task on this profile hops to when a provider error (rate limit, seat, overload, auth, empty key pool) ends it; no repeats, no self, no cycle. Operator only (the shared API key).",
30602
+ "summary": "Create a model group",
30603
+ "description": "A group is an ordered list of model profiles that may span harnesses. Every member must be an existing profile, listed once. The name may not be a model profile's (groups and profiles share one name space; 409). Lead, operator or dashboard user.",
30553
30604
  "tags": [
30554
30605
  "Models"
30555
30606
  ],
@@ -30568,46 +30619,6 @@
30568
30619
  "type": "string",
30569
30620
  "pattern": "^[a-z0-9][a-z0-9._-]{0,99}$"
30570
30621
  },
30571
- "harness": {
30572
- "type": "string",
30573
- "enum": [
30574
- "claude",
30575
- "codex",
30576
- "pi",
30577
- "devin",
30578
- "claude-managed",
30579
- "opencode",
30580
- "acp",
30581
- "dsh",
30582
- "amp",
30583
- "cursor",
30584
- "grok",
30585
- "fx"
30586
- ]
30587
- },
30588
- "model": {
30589
- "type": "string",
30590
- "minLength": 1
30591
- },
30592
- "effort": {
30593
- "type": [
30594
- "string",
30595
- "null"
30596
- ],
30597
- "enum": [
30598
- "off",
30599
- "low",
30600
- "medium",
30601
- "high",
30602
- "xhigh",
30603
- "max",
30604
- null
30605
- ]
30606
- },
30607
- "allowCustomModel": {
30608
- "type": "boolean",
30609
- "default": false
30610
- },
30611
30622
  "description": {
30612
30623
  "type": [
30613
30624
  "string",
@@ -30615,34 +30626,20 @@
30615
30626
  ],
30616
30627
  "maxLength": 500
30617
30628
  },
30618
- "credentials": {
30619
- "type": [
30620
- "object",
30621
- "null"
30622
- ],
30623
- "additionalProperties": {
30624
- "type": "array",
30625
- "items": {
30626
- "type": "string",
30627
- "minLength": 5,
30628
- "maxLength": 5
30629
- },
30630
- "minItems": 1
30631
- }
30632
- },
30633
- "fallbacks": {
30629
+ "members": {
30634
30630
  "type": "array",
30635
30631
  "items": {
30636
30632
  "type": "string",
30637
30633
  "pattern": "^[a-z0-9][a-z0-9._-]{0,99}$"
30638
30634
  },
30639
- "maxItems": 10
30635
+ "minItems": 1,
30636
+ "maxItems": 20,
30637
+ "description": "Profile names in preference order, first preferred. Any harness; no repeats."
30640
30638
  }
30641
30639
  },
30642
30640
  "required": [
30643
30641
  "name",
30644
- "harness",
30645
- "model"
30642
+ "members"
30646
30643
  ]
30647
30644
  }
30648
30645
  }
@@ -30650,7 +30647,7 @@
30650
30647
  },
30651
30648
  "responses": {
30652
30649
  "201": {
30653
- "description": "Profile created",
30650
+ "description": "Group created",
30654
30651
  "content": {
30655
30652
  "application/json": {
30656
30653
  "schema": {
@@ -30662,44 +30659,6 @@
30662
30659
  "name": {
30663
30660
  "type": "string"
30664
30661
  },
30665
- "harness": {
30666
- "type": "string",
30667
- "enum": [
30668
- "claude",
30669
- "codex",
30670
- "pi",
30671
- "devin",
30672
- "claude-managed",
30673
- "opencode",
30674
- "acp",
30675
- "dsh",
30676
- "amp",
30677
- "cursor",
30678
- "grok",
30679
- "fx"
30680
- ]
30681
- },
30682
- "model": {
30683
- "type": "string"
30684
- },
30685
- "effort": {
30686
- "type": [
30687
- "string",
30688
- "null"
30689
- ],
30690
- "enum": [
30691
- "off",
30692
- "low",
30693
- "medium",
30694
- "high",
30695
- "xhigh",
30696
- "max",
30697
- null
30698
- ]
30699
- },
30700
- "allowCustomModel": {
30701
- "type": "boolean"
30702
- },
30703
30662
  "description": {
30704
30663
  "type": [
30705
30664
  "string",
@@ -30712,22 +30671,7 @@
30712
30671
  "null"
30713
30672
  ]
30714
30673
  },
30715
- "credentials": {
30716
- "type": [
30717
- "object",
30718
- "null"
30719
- ],
30720
- "additionalProperties": {
30721
- "type": "array",
30722
- "items": {
30723
- "type": "string",
30724
- "minLength": 5,
30725
- "maxLength": 5
30726
- },
30727
- "minItems": 1
30728
- }
30729
- },
30730
- "fallbacks": {
30674
+ "members": {
30731
30675
  "type": "array",
30732
30676
  "items": {
30733
30677
  "type": "string"
@@ -30743,14 +30687,9 @@
30743
30687
  "required": [
30744
30688
  "id",
30745
30689
  "name",
30746
- "harness",
30747
- "model",
30748
- "effort",
30749
- "allowCustomModel",
30750
30690
  "description",
30751
30691
  "seededFrom",
30752
- "credentials",
30753
- "fallbacks",
30692
+ "members",
30754
30693
  "createdAt",
30755
30694
  "lastUpdatedAt"
30756
30695
  ]
@@ -30779,7 +30718,828 @@
30779
30718
  }
30780
30719
  },
30781
30720
  "409": {
30782
- "description": "A profile with that name exists",
30721
+ "description": "A group or profile with that name exists",
30722
+ "content": {
30723
+ "application/json": {
30724
+ "schema": {
30725
+ "$ref": "#/components/schemas/ErrorResponse"
30726
+ }
30727
+ }
30728
+ }
30729
+ }
30730
+ }
30731
+ }
30732
+ },
30733
+ "/api/model-groups/{name}": {
30734
+ "get": {
30735
+ "summary": "Get one model group",
30736
+ "tags": [
30737
+ "Models"
30738
+ ],
30739
+ "security": [
30740
+ {
30741
+ "bearerAuth": []
30742
+ }
30743
+ ],
30744
+ "parameters": [
30745
+ {
30746
+ "schema": {
30747
+ "type": "string"
30748
+ },
30749
+ "required": true,
30750
+ "name": "name",
30751
+ "in": "path"
30752
+ }
30753
+ ],
30754
+ "responses": {
30755
+ "200": {
30756
+ "description": "The model group",
30757
+ "content": {
30758
+ "application/json": {
30759
+ "schema": {
30760
+ "type": "object",
30761
+ "properties": {
30762
+ "id": {
30763
+ "type": "string"
30764
+ },
30765
+ "name": {
30766
+ "type": "string"
30767
+ },
30768
+ "description": {
30769
+ "type": [
30770
+ "string",
30771
+ "null"
30772
+ ]
30773
+ },
30774
+ "seededFrom": {
30775
+ "type": [
30776
+ "string",
30777
+ "null"
30778
+ ]
30779
+ },
30780
+ "members": {
30781
+ "type": "array",
30782
+ "items": {
30783
+ "type": "string"
30784
+ }
30785
+ },
30786
+ "createdAt": {
30787
+ "type": "string"
30788
+ },
30789
+ "lastUpdatedAt": {
30790
+ "type": "string"
30791
+ }
30792
+ },
30793
+ "required": [
30794
+ "id",
30795
+ "name",
30796
+ "description",
30797
+ "seededFrom",
30798
+ "members",
30799
+ "createdAt",
30800
+ "lastUpdatedAt"
30801
+ ]
30802
+ }
30803
+ }
30804
+ }
30805
+ },
30806
+ "404": {
30807
+ "description": "No group with that name",
30808
+ "content": {
30809
+ "application/json": {
30810
+ "schema": {
30811
+ "$ref": "#/components/schemas/ErrorResponse"
30812
+ }
30813
+ }
30814
+ }
30815
+ }
30816
+ }
30817
+ },
30818
+ "patch": {
30819
+ "summary": "Update a model group",
30820
+ "description": "Changes the description (`null` clears it). The name is fixed; reorder or replace members with `PUT /api/model-groups/{name}/members`. Lead, operator or dashboard user.",
30821
+ "tags": [
30822
+ "Models"
30823
+ ],
30824
+ "security": [
30825
+ {
30826
+ "bearerAuth": []
30827
+ }
30828
+ ],
30829
+ "parameters": [
30830
+ {
30831
+ "schema": {
30832
+ "type": "string"
30833
+ },
30834
+ "required": true,
30835
+ "name": "name",
30836
+ "in": "path"
30837
+ }
30838
+ ],
30839
+ "requestBody": {
30840
+ "content": {
30841
+ "application/json": {
30842
+ "schema": {
30843
+ "type": "object",
30844
+ "properties": {
30845
+ "description": {
30846
+ "type": [
30847
+ "string",
30848
+ "null"
30849
+ ],
30850
+ "maxLength": 500
30851
+ }
30852
+ },
30853
+ "required": [
30854
+ "description"
30855
+ ]
30856
+ }
30857
+ }
30858
+ }
30859
+ },
30860
+ "responses": {
30861
+ "200": {
30862
+ "description": "Group updated",
30863
+ "content": {
30864
+ "application/json": {
30865
+ "schema": {
30866
+ "type": "object",
30867
+ "properties": {
30868
+ "id": {
30869
+ "type": "string"
30870
+ },
30871
+ "name": {
30872
+ "type": "string"
30873
+ },
30874
+ "description": {
30875
+ "type": [
30876
+ "string",
30877
+ "null"
30878
+ ]
30879
+ },
30880
+ "seededFrom": {
30881
+ "type": [
30882
+ "string",
30883
+ "null"
30884
+ ]
30885
+ },
30886
+ "members": {
30887
+ "type": "array",
30888
+ "items": {
30889
+ "type": "string"
30890
+ }
30891
+ },
30892
+ "createdAt": {
30893
+ "type": "string"
30894
+ },
30895
+ "lastUpdatedAt": {
30896
+ "type": "string"
30897
+ }
30898
+ },
30899
+ "required": [
30900
+ "id",
30901
+ "name",
30902
+ "description",
30903
+ "seededFrom",
30904
+ "members",
30905
+ "createdAt",
30906
+ "lastUpdatedAt"
30907
+ ]
30908
+ }
30909
+ }
30910
+ }
30911
+ },
30912
+ "400": {
30913
+ "description": "Validation error",
30914
+ "content": {
30915
+ "application/json": {
30916
+ "schema": {
30917
+ "$ref": "#/components/schemas/ErrorResponse"
30918
+ }
30919
+ }
30920
+ }
30921
+ },
30922
+ "403": {
30923
+ "description": "Forbidden",
30924
+ "content": {
30925
+ "application/json": {
30926
+ "schema": {
30927
+ "$ref": "#/components/schemas/ErrorResponse"
30928
+ }
30929
+ }
30930
+ }
30931
+ },
30932
+ "404": {
30933
+ "description": "No group with that name",
30934
+ "content": {
30935
+ "application/json": {
30936
+ "schema": {
30937
+ "$ref": "#/components/schemas/ErrorResponse"
30938
+ }
30939
+ }
30940
+ }
30941
+ }
30942
+ }
30943
+ },
30944
+ "delete": {
30945
+ "summary": "Delete a model group",
30946
+ "description": "Refused (409) for a shipped tier group (`smol`, `regular`, `smart`, `ultra`; edit it instead, it would come back at the next boot), and while a schedule names the group or a task holds it (unfinished, or superseded and still owed its resume). Lead, operator or dashboard user.",
30947
+ "tags": [
30948
+ "Models"
30949
+ ],
30950
+ "security": [
30951
+ {
30952
+ "bearerAuth": []
30953
+ }
30954
+ ],
30955
+ "parameters": [
30956
+ {
30957
+ "schema": {
30958
+ "type": "string"
30959
+ },
30960
+ "required": true,
30961
+ "name": "name",
30962
+ "in": "path"
30963
+ }
30964
+ ],
30965
+ "responses": {
30966
+ "200": {
30967
+ "description": "Group deleted",
30968
+ "content": {
30969
+ "application/json": {
30970
+ "schema": {
30971
+ "type": "object",
30972
+ "properties": {
30973
+ "deleted": {
30974
+ "type": "boolean",
30975
+ "enum": [
30976
+ true
30977
+ ]
30978
+ }
30979
+ },
30980
+ "required": [
30981
+ "deleted"
30982
+ ]
30983
+ }
30984
+ }
30985
+ }
30986
+ },
30987
+ "403": {
30988
+ "description": "Forbidden",
30989
+ "content": {
30990
+ "application/json": {
30991
+ "schema": {
30992
+ "$ref": "#/components/schemas/ErrorResponse"
30993
+ }
30994
+ }
30995
+ }
30996
+ },
30997
+ "404": {
30998
+ "description": "No group with that name",
30999
+ "content": {
31000
+ "application/json": {
31001
+ "schema": {
31002
+ "$ref": "#/components/schemas/ErrorResponse"
31003
+ }
31004
+ }
31005
+ }
31006
+ },
31007
+ "409": {
31008
+ "description": "The group is a seed or still in use",
31009
+ "content": {
31010
+ "application/json": {
31011
+ "schema": {
31012
+ "$ref": "#/components/schemas/ErrorResponse"
31013
+ }
31014
+ }
31015
+ }
31016
+ }
31017
+ }
31018
+ }
31019
+ },
31020
+ "/api/model-groups/{name}/members": {
31021
+ "put": {
31022
+ "summary": "Replace a model group's members",
31023
+ "description": "Replaces the whole ordered member list in one transaction; send the full list to reorder. Every member must be an existing profile, listed once. Lead, operator or dashboard user.",
31024
+ "tags": [
31025
+ "Models"
31026
+ ],
31027
+ "security": [
31028
+ {
31029
+ "bearerAuth": []
31030
+ }
31031
+ ],
31032
+ "parameters": [
31033
+ {
31034
+ "schema": {
31035
+ "type": "string"
31036
+ },
31037
+ "required": true,
31038
+ "name": "name",
31039
+ "in": "path"
31040
+ }
31041
+ ],
31042
+ "requestBody": {
31043
+ "content": {
31044
+ "application/json": {
31045
+ "schema": {
31046
+ "type": "object",
31047
+ "properties": {
31048
+ "members": {
31049
+ "type": "array",
31050
+ "items": {
31051
+ "type": "string",
31052
+ "pattern": "^[a-z0-9][a-z0-9._-]{0,99}$"
31053
+ },
31054
+ "minItems": 1,
31055
+ "maxItems": 20,
31056
+ "description": "Profile names in preference order, first preferred. Any harness; no repeats."
31057
+ }
31058
+ },
31059
+ "required": [
31060
+ "members"
31061
+ ]
31062
+ }
31063
+ }
31064
+ }
31065
+ },
31066
+ "responses": {
31067
+ "200": {
31068
+ "description": "Members replaced",
31069
+ "content": {
31070
+ "application/json": {
31071
+ "schema": {
31072
+ "type": "object",
31073
+ "properties": {
31074
+ "id": {
31075
+ "type": "string"
31076
+ },
31077
+ "name": {
31078
+ "type": "string"
31079
+ },
31080
+ "description": {
31081
+ "type": [
31082
+ "string",
31083
+ "null"
31084
+ ]
31085
+ },
31086
+ "seededFrom": {
31087
+ "type": [
31088
+ "string",
31089
+ "null"
31090
+ ]
31091
+ },
31092
+ "members": {
31093
+ "type": "array",
31094
+ "items": {
31095
+ "type": "string"
31096
+ }
31097
+ },
31098
+ "createdAt": {
31099
+ "type": "string"
31100
+ },
31101
+ "lastUpdatedAt": {
31102
+ "type": "string"
31103
+ }
31104
+ },
31105
+ "required": [
31106
+ "id",
31107
+ "name",
31108
+ "description",
31109
+ "seededFrom",
31110
+ "members",
31111
+ "createdAt",
31112
+ "lastUpdatedAt"
31113
+ ]
31114
+ }
31115
+ }
31116
+ }
31117
+ },
31118
+ "400": {
31119
+ "description": "Validation error",
31120
+ "content": {
31121
+ "application/json": {
31122
+ "schema": {
31123
+ "$ref": "#/components/schemas/ErrorResponse"
31124
+ }
31125
+ }
31126
+ }
31127
+ },
31128
+ "403": {
31129
+ "description": "Forbidden",
31130
+ "content": {
31131
+ "application/json": {
31132
+ "schema": {
31133
+ "$ref": "#/components/schemas/ErrorResponse"
31134
+ }
31135
+ }
31136
+ }
31137
+ },
31138
+ "404": {
31139
+ "description": "No group with that name",
31140
+ "content": {
31141
+ "application/json": {
31142
+ "schema": {
31143
+ "$ref": "#/components/schemas/ErrorResponse"
31144
+ }
31145
+ }
31146
+ }
31147
+ }
31148
+ }
31149
+ }
31150
+ },
31151
+ "/api/model-profiles": {
31152
+ "get": {
31153
+ "summary": "List model profiles",
31154
+ "description": "Every model profile, ordered by harness then name. Filter by `harness` to see what an agent on that harness can run.",
31155
+ "tags": [
31156
+ "Models"
31157
+ ],
31158
+ "security": [
31159
+ {
31160
+ "bearerAuth": []
31161
+ }
31162
+ ],
31163
+ "parameters": [
31164
+ {
31165
+ "schema": {
31166
+ "type": "string",
31167
+ "enum": [
31168
+ "claude",
31169
+ "codex",
31170
+ "pi",
31171
+ "devin",
31172
+ "claude-managed",
31173
+ "opencode",
31174
+ "acp",
31175
+ "dsh",
31176
+ "amp",
31177
+ "cursor",
31178
+ "grok",
31179
+ "fx"
31180
+ ]
31181
+ },
31182
+ "required": false,
31183
+ "name": "harness",
31184
+ "in": "query"
31185
+ }
31186
+ ],
31187
+ "responses": {
31188
+ "200": {
31189
+ "description": "Model profiles",
31190
+ "content": {
31191
+ "application/json": {
31192
+ "schema": {
31193
+ "type": "object",
31194
+ "properties": {
31195
+ "profiles": {
31196
+ "type": "array",
31197
+ "items": {
31198
+ "type": "object",
31199
+ "properties": {
31200
+ "id": {
31201
+ "type": "string"
31202
+ },
31203
+ "name": {
31204
+ "type": "string"
31205
+ },
31206
+ "harness": {
31207
+ "type": "string",
31208
+ "enum": [
31209
+ "claude",
31210
+ "codex",
31211
+ "pi",
31212
+ "devin",
31213
+ "claude-managed",
31214
+ "opencode",
31215
+ "acp",
31216
+ "dsh",
31217
+ "amp",
31218
+ "cursor",
31219
+ "grok",
31220
+ "fx"
31221
+ ]
31222
+ },
31223
+ "model": {
31224
+ "type": "string"
31225
+ },
31226
+ "effort": {
31227
+ "type": [
31228
+ "string",
31229
+ "null"
31230
+ ],
31231
+ "enum": [
31232
+ "off",
31233
+ "low",
31234
+ "medium",
31235
+ "high",
31236
+ "xhigh",
31237
+ "max",
31238
+ null
31239
+ ]
31240
+ },
31241
+ "allowCustomModel": {
31242
+ "type": "boolean"
31243
+ },
31244
+ "description": {
31245
+ "type": [
31246
+ "string",
31247
+ "null"
31248
+ ]
31249
+ },
31250
+ "seededFrom": {
31251
+ "type": [
31252
+ "string",
31253
+ "null"
31254
+ ]
31255
+ },
31256
+ "credentials": {
31257
+ "type": [
31258
+ "object",
31259
+ "null"
31260
+ ],
31261
+ "additionalProperties": {
31262
+ "type": "array",
31263
+ "items": {
31264
+ "type": "string",
31265
+ "minLength": 5,
31266
+ "maxLength": 5
31267
+ },
31268
+ "minItems": 1
31269
+ }
31270
+ },
31271
+ "fallbacks": {
31272
+ "type": "array",
31273
+ "items": {
31274
+ "type": "string"
31275
+ }
31276
+ },
31277
+ "createdAt": {
31278
+ "type": "string"
31279
+ },
31280
+ "lastUpdatedAt": {
31281
+ "type": "string"
31282
+ }
31283
+ },
31284
+ "required": [
31285
+ "id",
31286
+ "name",
31287
+ "harness",
31288
+ "model",
31289
+ "effort",
31290
+ "allowCustomModel",
31291
+ "description",
31292
+ "seededFrom",
31293
+ "credentials",
31294
+ "fallbacks",
31295
+ "createdAt",
31296
+ "lastUpdatedAt"
31297
+ ]
31298
+ }
31299
+ }
31300
+ },
31301
+ "required": [
31302
+ "profiles"
31303
+ ]
31304
+ }
31305
+ }
31306
+ }
31307
+ }
31308
+ }
31309
+ },
31310
+ "post": {
31311
+ "summary": "Create a model profile",
31312
+ "description": "A profile runs on one harness. `model` must run on that harness and be in the model catalog unless `allowCustomModel` is true (a gateway id, a fresh launch); a `latest:` alias is accepted and resolves at claim. `effort` must be a level the harness and model support. `credentials` pins which pooled keys the profile uses: per credential var of the harness, the last 5 characters of each allowed key (`CODEX_OAUTH` is not supported). `fallbacks` lists profiles on the same harness, in order, that a task on this profile hops to when a provider error (rate limit, seat, overload, auth, empty key pool) ends it; no repeats, no self, no cycle. The name may not be a model group's (one name space; 409). Operator only (the shared API key).",
31313
+ "tags": [
31314
+ "Models"
31315
+ ],
31316
+ "security": [
31317
+ {
31318
+ "bearerAuth": []
31319
+ }
31320
+ ],
31321
+ "requestBody": {
31322
+ "content": {
31323
+ "application/json": {
31324
+ "schema": {
31325
+ "type": "object",
31326
+ "properties": {
31327
+ "name": {
31328
+ "type": "string",
31329
+ "pattern": "^[a-z0-9][a-z0-9._-]{0,99}$"
31330
+ },
31331
+ "harness": {
31332
+ "type": "string",
31333
+ "enum": [
31334
+ "claude",
31335
+ "codex",
31336
+ "pi",
31337
+ "devin",
31338
+ "claude-managed",
31339
+ "opencode",
31340
+ "acp",
31341
+ "dsh",
31342
+ "amp",
31343
+ "cursor",
31344
+ "grok",
31345
+ "fx"
31346
+ ]
31347
+ },
31348
+ "model": {
31349
+ "type": "string",
31350
+ "minLength": 1
31351
+ },
31352
+ "effort": {
31353
+ "type": [
31354
+ "string",
31355
+ "null"
31356
+ ],
31357
+ "enum": [
31358
+ "off",
31359
+ "low",
31360
+ "medium",
31361
+ "high",
31362
+ "xhigh",
31363
+ "max",
31364
+ null
31365
+ ]
31366
+ },
31367
+ "allowCustomModel": {
31368
+ "type": "boolean",
31369
+ "default": false
31370
+ },
31371
+ "description": {
31372
+ "type": [
31373
+ "string",
31374
+ "null"
31375
+ ],
31376
+ "maxLength": 500
31377
+ },
31378
+ "credentials": {
31379
+ "type": [
31380
+ "object",
31381
+ "null"
31382
+ ],
31383
+ "additionalProperties": {
31384
+ "type": "array",
31385
+ "items": {
31386
+ "type": "string",
31387
+ "minLength": 5,
31388
+ "maxLength": 5
31389
+ },
31390
+ "minItems": 1
31391
+ }
31392
+ },
31393
+ "fallbacks": {
31394
+ "type": "array",
31395
+ "items": {
31396
+ "type": "string",
31397
+ "pattern": "^[a-z0-9][a-z0-9._-]{0,99}$"
31398
+ },
31399
+ "maxItems": 10
31400
+ }
31401
+ },
31402
+ "required": [
31403
+ "name",
31404
+ "harness",
31405
+ "model"
31406
+ ]
31407
+ }
31408
+ }
31409
+ }
31410
+ },
31411
+ "responses": {
31412
+ "201": {
31413
+ "description": "Profile created",
31414
+ "content": {
31415
+ "application/json": {
31416
+ "schema": {
31417
+ "type": "object",
31418
+ "properties": {
31419
+ "id": {
31420
+ "type": "string"
31421
+ },
31422
+ "name": {
31423
+ "type": "string"
31424
+ },
31425
+ "harness": {
31426
+ "type": "string",
31427
+ "enum": [
31428
+ "claude",
31429
+ "codex",
31430
+ "pi",
31431
+ "devin",
31432
+ "claude-managed",
31433
+ "opencode",
31434
+ "acp",
31435
+ "dsh",
31436
+ "amp",
31437
+ "cursor",
31438
+ "grok",
31439
+ "fx"
31440
+ ]
31441
+ },
31442
+ "model": {
31443
+ "type": "string"
31444
+ },
31445
+ "effort": {
31446
+ "type": [
31447
+ "string",
31448
+ "null"
31449
+ ],
31450
+ "enum": [
31451
+ "off",
31452
+ "low",
31453
+ "medium",
31454
+ "high",
31455
+ "xhigh",
31456
+ "max",
31457
+ null
31458
+ ]
31459
+ },
31460
+ "allowCustomModel": {
31461
+ "type": "boolean"
31462
+ },
31463
+ "description": {
31464
+ "type": [
31465
+ "string",
31466
+ "null"
31467
+ ]
31468
+ },
31469
+ "seededFrom": {
31470
+ "type": [
31471
+ "string",
31472
+ "null"
31473
+ ]
31474
+ },
31475
+ "credentials": {
31476
+ "type": [
31477
+ "object",
31478
+ "null"
31479
+ ],
31480
+ "additionalProperties": {
31481
+ "type": "array",
31482
+ "items": {
31483
+ "type": "string",
31484
+ "minLength": 5,
31485
+ "maxLength": 5
31486
+ },
31487
+ "minItems": 1
31488
+ }
31489
+ },
31490
+ "fallbacks": {
31491
+ "type": "array",
31492
+ "items": {
31493
+ "type": "string"
31494
+ }
31495
+ },
31496
+ "createdAt": {
31497
+ "type": "string"
31498
+ },
31499
+ "lastUpdatedAt": {
31500
+ "type": "string"
31501
+ }
31502
+ },
31503
+ "required": [
31504
+ "id",
31505
+ "name",
31506
+ "harness",
31507
+ "model",
31508
+ "effort",
31509
+ "allowCustomModel",
31510
+ "description",
31511
+ "seededFrom",
31512
+ "credentials",
31513
+ "fallbacks",
31514
+ "createdAt",
31515
+ "lastUpdatedAt"
31516
+ ]
31517
+ }
31518
+ }
31519
+ }
31520
+ },
31521
+ "400": {
31522
+ "description": "Validation error",
31523
+ "content": {
31524
+ "application/json": {
31525
+ "schema": {
31526
+ "$ref": "#/components/schemas/ErrorResponse"
31527
+ }
31528
+ }
31529
+ }
31530
+ },
31531
+ "403": {
31532
+ "description": "Forbidden",
31533
+ "content": {
31534
+ "application/json": {
31535
+ "schema": {
31536
+ "$ref": "#/components/schemas/ErrorResponse"
31537
+ }
31538
+ }
31539
+ }
31540
+ },
31541
+ "409": {
31542
+ "description": "A profile or model group with that name exists",
30783
31543
  "content": {
30784
31544
  "application/json": {
30785
31545
  "schema": {
@@ -31162,7 +31922,7 @@
31162
31922
  },
31163
31923
  "delete": {
31164
31924
  "summary": "Delete a model profile",
31165
- "description": "Refused (409) for a shipped `<harness>-<tier>` seed (edit it instead; it would come back at the next boot), and while an agent has the profile as its default, a schedule names it, another profile lists it as a fallback, or a task holds it (unfinished, or superseded and still owed its resume). Operator only (the shared API key).",
31925
+ "description": "Refused (409) for a shipped `<harness>-<tier>` seed (edit it instead; it would come back at the next boot), and while an agent has the profile as its default, a schedule names it, another profile lists it as a fallback, a model group lists it as a member, or a task holds it (unfinished, or superseded and still owed its resume). Operator only (the shared API key).",
31166
31926
  "tags": [
31167
31927
  "Models"
31168
31928
  ],
@@ -38169,21 +38929,47 @@
38169
38929
  "actions": {
38170
38930
  "type": "object",
38171
38931
  "additionalProperties": {
38172
- "type": "object",
38173
- "properties": {
38174
- "kind": {
38175
- "type": "string",
38176
- "enum": [
38177
- "follow_up"
38932
+ "oneOf": [
38933
+ {
38934
+ "type": "object",
38935
+ "properties": {
38936
+ "kind": {
38937
+ "type": "string",
38938
+ "enum": [
38939
+ "follow_up"
38940
+ ]
38941
+ },
38942
+ "prompt": {
38943
+ "type": "string"
38944
+ }
38945
+ },
38946
+ "required": [
38947
+ "kind",
38948
+ "prompt"
38178
38949
  ]
38179
38950
  },
38180
- "prompt": {
38181
- "type": "string"
38951
+ {
38952
+ "type": "object",
38953
+ "properties": {
38954
+ "kind": {
38955
+ "type": "string",
38956
+ "enum": [
38957
+ "script"
38958
+ ]
38959
+ },
38960
+ "script": {
38961
+ "type": "string"
38962
+ },
38963
+ "args": {
38964
+ "type": "object",
38965
+ "additionalProperties": {}
38966
+ }
38967
+ },
38968
+ "required": [
38969
+ "kind",
38970
+ "script"
38971
+ ]
38182
38972
  }
38183
- },
38184
- "required": [
38185
- "kind",
38186
- "prompt"
38187
38973
  ]
38188
38974
  }
38189
38975
  },
@@ -39148,7 +39934,7 @@
39148
39934
  "/api/tasks/{id}/ui-actions/{actionId}": {
39149
39935
  "post": {
39150
39936
  "summary": "Run the action a task card Button declares",
39151
- "description": "Runs the task card action once per task and action. Only the task requester may run it: a user token, or the operator key with the requester in `X-Swarm-User-Id`. Agent callers, and operator calls with no picked user, get 403. Needs UI_SPEC_ACTIONS_ENABLED=true.",
39937
+ "description": "Runs a task card action. Only the task requester may run it: a user token, or the operator key with the requester in `X-Swarm-User-Id`. Agent callers, and operator calls with no picked user, get 403. Needs UI_SPEC_ACTIONS_ENABLED=true. A `follow_up` action runs once per task and action. A `script` action re-runs its allowlisted script (UI_SPEC_SCRIPT_ACTIONS) and returns the new card; it can run again after a 30 s cooldown.",
39152
39938
  "tags": [
39153
39939
  "Tasks"
39154
39940
  ],
@@ -39177,7 +39963,7 @@
39177
39963
  ],
39178
39964
  "responses": {
39179
39965
  "200": {
39180
- "description": "The action started, or it already ran",
39966
+ "description": "The follow-up started or already ran, or the script action replaced the card (`refreshed`, with the new `uiSpec`)",
39181
39967
  "content": {
39182
39968
  "application/json": {
39183
39969
  "schema": {
@@ -39187,11 +39973,91 @@
39187
39973
  "type": "string",
39188
39974
  "enum": [
39189
39975
  "started",
39190
- "already_done"
39976
+ "already_done",
39977
+ "refreshed"
39191
39978
  ]
39192
39979
  },
39193
39980
  "taskId": {
39194
39981
  "type": "string"
39982
+ },
39983
+ "uiSpec": {
39984
+ "type": "object",
39985
+ "properties": {
39986
+ "spec": {
39987
+ "type": "object",
39988
+ "properties": {
39989
+ "root": {
39990
+ "type": "string"
39991
+ },
39992
+ "elements": {
39993
+ "type": "object",
39994
+ "additionalProperties": {}
39995
+ },
39996
+ "state": {
39997
+ "type": "object",
39998
+ "additionalProperties": {}
39999
+ }
40000
+ },
40001
+ "required": [
40002
+ "root",
40003
+ "elements"
40004
+ ]
40005
+ },
40006
+ "actions": {
40007
+ "type": "object",
40008
+ "additionalProperties": {
40009
+ "oneOf": [
40010
+ {
40011
+ "type": "object",
40012
+ "properties": {
40013
+ "kind": {
40014
+ "type": "string",
40015
+ "enum": [
40016
+ "follow_up"
40017
+ ]
40018
+ },
40019
+ "prompt": {
40020
+ "type": "string"
40021
+ }
40022
+ },
40023
+ "required": [
40024
+ "kind",
40025
+ "prompt"
40026
+ ]
40027
+ },
40028
+ {
40029
+ "type": "object",
40030
+ "properties": {
40031
+ "kind": {
40032
+ "type": "string",
40033
+ "enum": [
40034
+ "script"
40035
+ ]
40036
+ },
40037
+ "script": {
40038
+ "type": "string"
40039
+ },
40040
+ "args": {
40041
+ "type": "object",
40042
+ "additionalProperties": {}
40043
+ }
40044
+ },
40045
+ "required": [
40046
+ "kind",
40047
+ "script"
40048
+ ]
40049
+ }
40050
+ ]
40051
+ }
40052
+ },
40053
+ "fallbackText": {
40054
+ "type": "string"
40055
+ }
40056
+ },
40057
+ "required": [
40058
+ "spec",
40059
+ "fallbackText"
40060
+ ]
39195
40061
  }
39196
40062
  },
39197
40063
  "required": [
@@ -39202,7 +40068,7 @@
39202
40068
  }
39203
40069
  },
39204
40070
  "403": {
39205
- "description": "Only the task requester may run the action",
40071
+ "description": "Only the task requester may run the action, or the action's script is not allowlisted or changed since it was allowlisted",
39206
40072
  "content": {
39207
40073
  "application/json": {
39208
40074
  "schema": {
@@ -39222,7 +40088,27 @@
39222
40088
  }
39223
40089
  },
39224
40090
  "409": {
39225
- "description": "Card actions are turned off (UI_SPEC_ACTIONS_ENABLED)",
40091
+ "description": "Card actions are turned off (UI_SPEC_ACTIONS_ENABLED), or the script action is already running (with `Retry-After`)",
40092
+ "content": {
40093
+ "application/json": {
40094
+ "schema": {
40095
+ "$ref": "#/components/schemas/ErrorResponse"
40096
+ }
40097
+ }
40098
+ }
40099
+ },
40100
+ "422": {
40101
+ "description": "The script failed or returned an invalid card; the old card stays",
40102
+ "content": {
40103
+ "application/json": {
40104
+ "schema": {
40105
+ "$ref": "#/components/schemas/ErrorResponse"
40106
+ }
40107
+ }
40108
+ }
40109
+ },
40110
+ "429": {
40111
+ "description": "The script action ran recently; `Retry-After` says when it can run again",
39226
40112
  "content": {
39227
40113
  "application/json": {
39228
40114
  "schema": {
@@ -39237,7 +40123,7 @@
39237
40123
  "/api/tasks/{id}/supersede": {
39238
40124
  "post": {
39239
40125
  "summary": "Supersede an in-progress task (terminate + spawn resume follow-up)",
39240
- "description": "Marks the original task `superseded` (terminal) and creates a fresh `taskType=\"resume\"` follow-up so a worker can pick up the work in a new provider session. Workflow-step tasks (those with `workflowRunStepId`) are carved out: the original is marked `failed` with reason `superseded_workflow_task` and no follow-up is created — the workflow engine's retry/failure policy applies, and the task moves to `superseded` once the engine queues the step's retry. With `reason: provider_fallback` (and its `errorClass`), the resume runs on the same agent with the next fallback profile that passes the profile check; when none is left, or the task is a workflow step, nothing changes and `kind: noFallback` tells the worker to fail the task itself, led by `failureReason` when set.",
40126
+ "description": "Marks the original task `superseded` (terminal) and creates a fresh `taskType=\"resume\"` follow-up so a worker can pick up the work in a new provider session. Workflow-step tasks (those with `workflowRunStepId`) are carved out: the original is marked `failed` with reason `superseded_workflow_task` and no follow-up is created — the workflow engine's retry/failure policy applies, and the task moves to `superseded` once the engine queues the step's retry or the step ends without failing. With `reason: provider_fallback` (and its `errorClass`), the resume runs on the same agent with the next fallback profile that passes the profile check; when none is left, or the task is a workflow step, nothing changes and `kind: noFallback` tells the worker to fail the task itself, led by `failureReason` when set.",
39241
40127
  "tags": [
39242
40128
  "Tasks"
39243
40129
  ],
@@ -42500,7 +43386,8 @@
42500
43386
  "amp",
42501
43387
  "cursor",
42502
43388
  "grok",
42503
- "fx"
43389
+ "fx",
43390
+ "system-one"
42504
43391
  ]
42505
43392
  },
42506
43393
  "required": true,
@@ -42586,7 +43473,8 @@
42586
43473
  "amp",
42587
43474
  "cursor",
42588
43475
  "grok",
42589
- "fx"
43476
+ "fx",
43477
+ "system-one"
42590
43478
  ]
42591
43479
  },
42592
43480
  "required": true,
@@ -42705,7 +43593,8 @@
42705
43593
  "amp",
42706
43594
  "cursor",
42707
43595
  "grok",
42708
- "fx"
43596
+ "fx",
43597
+ "system-one"
42709
43598
  ]
42710
43599
  },
42711
43600
  "required": true,
@@ -42792,7 +43681,8 @@
42792
43681
  "amp",
42793
43682
  "cursor",
42794
43683
  "grok",
42795
- "fx"
43684
+ "fx",
43685
+ "system-one"
42796
43686
  ]
42797
43687
  },
42798
43688
  "required": true,
@@ -53328,7 +54218,8 @@
53328
54218
  "amp",
53329
54219
  "cursor",
53330
54220
  "grok",
53331
- "fx"
54221
+ "fx",
54222
+ "system-one"
53332
54223
  ]
53333
54224
  },
53334
54225
  "createdAt": {
@@ -57551,21 +58442,47 @@
57551
58442
  "actions": {
57552
58443
  "type": "object",
57553
58444
  "additionalProperties": {
57554
- "type": "object",
57555
- "properties": {
57556
- "kind": {
57557
- "type": "string",
57558
- "enum": [
57559
- "follow_up"
58445
+ "oneOf": [
58446
+ {
58447
+ "type": "object",
58448
+ "properties": {
58449
+ "kind": {
58450
+ "type": "string",
58451
+ "enum": [
58452
+ "follow_up"
58453
+ ]
58454
+ },
58455
+ "prompt": {
58456
+ "type": "string"
58457
+ }
58458
+ },
58459
+ "required": [
58460
+ "kind",
58461
+ "prompt"
57560
58462
  ]
57561
58463
  },
57562
- "prompt": {
57563
- "type": "string"
58464
+ {
58465
+ "type": "object",
58466
+ "properties": {
58467
+ "kind": {
58468
+ "type": "string",
58469
+ "enum": [
58470
+ "script"
58471
+ ]
58472
+ },
58473
+ "script": {
58474
+ "type": "string"
58475
+ },
58476
+ "args": {
58477
+ "type": "object",
58478
+ "additionalProperties": {}
58479
+ }
58480
+ },
58481
+ "required": [
58482
+ "kind",
58483
+ "script"
58484
+ ]
57564
58485
  }
57565
- },
57566
- "required": [
57567
- "kind",
57568
- "prompt"
57569
58486
  ]
57570
58487
  }
57571
58488
  },
@@ -57705,21 +58622,47 @@
57705
58622
  "actions": {
57706
58623
  "type": "object",
57707
58624
  "additionalProperties": {
57708
- "type": "object",
57709
- "properties": {
57710
- "kind": {
57711
- "type": "string",
57712
- "enum": [
57713
- "follow_up"
58625
+ "oneOf": [
58626
+ {
58627
+ "type": "object",
58628
+ "properties": {
58629
+ "kind": {
58630
+ "type": "string",
58631
+ "enum": [
58632
+ "follow_up"
58633
+ ]
58634
+ },
58635
+ "prompt": {
58636
+ "type": "string"
58637
+ }
58638
+ },
58639
+ "required": [
58640
+ "kind",
58641
+ "prompt"
57714
58642
  ]
57715
58643
  },
57716
- "prompt": {
57717
- "type": "string"
58644
+ {
58645
+ "type": "object",
58646
+ "properties": {
58647
+ "kind": {
58648
+ "type": "string",
58649
+ "enum": [
58650
+ "script"
58651
+ ]
58652
+ },
58653
+ "script": {
58654
+ "type": "string"
58655
+ },
58656
+ "args": {
58657
+ "type": "object",
58658
+ "additionalProperties": {}
58659
+ }
58660
+ },
58661
+ "required": [
58662
+ "kind",
58663
+ "script"
58664
+ ]
57718
58665
  }
57719
- },
57720
- "required": [
57721
- "kind",
57722
- "prompt"
57723
58666
  ]
57724
58667
  }
57725
58668
  },
@@ -64157,6 +65100,226 @@
64157
65100
  }
64158
65101
  }
64159
65102
  },
65103
+ "/api/tool-hooks": {
65104
+ "post": {
65105
+ "summary": "Run extension tool hooks for a harness-native tool call",
65106
+ "description": "A worker shim reports a harness built-in tool call (bash, read, write, edit). `phase: pre` runs `pre.tool.call` with `callOrigin: native` and returns the decision. `phase: post` runs `post.tool.call` observe-only and returns 202 at once. Only extensions whose manifest `toolSources` includes `\"native\"` receive these calls. The server runs the secret scrubber over the body before any handler sees it, so handlers read `[REDACTED:<name>]` in place of a secret. A `modify` whose args still carry that marker is rejected and the call continues unchanged. Shims must also scrub worker-side before sending.",
65107
+ "tags": [
65108
+ "Extensions"
65109
+ ],
65110
+ "security": [
65111
+ {
65112
+ "bearerAuth": []
65113
+ }
65114
+ ],
65115
+ "requestBody": {
65116
+ "content": {
65117
+ "application/json": {
65118
+ "schema": {
65119
+ "oneOf": [
65120
+ {
65121
+ "type": "object",
65122
+ "properties": {
65123
+ "phase": {
65124
+ "type": "string",
65125
+ "enum": [
65126
+ "pre"
65127
+ ]
65128
+ },
65129
+ "harness": {
65130
+ "type": "string",
65131
+ "minLength": 1,
65132
+ "maxLength": 64,
65133
+ "description": "Worker harness, such as `claude` or `pi`."
65134
+ },
65135
+ "tool": {
65136
+ "type": "string",
65137
+ "minLength": 1,
65138
+ "maxLength": 256,
65139
+ "description": "Canonical tool name, such as `bash` or `edit`."
65140
+ },
65141
+ "nativeTool": {
65142
+ "type": "string",
65143
+ "minLength": 1,
65144
+ "maxLength": 256,
65145
+ "description": "The harness's own tool name."
65146
+ },
65147
+ "args": {
65148
+ "description": "Canonical tool arguments."
65149
+ },
65150
+ "rawArgs": {
65151
+ "description": "The harness's own argument shape."
65152
+ },
65153
+ "toolCallId": {
65154
+ "type": "string",
65155
+ "maxLength": 256
65156
+ },
65157
+ "parentToolCallId": {
65158
+ "type": "string",
65159
+ "maxLength": 256
65160
+ }
65161
+ },
65162
+ "required": [
65163
+ "phase",
65164
+ "harness",
65165
+ "tool"
65166
+ ]
65167
+ },
65168
+ {
65169
+ "type": "object",
65170
+ "properties": {
65171
+ "phase": {
65172
+ "type": "string",
65173
+ "enum": [
65174
+ "post"
65175
+ ]
65176
+ },
65177
+ "harness": {
65178
+ "type": "string",
65179
+ "minLength": 1,
65180
+ "maxLength": 64,
65181
+ "description": "Worker harness, such as `claude` or `pi`."
65182
+ },
65183
+ "tool": {
65184
+ "type": "string",
65185
+ "minLength": 1,
65186
+ "maxLength": 256,
65187
+ "description": "Canonical tool name, such as `bash` or `edit`."
65188
+ },
65189
+ "nativeTool": {
65190
+ "type": "string",
65191
+ "minLength": 1,
65192
+ "maxLength": 256,
65193
+ "description": "The harness's own tool name."
65194
+ },
65195
+ "args": {
65196
+ "description": "Canonical tool arguments."
65197
+ },
65198
+ "rawArgs": {
65199
+ "description": "The harness's own argument shape."
65200
+ },
65201
+ "toolCallId": {
65202
+ "type": "string",
65203
+ "maxLength": 256
65204
+ },
65205
+ "parentToolCallId": {
65206
+ "type": "string",
65207
+ "maxLength": 256
65208
+ },
65209
+ "result": {},
65210
+ "isError": {
65211
+ "type": "boolean"
65212
+ },
65213
+ "durationMs": {
65214
+ "type": "number",
65215
+ "minimum": 0
65216
+ }
65217
+ },
65218
+ "required": [
65219
+ "phase",
65220
+ "harness",
65221
+ "tool",
65222
+ "durationMs"
65223
+ ]
65224
+ }
65225
+ ]
65226
+ }
65227
+ }
65228
+ }
65229
+ },
65230
+ "responses": {
65231
+ "200": {
65232
+ "description": "Pre-call decision",
65233
+ "content": {
65234
+ "application/json": {
65235
+ "schema": {
65236
+ "oneOf": [
65237
+ {
65238
+ "type": "object",
65239
+ "properties": {
65240
+ "action": {
65241
+ "type": "string",
65242
+ "enum": [
65243
+ "continue"
65244
+ ]
65245
+ }
65246
+ },
65247
+ "required": [
65248
+ "action"
65249
+ ]
65250
+ },
65251
+ {
65252
+ "type": "object",
65253
+ "properties": {
65254
+ "action": {
65255
+ "type": "string",
65256
+ "enum": [
65257
+ "modify"
65258
+ ]
65259
+ },
65260
+ "args": {}
65261
+ },
65262
+ "required": [
65263
+ "action"
65264
+ ]
65265
+ },
65266
+ {
65267
+ "type": "object",
65268
+ "properties": {
65269
+ "action": {
65270
+ "type": "string",
65271
+ "enum": [
65272
+ "block"
65273
+ ]
65274
+ },
65275
+ "reason": {
65276
+ "type": "string"
65277
+ }
65278
+ },
65279
+ "required": [
65280
+ "action",
65281
+ "reason"
65282
+ ]
65283
+ }
65284
+ ]
65285
+ }
65286
+ }
65287
+ }
65288
+ },
65289
+ "202": {
65290
+ "description": "Post-call event accepted",
65291
+ "content": {
65292
+ "application/json": {
65293
+ "schema": {
65294
+ "type": "object",
65295
+ "properties": {
65296
+ "accepted": {
65297
+ "type": "boolean",
65298
+ "enum": [
65299
+ true
65300
+ ]
65301
+ }
65302
+ },
65303
+ "required": [
65304
+ "accepted"
65305
+ ]
65306
+ }
65307
+ }
65308
+ }
65309
+ },
65310
+ "400": {
65311
+ "description": "Invalid body or missing X-Agent-ID header",
65312
+ "content": {
65313
+ "application/json": {
65314
+ "schema": {
65315
+ "$ref": "#/components/schemas/ErrorResponse"
65316
+ }
65317
+ }
65318
+ }
65319
+ }
65320
+ }
65321
+ }
65322
+ },
64160
65323
  "/api/trackers/jira/authorize": {
64161
65324
  "get": {
64162
65325
  "summary": "Start the Jira OAuth flow (admin): redirect to the consent screen, or return its URL",
@@ -68910,7 +70073,8 @@
68910
70073
  },
68911
70074
  "/api/users/{id}/merge": {
68912
70075
  "post": {
68913
- "summary": "Merge another user into this one — moves identities + email aliases, deletes source",
70076
+ "summary": "Merge another user into this one: moves identities + email aliases, queues the rest",
70077
+ "description": "Moves the source's identities and email aliases to the target, revokes the source's credentials and records a manual_merge event, all in one short transaction. The attribution rewrite across every table and the deletion of the source run as a background job; poll GET /api/users/merge-jobs/{jobId} until its status is done or failed. While the job runs, the source cannot authenticate and identity lookups resolve to the target.",
68914
70078
  "tags": [
68915
70079
  "Users"
68916
70080
  ],
@@ -68948,137 +70112,19 @@
68948
70112
  }
68949
70113
  },
68950
70114
  "responses": {
68951
- "200": {
68952
- "description": "Merged user",
70115
+ "202": {
70116
+ "description": "The queued merge job",
68953
70117
  "content": {
68954
70118
  "application/json": {
68955
70119
  "schema": {
68956
70120
  "type": "object",
68957
70121
  "properties": {
68958
- "user": {
68959
- "anyOf": [
68960
- {
68961
- "allOf": [
68962
- {
68963
- "$ref": "#/components/schemas/User"
68964
- },
68965
- {
68966
- "type": "object",
68967
- "properties": {
68968
- "identities": {
68969
- "type": "array",
68970
- "items": {
68971
- "type": "object",
68972
- "properties": {
68973
- "kind": {
68974
- "type": "string"
68975
- },
68976
- "externalId": {
68977
- "type": "string"
68978
- }
68979
- },
68980
- "required": [
68981
- "kind",
68982
- "externalId"
68983
- ]
68984
- }
68985
- },
68986
- "tokens": {
68987
- "type": "array",
68988
- "items": {
68989
- "type": "object",
68990
- "properties": {
68991
- "id": {
68992
- "type": "string"
68993
- },
68994
- "userId": {
68995
- "type": "string"
68996
- },
68997
- "label": {
68998
- "type": [
68999
- "string",
69000
- "null"
69001
- ]
69002
- },
69003
- "tokenPreview": {
69004
- "type": "string"
69005
- },
69006
- "createdAt": {
69007
- "type": "string"
69008
- },
69009
- "lastUsedAt": {
69010
- "type": [
69011
- "string",
69012
- "null"
69013
- ]
69014
- },
69015
- "revokedAt": {
69016
- "type": [
69017
- "string",
69018
- "null"
69019
- ]
69020
- }
69021
- },
69022
- "required": [
69023
- "id",
69024
- "userId",
69025
- "label",
69026
- "tokenPreview",
69027
- "createdAt",
69028
- "lastUsedAt",
69029
- "revokedAt"
69030
- ]
69031
- }
69032
- },
69033
- "recentEvents": {
69034
- "type": "array",
69035
- "items": {
69036
- "type": "object",
69037
- "properties": {
69038
- "id": {
69039
- "type": "string"
69040
- },
69041
- "userId": {
69042
- "type": "string"
69043
- },
69044
- "eventType": {
69045
- "type": "string"
69046
- },
69047
- "actor": {
69048
- "type": "string"
69049
- },
69050
- "before": {},
69051
- "after": {},
69052
- "createdAt": {
69053
- "type": "string"
69054
- }
69055
- },
69056
- "required": [
69057
- "id",
69058
- "userId",
69059
- "eventType",
69060
- "actor",
69061
- "createdAt"
69062
- ]
69063
- }
69064
- }
69065
- },
69066
- "required": [
69067
- "identities",
69068
- "tokens",
69069
- "recentEvents"
69070
- ]
69071
- }
69072
- ]
69073
- },
69074
- {
69075
- "type": "null"
69076
- }
69077
- ]
70122
+ "job": {
70123
+ "$ref": "#/components/schemas/UserMergeJob"
69078
70124
  }
69079
70125
  },
69080
70126
  "required": [
69081
- "user"
70127
+ "job"
69082
70128
  ]
69083
70129
  }
69084
70130
  }
@@ -69125,7 +70171,142 @@
69125
70171
  }
69126
70172
  },
69127
70173
  "409": {
69128
- "description": "Source is the last active admin (last_admin)",
70174
+ "description": "Source is the last active admin (last_admin), or a merge job for the source or target is still running (merge_in_progress)",
70175
+ "content": {
70176
+ "application/json": {
70177
+ "schema": {
70178
+ "$ref": "#/components/schemas/ErrorResponse"
70179
+ }
70180
+ }
70181
+ }
70182
+ }
70183
+ }
70184
+ }
70185
+ },
70186
+ "/api/users/merge-jobs": {
70187
+ "get": {
70188
+ "summary": "List background user merge jobs, newest first",
70189
+ "tags": [
70190
+ "Users"
70191
+ ],
70192
+ "security": [
70193
+ {
70194
+ "bearerAuth": []
70195
+ }
70196
+ ],
70197
+ "parameters": [
70198
+ {
70199
+ "schema": {
70200
+ "type": "string",
70201
+ "enum": [
70202
+ "pending",
70203
+ "running",
70204
+ "done",
70205
+ "failed"
70206
+ ]
70207
+ },
70208
+ "required": false,
70209
+ "name": "status",
70210
+ "in": "query"
70211
+ },
70212
+ {
70213
+ "schema": {
70214
+ "type": "integer",
70215
+ "minimum": 1,
70216
+ "maximum": 200
70217
+ },
70218
+ "required": false,
70219
+ "name": "limit",
70220
+ "in": "query"
70221
+ }
70222
+ ],
70223
+ "responses": {
70224
+ "200": {
70225
+ "description": "Merge jobs",
70226
+ "content": {
70227
+ "application/json": {
70228
+ "schema": {
70229
+ "type": "object",
70230
+ "properties": {
70231
+ "jobs": {
70232
+ "type": "array",
70233
+ "items": {
70234
+ "$ref": "#/components/schemas/UserMergeJob"
70235
+ }
70236
+ }
70237
+ },
70238
+ "required": [
70239
+ "jobs"
70240
+ ]
70241
+ }
70242
+ }
70243
+ }
70244
+ },
70245
+ "401": {
70246
+ "description": "Unauthorized",
70247
+ "content": {
70248
+ "application/json": {
70249
+ "schema": {
70250
+ "$ref": "#/components/schemas/ErrorResponse"
70251
+ }
70252
+ }
70253
+ }
70254
+ }
70255
+ }
70256
+ }
70257
+ },
70258
+ "/api/users/merge-jobs/{jobId}": {
70259
+ "get": {
70260
+ "summary": "A background user merge job (poll until status is done or failed)",
70261
+ "tags": [
70262
+ "Users"
70263
+ ],
70264
+ "security": [
70265
+ {
70266
+ "bearerAuth": []
70267
+ }
70268
+ ],
70269
+ "parameters": [
70270
+ {
70271
+ "schema": {
70272
+ "type": "string"
70273
+ },
70274
+ "required": true,
70275
+ "name": "jobId",
70276
+ "in": "path"
70277
+ }
70278
+ ],
70279
+ "responses": {
70280
+ "200": {
70281
+ "description": "The merge job",
70282
+ "content": {
70283
+ "application/json": {
70284
+ "schema": {
70285
+ "type": "object",
70286
+ "properties": {
70287
+ "job": {
70288
+ "$ref": "#/components/schemas/UserMergeJob"
70289
+ }
70290
+ },
70291
+ "required": [
70292
+ "job"
70293
+ ]
70294
+ }
70295
+ }
70296
+ }
70297
+ },
70298
+ "401": {
70299
+ "description": "Unauthorized",
70300
+ "content": {
70301
+ "application/json": {
70302
+ "schema": {
70303
+ "$ref": "#/components/schemas/ErrorResponse"
70304
+ }
70305
+ }
70306
+ }
70307
+ },
70308
+ "404": {
70309
+ "description": "Job not found",
69129
70310
  "content": {
69130
70311
  "application/json": {
69131
70312
  "schema": {
@@ -70545,6 +71726,19 @@
70545
71726
  }
70546
71727
  ],
70547
71728
  "description": "Optional webhook verification format. Omit to keep legacy HMAC-SHA256 behavior with fallback header scanning."
71729
+ },
71730
+ "events": {
71731
+ "type": "array",
71732
+ "items": {
71733
+ "type": "string",
71734
+ "minLength": 1
71735
+ },
71736
+ "description": "Optional event allowlist, matched exactly against the eventHeader value after signature verification. A delivery whose event is not listed (or that has no event header) gets a 2xx `skipped` reply and creates no run. Omit or leave empty to accept every event."
71737
+ },
71738
+ "eventHeader": {
71739
+ "type": "string",
71740
+ "minLength": 1,
71741
+ "description": "Request header holding the event name for `events` (case-insensitive lookup). Defaults to X-GitHub-Event."
70548
71742
  }
70549
71743
  },
70550
71744
  "required": [
@@ -70966,6 +72160,19 @@
70966
72160
  }
70967
72161
  ],
70968
72162
  "description": "Optional webhook verification format. Omit to keep legacy HMAC-SHA256 behavior with fallback header scanning."
72163
+ },
72164
+ "events": {
72165
+ "type": "array",
72166
+ "items": {
72167
+ "type": "string",
72168
+ "minLength": 1
72169
+ },
72170
+ "description": "Optional event allowlist, matched exactly against the eventHeader value after signature verification. A delivery whose event is not listed (or that has no event header) gets a 2xx `skipped` reply and creates no run. Omit or leave empty to accept every event."
72171
+ },
72172
+ "eventHeader": {
72173
+ "type": "string",
72174
+ "minLength": 1,
72175
+ "description": "Request header holding the event name for `events` (case-insensitive lookup). Defaults to X-GitHub-Event."
70969
72176
  }
70970
72177
  },
70971
72178
  "required": [
@@ -72208,6 +73415,41 @@
72208
73415
  }
72209
73416
  ],
72210
73417
  "responses": {
73418
+ "200": {
73419
+ "description": "Delivery skipped: its event is not in the trigger's `events` allowlist. No run was created.",
73420
+ "content": {
73421
+ "application/json": {
73422
+ "schema": {
73423
+ "type": "object",
73424
+ "properties": {
73425
+ "skipped": {
73426
+ "type": "boolean",
73427
+ "enum": [
73428
+ true
73429
+ ]
73430
+ },
73431
+ "reason": {
73432
+ "type": "string",
73433
+ "enum": [
73434
+ "event-not-allowed"
73435
+ ]
73436
+ },
73437
+ "event": {
73438
+ "type": [
73439
+ "string",
73440
+ "null"
73441
+ ]
73442
+ }
73443
+ },
73444
+ "required": [
73445
+ "skipped",
73446
+ "reason",
73447
+ "event"
73448
+ ]
73449
+ }
73450
+ }
73451
+ }
73452
+ },
72211
73453
  "201": {
72212
73454
  "description": "Webhook processed",
72213
73455
  "content": {