@desplega.ai/agent-swarm 2.5.4 → 2.6.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 (271) hide show
  1. package/README.md +2 -2
  2. package/dist/{acp-adapter-ek38cwsv.js → acp-adapter-dgfakfpw.js} +9 -9
  3. package/dist/{actions-92mepq03.js → actions-fbqma8aa.js} +21 -21
  4. package/dist/{amp-adapter-9gaxg015.js → amp-adapter-en0jy6hs.js} +4 -4
  5. package/dist/{app-ctn8gsgx.js → app-k8a5cgpp.js} +3 -3
  6. package/dist/{assistant-zyr5kz47.js → assistant-a16433gr.js} +29 -25
  7. package/dist/{boot-reembed-dwzfttdr.js → boot-reembed-6c1sjfnr.js} +1 -1
  8. package/dist/{boot-reembed-w75maga2.js → boot-reembed-f4nn561n.js} +1 -1
  9. package/dist/{boot-scrub-sweep-e9kq43kf.js → boot-scrub-sweep-d4w9gajf.js} +4 -4
  10. package/dist/{boot-seeds-x28v3fhb.js → boot-seeds-9bmkspyw.js} +4 -4
  11. package/dist/{claude-adapter-f0afqnne.js → claude-adapter-nys1kjxa.js} +9 -9
  12. package/dist/{claude-managed-adapter-x81a7r65.js → claude-managed-adapter-55207973.js} +2 -2
  13. package/dist/{claude-managed-setup-bqzwjd9x.js → claude-managed-setup-3cm35gey.js} +10 -3
  14. package/dist/{claude-sdk-session-7b7whkaq.js → claude-sdk-session-nw5yd8cp.js} +11 -11
  15. package/dist/{cli-c61mbdds.js → cli-03gg9pd1.js} +4 -4
  16. package/dist/{cli-kxpfx2xr.js → cli-0z1xjzwa.js} +2 -2
  17. package/dist/cli-1tem6ns9.js +894 -0
  18. package/dist/{cli-jbnn4vxb.js → cli-24j1jeeb.js} +3 -3
  19. package/dist/{cli-pzatvw94.js → cli-2sjhpsns.js} +2 -2
  20. package/dist/{cli-dew6x255.js → cli-39aet655.js} +2 -2
  21. package/dist/{cli-g1cw7xtt.js → cli-39rrw8yp.js} +1 -1
  22. package/dist/{cli-x0f2v69c.js → cli-3aqd4jaa.js} +12 -7
  23. package/dist/{cli-gbfxp48k.js → cli-3fwqy71j.js} +15 -15
  24. package/dist/{cli-7p4jxgtt.js → cli-3gfvmzht.js} +6 -6
  25. package/dist/{cli-03vpq45j.js → cli-3ndmpxxv.js} +2 -2
  26. package/dist/{cli-asq5ydm4.js → cli-4hxrf0p4.js} +131 -50
  27. package/dist/{cli-mz9afxxf.js → cli-4rf0f5vg.js} +15 -3
  28. package/dist/{cli-k4tjsdx9.js → cli-5rj83bam.js} +272 -195
  29. package/dist/{cli-sbwsxvtd.js → cli-5sckpqcx.js} +2 -2
  30. package/dist/{cli-cz5nmdxt.js → cli-683y0b3a.js} +2 -2
  31. package/dist/{cli-ethgy7ha.js → cli-6y51ryva.js} +2 -2
  32. package/dist/{cli-n4c8e3s5.js → cli-708wdy32.js} +1 -1
  33. package/dist/{cli-pasyvjmm.js → cli-737pyqxr.js} +1 -1
  34. package/dist/{cli-gx4rm0qx.js → cli-7enjwya9.js} +1 -1
  35. package/dist/{cli-6x9ma5w5.js → cli-803188pb.js} +1 -1
  36. package/dist/{cli-hh5we352.js → cli-9abdgn5t.js} +7 -7
  37. package/dist/{cli-ff1tm9n9.js → cli-a2rr0fmg.js} +1 -1
  38. package/dist/{cli-c952c7ac.js → cli-a34pr3w1.js} +2 -2
  39. package/dist/{cli-s682zgqz.js → cli-abkm71vr.js} +1 -1
  40. package/dist/{cli-mmhj8vd7.js → cli-ag2yrnt5.js} +11 -2
  41. package/dist/{cli-bvpgr9ny.js → cli-aj8djyqt.js} +5 -5
  42. package/dist/{cli-gwhjmh8g.js → cli-art7c1zh.js} +5 -5
  43. package/dist/{cli-5bnsc0e1.js → cli-az25fn5f.js} +4 -4
  44. package/dist/{cli-9s05422w.js → cli-bqztfyve.js} +1 -1
  45. package/dist/{cli-bn0rewsy.js → cli-c081bj3b.js} +2 -2
  46. package/dist/{cli-1r5ad7j5.js → cli-c2habvsf.js} +12 -12
  47. package/dist/{cli-64mh9mf3.js → cli-ca6banwz.js} +69 -17
  48. package/dist/{cli-25n3mv5d.js → cli-cz37jqss.js} +5 -5
  49. package/dist/{cli-6n8axjv1.js → cli-d2dpf95n.js} +2 -2
  50. package/dist/{cli-gn5af0x5.js → cli-emhjcj2y.js} +11 -11
  51. package/dist/{cli-6a1xg1p7.js → cli-esakngh8.js} +2 -2
  52. package/dist/{cli-ha9rmwgq.js → cli-fb8m699c.js} +2 -2
  53. package/dist/{cli-4b2z6n0m.js → cli-ffvsj2qw.js} +17 -8
  54. package/dist/{cli-abs8ndtr.js → cli-g20jjwt4.js} +26 -26
  55. package/dist/{cli-jb30dzvk.js → cli-g8ka5j4j.js} +446 -164
  56. package/dist/{cli-19202kew.js → cli-gf95q3bm.js} +5 -5
  57. package/dist/{cli-eftzyh9y.js → cli-gnsb1zxa.js} +2 -2
  58. package/dist/{cli-nwyw3zhg.js → cli-gxee0bqa.js} +1 -1
  59. package/dist/{cli-e42vss7b.js → cli-hfeb68z4.js} +5 -5
  60. package/dist/{cli-g9vd9ece.js → cli-k21gx5ht.js} +14 -16
  61. package/dist/{cli-tsma7p8v.js → cli-kf4jree9.js} +2 -2
  62. package/dist/{cli-dabehxhp.js → cli-kt907da6.js} +1 -1
  63. package/dist/{cli-wx2nj19m.js → cli-m5a9m0ak.js} +6 -6
  64. package/dist/{cli-621ce7kw.js → cli-m70bajzr.js} +3 -3
  65. package/dist/{cli-9j129brq.js → cli-mtnj4fwa.js} +6 -6
  66. package/dist/{cli-xzfq4at3.js → cli-mvjz5an3.js} +15 -11
  67. package/dist/{cli-277c31dw.js → cli-n7asmce6.js} +225 -3
  68. package/dist/{cli-xtrz6bzs.js → cli-nn6vx2mq.js} +1 -1
  69. package/dist/{cli-2655k16q.js → cli-nq677csy.js} +1 -1
  70. package/dist/{cli-0shx9j93.js → cli-pfk92eqz.js} +2 -2
  71. package/dist/{cli-wghjkr0e.js → cli-sqma6vw1.js} +10 -7
  72. package/dist/{cli-nzfnt2gs.js → cli-tf1n0r0b.js} +1 -1
  73. package/dist/{cli-qqzmjxkf.js → cli-v49fkghp.js} +11 -6
  74. package/dist/{cli-x77gen2p.js → cli-w2656ka1.js} +7 -7
  75. package/dist/{cli-5kqnemen.js → cli-yvy48785.js} +1 -1
  76. package/dist/{cli-m4ecdxvz.js → cli-zqne1qcj.js} +7 -7
  77. package/dist/cli.js +17 -17
  78. package/dist/{codex-adapter-wch12q99.js → codex-adapter-d95q4qsn.js} +7 -7
  79. package/dist/{codex-login-rn7c5gxt.js → codex-login-8cg0vhf2.js} +1 -1
  80. package/dist/{codex-session-runner-41pfcr95.js → codex-session-runner-gdwd8h0c.js} +8 -8
  81. package/dist/{commands-9849dkj6.js → commands-jqmgk54b.js} +2 -2
  82. package/dist/{controller-ja0sd95p.js → controller-z3jq589f.js} +4 -4
  83. package/dist/{controllers-connect-xp05dj6x.js → controllers-connect-r2za39ef.js} +23 -23
  84. package/dist/{cursor-adapter-623qxqew.js → cursor-adapter-4mr4jgkw.js} +2 -2
  85. package/dist/{db-47vj40dy.js → db-ppv2tze7.js} +3 -3
  86. package/dist/{db-w759qmx0.js → db-w36wwb5g.js} +4 -2
  87. package/dist/{devin-adapter-4ycy4vrf.js → devin-adapter-byen2cxt.js} +1 -1
  88. package/dist/{dispatcher-7b8e4z2j.js → dispatcher-pv5h77vf.js} +20 -20
  89. package/dist/{docker-s84hjs91.js → docker-fdzyewpz.js} +2 -2
  90. package/dist/{dsh-adapter-2ezw3xea.js → dsh-adapter-d4pdpb3r.js} +2 -2
  91. package/dist/{e2b-9gkdhm3c.js → e2b-222hsajc.js} +2 -2
  92. package/dist/{e2b-cjtf8k1z.js → e2b-fn3zacvt.js} +2 -2
  93. package/dist/{easter-egg-3d-e4qv8dxj.js → easter-egg-3d-4sp4dvmc.js} +1 -1
  94. package/dist/{event-bus-3z78ep5n.js → event-bus-pghg8hqy.js} +1 -1
  95. package/dist/{execute-0xpz8950.js → execute-jev839y1.js} +1 -1
  96. package/dist/{external-channel-e2s028da.js → external-channel-y6nkzhnn.js} +2 -2
  97. package/dist/{grok-adapter-ys7gaqee.js → grok-adapter-t08b9ntm.js} +10 -10
  98. package/dist/handlers-eqsnmv95.js +41 -0
  99. package/dist/{heartbeat-w3mntghj.js → heartbeat-vn31xwdk.js} +23 -23
  100. package/dist/{hook-g7kvv6x9.js → hook-6d0zbvvt.js} +6 -6
  101. package/dist/{hook-3jjywnpb.js → hook-cpjs8q51.js} +8 -8
  102. package/dist/{http-tkp7d4kb.js → http-9c6medda.js} +856 -99
  103. package/dist/{index-xdaahthb.js → index-38t35h0n.js} +20 -20
  104. package/dist/{index-3n8m9ea2.js → index-g6k9tctj.js} +1 -1
  105. package/dist/{index-1ef1myq2.js → index-k0yt1tvq.js} +20 -20
  106. package/dist/{index-31ceyf42.js → index-pkma1yf8.js} +1 -1
  107. package/dist/{index-q7m26kvs.js → index-qhjf2htm.js} +13 -10
  108. package/dist/index-yqgbfgaj.js +43 -0
  109. package/dist/{keepalive-v4ta8wgg.js → keepalive-em0117bp.js} +4 -4
  110. package/dist/lead-23e7z59t.js +79 -0
  111. package/dist/{maintenance-84n1ex21.js → maintenance-kbme3qy9.js} +1 -1
  112. package/dist/{oauth-refresh-sweep-vjnnandw.js → oauth-refresh-sweep-xysj4yse.js} +3 -3
  113. package/dist/{onboard-sfmpe4np.js → onboard-p6q0vz97.js} +3 -3
  114. package/dist/{opencode-adapter-jmpst4q4.js → opencode-adapter-esv3k9yn.js} +7 -7
  115. package/dist/{otel-impl-v6cc0zve.js → otel-impl-54qhqh1z.js} +2 -2
  116. package/dist/{pi-mono-adapter-fk8fkcf6.js → pi-mono-adapter-mymbwhj0.js} +10 -10
  117. package/dist/{pricing-refresh-fsk1e1zc.js → pricing-refresh-yb75wv33.js} +3 -3
  118. package/dist/{rbac-roles-prmkdnkw.js → rbac-roles-1vp2mw4p.js} +2 -2
  119. package/dist/{rbac-roles-zxmxqa39.js → rbac-roles-dexhc9x8.js} +1 -1
  120. package/dist/render-v2-tjay5hhf.js +16 -0
  121. package/dist/{resume-frdtgfa0.js → resume-8ayf37g5.js} +9 -9
  122. package/dist/{runtime-bt5pkpm1.js → runtime-hqe5cqcd.js} +1 -1
  123. package/dist/{session-access-fpez4y5q.js → session-access-fdhp987s.js} +4 -4
  124. package/dist/session-source-backfill-qgtc86z1.js +110 -0
  125. package/dist/{setup-mq6m3m8q.js → setup-4rrmqcq3.js} +1 -1
  126. package/dist/{virtual-modules-mnfbh5mr.js → virtual-modules-52km00d6.js} +2 -2
  127. package/dist/{work-objects-kfahhjsq.js → work-objects-p28fgd70.js} +23 -23
  128. package/dist/worker-e3w7vye1.js +79 -0
  129. package/dist/{x-pbpezr0s.js → x-wxrzvzx8.js} +2 -2
  130. package/openapi.json +1274 -32
  131. package/package.json +1 -1
  132. package/src/assets/source-key.ts +95 -0
  133. package/src/be/db/api-keys.ts +80 -0
  134. package/src/be/db/session-labels.ts +28 -0
  135. package/src/be/db/session-moves.ts +5 -6
  136. package/src/be/db/session-tree.ts +153 -14
  137. package/src/be/db/tasks/read.ts +11 -0
  138. package/src/be/db/tasks/write.ts +6 -1
  139. package/src/be/db/workflow-runs.ts +183 -1
  140. package/src/be/db-retention.ts +61 -6
  141. package/src/be/db.ts +59 -114
  142. package/src/be/memory/providers/openai-embedding.ts +5 -1
  143. package/src/be/migrations/244_api_key_validation.sql +4 -0
  144. package/src/be/onboarding.ts +4 -0
  145. package/src/be/scripts/typecheck.ts +1 -1
  146. package/src/be/session-source-backfill.ts +163 -0
  147. package/src/be/swarm-config-guard.ts +1 -0
  148. package/src/comb/review-batch.ts +28 -1
  149. package/src/comb/templates.ts +7 -2
  150. package/src/commands/claude-managed-setup.ts +7 -1
  151. package/src/commands/credential-refresh.ts +76 -1
  152. package/src/commands/credential-wait.ts +2 -2
  153. package/src/commands/provider-credentials.ts +210 -170
  154. package/src/commands/runner.ts +25 -4
  155. package/src/extensions/apply-task-create.ts +8 -1
  156. package/src/extensions/contract-types.generated.ts +1 -1
  157. package/src/extensions/contract.ts +5 -0
  158. package/src/http/all-routes.ts +2 -0
  159. package/src/http/api-keys.ts +53 -0
  160. package/src/http/assets.ts +15 -0
  161. package/src/http/codex-oauth-accounts.ts +191 -0
  162. package/src/http/comb.ts +15 -2
  163. package/src/http/config.ts +1 -1
  164. package/src/http/core.ts +6 -0
  165. package/src/http/fleet-benchmark.ts +5 -2
  166. package/src/http/index.ts +11 -0
  167. package/src/http/integrations.ts +5 -1
  168. package/src/http/kv.ts +8 -3
  169. package/src/http/onboarding.ts +6 -1
  170. package/src/http/pool-keys.ts +354 -0
  171. package/src/http/sessions.ts +37 -12
  172. package/src/http/stats.ts +1 -0
  173. package/src/http/status.ts +26 -12
  174. package/src/http/tasks.ts +3 -0
  175. package/src/http/used-by.ts +7 -2
  176. package/src/http/workflows.ts +78 -9
  177. package/src/integrations/chat-sdk/inbound.ts +27 -0
  178. package/src/kv-reserved-namespaces.ts +19 -0
  179. package/src/providers/acp-targets.ts +1 -1
  180. package/src/providers/amp-adapter.ts +1 -1
  181. package/src/providers/claude-adapter.ts +5 -1
  182. package/src/providers/claude-managed-adapter.ts +16 -9
  183. package/src/providers/codex-adapter.ts +71 -11
  184. package/src/scheduler/scheduler.ts +3 -2
  185. package/src/scripts-runtime/swarm-sdk.ts +7 -1
  186. package/src/scripts-runtime/types/stdlib.d.ts +1 -1
  187. package/src/scripts-runtime/types/swarm-extension.d.ts +17 -8
  188. package/src/scripts-runtime/types/swarm-sdk.d.ts +1 -1
  189. package/src/slack/assistant.ts +7 -0
  190. package/src/slack/channel-labels.ts +74 -0
  191. package/src/slack/handlers.ts +8 -0
  192. package/src/slack/inbound-files.ts +5 -2
  193. package/src/slack/thread-buffer.ts +4 -0
  194. package/src/tasks/sibling-awareness.ts +12 -3
  195. package/src/telemetry-context.ts +5 -6
  196. package/src/telemetry-identity.ts +3 -3
  197. package/src/tests/api-keys-validation.test.ts +170 -0
  198. package/src/tests/claude-managed-adapter.test.ts +46 -0
  199. package/src/tests/claude-routes-e2e.test.ts +7 -2
  200. package/src/tests/codex-credential-pools.test.ts +120 -0
  201. package/src/tests/codex-gateway-route.test.ts +165 -0
  202. package/src/tests/codex-oauth-accounts.test.ts +357 -0
  203. package/src/tests/comb-review-batch.test.ts +63 -2
  204. package/src/tests/config-pool-keys.test.ts +533 -0
  205. package/src/tests/credential-check.test.ts +290 -2
  206. package/src/tests/credential-refresh.test.ts +172 -1
  207. package/src/tests/db-retention.test.ts +9 -3
  208. package/src/tests/db-task-read-contract.test.ts +1 -0
  209. package/src/tests/db-task-write-contract.test.ts +1 -3
  210. package/src/tests/docs-index-footprint.test.js +3 -3
  211. package/src/tests/extensions-pre-task.test.ts +53 -1
  212. package/src/tests/fixtures/extensions/record-task-create/hooks.ts +9 -0
  213. package/src/tests/fixtures/extensions/record-task-create/manifest.json +7 -0
  214. package/src/tests/fleet-benchmark.test.ts +8 -0
  215. package/src/tests/get-workflow-run-tool.test.ts +98 -0
  216. package/src/tests/integrations-http.test.ts +32 -2
  217. package/src/tests/internal-ai/complete-structured.test.ts +37 -1
  218. package/src/tests/internal-ai/credentials.test.ts +23 -0
  219. package/src/tests/kv-http.test.ts +32 -0
  220. package/src/tests/kv-tool.test.ts +25 -0
  221. package/src/tests/multi-runtime-registration.test.ts +12 -12
  222. package/src/tests/onboarding.test.ts +108 -1
  223. package/src/tests/openai-embedding-credentials.test.ts +35 -0
  224. package/src/tests/openrouter-attribution-call-sites.test.ts +2 -2
  225. package/src/tests/org-website.test.ts +36 -0
  226. package/src/tests/provider-key-probes.test.ts +181 -0
  227. package/src/tests/rbac-e2e-helpers.test.ts +88 -1
  228. package/src/tests/rbac-e2e-helpers.ts +36 -11
  229. package/src/tests/script-connections.test.ts +2 -0
  230. package/src/tests/script-runs-retention.test.ts +212 -0
  231. package/src/tests/sdk-allowlist.test.ts +39 -0
  232. package/src/tests/session-source-backfill.test.ts +429 -0
  233. package/src/tests/session-source-keys.test.ts +236 -0
  234. package/src/tests/session-source-labels.test.ts +419 -0
  235. package/src/tests/sessions-detail-batch.test.ts +2 -0
  236. package/src/tests/sessions-move.test.ts +131 -0
  237. package/src/tests/sessions-tree.test.ts +299 -2
  238. package/src/tests/slack-inbound-files.test.ts +103 -23
  239. package/src/tests/status.test.ts +101 -18
  240. package/src/tests/tasks-workflow-run-filter.test.ts +146 -0
  241. package/src/tests/test-net.ts +31 -0
  242. package/src/tests/transcription.test.ts +8 -0
  243. package/src/tests/used-by-route.test.ts +11 -0
  244. package/src/tests/workflow-cascade-cancel.test.ts +172 -0
  245. package/src/tests/workflow-http-v2.test.ts +131 -0
  246. package/src/tests/workflow-step-order.test.ts +92 -0
  247. package/src/tests/workflow-sub-workflow.test.ts +30 -0
  248. package/src/tools/get-tasks.ts +8 -0
  249. package/src/tools/kv/kv-read-auth.ts +4 -2
  250. package/src/tools/task-action.ts +1 -1
  251. package/src/tools/workflows/get-workflow-run.ts +14 -4
  252. package/src/types.ts +24 -0
  253. package/src/utils/company-profile.ts +51 -1
  254. package/src/utils/credentials.ts +5 -2
  255. package/src/utils/internal-ai/complete-structured.ts +5 -0
  256. package/src/utils/internal-ai/credentials.ts +4 -3
  257. package/src/utils/provider-key-probes.ts +328 -0
  258. package/src/utils/transcription.ts +4 -1
  259. package/src/workflows/executors/sub-workflow.ts +8 -1
  260. package/templates/ai-toolbox.manifest.json +2 -2
  261. package/templates/skills/researching/content.md +2 -0
  262. package/templates/skills/swarm-scripts/SKILL.md +1 -0
  263. package/templates/skills/swarm-scripts/content.md +1 -0
  264. package/dist/cli-7421jzsw.js +0 -84
  265. package/dist/cli-e45e4m6b.js +0 -413
  266. package/dist/cli-zw88zjba.js +0 -307
  267. package/dist/handlers-wy1dr6ja.js +0 -41
  268. package/dist/index-nmm79qgr.js +0 -43
  269. package/dist/lead-sawnyqxk.js +0 -79
  270. package/dist/render-v2-pjwxvnkw.js +0 -12
  271. package/dist/worker-v5e5rxj3.js +0 -79
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  RuntimeProviderKindSchema,
3
3
  init_types
4
- } from "./cli-mz9afxxf.js";
4
+ } from "./cli-4rf0f5vg.js";
5
5
  import {
6
6
  init_zod
7
7
  } from "./cli-4chz1hye.js";
@@ -21,7 +21,7 @@ import {
21
21
  import {
22
22
  scrubSecrets,
23
23
  init_secret_scrubber
24
- } from "./cli-n4c8e3s5.js";
24
+ } from "./cli-708wdy32.js";
25
25
 
26
26
  // src/runtime-providers/controller.ts
27
27
  init_secret_scrubber();
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  workflowEventBus2,
6
6
  init_event_bus
7
- } from "./cli-dabehxhp.js";
7
+ } from "./cli-kt907da6.js";
8
8
  import {
9
9
  getDbClient2,
10
10
  isRuntimePoolsEnabled,
@@ -66,7 +66,7 @@ import {
66
66
  getStaleApprovalRequests2,
67
67
  upsertKv2,
68
68
  init_db3
69
- } from "./cli-jb30dzvk.js";
69
+ } from "./cli-g8ka5j4j.js";
70
70
  import {
71
71
  poolTaskRunsOnHarness,
72
72
  isRuntimePoolWakeable,
@@ -87,33 +87,33 @@ import {
87
87
  createRerouteDecisionTask,
88
88
  createPoolStarvationDecisionTask,
89
89
  canClaim
90
- } from "./cli-asq5ydm4.js";
90
+ } from "./cli-4hxrf0p4.js";
91
91
  import {
92
92
  runtimeStaleThresholdMinutes,
93
93
  countActiveRuntimeInstancesForAgent,
94
94
  agentsWithLiveRuntime,
95
95
  expireStaleRuntimeInstances,
96
96
  createApprovalFollowUpTask
97
- } from "./cli-gbfxp48k.js";
97
+ } from "./cli-3fwqy71j.js";
98
98
  import {
99
99
  listRuntimePools2,
100
100
  init_db
101
- } from "./cli-19202kew.js";
101
+ } from "./cli-gf95q3bm.js";
102
102
  import {
103
103
  remediateStalledRuntime
104
- } from "./cli-1r5ad7j5.js";
104
+ } from "./cli-c2habvsf.js";
105
105
  import {
106
106
  runSavedScriptAsAgent
107
- } from "./cli-7p4jxgtt.js";
107
+ } from "./cli-3gfvmzht.js";
108
108
  import {
109
109
  mintToken,
110
110
  init_users
111
- } from "./cli-6a1xg1p7.js";
111
+ } from "./cli-esakngh8.js";
112
112
  import {
113
113
  TERMINAL_TASK_STATUSES,
114
114
  SUPERSEDED_WORKFLOW_TASK_REASON,
115
115
  init_types
116
- } from "./cli-mz9afxxf.js";
116
+ } from "./cli-4rf0f5vg.js";
117
117
  import {
118
118
  DEFAULT_OPENROUTER_BASE_URL,
119
119
  getOpenRouterBaseUrl,
@@ -128,7 +128,7 @@ import {
128
128
  import {
129
129
  init_package,
130
130
  package_default
131
- } from "./cli-xtrz6bzs.js";
131
+ } from "./cli-nn6vx2mq.js";
132
132
  import {
133
133
  isEnvFlagEnabled,
134
134
  init_env_flag
@@ -136,7 +136,7 @@ import {
136
136
  import {
137
137
  scrubSecrets,
138
138
  init_secret_scrubber
139
- } from "./cli-n4c8e3s5.js";
139
+ } from "./cli-708wdy32.js";
140
140
 
141
141
  // src/be/runtime-pools/routing.ts
142
142
  init_runtime_pools_flag();
@@ -5,12 +5,12 @@ import {
5
5
  validateRuntimeTokenTtlHours,
6
6
  init_swarm_config_guard,
7
7
  init_db3
8
- } from "./cli-jb30dzvk.js";
8
+ } from "./cli-g8ka5j4j.js";
9
9
  import {
10
10
  registerVolatileSecret,
11
11
  unregisterVolatileSecret,
12
12
  init_secret_scrubber
13
- } from "./cli-n4c8e3s5.js";
13
+ } from "./cli-708wdy32.js";
14
14
  import {
15
15
  __esm
16
16
  } from "./cli-242037k3.js";
@@ -6,12 +6,12 @@ import {
6
6
  isSensitiveKey,
7
7
  scrubSecrets,
8
8
  init_secret_scrubber
9
- } from "./cli-n4c8e3s5.js";
9
+ } from "./cli-708wdy32.js";
10
10
  import {
11
11
  openAICompatibleKeyVars,
12
12
  openAICompatibleBaseUrlVars,
13
13
  init_src2
14
- } from "./cli-nwyw3zhg.js";
14
+ } from "./cli-gxee0bqa.js";
15
15
  import {
16
16
  __esm
17
17
  } from "./cli-242037k3.js";
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  contextBoundNoteThreshold,
6
6
  createContextBoundNote
7
- } from "./cli-2655k16q.js";
7
+ } from "./cli-nq677csy.js";
8
8
  import {
9
9
  checkToolLoop
10
10
  } from "./cli-0726awxw.js";
@@ -20,21 +20,26 @@ import {
20
20
  computeContextUsedUnified,
21
21
  clampContextPercent,
22
22
  init_context_window
23
- } from "./cli-0shx9j93.js";
23
+ } from "./cli-pfk92eqz.js";
24
+ import {
25
+ selectCredential,
26
+ init_credentials
27
+ } from "./cli-1tem6ns9.js";
24
28
  import {
25
29
  runtimeCatalogModel,
26
30
  init_runtime_model_catalog
27
- } from "./cli-6x9ma5w5.js";
31
+ } from "./cli-803188pb.js";
28
32
  import {
29
33
  scrubSecrets,
30
34
  init_secret_scrubber
31
- } from "./cli-n4c8e3s5.js";
35
+ } from "./cli-708wdy32.js";
32
36
  import {
33
37
  init_src2
34
- } from "./cli-nwyw3zhg.js";
38
+ } from "./cli-gxee0bqa.js";
35
39
 
36
40
  // src/providers/claude-managed-adapter.ts
37
41
  init_context_window();
42
+ init_credentials();
38
43
  init_secret_scrubber();
39
44
 
40
45
  // src/providers/claude-managed-models.ts
@@ -592,7 +597,7 @@ class ClaudeManagedAdapter2 {
592
597
  if (missing.length > 0) {
593
598
  throw new Error(`[claude-managed] Missing required env var(s): ${missing.join(", ")}. ` + `Run \`bun run src/cli.tsx claude-managed-setup\` to create an Anthropic-side ` + `agent + environment and persist their IDs to swarm_config.`);
594
599
  }
595
- this.apiKey = process.env.ANTHROPIC_API_KEY;
600
+ this.apiKey = selectCredential(process.env.ANTHROPIC_API_KEY, undefined, "ANTHROPIC_API_KEY").selected;
596
601
  this.agentId = process.env.MANAGED_AGENT_ID;
597
602
  this.environmentId = process.env.MANAGED_ENVIRONMENT_ID;
598
603
  if (opts.client) {
@@ -602,6 +607,10 @@ class ClaudeManagedAdapter2 {
602
607
  }
603
608
  }
604
609
  async createSession(config) {
610
+ const taskKey = config.env?.ANTHROPIC_API_KEY;
611
+ const client = taskKey && this.client instanceof Anthropic ? this.client.withOptions({
612
+ apiKey: selectCredential(taskKey, undefined, "ANTHROPIC_API_KEY").selected
613
+ }) : this.client;
605
614
  if (config.resumeSessionId) {
606
615
  console.warn("[claude-managed-adapter] resumeSessionId ignored — native resume is disabled by deprecation plan");
607
616
  }
@@ -633,9 +642,9 @@ class ClaudeManagedAdapter2 {
633
642
  if (vaultIds.length > 0) {
634
643
  createParams.vault_ids = Array.from(new Set(vaultIds));
635
644
  }
636
- const created = await Promise.resolve(this.client.beta.sessions.create(createParams));
645
+ const created = await Promise.resolve(client.beta.sessions.create(createParams));
637
646
  const sessionId = created.id;
638
- return new ClaudeManagedSession(this.client, sessionId, config, userMessageContent, seenEventIds);
647
+ return new ClaudeManagedSession(client, sessionId, config, userMessageContent, seenEventIds);
639
648
  }
640
649
  async canResume(sessionId) {
641
650
  try {
@@ -47,10 +47,10 @@ import {
47
47
  checkDependencies2,
48
48
  emitBuiltInIntegrationConnectedOnce2,
49
49
  init_db3
50
- } from "./cli-jb30dzvk.js";
50
+ } from "./cli-g8ka5j4j.js";
51
51
  import {
52
52
  getChannelBlockReason2
53
- } from "./cli-eftzyh9y.js";
53
+ } from "./cli-gnsb1zxa.js";
54
54
  import {
55
55
  require_dist5,
56
56
  require_axios,
@@ -67,11 +67,11 @@ import {
67
67
  import {
68
68
  isTerminalTaskStatus,
69
69
  init_types
70
- } from "./cli-mz9afxxf.js";
70
+ } from "./cli-4rf0f5vg.js";
71
71
  import {
72
72
  taskAttachmentDisplayUrl,
73
73
  init_task_attachment_links
74
- } from "./cli-e42vss7b.js";
74
+ } from "./cli-hfeb68z4.js";
75
75
  import {
76
76
  getSlackConfiguration,
77
77
  init_config
@@ -102,7 +102,7 @@ import {
102
102
  scrubSecrets,
103
103
  scrubObject,
104
104
  init_secret_scrubber
105
- } from "./cli-n4c8e3s5.js";
105
+ } from "./cli-708wdy32.js";
106
106
  import {
107
107
  __toESM,
108
108
  __commonJS,
@@ -6240,7 +6240,7 @@ async function initOtel(serviceRole = process.env.AGENT_ROLE || "api") {
6240
6240
  return;
6241
6241
  initialized = true;
6242
6242
  try {
6243
- const impl = await import("./otel-impl-v6cc0zve.js");
6243
+ const impl = await import("./otel-impl-54qhqh1z.js");
6244
6244
  await impl.boot(serviceRole, {
6245
6245
  exportConsoleLogs: serviceRole === "api" && isApiLogExportEnabled()
6246
6246
  });
@@ -8240,7 +8240,7 @@ function retryDelayMs(error, attempt) {
8240
8240
  const seconds = candidate.retryAfter ?? candidate.data?.retry_after ?? 2 ** attempt;
8241
8241
  return Math.min(Math.max(seconds * 1000, 0), MAX_RETRY_DELAY_MS);
8242
8242
  }
8243
- async function callSlackWithRetry(client, method, payload) {
8243
+ async function callSlackWithRetry2(client, method, payload) {
8244
8244
  for (let attempt = 0;; attempt++) {
8245
8245
  try {
8246
8246
  return await client.apiCall(method, payload);
@@ -8526,7 +8526,7 @@ function treeBlocks(text) {
8526
8526
  }));
8527
8527
  }
8528
8528
  async function resolvePermalink(client, channelId, ts) {
8529
- const result = await callSlackWithRetry(client, "chat.getPermalink", {
8529
+ const result = await callSlackWithRetry2(client, "chat.getPermalink", {
8530
8530
  channel: channelId,
8531
8531
  message_ts: ts
8532
8532
  });
@@ -8551,7 +8551,7 @@ async function findReservedSlackMessage(client, reservation, outcomeMarker) {
8551
8551
  let cursor;
8552
8552
  const oldest = Math.max(0, new Date(reservation.createdAt).getTime() / 1000 - 5);
8553
8553
  do {
8554
- const response = await callSlackWithRetry(client, "conversations.replies", {
8554
+ const response = await callSlackWithRetry2(client, "conversations.replies", {
8555
8555
  channel: reservation.channelId,
8556
8556
  ts: reservation.threadTs,
8557
8557
  include_all_metadata: true,
@@ -8613,7 +8613,7 @@ async function createThreadTree(task) {
8613
8613
  const reconciled = reserved.created ? undefined : await findReservedSlackMessage(app.client, reservation);
8614
8614
  let remote = reconciled;
8615
8615
  if (!remote) {
8616
- remote = await callSlackWithRetry(app.client, "chat.postMessage", {
8616
+ remote = await callSlackWithRetry2(app.client, "chat.postMessage", {
8617
8617
  channel: task.slackChannelId,
8618
8618
  thread_ts: task.slackThreadTs,
8619
8619
  text,
@@ -8631,7 +8631,7 @@ async function createThreadTree(task) {
8631
8631
  throw new Error("Slack did not return a timestamp for the thread tree");
8632
8632
  }
8633
8633
  if (reconciled) {
8634
- await callSlackWithRetry(app.client, "chat.update", {
8634
+ await callSlackWithRetry2(app.client, "chat.update", {
8635
8635
  channel: task.slackChannelId,
8636
8636
  ts: remote.ts,
8637
8637
  text,
@@ -8745,7 +8745,7 @@ async function updateThreadTree(tree, bypassThrottle = false, statusBudget) {
8745
8745
  return "throttled";
8746
8746
  }
8747
8747
  try {
8748
- await callSlackWithRetry(app.client, "chat.update", {
8748
+ await callSlackWithRetry2(app.client, "chat.update", {
8749
8749
  channel: current.channelId,
8750
8750
  ts: current.ts,
8751
8751
  text,
@@ -8988,7 +8988,7 @@ function isStreamAlreadyStopped(error) {
8988
8988
  async function slackTeamId(client) {
8989
8989
  if (cachedTeamId)
8990
8990
  return cachedTeamId;
8991
- const auth = await callSlackWithRetry(client, "auth.test", {});
8991
+ const auth = await callSlackWithRetry2(client, "auth.test", {});
8992
8992
  const teamId = auth.team_id;
8993
8993
  if (typeof teamId === "string" && teamId)
8994
8994
  cachedTeamId = teamId;
@@ -9073,10 +9073,10 @@ async function streamOutcomeCard(task, tree, options) {
9073
9073
  let started = reconciled;
9074
9074
  if (!started) {
9075
9075
  try {
9076
- started = await callSlackWithRetry(app.client, "chat.startStream", startPayload);
9076
+ started = await callSlackWithRetry2(app.client, "chat.startStream", startPayload);
9077
9077
  } catch (error) {
9078
9078
  console.error(`[Slack] chat.startStream failed for task ${task.id}; falling back to chat.postMessage:`, error);
9079
- started = await callSlackWithRetry(app.client, "chat.postMessage", {
9079
+ started = await callSlackWithRetry2(app.client, "chat.postMessage", {
9080
9080
  channel: task.slackChannelId,
9081
9081
  thread_ts: task.slackThreadTs,
9082
9082
  text: presentation,
@@ -9099,7 +9099,7 @@ async function streamOutcomeCard(task, tree, options) {
9099
9099
  }
9100
9100
  if (!deliveredViaFallback) {
9101
9101
  try {
9102
- await callSlackWithRetry(app.client, "chat.stopStream", {
9102
+ await callSlackWithRetry2(app.client, "chat.stopStream", {
9103
9103
  channel: task.slackChannelId,
9104
9104
  ts: outcome.ts,
9105
9105
  blocks: captions
@@ -9109,7 +9109,7 @@ async function streamOutcomeCard(task, tree, options) {
9109
9109
  throw error;
9110
9110
  }
9111
9111
  if (!streamedFreshContent) {
9112
- await callSlackWithRetry(app.client, "chat.update", {
9112
+ await callSlackWithRetry2(app.client, "chat.update", {
9113
9113
  channel: task.slackChannelId,
9114
9114
  ts: outcome.ts,
9115
9115
  text: presentation,
@@ -9191,7 +9191,7 @@ async function refreshResolvedDeferralCards() {
9191
9191
  if (!wake)
9192
9192
  continue;
9193
9193
  const content = await resolvedDeferralContent(wake);
9194
- await callSlackWithRetry(app.client, "chat.update", {
9194
+ await callSlackWithRetry2(app.client, "chat.update", {
9195
9195
  channel: card.channelId,
9196
9196
  ts: card.ts,
9197
9197
  ...content
@@ -10085,17 +10085,17 @@ async function initSlackApp2() {
10085
10085
  });
10086
10086
  initialized2 = true;
10087
10087
  app.use(slackInboundOutcomeMiddleware());
10088
- const { registerMessageHandler } = await import("./handlers-wy1dr6ja.js");
10089
- const { registerCommandHandler } = await import("./commands-9849dkj6.js");
10090
- const { registerActionHandlers } = await import("./actions-92mepq03.js");
10091
- const { registerWorkObjectHandlers } = await import("./work-objects-kfahhjsq.js");
10088
+ const { registerMessageHandler } = await import("./handlers-eqsnmv95.js");
10089
+ const { registerCommandHandler } = await import("./commands-jqmgk54b.js");
10090
+ const { registerActionHandlers } = await import("./actions-fbqma8aa.js");
10091
+ const { registerWorkObjectHandlers } = await import("./work-objects-p28fgd70.js");
10092
10092
  registerMessageHandler(app);
10093
10093
  registerCommandHandler(app);
10094
10094
  registerActionHandlers(app);
10095
10095
  registerWorkObjectHandlers(app);
10096
- const { createAssistant } = await import("./assistant-zyr5kz47.js");
10096
+ const { createAssistant } = await import("./assistant-a16433gr.js");
10097
10097
  app.assistant(createAssistant());
10098
- const { isBlockExternalEnabled, scanExternalChannelsOnBoot } = await import("./external-channel-e2s028da.js");
10098
+ const { isBlockExternalEnabled, scanExternalChannelsOnBoot } = await import("./external-channel-y6nkzhnn.js");
10099
10099
  if (isBlockExternalEnabled()) {
10100
10100
  scanExternalChannelsOnBoot(app.client).catch((error) => {
10101
10101
  console.error("[Slack] External channel boot scan failed:", error);
@@ -10108,7 +10108,7 @@ async function startSlackApp2() {
10108
10108
  await initSlackApp2();
10109
10109
  }
10110
10110
  if (app) {
10111
- const { isSlackRenderV2Enabled } = await import("./render-v2-pjwxvnkw.js");
10111
+ const { isSlackRenderV2Enabled } = await import("./render-v2-tjay5hhf.js");
10112
10112
  if (isSlackRenderV2Enabled())
10113
10113
  await ensureSlackRenderV2Activation2();
10114
10114
  await app.start();
@@ -10131,4 +10131,4 @@ async function stopSlackApp2() {
10131
10131
  initialized2 = false;
10132
10132
  }
10133
10133
 
10134
- export { require_dist4, getSlackConnectionState, noteSlackInboundSideEffect, ignoreSlackInbound, reportSlackInboundFailure, isAdmittedSlackDelivery, getSlackInboundDiagnostics, terminalReactionEvent, isPollTracingEnabled, initOtel, withSpan2, startSpan2, withSpanContext2, withRemoteContext2, injectTraceContext2, recordSessionCost2, recordDbRetentionSweep2, recordDbRetentionStatement2, slackTaskOutput, ackSlackMessage, getTaskLink, getTaskUrl, markdownToSlack, buildMrkdwnSectionBlocks, buildCaptionBlock, buildCancelledBlocks, buildBufferFlushBlocks, buildTreeBlocks, taskCitationIssues, stripInvalidTaskCitations, taskCitationSourceGroups, renderTaskCitations, taskCitationWarnings, MAX_TASK_CITATIONS, CitationInputSchema, TaskCitationSchema, upsertTaskCitations, getTaskCitations, getTaskCitationsForTasks, hasTaskCitationCheckRefusal, initialize, ensure, getAgentDisplayName, getAgentEmoji, markSlackSessionProcessing, isSlackRenderV2Enabled2, ensureSlackThreadTree2, processSlackRenderV22, registerTreeMessage, getSlackApp2, initSlackApp2, startSlackApp2, stopSlackApp2 };
10134
+ export { require_dist4, getSlackConnectionState, noteSlackInboundSideEffect, ignoreSlackInbound, reportSlackInboundFailure, isAdmittedSlackDelivery, getSlackInboundDiagnostics, terminalReactionEvent, isPollTracingEnabled, initOtel, withSpan2, startSpan2, withSpanContext2, withRemoteContext2, injectTraceContext2, recordSessionCost2, recordDbRetentionSweep2, recordDbRetentionStatement2, slackTaskOutput, ackSlackMessage, getTaskLink, getTaskUrl, markdownToSlack, buildMrkdwnSectionBlocks, buildCaptionBlock, buildCancelledBlocks, buildBufferFlushBlocks, buildTreeBlocks, taskCitationIssues, stripInvalidTaskCitations, taskCitationSourceGroups, renderTaskCitations, taskCitationWarnings, MAX_TASK_CITATIONS, CitationInputSchema, TaskCitationSchema, upsertTaskCitations, getTaskCitations, getTaskCitationsForTasks, hasTaskCitationCheckRefusal, initialize, ensure, getAgentDisplayName, getAgentEmoji, markSlackSessionProcessing, isSlackRenderV2Enabled2, callSlackWithRetry2, ensureSlackThreadTree2, slackErrorCode2, processSlackRenderV22, registerTreeMessage, getSlackApp2, initSlackApp2, startSlackApp2, stopSlackApp2 };