@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
|
@@ -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-g61wa4rt.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-n7vm5atw.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-h9bejmkf.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-4bbpxjh1.js");
|
|
146
146
|
await runBootReembed();
|
|
147
147
|
}
|
|
148
148
|
return stats;
|
|
@@ -39,18 +39,18 @@ import {
|
|
|
39
39
|
getLatestStepForNode2,
|
|
40
40
|
getCurrentStepForNode2,
|
|
41
41
|
init_db4
|
|
42
|
-
} from "./cli-
|
|
42
|
+
} from "./cli-h9bejmkf.js";
|
|
43
43
|
import {
|
|
44
44
|
ConfigQuestionSettingsSchema,
|
|
45
45
|
normalizeApprovalQuestions,
|
|
46
46
|
init_approval_config_question,
|
|
47
47
|
dispatchApprovalNotifications2,
|
|
48
48
|
init_approval_notifications
|
|
49
|
-
} from "./cli-
|
|
49
|
+
} from "./cli-hs3mqswp.js";
|
|
50
50
|
import {
|
|
51
51
|
resolveCredential,
|
|
52
52
|
init_credentials
|
|
53
|
-
} from "./cli-
|
|
53
|
+
} from "./cli-xhkek467.js";
|
|
54
54
|
import {
|
|
55
55
|
isSlackConfigured,
|
|
56
56
|
init_config4
|
|
@@ -61,7 +61,7 @@ import {
|
|
|
61
61
|
import {
|
|
62
62
|
selectCredential,
|
|
63
63
|
init_credentials2
|
|
64
|
-
} from "./cli-
|
|
64
|
+
} from "./cli-5basv0e7.js";
|
|
65
65
|
import {
|
|
66
66
|
DEFAULT_OPENROUTER_BASE_URL,
|
|
67
67
|
getOpenRouterBaseUrl,
|
|
@@ -71,7 +71,7 @@ import {
|
|
|
71
71
|
import {
|
|
72
72
|
deepInterpolate,
|
|
73
73
|
init_template2
|
|
74
|
-
} from "./cli-
|
|
74
|
+
} from "./cli-mwxez0pz.js";
|
|
75
75
|
import {
|
|
76
76
|
init_zod
|
|
77
77
|
} from "./cli-96234j5w.js";
|
|
@@ -107,7 +107,7 @@ import {
|
|
|
107
107
|
isSensitiveKey,
|
|
108
108
|
scrubSecrets,
|
|
109
109
|
init_secret_scrubber
|
|
110
|
-
} from "./cli-
|
|
110
|
+
} from "./cli-fp65jdp2.js";
|
|
111
111
|
import {
|
|
112
112
|
__esm
|
|
113
113
|
} from "./cli-242037k3.js";
|
|
@@ -120,7 +120,7 @@ async function notifyAutomationPreflightFailure(preflight) {
|
|
|
120
120
|
return;
|
|
121
121
|
}
|
|
122
122
|
try {
|
|
123
|
-
const { getSlackApp } = await import("./app-
|
|
123
|
+
const { getSlackApp } = await import("./app-7m4z44rv.js");
|
|
124
124
|
const app = getSlackApp();
|
|
125
125
|
if (!app) {
|
|
126
126
|
console.warn("[Automation Preflight] Slack not available, cannot send notification");
|
|
@@ -3939,7 +3939,7 @@ async function runClaimedStep(def, runId, ctx, node, registry, existingStep, ste
|
|
|
3939
3939
|
}
|
|
3940
3940
|
const waiting = await checkpointStepWaiting(runId, stepId, ctx);
|
|
3941
3941
|
if (waiting && result.waitFor === "workflow.child.finished") {
|
|
3942
|
-
const { resumeFromChildRun } = await import("./resume-
|
|
3942
|
+
const { resumeFromChildRun } = await import("./resume-m6mjzhkp.js");
|
|
3943
3943
|
await resumeFromChildRun(stepId, registry);
|
|
3944
3944
|
}
|
|
3945
3945
|
return { outcome: waiting ? "waiting" : "completed", successors: [] };
|
|
@@ -4460,7 +4460,7 @@ async function runForeachDrive(runId, parentNodeId, registry) {
|
|
|
4460
4460
|
if (drive.successors.length > 0) {
|
|
4461
4461
|
await walkGraph(workflow.definition, runId, ctx, drive.successors, registry, workflow.id, getSecretInputKeys(workflow.input), { successorDebt: debt });
|
|
4462
4462
|
} else {
|
|
4463
|
-
const { finalizeOrWait } = await import("./resume-
|
|
4463
|
+
const { finalizeOrWait } = await import("./resume-m6mjzhkp.js");
|
|
4464
4464
|
await finalizeOrWait(runId);
|
|
4465
4465
|
}
|
|
4466
4466
|
return drive;
|
|
@@ -4604,7 +4604,7 @@ async function startChild(input) {
|
|
|
4604
4604
|
const parked = await getDbClient2().get("UPDATE workflow_run_steps SET status = 'waiting' WHERE id = ? AND status = 'running' RETURNING id", [child.id]);
|
|
4605
4605
|
if (parked && result.waitFor === "workflow.child.finished") {
|
|
4606
4606
|
ownedChildren.delete(child.id);
|
|
4607
|
-
const { resumeFromChildRun } = await import("./resume-
|
|
4607
|
+
const { resumeFromChildRun } = await import("./resume-m6mjzhkp.js");
|
|
4608
4608
|
await resumeFromChildRun(child.id, registry);
|
|
4609
4609
|
}
|
|
4610
4610
|
return null;
|
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
contextBoundNoteThreshold,
|
|
6
6
|
createContextBoundNote
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-0xwb7zpt.js";
|
|
8
8
|
import {
|
|
9
9
|
checkToolLoop
|
|
10
10
|
} from "./cli-0726awxw.js";
|
|
11
11
|
import {
|
|
12
12
|
createSwarmEventHandler
|
|
13
|
-
} from "./cli-
|
|
13
|
+
} from "./cli-at67kvnp.js";
|
|
14
14
|
import {
|
|
15
15
|
readPkgVersion
|
|
16
16
|
} from "./cli-kr5tjjtz.js";
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
computeContextUsedUnified,
|
|
21
21
|
clampContextPercent,
|
|
22
22
|
init_context_window
|
|
23
|
-
} from "./cli-
|
|
23
|
+
} from "./cli-cpkxh68d.js";
|
|
24
24
|
import {
|
|
25
25
|
isGitHubEnterprise,
|
|
26
26
|
init_github_host
|
|
@@ -28,16 +28,16 @@ import {
|
|
|
28
28
|
import {
|
|
29
29
|
selectCredential,
|
|
30
30
|
init_credentials2
|
|
31
|
-
} from "./cli-
|
|
31
|
+
} from "./cli-5basv0e7.js";
|
|
32
32
|
import {
|
|
33
33
|
runtimeCatalogModel,
|
|
34
34
|
init_runtime_model_catalog
|
|
35
|
-
} from "./cli-
|
|
35
|
+
} from "./cli-q8aq48v1.js";
|
|
36
36
|
import {
|
|
37
37
|
init_src2,
|
|
38
38
|
scrubSecrets,
|
|
39
39
|
init_secret_scrubber
|
|
40
|
-
} from "./cli-
|
|
40
|
+
} from "./cli-fp65jdp2.js";
|
|
41
41
|
|
|
42
42
|
// src/providers/claude-managed-adapter.ts
|
|
43
43
|
init_context_window();
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
contextBoundNoteThreshold,
|
|
3
3
|
createContextBoundNote
|
|
4
|
-
} from "./cli-
|
|
4
|
+
} from "./cli-0xwb7zpt.js";
|
|
5
5
|
import {
|
|
6
6
|
canonicalToolName,
|
|
7
7
|
canonicalArgs,
|
|
8
8
|
rawArgsFromCanonical,
|
|
9
9
|
runNativePre,
|
|
10
10
|
runNativePost
|
|
11
|
-
} from "./cli-
|
|
11
|
+
} from "./cli-2v4xxnx2.js";
|
|
12
12
|
import {
|
|
13
13
|
renderGoalReminder,
|
|
14
14
|
SWARM_TOOL_GROUP,
|
|
@@ -27,13 +27,13 @@ import {
|
|
|
27
27
|
autoIndexMemoryFile,
|
|
28
28
|
fetchConcurrentContext,
|
|
29
29
|
summarizeTranscript
|
|
30
|
-
} from "./cli-
|
|
30
|
+
} from "./cli-5v6b2am8.js";
|
|
31
31
|
import {
|
|
32
32
|
applyReasoningEffort
|
|
33
|
-
} from "./cli-
|
|
33
|
+
} from "./cli-vdfngx2g.js";
|
|
34
34
|
import {
|
|
35
35
|
resolveOpencodeSdkSpecifier
|
|
36
|
-
} from "./cli-
|
|
36
|
+
} from "./cli-1b5axkt1.js";
|
|
37
37
|
import {
|
|
38
38
|
fetchInstalledMcpServers
|
|
39
39
|
} from "./cli-5y2fvw4z.js";
|
|
@@ -42,7 +42,7 @@ import {
|
|
|
42
42
|
getContextWindowSize,
|
|
43
43
|
clampContextPercent,
|
|
44
44
|
init_context_window
|
|
45
|
-
} from "./cli-
|
|
45
|
+
} from "./cli-cpkxh68d.js";
|
|
46
46
|
import {
|
|
47
47
|
resolveSlashSkillPrompt
|
|
48
48
|
} from "./cli-5j88qqa8.js";
|
|
@@ -55,7 +55,7 @@ import {
|
|
|
55
55
|
openAICompatibleKeyLabels,
|
|
56
56
|
validateOpencodeCredentials,
|
|
57
57
|
init_credentials2
|
|
58
|
-
} from "./cli-
|
|
58
|
+
} from "./cli-5basv0e7.js";
|
|
59
59
|
import {
|
|
60
60
|
DEFAULT_OPENROUTER_BASE_URL,
|
|
61
61
|
getOpenRouterBaseUrl,
|
|
@@ -65,7 +65,7 @@ import {
|
|
|
65
65
|
import {
|
|
66
66
|
snapshotCatalogRows,
|
|
67
67
|
init_runtime_model_catalog
|
|
68
|
-
} from "./cli-
|
|
68
|
+
} from "./cli-q8aq48v1.js";
|
|
69
69
|
import {
|
|
70
70
|
isSessionSummarySkipped,
|
|
71
71
|
init_env_flag
|
|
@@ -83,7 +83,7 @@ import {
|
|
|
83
83
|
scrubSecrets,
|
|
84
84
|
registerVolatileSecret,
|
|
85
85
|
init_secret_scrubber
|
|
86
|
-
} from "./cli-
|
|
86
|
+
} from "./cli-fp65jdp2.js";
|
|
87
87
|
|
|
88
88
|
// src/providers/opencode-adapter.ts
|
|
89
89
|
init_src2();
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getDbClient2,
|
|
3
3
|
init_db4
|
|
4
|
-
} from "./cli-
|
|
4
|
+
} from "./cli-h9bejmkf.js";
|
|
5
5
|
import {
|
|
6
6
|
agentFsClientFor,
|
|
7
7
|
init_agent_fs_identity
|
|
8
|
-
} from "./cli-
|
|
8
|
+
} from "./cli-y6qqbpwc.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-3dzdq4fm.js").then(({ ensureObjectWebhook }) => ensureObjectWebhook(orgId, driveId)).catch(() => {
|
|
311
311
|
return;
|
|
312
312
|
});
|
|
313
313
|
}
|
|
@@ -13,19 +13,19 @@ async function createRuntimeProvider(kind, target = {}) {
|
|
|
13
13
|
return new StaticRuntimeProvider;
|
|
14
14
|
}
|
|
15
15
|
case "docker": {
|
|
16
|
-
const { DockerRuntimeProvider } = await import("./docker-
|
|
16
|
+
const { DockerRuntimeProvider } = await import("./docker-1h33jvh9.js");
|
|
17
17
|
return new DockerRuntimeProvider;
|
|
18
18
|
}
|
|
19
19
|
case "e2b": {
|
|
20
|
-
const { E2BRuntimeProvider } = await import("./e2b-
|
|
20
|
+
const { E2BRuntimeProvider } = await import("./e2b-y7e5kmzf.js");
|
|
21
21
|
return new E2BRuntimeProvider(target);
|
|
22
22
|
}
|
|
23
23
|
case "boxd": {
|
|
24
|
-
const { BoxdRuntimeProvider } = await import("./boxd-
|
|
24
|
+
const { BoxdRuntimeProvider } = await import("./boxd-hr8rsxzq.js");
|
|
25
25
|
return new BoxdRuntimeProvider;
|
|
26
26
|
}
|
|
27
27
|
case "k8s": {
|
|
28
|
-
const { KubernetesRuntimeProvider } = await import("./k8s-
|
|
28
|
+
const { KubernetesRuntimeProvider } = await import("./k8s-8326q0rq.js");
|
|
29
29
|
return new KubernetesRuntimeProvider;
|
|
30
30
|
}
|
|
31
31
|
default:
|
|
@@ -16,11 +16,11 @@ import {
|
|
|
16
16
|
getActivePricingRow2,
|
|
17
17
|
insertPricingRow2,
|
|
18
18
|
init_db4
|
|
19
|
-
} from "./cli-
|
|
19
|
+
} from "./cli-h9bejmkf.js";
|
|
20
20
|
import {
|
|
21
21
|
scrubSecrets,
|
|
22
22
|
init_secret_scrubber
|
|
23
|
-
} from "./cli-
|
|
23
|
+
} from "./cli-fp65jdp2.js";
|
|
24
24
|
import {
|
|
25
25
|
__esm
|
|
26
26
|
} from "./cli-242037k3.js";
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
deleteKv2,
|
|
20
20
|
listKv2,
|
|
21
21
|
init_db4
|
|
22
|
-
} from "./cli-
|
|
22
|
+
} from "./cli-h9bejmkf.js";
|
|
23
23
|
import {
|
|
24
24
|
ackSlackMessage,
|
|
25
25
|
skipSlackMessageReaction,
|
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
init_watcher,
|
|
37
37
|
getSlackApp2,
|
|
38
38
|
init_app4
|
|
39
|
-
} from "./cli-
|
|
39
|
+
} from "./cli-t90k0phh.js";
|
|
40
40
|
import {
|
|
41
41
|
applyPreTaskCreate,
|
|
42
42
|
init_apply_task_create,
|
|
@@ -55,21 +55,21 @@ import {
|
|
|
55
55
|
init_message_text,
|
|
56
56
|
createAdditiveBuffer,
|
|
57
57
|
init_additive_buffer
|
|
58
|
-
} from "./cli-
|
|
58
|
+
} from "./cli-fn8aj7gb.js";
|
|
59
59
|
import {
|
|
60
60
|
resolveSlackParticipant,
|
|
61
61
|
resolveSlackUserId,
|
|
62
62
|
rewriteSlackMentions,
|
|
63
63
|
init_enrich
|
|
64
|
-
} from "./cli-
|
|
64
|
+
} from "./cli-nk8swfpx.js";
|
|
65
65
|
import {
|
|
66
66
|
isSlackThreadLeft,
|
|
67
67
|
init_left_threads
|
|
68
|
-
} from "./cli-
|
|
68
|
+
} from "./cli-cn6fpa1p.js";
|
|
69
69
|
import {
|
|
70
70
|
findUserByExternalId,
|
|
71
71
|
init_users
|
|
72
|
-
} from "./cli-
|
|
72
|
+
} from "./cli-z6m6xzxt.js";
|
|
73
73
|
import {
|
|
74
74
|
isSteeringEnabled2,
|
|
75
75
|
init_steering_enabled
|
|
@@ -77,11 +77,11 @@ import {
|
|
|
77
77
|
import {
|
|
78
78
|
resolveTemplate,
|
|
79
79
|
init_resolver
|
|
80
|
-
} from "./cli-
|
|
80
|
+
} from "./cli-mwxez0pz.js";
|
|
81
81
|
import {
|
|
82
82
|
scrubSecrets,
|
|
83
83
|
init_secret_scrubber
|
|
84
|
-
} from "./cli-
|
|
84
|
+
} from "./cli-fp65jdp2.js";
|
|
85
85
|
import {
|
|
86
86
|
__esm,
|
|
87
87
|
__using,
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
isJSX2,
|
|
28
28
|
toModalElement2,
|
|
29
29
|
init_dist8
|
|
30
|
-
} from "./cli-
|
|
30
|
+
} from "./cli-vr4eyq6p.js";
|
|
31
31
|
import {
|
|
32
32
|
require_form_data,
|
|
33
33
|
require_follow_redirects
|
|
@@ -52,7 +52,7 @@ import {
|
|
|
52
52
|
decodeKey,
|
|
53
53
|
downloadAttachment,
|
|
54
54
|
init_dist7
|
|
55
|
-
} from "./cli-
|
|
55
|
+
} from "./cli-84xtgbn6.js";
|
|
56
56
|
import {
|
|
57
57
|
require_p_retry
|
|
58
58
|
} from "./cli-952zgdwp.js";
|
|
@@ -21674,8 +21674,7 @@ ${node.value}
|
|
|
21674
21674
|
return `<${node.url}|${linkText}>`;
|
|
21675
21675
|
}
|
|
21676
21676
|
if (isBlockquoteNode2(node)) {
|
|
21677
|
-
return
|
|
21678
|
-
`);
|
|
21677
|
+
return this.renderBlockquote(node, (child) => this.nodeToMrkdwn(child));
|
|
21679
21678
|
}
|
|
21680
21679
|
if (isListNode2(node)) {
|
|
21681
21680
|
return this.renderList(node, 0, (child) => this.nodeToMrkdwn(child), "•");
|
|
@@ -24841,7 +24840,7 @@ ${tableToAscii2(node)}
|
|
|
24841
24840
|
} else if (chunk.type === "markdown_text") {
|
|
24842
24841
|
renderer.push(chunk.text);
|
|
24843
24842
|
await flushCommitted();
|
|
24844
|
-
} else {
|
|
24843
|
+
} else if (chunk.type === "reasoning") {} else {
|
|
24845
24844
|
await sendStructuredChunk(chunk);
|
|
24846
24845
|
}
|
|
24847
24846
|
}
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
providerForModel,
|
|
6
6
|
providerForKeyVar,
|
|
7
7
|
init_src2
|
|
8
|
-
} from "./cli-
|
|
8
|
+
} from "./cli-fp65jdp2.js";
|
|
9
9
|
import {
|
|
10
10
|
__esm
|
|
11
11
|
} from "./cli-242037k3.js";
|
|
@@ -773,7 +773,8 @@ async function fetchAvailableIndices(env, apiUrl, apiKey, poolVars = CREDENTIAL_
|
|
|
773
773
|
rejectedIndices: data.rejectedIndices,
|
|
774
774
|
modelBlockedIndices: data.modelBlockedIndices,
|
|
775
775
|
earliestModelResetAt: data.earliestModelResetAt,
|
|
776
|
-
seatBlockedIndices: data.seatBlockedIndices
|
|
776
|
+
seatBlockedIndices: data.seatBlockedIndices,
|
|
777
|
+
spendCappedIndices: data.spendCappedIndices
|
|
777
778
|
};
|
|
778
779
|
if (data.availableIndices.length < totalKeys) {
|
|
779
780
|
console.log(`[credentials] ${envVar}: ${data.availableIndices.length}/${totalKeys} keys available (${totalKeys - data.availableIndices.length} unavailable)`);
|
|
@@ -823,6 +824,11 @@ async function resolveCredentialPools(env, opts) {
|
|
|
823
824
|
});
|
|
824
825
|
modelBlockedCount += beforeCount - available.length;
|
|
825
826
|
}
|
|
827
|
+
const spendCapped = (info?.spendCappedIndices ?? []).filter(inAllowlist);
|
|
828
|
+
const uncapped = available?.length === 0 && spendCapped.length > 0 ? pool.filter((i) => inAllowlist(i) && !spendCapped.includes(i)) : undefined;
|
|
829
|
+
if (opts?.enforceModelCapacity && uncapped?.length === 0) {
|
|
830
|
+
throw new KeySpendCapError(envVar);
|
|
831
|
+
}
|
|
826
832
|
const seatBlockedIndices = info?.seatBlockedIndices ?? [];
|
|
827
833
|
const seatBlockedCount = seatBlockedIndices.filter(inAllowlist).length;
|
|
828
834
|
let seatFallbackIndices;
|
|
@@ -846,7 +852,7 @@ async function resolveCredentialPools(env, opts) {
|
|
|
846
852
|
const result = seatFallbackIndices ? {
|
|
847
853
|
...selectCredential(val, seatFallbackIndices, envVar, allowedIdx),
|
|
848
854
|
isRateLimitFallback: true
|
|
849
|
-
} : selectCredential(val, available, envVar, allowedIdx);
|
|
855
|
+
} : uncapped?.length ? { ...selectCredential(val, uncapped, envVar, allowedIdx), isRateLimitFallback: true } : selectCredential(val, available, envVar, allowedIdx);
|
|
850
856
|
env[envVar] = result.selected;
|
|
851
857
|
const availInfo = available ? ` (${available.length} available of ${result.total})` : "";
|
|
852
858
|
console.log(`[credentials] Selected ${envVar} credential ${result.index + 1}/${result.total}${availInfo} [...${result.keySuffix}]${info?.rejectedIndices?.length ? ` (${info.rejectedIndices.length} rejected)` : ""}`);
|
|
@@ -860,7 +866,7 @@ async function resolveCredentialPools(env, opts) {
|
|
|
860
866
|
}
|
|
861
867
|
return selections;
|
|
862
868
|
}
|
|
863
|
-
var CREDENTIAL_POOL_VARS, PROVIDER_CREDENTIAL_VARS, SLASH_MODEL_PROVIDERS, MODEL_LABELS, ModelWindowExhaustedError, CredentialAllowlistError, CLAUDE_CREDENTIALS_HINT = "Set CLAUDE_CODE_OAUTH_TOKEN or ANTHROPIC_API_KEY, or route Claude Code through a gateway (ANTHROPIC_BASE_URL + ANTHROPIC_AUTH_TOKEN or ANTHROPIC_API_KEY), Microsoft Foundry (CLAUDE_CODE_USE_FOUNDRY), Amazon Bedrock (CLAUDE_CODE_USE_BEDROCK), or Google Vertex AI (CLAUDE_CODE_USE_VERTEX).", CLAUDE_CREDENTIAL_TYPE_BY_PROVIDER;
|
|
869
|
+
var CREDENTIAL_POOL_VARS, PROVIDER_CREDENTIAL_VARS, SLASH_MODEL_PROVIDERS, MODEL_LABELS, ModelWindowExhaustedError, KeySpendCapError, CredentialAllowlistError, CLAUDE_CREDENTIALS_HINT = "Set CLAUDE_CODE_OAUTH_TOKEN or ANTHROPIC_API_KEY, or route Claude Code through a gateway (ANTHROPIC_BASE_URL + ANTHROPIC_AUTH_TOKEN or ANTHROPIC_API_KEY), Microsoft Foundry (CLAUDE_CODE_USE_FOUNDRY), Amazon Bedrock (CLAUDE_CODE_USE_BEDROCK), or Google Vertex AI (CLAUDE_CODE_USE_VERTEX).", CLAUDE_CREDENTIAL_TYPE_BY_PROVIDER;
|
|
864
870
|
var init_credentials2 = __esm(() => {
|
|
865
871
|
init_src2();
|
|
866
872
|
init_src();
|
|
@@ -919,6 +925,14 @@ var init_credentials2 = __esm(() => {
|
|
|
919
925
|
this.modelBlockedCount = modelBlockedCount;
|
|
920
926
|
}
|
|
921
927
|
};
|
|
928
|
+
KeySpendCapError = class KeySpendCapError extends Error {
|
|
929
|
+
keyType;
|
|
930
|
+
constructor(keyType) {
|
|
931
|
+
super(`Every ${keyType} key this task may use hit its provider spend cap. Raise or remove the key's spend limit with the provider, or add another key, then retry.`);
|
|
932
|
+
this.name = "KeySpendCapError";
|
|
933
|
+
this.keyType = keyType;
|
|
934
|
+
}
|
|
935
|
+
};
|
|
922
936
|
CredentialAllowlistError = class CredentialAllowlistError extends Error {
|
|
923
937
|
profile;
|
|
924
938
|
keyType;
|
|
@@ -938,4 +952,4 @@ var init_credentials2 = __esm(() => {
|
|
|
938
952
|
};
|
|
939
953
|
});
|
|
940
954
|
|
|
941
|
-
export { getRouteProvider, createScopedFetch, routeCredentialStatus, validateRoute, isFirstPartyAnthropicUrl, CODEX_GATEWAY_API_KEY, deriveDefaultRoute, routeUnsetEnv, init_src, MODEL_SCOPED_WINDOWS, KEY_WIDE_WINDOWS, modelFamilyOf, windowForModelFamily, isModelScopedWindow, parseModelLimitMessage, parseCreditsRequiredMessage, activeModelBlock, activeModelBlocks, init_model_rate_limit_windows, CREDENTIAL_POOL_VARS, normalizeProviderKeyAliases, PROVIDER_CREDENTIAL_VARS, getModelAwareCredentialVars, deriveProviderFromKeyType, ModelWindowExhaustedError, CredentialAllowlistError, keySuffix, splitCredentialPool, selectCredential, CLAUDE_CREDENTIALS_HINT, validateClaudeCredentials, openAICompatibleKeyLabels, validateOpencodeCredentials, resolveCredentialPools, init_credentials2 };
|
|
955
|
+
export { getRouteProvider, createScopedFetch, routeCredentialStatus, validateRoute, isFirstPartyAnthropicUrl, CODEX_GATEWAY_API_KEY, deriveDefaultRoute, routeUnsetEnv, init_src, MODEL_SCOPED_WINDOWS, KEY_WIDE_WINDOWS, modelFamilyOf, windowForModelFamily, isModelScopedWindow, parseModelLimitMessage, parseCreditsRequiredMessage, activeModelBlock, activeModelBlocks, init_model_rate_limit_windows, CREDENTIAL_POOL_VARS, normalizeProviderKeyAliases, PROVIDER_CREDENTIAL_VARS, getModelAwareCredentialVars, deriveProviderFromKeyType, ModelWindowExhaustedError, KeySpendCapError, CredentialAllowlistError, keySuffix, splitCredentialPool, selectCredential, CLAUDE_CREDENTIALS_HINT, validateClaudeCredentials, openAICompatibleKeyLabels, validateOpencodeCredentials, resolveCredentialPools, init_credentials2 };
|
|
@@ -4,14 +4,14 @@ import {
|
|
|
4
4
|
rawArgsFromCanonical,
|
|
5
5
|
runNativePre,
|
|
6
6
|
runNativePost
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-2v4xxnx2.js";
|
|
8
8
|
import {
|
|
9
9
|
checkToolLoop,
|
|
10
10
|
clearToolHistory
|
|
11
11
|
} from "./cli-0726awxw.js";
|
|
12
12
|
import {
|
|
13
13
|
summarizeSession
|
|
14
|
-
} from "./cli-
|
|
14
|
+
} from "./cli-gq6qhmrr.js";
|
|
15
15
|
import {
|
|
16
16
|
getMemoryRaterNames,
|
|
17
17
|
init_memory_raters,
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
readIdentityBaselines,
|
|
27
27
|
advanceIdentityBaselines,
|
|
28
28
|
init_profile_sync
|
|
29
|
-
} from "./cli-
|
|
29
|
+
} from "./cli-s6fhqbz1.js";
|
|
30
30
|
import {
|
|
31
31
|
getOpenRouterAttributionHeaders,
|
|
32
32
|
init_openrouter_base_url
|
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
resolveTemplateAsync,
|
|
37
37
|
init_resolver,
|
|
38
38
|
init_session_templates
|
|
39
|
-
} from "./cli-
|
|
39
|
+
} from "./cli-mwxez0pz.js";
|
|
40
40
|
import {
|
|
41
41
|
isSessionSummarySkipped,
|
|
42
42
|
init_env_flag
|
|
@@ -44,7 +44,7 @@ import {
|
|
|
44
44
|
import {
|
|
45
45
|
scrubSecrets,
|
|
46
46
|
init_secret_scrubber
|
|
47
|
-
} from "./cli-
|
|
47
|
+
} from "./cli-fp65jdp2.js";
|
|
48
48
|
|
|
49
49
|
// src/prompts/goal-reminder.ts
|
|
50
50
|
init_session_templates();
|
|
@@ -13,14 +13,14 @@ import {
|
|
|
13
13
|
WORKFLOW_CONTEXT_REQUESTER_SQL,
|
|
14
14
|
init_user_references,
|
|
15
15
|
init_db4
|
|
16
|
-
} from "./cli-
|
|
16
|
+
} from "./cli-h9bejmkf.js";
|
|
17
17
|
import {
|
|
18
18
|
nextRestRatio2
|
|
19
|
-
} from "./cli-
|
|
19
|
+
} from "./cli-1carhg8g.js";
|
|
20
20
|
import {
|
|
21
21
|
scrubSecrets,
|
|
22
22
|
init_secret_scrubber
|
|
23
|
-
} from "./cli-
|
|
23
|
+
} from "./cli-fp65jdp2.js";
|
|
24
24
|
|
|
25
25
|
// src/be/user-merge-jobs.ts
|
|
26
26
|
init_telemetry_identity();
|
|
@@ -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-h9bejmkf.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-c0tyzt73.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
|