@desplega.ai/agent-swarm 1.149.0 → 1.150.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 (385) hide show
  1. package/README.md +7 -3
  2. package/dist/{acp-adapter-4jncb126.js → acp-adapter-d5mzggyk.js} +1 -1
  3. package/dist/{actions-31vp3ae7.js → actions-wn6ew0p7.js} +11 -10
  4. package/dist/{anthropic-messages-vs2rabzp.js → anthropic-messages-ec35ktvx.js} +4 -4
  5. package/dist/{app-1hh67x8w.js → app-dty7p9hg.js} +7 -7
  6. package/dist/{artifact-gj9arwrr.js → artifact-td4q4dch.js} +1 -1
  7. package/dist/{assistant-z66dmz6p.js → assistant-q4vhgjtx.js} +16 -17
  8. package/dist/{boot-reembed-wxa8ya0s.js → boot-reembed-92292pgf.js} +9 -9
  9. package/dist/{boot-reembed-fqzxxzjh.js → boot-reembed-n15q6s9x.js} +8 -8
  10. package/dist/{boot-scrub-logs-jnyndh79.js → boot-scrub-logs-44pc955m.js} +5 -5
  11. package/dist/{claude-adapter-3qpa9w0j.js → claude-adapter-cjegjbje.js} +14 -14
  12. package/dist/{claude-managed-adapter-qvsmh6mv.js → claude-managed-adapter-p3ts5m9m.js} +2 -2
  13. package/dist/{claude-sdk-session-2yxgjs5d.js → claude-sdk-session-7ywbn12v.js} +14 -14
  14. package/dist/{cli-cr12paw2.js → cli-111ey3ra.js} +5 -5
  15. package/dist/{cli-4wtq5jjv.js → cli-1mx65de9.js} +1 -1
  16. package/dist/{cli-9d8ntetj.js → cli-2658f6at.js} +1 -1
  17. package/dist/{cli-n3dz2942.js → cli-3ckzxdt1.js} +10 -6
  18. package/dist/{cli-yb9qhqam.js → cli-3mh119qv.js} +184 -67
  19. package/dist/{cli-ykxrnd1q.js → cli-72xdszyx.js} +2 -2
  20. package/dist/{cli-xm87hzbw.js → cli-7fesa1ky.js} +1 -1
  21. package/dist/{cli-3q5ejx9p.js → cli-7kwmt3r5.js} +2 -2
  22. package/dist/{cli-2qts1hys.js → cli-8chp8xab.js} +2 -2
  23. package/dist/{cli-qaacms9y.js → cli-9gqddmxs.js} +122 -97
  24. package/dist/{cli-zvz62chv.js → cli-a45d5v9b.js} +4 -4
  25. package/dist/{cli-9xvdm3bx.js → cli-asvrh7kj.js} +1 -1
  26. package/dist/{cli-kgz4np97.js → cli-b8x19vbh.js} +4 -4
  27. package/dist/{cli-9fy6nk6g.js → cli-ceb5y160.js} +1 -1
  28. package/dist/{cli-k0cr4kat.js → cli-ck1vqzdj.js} +1 -1
  29. package/dist/{cli-e29gmdmw.js → cli-dv6cdjs2.js} +2 -1
  30. package/dist/{cli-jecc01cb.js → cli-dyx0237s.js} +1 -1
  31. package/dist/{cli-kjwt6hdf.js → cli-gm0fhz13.js} +3 -3
  32. package/dist/{cli-sd5pv3b1.js → cli-h505yhex.js} +2 -2
  33. package/dist/{handlers-nbzdzn9k.js → cli-hbagregr.js} +15 -38
  34. package/dist/{cli-08b07b4r.js → cli-hmyynq9b.js} +1 -1
  35. package/dist/{cli-d8ftsp62.js → cli-kt7wevqh.js} +20 -13
  36. package/dist/{cli-gjhjfeeg.js → cli-kyysm7m3.js} +1 -1
  37. package/dist/{cli-1ebpar1q.js → cli-mzb0n642.js} +6 -6
  38. package/dist/{cli-q50ef8g0.js → cli-n1yj5fd5.js} +1 -1
  39. package/dist/{cli-3apbzgyk.js → cli-n75jt793.js} +13 -9
  40. package/dist/{cli-19f354qr.js → cli-q04q68be.js} +2 -2
  41. package/dist/{cli-yab68w40.js → cli-qp69dd5d.js} +29 -14
  42. package/dist/{cli-6pqcb4q0.js → cli-rnsr8asm.js} +12 -11
  43. package/dist/{cli-ygweqcn4.js → cli-rwp3ksm7.js} +91 -108
  44. package/dist/{cli-phsxnkp6.js → cli-ryz8q8p1.js} +74 -58
  45. package/dist/{cli-e95cx1eb.js → cli-taym3dmg.js} +10 -10
  46. package/dist/{cli-nye12xk5.js → cli-ttje5a4z.js} +7 -4
  47. package/dist/{cli-9hspd3dp.js → cli-vr6qj104.js} +1 -1
  48. package/dist/{cli-mnmsfd1w.js → cli-xjb9wghj.js} +7 -3
  49. package/dist/{cli-gv88e1vf.js → cli-ydk0wjj8.js} +1 -1
  50. package/dist/{cli-aae6hz6a.js → cli-zd21jrrc.js} +3 -3
  51. package/dist/{cli-7smrsr25.js → cli-zthatyrx.js} +23 -11
  52. package/dist/cli.js +19 -19
  53. package/dist/{codex-adapter-8meawydj.js → codex-adapter-rn3aq7jm.js} +7 -7
  54. package/dist/{codex-hook-hfrt9shr.js → codex-hook-gthcmm0g.js} +3 -3
  55. package/dist/{codex-session-runner-gjgxyp5j.js → codex-session-runner-bge0cbsw.js} +7 -7
  56. package/dist/{commands-hz3nb95f.js → commands-26phw0pc.js} +5 -5
  57. package/dist/{db-ggz97zbm.js → db-jxjx6s1b.js} +6 -6
  58. package/dist/{e2b-p04vmtx0.js → e2b-413b8t4v.js} +1 -1
  59. package/dist/handlers-vr1djg4n.js +41 -0
  60. package/dist/{hook-bks2q1f6.js → hook-jw0ztn96.js} +9 -9
  61. package/dist/{hook-kq9wp0ep.js → hook-t6fqsggw.js} +10 -10
  62. package/dist/{http-hrf77v87.js → http-hyc7s57s.js} +80 -71
  63. package/dist/{index-n28pw1zt.js → index-1d9r6a74.js} +18 -18
  64. package/dist/{index-cqtebbhb.js → index-bcyx5djw.js} +17 -17
  65. package/dist/{index-6nsbg88z.js → index-sfhaq59d.js} +408 -74
  66. package/dist/{index-8hmeg8j1.js → index-wtwpthe1.js} +17 -17
  67. package/dist/{keepalive-dxc12gvg.js → keepalive-fbsak4ya.js} +7 -7
  68. package/dist/{lead-yckfn18d.js → lead-rdzdm627.js} +39 -39
  69. package/dist/{maintenance-6kfb2m5e.js → maintenance-25z1c1vf.js} +9 -9
  70. package/dist/{node-x1g4v0pq.js → node-209sxmg3.js} +9 -9
  71. package/dist/{oauth-refresh-sweep-1x1ac722.js → oauth-refresh-sweep-j3d7gtse.js} +6 -6
  72. package/dist/{onboard-dcyt1609.js → onboard-dkcwrc75.js} +2 -2
  73. package/dist/{otel-impl-tbk3e5dr.js → otel-impl-8rgyy3j8.js} +1 -1
  74. package/dist/{pi-mono-adapter-zvshk5cj.js → pi-mono-adapter-4s2bbkgq.js} +8 -8
  75. package/dist/{pricing-refresh-kaqg567e.js → pricing-refresh-9cek71nq.js} +7 -7
  76. package/dist/{rbac-roles-cf97v1vd.js → rbac-roles-vk8mqp9v.js} +6 -6
  77. package/dist/{rbac-roles-ammq6rd2.js → rbac-roles-z98s2ypy.js} +5 -5
  78. package/dist/{render-v2-80w603vy.js → render-v2-3j26g0qh.js} +7 -7
  79. package/dist/{seed-pricing-zbrn83xv.js → seed-pricing-7rxhcnzm.js} +6 -6
  80. package/dist/{setup-fe66kczs.js → setup-e2t7vz0c.js} +2 -2
  81. package/dist/work-objects-8d3nd3x2.js +141 -0
  82. package/dist/{worker-qmb2d1e2.js → worker-0x9fn7nq.js} +39 -39
  83. package/openapi.json +15 -4
  84. package/package.json +3 -3
  85. package/src/agentmail/handlers.ts +5 -0
  86. package/src/be/budget-refusal-notify.ts +1 -0
  87. package/src/be/db/tasks/read.ts +3 -0
  88. package/src/be/db/tasks/write.ts +13 -1
  89. package/src/be/db.ts +4 -2
  90. package/src/be/migrations/153_deferred_task_wait_members.sql +25 -0
  91. package/src/be/migrations/154_routing_source.sql +3 -0
  92. package/src/be/scripts/typecheck.ts +7 -3
  93. package/src/be/seed/automation-toggle.ts +69 -0
  94. package/src/be/seed/schedules-seeder.ts +53 -8
  95. package/src/be/seed/workflows-seeder.ts +35 -6
  96. package/src/be/seed-scripts/catalog/delegate.ts +3 -1
  97. package/src/be/seed-skills/bundled-files.generated.json +1 -1
  98. package/src/be/steering.ts +1 -0
  99. package/src/be/swarm-config-guard.ts +1 -0
  100. package/src/commands/credential-refresh.ts +70 -0
  101. package/src/commands/provider-credentials.ts +2 -25
  102. package/src/commands/runner.ts +23 -56
  103. package/src/github/handlers.ts +9 -0
  104. package/src/gitlab/handlers.ts +4 -0
  105. package/src/heartbeat/heartbeat.ts +3 -0
  106. package/src/http/approval-requests.ts +1 -0
  107. package/src/http/apps.ts +1 -0
  108. package/src/http/config.ts +4 -1
  109. package/src/http/core.ts +4 -2
  110. package/src/http/index.ts +16 -3
  111. package/src/http/script-runs.ts +5 -0
  112. package/src/http/tasks.ts +5 -0
  113. package/src/integrations/kapso/inbound.ts +1 -0
  114. package/src/jira/sync.ts +2 -0
  115. package/src/linear/sync.ts +2 -0
  116. package/src/prompts/session-templates.ts +13 -9
  117. package/src/providers/claude-adapter.ts +21 -8
  118. package/src/scheduler/deferred-task-waits.ts +34 -5
  119. package/src/scheduler/schedule-task.ts +5 -1
  120. package/src/scheduler/scheduler.ts +104 -123
  121. package/src/scripts-runtime/types/stdlib.d.ts +7 -3
  122. package/src/scripts-runtime/types/swarm-sdk.d.ts +7 -3
  123. package/src/slack/HEURISTICS.md +2 -0
  124. package/src/slack/actions.ts +1 -0
  125. package/src/slack/app.ts +2 -0
  126. package/src/slack/assistant.ts +4 -12
  127. package/src/slack/handlers.ts +9 -14
  128. package/src/slack/inbound-files.ts +3 -3
  129. package/src/slack/render-v2.ts +17 -3
  130. package/src/slack/thread-buffer.ts +66 -23
  131. package/src/slack/work-objects.test.ts +252 -0
  132. package/src/slack/work-objects.ts +118 -0
  133. package/src/tasks/worker-follow-up.ts +4 -0
  134. package/src/tests/acp-adapter.test.ts +10 -10
  135. package/src/tests/agent-fs-live-url.test.ts +40 -0
  136. package/src/tests/agent-fs-provision-seeder.test.ts +12 -12
  137. package/src/tests/api-key-tracking.test.ts +18 -18
  138. package/src/tests/api-key.test.ts +4 -2
  139. package/src/tests/apps-rbac.test.ts +1 -1
  140. package/src/tests/apps-spike5.test.ts +1 -1
  141. package/src/tests/apps-sync-engine.test.ts +8 -8
  142. package/src/tests/apps-user-config.test.ts +1 -1
  143. package/src/tests/artifact-sdk.test.ts +8 -8
  144. package/src/tests/asset-key-mcp.test.ts +2 -0
  145. package/src/tests/automation-preflight-alert.test.ts +1 -1
  146. package/src/tests/base-prompt.test.ts +6 -6
  147. package/src/tests/budget-user-scope.test.ts +1 -1
  148. package/src/tests/budgets-routes.test.ts +1 -1
  149. package/src/tests/claude-adapter-binary.test.ts +22 -40
  150. package/src/tests/claude-adapter-otel.test.ts +13 -7
  151. package/src/tests/claude-adapter.test.ts +8 -6
  152. package/src/tests/claude-hook-credentials.test.ts +3 -3
  153. package/src/tests/claude-managed-adapter.test.ts +4 -4
  154. package/src/tests/claude-managed-setup.test.ts +3 -3
  155. package/src/tests/claude-sdk-lifecycle.test.ts +1 -1
  156. package/src/tests/claude-sdk-transport.test.ts +6 -6
  157. package/src/tests/claude-stop-hook.test.ts +8 -8
  158. package/src/tests/claude-worker-parity.test.ts +3 -3
  159. package/src/tests/codex-adapter-pool-auth-revalidate.test.ts +5 -5
  160. package/src/tests/codex-adapter.test.ts +7 -5
  161. package/src/tests/codex-app-server.test.ts +2 -2
  162. package/src/tests/codex-login.test.ts +15 -15
  163. package/src/tests/codex-oauth-credential-info.test.ts +4 -4
  164. package/src/tests/codex-oauth-keep-warm.test.ts +4 -4
  165. package/src/tests/codex-oauth-refresh-lock.test.ts +1 -1
  166. package/src/tests/codex-oauth-storage.test.ts +7 -7
  167. package/src/tests/codex-pool.test.ts +1 -1
  168. package/src/tests/codex-steering-hook.test.ts +1 -1
  169. package/src/tests/codex-swarm-events.test.ts +1 -1
  170. package/src/tests/config-api-only-keys.test.ts +1 -1
  171. package/src/tests/config-session-auth.test.ts +2 -2
  172. package/src/tests/connection-embedded-auth.test.ts +20 -18
  173. package/src/tests/core-auth.test.ts +1 -1
  174. package/src/tests/create-page-tool.test.ts +3 -3
  175. package/src/tests/credential-refresh.test.ts +115 -0
  176. package/src/tests/credential-wait.test.ts +2 -2
  177. package/src/tests/credentials.test.ts +6 -4
  178. package/src/tests/db-queries-oauth.test.ts +40 -40
  179. package/src/tests/defer-task.test.ts +73 -8
  180. package/src/tests/deferred-task-wait-migration.test.ts +64 -0
  181. package/src/tests/deferred-task-wake.test.ts +190 -1
  182. package/src/tests/devin-adapter.test.ts +1 -1
  183. package/src/tests/devin-api.test.ts +1 -1
  184. package/src/tests/e2b-dispatch.test.ts +21 -19
  185. package/src/tests/e2e-claude-transport.test.ts +3 -3
  186. package/src/tests/e2e-redact.test.ts +6 -6
  187. package/src/tests/ensure-token.test.ts +68 -68
  188. package/src/tests/entrypoint-api-readiness.test.ts +1 -1
  189. package/src/tests/entrypoint-codex-oauth-seed.test.ts +13 -13
  190. package/src/tests/events-http.test.ts +1 -1
  191. package/src/tests/fs-routes.test.ts +1 -1
  192. package/src/tests/gitlab-auth.test.ts +10 -10
  193. package/src/tests/harness-provider-resolution.test.ts +8 -5
  194. package/src/tests/heartbeat-reroute-decision.test.ts +1 -0
  195. package/src/tests/helper-credentials.test.ts +137 -0
  196. package/src/tests/http/context-routes.test.ts +2 -2
  197. package/src/tests/http-api-integration.test.ts +5 -2
  198. package/src/tests/http-users.test.ts +1 -1
  199. package/src/tests/identity-refresh.test.ts +2 -2
  200. package/src/tests/internal-ai/complete-structured.test.ts +2 -2
  201. package/src/tests/internal-ai/credentials.test.ts +19 -17
  202. package/src/tests/jira-metadata.test.ts +1 -1
  203. package/src/tests/jira-oauth.test.ts +5 -5
  204. package/src/tests/jira-sync.test.ts +1 -1
  205. package/src/tests/jira-webhook-lifecycle.test.ts +3 -3
  206. package/src/tests/jira-webhook.test.ts +2 -2
  207. package/src/tests/kapso-inbound.test.ts +2 -2
  208. package/src/tests/kv-http.test.ts +1 -1
  209. package/src/tests/kv-namespace-resolution.test.ts +1 -1
  210. package/src/tests/kv-page-proxy.test.ts +2 -2
  211. package/src/tests/launch-password-rejection.test.ts +2 -2
  212. package/src/tests/linear-webhook.test.ts +1 -1
  213. package/src/tests/mcp-oauth-dcr-reuse.test.ts +6 -6
  214. package/src/tests/mcp-oauth-ensure-token.test.ts +28 -22
  215. package/src/tests/mcp-oauth-manual-client.test.ts +16 -12
  216. package/src/tests/mcp-oauth-queries.test.ts +35 -32
  217. package/src/tests/mcp-oauth-resolve-secrets.test.ts +8 -8
  218. package/src/tests/mcp-oauth-wrapper.test.ts +20 -20
  219. package/src/tests/mcp-user-route.test.ts +1 -1
  220. package/src/tests/memory-edges.test.ts +1 -1
  221. package/src/tests/memory-rate-endpoint.test.ts +1 -1
  222. package/src/tests/memory-rate-tool.test.ts +2 -2
  223. package/src/tests/memory-rater-e2e.test.ts +1 -1
  224. package/src/tests/memory-rater-llm-summarizer.test.ts +3 -3
  225. package/src/tests/memory-rater-llm.test.ts +1 -1
  226. package/src/tests/model-control.test.ts +3 -0
  227. package/src/tests/multi-runtime-registration.test.ts +97 -3
  228. package/src/tests/oauth-access-token-tool.test.ts +18 -18
  229. package/src/tests/oauth-callback-flow.test.ts +8 -8
  230. package/src/tests/oauth-credential-bindings.test.ts +29 -27
  231. package/src/tests/oauth-keepalive.test.ts +10 -10
  232. package/src/tests/oauth-presets.test.ts +13 -5
  233. package/src/tests/oauth-refresh-failure.test.ts +9 -9
  234. package/src/tests/oauth-refresh-sweep.test.ts +20 -13
  235. package/src/tests/oauth-wrapper.test.ts +1 -1
  236. package/src/tests/onboard-compose.test.ts +3 -3
  237. package/src/tests/onboard-env.test.ts +26 -26
  238. package/src/tests/onboard-non-interactive.test.ts +4 -4
  239. package/src/tests/opencode-adapter.test.ts +1 -1
  240. package/src/tests/opencode-plugin.test.ts +2 -2
  241. package/src/tests/otel-session-cost-metrics.test.ts +1 -1
  242. package/src/tests/page-proxy-authed.test.ts +2 -2
  243. package/src/tests/page-proxy.test.ts +2 -2
  244. package/src/tests/page-session.test.ts +7 -7
  245. package/src/tests/page-viewer-auth.test.ts +2 -2
  246. package/src/tests/pages-authed-mode.test.ts +1 -1
  247. package/src/tests/pages-http.test.ts +1 -1
  248. package/src/tests/pages-password-mode.test.ts +1 -1
  249. package/src/tests/pages-public-authed-401.test.ts +1 -1
  250. package/src/tests/pages-public-html.test.ts +2 -2
  251. package/src/tests/pages-view-count.test.ts +1 -1
  252. package/src/tests/pi-mono-adapter.test.ts +10 -10
  253. package/src/tests/pi-mono-extension.test.ts +2 -2
  254. package/src/tests/pricing-routes.test.ts +1 -1
  255. package/src/tests/profile-sync-warning.test.ts +8 -8
  256. package/src/tests/profile-sync.test.ts +8 -8
  257. package/src/tests/prompt-template-session.test.ts +36 -5
  258. package/src/tests/provider-process-group.test.ts +95 -4
  259. package/src/tests/providers/pi-cost.test.ts +1 -1
  260. package/src/tests/queue-stall-alarm.test.ts +1 -1
  261. package/src/tests/rbac-admission.test.ts +1 -1
  262. package/src/tests/rbac-charact-http.test.ts +1 -1
  263. package/src/tests/rbac-e2e-helpers.ts +1 -1
  264. package/src/tests/realtime-room-surfaces.test.ts +1 -1
  265. package/src/tests/reload-config.test.ts +1 -1
  266. package/src/tests/routing-reason-contract.test.ts +76 -3
  267. package/src/tests/routing-reason-inventory.test.ts +11 -6
  268. package/src/tests/routing-source.test.ts +53 -0
  269. package/src/tests/runner-agent-fs-provision-retry.test.ts +1 -1
  270. package/src/tests/runner-context-preamble.test.ts +1 -1
  271. package/src/tests/runner-deployment-resume.test.ts +1 -1
  272. package/src/tests/runner-fallback-output.test.ts +1 -1
  273. package/src/tests/runner-identity-refresh.test.ts +1 -1
  274. package/src/tests/runner-skills-refresh.test.ts +1 -1
  275. package/src/tests/schedule-target-type.test.ts +3 -3
  276. package/src/tests/scheduled-tasks.test.ts +14 -5
  277. package/src/tests/scheduler-occurrence.test.ts +347 -0
  278. package/src/tests/script-apis-mcp.test.ts +1 -1
  279. package/src/tests/script-connections-http.test.ts +61 -58
  280. package/src/tests/script-connections-mcp.test.ts +1 -1
  281. package/src/tests/script-connections.test.ts +1 -1
  282. package/src/tests/script-runs-http.test.ts +15 -7
  283. package/src/tests/script-workflows-runtime-e2e.test.ts +1 -1
  284. package/src/tests/scripts-external-api.test.ts +1 -1
  285. package/src/tests/scripts-http.test.ts +1 -1
  286. package/src/tests/scripts-mcp-e2e.test.ts +1 -1
  287. package/src/tests/scripts-only-gating.test.ts +2 -2
  288. package/src/tests/scripts-retention.test.ts +1 -1
  289. package/src/tests/scripts-runtime-identity.test.ts +1 -1
  290. package/src/tests/scripts-runtime-secret-egress.test.ts +1 -1
  291. package/src/tests/scripts-runtime.test.ts +6 -4
  292. package/src/tests/scripts-typecheck.test.ts +21 -0
  293. package/src/tests/sdk-allowlist.test.ts +1 -1
  294. package/src/tests/secret-scrubber.test.ts +38 -31
  295. package/src/tests/seed-registry.test.ts +46 -8
  296. package/src/tests/seed-schedules.test.ts +139 -8
  297. package/src/tests/seed-workflows.test.ts +93 -7
  298. package/src/tests/send-task-output-schema.test.ts +9 -1
  299. package/src/tests/send-task-requested-by.test.ts +1 -0
  300. package/src/tests/send-task-slack-routing-guard.test.ts +2 -0
  301. package/src/tests/session-costs-codex-recompute.test.ts +1 -1
  302. package/src/tests/session-costs-golden.test.ts +2 -2
  303. package/src/tests/session-costs-model-key-normalize.test.ts +2 -2
  304. package/src/tests/session-costs-recompute-all-providers.test.ts +1 -1
  305. package/src/tests/session-tokens.test.ts +1 -1
  306. package/src/tests/shutdown-error-scrubbing.test.ts +1 -1
  307. package/src/tests/slack-file-tools-attachments.test.ts +1 -1
  308. package/src/tests/slack-inbound-files.test.ts +222 -86
  309. package/src/tests/slack-reaction-config.test.ts +5 -4
  310. package/src/tests/slack-read-boundaries.test.ts +1 -1
  311. package/src/tests/slack-render-v2.test.ts +120 -1
  312. package/src/tests/status.test.ts +7 -7
  313. package/src/tests/steering-core.test.ts +1 -1
  314. package/src/tests/steering-transport.test.ts +4 -4
  315. package/src/tests/store-progress-output-guidance.test.ts +34 -0
  316. package/src/tests/swarm-tool-result-gate.test.ts +11 -11
  317. package/src/tests/swarm-x-tool.test.ts +7 -5
  318. package/src/tests/sync-ai-toolbox-skills.test.ts +19 -0
  319. package/src/tests/task-supersede-resume.test.ts +1 -1
  320. package/src/tests/task-tools-ctx.test.ts +2 -0
  321. package/src/tests/tasks-requested-by-filter.test.ts +2 -2
  322. package/src/tests/telemetry-init.test.ts +11 -3
  323. package/src/tests/tool-output-agent-id.test.ts +1 -0
  324. package/src/tests/tracker-fold.test.ts +7 -7
  325. package/src/tests/tracker-tools.test.ts +3 -3
  326. package/src/tests/ui-followup-lead-delegation.test.ts +1 -0
  327. package/src/tests/unified-oauth-migration.test.ts +5 -5
  328. package/src/tests/user-token-rest-auth.test.ts +1 -1
  329. package/src/tests/user-token-routes.test.ts +1 -1
  330. package/src/tests/whoami-route.test.ts +1 -1
  331. package/src/tests/workflow-agent-task.test.ts +15 -13
  332. package/src/tests/workflow-ctx.test.ts +1 -1
  333. package/src/tests/workflow-e2e.test.ts +1 -1
  334. package/src/tests/workflow-engine-v2.test.ts +3 -1
  335. package/src/tests/workflow-executors.test.ts +2 -2
  336. package/src/tests/workflow-http-v2.test.ts +8 -6
  337. package/src/tests/workflow-input-redaction.test.ts +7 -5
  338. package/src/tests/workflow-integration-io.test.ts +2 -2
  339. package/src/tests/workflow-llm.test.ts +5 -5
  340. package/src/tests/workflow-registry.test.ts +1 -1
  341. package/src/tests/workflow-swarm-script.test.ts +1 -1
  342. package/src/tests/workflow-triggers-v2.test.ts +23 -21
  343. package/src/tests/x-composio.test.ts +9 -7
  344. package/src/tests/x402-client.test.ts +1 -1
  345. package/src/tests/x402-config.test.ts +28 -41
  346. package/src/tools/defer-task.ts +156 -24
  347. package/src/tools/send-task.ts +21 -1
  348. package/src/tools/skills/skill-publish.ts +1 -0
  349. package/src/tools/store-progress.ts +1 -1
  350. package/src/tools/templates.ts +2 -1
  351. package/src/types.ts +11 -0
  352. package/src/utils/constants.ts +7 -1
  353. package/src/utils/credentials.test.ts +16 -16
  354. package/src/workflows/executors/agent-task.ts +5 -0
  355. package/templates/ai-toolbox.manifest.json +7 -1
  356. package/templates/schedules/daily-blocker-digest/config.json +6 -1
  357. package/templates/schedules/daily-compounding-reflection/config.json +1 -0
  358. package/templates/schedules/daily-hn-briefing/config.json +1 -1
  359. package/templates/schedules/daily-status-report/config.json +6 -1
  360. package/templates/schedules/daily-swarm-update-check/config.json +19 -0
  361. package/templates/schedules/daily-swarm-update-check/content.md +49 -0
  362. package/templates/schedules/daily-workflow-health-audit/config.json +6 -1
  363. package/templates/schedules/gtm-weekly-review/config.json +1 -1
  364. package/templates/schedules/weekly-code-health-reports/config.json +1 -1
  365. package/templates/schedules/weekly-dependabot-triage/config.json +1 -1
  366. package/templates/schedules/weekly-dora-metrics/config.json +1 -1
  367. package/templates/schedules/weekly-harness-upgrade-check/config.json +1 -1
  368. package/templates/skills/delegate-work/files/scripts/codex-exec.sh +1 -1
  369. package/templates/skills/serply-search/SKILL.md +95 -0
  370. package/templates/skills/serply-search/config.json +13 -0
  371. package/templates/skills/serply-search/content.md +90 -0
  372. package/templates/skills/swarm-scripts/SKILL.md +2 -2
  373. package/templates/skills/swarm-scripts/content.md +2 -2
  374. package/templates/workflows/claude-code-changelog-watch/config.json +1 -1
  375. package/templates/workflows/gsc-topic-miner/config.json +1 -1
  376. package/templates/workflows/linear-drain-loop/config.json +1 -1
  377. package/templates/workflows/llm-safe-release-context/config.json +1 -1
  378. package/templates/workflows/ralph-loop/config.json +1 -1
  379. package/dist/{azure-openai-responses-cqar64rc.js → azure-openai-responses-g85jv7m8.js} +8 -8
  380. package/dist/{cli-4xz3pmrq.js → cli-8qx7jnrk.js} +5 -5
  381. package/dist/{cli-6664w7y4.js → cli-wk0gjrn3.js} +3 -3
  382. package/dist/{google-vertex-ppw8ydpa.js → google-vertex-pkhpkbq9.js} +3 -3
  383. package/dist/{openai-codex-responses-g7w48y30.js → openai-codex-responses-pm5gnyfa.js} +4 -4
  384. package/dist/{openai-completions-0bqmsajw.js → openai-completions-qdcmkfnr.js} +12 -12
  385. package/dist/{openai-responses-nmeyptke.js → openai-responses-vwvk1taj.js} +13 -13
@@ -0,0 +1,49 @@
1
+ # Daily Agent-Swarm Update Check
2
+
3
+ Zero-config auto-update watchdog: compares the swarm's own running version against the latest published GitHub release of `desplega-ai/agent-swarm`, and flags the operator when an upgrade is available. No placeholders and no integration required — every install gets this by default.
4
+
5
+ ## Schedule
6
+
7
+ ```json
8
+ {"cron":"0 9 * * *","timezone":"UTC","agentRole":"lead","enabled":true}
9
+ ```
10
+
11
+ ## Scheduled Task
12
+
13
+ This schedule runs by default. It needs no repository clone and no integration — it only reads its own task metadata and calls the public GitHub API.
14
+
15
+ Task Type: Daily Agent-Swarm Update Check
16
+
17
+ You are Lead. Determine whether a newer `desplega-ai/agent-swarm` release is published than the version currently running on this install, and tell the operator if so.
18
+
19
+ ## Phase 1 — Determine the running version
20
+
21
+ Call `get-task-details` for THIS task's own id and read `task.swarmVersion` — the API server stamps every task with the `package.json` version it was running at task-creation time, so this is the version currently deployed on this install.
22
+
23
+ If `swarmVersion` is missing or empty (an older install, or the field predates this schedule), complete with `output`: `"Unable to determine running version — swarmVersion not set on this task."` and stop. Do not guess a version.
24
+
25
+ ## Phase 2 — Fetch the latest published release
26
+
27
+ ```bash
28
+ curl -fsSL https://api.github.com/repos/desplega-ai/agent-swarm/releases/latest
29
+ ```
30
+
31
+ Read `.tag_name` (strip a leading `v` if present) and `.html_url`. If the request fails (network, rate limit, non-200), complete with `output`: `"Could not reach GitHub releases API: <error>"` and stop — do not retry in a loop.
32
+
33
+ ## Phase 3 — Compare and act
34
+
35
+ Compare the two versions as dotted numeric triples (major.minor.patch) — never as plain strings (`"1.9.0" < "1.10.0"` is false as strings).
36
+
37
+ - **Latest <= running:** complete with `output`: `"Up to date: running <running>, latest published <latest>."` No further action.
38
+ - **Latest > running:** raise it for the operator:
39
+ 1. Post a short message to your configured admin delivery channel (or the in-app fallback if none is configured) naming the running version, the new version, and the release URL.
40
+ 2. Complete `store-progress` with `status: "completed"` and `output`: `"Update available: running <running>, latest <latest> — <releaseUrl>"`.
41
+
42
+ Do not attempt the upgrade yourself — this schedule only detects and reports. `weekly-harness-upgrade-check` is the separate routine that bumps pinned harness versions inside the repo; this schedule is about the agent-swarm release itself.
43
+
44
+ ## Anti-patterns
45
+
46
+ - ❌ Cloning the repo or reading `package.json` from disk — this schedule must work on any install, including ones where the API pod has no repo checkout.
47
+ - ❌ String-comparing versions.
48
+ - ❌ Treating a missing `swarmVersion` as "no update available" — it's "unknown", say so explicitly.
49
+ - ❌ Retrying a failed GitHub API call in a loop.
@@ -10,5 +10,10 @@
10
10
  "placeholders": [],
11
11
  "requires": [],
12
12
  "runAllSeedersCandidate": true,
13
- "tags": ["workflows", "schedules", "reliability"]
13
+ "autoEnableCandidate": true,
14
+ "tags": [
15
+ "workflows",
16
+ "schedules",
17
+ "reliability"
18
+ ]
14
19
  }
@@ -9,6 +9,6 @@
9
9
  "category": "schedules",
10
10
  "placeholders": ["REPO_URL", "GSC_PROPERTY"],
11
11
  "requires": ["github", "gsc"],
12
- "runAllSeedersCandidate": false,
12
+ "runAllSeedersCandidate": true,
13
13
  "tags": ["gtm", "metrics", "reporting"]
14
14
  }
@@ -9,6 +9,6 @@
9
9
  "category": "schedules",
10
10
  "placeholders": ["REPO_URL", "BRANCH", "SCOPE_PATH", "REPORT_NAME", "PAGE_ID"],
11
11
  "requires": ["github"],
12
- "runAllSeedersCandidate": false,
12
+ "runAllSeedersCandidate": true,
13
13
  "tags": ["code-quality", "maintenance", "reporting", "community-template"]
14
14
  }
@@ -9,6 +9,6 @@
9
9
  "category": "schedules",
10
10
  "placeholders": ["REPO_URL", "SLACK_CHANNEL_ID", "TIMEZONE"],
11
11
  "requires": ["github", "slack"],
12
- "runAllSeedersCandidate": false,
12
+ "runAllSeedersCandidate": true,
13
13
  "tags": ["github", "dependencies", "maintenance"]
14
14
  }
@@ -9,6 +9,6 @@
9
9
  "category": "schedules",
10
10
  "placeholders": ["REPO_URL", "BRANCH", "TAG_PATTERN", "REPORT_NAME", "PAGE_ID"],
11
11
  "requires": ["github"],
12
- "runAllSeedersCandidate": false,
12
+ "runAllSeedersCandidate": true,
13
13
  "tags": ["dora", "metrics", "engineering-productivity", "reporting", "community-template"]
14
14
  }
@@ -9,6 +9,6 @@
9
9
  "category": "schedules",
10
10
  "placeholders": ["REPO_URL", "PR_REVIEWER"],
11
11
  "requires": ["github"],
12
- "runAllSeedersCandidate": false,
12
+ "runAllSeedersCandidate": true,
13
13
  "tags": ["harness", "upgrade", "maintenance"]
14
14
  }
@@ -26,7 +26,7 @@
26
26
  # Env overrides (flags -m/-e take precedence):
27
27
  # CODEX_MODEL default: gpt-5.6-sol gpt-5.6-sol | gpt-5.6-terra | gpt-5.6-luna
28
28
  # CODEX_EFFORT default: high reasoning effort (never "fast"/low)
29
- # CODEX_SANDBOX default: workspace-write read-only | workspace-write | danger-full-access
29
+ # CODEX_SANDBOX default: workspace-write (passed to codex's -s option)
30
30
  # CODEX_BYPASS set to 1 to use --dangerously-bypass-approvals-and-sandbox
31
31
  # (fully unsandboxed — opt in only when a phase must write
32
32
  # outside its worktree; overrides CODEX_SANDBOX)
@@ -0,0 +1,95 @@
1
+ ---
2
+ name: serply-search
3
+ description: Query real Google results through Serply, with separate endpoints for news (dated coverage) and scholar (citation counts). Use when the ranking itself, the publication date, or the citation count is the answer.
4
+ ---
5
+
6
+ # Serply Search
7
+
8
+ Serply (https://serply.io) is a Google SERP API. It returns the ranked organic results for a keyword query, and exposes Google News and Google Scholar as separate endpoints. API reference: https://serply.io/docs
9
+
10
+ ## When to use Serply vs. Exa vs. WebSearch
11
+
12
+ | Query shape | Use |
13
+ |---|---|
14
+ | "Companies building agent coordination layers" | Exa (conceptual, embedding match) |
15
+ | "Blogs that argue knowledge is not data" | Exa (argument-shape) |
16
+ | "What ranks on page 1 for `bun sqlite orm`" | **Serply** search (the ranking is the answer) |
17
+ | "Funding rounds for company X since June" | **Serply** news (named entity plus date) |
18
+ | "How heavily cited is paper Y" | **Serply** scholar (citation counts) |
19
+ | "What is the official Bun docs URL?" | WebSearch (one concrete lookup) |
20
+
21
+ Exa ranks by embedding similarity, so it wins at "find me things shaped like this". Serply returns what Google actually ranks, which is what you want when position, recency, or citation weight is the thing being measured. A plain WebSearch is still the cheapest way to settle a single fact.
22
+
23
+ ## Step 1. Get the API key
24
+
25
+ ```bash
26
+ # Via MCP tool (preferred, handles secret resolution)
27
+ mcp__agent-swarm__get-config(key="SERPLY_API_KEY", includeSecrets=true)
28
+ ```
29
+
30
+ The value comes back at `configs[0].value`. Export to env or pass inline. Keys come from https://serply.io
31
+
32
+ ## Step 2. Web search
33
+
34
+ ```bash
35
+ curl -sS 'https://api.serply.io/v1/search/?q=bun+sqlite+orm&num=10' \
36
+ -H "X-Api-Key: $SERPLY_API_KEY" \
37
+ -H 'User-Agent: agent-swarm/1.0'
38
+ ```
39
+
40
+ Parameters go in the query string:
41
+
42
+ - `q` (required): URL-encoded keywords, not a natural-language description. Google operators pass straight through, so `q=sqlite+site%3Abun.sh` and `tbs=` date filters behave as they do in the browser.
43
+ - `num`: how many results to return. Honored up to 10 and clamped there, so page instead of asking for 20.
44
+
45
+ Response (trimmed):
46
+
47
+ ```json
48
+ {
49
+ "results": [
50
+ {
51
+ "title": "Use Drizzle ORM with Bun | Bun Guides",
52
+ "description": "Drizzle is an ORM that supports both a SQL-like \"query builder\" API and an ORM-like Queries API.",
53
+ "position": 1,
54
+ "realPosition": 1,
55
+ "result_type": "organic",
56
+ "link": "https://bun.com/guides/ecosystem/drizzle"
57
+ }
58
+ ]
59
+ }
60
+ ```
61
+
62
+ The snippet field is `description`, not `snippet`, and the URL field is `link`, not `url`. Each row also carries `metadata.display_url`. The payload has `answers`, `knowledge_graph` and `related_questions` beside `results`, populated only when Google returned them and empty otherwise.
63
+
64
+ ## Step 3. News and scholar
65
+
66
+ Same host and header, different path, different response key.
67
+
68
+ ```bash
69
+ curl -sS 'https://api.serply.io/v1/news/?q=openai+funding' \
70
+ -H "X-Api-Key: $SERPLY_API_KEY" -H 'User-Agent: agent-swarm/1.0'
71
+ ```
72
+
73
+ News rows land in `entries[]`, each with `title`, `link`, `published` (RFC 1123), `summary`, and `source.title`. It returns the whole feed and ignores `num`.
74
+
75
+ ```bash
76
+ curl -sS 'https://api.serply.io/v1/scholar/?q=attention+is+all+you+need&num=3' \
77
+ -H "X-Api-Key: $SERPLY_API_KEY" -H 'User-Agent: agent-swarm/1.0'
78
+ ```
79
+
80
+ Scholar rows land in `articles[]`, each with `title`, `link`, `description`, `author.names`, and `extras.citations.count` as a string like `"Cited by 269516"`. When Google found a PDF, `doc.link` points at it.
81
+
82
+ ## Step 4. Pair with WebFetch
83
+
84
+ A SERP row gives you a title, a snippet, and a rank. For anything you will cite, fetch the page. Serply is the index, WebFetch is the source.
85
+
86
+ ## Discipline: no fabrication
87
+
88
+ If a query surfaces nothing relevant, write "not surfaced" rather than inventing a plausible link. A search that came back thin is a real finding and worth reporting as one.
89
+
90
+ ## Quick gotchas
91
+
92
+ - The header is `X-Api-Key` holding the bare key, **not** `Authorization: Bearer`.
93
+ - Serply sits behind Cloudflare, which rejects a default library User-Agent. Python `urllib` gets `HTTP 403` with the body `error code: 1010`. Send an explicit `User-Agent`; curl's own default is accepted.
94
+ - `/v1/scholar/` returns both `articles` and an empty `results: []`. Read `articles`. Reading `results` gives you zero papers for every query, and nothing about the response says why.
95
+ - Rankings are location-dependent, so two runs from different regions can legitimately disagree. Record the query alongside the positions whenever the position is the point.
@@ -0,0 +1,13 @@
1
+ {
2
+ "kind": "skill",
3
+ "name": "serply-search",
4
+ "displayName": "Serply Search",
5
+ "slug": "serply-search",
6
+ "title": "Serply Search",
7
+ "description": "Query real Google results through Serply, with separate endpoints for news (dated coverage) and scholar (citation counts). Use when the ranking itself, the publication date, or the citation count is the answer.",
8
+ "version": "1.0.0",
9
+ "category": "skills",
10
+ "placeholders": ["SERPLY_API_KEY"],
11
+ "runAllSeedersCandidate": false,
12
+ "tags": ["research", "search", "web"]
13
+ }
@@ -0,0 +1,90 @@
1
+ # Serply Search
2
+
3
+ Serply (https://serply.io) is a Google SERP API. It returns the ranked organic results for a keyword query, and exposes Google News and Google Scholar as separate endpoints. API reference: https://serply.io/docs
4
+
5
+ ## When to use Serply vs. Exa vs. WebSearch
6
+
7
+ | Query shape | Use |
8
+ |---|---|
9
+ | "Companies building agent coordination layers" | Exa (conceptual, embedding match) |
10
+ | "Blogs that argue knowledge is not data" | Exa (argument-shape) |
11
+ | "What ranks on page 1 for `bun sqlite orm`" | **Serply** search (the ranking is the answer) |
12
+ | "Funding rounds for company X since June" | **Serply** news (named entity plus date) |
13
+ | "How heavily cited is paper Y" | **Serply** scholar (citation counts) |
14
+ | "What is the official Bun docs URL?" | WebSearch (one concrete lookup) |
15
+
16
+ Exa ranks by embedding similarity, so it wins at "find me things shaped like this". Serply returns what Google actually ranks, which is what you want when position, recency, or citation weight is the thing being measured. A plain WebSearch is still the cheapest way to settle a single fact.
17
+
18
+ ## Step 1. Get the API key
19
+
20
+ ```bash
21
+ # Via MCP tool (preferred, handles secret resolution)
22
+ mcp__agent-swarm__get-config(key="SERPLY_API_KEY", includeSecrets=true)
23
+ ```
24
+
25
+ The value comes back at `configs[0].value`. Export to env or pass inline. Keys come from https://serply.io
26
+
27
+ ## Step 2. Web search
28
+
29
+ ```bash
30
+ curl -sS 'https://api.serply.io/v1/search/?q=bun+sqlite+orm&num=10' \
31
+ -H "X-Api-Key: $SERPLY_API_KEY" \
32
+ -H 'User-Agent: agent-swarm/1.0'
33
+ ```
34
+
35
+ Parameters go in the query string:
36
+
37
+ - `q` (required): URL-encoded keywords, not a natural-language description. Google operators pass straight through, so `q=sqlite+site%3Abun.sh` and `tbs=` date filters behave as they do in the browser.
38
+ - `num`: how many results to return. Honored up to 10 and clamped there, so page instead of asking for 20.
39
+
40
+ Response (trimmed):
41
+
42
+ ```json
43
+ {
44
+ "results": [
45
+ {
46
+ "title": "Use Drizzle ORM with Bun | Bun Guides",
47
+ "description": "Drizzle is an ORM that supports both a SQL-like \"query builder\" API and an ORM-like Queries API.",
48
+ "position": 1,
49
+ "realPosition": 1,
50
+ "result_type": "organic",
51
+ "link": "https://bun.com/guides/ecosystem/drizzle"
52
+ }
53
+ ]
54
+ }
55
+ ```
56
+
57
+ The snippet field is `description`, not `snippet`, and the URL field is `link`, not `url`. Each row also carries `metadata.display_url`. The payload has `answers`, `knowledge_graph` and `related_questions` beside `results`, populated only when Google returned them and empty otherwise.
58
+
59
+ ## Step 3. News and scholar
60
+
61
+ Same host and header, different path, different response key.
62
+
63
+ ```bash
64
+ curl -sS 'https://api.serply.io/v1/news/?q=openai+funding' \
65
+ -H "X-Api-Key: $SERPLY_API_KEY" -H 'User-Agent: agent-swarm/1.0'
66
+ ```
67
+
68
+ News rows land in `entries[]`, each with `title`, `link`, `published` (RFC 1123), `summary`, and `source.title`. It returns the whole feed and ignores `num`.
69
+
70
+ ```bash
71
+ curl -sS 'https://api.serply.io/v1/scholar/?q=attention+is+all+you+need&num=3' \
72
+ -H "X-Api-Key: $SERPLY_API_KEY" -H 'User-Agent: agent-swarm/1.0'
73
+ ```
74
+
75
+ Scholar rows land in `articles[]`, each with `title`, `link`, `description`, `author.names`, and `extras.citations.count` as a string like `"Cited by 269516"`. When Google found a PDF, `doc.link` points at it.
76
+
77
+ ## Step 4. Pair with WebFetch
78
+
79
+ A SERP row gives you a title, a snippet, and a rank. For anything you will cite, fetch the page. Serply is the index, WebFetch is the source.
80
+
81
+ ## Discipline: no fabrication
82
+
83
+ If a query surfaces nothing relevant, write "not surfaced" rather than inventing a plausible link. A search that came back thin is a real finding and worth reporting as one.
84
+
85
+ ## Quick gotchas
86
+
87
+ - The header is `X-Api-Key` holding the bare key, **not** `Authorization: Bearer`.
88
+ - Serply sits behind Cloudflare, which rejects a default library User-Agent. Python `urllib` gets `HTTP 403` with the body `error code: 1010`. Send an explicit `User-Agent`; curl's own default is accepted.
89
+ - `/v1/scholar/` returns both `articles` and an empty `results: []`. Read `articles`. Reading `results` gives you zero papers for every query, and nothing about the response says why.
90
+ - Rankings are location-dependent, so two runs from different regions can legitimately disagree. Record the query alongside the positions whenever the position is the point.
@@ -37,7 +37,7 @@ The swarm ships named scripts at global scope. Each one replaces a multi-step to
37
37
  | `task-context-gathering` | `{ taskId, queries: [...] }` | the task plus a deduplicated multi-query memory recall |
38
38
  | `smart-recall` | `{ queries: [...] }` | multi-query memory recall without the task |
39
39
  | `memory-dedup-check` | `{ text, threshold? }` | near-duplicates before you store a memory |
40
- | `delegate` | `{ agentName, task, routingReason, parentTaskId? }` | a subtask for an agent by name, returns `{ taskId }` |
40
+ | `delegate` | `{ agentName, task, routingReason, routingNote, parentTaskId? }` | a subtask for an agent by name, returns `{ taskId }` |
41
41
  | `wait-for-task` | `{ taskId }` | waits up to about 25 s for a terminal state, returns `{ done, status, output }`; call again while `done` is false |
42
42
  | `get-child-outputs` | `{ parentTaskId }` | every child with status and output |
43
43
  | `complete-task` | `{ taskId, output }` | finish a task from inside a script |
@@ -74,7 +74,7 @@ export default async function (args: z.infer<typeof argsSchema>, ctx: ScriptCont
74
74
  ### What `ctx` holds
75
75
 
76
76
  - `ctx.swarm.*`: the swarm SDK. `task_get`, `task_send`, `task_storeProgress`, `task_action`, `task_list`, `slack_reply`, `memory_search`, `memory_store`, `kv_get`, `kv_getOrNull`, `kv_set`, `kv_delete`, `kv_incr`, `kv_list`, `swarm_get`, `agent_info`, `db_query`, and more. `kv_getOrNull` returns the entry, `null` on a missing key, and throws on other errors.
77
- - `ctx.swarm.task_send` requires `routingReason` whenever `agentId` is present. Use `human_pinned` for an explicit/configured choice, `skill` for a role or specialization match, `continuity` for the same worker/session, `reroute_fault` for a fault handoff, or `overflow` for capacity/pool escalation. Omit both `agentId` and routing fields for the pool.
77
+ - `ctx.swarm.task_send` requires `routingReason` and `routingNote` whenever `agentId` is present. The note must explain the worker choice in at least 10 characters after trimming whitespace (maximum 200 characters). Use `human_pinned` for an explicit/configured choice, `skill` for a role or specialization match, `continuity` for the same worker/session, `reroute_fault` for a fault handoff, or `overflow` for capacity/pool escalation. Omit both `agentId` and routing fields for the pool.
78
78
  - `ctx.swarm.config`: `apiKey`, `agentId`, `mcpBaseUrl`, and `ctx.swarm.config.get("KEY")` for user config values. All are `Redacted` wrappers that stringify to `<redacted>`. Never unwrap one into a return value, a log line, or a request body you build by hand.
79
79
  - `ctx.api.<slug>` and `ctx.mcp.<slug>`: typed clients for registered connections. They exist only for registered connections. Introspect with `Object.keys(ctx.api ?? {})` and `Object.keys(ctx.mcp ?? {})`.
80
80
  - `ctx.stdlib`: `fetch`, `fetchJson` (retries, 30 s timeout), `grep`, `glob`, `table`, `Redacted`.
@@ -32,7 +32,7 @@ The swarm ships named scripts at global scope. Each one replaces a multi-step to
32
32
  | `task-context-gathering` | `{ taskId, queries: [...] }` | the task plus a deduplicated multi-query memory recall |
33
33
  | `smart-recall` | `{ queries: [...] }` | multi-query memory recall without the task |
34
34
  | `memory-dedup-check` | `{ text, threshold? }` | near-duplicates before you store a memory |
35
- | `delegate` | `{ agentName, task, routingReason, parentTaskId? }` | a subtask for an agent by name, returns `{ taskId }` |
35
+ | `delegate` | `{ agentName, task, routingReason, routingNote, parentTaskId? }` | a subtask for an agent by name, returns `{ taskId }` |
36
36
  | `wait-for-task` | `{ taskId }` | waits up to about 25 s for a terminal state, returns `{ done, status, output }`; call again while `done` is false |
37
37
  | `get-child-outputs` | `{ parentTaskId }` | every child with status and output |
38
38
  | `complete-task` | `{ taskId, output }` | finish a task from inside a script |
@@ -69,7 +69,7 @@ export default async function (args: z.infer<typeof argsSchema>, ctx: ScriptCont
69
69
  ### What `ctx` holds
70
70
 
71
71
  - `ctx.swarm.*`: the swarm SDK. `task_get`, `task_send`, `task_storeProgress`, `task_action`, `task_list`, `slack_reply`, `memory_search`, `memory_store`, `kv_get`, `kv_getOrNull`, `kv_set`, `kv_delete`, `kv_incr`, `kv_list`, `swarm_get`, `agent_info`, `db_query`, and more. `kv_getOrNull` returns the entry, `null` on a missing key, and throws on other errors.
72
- - `ctx.swarm.task_send` requires `routingReason` whenever `agentId` is present. Use `human_pinned` for an explicit/configured choice, `skill` for a role or specialization match, `continuity` for the same worker/session, `reroute_fault` for a fault handoff, or `overflow` for capacity/pool escalation. Omit both `agentId` and routing fields for the pool.
72
+ - `ctx.swarm.task_send` requires `routingReason` and `routingNote` whenever `agentId` is present. The note must explain the worker choice in at least 10 characters after trimming whitespace (maximum 200 characters). Use `human_pinned` for an explicit/configured choice, `skill` for a role or specialization match, `continuity` for the same worker/session, `reroute_fault` for a fault handoff, or `overflow` for capacity/pool escalation. Omit both `agentId` and routing fields for the pool.
73
73
  - `ctx.swarm.config`: `apiKey`, `agentId`, `mcpBaseUrl`, and `ctx.swarm.config.get("KEY")` for user config values. All are `Redacted` wrappers that stringify to `<redacted>`. Never unwrap one into a return value, a log line, or a request body you build by hand.
74
74
  - `ctx.api.<slug>` and `ctx.mcp.<slug>`: typed clients for registered connections. They exist only for registered connections. Introspect with `Object.keys(ctx.api ?? {})` and `Object.keys(ctx.mcp ?? {})`.
75
75
  - `ctx.stdlib`: `fetch`, `fetchJson` (retries, 30 s timeout), `grep`, `glob`, `table`, `Redacted`.
@@ -9,6 +9,6 @@
9
9
  "category": "workflows",
10
10
  "placeholders": [],
11
11
  "requires": [],
12
- "runAllSeedersCandidate": false,
12
+ "runAllSeedersCandidate": true,
13
13
  "tags": ["release-notes", "harness"]
14
14
  }
@@ -9,6 +9,6 @@
9
9
  "category": "workflows",
10
10
  "placeholders": ["GSC_PROPERTY"],
11
11
  "requires": ["gsc", "agentfs"],
12
- "runAllSeedersCandidate": false,
12
+ "runAllSeedersCandidate": true,
13
13
  "tags": ["gsc", "research", "content"]
14
14
  }
@@ -9,7 +9,7 @@
9
9
  "category": "workflows",
10
10
  "placeholders": ["LINEAR_PROJECT_ID"],
11
11
  "requires": ["linear"],
12
- "runAllSeedersCandidate": false,
12
+ "runAllSeedersCandidate": true,
13
13
  "tags": [
14
14
  "workflow",
15
15
  "linear",
@@ -9,6 +9,6 @@
9
9
  "category": "workflows",
10
10
  "placeholders": ["ORG_ID", "REPO_URL"],
11
11
  "requires": ["github"],
12
- "runAllSeedersCandidate": false,
12
+ "runAllSeedersCandidate": true,
13
13
  "tags": ["workflow", "release-notes", "context"]
14
14
  }
@@ -9,6 +9,6 @@
9
9
  "category": "workflows",
10
10
  "placeholders": ["REPO_URL"],
11
11
  "requires": ["github"],
12
- "runAllSeedersCandidate": false,
12
+ "runAllSeedersCandidate": true,
13
13
  "tags": ["workflow", "review", "iteration"]
14
14
  }
@@ -1,7 +1,3 @@
1
- import {
2
- AzureOpenAI,
3
- init_openai
4
- } from "./cli-aehm1rbq.js";
5
1
  import {
6
2
  convertResponsesMessages,
7
3
  convertResponsesTools,
@@ -10,20 +6,24 @@ import {
10
6
  import {
11
7
  clampOpenAIPromptCacheKey
12
8
  } from "./cli-mrptpp86.js";
13
- import"./cli-5m9j2spm.js";
9
+ import {
10
+ AzureOpenAI,
11
+ init_openai
12
+ } from "./cli-aehm1rbq.js";
14
13
  import {
15
14
  retryProviderRequest
16
15
  } from "./cli-s8s499xy.js";
16
+ import"./cli-5m9j2spm.js";
17
17
  import {
18
18
  getPiUserAgent
19
19
  } from "./cli-et1bbwqf.js";
20
+ import {
21
+ getProviderEnvValue
22
+ } from "./cli-btbzvq95.js";
20
23
  import {
21
24
  formatProviderError,
22
25
  normalizeProviderError
23
26
  } from "./cli-6map995v.js";
24
- import {
25
- getProviderEnvValue
26
- } from "./cli-btbzvq95.js";
27
27
  import"./cli-1m2e086m.js";
28
28
  import {
29
29
  buildBaseOptions,
@@ -2,19 +2,19 @@ import {
2
2
  require_dist_cjs as require_dist_cjs3,
3
3
  require_dist_cjs1 as require_dist_cjs4
4
4
  } from "./cli-cg4vnyh4.js";
5
+ import {
6
+ resolveHttpProxyUrlForTarget
7
+ } from "./cli-txgcknmy.js";
5
8
  import {
6
9
  require_dist,
7
10
  require_dist1 as require_dist2
8
11
  } from "./cli-pdz9qde4.js";
9
12
  import {
10
- resolveHttpProxyUrlForTarget
11
- } from "./cli-txgcknmy.js";
13
+ getProviderEnvValue
14
+ } from "./cli-btbzvq95.js";
12
15
  import {
13
16
  normalizeProviderError
14
17
  } from "./cli-6map995v.js";
15
- import {
16
- getProviderEnvValue
17
- } from "./cli-btbzvq95.js";
18
18
  import {
19
19
  parseStreamingJson
20
20
  } from "./cli-1m2e086m.js";
@@ -7,15 +7,15 @@ import {
7
7
  import {
8
8
  Anthropic
9
9
  } from "./cli-j490egb5.js";
10
- import {
11
- checkToolLoop
12
- } from "./cli-hp1n6zq3.js";
13
10
  import {
14
11
  CONTEXT_FORMULA,
15
12
  clampContextPercent,
16
13
  computeContextUsedUnified,
17
14
  getContextWindowSize
18
15
  } from "./cli-s25avqg9.js";
16
+ import {
17
+ checkToolLoop
18
+ } from "./cli-hp1n6zq3.js";
19
19
  import {
20
20
  init_secret_scrubber,
21
21
  scrubSecrets
@@ -19,13 +19,13 @@ import {
19
19
  import"./cli-yatxqynm.js";
20
20
  import"./cli-76yrvwsa.js";
21
21
  import"./cli-pzxba7gw.js";
22
+ import {
23
+ getProviderEnvValue
24
+ } from "./cli-btbzvq95.js";
22
25
  import {
23
26
  formatProviderError,
24
27
  normalizeProviderError
25
28
  } from "./cli-6map995v.js";
26
- import {
27
- getProviderEnvValue
28
- } from "./cli-btbzvq95.js";
29
29
  import {
30
30
  buildBaseOptions
31
31
  } from "./cli-j8dggbcr.js";
@@ -2,6 +2,9 @@ import {
2
2
  registerSessionResourceCleanup,
3
3
  uuidv7
4
4
  } from "./cli-bsakbbkm.js";
5
+ import {
6
+ splitDeferredTools
7
+ } from "./cli-vfcth11k.js";
5
8
  import {
6
9
  convertResponsesMessages,
7
10
  convertResponsesTools,
@@ -11,20 +14,17 @@ import {
11
14
  clampOpenAIPromptCacheKey
12
15
  } from "./cli-mrptpp86.js";
13
16
  import"./cli-5m9j2spm.js";
14
- import {
15
- splitDeferredTools
16
- } from "./cli-vfcth11k.js";
17
17
  import {
18
18
  getPiUserAgent
19
19
  } from "./cli-et1bbwqf.js";
20
20
  import {
21
21
  resolveHttpProxyUrlForTarget
22
22
  } from "./cli-txgcknmy.js";
23
+ import"./cli-btbzvq95.js";
23
24
  import {
24
25
  formatProviderError,
25
26
  normalizeProviderError
26
27
  } from "./cli-6map995v.js";
27
- import"./cli-btbzvq95.js";
28
28
  import"./cli-1m2e086m.js";
29
29
  import {
30
30
  buildBaseOptions,
@@ -1,30 +1,30 @@
1
1
  import {
2
- OpenAI,
3
- init_openai
4
- } from "./cli-aehm1rbq.js";
2
+ buildCopilotDynamicHeaders,
3
+ hasCopilotVisionInput
4
+ } from "./cli-67bad0ze.js";
5
5
  import {
6
6
  clampOpenAIPromptCacheKey
7
7
  } from "./cli-mrptpp86.js";
8
8
  import {
9
- shortHash
10
- } from "./cli-5m9j2spm.js";
11
- import {
12
- buildCopilotDynamicHeaders,
13
- hasCopilotVisionInput
14
- } from "./cli-67bad0ze.js";
9
+ OpenAI,
10
+ init_openai
11
+ } from "./cli-aehm1rbq.js";
15
12
  import {
16
13
  retryProviderRequest
17
14
  } from "./cli-s8s499xy.js";
15
+ import {
16
+ shortHash
17
+ } from "./cli-5m9j2spm.js";
18
18
  import {
19
19
  getPiUserAgent
20
20
  } from "./cli-et1bbwqf.js";
21
+ import {
22
+ getProviderEnvValue
23
+ } from "./cli-btbzvq95.js";
21
24
  import {
22
25
  formatProviderError,
23
26
  normalizeProviderError
24
27
  } from "./cli-6map995v.js";
25
- import {
26
- getProviderEnvValue
27
- } from "./cli-btbzvq95.js";
28
28
  import {
29
29
  parseStreamingJson
30
30
  } from "./cli-1m2e086m.js";
@@ -1,7 +1,10 @@
1
1
  import {
2
- OpenAI,
3
- init_openai
4
- } from "./cli-aehm1rbq.js";
2
+ splitDeferredTools
3
+ } from "./cli-vfcth11k.js";
4
+ import {
5
+ buildCopilotDynamicHeaders,
6
+ hasCopilotVisionInput
7
+ } from "./cli-67bad0ze.js";
5
8
  import {
6
9
  convertResponsesMessages,
7
10
  convertResponsesTools,
@@ -10,27 +13,24 @@ import {
10
13
  import {
11
14
  clampOpenAIPromptCacheKey
12
15
  } from "./cli-mrptpp86.js";
13
- import"./cli-5m9j2spm.js";
14
16
  import {
15
- buildCopilotDynamicHeaders,
16
- hasCopilotVisionInput
17
- } from "./cli-67bad0ze.js";
17
+ OpenAI,
18
+ init_openai
19
+ } from "./cli-aehm1rbq.js";
18
20
  import {
19
21
  retryProviderRequest
20
22
  } from "./cli-s8s499xy.js";
21
- import {
22
- splitDeferredTools
23
- } from "./cli-vfcth11k.js";
23
+ import"./cli-5m9j2spm.js";
24
24
  import {
25
25
  getPiUserAgent
26
26
  } from "./cli-et1bbwqf.js";
27
+ import {
28
+ getProviderEnvValue
29
+ } from "./cli-btbzvq95.js";
27
30
  import {
28
31
  formatProviderError,
29
32
  normalizeProviderError
30
33
  } from "./cli-6map995v.js";
31
- import {
32
- getProviderEnvValue
33
- } from "./cli-btbzvq95.js";
34
34
  import"./cli-1m2e086m.js";
35
35
  import {
36
36
  buildBaseOptions,