@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.
- package/dist/acp-adapter-xtj40wd8.js +17 -0
- package/dist/{acp-targets-86f0sh6g.js → acp-targets-n7vm5atw.js} +10 -10
- package/dist/{actions-zv8vcxvr.js → actions-hq6wp9xv.js} +27 -27
- package/dist/{agent-fs-provision-jqshb33y.js → agent-fs-provision-y0qc1rdd.js} +4 -4
- package/dist/{amp-adapter-gt503ywc.js → amp-adapter-1qqs6h91.js} +3 -3
- package/dist/{app-6t4k5rh1.js → app-7m4z44rv.js} +10 -10
- package/dist/{approval-notifications-fcfw063h.js → approval-notifications-8sr41gjx.js} +11 -11
- package/dist/{assistant-9dzybh12.js → assistant-hkczwfv6.js} +28 -28
- package/dist/{boot-args-schema-xzfp2feg.js → boot-args-schema-8025snev.js} +1 -1
- package/dist/{boot-reembed-r88wngfg.js → boot-reembed-15m87nr1.js} +1 -1
- package/dist/{boot-reembed-3jz0p2jk.js → boot-reembed-4bbpxjh1.js} +1 -1
- package/dist/{boot-scrub-sweep-scrqhw48.js → boot-scrub-sweep-eajr97e9.js} +2 -2
- package/dist/{boot-seeds-vb2dcrrb.js → boot-seeds-9cwy39jx.js} +4 -4
- package/dist/{boxd-68n75y1s.js → boxd-hr8rsxzq.js} +1 -1
- package/dist/{claude-adapter-h3mp9hgs.js → claude-adapter-g61wa4rt.js} +9 -9
- package/dist/{claude-managed-adapter-kpbyj2vb.js → claude-managed-adapter-znkk0prm.js} +3 -3
- package/dist/{claude-managed-setup-0efr3wkg.js → claude-managed-setup-f1wndkr2.js} +2 -2
- package/dist/{claude-sdk-session-03dw669q.js → claude-sdk-session-687xzf21.js} +20763 -19381
- package/dist/{cli-gfcv679k.js → cli-04103ryh.js} +1 -1
- package/dist/{cli-hbq0kwxz.js → cli-0a336ze7.js} +4 -4
- package/dist/{cli-1v82d2w6.js → cli-0fx95c06.js} +4 -4
- package/dist/{cli-wxwv3t11.js → cli-0m77n7ej.js} +3 -3
- package/dist/{cli-j53hpbsm.js → cli-0xwb7zpt.js} +2 -2
- package/dist/{cli-0dg7ytxm.js → cli-13t0smbk.js} +917 -23
- package/dist/{cli-0pazkmd4.js → cli-1b5axkt1.js} +4 -4
- package/dist/{cli-6h88mn9q.js → cli-1carhg8g.js} +4 -4
- package/dist/{cli-hgsxnjyg.js → cli-1dr5at77.js} +10 -10
- package/dist/{cli-0jkenasr.js → cli-2v4xxnx2.js} +1 -1
- package/dist/{cli-dnh64e8e.js → cli-32xndx6b.js} +6 -6
- package/dist/{cli-hpb9x72z.js → cli-3m8vqehw.js} +9 -9
- package/dist/{cli-ercwc8xn.js → cli-3mf04tkh.js} +1 -1
- package/dist/{cli-7dbhnsj9.js → cli-3zyme1wt.js} +4 -4
- package/dist/{cli-s6zk31gr.js → cli-43dsqhcp.js} +4 -4
- package/dist/{cli-t35hx078.js → cli-4h90xaet.js} +2 -2
- package/dist/{cli-117g15t4.js → cli-4mj5g29m.js} +8 -8
- package/dist/{cli-47hz21se.js → cli-4tbvndmm.js} +4 -5
- package/dist/{cli-tn91wc6e.js → cli-50whymxq.js} +1 -1
- package/dist/{cli-js10kdk7.js → cli-5basv0e7.js} +19 -5
- package/dist/{cli-xfjn2kyq.js → cli-5v6b2am8.js} +5 -5
- package/dist/{cli-49f5jyhh.js → cli-6r1dwegd.js} +3 -3
- package/dist/{cli-kspxjftk.js → cli-7ewre3dm.js} +15 -6
- package/dist/{cli-n3qe7tyr.js → cli-84xtgbn6.js} +35 -2
- package/dist/{cli-w14j2z4k.js → cli-8cmjkbvj.js} +2 -2
- package/dist/{cli-2m6yaq6b.js → cli-8fj8yfmk.js} +1 -1
- package/dist/{cli-9m9kyw77.js → cli-8rbkw18r.js} +2 -2
- package/dist/{cli-x05p2d05.js → cli-9tevdxyf.js} +1 -1
- package/dist/{cli-f1952kjy.js → cli-9xx36trj.js} +4 -4
- package/dist/{cli-hc6e4tac.js → cli-a8ts6x1n.js} +6 -6
- package/dist/{cli-mh7pdxe0.js → cli-aebswqmz.js} +12 -12
- package/dist/{cli-ex1y88j3.js → cli-at67kvnp.js} +1 -1
- package/dist/{cli-b2jh3dyb.js → cli-bjmq14k9.js} +4 -4
- package/dist/{cli-mz34pxbk.js → cli-byxsctca.js} +11 -11
- package/dist/{cli-dka73bak.js → cli-c0tyzt73.js} +152 -12
- package/dist/{cli-wv20kbr3.js → cli-c8kqmzzf.js} +5 -5
- package/dist/{cli-qhhb30e8.js → cli-cd9acnvd.js} +9 -9
- package/dist/{cli-wndegmns.js → cli-cmgdptmx.js} +3 -3
- package/dist/{cli-1dbv9mj9.js → cli-cn6fpa1p.js} +1 -1
- package/dist/{cli-wrhbym01.js → cli-cp0m07wb.js} +6 -6
- package/dist/{cli-3p288654.js → cli-cpkxh68d.js} +2 -2
- package/dist/{cli-g6j6ac3h.js → cli-cqxwjb93.js} +2 -2
- package/dist/{cli-8hp56wat.js → cli-d2epqm0y.js} +1 -1
- package/dist/{cli-qm3ntjqs.js → cli-dd57p1gd.js} +13 -13
- package/dist/{cli-tstj6e8e.js → cli-fn8aj7gb.js} +250 -55
- package/dist/{cli-bpje8n65.js → cli-fp65jdp2.js} +31 -6
- package/dist/{cli-2skf1mdf.js → cli-gedf48yw.js} +4 -4
- package/dist/{cli-c8v2yvej.js → cli-gq6qhmrr.js} +2 -2
- package/dist/{cli-sq913bh1.js → cli-grcc2h2g.js} +8 -8
- package/dist/{cli-qec9bynj.js → cli-h03j6je3.js} +3 -3
- package/dist/{cli-mbwmqb5w.js → cli-h0ewec3d.js} +1 -1
- package/dist/{cli-jj3c5nyb.js → cli-h9bejmkf.js} +76 -39
- package/dist/{cli-ct8sz3np.js → cli-hs3mqswp.js} +6 -6
- package/dist/{cli-tdk7jtka.js → cli-hv3820ez.js} +1 -1
- package/dist/{cli-pqfecppn.js → cli-je587f74.js} +1 -1
- package/dist/{cli-y4a4458j.js → cli-jhtvt7gn.js} +3 -3
- package/dist/{cli-dkejt425.js → cli-mmw2sjaf.js} +7 -7
- package/dist/{cli-50w82h6m.js → cli-mwxez0pz.js} +1 -0
- package/dist/{cli-avxh26pd.js → cli-nk8swfpx.js} +4 -4
- package/dist/{cli-fhvk2nvp.js → cli-p7g7wd9n.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-nc6a8b5b.js → cli-qx1dwrr5.js} +2 -2
- package/dist/{cli-sdh61g52.js → cli-s6fhqbz1.js} +2 -2
- package/dist/{cli-eb279wn3.js → cli-sfajkbd7.js} +2 -2
- package/dist/{cli-z64t9pe6.js → cli-snypfjgj.js} +1 -1
- package/dist/{cli-ytc7fpza.js → cli-t25rq8mg.js} +4 -4
- package/dist/{cli-zqmmy073.js → cli-t90k0phh.js} +18 -18
- package/dist/{cli-fz9pcjsw.js → cli-tzzas8rb.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-y518qkjg.js → cli-w24f3j49.js} +10 -10
- package/dist/{cli-yn4kt85g.js → cli-w41bvvms.js} +1 -1
- package/dist/{cli-9fsagra4.js → cli-w6c6dj91.js} +1 -1
- package/dist/{cli-kde4ky90.js → cli-x5yb8zc8.js} +2 -2
- package/dist/{cli-48nvk6sb.js → cli-xhkek467.js} +2 -2
- package/dist/{cli-avqkr20b.js → cli-y6qqbpwc.js} +2 -2
- package/dist/{cli-7wy8gbwb.js → cli-ya1cj689.js} +1 -1
- package/dist/{cli-prf7kz78.js → cli-yeh3g1q6.js} +603 -78
- package/dist/{cli-ajjvqhf3.js → cli-z6m6xzxt.js} +2 -2
- package/dist/{cli-2jk4s7z1.js → cli-zaate0rd.js} +3 -3
- package/dist/{cli-n85m2wkq.js → cli-zkbz8m2q.js} +3 -2
- package/dist/{cli-0b655smz.js → cli-zvpkrgsc.js} +5 -5
- package/dist/cli.js +27 -27
- package/dist/{codex-adapter-f3yp0kaj.js → codex-adapter-ysfg6ty3.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-823scr6g.js} +9 -9
- package/dist/{commands-5bzf2tfw.js → commands-5rbm07fz.js} +3 -3
- package/dist/{controller-5xt7kvfm.js → controller-wn3vd217.js} +3 -3
- package/dist/{controllers-connect-0gg13mzp.js → controllers-connect-34jzhfft.js} +28 -28
- package/dist/core-kdehq26g.js +42 -0
- package/dist/{cursor-adapter-p0c5zv6r.js → cursor-adapter-w1681kp1.js} +2 -2
- package/dist/{db-2s68ycq7.js → db-6bkgbfwk.js} +3 -3
- package/dist/{db-q7q639k5.js → db-hcj16x7z.js} +2 -2
- package/dist/{devin-adapter-t8d86q9x.js → devin-adapter-fs90ab4v.js} +1 -1
- package/dist/{dispatcher-j2y1q7ae.js → dispatcher-jgjqrfzv.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-w17nsny6.js} +1 -1
- package/dist/{embedding-space-3n6mhhmy.js → embedding-space-v06fwy7b.js} +6 -6
- package/dist/{embeddings-jfmj6yme.js → embeddings-g50dxea4.js} +1 -1
- package/dist/{event-bus-v4ywhc2p.js → event-bus-08t2b4y2.js} +1 -1
- package/dist/{execute-tjrej979.js → execute-1n36haw1.js} +1 -1
- package/dist/{external-channel-jy8w2gg3.js → external-channel-43tv8pg6.js} +2 -2
- package/dist/fx-adapter-bvh05t4a.js +20 -0
- package/dist/grok-adapter-my5j8mdf.js +20 -0
- package/dist/handlers-wyymeeqh.js +41 -0
- package/dist/heartbeat-sf3nk937.js +50 -0
- package/dist/{hook-bpnncsec.js → hook-dqph1e05.js} +8 -8
- package/dist/{hook-fv1jwrv7.js → hook-m1m9dm6w.js} +6 -6
- package/dist/{http-bpa26czn.js → http-w0th1cz9.js} +160 -102
- package/dist/index-22khdtby.js +44 -0
- package/dist/{index-mpj0z9e0.js → index-c0e8en64.js} +1 -1
- package/dist/{index-620y7jzq.js → index-e8pz8qdg.js} +3 -3
- package/dist/{index-8p0j4h4j.js → index-ez823q84.js} +94 -89
- package/dist/{index-w216g9y9.js → index-ffba0z8q.js} +35 -21
- package/dist/{index-s8re7mvq.js → index-gkpfgpg7.js} +1 -1
- package/dist/{index-4k7m5dgj.js → index-k8ajc0g0.js} +143 -103
- package/dist/index-np0582ac.js +40 -0
- package/dist/{index-52tgbhrw.js → index-pb03vans.js} +28 -28
- package/dist/index-vgkrj1jt.js +39 -0
- package/dist/{index-pe3d8jfy.js → index-whysn1wf.js} +1 -1
- package/dist/{index-0h6qd4p1.js → index-y4vd4mhn.js} +3 -4
- package/dist/{k8s-fy8hbhkg.js → k8s-8326q0rq.js} +2 -2
- package/dist/{keepalive-d6z12s04.js → keepalive-2v06q2e8.js} +5 -4
- package/dist/lead-55z813ng.js +79 -0
- package/dist/{maintenance-7kac6g2g.js → maintenance-vx7vjhhy.js} +1 -1
- package/dist/{oauth-refresh-sweep-t1xjetbh.js → oauth-refresh-sweep-g06k4bza.js} +4 -3
- package/dist/{object-webhooks-6rdagg0r.js → object-webhooks-3dzdq4fm.js} +7 -7
- package/dist/{onboard-32y1cfxy.js → onboard-232pazny.js} +4 -4
- package/dist/{opencode-adapter-enp3v31n.js → opencode-adapter-t0paqbh8.js} +8 -8
- package/dist/{otel-impl-k0tm5ptj.js → otel-impl-kmpkyp4y.js} +2 -2
- package/dist/{pending-24zebgvs.js → pending-x0z3vx1x.js} +26 -26
- package/dist/{pi-mono-adapter-yj72xxxe.js → pi-mono-adapter-7pmypn6d.js} +17 -15
- package/dist/{pricing-refresh-cf25x38j.js → pricing-refresh-ytjmtyd7.js} +2 -2
- package/dist/{rbac-roles-0wydd22m.js → rbac-roles-fgm5mxr2.js} +3 -3
- package/dist/{rbac-roles-at6crb3r.js → rbac-roles-xyaxekh3.js} +2 -2
- package/dist/{render-v2-nvcw0jd7.js → render-v2-ws972g4r.js} +10 -10
- package/dist/{resume-y4w0k5v3.js → resume-m6mjzhkp.js} +13 -13
- package/dist/{runtime-vpe43hx0.js → runtime-zzpc0c8a.js} +1 -1
- package/dist/{session-access-gkyvnfye.js → session-access-vp35xs91.js} +5 -5
- package/dist/{session-source-backfill-3w2st4m2.js → session-source-backfill-p73e8zbe.js} +2 -2
- package/dist/{setup-axxvqtys.js → setup-r4kd7rxg.js} +1 -1
- package/dist/thread-buffer-cm2nzq6t.js +42 -0
- package/dist/{tree-visibility-y4fqvab5.js → tree-visibility-07h2tbs2.js} +2 -2
- package/dist/{user-merge-jobs-kcmwvrc6.js → user-merge-jobs-96vg9rpe.js} +3 -3
- package/dist/{virtual-modules-7d92dct1.js → virtual-modules-vgn3f2x4.js} +3 -3
- package/dist/{work-objects-f708e069.js → work-objects-74hbcx3e.js} +28 -28
- package/dist/worker-5pn2vzx6.js +79 -0
- package/dist/{worker-follow-up-0by8wztc.js → worker-follow-up-ezavwn5d.js} +25 -25
- package/dist/{x-3dtaf2r9.js → x-asbrnafg.js} +2 -2
- package/openapi.json +1793 -1622
- package/package.json +10 -10
- 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/schedules/validate.ts +26 -0
- package/src/be/swarm-config-guard.ts +4 -0
- 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-connections.ts +12 -4
- package/src/http/script-runs.ts +12 -3
- package/src/http/tasks.ts +6 -10
- 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 +2 -0
- package/src/rbac/permissions.ts +5 -0
- package/src/scripts-runtime/types/swarm-extension.d.ts +7 -7
- 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/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/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.test.ts +2 -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/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/pages/content.md +11 -0
- package/templates/skills/swarm-docs/content.md +2 -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
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
cardChildToFallbackText2,
|
|
5
5
|
isCardElement2,
|
|
6
6
|
init_dist8
|
|
7
|
-
} from "./cli-
|
|
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-
|
|
13
|
+
} from "./cli-grcc2h2g.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";
|
|
@@ -12,11 +12,11 @@ import {
|
|
|
12
12
|
isModelNameTakenError,
|
|
13
13
|
init_model_profiles,
|
|
14
14
|
init_db4
|
|
15
|
-
} from "./cli-
|
|
15
|
+
} from "./cli-h9bejmkf.js";
|
|
16
16
|
import {
|
|
17
17
|
ensureRbacSeedsSynced2,
|
|
18
18
|
init_rbac_roles
|
|
19
|
-
} from "./cli-
|
|
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-
|
|
6
|
+
} from "./cli-cp0m07wb.js";
|
|
7
7
|
import {
|
|
8
8
|
ACPAdapter2
|
|
9
|
-
} from "./cli-
|
|
9
|
+
} from "./cli-0m77n7ej.js";
|
|
10
10
|
import {
|
|
11
11
|
getKnownContextWindowSize,
|
|
12
12
|
init_context_window
|
|
13
|
-
} from "./cli-
|
|
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-
|
|
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-
|
|
18
|
+
} from "./cli-h9bejmkf.js";
|
|
19
19
|
import {
|
|
20
20
|
userHoldsExplicitVerb2,
|
|
21
21
|
getUserGrant2,
|
|
22
22
|
init_rbac_roles
|
|
23
|
-
} from "./cli-
|
|
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-
|
|
30
|
+
} from "./cli-w41bvvms.js";
|
|
31
31
|
import {
|
|
32
32
|
findUserById,
|
|
33
33
|
findUserByExternalId,
|
|
34
34
|
init_users
|
|
35
|
-
} from "./cli-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
73
|
+
} from "./cli-h9bejmkf.js";
|
|
74
74
|
import {
|
|
75
75
|
listRuntimePools2,
|
|
76
76
|
init_db2
|
|
77
|
-
} from "./cli-
|
|
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-
|
|
87
|
+
} from "./cli-hs3mqswp.js";
|
|
88
88
|
import {
|
|
89
89
|
userHoldsOperatorGrantedRole2,
|
|
90
90
|
assertMayActOnOperatorGrantedTarget2,
|
|
91
91
|
init_rbac_roles
|
|
92
|
-
} from "./cli-
|
|
92
|
+
} from "./cli-qx1dwrr5.js";
|
|
93
93
|
import {
|
|
94
94
|
remediateStalledRuntime
|
|
95
|
-
} from "./cli-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
163
|
+
} from "./cli-w24f3j49.js";
|
|
164
164
|
import {
|
|
165
165
|
scrubSecrets,
|
|
166
166
|
init_secret_scrubber
|
|
167
|
-
} from "./cli-
|
|
167
|
+
} from "./cli-fp65jdp2.js";
|
|
168
168
|
|
|
169
169
|
// src/be/runtime-pools/routing.ts
|
|
170
170
|
init_multi_runtime2();
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
deleteSkillFile2,
|
|
18
18
|
getSkillById2,
|
|
19
19
|
init_db4
|
|
20
|
-
} from "./cli-
|
|
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-
|
|
31
|
+
} from "./cli-fn8aj7gb.js";
|
|
32
32
|
import {
|
|
33
33
|
getSeedState,
|
|
34
34
|
init_state_db
|
|
35
|
-
} from "./cli-
|
|
35
|
+
} from "./cli-13t0smbk.js";
|
|
36
36
|
import {
|
|
37
37
|
matchesDefaultIdentityMd,
|
|
38
38
|
init_defaults
|
|
39
|
-
} from "./cli-
|
|
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-
|
|
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-
|
|
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-
|
|
36
|
+
} from "./cli-0fx95c06.js";
|
|
37
37
|
import {
|
|
38
38
|
workflowEventBus2,
|
|
39
39
|
init_event_bus
|
|
40
|
-
} from "./cli-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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
|
-
|
|
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-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-
|
|
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 };
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
contextBoundNoteThreshold,
|
|
3
3
|
createContextBoundNote
|
|
4
|
-
} from "./cli-
|
|
4
|
+
} from "./cli-0xwb7zpt.js";
|
|
5
5
|
import {
|
|
6
6
|
applyReasoningEffort
|
|
7
|
-
} from "./cli-
|
|
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-
|
|
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-
|
|
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.
|
|
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;
|