@bitkyc08/opencodex 2.96.0 → 2.98.0-preview.20261107
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/bin/ocx.mjs +215 -20
- package/gui/dist/assets/App-6TFtZsUF.css +1 -0
- package/gui/dist/assets/App-B8_sOxoz.js +59 -0
- package/gui/dist/assets/Tray-DpWEp6ee.js +1 -0
- package/gui/dist/assets/WantedSansVariable.split.0-Dwvb1WRx.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.1-1wKD2RxI.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.10-CAKA6LIP.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.11-k5H85R4b.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.12-BHboLsUv.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.13-9GV377ix.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.14-DovDXnrj.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.15-DTdykCig.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.16-CKz2ccgK.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.17-Z2RD_KRZ.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.18-BcKtfonJ.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.19-DEQPOSZn.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.2-DryboyuA.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.20-Bia5JMls.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.21-Cr4jFw-E.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.22-DjjB69TZ.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.23-CvUzJskt.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.24-i_eMg5ox.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.25-2aKHwPX-.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.26-B6wXoCEL.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.27-D4h1WfGM.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.28-kvRPCStd.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.29-DHAiwleD.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.3-7H--eyZi.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.30-C66cfAY2.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.31-FDmtiNim.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.32-DouHt2Dd.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.33-B8HVvkJX.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.34-BtkRu1FN.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.35-DBylQbtk.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.36-Sg089Kgh.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.37-CYtvbriS.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.38-DKkSLf8Z.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.39-CecotKZD.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.4-Bv8O3ZMb.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.40-DdCvkmOU.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.41-ESn674Hc.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.42-DL9V7NNV.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.43-yipO0cyk.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.44-6rTmLZhm.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.45-BJAj8lrm.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.46-BDTzMn2c.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.47-Bxd4wGgi.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.48-DxnFBLnH.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.49-DnVD0aOD.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.5-B1wI2pp5.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.50-D9JlkZd6.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.51-D9Vw6Bu3.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.52-ClEJk4kn.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.53-BSXU0vh-.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.54-EcuxkR9v.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.55-CYiFhQX8.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.56--Gk9g8BK.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.57-DnkOPZcy.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.58-9MB8504z.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.59-ByxIsN72.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.6-Bmk0dRVw.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.60-Bxwx_aWQ.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.61-DA2z5sm7.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.62-C5iJPJZn.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.63-DAqrmaEc.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.64-BgXFsljb.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.65-DKiWujvu.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.66-8po4vUZ4.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.67-Cy5qyI9O.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.68-BKny7Fy3.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.69-B4VU4u_b.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.7-BuqwNpgA.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.70-BCd4n346.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.71-CkQppaWn.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.72-Db7vaoFs.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.73-DI80TYWl.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.74-tMCtDAHB.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.75-Ciw0D5WG.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.76-DoLjFgp-.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.77-CpT2uvMy.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.78-CkcJ4iZ1.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.79-DsOUJjEM.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.8-DsjypPd6.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.80-C0VwHTte.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.81-DTelu57i.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.82-BiMndGN1.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.83-CVcC6eDG.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.84-DlhZVt_O.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.85-S8I2D3pA.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.86-DozXXpH5.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.87-Dsn0Vuuo.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.88-iNwxxDCr.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.89-B63u_9CZ.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.9-Bi3IzpMI.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.90-ByeH1Pqf.woff2 +0 -0
- package/gui/dist/assets/WantedSansVariable.split.91-UQLlagpm.woff2 +0 -0
- package/gui/dist/assets/brand-mark-VPhzz-WE.js +1 -0
- package/gui/dist/assets/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2 +0 -0
- package/gui/dist/assets/geist-cyrillic-wght-normal-BEAKL7Jp.woff2 +0 -0
- package/gui/dist/assets/geist-latin-ext-wght-normal-DC-KSUi6.woff2 +0 -0
- package/gui/dist/assets/geist-latin-wght-normal-BgDaEnEv.woff2 +0 -0
- package/gui/dist/assets/geist-mono-cyrillic-ext-wght-normal-X_5orZeX.woff2 +0 -0
- package/gui/dist/assets/geist-mono-cyrillic-wght-normal-DiZS0aHC.woff2 +0 -0
- package/gui/dist/assets/geist-mono-latin-ext-wght-normal-Bwz-egvJ.woff2 +0 -0
- package/gui/dist/assets/geist-mono-latin-wght-normal-XN7g48iV.woff2 +0 -0
- package/gui/dist/assets/geist-mono-symbols2-wght-normal-CO5SzqOn.woff2 +0 -0
- package/gui/dist/assets/geist-mono-vietnamese-wght-normal-DadHysG0.woff2 +0 -0
- package/gui/dist/assets/geist-vietnamese-wght-normal-6IgcOCM7.woff2 +0 -0
- package/gui/dist/assets/index-5REODpG3.css +2 -0
- package/gui/dist/assets/index-BWKBeK77.js +94 -0
- package/gui/dist/assets/segment-thumb-features-BQYzrze9.js +1 -0
- package/gui/dist/classic/assets/App-Bz65x1J6.js +58 -0
- package/gui/dist/{assets/Tray-BOPQyDbH.js → classic/assets/Tray-kk7mdO6I.js} +1 -1
- package/gui/dist/classic/assets/index-Dp2j8bSc.js +94 -0
- package/gui/dist/classic/assets/quota-summary-CvamtHjB.js +1 -0
- package/gui/dist/classic/index.html +47 -0
- package/gui/dist/favicon.png +0 -0
- package/gui/dist/favicon.svg +14 -0
- package/gui/dist/index.html +15 -2
- package/package.json +1 -1
- package/src/adapters/anthropic.ts +17 -8
- package/src/adapters/command-code.ts +15 -16
- package/src/adapters/cursor/transport-retry.ts +2 -2
- package/src/adapters/devin/cloud-direct/chat.ts +15 -6
- package/src/adapters/google.ts +7 -7
- package/src/adapters/kiro/adapter.ts +18 -3
- package/src/adapters/kiro/conversation.ts +8 -8
- package/src/adapters/kiro/payload.ts +45 -12
- package/src/adapters/kiro/stream.ts +230 -14
- package/src/adapters/kiro/structured-output-json.ts +191 -0
- package/src/adapters/kiro/structured-output-schema.ts +542 -0
- package/src/adapters/kiro/structured-output.ts +367 -0
- package/src/adapters/kiro-constants.ts +24 -1
- package/src/adapters/kiro-events.ts +31 -1
- package/src/adapters/kiro-retry.ts +3 -3
- package/src/adapters/kiro-tools.ts +14 -9
- package/src/adapters/kiro-wire.ts +9 -5
- package/src/adapters/ollama-native.ts +11 -1
- package/src/adapters/openai-chat/messages.ts +58 -5
- package/src/adapters/openai-chat/mistral-image-limit.ts +50 -0
- package/src/adapters/openai-chat/passthrough.ts +5 -3
- package/src/adapters/openai-chat/tool-schema.ts +83 -13
- package/src/adapters/openai-responses/empty-assistant.ts +15 -3
- package/src/adapters/openai-responses/opengateway-input.ts +18 -6
- package/src/adapters/openai-responses/passthrough.ts +5 -4
- package/src/adapters/openai-responses/reasoning.ts +9 -4
- package/src/adapters/openai-responses/request-strips.ts +1 -1
- package/src/adapters/openai-responses/tool-output-recovery.ts +79 -0
- package/src/adapters/physical-send.ts +3 -3
- package/src/adapters/qoder/live-models.ts +115 -1
- package/src/adapters/zed-openai-stream.ts +2 -1
- package/src/bridge/errors.ts +11 -2
- package/src/bridge/response-json.ts +2 -1
- package/src/bridge/sse.ts +14 -6
- package/src/chat/failure-verdict.ts +21 -0
- package/src/chat/outbound.ts +139 -21
- package/src/claude/failure-verdict.ts +21 -0
- package/src/claude/inbound-content-options.ts +15 -2
- package/src/claude/inbound-model-options.ts +2 -1
- package/src/claude/inbound-records.ts +2 -0
- package/src/claude/inbound.ts +17 -11
- package/src/claude/outbound.ts +98 -22
- package/src/cli/capabilities-access-remote.ts +13 -0
- package/src/cli/capabilities-base.ts +26 -3
- package/src/cli/capabilities-command.ts +12 -3
- package/src/cli/capabilities-provider-models.ts +3 -3
- package/src/cli/capability-contracts.ts +2 -0
- package/src/cli/codex-launch-auth.ts +30 -1
- package/src/cli/codex-launcher.ts +12 -5
- package/src/cli/codex-shim-autorestore.ts +12 -4
- package/src/cli/config-command.ts +11 -2
- package/src/cli/connect.ts +17 -2
- package/src/cli/dispatch.ts +14 -177
- package/src/cli/doctor.ts +95 -7
- package/src/cli/help.ts +2 -2
- package/src/cli/index.ts +17 -8
- package/src/cli/link-apply-restart.ts +9 -2
- package/src/cli/link.ts +1 -1
- package/src/cli/models.ts +124 -38
- package/src/cli/registry.ts +12 -4
- package/src/cli/restart-failure.ts +17 -0
- package/src/cli/root.ts +8 -0
- package/src/cli/stop-approval.ts +2 -2
- package/src/cli/sync-command.ts +243 -0
- package/src/cli/sync-fanout-process.ts +92 -0
- package/src/cli/sync-fanout.ts +161 -0
- package/src/cli/sync-flags.ts +10 -0
- package/src/cli/sync-link-status.ts +39 -0
- package/src/cli/sync-update-guard.ts +18 -0
- package/src/cli/system-restart-client.ts +5 -0
- package/src/cli/uninstall-client-state.ts +12 -1
- package/src/cli/update-restart-child.ts +13 -3
- package/src/cli/update-restart-home.ts +6 -3
- package/src/cli/update-restart.ts +36 -19
- package/src/client/connect.ts +35 -15
- package/src/client/hub-client.ts +5 -0
- package/src/client/link-home.ts +3 -2
- package/src/client/link-management-relay.ts +39 -2
- package/src/client/link-readiness.ts +3 -1
- package/src/client/machine-api.ts +2 -1
- package/src/client/machine-listener.ts +10 -0
- package/src/client/orphan-token-recovery.ts +322 -0
- package/src/client/restore-ownership.ts +19 -1
- package/src/client/runtime-restart.ts +12 -4
- package/src/client/runtime.ts +40 -11
- package/src/client/stop-routing.ts +62 -0
- package/src/client/sync-runtime.ts +65 -0
- package/src/clients/config-export.ts +32 -3
- package/src/codex/auth-context.ts +49 -103
- package/src/codex/catalog/antigravity-discovery.ts +16 -5
- package/src/codex/catalog/provider-models.ts +18 -12
- package/src/codex/forward-transport-headers.ts +35 -6
- package/src/codex/inject/config-toml.ts +88 -0
- package/src/codex/inject/multi-agent-v2.ts +30 -4
- package/src/codex/inject/plan.ts +34 -7
- package/src/codex/inject-coordination.ts +11 -0
- package/src/codex/inject.ts +18 -7
- package/src/codex/lineage.ts +13 -7
- package/src/codex/native-profile-api.ts +27 -1
- package/src/codex/quota.ts +22 -6
- package/src/codex/request-owned-affinity-key.ts +11 -0
- package/src/codex/request-owned-affinity.ts +118 -0
- package/src/codex/request-owned-main-pin.ts +86 -0
- package/src/codex/role-capability.ts +52 -41
- package/src/codex/routing/active-account.ts +13 -5
- package/src/codex/routing/selection.ts +40 -1
- package/src/codex/routing/thread-affinity-store.ts +916 -0
- package/src/codex/routing/thread-affinity.ts +90 -12
- package/src/codex/shim-diagnostics.ts +7 -0
- package/src/codex/shim-legacy-record.ts +290 -0
- package/src/codex/shim-windows-refresh.ts +9 -2
- package/src/codex/shim-wrapper-write.ts +7 -0
- package/src/codex/shim.ts +80 -21
- package/src/codex/toml-source-lines.ts +72 -13
- package/src/combos/failover.ts +6 -109
- package/src/combos/request.ts +2 -2
- package/src/combos/resolve.ts +29 -11
- package/src/config/diagnostics.ts +9 -9
- package/src/config/load-degrade.ts +27 -27
- package/src/config/process-state.ts +5 -0
- package/src/config/provider-validation.ts +9 -2
- package/src/config/removed-opencode-free-backup.ts +6 -3
- package/src/config/schema/leaf-validators.ts +1 -0
- package/src/config/tracked-runtime-inspection.ts +3 -3
- package/src/generated/compatibility-version.json +595 -255
- package/src/images/loop.ts +4 -3
- package/src/lib/client-error-body.ts +215 -0
- package/src/lib/client-retry-after.ts +66 -0
- package/src/lib/config-ownership-removal.ts +422 -0
- package/src/lib/config-ownership.ts +650 -81
- package/src/lib/context-overflow-verdict.ts +113 -0
- package/src/lib/crash-guard.ts +4 -2
- package/src/lib/desktop-cli-handoff.d.mts +4 -5
- package/src/lib/desktop-cli-handoff.mjs +18 -17
- package/src/lib/empty-tool-catalog.ts +25 -3
- package/src/lib/error-destination.ts +47 -0
- package/src/lib/errors.ts +1 -0
- package/src/lib/failure-detail.ts +66 -0
- package/src/lib/local-management-capability.ts +3 -1
- package/src/lib/messages-error-body.ts +162 -0
- package/src/lib/messages-sse-error-presentation.ts +93 -0
- package/src/lib/model-identity.ts +44 -0
- package/src/lib/passive-read.ts +9 -4
- package/src/lib/private-sqlite-path.ts +124 -0
- package/src/lib/response-service-tier.ts +17 -0
- package/src/lib/retry-after.ts +3 -0
- package/src/lib/socks5-fetch.ts +21 -9
- package/src/lib/spend-ledger-owner.ts +43 -4
- package/src/lib/upstream-condition.ts +142 -0
- package/src/lib/upstream-retry.ts +95 -12
- package/src/lib/windows-owner-acl.ts +22 -9
- package/src/lib/winsw.ts +5 -5
- package/src/lib/workflow-budget.ts +3 -1
- package/src/link/remote-platform.ts +14 -0
- package/src/link/remote-windows.ts +51 -9
- package/src/link/ssh-argv.ts +63 -10
- package/src/oauth/generic-account-failover.ts +13 -11
- package/src/oauth/index.ts +42 -73
- package/src/oauth/oauth-errors.ts +67 -0
- package/src/oauth/store.ts +21 -11
- package/src/protocols/codecs/messages-ir.ts +15 -9
- package/src/protocols/codecs/ollama.ts +197 -0
- package/src/protocols/encoders/adapter-events.ts +30 -7
- package/src/protocols/encoders/chat.ts +18 -10
- package/src/protocols/encoders/messages.ts +72 -28
- package/src/protocols/trace.ts +18 -0
- package/src/providers/antigravity-models.ts +45 -12
- package/src/providers/fastwire.ts +3 -2
- package/src/providers/free-directory.ts +2 -2
- package/src/providers/quota/anthropic-usage-windows.ts +13 -3
- package/src/providers/quota/vendor-probes-key.ts +60 -24
- package/src/providers/reasoning-metadata.ts +2 -1
- package/src/providers/registry/entries-extended.ts +9 -0
- package/src/providers/request-pacing.ts +3 -2
- package/src/reasoning-effort.ts +7 -2
- package/src/remote/hub-usage.ts +3 -0
- package/src/responses/apply-patch-envelope.ts +45 -19
- package/src/responses/compaction-history-framing.ts +5 -1
- package/src/responses/freeform-wrapper-scan.ts +5 -3
- package/src/responses/progressive-freeform-input.ts +354 -45
- package/src/routing/fallback-policy.ts +3 -1
- package/src/server/admission-model-scope.ts +17 -6
- package/src/server/admitted-http-turn.ts +57 -0
- package/src/server/anthropic-rate-limit-headers.ts +75 -3
- package/src/server/auth-cors.ts +5 -0
- package/src/server/chat-completions.ts +45 -20
- package/src/server/chat-native-sse.ts +52 -7
- package/src/server/chat-native.ts +60 -35
- package/src/server/claude-bridge-pool-session.ts +59 -0
- package/src/server/claude-messages.ts +174 -84
- package/src/server/context-history.ts +5 -1
- package/src/server/gui-static.ts +4 -1
- package/src/server/hub-usage.ts +7 -2
- package/src/server/inbound-body-admission.ts +11 -4
- package/src/server/index/link-management.ts +8 -0
- package/src/server/index/ollama-routes.ts +91 -0
- package/src/server/index/serve-options.ts +44 -24
- package/src/server/index/startup-warnings.ts +5 -12
- package/src/server/index/websocket-handler.ts +5 -2
- package/src/server/index.ts +6 -36
- package/src/server/inference/client-encoder-delivery.ts +9 -3
- package/src/server/json-serialized-bytes.ts +44 -0
- package/src/server/management/agent-settings-routes.ts +24 -21
- package/src/server/management/codex-cli-update-routes.ts +2 -1
- package/src/server/management/logs-usage-routes.ts +89 -4
- package/src/server/management/provider-routes.ts +2 -22
- package/src/server/management/qoder-provider-probe.ts +105 -0
- package/src/server/management/route-registry.ts +4 -1
- package/src/server/management/usage-aggregate-cache.ts +15 -5
- package/src/server/management/usage-source-facets.ts +38 -0
- package/src/server/messages-native-scope.ts +2 -1
- package/src/server/messages-native-tool-guard.ts +12 -4
- package/src/server/messages-native.ts +123 -47
- package/src/server/messages-response-headers.ts +25 -11
- package/src/server/messages-shared.ts +99 -65
- package/src/server/messages-sse-error-filter.ts +199 -0
- package/src/server/native-final-log.ts +93 -0
- package/src/server/ollama-inbound.ts +349 -0
- package/src/server/ollama-native-paths.ts +21 -0
- package/src/server/ollama-route-policy.ts +73 -0
- package/src/server/relay.ts +22 -3
- package/src/server/request-decompress.ts +4 -2
- package/src/server/request-log-failure-attribution.ts +22 -0
- package/src/server/request-log-failure-detail.ts +80 -0
- package/src/server/request-log-terminal-status.ts +4 -2
- package/src/server/request-log.ts +91 -42
- package/src/server/response-log-body.ts +6 -1
- package/src/server/responses/account-change-state.ts +17 -6
- package/src/server/responses/adapter-continuation.ts +17 -6
- package/src/server/responses/adapter-delivery.ts +17 -10
- package/src/server/responses/adapter-dispatch.ts +32 -31
- package/src/server/responses/anthropic-thinking-recovery.ts +3 -0
- package/src/server/responses/codex-auth-error.ts +24 -19
- package/src/server/responses/codex-ws-exchange.ts +11 -8
- package/src/server/responses/codex-ws-metadata.ts +94 -21
- package/src/server/responses/codex-ws-request.ts +3 -1
- package/src/server/responses/codex-ws-wire.ts +19 -3
- package/src/server/responses/compact.ts +57 -24
- package/src/server/responses/compaction-recovery.ts +4 -2
- package/src/server/responses/compaction-routing.ts +9 -4
- package/src/server/responses/core-auth.ts +32 -14
- package/src/server/responses/core-codex-account.ts +17 -6
- package/src/server/responses/core-combo-failure.ts +7 -1
- package/src/server/responses/core-combo-native.ts +2 -1
- package/src/server/responses/core-combo.ts +43 -27
- package/src/server/responses/core-errors.ts +24 -21
- package/src/server/responses/core-lifetime.ts +6 -3
- package/src/server/responses/core-normalize.ts +1 -0
- package/src/server/responses/core-options.ts +9 -0
- package/src/server/responses/core-pipeline.ts +4 -3
- package/src/server/responses/empty-completion-guard.ts +4 -1
- package/src/server/responses/fetch-helpers.ts +7 -1
- package/src/server/responses/input-admission.ts +28 -2
- package/src/server/responses/native-injection.ts +1 -1
- package/src/server/responses/native-response-json.ts +13 -4
- package/src/server/responses/native-response-output.ts +1 -2
- package/src/server/responses/non-replayable-error.ts +2 -1
- package/src/server/responses/pacing-overload.ts +3 -2
- package/src/server/responses/passthrough-delivery.ts +55 -14
- package/src/server/responses/passthrough-dispatch.ts +20 -18
- package/src/server/responses/passthrough-error.ts +9 -9
- package/src/server/responses/policy-fallback.ts +2 -1
- package/src/server/responses/request-prepare.ts +69 -48
- package/src/server/responses/request-transport.ts +36 -31
- package/src/server/responses/response-effects.ts +3 -2
- package/src/server/responses/run-turn-execution.ts +6 -6
- package/src/server/responses/sidecar-execution.ts +16 -12
- package/src/server/responses/spend-storage-error.ts +2 -1
- package/src/server/responses/terminal-guard.ts +30 -0
- package/src/server/responses/ws-upstream.ts +9 -0
- package/src/server/responses-custom-tool-repair.ts +14 -3
- package/src/server/responses-terminal-repair.ts +5 -2
- package/src/server/responses-undeclared-tool-guard.ts +39 -16
- package/src/server/restart-replacement.ts +3 -1
- package/src/server/safe-response-headers.ts +162 -13
- package/src/server/sse-payload-rewrite.ts +23 -11
- package/src/server/turn-state-handles.ts +164 -0
- package/src/server/workflow-refusal.ts +2 -1
- package/src/server/ws-bridge.ts +4 -0
- package/src/service/definition.ts +36 -4
- package/src/service/launchd.ts +89 -32
- package/src/service/logging.ts +34 -7
- package/src/service/ownership-mutation-lease.d.mts +11 -2
- package/src/service/ownership-mutation-lease.mjs +53 -11
- package/src/service/plist-xml.ts +59 -0
- package/src/service/state.ts +8 -0
- package/src/service/systemd-env.ts +2 -0
- package/src/service/systemd.ts +31 -7
- package/src/service/windows-taskxml.ts +16 -7
- package/src/service-manager-probe.ts +4 -10
- package/src/types/config.ts +2 -0
- package/src/types/provider.ts +2 -0
- package/src/types/request.ts +13 -1
- package/src/update/config-preflight.ts +48 -0
- package/src/update/index.ts +148 -26
- package/src/update/npm-install.d.mts +8 -0
- package/src/update/npm-install.mjs +20 -1
- package/src/update/orchestrated-admission.d.mts +4 -0
- package/src/update/orchestrated-admission.mjs +12 -0
- package/src/update/orchestrated-arguments.d.mts +12 -0
- package/src/update/orchestrated-arguments.mjs +64 -0
- package/src/update/orchestrated-child.d.mts +12 -0
- package/src/update/orchestrated-child.mjs +70 -0
- package/src/update/orchestrated-entry.ts +234 -0
- package/src/update/orchestrated-identity-probe-entry.ts +20 -0
- package/src/update/orchestrated-identity.ts +53 -0
- package/src/update/orchestrated-live-identity.ts +48 -0
- package/src/update/orchestrated-node-driver.mjs +99 -0
- package/src/update/orchestrated-outcome.d.mts +21 -0
- package/src/update/orchestrated-outcome.mjs +40 -0
- package/src/update/orchestrated-plan.ts +49 -0
- package/src/update/orchestrated-pnpm.d.mts +8 -0
- package/src/update/orchestrated-pnpm.mjs +33 -0
- package/src/update/orchestrated-session.d.mts +37 -0
- package/src/update/orchestrated-session.mjs +264 -0
- package/src/update/orchestrated-token.d.mts +10 -0
- package/src/update/orchestrated-token.mjs +21 -0
- package/src/update/orchestrated-token.ts +3 -0
- package/src/update/orchestrated-tree.d.mts +1 -0
- package/src/update/orchestrated-tree.mjs +14 -0
- package/src/update/pnpm-global-install.d.mts +6 -0
- package/src/update/pnpm-global-install.mjs +9 -2
- package/src/update/posix-install-supervisor-entry.mjs +6 -0
- package/src/update/posix-install-supervisor.d.mts +10 -0
- package/src/update/posix-install-supervisor.mjs +88 -0
- package/src/update/sync-update-mutex.d.mts +10 -0
- package/src/update/sync-update-mutex.mjs +164 -0
- package/src/update/sync-update-mutex.ts +1 -0
- package/src/update/test-home-guard.mjs +33 -0
- package/src/update/transactional-install.mjs +2 -2
- package/src/usage/client.ts +43 -0
- package/src/usage/error-detail.ts +225 -0
- package/src/usage/log.ts +64 -27
- package/src/usage/source-facets.ts +51 -0
- package/src/usage/source-filter.ts +65 -0
- package/src/usage/summary.ts +50 -8
- package/src/web-search/anthropic-executor.ts +105 -24
- package/src/web-search/executor.ts +5 -3
- package/src/web-search/loop.ts +33 -6
- package/src/web-search/progress-stream.ts +64 -5
- package/gui/dist/assets/App-bwugJRKn.js +0 -58
- package/gui/dist/assets/index-ebuVUtB7.js +0 -94
- package/gui/dist/assets/quota-summary-6HsrHQAy.js +0 -1
- /package/gui/dist/{assets → classic/assets}/App-B4j-Txmb.css +0 -0
- /package/gui/dist/{assets → classic/assets}/index-CHWwDo9L.css +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{O as e,S as t,n}from"./index-Dp2j8bSc.js";var r=n(),i=e=>({viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`,...e}),a=e=>(0,r.jsxs)(`svg`,{...i(e),children:[(0,r.jsx)(`rect`,{x:`3`,y:`3`,width:`7`,height:`7`,rx:`1.5`}),(0,r.jsx)(`rect`,{x:`14`,y:`3`,width:`7`,height:`7`,rx:`1.5`}),(0,r.jsx)(`rect`,{x:`3`,y:`14`,width:`7`,height:`7`,rx:`1.5`}),(0,r.jsx)(`rect`,{x:`14`,y:`14`,width:`7`,height:`7`,rx:`1.5`})]}),o=e=>(0,r.jsxs)(`svg`,{...i(e),children:[(0,r.jsx)(`rect`,{x:`3`,y:`4`,width:`18`,height:`7`,rx:`2`}),(0,r.jsx)(`rect`,{x:`3`,y:`13`,width:`18`,height:`7`,rx:`2`}),(0,r.jsx)(`path`,{d:`M7 7.5h.01M7 16.5h.01`})]}),s=e=>(0,r.jsxs)(`svg`,{...i(e),children:[(0,r.jsx)(`path`,{d:`M12 2 4 6v6l8 4 8-4V6l-8-4Z`}),(0,r.jsx)(`path`,{d:`m4 6 8 4 8-4M12 10v8`})]}),c=e=>(0,r.jsxs)(`svg`,{...i(e),children:[(0,r.jsx)(`rect`,{x:`4`,y:`8`,width:`16`,height:`11`,rx:`3`}),(0,r.jsx)(`path`,{d:`M12 8V4M8 2h8`}),(0,r.jsx)(`circle`,{cx:`9`,cy:`13`,r:`1`}),(0,r.jsx)(`circle`,{cx:`15`,cy:`13`,r:`1`})]}),l=e=>(0,r.jsx)(`svg`,{...i(e),children:(0,r.jsx)(`path`,{d:`M8 6h13M8 12h13M8 18h13M3 6h.01M3 12h.01M3 18h.01`})}),u=e=>(0,r.jsx)(`svg`,{...i(e),children:(0,r.jsx)(`path`,{d:`M4 6h16M4 12h16M4 18h16`})}),d=e=>(0,r.jsxs)(`svg`,{...i(e),children:[(0,r.jsx)(`rect`,{x:`3`,y:`4`,width:`18`,height:`16`,rx:`2`}),(0,r.jsx)(`path`,{d:`M9 4v16`})]}),f=e=>(0,r.jsxs)(`svg`,{...i(e),children:[(0,r.jsx)(`path`,{d:`m4 17 6-5-6-5`}),(0,r.jsx)(`path`,{d:`M12 19h8`})]}),p=e=>(0,r.jsx)(`svg`,{...i(e),children:(0,r.jsx)(`path`,{d:`M22 12h-4l-3 9L9 3l-3 9H2`})}),m=e=>(0,r.jsxs)(`svg`,{...i(e),children:[(0,r.jsx)(`path`,{d:`M22 12H2`}),(0,r.jsx)(`path`,{d:`M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11Z`}),(0,r.jsx)(`path`,{d:`M6 16h.01M10 16h.01`})]}),h=e=>(0,r.jsx)(`svg`,{...i(e),children:(0,r.jsx)(`path`,{d:`m20 6-11 11-5-5`})}),ee=e=>(0,r.jsx)(`svg`,{...i(e),children:(0,r.jsx)(`path`,{d:`M18 6 6 18M6 6l12 12`})}),te=e=>(0,r.jsx)(`svg`,{...i(e),children:(0,r.jsx)(`path`,{d:`M12 5v14M5 12h14`})}),g=e=>(0,r.jsx)(`svg`,{...i(e),children:(0,r.jsx)(`path`,{d:`M5 12h14`})}),ne=e=>(0,r.jsx)(`svg`,{...i(e),children:(0,r.jsx)(`path`,{d:`M21 12a9 9 0 0 1-9 9 9.8 9.8 0 0 1-6.7-2.7L3 16M3 21v-5h5M3 12a9 9 0 0 1 9-9 9.8 9.8 0 0 1 6.7 2.7L21 8M21 3v5h-5`})}),re=e=>(0,r.jsxs)(`svg`,{...i(e),children:[(0,r.jsx)(`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`}),(0,r.jsx)(`path`,{d:`M3 3v5h5M12 7v5l4 2`})]}),ie=e=>(0,r.jsx)(`svg`,{...i(e),children:(0,r.jsx)(`path`,{d:`M8 5v14M16 5v14`})}),ae=e=>(0,r.jsx)(`svg`,{...i(e),children:(0,r.jsx)(`path`,{d:`m7 4 13 8-13 8Z`})}),oe=e=>(0,r.jsx)(`svg`,{...i(e),children:(0,r.jsx)(`path`,{d:`M3 6h18M8 6V4h8v2M19 6l-1 14H6L5 6`})}),se=e=>(0,r.jsx)(`svg`,{...i(e),children:(0,r.jsx)(`path`,{d:`m3 3 18 18M10.6 10.6a2 2 0 0 0 2.8 2.8M9.9 4.2A10.8 10.8 0 0 1 12 4c5 0 9 4 10 8a12.7 12.7 0 0 1-2 4.1M6.6 6.6A12.4 12.4 0 0 0 2 12c1 4 5 8 10 8 1.5 0 2.9-.4 4.1-1`})}),ce=e=>(0,r.jsxs)(`svg`,{...i(e),children:[(0,r.jsx)(`path`,{d:`M12 20h9`}),(0,r.jsx)(`path`,{d:`M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4Z`})]}),le=e=>(0,r.jsxs)(`svg`,{...i(e),children:[(0,r.jsx)(`path`,{d:`M10.3 3.7 1.8 18a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.7a2 2 0 0 0-3.4 0Z`}),(0,r.jsx)(`path`,{d:`M12 9v4M12 17h.01`})]}),ue=e=>(0,r.jsxs)(`svg`,{...i(e),children:[(0,r.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,r.jsx)(`path`,{d:`M12 16v-4M12 8h.01`})]}),de=e=>(0,r.jsxs)(`svg`,{...i(e),children:[(0,r.jsx)(`circle`,{cx:`11`,cy:`11`,r:`7`}),(0,r.jsx)(`path`,{d:`m21 21-4.3-4.3`})]}),fe=e=>(0,r.jsx)(`svg`,{...i(e),children:(0,r.jsx)(`path`,{d:`M12 19V5M5 12l7-7 7 7`})}),pe=e=>(0,r.jsx)(`svg`,{...i(e),children:(0,r.jsx)(`path`,{d:`M12 5v14M19 12l-7 7-7-7`})}),me=e=>(0,r.jsx)(`svg`,{...i(e),children:(0,r.jsx)(`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M7 10l5 5 5-5M12 15V3`})}),he=e=>(0,r.jsx)(`svg`,{...i(e),children:(0,r.jsx)(`path`,{d:`m9 18 6-6-6-6`})}),ge=e=>(0,r.jsx)(`svg`,{...i(e),children:(0,r.jsx)(`path`,{d:`M9 19c-5 1.5-5-2.5-7-3m14 6v-3.9a3.4 3.4 0 0 0-.9-2.6c3-.3 6.2-1.5 6.2-6.7A5.2 5.2 0 0 0 20 4.8 4.9 4.9 0 0 0 19.9 1S18.7.6 16 2.5a13.4 13.4 0 0 0-7 0C6.3.6 5.1 1 5.1 1A4.9 4.9 0 0 0 5 4.8a5.2 5.2 0 0 0-1.4 3.7c0 5.1 3.1 6.4 6.1 6.7a3.4 3.4 0 0 0-.9 2.5V22`})}),_e=e=>(0,r.jsxs)(`svg`,{...i(e),children:[(0,r.jsx)(`path`,{d:`M18.4 5.6a9 9 0 1 1-12.8 0`}),(0,r.jsx)(`path`,{d:`M12 2v10`})]}),ve=e=>(0,r.jsx)(`svg`,{...i(e),children:(0,r.jsx)(`path`,{d:`M15 3h6v6M10 14 21 3M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`})}),ye=e=>(0,r.jsxs)(`svg`,{...i(e),children:[(0,r.jsx)(`circle`,{cx:`7.5`,cy:`15.5`,r:`4.5`}),(0,r.jsx)(`path`,{d:`m10.7 12.3 9.6-9.6M16 7l3 3M14 9l2 2`})]}),be=e=>(0,r.jsx)(`svg`,{viewBox:`0 0 32 32`,fill:`none`,stroke:`currentColor`,strokeWidth:2.484,strokeLinecap:`round`,...e,children:(0,r.jsx)(`path`,{d:`M22.356 19.797H17.17M9.662 12.29l1.979 3.576a.511.511 0 0 1-.005.504l-1.974 3.409M30.758 16c0 8.15-6.607 14.758-14.758 14.758-8.15 0-14.758-6.607-14.758-14.758C1.242 7.85 7.85 1.242 16 1.242c8.15 0 14.758 6.608 14.758 14.758Z`})}),xe=e=>(0,r.jsxs)(`svg`,{...i(e),children:[(0,r.jsx)(`rect`,{x:`4`,y:`11`,width:`16`,height:`10`,rx:`2`}),(0,r.jsx)(`path`,{d:`M8 11V7a4 4 0 0 1 8 0v4`})]}),Se=e=>(0,r.jsxs)(`svg`,{...i(e),children:[(0,r.jsx)(`path`,{d:`M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z`}),(0,r.jsx)(`path`,{d:`M13 5v2`}),(0,r.jsx)(`path`,{d:`M13 17v2`}),(0,r.jsx)(`path`,{d:`M13 11v2`})]}),Ce=e=>(0,r.jsx)(`svg`,{...i(e),children:(0,r.jsx)(`path`,{d:`M9 17H7A5 5 0 0 1 7 7h2M15 7h2a5 5 0 0 1 0 10h-2M8 12h8`})}),we=e=>(0,r.jsxs)(`svg`,{...i(e),children:[(0,r.jsx)(`circle`,{cx:`12`,cy:`12`,r:`4`}),(0,r.jsx)(`path`,{d:`M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4`})]}),Te=e=>(0,r.jsx)(`svg`,{...i(e),children:(0,r.jsx)(`path`,{d:`M21 12.8A9 9 0 1 1 11.2 3 7 7 0 0 0 21 12.8Z`})}),Ee=e=>(0,r.jsxs)(`svg`,{...i(e),children:[(0,r.jsx)(`rect`,{x:`2`,y:`3`,width:`20`,height:`14`,rx:`2`}),(0,r.jsx)(`path`,{d:`M8 21h8M12 17v4`})]}),De=e=>(0,r.jsxs)(`svg`,{...i(e),children:[(0,r.jsx)(`circle`,{cx:`12`,cy:`12`,r:`9`}),(0,r.jsx)(`path`,{d:`M3 12h18M12 3a14 14 0 0 1 0 18M12 3a14 14 0 0 0 0 18`})]}),Oe=e=>(0,r.jsxs)(`svg`,{...i(e),children:[(0,r.jsx)(`path`,{d:`m18 14 4 4-4 4`}),(0,r.jsx)(`path`,{d:`m18 2 4 4-4 4`}),(0,r.jsx)(`path`,{d:`M2 18h1.973a4 4 0 0 0 3.3-1.7l5.454-8.6a4 4 0 0 1 3.3-1.7H22`}),(0,r.jsx)(`path`,{d:`M2 6h1.972a4 4 0 0 1 3.6 2.2`}),(0,r.jsx)(`path`,{d:`M22 18h-6.041a4 4 0 0 1-3.3-1.8l-.359-.45`})]}),ke=e=>(0,r.jsxs)(`svg`,{...i(e),children:[(0,r.jsx)(`circle`,{cx:`9`,cy:`6`,r:`1`,fill:`currentColor`,stroke:`none`}),(0,r.jsx)(`circle`,{cx:`15`,cy:`6`,r:`1`,fill:`currentColor`,stroke:`none`}),(0,r.jsx)(`circle`,{cx:`9`,cy:`12`,r:`1`,fill:`currentColor`,stroke:`none`}),(0,r.jsx)(`circle`,{cx:`15`,cy:`12`,r:`1`,fill:`currentColor`,stroke:`none`}),(0,r.jsx)(`circle`,{cx:`9`,cy:`18`,r:`1`,fill:`currentColor`,stroke:`none`}),(0,r.jsx)(`circle`,{cx:`15`,cy:`18`,r:`1`,fill:`currentColor`,stroke:`none`})]}),_=e=>(0,r.jsx)(`svg`,{...i(e),children:(0,r.jsx)(`path`,{d:`m12 2 3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z`})}),Ae=e=>(0,r.jsx)(`svg`,{...i(e),children:(0,r.jsx)(`path`,{d:`M4 5h16l-6 7v5l-4 2v-7L4 5z`})}),v={anthropic:`claude-color.svg`,anthropic2:`claude-green.svg`,"anthropic-apikey":`claude-color.svg`,"claude-cli":`claude-color.svg`,"azure-openai":`openai.svg`,chatgpt:`openai.svg`,"cloudflare-ai-gateway":`cloudflare-ai-gateway-color.svg`,"cloudflare-workers-ai":`cloudflare-ai-gateway-color.svg`,cline:`cline-color.svg`,"cline-pass":`cline-color.svg`,"command-code":`commandcode-color.svg`,commandcode:`commandcode-color.svg`,cursor:`cursor-color.svg`,deepseek:`deepseek-color.svg`,"dsh-account":`deepseek-color.svg`,"workbuddy-ai":`workbuddy-color.svg`,devin:`devin.svg`,firepass:`firepass-color.svg`,fireworks:`fireworks-color.svg`,github:`github-copilot-color.svg`,"github-copilot":`copilot-color.svg`,"gitlab-duo":`gitlab-duo-color.svg`,google:`gemini-color.svg`,"google-antigravity":`antigravity-color.svg`,"google-vertex":`gemini-color.svg`,groq:`groq-color.svg`,huggingface:`huggingface-color.svg`,kimi:`kimi-color.svg`,"kimi-code":`kimi-color.svg`,"kimi-responses":`kimi-color.svg`,kiro:`kiro-color.svg`,"lm-studio":`lm-studio-color.svg`,"meta-model":`meta.svg`,"meta-muse":`meta.svg`,mistral:`mistral-color.svg`,minimax:`minimax.svg`,"minimax-cn":`minimax.svg`,moonshot:`moonshot-color.svg`,nvidia:`nvidia-color.svg`,ollama:`ollama-color.svg`,"ollama-cloud":`ollama-color.svg`,openai:`openai.svg`,"openai-apikey":`openai.svg`,"opencode-free":`opencode.svg`,"opencode-go":`opencode.svg`,"opencode-zen":`opencode.svg`,openrouter:`openrouter-color.svg`,opengateway:`opengateway.svg`,opper:`opper.svg`,qianfan:`qianfan-color.svg`,qoder:`qoder.svg`,"qoder-cn":`qoder.svg`,alibaba:`alibaba-color.svg`,"alibaba-token-plan":`alibaba-color.svg`,"alibaba-token-plan-intl":`alibaba-color.svg`,baseten:`baseten.svg`,bizrouter:`bizrouter.svg`,cerebras:`cerebras.svg`,crusoe:`crusoe.svg`,deepinfra:`deepinfra.svg`,digitalocean:`digitalocean.svg`,featherless:`featherless.svg`,hyperbolic:`hyperbolic.svg`,kilo:`kilo.svg`,nanogpt:`nanogpt.svg`,nebius:`nebius.svg`,neuralwatt:`neuralwatt.svg`,nous:`nous.svg`,novita:`novita.svg`,orcarouter:`orcarouter.svg`,"orcarouter-oauth":`orcarouter.svg`,packycode:`packycode.svg`,tokenlab:`tokenlab.svg`,parallel:`parallel.svg`,sambanova:`sambanova.svg`,scaleway:`scaleway.svg`,stepfun:`stepfun-color.svg`,siliconflow:`siliconflow.svg`,synthetic:`synthetic.svg`,together:`together.svg`,umans:`umans.svg`,venice:`venice.svg`,vultr:`vultr.svg`,litellm:`litellm.svg`,zenmux:`zenmux.svg`,zai:`zai.svg`,"zhipu-bigmodel":`zai.svg`,"zhipu-bigmodel-coding":`zai.svg`,"qwen-cloud":`qwen-portal-color.svg`,"vercel-ai-gateway":`vercel-ai-gateway-color.svg`,vllm:`vllm-color.svg`,xai:`grok.svg`,"mimo-free":`xiaomi-color.svg`,mimo:`xiaomi-color.svg`,xiaomi:`xiaomi-color.svg`,"xiaomi-mimo":`xiaomi-color.svg`},y={anthropic:`Anthropic Claude`,"anthropic-apikey":`Anthropic Claude`,chatgpt:`ChatGPT`,openai:`OpenAI (Codex login)`,"openai-apikey":`OpenAI API`,"azure-openai":`Azure OpenAI`,"cloudflare-ai-gateway":`Cloudflare AI Gateway`,"cloudflare-workers-ai":`Cloudflare Workers AI`,cline:`Cline`,"cline-pass":`ClinePass`,nvidia:`NVIDIA NIM`,ollama:`Ollama`,"ollama-cloud":`Ollama Cloud`,xai:`xAI Grok`,"mimo-free":`MiMo Free`,xiaomi:`Xiaomi`,cursor:`Cursor`,deepseek:`DeepSeek`,zed:`Zed`,"dsh-account":`DeepSeek Account (DSH)`,"workbuddy-ai":`WorkBuddy AI`,devin:`Devin`,github:`GitHub`,"github-copilot":`GitHub Copilot`,"gitlab-duo":`GitLab Duo`,openrouter:`OpenRouter`,opengateway:`OpenGateway`,opper:`Opper`,"opencode-go":`OpenCode Go`,"opencode-free":`OpenCode Free`,"opencode-zen":`OpenCode Zen`,orcarouter:`OrcaRouter - API`,"orcarouter-oauth":`OrcaRouter - Auth`,packycode:`PackyCode`,tokenlab:`TokenLab`,mistral:`Mistral`,groq:`Groq`,"meta-model":`Meta Model API`,"meta-muse":`Muse Code`,alibaba:`Alibaba Coding Plan`,"alibaba-token-plan":`Alibaba Token Plan`,"alibaba-token-plan-intl":`Alibaba Token Plan (Intl)`,kimi:`Kimi`,"kimi-code":`Kimi`,"kimi-responses":`Kimi`,moonshot:`Moonshot`,google:`Google`,"google-vertex":`Google Vertex`,"lm-studio":`LM Studio`,huggingface:`Hugging Face`,"qwen-cloud":`Qwen Cloud`,siliconflow:`SiliconFlow`,stepfun:`StepFun`,"tencent-coding-plan":`Tencent Cloud Coding Plan`,codebuddy:`CodeBuddy`,"codebuddy-cn":`CodeBuddy CN`,qoder:`Qoder`,"qoder-cn":`Qoder CN`,"vercel-ai-gateway":`Vercel AI Gateway`,vllm:`vLLM`,litellm:`LiteLLM`},b={anthropic2:`provider.name.anthropic2`,"command-code":`provider.name.commandCodeAuth`,commandcode:`provider.name.commandCodeApi`,orcarouter:`provider.name.orcaRouterApi`,"orcarouter-oauth":`provider.name.orcaRouterAuth`,volcengine:`provider.name.volcengine`,"volcengine-coding-plan":`provider.name.volcengineCodingPlan`,"volcengine-agent-plan":`provider.name.volcengineAgentPlan`},je=new Set([...Object.keys(y),...Object.keys(b)]);function Me(e){let t=e.toLowerCase();return Object.hasOwn(v,t)?v[t]:void 0}function Ne(e,t){let n=Me(e);return n?`/provider-icons/${n}`:void 0}var Pe=new Set([`cerebras.svg`,`deepinfra.svg`,`neuralwatt.svg`,`nous.svg`,`novita.svg`,`packycode.svg`,`tokenlab.svg`,`opper.svg`,`opengateway.svg`,`siliconflow.svg`,`synthetic.svg`,`zenmux.svg`,`grok.svg`,`kimi-color.svg`,`ollama-color.svg`,`opencode.svg`,`vercel-ai-gateway-color.svg`]),Fe=new Set([`baseten.svg`,`kilo.svg`,`sambanova.svg`,`venice.svg`,`zai.svg`]),Ie=new Set([`bizrouter.svg`,`featherless.svg`,`hyperbolic.svg`,`nebius.svg`,`parallel.svg`,`umans.svg`]);function Le(e){if(!e)return`image`;let t=e.split(`/`).pop()??``;return Pe.has(t)?`mask`:Fe.has(t)?`plate`:Ie.has(t)?`dark-plate`:`image`}function x(e,t){let n=e.toLowerCase(),r=Object.hasOwn(b,n)?b[n]:void 0;return r?t(r):(Object.hasOwn(y,n)?y[n]:void 0)||(e===n&&/^[a-z0-9]+(?:-[a-z0-9]+)*$/.test(e)?e.split(`-`).map(e=>e&&e[0].toUpperCase()+e.slice(1)).join(` `):e)}function Re(e){return je.has(e.toLowerCase())}function ze(e){return e===`command-code`?`commandcode-auth`:e===`commandcode`?`commandcode-api`:e}function Be(e,t){let n=e.indexOf(`/`);if(n<=0)return e;let r=e.slice(0,n),i=e.slice(n+1);if(r===`command-code`||r===`commandcode`){let e=i.match(/^([a-z0-9]+)-([a-z0-9]+(?:-[a-z0-9]+)+)$/i);return e&&i.startsWith(`${e[1]}-${e[1]}-`)&&(i=i.slice(e[1].length+1)),`${r===`command-code`?`commandcode-auth`:`commandcode-api`}/${i}`}return e}var Ve={ko:[{v:0x2386f26fc10000,s:`경`},{v:0xe8d4a51000,s:`조`},{v:1e8,s:`억`},{v:1e4,s:`만`}],zh:[{v:0x2386f26fc10000,s:`京`},{v:0xe8d4a51000,s:`兆`},{v:1e8,s:`亿`},{v:1e4,s:`万`}],"zh-TW":[{v:0x2386f26fc10000,s:`京`},{v:0xe8d4a51000,s:`兆`},{v:1e8,s:`億`},{v:1e4,s:`萬`}]};function S(e){return e.replace(/\.0+$/,``).replace(/(\.\d*?)0+$/,`$1`)}function He(e,t){let n=Ve[t];if(n){for(let t of n)if(e>=t.v)return`${S((e/t.v).toFixed(1))}${t.s}`;return String(e)}return e<1e4?String(e):e<1e6?`${S((e/1e3).toFixed(1))}K`:e<1e9?`${S((e/1e6).toFixed(1))}M`:e<0xe8d4a51000?`${S((e/1e9).toFixed(1))}B`:`${S((e/0xe8d4a51000).toFixed(1))}T`}var Ue=new Set([`claude-cli`]),We=`anthropic-apikey`;function C(e){return Ue.has((e.adapter??``).trim())}var Ge=`https://chatgpt.com/backend-api/codex`,Ke=`openai`;function w(e){try{let t=new URL(e.trim());if(t.username||t.password||t.search||t.hash)return;let n=t.pathname.replace(/\/+$/,``);return`${t.origin}${n}`}catch{return}}var qe=new URL(Ge).protocol;function Je(e,...t){return`${qe}//${e}/${t.join(`/`)}`}var Ye={"cline-pass":{adapter:`openai-chat`,baseUrl:Je(`api.cline.bot`,`api`,`v1`)},"mimo-free":{adapter:`mimo-free`,baseUrl:Je(`api.xiaomimimo.com`,`api`,`free-ai`,`openai`,`chat`)}};function Xe(e,t){let n=Ye[e];return!n||t.adapter!==n.adapter||w(t.baseUrl)!==w(n.baseUrl)}function T(e){try{let t=new URL(e).hostname.replace(/^\[|\]$/g,``).toLowerCase();return t===`localhost`||t===`127.0.0.1`||t===`::1`}catch{return!1}}function E(e){return e.keyOptional===!0||C(e)||e.authMode===`oauth`||e.authMode===`forward`||e.authMode===`local`||T(e.baseUrl)||e.hasApiKey===!0}function D(e){return e.adapter===`openai-responses`&&e.authMode===`forward`&&w(e.baseUrl)===Ge}function O(e,t){return e===Ke&&D(t)}function k(e){return C(e)?!1:e.freeTier===!0||e.keyOptional===!0||e.authMode===`local`||T(e.baseUrl)}function A(e,t){return O(e,t)?`accounts`:k(t)?`free`:`paid`}function Ze(e,t){let n=[...e],r=(e,t)=>e.name.localeCompare(t.name,void 0,{sensitivity:`base`}),i=e=>e.tier??A(e.name,e);switch(t){case`az`:return n.sort(r);case`za`:return n.sort((e,t)=>r(t,e));case`free-paid`:return n.sort((e,t)=>(i(e)===`free`?0:1)-(i(t)===`free`?0:1)||r(e,t));case`paid-free`:return n.sort((e,t)=>+(i(e)===`free`)-(i(t)===`free`)||r(e,t));case`accounts-first`:return n.sort((e,t)=>{let n=e=>{let t=i(e);return t===`accounts`?0:t===`free`?1:2};return n(e)-n(t)||r(e,t)});default:return n}}function Qe(e){let t=[],n=[],r=[];for(let[i,a]of Object.entries(e))a.disabled?r.push({name:i,...a}):E(a)?t.push({name:i,...a,tier:A(i,a)}):n.push({name:i,...a});return{ready:t,needsSetup:n,disabled:r}}function $e(e,t){let n=new Set(Object.entries(t).filter(([,e])=>e).map(([e])=>e));if(n.size===0)return e;let r=e=>e.map(e=>n.has(e.name)?{...e,activeNeedsReauth:!0}:e);return{ready:r(e.ready),needsSetup:r(e.needsSetup),disabled:e.disabled}}function j(e){return e.disabled?`disabled`:`activeNeedsReauth`in e&&e.activeNeedsReauth?`needs-setup`:E(e)?`ready`:`needs-setup`}function et(e){let t=e.openai,n=e.chatgpt;if(!t||!n||!O(`openai`,t)||!D(n))return e;let r={...e};return delete r.chatgpt,r}function M(e){return e.authMode===`local`||T(e.baseUrl)}var tt=[`ollama`,`vllm`,`lm-studio`,`lmstudio`,`litellm`,`localai`];function nt(e){let t=(e.authMode??``).toLowerCase();if(t===`oauth`||t===`forward`)return`login`;if(M(e))return`local`;let n=`${e.name??``} ${e.adapter} ${e.baseUrl}`.toLowerCase();return tt.some(e=>n.includes(e))?`selfHosted`:`cloud`}var N=[`plan_base`,`plan_bonus`,`addon`,`benefit`,`other`];function P(e){return typeof e==`object`&&e&&!Array.isArray(e)?e:{}}function F(e){if(typeof e!=`number`&&!(typeof e==`string`&&/^\d+(?:\.\d+)?$/.test(e)))return;let t=Number(e);return Number.isFinite(t)&&t>=0&&t<=2**53-1?t:void 0}function I(e){let t=P(e),n=F(t.total),r=F(t.used),i=F(t.remaining),a=F(t.frozen);if(n!==void 0&&r!==void 0&&i!==void 0&&a!==void 0)return{total:n,used:r,remaining:i,frozen:a}}function rt(e){let t=P(e),n=I(e);if(!n||!Array.isArray(t.groups)||t.groups.length>N.length)return;let r=[],i=new Set;for(let e of t.groups){let t=P(e),n=I(t),a=N.find(e=>e===t.kind);if(!n||!a||i.has(a))return;i.add(a),r.push({kind:a,...n})}let a=P(t.expiring),o=F(a.amount),s=typeof a.at==`number`&&a.at>0&&Number.isFinite(new Date(a.at).getTime())?a.at:void 0;return{...n,groups:r,...o!==void 0&&o>0&&s!==void 0?{expiring:{amount:o,at:s}}:{}}}function L(e,t){if(!e||typeof e!=`object`||Array.isArray(e))return null;let n=e;if(typeof n.updatedAt!=`number`||!Number.isFinite(n.updatedAt))return null;let r=n.observed===!0;return!r&&t-n.updatedAt>=18e5||!(`quota`in n)||n.label!==void 0&&typeof n.label!=`string`||n.source!==void 0&&typeof n.source!=`string`?null:{...typeof n.label==`string`?{label:n.label}:{},...typeof n.source==`string`?{source:n.source}:{},updatedAt:n.updatedAt,quota:n.quota,...r?{observed:!0}:{},...n.aggregation===void 0?{}:{aggregation:n.aggregation}}}function it(e,t=Date.now()){if(!e||typeof e!=`object`||Array.isArray(e))return null;let n={};for(let[r,i]of Object.entries(e)){let e=L(i,t);r.trim()&&e&&(n[r]=e)}return n}function at(e,t=Date.now()){if(!Array.isArray(e))return{};let n={};for(let r of e){if(!r||typeof r!=`object`||Array.isArray(r))continue;let e=r.provider,i=L(r,t);typeof e==`string`&&e.trim()&&i&&(n[e]=i)}return n}function ot(e){return e?.observed===!0&&typeof e.updatedAt==`number`?e.updatedAt:void 0}var R=e=>typeof e==`number`&&Number.isFinite(e)?e:void 0,st=e=>{let t=R(e);if(t===void 0)return;let n=t>1e10?t:t*1e3;return Number.isFinite(new Date(n).getTime())?t:void 0};function z(e,t){if(!e||typeof e!=`object`||Array.isArray(e))return null;let n=e,r=Array.isArray(n.customWindows)?n.customWindows.flatMap(e=>{if(!e||typeof e!=`object`)return[];let t=e;return typeof t.label!=`string`||R(t.percent)===void 0?[]:[{label:t.label,percent:t.percent,...R(t.resetAt)===void 0?{}:{resetAt:t.resetAt},...typeof t.modelId==`string`&&t.modelId.length<=128?{modelId:t.modelId}:{}}]}):[],i=n.creditsUsd&&typeof n.creditsUsd==`object`&&!Array.isArray(n.creditsUsd)?n.creditsUsd:null,a=R(i?.used),o=R(i?.limit),s=R(i?.remaining),c=R(i?.percent),l=st(i?.expiresAt),u=a!==void 0&&o!==void 0&&s!==void 0&&c!==void 0?{used:a,limit:o,remaining:s,percent:c,...l===void 0?{}:{expiresAt:l},...typeof i?.unlimited==`boolean`?{unlimited:i.unlimited}:{}}:void 0,d=rt(n.workbuddyCredits),f={...d?{workbuddyCredits:d}:{},...R(n.fiveHourPercent)===void 0?{}:{fiveHourPercent:n.fiveHourPercent},...R(n.fiveHourResetAt)===void 0?{}:{fiveHourResetAt:n.fiveHourResetAt},...R(n.weeklyPercent)===void 0?{}:{weeklyPercent:n.weeklyPercent},...R(n.weeklyResetAt)===void 0?{}:{weeklyResetAt:n.weeklyResetAt},...R(n.monthlyPercent)===void 0?{}:{monthlyPercent:n.monthlyPercent},...R(n.monthlyResetAt)===void 0?{}:{monthlyResetAt:n.monthlyResetAt},...r.length>0?{customWindows:r}:{},...u?{creditsUsd:u}:{},updatedAt:R(n.updatedAt)??t??Date.now()};return f.fiveHourPercent!==void 0||f.weeklyPercent!==void 0||f.monthlyPercent!==void 0||(f.customWindows?.length??0)>0||f.creditsUsd!==void 0||f.workbuddyCredits!==void 0?f:null}function B(e){return z(e?.quota,e?.updatedAt)}function ct(e){if(!e)return;if(e.aggregation===void 0)return e;let t=H(e)?.currentAccount?.quota??null;return{...e,aggregation:void 0,quota:t,updatedAt:t?.updatedAt}}function V(e){if(!e||typeof e!=`object`||Array.isArray(e))return;let t=e,n=R(t.usedPercent);if(n!==void 0)return{usedPercent:n,...typeof t.incomplete==`boolean`?{incomplete:t.incomplete}:{},...R(t.excludedAccounts)===void 0?{}:{excludedAccounts:t.excludedAccounts},...R(t.nextRecoveryAt)===void 0?{}:{nextRecoveryAt:t.nextRecoveryAt},...R(t.nextRecoveryPercent)===void 0?{}:{nextRecoveryPercent:t.nextRecoveryPercent}}}function H(e){let t=e?.aggregation;if(!t||typeof t!=`object`||Array.isArray(t))return null;let n=t;if(n.kind!==`capacity-weighted-v1`||n.scope!==`routable-known`)return null;let r=R(n.excludedAccounts),i=R(n.unknownPlanAccounts);if(r===void 0||i===void 0||typeof n.incomplete!=`boolean`)return null;let a=n.currentAccount&&typeof n.currentAccount==`object`&&!Array.isArray(n.currentAccount)?n.currentAccount:null,o=Array.isArray(n.customWindows)?n.customWindows.flatMap(e=>{if(!e||typeof e!=`object`||Array.isArray(e))return[];let t=e,n=V(t);return typeof t.label==`string`&&n?[{label:t.label,...n}]:[]}):[],s=V(n.fiveHour),c=V(n.weekly),l=V(n.monthly),u=!!s||!!c||!!l||o.length>0;return{presentation:n.presentation===`aggregate`||n.presentation===`effective-account-fallback`||n.presentation===`coverage-only`?n.presentation:u?`aggregate`:`coverage-only`,incomplete:n.incomplete,excludedAccounts:r,unknownPlanAccounts:i,partialWindowAccounts:R(n.partialWindowAccounts)??0,...s?{fiveHour:s}:{},...c?{weekly:c}:{},...l?{monthly:l}:{},...o.length>0?{customWindows:o}:{},...a?{currentAccount:{...typeof a.plan==`string`||a.plan===null?{plan:a.plan}:{},quota:z(a.quota)}}:{}}}function lt(e){if(!e?.trim())return``;let[t,n]=e.split(`:`,2);return n?`${t} · ${n.replace(/-/g,` `)}`:e}function ut(e,t){let n=j(e);return n===`disabled`?t(`prov.disabledBadge`):n===`ready`?t(`pws.status.ready`):`activeNeedsReauth`in e&&e.activeNeedsReauth?t(`pws.status.needsAttention`):t(`pws.status.needsSetup`)}function dt(e,t){if(C(e))return t(`modal.badge.subscriptionCli`);switch(e.authMode){case`oauth`:return t(`modal.badge.oauth`);case`forward`:return t(`pws.auth.chatgptPassthrough`);case`local`:return t(`modal.badge.local`);case`key`:return t(`modal.badge.apiKey`);default:return e.authMode??(e.keyOptional?t(`pws.auth.noKey`):t(`modal.badge.apiKey`))}}function ft(e){let t=j(e);return t===`disabled`?`providers-workspace-rail-status providers-workspace-rail-status--inactive`:t===`ready`?`providers-workspace-rail-status providers-workspace-rail-status--active`:`providers-workspace-rail-status providers-workspace-rail-status--warning`}function U({name:t,adapter:n,baseUrl:i,cls:a}){let o=e(),s=Ne(t,{adapter:n,baseUrl:i}),c=Le(s),l=c===`plate`?`${a} provider-icon--plate`:c===`dark-plate`?`${a} provider-icon--plate-dark`:a;return(0,r.jsx)(`span`,{className:l,children:s&&c===`mask`?(0,r.jsx)(`span`,{className:`provider-icon-mask`,style:{maskImage:`url(${s})`,WebkitMaskImage:`url(${s})`},"aria-hidden":`true`}):s?(0,r.jsx)(`img`,{src:s,alt:``,"aria-hidden":`true`}):(0,r.jsx)(pt,{name:t,label:x(t,o)})})}function pt({name:e,label:t}){let n=[...e].reduce((e,t)=>e+t.charCodeAt(0),0)%360,i=(t.trim()[0]??e[0]??`?`).toUpperCase();return(0,r.jsx)(`span`,{className:`provider-icon-fallback`,style:{background:`hsl(${n} 55% 90%)`,color:`hsl(${n} 65% 32%)`},"aria-hidden":`true`,children:i})}function mt({item:t,selected:n,tabbable:i,modelCount:a,isDefault:o,showConfigId:s,onClick:c,onFocus:l}){let u=e(),d=k(t),f=M(t),p=ut(t,u),m=x(t.name,u),h=s?`${m} (${t.name})`:m,ee=`${o?u(`pws.rail.suffixDefault`):``}${f?u(`pws.rail.suffixLocal`):d?u(`pws.rail.suffixFree`):``}`,te=a!==void 0&&a>0?a===1?u(`pws.modelCountOne`):u(`pws.modelCount`,{count:a}):``,g=[s?t.name:``,te].filter(Boolean).join(` · `);return(0,r.jsxs)(`button`,{type:`button`,className:`providers-workspace-rail-row${n?` providers-workspace-rail-row--selected`:``}`,onClick:c,role:`option`,"aria-selected":n,tabIndex:i?0:-1,"aria-label":u(`pws.rail.selectAria`,{name:h,status:p,suffix:ee}),title:h,onFocus:l,children:[(0,r.jsx)(U,{name:t.name,adapter:t.adapter,baseUrl:t.baseUrl,cls:`providers-workspace-rail-icon`}),(0,r.jsxs)(`span`,{className:`providers-workspace-rail-copy`,children:[(0,r.jsxs)(`span`,{className:`providers-workspace-rail-primary`,children:[(0,r.jsx)(`span`,{className:`providers-workspace-rail-name-label`,title:m,children:m}),f?(0,r.jsx)(`span`,{className:`pwi-rail-badge pwi-rail-badge--local`,title:u(`pws.localTitle`),children:u(`modal.badge.local`)}):d?(0,r.jsx)(`span`,{className:`pwi-rail-badge pwi-rail-badge--free`,title:u(`pws.freeTitle`),children:u(`modal.badge.free`)}):null]}),(0,r.jsx)(`span`,{className:`providers-workspace-rail-secondary`,title:g||void 0,children:g||`\xA0`})]}),(0,r.jsxs)(`span`,{className:`providers-workspace-rail-trail`,children:[o&&(0,r.jsx)(`span`,{className:`pwi-default-star`,title:u(`prov.defaultBadge`),"aria-label":u(`prov.defaultBadge`),children:(0,r.jsx)(_,{width:17,height:17,"aria-hidden":`true`})}),(0,r.jsx)(`span`,{className:ft(t),title:p,"aria-hidden":`true`})]})]})}var ht=1e10;function W(e){return e<ht?e*1e3:e}function gt(e,t){return typeof e==`number`&&Number.isFinite(e)&&e>0&&W(e)<=t}function _t(e,t){let n=e=>typeof e==`number`&&Number.isFinite(e);if(!n(e.shortPercent)||e.shortPercent<100)return!1;let r=e.shortResetAt;if(!n(r)||r<=0){let r=e.shortObservedAt;if(!n(r))return!1;let i=t-r;return i>=0&&i<=3e5}return W(r)>t}function vt(e){return{fiveHourAvailable:e?.shortWindowSeconds===18e3&&typeof e.shortResetAt==`number`,weeklyAvailable:typeof e?.weeklyResetAt==`number`}}function G(e){let t=e?.trim().toLowerCase();return t===`go`||t===`free`}function yt(e,t){if(!e)return null;let n=e.shortPercent===void 0&&e.shortResetAt===void 0?e:{...e,fiveHourPercent:e.fiveHourPercent??e.shortPercent,fiveHourResetAt:e.fiveHourResetAt??e.shortResetAt};return G(t)?{...n.monthlyPercent===void 0?{}:{monthlyPercent:n.monthlyPercent},...n.monthlyResetAt===void 0?{}:{monthlyResetAt:n.monthlyResetAt},...n.workbuddyCredits===void 0?{}:{workbuddyCredits:n.workbuddyCredits},...n.creditsUsd===void 0?{}:{creditsUsd:n.creditsUsd},...n.resetCredits===void 0?{}:{resetCredits:n.resetCredits},updatedAt:n.updatedAt}:n}function bt(e,t,n=Date.now()){if(!e)return null;let r=e=>typeof e==`number`&&Number.isFinite(e),i=r(e.fiveHourPercent)?e.fiveHourPercent:r(e.shortPercent)?e.shortPercent:void 0,a=(G(t)?[e.monthlyPercent]:[e.weeklyPercent,e.monthlyPercent]).filter(r);if(a.length===0)return _t({...r(i)?{shortPercent:i}:{},...r(e.fiveHourResetAt??e.shortResetAt)?{shortResetAt:e.fiveHourResetAt??e.shortResetAt}:{},...r(e.shortObservedAt)?{shortObservedAt:e.shortObservedAt}:{}},n)?100:null;let o=r(i)&&!gt(e.fiveHourResetAt??e.shortResetAt,n)?[...a,i]:a;return o.length?Math.max(...o):null}function xt(e){let t=new URLSearchParams({hours:String(e.chartHours),bucketMinutes:String(e.bucketMinutes),metric:e.tokenMetric,aggregation:e.aggregation,grouping:e.chartGrouping});e.models?.length&&t.set(`models`,e.models.join(`,`));for(let n of e.hiddenProviders)t.append(`hiddenProvider`,n);return t}function K(e){return Array.isArray(e)&&e.length<=100&&e.every(e=>typeof e==`string`)?JSON.stringify([...new Set(e)].sort()):void 0}function St(e,t){let n=new Set(t.hiddenProviders),r=e.availableModels.filter(e=>!n.has(e.slice(0,e.indexOf(`/`))));if(t.models?.length===0)return{...e,series:[],availableModels:r};let i=t.models===null?null:new Set(t.models),a=i!==null||n.size>0,o=e.appliedFilters,s=!!o&&K(o.hiddenProviders)===K(t.hiddenProviders)&&(t.models===null?o.models===null:K(o.models)===K(t.models)),c=e.series.filter(e=>e.id===`other`&&e.provider===``?!a||s:!n.has(e.provider)&&(i===null||i.has(`${e.provider}/${e.model}`)||i.has(e.model)));return{...e,series:c,availableModels:r,truncated:e.truncated||(a||o!==void 0)&&!s}}var Ct={6:15,24:60,72:180,168:360};function wt(e){return Ct[e]}function Tt(e){if(e<1e3)return String(Math.round(e));let t=[[0xe8d4a51000,`T`],[1e9,`B`],[1e6,`M`],[1e3,`K`]];for(let n=0;n<t.length;n+=1){let[r,i]=t[n];if(e>=r){let a=Math.round(e/r);if(a>=1e3&&n>0){let[r,i]=t[n-1];return`${Math.round(e/r)}${i}`}return`${a}${i}`}}return String(Math.round(e))}function Et(e,t){let n=new Map;for(let r of e){let e=r.includes(`/`)?r.slice(0,r.indexOf(`/`)):r,i=n.get(e)??{provider:e,models:[],total:0},a=t.get(r)??0;i.models.push({id:r,total:a}),i.total+=a,n.set(e,i)}return Array.from(n.values()).map(e=>({...e,models:e.models.toSorted((e,t)=>t.total-e.total||e.id.localeCompare(t.id))})).toSorted((e,t)=>t.total-e.total||e.provider.localeCompare(t.provider))}function Dt(e,t,n,r){let i=new Set(t),a=new Set((e??t).filter(e=>i.has(e)));for(let e of n)r?a.add(e):a.delete(e);return t.length>0&&t.every(e=>a.has(e))?null:t.filter(e=>a.has(e))}function Ot(e,t=[]){let n={...e};if(typeof n.menuBarTemplate==`string`&&n.menuBarTemplate.trim()===``&&(n.menuBarTemplate=null),n.models!==void 0&&t.length>0){let e=n.models??[],r=new Set(e);e.length===t.length&&t.every(e=>r.has(e))&&(n.models=null)}return n}function kt(e,t,n,r,i=8){let a=Math.max(0,t-i*2),o=Math.max(0,n-i*2),s=Math.max(r,1),c=Math.max(e.length-1,1);return e.map((e,t)=>`${i+a*t/c},${i+o*(1-Math.max(0,e)/s)}`).join(` `)}function At(e,t,n,r,i=8){let a=e[0]?.points.length??0;if(a===0)return[];let o=Math.max(0,t-i*2),s=Math.max(0,n-i*2),c=Math.max(r,1),l=Math.min(3,o/Math.max(a*8,1)),u=Math.max(0,o/a-l),d=[];for(let t=0;t<a;t+=1){let n=0;for(let r=0;r<e.length;r+=1){let f=s*Math.max(0,e[r]?.points[t]??0)/c;f>0&&d.push({x:i+o/a*t+l/2,y:i+s-n-f,width:u,height:f,seriesIndex:r,bucketIndex:t}),n+=f}}return d}var q=[`#0A84FF`,`#FF9F0A`,`#30D158`,`#BF5AF2`,`#FF453A`,`#64D2FF`],jt=640,Mt=160,J=28;function Nt(e,t){return Math.max(...t===`stackedBar`?Array.from({length:e.buckets},(t,n)=>e.series.reduce((e,t)=>e+(t.points[n]??0),0)):e.series.flatMap(e=>e.points),0)}function Pt(e,t){let n=new Intl.DateTimeFormat(t,{month:`short`,day:`numeric`}),r=Math.max(1,Math.floor((e.buckets-1)/3));return[0,1,2,3].map(t=>{let i=Math.min(e.buckets-1,t*r);return n.format(new Date((e.start+i*e.bucketSeconds)*1e3))})}function Ft({timeline:e,chartStyle:t,hours:n,loading:i,error:a,onRetry:o,locale:s,t:c}){if(i)return(0,r.jsx)(`div`,{className:`usage-companion-chart-skeleton`,"aria-busy":`true`,"aria-label":c(`usage.companion.loading`)});if(a)return(0,r.jsxs)(`div`,{className:`usage-companion-chart-state`,role:`alert`,children:[(0,r.jsx)(`span`,{children:c(`usage.companion.timelineUnavailable`)}),(0,r.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,onClick:o,children:c(`common.retry`)})]});if(!e||e.series.length===0)return(0,r.jsx)(`div`,{className:`usage-companion-chart-state`,children:c(`usage.companion.empty`,{hours:e?.buckets?Math.round(e.buckets*e.bucketSeconds/3600):n})});let l=Nt(e,t),u=Pt(e,s),d=J,f=u.map((e,t)=>(0,r.jsx)(`text`,{x:J+584*t/3,y:156,textAnchor:t===0?`start`:t===3?`end`:`middle`,className:`usage-companion-axis-label`,children:e},`${e}-${t}`)),p=t===`line`?e.series.map((e,t)=>(0,r.jsx)(`polyline`,{points:kt(e.points,584,104,l,0),transform:`translate(${J},${J})`,fill:`none`,stroke:q[t%q.length],strokeWidth:`2`,strokeLinejoin:`round`,strokeLinecap:`round`},e.id)):At(e.series,584,104,l,0).map(e=>(0,r.jsx)(`rect`,{x:J+e.x,y:J+e.y,width:e.width,height:e.height,fill:q[e.seriesIndex%q.length],rx:`1`},`${e.bucketIndex}-${e.seriesIndex}`));return(0,r.jsxs)(`div`,{className:`usage-companion-chart`,children:[(0,r.jsxs)(`svg`,{viewBox:`0 0 ${jt} ${Mt}`,role:`img`,"aria-label":c(`usage.companion.chartLabel`),children:[(0,r.jsx)(`line`,{x1:J,y1:d,x2:J,y2:132,className:`usage-companion-axis`}),(0,r.jsx)(`line`,{x1:J,y1:132,x2:612,y2:132,className:`usage-companion-axis`}),(0,r.jsx)(`text`,{x:24,y:32,textAnchor:`end`,className:`usage-companion-axis-label`,children:Tt(l)}),p,f]}),(0,r.jsx)(`div`,{className:`usage-companion-legend`,children:e.series.map((e,t)=>(0,r.jsxs)(`span`,{className:`usage-companion-legend-item`,children:[(0,r.jsx)(`span`,{className:`usage-companion-swatch`,style:{background:q[t%q.length]},"aria-hidden":`true`}),(0,r.jsx)(`span`,{children:e.id})]},e.id))}),e.truncated&&(0,r.jsx)(`p`,{className:`muted text-caption`,children:c(`usage.companion.olderRecordsSkipped`)})]})}var Y=e=>typeof e==`number`&&Number.isFinite(e)&&e>=0,X=e=>typeof e==`object`&&e&&!Array.isArray(e)?e:{};function It(e){return Object.entries(X(X(e).providers)).flatMap(([e,t])=>{let n=X(t);return n.disabled===!0?[]:e===`openai`?[{name:e,path:`/api/codex-auth/accounts`,switchKind:`codex`}]:n.authMode===`oauth`?[{name:e,path:`/api/oauth/accounts?${new URLSearchParams({provider:e,quota:`1`})}`,switchKind:`oauth`}]:n.hasApiKey===!0&&n.authMode!==`forward`?[{name:e,path:`/api/providers/keys?${new URLSearchParams({name:e,quota:`1`})}`,switchKind:`apiKey`}]:[{name:e,path:null,switchKind:null}]})}function Lt(e,t,n){return t===`codex`?{path:`/api/codex-auth/active`,body:{accountId:n}}:t===`oauth`?{path:`/api/oauth/accounts/active`,body:{provider:e,accountId:n}}:{path:`/api/providers/keys/active`,body:{name:e,id:n}}}function Rt(e,t){return t?{switchState:`active`}:X(e.mainAccountHardLock).state===`blocked`?{switchState:`blocked`,blockedReason:`mainHardLock`}:e.paused===!0?{switchState:`blocked`,blockedReason:`paused`}:X(e.health).reason===`validation_pending`?{switchState:`blocked`,blockedReason:`validationPending`}:{switchState:`available`}}function zt(e,t){let n=[`go`,`free`].includes((t??``).trim().toLowerCase()),r=e.fiveHourPercent??e.shortPercent;return(n?[e.monthlyPercent,r]:[e.weeklyPercent,e.monthlyPercent,r]).some(e=>typeof e==`number`&&Number.isFinite(e)&&e>=100)}function Bt(e){let t=X(e),n=t.accounts??t.keys;if(!Array.isArray(n))throw Error(`Invalid account roster`);return n.map(e=>{let n=X(e);if(typeof n.id!=`string`)throw Error(`Invalid account identifier`);let r=typeof n.email==`string`?Vt(n.email):void 0,i=[n.alias,n.label,r,n.logLabel,n.id].find(e=>typeof e==`string`&&e.length),a=n.quotaUnavailable===!0||n.quotaMode===`unsupported`||!n.quota?null:X(n.quota),o=typeof n.plan==`string`?n.plan:void 0,s=t.activeAccountId??t.activeId??t.activeCodexAccountId,c=typeof s==`string`?s===n.id:n.active===!0;return{id:n.id,label:i,email:r,plan:o,unavailable:n.quotaUnavailable===!0,active:c,...Rt(n,c),exhausted:a!==null&&zt(X(n.quota),o),status:typeof X(n.health).status==`string`?X(n.health).status:void 0,quotaFailure:typeof n.quotaFailure==`string`?n.quotaFailure:void 0,quota:yt(a,o)}})}function Z(e){if(!Y(e)||e===0)return null;let t=e<0xe8d4a51000?e*1e3:e;return Number.isFinite(new Date(t).getTime())?t:null}function Vt(e){let[t,n]=e.split(`@`);if(!n)return`•••`;let r=n.includes(`.`)?n.slice(n.lastIndexOf(`.`)):``;return`${t?.slice(0,1)||`•`}•••@${n.slice(0,1)}•••${r}`}function Ht(e,t,n=Date.now()){let r=Z(e);if(r===null||r<=n)return{text:`—`};let i=Math.ceil((r-n)/6e4),a=(e,n)=>new Intl.NumberFormat(t,{style:`unit`,unit:n,unitDisplay:`narrow`}).format(e);return{text:i<60?a(i,`minute`):i<1440?`${a(Math.floor(i/60),`hour`)} ${a(i%60,`minute`)}`:i<10080?`${a(Math.floor(i/1440),`day`)} ${a(Math.floor(i%1440/60),`hour`)}`:new Intl.DateTimeFormat(t,{month:`short`,day:`numeric`}).format(r),exact:new Date(r).toLocaleString(t)}}function Ut(e){if(!e)return[];let t=[{id:`quota.fiveHourLimit`,key:`quota.fiveHourLimit`,percent:e.fiveHourPercent??e.shortPercent,reset:e.fiveHourResetAt??e.shortResetAt},{id:`quota.weeklyLimit`,key:`quota.weeklyLimit`,percent:e.weeklyPercent,reset:e.weeklyResetAt},{id:`quota.monthlyLimit`,key:`quota.monthlyLimit`,percent:e.monthlyPercent,reset:e.monthlyResetAt},...Array.isArray(e.customWindows)?e.customWindows.filter(e=>e&&typeof e.label==`string`).map(e=>({id:e.label,label:e.label,modelId:e.modelId,percent:e.percent,reset:e.resetAt})):[]].filter(e=>Y(e.percent)||Z(e.reset)!==null),n=new Map;return t.map(e=>{let t=n.get(e.id)??0;return n.set(e.id,t+1),t===0?e:{...e,id:`${e.id}#${t}`}})}function Wt(e,t){let n=new Set(t.hiddenProviders),r=t.models===null?null:new Set(t.models),i=e.models.filter(e=>!n.has(e.provider)&&(r===null||r.has(`${e.provider}/${e.model}`)||r.has(e.model)));if(t.models===null&&t.hiddenProviders.length===0)return{...e,models:i};if(t.models?.length!==0&&e.models.some(e=>!e.provider||!e.model||e.provider===`other`&&e.model===`other`))return{...e,models:i.filter(e=>e.provider!==`other`||e.model!==`other`),summary:{},usageIncomplete:!0};let a={};for(let e of[`requests`,`totalTokens`,`inputTokens`,`outputTokens`,`cachedInputTokens`,`cacheReadInputTokens`,`estimatedCostUsd`,`measuredRequests`,`pricedRequests`])i.length&&i.every(t=>Y(t[e]))&&(a[e]=i.reduce((t,n)=>t+n[e],0));return{...e,models:i,summary:a}}function Gt(e){let t={...e};if((e.requests??0)>0&&(e.measuredRequests===0||e.coverageRatio===0))for(let e of[`totalTokens`,`inputTokens`,`outputTokens`,`cachedInputTokens`,`cacheReadInputTokens`])delete t[e];return(e.requests??0)>0&&e.pricedRequests===0&&delete t.estimatedCostUsd,t}async function Kt(e,n){let r=t(2e4),i=()=>r.controller.abort();n.aborted&&i(),n.addEventListener(`abort`,i,{once:!0});try{let t=await fetch(e,{signal:r.signal,cache:`no-store`});if(!t.ok)throw Error(String(t.status));let n=await t.json();if(r.signal.aborted)throw Error(`Tray request cancelled`);return n}finally{r.clear(),n.removeEventListener(`abort`,i)}}function qt(e){let t=X(e);if(t.error||!t.summary||typeof t.summary!=`object`||Array.isArray(t.summary)||!Array.isArray(t.models))throw Error(`Invalid usage`);return t}var Q=e=>typeof e==`number`&&Number.isFinite(e);function $(e){return Q(e)?e>=90?`critical`:e>=70?`warn`:`normal`:`normal`}function Jt(e){return Q(e)?`${Math.floor(e)}%`:`-`}var Yt=[`quota.weeklyLimit`,`quota.monthlyLimit`,`quota.fiveHourLimit`];function Xt(e){let t=Ut(e).map(e=>{let t=Q(e.percent)?e.percent:void 0,n=Z(e.reset),r=`modelId`in e?e.modelId:void 0;return{id:e.id,...r===void 0?{}:{modelId:r},...`key`in e&&e.key?{labelKey:e.key}:{},...`label`in e&&typeof e.label==`string`?{label:e.label}:{},...t===void 0?{}:{percent:t},...n===null?{}:{resetAt:n},severity:r===void 0?$(t):`normal`}}),n=e.creditsUsd;if(n&&n.unlimited!==!0&&Q(n.percent)){let e=Z(n.expiresAt);t.push({id:`quotaSummary.credits`,labelKey:`quotaSummary.credits`,percent:n.percent,...e===null?{}:{resetAt:e},severity:$(n.percent)})}let r=new Set;return t.map(e=>{let t=e.id,n=1;for(;r.has(t);)t=`${e.id}#${n++}`;return r.add(t),t===e.id?e:{...e,id:t}})}function Zt(e){let t=e.filter(e=>e.modelId===void 0&&e.percent!==void 0),n=new Map;for(let e of t)e.labelKey!==void 0&&!n.has(e.labelKey)&&n.set(e.labelKey,e);let r;for(let e of Yt){let t=n.get(e);if(t){r=t;break}}r||=t.find(e=>e.labelKey!==`quotaSummary.credits`);let i=n.get(`quotaSummary.credits`);return i&&i.severity===`critical`&&r?.severity!==`critical`?i:r??t[0]}function Qt(e,t){let n=[];for(let[r,i]of Object.entries(e)){let e=B(i);if(!e)continue;let a=Xt(e),o=Zt(a);o&&n.push({provider:r,label:i.label?.trim()||t(r),headline:o,windows:a,...Q(i.updatedAt)?{updatedAt:i.updatedAt}:{},observed:i.observed===!0,severity:o.severity})}return n}export{p as $,ct as A,ae as At,et as B,Se as Bt,yt as C,u as Ct,dt as D,d as Dt,mt as E,Te as Et,M as F,o as Ft,Ze as G,k as H,ee as Ht,nt as I,Oe as It,He as J,We as K,$e as L,_ as Lt,it as M,_e as Mt,at as N,ne as Nt,B as O,ie as Ot,ot as P,de as Pt,ze as Q,j as R,we as Rt,bt as S,xe as St,U as T,Ee as Tt,Xe as U,O as V,oe as Vt,A as W,x as X,Be as Y,Re as Z,St as _,re as _t,Kt as a,h as at,Et as b,Ce as bt,Gt as c,me as ct,It as d,Ae as dt,le as et,Ut as f,ge as ft,Ot as g,m as gt,wt as h,ke as ht,Lt as i,s as it,lt as j,te as jt,H as k,ce as kt,Bt as l,ve as lt,Ft as m,a as mt,Jt as n,fe as nt,Wt as o,he as ot,Ht as p,De as pt,C as q,$ as r,c as rt,Y as s,be as st,Qt as t,pe as tt,qt as u,se as ut,xt as v,ue as vt,vt as w,g as wt,Dt as x,l as xt,Tt as y,ye as yt,Qe as z,f as zt};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<link rel="icon" type="image/png" href="/favicon.png" />
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
|
+
<meta name="color-scheme" content="light dark" />
|
|
8
|
+
<title>opencodex · proxy dashboard</title>
|
|
9
|
+
<script>
|
|
10
|
+
// FOWT guard: apply an explicit light/dark choice before first paint. "system" leaves the
|
|
11
|
+
// attribute unset so color-scheme:light-dark follows the OS. Mirrors App.tsx.
|
|
12
|
+
(function () {
|
|
13
|
+
try {
|
|
14
|
+
var t = localStorage.getItem("ocx-theme");
|
|
15
|
+
if (t === "light" || t === "dark") document.documentElement.setAttribute("data-theme", t);
|
|
16
|
+
} catch (e) {
|
|
17
|
+
document.documentElement.removeAttribute("data-theme"); // storage blocked: follow the OS theme
|
|
18
|
+
}
|
|
19
|
+
// FOUT guard: set <html lang> before first paint so :lang() font stacks apply immediately.
|
|
20
|
+
// Mirrors detectInitial() + LOCALES in src/i18n/shared.ts.
|
|
21
|
+
var langMap = { en: "en", de: "de", fr: "fr", ko: "ko", zh: "zh-CN", "zh-TW": "zh-TW", ru: "ru", ja: "ja", tr: "tr", vi: "vi" };
|
|
22
|
+
langMap.pt = "pt-BR";
|
|
23
|
+
var stored = null;
|
|
24
|
+
try {
|
|
25
|
+
stored = localStorage.getItem("ocx-lang");
|
|
26
|
+
} catch (e) {
|
|
27
|
+
stored = null; // storage blocked: fall back to navigator.language below
|
|
28
|
+
}
|
|
29
|
+
var locale = stored && Object.prototype.hasOwnProperty.call(langMap, stored) ? stored : null;
|
|
30
|
+
if (!locale) {
|
|
31
|
+
var nav = (navigator.language || "en").toLowerCase();
|
|
32
|
+
if (nav.indexOf("zh") === 0) {
|
|
33
|
+
locale = /tw|hk|mo|hant/.test(nav) ? "zh-TW" : "zh";
|
|
34
|
+
} else {
|
|
35
|
+
locale = ["de", "fr", "ko", "ru", "ja", "tr", "vi", "pt"].filter(function (c) { return nav.indexOf(c) === 0; })[0] || "en";
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
document.documentElement.lang = langMap[locale];
|
|
39
|
+
})();
|
|
40
|
+
</script>
|
|
41
|
+
<script type="module" crossorigin src="/classic/assets/index-Dp2j8bSc.js"></script>
|
|
42
|
+
<link rel="stylesheet" crossorigin href="/classic/assets/index-CHWwDo9L.css">
|
|
43
|
+
</head>
|
|
44
|
+
<body>
|
|
45
|
+
<div id="root"></div>
|
|
46
|
+
</body>
|
|
47
|
+
</html>
|
package/gui/dist/favicon.png
CHANGED
|
Binary file
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -48.77 969.86 969.86" role="img" aria-label="opencodex">
|
|
2
|
+
<style>path,circle{fill:#0a0a0a}.cls-1{fill:#fff}@media (prefers-color-scheme:dark){path,circle{fill:#fafafa}.cls-1{fill:#0a0a0a}}</style>
|
|
3
|
+
<circle cx="484.93" cy="23.77" r="23.77"/>
|
|
4
|
+
<path d="M211.7,512.94c-2.88-3.06-65.91-72.39-39.44-162.78,25.13-85.82,107.93-112.07,113.82-113.82,14.79-56.16,58.48-100.3,114.39-115.52,87.21-23.74,152.39,36.98,155.52,40.01,9.02-2.05,81.68-17.26,142,32.12,47.38,38.79,68.85,102.47,55.79,164.54,5.64,5.69,62.55,65.15,47.9,149.32-10.67,61.31-55.21,112.22-115.52,132.42-3.16,9.96-25.51,76.55-94.67,105.37-56.77,23.66-123.4,12.85-172.99-27.61-8.85,1.37-90.97,12.63-154.4-49.59-63.89-62.67-53.63-145.77-52.4-154.47Z"/>
|
|
5
|
+
<circle cx="484.93" cy="848.54" r="23.77"/>
|
|
6
|
+
<path d="M149.56,706.99c45.77,61.19,107.16,107.71,178.85,134.55,15.54,5.82,31.48,10.55,47.66,14.22,12.22,2.77,26.55-3.73,29.52-16.76,2.78-12.2-3.67-26.55-16.76-29.52-13.49-3.06-26.8-6.85-39.86-11.4-3.83-1.34-7.64-2.74-11.43-4.2-1.98-.76-3.94-1.54-5.91-2.34-.74-.3-1.49-.68-2.24-.92,6.09,1.94.98.42-.33-.16-8.56-3.73-16.98-7.78-25.23-12.16-9.28-4.92-18.35-10.25-27.17-15.95-3.92-2.54-7.8-5.15-11.63-7.84-1.98-1.39-3.95-2.81-5.91-4.24-.96-.71-1.92-1.42-2.88-2.13-.58-.43-4.64-3.51-1.79-1.34,2.63,2.01-.37-.3-1.01-.81-.9-.71-1.8-1.43-2.69-2.15-1.76-1.42-3.51-2.86-5.24-4.31-3.56-2.98-7.06-6.03-10.51-9.15-6.02-5.44-11.85-11.08-17.49-16.91-5.61-5.8-11.03-11.78-16.24-17.94-2.43-2.88-4.82-5.79-7.17-8.74-1.18-1.48-5.04-6.66.03.09-1.03-1.38-2.09-2.74-3.12-4.12-3.89-5.19-7.84-9.24-14.34-11.03-5.74-1.58-13.39-.87-18.49,2.42-9.91,6.39-16.65,22.08-8.61,32.84h0Z"/>
|
|
7
|
+
<path d="M778.85,682.76c-.82,1.1-1.65,2.19-2.47,3.28-1.88,2.49,3.94-5.03.43-.57-2.04,2.6-4.12,5.16-6.24,7.7-4.46,5.36-9.07,10.58-13.83,15.67-11.51,12.32-23.87,23.84-36.96,34.45-1.78,1.44-3.54,2.97-5.41,4.3,5.13-3.65-1.18.85-2.19,1.6-4.17,3.09-8.4,6.08-12.69,8.99-8.48,5.74-17.2,11.12-26.13,16.12s-17.41,9.29-26.38,13.4c-2.05.94-4.11,1.86-6.17,2.76-1.01.44-2.05.84-3.05,1.31,0,0,4.46-1.83,1.96-.84-4.15,1.64-8.28,3.32-12.47,4.87-15.09,5.57-30.54,10.13-46.23,13.69-12.26,2.78-20.63,17.58-16.76,29.52,4.15,12.84,16.39,19.74,29.52,16.76,73.25-16.62,141.47-55.21,193.5-109.39,11.89-12.38,22.74-25.65,33.01-39.39,3.49-4.66,3.89-13.15,2.42-18.49-1.53-5.57-5.84-11.6-11.03-14.34-12.59-6.65-24.78-2.16-32.84,8.61h0Z"/>
|
|
8
|
+
<path d="M186.51,183.14c.82-1.1,1.65-2.19,2.47-3.28,1.88-2.49-3.94,5.03-.43.57,2.04-2.6,4.12-5.16,6.24-7.7,4.46-5.36,9.07-10.58,13.83-15.67,11.51-12.32,23.87-23.84,36.96-34.45,1.78-1.44,3.54-2.97,5.41-4.3-5.13,3.65,1.18-.85,2.19-1.6,4.17-3.09,8.4-6.08,12.69-8.99,8.48-5.74,17.2-11.12,26.13-16.12s17.41-9.29,26.38-13.4c2.05-.94,4.11-1.86,6.17-2.76,1.01-.44,2.05-.84,3.05-1.31,0,0-4.46,1.83-1.96.84,4.15-1.64,8.28-3.32,12.47-4.87,15.09-5.57,30.54-10.13,46.23-13.69,12.26-2.78,20.63-17.58,16.76-29.52-4.15-12.84-16.39-19.74-29.52-16.76-73.25,16.62-141.47,55.21-193.5,109.39-11.89,12.38-22.74,25.65-33.01,39.39-3.49,4.66-3.89,13.15-2.42,18.49s5.84,11.6,11.03,14.34c12.59,6.65,24.78,2.16,32.84-8.61h0Z"/>
|
|
9
|
+
<path d="M824.8,158.91c-45.77-61.19-107.16-107.71-178.85-134.55-15.54-5.82-31.48-10.55-47.66-14.22-12.22-2.77-26.55,3.73-29.52,16.76-2.78,12.2,3.67,26.55,16.76,29.52s26.8,6.85,39.86,11.4c3.83,1.34,7.64,2.74,11.43,4.2,1.98.76,3.94,1.54,5.91,2.34.74.3,1.49.68,2.24.92-6.09-1.94-.98-.42.33.16,8.56,3.73,16.98,7.78,25.23,12.16,9.28,4.92,18.35,10.25,27.17,15.95,3.92,2.54,7.8,5.15,11.63,7.84,1.98,1.39,3.95,2.81,5.91,4.24.96.71,1.92,1.42,2.88,2.13.58.43,4.64,3.51,1.79,1.34-2.63-2.01.37.3,1.01.81.9.71,1.8,1.43,2.69,2.15,1.76,1.42,3.51,2.86,5.24,4.31,3.56,2.98,7.06,6.03,10.51,9.15,6.02,5.44,11.85,11.08,17.49,16.91s11.03,11.78,16.24,17.94c2.43,2.88,4.82,5.79,7.17,8.74,1.18,1.48,5.04,6.66-.03-.09,1.03,1.38,2.09,2.74,3.12,4.12,3.89,5.19,7.84,9.24,14.34,11.03,5.74,1.58,13.39.87,18.49-2.42,9.91-6.39,16.65-22.08,8.61-32.84h0Z"/>
|
|
10
|
+
<path d="M119.96,652.4c-2.36,0-4.71-.12-7.05-.35-2.35-.23-4.67-.58-6.98-1.04-2.32-.46-4.59-1.03-6.85-1.72-2.25-.69-4.47-1.48-6.65-2.38-2.17-.91-4.31-1.92-6.38-3.03-2.08-1.11-4.1-2.33-6.06-3.63-1.96-1.31-3.85-2.72-5.67-4.22s-3.57-3.08-5.23-4.75c-1.67-1.66-3.25-3.41-4.75-5.23-1.49-1.83-2.89-3.72-4.21-5.68-1.31-1.96-2.52-3.99-3.63-6.06-1.11-2.08-2.12-4.21-3.02-6.39-.9-2.18-1.7-4.4-2.38-6.66-.69-2.26-1.26-4.55-1.72-6.86-.46-2.32-.81-4.65-1.04-7-.24-2.35-.35-4.7-.35-7.06v-72.08c0-29.32-14.22-48.05-24-48.05-.79,0-1.57-.04-2.35-.12-.78-.07-1.56-.19-2.33-.35-.77-.15-1.53-.34-2.28-.57-.76-.23-1.49-.49-2.22-.79-.72-.3-1.43-.64-2.13-1.01s-1.37-.78-2.02-1.21c-.65-.44-1.28-.9-1.89-1.4s-1.19-1.03-1.74-1.59-1.08-1.14-1.58-1.75-.97-1.24-1.4-1.89c-.44-.66-.84-1.33-1.21-2.03-.37-.69-.7-1.4-1.01-2.13-.3-.72-.56-1.46-.79-2.22-.23-.76-.41-1.52-.57-2.29-.15-.77-.27-1.55-.34-2.33-.08-.78-.12-1.57-.12-2.36s.04-1.57.12-2.35c.07-.78.19-1.56.34-2.33.16-.77.35-1.54.57-2.29.23-.75.49-1.49.79-2.22.3-.72.64-1.44,1.01-2.13.37-.69.77-1.37,1.21-2.02.44-.66.9-1.29,1.4-1.9s1.02-1.19,1.58-1.74,1.13-1.09,1.74-1.59,1.24-.97,1.89-1.4c.66-.44,1.33-.85,2.02-1.21.69-.37,1.4-.71,2.13-1.01.73-.3,1.46-.57,2.22-.8.75-.23,1.51-.42,2.28-.57.77-.15,1.54-.27,2.33-.35.78-.07,1.56-.12,2.35-.12,9.78,0,24-18.73,24-48.05v-72.08c0-2.36.12-4.72.35-7.06.23-2.35.58-4.68,1.04-6.99s1.03-4.6,1.72-6.86c.68-2.26,1.48-4.48,2.38-6.66s1.91-4.31,3.02-6.39c1.11-2.08,2.33-4.11,3.63-6.06,1.31-1.96,2.71-3.86,4.21-5.68,1.5-1.82,3.08-3.57,4.75-5.24,1.66-1.67,3.41-3.25,5.23-4.75,1.82-1.5,3.71-2.9,5.67-4.22s3.98-2.53,6.06-3.64c2.07-1.11,4.21-2.12,6.38-3.02,2.18-.9,4.39-1.7,6.65-2.38,2.26-.69,4.54-1.27,6.85-1.73,2.31-.46,4.64-.81,6.98-1.04,2.34-.24,4.69-.35,7.05-.36.79,0,1.57.04,2.35.12.78.08,1.56.19,2.33.35.77.15,1.53.35,2.28.57.75.23,1.49.49,2.22.8.72.3,1.43.64,2.13,1.01.69.37,1.37.77,2.02,1.21.65.44,1.28.9,1.89,1.4s1.19,1.03,1.74,1.59,1.08,1.13,1.58,1.74.97,1.24,1.41,1.9c.44.66.83,1.33,1.21,2.02s.71,1.41,1.01,2.13c.3.73.56,1.47.79,2.22.23.75.42,1.52.57,2.29s.27,1.55.35,2.33c.07.78.12,1.56.12,2.35s-.04,1.58-.12,2.36c-.08.78-.19,1.56-.35,2.33s-.35,1.53-.57,2.29c-.23.75-.49,1.49-.79,2.22-.3.73-.64,1.44-1.01,2.13-.37.7-.77,1.37-1.21,2.03-.44.65-.91,1.28-1.41,1.89s-1.02,1.19-1.58,1.75-1.13,1.09-1.74,1.59-1.24.97-1.89,1.4c-.66.44-1.33.84-2.02,1.21s-1.4.71-2.13,1.01-1.46.57-2.22.79c-.76.23-1.52.42-2.28.57-.77.16-1.55.27-2.33.35-.78.08-1.56.12-2.35.12s-1.57.04-2.35.12c-.78.08-1.56.19-2.33.35-.77.15-1.53.35-2.28.57-.76.23-1.49.49-2.22.8-.72.3-1.43.64-2.13,1.01-.69.37-1.37.77-2.02,1.21-.65.44-1.28.9-1.89,1.4-.6.5-1.19,1.03-1.74,1.59s-1.08,1.13-1.58,1.74-.97,1.24-1.4,1.9-.84,1.33-1.21,2.02c-.37.69-.7,1.41-1.01,2.13-.3.73-.56,1.47-.79,2.22-.23.75-.41,1.52-.57,2.29-.15.77-.27,1.55-.34,2.33-.08.78-.12,1.56-.12,2.35v72.08c.16,6.47-.23,12.91-1.18,19.31-.95,6.4-2.44,12.67-4.47,18.82-2.04,6.14-4.58,12.07-7.64,17.77-3.06,5.7-6.59,11.09-10.59,16.18,4,5.09,7.52,10.49,10.59,16.19,3.06,5.7,5.61,11.62,7.64,17.76,2.03,6.14,3.53,12.42,4.47,18.82.95,6.4,1.34,12.84,1.18,19.31v72.08c0,.79.04,1.58.12,2.36.07.78.19,1.56.34,2.33.16.77.35,1.53.57,2.29.23.75.49,1.49.79,2.22.3.73.64,1.44,1.01,2.13.37.7.78,1.37,1.21,2.03.44.65.9,1.28,1.4,1.89s1.02,1.19,1.58,1.75,1.14,1.09,1.74,1.59c.61.5,1.24.97,1.89,1.4.66.44,1.33.84,2.02,1.21s1.4.71,2.13,1.01c.73.3,1.46.57,2.22.79.75.23,1.51.42,2.28.57.77.16,1.54.27,2.33.35.78.08,1.56.12,2.35.12s1.57.04,2.35.12c.78.08,1.56.19,2.33.35.77.15,1.53.35,2.28.57.75.23,1.49.49,2.22.8.72.3,1.43.64,2.13,1.01.69.37,1.37.77,2.02,1.21.65.44,1.28.9,1.89,1.4s1.19,1.03,1.74,1.59,1.08,1.13,1.58,1.74.97,1.24,1.41,1.9c.44.66.83,1.33,1.21,2.02s.71,1.41,1.01,2.13c.3.73.56,1.47.79,2.22.23.75.42,1.52.57,2.29s.27,1.55.35,2.33c.07.78.12,1.56.12,2.35s-.04,1.58-.12,2.36c-.08.78-.19,1.56-.35,2.33s-.35,1.53-.57,2.29c-.23.75-.49,1.49-.79,2.22-.3.73-.64,1.44-1.01,2.13-.37.7-.77,1.37-1.21,2.03-.44.65-.91,1.28-1.41,1.89s-1.02,1.19-1.58,1.75-1.13,1.09-1.74,1.59-1.24.97-1.89,1.4c-.66.44-1.33.84-2.02,1.21s-1.4.71-2.13,1.01-1.46.57-2.22.79c-.76.23-1.52.42-2.28.57-.77.16-1.55.27-2.33.35-.78.08-1.56.12-2.35.12Z"/>
|
|
11
|
+
<path d="M849.9,652.4c2.36,0,4.71-.12,7.05-.35,2.35-.23,4.67-.58,6.98-1.04,2.32-.46,4.59-1.03,6.85-1.72,2.25-.69,4.47-1.48,6.65-2.38,2.17-.91,4.31-1.92,6.38-3.03,2.08-1.11,4.1-2.33,6.06-3.63,1.96-1.31,3.85-2.72,5.67-4.22s3.57-3.08,5.23-4.75c1.67-1.66,3.25-3.41,4.75-5.23,1.49-1.83,2.89-3.72,4.21-5.68,1.31-1.96,2.52-3.99,3.63-6.06,1.11-2.08,2.12-4.21,3.02-6.39.9-2.18,1.7-4.4,2.38-6.66.69-2.26,1.26-4.55,1.72-6.86.46-2.32.81-4.65,1.04-7,.24-2.35.35-4.7.35-7.06v-72.08c0-29.32,14.22-48.05,24-48.05.79,0,1.57-.04,2.35-.12.78-.07,1.56-.19,2.33-.35.77-.15,1.53-.34,2.28-.57.76-.23,1.49-.49,2.22-.79.72-.3,1.43-.64,2.13-1.01s1.37-.78,2.02-1.21c.65-.44,1.28-.9,1.89-1.4s1.19-1.03,1.74-1.59,1.08-1.14,1.58-1.75.97-1.24,1.4-1.89c.44-.66.84-1.33,1.21-2.03.37-.69.7-1.4,1.01-2.13.3-.72.56-1.46.79-2.22.23-.76.41-1.52.57-2.29.15-.77.27-1.55.34-2.33.08-.78.12-1.57.12-2.36s-.04-1.57-.12-2.35c-.07-.78-.19-1.56-.34-2.33-.16-.77-.35-1.54-.57-2.29-.23-.75-.49-1.49-.79-2.22-.3-.72-.64-1.44-1.01-2.13-.37-.69-.77-1.37-1.21-2.02-.44-.66-.9-1.29-1.4-1.9s-1.02-1.19-1.58-1.74-1.13-1.09-1.74-1.59-1.24-.97-1.89-1.4c-.66-.44-1.33-.85-2.02-1.21-.69-.37-1.4-.71-2.13-1.01-.73-.3-1.46-.57-2.22-.8-.75-.23-1.51-.42-2.28-.57-.77-.15-1.54-.27-2.33-.35-.78-.07-1.56-.12-2.35-.12-9.78,0-24-18.73-24-48.05v-72.08c0-2.36-.12-4.72-.35-7.06-.23-2.35-.58-4.68-1.04-6.99s-1.03-4.6-1.72-6.86c-.68-2.26-1.48-4.48-2.38-6.66s-1.91-4.31-3.02-6.39c-1.11-2.08-2.33-4.11-3.63-6.06-1.31-1.96-2.71-3.86-4.21-5.68-1.5-1.82-3.08-3.57-4.75-5.24-1.66-1.67-3.41-3.25-5.23-4.75-1.82-1.5-3.71-2.9-5.67-4.22s-3.98-2.53-6.06-3.64c-2.07-1.11-4.21-2.12-6.38-3.02-2.18-.9-4.39-1.7-6.65-2.38-2.26-.69-4.54-1.27-6.85-1.73-2.31-.46-4.64-.81-6.98-1.04-2.34-.24-4.69-.35-7.05-.36-.79,0-1.57.04-2.35.12-.78.08-1.56.19-2.33.35-.77.15-1.53.35-2.28.57-.75.23-1.49.49-2.22.8-.72.3-1.43.64-2.13,1.01-.69.37-1.37.77-2.02,1.21-.65.44-1.28.9-1.89,1.4s-1.19,1.03-1.74,1.59-1.08,1.13-1.58,1.74-.97,1.24-1.41,1.9c-.44.66-.83,1.33-1.21,2.02s-.71,1.41-1.01,2.13c-.3.73-.56,1.47-.79,2.22-.23.75-.42,1.52-.57,2.29s-.27,1.55-.35,2.33c-.07.78-.12,1.56-.12,2.35s.04,1.58.12,2.36c.08.78.19,1.56.35,2.33s.35,1.53.57,2.29c.23.75.49,1.49.79,2.22.3.73.64,1.44,1.01,2.13.37.7.77,1.37,1.21,2.03.44.65.91,1.28,1.41,1.89s1.02,1.19,1.58,1.75,1.13,1.09,1.74,1.59,1.24.97,1.89,1.4c.66.44,1.33.84,2.02,1.21s1.4.71,2.13,1.01,1.46.57,2.22.79c.76.23,1.52.42,2.28.57.77.16,1.55.27,2.33.35.78.08,1.56.12,2.35.12s1.57.04,2.35.12c.78.08,1.56.19,2.33.35.77.15,1.53.35,2.28.57.76.23,1.49.49,2.22.8.72.3,1.43.64,2.13,1.01.69.37,1.37.77,2.02,1.21.65.44,1.28.9,1.89,1.4.6.5,1.19,1.03,1.74,1.59s1.08,1.13,1.58,1.74.97,1.24,1.4,1.9.84,1.33,1.21,2.02c.37.69.7,1.41,1.01,2.13.3.73.56,1.47.79,2.22.23.75.41,1.52.57,2.29.15.77.27,1.55.34,2.33.08.78.12,1.56.12,2.35v72.08c-.16,6.47.23,12.91,1.18,19.31.95,6.4,2.44,12.67,4.47,18.82,2.04,6.14,4.58,12.07,7.64,17.77,3.06,5.7,6.59,11.09,10.59,16.18-4,5.09-7.52,10.49-10.59,16.19-3.06,5.7-5.61,11.62-7.64,17.76-2.03,6.14-3.53,12.42-4.47,18.82-.95,6.4-1.34,12.84-1.18,19.31v72.08c0,.79-.04,1.58-.12,2.36-.07.78-.19,1.56-.34,2.33-.16.77-.35,1.53-.57,2.29-.23.75-.49,1.49-.79,2.22-.3.73-.64,1.44-1.01,2.13-.37.7-.78,1.37-1.21,2.03-.44.65-.9,1.28-1.4,1.89s-1.02,1.19-1.58,1.75-1.14,1.09-1.74,1.59c-.61.5-1.24.97-1.89,1.4-.66.44-1.33.84-2.02,1.21s-1.4.71-2.13,1.01c-.73.3-1.46.57-2.22.79-.75.23-1.51.42-2.28.57-.77.16-1.54.27-2.33.35-.78.08-1.56.12-2.35.12s-1.57.04-2.35.12c-.78.08-1.56.19-2.33.35-.77.15-1.53.35-2.28.57-.75.23-1.49.49-2.22.8-.72.3-1.43.64-2.13,1.01-.69.37-1.37.77-2.02,1.21-.65.44-1.28.9-1.89,1.4s-1.19,1.03-1.74,1.59-1.08,1.13-1.58,1.74-.97,1.24-1.41,1.9c-.44.66-.83,1.33-1.21,2.02s-.71,1.41-1.01,2.13c-.3.73-.56,1.47-.79,2.22-.23.75-.42,1.52-.57,2.29s-.27,1.55-.35,2.33c-.07.78-.12,1.56-.12,2.35s.04,1.58.12,2.36c.08.78.19,1.56.35,2.33s.35,1.53.57,2.29c.23.75.49,1.49.79,2.22.3.73.64,1.44,1.01,2.13.37.7.77,1.37,1.21,2.03.44.65.91,1.28,1.41,1.89s1.02,1.19,1.58,1.75,1.13,1.09,1.74,1.59,1.24.97,1.89,1.4c.66.44,1.33.84,2.02,1.21s1.4.71,2.13,1.01,1.46.57,2.22.79c.76.23,1.52.42,2.28.57.77.16,1.55.27,2.33.35.78.08,1.56.12,2.35.12Z"/>
|
|
12
|
+
<path class="cls-1" d="M311.21,361.49c29.2,29.48,58.4,58.96,87.59,88.44v-28.28c-29.2,27.59-58.4,55.18-87.59,82.76-7.62,7.2-7.81,21.12,0,28.28s20.15,7.68,28.28,0c29.2-27.59,58.4-55.18,87.59-82.76,7.88-7.45,7.44-20.77,0-28.28-29.2-29.48-58.4-58.96-87.59-88.44-7.37-7.44-21-7.93-28.28,0s-7.87,20.34,0,28.28h0Z"/>
|
|
13
|
+
<path class="cls-1" d="M481.96,538.55h131.39c10.46,0,20.48-9.2,20-20s-8.79-20-20-20h-131.39c-10.46,0-20.48,9.2-20,20s8.79,20,20,20h0Z"/>
|
|
14
|
+
</svg>
|
package/gui/dist/index.html
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
<html lang="en">
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
|
+
<!-- the vector mark recolours itself for dark browser chrome; the PNG is the generated fallback -->
|
|
6
|
+
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
|
5
7
|
<link rel="icon" type="image/png" href="/favicon.png" />
|
|
6
8
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
9
|
<meta name="color-scheme" content="light dark" />
|
|
@@ -34,10 +36,21 @@
|
|
|
34
36
|
}
|
|
35
37
|
}
|
|
36
38
|
document.documentElement.lang = langMap[locale];
|
|
39
|
+
// Someone who switched to the classic dashboard keeps landing there (src/lib/dashboard-edition.ts).
|
|
40
|
+
// The tray popover is not a dashboard page and stays on this build.
|
|
41
|
+
var edition = null;
|
|
42
|
+
try {
|
|
43
|
+
edition = localStorage.getItem("ocx-ui");
|
|
44
|
+
} catch (e) {
|
|
45
|
+
edition = null; // storage blocked: stay on this dashboard
|
|
46
|
+
}
|
|
47
|
+
if (edition === "classic" && location.hash.indexOf("#/tray") !== 0) {
|
|
48
|
+
location.replace("/classic/" + location.search + location.hash);
|
|
49
|
+
}
|
|
37
50
|
})();
|
|
38
51
|
</script>
|
|
39
|
-
<script type="module" crossorigin src="/assets/index-
|
|
40
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
52
|
+
<script type="module" crossorigin src="/assets/index-BWKBeK77.js"></script>
|
|
53
|
+
<link rel="stylesheet" crossorigin href="/assets/index-5REODpG3.css">
|
|
41
54
|
</head>
|
|
42
55
|
<body>
|
|
43
56
|
<div id="root"></div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bitkyc08/opencodex",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.98.0-preview.20261107",
|
|
4
4
|
"description": "Universal provider proxy for OpenAI Codex & Claude Code — use any LLM with Codex CLI/App/SDK and Claude Code",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./bin/package-main.mjs",
|
|
@@ -122,6 +122,8 @@ function applyCacheControlToLastText(blocks: Array<Record<string, unknown>>, cc:
|
|
|
122
122
|
type PromptCachingOptions = {
|
|
123
123
|
maxExplicitBreakpoints?: number;
|
|
124
124
|
skipLastUser?: boolean;
|
|
125
|
+
/** The last system block is the caller's uncached per-turn tail; mark the block before it. */
|
|
126
|
+
uncachedSystemTail?: boolean;
|
|
125
127
|
};
|
|
126
128
|
|
|
127
129
|
/** Place explicit cache_control breakpoints on the built Anthropic body. */
|
|
@@ -158,7 +160,8 @@ function applyPromptCaching(
|
|
|
158
160
|
// 2. system
|
|
159
161
|
const system = body.system as Array<Record<string, unknown>> | undefined;
|
|
160
162
|
if (system && system.length > 0) {
|
|
161
|
-
|
|
163
|
+
const i = system.length - (options.uncachedSystemTail && system.length > 1 ? 2 : 1);
|
|
164
|
+
system[i] = { ...system[i], cache_control: cc };
|
|
162
165
|
used++;
|
|
163
166
|
}
|
|
164
167
|
if (used >= explicitLimit || !messages) return;
|
|
@@ -759,7 +762,7 @@ function messagesToAnthropicFormat(
|
|
|
759
762
|
parsed: OcxParsedRequest,
|
|
760
763
|
toolNames: { toWire: (name: string) => string },
|
|
761
764
|
serverReplay?: ReadonlyMap<string, readonly Record<string, unknown>[]>,
|
|
762
|
-
): { system: string
|
|
765
|
+
): { system: string[]; messages: unknown[] } {
|
|
763
766
|
// The client's server-tool exchanges go back ahead of the block they preceded. Their anchors are
|
|
764
767
|
// unique in the caller's history (replayedAnthropicServerBlocks drops repeated ones); each is used once.
|
|
765
768
|
const pendingReplay = new Map(serverReplay);
|
|
@@ -787,9 +790,14 @@ function messagesToAnthropicFormat(
|
|
|
787
790
|
tool => toolNames.toWire(namespacedToolName(tool.namespace, tool.name)),
|
|
788
791
|
);
|
|
789
792
|
const systemParts = [...(parsed.context.systemPrompt ?? []), ...(toolCatalogNudge ? [toolCatalogNudge] : [])];
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
: undefined;
|
|
793
|
+
// End a block at the caller's cached prefix so its breakpoint skips the per-turn tail.
|
|
794
|
+
const prefix = parsed._anthropicSystemCachePrefix
|
|
795
|
+
? identifyRoutedModel(parsed._anthropicSystemCachePrefix, parsed.modelId) : undefined;
|
|
796
|
+
const head = prefix && systemParts[0] ? identifyRoutedModel(systemParts[0], parsed.modelId) : systemParts[0];
|
|
797
|
+
const texts = prefix && head?.startsWith(`${prefix}\n\n`)
|
|
798
|
+
? [prefix, [head.slice(prefix.length + 2), ...systemParts.slice(1)].join("\n\n")]
|
|
799
|
+
: [systemParts.join("\n\n")];
|
|
800
|
+
const system = texts.map(text => identifyRoutedModel(text, parsed.modelId)).filter(Boolean);
|
|
793
801
|
const messages: unknown[] = [];
|
|
794
802
|
|
|
795
803
|
for (let i = 0; i < parsed.context.messages.length; i++) {
|
|
@@ -1078,10 +1086,10 @@ export function createAnthropicAdapter(provider: OcxProviderConfig, cacheRetenti
|
|
|
1078
1086
|
// Claude OAuth (Pro/Max) requires the first system block to be the Claude Code identity.
|
|
1079
1087
|
body.system = [
|
|
1080
1088
|
{ type: "text", text: CLAUDE_CODE_SYSTEM_INSTRUCTION },
|
|
1081
|
-
...(
|
|
1089
|
+
...system.map(text => ({ type: "text", text })),
|
|
1082
1090
|
];
|
|
1083
|
-
} else if (system) {
|
|
1084
|
-
body.system =
|
|
1091
|
+
} else if (system.length > 0) {
|
|
1092
|
+
body.system = system.map(text => ({ type: "text", text }));
|
|
1085
1093
|
}
|
|
1086
1094
|
if (tools) body.tools = tools;
|
|
1087
1095
|
if (parsed.options.temperature !== undefined) body.temperature = parsed.options.temperature;
|
|
@@ -1277,6 +1285,7 @@ export function createAnthropicAdapter(provider: OcxProviderConfig, cacheRetenti
|
|
|
1277
1285
|
applyPromptCaching(body, cc, {
|
|
1278
1286
|
maxExplicitBreakpoints: explicitLimit,
|
|
1279
1287
|
skipLastUser: !!automaticPromptCaching,
|
|
1288
|
+
uncachedSystemTail: system.length > 1,
|
|
1280
1289
|
});
|
|
1281
1290
|
enforceCacheControlLimit(body, explicitLimit);
|
|
1282
1291
|
normalizeTtlOrdering(body);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { clientFacingModelLabel, clientFacingModelText, type ClientFacingModelLabel } from "../lib/error-destination";
|
|
1
2
|
import { createHash, randomUUID } from "node:crypto";
|
|
2
3
|
import { execFile as execFileCallback } from "node:child_process";
|
|
3
4
|
import { promisify } from "node:util";
|
|
@@ -424,27 +425,29 @@ async function*ndjson(response: Response, budget: TranslatorBudget): AsyncGenera
|
|
|
424
425
|
const encoder = new TextEncoder();
|
|
425
426
|
let buffer = "";
|
|
426
427
|
let bufferBytes = 0;
|
|
428
|
+
// One live buffer owns one charge; resizing must not reserve old + replacement together.
|
|
429
|
+
const resizeBuffer = (nextBytes: number) => {
|
|
430
|
+
if (nextBytes > bufferBytes) {
|
|
431
|
+
budget.reserveTransient(nextBytes - bufferBytes, { kind: "live_transient" }).commitRetained();
|
|
432
|
+
} else {
|
|
433
|
+
budget.releaseRetained(bufferBytes - nextBytes, { kind: "live_transient" });
|
|
434
|
+
}
|
|
435
|
+
bufferBytes = nextBytes;
|
|
436
|
+
};
|
|
427
437
|
try {
|
|
428
438
|
for (;;) {
|
|
429
439
|
const { value, done } = await reader.read();
|
|
430
440
|
const next = buffer + decoder.decode(value, { stream: !done });
|
|
431
441
|
const nextBytes = encoder.encode(next).byteLength;
|
|
432
|
-
|
|
442
|
+
resizeBuffer(nextBytes);
|
|
433
443
|
buffer = next;
|
|
434
|
-
reservation.commitRetained();
|
|
435
|
-
budget.releaseRetained(bufferBytes, { kind: "live_transient" });
|
|
436
|
-
bufferBytes = nextBytes;
|
|
437
444
|
let newline = buffer.indexOf("\n");
|
|
438
445
|
while (newline >= 0) {
|
|
439
446
|
const line = buffer.slice(0, newline).trim(); buffer = buffer.slice(newline + 1);
|
|
440
447
|
if (line) yield* decodeEventLine(line);
|
|
441
448
|
newline = buffer.indexOf("\n");
|
|
442
449
|
}
|
|
443
|
-
|
|
444
|
-
const residualReservation = budget.reserveTransient(residualBytes, { kind: "live_transient" });
|
|
445
|
-
residualReservation.commitRetained();
|
|
446
|
-
budget.releaseRetained(bufferBytes, { kind: "live_transient" });
|
|
447
|
-
bufferBytes = residualBytes;
|
|
450
|
+
resizeBuffer(encoder.encode(buffer).byteLength);
|
|
448
451
|
if (done) break;
|
|
449
452
|
}
|
|
450
453
|
const final = buffer.trim();
|
|
@@ -542,17 +545,13 @@ function requestWithoutReasoningEffort(request: AdapterRequest): AdapterRequest
|
|
|
542
545
|
|
|
543
546
|
/** The upstream's plan refusal prefix; `MODEL_NOT_IN_PLAN_OTHER` and later mentions do not count. */
|
|
544
547
|
const COMMAND_CODE_PLAN_REFUSAL = /^MODEL_NOT_IN_PLAN(?::|$)/;
|
|
545
|
-
/** A model id the message may quote; anything else is described without repeating it. */
|
|
546
|
-
const DISPLAYABLE_MODEL_ID = /^[A-Za-z0-9][A-Za-z0-9._:/-]{0,127}$/;
|
|
547
|
-
|
|
548
548
|
/**
|
|
549
549
|
* Fixed client copy for a plan refusal. The upstream detail is never quoted: it is free text this
|
|
550
550
|
* proxy does not control, and quota or reasoning-effort words in it would steer the downstream
|
|
551
551
|
* classifiers (quota recording, effort repair) on a refusal that no resend can change.
|
|
552
552
|
*/
|
|
553
|
-
function commandCodePlanRefusalMessage(
|
|
554
|
-
|
|
555
|
-
return `Command Code refused ${model}: this account's plan does not include it (MODEL_NOT_IN_PLAN). `
|
|
553
|
+
function commandCodePlanRefusalMessage(model: ClientFacingModelLabel): string {
|
|
554
|
+
return `Command Code refused ${clientFacingModelText(model)}: this account's plan does not include it (MODEL_NOT_IN_PLAN). `
|
|
556
555
|
+ "Choose a model the plan includes or change the Command Code plan; retrying this request will not succeed.";
|
|
557
556
|
}
|
|
558
557
|
|
|
@@ -584,7 +583,7 @@ async function normalizeCommandCodePlanRefusal(
|
|
|
584
583
|
headers.set("x-opencodex-upstream-status", "403");
|
|
585
584
|
headers.set("x-opencodex-refusal", MODEL_NOT_IN_PLAN_REFUSAL_MARKER);
|
|
586
585
|
const refusal = new Response(JSON.stringify({ error: {
|
|
587
|
-
type: "invalid_request_error", code: MODEL_NOT_IN_PLAN_CODE, message: commandCodePlanRefusalMessage(
|
|
586
|
+
type: "invalid_request_error", code: MODEL_NOT_IN_PLAN_CODE, message: commandCodePlanRefusalMessage(clientFacingModelLabel(undefined)),
|
|
588
587
|
} }), { status: 400, statusText: "Bad Request", headers });
|
|
589
588
|
// Identity is the provenance dispatch, combo and policy fallback check; the header is diagnostic.
|
|
590
589
|
markVerifiedModelNotInPlanResponse(refusal);
|
|
@@ -2,7 +2,7 @@ import type { CursorRunRequest, CursorServerMessage } from "./types";
|
|
|
2
2
|
import type { CursorTransport, CursorTransportFactory, CursorTransportFactoryInput } from "./transport";
|
|
3
3
|
import type { RequestExecutionBudget } from "../../lib/request-execution-budget";
|
|
4
4
|
import type { AttemptRecoveryKind } from "../../usage/log";
|
|
5
|
-
import { SendBudgetExhaustedError, abortError, retryBackoffDelayMs, sleepWithAbort } from "../../lib/upstream-retry";
|
|
5
|
+
import { SendBudgetExhaustedError, providerErrorDestinationLabel, abortError, retryBackoffDelayMs, sleepWithAbort } from "../../lib/upstream-retry";
|
|
6
6
|
import { debugProviderDiagnostic } from "../../lib/debug";
|
|
7
7
|
import { isCursorRootEnvelopeError, safeCursorErrorMessage } from "./cursor-errors";
|
|
8
8
|
|
|
@@ -113,7 +113,7 @@ export async function runCursorTurnWithRetry(
|
|
|
113
113
|
targetKey: CURSOR_BUDGET_TARGET_KEY,
|
|
114
114
|
});
|
|
115
115
|
if (decision && (!decision.allowed || !decision.permit.use())) {
|
|
116
|
-
throw new SendBudgetExhaustedError(CURSOR_BUDGET_TARGET_KEY);
|
|
116
|
+
throw new SendBudgetExhaustedError(providerErrorDestinationLabel(CURSOR_BUDGET_TARGET_KEY));
|
|
117
117
|
}
|
|
118
118
|
execution.onPhysicalSend?.({
|
|
119
119
|
ordinal: attempt + 1,
|
|
@@ -1392,8 +1392,8 @@ export async function* streamChatEvents(req: CloudChatRequest): AsyncGenerator<C
|
|
|
1392
1392
|
// chunk])` per chunk — O(n²) over a long stream because every chunk copies
|
|
1393
1393
|
// every buffered byte again. Now we keep a queue of arriving chunks with a
|
|
1394
1394
|
// running offset; we only `Buffer.concat` when a frame straddles a chunk
|
|
1395
|
-
// boundary
|
|
1396
|
-
//
|
|
1395
|
+
// boundary. A drain clears the queue or removes its consumed prefix once,
|
|
1396
|
+
// instead of shifting the array separately for every consumed chunk.
|
|
1397
1397
|
const chunkQueue: Buffer[] = [];
|
|
1398
1398
|
let queuedBytes = 0;
|
|
1399
1399
|
// Bun + Node ReadableStream readers diverge on the type-level shape
|
|
@@ -1430,17 +1430,26 @@ export async function* streamChatEvents(req: CloudChatRequest): AsyncGenerator<C
|
|
|
1430
1430
|
/** Drop the first `n` bytes from the chunk queue. */
|
|
1431
1431
|
function drop(n: number): void {
|
|
1432
1432
|
queuedBytes -= n;
|
|
1433
|
+
if (queuedBytes === 0) {
|
|
1434
|
+
chunkQueue.length = 0;
|
|
1435
|
+
return;
|
|
1436
|
+
}
|
|
1433
1437
|
let remaining = n;
|
|
1434
|
-
|
|
1435
|
-
|
|
1438
|
+
let consumed = 0;
|
|
1439
|
+
while (remaining > 0 && consumed < chunkQueue.length) {
|
|
1440
|
+
const head = chunkQueue[consumed];
|
|
1436
1441
|
if (head.length <= remaining) {
|
|
1437
|
-
|
|
1442
|
+
consumed++;
|
|
1438
1443
|
remaining -= head.length;
|
|
1439
1444
|
} else {
|
|
1440
|
-
chunkQueue[
|
|
1445
|
+
chunkQueue[consumed] = head.slice(remaining);
|
|
1441
1446
|
remaining = 0;
|
|
1442
1447
|
}
|
|
1443
1448
|
}
|
|
1449
|
+
if (consumed > 0) {
|
|
1450
|
+
chunkQueue.copyWithin(0, consumed);
|
|
1451
|
+
chunkQueue.length -= consumed;
|
|
1452
|
+
}
|
|
1444
1453
|
}
|
|
1445
1454
|
|
|
1446
1455
|
// Track the idle timer at outer scope so the finally block can clear it
|
package/src/adapters/google.ts
CHANGED
|
@@ -1130,21 +1130,21 @@ export function createGoogleAdapter(provider: OcxProviderConfig): ProviderAdapte
|
|
|
1130
1130
|
if (!project) throw new Error("Antigravity requires a discovered Cloud Code Assist project id (re-run `ocx login google-antigravity`).");
|
|
1131
1131
|
const sessionId = antigravitySessionId(parsed);
|
|
1132
1132
|
const mappedEffort = mapReasoningEffort(provider, parsed.modelId, parsed.options.reasoning);
|
|
1133
|
+
// CCA Gemini exposes provider-authored summaries only when explicitly requested.
|
|
1134
|
+
const includeThoughts = provider.showThinkingSummary === true
|
|
1135
|
+
&& parsed.options.hideThinkingSummary !== true
|
|
1136
|
+
&& /^gemini-/.test(routedModelId)
|
|
1137
|
+
&& !isImageCapableModel(parsed.modelId);
|
|
1133
1138
|
const { wireModelId, thinkingLevel } = resolveAntigravityEffortWireModel(
|
|
1134
1139
|
parsed.modelId,
|
|
1135
1140
|
mappedEffort,
|
|
1136
1141
|
provider.baseUrl,
|
|
1142
|
+
{ includeThoughts },
|
|
1137
1143
|
);
|
|
1138
1144
|
antigravityModel = wireModelId;
|
|
1139
1145
|
antigravitySession = sessionId;
|
|
1140
|
-
// CCA Gemini exposes provider-authored thought summaries with includeThoughts.
|
|
1141
|
-
// Other CCA model families do not share this request contract.
|
|
1142
|
-
const includeThoughts = provider.showThinkingSummary === true
|
|
1143
|
-
&& parsed.options.hideThinkingSummary !== true
|
|
1144
|
-
&& /^gemini-/.test(wireModelId)
|
|
1145
|
-
&& !isImageCapableModel(parsed.modelId);
|
|
1146
1146
|
// Effort → thinkingConfig for CCA (CLIProxyAPI proven: request.generationConfig.thinkingConfig).
|
|
1147
|
-
//
|
|
1147
|
+
// Argon summaries repeat the suffix tier; other suffix IDs keep their existing shape.
|
|
1148
1148
|
if (thinkingLevel || includeThoughts) {
|
|
1149
1149
|
const gc = (body.generationConfig ?? {}) as Record<string, unknown>;
|
|
1150
1150
|
gc.thinkingConfig = {
|
|
@@ -22,6 +22,7 @@ import { fetchKiroWithRetry } from "../kiro-retry";
|
|
|
22
22
|
import { fingerprint, invocationId, osTag } from "../kiro-wire";
|
|
23
23
|
import { hasTrailingDeliveredFinalAnswer } from "./conversation";
|
|
24
24
|
import { buildKiroPayload } from "./payload";
|
|
25
|
+
import type { KiroStructuredOutputSpec } from "./structured-output";
|
|
25
26
|
import {
|
|
26
27
|
jsonStringSerializedUtf8Bytes,
|
|
27
28
|
parseKiroStream,
|
|
@@ -60,6 +61,7 @@ export function createKiroAdapter(provider: OcxProviderConfig): ProviderAdapter
|
|
|
60
61
|
let toolNameMap: Map<string, string> | undefined;
|
|
61
62
|
let conversationId: string | undefined;
|
|
62
63
|
let completionMode: KiroCompletionMode = "disabled";
|
|
64
|
+
let structuredOutput: KiroStructuredOutputSpec | undefined;
|
|
63
65
|
let requestSnapshot: OcxParsedRequest | undefined;
|
|
64
66
|
let firstRequestBodyBytes = 0;
|
|
65
67
|
let requestAbortSignal: AbortSignal | undefined;
|
|
@@ -88,6 +90,10 @@ export function createKiroAdapter(provider: OcxProviderConfig): ProviderAdapter
|
|
|
88
90
|
requestOnPhysicalSend?.({ ordinal, ...(recovery ? { recovery } : {}) });
|
|
89
91
|
};
|
|
90
92
|
|
|
93
|
+
/**
|
|
94
|
+
* Build the Kiro request for a parsed turn, optionally forcing the completion mode (the bounded
|
|
95
|
+
* retry passes `text_fallback`), and capture the state the stream parser needs.
|
|
96
|
+
*/
|
|
91
97
|
const build = async (
|
|
92
98
|
parsed: OcxParsedRequest,
|
|
93
99
|
forcedCompletionMode?: KiroCompletionMode,
|
|
@@ -96,6 +102,7 @@ export function createKiroAdapter(provider: OcxProviderConfig): ProviderAdapter
|
|
|
96
102
|
nameMap: Map<string, string>;
|
|
97
103
|
conversationId: string;
|
|
98
104
|
completionMode: KiroCompletionMode;
|
|
105
|
+
structuredOutput?: KiroStructuredOutputSpec;
|
|
99
106
|
inputTokens: number;
|
|
100
107
|
contextInputEstimate: number;
|
|
101
108
|
}> => {
|
|
@@ -154,6 +161,7 @@ export function createKiroAdapter(provider: OcxProviderConfig): ProviderAdapter
|
|
|
154
161
|
region,
|
|
155
162
|
requestedModel: parsed.modelId,
|
|
156
163
|
completionMode: built.completionMode,
|
|
164
|
+
structuredOutput: built.structuredOutput !== undefined,
|
|
157
165
|
bodyBytes: new TextEncoder().encode(body).length,
|
|
158
166
|
messageCount: kiroPayloadMessages(parsed).length,
|
|
159
167
|
toolCount: parsed.context.tools?.length ?? 0,
|
|
@@ -173,6 +181,7 @@ export function createKiroAdapter(provider: OcxProviderConfig): ProviderAdapter
|
|
|
173
181
|
nameMap: built.nameMap,
|
|
174
182
|
conversationId: built.conversationId,
|
|
175
183
|
completionMode: built.completionMode,
|
|
184
|
+
...(built.structuredOutput ? { structuredOutput: built.structuredOutput } : {}),
|
|
176
185
|
inputTokens: estimateKiroInputTokens(parsed),
|
|
177
186
|
contextInputEstimate,
|
|
178
187
|
};
|
|
@@ -297,6 +306,7 @@ export function createKiroAdapter(provider: OcxProviderConfig): ProviderAdapter
|
|
|
297
306
|
toolNameMap = built.nameMap;
|
|
298
307
|
conversationId = built.conversationId;
|
|
299
308
|
completionMode = built.completionMode;
|
|
309
|
+
structuredOutput = built.structuredOutput;
|
|
300
310
|
// Runtime callbacks belong to the original request, not the retry payload.
|
|
301
311
|
requestSnapshot = structuredClone(Object.fromEntries(
|
|
302
312
|
Object.entries(parsed).filter(([, value]) => typeof value !== "function"),
|
|
@@ -306,6 +316,7 @@ export function createKiroAdapter(provider: OcxProviderConfig): ProviderAdapter
|
|
|
306
316
|
return built.request;
|
|
307
317
|
},
|
|
308
318
|
|
|
319
|
+
/** Parse a streaming Kiro response, with the bounded retry wired to this request. */
|
|
309
320
|
parseStream(response: Response, budget: TranslatorBudget): AsyncGenerator<AdapterEvent> {
|
|
310
321
|
return parseKiroStream(
|
|
311
322
|
response,
|
|
@@ -318,6 +329,7 @@ export function createKiroAdapter(provider: OcxProviderConfig): ProviderAdapter
|
|
|
318
329
|
completionMode,
|
|
319
330
|
completionMode === "required" ? fallbackFactory : undefined,
|
|
320
331
|
contextInputEstimate,
|
|
332
|
+
structuredOutput,
|
|
321
333
|
);
|
|
322
334
|
},
|
|
323
335
|
|
|
@@ -345,9 +357,11 @@ export function createKiroAdapter(provider: OcxProviderConfig): ProviderAdapter
|
|
|
345
357
|
return safeKiroHttpErrorMessage(status, headers, payloadText);
|
|
346
358
|
},
|
|
347
359
|
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
360
|
+
/**
|
|
361
|
+
* Kiro always returns an event stream, including for non-streaming Responses requests. Drain
|
|
362
|
+
* the decoder into a budget-owned batch so an upstream stream cannot grow this array without
|
|
363
|
+
* bound while the caller waits for the complete JSON response.
|
|
364
|
+
*/
|
|
351
365
|
async parseResponse(response: Response, budget: TranslatorBudget): Promise<AdapterEvent[]> {
|
|
352
366
|
const events: AdapterEvent[] = [];
|
|
353
367
|
try {
|
|
@@ -362,6 +376,7 @@ export function createKiroAdapter(provider: OcxProviderConfig): ProviderAdapter
|
|
|
362
376
|
completionMode,
|
|
363
377
|
completionMode === "required" ? fallbackFactory : undefined,
|
|
364
378
|
contextInputEstimate,
|
|
379
|
+
structuredOutput,
|
|
365
380
|
)) {
|
|
366
381
|
retainTranslatedEvent(e, budget, events.at(-1));
|
|
367
382
|
events.push(e);
|
|
@@ -7,6 +7,7 @@ import type {
|
|
|
7
7
|
import type { KiroImage } from "../kiro-images";
|
|
8
8
|
import type { KiroHistoryEntry, KiroToolResult, KiroToolUse } from "./wire";
|
|
9
9
|
|
|
10
|
+
/** Refuse request controls the Kiro wire cannot honour (forced tool choice, service tiers) before a request is built. */
|
|
10
11
|
export function validateKiroCapabilities(parsed: OcxParsedRequest): void {
|
|
11
12
|
const choice = parsed.options.toolChoice;
|
|
12
13
|
if (choice !== undefined && choice !== "auto" && choice !== "none") {
|
|
@@ -15,12 +16,14 @@ export function validateKiroCapabilities(parsed: OcxParsedRequest): void {
|
|
|
15
16
|
if (parsed.options.serviceTier !== undefined) {
|
|
16
17
|
throw new Error("Kiro does not support service tiers");
|
|
17
18
|
}
|
|
18
|
-
// Structured output is a real contract
|
|
19
|
-
//
|
|
20
|
-
//
|
|
19
|
+
// Structured output is a real contract the wire has no response mode for, so it is not
|
|
20
|
+
// validated here: buildKiroPayload emulates it through the private structured-output tool
|
|
21
|
+
// (structured-output.ts), and the stream relays only JSON that tool or the bounded retry
|
|
22
|
+
// produced, or fails the turn. It used to be refused at this point, which kept the
|
|
23
|
+
// "no prose for a JSON caller" promise by failing every such turn instead.
|
|
21
24
|
//
|
|
22
|
-
// The rest of the Responses `text` object is not
|
|
23
|
-
// preference and `text.format: {type:"text"}` is ordinary prose — the default output
|
|
25
|
+
// The rest of the Responses `text` object is not a contract at all. `text.verbosity` is a
|
|
26
|
+
// length preference and `text.format: {type:"text"}` is ordinary prose — the default output
|
|
24
27
|
// mode, which no capability flag governs and every correct client may send. Testing
|
|
25
28
|
// `_rawBody.text !== undefined` refused those turns for the mere PRESENCE of the key,
|
|
26
29
|
// the same mistake db040e70f removed one condition earlier where a permissive
|
|
@@ -30,9 +33,6 @@ export function validateKiroCapabilities(parsed: OcxParsedRequest): void {
|
|
|
30
33
|
// buildKiroPayload composes conversationState field by field from `parsed` and never
|
|
31
34
|
// spreads `_rawBody`, so a tolerated control is dropped by construction. The test
|
|
32
35
|
// asserts that absence so it stays true.
|
|
33
|
-
if (parsed._structuredOutput) {
|
|
34
|
-
throw new Error("Kiro does not support Responses structured output");
|
|
35
|
-
}
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
export type KiroTurn =
|