@desplega.ai/agent-swarm 1.166.0 → 1.167.0
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-zpvy6321.js +34 -0
- package/dist/{actions-qz3m692w.js → actions-fq2zrwtf.js} +25 -25
- package/dist/{amp-adapter-j1xbmsqz.js → amp-adapter-5gbk7501.js} +4 -4
- package/dist/{anthropic-messages-hst62ws9.js → anthropic-messages-13yn502s.js} +4 -4
- package/dist/{app-43vrdmv8.js → app-nctetn1e.js} +10 -9
- package/dist/{assistant-ertffmka.js → assistant-0aq8gjvj.js} +26 -26
- package/dist/{azure-openai-responses-mh8tvf78.js → azure-openai-responses-9st34pfz.js} +5 -5
- package/dist/{boot-reembed-998jtpdg.js → boot-reembed-1ze5853n.js} +9 -8
- package/dist/{boot-reembed-s7k7c6v2.js → boot-reembed-fmp5ww69.js} +9 -8
- package/dist/{boot-scrub-sweep-nepsk4t1.js → boot-scrub-sweep-cbp8xd4e.js} +10 -9
- package/dist/{boot-seeds-vvzs1zhk.js → boot-seeds-22tx8a53.js} +12 -11
- package/dist/{claude-adapter-2zvmekrp.js → claude-adapter-0jhgeh1d.js} +24 -22
- package/dist/{claude-managed-adapter-s49wbk8t.js → claude-managed-adapter-tzwxy803.js} +4 -4
- package/dist/{claude-managed-setup-cvhqq8qn.js → claude-managed-setup-nrhfx5b0.js} +3 -3
- package/dist/{claude-sdk-session-kkbxtw5q.js → claude-sdk-session-wh77rh83.js} +22 -22
- package/dist/{cli-zsh093hk.js → cli-014vns2y.js} +63 -1
- package/dist/{cli-qvfk83fy.js → cli-13xwcqvj.js} +2 -2
- package/dist/{cli-dw2q9f7g.js → cli-1yrcfa5s.js} +4 -4
- package/dist/{cli-jvj6a0cv.js → cli-577bxkf6.js} +27 -17
- package/dist/{cli-zy7vwsne.js → cli-5qkcdv8c.js} +16 -9
- package/dist/{cli-cwxhbf43.js → cli-5t5my0h8.js} +85 -2
- package/dist/{cli-y59h2pk9.js → cli-69egj654.js} +1 -1
- package/dist/{cli-68r1j4sg.js → cli-6bpvv8h4.js} +3 -3
- package/dist/{cli-cpfmqz3n.js → cli-6qxmjpem.js} +5 -5
- package/dist/{cli-aqcey741.js → cli-6vfz44sr.js} +1 -1
- package/dist/{cli-32bca7nr.js → cli-7avy4v8w.js} +1 -1
- package/dist/{cli-f2n17zhp.js → cli-7mhy3ths.js} +21 -18
- package/dist/{cli-q38n4bq0.js → cli-95zs84qw.js} +3 -3
- package/dist/cli-a35hzdve.js +33 -0
- package/dist/{cli-x3x0qwky.js → cli-bxqez1p0.js} +51 -23
- package/dist/{cli-gt8azyet.js → cli-c2tpw9ck.js} +1 -1
- package/dist/{cli-ecknp7p1.js → cli-c8r99akr.js} +10 -10
- package/dist/{cli-3qn4r334.js → cli-cexctgn5.js} +20 -14
- package/dist/{cli-vzc73wet.js → cli-cf2vgn9d.js} +87 -69
- package/dist/{cli-ng97fjq7.js → cli-cmxkbzzs.js} +33 -7
- package/dist/{cli-nexwh8zg.js → cli-g7k7zbcz.js} +12 -5
- package/dist/{cli-nvvfd8bq.js → cli-jbzbr36n.js} +4091 -3793
- package/dist/{cli-3ddybbbx.js → cli-jvmtxqtc.js} +26 -14
- package/dist/{cli-pkke6geq.js → cli-km4x66j0.js} +83 -65
- package/dist/{cli-j2jbr8af.js → cli-kw0jcfje.js} +1 -1
- package/dist/{cli-8t229cmr.js → cli-m7vmeepg.js} +30 -17
- package/dist/{cli-yshaazs1.js → cli-mkdsy1nq.js} +62 -20
- package/dist/{cli-b0f70z24.js → cli-mn8qkd8v.js} +1 -1
- package/dist/{cli-0qjcsxgz.js → cli-mxry91sa.js} +30 -9
- package/dist/cli-nkqjj42q.js +104 -0
- package/dist/{cli-rggdq8wq.js → cli-p8rt8spp.js} +3 -3
- package/dist/{cli-v2a8x45d.js → cli-pkj1w46r.js} +10 -5
- package/dist/cli-q1vnz8wv.js +96 -0
- package/dist/{cli-fj86xr3c.js → cli-qd97v6z2.js} +2 -2
- package/dist/{cli-66zh26sp.js → cli-qzmzwegq.js} +57 -17
- package/dist/{cli-p4ztb80h.js → cli-r7eeddkq.js} +13 -8
- package/dist/{cli-8ssjez7e.js → cli-rhy7z1rp.js} +22 -11
- package/dist/{cli-4mevd1hf.js → cli-s9y81s7j.js} +5 -5
- package/dist/{cli-h3x613ze.js → cli-tc5zec7v.js} +6 -6
- package/dist/{cli-ttbsse3f.js → cli-tmhsxhb8.js} +1 -1
- package/dist/{cli-0nhdwxd5.js → cli-tx2zvn23.js} +3 -3
- package/dist/{cli-mwegs4af.js → cli-ty4bzkqr.js} +3 -3
- package/dist/{cli-ysnyhws9.js → cli-v1pwxreq.js} +54 -51
- package/dist/{cli-feh3dkah.js → cli-v1w7pbd8.js} +2 -1
- package/dist/{cli-10zmp1p7.js → cli-vr5avem2.js} +27 -32
- package/dist/{cli-bzr0ftht.js → cli-wnb9b2g3.js} +19 -0
- package/dist/{cli-df56tqdw.js → cli-wydz3feg.js} +108 -57
- package/dist/{cli-krqm5f11.js → cli-xezn9nkh.js} +16 -13
- package/dist/{cli-8kt0bmgx.js → cli-xf713zz0.js} +2 -2
- package/dist/{cli-x7kpr72a.js → cli-y0kjpfm9.js} +2 -2
- package/dist/{cli-6zcfw0x7.js → cli-y195hv1a.js} +1 -1
- package/dist/{cli-fn697bnt.js → cli-ykt8f7va.js} +21 -8
- package/dist/{cli-4r1sjfc4.js → cli-ymmc1zxg.js} +8 -8
- package/dist/{cli-8kgvmkak.js → cli-ypgba1a8.js} +1 -1
- package/dist/{cli-rsy933yz.js → cli-z1dqhc9y.js} +30 -19
- package/dist/{cli-qbksc292.js → cli-zy39d433.js} +2 -0
- package/dist/cli.js +26 -26
- package/dist/{cloudflare-workers-ai-system-one-tt484t61.js → cloudflare-workers-ai-system-one-sta45jf9.js} +7 -5
- package/dist/{codex-adapter-dw1wxqt8.js → codex-adapter-cgesnjkr.js} +18 -18
- package/dist/{codex-login-terbdsqq.js → codex-login-g1cyt5zm.js} +1 -1
- package/dist/{codex-session-runner-3cgb8y1g.js → codex-session-runner-8kd7ddhr.js} +18 -18
- package/dist/{commands-mhxam6z2.js → commands-h6zaaxym.js} +9 -8
- package/dist/{cursor-adapter-2qda3st7.js → cursor-adapter-v8mm6bp5.js} +5 -5
- package/dist/{db-sjks418k.js → db-qg3myn53.js} +9 -8
- package/dist/{dispatcher-1es759rn.js → dispatcher-7vnwj9qw.js} +24 -24
- package/dist/{dsh-adapter-bek4cyw9.js → dsh-adapter-tz6hfp5r.js} +5 -5
- package/dist/{easter-egg-3d-mtpnw06s.js → easter-egg-3d-66zxervv.js} +2 -2
- package/dist/{execute-s4ccjq3n.js → execute-h4jgevyw.js} +61 -11
- package/dist/{google-generative-ai-d6nphg3q.js → google-generative-ai-b8zxrpax.js} +5 -5
- package/dist/{google-vertex-cpshkref.js → google-vertex-nrdd697t.js} +5 -5
- package/dist/{grok-adapter-ar9cw9jg.js → grok-adapter-jdt2dz2s.js} +18 -8
- package/dist/{handlers-1gkbhktr.js → handlers-2qtkpncr.js} +27 -27
- package/dist/{hook-ds2zxq9v.js → hook-51yfcgsv.js} +42 -31
- package/dist/{hook-vxa3tcsy.js → hook-qnbdgwvd.js} +14 -14
- package/dist/{http-3h21z9md.js → http-jsmtag08.js} +320 -98
- package/dist/{index-9b65j1m5.js → index-2t9kesn1.js} +9 -8
- package/dist/{index-dkfxpkmm.js → index-bt8wkv1w.js} +25 -25
- package/dist/{index-f8xnqrye.js → index-cx1sb9bq.js} +33 -24
- package/dist/{index-bn6cy8ps.js → index-ekywyv2v.js} +24 -24
- package/dist/{index-n99fycq7.js → index-t4g06w93.js} +24 -24
- package/dist/{keepalive-3xspa9jw.js → keepalive-4aezx4bj.js} +11 -10
- package/dist/{lead-6qphc124.js → lead-r44bkpm5.js} +47 -47
- package/dist/{llama-cpp-classify-tgj35k8d.js → llama-cpp-classify-6erb7wwv.js} +3 -1
- package/dist/{maintenance-0teem1bb.js → maintenance-grz5jrzh.js} +9 -8
- package/dist/{mistral-conversations-8445ddjn.js → mistral-conversations-059y51zt.js} +4 -4
- package/dist/{node-9sg7ajby.js → node-qm9eb6z0.js} +1 -1
- package/dist/{oauth-refresh-sweep-sh9q25xp.js → oauth-refresh-sweep-wm4ctjfj.js} +10 -9
- package/dist/{onboard-54qmnqxe.js → onboard-v60zgqf0.js} +2 -2
- package/dist/{openai-codex-responses-9ynm88zy.js → openai-codex-responses-jzxkta9b.js} +8 -7
- package/dist/{openai-completions-nhqwjmaw.js → openai-completions-663yncfq.js} +4 -4
- package/dist/openai-decisions-vj9nkpf8.js +162 -0
- package/dist/{openai-responses-xx1c4kgm.js → openai-responses-m3g43rrt.js} +5 -5
- package/dist/{opencode-adapter-wjfa2wvd.js → opencode-adapter-yjyqynzf.js} +7 -7
- package/dist/{openrouter-images-8yx3487g.js → openrouter-images-kr60n6b9.js} +1 -1
- package/dist/{otel-impl-ycqzp2a1.js → otel-impl-ghh4dyf8.js} +1 -1
- package/dist/{pi-messages-vxdt8v7j.js → pi-messages-xszk613n.js} +1 -1
- package/dist/{pi-mono-adapter-e77e9zst.js → pi-mono-adapter-0eg8kw2c.js} +68 -51
- package/dist/{pricing-refresh-atnkngqs.js → pricing-refresh-mjrqvnvw.js} +11 -10
- package/dist/{rbac-roles-j78wdksm.js → rbac-roles-axv4d74x.js} +10 -9
- package/dist/{rbac-roles-9pjphh9q.js → rbac-roles-fd5tskj9.js} +9 -8
- package/dist/{render-v2-pxjs49fx.js → render-v2-k50j33qd.js} +10 -9
- package/dist/{runtime-v2t1r79e.js → runtime-h9ha1mq6.js} +4 -4
- package/dist/{setup-ymej0xtx.js → setup-4syh0pd2.js} +2 -2
- package/dist/{typesafe-system-one-datfr82p.js → typesafe-system-one-e988vty7.js} +7 -5
- package/dist/{virtual-modules-wm8mxdxx.js → virtual-modules-ftr9kwe8.js} +11 -11
- package/dist/{work-objects-3nh4ymzb.js → work-objects-jcdbg8rr.js} +27 -27
- package/dist/{worker-qa9fkz5s.js → worker-x8j8c9sx.js} +47 -47
- package/openapi.json +1 -1
- package/package.json +8 -8
- package/src/be/memory/providers/openai-embedding.ts +7 -2
- package/src/be/memory/raters/llm-summarizer.ts +7 -2
- package/src/be/modelsdev-cache.json +61 -0
- package/src/be/seed-pricing.ts +84 -53
- package/src/be/swarm-config-guard.ts +13 -0
- package/src/commands/provider-credentials.ts +28 -5
- package/src/commands/runner.ts +7 -12
- package/src/heartbeat/heartbeat.ts +91 -19
- package/src/hooks/hook.ts +72 -27
- package/src/http/mcp.ts +5 -0
- package/src/http/onboarding.ts +2 -0
- package/src/providers/acp-targets.ts +9 -4
- package/src/providers/amp-adapter.ts +1 -1
- package/src/providers/claude-adapter.ts +26 -0
- package/src/providers/codex-adapter.ts +30 -3
- package/src/providers/codex-oauth/auth-json.ts +21 -4
- package/src/providers/codex-oauth/types.ts +2 -0
- package/src/providers/dsh-adapter.ts +10 -1
- package/src/providers/grok-adapter.ts +18 -2
- package/src/providers/opencode-adapter.ts +21 -5
- package/src/providers/pi-mono-extension.ts +56 -25
- package/src/providers/pricing-sources.md +2 -0
- package/src/server.ts +63 -3
- package/src/tests/acp-adapter.test.ts +152 -12
- package/src/tests/ci-unit-test-report.test.ts +73 -0
- package/src/tests/claude-default-route.test.ts +75 -0
- package/src/tests/claude-hook-output.test.ts +233 -0
- package/src/tests/codex-adapter-pool-auth-revalidate.test.ts +4 -2
- package/src/tests/codex-adapter.test.ts +166 -26
- package/src/tests/codex-oauth-auth-timestamps.test.ts +76 -0
- package/src/tests/codex-oauth.test.ts +4 -1
- package/src/tests/context-window.test.ts +2 -2
- package/src/tests/credential-check.test.ts +51 -1
- package/src/tests/dsh-adapter.test.ts +23 -1
- package/src/tests/enabled-tools.test.ts +269 -0
- package/src/tests/entrypoint-codex-oauth-seed.test.ts +12 -0
- package/src/tests/grok-adapter.test.ts +13 -0
- package/src/tests/haiku-5-5-pricing.test.ts +38 -0
- package/src/tests/heartbeat-checklist.test.ts +158 -1
- package/src/tests/onboarding.test.ts +44 -0
- package/src/tests/opencode-adapter.test.ts +66 -3
- package/src/tests/opencode-plugin.test.ts +37 -0
- package/src/tests/openrouter-attribution-call-sites.test.ts +204 -0
- package/src/tests/openrouter-base-url.test.ts +30 -39
- package/src/tests/pi-mono-extension.test.ts +161 -2
- package/src/tests/pricing-refresh.test.ts +70 -1
- package/src/tests/reasoning-effort.test.ts +3 -1
- package/src/tests/telemetry-trigger.test.ts +12 -1
- package/src/tests/workflow-llm.test.ts +14 -0
- package/src/tests/workflow-system-one-decision-providers.test.ts +33 -0
- package/src/tools/request-human-input.ts +7 -2
- package/src/utils/enabled-tools.ts +27 -0
- package/src/utils/internal-ai/complete-structured.ts +11 -3
- package/src/utils/openrouter-base-url.ts +23 -0
- package/src/workflows/executors/raw-llm.ts +1 -0
- package/src/workflows/executors/system-one-decision.ts +2 -0
- package/src/workflows/executors/validate.ts +1 -0
- package/src/workflows/executors/workflow-llm.ts +9 -2
- package/templates/skills/agent-browser/SKILL.md +2 -0
- package/templates/skills/agent-browser/content.md +2 -0
- package/templates/skills/code-quality/content.md +1 -0
- package/templates/skills/heartbeat-runbook/content.md +1 -1
- package/templates/skills/work-on-task/SKILL.md +4 -0
- package/templates/skills/work-on-task/content.md +4 -0
- package/templates/skills/workflow-iterate/content.md +9 -0
- package/dist/acp-adapter-yzfxn8vj.js +0 -23
- package/dist/cli-3dpj7atn.js +0 -11
- package/dist/cli-gvcgmx69.js +0 -183
- package/dist/{cli-jhm6hzjn.js → cli-mxvnnv5q.js} +7 -7
- package/dist/{codex-hook-d2rkvf39.js → codex-hook-15dgc4cb.js} +1 -1
|
@@ -1,98 +1,98 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runAgent
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-cf2vgn9d.js";
|
|
4
4
|
import"./cli-9q3wt23f.js";
|
|
5
|
-
import"./cli-
|
|
6
|
-
import"./cli-
|
|
7
|
-
import"./cli-
|
|
8
|
-
import"./cli-
|
|
9
|
-
import"./cli-
|
|
5
|
+
import"./cli-6bpvv8h4.js";
|
|
6
|
+
import"./cli-ykt8f7va.js";
|
|
7
|
+
import"./cli-cexctgn5.js";
|
|
8
|
+
import"./cli-9k7mqz00.js";
|
|
9
|
+
import"./cli-m7vmeepg.js";
|
|
10
|
+
import"./cli-tc5zec7v.js";
|
|
10
11
|
import"./cli-hsxj0yar.js";
|
|
11
12
|
import"./cli-hf5s9pgf.js";
|
|
12
|
-
import"./cli-
|
|
13
|
-
import"./cli-v2a8x45d.js";
|
|
14
|
-
import"./cli-mwegs4af.js";
|
|
15
|
-
import"./cli-9k7mqz00.js";
|
|
13
|
+
import"./cli-jvmtxqtc.js";
|
|
16
14
|
import"./cli-gt4hxb8p.js";
|
|
17
|
-
import"./cli-
|
|
18
|
-
import"./cli-
|
|
19
|
-
import"./cli-y59h2pk9.js";
|
|
20
|
-
import"./cli-v6vv7dy8.js";
|
|
21
|
-
import"./cli-q2j38vre.js";
|
|
22
|
-
import"./cli-zm7njwzd.js";
|
|
23
|
-
import"./cli-ptcz1cqy.js";
|
|
24
|
-
import"./cli-32bca7nr.js";
|
|
25
|
-
import"./cli-p4ztb80h.js";
|
|
26
|
-
import"./cli-hp1n6zq3.js";
|
|
27
|
-
import"./cli-tng3131n.js";
|
|
15
|
+
import"./cli-pkj1w46r.js";
|
|
16
|
+
import"./cli-ty4bzkqr.js";
|
|
28
17
|
import"./cli-5bfdm1ah.js";
|
|
29
18
|
import"./cli-efnd2kce.js";
|
|
30
19
|
import"./cli-zp67qg5x.js";
|
|
31
20
|
import"./cli-bqjfjex4.js";
|
|
21
|
+
import"./cli-mxry91sa.js";
|
|
22
|
+
import"./cli-z1dqhc9y.js";
|
|
23
|
+
import"./cli-69egj654.js";
|
|
24
|
+
import"./cli-v6vv7dy8.js";
|
|
25
|
+
import"./cli-q2j38vre.js";
|
|
26
|
+
import"./cli-r7eeddkq.js";
|
|
27
|
+
import"./cli-hp1n6zq3.js";
|
|
28
|
+
import"./cli-tng3131n.js";
|
|
29
|
+
import"./cli-zm7njwzd.js";
|
|
30
|
+
import"./cli-ptcz1cqy.js";
|
|
31
|
+
import"./cli-7avy4v8w.js";
|
|
32
32
|
import"./cli-eree7rnv.js";
|
|
33
33
|
import"./cli-2pdaysab.js";
|
|
34
|
-
import"./cli-
|
|
35
|
-
import"./cli-
|
|
34
|
+
import"./cli-tmhsxhb8.js";
|
|
35
|
+
import"./cli-5qkcdv8c.js";
|
|
36
36
|
import"./cli-dpvkp2et.js";
|
|
37
37
|
import {
|
|
38
38
|
getEnabledCapabilities
|
|
39
|
-
} from "./cli-
|
|
39
|
+
} from "./cli-wydz3feg.js";
|
|
40
40
|
import"./cli-xvc3q9br.js";
|
|
41
41
|
import"./cli-mv2520nm.js";
|
|
42
42
|
import"./cli-w0bwte75.js";
|
|
43
43
|
import"./cli-re8z5p8p.js";
|
|
44
|
-
import"./cli-
|
|
45
|
-
import"./cli-
|
|
46
|
-
import"./cli-
|
|
47
|
-
import"./cli-
|
|
44
|
+
import"./cli-tx2zvn23.js";
|
|
45
|
+
import"./cli-p8rt8spp.js";
|
|
46
|
+
import"./cli-v1pwxreq.js";
|
|
47
|
+
import"./cli-577bxkf6.js";
|
|
48
48
|
import"./cli-epan13p1.js";
|
|
49
49
|
import"./cli-f14fvzag.js";
|
|
50
|
+
import"./cli-7mhy3ths.js";
|
|
51
|
+
import"./cli-v1w7pbd8.js";
|
|
50
52
|
import"./cli-zt3w1cn1.js";
|
|
51
|
-
import"./cli-
|
|
52
|
-
import"./cli-feh3dkah.js";
|
|
53
|
-
import"./cli-3dpj7atn.js";
|
|
54
|
-
import"./cli-2x0e561b.js";
|
|
55
|
-
import"./cli-pkke6geq.js";
|
|
53
|
+
import"./cli-km4x66j0.js";
|
|
56
54
|
import"./cli-rb9m6rpe.js";
|
|
55
|
+
import"./cli-2x0e561b.js";
|
|
56
|
+
import"./cli-kw0jcfje.js";
|
|
57
57
|
import"./cli-mzfth0bp.js";
|
|
58
|
-
import"./cli-j2jbr8af.js";
|
|
59
58
|
import"./cli-fad8m16k.js";
|
|
60
59
|
import"./cli-bsakbbkm.js";
|
|
61
60
|
import"./cli-zxg80zs9.js";
|
|
62
61
|
import"./cli-51tf7ac3.js";
|
|
63
62
|
import"./cli-ydt3zkwv.js";
|
|
64
|
-
import"./cli-
|
|
63
|
+
import"./cli-c8r99akr.js";
|
|
65
64
|
import"./cli-q51yprfq.js";
|
|
66
65
|
import"./cli-3er6gcsn.js";
|
|
67
66
|
import"./cli-yatxqynm.js";
|
|
68
|
-
import"./cli-
|
|
69
|
-
import"./cli-
|
|
67
|
+
import"./cli-mn8qkd8v.js";
|
|
68
|
+
import"./cli-g7k7zbcz.js";
|
|
70
69
|
import"./cli-btbzvq95.js";
|
|
71
70
|
import"./cli-1m2e086m.js";
|
|
72
|
-
import"./cli-
|
|
71
|
+
import"./cli-wnb9b2g3.js";
|
|
73
72
|
import"./cli-bd957dgb.js";
|
|
74
73
|
import"./cli-pzxba7gw.js";
|
|
75
|
-
import"./cli-
|
|
74
|
+
import"./cli-ypgba1a8.js";
|
|
76
75
|
import"./cli-rfphkzh5.js";
|
|
77
|
-
import"./cli-
|
|
78
|
-
import"./cli-xvdgasgy.js";
|
|
76
|
+
import"./cli-mkdsy1nq.js";
|
|
79
77
|
import"./cli-3qhyh31j.js";
|
|
80
|
-
import"./cli-
|
|
78
|
+
import"./cli-xvdgasgy.js";
|
|
79
|
+
import"./cli-mxvnnv5q.js";
|
|
81
80
|
import"./cli-7mm2r1kp.js";
|
|
82
81
|
import"./cli-g5erf0zt.js";
|
|
83
82
|
import"./cli-dmtrxqhg.js";
|
|
84
|
-
import"./cli-tadfgd0t.js";
|
|
85
|
-
import"./cli-ywybs5as.js";
|
|
86
|
-
import"./cli-gd4favx9.js";
|
|
87
83
|
import"./cli-agamgm0p.js";
|
|
88
84
|
import"./cli-5c2j5yvx.js";
|
|
89
85
|
import"./cli-1a2j50m0.js";
|
|
86
|
+
import"./cli-tadfgd0t.js";
|
|
87
|
+
import"./cli-ywybs5as.js";
|
|
90
88
|
import"./cli-f9w1semm.js";
|
|
89
|
+
import"./cli-a35hzdve.js";
|
|
90
|
+
import"./cli-gd4favx9.js";
|
|
91
91
|
import"./cli-ej6gbxfb.js";
|
|
92
|
-
import"./cli-
|
|
92
|
+
import"./cli-014vns2y.js";
|
|
93
93
|
import"./cli-sd0mxa3c.js";
|
|
94
94
|
import"./cli-w5e1d1vv.js";
|
|
95
|
-
import"./cli-
|
|
95
|
+
import"./cli-ymmc1zxg.js";
|
|
96
96
|
import"./cli-mb75wpxf.js";
|
|
97
97
|
import"./cli-zf8jjwex.js";
|
|
98
98
|
import"./cli-wt7ccy4r.js";
|
package/openapi.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"openapi": "3.1.0",
|
|
3
3
|
"info": {
|
|
4
4
|
"title": "Agent Swarm API",
|
|
5
|
-
"version": "1.
|
|
5
|
+
"version": "1.167.0",
|
|
6
6
|
"description": "Multi-agent orchestration API for Claude Code, Codex, and Gemini CLI. Enables task distribution, agent communication, and service discovery.\n\nMCP tools are documented separately in [MCP.md](./MCP.md)."
|
|
7
7
|
},
|
|
8
8
|
"servers": [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@desplega.ai/agent-swarm",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.167.0",
|
|
4
4
|
"description": "agent-swarm.dev — an open-source operating system for AI work: a lead agent breaks goals into tasks, routes them to specialized workers such as Claude Code or Codex, runs each worker in an isolated container, and preserves shared memory, tools, schedules, and review gates so delegated work compounds across sessions.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agent-swarm.dev",
|
|
@@ -147,8 +147,8 @@
|
|
|
147
147
|
"start:portless": "portless api.swarm bun --expose-gc src/http.ts",
|
|
148
148
|
"inspector": "bunx @modelcontextprotocol/inspector --transport stdio bun src/stdio.ts",
|
|
149
149
|
"inspector:http": "bunx @modelcontextprotocol/inspector --transport http https://api.swarm.localhost:1355/mcp",
|
|
150
|
-
"lint": "biome check src apps/evals packages/ui-e2e packages/model-routing",
|
|
151
|
-
"lint:fix": "biome check --write src apps/evals packages/ui-e2e packages/model-routing",
|
|
150
|
+
"lint": "biome check src apps/evals packages/ui-e2e packages/model-routing packages/model-catalog",
|
|
151
|
+
"lint:fix": "biome check --write src apps/evals packages/ui-e2e packages/model-routing packages/model-catalog",
|
|
152
152
|
"format": "biome format --write src",
|
|
153
153
|
"build:binary": "bun build ./src/cli.tsx ./src/providers/pi-binary-root/src/extensions/codemode/worker.ts --root ./src/providers/pi-binary-root --compile --bytecode --format=esm --compile-exec-argv='--expose-gc' --target=bun-linux-x64 --outfile ./dist/agent-swarm",
|
|
154
154
|
"build:binary:arm64": "bun build ./src/cli.tsx ./src/providers/pi-binary-root/src/extensions/codemode/worker.ts --root ./src/providers/pi-binary-root --compile --bytecode --format=esm --compile-exec-argv='--expose-gc' --target=bun-linux-arm64 --outfile ./dist/agent-swarm",
|
|
@@ -203,19 +203,19 @@
|
|
|
203
203
|
"@agentclientprotocol/sdk": "1.7.0",
|
|
204
204
|
"@ai-sdk/openai": "^3.0.41",
|
|
205
205
|
"@anthropic-ai/claude-agent-sdk": "0.3.293",
|
|
206
|
-
"@anthropic-ai/sdk": "^0.132.
|
|
206
|
+
"@anthropic-ai/sdk": "^0.132.1",
|
|
207
207
|
"@asteasolutions/zod-to-openapi": "^8.0.0",
|
|
208
208
|
"@aws-sdk/client-bedrock": "3.1048.0",
|
|
209
209
|
"@cursor/sdk": "1.0.37",
|
|
210
210
|
"@desplega.ai/business-use": "^0.4.2",
|
|
211
211
|
"@desplega.ai/localtunnel": "^2.2.0",
|
|
212
|
-
"@earendil-works/pi-agent-core": "^1.0
|
|
213
|
-
"@earendil-works/pi-ai": "^1.0
|
|
214
|
-
"@earendil-works/pi-coding-agent": "^1.0
|
|
212
|
+
"@earendil-works/pi-agent-core": "^1.1.0",
|
|
213
|
+
"@earendil-works/pi-ai": "^1.1.0",
|
|
214
|
+
"@earendil-works/pi-coding-agent": "^1.1.0",
|
|
215
215
|
"@inkjs/ui": "^2.0.0",
|
|
216
216
|
"@jitl/quickjs-singlefile-mjs-release-sync": "0.32.0",
|
|
217
217
|
"@linear/sdk": "^77.0.0",
|
|
218
|
-
"@modelcontextprotocol/sdk": "1.
|
|
218
|
+
"@modelcontextprotocol/sdk": "1.31.0",
|
|
219
219
|
"@openai/codex": "0.161.0",
|
|
220
220
|
"@opencode-ai/sdk": "^1.18.35",
|
|
221
221
|
"@openfort/openfort-node": "^0.9.1",
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import OpenAI from "openai";
|
|
2
|
+
import { getOpenRouterAttributionHeaders } from "../../../utils/openrouter-base-url";
|
|
2
3
|
import { DEFAULT_EMBEDDING_MODEL, EMBEDDING_DIMENSIONS } from "../constants";
|
|
3
4
|
import type { EmbeddingProvider } from "../types";
|
|
4
5
|
|
|
@@ -34,11 +35,15 @@ export class OpenAIEmbeddingProvider implements EmbeddingProvider {
|
|
|
34
35
|
|
|
35
36
|
private getClient(): OpenAI | null {
|
|
36
37
|
if (!this.apiKey) return null;
|
|
37
|
-
if (!this.client)
|
|
38
|
+
if (!this.client) {
|
|
39
|
+
const baseURL = process.env.EMBEDDING_API_BASE_URL; // Optional custom base URL
|
|
38
40
|
this.client = new OpenAI({
|
|
39
|
-
baseURL
|
|
41
|
+
baseURL,
|
|
40
42
|
apiKey: this.apiKey,
|
|
43
|
+
// Only an openrouter.ai base URL gets attribution; OpenAI and gateways get none.
|
|
44
|
+
defaultHeaders: getOpenRouterAttributionHeaders(baseURL ?? ""),
|
|
41
45
|
});
|
|
46
|
+
}
|
|
42
47
|
return this.client;
|
|
43
48
|
}
|
|
44
49
|
|
|
@@ -12,7 +12,10 @@
|
|
|
12
12
|
*/
|
|
13
13
|
import { z } from "zod";
|
|
14
14
|
import { MEMORY_RATER_DEFAULT_MODEL } from "../../../utils/internal-ai/models";
|
|
15
|
-
import {
|
|
15
|
+
import {
|
|
16
|
+
getOpenRouterAttributionHeaders,
|
|
17
|
+
getOpenRouterBaseUrl,
|
|
18
|
+
} from "../../../utils/openrouter-base-url";
|
|
16
19
|
import { type SummaryWithRatings, SummaryWithRatingsSchema } from "./llm";
|
|
17
20
|
|
|
18
21
|
/**
|
|
@@ -150,11 +153,13 @@ export async function runMemoryRater(opts: RunMemoryRaterOpts): Promise<RunMemor
|
|
|
150
153
|
const model = opts.model ?? getMemoryRaterModel();
|
|
151
154
|
const responseLogCap = opts.responseLogCap ?? 200;
|
|
152
155
|
|
|
156
|
+
const url = openRouterChatCompletionsUrl();
|
|
153
157
|
let res: Response;
|
|
154
158
|
try {
|
|
155
|
-
res = await fetchFn(
|
|
159
|
+
res = await fetchFn(url, {
|
|
156
160
|
method: "POST",
|
|
157
161
|
headers: {
|
|
162
|
+
...getOpenRouterAttributionHeaders(url),
|
|
158
163
|
"Content-Type": "application/json",
|
|
159
164
|
Authorization: `Bearer ${opts.apiKey}`,
|
|
160
165
|
},
|
|
@@ -147175,6 +147175,67 @@
|
|
|
147175
147175
|
"name": "Anthropic",
|
|
147176
147176
|
"doc": "https://docs.anthropic.com/en/docs/about-claude/models",
|
|
147177
147177
|
"models": {
|
|
147178
|
+
"claude-haiku-5-5": {
|
|
147179
|
+
"id": "claude-haiku-5-5",
|
|
147180
|
+
"name": "Claude Haiku 5.5",
|
|
147181
|
+
"description": "Fast Claude model for responsive assistance, classification, and lightweight agents",
|
|
147182
|
+
"family": "claude-haiku",
|
|
147183
|
+
"attachment": true,
|
|
147184
|
+
"reasoning": true,
|
|
147185
|
+
"reasoning_options": [
|
|
147186
|
+
{
|
|
147187
|
+
"type": "toggle"
|
|
147188
|
+
},
|
|
147189
|
+
{
|
|
147190
|
+
"type": "effort",
|
|
147191
|
+
"values": [
|
|
147192
|
+
"low",
|
|
147193
|
+
"medium",
|
|
147194
|
+
"high",
|
|
147195
|
+
"xhigh",
|
|
147196
|
+
"max"
|
|
147197
|
+
]
|
|
147198
|
+
}
|
|
147199
|
+
],
|
|
147200
|
+
"tool_call": true,
|
|
147201
|
+
"structured_output": true,
|
|
147202
|
+
"temperature": false,
|
|
147203
|
+
"knowledge": "2026-06",
|
|
147204
|
+
"modalities": {
|
|
147205
|
+
"input": [
|
|
147206
|
+
"text",
|
|
147207
|
+
"image",
|
|
147208
|
+
"pdf"
|
|
147209
|
+
],
|
|
147210
|
+
"output": [
|
|
147211
|
+
"text"
|
|
147212
|
+
]
|
|
147213
|
+
},
|
|
147214
|
+
"open_weights": false,
|
|
147215
|
+
"limit": {
|
|
147216
|
+
"context": 1000000,
|
|
147217
|
+
"output": 128000
|
|
147218
|
+
},
|
|
147219
|
+
"cost": {
|
|
147220
|
+
"input": 0.1,
|
|
147221
|
+
"output": 0.5,
|
|
147222
|
+
"cache_read": 0.01,
|
|
147223
|
+
"cache_write": 0.125,
|
|
147224
|
+
"tiers": [
|
|
147225
|
+
{
|
|
147226
|
+
"input": 0.5,
|
|
147227
|
+
"output": 2.5,
|
|
147228
|
+
"cache_read": 0.05,
|
|
147229
|
+
"cache_write": 0.625,
|
|
147230
|
+
"tier": {
|
|
147231
|
+
"type": "context",
|
|
147232
|
+
"size": 100000
|
|
147233
|
+
}
|
|
147234
|
+
}
|
|
147235
|
+
]
|
|
147236
|
+
},
|
|
147237
|
+
"canonical_model_id": "anthropic/claude-haiku-5-5"
|
|
147238
|
+
},
|
|
147178
147239
|
"claude-sonnet-5-5": {
|
|
147179
147240
|
"id": "claude-sonnet-5-5",
|
|
147180
147241
|
"name": "Claude Sonnet 5.5",
|
package/src/be/seed-pricing.ts
CHANGED
|
@@ -183,6 +183,55 @@ function projectCostBlock(
|
|
|
183
183
|
return rows;
|
|
184
184
|
}
|
|
185
185
|
|
|
186
|
+
/** A projected row plus the models.dev id it came from, before normalized ids are collapsed. */
|
|
187
|
+
interface SourcedSeedRow {
|
|
188
|
+
sourceId: string;
|
|
189
|
+
row: PricingSeedRow;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/** Whether `candidate` beats `current` as the source of a normalized `key`. */
|
|
193
|
+
function outranksSource(candidate: string, current: string, key: string): boolean {
|
|
194
|
+
const a = candidate.toLowerCase();
|
|
195
|
+
const b = current.toLowerCase();
|
|
196
|
+
if ((a === key) !== (b === key)) return a === key;
|
|
197
|
+
return a > b;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* `normalizeModelKey` can fold several models.dev ids onto one key: amp strips
|
|
202
|
+
* OpenAI's dated snapshots, so `gpt-4o`, `gpt-4o-2024-05-13`, `gpt-4o-2024-08-06`
|
|
203
|
+
* and `gpt-4o-2024-11-20` all become `amp|gpt-4o`, at different prices. The
|
|
204
|
+
* refresh writes every changed row at one `effective_from`, so two prices for
|
|
205
|
+
* one (provider, model, tokenClass) hit the pricing primary key and roll back
|
|
206
|
+
* the whole batch.
|
|
207
|
+
*
|
|
208
|
+
* Rule: one source id wins per (provider, normalized model), and all its token
|
|
209
|
+
* classes come from it. The id that is already canonical (the undated alias)
|
|
210
|
+
* wins; failing that, the greatest id, i.e. the newest dated snapshot. A source
|
|
211
|
+
* id repeated across catalog sections keeps its first row per token class.
|
|
212
|
+
*/
|
|
213
|
+
function collapseNormalizedIds(sourced: SourcedSeedRow[]): PricingSeedRow[] {
|
|
214
|
+
const modelKey = (row: PricingSeedRow) => `${row.provider}\u0000${row.model}`;
|
|
215
|
+
const winners = new Map<string, string>();
|
|
216
|
+
for (const { sourceId, row } of sourced) {
|
|
217
|
+
const current = winners.get(modelKey(row));
|
|
218
|
+
if (current === undefined || outranksSource(sourceId, current, row.model)) {
|
|
219
|
+
winners.set(modelKey(row), sourceId);
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
const seen = new Set<string>();
|
|
224
|
+
const rows: PricingSeedRow[] = [];
|
|
225
|
+
for (const { sourceId, row } of sourced) {
|
|
226
|
+
if (winners.get(modelKey(row)) !== sourceId) continue;
|
|
227
|
+
const rowKey = `${modelKey(row)}\u0000${row.tokenClass}`;
|
|
228
|
+
if (seen.has(rowKey)) continue;
|
|
229
|
+
seen.add(rowKey);
|
|
230
|
+
rows.push(row);
|
|
231
|
+
}
|
|
232
|
+
return rows;
|
|
233
|
+
}
|
|
234
|
+
|
|
186
235
|
/**
|
|
187
236
|
* Build the full set of seed rows from a loaded models.dev cache.
|
|
188
237
|
*
|
|
@@ -191,7 +240,10 @@ function projectCostBlock(
|
|
|
191
240
|
* explicit and auditable.
|
|
192
241
|
*/
|
|
193
242
|
export function buildModelsDevSeedRows(cache: ModelsDevCache): PricingSeedRow[] {
|
|
194
|
-
const
|
|
243
|
+
const sourced: SourcedSeedRow[] = [];
|
|
244
|
+
const add = (sourceId: string, projected: PricingSeedRow[]) => {
|
|
245
|
+
for (const row of projected) sourced.push({ sourceId, row });
|
|
246
|
+
};
|
|
195
247
|
|
|
196
248
|
// ---- Anthropic / claude family ----------------------------------------
|
|
197
249
|
// The 'claude' provider (local-CLI adapter) reports the model id as the
|
|
@@ -202,9 +254,7 @@ export function buildModelsDevSeedRows(cache: ModelsDevCache): PricingSeedRow[]
|
|
|
202
254
|
for (const [id, model] of Object.entries(anthropic)) {
|
|
203
255
|
if (!model?.cost) continue;
|
|
204
256
|
for (const provider of ["claude", "claude-managed"] as const) {
|
|
205
|
-
|
|
206
|
-
rows.push(row);
|
|
207
|
-
}
|
|
257
|
+
add(id, projectCostBlock(provider, id, model.cost));
|
|
208
258
|
}
|
|
209
259
|
}
|
|
210
260
|
// Anthropic shortnames (opus/sonnet/haiku) → resolve to the current default.
|
|
@@ -214,9 +264,7 @@ export function buildModelsDevSeedRows(cache: ModelsDevCache): PricingSeedRow[]
|
|
|
214
264
|
(cache.anthropic ? ANTHROPIC_SHORTNAME_PRICING_FALLBACKS[fullId] : undefined);
|
|
215
265
|
if (!cost) continue;
|
|
216
266
|
for (const provider of ["claude", "claude-managed"] as const) {
|
|
217
|
-
|
|
218
|
-
rows.push(row);
|
|
219
|
-
}
|
|
267
|
+
add(shortname, projectCostBlock(provider, shortname, cost));
|
|
220
268
|
}
|
|
221
269
|
}
|
|
222
270
|
// Pi-mono uses anthropic models via OpenRouter mirrors; project those too.
|
|
@@ -225,9 +273,7 @@ export function buildModelsDevSeedRows(cache: ModelsDevCache): PricingSeedRow[]
|
|
|
225
273
|
anthropic[fullId]?.cost ??
|
|
226
274
|
(cache.anthropic ? ANTHROPIC_SHORTNAME_PRICING_FALLBACKS[fullId] : undefined);
|
|
227
275
|
if (!cost) continue;
|
|
228
|
-
|
|
229
|
-
rows.push(row);
|
|
230
|
-
}
|
|
276
|
+
add(shortname, projectCostBlock("pi", shortname, cost, { anthropicBilled: true }));
|
|
231
277
|
}
|
|
232
278
|
|
|
233
279
|
// ---- Amp (Anthropic, OpenAI, Google and Fireworks models by id) ---------
|
|
@@ -237,9 +283,7 @@ export function buildModelsDevSeedRows(cache: ModelsDevCache): PricingSeedRow[]
|
|
|
237
283
|
for (const section of ["anthropic", "openai", "google", "fireworks-ai"]) {
|
|
238
284
|
for (const [id, model] of Object.entries(cache[section]?.models ?? {})) {
|
|
239
285
|
if (!model?.cost) continue;
|
|
240
|
-
|
|
241
|
-
rows.push(row);
|
|
242
|
-
}
|
|
286
|
+
add(id, projectCostBlock("amp", id, model.cost));
|
|
243
287
|
}
|
|
244
288
|
}
|
|
245
289
|
|
|
@@ -247,16 +291,12 @@ export function buildModelsDevSeedRows(cache: ModelsDevCache): PricingSeedRow[]
|
|
|
247
291
|
const openai = cache.openai?.models ?? {};
|
|
248
292
|
for (const [id, model] of Object.entries(openai)) {
|
|
249
293
|
if (!model?.cost) continue;
|
|
250
|
-
|
|
251
|
-
rows.push(row);
|
|
252
|
-
}
|
|
294
|
+
add(id, projectCostBlock("codex", id, model.cost));
|
|
253
295
|
// Phase 2 fix — pi-mono can route to openai models through the
|
|
254
296
|
// github-copilot proxy (`github-copilot/gpt-5.4`). The lookup helper
|
|
255
297
|
// strips the prefix, so we seed the bare id under `pi` too. Without this
|
|
256
298
|
// every gh-copilot-backed pi run fell through to `costSource='unpriced'`.
|
|
257
|
-
|
|
258
|
-
rows.push(row);
|
|
259
|
-
}
|
|
299
|
+
add(id, projectCostBlock("pi", id, model.cost));
|
|
260
300
|
}
|
|
261
301
|
|
|
262
302
|
// ---- Cursor (bare vendor ids through Cursor's hosted inference) --------
|
|
@@ -267,27 +307,21 @@ export function buildModelsDevSeedRows(cache: ModelsDevCache): PricingSeedRow[]
|
|
|
267
307
|
for (const vendor of ["openai", "anthropic", "google", "xai"] as const) {
|
|
268
308
|
for (const [id, model] of Object.entries(cache[vendor]?.models ?? {})) {
|
|
269
309
|
if (!model?.cost) continue;
|
|
270
|
-
|
|
271
|
-
rows.push(row);
|
|
272
|
-
}
|
|
310
|
+
add(id, projectCostBlock("cursor", id, model.cost, { anthropicBilled: false }));
|
|
273
311
|
}
|
|
274
312
|
}
|
|
275
313
|
|
|
276
314
|
// ---- Grok CLI (bare xAI ids, billed at xAI's API rates via XAI_API_KEY) --
|
|
277
315
|
for (const [id, model] of Object.entries(cache.xai?.models ?? {})) {
|
|
278
316
|
if (!model?.cost) continue;
|
|
279
|
-
|
|
280
|
-
rows.push(row);
|
|
281
|
-
}
|
|
317
|
+
add(id, projectCostBlock("grok", id, model.cost, { anthropicBilled: false }));
|
|
282
318
|
}
|
|
283
319
|
|
|
284
320
|
// ---- DeepSeek direct API (dsh with DEEPSEEK_API_KEY, bare ids) ---------
|
|
285
321
|
const deepseek = cache.deepseek?.models ?? {};
|
|
286
322
|
for (const [id, model] of Object.entries(deepseek)) {
|
|
287
323
|
if (!model?.cost) continue;
|
|
288
|
-
|
|
289
|
-
rows.push(row);
|
|
290
|
-
}
|
|
324
|
+
add(id, projectCostBlock("dsh", id, model.cost));
|
|
291
325
|
}
|
|
292
326
|
|
|
293
327
|
// ---- OpenRouter passthrough (covers gemini + every opencode-routed model)
|
|
@@ -295,48 +329,45 @@ export function buildModelsDevSeedRows(cache: ModelsDevCache): PricingSeedRow[]
|
|
|
295
329
|
for (const [id, model] of Object.entries(openrouter)) {
|
|
296
330
|
if (!model?.cost) continue;
|
|
297
331
|
// opencode routes whatever model the user picks; we project them all.
|
|
298
|
-
|
|
299
|
-
rows.push(row);
|
|
300
|
-
}
|
|
332
|
+
add(id, projectCostBlock("opencode", id, model.cost));
|
|
301
333
|
// pi-mono also routes via OpenRouter when only OPENROUTER_API_KEY is set
|
|
302
334
|
// (see src/providers/pi-mono-adapter.ts). Without this projection, pi runs
|
|
303
335
|
// against non-anthropic models (e.g. deepseek/deepseek-v4-flash) fall
|
|
304
336
|
// through to costSource='unpriced' even though the model is in the
|
|
305
337
|
// models.dev snapshot.
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
338
|
+
add(
|
|
339
|
+
id,
|
|
340
|
+
projectCostBlock("pi", id, model.cost, {
|
|
341
|
+
anthropicBilled: id.startsWith("anthropic/"),
|
|
342
|
+
}),
|
|
343
|
+
);
|
|
311
344
|
// dsh routes `openrouter/<id>` models (all four tier defaults) through
|
|
312
345
|
// OpenRouter, so it bills at the same rates.
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
346
|
+
add(
|
|
347
|
+
id,
|
|
348
|
+
projectCostBlock("dsh", id, model.cost, {
|
|
349
|
+
anthropicBilled: id.startsWith("anthropic/"),
|
|
350
|
+
}),
|
|
351
|
+
);
|
|
318
352
|
// grok runs `openrouter/<id>` models as OpenAI-compatible BYOK models.
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
353
|
+
add(
|
|
354
|
+
id,
|
|
355
|
+
projectCostBlock("grok", id, model.cost, {
|
|
356
|
+
anthropicBilled: id.startsWith("anthropic/"),
|
|
357
|
+
}),
|
|
358
|
+
);
|
|
324
359
|
// Gemini specifically: also project under the 'gemini' provider so
|
|
325
360
|
// internal-ai callers that tag with provider='gemini' find a hit.
|
|
326
361
|
if (id.startsWith("google/")) {
|
|
327
362
|
const geminiKey = id.replace(/^google\//, "");
|
|
328
|
-
|
|
329
|
-
rows.push(row);
|
|
330
|
-
}
|
|
363
|
+
add(geminiKey, projectCostBlock("gemini", geminiKey, model.cost));
|
|
331
364
|
// Also store under the full openrouter id so the same row resolves
|
|
332
365
|
// whether the caller passes "google/..." or the stripped name.
|
|
333
|
-
|
|
334
|
-
rows.push(row);
|
|
335
|
-
}
|
|
366
|
+
add(id, projectCostBlock("gemini", id, model.cost));
|
|
336
367
|
}
|
|
337
368
|
}
|
|
338
369
|
|
|
339
|
-
return
|
|
370
|
+
return collapseNormalizedIds(sourced);
|
|
340
371
|
}
|
|
341
372
|
|
|
342
373
|
/** Build the exact provider rows inserted by the boot-time pricing seeder. */
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { normalizeSlackReactionShortcode } from "../slack/reaction-shortcode";
|
|
2
2
|
import { ProviderNameSchema } from "../types";
|
|
3
3
|
import { API_DRAIN_MAX_MS_LIMIT } from "../utils/api-drain";
|
|
4
|
+
import { parseEnabledTools } from "../utils/enabled-tools";
|
|
4
5
|
import { parseTaskToolManifest } from "../utils/task-tool-manifest";
|
|
5
6
|
import { isTierConfigKey, validateTierConfigValue } from "./model-tier-keys";
|
|
6
7
|
|
|
@@ -212,6 +213,17 @@ const VALIDATED_KEYS: Record<string, ConfigValidator> = {
|
|
|
212
213
|
return "Invalid TASK_TOOL_MANIFESTS (expected JSON with taskTypes and/or schedules maps, each selecting at most 16 known swarm tools)";
|
|
213
214
|
}
|
|
214
215
|
},
|
|
216
|
+
// MCP tool allowlist: comma-separated names or a JSON array of strings.
|
|
217
|
+
// Unknown names are accepted here and warned about at session init.
|
|
218
|
+
SWARM_ENABLED_TOOLS: (value) => {
|
|
219
|
+
try {
|
|
220
|
+
if (typeof value !== "string") throw new Error("Expected string");
|
|
221
|
+
parseEnabledTools(value);
|
|
222
|
+
return null;
|
|
223
|
+
} catch {
|
|
224
|
+
return "Invalid SWARM_ENABLED_TOOLS (expected comma-separated tool names or a JSON array of strings)";
|
|
225
|
+
}
|
|
226
|
+
},
|
|
215
227
|
FEEDBACK_ENDPOINT: (value) => {
|
|
216
228
|
if (typeof value !== "string") {
|
|
217
229
|
return "Invalid FEEDBACK_ENDPOINT (must use HTTPS, or HTTP on a loopback host)";
|
|
@@ -304,6 +316,7 @@ const VALIDATED_KEYS: Record<string, ConfigValidator> = {
|
|
|
304
316
|
"PI_TOOL_DEFERRAL",
|
|
305
317
|
"PI_CODEMODE",
|
|
306
318
|
"PI_CODEMODE_MODELS",
|
|
319
|
+
"OPENROUTER_APP_ATTRIBUTION",
|
|
307
320
|
"CURSOR_NATIVE_SYSTEM_PROMPT",
|
|
308
321
|
"SLACK_DISABLE",
|
|
309
322
|
"SLACK_RENDER_V2",
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
*/
|
|
20
20
|
|
|
21
21
|
import { deriveDefaultRoute, validateRoute } from "@desplega/model-routing";
|
|
22
|
+
import { ACP_TARGET_IDS, isAcpTarget } from "../providers/acp-target-catalog";
|
|
22
23
|
import { checkAmpCredentials, liveTestAmpCredentials } from "../providers/amp-adapter";
|
|
23
24
|
import { checkClaudeCredentials } from "../providers/claude-adapter";
|
|
24
25
|
import { checkClaudeManagedCredentials } from "../providers/claude-managed-adapter";
|
|
@@ -38,7 +39,10 @@ import type {
|
|
|
38
39
|
ReasoningEffort,
|
|
39
40
|
} from "../types";
|
|
40
41
|
import { CLAUDE_CREDENTIALS_HINT } from "../utils/credentials";
|
|
41
|
-
import {
|
|
42
|
+
import {
|
|
43
|
+
getOpenRouterAttributionHeaders,
|
|
44
|
+
getOpenRouterBaseUrl,
|
|
45
|
+
} from "../utils/openrouter-base-url";
|
|
42
46
|
import { scrubSecrets } from "../utils/secret-scrubber";
|
|
43
47
|
|
|
44
48
|
export type SupportedProvider =
|
|
@@ -114,7 +118,7 @@ export const REQUIRED_CRED_VARS_BY_PROVIDER: Record<SupportedProvider, readonly
|
|
|
114
118
|
devin: ["DEVIN_API_KEY", "DEVIN_ORG_ID"],
|
|
115
119
|
opencode: ["OPENROUTER_API_KEY", "ANTHROPIC_API_KEY", "OPENAI_API_KEY"],
|
|
116
120
|
pi: ["ANTHROPIC_API_KEY", "OPENROUTER_API_KEY", "OPENAI_API_KEY"],
|
|
117
|
-
// The ACP target
|
|
121
|
+
// The ACP target owns its auth; custom targets still need a command.
|
|
118
122
|
acp: [],
|
|
119
123
|
dsh: ["DEEPSEEK_API_KEY", "OPENROUTER_API_KEY"],
|
|
120
124
|
amp: ["AMP_API_KEY"],
|
|
@@ -142,7 +146,25 @@ export const CREDENTIAL_PROVIDER_CHECKERS: Record<SupportedProvider, CredentialC
|
|
|
142
146
|
const { checkPiMonoCredentials } = await import("../providers/pi-mono-adapter");
|
|
143
147
|
return checkPiMonoCredentials(env, opts);
|
|
144
148
|
},
|
|
145
|
-
acp: () =>
|
|
149
|
+
acp: (env) => {
|
|
150
|
+
const target = env.ACP_TARGET ?? "custom";
|
|
151
|
+
if (!isAcpTarget(target)) {
|
|
152
|
+
return {
|
|
153
|
+
ready: false,
|
|
154
|
+
missing: ["ACP_TARGET"],
|
|
155
|
+
hint: `Set ACP_TARGET to one of: ${ACP_TARGET_IDS.join(", ")}.`,
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
const command = env.ACP_TARGET_COMMAND ?? env.ACP_COMMAND;
|
|
159
|
+
if (target === "custom" && !command?.trim()) {
|
|
160
|
+
return {
|
|
161
|
+
ready: false,
|
|
162
|
+
missing: ["ACP_TARGET_COMMAND"],
|
|
163
|
+
hint: "Set ACP_TARGET_COMMAND (or ACP_COMMAND) to an ACP-compatible executable, or select a preset with ACP_TARGET.",
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
return { ready: true, missing: [], satisfiedBy: "sdk-delegated" };
|
|
167
|
+
},
|
|
146
168
|
};
|
|
147
169
|
|
|
148
170
|
/**
|
|
@@ -288,9 +310,10 @@ async function checkXaiApiKey(apiKey: string): Promise<LiveValidationResult> {
|
|
|
288
310
|
}
|
|
289
311
|
|
|
290
312
|
async function checkOpenRouter(apiKey: string): Promise<LiveValidationResult> {
|
|
291
|
-
const
|
|
313
|
+
const url = `${getOpenRouterBaseUrl()}/models`;
|
|
314
|
+
const r = await timedFetch(url, {
|
|
292
315
|
method: "GET",
|
|
293
|
-
headers: { Authorization: `Bearer ${apiKey}` },
|
|
316
|
+
headers: { ...getOpenRouterAttributionHeaders(url), Authorization: `Bearer ${apiKey}` },
|
|
294
317
|
});
|
|
295
318
|
if (r.ok) return { ok: true, latency_ms: r.latency_ms };
|
|
296
319
|
return {
|