@desplega.ai/agent-swarm 1.131.1 → 1.134.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 (360) hide show
  1. package/README.md +3 -3
  2. package/dist/{actions-jgcy477k.js → actions-7kast243.js} +20 -18
  3. package/dist/{anthropic-messages-rjmd2e7n.js → anthropic-messages-706yad38.js} +33 -17
  4. package/dist/app-0g84t8wf.js +28 -0
  5. package/dist/{artifact-jysj3wrg.js → artifact-dje5ke4h.js} +37 -131
  6. package/dist/{assistant-f2vkk1hj.js → assistant-ac4htcky.js} +25 -22
  7. package/dist/{azure-openai-responses-c0yjmbfd.js → azure-openai-responses-be59fbsz.js} +13 -13
  8. package/dist/{boot-reembed-q7mp8hcr.js → boot-reembed-b1rcqn85.js} +13 -11
  9. package/dist/{boot-reembed-xmw8wcx6.js → boot-reembed-kw2541c4.js} +14 -12
  10. package/dist/{boot-scrub-logs-dsqrv79n.js → boot-scrub-logs-ja29t92g.js} +11 -9
  11. package/dist/{claude-adapter-q6x7yspx.js → claude-adapter-5cg1fv8s.js} +33 -29
  12. package/dist/{claude-managed-adapter-wsg37bt8.js → claude-managed-adapter-9z9sdytx.js} +9 -9
  13. package/dist/{claude-managed-setup-52z4mq9w.js → claude-managed-setup-3zqp51cr.js} +5 -5
  14. package/dist/{claude-1ex232fc.js → claude-wqn3dtca.js} +1 -1
  15. package/dist/{cli-4wgngmwv.js → cli-00w4hbam.js} +1 -1
  16. package/dist/{cli-er3a4bb0.js → cli-15429qdw.js} +6 -1
  17. package/dist/{cli-e5dabkx0.js → cli-1cwhyvta.js} +4 -4
  18. package/dist/{cli-zsspvvm2.js → cli-1ybr6vw2.js} +237 -237
  19. package/dist/{cli-xpxde7rm.js → cli-2wv4kj0e.js} +60 -31
  20. package/dist/cli-34w2584r.js +530 -0
  21. package/dist/{cli-se2p6rkb.js → cli-38taxznr.js} +6 -6
  22. package/dist/{cli-9sbhdpvb.js → cli-3cgfyfzm.js} +14 -14
  23. package/dist/{cli-5n6e5yfn.js → cli-3zmdzfjf.js} +79 -74
  24. package/dist/{cli-3ty0t082.js → cli-43x36mty.js} +197 -8
  25. package/dist/{cli-ycrnynpw.js → cli-480nehnh.js} +29 -22
  26. package/dist/{cli-0258203w.js → cli-492e7ap5.js} +140 -20
  27. package/dist/{cli-3fj60etf.js → cli-497b685t.js} +3 -3
  28. package/dist/{cli-pxfxkx5m.js → cli-4bap00k0.js} +1 -1
  29. package/dist/{cli-w2wxd56v.js → cli-4bc8vmhm.js} +848 -770
  30. package/dist/{cli-aca5pz9f.js → cli-589599p9.js} +1 -1
  31. package/dist/{cli-t930g0xh.js → cli-5tnr64pm.js} +1 -1
  32. package/dist/{cli-jxg3s9ey.js → cli-65d93ves.js} +7 -7
  33. package/dist/{cli-6dpytdr2.js → cli-6x363v1z.js} +2 -2
  34. package/dist/{cli-dxak0fqd.js → cli-787ph852.js} +11 -11
  35. package/dist/{cli-793jvbsh.js → cli-7bv8nckk.js} +16 -11
  36. package/dist/{cli-zyxs93y9.js → cli-7jcc9y1r.js} +3 -3
  37. package/dist/{cli-f1am9szv.js → cli-87t2gstf.js} +1 -1
  38. package/dist/{cli-9aryf9tv.js → cli-95m51ztz.js} +1 -1
  39. package/dist/{cli-4w4fmq9x.js → cli-9w49enmh.js} +2 -2
  40. package/dist/{cli-v69vk5h0.js → cli-9y5b02vr.js} +13 -13
  41. package/dist/{cli-x23me2mg.js → cli-a1rrkrb4.js} +1 -1
  42. package/dist/{cli-psrqtw2m.js → cli-a3pkfpqs.js} +2 -2
  43. package/dist/{cli-h0rgxd24.js → cli-a4ajmfvp.js} +6 -6
  44. package/dist/{cli-ygrbmjja.js → cli-aw8bb6sf.js} +6 -6
  45. package/dist/{cli-g74vpjp2.js → cli-brm3et47.js} +55 -22
  46. package/dist/{cli-czkae1fp.js → cli-c5ddbdfj.js} +9 -9
  47. package/dist/{cli-114fvtmj.js → cli-c79a9zrc.js} +1 -1
  48. package/dist/{cli-49n9f49x.js → cli-dx3dz0ms.js} +3 -3
  49. package/dist/{cli-6dp3ydxa.js → cli-e07exmsb.js} +18 -14
  50. package/dist/cli-et1bbwqf.js +13 -0
  51. package/dist/{cli-yazx6hap.js → cli-f3s9dry0.js} +14 -14
  52. package/dist/{cli-t8d349cy.js → cli-f4wj0s3m.js} +3 -3
  53. package/dist/{cli-d6n0thxw.js → cli-f64gdfxc.js} +1 -1
  54. package/dist/{cli-pwfsqc2x.js → cli-fyd58xgb.js} +55 -55
  55. package/dist/{cli-7dm2zqy2.js → cli-g0j14czv.js} +2 -2
  56. package/dist/{cli-b0p7rfnd.js → cli-g2p9bd1z.js} +14 -14
  57. package/dist/{cli-z905tvmm.js → cli-g814jbst.js} +2 -2
  58. package/dist/{cli-5dsbcjjw.js → cli-ghexzd2d.js} +970 -970
  59. package/dist/{cli-jvv0g8bh.js → cli-gpt9kf01.js} +15 -15
  60. package/dist/{cli-rgrfzg8z.js → cli-grt6qv91.js} +380 -380
  61. package/dist/{cli-wz9115x0.js → cli-gtafvdy0.js} +8 -8
  62. package/dist/{cli-q5dzzak0.js → cli-gy07xk4s.js} +2 -2
  63. package/dist/{cli-sy7jk3tx.js → cli-h0djenzm.js} +2 -2
  64. package/dist/{cli-nrkkknat.js → cli-h37gbjbf.js} +2 -281
  65. package/dist/{cli-jevgrb4w.js → cli-h39xxnq6.js} +1200 -491
  66. package/dist/{cli-gz9sbyk3.js → cli-jepmgn7r.js} +1 -1
  67. package/dist/{cli-ccf9vy7q.js → cli-jmvk6et8.js} +7 -7
  68. package/dist/{cli-2rk0cx7s.js → cli-jxj92gkt.js} +51 -41
  69. package/dist/{cli-bqw0mt1n.js → cli-k46t4664.js} +18 -3
  70. package/dist/{cli-50vbt00w.js → cli-m07313tr.js} +1153 -696
  71. package/dist/{cli-4j2mrzag.js → cli-mkq1rk7b.js} +1 -1
  72. package/dist/{cli-1z7048dy.js → cli-mnm7w46e.js} +1 -1
  73. package/dist/{cli-kd1ck4rx.js → cli-mp9sg4cg.js} +14 -8
  74. package/dist/{cli-jbcva0xj.js → cli-mrammd8c.js} +60 -35
  75. package/dist/cli-nanaxrz6.js +27 -0
  76. package/dist/{cli-p9swy5t3.js → cli-pq2ee5ja.js} +8 -6
  77. package/dist/{cli-2wadx7p2.js → cli-pt43pdp1.js} +2 -2
  78. package/dist/{cli-7sgrxg9a.js → cli-q6d0vvey.js} +4 -4
  79. package/dist/{cli-k9qkf1hw.js → cli-qf9kpsve.js} +9 -9
  80. package/dist/cli-qh4sqfws.js +15 -0
  81. package/dist/{cli-e15jhafb.js → cli-qntkxysp.js} +14 -14
  82. package/dist/{cli-sajgpkqg.js → cli-qs9hhsvb.js} +1723 -325
  83. package/dist/{cli-z2zcxes1.js → cli-qt5bt3vk.js} +1 -1
  84. package/dist/{cli-wx82tw1k.js → cli-qtekrty1.js} +3 -3
  85. package/dist/{cli-g1re8r05.js → cli-rh6f3s9n.js} +3 -3
  86. package/dist/{cli-n0krnc6d.js → cli-rzhcrw2p.js} +2 -2
  87. package/dist/{cli-gecy3z2s.js → cli-snw62ze5.js} +4 -4
  88. package/dist/{cli-n6h8qt8n.js → cli-snz3p4yf.js} +15 -10
  89. package/dist/{cli-r6kqqbj0.js → cli-tkf8n6cw.js} +11 -11
  90. package/dist/{cli-4rkfg1wx.js → cli-tkrr24mz.js} +14 -9
  91. package/dist/{cli-9dr5qzc0.js → cli-tv9f1kyb.js} +54 -43
  92. package/dist/{cli-gm9cbhbq.js → cli-vtz6yj3v.js} +28 -9
  93. package/dist/{cli-2f07m0xr.js → cli-wf86d5t7.js} +1 -1
  94. package/dist/{cli-7zd05xb4.js → cli-whrvct19.js} +45 -45
  95. package/dist/{cli-ap1czx8f.js → cli-wrrea8xm.js} +3 -3
  96. package/dist/{cli-57khth04.js → cli-xmyqv00z.js} +120 -4
  97. package/dist/{cli-cwy5hqbq.js → cli-yjmk7tzc.js} +1 -1
  98. package/dist/{cli-6pcz9h15.js → cli-zykjrwcx.js} +180 -394
  99. package/dist/cli.js +45 -45
  100. package/dist/{codex-adapter-htjkn22b.js → codex-adapter-hsq6mz3m.js} +21 -19
  101. package/dist/{codex-hook-hq54t9ft.js → codex-hook-8c500gq8.js} +8 -7
  102. package/dist/{codex-login-z6yhbkmk.js → codex-login-x7603481.js} +3 -3
  103. package/dist/{codex-session-runner-wjfc7smz.js → codex-session-runner-c1x3x143.js} +15 -13
  104. package/dist/{commands-xhrfwqsk.js → commands-rwtddtst.js} +11 -9
  105. package/dist/{db-anvwb22f.js → db-j2b355vz.js} +458 -444
  106. package/dist/{devin-adapter-v1sarqtw.js → devin-adapter-8qmhqpy3.js} +3 -3
  107. package/dist/{devtools-2y1r7yqk.js → devtools-j2rnj8w7.js} +4 -4
  108. package/dist/{e2b-jdkwemv2.js → e2b-znpx78eg.js} +16 -16
  109. package/dist/{es5-vjgtkgp6.js → es5-fmqrjzy3.js} +2 -2
  110. package/dist/{event-bus-axn823e9.js → event-bus-n8sb35pw.js} +4 -4
  111. package/dist/{getMachineId-bsd-6tc9wxdj.js → getMachineId-bsd-wpzbhkm6.js} +4 -4
  112. package/dist/{getMachineId-darwin-sjt9sgnc.js → getMachineId-darwin-45zabjy0.js} +4 -4
  113. package/dist/{getMachineId-linux-v5n18y9p.js → getMachineId-linux-warnp5pd.js} +3 -3
  114. package/dist/{getMachineId-unsupported-yrjyqw3d.js → getMachineId-unsupported-5spent2a.js} +3 -3
  115. package/dist/{getMachineId-win-w3r8063c.js → getMachineId-win-v4bvcw7a.js} +4 -4
  116. package/dist/{google-generative-ai-hysrd8qx.js → google-generative-ai-b0wzss55.js} +17 -14
  117. package/dist/{google-vertex-p5arrga0.js → google-vertex-e8q4dpya.js} +18 -15
  118. package/dist/{handlers-b9kbc621.js → handlers-hchgrxkh.js} +32 -29
  119. package/dist/{hook-xkvn6c5h.js → hook-p49egqc0.js} +66 -52
  120. package/dist/hook-spb00w76.js +34 -0
  121. package/dist/{http-9xh6ta4r.js → http-nh14kkms.js} +663 -181
  122. package/dist/index-1qthq7vc.js +6 -0
  123. package/dist/{index-0g68f0p6.js → index-20xqmn3v.js} +3 -3
  124. package/dist/{index-vdkr5z2w.js → index-3e03k6e4.js} +114 -114
  125. package/dist/{index-ywds4812.js → index-4cbyhq2g.js} +43 -41
  126. package/dist/index-67pzqfrb.js +36 -0
  127. package/dist/{index-bccrkdkn.js → index-7m8yxkw5.js} +16 -16
  128. package/dist/{index-eaxyqcmj.js → index-dvsk64sm.js} +163 -83
  129. package/dist/{index-dqkpnmqm.js → index-e19s2m8k.js} +18 -18
  130. package/dist/{index-j30k5zxn.js → index-emvxcy98.js} +16 -16
  131. package/dist/{index-7ndw6ecy.js → index-gqnmr60d.js} +9 -9
  132. package/dist/{index-9znhar3x.js → index-j02xvjtd.js} +184 -185
  133. package/dist/{index-1s2442yw.js → index-ns5kksc1.js} +7 -7
  134. package/dist/{index-dpy2hth8.js → index-pdxc8kfh.js} +71 -71
  135. package/dist/{index-z1m7pw0v.js → index-ptcqm8bc.js} +107 -107
  136. package/dist/{index-070v4eyb.js → index-pyp7rexm.js} +5 -6
  137. package/dist/{index-86znjz1p.js → index-shne41sd.js} +13 -13
  138. package/dist/{index-2qn2qndv.js → index-t36q2v4t.js} +183 -183
  139. package/dist/index-tcnvv8w6.js +7 -0
  140. package/dist/index-w91qbfv1.js +7 -0
  141. package/dist/{index-fzc0mwvj.js → index-yqweff5n.js} +32 -32
  142. package/dist/index-yrfphye1.js +39 -0
  143. package/dist/{keepalive-vc7s2aa6.js → keepalive-9k51nqhc.js} +21 -15
  144. package/dist/lead-2xq3dxbz.js +88 -0
  145. package/dist/maintenance-0c0g6nym.js +28 -0
  146. package/dist/mistral-conversations-2njwdwhj.js +717 -0
  147. package/dist/{multipart-parser-qaktc7p8.js → multipart-parser-6gftesw0.js} +2 -2
  148. package/dist/{oauth-refresh-sweep-yecgjpk4.js → oauth-refresh-sweep-273a64r2.js} +14 -12
  149. package/dist/{onboard-xj0f73f9.js → onboard-tsv9wwhz.js} +12 -12
  150. package/dist/{openai-codex-responses-5g27pd6f.js → openai-codex-responses-kt84eq86.js} +26 -26
  151. package/dist/{openai-completions-3vkmfz2a.js → openai-completions-mrypq7qp.js} +17 -16
  152. package/dist/{openai-responses-dg4t7j7a.js → openai-responses-qhrk21ez.js} +20 -17
  153. package/dist/{opencode-adapter-1gm38aba.js → opencode-adapter-rar9676j.js} +13 -11
  154. package/dist/{openrouter-images-g3gm8931.js → openrouter-images-684fysx9.js} +5 -5
  155. package/dist/{otel-impl-nxg0n0b3.js → otel-impl-wp1mfzd2.js} +752 -537
  156. package/dist/{photon_rs-ky7dj5qw.js → photon_rs-8dwt2pzy.js} +581 -581
  157. package/dist/{pi-messages-tqj8q6b9.js → pi-messages-txp9f97r.js} +7 -7
  158. package/dist/{pi-mono-adapter-4g5kby31.js → pi-mono-adapter-yz47kk8e.js} +1910 -1180
  159. package/dist/pricing-refresh-jw1yw2fn.js +22 -0
  160. package/dist/rbac-roles-dg964c8p.js +32 -0
  161. package/dist/{rbac-roles-1hcxdtg7.js → rbac-roles-p53cg5cv.js} +19 -17
  162. package/dist/{registry-02cy9z5z.js → registry-mh12y17v.js} +4 -4
  163. package/dist/render-v2-56vn2rk9.js +36 -0
  164. package/dist/seed-pricing-52xx6z63.js +19 -0
  165. package/dist/{setup-46xtgq3c.js → setup-e8gp79sy.js} +7 -7
  166. package/dist/token-util-zy908s1a.js +6 -0
  167. package/dist/{token-fxkn2zf2.js → token-xg5711x5.js} +4 -4
  168. package/dist/worker-s17f1g46.js +88 -0
  169. package/dist/{x-6mg4kfpe.js → x-xkfh0w0v.js} +5 -5
  170. package/openapi.json +566 -22
  171. package/package.json +6 -6
  172. package/src/be/budget-refusal-notify.ts +14 -7
  173. package/src/be/db-queries/task-artifacts.ts +182 -0
  174. package/src/be/db.ts +834 -171
  175. package/src/be/events.ts +5 -0
  176. package/src/be/migrations/131_session_logs_created_at_index.sql +2 -0
  177. package/src/be/migrations/132_multi_runtime_instances.sql +44 -0
  178. package/src/be/migrations/133_workflow_run_trigger_type.sql +12 -0
  179. package/src/be/migrations/135_backfill_task_pull_request_attachments.sql +228 -0
  180. package/src/be/migrations/136_task_requester_provenance.sql +37 -0
  181. package/src/be/migrations/137_memory_retrieval_composite_index.sql +1 -0
  182. package/src/be/migrations/runner.ts +17 -11
  183. package/src/be/multi-runtime.ts +430 -0
  184. package/src/be/scripts/extract-schema.ts +3 -1
  185. package/src/be/scripts/typecheck.ts +6 -2
  186. package/src/be/seed-prompt-templates.ts +25 -2
  187. package/src/be/seed-skills/index.ts +7 -0
  188. package/src/be/steering.ts +1 -1
  189. package/src/be/swarm-config-guard.ts +18 -0
  190. package/src/commands/credential-wait.ts +54 -0
  191. package/src/commands/onboard/steps/core-credentials.tsx +1 -1
  192. package/src/commands/onboard/steps/custom-templates.tsx +1 -1
  193. package/src/commands/onboard/steps/harness-credentials.tsx +1 -1
  194. package/src/commands/onboard/steps/health-check.tsx +1 -1
  195. package/src/commands/onboard/steps/start.tsx +1 -1
  196. package/src/commands/profile-sync-audit.ts +56 -0
  197. package/src/commands/profile-sync.ts +287 -15
  198. package/src/commands/provider-credentials.ts +46 -19
  199. package/src/commands/runner.ts +199 -33
  200. package/src/commands/templates.ts +22 -0
  201. package/src/github/handlers.ts +55 -9
  202. package/src/heartbeat/heartbeat.ts +109 -17
  203. package/src/hooks/hook.ts +49 -33
  204. package/src/http/active-sessions.ts +11 -1
  205. package/src/http/agents.ts +261 -30
  206. package/src/http/all-routes.ts +1 -0
  207. package/src/http/config.ts +13 -2
  208. package/src/http/core.ts +102 -4
  209. package/src/http/db-query-bounded.ts +313 -0
  210. package/src/http/db-query-shared.ts +249 -0
  211. package/src/http/db-query.ts +54 -42
  212. package/src/http/events.ts +2 -0
  213. package/src/http/index.ts +23 -2
  214. package/src/http/mcp-bridge.ts +37 -3
  215. package/src/http/mcp.ts +12 -0
  216. package/src/http/memory.ts +13 -2
  217. package/src/http/openapi.ts +1 -0
  218. package/src/http/poll.ts +70 -27
  219. package/src/http/prompt-templates.ts +36 -13
  220. package/src/http/route-def.ts +43 -9
  221. package/src/http/schedules.ts +2 -2
  222. package/src/http/scripts.ts +10 -1
  223. package/src/http/session-data.ts +44 -0
  224. package/src/http/tasks.ts +2 -2
  225. package/src/http/users.ts +74 -52
  226. package/src/http/webhooks.ts +5 -2
  227. package/src/http/workflows.ts +1 -4
  228. package/src/integrations/kapso/inbound.ts +1 -1
  229. package/src/jira/outbound.ts +39 -8
  230. package/src/jira/webhook-lifecycle.ts +13 -2
  231. package/src/linear/outbound.ts +43 -10
  232. package/src/oauth/keepalive.ts +13 -2
  233. package/src/prompts/base-prompt.ts +1 -1
  234. package/src/prompts/default-drift.ts +21 -0
  235. package/src/prompts/session-templates.ts +56 -7
  236. package/src/providers/claude-adapter.ts +6 -0
  237. package/src/providers/codex-adapter.ts +6 -0
  238. package/src/providers/opencode-adapter.ts +6 -0
  239. package/src/providers/pi-mono-adapter.ts +8 -0
  240. package/src/providers/pricing-sources.md +24 -0
  241. package/src/queue-stall-alarm.ts +216 -0
  242. package/src/rbac/legacy-policy.ts +3 -0
  243. package/src/rbac/permissions.ts +12 -0
  244. package/src/scheduler/scheduler.ts +7 -0
  245. package/src/script-workflows/executor.ts +2 -1
  246. package/src/scripts-runtime/executors/native.ts +2 -1
  247. package/src/scripts-runtime/executors/types.ts +5 -0
  248. package/src/scripts-runtime/loader.ts +5 -0
  249. package/src/scripts-runtime/sdk-allowlist.ts +3 -0
  250. package/src/scripts-runtime/swarm-config.ts +8 -0
  251. package/src/scripts-runtime/swarm-sdk.ts +7 -0
  252. package/src/scripts-runtime/types/stdlib.d.ts +4 -0
  253. package/src/scripts-runtime/types/swarm-sdk.d.ts +4 -0
  254. package/src/server.ts +6 -0
  255. package/src/slack/channel-join.ts +22 -3
  256. package/src/slack/channel-lifecycle.ts +114 -0
  257. package/src/tests/budget-claim-gate.test.ts +20 -0
  258. package/src/tests/claude-adapter.test.ts +32 -0
  259. package/src/tests/codex-adapter.test.ts +30 -0
  260. package/src/tests/create-task-validation.test.ts +128 -0
  261. package/src/tests/credential-wait.test.ts +67 -1
  262. package/src/tests/db-query.test.ts +711 -2
  263. package/src/tests/heartbeat-checklist.test.ts +28 -0
  264. package/src/tests/http-api-integration.test.ts +81 -0
  265. package/src/tests/http-users.test.ts +166 -1
  266. package/src/tests/identity-field-budget.test.ts +176 -0
  267. package/src/tests/mcp-tools-user.test.ts +34 -0
  268. package/src/tests/mcp-user-route.test.ts +17 -0
  269. package/src/tests/metrics-http.test.ts +44 -0
  270. package/src/tests/migration-failure.test.ts +86 -0
  271. package/src/tests/multi-runtime-registration.test.ts +2810 -0
  272. package/src/tests/openapi-response-contract.test.ts +24 -0
  273. package/src/tests/openapi-route-headers.test.ts +83 -0
  274. package/src/tests/opencode-adapter.test.ts +40 -0
  275. package/src/tests/outbound-listener-rejection.test.ts +138 -0
  276. package/src/tests/pi-mono-adapter.test.ts +98 -0
  277. package/src/tests/preload.ts +2 -0
  278. package/src/tests/profile-sync-warning.test.ts +277 -0
  279. package/src/tests/profile-sync.test.ts +232 -6
  280. package/src/tests/prompt-template-resolver.test.ts +177 -6
  281. package/src/tests/prompt-template-session.test.ts +39 -3
  282. package/src/tests/queue-stall-alarm.test.ts +226 -0
  283. package/src/tests/rbac-charact-slack.test.ts +29 -0
  284. package/src/tests/rbac-engine.test.ts +3 -0
  285. package/src/tests/requester-comms.test.ts +32 -0
  286. package/src/tests/runner-requester-profile.test.ts +38 -0
  287. package/src/tests/schedule-target-type.test.ts +38 -0
  288. package/src/tests/script-connections.test.ts +13 -1
  289. package/src/tests/scripts-runtime-identity.test.ts +375 -0
  290. package/src/tests/scripts-runtime.test.ts +4 -3
  291. package/src/tests/sdk-allowlist.test.ts +47 -0
  292. package/src/tests/send-task-requested-by.test.ts +9 -0
  293. package/src/tests/session-costs.test.ts +506 -1
  294. package/src/tests/shutdown-error-scrubbing.test.ts +92 -0
  295. package/src/tests/slack-channel-lifecycle.test.ts +241 -0
  296. package/src/tests/slack-render-v2.test.ts +43 -0
  297. package/src/tests/steering-core.test.ts +28 -0
  298. package/src/tests/swarm-config-reserved-keys.test.ts +22 -0
  299. package/src/tests/task-artifacts.test.ts +386 -0
  300. package/src/tests/task-attachments-schema.test.ts +17 -1
  301. package/src/tests/task-completion-idempotency.test.ts +57 -0
  302. package/src/tests/task-pull-request-backfill-migration.test.ts +321 -0
  303. package/src/tests/tool-annotations.test.ts +4 -0
  304. package/src/tests/update-profile-api.test.ts +67 -39
  305. package/src/tests/update-profile-auth.test.ts +48 -4
  306. package/src/tests/user-attribution-migration.test.ts +54 -0
  307. package/src/tests/user-identity.test.ts +72 -0
  308. package/src/tests/workflow-async-v2.test.ts +39 -1
  309. package/src/tests/workflow-http-v2.test.ts +3 -2
  310. package/src/tests/workflow-mcp-trigger-schema.test.ts +52 -3
  311. package/src/tests/workflow-retry-v2.test.ts +45 -1
  312. package/src/tools/db-query.ts +18 -8
  313. package/src/tools/get-task-details.ts +24 -3
  314. package/src/tools/manage-user.ts +36 -3
  315. package/src/tools/poll-task.ts +93 -14
  316. package/src/tools/script-common.ts +5 -0
  317. package/src/tools/send-task.ts +1 -4
  318. package/src/tools/slack-archive-channel.ts +70 -0
  319. package/src/tools/slack-create-channel.ts +74 -0
  320. package/src/tools/slack-invite-to-channel.ts +78 -0
  321. package/src/tools/store-progress.ts +13 -2
  322. package/src/tools/swarm-config/delete-config.ts +9 -0
  323. package/src/tools/swarm-config/set-config.ts +3 -2
  324. package/src/tools/task-action.ts +30 -0
  325. package/src/tools/task-tool-ctx.ts +8 -1
  326. package/src/tools/tool-config.ts +4 -1
  327. package/src/tools/update-profile.ts +16 -21
  328. package/src/tools/utils.ts +5 -0
  329. package/src/tools/workflows/trigger-workflow.ts +7 -1
  330. package/src/types.ts +165 -1
  331. package/src/utils/github-pull-request.ts +76 -0
  332. package/src/utils/identity-field-budget.ts +73 -0
  333. package/src/utils/multi-runtime.ts +20 -0
  334. package/src/utils/requester-comms.ts +24 -0
  335. package/src/workflows/engine.ts +22 -2
  336. package/src/workflows/resume.ts +19 -11
  337. package/src/workflows/retry-poller.ts +1 -0
  338. package/src/workflows/triggers.ts +4 -0
  339. package/templates/skills/db-query-guidance/config.json +14 -0
  340. package/templates/skills/db-query-guidance/content.md +57 -0
  341. package/dist/app-5da78bd4.js +0 -26
  342. package/dist/cli-3te4jdkm.js +0 -225
  343. package/dist/cli-bmze986d.js +0 -7
  344. package/dist/cli-kh3ba2zf.js +0 -607
  345. package/dist/hook-cgk4wxmx.js +0 -31
  346. package/dist/index-25wjsdv2.js +0 -34
  347. package/dist/index-76at2ymp.js +0 -7
  348. package/dist/index-hase6zbe.js +0 -6
  349. package/dist/index-vg4snay4.js +0 -36
  350. package/dist/index-vy8edt27.js +0 -7
  351. package/dist/lead-r2yqfmx7.js +0 -85
  352. package/dist/maintenance-mw70k468.js +0 -26
  353. package/dist/mistral-conversations-81fwav0j.js +0 -30578
  354. package/dist/otel-nqa12wf3.js +0 -3149
  355. package/dist/pricing-refresh-2cn6effr.js +0 -20
  356. package/dist/rbac-roles-vynday5g.js +0 -30
  357. package/dist/render-v2-tc0bh8kk.js +0 -34
  358. package/dist/seed-pricing-8kceb43f.js +0 -17
  359. package/dist/token-util-pqyc8kng.js +0 -6
  360. package/dist/worker-qrbz6hmv.js +0 -85
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.131.1",
5
+ "version": "1.134.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": [
@@ -69,6 +69,12 @@
69
69
  "null"
70
70
  ]
71
71
  },
72
+ "runtimeInstanceId": {
73
+ "type": [
74
+ "string",
75
+ "null"
76
+ ]
77
+ },
72
78
  "startedAt": {
73
79
  "type": "string",
74
80
  "format": "date-time"
@@ -1264,6 +1270,8 @@
1264
1270
  "system.boot",
1265
1271
  "system.migration",
1266
1272
  "system.error",
1273
+ "system.profile_sync_rejected",
1274
+ "system.profile_sync_reconciled",
1267
1275
  "script.global_upsert",
1268
1276
  "schedule.deleted"
1269
1277
  ]
@@ -2217,6 +2225,24 @@
2217
2225
  "body"
2218
2226
  ]
2219
2227
  },
2228
+ "PromptTemplateResponse": {
2229
+ "allOf": [
2230
+ {
2231
+ "$ref": "#/components/schemas/PromptTemplate"
2232
+ },
2233
+ {
2234
+ "type": "object",
2235
+ "properties": {
2236
+ "defaultDrifted": {
2237
+ "type": "boolean"
2238
+ }
2239
+ },
2240
+ "required": [
2241
+ "defaultDrifted"
2242
+ ]
2243
+ }
2244
+ ]
2245
+ },
2220
2246
  "PromptTemplate": {
2221
2247
  "type": "object",
2222
2248
  "properties": {
@@ -2329,6 +2355,20 @@
2329
2355
  "changeReason"
2330
2356
  ]
2331
2357
  },
2358
+ "UserCommsPrefs": {
2359
+ "type": "object",
2360
+ "properties": {
2361
+ "tone": {
2362
+ "type": "string"
2363
+ },
2364
+ "language": {
2365
+ "type": "string"
2366
+ },
2367
+ "verbosity": {
2368
+ "type": "string"
2369
+ }
2370
+ }
2371
+ },
2332
2372
  "BudgetRefusedTrigger": {
2333
2373
  "type": "object",
2334
2374
  "properties": {
@@ -4289,6 +4329,9 @@
4289
4329
  "error": {
4290
4330
  "type": "string"
4291
4331
  },
4332
+ "createdBy": {
4333
+ "type": "string"
4334
+ },
4292
4335
  "startedAt": {
4293
4336
  "type": "string"
4294
4337
  },
@@ -4694,6 +4737,9 @@
4694
4737
  },
4695
4738
  "runnerSessionId": {
4696
4739
  "type": "string"
4740
+ },
4741
+ "runtimeInstanceId": {
4742
+ "type": "string"
4697
4743
  }
4698
4744
  },
4699
4745
  "required": [
@@ -5048,6 +5094,108 @@
5048
5094
  }
5049
5095
  }
5050
5096
  },
5097
+ "/ping": {
5098
+ "post": {
5099
+ "summary": "Report agent liveness",
5100
+ "description": "Refreshes the calling agent's status. Workers may send `X-Runtime-Instance-ID`, the per-boot identifier of the calling process. It is ignored unless MULTI_RUNTIME_ENABLED is set. With multi-runtime mode on, the header must identify a live runtime of this agent; an absent, unknown, offline, or foreign identifier makes the call a no-op instead of an error, so workers predating the flag keep running.",
5101
+ "tags": [
5102
+ "Core"
5103
+ ],
5104
+ "security": [
5105
+ {
5106
+ "bearerAuth": []
5107
+ }
5108
+ ],
5109
+ "parameters": [
5110
+ {
5111
+ "schema": {
5112
+ "type": "string",
5113
+ "description": "Identifies the concrete runtime instance (worker process) making the call, as generated at its boot. Required to refresh a runtime's liveness when multi-runtime mode (MULTI_RUNTIME_ENABLED) is on; ignored otherwise."
5114
+ },
5115
+ "required": false,
5116
+ "description": "Identifies the concrete runtime instance (worker process) making the call, as generated at its boot. Required to refresh a runtime's liveness when multi-runtime mode (MULTI_RUNTIME_ENABLED) is on; ignored otherwise.",
5117
+ "name": "X-Runtime-Instance-ID",
5118
+ "in": "header"
5119
+ }
5120
+ ],
5121
+ "responses": {
5122
+ "204": {
5123
+ "description": "Liveness recorded (or accepted as a no-op)"
5124
+ },
5125
+ "400": {
5126
+ "description": "Missing X-Agent-ID header",
5127
+ "content": {
5128
+ "application/json": {
5129
+ "schema": {
5130
+ "$ref": "#/components/schemas/ErrorResponse"
5131
+ }
5132
+ }
5133
+ }
5134
+ },
5135
+ "404": {
5136
+ "description": "Agent not found",
5137
+ "content": {
5138
+ "application/json": {
5139
+ "schema": {
5140
+ "$ref": "#/components/schemas/ErrorResponse"
5141
+ }
5142
+ }
5143
+ }
5144
+ }
5145
+ }
5146
+ }
5147
+ },
5148
+ "/close": {
5149
+ "post": {
5150
+ "summary": "Mark an agent or runtime offline on shutdown",
5151
+ "description": "Retires the calling process. Workers may send `X-Runtime-Instance-ID`, the per-boot identifier of the calling process. It is ignored unless MULTI_RUNTIME_ENABLED is set. With multi-runtime mode on, the header is required and only that runtime is retired; the agent goes offline once no live runtime remains. With the flag off, the agent is marked offline as before.",
5152
+ "tags": [
5153
+ "Core"
5154
+ ],
5155
+ "security": [
5156
+ {
5157
+ "bearerAuth": []
5158
+ }
5159
+ ],
5160
+ "parameters": [
5161
+ {
5162
+ "schema": {
5163
+ "type": "string",
5164
+ "description": "Identifies the concrete runtime instance (worker process) making the call, as generated at its boot. Required to retire a runtime when multi-runtime mode (MULTI_RUNTIME_ENABLED) is on; ignored otherwise."
5165
+ },
5166
+ "required": false,
5167
+ "description": "Identifies the concrete runtime instance (worker process) making the call, as generated at its boot. Required to retire a runtime when multi-runtime mode (MULTI_RUNTIME_ENABLED) is on; ignored otherwise.",
5168
+ "name": "X-Runtime-Instance-ID",
5169
+ "in": "header"
5170
+ }
5171
+ ],
5172
+ "responses": {
5173
+ "204": {
5174
+ "description": "Runtime (and agent, when last) marked offline"
5175
+ },
5176
+ "400": {
5177
+ "description": "Missing X-Agent-ID, or missing X-Runtime-Instance-ID in multi-runtime mode",
5178
+ "content": {
5179
+ "application/json": {
5180
+ "schema": {
5181
+ "$ref": "#/components/schemas/ErrorResponse"
5182
+ }
5183
+ }
5184
+ }
5185
+ },
5186
+ "404": {
5187
+ "description": "Agent not found",
5188
+ "content": {
5189
+ "application/json": {
5190
+ "schema": {
5191
+ "$ref": "#/components/schemas/ErrorResponse"
5192
+ }
5193
+ }
5194
+ }
5195
+ }
5196
+ }
5197
+ }
5198
+ },
5051
5199
  "/api/apps/{id}/user-config": {
5052
5200
  "get": {
5053
5201
  "summary": "Get app user configuration",
@@ -8386,6 +8534,26 @@
8386
8534
  }
8387
8535
  }
8388
8536
  }
8537
+ },
8538
+ "408": {
8539
+ "description": "Query exceeded its wall-clock budget and was terminated",
8540
+ "content": {
8541
+ "application/json": {
8542
+ "schema": {
8543
+ "$ref": "#/components/schemas/ErrorResponse"
8544
+ }
8545
+ }
8546
+ }
8547
+ },
8548
+ "429": {
8549
+ "description": "Too many concurrent bounded db-query executions; retry shortly",
8550
+ "content": {
8551
+ "application/json": {
8552
+ "schema": {
8553
+ "$ref": "#/components/schemas/ErrorResponse"
8554
+ }
8555
+ }
8556
+ }
8389
8557
  }
8390
8558
  }
8391
8559
  }
@@ -8450,6 +8618,10 @@
8450
8618
  "claude-managed",
8451
8619
  "opencode"
8452
8620
  ]
8621
+ },
8622
+ "runtimeInstanceId": {
8623
+ "type": "string",
8624
+ "minLength": 1
8453
8625
  }
8454
8626
  },
8455
8627
  "required": [
@@ -9090,6 +9262,116 @@
9090
9262
  }
9091
9263
  }
9092
9264
  },
9265
+ "/api/agents/{id}/runtime-instances": {
9266
+ "get": {
9267
+ "summary": "List runtime instances serving an agent",
9268
+ "description": "Read-only view of the worker processes currently registered for a logical agent. Rows exist only for multi-runtime registrations (MULTI_RUNTIME_ENABLED), so the list is empty in the default configuration. `isLive` combines `status` with `lastSeenAt` freshness against the server's staleness cutoff (`staleThresholdMinutes`); `reportedSlots` is each process's self-reported capacity, distinct from the agent's logical `maxTasks` policy.",
9269
+ "tags": [
9270
+ "Agents"
9271
+ ],
9272
+ "security": [
9273
+ {
9274
+ "bearerAuth": []
9275
+ }
9276
+ ],
9277
+ "parameters": [
9278
+ {
9279
+ "schema": {
9280
+ "type": "string"
9281
+ },
9282
+ "required": true,
9283
+ "name": "id",
9284
+ "in": "path"
9285
+ }
9286
+ ],
9287
+ "responses": {
9288
+ "200": {
9289
+ "description": "Runtime instances for the agent (empty when none are registered)",
9290
+ "content": {
9291
+ "application/json": {
9292
+ "schema": {
9293
+ "type": "object",
9294
+ "properties": {
9295
+ "runtimeInstances": {
9296
+ "type": "array",
9297
+ "items": {
9298
+ "type": "object",
9299
+ "properties": {
9300
+ "id": {
9301
+ "type": "string"
9302
+ },
9303
+ "agentId": {
9304
+ "type": "string"
9305
+ },
9306
+ "status": {
9307
+ "type": "string",
9308
+ "enum": [
9309
+ "active",
9310
+ "offline"
9311
+ ]
9312
+ },
9313
+ "reportedSlots": {
9314
+ "type": "integer"
9315
+ },
9316
+ "credentialReady": {
9317
+ "type": [
9318
+ "boolean",
9319
+ "null"
9320
+ ]
9321
+ },
9322
+ "lastSeenAt": {
9323
+ "type": "string",
9324
+ "format": "date-time"
9325
+ },
9326
+ "createdAt": {
9327
+ "type": "string",
9328
+ "format": "date-time"
9329
+ },
9330
+ "updatedAt": {
9331
+ "type": "string",
9332
+ "format": "date-time"
9333
+ },
9334
+ "isLive": {
9335
+ "type": "boolean"
9336
+ }
9337
+ },
9338
+ "required": [
9339
+ "id",
9340
+ "agentId",
9341
+ "status",
9342
+ "reportedSlots",
9343
+ "lastSeenAt",
9344
+ "createdAt",
9345
+ "updatedAt",
9346
+ "isLive"
9347
+ ]
9348
+ }
9349
+ },
9350
+ "staleThresholdMinutes": {
9351
+ "type": "integer"
9352
+ }
9353
+ },
9354
+ "required": [
9355
+ "runtimeInstances",
9356
+ "staleThresholdMinutes"
9357
+ ]
9358
+ }
9359
+ }
9360
+ }
9361
+ },
9362
+ "404": {
9363
+ "description": "Agent not found",
9364
+ "content": {
9365
+ "application/json": {
9366
+ "schema": {
9367
+ "$ref": "#/components/schemas/ErrorResponse"
9368
+ }
9369
+ }
9370
+ }
9371
+ }
9372
+ }
9373
+ }
9374
+ },
9093
9375
  "/api/agents/{id}/profile": {
9094
9376
  "put": {
9095
9377
  "summary": "Update agent profile (role, description, capabilities, etc.)",
@@ -9131,24 +9413,20 @@
9131
9413
  }
9132
9414
  },
9133
9415
  "claudeMd": {
9134
- "type": "string",
9135
- "maxLength": 262144
9416
+ "type": "string"
9136
9417
  },
9137
9418
  "soulMd": {
9138
- "type": "string",
9139
- "maxLength": 262144
9419
+ "type": "string"
9140
9420
  },
9141
9421
  "identityMd": {
9142
- "type": "string",
9143
- "maxLength": 262144
9422
+ "type": "string"
9144
9423
  },
9145
9424
  "setupScript": {
9146
9425
  "type": "string",
9147
9426
  "maxLength": 262144
9148
9427
  },
9149
9428
  "toolsMd": {
9150
- "type": "string",
9151
- "maxLength": 262144
9429
+ "type": "string"
9152
9430
  },
9153
9431
  "heartbeatMd": {
9154
9432
  "type": "string",
@@ -9242,11 +9520,56 @@
9242
9520
  }
9243
9521
  },
9244
9522
  "400": {
9245
- "description": "Validation error",
9523
+ "description": "Validation or identity-field budget error",
9246
9524
  "content": {
9247
9525
  "application/json": {
9248
9526
  "schema": {
9249
- "$ref": "#/components/schemas/ErrorResponse"
9527
+ "type": "object",
9528
+ "properties": {
9529
+ "error": {
9530
+ "type": "string"
9531
+ },
9532
+ "profileSyncRejection": {
9533
+ "type": "object",
9534
+ "properties": {
9535
+ "field": {
9536
+ "type": "string",
9537
+ "enum": [
9538
+ "soulMd",
9539
+ "identityMd",
9540
+ "claudeMd",
9541
+ "toolsMd"
9542
+ ]
9543
+ },
9544
+ "diskSize": {
9545
+ "type": "integer"
9546
+ },
9547
+ "dbSize": {
9548
+ "type": "integer"
9549
+ },
9550
+ "budget": {
9551
+ "type": "integer"
9552
+ },
9553
+ "delta": {
9554
+ "type": "integer"
9555
+ },
9556
+ "reason": {
9557
+ "type": "string"
9558
+ }
9559
+ },
9560
+ "required": [
9561
+ "field",
9562
+ "diskSize",
9563
+ "dbSize",
9564
+ "budget",
9565
+ "delta",
9566
+ "reason"
9567
+ ]
9568
+ }
9569
+ },
9570
+ "required": [
9571
+ "error"
9572
+ ]
9250
9573
  }
9251
9574
  }
9252
9575
  }
@@ -9405,6 +9728,16 @@
9405
9728
  "required": true,
9406
9729
  "name": "id",
9407
9730
  "in": "path"
9731
+ },
9732
+ {
9733
+ "schema": {
9734
+ "type": "string",
9735
+ "description": "Identifies the concrete runtime instance (worker process) making the call, as generated at its boot. Required to report credential readiness when multi-runtime mode (MULTI_RUNTIME_ENABLED) is on; ignored otherwise."
9736
+ },
9737
+ "required": false,
9738
+ "description": "Identifies the concrete runtime instance (worker process) making the call, as generated at its boot. Required to report credential readiness when multi-runtime mode (MULTI_RUNTIME_ENABLED) is on; ignored otherwise.",
9739
+ "name": "X-Runtime-Instance-ID",
9740
+ "in": "header"
9408
9741
  }
9409
9742
  ],
9410
9743
  "requestBody": {
@@ -9485,6 +9818,16 @@
9485
9818
  }
9486
9819
  }
9487
9820
  },
9821
+ "400": {
9822
+ "description": "Missing X-Runtime-Instance-ID in multi-runtime mode",
9823
+ "content": {
9824
+ "application/json": {
9825
+ "schema": {
9826
+ "$ref": "#/components/schemas/ErrorResponse"
9827
+ }
9828
+ }
9829
+ }
9830
+ },
9488
9831
  "404": {
9489
9832
  "description": "Agent not found",
9490
9833
  "content": {
@@ -14018,6 +14361,8 @@
14018
14361
  "system.boot",
14019
14362
  "system.migration",
14020
14363
  "system.error",
14364
+ "system.profile_sync_rejected",
14365
+ "system.profile_sync_reconciled",
14021
14366
  "script.global_upsert",
14022
14367
  "schedule.deleted"
14023
14368
  ]
@@ -14163,6 +14508,8 @@
14163
14508
  "system.boot",
14164
14509
  "system.migration",
14165
14510
  "system.error",
14511
+ "system.profile_sync_rejected",
14512
+ "system.profile_sync_reconciled",
14166
14513
  "script.global_upsert",
14167
14514
  "schedule.deleted"
14168
14515
  ]
@@ -14224,6 +14571,14 @@
14224
14571
  "name": "sessionId",
14225
14572
  "in": "query"
14226
14573
  },
14574
+ {
14575
+ "schema": {
14576
+ "type": "string"
14577
+ },
14578
+ "required": false,
14579
+ "name": "dataField",
14580
+ "in": "query"
14581
+ },
14227
14582
  {
14228
14583
  "schema": {
14229
14584
  "type": "string"
@@ -14333,6 +14688,8 @@
14333
14688
  "system.boot",
14334
14689
  "system.migration",
14335
14690
  "system.error",
14691
+ "system.profile_sync_rejected",
14692
+ "system.profile_sync_reconciled",
14336
14693
  "script.global_upsert",
14337
14694
  "schedule.deleted"
14338
14695
  ]
@@ -21564,7 +21921,7 @@
21564
21921
  "type": "object",
21565
21922
  "properties": {
21566
21923
  "template": {
21567
- "$ref": "#/components/schemas/PromptTemplate"
21924
+ "$ref": "#/components/schemas/PromptTemplateResponse"
21568
21925
  }
21569
21926
  },
21570
21927
  "required": [
@@ -21961,7 +22318,7 @@
21961
22318
  "type": "object",
21962
22319
  "properties": {
21963
22320
  "template": {
21964
- "$ref": "#/components/schemas/PromptTemplate"
22321
+ "$ref": "#/components/schemas/PromptTemplateResponse"
21965
22322
  }
21966
22323
  },
21967
22324
  "required": [
@@ -22024,7 +22381,7 @@
22024
22381
  "type": "object",
22025
22382
  "properties": {
22026
22383
  "template": {
22027
- "$ref": "#/components/schemas/PromptTemplate"
22384
+ "$ref": "#/components/schemas/PromptTemplateResponse"
22028
22385
  }
22029
22386
  },
22030
22387
  "required": [
@@ -22077,7 +22434,7 @@
22077
22434
  "type": "object",
22078
22435
  "properties": {
22079
22436
  "template": {
22080
- "$ref": "#/components/schemas/PromptTemplate"
22437
+ "$ref": "#/components/schemas/PromptTemplateResponse"
22081
22438
  },
22082
22439
  "history": {
22083
22440
  "type": "array",
@@ -22231,7 +22588,7 @@
22231
22588
  "templates": {
22232
22589
  "type": "array",
22233
22590
  "items": {
22234
- "$ref": "#/components/schemas/PromptTemplate"
22591
+ "$ref": "#/components/schemas/PromptTemplateResponse"
22235
22592
  }
22236
22593
  }
22237
22594
  },
@@ -22310,7 +22667,7 @@
22310
22667
  "type": "object",
22311
22668
  "properties": {
22312
22669
  "template": {
22313
- "$ref": "#/components/schemas/PromptTemplate"
22670
+ "$ref": "#/components/schemas/PromptTemplateResponse"
22314
22671
  }
22315
22672
  },
22316
22673
  "required": [
@@ -22344,6 +22701,18 @@
22344
22701
  "bearerAuth": []
22345
22702
  }
22346
22703
  ],
22704
+ "parameters": [
22705
+ {
22706
+ "schema": {
22707
+ "type": "string",
22708
+ "description": "Identifies the concrete runtime instance (worker process) making the call, as generated at its boot. Required to poll for work when multi-runtime mode (MULTI_RUNTIME_ENABLED) is on; ignored otherwise."
22709
+ },
22710
+ "required": false,
22711
+ "description": "Identifies the concrete runtime instance (worker process) making the call, as generated at its boot. Required to poll for work when multi-runtime mode (MULTI_RUNTIME_ENABLED) is on; ignored otherwise.",
22712
+ "name": "X-Runtime-Instance-ID",
22713
+ "in": "header"
22714
+ }
22715
+ ],
22347
22716
  "responses": {
22348
22717
  "200": {
22349
22718
  "description": "Trigger data or null",
@@ -22368,6 +22737,30 @@
22368
22737
  },
22369
22738
  "task": {
22370
22739
  "$ref": "#/components/schemas/AgentTask"
22740
+ },
22741
+ "requestedBy": {
22742
+ "type": "object",
22743
+ "properties": {
22744
+ "name": {
22745
+ "type": "string",
22746
+ "minLength": 1
22747
+ },
22748
+ "email": {
22749
+ "type": "string"
22750
+ },
22751
+ "role": {
22752
+ "type": "string"
22753
+ },
22754
+ "notes": {
22755
+ "type": "string"
22756
+ },
22757
+ "comms": {
22758
+ "$ref": "#/components/schemas/UserCommsPrefs"
22759
+ }
22760
+ },
22761
+ "required": [
22762
+ "name"
22763
+ ]
22371
22764
  }
22372
22765
  },
22373
22766
  "required": [
@@ -22444,6 +22837,9 @@
22444
22837
  },
22445
22838
  "notes": {
22446
22839
  "type": "string"
22840
+ },
22841
+ "comms": {
22842
+ "$ref": "#/components/schemas/UserCommsPrefs"
22447
22843
  }
22448
22844
  },
22449
22845
  "required": [
@@ -23492,7 +23888,9 @@
23492
23888
  }
23493
23889
  },
23494
23890
  "priority": {
23495
- "type": "integer"
23891
+ "type": "integer",
23892
+ "minimum": 0,
23893
+ "maximum": 100
23496
23894
  },
23497
23895
  "targetAgentId": {
23498
23896
  "type": "string"
@@ -24685,7 +25083,9 @@
24685
25083
  }
24686
25084
  },
24687
25085
  "priority": {
24688
- "type": "integer"
25086
+ "type": "integer",
25087
+ "minimum": 0,
25088
+ "maximum": 100
24689
25089
  },
24690
25090
  "targetAgentId": {
24691
25091
  "type": [
@@ -25013,7 +25413,9 @@
25013
25413
  }
25014
25414
  },
25015
25415
  "priority": {
25016
- "type": "integer"
25416
+ "type": "integer",
25417
+ "minimum": 0,
25418
+ "maximum": 100
25017
25419
  },
25018
25420
  "targetAgentId": {
25019
25421
  "type": [
@@ -31882,6 +32284,15 @@
31882
32284
  },
31883
32285
  "attributedCostUsd": {
31884
32286
  "type": "number"
32287
+ },
32288
+ "attributableCostUsd": {
32289
+ "type": "number"
32290
+ },
32291
+ "excludedCostUsd": {
32292
+ "type": "number"
32293
+ },
32294
+ "excludedTaskCount": {
32295
+ "type": "integer"
31885
32296
  }
31886
32297
  },
31887
32298
  "required": [
@@ -31893,7 +32304,10 @@
31893
32304
  "totalDurationMs",
31894
32305
  "totalSessions",
31895
32306
  "avgCostPerSession",
31896
- "attributedCostUsd"
32307
+ "attributedCostUsd",
32308
+ "attributableCostUsd",
32309
+ "excludedCostUsd",
32310
+ "excludedTaskCount"
31897
32311
  ]
31898
32312
  },
31899
32313
  "daily": {
@@ -32021,6 +32435,92 @@
32021
32435
  }
32022
32436
  }
32023
32437
  },
32438
+ "/api/attribution/by-person": {
32439
+ "get": {
32440
+ "summary": "Four-metric per-person attribution (problems initiated/shipped, reach)",
32441
+ "tags": [
32442
+ "Session Data"
32443
+ ],
32444
+ "security": [
32445
+ {
32446
+ "bearerAuth": []
32447
+ }
32448
+ ],
32449
+ "parameters": [
32450
+ {
32451
+ "schema": {
32452
+ "type": "string"
32453
+ },
32454
+ "required": false,
32455
+ "name": "startDate",
32456
+ "in": "query"
32457
+ },
32458
+ {
32459
+ "schema": {
32460
+ "type": "string"
32461
+ },
32462
+ "required": false,
32463
+ "name": "endDate",
32464
+ "in": "query"
32465
+ }
32466
+ ],
32467
+ "responses": {
32468
+ "200": {
32469
+ "description": "Per-person attribution rows",
32470
+ "content": {
32471
+ "application/json": {
32472
+ "schema": {
32473
+ "type": "object",
32474
+ "properties": {
32475
+ "rows": {
32476
+ "type": "array",
32477
+ "items": {
32478
+ "type": "object",
32479
+ "properties": {
32480
+ "userId": {
32481
+ "type": "string"
32482
+ },
32483
+ "problemsInitiated": {
32484
+ "type": "integer"
32485
+ },
32486
+ "problemsShipped": {
32487
+ "type": "integer"
32488
+ },
32489
+ "agentsReached": {
32490
+ "type": "integer"
32491
+ },
32492
+ "reposReached": {
32493
+ "type": "integer"
32494
+ },
32495
+ "surfacesReached": {
32496
+ "type": "integer"
32497
+ },
32498
+ "firstPassYield": {
32499
+ "type": "null"
32500
+ }
32501
+ },
32502
+ "required": [
32503
+ "userId",
32504
+ "problemsInitiated",
32505
+ "problemsShipped",
32506
+ "agentsReached",
32507
+ "reposReached",
32508
+ "surfacesReached",
32509
+ "firstPassYield"
32510
+ ]
32511
+ }
32512
+ }
32513
+ },
32514
+ "required": [
32515
+ "rows"
32516
+ ]
32517
+ }
32518
+ }
32519
+ }
32520
+ }
32521
+ }
32522
+ }
32523
+ },
32024
32524
  "/api/session-costs/dashboard": {
32025
32525
  "get": {
32026
32526
  "summary": "Cost today and month-to-date for dashboard",
@@ -33867,6 +34367,18 @@
33867
34367
  "bearerAuth": []
33868
34368
  }
33869
34369
  ],
34370
+ "parameters": [
34371
+ {
34372
+ "schema": {
34373
+ "type": "string",
34374
+ "description": "Identifies the concrete runtime instance (worker process) making the call, as generated at its boot. Required to acquire work through the script SDK when multi-runtime mode (MULTI_RUNTIME_ENABLED) is on; ignored otherwise."
34375
+ },
34376
+ "required": false,
34377
+ "description": "Identifies the concrete runtime instance (worker process) making the call, as generated at its boot. Required to acquire work through the script SDK when multi-runtime mode (MULTI_RUNTIME_ENABLED) is on; ignored otherwise.",
34378
+ "name": "X-Runtime-Instance-ID",
34379
+ "in": "header"
34380
+ }
34381
+ ],
33870
34382
  "requestBody": {
33871
34383
  "content": {
33872
34384
  "application/json": {
@@ -35297,6 +35809,18 @@
35297
35809
  "bearerAuth": []
35298
35810
  }
35299
35811
  ],
35812
+ "parameters": [
35813
+ {
35814
+ "schema": {
35815
+ "type": "string",
35816
+ "description": "Identifies the concrete runtime instance (worker process) making the call, as generated at its boot. Required to acquire work through bridged tools when multi-runtime mode (MULTI_RUNTIME_ENABLED) is on; ignored otherwise."
35817
+ },
35818
+ "required": false,
35819
+ "description": "Identifies the concrete runtime instance (worker process) making the call, as generated at its boot. Required to acquire work through bridged tools when multi-runtime mode (MULTI_RUNTIME_ENABLED) is on; ignored otherwise.",
35820
+ "name": "X-Runtime-Instance-ID",
35821
+ "in": "header"
35822
+ }
35823
+ ],
35300
35824
  "requestBody": {
35301
35825
  "content": {
35302
35826
  "application/json": {
@@ -37435,7 +37959,9 @@
37435
37959
  }
37436
37960
  },
37437
37961
  "priority": {
37438
- "type": "integer"
37962
+ "type": "integer",
37963
+ "minimum": 0,
37964
+ "maximum": 100
37439
37965
  },
37440
37966
  "dependsOn": {
37441
37967
  "type": "array",
@@ -41244,6 +41770,24 @@
41244
41770
  ],
41245
41771
  "additionalProperties": {}
41246
41772
  },
41773
+ "comms": {
41774
+ "type": [
41775
+ "object",
41776
+ "null"
41777
+ ],
41778
+ "properties": {
41779
+ "tone": {
41780
+ "type": "string"
41781
+ },
41782
+ "language": {
41783
+ "type": "string"
41784
+ },
41785
+ "verbosity": {
41786
+ "type": "string"
41787
+ }
41788
+ },
41789
+ "description": "Merges into metadata.comms without touching sibling metadata keys; null removes only the comms key. When metadata is also provided, it is applied first and replaces the whole blob."
41790
+ },
41247
41791
  "dailyBudgetUsd": {
41248
41792
  "type": [
41249
41793
  "number",