@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
@@ -15,17 +15,17 @@ import {
15
15
  init_secret_registry,
16
16
  upsertSwarmConfig2,
17
17
  init_db3
18
- } from "./cli-jb30dzvk.js";
18
+ } from "./cli-g8ka5j4j.js";
19
19
  import {
20
20
  createRuntimeProvider,
21
21
  init_runtime_providers
22
- } from "./cli-dew6x255.js";
22
+ } from "./cli-39aet655.js";
23
23
  import {
24
24
  closeSessionTokenConnections,
25
25
  init_session_token_connections,
26
26
  insertSessionToken,
27
27
  init_users
28
- } from "./cli-6a1xg1p7.js";
28
+ } from "./cli-esakngh8.js";
29
29
  import {
30
30
  RuntimeControllerCreateSchema,
31
31
  RuntimeControllerUpdateSchema,
@@ -33,13 +33,13 @@ import {
33
33
  RuntimePoolUpdateSchema,
34
34
  RuntimePoolCreateAgentSchema,
35
35
  init_types
36
- } from "./cli-mz9afxxf.js";
36
+ } from "./cli-4rf0f5vg.js";
37
37
  import {
38
38
  scrubSecrets,
39
39
  registerVolatileSecret,
40
40
  unregisterVolatileSecret,
41
41
  init_secret_scrubber
42
- } from "./cli-n4c8e3s5.js";
42
+ } from "./cli-708wdy32.js";
43
43
  import {
44
44
  __esm
45
45
  } from "./cli-242037k3.js";
@@ -4,7 +4,7 @@ import {
4
4
  claimKv2,
5
5
  deleteKv2,
6
6
  init_db3
7
- } from "./cli-jb30dzvk.js";
7
+ } from "./cli-g8ka5j4j.js";
8
8
  import {
9
9
  isEnvFlagEnabled,
10
10
  init_env_flag
@@ -12,7 +12,7 @@ import {
12
12
  import {
13
13
  scrubSecrets,
14
14
  init_secret_scrubber
15
- } from "./cli-n4c8e3s5.js";
15
+ } from "./cli-708wdy32.js";
16
16
 
17
17
  // src/slack/external-channel.ts
18
18
  init_db3();
@@ -773,4 +773,4 @@ var init_src2 = __esm(() => {
773
773
  init_resolve_alias();
774
774
  });
775
775
 
776
- export { isAlias, parseAlias, resolveAlias, harnessCatalogSection, isHarnessModelJudged, normalizeGrokModel, harnessModelIds, modelFamilyKey, buildClaudeShortnameMap, harnessModelMismatch, openAICompatibleProviders, openAICompatibleProviderIds, providerKeyVars, openAICompatibleKeyVars, openAICompatibleBaseUrlVars, baseUrlOverride, ignoredBaseUrlVar, providerBaseUrl, openAICompatibleProvider, providerForModel, providerForKeyVar, providerKeyFromEnv, providerHarnessModels, withAgentChatRegistrySections, registryCatalogSections, withRegistryCatalogSections, dshCatalogRef, grokCatalogRef, cursorCatalogRef, reasoningLevelsFor, claudeCatalogModelId, init_src2 };
776
+ export { isAlias, parseAlias, resolveAlias, harnessCatalogSection, isHarnessModelJudged, normalizeGrokModel, harnessModelIds, modelFamilyKey, buildClaudeShortnameMap, harnessModelMismatch, openAICompatibleProviders, openAICompatibleProviderIds, providerKeyVars, openAICompatibleKeyVars, baseUrlEnvVar, openAICompatibleBaseUrlVars, baseUrlOverride, ignoredBaseUrlVar, providerBaseUrl, openAICompatibleProvider, providerForModel, providerForKeyVar, providerKeyFromEnv, providerHarnessModels, withAgentChatRegistrySections, registryCatalogSections, withRegistryCatalogSections, dshCatalogRef, grokCatalogRef, cursorCatalogRef, reasoningLevelsFor, claudeCatalogModelId, init_src2 };
@@ -1,11 +1,11 @@
1
- import {
2
- getSlackConfiguration,
3
- init_config
4
- } from "./cli-qeaq3j6t.js";
5
1
  import {
6
2
  isSteeringEnabled2,
7
3
  init_steering_enabled
8
4
  } from "./cli-4sydckyj.js";
5
+ import {
6
+ getSlackConfiguration,
7
+ init_config
8
+ } from "./cli-qeaq3j6t.js";
9
9
  import {
10
10
  init_templates3
11
11
  } from "./cli-j6rktc91.js";
@@ -24,7 +24,7 @@ import {
24
24
  import {
25
25
  scrubSecrets,
26
26
  init_secret_scrubber
27
- } from "./cli-n4c8e3s5.js";
27
+ } from "./cli-708wdy32.js";
28
28
  import {
29
29
  __esm
30
30
  } from "./cli-242037k3.js";
@@ -2,16 +2,16 @@ import {
2
2
  contextStatePath,
3
3
  contextBoundNoteMarkerPath,
4
4
  recordContextState
5
- } from "./cli-2655k16q.js";
5
+ } from "./cli-nq677csy.js";
6
6
  import {
7
7
  runStopHookSessionSummarySubprocess
8
- } from "./cli-9j129brq.js";
8
+ } from "./cli-mtnj4fwa.js";
9
9
  import {
10
10
  redactRateLimitEventLine,
11
11
  SessionErrorTracker,
12
12
  trackErrorFromJson,
13
13
  parseStderrForErrors
14
- } from "./cli-gx4rm0qx.js";
14
+ } from "./cli-7enjwya9.js";
15
15
  import {
16
16
  swarmRuntimeInstanceId
17
17
  } from "./cli-e8xyjvfc.js";
@@ -32,7 +32,7 @@ import {
32
32
  } from "./cli-vbhgkw9h.js";
33
33
  import {
34
34
  applyReasoningEffort
35
- } from "./cli-bn0rewsy.js";
35
+ } from "./cli-c081bj3b.js";
36
36
  import {
37
37
  fetchInstalledMcpServers
38
38
  } from "./cli-bst1vp7e.js";
@@ -42,7 +42,7 @@ import {
42
42
  computeContextUsedUnified,
43
43
  clampContextPercent,
44
44
  init_context_window
45
- } from "./cli-0shx9j93.js";
45
+ } from "./cli-pfk92eqz.js";
46
46
  import {
47
47
  resolveClaudeTransport,
48
48
  isClaudeBridgeEffective
@@ -53,18 +53,16 @@ import {
53
53
  import {
54
54
  withFileLock,
55
55
  init_file_lock
56
- } from "./cli-e42vss7b.js";
57
- import {
58
- CLAUDE_CREDENTIALS_HINT,
59
- validateClaudeCredentials,
60
- init_credentials
61
- } from "./cli-zw88zjba.js";
56
+ } from "./cli-hfeb68z4.js";
62
57
  import {
63
58
  routeCredentialStatus,
64
59
  deriveDefaultRoute,
65
60
  routeUnsetEnv,
66
- init_src
67
- } from "./cli-e45e4m6b.js";
61
+ init_src,
62
+ CLAUDE_CREDENTIALS_HINT,
63
+ validateClaudeCredentials,
64
+ init_credentials
65
+ } from "./cli-1tem6ns9.js";
68
66
  import {
69
67
  getOpenRouterAttributionHeaders,
70
68
  init_openrouter_base_url
@@ -76,7 +74,7 @@ import {
76
74
  import {
77
75
  scrubSecrets,
78
76
  init_secret_scrubber
79
- } from "./cli-n4c8e3s5.js";
77
+ } from "./cli-708wdy32.js";
80
78
  import {
81
79
  __toESM
82
80
  } from "./cli-242037k3.js";
@@ -1261,7 +1259,7 @@ class ClaudeAdapter2 {
1261
1259
  if (transport === "sdk" && isClaudeBridgeEffective(sourceEnv)) {
1262
1260
  throw new Error("CLAUDE_TRANSPORT=sdk cannot run with an effective Claude Bridge configuration. Select CLI transport or disable the bridge.");
1263
1261
  }
1264
- const claudeSdk = transport === "sdk" ? await import("./claude-sdk-session-7b7whkaq.js") : undefined;
1262
+ const claudeSdk = transport === "sdk" ? await import("./claude-sdk-session-nw5yd8cp.js") : undefined;
1265
1263
  claudeSdk?.validateClaudeSdkAdditionalArgs([
1266
1264
  ...claudeBinaryArgv.slice(1),
1267
1265
  ...config.additionalArgs ?? []
@@ -1290,7 +1288,7 @@ class ClaudeAdapter2 {
1290
1288
  }
1291
1289
  if (isEnvFlagEnabled("CLAUDE_TRUST_PRESEED", true, sourceEnv)) {
1292
1290
  try {
1293
- await preseedClaudeTrustDialog(await resolveClaudeTrustDirs(config.cwd));
1291
+ await preseedClaudeTrustDialog(await resolveClaudeTrustDirs(config.cwd), sourceEnv.HOME || undefined);
1294
1292
  } catch (err) {
1295
1293
  console.warn(`\x1B[33m[claude]\x1B[0m ${scrubSecrets(`Failed to pre-seed trust for ${config.cwd}: ${err}`)}`);
1296
1294
  }
@@ -9,12 +9,12 @@ import {
9
9
  acquireOAuthRefreshLock,
10
10
  releaseOAuthRefreshLock,
11
11
  init_oauth
12
- } from "./cli-jb30dzvk.js";
12
+ } from "./cli-g8ka5j4j.js";
13
13
  import {
14
14
  scrubSecrets,
15
15
  registerVolatileSecret,
16
16
  init_secret_scrubber
17
- } from "./cli-n4c8e3s5.js";
17
+ } from "./cli-708wdy32.js";
18
18
 
19
19
  // node_modules/oauth4webapi/build/index.js
20
20
  var USER_AGENT;
@@ -6,7 +6,7 @@ import {
6
6
  import {
7
7
  scrubSecrets,
8
8
  init_secret_scrubber
9
- } from "./cli-n4c8e3s5.js";
9
+ } from "./cli-708wdy32.js";
10
10
  import {
11
11
  __esm
12
12
  } from "./cli-242037k3.js";
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  contextBoundNoteThreshold,
3
3
  createContextBoundNote
4
- } from "./cli-2655k16q.js";
4
+ } from "./cli-nq677csy.js";
5
5
  import {
6
6
  ampBillsCacheWrites,
7
7
  resolveAmpModel
8
- } from "./cli-9s05422w.js";
8
+ } from "./cli-bqztfyve.js";
9
9
  import {
10
10
  swarmRuntimeInstanceId
11
11
  } from "./cli-e8xyjvfc.js";
@@ -22,18 +22,18 @@ import {
22
22
  } from "./cli-jc1g9ndz.js";
23
23
  import {
24
24
  applyReasoningEffort
25
- } from "./cli-bn0rewsy.js";
25
+ } from "./cli-c081bj3b.js";
26
26
  import {
27
27
  CONTEXT_FORMULA,
28
28
  computeContextUsedUnified,
29
29
  clampContextPercent,
30
30
  init_context_window
31
- } from "./cli-0shx9j93.js";
31
+ } from "./cli-pfk92eqz.js";
32
32
  import {
33
33
  scrubSecrets,
34
34
  registerVolatileSecret,
35
35
  init_secret_scrubber
36
- } from "./cli-n4c8e3s5.js";
36
+ } from "./cli-708wdy32.js";
37
37
 
38
38
  // src/providers/amp-adapter.ts
39
39
  import { existsSync, readFileSync, renameSync, rmSync, writeFileSync } from "node:fs";
@@ -42,7 +42,7 @@ import { tmpdir } from "node:os";
42
42
  import { join } from "node:path";
43
43
  init_context_window();
44
44
  init_secret_scrubber();
45
- var AMP_PACKAGE = "@ampcode/cli@0.0.1792844927-g360c96";
45
+ var AMP_PACKAGE = "@ampcode/cli@0.0.1792929650-g000512";
46
46
  var AMP_MCP_SERVER_NAME = "agent-swarm";
47
47
  var AMP_PLUGIN_MODE_KEY = "agent-swarm";
48
48
  var AMP_LIVE_TEST_TIMEOUT_MS = 5000;
@@ -2,7 +2,7 @@ import {
2
2
  isGrokOpenRouterModel,
3
3
  grokTargetProfile,
4
4
  ACPAdapter2
5
- } from "./cli-m4ecdxvz.js";
5
+ } from "./cli-zqne1qcj.js";
6
6
  import {
7
7
  getOpenRouterBaseUrl,
8
8
  getOpenRouterAttributionHeaders,
@@ -11,11 +11,11 @@ import {
11
11
  import {
12
12
  registerVolatileSecret,
13
13
  init_secret_scrubber
14
- } from "./cli-n4c8e3s5.js";
14
+ } from "./cli-708wdy32.js";
15
15
  import {
16
16
  normalizeGrokModel,
17
17
  init_src2
18
- } from "./cli-nwyw3zhg.js";
18
+ } from "./cli-gxee0bqa.js";
19
19
 
20
20
  // src/providers/grok-adapter.ts
21
21
  init_src2();
@@ -8,14 +8,14 @@ import {
8
8
  import {
9
9
  materializeClaudeMd,
10
10
  stopClaudeMd
11
- } from "./cli-pzatvw94.js";
11
+ } from "./cli-2sjhpsns.js";
12
12
  import {
13
13
  summarizeSession
14
- } from "./cli-mmhj8vd7.js";
14
+ } from "./cli-ag2yrnt5.js";
15
15
  import {
16
16
  contextBoundNoteThreshold,
17
17
  injectClaimedContextBoundNote
18
- } from "./cli-2655k16q.js";
18
+ } from "./cli-nq677csy.js";
19
19
  import {
20
20
  guardGhPrBody,
21
21
  guardGhPrRoom
@@ -31,11 +31,11 @@ import {
31
31
  warnProfileFileTooLarge,
32
32
  buildIndependentIdentityPayloads,
33
33
  init_profile_sync
34
- } from "./cli-e42vss7b.js";
34
+ } from "./cli-hfeb68z4.js";
35
35
  import {
36
36
  init_package,
37
37
  package_default
38
- } from "./cli-xtrz6bzs.js";
38
+ } from "./cli-nn6vx2mq.js";
39
39
  import {
40
40
  MAX_PROFILE_FILE_LENGTH,
41
41
  getMcpBaseUrl,
@@ -52,7 +52,7 @@ import {
52
52
  import {
53
53
  scrubSecrets,
54
54
  init_secret_scrubber
55
- } from "./cli-n4c8e3s5.js";
55
+ } from "./cli-708wdy32.js";
56
56
 
57
57
  // src/hooks/hook.ts
58
58
  init_package();
@@ -10,7 +10,7 @@ import {
10
10
  getMostRecentTaskInThread2,
11
11
  reactionName,
12
12
  init_db3
13
- } from "./cli-jb30dzvk.js";
13
+ } from "./cli-g8ka5j4j.js";
14
14
  import {
15
15
  TaskCreationBlockedError,
16
16
  buildEffectiveText,
@@ -23,7 +23,7 @@ import {
23
23
  extractTaskFromMessage,
24
24
  extractSlackMessageText,
25
25
  dispatchPre2
26
- } from "./cli-asq5ydm4.js";
26
+ } from "./cli-4hxrf0p4.js";
27
27
  import {
28
28
  noteSlackInboundSideEffect,
29
29
  ignoreSlackInbound,
@@ -34,23 +34,23 @@ import {
34
34
  isSlackRenderV2Enabled2,
35
35
  ensureSlackThreadTree2,
36
36
  registerTreeMessage
37
- } from "./cli-abs8ndtr.js";
37
+ } from "./cli-g20jjwt4.js";
38
38
  import {
39
39
  isBlockExternalEnabled2,
40
40
  invalidateChannelExternality2,
41
41
  getChannelBlockReason2,
42
42
  shouldBlockChannel2,
43
43
  leaveExternalChannel2
44
- } from "./cli-eftzyh9y.js";
44
+ } from "./cli-gnsb1zxa.js";
45
45
  import {
46
46
  workflowEventBus2,
47
47
  init_event_bus
48
- } from "./cli-dabehxhp.js";
48
+ } from "./cli-kt907da6.js";
49
49
  import {
50
50
  enrichSlackUserEmail,
51
51
  resolveSlackUserId,
52
52
  rewriteSlackMentions
53
- } from "./cli-jbnn4vxb.js";
53
+ } from "./cli-24j1jeeb.js";
54
54
  import {
55
55
  wasEventSeen,
56
56
  requestSlackThreadSteering,
@@ -58,7 +58,7 @@ import {
58
58
  bufferThreadMessage,
59
59
  getBufferMessageCount,
60
60
  instantFlush
61
- } from "./cli-wghjkr0e.js";
61
+ } from "./cli-sqma6vw1.js";
62
62
  import {
63
63
  resolveTemplate,
64
64
  init_resolver
@@ -79,7 +79,7 @@ import {
79
79
  import {
80
80
  scrubSecrets,
81
81
  init_secret_scrubber
82
- } from "./cli-n4c8e3s5.js";
82
+ } from "./cli-708wdy32.js";
83
83
  import {
84
84
  __using,
85
85
  __callDispose
@@ -400,6 +400,10 @@ function registerMessageHandler2(app) {
400
400
  }
401
401
  }
402
402
  matches ??= await routeMessage(routingText, botUserId, botMentioned || isImplicitMention, routingThreadContext);
403
+ const slack = {
404
+ trigger: "mention",
405
+ messages: [{ ts: msg.ts, userId: msg.user, text: msg.text ?? "" }]
406
+ };
403
407
  if (matches.length === 0) {
404
408
  let __stack = [];
405
409
  try {
@@ -451,7 +455,7 @@ ${taskDescription}`;
451
455
  slackUserId: msg.user,
452
456
  requestedByUserId,
453
457
  contextKey: slackContextKey({ channelId: msg.channel, threadTs })
454
- }, inbound);
458
+ }, inbound, slack);
455
459
  await ackSlackMessage(client, msg.channel, msg.ts, reactionName("accepted"), "accepted");
456
460
  await notifySlackFileFailures(client, msg.channel, threadTs, unattached);
457
461
  if (isSlackRenderV2Enabled2()) {
@@ -544,7 +548,7 @@ ${taskDescription}`;
544
548
  inheritParentOutputSchema: false,
545
549
  requestedByUserId,
546
550
  contextKey: slackContextKey({ channelId: msg.channel, threadTs })
547
- }, inbound);
551
+ }, inbound, slack);
548
552
  const { task } = created;
549
553
  unattached.push(...created.unattached);
550
554
  await ackSlackMessage(client, msg.channel, msg.ts, reactionName("accepted"), "accepted");
@@ -562,7 +566,7 @@ ${taskDescription}`;
562
566
  slackUserId: msg.user,
563
567
  requestedByUserId,
564
568
  contextKey: slackContextKey({ channelId: msg.channel, threadTs })
565
- }, inbound);
569
+ }, inbound, slack);
566
570
  const { task } = created;
567
571
  unattached.push(...created.unattached);
568
572
  await ackSlackMessage(client, msg.channel, msg.ts, reactionName("accepted"), "accepted");
@@ -1,10 +1,34 @@
1
+ import {
2
+ publicEndpointSsrfOptions
3
+ } from "./cli-3gfvmzht.js";
1
4
  import {
2
5
  getMemoryRaterNames
3
6
  } from "./cli-3h26v7yj.js";
4
7
  import {
5
8
  normalizeOrgWebsite,
6
- init_org_website
7
- } from "./cli-jb30dzvk.js";
9
+ init_org_website,
10
+ assertUrlSafe
11
+ } from "./cli-g8ka5j4j.js";
12
+ import {
13
+ getRouteProvider,
14
+ createScopedFetch,
15
+ deriveDefaultRoute,
16
+ init_src
17
+ } from "./cli-1tem6ns9.js";
18
+ import {
19
+ getOpenRouterBaseUrl,
20
+ getOpenRouterAttributionHeaders,
21
+ init_openrouter_base_url
22
+ } from "./cli-dfyv0jdy.js";
23
+ import {
24
+ scrubSecrets,
25
+ init_secret_scrubber
26
+ } from "./cli-708wdy32.js";
27
+ import {
28
+ providerBaseUrl,
29
+ providerForKeyVar,
30
+ init_src2
31
+ } from "./cli-gxee0bqa.js";
8
32
 
9
33
  // src/utils/lead-monitor-channels.ts
10
34
  function isLeadChannelMonitoringEnabled(env = process.env) {
@@ -117,6 +141,204 @@ function isUnknownModelError(text, modelId) {
117
141
  });
118
142
  }
119
143
 
144
+ // src/utils/provider-key-probes.ts
145
+ init_src2();
146
+ init_src();
147
+ init_openrouter_base_url();
148
+ init_secret_scrubber();
149
+ var LIVE_TEST_TIMEOUT_MS = 5000;
150
+ function scrubProbeBody(body, init) {
151
+ const headers = new Headers(init.headers);
152
+ const apiKey = headers.get("x-api-key") ?? headers.get("authorization")?.replace(/^Bearer\s+/i, "");
153
+ return scrubSecrets(apiKey ? body.replaceAll(apiKey, "[REDACTED]") : body);
154
+ }
155
+ async function timedFetch(url, init, options = {}) {
156
+ const controller = new AbortController;
157
+ const timer = setTimeout(() => controller.abort(), LIVE_TEST_TIMEOUT_MS);
158
+ const start = Date.now();
159
+ try {
160
+ if (options.publicEndpoint)
161
+ assertUrlSafe(url, publicEndpointSsrfOptions());
162
+ const res = await fetch(url, {
163
+ ...init,
164
+ ...options.publicEndpoint ? { redirect: "manual" } : {},
165
+ signal: controller.signal
166
+ });
167
+ let bodyText = "";
168
+ try {
169
+ bodyText = scrubProbeBody(await res.text(), init);
170
+ } catch {}
171
+ return {
172
+ ok: res.ok,
173
+ status: res.status,
174
+ bodyText,
175
+ latency_ms: Date.now() - start
176
+ };
177
+ } finally {
178
+ clearTimeout(timer);
179
+ }
180
+ }
181
+ async function checkAnthropicApiKey(apiKey, options = {}) {
182
+ const r = await timedFetch("https://api.anthropic.com/v1/models", {
183
+ method: "GET",
184
+ headers: { "x-api-key": apiKey, "anthropic-version": "2023-06-01" }
185
+ }, options);
186
+ if (r.ok)
187
+ return { ok: true, latency_ms: r.latency_ms };
188
+ return {
189
+ ok: false,
190
+ error: scrubSecrets(`HTTP ${r.status}: ${r.bodyText.slice(0, 200)}`),
191
+ httpStatus: r.status,
192
+ latency_ms: r.latency_ms
193
+ };
194
+ }
195
+ async function checkOpenAiApiKey(apiKey, options = {}) {
196
+ const r = await timedFetch("https://api.openai.com/v1/models", {
197
+ method: "GET",
198
+ headers: { Authorization: `Bearer ${apiKey}` }
199
+ }, options);
200
+ if (r.ok)
201
+ return { ok: true, latency_ms: r.latency_ms };
202
+ return {
203
+ ok: false,
204
+ error: scrubSecrets(`HTTP ${r.status}: ${r.bodyText.slice(0, 200)}`),
205
+ httpStatus: r.status,
206
+ latency_ms: r.latency_ms
207
+ };
208
+ }
209
+ async function checkXaiApiKey(apiKey, options = {}) {
210
+ const r = await timedFetch("https://api.x.ai/v1/models", {
211
+ method: "GET",
212
+ headers: { Authorization: `Bearer ${apiKey}` }
213
+ }, options);
214
+ if (r.ok)
215
+ return { ok: true, latency_ms: r.latency_ms };
216
+ return {
217
+ ok: false,
218
+ error: scrubSecrets(`HTTP ${r.status}: ${r.bodyText.slice(0, 200)}`),
219
+ httpStatus: r.status,
220
+ latency_ms: r.latency_ms
221
+ };
222
+ }
223
+ async function checkBearerGet(url, init, options = {}) {
224
+ const r = await timedFetch(url, { method: "GET", ...init }, options);
225
+ if (r.ok)
226
+ return { ok: true, latency_ms: r.latency_ms };
227
+ return {
228
+ ok: false,
229
+ error: scrubSecrets(`HTTP ${r.status}: ${r.bodyText.slice(0, 200)}`),
230
+ httpStatus: r.status,
231
+ latency_ms: r.latency_ms
232
+ };
233
+ }
234
+ async function checkOpenRouter(apiKey, options = {}) {
235
+ const base = getOpenRouterBaseUrl(options.env);
236
+ const get = (url) => checkBearerGet(url, {
237
+ headers: {
238
+ ...getOpenRouterAttributionHeaders(url, options.env),
239
+ Authorization: `Bearer ${apiKey}`
240
+ }
241
+ }, options);
242
+ const keyResult = await get(`${base}/key`);
243
+ if (keyResult.httpStatus === 404 || keyResult.httpStatus === 405)
244
+ return get(`${base}/models`);
245
+ return keyResult;
246
+ }
247
+ function checkDeepSeekApiKey(apiKey, options = {}) {
248
+ return checkBearerGet("https://api.deepseek.com/models", {
249
+ headers: { Authorization: `Bearer ${apiKey}` }
250
+ }, options);
251
+ }
252
+ async function checkOpenAICompatibleProvider(provider, apiKey, baseUrl = provider.baseUrl, options = {}) {
253
+ const r = await timedFetch(`${baseUrl.replace(/\/+$/, "")}/models`, {
254
+ method: "GET",
255
+ headers: { Authorization: `Bearer ${apiKey}` }
256
+ }, options);
257
+ if (r.ok)
258
+ return { ok: true, latency_ms: r.latency_ms };
259
+ return {
260
+ ok: false,
261
+ error: scrubSecrets(`HTTP ${r.status}: ${r.bodyText.slice(0, 200)}`),
262
+ httpStatus: r.status,
263
+ latency_ms: r.latency_ms
264
+ };
265
+ }
266
+ async function checkRoute(route, env) {
267
+ const startedAt = Date.now();
268
+ const provider = getRouteProvider(route.provider);
269
+ const baseUrl = route.baseUrl ?? provider?.defaultBaseUrl;
270
+ if (!provider?.validate || !baseUrl)
271
+ return { ok: true, skipped: true, latency_ms: 0 };
272
+ const publicFetch = async (url, init) => {
273
+ assertUrlSafe(String(url), publicEndpointSsrfOptions());
274
+ const res = await fetch(url, init);
275
+ if (res.ok || !res.body)
276
+ return res;
277
+ return new Response(scrubProbeBody(await res.text(), init ?? {}), {
278
+ status: res.status,
279
+ statusText: res.statusText,
280
+ headers: res.headers
281
+ });
282
+ };
283
+ const result = await provider.validate({
284
+ route,
285
+ env,
286
+ signal: AbortSignal.timeout(LIVE_TEST_TIMEOUT_MS),
287
+ fetch: createScopedFetch(baseUrl, publicFetch)
288
+ });
289
+ const latency_ms = Date.now() - startedAt;
290
+ if (result.status === "verified")
291
+ return { ok: true, latency_ms };
292
+ return {
293
+ ok: result.status === "configured",
294
+ ...result.status === "configured" ? { skipped: true } : { httpStatus: result.httpStatus },
295
+ error: scrubSecrets(result.reason),
296
+ latency_ms
297
+ };
298
+ }
299
+ async function checkProviderPoolKey(keyType, apiKey, env = process.env) {
300
+ const startedAt = Date.now();
301
+ const options = { env, publicEndpoint: true };
302
+ try {
303
+ switch (keyType) {
304
+ case "ANTHROPIC_API_KEY": {
305
+ const keyEnv = { ...env, ANTHROPIC_API_KEY: apiKey };
306
+ const route = deriveDefaultRoute("claude", keyEnv);
307
+ if (route?.provider === "anthropic-gateway" && "secretKey" in route.auth && route.auth.secretKey === "ANTHROPIC_API_KEY") {
308
+ return await checkRoute(route, keyEnv);
309
+ }
310
+ return await checkAnthropicApiKey(apiKey, options);
311
+ }
312
+ case "OPENAI_API_KEY":
313
+ return await checkOpenAiApiKey(apiKey, options);
314
+ case "OPENROUTER_API_KEY":
315
+ return await checkOpenRouter(apiKey, options);
316
+ case "DEEPSEEK_API_KEY":
317
+ return await checkDeepSeekApiKey(apiKey, options);
318
+ case "XAI_API_KEY":
319
+ return await checkXaiApiKey(apiKey, options);
320
+ case "CLAUDE_CODE_OAUTH_TOKEN": {
321
+ const tokenEnv = { CLAUDE_CODE_OAUTH_TOKEN: apiKey };
322
+ return await checkRoute(deriveDefaultRoute("claude", tokenEnv), tokenEnv);
323
+ }
324
+ default: {
325
+ const provider = providerForKeyVar(keyType);
326
+ if (provider) {
327
+ return await checkOpenAICompatibleProvider(provider, apiKey, providerBaseUrl(provider, env), options);
328
+ }
329
+ return { ok: true, skipped: true, latency_ms: 0 };
330
+ }
331
+ }
332
+ } catch (err) {
333
+ const raw = err instanceof Error ? err.message : String(err);
334
+ return {
335
+ ok: false,
336
+ error: scrubSecrets(raw.split(apiKey).join("[REDACTED]")) || "Unknown error",
337
+ latency_ms: Date.now() - startedAt
338
+ };
339
+ }
340
+ }
341
+
120
342
  // src/utils/skill-fs-writer.ts
121
343
  import { existsSync, mkdirSync, readdirSync, rmSync, writeFileSync } from "node:fs";
122
344
  import { dirname, join } from "node:path";
@@ -256,4 +478,4 @@ function writeSkillsToFilesystem(entries, harnessType = "all", home) {
256
478
  return { synced, removed, errors };
257
479
  }
258
480
 
259
- export { isLeadChannelMonitoringEnabled, ORG_IDENTITY_KEYS, orgIdentityStatus, SIMILARITY_THRESHOLD, memoryRelevance, renderMemoriesPrompt, isUnknownModelError, writeSkillsToFilesystem };
481
+ export { isLeadChannelMonitoringEnabled, ORG_IDENTITY_KEYS, orgIdentityStatus, SIMILARITY_THRESHOLD, memoryRelevance, renderMemoriesPrompt, isUnknownModelError, timedFetch, checkAnthropicApiKey, checkOpenAiApiKey, checkXaiApiKey, checkOpenRouter, checkDeepSeekApiKey, checkOpenAICompatibleProvider, checkProviderPoolKey, writeSkillsToFilesystem };
@@ -7,7 +7,7 @@ var package_default;
7
7
  var init_package = __esm(() => {
8
8
  package_default = {
9
9
  name: "@desplega.ai/agent-swarm",
10
- version: "2.5.4",
10
+ version: "2.6.0",
11
11
  description: "agent-swarm.dev — an open-source operating system for AI work: a lead agent breaks goals into tasks, routes them to specialized workers such as Claude Code or Codex, runs each worker in an isolated container, and preserves shared memory, tools, schedules, and review gates so delegated work compounds across sessions.",
12
12
  keywords: [
13
13
  "agent-swarm.dev",
@@ -2,7 +2,7 @@ import {
2
2
  getKnownContextWindowSize,
3
3
  clampContextPercent,
4
4
  init_context_window
5
- } from "./cli-0shx9j93.js";
5
+ } from "./cli-pfk92eqz.js";
6
6
  import {
7
7
  resolveTemplateFromCode,
8
8
  resolveTemplateAsync,