@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.
- package/README.md +1 -1
- package/dist/acp-adapter-x1qqgzwx.js +17 -0
- package/dist/{acp-targets-86f0sh6g.js → acp-targets-mz8c5dnt.js} +10 -10
- package/dist/{actions-zv8vcxvr.js → actions-5ft3qp5a.js} +27 -27
- package/dist/{agent-fs-provision-jqshb33y.js → agent-fs-provision-6fgz7wvz.js} +4 -4
- package/dist/{amp-adapter-gt503ywc.js → amp-adapter-nthn8ezm.js} +3 -3
- package/dist/{app-6t4k5rh1.js → app-535m78qw.js} +10 -10
- package/dist/{approval-notifications-fcfw063h.js → approval-notifications-dewbk403.js} +11 -11
- package/dist/{assistant-9dzybh12.js → assistant-39zyabv2.js} +28 -28
- package/dist/{boot-args-schema-xzfp2feg.js → boot-args-schema-bqv5bf77.js} +1 -1
- package/dist/{boot-reembed-3jz0p2jk.js → boot-reembed-157c0gcz.js} +1 -1
- package/dist/{boot-reembed-r88wngfg.js → boot-reembed-fas7z3zn.js} +1 -1
- package/dist/{boot-scrub-sweep-scrqhw48.js → boot-scrub-sweep-tmec0be2.js} +2 -2
- package/dist/{boot-seeds-vb2dcrrb.js → boot-seeds-32zm50x2.js} +4 -4
- package/dist/{boxd-68n75y1s.js → boxd-hr8rsxzq.js} +1 -1
- package/dist/{claude-adapter-h3mp9hgs.js → claude-adapter-gwq7x2nj.js} +9 -9
- package/dist/{claude-managed-adapter-kpbyj2vb.js → claude-managed-adapter-rkvw6fvq.js} +4 -4
- package/dist/{claude-managed-setup-0efr3wkg.js → claude-managed-setup-0vgz4d1j.js} +6 -6
- package/dist/{claude-sdk-session-03dw669q.js → claude-sdk-session-5wbwxy8c.js} +20967 -19390
- package/dist/{cli-z64t9pe6.js → cli-0f7n3td3.js} +1 -1
- package/dist/{cli-j53hpbsm.js → cli-0xwb7zpt.js} +2 -2
- package/dist/{cli-wxwv3t11.js → cli-1f48qdnb.js} +55 -13
- package/dist/{cli-gfcv679k.js → cli-1gevjrc1.js} +1 -1
- package/dist/{cli-0jkenasr.js → cli-2v4xxnx2.js} +1 -1
- package/dist/{cli-hc6e4tac.js → cli-2wde56gv.js} +6 -6
- package/dist/{cli-mh7pdxe0.js → cli-31vt7baf.js} +17 -17
- package/dist/{cli-ercwc8xn.js → cli-3mf04tkh.js} +1 -1
- package/dist/{cli-s6zk31gr.js → cli-43dsqhcp.js} +4 -4
- package/dist/{cli-1dbv9mj9.js → cli-4djg31jh.js} +1 -1
- package/dist/{cli-tn91wc6e.js → cli-50whymxq.js} +1 -1
- package/dist/{cli-js10kdk7.js → cli-5basv0e7.js} +19 -5
- package/dist/{cli-b2jh3dyb.js → cli-5k1hvycs.js} +4 -4
- package/dist/{cli-dkejt425.js → cli-62fjschk.js} +7 -7
- package/dist/{cli-zqmmy073.js → cli-69eq6gdk.js} +18 -18
- package/dist/{cli-qm3ntjqs.js → cli-6rmryz03.js} +13 -13
- package/dist/{cli-mz34pxbk.js → cli-7m6bbtab.js} +11 -11
- package/dist/{cli-wv20kbr3.js → cli-8a4qg44m.js} +5 -5
- package/dist/{cli-2m6yaq6b.js → cli-8fj8yfmk.js} +1 -1
- package/dist/{cli-9m9kyw77.js → cli-8qvte9hn.js} +2 -2
- package/dist/{cli-x05p2d05.js → cli-9tevdxyf.js} +1 -1
- package/dist/{cli-qec9bynj.js → cli-a6rzw649.js} +3 -3
- package/dist/{cli-ex1y88j3.js → cli-at67kvnp.js} +1 -1
- package/dist/{cli-yn4kt85g.js → cli-b0kqw55g.js} +1 -1
- package/dist/{cli-n3qe7tyr.js → cli-b0m3bg0f.js} +134 -3
- package/dist/{cli-xfjn2kyq.js → cli-bp2rt28p.js} +9 -9
- package/dist/{cli-2jk4s7z1.js → cli-c9bwawf9.js} +3 -3
- package/dist/{cli-wndegmns.js → cli-cmgdptmx.js} +3 -3
- package/dist/{cli-3p288654.js → cli-cpkxh68d.js} +2 -2
- package/dist/{cli-117g15t4.js → cli-cs26ed89.js} +8 -8
- package/dist/{cli-prf7kz78.js → cli-d0jb2qnt.js} +603 -78
- package/dist/{cli-8hp56wat.js → cli-d2epqm0y.js} +1 -1
- package/dist/{cli-wrhbym01.js → cli-d528acsw.js} +6 -6
- package/dist/{cli-tstj6e8e.js → cli-dnvmwsvc.js} +310 -88
- package/dist/{cli-9fsagra4.js → cli-e87fg3en.js} +1 -1
- package/dist/{cli-jj3c5nyb.js → cli-erh1rgh4.js} +116 -56
- package/dist/{cli-f1952kjy.js → cli-ewb028rs.js} +4 -4
- package/dist/{cli-ct8sz3np.js → cli-f1sdh8ca.js} +6 -6
- package/dist/{cli-0b655smz.js → cli-fcwrd7bh.js} +5 -5
- package/dist/{cli-eb279wn3.js → cli-fgm2mad9.js} +2 -2
- package/dist/{cli-bpje8n65.js → cli-fp65jdp2.js} +31 -6
- package/dist/{cli-dnh64e8e.js → cli-g0b3ma7r.js} +7 -7
- package/dist/{cli-avxh26pd.js → cli-gc7jkf4a.js} +4 -4
- package/dist/{cli-2skf1mdf.js → cli-gedf48yw.js} +4 -4
- package/dist/{cli-ajjvqhf3.js → cli-getrvmtx.js} +27 -6
- package/dist/{cli-c8v2yvej.js → cli-gq6qhmrr.js} +2 -2
- package/dist/{cli-mbwmqb5w.js → cli-h0ewec3d.js} +1 -1
- package/dist/{cli-tdk7jtka.js → cli-hv3820ez.js} +1 -1
- package/dist/{cli-avqkr20b.js → cli-j2ybkdk2.js} +2 -2
- package/dist/{cli-pqfecppn.js → cli-je587f74.js} +1 -1
- package/dist/{cli-hgsxnjyg.js → cli-jkkcm72j.js} +13 -13
- package/dist/{cli-g6j6ac3h.js → cli-ka13xx6b.js} +2 -2
- package/dist/{cli-t35hx078.js → cli-m1wddksc.js} +2 -2
- package/dist/{cli-50w82h6m.js → cli-mwxez0pz.js} +1 -0
- package/dist/{cli-nc6a8b5b.js → cli-n14r8h4n.js} +2 -2
- package/dist/{cli-y4a4458j.js → cli-n46d87mj.js} +3 -3
- package/dist/{cli-0dg7ytxm.js → cli-nkfv398a.js} +1096 -75
- package/dist/{cli-fhvk2nvp.js → cli-nvqq3232.js} +9 -9
- package/dist/{cli-bhgrhedp.js → cli-q8aq48v1.js} +1 -1
- package/dist/{cli-6a40p4kv.js → cli-qn79645p.js} +1 -1
- package/dist/{cli-hbq0kwxz.js → cli-r4fphq38.js} +4 -4
- package/dist/{cli-47hz21se.js → cli-r8ddn0hf.js} +4 -5
- package/dist/{cli-hpb9x72z.js → cli-rvhaahfv.js} +9 -9
- package/dist/{cli-qhhb30e8.js → cli-s08zsqva.js} +9 -9
- package/dist/{cli-sdh61g52.js → cli-s6fhqbz1.js} +2 -2
- package/dist/{cli-y518qkjg.js → cli-sjk85d7v.js} +13 -12
- package/dist/{cli-ytc7fpza.js → cli-t25rq8mg.js} +4 -4
- package/dist/{cli-sq913bh1.js → cli-t9nxq30h.js} +8 -8
- package/dist/{cli-49f5jyhh.js → cli-tbdw3f92.js} +3 -3
- package/dist/{cli-1v82d2w6.js → cli-tceqvv6h.js} +4 -4
- package/dist/{cli-fz9pcjsw.js → cli-tgmate57.js} +4 -4
- package/dist/{cli-rtmqzat7.js → cli-vdfngx2g.js} +2 -2
- package/dist/{cli-9w8712tq.js → cli-vr4eyq6p.js} +43 -14
- package/dist/{cli-z4f346g5.js → cli-vx9acp12.js} +1 -1
- package/dist/{cli-7dbhnsj9.js → cli-wdtqkqnq.js} +4 -4
- package/dist/{cli-kde4ky90.js → cli-x5yb8zc8.js} +2 -2
- package/dist/{cli-w14j2z4k.js → cli-x7aqhxj5.js} +2 -2
- package/dist/{cli-kspxjftk.js → cli-xerdrnqs.js} +15 -6
- package/dist/{cli-48nvk6sb.js → cli-xhkek467.js} +2 -2
- package/dist/{cli-dka73bak.js → cli-xysy1g8x.js} +152 -12
- package/dist/{cli-7wy8gbwb.js → cli-ya1cj689.js} +1 -1
- package/dist/{cli-n85m2wkq.js → cli-zkbz8m2q.js} +3 -2
- package/dist/{cli-0pazkmd4.js → cli-zm6bkx3e.js} +4 -4
- package/dist/{cli-6h88mn9q.js → cli-zqy28rwx.js} +4 -4
- package/dist/cli.js +30 -29
- package/dist/{codex-adapter-f3yp0kaj.js → codex-adapter-x25xfbnh.js} +8 -8
- package/dist/{codex-hook-262cekfp.js → codex-hook-c0nvm30r.js} +2 -2
- package/dist/{codex-login-1ven7yje.js → codex-login-ven5cz5j.js} +1 -1
- package/dist/{codex-session-runner-ns4mv70p.js → codex-session-runner-kn5xnrvp.js} +9 -9
- package/dist/{commands-5bzf2tfw.js → commands-8n59gxmy.js} +3 -3
- package/dist/{controller-5xt7kvfm.js → controller-wn3vd217.js} +3 -3
- package/dist/{controllers-connect-0gg13mzp.js → controllers-connect-09gvkrhc.js} +28 -28
- package/dist/core-2b8bv6ny.js +42 -0
- package/dist/{cursor-adapter-p0c5zv6r.js → cursor-adapter-w1681kp1.js} +2 -2
- package/dist/{db-2s68ycq7.js → db-e71keqxk.js} +3 -3
- package/dist/{db-q7q639k5.js → db-spg81qtr.js} +2 -2
- package/dist/{devin-adapter-t8d86q9x.js → devin-adapter-fs90ab4v.js} +1 -1
- package/dist/{dispatcher-j2y1q7ae.js → dispatcher-fr4vawwb.js} +25 -25
- package/dist/{docker-1b41eysj.js → docker-1h33jvh9.js} +2 -2
- package/dist/{dsh-adapter-pgnkf4st.js → dsh-adapter-g9yqv09y.js} +2 -2
- package/dist/{e2b-xm60c8ad.js → e2b-jnk0yeva.js} +2 -2
- package/dist/{e2b-ew8c5j5v.js → e2b-y7e5kmzf.js} +2 -2
- package/dist/{easter-egg-3d-0kea97jf.js → easter-egg-3d-ac9tv9a6.js} +1 -1
- package/dist/{embedding-space-3n6mhhmy.js → embedding-space-an77f45k.js} +6 -6
- package/dist/{embeddings-jfmj6yme.js → embeddings-jkrehejr.js} +1 -1
- package/dist/{event-bus-v4ywhc2p.js → event-bus-08t2b4y2.js} +1 -1
- package/dist/{execute-tjrej979.js → execute-3mys4nta.js} +1 -1
- package/dist/{external-channel-jy8w2gg3.js → external-channel-s6zxpts9.js} +2 -2
- package/dist/fx-adapter-4yet1c4f.js +20 -0
- package/dist/grok-adapter-8ge6tw7m.js +20 -0
- package/dist/handlers-0r9evrdj.js +41 -0
- package/dist/heartbeat-jjpb44e5.js +50 -0
- package/dist/{hook-fv1jwrv7.js → hook-68gbs87k.js} +6 -6
- package/dist/{hook-bpnncsec.js → hook-y6n23zzj.js} +8 -8
- package/dist/{http-bpa26czn.js → http-8c6y008s.js} +404 -146
- package/dist/{index-w216g9y9.js → index-0vthtbc2.js} +38 -22
- package/dist/index-1v23363p.js +39 -0
- package/dist/index-30qw6vyw.js +44 -0
- package/dist/index-6bm3w6cn.js +40 -0
- package/dist/{index-s8re7mvq.js → index-6h3r0vpe.js} +1 -1
- package/dist/{index-620y7jzq.js → index-7dgxveck.js} +3 -3
- package/dist/{index-4k7m5dgj.js → index-maddg9ys.js} +143 -103
- package/dist/{index-0h6qd4p1.js → index-mbpxhc4w.js} +3 -4
- package/dist/index-rz8ve510.js +569 -0
- package/dist/{index-mpj0z9e0.js → index-we3nd2t0.js} +1 -1
- package/dist/{index-pe3d8jfy.js → index-whysn1wf.js} +1 -1
- package/dist/{index-52tgbhrw.js → index-xcw7hjt5.js} +28 -28
- package/dist/{index-8p0j4h4j.js → index-ym9fgxad.js} +94 -89
- package/dist/{k8s-fy8hbhkg.js → k8s-8326q0rq.js} +2 -2
- package/dist/{keepalive-d6z12s04.js → keepalive-7e9r5dvp.js} +5 -4
- package/dist/lead-3jpc7kcr.js +79 -0
- package/dist/{maintenance-7kac6g2g.js → maintenance-d3erjvcg.js} +1 -1
- package/dist/{oauth-refresh-sweep-t1xjetbh.js → oauth-refresh-sweep-0qh70988.js} +4 -3
- package/dist/{object-webhooks-6rdagg0r.js → object-webhooks-ac7v2q5p.js} +7 -7
- package/dist/{onboard-32y1cfxy.js → onboard-5yphtken.js} +4 -4
- package/dist/{opencode-adapter-enp3v31n.js → opencode-adapter-0xvyba4m.js} +8 -8
- package/dist/{otel-impl-k0tm5ptj.js → otel-impl-svqp691q.js} +2 -2
- package/dist/{pending-24zebgvs.js → pending-bn4xe5br.js} +26 -26
- package/dist/{pi-mono-adapter-yj72xxxe.js → pi-mono-adapter-763s8a3w.js} +20 -18
- package/dist/{pricing-refresh-cf25x38j.js → pricing-refresh-kfc215mf.js} +2 -2
- package/dist/{rbac-roles-0wydd22m.js → rbac-roles-3bznvkpt.js} +3 -3
- package/dist/{rbac-roles-at6crb3r.js → rbac-roles-6r4h2ghj.js} +2 -2
- package/dist/{render-v2-nvcw0jd7.js → render-v2-f3qedbpy.js} +10 -10
- package/dist/{resume-y4w0k5v3.js → resume-vcag4ann.js} +13 -13
- package/dist/{runtime-vpe43hx0.js → runtime-x0s55z2t.js} +1 -1
- package/dist/{session-access-gkyvnfye.js → session-access-nwzve8q2.js} +5 -5
- package/dist/{session-source-backfill-3w2st4m2.js → session-source-backfill-jpqfzmgz.js} +2 -2
- package/dist/{setup-axxvqtys.js → setup-d2smwaem.js} +1 -1
- package/dist/thread-buffer-8fc703jc.js +42 -0
- package/dist/{tree-visibility-y4fqvab5.js → tree-visibility-dwzc8en0.js} +2 -2
- package/dist/{user-merge-jobs-kcmwvrc6.js → user-merge-jobs-4ce7kma2.js} +3 -3
- package/dist/{virtual-modules-7d92dct1.js → virtual-modules-78a6yw71.js} +3 -3
- package/dist/{work-objects-f708e069.js → work-objects-m0w1e7q8.js} +28 -28
- package/dist/worker-3p2vq107.js +79 -0
- package/dist/{worker-follow-up-0by8wztc.js → worker-follow-up-e3t6f895.js} +25 -25
- package/dist/{x-3dtaf2r9.js → x-asbrnafg.js} +2 -2
- package/openapi.json +1795 -1623
- package/package.json +13 -12
- package/src/apps/catalog.generated.json +726 -0
- package/src/apps/definition.ts +24 -7
- package/src/apps/page-validator.ts +225 -3
- package/src/be/db.ts +38 -10
- package/src/be/mcp-proxy.ts +5 -4
- package/src/be/migrations/340_api_key_spend_cap.sql +5 -0
- package/src/be/migrations/341_user_token_expiry.sql +4 -0
- package/src/be/schedules/validate.ts +26 -0
- package/src/be/scripts/run-credential.ts +55 -1
- package/src/be/scripts/typecheck.ts +4 -4
- package/src/be/scripts/user-code-mode.ts +160 -0
- package/src/be/swarm-config-guard.ts +4 -0
- package/src/be/users.ts +48 -7
- package/src/commands/credential-outcome-report.ts +5 -2
- package/src/commands/onboard/agent-fs-version.ts +1 -1
- package/src/commands/provider-credentials.ts +19 -0
- package/src/commands/provider-error-class.ts +4 -1
- package/src/commands/rate-limit-outcome.ts +48 -3
- package/src/commands/runner.ts +113 -55
- package/src/commands/worktree-reaper.ts +600 -0
- package/src/extensions/contract-types.generated.ts +1 -1
- package/src/http/agents.ts +4 -0
- package/src/http/api-keys.ts +27 -3
- package/src/http/pages-public.ts +40 -4
- package/src/http/pool-keys.ts +21 -2
- package/src/http/schedules.ts +28 -3
- package/src/http/script-connection-proxy.ts +18 -6
- package/src/http/script-connections.ts +12 -4
- package/src/http/script-runs.ts +12 -3
- package/src/http/scripts.ts +2 -11
- package/src/http/tasks.ts +6 -10
- package/src/http/users.ts +1 -0
- package/src/integrations/chat-sdk/adapters.ts +29 -0
- package/src/integrations/chat-sdk/limits.ts +3 -0
- package/src/integrations/chat-sdk/rocketchat/README.md +8 -0
- package/src/integrations/chat-sdk/rocketchat/index.ts +790 -0
- package/src/integrations/chat-sdk/rocketchat/markdown.ts +210 -0
- package/src/integrations/chat-sdk/rocketchat/types.ts +249 -0
- package/src/integrations/chat-sdk/runtime.ts +11 -5
- package/src/integrations/chat-sdk/schema.ts +37 -3
- package/src/integrations/chat-sdk/status.ts +9 -0
- package/src/mcp-client/http-client.ts +3 -1
- package/src/oauth/identity-capture.ts +6 -1
- package/src/oauth/mcp-wrapper.ts +10 -3
- package/src/oauth/wrapper.ts +15 -3
- package/src/prompts/session-templates.ts +1 -0
- package/src/providers/acp-targets.ts +2 -2
- package/src/providers/amp-adapter.ts +1 -1
- package/src/providers/dsh-adapter.ts +1 -1
- package/src/providers/pi-mono-adapter.ts +4 -2
- package/src/providers/runtime-dependencies.ts +1 -1
- package/src/rbac/legacy-policy.ts +3 -0
- package/src/rbac/permissions.ts +9 -0
- package/src/scripts-runtime/executors/native.ts +225 -67
- package/src/scripts-runtime/mcp-client.ts +2 -1
- package/src/scripts-runtime/swarm-sdk.ts +2 -1
- package/src/scripts-runtime/types/stdlib.d.ts +4 -4
- package/src/scripts-runtime/types/swarm-extension.d.ts +7 -7
- package/src/scripts-runtime/types/swarm-sdk.d.ts +4 -4
- package/src/server-user.ts +98 -0
- package/src/slack/enrich.ts +14 -11
- package/src/tests/agents-list-model-display.test.ts +23 -0
- package/src/tests/apps-spike2.test.ts +35 -0
- package/src/tests/base-prompt.test.ts +1 -0
- package/src/tests/chat-sdk-rocketchat-vendored.test.ts +67 -0
- package/src/tests/chat-sdk-status-route.test.ts +13 -1
- package/src/tests/codex-app-server.test.ts +4 -6
- package/src/tests/deploy-guard.test.ts +24 -0
- package/src/tests/dsh-adapter.test.ts +1 -1
- package/src/tests/ensure-token.test.ts +2 -2
- package/src/tests/entrypoint-repo-autoclone-args.test.ts +202 -0
- package/src/tests/fake-dns.ts +47 -0
- package/src/tests/fixtures/base-prompt-baseline.json +12 -12
- package/src/tests/latest-model-report.test.ts +138 -0
- package/src/tests/mcp-oauth-dcr-reuse.test.ts +5 -2
- package/src/tests/mcp-oauth-ensure-token.test.ts +3 -2
- package/src/tests/mcp-oauth-manual-client.test.ts +6 -1
- package/src/tests/mcp-oauth-wrapper.test.ts +20 -4
- package/src/tests/mcp-outbound-fetch-guard.test.ts +169 -0
- package/src/tests/mcp-server-ssrf.test.ts +2 -0
- package/src/tests/mcp-user-route.test.ts +10 -1
- package/src/tests/memory-search-stall.test.ts +5 -0
- package/src/tests/oauth-connection-fetch-guard.test.ts +162 -0
- package/src/tests/oauth-token-endpoint-fetch-guard.test.ts +121 -0
- package/src/tests/oauth-wrapper.test.ts +1 -2
- package/src/tests/pages-head-v2.test.ts +2 -1
- package/src/tests/script-connections-http.test.ts +8 -3
- package/src/tests/script-connections-mcp.test.ts +14 -10
- package/src/tests/script-connections-sql.test.ts +6 -2
- package/src/tests/script-connections.test.ts +4 -0
- package/src/tests/slack-thread-participants.test.ts +14 -3
- package/src/tests/spend-cap-credentials.test.ts +34 -0
- package/src/tests/spend-cap-outcome.test.ts +67 -0
- package/src/tests/subscription-first.test.ts +119 -0
- package/src/tests/worktree-reaper.test.ts +424 -0
- package/src/tools/get-task-details.ts +247 -5
- package/src/tools/schedules/patch-schedule.ts +26 -1
- package/src/tools/schedules/update-schedule.ts +28 -2
- package/src/tools/script-common.ts +37 -22
- package/src/tools/script-query-types.ts +1 -1
- package/src/tools/script-run.ts +1 -1
- package/src/tools/script-search.ts +12 -10
- package/src/tools/utils.ts +7 -1
- package/src/utils/credentials.ts +36 -1
- package/src/utils/egress-guard.ts +40 -10
- package/src/utils/error-tracker.ts +17 -0
- package/templates/skills/apps/SKILL.md +191 -2
- package/templates/skills/apps/content.md +191 -2
- package/templates/skills/boards-and-sheets/content.md +11 -0
- package/templates/skills/chat-sdk/content.md +2 -2
- package/templates/skills/pages/content.md +11 -0
- package/templates/skills/swarm-docs/content.md +4 -0
- package/templates/skills/swarm-scripts/SKILL.md +1 -0
- package/templates/skills/swarm-scripts/content.md +1 -0
- package/templates/workflows/ralph-loop/content.md +6 -6
- package/dist/acp-adapter-cn53011z.js +0 -17
- package/dist/cli-pr0eze3x.js +0 -149
- package/dist/core-0fqtbrxa.js +0 -42
- package/dist/fx-adapter-k6w3jvz9.js +0 -20
- package/dist/grok-adapter-4q5tssw0.js +0 -20
- package/dist/handlers-qxgfvvsf.js +0 -41
- package/dist/heartbeat-6tr2w2da.js +0 -50
- package/dist/index-0mcxjdsa.js +0 -44
- package/dist/index-dz4q23ag.js +0 -40
- package/dist/index-s175jckx.js +0 -39
- package/dist/lead-p3hx7h35.js +0 -79
- package/dist/thread-buffer-rwa7d4dx.js +0 -42
- package/dist/worker-8rg9gz74.js +0 -79
- /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-
|
|
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
|
|
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-
|
|
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
|
|
13146
|
-
|
|
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-
|
|
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
|
|
14360
|
-
|
|
14386
|
+
var init_chunk_CULOS6HN = __esm(() => {
|
|
14387
|
+
init_chunk_PHYCZBCD();
|
|
14361
14388
|
init_chunk_Y5QSQ2Z3();
|
|
14362
|
-
|
|
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
|
-
|
|
18040
|
-
|
|
18068
|
+
init_chunk_CULOS6HN();
|
|
18069
|
+
init_chunk_PHYCZBCD();
|
|
18041
18070
|
init_chunk_ZNX7PRK5();
|
|
18042
18071
|
init_chunk_Y5QSQ2Z3();
|
|
18043
|
-
|
|
18072
|
+
init_chunk_ISTRKGUL();
|
|
18044
18073
|
init_chunk_SJYUIZC4();
|
|
18045
18074
|
init_chunk_BPCHXMC3();
|
|
18046
18075
|
DURATION_RE = /^(\d+)([smhd])$/;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getDbClient2,
|
|
3
3
|
init_db4
|
|
4
|
-
} from "./cli-
|
|
4
|
+
} from "./cli-erh1rgh4.js";
|
|
5
5
|
import {
|
|
6
6
|
agentFsClientFor,
|
|
7
7
|
init_agent_fs_identity
|
|
8
|
-
} from "./cli-
|
|
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-
|
|
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-
|
|
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-
|
|
16
|
+
} from "./cli-s6fhqbz1.js";
|
|
17
17
|
import {
|
|
18
18
|
scrubSecrets,
|
|
19
19
|
init_secret_scrubber
|
|
20
|
-
} from "./cli-
|
|
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-
|
|
13
|
+
} from "./cli-t9nxq30h.js";
|
|
14
14
|
import {
|
|
15
15
|
oauthSuccessHtml,
|
|
16
16
|
oauthErrorHtml,
|
|
17
17
|
init_oauth_page
|
|
18
|
-
} from "./cli-
|
|
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-
|
|
14
|
+
} from "./cli-erh1rgh4.js";
|
|
13
15
|
import {
|
|
14
16
|
generateRandomCodeVerifier,
|
|
15
17
|
generateRandomState,
|
|
16
18
|
calculatePKCECodeChallenge,
|
|
17
|
-
init_build
|
|
18
|
-
|
|
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-
|
|
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
|
|
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
|
|
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-
|
|
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-
|
|
80
|
+
} from "./cli-5basv0e7.js";
|
|
81
81
|
import {
|
|
82
82
|
__export,
|
|
83
83
|
__esm
|
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
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-
|
|
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-
|
|
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
|
-
|
|
47
|
-
|
|
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 };
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
isModelScopedWindow,
|
|
4
4
|
parseModelLimitMessage,
|
|
5
5
|
init_model_rate_limit_windows
|
|
6
|
-
} from "./cli-
|
|
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-
|
|
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-
|
|
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.
|
|
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-
|
|
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-
|
|
11
|
+
} from "./cli-erh1rgh4.js";
|
|
12
12
|
import {
|
|
13
13
|
contentSha256,
|
|
14
14
|
init_profile_sync
|
|
15
|
-
} from "./cli-
|
|
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-
|
|
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-
|
|
145
|
+
const { runBootReembed } = await import("./boot-reembed-157c0gcz.js");
|
|
146
146
|
await runBootReembed();
|
|
147
147
|
}
|
|
148
148
|
return stats;
|