@desplega.ai/agent-swarm 1.165.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-jna0b3wm.js → actions-fq2zrwtf.js} +30 -34
- package/dist/{amp-adapter-0eve81pz.js → amp-adapter-5gbk7501.js} +7 -7
- package/dist/{anthropic-messages-hst62ws9.js → anthropic-messages-13yn502s.js} +4 -4
- package/dist/{app-75hm5cfa.js → app-nctetn1e.js} +11 -11
- package/dist/{assistant-yzd51j33.js → assistant-0aq8gjvj.js} +31 -35
- package/dist/{azure-openai-responses-mh8tvf78.js → azure-openai-responses-9st34pfz.js} +5 -5
- package/dist/{boot-reembed-z158xq32.js → boot-reembed-1ze5853n.js} +14 -16
- package/dist/{boot-reembed-2ex2mcsh.js → boot-reembed-fmp5ww69.js} +15 -16
- package/dist/boot-scrub-sweep-cbp8xd4e.js +212 -0
- package/dist/{boot-seeds-2bmnh18p.js → boot-seeds-22tx8a53.js} +13 -12
- package/dist/{claude-adapter-jbj1mycz.js → claude-adapter-0jhgeh1d.js} +25 -25
- package/dist/{claude-managed-adapter-17ggz09t.js → claude-managed-adapter-tzwxy803.js} +5 -5
- package/dist/{claude-managed-setup-ptm1nzm2.js → claude-managed-setup-nrhfx5b0.js} +5 -5
- package/dist/{claude-sdk-session-9re1g7r2.js → claude-sdk-session-wh77rh83.js} +2632 -2614
- package/dist/{cli-zsh093hk.js → cli-014vns2y.js} +63 -1
- package/dist/{cli-qvfk83fy.js → cli-13xwcqvj.js} +2 -2
- package/dist/{cli-8gpbwy09.js → cli-1yrcfa5s.js} +5 -5
- package/dist/{cli-xtgtyafv.js → cli-577bxkf6.js} +212 -451
- package/dist/{cli-ma3zvh39.js → cli-5qkcdv8c.js} +6118 -5874
- package/dist/{cli-cwxhbf43.js → cli-5t5my0h8.js} +85 -2
- package/dist/{cli-zvckv750.js → cli-69egj654.js} +2 -2
- package/dist/{cli-9xb89xca.js → cli-6bpvv8h4.js} +9 -9
- package/dist/{cli-90v942q1.js → cli-6qxmjpem.js} +8 -8
- package/dist/{cli-9866bd07.js → cli-6vfz44sr.js} +1 -1
- package/dist/{cli-32bca7nr.js → cli-7avy4v8w.js} +1 -1
- package/dist/{cli-xb3c6aat.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-prt9emct.js → cli-c2tpw9ck.js} +3 -3
- package/dist/{cli-0n4fasz0.js → cli-c8r99akr.js} +16 -16
- package/dist/{cli-5anb0ev3.js → cli-cexctgn5.js} +89 -26
- package/dist/{cli-bns5c8k9.js → cli-cf2vgn9d.js} +105 -91
- package/dist/{cli-ng97fjq7.js → cli-cmxkbzzs.js} +33 -7
- package/dist/{cli-nexwh8zg.js → cli-g7k7zbcz.js} +12 -5
- package/dist/{cli-mmzwwptd.js → cli-hf5s9pgf.js} +1 -1
- package/dist/{cli-nvvfd8bq.js → cli-jbzbr36n.js} +4091 -3793
- package/dist/{cli-zn2v3t8v.js → cli-jvmtxqtc.js} +27 -15
- package/dist/{cli-pkke6geq.js → cli-km4x66j0.js} +83 -65
- package/dist/cli-kw0jcfje.js +516 -0
- package/dist/{cli-28smfvbn.js → cli-m7vmeepg.js} +32 -19
- package/dist/{cli-hpryr6em.js → cli-mb75wpxf.js} +1 -1
- package/dist/{cli-qdv8kgz7.js → cli-mkdsy1nq.js} +14018 -3333
- package/dist/{cli-b0f70z24.js → cli-mn8qkd8v.js} +1 -1
- package/dist/{cli-420bdgw0.js → cli-mv2520nm.js} +1 -1
- package/dist/{cli-n9ehc28t.js → cli-mxry91sa.js} +31 -10
- package/dist/{cli-wfajtmf7.js → cli-mxvnnv5q.js} +596 -13
- package/dist/cli-nkqjj42q.js +104 -0
- package/dist/{cli-e7t4snpa.js → cli-p8rt8spp.js} +5 -5
- package/dist/{cli-gh5yqzpe.js → cli-pkj1w46r.js} +12 -7
- package/dist/cli-q1vnz8wv.js +96 -0
- package/dist/{cli-fj86xr3c.js → cli-qd97v6z2.js} +2 -2
- package/dist/{cli-ba66wyhy.js → cli-qzmzwegq.js} +60 -20
- package/dist/{cli-5b2fjjzh.js → cli-r7eeddkq.js} +14 -9
- package/dist/{cli-8ssjez7e.js → cli-rhy7z1rp.js} +22 -11
- package/dist/{cli-4mevd1hf.js → cli-s9y81s7j.js} +5 -5
- package/dist/{cli-59jn5twa.js → cli-tc5zec7v.js} +7 -7
- package/dist/{cli-ttbsse3f.js → cli-tmhsxhb8.js} +1 -1
- package/dist/{cli-k6xx3pve.js → cli-tx2zvn23.js} +4 -4
- package/dist/{cli-pjxnr1jn.js → cli-ty4bzkqr.js} +5 -5
- package/dist/{cli-nfygw434.js → cli-v1pwxreq.js} +55 -52
- package/dist/{cli-ftry7975.js → cli-v1w7pbd8.js} +3 -2
- package/dist/{cli-10zmp1p7.js → cli-vr5avem2.js} +27 -32
- package/dist/{cli-bzr0ftht.js → cli-wnb9b2g3.js} +19 -0
- package/dist/cli-wt7ccy4r.js +2654 -0
- package/dist/{cli-50eg13rj.js → cli-wydz3feg.js} +549 -321
- package/dist/{cli-krqm5f11.js → cli-xezn9nkh.js} +16 -13
- package/dist/{cli-8kt0bmgx.js → cli-xf713zz0.js} +2 -2
- package/dist/{cli-x7afk5wm.js → cli-xvc3q9br.js} +1 -1
- package/dist/{cli-9s3h836g.js → cli-xvdgasgy.js} +1 -1
- package/dist/{cli-j0pdrmwg.js → cli-y0kjpfm9.js} +3 -3
- package/dist/{cli-6zcfw0x7.js → cli-y195hv1a.js} +1 -1
- package/dist/{cli-amwhs8h2.js → cli-ykt8f7va.js} +22 -9
- package/dist/{cli-1kzfvd1z.js → cli-ymmc1zxg.js} +15 -11
- package/dist/{cli-xnzrzets.js → cli-ypgba1a8.js} +2 -2
- package/dist/{cli-bdv39kgj.js → cli-z1dqhc9y.js} +31 -20
- package/dist/{cli-fw6vdcq5.js → cli-zp67qg5x.js} +34 -1
- package/dist/{cli-qbksc292.js → cli-zy39d433.js} +2 -0
- package/dist/cli.js +36 -32
- package/dist/{cloudflare-workers-ai-system-one-tt484t61.js → cloudflare-workers-ai-system-one-sta45jf9.js} +7 -5
- package/dist/{codex-adapter-3qnxshje.js → codex-adapter-cgesnjkr.js} +20 -20
- package/dist/{codex-login-brkxhhdg.js → codex-login-g1cyt5zm.js} +2 -2
- package/dist/{codex-session-runner-612wnapp.js → codex-session-runner-8kd7ddhr.js} +20 -20
- package/dist/{commands-2ybfcxkj.js → commands-h6zaaxym.js} +11 -10
- package/dist/{cursor-adapter-p3jgdehv.js → cursor-adapter-v8mm6bp5.js} +7 -7
- package/dist/{db-f4ans0jj.js → db-qg3myn53.js} +13 -10
- package/dist/{devin-adapter-dhzt01ff.js → devin-adapter-bffjj5n4.js} +2 -2
- package/dist/{dispatcher-pk182apd.js → dispatcher-7vnwj9qw.js} +28 -32
- package/dist/{dsh-adapter-7twaeps1.js → dsh-adapter-tz6hfp5r.js} +7 -7
- package/dist/{e2b-y8t3jzyz.js → e2b-nd50eccg.js} +1 -1
- package/dist/{easter-egg-3d-mtpnw06s.js → easter-egg-3d-66zxervv.js} +2 -2
- package/dist/{event-bus-w7ac4n3c.js → event-bus-vnfthafg.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-jdt2dz2s.js +39 -0
- package/dist/{handlers-g2wnr4t9.js → handlers-2qtkpncr.js} +31 -35
- package/dist/{hook-f7jt9vnm.js → hook-51yfcgsv.js} +48 -39
- package/dist/{hook-bbdpnkb4.js → hook-qnbdgwvd.js} +15 -17
- package/dist/{http-w40q4w94.js → http-jsmtag08.js} +536 -231
- package/dist/{index-056j5kzn.js → index-2t9kesn1.js} +13 -12
- package/dist/{index-cj1r9q83.js → index-bt8wkv1w.js} +29 -33
- package/dist/{index-7n70jwbb.js → index-cx1sb9bq.js} +42 -35
- package/dist/{index-9bfssf54.js → index-ekywyv2v.js} +28 -32
- package/dist/{index-fdk1t4d6.js → index-n0rxa4ca.js} +11962 -9900
- package/dist/{index-k8xc083e.js → index-t4g06w93.js} +28 -32
- package/dist/{keepalive-1tj10tf4.js → keepalive-4aezx4bj.js} +16 -12
- package/dist/{lead-st0bg7v4.js → lead-r44bkpm5.js} +52 -56
- package/dist/{llama-cpp-classify-tgj35k8d.js → llama-cpp-classify-6erb7wwv.js} +3 -1
- package/dist/{maintenance-nz71zats.js → maintenance-grz5jrzh.js} +12 -13
- package/dist/{mistral-conversations-8445ddjn.js → mistral-conversations-059y51zt.js} +4 -4
- package/dist/{node-f0ykebbv.js → node-qm9eb6z0.js} +25 -7
- package/dist/{oauth-refresh-sweep-aefzwvvq.js → oauth-refresh-sweep-wm4ctjfj.js} +15 -11
- package/dist/{onboard-kgpr9mbn.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-0c8e70dk.js → opencode-adapter-yjyqynzf.js} +8 -8
- package/dist/{openrouter-images-8yx3487g.js → openrouter-images-kr60n6b9.js} +1 -1
- package/dist/{otel-impl-x8zp4y5a.js → otel-impl-ghh4dyf8.js} +2 -2
- package/dist/{pi-messages-vxdt8v7j.js → pi-messages-xszk613n.js} +1 -1
- package/dist/{pi-mono-adapter-t280ah5c.js → pi-mono-adapter-0eg8kw2c.js} +69 -52
- package/dist/{pricing-refresh-9e0q7cwk.js → pricing-refresh-mjrqvnvw.js} +12 -11
- package/dist/{rbac-roles-790j3ga8.js → rbac-roles-axv4d74x.js} +11 -10
- package/dist/{rbac-roles-kcp6zge2.js → rbac-roles-fd5tskj9.js} +11 -10
- package/dist/{render-v2-tch4nefj.js → render-v2-k50j33qd.js} +11 -11
- package/dist/{runtime-v2t1r79e.js → runtime-h9ha1mq6.js} +4 -4
- package/dist/{setup-rcm303ns.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-ctg7t70w.js → work-objects-jcdbg8rr.js} +32 -36
- package/dist/{worker-5dp0xm55.js → worker-x8j8c9sx.js} +52 -56
- package/dist/{x-v3yw66zs.js → x-ma4gnfgy.js} +2 -2
- package/openapi.json +5 -2
- package/package.json +15 -11
- package/src/be/automation-preflight.ts +9 -4
- package/src/be/boot-scrub-sweep.ts +302 -0
- package/src/be/crypto/key-bootstrap.ts +1 -1
- package/src/be/db/approvals.ts +15 -1
- package/src/be/db/codex-oauth-device-flows.ts +40 -0
- package/src/be/db/config-secrets.ts +31 -0
- package/src/be/db/runtime.ts +4 -0
- package/src/be/db/script-runs.ts +15 -0
- package/src/be/db/tasks/write.ts +1 -1
- package/src/be/db-queries/mcp-oauth.ts +5 -0
- package/src/be/db-queries/oauth.ts +77 -0
- package/src/be/db.ts +162 -59
- package/src/be/events.ts +17 -1
- package/src/be/memory/index-content.ts +2 -2
- package/src/be/memory/providers/openai-embedding.ts +7 -2
- package/src/be/memory/providers/sqlite-store.ts +63 -11
- package/src/be/memory/raters/llm-summarizer.ts +7 -2
- package/src/be/memory/types.ts +14 -0
- package/src/be/migrations/201_workflow_replay_columns.sql +10 -0
- package/src/be/migrations/202_codex_oauth_device_flows.sql +24 -0
- package/src/be/modelsdev-cache.json +61 -0
- package/src/be/scripts/db.ts +28 -4
- package/src/be/scripts/source-secrets.ts +37 -0
- package/src/be/scrub-json.ts +32 -0
- package/src/be/sealed-json.ts +59 -0
- package/src/be/secret-registry.ts +131 -0
- package/src/be/seed-pricing.ts +84 -53
- package/src/be/swarm-config-guard.ts +13 -0
- package/src/be/workflow-replay.ts +77 -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/codex-oauth-device.ts +8 -10
- package/src/http/db-query-bounded.ts +3 -0
- package/src/http/db-query-shared.ts +107 -15
- package/src/http/db-query.ts +10 -2
- package/src/http/index.ts +23 -6
- package/src/http/mcp.ts +5 -0
- package/src/http/onboarding.ts +2 -0
- package/src/http/script-runs.ts +9 -1
- package/src/http/scripts.ts +15 -0
- package/src/http/workflows.ts +3 -2
- package/src/oauth/mcp-wrapper.ts +1 -1
- package/src/providers/acp-adapter.ts +25 -11
- package/src/providers/acp-target-catalog.ts +35 -1
- package/src/providers/acp-targets.ts +78 -7
- 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/cursor-adapter.ts +1 -1
- 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/script-workflows/supervisor.ts +11 -2
- package/src/scripts-runtime/eval-harness.ts +2 -12
- package/src/scripts-runtime/executors/quickjs-bundle.ts +152 -0
- package/src/scripts-runtime/executors/quickjs-prelude.ts +285 -0
- package/src/scripts-runtime/executors/quickjs-runner.ts +580 -0
- package/src/scripts-runtime/executors/quickjs-worker.ts +81 -0
- package/src/scripts-runtime/executors/quickjs.ts +196 -0
- package/src/scripts-runtime/executors/registry.ts +2 -0
- package/src/scripts-runtime/executors/sourcemap.ts +79 -0
- package/src/scripts-runtime/script-error-hints.ts +14 -0
- package/src/server.ts +66 -4
- package/src/tests/acp-adapter.test.ts +277 -12
- package/src/tests/boot-scrub-sweep.test.ts +390 -0
- package/src/tests/check-text-columns.test.ts +145 -0
- 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/claude-sdk-process.fixture.ts +13 -2
- 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-device.test.ts +23 -37
- 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/db-query-denylist.test.ts +202 -0
- package/src/tests/db-task-read-contract.test.ts +1 -0
- package/src/tests/db-task-write-contract.test.ts +1 -0
- package/src/tests/dsh-adapter.test.ts +23 -1
- package/src/tests/enabled-tools.test.ts +269 -0
- package/src/tests/entrypoint-acp-target-binary.test.ts +31 -1
- package/src/tests/entrypoint-codex-oauth-seed.test.ts +12 -0
- package/src/tests/events-scrub.test.ts +88 -0
- package/src/tests/fixtures/secret-corpus.ts +320 -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/script-connections.test.ts +5 -0
- package/src/tests/script-executor-conformance.test.ts +3 -0
- package/src/tests/script-executor-quickjs.test.ts +442 -0
- package/src/tests/script-executor-registry.test.ts +6 -1
- package/src/tests/script-runs-http.test.ts +88 -1
- package/src/tests/script-runs-scrub.test.ts +275 -0
- package/src/tests/scripts-http.test.ts +82 -1
- package/src/tests/scrubbed-text-12e.test.ts +289 -0
- package/src/tests/sealed-key-guard.test.ts +166 -0
- package/src/tests/secret-canary-sweep.test.ts +958 -0
- package/src/tests/secret-registry.test.ts +355 -0
- package/src/tests/secret-rules.test.ts +230 -0
- package/src/tests/secret-scrubber.test.ts +3 -2
- package/src/tests/telemetry-trigger.test.ts +12 -1
- package/src/tests/workflow-llm.test.ts +14 -0
- package/src/tests/workflow-replay.test.ts +518 -0
- package/src/tests/workflow-scrub.test.ts +242 -0
- package/src/tests/workflow-system-one-decision-providers.test.ts +33 -0
- package/src/tools/db-query.ts +1 -1
- package/src/tools/inject-learning.ts +1 -1
- package/src/tools/request-human-input.ts +7 -2
- package/src/tools/workflows/get-workflow-run.ts +3 -2
- package/src/types.ts +1 -1
- 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/utils/secret-rules.generated.ts +2055 -0
- package/src/utils/secret-scrubber.ts +363 -29
- package/src/workflows/engine.ts +39 -4
- 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/src/workflows/recovery.ts +10 -1
- package/src/workflows/resume.ts +62 -3
- package/src/workflows/retry-poller.ts +3 -0
- 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-w6zws6me.js +0 -23
- package/dist/boot-scrub-logs-246yn076.js +0 -99
- package/dist/cli-3a4m1aws.js +0 -572
- package/dist/cli-3dpj7atn.js +0 -11
- package/dist/cli-a87b04k8.js +0 -951
- package/dist/cli-cvk6yzw5.js +0 -40
- package/dist/cli-gvcgmx69.js +0 -183
- package/dist/cli-h1spv8v4.js +0 -427
- package/dist/cli-jqt9hrnz.js +0 -168
- package/dist/cli-yhmwmv0g.js +0 -9281
- package/dist/grok-adapter-yt9pab3k.js +0 -29
- package/src/be/boot-scrub-logs.ts +0 -132
- package/dist/{codex-hook-d2rkvf39.js → codex-hook-15dgc4cb.js} +1 -1
|
@@ -3,52 +3,56 @@ import {
|
|
|
3
3
|
} from "./cli-9q3wt23f.js";
|
|
4
4
|
import {
|
|
5
5
|
checkCursorCredentials
|
|
6
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-6bpvv8h4.js";
|
|
7
7
|
import {
|
|
8
8
|
checkGrokCredentials
|
|
9
|
-
} from "./cli-
|
|
9
|
+
} from "./cli-ykt8f7va.js";
|
|
10
|
+
import {
|
|
11
|
+
createSkillInvokeTracker,
|
|
12
|
+
isSkillLoaderCall,
|
|
13
|
+
skillFromToolArgs
|
|
14
|
+
} from "./cli-9k7mqz00.js";
|
|
10
15
|
import {
|
|
11
16
|
checkCodexCredentials,
|
|
12
17
|
codexUserHome
|
|
13
|
-
} from "./cli-
|
|
18
|
+
} from "./cli-m7vmeepg.js";
|
|
14
19
|
import {
|
|
15
20
|
checkClaudeManagedCredentials
|
|
16
|
-
} from "./cli-
|
|
21
|
+
} from "./cli-tc5zec7v.js";
|
|
17
22
|
import {
|
|
18
23
|
checkDevinCredentials
|
|
19
|
-
} from "./cli-
|
|
24
|
+
} from "./cli-hf5s9pgf.js";
|
|
20
25
|
import {
|
|
21
26
|
checkOpencodeCredentials
|
|
22
|
-
} from "./cli-
|
|
27
|
+
} from "./cli-jvmtxqtc.js";
|
|
23
28
|
import {
|
|
24
29
|
checkDshCredentials
|
|
25
|
-
} from "./cli-
|
|
30
|
+
} from "./cli-pkj1w46r.js";
|
|
26
31
|
import {
|
|
27
32
|
checkAmpCredentials,
|
|
28
33
|
liveTestAmpCredentials
|
|
29
|
-
} from "./cli-
|
|
30
|
-
import {
|
|
31
|
-
createSkillInvokeTracker,
|
|
32
|
-
isSkillLoaderCall,
|
|
33
|
-
skillFromToolArgs
|
|
34
|
-
} from "./cli-9k7mqz00.js";
|
|
35
|
-
import {
|
|
36
|
-
checkClaudeCredentials
|
|
37
|
-
} from "./cli-n9ehc28t.js";
|
|
38
|
-
import {
|
|
39
|
-
getContextWindowSize
|
|
40
|
-
} from "./cli-32bca7nr.js";
|
|
34
|
+
} from "./cli-ty4bzkqr.js";
|
|
41
35
|
import {
|
|
42
36
|
isUnknownModelError,
|
|
43
37
|
renderMemoriesPrompt,
|
|
44
38
|
writeSkillsToFilesystem
|
|
45
39
|
} from "./cli-efnd2kce.js";
|
|
40
|
+
import {
|
|
41
|
+
ACP_TARGET_IDS,
|
|
42
|
+
isAcpTarget
|
|
43
|
+
} from "./cli-zp67qg5x.js";
|
|
46
44
|
import {
|
|
47
45
|
CODEX_OAUTH_POOL_SLOTS_ENV,
|
|
48
46
|
countCodexOAuthPoolSlots,
|
|
49
47
|
hasCodexOAuthPoolSlots,
|
|
50
48
|
isCodexOAuthConfigKey
|
|
51
49
|
} from "./cli-bqjfjex4.js";
|
|
50
|
+
import {
|
|
51
|
+
checkClaudeCredentials
|
|
52
|
+
} from "./cli-mxry91sa.js";
|
|
53
|
+
import {
|
|
54
|
+
getContextWindowSize
|
|
55
|
+
} from "./cli-7avy4v8w.js";
|
|
52
56
|
import {
|
|
53
57
|
CODEX_CREDITS_EXHAUSTED_COOLDOWN_MS,
|
|
54
58
|
MAX_RATE_LIMIT_RESET_MS,
|
|
@@ -63,34 +67,18 @@ import {
|
|
|
63
67
|
parseAzureDevOpsRepoUrl,
|
|
64
68
|
resolveScriptsOnlyMode,
|
|
65
69
|
validateJsonSchema
|
|
66
|
-
} from "./cli-
|
|
70
|
+
} from "./cli-wydz3feg.js";
|
|
67
71
|
import {
|
|
68
72
|
getApiKey
|
|
69
73
|
} from "./cli-f14fvzag.js";
|
|
70
|
-
import {
|
|
71
|
-
terminateRegisteredProcessGroups
|
|
72
|
-
} from "./cli-zt3w1cn1.js";
|
|
73
74
|
import {
|
|
74
75
|
authJsonToCredentialSelection,
|
|
75
76
|
credentialsToAuthJson,
|
|
76
77
|
loadAllCodexOAuthSlots
|
|
77
|
-
} from "./cli-
|
|
78
|
-
import {
|
|
79
|
-
getOpenRouterBaseUrl
|
|
80
|
-
} from "./cli-3dpj7atn.js";
|
|
78
|
+
} from "./cli-v1w7pbd8.js";
|
|
81
79
|
import {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
contentSha256,
|
|
85
|
-
init_context_preamble,
|
|
86
|
-
init_profile_sync,
|
|
87
|
-
prependContextPreamble,
|
|
88
|
-
prependProfileSyncRejectionBanner,
|
|
89
|
-
resolveClaudeMdPath,
|
|
90
|
-
syncProfileFilesToServer,
|
|
91
|
-
writeIdentityBaselines,
|
|
92
|
-
writeProfileFileFromDb
|
|
93
|
-
} from "./cli-wfajtmf7.js";
|
|
80
|
+
terminateRegisteredProcessGroups
|
|
81
|
+
} from "./cli-zt3w1cn1.js";
|
|
94
82
|
import {
|
|
95
83
|
ensure,
|
|
96
84
|
initOtel,
|
|
@@ -100,11 +88,7 @@ import {
|
|
|
100
88
|
startSpan,
|
|
101
89
|
withSpan,
|
|
102
90
|
withSpanContext
|
|
103
|
-
} from "./cli-
|
|
104
|
-
import {
|
|
105
|
-
init_task_attachment_links,
|
|
106
|
-
taskAttachmentFetchCommand
|
|
107
|
-
} from "./cli-cvk6yzw5.js";
|
|
91
|
+
} from "./cli-c8r99akr.js";
|
|
108
92
|
import {
|
|
109
93
|
initTelemetry,
|
|
110
94
|
init_api_drain,
|
|
@@ -115,27 +99,50 @@ import {
|
|
|
115
99
|
isCodexAuthFailureReason,
|
|
116
100
|
mapTriggerSurface,
|
|
117
101
|
telemetry
|
|
118
|
-
} from "./cli-
|
|
102
|
+
} from "./cli-mkdsy1nq.js";
|
|
119
103
|
import {
|
|
120
104
|
ProviderNameSchema,
|
|
121
105
|
init_types,
|
|
122
106
|
isTerminalTaskStatus,
|
|
123
107
|
parseWorkerModelTierOverrides,
|
|
124
108
|
resolveTaskModelSelection
|
|
125
|
-
} from "./cli-
|
|
109
|
+
} from "./cli-xvdgasgy.js";
|
|
126
110
|
import {
|
|
111
|
+
buildContextPreamble,
|
|
112
|
+
buildResumeContextPreamble,
|
|
113
|
+
contentSha256,
|
|
127
114
|
generateDefaultClaudeMd,
|
|
128
115
|
generateDefaultIdentityMd,
|
|
129
116
|
generateDefaultSoulMd,
|
|
130
117
|
generateDefaultToolsMd,
|
|
131
118
|
getBasePrompt,
|
|
132
119
|
init_base_prompt,
|
|
133
|
-
|
|
134
|
-
|
|
120
|
+
init_context_preamble,
|
|
121
|
+
init_defaults,
|
|
122
|
+
init_profile_sync,
|
|
123
|
+
init_task_attachment_links,
|
|
124
|
+
prependContextPreamble,
|
|
125
|
+
prependProfileSyncRejectionBanner,
|
|
126
|
+
resolveClaudeMdPath,
|
|
127
|
+
syncProfileFilesToServer,
|
|
128
|
+
taskAttachmentFetchCommand,
|
|
129
|
+
writeIdentityBaselines,
|
|
130
|
+
writeProfileFileFromDb
|
|
131
|
+
} from "./cli-mxvnnv5q.js";
|
|
135
132
|
import {
|
|
136
133
|
init_steering_enabled,
|
|
137
134
|
isSteeringEnabled
|
|
138
135
|
} from "./cli-7mm2r1kp.js";
|
|
136
|
+
import {
|
|
137
|
+
init_templates
|
|
138
|
+
} from "./cli-agamgm0p.js";
|
|
139
|
+
import {
|
|
140
|
+
configureHttpResolver,
|
|
141
|
+
init_resolver,
|
|
142
|
+
init_template,
|
|
143
|
+
interpolate,
|
|
144
|
+
resolveTemplateAsync
|
|
145
|
+
} from "./cli-5c2j5yvx.js";
|
|
139
146
|
import {
|
|
140
147
|
CLAUDE_CREDENTIALS_HINT,
|
|
141
148
|
ModelWindowExhaustedError,
|
|
@@ -149,37 +156,32 @@ import {
|
|
|
149
156
|
parseModelLimitMessage,
|
|
150
157
|
windowForModelFamily
|
|
151
158
|
} from "./cli-ywybs5as.js";
|
|
152
|
-
import {
|
|
153
|
-
getMcpBaseUrl,
|
|
154
|
-
init_constants
|
|
155
|
-
} from "./cli-gd4favx9.js";
|
|
156
|
-
import {
|
|
157
|
-
init_templates
|
|
158
|
-
} from "./cli-agamgm0p.js";
|
|
159
|
-
import {
|
|
160
|
-
configureHttpResolver,
|
|
161
|
-
init_resolver,
|
|
162
|
-
init_template,
|
|
163
|
-
interpolate,
|
|
164
|
-
resolveTemplateAsync
|
|
165
|
-
} from "./cli-5c2j5yvx.js";
|
|
166
159
|
import {
|
|
167
160
|
deriveDefaultRoute,
|
|
168
161
|
init_src,
|
|
169
162
|
validateRoute
|
|
170
163
|
} from "./cli-f9w1semm.js";
|
|
164
|
+
import {
|
|
165
|
+
getOpenRouterAttributionHeaders,
|
|
166
|
+
getOpenRouterBaseUrl,
|
|
167
|
+
init_openrouter_base_url
|
|
168
|
+
} from "./cli-a35hzdve.js";
|
|
169
|
+
import {
|
|
170
|
+
getMcpBaseUrl,
|
|
171
|
+
init_constants
|
|
172
|
+
} from "./cli-gd4favx9.js";
|
|
171
173
|
import {
|
|
172
174
|
harnessModelMismatch,
|
|
173
175
|
init_runtime_model_catalog,
|
|
174
176
|
init_src as init_src2,
|
|
175
177
|
refreshRuntimeModelCatalog,
|
|
176
178
|
runtimeHarnessSections
|
|
177
|
-
} from "./cli-
|
|
179
|
+
} from "./cli-014vns2y.js";
|
|
178
180
|
import {
|
|
179
181
|
init_secret_scrubber,
|
|
180
182
|
registerSensitiveKeyName,
|
|
181
183
|
scrubSecrets
|
|
182
|
-
} from "./cli-
|
|
184
|
+
} from "./cli-wt7ccy4r.js";
|
|
183
185
|
import {
|
|
184
186
|
__require
|
|
185
187
|
} from "./cli-bc05qbss.js";
|
|
@@ -216,47 +218,47 @@ async function materializeCodexAuthJson(_slot, creds, deps = {}) {
|
|
|
216
218
|
async function createProviderAdapter(provider) {
|
|
217
219
|
switch (provider) {
|
|
218
220
|
case "claude": {
|
|
219
|
-
const { ClaudeAdapter } = await import("./claude-adapter-
|
|
221
|
+
const { ClaudeAdapter } = await import("./claude-adapter-0jhgeh1d.js");
|
|
220
222
|
return new ClaudeAdapter;
|
|
221
223
|
}
|
|
222
224
|
case "pi": {
|
|
223
|
-
const { PiMonoAdapter } = await import("./pi-mono-adapter-
|
|
225
|
+
const { PiMonoAdapter } = await import("./pi-mono-adapter-0eg8kw2c.js");
|
|
224
226
|
return new PiMonoAdapter;
|
|
225
227
|
}
|
|
226
228
|
case "codex": {
|
|
227
|
-
const { CodexAdapter } = await import("./codex-adapter-
|
|
229
|
+
const { CodexAdapter } = await import("./codex-adapter-cgesnjkr.js");
|
|
228
230
|
return new CodexAdapter;
|
|
229
231
|
}
|
|
230
232
|
case "claude-managed": {
|
|
231
|
-
const { ClaudeManagedAdapter } = await import("./claude-managed-adapter-
|
|
233
|
+
const { ClaudeManagedAdapter } = await import("./claude-managed-adapter-tzwxy803.js");
|
|
232
234
|
return new ClaudeManagedAdapter;
|
|
233
235
|
}
|
|
234
236
|
case "devin": {
|
|
235
|
-
const { DevinAdapter } = await import("./devin-adapter-
|
|
237
|
+
const { DevinAdapter } = await import("./devin-adapter-bffjj5n4.js");
|
|
236
238
|
return new DevinAdapter;
|
|
237
239
|
}
|
|
238
240
|
case "opencode": {
|
|
239
|
-
const { OpencodeAdapter } = await import("./opencode-adapter-
|
|
241
|
+
const { OpencodeAdapter } = await import("./opencode-adapter-yjyqynzf.js");
|
|
240
242
|
return new OpencodeAdapter;
|
|
241
243
|
}
|
|
242
244
|
case "dsh": {
|
|
243
|
-
const { DshAdapter } = await import("./dsh-adapter-
|
|
245
|
+
const { DshAdapter } = await import("./dsh-adapter-tz6hfp5r.js");
|
|
244
246
|
return new DshAdapter;
|
|
245
247
|
}
|
|
246
248
|
case "amp": {
|
|
247
|
-
const { AmpAdapter } = await import("./amp-adapter-
|
|
249
|
+
const { AmpAdapter } = await import("./amp-adapter-5gbk7501.js");
|
|
248
250
|
return new AmpAdapter;
|
|
249
251
|
}
|
|
250
252
|
case "cursor": {
|
|
251
|
-
const { CursorAdapter } = await import("./cursor-adapter-
|
|
253
|
+
const { CursorAdapter } = await import("./cursor-adapter-v8mm6bp5.js");
|
|
252
254
|
return new CursorAdapter;
|
|
253
255
|
}
|
|
254
256
|
case "grok": {
|
|
255
|
-
const { GrokAdapter } = await import("./grok-adapter-
|
|
257
|
+
const { GrokAdapter } = await import("./grok-adapter-jdt2dz2s.js");
|
|
256
258
|
return new GrokAdapter;
|
|
257
259
|
}
|
|
258
260
|
case "acp": {
|
|
259
|
-
const { ACPAdapter } = await import("./acp-adapter-
|
|
261
|
+
const { ACPAdapter } = await import("./acp-adapter-zpvy6321.js");
|
|
260
262
|
return new ACPAdapter;
|
|
261
263
|
}
|
|
262
264
|
default:
|
|
@@ -937,6 +939,7 @@ async function reportCredentialOutcomeThenFinish(input, finish) {
|
|
|
937
939
|
// src/commands/provider-credentials.ts
|
|
938
940
|
init_src();
|
|
939
941
|
init_credentials();
|
|
942
|
+
init_openrouter_base_url();
|
|
940
943
|
init_secret_scrubber();
|
|
941
944
|
function isBedrockMode(env) {
|
|
942
945
|
const mode = env.BEDROCK_AUTH_MODE?.toLowerCase();
|
|
@@ -956,10 +959,28 @@ var CREDENTIAL_PROVIDER_CHECKERS = {
|
|
|
956
959
|
devin: (env) => checkDevinCredentials(env),
|
|
957
960
|
opencode: (env, opts) => checkOpencodeCredentials(env, opts),
|
|
958
961
|
pi: async (env, opts) => {
|
|
959
|
-
const { checkPiMonoCredentials } = await import("./pi-mono-adapter-
|
|
962
|
+
const { checkPiMonoCredentials } = await import("./pi-mono-adapter-0eg8kw2c.js");
|
|
960
963
|
return checkPiMonoCredentials(env, opts);
|
|
961
964
|
},
|
|
962
|
-
acp: () =>
|
|
965
|
+
acp: (env) => {
|
|
966
|
+
const target = env.ACP_TARGET ?? "custom";
|
|
967
|
+
if (!isAcpTarget(target)) {
|
|
968
|
+
return {
|
|
969
|
+
ready: false,
|
|
970
|
+
missing: ["ACP_TARGET"],
|
|
971
|
+
hint: `Set ACP_TARGET to one of: ${ACP_TARGET_IDS.join(", ")}.`
|
|
972
|
+
};
|
|
973
|
+
}
|
|
974
|
+
const command = env.ACP_TARGET_COMMAND ?? env.ACP_COMMAND;
|
|
975
|
+
if (target === "custom" && !command?.trim()) {
|
|
976
|
+
return {
|
|
977
|
+
ready: false,
|
|
978
|
+
missing: ["ACP_TARGET_COMMAND"],
|
|
979
|
+
hint: "Set ACP_TARGET_COMMAND (or ACP_COMMAND) to an ACP-compatible executable, or select a preset with ACP_TARGET."
|
|
980
|
+
};
|
|
981
|
+
}
|
|
982
|
+
return { ready: true, missing: [], satisfiedBy: "sdk-delegated" };
|
|
983
|
+
}
|
|
963
984
|
};
|
|
964
985
|
async function checkProviderCredentials(provider, env, opts) {
|
|
965
986
|
const checker = CREDENTIAL_PROVIDER_CHECKERS[provider];
|
|
@@ -1040,9 +1061,10 @@ async function checkXaiApiKey(apiKey) {
|
|
|
1040
1061
|
};
|
|
1041
1062
|
}
|
|
1042
1063
|
async function checkOpenRouter(apiKey) {
|
|
1043
|
-
const
|
|
1064
|
+
const url = `${getOpenRouterBaseUrl()}/models`;
|
|
1065
|
+
const r = await timedFetch(url, {
|
|
1044
1066
|
method: "GET",
|
|
1045
|
-
headers: { Authorization: `Bearer ${apiKey}` }
|
|
1067
|
+
headers: { ...getOpenRouterAttributionHeaders(url), Authorization: `Bearer ${apiKey}` }
|
|
1046
1068
|
});
|
|
1047
1069
|
if (r.ok)
|
|
1048
1070
|
return { ok: true, latency_ms: r.latency_ms };
|
|
@@ -1187,7 +1209,7 @@ async function validateProviderCredentials(provider, env = process.env, presence
|
|
|
1187
1209
|
latency_ms: Date.now() - startedAt
|
|
1188
1210
|
};
|
|
1189
1211
|
}
|
|
1190
|
-
const { liveTestCursorKey } = await import("./cursor-adapter-
|
|
1212
|
+
const { liveTestCursorKey } = await import("./cursor-adapter-v8mm6bp5.js");
|
|
1191
1213
|
const result = await liveTestCursorKey(apiKey);
|
|
1192
1214
|
return result.ok ? { ok: true, latency_ms: Date.now() - startedAt } : { ok: false, error: result.error, latency_ms: Date.now() - startedAt };
|
|
1193
1215
|
}
|
|
@@ -2514,17 +2536,9 @@ async function resolveCodexOAuthCredentialInfo(apiUrl, apiKey) {
|
|
|
2514
2536
|
await materializeCodexAuthJson(selectedSlot, slotEntry.creds, {
|
|
2515
2537
|
includeRefreshToken: false
|
|
2516
2538
|
});
|
|
2517
|
-
const authJson = {
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
tokens: {
|
|
2521
|
-
id_token: slotEntry.creds.access,
|
|
2522
|
-
access_token: slotEntry.creds.access,
|
|
2523
|
-
refresh_token: slotEntry.creds.refresh,
|
|
2524
|
-
account_id: slotEntry.creds.accountId
|
|
2525
|
-
},
|
|
2526
|
-
last_refresh: new Date(slotEntry.creds.expires).toISOString()
|
|
2527
|
-
};
|
|
2539
|
+
const authJson = credentialsToAuthJson(slotEntry.creds, {
|
|
2540
|
+
includeRefreshToken: false
|
|
2541
|
+
});
|
|
2528
2542
|
const sel = {
|
|
2529
2543
|
...authJsonToCredentialSelection(authJson, selectedSlot, slots.length),
|
|
2530
2544
|
authFailureFence
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
getJsonSchemaToolParameters,
|
|
33
33
|
resolveJsonSchemaStrictSampling,
|
|
34
34
|
transformMessages
|
|
35
|
-
} from "./cli-
|
|
35
|
+
} from "./cli-xf713zz0.js";
|
|
36
36
|
import {
|
|
37
37
|
sanitizeSurrogates
|
|
38
38
|
} from "./cli-y2apkfe2.js";
|
|
@@ -46,7 +46,7 @@ import {
|
|
|
46
46
|
getInitialSystemMessage,
|
|
47
47
|
getSystemMessageText,
|
|
48
48
|
withoutInitialSystemMessage
|
|
49
|
-
} from "./cli-
|
|
49
|
+
} from "./cli-g7k7zbcz.js";
|
|
50
50
|
import {
|
|
51
51
|
getProviderEnvValue
|
|
52
52
|
} from "./cli-btbzvq95.js";
|
|
@@ -56,7 +56,7 @@ import {
|
|
|
56
56
|
import {
|
|
57
57
|
AssistantMessageEventStream,
|
|
58
58
|
appendAssistantMessageDiagnostic
|
|
59
|
-
} from "./cli-
|
|
59
|
+
} from "./cli-wnb9b2g3.js";
|
|
60
60
|
import {
|
|
61
61
|
exports_supports_color,
|
|
62
62
|
init_supports_color
|
|
@@ -6489,15 +6489,15 @@ function getModelMatchCandidates(modelId, modelName) {
|
|
|
6489
6489
|
}
|
|
6490
6490
|
function supportsAdaptiveThinking(modelId, modelName) {
|
|
6491
6491
|
const candidates = getModelMatchCandidates(modelId, modelName);
|
|
6492
|
-
return candidates.some((s) => s.includes("opus-4-6") || s.includes("opus-4-7") || s.includes("opus-4-8") || s.includes("opus-5") || s.includes("sonnet-4-6") || s.includes("sonnet-5") || s.includes("fable-5"));
|
|
6492
|
+
return candidates.some((s) => s.includes("opus-4-6") || s.includes("opus-4-7") || s.includes("opus-4-8") || s.includes("opus-5") || s.includes("sonnet-4-6") || s.includes("sonnet-5") || s.includes("haiku-5") || s.includes("fable-5"));
|
|
6493
6493
|
}
|
|
6494
6494
|
function supportsNativeXhighEffort(model) {
|
|
6495
6495
|
const candidates = getModelMatchCandidates(model.id, model.name);
|
|
6496
|
-
return candidates.some((s) => s.includes("opus-4-7") || s.includes("opus-4-8") || s.includes("opus-5") || s.includes("sonnet-5") || s.includes("fable-5"));
|
|
6496
|
+
return candidates.some((s) => s.includes("opus-4-7") || s.includes("opus-4-8") || s.includes("opus-5") || s.includes("sonnet-5") || s.includes("haiku-5") || s.includes("fable-5"));
|
|
6497
6497
|
}
|
|
6498
6498
|
function supportsThinkingBlockBinding(model) {
|
|
6499
6499
|
const candidates = getModelMatchCandidates(model.id, model.name);
|
|
6500
|
-
return candidates.some((s) => s.includes("opus-4-7") || s.includes("opus-4-8") || s.includes("opus-5") || s.includes("sonnet-5") || s.includes("fable-5"));
|
|
6500
|
+
return candidates.some((s) => s.includes("opus-4-7") || s.includes("opus-4-8") || s.includes("opus-5") || s.includes("sonnet-5") || s.includes("haiku-5") || s.includes("fable-5"));
|
|
6501
6501
|
}
|
|
6502
6502
|
function mapThinkingLevelToEffort(model, level) {
|
|
6503
6503
|
if (level === "xhigh" && supportsNativeXhighEffort(model))
|
|
@@ -6539,7 +6539,7 @@ function supportsPromptCaching(model, env) {
|
|
|
6539
6539
|
return true;
|
|
6540
6540
|
return false;
|
|
6541
6541
|
}
|
|
6542
|
-
if (candidates.some((s) => s.includes("fable-5") || s.includes("opus-5") || s.includes("sonnet-5")))
|
|
6542
|
+
if (candidates.some((s) => s.includes("fable-5") || s.includes("opus-5") || s.includes("sonnet-5") || s.includes("haiku-5")))
|
|
6543
6543
|
return true;
|
|
6544
6544
|
if (candidates.some((s) => s.includes("-4-")))
|
|
6545
6545
|
return true;
|
|
@@ -6865,8 +6865,34 @@ function buildAdditionalModelRequestFields(model, options) {
|
|
|
6865
6865
|
}
|
|
6866
6866
|
return result;
|
|
6867
6867
|
}
|
|
6868
|
+
const candidates = getModelMatchCandidates(model.id, model.name);
|
|
6869
|
+
if (candidates.some((s) => s.includes("gpt-oss"))) {
|
|
6870
|
+
return { reasoning_effort: OPENAI_GPT_OSS_EFFORT[options.reasoning] };
|
|
6871
|
+
}
|
|
6872
|
+
if (candidates.some((s) => s.includes("gpt-"))) {
|
|
6873
|
+
const mapped = model.thinkingLevelMap?.[options.reasoning];
|
|
6874
|
+
return {
|
|
6875
|
+
reasoning: { effort: typeof mapped === "string" ? mapped : OPENAI_GPT_EFFORT[options.reasoning] }
|
|
6876
|
+
};
|
|
6877
|
+
}
|
|
6868
6878
|
return;
|
|
6869
6879
|
}
|
|
6880
|
+
var OPENAI_GPT_EFFORT = {
|
|
6881
|
+
minimal: "low",
|
|
6882
|
+
low: "low",
|
|
6883
|
+
medium: "medium",
|
|
6884
|
+
high: "high",
|
|
6885
|
+
xhigh: "xhigh",
|
|
6886
|
+
max: "max"
|
|
6887
|
+
};
|
|
6888
|
+
var OPENAI_GPT_OSS_EFFORT = {
|
|
6889
|
+
minimal: "low",
|
|
6890
|
+
low: "low",
|
|
6891
|
+
medium: "medium",
|
|
6892
|
+
high: "high",
|
|
6893
|
+
xhigh: "high",
|
|
6894
|
+
max: "high"
|
|
6895
|
+
};
|
|
6870
6896
|
function createImageBlock(mimeType, data) {
|
|
6871
6897
|
let format;
|
|
6872
6898
|
switch (mimeType) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AssistantMessageEventStream,
|
|
3
3
|
formatThrownValue
|
|
4
|
-
} from "./cli-
|
|
4
|
+
} from "./cli-wnb9b2g3.js";
|
|
5
5
|
|
|
6
6
|
// node_modules/@earendil-works/pi-ai/dist/utils/text.js
|
|
7
7
|
function contentText(content, separator = `
|
|
@@ -191,7 +191,7 @@ function resolveTranscriptTools(messages, supportsToolAdditions) {
|
|
|
191
191
|
}
|
|
192
192
|
|
|
193
193
|
// node_modules/@earendil-works/pi-ai/dist/api/lazy.js
|
|
194
|
-
function createSetupErrorMessage(model, error) {
|
|
194
|
+
function createSetupErrorMessage(model, error, timestamp) {
|
|
195
195
|
return {
|
|
196
196
|
role: "assistant",
|
|
197
197
|
content: [],
|
|
@@ -208,7 +208,7 @@ function createSetupErrorMessage(model, error) {
|
|
|
208
208
|
},
|
|
209
209
|
stopReason: "error",
|
|
210
210
|
errorMessage: error instanceof Error ? error.message : String(error),
|
|
211
|
-
timestamp
|
|
211
|
+
timestamp
|
|
212
212
|
};
|
|
213
213
|
}
|
|
214
214
|
function hasResult(source) {
|
|
@@ -221,9 +221,10 @@ async function forwardStream(target, source) {
|
|
|
221
221
|
target.end(hasResult(source) ? await source.result() : undefined);
|
|
222
222
|
}
|
|
223
223
|
function lazyStream(model, setup) {
|
|
224
|
+
const startedAt = Date.now();
|
|
224
225
|
const outer = new AssistantMessageEventStream;
|
|
225
226
|
setup().then((inner) => forwardStream(outer, inner)).catch((error) => {
|
|
226
|
-
const message = createSetupErrorMessage(model, error);
|
|
227
|
+
const message = createSetupErrorMessage(model, error, startedAt);
|
|
227
228
|
outer.push({ type: "error", reason: "error", error: message });
|
|
228
229
|
outer.end(message);
|
|
229
230
|
});
|
|
@@ -539,6 +540,11 @@ function assertClassifierModel(model) {
|
|
|
539
540
|
throw new ModelsError("provider", `Model ${model.provider}/${model.id} is not a classifier model`);
|
|
540
541
|
}
|
|
541
542
|
}
|
|
543
|
+
function assertClassifierInputSupported(model, context) {
|
|
544
|
+
if (context.images?.length && !model.input.includes("image")) {
|
|
545
|
+
throw new ModelsError("provider", `Model ${model.provider}/${model.id} does not accept image input`);
|
|
546
|
+
}
|
|
547
|
+
}
|
|
542
548
|
function imageErrorResult(model, error, aborted = false) {
|
|
543
549
|
return {
|
|
544
550
|
api: model.api,
|
|
@@ -1028,6 +1034,7 @@ class ModelsImpl {
|
|
|
1028
1034
|
async classify(model, context, options) {
|
|
1029
1035
|
try {
|
|
1030
1036
|
assertClassifierModel(model);
|
|
1037
|
+
assertClassifierInputSupported(model, context);
|
|
1031
1038
|
const provider = this.requireProvider(model);
|
|
1032
1039
|
if (!provider.classify) {
|
|
1033
1040
|
throw new ModelsError("provider", `Provider ${model.provider} does not support classification`);
|
|
@@ -1212,4 +1219,4 @@ function modelsAreEqual(a, b) {
|
|
|
1212
1219
|
return getModelType(a) === getModelType(b) && a.id === b.id && a.provider === b.provider;
|
|
1213
1220
|
}
|
|
1214
1221
|
|
|
1215
|
-
export { lazyStream, lazyApi, defaultProviderAuthContext, InMemoryCredentialStore, ModelsError, InMemoryModelsStore, getModelType, isModelType, assertChatModel, assertImageModel, assertClassifierModel, imageErrorResult, classifierErrorResult, contentText, getSystemMessageText, renderSystemMessageUpdate, createInitialSystemMessage, normalizeContext, getInitialSystemMessage, withoutInitialSystemMessage, getCurrentTools, getCurrentSystemMessage, getCurrentSystemPrompt, collapseSystemMessages, resolveTranscript, toToolDeclaration, declarationsEqual, getToolStateChanges, getDeclaredTools, hasToolRedefinitions, hasNonAdditiveToolChanges, resolveTranscriptTools, createModels, createProvider, hasApi, calculateCost, getSupportedThinkingLevels, clampThinkingLevel, modelsAreEqual };
|
|
1222
|
+
export { lazyStream, lazyApi, defaultProviderAuthContext, InMemoryCredentialStore, ModelsError, InMemoryModelsStore, getModelType, isModelType, assertChatModel, assertImageModel, assertClassifierModel, assertClassifierInputSupported, imageErrorResult, classifierErrorResult, contentText, getSystemMessageText, renderSystemMessageUpdate, createInitialSystemMessage, normalizeContext, getInitialSystemMessage, withoutInitialSystemMessage, getCurrentTools, getCurrentSystemMessage, getCurrentSystemPrompt, collapseSystemMessages, resolveTranscript, toToolDeclaration, declarationsEqual, getToolStateChanges, getDeclaredTools, hasToolRedefinitions, hasNonAdditiveToolChanges, resolveTranscriptTools, createModels, createProvider, hasApi, calculateCost, getSupportedThinkingLevels, clampThinkingLevel, modelsAreEqual };
|