@desplega.ai/agent-swarm 2.13.0 → 2.13.2

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 (306) hide show
  1. package/README.md +1 -1
  2. package/dist/acp-adapter-x1qqgzwx.js +17 -0
  3. package/dist/{acp-targets-86f0sh6g.js → acp-targets-mz8c5dnt.js} +10 -10
  4. package/dist/{actions-zv8vcxvr.js → actions-5ft3qp5a.js} +27 -27
  5. package/dist/{agent-fs-provision-jqshb33y.js → agent-fs-provision-6fgz7wvz.js} +4 -4
  6. package/dist/{amp-adapter-gt503ywc.js → amp-adapter-nthn8ezm.js} +3 -3
  7. package/dist/{app-6t4k5rh1.js → app-535m78qw.js} +10 -10
  8. package/dist/{approval-notifications-fcfw063h.js → approval-notifications-dewbk403.js} +11 -11
  9. package/dist/{assistant-9dzybh12.js → assistant-39zyabv2.js} +28 -28
  10. package/dist/{boot-args-schema-xzfp2feg.js → boot-args-schema-bqv5bf77.js} +1 -1
  11. package/dist/{boot-reembed-3jz0p2jk.js → boot-reembed-157c0gcz.js} +1 -1
  12. package/dist/{boot-reembed-r88wngfg.js → boot-reembed-fas7z3zn.js} +1 -1
  13. package/dist/{boot-scrub-sweep-scrqhw48.js → boot-scrub-sweep-tmec0be2.js} +2 -2
  14. package/dist/{boot-seeds-vb2dcrrb.js → boot-seeds-32zm50x2.js} +4 -4
  15. package/dist/{boxd-68n75y1s.js → boxd-hr8rsxzq.js} +1 -1
  16. package/dist/{claude-adapter-h3mp9hgs.js → claude-adapter-gwq7x2nj.js} +9 -9
  17. package/dist/{claude-managed-adapter-kpbyj2vb.js → claude-managed-adapter-rkvw6fvq.js} +4 -4
  18. package/dist/{claude-managed-setup-0efr3wkg.js → claude-managed-setup-0vgz4d1j.js} +6 -6
  19. package/dist/{claude-sdk-session-03dw669q.js → claude-sdk-session-5wbwxy8c.js} +20967 -19390
  20. package/dist/{cli-z64t9pe6.js → cli-0f7n3td3.js} +1 -1
  21. package/dist/{cli-j53hpbsm.js → cli-0xwb7zpt.js} +2 -2
  22. package/dist/{cli-wxwv3t11.js → cli-1f48qdnb.js} +55 -13
  23. package/dist/{cli-gfcv679k.js → cli-1gevjrc1.js} +1 -1
  24. package/dist/{cli-0jkenasr.js → cli-2v4xxnx2.js} +1 -1
  25. package/dist/{cli-hc6e4tac.js → cli-2wde56gv.js} +6 -6
  26. package/dist/{cli-mh7pdxe0.js → cli-31vt7baf.js} +17 -17
  27. package/dist/{cli-ercwc8xn.js → cli-3mf04tkh.js} +1 -1
  28. package/dist/{cli-s6zk31gr.js → cli-43dsqhcp.js} +4 -4
  29. package/dist/{cli-1dbv9mj9.js → cli-4djg31jh.js} +1 -1
  30. package/dist/{cli-tn91wc6e.js → cli-50whymxq.js} +1 -1
  31. package/dist/{cli-js10kdk7.js → cli-5basv0e7.js} +19 -5
  32. package/dist/{cli-b2jh3dyb.js → cli-5k1hvycs.js} +4 -4
  33. package/dist/{cli-dkejt425.js → cli-62fjschk.js} +7 -7
  34. package/dist/{cli-zqmmy073.js → cli-69eq6gdk.js} +18 -18
  35. package/dist/{cli-qm3ntjqs.js → cli-6rmryz03.js} +13 -13
  36. package/dist/{cli-mz34pxbk.js → cli-7m6bbtab.js} +11 -11
  37. package/dist/{cli-wv20kbr3.js → cli-8a4qg44m.js} +5 -5
  38. package/dist/{cli-2m6yaq6b.js → cli-8fj8yfmk.js} +1 -1
  39. package/dist/{cli-9m9kyw77.js → cli-8qvte9hn.js} +2 -2
  40. package/dist/{cli-x05p2d05.js → cli-9tevdxyf.js} +1 -1
  41. package/dist/{cli-qec9bynj.js → cli-a6rzw649.js} +3 -3
  42. package/dist/{cli-ex1y88j3.js → cli-at67kvnp.js} +1 -1
  43. package/dist/{cli-yn4kt85g.js → cli-b0kqw55g.js} +1 -1
  44. package/dist/{cli-n3qe7tyr.js → cli-b0m3bg0f.js} +134 -3
  45. package/dist/{cli-xfjn2kyq.js → cli-bp2rt28p.js} +9 -9
  46. package/dist/{cli-2jk4s7z1.js → cli-c9bwawf9.js} +3 -3
  47. package/dist/{cli-wndegmns.js → cli-cmgdptmx.js} +3 -3
  48. package/dist/{cli-3p288654.js → cli-cpkxh68d.js} +2 -2
  49. package/dist/{cli-117g15t4.js → cli-cs26ed89.js} +8 -8
  50. package/dist/{cli-prf7kz78.js → cli-d0jb2qnt.js} +603 -78
  51. package/dist/{cli-8hp56wat.js → cli-d2epqm0y.js} +1 -1
  52. package/dist/{cli-wrhbym01.js → cli-d528acsw.js} +6 -6
  53. package/dist/{cli-tstj6e8e.js → cli-dnvmwsvc.js} +310 -88
  54. package/dist/{cli-9fsagra4.js → cli-e87fg3en.js} +1 -1
  55. package/dist/{cli-jj3c5nyb.js → cli-erh1rgh4.js} +116 -56
  56. package/dist/{cli-f1952kjy.js → cli-ewb028rs.js} +4 -4
  57. package/dist/{cli-ct8sz3np.js → cli-f1sdh8ca.js} +6 -6
  58. package/dist/{cli-0b655smz.js → cli-fcwrd7bh.js} +5 -5
  59. package/dist/{cli-eb279wn3.js → cli-fgm2mad9.js} +2 -2
  60. package/dist/{cli-bpje8n65.js → cli-fp65jdp2.js} +31 -6
  61. package/dist/{cli-dnh64e8e.js → cli-g0b3ma7r.js} +7 -7
  62. package/dist/{cli-avxh26pd.js → cli-gc7jkf4a.js} +4 -4
  63. package/dist/{cli-2skf1mdf.js → cli-gedf48yw.js} +4 -4
  64. package/dist/{cli-ajjvqhf3.js → cli-getrvmtx.js} +27 -6
  65. package/dist/{cli-c8v2yvej.js → cli-gq6qhmrr.js} +2 -2
  66. package/dist/{cli-mbwmqb5w.js → cli-h0ewec3d.js} +1 -1
  67. package/dist/{cli-tdk7jtka.js → cli-hv3820ez.js} +1 -1
  68. package/dist/{cli-avqkr20b.js → cli-j2ybkdk2.js} +2 -2
  69. package/dist/{cli-pqfecppn.js → cli-je587f74.js} +1 -1
  70. package/dist/{cli-hgsxnjyg.js → cli-jkkcm72j.js} +13 -13
  71. package/dist/{cli-g6j6ac3h.js → cli-ka13xx6b.js} +2 -2
  72. package/dist/{cli-t35hx078.js → cli-m1wddksc.js} +2 -2
  73. package/dist/{cli-50w82h6m.js → cli-mwxez0pz.js} +1 -0
  74. package/dist/{cli-nc6a8b5b.js → cli-n14r8h4n.js} +2 -2
  75. package/dist/{cli-y4a4458j.js → cli-n46d87mj.js} +3 -3
  76. package/dist/{cli-0dg7ytxm.js → cli-nkfv398a.js} +1096 -75
  77. package/dist/{cli-fhvk2nvp.js → cli-nvqq3232.js} +9 -9
  78. package/dist/{cli-bhgrhedp.js → cli-q8aq48v1.js} +1 -1
  79. package/dist/{cli-6a40p4kv.js → cli-qn79645p.js} +1 -1
  80. package/dist/{cli-hbq0kwxz.js → cli-r4fphq38.js} +4 -4
  81. package/dist/{cli-47hz21se.js → cli-r8ddn0hf.js} +4 -5
  82. package/dist/{cli-hpb9x72z.js → cli-rvhaahfv.js} +9 -9
  83. package/dist/{cli-qhhb30e8.js → cli-s08zsqva.js} +9 -9
  84. package/dist/{cli-sdh61g52.js → cli-s6fhqbz1.js} +2 -2
  85. package/dist/{cli-y518qkjg.js → cli-sjk85d7v.js} +13 -12
  86. package/dist/{cli-ytc7fpza.js → cli-t25rq8mg.js} +4 -4
  87. package/dist/{cli-sq913bh1.js → cli-t9nxq30h.js} +8 -8
  88. package/dist/{cli-49f5jyhh.js → cli-tbdw3f92.js} +3 -3
  89. package/dist/{cli-1v82d2w6.js → cli-tceqvv6h.js} +4 -4
  90. package/dist/{cli-fz9pcjsw.js → cli-tgmate57.js} +4 -4
  91. package/dist/{cli-rtmqzat7.js → cli-vdfngx2g.js} +2 -2
  92. package/dist/{cli-9w8712tq.js → cli-vr4eyq6p.js} +43 -14
  93. package/dist/{cli-z4f346g5.js → cli-vx9acp12.js} +1 -1
  94. package/dist/{cli-7dbhnsj9.js → cli-wdtqkqnq.js} +4 -4
  95. package/dist/{cli-kde4ky90.js → cli-x5yb8zc8.js} +2 -2
  96. package/dist/{cli-w14j2z4k.js → cli-x7aqhxj5.js} +2 -2
  97. package/dist/{cli-kspxjftk.js → cli-xerdrnqs.js} +15 -6
  98. package/dist/{cli-48nvk6sb.js → cli-xhkek467.js} +2 -2
  99. package/dist/{cli-dka73bak.js → cli-xysy1g8x.js} +152 -12
  100. package/dist/{cli-7wy8gbwb.js → cli-ya1cj689.js} +1 -1
  101. package/dist/{cli-n85m2wkq.js → cli-zkbz8m2q.js} +3 -2
  102. package/dist/{cli-0pazkmd4.js → cli-zm6bkx3e.js} +4 -4
  103. package/dist/{cli-6h88mn9q.js → cli-zqy28rwx.js} +4 -4
  104. package/dist/cli.js +30 -29
  105. package/dist/{codex-adapter-f3yp0kaj.js → codex-adapter-x25xfbnh.js} +8 -8
  106. package/dist/{codex-hook-262cekfp.js → codex-hook-c0nvm30r.js} +2 -2
  107. package/dist/{codex-login-1ven7yje.js → codex-login-ven5cz5j.js} +1 -1
  108. package/dist/{codex-session-runner-ns4mv70p.js → codex-session-runner-kn5xnrvp.js} +9 -9
  109. package/dist/{commands-5bzf2tfw.js → commands-8n59gxmy.js} +3 -3
  110. package/dist/{controller-5xt7kvfm.js → controller-wn3vd217.js} +3 -3
  111. package/dist/{controllers-connect-0gg13mzp.js → controllers-connect-09gvkrhc.js} +28 -28
  112. package/dist/core-2b8bv6ny.js +42 -0
  113. package/dist/{cursor-adapter-p0c5zv6r.js → cursor-adapter-w1681kp1.js} +2 -2
  114. package/dist/{db-2s68ycq7.js → db-e71keqxk.js} +3 -3
  115. package/dist/{db-q7q639k5.js → db-spg81qtr.js} +2 -2
  116. package/dist/{devin-adapter-t8d86q9x.js → devin-adapter-fs90ab4v.js} +1 -1
  117. package/dist/{dispatcher-j2y1q7ae.js → dispatcher-fr4vawwb.js} +25 -25
  118. package/dist/{docker-1b41eysj.js → docker-1h33jvh9.js} +2 -2
  119. package/dist/{dsh-adapter-pgnkf4st.js → dsh-adapter-g9yqv09y.js} +2 -2
  120. package/dist/{e2b-xm60c8ad.js → e2b-jnk0yeva.js} +2 -2
  121. package/dist/{e2b-ew8c5j5v.js → e2b-y7e5kmzf.js} +2 -2
  122. package/dist/{easter-egg-3d-0kea97jf.js → easter-egg-3d-ac9tv9a6.js} +1 -1
  123. package/dist/{embedding-space-3n6mhhmy.js → embedding-space-an77f45k.js} +6 -6
  124. package/dist/{embeddings-jfmj6yme.js → embeddings-jkrehejr.js} +1 -1
  125. package/dist/{event-bus-v4ywhc2p.js → event-bus-08t2b4y2.js} +1 -1
  126. package/dist/{execute-tjrej979.js → execute-3mys4nta.js} +1 -1
  127. package/dist/{external-channel-jy8w2gg3.js → external-channel-s6zxpts9.js} +2 -2
  128. package/dist/fx-adapter-4yet1c4f.js +20 -0
  129. package/dist/grok-adapter-8ge6tw7m.js +20 -0
  130. package/dist/handlers-0r9evrdj.js +41 -0
  131. package/dist/heartbeat-jjpb44e5.js +50 -0
  132. package/dist/{hook-fv1jwrv7.js → hook-68gbs87k.js} +6 -6
  133. package/dist/{hook-bpnncsec.js → hook-y6n23zzj.js} +8 -8
  134. package/dist/{http-bpa26czn.js → http-8c6y008s.js} +404 -146
  135. package/dist/{index-w216g9y9.js → index-0vthtbc2.js} +38 -22
  136. package/dist/index-1v23363p.js +39 -0
  137. package/dist/index-30qw6vyw.js +44 -0
  138. package/dist/index-6bm3w6cn.js +40 -0
  139. package/dist/{index-s8re7mvq.js → index-6h3r0vpe.js} +1 -1
  140. package/dist/{index-620y7jzq.js → index-7dgxveck.js} +3 -3
  141. package/dist/{index-4k7m5dgj.js → index-maddg9ys.js} +143 -103
  142. package/dist/{index-0h6qd4p1.js → index-mbpxhc4w.js} +3 -4
  143. package/dist/index-rz8ve510.js +569 -0
  144. package/dist/{index-mpj0z9e0.js → index-we3nd2t0.js} +1 -1
  145. package/dist/{index-pe3d8jfy.js → index-whysn1wf.js} +1 -1
  146. package/dist/{index-52tgbhrw.js → index-xcw7hjt5.js} +28 -28
  147. package/dist/{index-8p0j4h4j.js → index-ym9fgxad.js} +94 -89
  148. package/dist/{k8s-fy8hbhkg.js → k8s-8326q0rq.js} +2 -2
  149. package/dist/{keepalive-d6z12s04.js → keepalive-7e9r5dvp.js} +5 -4
  150. package/dist/lead-3jpc7kcr.js +79 -0
  151. package/dist/{maintenance-7kac6g2g.js → maintenance-d3erjvcg.js} +1 -1
  152. package/dist/{oauth-refresh-sweep-t1xjetbh.js → oauth-refresh-sweep-0qh70988.js} +4 -3
  153. package/dist/{object-webhooks-6rdagg0r.js → object-webhooks-ac7v2q5p.js} +7 -7
  154. package/dist/{onboard-32y1cfxy.js → onboard-5yphtken.js} +4 -4
  155. package/dist/{opencode-adapter-enp3v31n.js → opencode-adapter-0xvyba4m.js} +8 -8
  156. package/dist/{otel-impl-k0tm5ptj.js → otel-impl-svqp691q.js} +2 -2
  157. package/dist/{pending-24zebgvs.js → pending-bn4xe5br.js} +26 -26
  158. package/dist/{pi-mono-adapter-yj72xxxe.js → pi-mono-adapter-763s8a3w.js} +20 -18
  159. package/dist/{pricing-refresh-cf25x38j.js → pricing-refresh-kfc215mf.js} +2 -2
  160. package/dist/{rbac-roles-0wydd22m.js → rbac-roles-3bznvkpt.js} +3 -3
  161. package/dist/{rbac-roles-at6crb3r.js → rbac-roles-6r4h2ghj.js} +2 -2
  162. package/dist/{render-v2-nvcw0jd7.js → render-v2-f3qedbpy.js} +10 -10
  163. package/dist/{resume-y4w0k5v3.js → resume-vcag4ann.js} +13 -13
  164. package/dist/{runtime-vpe43hx0.js → runtime-x0s55z2t.js} +1 -1
  165. package/dist/{session-access-gkyvnfye.js → session-access-nwzve8q2.js} +5 -5
  166. package/dist/{session-source-backfill-3w2st4m2.js → session-source-backfill-jpqfzmgz.js} +2 -2
  167. package/dist/{setup-axxvqtys.js → setup-d2smwaem.js} +1 -1
  168. package/dist/thread-buffer-8fc703jc.js +42 -0
  169. package/dist/{tree-visibility-y4fqvab5.js → tree-visibility-dwzc8en0.js} +2 -2
  170. package/dist/{user-merge-jobs-kcmwvrc6.js → user-merge-jobs-4ce7kma2.js} +3 -3
  171. package/dist/{virtual-modules-7d92dct1.js → virtual-modules-78a6yw71.js} +3 -3
  172. package/dist/{work-objects-f708e069.js → work-objects-m0w1e7q8.js} +28 -28
  173. package/dist/worker-3p2vq107.js +79 -0
  174. package/dist/{worker-follow-up-0by8wztc.js → worker-follow-up-e3t6f895.js} +25 -25
  175. package/dist/{x-3dtaf2r9.js → x-asbrnafg.js} +2 -2
  176. package/openapi.json +1795 -1623
  177. package/package.json +13 -12
  178. package/src/apps/catalog.generated.json +726 -0
  179. package/src/apps/definition.ts +24 -7
  180. package/src/apps/page-validator.ts +225 -3
  181. package/src/be/db.ts +38 -10
  182. package/src/be/mcp-proxy.ts +5 -4
  183. package/src/be/migrations/340_api_key_spend_cap.sql +5 -0
  184. package/src/be/migrations/341_user_token_expiry.sql +4 -0
  185. package/src/be/schedules/validate.ts +26 -0
  186. package/src/be/scripts/run-credential.ts +55 -1
  187. package/src/be/scripts/typecheck.ts +4 -4
  188. package/src/be/scripts/user-code-mode.ts +160 -0
  189. package/src/be/swarm-config-guard.ts +4 -0
  190. package/src/be/users.ts +48 -7
  191. package/src/commands/credential-outcome-report.ts +5 -2
  192. package/src/commands/onboard/agent-fs-version.ts +1 -1
  193. package/src/commands/provider-credentials.ts +19 -0
  194. package/src/commands/provider-error-class.ts +4 -1
  195. package/src/commands/rate-limit-outcome.ts +48 -3
  196. package/src/commands/runner.ts +113 -55
  197. package/src/commands/worktree-reaper.ts +600 -0
  198. package/src/extensions/contract-types.generated.ts +1 -1
  199. package/src/http/agents.ts +4 -0
  200. package/src/http/api-keys.ts +27 -3
  201. package/src/http/pages-public.ts +40 -4
  202. package/src/http/pool-keys.ts +21 -2
  203. package/src/http/schedules.ts +28 -3
  204. package/src/http/script-connection-proxy.ts +18 -6
  205. package/src/http/script-connections.ts +12 -4
  206. package/src/http/script-runs.ts +12 -3
  207. package/src/http/scripts.ts +2 -11
  208. package/src/http/tasks.ts +6 -10
  209. package/src/http/users.ts +1 -0
  210. package/src/integrations/chat-sdk/adapters.ts +29 -0
  211. package/src/integrations/chat-sdk/limits.ts +3 -0
  212. package/src/integrations/chat-sdk/rocketchat/README.md +8 -0
  213. package/src/integrations/chat-sdk/rocketchat/index.ts +790 -0
  214. package/src/integrations/chat-sdk/rocketchat/markdown.ts +210 -0
  215. package/src/integrations/chat-sdk/rocketchat/types.ts +249 -0
  216. package/src/integrations/chat-sdk/runtime.ts +11 -5
  217. package/src/integrations/chat-sdk/schema.ts +37 -3
  218. package/src/integrations/chat-sdk/status.ts +9 -0
  219. package/src/mcp-client/http-client.ts +3 -1
  220. package/src/oauth/identity-capture.ts +6 -1
  221. package/src/oauth/mcp-wrapper.ts +10 -3
  222. package/src/oauth/wrapper.ts +15 -3
  223. package/src/prompts/session-templates.ts +1 -0
  224. package/src/providers/acp-targets.ts +2 -2
  225. package/src/providers/amp-adapter.ts +1 -1
  226. package/src/providers/dsh-adapter.ts +1 -1
  227. package/src/providers/pi-mono-adapter.ts +4 -2
  228. package/src/providers/runtime-dependencies.ts +1 -1
  229. package/src/rbac/legacy-policy.ts +3 -0
  230. package/src/rbac/permissions.ts +9 -0
  231. package/src/scripts-runtime/executors/native.ts +225 -67
  232. package/src/scripts-runtime/mcp-client.ts +2 -1
  233. package/src/scripts-runtime/swarm-sdk.ts +2 -1
  234. package/src/scripts-runtime/types/stdlib.d.ts +4 -4
  235. package/src/scripts-runtime/types/swarm-extension.d.ts +7 -7
  236. package/src/scripts-runtime/types/swarm-sdk.d.ts +4 -4
  237. package/src/server-user.ts +98 -0
  238. package/src/slack/enrich.ts +14 -11
  239. package/src/tests/agents-list-model-display.test.ts +23 -0
  240. package/src/tests/apps-spike2.test.ts +35 -0
  241. package/src/tests/base-prompt.test.ts +1 -0
  242. package/src/tests/chat-sdk-rocketchat-vendored.test.ts +67 -0
  243. package/src/tests/chat-sdk-status-route.test.ts +13 -1
  244. package/src/tests/codex-app-server.test.ts +4 -6
  245. package/src/tests/deploy-guard.test.ts +24 -0
  246. package/src/tests/dsh-adapter.test.ts +1 -1
  247. package/src/tests/ensure-token.test.ts +2 -2
  248. package/src/tests/entrypoint-repo-autoclone-args.test.ts +202 -0
  249. package/src/tests/fake-dns.ts +47 -0
  250. package/src/tests/fixtures/base-prompt-baseline.json +12 -12
  251. package/src/tests/latest-model-report.test.ts +138 -0
  252. package/src/tests/mcp-oauth-dcr-reuse.test.ts +5 -2
  253. package/src/tests/mcp-oauth-ensure-token.test.ts +3 -2
  254. package/src/tests/mcp-oauth-manual-client.test.ts +6 -1
  255. package/src/tests/mcp-oauth-wrapper.test.ts +20 -4
  256. package/src/tests/mcp-outbound-fetch-guard.test.ts +169 -0
  257. package/src/tests/mcp-server-ssrf.test.ts +2 -0
  258. package/src/tests/mcp-user-route.test.ts +10 -1
  259. package/src/tests/memory-search-stall.test.ts +5 -0
  260. package/src/tests/oauth-connection-fetch-guard.test.ts +162 -0
  261. package/src/tests/oauth-token-endpoint-fetch-guard.test.ts +121 -0
  262. package/src/tests/oauth-wrapper.test.ts +1 -2
  263. package/src/tests/pages-head-v2.test.ts +2 -1
  264. package/src/tests/script-connections-http.test.ts +8 -3
  265. package/src/tests/script-connections-mcp.test.ts +14 -10
  266. package/src/tests/script-connections-sql.test.ts +6 -2
  267. package/src/tests/script-connections.test.ts +4 -0
  268. package/src/tests/slack-thread-participants.test.ts +14 -3
  269. package/src/tests/spend-cap-credentials.test.ts +34 -0
  270. package/src/tests/spend-cap-outcome.test.ts +67 -0
  271. package/src/tests/subscription-first.test.ts +119 -0
  272. package/src/tests/worktree-reaper.test.ts +424 -0
  273. package/src/tools/get-task-details.ts +247 -5
  274. package/src/tools/schedules/patch-schedule.ts +26 -1
  275. package/src/tools/schedules/update-schedule.ts +28 -2
  276. package/src/tools/script-common.ts +37 -22
  277. package/src/tools/script-query-types.ts +1 -1
  278. package/src/tools/script-run.ts +1 -1
  279. package/src/tools/script-search.ts +12 -10
  280. package/src/tools/utils.ts +7 -1
  281. package/src/utils/credentials.ts +36 -1
  282. package/src/utils/egress-guard.ts +40 -10
  283. package/src/utils/error-tracker.ts +17 -0
  284. package/templates/skills/apps/SKILL.md +191 -2
  285. package/templates/skills/apps/content.md +191 -2
  286. package/templates/skills/boards-and-sheets/content.md +11 -0
  287. package/templates/skills/chat-sdk/content.md +2 -2
  288. package/templates/skills/pages/content.md +11 -0
  289. package/templates/skills/swarm-docs/content.md +4 -0
  290. package/templates/skills/swarm-scripts/SKILL.md +1 -0
  291. package/templates/skills/swarm-scripts/content.md +1 -0
  292. package/templates/workflows/ralph-loop/content.md +6 -6
  293. package/dist/acp-adapter-cn53011z.js +0 -17
  294. package/dist/cli-pr0eze3x.js +0 -149
  295. package/dist/core-0fqtbrxa.js +0 -42
  296. package/dist/fx-adapter-k6w3jvz9.js +0 -20
  297. package/dist/grok-adapter-4q5tssw0.js +0 -20
  298. package/dist/handlers-qxgfvvsf.js +0 -41
  299. package/dist/heartbeat-6tr2w2da.js +0 -50
  300. package/dist/index-0mcxjdsa.js +0 -44
  301. package/dist/index-dz4q23ag.js +0 -40
  302. package/dist/index-s175jckx.js +0 -39
  303. package/dist/lead-p3hx7h35.js +0 -79
  304. package/dist/thread-buffer-rwa7d4dx.js +0 -42
  305. package/dist/worker-8rg9gz74.js +0 -79
  306. /package/dist/{cli-m4ejz4nj.js → cli-cah298e5.js} +0 -0
@@ -12076,7 +12076,7 @@ var init_unified = __esm(() => {
12076
12076
  init_lib22();
12077
12077
  });
12078
12078
 
12079
- // node_modules/chat/dist/chunk-5S562BSE.js
12079
+ // node_modules/chat/dist/chunk-ISTRKGUL.js
12080
12080
  function isTextNode2(node) {
12081
12081
  return node.type === "text";
12082
12082
  }
@@ -12574,6 +12574,23 @@ var LINE_BREAK_REGEX, DEFAULT_MAX_INCOMING_PARSE_LENGTH = 16384, DEFAULT_MAX_INC
12574
12574
  }
12575
12575
  return lines;
12576
12576
  }
12577
+ renderBlockquote(node, nodeConverter, blankLine = ">") {
12578
+ const lines = [];
12579
+ for (const child of getNodeChildren2(node)) {
12580
+ const text2 = nodeConverter(child);
12581
+ if (!text2.trim()) {
12582
+ continue;
12583
+ }
12584
+ if (lines.length > 0) {
12585
+ lines.push(blankLine);
12586
+ }
12587
+ for (const line of text2.split(LINE_BREAK_REGEX)) {
12588
+ lines.push(line ? `> ${line}` : blankLine);
12589
+ }
12590
+ }
12591
+ return lines.join(`
12592
+ `);
12593
+ }
12577
12594
  defaultNodeToText(node, nodeConverter) {
12578
12595
  const children = getNodeChildren2(node);
12579
12596
  if (children.length > 0) {
@@ -12730,7 +12747,7 @@ var LINE_BREAK_REGEX, DEFAULT_MAX_INCOMING_PARSE_LENGTH = 16384, DEFAULT_MAX_INC
12730
12747
  }
12731
12748
  }
12732
12749
  };
12733
- var init_chunk_5S562BSE = __esm(() => {
12750
+ var init_chunk_ISTRKGUL = __esm(() => {
12734
12751
  init_mdast_util_to_string();
12735
12752
  init_remark_gfm();
12736
12753
  init_remark_parse();
@@ -12745,7 +12762,7 @@ var init_chunk_5S562BSE = __esm(() => {
12745
12762
  WHITESPACE_PATTERN = /\s+/;
12746
12763
  });
12747
12764
 
12748
- // node_modules/chat/dist/chunk-D5LKW5SX.js
12765
+ // node_modules/chat/dist/chunk-PHYCZBCD.js
12749
12766
  function isModalElement(value) {
12750
12767
  return typeof value === "object" && value !== null && "type" in value && value.type === "modal";
12751
12768
  }
@@ -13142,8 +13159,8 @@ function isJSX(value) {
13142
13159
  return false;
13143
13160
  }
13144
13161
  var VALID_MODAL_CHILD_TYPES, JSX_ELEMENT;
13145
- var init_chunk_D5LKW5SX = __esm(() => {
13146
- init_chunk_5S562BSE();
13162
+ var init_chunk_PHYCZBCD = __esm(() => {
13163
+ init_chunk_ISTRKGUL();
13147
13164
  VALID_MODAL_CHILD_TYPES = [
13148
13165
  "text_input",
13149
13166
  "date_input",
@@ -13815,7 +13832,7 @@ var init_dist3 = __esm(() => {
13815
13832
  $e = vn;
13816
13833
  });
13817
13834
 
13818
- // node_modules/chat/dist/chunk-MOZRUO2D.js
13835
+ // node_modules/chat/dist/chunk-CULOS6HN.js
13819
13836
  async function* fromFullStream(stream) {
13820
13837
  let needsSeparator = false;
13821
13838
  let hasEmittedText = false;
@@ -13828,6 +13845,9 @@ async function* fromFullStream(stream) {
13828
13845
  continue;
13829
13846
  }
13830
13847
  const typed = event;
13848
+ if (typed.type === "reasoning" && typeof typed.text !== "string") {
13849
+ continue;
13850
+ }
13831
13851
  if (STREAM_CHUNK_TYPES.has(typed.type)) {
13832
13852
  yield event;
13833
13853
  continue;
@@ -14092,6 +14112,13 @@ function getNeverAbortedSignal() {
14092
14112
  }
14093
14113
  return neverAbortedSignal;
14094
14114
  }
14115
+ async function* withoutReasoning(source) {
14116
+ for await (const chunk of source) {
14117
+ if (typeof chunk === "string" || chunk.type !== "reasoning") {
14118
+ yield chunk;
14119
+ }
14120
+ }
14121
+ }
14095
14122
  async function* takeUntilAborted(source, signal) {
14096
14123
  const iterator = source[Symbol.asyncIterator]();
14097
14124
  let onAbort;
@@ -14356,10 +14383,10 @@ var STREAM_CHUNK_TYPES, adapterMap, Message3, POSTABLE_OBJECT, ChatError, LockEr
14356
14383
  return wrapTablesForAppend(text2, closeFences);
14357
14384
  }
14358
14385
  }, INLINE_MARKER_CHARS, TABLE_ROW_RE, TABLE_SEPARATOR_RE, THREAD_STATE_KEY_PREFIX = "thread-state:", neverAbortedSignal, ThreadImpl;
14359
- var init_chunk_MOZRUO2D = __esm(() => {
14360
- init_chunk_D5LKW5SX();
14386
+ var init_chunk_CULOS6HN = __esm(() => {
14387
+ init_chunk_PHYCZBCD();
14361
14388
  init_chunk_Y5QSQ2Z3();
14362
- init_chunk_5S562BSE();
14389
+ init_chunk_ISTRKGUL();
14363
14390
  init_dist2();
14364
14391
  init_dist2();
14365
14392
  init_dist3();
@@ -14367,7 +14394,8 @@ var init_chunk_MOZRUO2D = __esm(() => {
14367
14394
  STREAM_CHUNK_TYPES = /* @__PURE__ */ new Set([
14368
14395
  "markdown_text",
14369
14396
  "task_update",
14370
- "plan_update"
14397
+ "plan_update",
14398
+ "reasoning"
14371
14399
  ]);
14372
14400
  adapterMap = /* @__PURE__ */ new WeakMap;
14373
14401
  Message3 = class _Message {
@@ -15192,8 +15220,9 @@ var init_chunk_MOZRUO2D = __esm(() => {
15192
15220
  return this.adapter.scheduleMessage(this.id, postable, options);
15193
15221
  }
15194
15222
  async handleStream(rawStream, callerOptions) {
15195
- const textStream = takeUntilAborted(fromFullStream(rawStream), this.signal);
15196
15223
  const adapter = this.adapter;
15224
+ const normalized = fromFullStream(rawStream);
15225
+ const textStream = takeUntilAborted(adapter.supportsReasoningChunks ? normalized : withoutReasoning(normalized), this.signal);
15197
15226
  const defaults = this._binding?.resolveOwner(adapter)?.getStreamingOptions();
15198
15227
  const placeholder = this._fallbackStreamingPlaceholderText !== undefined ? this._fallbackStreamingPlaceholderText : defaults?.fallbackStreamingPlaceholderText;
15199
15228
  const options = {
@@ -18036,11 +18065,11 @@ var DEFAULT_MAX_THREADS = 5, THREAD_FETCH_CONCURRENCY = 4, ChannelHistoryApiImpl
18036
18065
  }
18037
18066
  }, defaultEmojiResolver2, EMOJI_PLACEHOLDER_REGEX, emoji, cardChildToFallbackText2, isCardElement2, isJSX2, toModalElement2;
18038
18067
  var init_dist8 = __esm(() => {
18039
- init_chunk_MOZRUO2D();
18040
- init_chunk_D5LKW5SX();
18068
+ init_chunk_CULOS6HN();
18069
+ init_chunk_PHYCZBCD();
18041
18070
  init_chunk_ZNX7PRK5();
18042
18071
  init_chunk_Y5QSQ2Z3();
18043
- init_chunk_5S562BSE();
18072
+ init_chunk_ISTRKGUL();
18044
18073
  init_chunk_SJYUIZC4();
18045
18074
  init_chunk_BPCHXMC3();
18046
18075
  DURATION_RE = /^(\d+)([smhd])$/;
@@ -6,7 +6,7 @@ import {
6
6
  import {
7
7
  scrubSecrets,
8
8
  init_secret_scrubber
9
- } from "./cli-bpje8n65.js";
9
+ } from "./cli-fp65jdp2.js";
10
10
  import {
11
11
  __esm
12
12
  } from "./cli-242037k3.js";
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  getDbClient2,
3
3
  init_db4
4
- } from "./cli-jj3c5nyb.js";
4
+ } from "./cli-erh1rgh4.js";
5
5
  import {
6
6
  agentFsClientFor,
7
7
  init_agent_fs_identity
8
- } from "./cli-avqkr20b.js";
8
+ } from "./cli-j2ybkdk2.js";
9
9
  import {
10
10
  FilesError,
11
11
  normalizeStoredKey,
@@ -32,7 +32,7 @@ import {
32
32
  import {
33
33
  scrubSecrets,
34
34
  init_secret_scrubber
35
- } from "./cli-bpje8n65.js";
35
+ } from "./cli-fp65jdp2.js";
36
36
  import {
37
37
  __esm
38
38
  } from "./cli-242037k3.js";
@@ -307,7 +307,7 @@ async function createObject(input) {
307
307
  return withLink(row);
308
308
  }
309
309
  function watchDrive(orgId, driveId) {
310
- import("./object-webhooks-6rdagg0r.js").then(({ ensureObjectWebhook }) => ensureObjectWebhook(orgId, driveId)).catch(() => {
310
+ import("./object-webhooks-ac7v2q5p.js").then(({ ensureObjectWebhook }) => ensureObjectWebhook(orgId, driveId)).catch(() => {
311
311
  return;
312
312
  });
313
313
  }
@@ -13,11 +13,11 @@ import {
13
13
  claudeMdLineageOf,
14
14
  planClaudeMdSync,
15
15
  init_profile_sync
16
- } from "./cli-sdh61g52.js";
16
+ } from "./cli-s6fhqbz1.js";
17
17
  import {
18
18
  scrubSecrets,
19
19
  init_secret_scrubber
20
- } from "./cli-bpje8n65.js";
20
+ } from "./cli-fp65jdp2.js";
21
21
 
22
22
  // src/commands/claude-md-session.ts
23
23
  init_file_lock();
@@ -10,12 +10,12 @@ import {
10
10
  resolveConfigValueOrThrow,
11
11
  resolveHeadersOrThrow,
12
12
  FileAuthStorageBackend
13
- } from "./cli-sq913bh1.js";
13
+ } from "./cli-t9nxq30h.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";
@@ -1,4 +1,6 @@
1
1
  import {
2
+ createSsrfGuardedFetch,
3
+ init_egress_guard,
2
4
  getDefaultAuthorizationIdForProvider,
3
5
  getOAuthAppById,
4
6
  getOAuthAppIdByProvider,
@@ -9,18 +11,20 @@ import {
9
11
  acquireOAuthRefreshLock,
10
12
  releaseOAuthRefreshLock,
11
13
  init_oauth
12
- } from "./cli-jj3c5nyb.js";
14
+ } from "./cli-erh1rgh4.js";
13
15
  import {
14
16
  generateRandomCodeVerifier,
15
17
  generateRandomState,
16
18
  calculatePKCECodeChallenge,
17
- init_build
18
- } from "./cli-pr0eze3x.js";
19
+ init_build,
20
+ publicEndpointSsrfOptions,
21
+ init_mcp_wrapper
22
+ } from "./cli-xysy1g8x.js";
19
23
  import {
20
24
  scrubSecrets,
21
25
  registerVolatileSecret,
22
26
  init_secret_scrubber
23
- } from "./cli-bpje8n65.js";
27
+ } from "./cli-fp65jdp2.js";
24
28
  import {
25
29
  __esm
26
30
  } from "./cli-242037k3.js";
@@ -74,8 +78,11 @@ function tokenRequestInit(config, params) {
74
78
  headers["Content-Type"] = "application/x-www-form-urlencoded";
75
79
  return { headers, body: new URLSearchParams(bodyParams).toString() };
76
80
  }
81
+ function tokenEndpointFetch() {
82
+ return createSsrfGuardedFetch(publicEndpointSsrfOptions());
83
+ }
77
84
  async function exchangeAuthorizationCode(config, params) {
78
- const response = await fetch(config.tokenUrl, {
85
+ const response = await tokenEndpointFetch()(config.tokenUrl, {
79
86
  method: "POST",
80
87
  ...tokenRequestInit(config, {
81
88
  grant_type: "authorization_code",
@@ -99,7 +106,7 @@ async function exchangeAuthorizationCode(config, params) {
99
106
  };
100
107
  }
101
108
  async function performTokenRefreshRequest(config, refreshToken) {
102
- const response = await fetch(config.tokenUrl, {
109
+ const response = await tokenEndpointFetch()(config.tokenUrl, {
103
110
  method: "POST",
104
111
  ...tokenRequestInit(config, {
105
112
  grant_type: "refresh_token",
@@ -129,6 +136,8 @@ async function performTokenRefreshRequest(config, refreshToken) {
129
136
  var init_wrapper = __esm(() => {
130
137
  init_build();
131
138
  init_oauth();
139
+ init_egress_guard();
140
+ init_mcp_wrapper();
132
141
  });
133
142
 
134
143
  // src/oauth/ensure-token.ts
@@ -2,7 +2,7 @@ import {
2
2
  persistCodexOAuth,
3
3
  getValidCodexOAuth,
4
4
  init_storage
5
- } from "./cli-2m6yaq6b.js";
5
+ } from "./cli-8fj8yfmk.js";
6
6
  import {
7
7
  init_uuid
8
8
  } from "./cli-4se3x6qm.js";
@@ -77,7 +77,7 @@ import {
77
77
  init_src,
78
78
  selectCredential,
79
79
  init_credentials2
80
- } from "./cli-js10kdk7.js";
80
+ } from "./cli-5basv0e7.js";
81
81
  import {
82
82
  __export,
83
83
  __esm
@@ -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-erh1rgh4.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 };
@@ -15,7 +15,7 @@ import {
15
15
  import {
16
16
  scrubSecrets,
17
17
  init_secret_scrubber
18
- } from "./cli-bpje8n65.js";
18
+ } from "./cli-fp65jdp2.js";
19
19
  import {
20
20
  __esm
21
21
  } from "./cli-242037k3.js";
@@ -3,7 +3,7 @@ import {
3
3
  isModelScopedWindow,
4
4
  parseModelLimitMessage,
5
5
  init_model_rate_limit_windows
6
- } from "./cli-js10kdk7.js";
6
+ } from "./cli-5basv0e7.js";
7
7
 
8
8
  // src/utils/error-tracker.ts
9
9
  init_model_rate_limit_windows();
@@ -108,6 +108,7 @@ function redactRateLimitEventLine(line) {
108
108
  return redacted === parsed ? line : JSON.stringify(redacted);
109
109
  }
110
110
  var MAX_RATE_LIMIT_RESET_MS = 7 * 24 * 60 * 60 * 1000;
111
+ var MAX_SPEND_CAP_HOLD_MS = 31 * 24 * 60 * 60 * 1000;
111
112
  function isRateLimitMessage(s) {
112
113
  return /rate.?limit|hit your[\w\s-]*limit|usage[ _-]?limit|too many requests|\b429\b/i.test(s) || isCodexCreditsExhaustedMessage(s);
113
114
  }
@@ -496,4 +497,4 @@ function parseStderrForErrors(stderr, tracker) {
496
497
  }
497
498
  }
498
499
 
499
- export { redactRateLimitEvent, redactRateLimitEventLine, MAX_RATE_LIMIT_RESET_MS, isRateLimitMessage, isCodexCreditsExhaustedMessage, CODEX_CREDITS_EXHAUSTED_COOLDOWN_MS, resolveCodexCreditsExhaustedCooldownMs, SessionErrorTracker, trackErrorFromJson, parseRateLimitResetTime, parseStderrForErrors };
500
+ export { redactRateLimitEvent, redactRateLimitEventLine, MAX_RATE_LIMIT_RESET_MS, MAX_SPEND_CAP_HOLD_MS, isRateLimitMessage, isCodexCreditsExhaustedMessage, CODEX_CREDITS_EXHAUSTED_COOLDOWN_MS, resolveCodexCreditsExhaustedCooldownMs, SessionErrorTracker, trackErrorFromJson, parseRateLimitResetTime, parseStderrForErrors };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  scrubSecrets,
3
3
  init_secret_scrubber
4
- } from "./cli-bpje8n65.js";
4
+ } from "./cli-fp65jdp2.js";
5
5
 
6
6
  // src/providers/runtime-dependencies.ts
7
7
  init_secret_scrubber();
@@ -51,7 +51,7 @@ async function validateProviderDependencies(provider, config, dependencies = pro
51
51
  };
52
52
  switch (provider) {
53
53
  case "claude": {
54
- const { resolveClaudeBinaryArgv, withClaudeRouteEnv } = await import("./claude-adapter-h3mp9hgs.js");
54
+ const { resolveClaudeBinaryArgv, withClaudeRouteEnv } = await import("./claude-adapter-gwq7x2nj.js");
55
55
  const sourceEnv = withClaudeRouteEnv(env);
56
56
  const { argv, useClaudeBridge } = resolveClaudeBinaryArgv(sourceEnv);
57
57
  requireExecutable(argv[0], useClaudeBridge ? "Use worker-full or install @desplega.ai/claude-bridge during image provisioning." : "Install Claude Code or set CLAUDE_BINARY to a trusted executable on the worker.", sourceEnv);
@@ -61,7 +61,7 @@ async function validateProviderDependencies(provider, config, dependencies = pro
61
61
  requireExecutable(resolveCodexCommand(env, process.cwd(), dependencies), "Install @openai/codex or set CODEX_PATH_OVERRIDE (or CODEX_BINARY) to a trusted executable.", env, process.cwd());
62
62
  return;
63
63
  case "dsh":
64
- requireExecutable(env.DSH_BINARY || "dsh", "Use worker-full, install @deepseek-ai/dsh@0.2.2-rc.2, or set DSH_BINARY to a trusted executable.");
64
+ requireExecutable(env.DSH_BINARY || "dsh", "Use worker-full, install @deepseek-ai/dsh@0.2.2-rc.3, or set DSH_BINARY to a trusted executable.");
65
65
  return;
66
66
  case "amp":
67
67
  requireExecutable(env.AMP_BINARY || "amp", "Use worker-full, install @ampcode/cli, or set AMP_BINARY to a trusted executable.");
@@ -69,7 +69,7 @@ async function validateProviderDependencies(provider, config, dependencies = pro
69
69
  case "grok":
70
70
  case "fx":
71
71
  case "acp": {
72
- const { resolveAcpTarget, grokTargetProfile, fxTargetProfile } = await import("./acp-targets-86f0sh6g.js");
72
+ const { resolveAcpTarget, grokTargetProfile, fxTargetProfile } = await import("./acp-targets-mz8c5dnt.js");
73
73
  const target = provider === "grok" ? grokTargetProfile : provider === "fx" ? fxTargetProfile : resolveAcpTarget(config);
74
74
  const hint = provider === "grok" ? "Use worker-full, install @xai-official/grok@1.0.77, or set GROK_BINARY to a trusted executable." : provider === "fx" ? "Use worker-full, install the pinned fx release (Dockerfile.worker FX_VERSION), or set FX_BINARY." : `ACP_TARGET='${target.target}'. ${acpInstallHints[target.target]}`;
75
75
  requireExecutable(target.command(config)[0], hint, target.env(config));
@@ -8,17 +8,17 @@ import {
8
8
  getMemoryStore2,
9
9
  init_memory,
10
10
  init_db4
11
- } from "./cli-jj3c5nyb.js";
11
+ } from "./cli-erh1rgh4.js";
12
12
  import {
13
13
  contentSha256,
14
14
  init_profile_sync
15
- } from "./cli-sdh61g52.js";
15
+ } from "./cli-s6fhqbz1.js";
16
16
  import {
17
17
  SCRUBBER_RULES_VERSION,
18
18
  createSweepScrubber,
19
19
  scrubberRulesFingerprint,
20
20
  init_secret_scrubber
21
- } from "./cli-bpje8n65.js";
21
+ } from "./cli-fp65jdp2.js";
22
22
 
23
23
  // src/be/boot-scrub-sweep.ts
24
24
  init_profile_sync();
@@ -142,7 +142,7 @@ async function runBootScrubSweep2(opts = {}) {
142
142
  console.log(`[${tag}] complete`);
143
143
  const memoryChanged = stats.find((s) => s.table === "agent_memory")?.changed ?? 0;
144
144
  if (memoryChanged > 0 && opts.reembed !== false) {
145
- const { runBootReembed } = await import("./boot-reembed-3jz0p2jk.js");
145
+ const { runBootReembed } = await import("./boot-reembed-157c0gcz.js");
146
146
  await runBootReembed();
147
147
  }
148
148
  return stats;