@desplega.ai/agent-swarm 2.13.0 → 2.13.1

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 (268) hide show
  1. package/dist/acp-adapter-xtj40wd8.js +17 -0
  2. package/dist/{acp-targets-86f0sh6g.js → acp-targets-n7vm5atw.js} +10 -10
  3. package/dist/{actions-zv8vcxvr.js → actions-hq6wp9xv.js} +27 -27
  4. package/dist/{agent-fs-provision-jqshb33y.js → agent-fs-provision-y0qc1rdd.js} +4 -4
  5. package/dist/{amp-adapter-gt503ywc.js → amp-adapter-1qqs6h91.js} +3 -3
  6. package/dist/{app-6t4k5rh1.js → app-7m4z44rv.js} +10 -10
  7. package/dist/{approval-notifications-fcfw063h.js → approval-notifications-8sr41gjx.js} +11 -11
  8. package/dist/{assistant-9dzybh12.js → assistant-hkczwfv6.js} +28 -28
  9. package/dist/{boot-args-schema-xzfp2feg.js → boot-args-schema-8025snev.js} +1 -1
  10. package/dist/{boot-reembed-r88wngfg.js → boot-reembed-15m87nr1.js} +1 -1
  11. package/dist/{boot-reembed-3jz0p2jk.js → boot-reembed-4bbpxjh1.js} +1 -1
  12. package/dist/{boot-scrub-sweep-scrqhw48.js → boot-scrub-sweep-eajr97e9.js} +2 -2
  13. package/dist/{boot-seeds-vb2dcrrb.js → boot-seeds-9cwy39jx.js} +4 -4
  14. package/dist/{boxd-68n75y1s.js → boxd-hr8rsxzq.js} +1 -1
  15. package/dist/{claude-adapter-h3mp9hgs.js → claude-adapter-g61wa4rt.js} +9 -9
  16. package/dist/{claude-managed-adapter-kpbyj2vb.js → claude-managed-adapter-znkk0prm.js} +3 -3
  17. package/dist/{claude-managed-setup-0efr3wkg.js → claude-managed-setup-f1wndkr2.js} +2 -2
  18. package/dist/{claude-sdk-session-03dw669q.js → claude-sdk-session-687xzf21.js} +20763 -19381
  19. package/dist/{cli-gfcv679k.js → cli-04103ryh.js} +1 -1
  20. package/dist/{cli-hbq0kwxz.js → cli-0a336ze7.js} +4 -4
  21. package/dist/{cli-1v82d2w6.js → cli-0fx95c06.js} +4 -4
  22. package/dist/{cli-wxwv3t11.js → cli-0m77n7ej.js} +3 -3
  23. package/dist/{cli-j53hpbsm.js → cli-0xwb7zpt.js} +2 -2
  24. package/dist/{cli-0dg7ytxm.js → cli-13t0smbk.js} +917 -23
  25. package/dist/{cli-0pazkmd4.js → cli-1b5axkt1.js} +4 -4
  26. package/dist/{cli-6h88mn9q.js → cli-1carhg8g.js} +4 -4
  27. package/dist/{cli-hgsxnjyg.js → cli-1dr5at77.js} +10 -10
  28. package/dist/{cli-0jkenasr.js → cli-2v4xxnx2.js} +1 -1
  29. package/dist/{cli-dnh64e8e.js → cli-32xndx6b.js} +6 -6
  30. package/dist/{cli-hpb9x72z.js → cli-3m8vqehw.js} +9 -9
  31. package/dist/{cli-ercwc8xn.js → cli-3mf04tkh.js} +1 -1
  32. package/dist/{cli-7dbhnsj9.js → cli-3zyme1wt.js} +4 -4
  33. package/dist/{cli-s6zk31gr.js → cli-43dsqhcp.js} +4 -4
  34. package/dist/{cli-t35hx078.js → cli-4h90xaet.js} +2 -2
  35. package/dist/{cli-117g15t4.js → cli-4mj5g29m.js} +8 -8
  36. package/dist/{cli-47hz21se.js → cli-4tbvndmm.js} +4 -5
  37. package/dist/{cli-tn91wc6e.js → cli-50whymxq.js} +1 -1
  38. package/dist/{cli-js10kdk7.js → cli-5basv0e7.js} +19 -5
  39. package/dist/{cli-xfjn2kyq.js → cli-5v6b2am8.js} +5 -5
  40. package/dist/{cli-49f5jyhh.js → cli-6r1dwegd.js} +3 -3
  41. package/dist/{cli-kspxjftk.js → cli-7ewre3dm.js} +15 -6
  42. package/dist/{cli-n3qe7tyr.js → cli-84xtgbn6.js} +35 -2
  43. package/dist/{cli-w14j2z4k.js → cli-8cmjkbvj.js} +2 -2
  44. package/dist/{cli-2m6yaq6b.js → cli-8fj8yfmk.js} +1 -1
  45. package/dist/{cli-9m9kyw77.js → cli-8rbkw18r.js} +2 -2
  46. package/dist/{cli-x05p2d05.js → cli-9tevdxyf.js} +1 -1
  47. package/dist/{cli-f1952kjy.js → cli-9xx36trj.js} +4 -4
  48. package/dist/{cli-hc6e4tac.js → cli-a8ts6x1n.js} +6 -6
  49. package/dist/{cli-mh7pdxe0.js → cli-aebswqmz.js} +12 -12
  50. package/dist/{cli-ex1y88j3.js → cli-at67kvnp.js} +1 -1
  51. package/dist/{cli-b2jh3dyb.js → cli-bjmq14k9.js} +4 -4
  52. package/dist/{cli-mz34pxbk.js → cli-byxsctca.js} +11 -11
  53. package/dist/{cli-dka73bak.js → cli-c0tyzt73.js} +152 -12
  54. package/dist/{cli-wv20kbr3.js → cli-c8kqmzzf.js} +5 -5
  55. package/dist/{cli-qhhb30e8.js → cli-cd9acnvd.js} +9 -9
  56. package/dist/{cli-wndegmns.js → cli-cmgdptmx.js} +3 -3
  57. package/dist/{cli-1dbv9mj9.js → cli-cn6fpa1p.js} +1 -1
  58. package/dist/{cli-wrhbym01.js → cli-cp0m07wb.js} +6 -6
  59. package/dist/{cli-3p288654.js → cli-cpkxh68d.js} +2 -2
  60. package/dist/{cli-g6j6ac3h.js → cli-cqxwjb93.js} +2 -2
  61. package/dist/{cli-8hp56wat.js → cli-d2epqm0y.js} +1 -1
  62. package/dist/{cli-qm3ntjqs.js → cli-dd57p1gd.js} +13 -13
  63. package/dist/{cli-tstj6e8e.js → cli-fn8aj7gb.js} +250 -55
  64. package/dist/{cli-bpje8n65.js → cli-fp65jdp2.js} +31 -6
  65. package/dist/{cli-2skf1mdf.js → cli-gedf48yw.js} +4 -4
  66. package/dist/{cli-c8v2yvej.js → cli-gq6qhmrr.js} +2 -2
  67. package/dist/{cli-sq913bh1.js → cli-grcc2h2g.js} +8 -8
  68. package/dist/{cli-qec9bynj.js → cli-h03j6je3.js} +3 -3
  69. package/dist/{cli-mbwmqb5w.js → cli-h0ewec3d.js} +1 -1
  70. package/dist/{cli-jj3c5nyb.js → cli-h9bejmkf.js} +76 -39
  71. package/dist/{cli-ct8sz3np.js → cli-hs3mqswp.js} +6 -6
  72. package/dist/{cli-tdk7jtka.js → cli-hv3820ez.js} +1 -1
  73. package/dist/{cli-pqfecppn.js → cli-je587f74.js} +1 -1
  74. package/dist/{cli-y4a4458j.js → cli-jhtvt7gn.js} +3 -3
  75. package/dist/{cli-dkejt425.js → cli-mmw2sjaf.js} +7 -7
  76. package/dist/{cli-50w82h6m.js → cli-mwxez0pz.js} +1 -0
  77. package/dist/{cli-avxh26pd.js → cli-nk8swfpx.js} +4 -4
  78. package/dist/{cli-fhvk2nvp.js → cli-p7g7wd9n.js} +9 -9
  79. package/dist/{cli-bhgrhedp.js → cli-q8aq48v1.js} +1 -1
  80. package/dist/{cli-6a40p4kv.js → cli-qn79645p.js} +1 -1
  81. package/dist/{cli-nc6a8b5b.js → cli-qx1dwrr5.js} +2 -2
  82. package/dist/{cli-sdh61g52.js → cli-s6fhqbz1.js} +2 -2
  83. package/dist/{cli-eb279wn3.js → cli-sfajkbd7.js} +2 -2
  84. package/dist/{cli-z64t9pe6.js → cli-snypfjgj.js} +1 -1
  85. package/dist/{cli-ytc7fpza.js → cli-t25rq8mg.js} +4 -4
  86. package/dist/{cli-zqmmy073.js → cli-t90k0phh.js} +18 -18
  87. package/dist/{cli-fz9pcjsw.js → cli-tzzas8rb.js} +4 -4
  88. package/dist/{cli-rtmqzat7.js → cli-vdfngx2g.js} +2 -2
  89. package/dist/{cli-9w8712tq.js → cli-vr4eyq6p.js} +43 -14
  90. package/dist/{cli-z4f346g5.js → cli-vx9acp12.js} +1 -1
  91. package/dist/{cli-y518qkjg.js → cli-w24f3j49.js} +10 -10
  92. package/dist/{cli-yn4kt85g.js → cli-w41bvvms.js} +1 -1
  93. package/dist/{cli-9fsagra4.js → cli-w6c6dj91.js} +1 -1
  94. package/dist/{cli-kde4ky90.js → cli-x5yb8zc8.js} +2 -2
  95. package/dist/{cli-48nvk6sb.js → cli-xhkek467.js} +2 -2
  96. package/dist/{cli-avqkr20b.js → cli-y6qqbpwc.js} +2 -2
  97. package/dist/{cli-7wy8gbwb.js → cli-ya1cj689.js} +1 -1
  98. package/dist/{cli-prf7kz78.js → cli-yeh3g1q6.js} +603 -78
  99. package/dist/{cli-ajjvqhf3.js → cli-z6m6xzxt.js} +2 -2
  100. package/dist/{cli-2jk4s7z1.js → cli-zaate0rd.js} +3 -3
  101. package/dist/{cli-n85m2wkq.js → cli-zkbz8m2q.js} +3 -2
  102. package/dist/{cli-0b655smz.js → cli-zvpkrgsc.js} +5 -5
  103. package/dist/cli.js +27 -27
  104. package/dist/{codex-adapter-f3yp0kaj.js → codex-adapter-ysfg6ty3.js} +8 -8
  105. package/dist/{codex-hook-262cekfp.js → codex-hook-c0nvm30r.js} +2 -2
  106. package/dist/{codex-login-1ven7yje.js → codex-login-ven5cz5j.js} +1 -1
  107. package/dist/{codex-session-runner-ns4mv70p.js → codex-session-runner-823scr6g.js} +9 -9
  108. package/dist/{commands-5bzf2tfw.js → commands-5rbm07fz.js} +3 -3
  109. package/dist/{controller-5xt7kvfm.js → controller-wn3vd217.js} +3 -3
  110. package/dist/{controllers-connect-0gg13mzp.js → controllers-connect-34jzhfft.js} +28 -28
  111. package/dist/core-kdehq26g.js +42 -0
  112. package/dist/{cursor-adapter-p0c5zv6r.js → cursor-adapter-w1681kp1.js} +2 -2
  113. package/dist/{db-2s68ycq7.js → db-6bkgbfwk.js} +3 -3
  114. package/dist/{db-q7q639k5.js → db-hcj16x7z.js} +2 -2
  115. package/dist/{devin-adapter-t8d86q9x.js → devin-adapter-fs90ab4v.js} +1 -1
  116. package/dist/{dispatcher-j2y1q7ae.js → dispatcher-jgjqrfzv.js} +25 -25
  117. package/dist/{docker-1b41eysj.js → docker-1h33jvh9.js} +2 -2
  118. package/dist/{dsh-adapter-pgnkf4st.js → dsh-adapter-g9yqv09y.js} +2 -2
  119. package/dist/{e2b-xm60c8ad.js → e2b-jnk0yeva.js} +2 -2
  120. package/dist/{e2b-ew8c5j5v.js → e2b-y7e5kmzf.js} +2 -2
  121. package/dist/{easter-egg-3d-0kea97jf.js → easter-egg-3d-w17nsny6.js} +1 -1
  122. package/dist/{embedding-space-3n6mhhmy.js → embedding-space-v06fwy7b.js} +6 -6
  123. package/dist/{embeddings-jfmj6yme.js → embeddings-g50dxea4.js} +1 -1
  124. package/dist/{event-bus-v4ywhc2p.js → event-bus-08t2b4y2.js} +1 -1
  125. package/dist/{execute-tjrej979.js → execute-1n36haw1.js} +1 -1
  126. package/dist/{external-channel-jy8w2gg3.js → external-channel-43tv8pg6.js} +2 -2
  127. package/dist/fx-adapter-bvh05t4a.js +20 -0
  128. package/dist/grok-adapter-my5j8mdf.js +20 -0
  129. package/dist/handlers-wyymeeqh.js +41 -0
  130. package/dist/heartbeat-sf3nk937.js +50 -0
  131. package/dist/{hook-bpnncsec.js → hook-dqph1e05.js} +8 -8
  132. package/dist/{hook-fv1jwrv7.js → hook-m1m9dm6w.js} +6 -6
  133. package/dist/{http-bpa26czn.js → http-w0th1cz9.js} +160 -102
  134. package/dist/index-22khdtby.js +44 -0
  135. package/dist/{index-mpj0z9e0.js → index-c0e8en64.js} +1 -1
  136. package/dist/{index-620y7jzq.js → index-e8pz8qdg.js} +3 -3
  137. package/dist/{index-8p0j4h4j.js → index-ez823q84.js} +94 -89
  138. package/dist/{index-w216g9y9.js → index-ffba0z8q.js} +35 -21
  139. package/dist/{index-s8re7mvq.js → index-gkpfgpg7.js} +1 -1
  140. package/dist/{index-4k7m5dgj.js → index-k8ajc0g0.js} +143 -103
  141. package/dist/index-np0582ac.js +40 -0
  142. package/dist/{index-52tgbhrw.js → index-pb03vans.js} +28 -28
  143. package/dist/index-vgkrj1jt.js +39 -0
  144. package/dist/{index-pe3d8jfy.js → index-whysn1wf.js} +1 -1
  145. package/dist/{index-0h6qd4p1.js → index-y4vd4mhn.js} +3 -4
  146. package/dist/{k8s-fy8hbhkg.js → k8s-8326q0rq.js} +2 -2
  147. package/dist/{keepalive-d6z12s04.js → keepalive-2v06q2e8.js} +5 -4
  148. package/dist/lead-55z813ng.js +79 -0
  149. package/dist/{maintenance-7kac6g2g.js → maintenance-vx7vjhhy.js} +1 -1
  150. package/dist/{oauth-refresh-sweep-t1xjetbh.js → oauth-refresh-sweep-g06k4bza.js} +4 -3
  151. package/dist/{object-webhooks-6rdagg0r.js → object-webhooks-3dzdq4fm.js} +7 -7
  152. package/dist/{onboard-32y1cfxy.js → onboard-232pazny.js} +4 -4
  153. package/dist/{opencode-adapter-enp3v31n.js → opencode-adapter-t0paqbh8.js} +8 -8
  154. package/dist/{otel-impl-k0tm5ptj.js → otel-impl-kmpkyp4y.js} +2 -2
  155. package/dist/{pending-24zebgvs.js → pending-x0z3vx1x.js} +26 -26
  156. package/dist/{pi-mono-adapter-yj72xxxe.js → pi-mono-adapter-7pmypn6d.js} +17 -15
  157. package/dist/{pricing-refresh-cf25x38j.js → pricing-refresh-ytjmtyd7.js} +2 -2
  158. package/dist/{rbac-roles-0wydd22m.js → rbac-roles-fgm5mxr2.js} +3 -3
  159. package/dist/{rbac-roles-at6crb3r.js → rbac-roles-xyaxekh3.js} +2 -2
  160. package/dist/{render-v2-nvcw0jd7.js → render-v2-ws972g4r.js} +10 -10
  161. package/dist/{resume-y4w0k5v3.js → resume-m6mjzhkp.js} +13 -13
  162. package/dist/{runtime-vpe43hx0.js → runtime-zzpc0c8a.js} +1 -1
  163. package/dist/{session-access-gkyvnfye.js → session-access-vp35xs91.js} +5 -5
  164. package/dist/{session-source-backfill-3w2st4m2.js → session-source-backfill-p73e8zbe.js} +2 -2
  165. package/dist/{setup-axxvqtys.js → setup-r4kd7rxg.js} +1 -1
  166. package/dist/thread-buffer-cm2nzq6t.js +42 -0
  167. package/dist/{tree-visibility-y4fqvab5.js → tree-visibility-07h2tbs2.js} +2 -2
  168. package/dist/{user-merge-jobs-kcmwvrc6.js → user-merge-jobs-96vg9rpe.js} +3 -3
  169. package/dist/{virtual-modules-7d92dct1.js → virtual-modules-vgn3f2x4.js} +3 -3
  170. package/dist/{work-objects-f708e069.js → work-objects-74hbcx3e.js} +28 -28
  171. package/dist/worker-5pn2vzx6.js +79 -0
  172. package/dist/{worker-follow-up-0by8wztc.js → worker-follow-up-ezavwn5d.js} +25 -25
  173. package/dist/{x-3dtaf2r9.js → x-asbrnafg.js} +2 -2
  174. package/openapi.json +1793 -1622
  175. package/package.json +10 -10
  176. package/src/apps/catalog.generated.json +726 -0
  177. package/src/apps/definition.ts +24 -7
  178. package/src/apps/page-validator.ts +225 -3
  179. package/src/be/db.ts +38 -10
  180. package/src/be/mcp-proxy.ts +5 -4
  181. package/src/be/migrations/340_api_key_spend_cap.sql +5 -0
  182. package/src/be/schedules/validate.ts +26 -0
  183. package/src/be/swarm-config-guard.ts +4 -0
  184. package/src/commands/credential-outcome-report.ts +5 -2
  185. package/src/commands/onboard/agent-fs-version.ts +1 -1
  186. package/src/commands/provider-credentials.ts +19 -0
  187. package/src/commands/provider-error-class.ts +4 -1
  188. package/src/commands/rate-limit-outcome.ts +48 -3
  189. package/src/commands/runner.ts +113 -55
  190. package/src/commands/worktree-reaper.ts +600 -0
  191. package/src/extensions/contract-types.generated.ts +1 -1
  192. package/src/http/agents.ts +4 -0
  193. package/src/http/api-keys.ts +27 -3
  194. package/src/http/pages-public.ts +40 -4
  195. package/src/http/pool-keys.ts +21 -2
  196. package/src/http/schedules.ts +28 -3
  197. package/src/http/script-connections.ts +12 -4
  198. package/src/http/script-runs.ts +12 -3
  199. package/src/http/tasks.ts +6 -10
  200. package/src/mcp-client/http-client.ts +3 -1
  201. package/src/oauth/identity-capture.ts +6 -1
  202. package/src/oauth/mcp-wrapper.ts +10 -3
  203. package/src/oauth/wrapper.ts +15 -3
  204. package/src/prompts/session-templates.ts +1 -0
  205. package/src/providers/acp-targets.ts +2 -2
  206. package/src/providers/amp-adapter.ts +1 -1
  207. package/src/providers/dsh-adapter.ts +1 -1
  208. package/src/providers/pi-mono-adapter.ts +4 -2
  209. package/src/providers/runtime-dependencies.ts +1 -1
  210. package/src/rbac/legacy-policy.ts +2 -0
  211. package/src/rbac/permissions.ts +5 -0
  212. package/src/scripts-runtime/types/swarm-extension.d.ts +7 -7
  213. package/src/slack/enrich.ts +14 -11
  214. package/src/tests/agents-list-model-display.test.ts +23 -0
  215. package/src/tests/apps-spike2.test.ts +35 -0
  216. package/src/tests/base-prompt.test.ts +1 -0
  217. package/src/tests/deploy-guard.test.ts +24 -0
  218. package/src/tests/dsh-adapter.test.ts +1 -1
  219. package/src/tests/ensure-token.test.ts +2 -2
  220. package/src/tests/entrypoint-repo-autoclone-args.test.ts +202 -0
  221. package/src/tests/fake-dns.ts +47 -0
  222. package/src/tests/fixtures/base-prompt-baseline.json +12 -12
  223. package/src/tests/latest-model-report.test.ts +138 -0
  224. package/src/tests/mcp-oauth-dcr-reuse.test.ts +5 -2
  225. package/src/tests/mcp-oauth-ensure-token.test.ts +3 -2
  226. package/src/tests/mcp-oauth-manual-client.test.ts +6 -1
  227. package/src/tests/mcp-oauth-wrapper.test.ts +20 -4
  228. package/src/tests/mcp-outbound-fetch-guard.test.ts +169 -0
  229. package/src/tests/mcp-server-ssrf.test.ts +2 -0
  230. package/src/tests/memory-search-stall.test.ts +5 -0
  231. package/src/tests/oauth-connection-fetch-guard.test.ts +162 -0
  232. package/src/tests/oauth-token-endpoint-fetch-guard.test.ts +121 -0
  233. package/src/tests/oauth-wrapper.test.ts +1 -2
  234. package/src/tests/pages-head-v2.test.ts +2 -1
  235. package/src/tests/script-connections-http.test.ts +8 -3
  236. package/src/tests/script-connections.test.ts +2 -0
  237. package/src/tests/slack-thread-participants.test.ts +14 -3
  238. package/src/tests/spend-cap-credentials.test.ts +34 -0
  239. package/src/tests/spend-cap-outcome.test.ts +67 -0
  240. package/src/tests/subscription-first.test.ts +119 -0
  241. package/src/tests/worktree-reaper.test.ts +424 -0
  242. package/src/tools/get-task-details.ts +247 -5
  243. package/src/tools/schedules/patch-schedule.ts +26 -1
  244. package/src/tools/schedules/update-schedule.ts +28 -2
  245. package/src/utils/credentials.ts +36 -1
  246. package/src/utils/egress-guard.ts +40 -10
  247. package/src/utils/error-tracker.ts +17 -0
  248. package/templates/skills/apps/SKILL.md +191 -2
  249. package/templates/skills/apps/content.md +191 -2
  250. package/templates/skills/boards-and-sheets/content.md +11 -0
  251. package/templates/skills/pages/content.md +11 -0
  252. package/templates/skills/swarm-docs/content.md +2 -0
  253. package/templates/skills/swarm-scripts/SKILL.md +1 -0
  254. package/templates/skills/swarm-scripts/content.md +1 -0
  255. package/templates/workflows/ralph-loop/content.md +6 -6
  256. package/dist/acp-adapter-cn53011z.js +0 -17
  257. package/dist/cli-pr0eze3x.js +0 -149
  258. package/dist/core-0fqtbrxa.js +0 -42
  259. package/dist/fx-adapter-k6w3jvz9.js +0 -20
  260. package/dist/grok-adapter-4q5tssw0.js +0 -20
  261. package/dist/handlers-qxgfvvsf.js +0 -41
  262. package/dist/heartbeat-6tr2w2da.js +0 -50
  263. package/dist/index-0mcxjdsa.js +0 -44
  264. package/dist/index-dz4q23ag.js +0 -40
  265. package/dist/index-s175jckx.js +0 -39
  266. package/dist/lead-p3hx7h35.js +0 -79
  267. package/dist/thread-buffer-rwa7d4dx.js +0 -42
  268. package/dist/worker-8rg9gz74.js +0 -79
@@ -4,7 +4,7 @@ import {
4
4
  cardChildToFallbackText2,
5
5
  isCardElement2,
6
6
  init_dist8
7
- } from "./cli-9w8712tq.js";
7
+ } from "./cli-vr4eyq6p.js";
8
8
  import {
9
9
  __esm
10
10
  } from "./cli-242037k3.js";
@@ -169,6 +169,38 @@ function maskCodeSpans(text, replacement = " ") {
169
169
  var HTTP = "http://", HTTPS = "https://";
170
170
  var init_chunk_KGHU3EYG = () => {};
171
171
 
172
+ // node_modules/@chat-adapter/shared/dist/chunk-5C7UKIZ7.js
173
+ function isChatCallbackData(data) {
174
+ return data.startsWith(CALLBACK_DATA_PREFIX);
175
+ }
176
+ function encodeCallbackData(actionId, value) {
177
+ const payload = { a: actionId };
178
+ if (typeof value === "string") {
179
+ payload.v = value;
180
+ }
181
+ return `${CALLBACK_DATA_PREFIX}${JSON.stringify(payload)}`;
182
+ }
183
+ function decodeCallbackData(data, fallbackActionId) {
184
+ if (!data) {
185
+ return { actionId: fallbackActionId, value: undefined };
186
+ }
187
+ if (!isChatCallbackData(data)) {
188
+ return { actionId: data, value: data };
189
+ }
190
+ try {
191
+ const decoded = JSON.parse(data.slice(CALLBACK_DATA_PREFIX.length));
192
+ if (typeof decoded.a === "string" && decoded.a) {
193
+ return {
194
+ actionId: decoded.a,
195
+ value: typeof decoded.v === "string" ? decoded.v : undefined
196
+ };
197
+ }
198
+ } catch {}
199
+ return { actionId: data, value: data };
200
+ }
201
+ var CALLBACK_DATA_PREFIX = "chat:";
202
+ var init_chunk_5C7UKIZ7 = () => {};
203
+
172
204
  // node_modules/@chat-adapter/shared/dist/index.js
173
205
  import crypto from "crypto";
174
206
  import { lookup as resolve } from "dns/promises";
@@ -532,6 +564,7 @@ async function downloadAttachment(value, options) {
532
564
  }
533
565
  var AdapterError, AdapterRateLimitError, AuthenticationError3, ResourceNotFoundError, PermissionError, ValidationError, NetworkError, BUTTON_STYLE_MAPPINGS, ALGORITHM = "aes-256-gcm", IV_LENGTH = 12, AUTH_TAG_LENGTH = 16, HEX_KEY_PATTERN, LIMIT, REDIRECTS = 5, TIMEOUT = 30000, STATUSES, BRACKETS, IPV4, IPV6, DECODERS, BLOCKED4, BLOCKED6;
534
566
  var init_dist7 = __esm(() => {
567
+ init_chunk_5C7UKIZ7();
535
568
  init_chunk_KGHU3EYG();
536
569
  init_dist8();
537
570
  init_dist8();
@@ -641,4 +674,4 @@ var init_dist7 = __esm(() => {
641
674
  BLOCKED6 = blocklist(IPV6, "ipv6");
642
675
  });
643
676
 
644
- export { replaceBareMentions, maskCodeSpans, init_chunk_KGHU3EYG, extractCard, extractFiles, extractPostableAttachments, AdapterRateLimitError, AuthenticationError3, ResourceNotFoundError, PermissionError, ValidationError, NetworkError, toBuffer, bufferToDataUri, createEmojiConverter, mapButtonStyle, cardToFallbackText3, escapeTableCell, renderGfmTable, encryptToken, decryptToken, isEncryptedTokenData, decodeKey, downloadAttachment, init_dist7 };
677
+ export { replaceBareMentions, maskCodeSpans, init_chunk_KGHU3EYG, encodeCallbackData, decodeCallbackData, extractCard, extractFiles, extractPostableAttachments, AdapterRateLimitError, AuthenticationError3, ResourceNotFoundError, PermissionError, ValidationError, NetworkError, toBuffer, bufferToDataUri, createEmojiConverter, mapButtonStyle, cardToFallbackText3, escapeTableCell, renderGfmTable, encryptToken, decryptToken, isEncryptedTokenData, decodeKey, downloadAttachment, init_dist7 };
@@ -10,12 +10,12 @@ import {
10
10
  resolveConfigValueOrThrow,
11
11
  resolveHeadersOrThrow,
12
12
  FileAuthStorageBackend
13
- } from "./cli-sq913bh1.js";
13
+ } from "./cli-grcc2h2g.js";
14
14
  import {
15
15
  oauthSuccessHtml,
16
16
  oauthErrorHtml,
17
17
  init_oauth_page
18
- } from "./cli-48nvk6sb.js";
18
+ } from "./cli-xhkek467.js";
19
19
  import {
20
20
  __toESM
21
21
  } from "./cli-242037k3.js";
@@ -5,7 +5,7 @@ import {
5
5
  import {
6
6
  scrubSecrets,
7
7
  init_secret_scrubber
8
- } from "./cli-bpje8n65.js";
8
+ } from "./cli-fp65jdp2.js";
9
9
  import {
10
10
  __esm
11
11
  } from "./cli-242037k3.js";
@@ -12,11 +12,11 @@ import {
12
12
  isModelNameTakenError,
13
13
  init_model_profiles,
14
14
  init_db4
15
- } from "./cli-jj3c5nyb.js";
15
+ } from "./cli-h9bejmkf.js";
16
16
  import {
17
17
  ensureRbacSeedsSynced2,
18
18
  init_rbac_roles
19
- } from "./cli-nc6a8b5b.js";
19
+ } from "./cli-qx1dwrr5.js";
20
20
  import {
21
21
  MODEL_TIERS,
22
22
  DEFAULT_MODEL_TIER_MAP,
@@ -49,7 +49,7 @@ class McpHttpClient {
49
49
  const url = this.useRawUrl ? this.baseUrl : `${this.baseUrl}/mcp`;
50
50
  try {
51
51
  this.options.validateUrl?.(url);
52
- const res = await fetch(url, {
52
+ const res = await (this.options.fetch ?? fetch)(url, {
53
53
  method: "POST",
54
54
  headers,
55
55
  body: JSON.stringify(body),
@@ -3,14 +3,14 @@ import {
3
3
  requireFxRoute,
4
4
  fxSessionExists2,
5
5
  fxTargetProfile2
6
- } from "./cli-wrhbym01.js";
6
+ } from "./cli-cp0m07wb.js";
7
7
  import {
8
8
  ACPAdapter2
9
- } from "./cli-wxwv3t11.js";
9
+ } from "./cli-0m77n7ej.js";
10
10
  import {
11
11
  getKnownContextWindowSize,
12
12
  init_context_window
13
- } from "./cli-3p288654.js";
13
+ } from "./cli-cpkxh68d.js";
14
14
  import {
15
15
  getOpenRouterBaseUrl,
16
16
  init_openrouter_base_url
@@ -18,7 +18,7 @@ import {
18
18
  import {
19
19
  registerVolatileSecret,
20
20
  init_secret_scrubber
21
- } from "./cli-bpje8n65.js";
21
+ } from "./cli-fp65jdp2.js";
22
22
 
23
23
  // src/providers/fx-adapter.ts
24
24
  init_context_window();
@@ -15,24 +15,24 @@ import {
15
15
  init_active_sessions,
16
16
  getSteeringMessageById2,
17
17
  init_db4
18
- } from "./cli-jj3c5nyb.js";
18
+ } from "./cli-h9bejmkf.js";
19
19
  import {
20
20
  userHoldsExplicitVerb2,
21
21
  getUserGrant2,
22
22
  init_rbac_roles
23
- } from "./cli-nc6a8b5b.js";
23
+ } from "./cli-qx1dwrr5.js";
24
24
  import {
25
25
  hasSessionAccess,
26
26
  getSessionRoot,
27
27
  sessionAccessForRoot,
28
28
  sessionAccess,
29
29
  init_session_shares
30
- } from "./cli-yn4kt85g.js";
30
+ } from "./cli-w41bvvms.js";
31
31
  import {
32
32
  findUserById,
33
33
  findUserByExternalId,
34
34
  init_users
35
- } from "./cli-ajjvqhf3.js";
35
+ } from "./cli-z6m6xzxt.js";
36
36
  import {
37
37
  isGroupKey,
38
38
  init_key
@@ -56,7 +56,7 @@ import {
56
56
  import {
57
57
  scrubSecrets,
58
58
  init_secret_scrubber
59
- } from "./cli-bpje8n65.js";
59
+ } from "./cli-fp65jdp2.js";
60
60
  import {
61
61
  __esm
62
62
  } from "./cli-242037k3.js";
@@ -514,7 +514,7 @@ function route(def) {
514
514
  try {
515
515
  const rawBody = def.body ? await parseBody(req, def.maxBodyBytes) : undefined;
516
516
  if (def.session && "bodyTaskIds" in def.session) {
517
- const { bodySessionDenial } = await import("./session-access-gkyvnfye.js");
517
+ const { bodySessionDenial } = await import("./session-access-vp35xs91.js");
518
518
  const denial = await bodySessionDenial(req, def.session.bodyTaskIds(rawBody));
519
519
  if (denial) {
520
520
  jsonError(res, denial, 403);
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  workflowEventBus2,
3
3
  init_event_bus
4
- } from "./cli-z4f346g5.js";
4
+ } from "./cli-vx9acp12.js";
5
5
  import {
6
6
  withLoopPath,
7
7
  init_event_loop_lag,
@@ -70,11 +70,11 @@ import {
70
70
  getStaleApprovalRequests2,
71
71
  upsertKv2,
72
72
  init_db4
73
- } from "./cli-jj3c5nyb.js";
73
+ } from "./cli-h9bejmkf.js";
74
74
  import {
75
75
  listRuntimePools2,
76
76
  init_db2
77
- } from "./cli-1v82d2w6.js";
77
+ } from "./cli-0fx95c06.js";
78
78
  import {
79
79
  runtimeStaleThresholdMinutes,
80
80
  countActiveRuntimeInstancesForAgent,
@@ -84,15 +84,15 @@ import {
84
84
  init_multi_runtime,
85
85
  createApprovalFollowUpTask2,
86
86
  init_approval_notifications
87
- } from "./cli-ct8sz3np.js";
87
+ } from "./cli-hs3mqswp.js";
88
88
  import {
89
89
  userHoldsOperatorGrantedRole2,
90
90
  assertMayActOnOperatorGrantedTarget2,
91
91
  init_rbac_roles
92
- } from "./cli-nc6a8b5b.js";
92
+ } from "./cli-qx1dwrr5.js";
93
93
  import {
94
94
  remediateStalledRuntime
95
- } from "./cli-mz34pxbk.js";
95
+ } from "./cli-byxsctca.js";
96
96
  import {
97
97
  recoverIncompleteRuns,
98
98
  init_recovery,
@@ -120,13 +120,13 @@ import {
120
120
  init_approval_cancel,
121
121
  canClaim,
122
122
  init_budget_admission
123
- } from "./cli-tstj6e8e.js";
123
+ } from "./cli-fn8aj7gb.js";
124
124
  import {
125
125
  runScriptWithRunCredential,
126
126
  init_run_credential,
127
127
  runSavedScriptAsAgent,
128
128
  init_run_saved
129
- } from "./cli-0dg7ytxm.js";
129
+ } from "./cli-13t0smbk.js";
130
130
  import {
131
131
  isMultiRuntimeEnabled,
132
132
  init_multi_runtime2
@@ -135,7 +135,7 @@ import {
135
135
  recordIdentityEvent,
136
136
  mintToken,
137
137
  init_users
138
- } from "./cli-ajjvqhf3.js";
138
+ } from "./cli-z6m6xzxt.js";
139
139
  import {
140
140
  DEFAULT_OPENROUTER_BASE_URL,
141
141
  getOpenRouterBaseUrl,
@@ -146,7 +146,7 @@ import {
146
146
  init_registry3,
147
147
  resolveTemplate,
148
148
  init_resolver
149
- } from "./cli-50w82h6m.js";
149
+ } from "./cli-mwxez0pz.js";
150
150
  import {
151
151
  TERMINAL_TASK_STATUSES,
152
152
  OPEN_TASK_STATUSES,
@@ -160,11 +160,11 @@ import {
160
160
  import {
161
161
  init_package,
162
162
  package_default
163
- } from "./cli-y518qkjg.js";
163
+ } from "./cli-w24f3j49.js";
164
164
  import {
165
165
  scrubSecrets,
166
166
  init_secret_scrubber
167
- } from "./cli-bpje8n65.js";
167
+ } from "./cli-fp65jdp2.js";
168
168
 
169
169
  // src/be/runtime-pools/routing.ts
170
170
  init_multi_runtime2();
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  getContextWindowSize,
6
6
  init_context_window
7
- } from "./cli-3p288654.js";
7
+ } from "./cli-cpkxh68d.js";
8
8
 
9
9
  // src/providers/swarm-events-shared.ts
10
10
  init_context_window();
@@ -17,7 +17,7 @@ import {
17
17
  deleteSkillFile2,
18
18
  getSkillById2,
19
19
  init_db4
20
- } from "./cli-jj3c5nyb.js";
20
+ } from "./cli-h9bejmkf.js";
21
21
  import {
22
22
  snapshotAndUpdateWorkflow,
23
23
  init_version,
@@ -28,15 +28,15 @@ import {
28
28
  liveSkillSpec,
29
29
  skillHash,
30
30
  init_assets
31
- } from "./cli-tstj6e8e.js";
31
+ } from "./cli-fn8aj7gb.js";
32
32
  import {
33
33
  getSeedState,
34
34
  init_state_db
35
- } from "./cli-0dg7ytxm.js";
35
+ } from "./cli-13t0smbk.js";
36
36
  import {
37
37
  matchesDefaultIdentityMd,
38
38
  init_defaults
39
- } from "./cli-sdh61g52.js";
39
+ } from "./cli-s6fhqbz1.js";
40
40
  import {
41
41
  __esm
42
42
  } from "./cli-242037k3.js";
@@ -4,7 +4,7 @@ import {
4
4
  CONTROLLER_COMMAND_TIMEOUT_MS,
5
5
  RuntimeHandleSchema,
6
6
  ControllerStatusResultSchema
7
- } from "./cli-tn91wc6e.js";
7
+ } from "./cli-50whymxq.js";
8
8
  import {
9
9
  getDbClient2,
10
10
  validateControllerGraceSec,
@@ -19,7 +19,7 @@ import {
19
19
  upsertSwarmConfig2,
20
20
  getResolvedConfig2,
21
21
  init_db4
22
- } from "./cli-jj3c5nyb.js";
22
+ } from "./cli-h9bejmkf.js";
23
23
  import {
24
24
  getPoolCache,
25
25
  reconcileCacheReleases,
@@ -33,11 +33,11 @@ import {
33
33
  getPoolForAgent2,
34
34
  resolvePoolDelivery2,
35
35
  init_db2
36
- } from "./cli-1v82d2w6.js";
36
+ } from "./cli-0fx95c06.js";
37
37
  import {
38
38
  workflowEventBus2,
39
39
  init_event_bus
40
- } from "./cli-z4f346g5.js";
40
+ } from "./cli-vx9acp12.js";
41
41
  import {
42
42
  runtimeStaleThresholdMinutes,
43
43
  getRuntimeInstanceById,
@@ -47,7 +47,7 @@ import {
47
47
  listRuntimeInstancesForAgent,
48
48
  listRuntimeInstancesForPool,
49
49
  init_multi_runtime
50
- } from "./cli-ct8sz3np.js";
50
+ } from "./cli-hs3mqswp.js";
51
51
  import {
52
52
  pendingWorkForAgent,
53
53
  countPoolRuntimes,
@@ -57,7 +57,7 @@ import {
57
57
  init_worker_follow_up,
58
58
  canClaim,
59
59
  init_budget_admission
60
- } from "./cli-tstj6e8e.js";
60
+ } from "./cli-fn8aj7gb.js";
61
61
  import {
62
62
  isMultiRuntimeEnabled,
63
63
  init_multi_runtime2
@@ -65,7 +65,7 @@ import {
65
65
  import {
66
66
  buildImageTemplate,
67
67
  init_dispatch
68
- } from "./cli-mbwmqb5w.js";
68
+ } from "./cli-h0ewec3d.js";
69
69
  import {
70
70
  resolveWorkerApiUrl,
71
71
  init_worker_api_url
@@ -74,7 +74,7 @@ import {
74
74
  canProvisionKind,
75
75
  createRuntimeProvider,
76
76
  init_runtime_providers
77
- } from "./cli-s6zk31gr.js";
77
+ } from "./cli-43dsqhcp.js";
78
78
  import {
79
79
  workspaceVolumeKey,
80
80
  RUNTIME_LABELS,
@@ -87,7 +87,7 @@ import {
87
87
  import {
88
88
  mintRuntimeToken,
89
89
  init_users
90
- } from "./cli-ajjvqhf3.js";
90
+ } from "./cli-z6m6xzxt.js";
91
91
  import {
92
92
  TERMINAL_TASK_STATUSES,
93
93
  isTerminalTaskStatus,
@@ -109,7 +109,7 @@ import {
109
109
  scrubSecrets,
110
110
  registerVolatileSecret,
111
111
  init_secret_scrubber
112
- } from "./cli-bpje8n65.js";
112
+ } from "./cli-fp65jdp2.js";
113
113
 
114
114
  // src/be/runtime-pools/supervisor.ts
115
115
  init_runtime_providers();
@@ -524,7 +524,7 @@ async function recoverSessions(runtimeId, reason) {
524
524
  }
525
525
  if (!sessions.length)
526
526
  return;
527
- const { remediateTaskForDeadRuntime } = await import("./heartbeat-6tr2w2da.js");
527
+ const { remediateTaskForDeadRuntime } = await import("./heartbeat-sf3nk937.js");
528
528
  for (const session of sessions) {
529
529
  try {
530
530
  const task = await getTaskById2(session.taskId);
@@ -1,13 +1,7 @@
1
1
  import {
2
- generateRandomCodeVerifier,
3
- generateRandomState,
4
- calculatePKCECodeChallenge,
5
- init_build
6
- } from "./cli-pr0eze3x.js";
7
- import {
8
- assertUrlSafe,
2
+ createSsrfGuardedFetch,
9
3
  init_egress_guard
10
- } from "./cli-jj3c5nyb.js";
4
+ } from "./cli-h9bejmkf.js";
11
5
  import {
12
6
  isEnvFlagEnabled,
13
7
  init_env_flag
@@ -20,11 +14,155 @@ import {
20
14
  scrubSecrets,
21
15
  registerVolatileSecret,
22
16
  init_secret_scrubber
23
- } from "./cli-bpje8n65.js";
17
+ } from "./cli-fp65jdp2.js";
24
18
  import {
25
19
  __esm
26
20
  } from "./cli-242037k3.js";
27
21
 
22
+ // node_modules/oauth4webapi/build/index.js
23
+ function CodedTypeError(message, code, cause) {
24
+ const err = new TypeError(message, { cause });
25
+ Object.assign(err, { code });
26
+ return err;
27
+ }
28
+ function buf(input) {
29
+ if (typeof input === "string") {
30
+ return encoder.encode(input);
31
+ }
32
+ return decoder.decode(input);
33
+ }
34
+ function b64u(input) {
35
+ if (typeof input === "string") {
36
+ return decodeBase64Url(input);
37
+ }
38
+ return encodeBase64Url(input);
39
+ }
40
+ function OPE(message, code, cause) {
41
+ return new OperationProcessingError(message, { code, cause });
42
+ }
43
+ function assertString(input, it, code, cause) {
44
+ try {
45
+ if (typeof input !== "string") {
46
+ throw CodedTypeError(`${it} must be a string`, ERR_INVALID_ARG_TYPE, cause);
47
+ }
48
+ if (input.length === 0) {
49
+ throw CodedTypeError(`${it} must not be empty`, ERR_INVALID_ARG_VALUE, cause);
50
+ }
51
+ } catch (err) {
52
+ if (code) {
53
+ throw OPE(err.message, code, cause);
54
+ }
55
+ throw err;
56
+ }
57
+ }
58
+ function randomBytes() {
59
+ return b64u(crypto.getRandomValues(new Uint8Array(32)));
60
+ }
61
+ function generateRandomCodeVerifier() {
62
+ return randomBytes();
63
+ }
64
+ function generateRandomState() {
65
+ return randomBytes();
66
+ }
67
+ async function calculatePKCECodeChallenge(codeVerifier) {
68
+ assertString(codeVerifier, "codeVerifier");
69
+ return b64u(await crypto.subtle.digest("SHA-256", buf(codeVerifier)));
70
+ }
71
+ var USER_AGENT, ERR_INVALID_ARG_VALUE = "ERR_INVALID_ARG_VALUE", ERR_INVALID_ARG_TYPE = "ERR_INVALID_ARG_TYPE", allowInsecureRequests, clockSkew, clockTolerance, customFetch, modifyAssertion, jweDecrypt, jwksCache, encoder, decoder, encodeBase64Url, decodeBase64Url, OperationProcessingError, URLParse, tokenMatch = "[a-zA-Z0-9!#$%&\\'\\*\\+\\-\\.\\^_`\\|~]+", token68Match = "[a-zA-Z0-9\\-\\._\\~\\+\\/]+={0,2}", quotedMatch = '"((?:[^"\\\\]|\\\\[\\s\\S])*)"', quotedParamMatcher, paramMatcher, schemeRE, quotedParamRE, unquotedParamRE, token68ParamRE, skipSubjectCheck, idTokenClaims, jwtRefs, branded, nopkce, expectNoNonce, skipAuthTimeCheck, skipStateCheck, expectNoState, _nodiscoverycheck, _expectedIssuer;
72
+ var init_build = __esm(() => {
73
+ if (typeof navigator === "undefined" || !navigator.userAgent?.startsWith?.("Mozilla/5.0 ")) {
74
+ const NAME = "oauth4webapi";
75
+ const VERSION = "v3.8.5";
76
+ USER_AGENT = `${NAME}/${VERSION}`;
77
+ }
78
+ allowInsecureRequests = Symbol();
79
+ clockSkew = Symbol();
80
+ clockTolerance = Symbol();
81
+ customFetch = Symbol();
82
+ modifyAssertion = Symbol();
83
+ jweDecrypt = Symbol();
84
+ jwksCache = Symbol();
85
+ encoder = new TextEncoder;
86
+ decoder = new TextDecoder;
87
+ if (Uint8Array.prototype.toBase64) {
88
+ encodeBase64Url = (input) => {
89
+ if (input instanceof ArrayBuffer) {
90
+ input = new Uint8Array(input);
91
+ }
92
+ return input.toBase64({ alphabet: "base64url", omitPadding: true });
93
+ };
94
+ } else {
95
+ const CHUNK_SIZE = 32768;
96
+ encodeBase64Url = (input) => {
97
+ if (input instanceof ArrayBuffer) {
98
+ input = new Uint8Array(input);
99
+ }
100
+ const arr = [];
101
+ for (let i = 0;i < input.byteLength; i += CHUNK_SIZE) {
102
+ arr.push(String.fromCharCode.apply(null, input.subarray(i, i + CHUNK_SIZE)));
103
+ }
104
+ return btoa(arr.join("")).replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_");
105
+ };
106
+ }
107
+ if (Uint8Array.fromBase64) {
108
+ decodeBase64Url = (input) => {
109
+ try {
110
+ return Uint8Array.fromBase64(input, { alphabet: "base64url" });
111
+ } catch (cause) {
112
+ throw CodedTypeError("The input to be decoded is not correctly encoded.", ERR_INVALID_ARG_VALUE, cause);
113
+ }
114
+ };
115
+ } else {
116
+ decodeBase64Url = (input) => {
117
+ try {
118
+ const binary = atob(input.replace(/-/g, "+").replace(/_/g, "/").replace(/\s/g, ""));
119
+ const bytes = new Uint8Array(binary.length);
120
+ for (let i = 0;i < binary.length; i++) {
121
+ bytes[i] = binary.charCodeAt(i);
122
+ }
123
+ return bytes;
124
+ } catch (cause) {
125
+ throw CodedTypeError("The input to be decoded is not correctly encoded.", ERR_INVALID_ARG_VALUE, cause);
126
+ }
127
+ };
128
+ }
129
+ OperationProcessingError = class OperationProcessingError extends Error {
130
+ code;
131
+ constructor(message, options) {
132
+ super(message, options);
133
+ this.name = this.constructor.name;
134
+ if (options?.code) {
135
+ this.code = options?.code;
136
+ }
137
+ Error.captureStackTrace?.(this, this.constructor);
138
+ }
139
+ };
140
+ URLParse = URL.parse ? (url, base) => URL.parse(url, base) : (url, base) => {
141
+ try {
142
+ return new URL(url, base);
143
+ } catch {
144
+ return null;
145
+ }
146
+ };
147
+ quotedParamMatcher = "(" + tokenMatch + ")\\s*=\\s*" + quotedMatch;
148
+ paramMatcher = "(" + tokenMatch + ")\\s*=\\s*(" + tokenMatch + ")";
149
+ schemeRE = new RegExp("^[,\\s]*(" + tokenMatch + ")");
150
+ quotedParamRE = new RegExp("^[,\\s]*" + quotedParamMatcher + "[,\\s]*(.*)");
151
+ unquotedParamRE = new RegExp("^[,\\s]*" + paramMatcher + "[,\\s]*(.*)");
152
+ token68ParamRE = new RegExp("^(" + token68Match + ")(?:$|[,\\s])(.*)");
153
+ skipSubjectCheck = Symbol();
154
+ idTokenClaims = new WeakMap;
155
+ jwtRefs = new WeakMap;
156
+ branded = new WeakSet;
157
+ nopkce = Symbol();
158
+ expectNoNonce = Symbol();
159
+ skipAuthTimeCheck = Symbol();
160
+ skipStateCheck = Symbol();
161
+ expectNoState = Symbol();
162
+ _nodiscoverycheck = Symbol();
163
+ _expectedIssuer = Symbol();
164
+ });
165
+
28
166
  // src/oauth/mcp-wrapper.ts
29
167
  function isInvalidClientError(message) {
30
168
  return /invalid_client\b/i.test(message);
@@ -43,8 +181,10 @@ function mcpOAuthSsrfOptions() {
43
181
  };
44
182
  }
45
183
  async function safeFetch(url, init, timeoutMs = DEFAULT_FETCH_TIMEOUT_MS) {
46
- assertUrlSafe(url, mcpOAuthSsrfOptions());
47
- return fetch(url, { ...init, signal: init?.signal ?? AbortSignal.timeout(timeoutMs) });
184
+ return createSsrfGuardedFetch(mcpOAuthSsrfOptions())(url, {
185
+ ...init,
186
+ signal: init?.signal ?? AbortSignal.timeout(timeoutMs)
187
+ });
48
188
  }
49
189
  async function discoverProtectedResourceMetadata(resourceUrl) {
50
190
  const base = new URL(resourceUrl);
@@ -316,4 +456,4 @@ var init_mcp_wrapper = __esm(() => {
316
456
  };
317
457
  });
318
458
 
319
- export { isInvalidClientError, publicEndpointSsrfOptions, mcpOAuthSsrfOptions, discoverProtectedResourceMetadata, discoverAuthorizationServerMetadata, normalizeTokenEndpointAuthMethod, resolveAdvertisedTokenEndpointAuthMethod, authMethodForStoredClient, selectDcrTokenEndpointAuthMethod, registerClient, buildAuthorizeUrl, exchangeCodeForTokens, refreshMcpToken, revokeMcpToken, computeExpiresAt, init_mcp_wrapper };
459
+ export { generateRandomCodeVerifier, generateRandomState, calculatePKCECodeChallenge, init_build, isInvalidClientError, publicEndpointSsrfOptions, mcpOAuthSsrfOptions, discoverProtectedResourceMetadata, discoverAuthorizationServerMetadata, normalizeTokenEndpointAuthMethod, resolveAdvertisedTokenEndpointAuthMethod, authMethodForStoredClient, selectDcrTokenEndpointAuthMethod, registerClient, buildAuthorizeUrl, exchangeCodeForTokens, refreshMcpToken, revokeMcpToken, computeExpiresAt, init_mcp_wrapper };
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  contextBoundNoteThreshold,
3
3
  createContextBoundNote
4
- } from "./cli-j53hpbsm.js";
4
+ } from "./cli-0xwb7zpt.js";
5
5
  import {
6
6
  applyReasoningEffort
7
- } from "./cli-rtmqzat7.js";
7
+ } from "./cli-vdfngx2g.js";
8
8
  import {
9
9
  CONTEXT_FORMULA,
10
10
  computeContextUsedUnified,
11
11
  clampContextPercent,
12
12
  init_context_window
13
- } from "./cli-3p288654.js";
13
+ } from "./cli-cpkxh68d.js";
14
14
  import {
15
15
  resolveSlashSkillPrompt
16
16
  } from "./cli-5j88qqa8.js";
@@ -36,7 +36,7 @@ import {
36
36
  scrubSecrets,
37
37
  registerVolatileSecret,
38
38
  init_secret_scrubber
39
- } from "./cli-bpje8n65.js";
39
+ } from "./cli-fp65jdp2.js";
40
40
 
41
41
  // src/providers/amp-adapter.ts
42
42
  import { existsSync, readFileSync, renameSync, rmSync, writeFileSync } from "node:fs";
@@ -48,7 +48,7 @@ init_context_window();
48
48
  init_multi_runtime2();
49
49
  init_process_group();
50
50
  init_secret_scrubber();
51
- var AMP_PACKAGE = "@ampcode/cli@0.0.1794484845-g2f1e0a";
51
+ var AMP_PACKAGE = "@ampcode/cli@0.0.1794571247-g07b20f";
52
52
  var AMP_MCP_SERVER_NAME = "agent-swarm";
53
53
  var AMP_PLUGIN_MODE_KEY = "agent-swarm";
54
54
  var AMP_LIVE_TEST_TIMEOUT_MS = 5000;