cartethyia 2.5.4 → 2.5.7
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/.env.example +13 -4
- package/README.md +2 -2
- package/dist/dashboard/assets/{BannedPage-C2orBsI2.js → BannedPage-DE2607Tb.js} +1 -1
- package/dist/dashboard/assets/BannedPage-DE2607Tb.js.gz +0 -0
- package/dist/dashboard/assets/CliToolDetailPage-Duv6mfrl.js +1 -0
- package/dist/dashboard/assets/CliToolDetailPage-Duv6mfrl.js.gz +0 -0
- package/dist/dashboard/assets/{CliToolsPage-BV6pxVQo.js → CliToolsPage-C2PNYWzk.js} +1 -1
- package/dist/dashboard/assets/CliToolsPage-C2PNYWzk.js.gz +0 -0
- package/dist/dashboard/assets/CombosPage-TXP9OfAM.js +1 -0
- package/dist/dashboard/assets/CombosPage-TXP9OfAM.js.gz +0 -0
- package/dist/dashboard/assets/{ConsoleLogPage-CW-wPmJ6.js → ConsoleLogPage-B-9xnAQN.js} +1 -1
- package/dist/dashboard/assets/ConsoleLogPage-B-9xnAQN.js.gz +0 -0
- package/dist/dashboard/assets/{CustomizationPage-0p8uX7vB.js → CustomizationPage-xeax9nJt.js} +1 -1
- package/dist/dashboard/assets/CustomizationPage-xeax9nJt.js.gz +0 -0
- package/dist/dashboard/assets/{HealthEventsModal-BjqSMfko.js → HealthEventsModal-Df4jjaHJ.js} +1 -1
- package/dist/dashboard/assets/HealthEventsModal-Df4jjaHJ.js.gz +0 -0
- package/dist/dashboard/assets/{LoginPage-BvzCx8Kr.js → LoginPage-Dyojsm84.js} +1 -1
- package/dist/dashboard/assets/LoginPage-Dyojsm84.js.gz +0 -0
- package/dist/dashboard/assets/ModelPicker-C7pDb41R.js +1 -0
- package/dist/dashboard/assets/ModelPicker-C7pDb41R.js.gz +0 -0
- package/dist/dashboard/assets/OverviewPage-BJfg4ow6.js +1 -0
- package/dist/dashboard/assets/OverviewPage-BJfg4ow6.js.gz +0 -0
- package/dist/dashboard/assets/ProviderDetailPage-ChCX1gmT.js +3 -0
- package/dist/dashboard/assets/ProviderDetailPage-ChCX1gmT.js.gz +0 -0
- package/dist/dashboard/assets/{ProvidersPage-Js9jUPSb.js → ProvidersPage-DeWSOEUO.js} +1 -1
- package/dist/dashboard/assets/ProvidersPage-DeWSOEUO.js.gz +0 -0
- package/dist/dashboard/assets/ProxyPage-CkpWln2S.js +7 -0
- package/dist/dashboard/assets/ProxyPage-CkpWln2S.js.gz +0 -0
- package/dist/dashboard/assets/QuotaPage-B3VOgQmt.js +1 -0
- package/dist/dashboard/assets/QuotaPage-B3VOgQmt.js.gz +0 -0
- package/dist/dashboard/assets/SettingsPage-C_klIZom.js +1 -0
- package/dist/dashboard/assets/SettingsPage-C_klIZom.js.gz +0 -0
- package/dist/dashboard/assets/{SetupPage-DDbMQsoo.js → SetupPage-BYph-InK.js} +1 -1
- package/dist/dashboard/assets/SetupPage-BYph-InK.js.gz +0 -0
- package/dist/dashboard/assets/{SortableList-CB3Z7VTf.js → SortableList-CvyQCYWJ.js} +1 -1
- package/dist/dashboard/assets/SortableList-CvyQCYWJ.js.gz +0 -0
- package/dist/dashboard/assets/{StudioPage-D95UCPHI.js → StudioPage-Cm1JYilI.js} +3 -3
- package/dist/dashboard/assets/StudioPage-Cm1JYilI.js.gz +0 -0
- package/dist/dashboard/assets/UsagePage-DlFnc3_S.js +56 -0
- package/dist/dashboard/assets/UsagePage-DlFnc3_S.js.gz +0 -0
- package/dist/dashboard/assets/api-keys-DQYLQxpW.js +1 -0
- package/dist/dashboard/assets/api-keys-DQYLQxpW.js.gz +0 -0
- package/dist/dashboard/assets/app-CX_Z8cMs.css +2 -0
- package/dist/dashboard/assets/app-CX_Z8cMs.css.gz +0 -0
- package/dist/dashboard/assets/{assert-Chi7pCnt.js → assert-C9FD_JwJ.js} +1 -1
- package/dist/dashboard/assets/assert-C9FD_JwJ.js.gz +0 -0
- package/dist/dashboard/assets/{badge-D4pQapKj.js → badge-CR72dasT.js} +1 -1
- package/dist/dashboard/assets/badge-CR72dasT.js.gz +0 -0
- package/dist/dashboard/assets/{banner-DH6cg-_B.js → banner-CI9_eSfO.js} +1 -1
- package/dist/dashboard/assets/banner-CI9_eSfO.js.gz +0 -0
- package/dist/dashboard/assets/{card-BKqlUOe4.js → card-DS7CQEsO.js} +1 -1
- package/dist/dashboard/assets/card-DS7CQEsO.js.gz +0 -0
- package/dist/dashboard/assets/{cli-tools-fTgljTGA.js → cli-tools-CNqzrfdb.js} +1 -1
- package/dist/dashboard/assets/cli-tools-CNqzrfdb.js.gz +0 -0
- package/dist/dashboard/assets/{clipboard-button-D5Ys_sM0.js → clipboard-button-611pSsaX.js} +1 -1
- package/dist/dashboard/assets/clipboard-button-611pSsaX.js.gz +0 -0
- package/dist/dashboard/assets/{fingerprint-pattern-BWuHtbW4.js → concurrency-BDF0ok7y.js} +1 -1
- package/dist/dashboard/assets/concurrency-BDF0ok7y.js.gz +0 -0
- package/dist/dashboard/assets/dialog-k37exjNt.js +1 -0
- package/dist/dashboard/assets/dialog-k37exjNt.js.gz +0 -0
- package/dist/dashboard/assets/drawer-CX7N8ucR.js +1 -0
- package/dist/dashboard/assets/drawer-CX7N8ucR.js.gz +0 -0
- package/dist/dashboard/assets/{entry-CQBr6U9c.js → entry-B9Xvtnfj.js} +1 -1
- package/dist/dashboard/assets/entry-B9Xvtnfj.js.gz +0 -0
- package/dist/dashboard/assets/entry-Bog0p925.js +4 -0
- package/dist/dashboard/assets/entry-Bog0p925.js.gz +0 -0
- package/dist/dashboard/assets/entry-CTP8AyiS.js +1 -0
- package/dist/dashboard/assets/entry-CTP8AyiS.js.gz +0 -0
- package/dist/dashboard/assets/{github-badge-BlptL8Uf.js → github-badge-sltk1qUi.js} +1 -1
- package/dist/dashboard/assets/github-badge-sltk1qUi.js.gz +0 -0
- package/dist/dashboard/assets/{index-js6TJvdr.js → index-CZQIrdoX.js} +2 -2
- package/dist/dashboard/assets/index-CZQIrdoX.js.gz +0 -0
- package/dist/dashboard/assets/{inline-DUWDSmDV.js → inline-BhY2sSnO.js} +1 -1
- package/dist/dashboard/assets/inline-BhY2sSnO.js.gz +0 -0
- package/dist/dashboard/assets/{input-LVjgZq4f.js → input-V1umFiBk.js} +1 -1
- package/dist/dashboard/assets/input-V1umFiBk.js.gz +0 -0
- package/dist/dashboard/assets/layout-BBOYycyS.js +1 -0
- package/dist/dashboard/assets/layout-BBOYycyS.js.gz +0 -0
- package/dist/dashboard/assets/{list-row-DupvLfDx.js → list-row-1zzZYM0B.js} +1 -1
- package/dist/dashboard/assets/list-row-1zzZYM0B.js.gz +0 -0
- package/dist/dashboard/assets/{live-C4pEJUqI.js → live-BivGfuUs.js} +1 -1
- package/dist/dashboard/assets/live-BivGfuUs.js.gz +0 -0
- package/dist/dashboard/assets/{model-bans-BRiuufkB.js → model-bans-CmffjLuG.js} +1 -1
- package/dist/dashboard/assets/model-bans-CmffjLuG.js.gz +0 -0
- package/dist/dashboard/assets/{mutation-B4ROwk8L.js → mutation-46P0oWMe.js} +1 -1
- package/dist/dashboard/assets/mutation-46P0oWMe.js.gz +0 -0
- package/dist/dashboard/assets/numbers-DkfMR5Qs.js +2 -0
- package/dist/dashboard/assets/numbers-DkfMR5Qs.js.gz +0 -0
- package/dist/dashboard/assets/{query-keys-gmjzC3RS.js → query-keys-BFhGpwR1.js} +1 -1
- package/dist/dashboard/assets/query-keys-BFhGpwR1.js.gz +0 -0
- package/dist/dashboard/assets/{routing-C7tBT5o-.js → routing-CAb4F37R.js} +1 -1
- package/dist/dashboard/assets/routing-CAb4F37R.js.gz +0 -0
- package/dist/dashboard/assets/{select-WUCXorXw.js → select-BPpSsBgL.js} +1 -1
- package/dist/dashboard/assets/select-BPpSsBgL.js.gz +0 -0
- package/dist/dashboard/assets/{settings-C_zKl1GS.js → settings-DNX9sydi.js} +1 -1
- package/dist/dashboard/assets/settings-DNX9sydi.js.gz +0 -0
- package/dist/dashboard/assets/{stack-_3O0F8Xn.js → stack-BHTfXdz_.js} +1 -1
- package/dist/dashboard/assets/stack-BHTfXdz_.js.gz +0 -0
- package/dist/dashboard/assets/{state-BgTxHcJS.js → state-mPDRlQkl.js} +1 -1
- package/dist/dashboard/assets/state-mPDRlQkl.js.gz +0 -0
- package/dist/dashboard/assets/{switch-DEjTtOWf.js → switch-DOmJxg7H.js} +1 -1
- package/dist/dashboard/assets/switch-DOmJxg7H.js.gz +0 -0
- package/dist/dashboard/assets/tokens-COzario9.js +1 -0
- package/dist/dashboard/assets/tokens-COzario9.js.gz +0 -0
- package/dist/dashboard/assets/use-modal-focus-By7oJoGd.js +1 -0
- package/dist/dashboard/assets/use-modal-focus-By7oJoGd.js.gz +0 -0
- package/dist/dashboard/assets/{useMutation-BWSC0UAS.js → useMutation-Dem0lXQj.js} +1 -1
- package/dist/dashboard/assets/useMutation-Dem0lXQj.js.gz +0 -0
- package/dist/dashboard/index.html +1 -1
- package/dist/dashboard/index.html.gz +0 -0
- package/dist/dashboard/precompressed-assets.json +54 -54
- package/migrations/README.md +52 -52
- package/migrations/lite-sqlite3/0000_baseline.sql +2 -2
- package/package.json +95 -95
- package/scripts/cli/admin.ts +125 -0
- package/scripts/cli/{ui/background.ts → background.ts} +1 -1
- package/scripts/cli/{command/console-menu.ts → console-menu.ts} +275 -244
- package/scripts/cli/doctor.ts +37 -0
- package/scripts/cli/{support/env.ts → env.ts} +99 -99
- package/scripts/cli/{gateway/spawn.ts → gateway.ts} +112 -24
- package/scripts/cli/instance.ts +224 -0
- package/scripts/cli/main.ts +61 -18
- package/scripts/cli/{support/platform.ts → platform.ts} +64 -64
- package/scripts/cli/port.ts +100 -0
- package/scripts/cli/{support/services.ts → services.ts} +88 -88
- package/scripts/cli/{command/setup.ts → setup.ts} +35 -34
- package/scripts/cli/{command/start.ts → start.ts} +10 -5
- package/scripts/cli/{support/startup-signal.ts → startup-signal.ts} +23 -23
- package/scripts/cli/tray/index.ts +62 -12
- package/scripts/cli/{command/tray.ts → tray.ts} +208 -208
- package/scripts/cli/{command/update.ts → update.ts} +39 -39
- package/scripts/cli/version.ts +67 -0
- package/scripts/cli/{ui/wordmark.ts → wordmark.ts} +58 -58
- package/src/boot/app.ts +697 -693
- package/src/boot/dependencies.ts +647 -646
- package/src/boot/timeout.ts +2 -13
- package/src/config/cooldowns.ts +186 -138
- package/src/config/network.ts +8 -14
- package/src/config/providers.ts +7 -10
- package/src/config/runtime.ts +76 -76
- package/src/config/security.ts +15 -0
- package/src/config/spec.ts +20 -30
- package/src/config/telemetry.ts +0 -20
- package/src/config/timeouts.ts +0 -6
- package/src/console/admin/model-abuse/contracts.ts +28 -6
- package/src/console/admin/model-abuse/routes.ts +56 -3
- package/src/console/api-keys/contracts.ts +410 -414
- package/src/console/api-keys/routes.ts +881 -880
- package/src/console/auth/credentials.ts +3 -3
- package/src/console/auth/setup-service.ts +2 -2
- package/src/console/backup/export-endpoint.ts +6 -2
- package/src/console/backup/nine-router.ts +2 -5
- package/src/console/backup/service.ts +4 -0
- package/src/console/backup/store.ts +192 -29
- package/src/console/backup/validate.ts +3 -45
- package/src/console/cli-tools/fs-ops.ts +487 -487
- package/src/console/console-router-guards.ts +1 -1
- package/src/console/data-management/contracts.ts +13 -6
- package/src/console/data-management/operations.ts +23 -18
- package/src/console/data-management/routes.ts +0 -1
- package/src/console/domain-registration.ts +10 -5
- package/src/console/observability/live.ts +22 -0
- package/src/console/observability/store.ts +39 -16
- package/src/console/observability/usage-dimensions.ts +4 -4
- package/src/console/providers/catalog/catalog-projections.ts +6 -7
- package/src/console/providers/catalog/model-operations.ts +5 -2
- package/src/console/providers/catalog/provider-operations.ts +4 -4
- package/src/console/providers/catalog/public-model-store.ts +8 -11
- package/src/console/providers/catalog/store.ts +1553 -1553
- package/src/console/providers/oauth/routes.ts +8 -12
- package/src/console/quota/account-quota-tenant.ts +6 -6
- package/src/console/quota/quota-view.ts +1 -1
- package/src/console/remote-support/contracts.ts +61 -0
- package/src/console/remote-support/routes.ts +65 -0
- package/src/console/remote-support/service.ts +207 -0
- package/src/console/response-compression.ts +0 -3
- package/src/console/routing/pools/probe-result.ts +3 -2
- package/src/console/routing/pools/probe-verdict.ts +132 -132
- package/src/console/routing/pools/store.ts +8 -8
- package/src/console/settings/contracts.ts +58 -2
- package/src/console/settings/store.ts +30 -3
- package/src/console/shared/cursor.ts +8 -8
- package/src/console/shared/errors.ts +1 -3
- package/src/network/http2-bidi.ts +2 -4
- package/src/network/pool/agent.ts +478 -478
- package/src/network/pool/selector.ts +5 -4
- package/src/network/retry.ts +1 -2
- package/src/network/ssrf.ts +5 -4
- package/src/observability/event-compaction.ts +80 -78
- package/src/observability/event-day-index.ts +13 -15
- package/src/observability/event-log.ts +4 -4
- package/src/observability/logger.ts +6 -6
- package/src/observability/payload-capture.ts +151 -33
- package/src/observability/payload-store.ts +397 -440
- package/src/observability/redaction.ts +5 -6
- package/src/observability/request-notify.ts +43 -0
- package/src/observability/telemetry-status.ts +8 -9
- package/src/observability/token-speed.ts +5 -4
- package/src/persistence/db-mode.ts +7 -7
- package/src/persistence/readiness.ts +1 -1
- package/src/persistence/schema.ts +1406 -1402
- package/src/persistence/shared-cache.ts +1 -2
- package/src/persistence/stores/api-key-store.ts +18 -6
- package/src/persistence/stores/share-store.ts +4 -3
- package/src/persistence/stores/telemetry-store.ts +236 -237
- package/src/protocol/canonical-model.ts +11 -3
- package/src/protocol/codecs.ts +138 -4
- package/src/protocol/gateway-error.ts +6 -4
- package/src/protocol/request/chat.ts +21 -1
- package/src/protocol/request/codex.ts +10 -1
- package/src/protocol/request/messages.ts +4 -5
- package/src/protocol/request/responses.ts +9 -1
- package/src/protocol/response/chat.ts +34 -4
- package/src/protocol/response/codex.ts +7 -4
- package/src/protocol/response/dsml.ts +140 -28
- package/src/protocol/response/responses.ts +11 -5
- package/src/protocol/stream-error-frames.ts +4 -5
- package/src/providers/authentication/jwt-validator.ts +9 -10
- package/src/providers/authentication/oauth-refresh-service.ts +9 -11
- package/src/providers/configured-openai-providers.ts +134 -136
- package/src/providers/discovery/catalog/catalog-blob.ts +18 -18
- package/src/providers/discovery/catalog/catalog-format.ts +3 -6
- package/src/providers/discovery/models-dev-catalog.ts +354 -354
- package/src/providers/discovery/probe-phases.ts +4 -4
- package/src/providers/discovery/probe-wire.ts +6 -13
- package/src/providers/discovery/probing-service.ts +1117 -1045
- package/src/providers/integrations/alibabacp/alibabacp.ts +1 -1
- package/src/providers/integrations/antigravity/antigravity-quota.ts +5 -7
- package/src/providers/integrations/buddy/buddy-chat-shared.ts +23 -2
- package/src/providers/integrations/buddy/buddy-checkin.ts +1 -4
- package/src/providers/integrations/buddy/buddy-cli-headers.ts +23 -6
- package/src/providers/integrations/buddy/buddy-conversation-headers.ts +0 -1
- package/src/providers/integrations/buddy/buddy-identity.ts +52 -0
- package/src/providers/integrations/buddy/buddy-media.ts +2 -2
- package/src/providers/integrations/buddy/buddy-usage-store.ts +3 -4
- package/src/providers/integrations/buddy/codebuddy/quota.ts +2 -13
- package/src/providers/integrations/buddy/codebuddy/shared.ts +118 -115
- package/src/providers/integrations/buddy/workbuddy/quota.ts +0 -11
- package/src/providers/integrations/buddy/workbuddy/shared.ts +5 -2
- package/src/providers/integrations/claude/claude.ts +608 -608
- package/src/providers/integrations/cline/cline-quota.ts +132 -132
- package/src/providers/integrations/cline/cline.ts +537 -539
- package/src/providers/integrations/codex/codex-oauth.ts +1 -1
- package/src/providers/integrations/commandcode/commandcode.ts +674 -675
- package/src/providers/integrations/commandcode/discovery.ts +117 -116
- package/src/providers/integrations/cursor/cursor-auth.ts +418 -418
- package/src/providers/integrations/cursor/cursor-quota.ts +309 -310
- package/src/providers/integrations/cursor/cursor.ts +11 -163
- package/src/providers/integrations/factory/factory-models.ts +3 -5
- package/src/providers/integrations/grok/grok-install-id.ts +2 -3
- package/src/providers/integrations/grok/grok.ts +6 -7
- package/src/providers/integrations/hermes.ts +14 -18
- package/src/providers/integrations/kiro/kiro-discovery.ts +1 -1
- package/src/providers/integrations/kiro/kiro.ts +1 -1
- package/src/providers/integrations/mistral.ts +6 -6
- package/src/providers/integrations/opencode/fingerprint.ts +3 -3
- package/src/providers/integrations/opencode/provider.ts +8 -8
- package/src/providers/integrations/qoder/qoder-catalog.ts +450 -450
- package/src/providers/integrations/qoder/qoder-oauth.ts +388 -310
- package/src/providers/integrations/qoder/qoder.ts +884 -865
- package/src/providers/integrations/shared/connect.ts +6 -6
- package/src/providers/integrations/trae/trae-catalog.ts +1 -2
- package/src/providers/integrations/trae/trae.ts +2 -2
- package/src/providers/integrations/zcode/oauth.ts +6 -1
- package/src/providers/operations/account-health-service.ts +1528 -1523
- package/src/providers/operations/account-reset-service.ts +1 -1
- package/src/providers/operations/client-versions.ts +6 -6
- package/src/providers/operations/custom-cli-headers.ts +3 -4
- package/src/providers/operations/provider-catalog-seeder.ts +95 -95
- package/src/providers/operations/provider-catalog-service.ts +3 -4
- package/src/providers/provider-metadata.ts +4 -8
- package/src/providers/provider-registry.ts +6 -7
- package/src/providers/provider-usage.ts +1 -1
- package/src/security/abuse.ts +15 -10
- package/src/security/access-control.ts +144 -146
- package/src/security/admission/contracts.ts +11 -0
- package/src/security/admission/in-memory-store.ts +4 -3
- package/src/security/admission/lease-sweep.ts +6 -6
- package/src/security/admission/reasons.ts +5 -1
- package/src/security/admission/redis-store.ts +211 -210
- package/src/security/admission/service.ts +4 -0
- package/src/security/api-key-auth.ts +504 -504
- package/src/security/ip-boundary.ts +155 -15
- package/src/security/model-abuse.ts +366 -94
- package/src/security/outbound-headers.ts +3 -4
- package/src/shared/sleep.ts +4 -0
- package/src/transport/dispatch/attempt-finalize.ts +47 -5
- package/src/transport/dispatch/attempt-loop.ts +531 -530
- package/src/transport/dispatch/stream-bridge.ts +1 -3
- package/src/transport/dispatch/streaming/finalize.ts +1 -1
- package/src/transport/dispatch/streaming/stream.ts +5 -6
- package/src/transport/failure-policy.ts +162 -8
- package/src/transport/guards/auth-guard.ts +7 -4
- package/src/transport/guards/concurrency-guard.ts +0 -5
- package/src/transport/guards/error-lifecycle.ts +13 -6
- package/src/transport/guards/pipeline.ts +15 -3
- package/src/transport/guards/request-context.ts +8 -2
- package/src/transport/request/inflight.ts +5 -6
- package/src/transport/request/preparer.ts +2 -2
- package/src/transport/request/state.ts +12 -8
- package/src/transport/routing/admission.ts +4 -0
- package/src/transport/routing/route-catalog.ts +8 -1
- package/src/transport/routing/route-model.ts +46 -14
- package/src/transport/routing/router.ts +21 -14
- package/src/transport/surface/completion.ts +2 -3
- package/src/transport/surface/dialects.ts +5 -6
- package/src/transport/surface/responses/encode.ts +38 -0
- package/src/transport/surface/responses/parse.ts +4 -0
- package/src/transport/translation/capabilities.ts +2 -3
- package/src/transport/translation/quirks.ts +3 -3
- package/src/workers/buddy-growth-tasks.ts +5 -10
- package/src/workers/daily-checkin.ts +17 -23
- package/src/workers/quota-refresh-sweep.ts +26 -26
- package/dist/dashboard/assets/BannedPage-C2orBsI2.js.gz +0 -0
- package/dist/dashboard/assets/CliToolDetailPage-DUcZ6pMB.js +0 -1
- package/dist/dashboard/assets/CliToolDetailPage-DUcZ6pMB.js.gz +0 -0
- package/dist/dashboard/assets/CliToolsPage-BV6pxVQo.js.gz +0 -0
- package/dist/dashboard/assets/CombosPage-Bsan4679.js +0 -1
- package/dist/dashboard/assets/CombosPage-Bsan4679.js.gz +0 -0
- package/dist/dashboard/assets/ConsoleLogPage-CW-wPmJ6.js.gz +0 -0
- package/dist/dashboard/assets/CustomizationPage-0p8uX7vB.js.gz +0 -0
- package/dist/dashboard/assets/HealthEventsModal-BjqSMfko.js.gz +0 -0
- package/dist/dashboard/assets/LoginPage-BvzCx8Kr.js.gz +0 -0
- package/dist/dashboard/assets/ModelPicker-BY1aKEkP.js +0 -1
- package/dist/dashboard/assets/ModelPicker-BY1aKEkP.js.gz +0 -0
- package/dist/dashboard/assets/OverviewPage-DOQpy1y0.js +0 -1
- package/dist/dashboard/assets/OverviewPage-DOQpy1y0.js.gz +0 -0
- package/dist/dashboard/assets/ProviderDetailPage-ecxyUMzt.js +0 -3
- package/dist/dashboard/assets/ProviderDetailPage-ecxyUMzt.js.gz +0 -0
- package/dist/dashboard/assets/ProvidersPage-Js9jUPSb.js.gz +0 -0
- package/dist/dashboard/assets/ProxyPage-J3TBi3Kx.js +0 -7
- package/dist/dashboard/assets/ProxyPage-J3TBi3Kx.js.gz +0 -0
- package/dist/dashboard/assets/QuotaPage-C1gZS6xr.js +0 -1
- package/dist/dashboard/assets/QuotaPage-C1gZS6xr.js.gz +0 -0
- package/dist/dashboard/assets/SettingsPage-CS86ho5X.js +0 -1
- package/dist/dashboard/assets/SettingsPage-CS86ho5X.js.gz +0 -0
- package/dist/dashboard/assets/SetupPage-DDbMQsoo.js.gz +0 -0
- package/dist/dashboard/assets/SortableList-CB3Z7VTf.js.gz +0 -0
- package/dist/dashboard/assets/StudioPage-D95UCPHI.js.gz +0 -0
- package/dist/dashboard/assets/UsagePage-Cnae9SWA.js +0 -56
- package/dist/dashboard/assets/UsagePage-Cnae9SWA.js.gz +0 -0
- package/dist/dashboard/assets/api-keys-VY68Mhd1.js +0 -1
- package/dist/dashboard/assets/api-keys-VY68Mhd1.js.gz +0 -0
- package/dist/dashboard/assets/app-COlK95oi.css +0 -2
- package/dist/dashboard/assets/app-COlK95oi.css.gz +0 -0
- package/dist/dashboard/assets/assert-Chi7pCnt.js.gz +0 -0
- package/dist/dashboard/assets/badge-D4pQapKj.js.gz +0 -0
- package/dist/dashboard/assets/banner-DH6cg-_B.js.gz +0 -0
- package/dist/dashboard/assets/card-BKqlUOe4.js.gz +0 -0
- package/dist/dashboard/assets/cli-tools-fTgljTGA.js.gz +0 -0
- package/dist/dashboard/assets/clipboard-button-D5Ys_sM0.js.gz +0 -0
- package/dist/dashboard/assets/dialog-BYj-8WuK.js +0 -1
- package/dist/dashboard/assets/dialog-BYj-8WuK.js.gz +0 -0
- package/dist/dashboard/assets/drawer-CmXIZ6H1.js +0 -1
- package/dist/dashboard/assets/drawer-CmXIZ6H1.js.gz +0 -0
- package/dist/dashboard/assets/entry-CBg5zeu8.js +0 -1
- package/dist/dashboard/assets/entry-CBg5zeu8.js.gz +0 -0
- package/dist/dashboard/assets/entry-CQBr6U9c.js.gz +0 -0
- package/dist/dashboard/assets/entry-CgdSAzEV.js +0 -4
- package/dist/dashboard/assets/entry-CgdSAzEV.js.gz +0 -0
- package/dist/dashboard/assets/fingerprint-pattern-BWuHtbW4.js.gz +0 -0
- package/dist/dashboard/assets/github-badge-BlptL8Uf.js.gz +0 -0
- package/dist/dashboard/assets/index-js6TJvdr.js.gz +0 -0
- package/dist/dashboard/assets/inline-DUWDSmDV.js.gz +0 -0
- package/dist/dashboard/assets/input-LVjgZq4f.js.gz +0 -0
- package/dist/dashboard/assets/layout-CPfxpsfy.js +0 -1
- package/dist/dashboard/assets/layout-CPfxpsfy.js.gz +0 -0
- package/dist/dashboard/assets/list-row-DupvLfDx.js.gz +0 -0
- package/dist/dashboard/assets/live-C4pEJUqI.js.gz +0 -0
- package/dist/dashboard/assets/model-bans-BRiuufkB.js.gz +0 -0
- package/dist/dashboard/assets/mutation-B4ROwk8L.js.gz +0 -0
- package/dist/dashboard/assets/numbers-YNcHvRY7.js +0 -2
- package/dist/dashboard/assets/numbers-YNcHvRY7.js.gz +0 -0
- package/dist/dashboard/assets/query-keys-gmjzC3RS.js.gz +0 -0
- package/dist/dashboard/assets/routing-C7tBT5o-.js.gz +0 -0
- package/dist/dashboard/assets/select-WUCXorXw.js.gz +0 -0
- package/dist/dashboard/assets/settings-C_zKl1GS.js.gz +0 -0
- package/dist/dashboard/assets/stack-_3O0F8Xn.js.gz +0 -0
- package/dist/dashboard/assets/state-BgTxHcJS.js.gz +0 -0
- package/dist/dashboard/assets/switch-DEjTtOWf.js.gz +0 -0
- package/dist/dashboard/assets/tokens-DDxMbSRL.js +0 -1
- package/dist/dashboard/assets/tokens-DDxMbSRL.js.gz +0 -0
- package/dist/dashboard/assets/use-presence-BSZEBx7U.js +0 -1
- package/dist/dashboard/assets/use-presence-BSZEBx7U.js.gz +0 -0
- package/dist/dashboard/assets/useMutation-BWSC0UAS.js.gz +0 -0
- package/scripts/cli/command/admin.ts +0 -65
- package/scripts/cli/command/doctor.ts +0 -257
- package/scripts/cli/gateway/drain-token.ts +0 -78
- package/scripts/cli/gateway/instance-lock.ts +0 -105
- package/scripts/cli/gateway/stop.ts +0 -51
- package/scripts/cli/support/bun.ts +0 -27
- package/scripts/cli/support/version.ts +0 -37
- /package/dist/dashboard/assets/{app-DCQZRmHY.js → app-BIt446yE.js} +0 -0
- /package/dist/dashboard/assets/{app-DCQZRmHY.js.gz → app-BIt446yE.js.gz} +0 -0
- /package/scripts/cli/{ui/prompt.ts → prompt.ts} +0 -0
|
@@ -37,7 +37,6 @@ import {
|
|
|
37
37
|
buildCancelAction,
|
|
38
38
|
buildExecStreamClose,
|
|
39
39
|
buildExecThrow,
|
|
40
|
-
buildHostExecResult,
|
|
41
40
|
buildInteractionResponse,
|
|
42
41
|
buildKvGetBlobResult,
|
|
43
42
|
buildKvSetBlobResult,
|
|
@@ -56,7 +55,7 @@ import {
|
|
|
56
55
|
} from "./cursor-request";
|
|
57
56
|
import { cursorRunTerminationError, decodeServerMessages, openCursorRun } from "./cursor-http2";
|
|
58
57
|
import { cursorRunSessions } from "./cursor-session-manager";
|
|
59
|
-
import type { CursorContinuationScope,
|
|
58
|
+
import type { CursorContinuationScope, CursorRunSession } from "./cursor-session-manager";
|
|
60
59
|
import { fetchCursorRunOrigin } from "./cursor-catalog";
|
|
61
60
|
import { defaultParameterValues, fetchCursorModels } from "./cursor-catalog";
|
|
62
61
|
import type { CursorModelInfo } from "./cursor-catalog";
|
|
@@ -289,126 +288,6 @@ function readExecutableMcpCall(
|
|
|
289
288
|
return { toolName, arguments: decodeMcpArguments(mcpArgs) };
|
|
290
289
|
}
|
|
291
290
|
|
|
292
|
-
/** Host exec variants this gateway can forward to the client's own tools. */
|
|
293
|
-
const HOST_TOOL_ALIASES: Record<CursorHostExecDetail["variant"], readonly string[]> = {
|
|
294
|
-
shell: ["bash", "shell", "sh"],
|
|
295
|
-
write: ["write", "file_write", "create_file"],
|
|
296
|
-
read: ["read", "read_file", "view", "cat"],
|
|
297
|
-
};
|
|
298
|
-
|
|
299
|
-
/** Canonical exec value → property names a client tool schema may declare. */
|
|
300
|
-
const HOST_ARG_ALIASES: Readonly<Record<string, readonly string[]>> = {
|
|
301
|
-
intent: ["i", "intent", "description"],
|
|
302
|
-
command: ["command", "cmd"],
|
|
303
|
-
workingDirectory: ["working_directory", "cwd", "workdir"],
|
|
304
|
-
path: ["path", "file_path", "filename"],
|
|
305
|
-
content: ["content", "text", "file_text", "contents"],
|
|
306
|
-
};
|
|
307
|
-
|
|
308
|
-
function fileBytesToText(value: unknown): string {
|
|
309
|
-
return value instanceof Uint8Array ? new TextDecoder().decode(value) : "";
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
function byteLengthOf(text: string): number {
|
|
313
|
-
return new TextEncoder().encode(text).length;
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
/**
|
|
317
|
-
* Projects one host exec request onto a client-declared tool descriptor.
|
|
318
|
-
*
|
|
319
|
-
* The argument keys are taken from the schema the tool itself declared, so a
|
|
320
|
-
* strict schema (`additionalProperties: false`) never rejects the call; a
|
|
321
|
-
* property the schema demands but no exec value fills refuses the forward —
|
|
322
|
-
* calling the tool with a half-built record would strand the model on an
|
|
323
|
-
* error it can only work around by circling.
|
|
324
|
-
*/
|
|
325
|
-
function hostCallFor(
|
|
326
|
-
descriptors: readonly CursorToolDescriptor[],
|
|
327
|
-
variant: CursorHostExecDetail["variant"],
|
|
328
|
-
values: Readonly<Record<string, string | undefined>>,
|
|
329
|
-
detail: CursorHostExecDetail,
|
|
330
|
-
): { toolName: string; arguments: string; detail: CursorHostExecDetail } | undefined {
|
|
331
|
-
const descriptor = descriptors.find((entry) =>
|
|
332
|
-
HOST_TOOL_ALIASES[variant].includes(entry.toolName.toLowerCase().replace(/^_+/, "")),
|
|
333
|
-
);
|
|
334
|
-
if (descriptor === undefined) return undefined;
|
|
335
|
-
const schema = recordOf(descriptor.inputSchema);
|
|
336
|
-
const properties = recordOf(schema?.["properties"]);
|
|
337
|
-
const required = Array.isArray(schema?.["required"])
|
|
338
|
-
? (schema?.["required"] as unknown[]).filter((value): value is string => typeof value === "string")
|
|
339
|
-
: [];
|
|
340
|
-
const subject =
|
|
341
|
-
values.command !== undefined
|
|
342
|
-
? values.command
|
|
343
|
-
: `${variant} ${values.path ?? ""}`.trim();
|
|
344
|
-
const filled: Record<string, string> = {};
|
|
345
|
-
for (const [key, value] of Object.entries(values)) {
|
|
346
|
-
if (value === undefined) continue;
|
|
347
|
-
const target = HOST_ARG_ALIASES[key]?.find((alias) => properties?.[alias] !== undefined)
|
|
348
|
-
?? (properties === undefined ? key : undefined);
|
|
349
|
-
if (target !== undefined) filled[target] = value;
|
|
350
|
-
}
|
|
351
|
-
// The client surfaces carry a concise-intent property the exec frame has no
|
|
352
|
-
// counterpart for: derive it from the subject and project it like the rest.
|
|
353
|
-
const intentTarget = HOST_ARG_ALIASES["intent"]?.find((alias) => properties?.[alias] !== undefined);
|
|
354
|
-
const intent = subject.length > 80 ? `${subject.slice(0, 79)}…` : subject;
|
|
355
|
-
if (intentTarget !== undefined) filled[intentTarget] = intent;
|
|
356
|
-
else if (properties === undefined) filled.intent = intent;
|
|
357
|
-
if (required.some((name) => !(name in filled))) return undefined;
|
|
358
|
-
return { toolName: descriptor.toolName, arguments: JSON.stringify(filled), detail };
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
/**
|
|
362
|
-
* Reads one Cursor host exec request the canonical client executes locally.
|
|
363
|
-
*
|
|
364
|
-
* Cursor's edge asks its executor for a native host tool (shell, write, read);
|
|
365
|
-
* the canonical client declared the same surfaces as its own tools, so the
|
|
366
|
-
* gateway forwards the work instead of refusing it. Exec variants without a
|
|
367
|
-
* faithful typed result frame (grep, ls, subagent, …) return `undefined` and
|
|
368
|
-
* keep the throw-refusal path.
|
|
369
|
-
*/
|
|
370
|
-
function readHostExecCall(
|
|
371
|
-
execServer: Record<string, unknown>,
|
|
372
|
-
descriptors: readonly CursorToolDescriptor[],
|
|
373
|
-
): { toolName: string; arguments: string; detail: CursorHostExecDetail } | undefined {
|
|
374
|
-
const shell = recordOf(execServer["shell_args"]) ?? recordOf(execServer["shell_stream_args"]);
|
|
375
|
-
if (shell !== undefined) {
|
|
376
|
-
const command = nonEmptyStringOf(shell["command"]);
|
|
377
|
-
if (command === undefined) return undefined;
|
|
378
|
-
const workingDirectory = nonEmptyStringOf(shell["working_directory"]);
|
|
379
|
-
return hostCallFor(
|
|
380
|
-
descriptors,
|
|
381
|
-
"shell",
|
|
382
|
-
{ command, workingDirectory },
|
|
383
|
-
{
|
|
384
|
-
variant: "shell",
|
|
385
|
-
command,
|
|
386
|
-
...(workingDirectory === undefined ? {} : { workingDirectory }),
|
|
387
|
-
},
|
|
388
|
-
);
|
|
389
|
-
}
|
|
390
|
-
const write = recordOf(execServer["write_args"]);
|
|
391
|
-
if (write !== undefined) {
|
|
392
|
-
const path = nonEmptyStringOf(write["path"]);
|
|
393
|
-
if (path === undefined) return undefined;
|
|
394
|
-
const content =
|
|
395
|
-
typeof write["file_text"] === "string" ? write["file_text"] : fileBytesToText(write["file_bytes"]);
|
|
396
|
-
return hostCallFor(descriptors, "write", { path, content }, {
|
|
397
|
-
variant: "write",
|
|
398
|
-
path,
|
|
399
|
-
lines: content.split("\n").length,
|
|
400
|
-
fileSize: byteLengthOf(content),
|
|
401
|
-
});
|
|
402
|
-
}
|
|
403
|
-
const read = recordOf(execServer["read_args"]);
|
|
404
|
-
if (read !== undefined) {
|
|
405
|
-
const path = nonEmptyStringOf(read["path"]);
|
|
406
|
-
if (path === undefined) return undefined;
|
|
407
|
-
return hostCallFor(descriptors, "read", { path }, { variant: "read", path });
|
|
408
|
-
}
|
|
409
|
-
return undefined;
|
|
410
|
-
}
|
|
411
|
-
|
|
412
291
|
/**
|
|
413
292
|
* Decodes Cursor's `McpArgs.args` — a `map<string, google.protobuf.Value>`
|
|
414
293
|
* carried as repeated map-entry messages — into a canonical arguments string.
|
|
@@ -685,10 +564,6 @@ class CursorAdapter implements ProviderAdapter {
|
|
|
685
564
|
for (const item of pending) {
|
|
686
565
|
const entry = cursorRunSessions.resolveCall(item.callId, scope);
|
|
687
566
|
if (entry === undefined) continue;
|
|
688
|
-
// A forwarded host exec answers the variant's typed result frame (an
|
|
689
|
-
// mcp_result leaves the server unmatched on a frame it did rank);
|
|
690
|
-
// MCP-channel calls answer the generic mcp_result.
|
|
691
|
-
if (entry.call.host === undefined) {
|
|
692
567
|
await handle.write(
|
|
693
568
|
buildMcpResult({
|
|
694
569
|
execId: entry.call.execId,
|
|
@@ -698,18 +573,6 @@ class CursorAdapter implements ProviderAdapter {
|
|
|
698
573
|
...(item.images.length > 0 ? { images: item.images } : {}),
|
|
699
574
|
}),
|
|
700
575
|
);
|
|
701
|
-
} else {
|
|
702
|
-
for (const frame of buildHostExecResult({
|
|
703
|
-
execId: entry.call.execId,
|
|
704
|
-
...(entry.call.execIdString === undefined ? {} : { execIdString: entry.call.execIdString }),
|
|
705
|
-
variant: entry.call.host.variant,
|
|
706
|
-
text: item.text,
|
|
707
|
-
isError: item.isError,
|
|
708
|
-
host: entry.call.host,
|
|
709
|
-
})) {
|
|
710
|
-
await handle.write(frame);
|
|
711
|
-
}
|
|
712
|
-
}
|
|
713
576
|
cursorRunSessions.clearPendingCall(runId, item.callId);
|
|
714
577
|
}
|
|
715
578
|
yield* this.#pump({
|
|
@@ -1051,7 +914,6 @@ class CursorAdapter implements ProviderAdapter {
|
|
|
1051
914
|
execId: handled.execId,
|
|
1052
915
|
...(handled.execIdString === undefined ? {} : { execIdString: handled.execIdString }),
|
|
1053
916
|
toolName: handled.toolName,
|
|
1054
|
-
...(handled.host === undefined ? {} : { host: handled.host }),
|
|
1055
917
|
})) {
|
|
1056
918
|
await handle.write(buildMcpRejected(handled.execId, "tool call is not answerable", handled.execIdString));
|
|
1057
919
|
continue;
|
|
@@ -1201,7 +1063,6 @@ class CursorAdapter implements ProviderAdapter {
|
|
|
1201
1063
|
execIdString: string | undefined;
|
|
1202
1064
|
toolName: string;
|
|
1203
1065
|
arguments: string;
|
|
1204
|
-
host?: CursorHostExecDetail;
|
|
1205
1066
|
}
|
|
1206
1067
|
> {
|
|
1207
1068
|
const execId = typeof execServer["id"] === "number" ? execServer["id"] : 0;
|
|
@@ -1249,29 +1110,16 @@ class CursorAdapter implements ProviderAdapter {
|
|
|
1249
1110
|
arguments: call.arguments,
|
|
1250
1111
|
};
|
|
1251
1112
|
}
|
|
1252
|
-
// Host exec
|
|
1253
|
-
//
|
|
1254
|
-
//
|
|
1255
|
-
//
|
|
1256
|
-
//
|
|
1257
|
-
//
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
execId,
|
|
1263
|
-
execIdString,
|
|
1264
|
-
toolName: host.toolName,
|
|
1265
|
-
arguments: host.arguments,
|
|
1266
|
-
host: host.detail,
|
|
1267
|
-
};
|
|
1268
|
-
}
|
|
1269
|
-
// Every other exec variant is a Cursor host tool (shell, read, edit, glob,
|
|
1270
|
-
// subagent, …) or a frame this gateway has no handler for. Stranding the
|
|
1271
|
-
// exec id stalled the turn forever, and answering it as an mcp_result left
|
|
1272
|
-
// the server unmatched on a frame it did rank — the protocol's failure
|
|
1273
|
-
// channel (throw + stream_close, exactly what Cursor's own executor sends
|
|
1274
|
-
// for an unclaimed frame) surfaces the refusal to the model instead.
|
|
1113
|
+
// Host exec frames (shell_args, write_args, read_args, and every other
|
|
1114
|
+
// Cursor-native variant) are not executed here. Cursor's own executor on
|
|
1115
|
+
// the local CLI handles them; the MCP channel is the correct path for tool
|
|
1116
|
+
// calls routed through this gateway.
|
|
1117
|
+
//
|
|
1118
|
+
// A direct-forward path (`readHostExecCall`) was implemented experimentally
|
|
1119
|
+
// but produced protocol errors in practice: the typed result frames it sent
|
|
1120
|
+
// back (shell_result, write_result, read_result) were not matched correctly
|
|
1121
|
+
// by the server under all code paths, causing the Run to stall or the model
|
|
1122
|
+
// to receive malformed tool output. The path has been removed; use MCP.
|
|
1275
1123
|
const refusal = "Cursor host tools are not executed by this gateway";
|
|
1276
1124
|
await handle.write(buildExecThrow(execId, refusal, execIdString));
|
|
1277
1125
|
await handle.write(buildExecStreamClose(execId, execIdString));
|
|
@@ -8,15 +8,13 @@
|
|
|
8
8
|
*
|
|
9
9
|
* Gemini ids are listed below on the `gemini` wire family.
|
|
10
10
|
*
|
|
11
|
-
*
|
|
12
|
-
* research was right and the old rows were wrong. Factory serves Gemini on a
|
|
11
|
+
* Factory serves Gemini on a
|
|
13
12
|
* native generateContent wire at `/api/llm/g/v1/generate`
|
|
14
13
|
* (`packages/catalog/src/wire/factory-droid.ts:83-84`,
|
|
15
14
|
* `packages/ai/src/providers/factory-droid/gemini.ts:28`) with
|
|
16
15
|
* `x-api-provider: google` (`packages/ai/test/factory-droid-gemini.test.ts:25`).
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
* is why nothing caught it.
|
|
16
|
+
* A Gemini id routed onto `chat` posts to an endpoint that does not serve it —
|
|
17
|
+
* so it fails at the endpoint, not at routing, which is why nothing catches it.
|
|
20
18
|
*
|
|
21
19
|
* `garnet-07-15`, `gemini-3.1-pro-preview` and `gemini-3.8-flash` remain absent:
|
|
22
20
|
* the donor's catalog does not list them either.
|
|
@@ -2,9 +2,8 @@
|
|
|
2
2
|
* Grok's per-installation agent id.
|
|
3
3
|
*
|
|
4
4
|
* The persistence and failure handling live in the shared install-id module;
|
|
5
|
-
* this file only names the id
|
|
6
|
-
*
|
|
7
|
-
* failed the request.
|
|
5
|
+
* this file only names the id, so a failure to write it never escapes into
|
|
6
|
+
* dispatch and fails the request.
|
|
8
7
|
*/
|
|
9
8
|
import { getOrCreateInstallId } from "../shared/install-id";
|
|
10
9
|
|
|
@@ -373,11 +373,10 @@ function normalizeTools(payload: Record<string, unknown>): void {
|
|
|
373
373
|
normalized.push(tool);
|
|
374
374
|
continue;
|
|
375
375
|
}
|
|
376
|
-
// Tools arrive factory-normalized (flat `{type:"function",name,parameters}
|
|
377
|
-
// canonical tools are flat, so
|
|
378
|
-
//
|
|
379
|
-
//
|
|
380
|
-
// fallback, custom-tool synthesis.
|
|
376
|
+
// Tools arrive factory-normalized (flat `{type:"function",name,parameters}`
|
|
377
|
+
// — canonical tools are flat, so there is no nested `function.*` payload to
|
|
378
|
+
// resolve). Only grok wire strictness stays here: trimmed names,
|
|
379
|
+
// empty-name drop, parameters fallback, custom-tool synthesis.
|
|
381
380
|
const name = typeof tool.name === "string" ? tool.name : "";
|
|
382
381
|
if (!name.trim()) continue;
|
|
383
382
|
const parameters =
|
|
@@ -413,8 +412,8 @@ function normalizeTools(payload: Record<string, unknown>): void {
|
|
|
413
412
|
if (type === "function" || type === "custom") {
|
|
414
413
|
// Unlike `tools`, `tool_choice` genuinely arrives nested: the chat
|
|
415
414
|
// encoder writes `{type:"function", function:{name}}` and
|
|
416
|
-
// `{type:"custom", custom:{name}}`, so these reads are
|
|
417
|
-
//
|
|
415
|
+
// `{type:"custom", custom:{name}}`, so these nested reads are required
|
|
416
|
+
// even though the tools loop above has no nested path.
|
|
418
417
|
const fn = value.function;
|
|
419
418
|
const nested = fn && typeof fn === "object" && !Array.isArray(fn) ? fn as Record<string, unknown> : undefined;
|
|
420
419
|
const custom = value.custom;
|
|
@@ -28,17 +28,15 @@ const HERMES_PROVIDER_ID = "hermes" as const;
|
|
|
28
28
|
* (`agent/portal_tags.py` in `NousResearch/hermes-agent`). Neither is required
|
|
29
29
|
* for dispatch — a request carrying only `user=` answers 200 — but they are
|
|
30
30
|
* sent because they are the client's real attribution and cost nothing. The
|
|
31
|
-
* client version
|
|
32
|
-
* Hermes does not publish a semver, so
|
|
33
|
-
*
|
|
31
|
+
* client version is read from `getHermesVersion()` and sent in the shape the
|
|
32
|
+
* released tags use (`v<version>`): Hermes does not publish a semver, so its
|
|
33
|
+
* versions are date-based release tags.
|
|
34
34
|
*/
|
|
35
35
|
/**
|
|
36
36
|
* Builds the portal tags for one dispatch.
|
|
37
37
|
*
|
|
38
|
-
* `client=` carries the version in the shape the released
|
|
39
|
-
* (`v<version>`)
|
|
40
|
-
* constant named a date tag (`v2026.9.24`) that was neither a release nor the
|
|
41
|
-
* version the project publishes. `getHermesVersion()` tracks the real release.
|
|
38
|
+
* `client=` carries the resolved version in the shape the released tags use
|
|
39
|
+
* (`v<version>`); `getHermesVersion()` tracks the real release.
|
|
42
40
|
*/
|
|
43
41
|
function hermesPortalTags(): readonly string[] {
|
|
44
42
|
return [
|
|
@@ -66,25 +64,23 @@ import type { ModelDefinition } from "../provider-model-definition";
|
|
|
66
64
|
*
|
|
67
65
|
* `loadModelDiscovery` supersedes this list whenever `/v1/models` answers, so
|
|
68
66
|
* these numbers are only read by a fetch that failed. They are the upstream's
|
|
69
|
-
* own `context_length` and `top_provider.max_completion_tokens
|
|
70
|
-
*
|
|
71
|
-
* one of them.
|
|
67
|
+
* own `context_length` and `top_provider.max_completion_tokens`, stated per row
|
|
68
|
+
* because they differ per row.
|
|
72
69
|
*
|
|
73
|
-
* Two ids
|
|
74
|
-
*
|
|
75
|
-
* `upstage/solar-pro4
|
|
76
|
-
* `upstage/solar-mini4:free` exist).
|
|
70
|
+
* Two ids upstream no longer carries are absent: `tencent/hy3:free` (missing
|
|
71
|
+
* from the catalog entirely) and `upstage/solar-pro4:free` (only the billed
|
|
72
|
+
* `upstage/solar-pro4` and the free `upstage/solar-mini4:free` exist).
|
|
77
73
|
*/
|
|
78
74
|
export const HERMES_MODELS: readonly ModelDefinition[] = [
|
|
79
75
|
// The live `/models` free rows, with the limits the catalog states. Verified
|
|
80
76
|
// against the API: every id here answers 200.
|
|
81
77
|
//
|
|
82
|
-
// `meituan/longcat-2.0:free` is
|
|
83
|
-
// dispatching it answers 404 "This model is no longer free", so
|
|
78
|
+
// `meituan/longcat-2.0:free` is excluded: the catalog still lists the id, but
|
|
79
|
+
// dispatching it answers 404 "This model is no longer free", so listing it
|
|
84
80
|
// would be a card that can only ever fail. `meituan/longcat-2.5-preview:free`
|
|
85
|
-
//
|
|
81
|
+
// is listed instead and answers 200.
|
|
86
82
|
//
|
|
87
|
-
// `stepfun/step-5-preview:free` is
|
|
83
|
+
// `stepfun/step-5-preview:free` is excluded: it is absent from the live catalog
|
|
88
84
|
// entirely and dispatching it answers 404 "This model's free period has
|
|
89
85
|
// ended" — a retired row, not a capacity blip, so it cannot be left in.
|
|
90
86
|
//
|
|
@@ -31,7 +31,7 @@ const MAX_DISCOVERED_MODELS = 500;
|
|
|
31
31
|
const KIRO_EFFORTS = ["low", "medium", "high", "xhigh"] as const;
|
|
32
32
|
|
|
33
33
|
/**
|
|
34
|
-
* Ids the seed catalog deliberately
|
|
34
|
+
* Ids the seed catalog deliberately excludes.
|
|
35
35
|
*
|
|
36
36
|
* Discovery adds every id the upstream lists, so without this a retired row
|
|
37
37
|
* comes back the moment an account fetches its models. The seed is the owner
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
// Two upstream behaviours drive the header and endpoint logic:
|
|
9
9
|
//
|
|
10
10
|
// * There is exactly one generation surface, `q.{region}.amazonaws.com`. The
|
|
11
|
-
//
|
|
11
|
+
// `codewhisperer.*` host and the vendor's own path-style gateway are
|
|
12
12
|
// not what the real client talks to, and reaching for them is actively
|
|
13
13
|
// harmful: an account that has just been refused would immediately probe two
|
|
14
14
|
// other service entries with the same token, which is the shape of credential
|
|
@@ -6,12 +6,12 @@ const MISTRAL_PROVIDER_ID = "mistral" as const;
|
|
|
6
6
|
/**
|
|
7
7
|
* Mistral's own current generalist tiers.
|
|
8
8
|
*
|
|
9
|
-
* The provider is registered as a generic OpenAI-compatible API-key provider,
|
|
10
|
-
*
|
|
11
|
-
* discovery run
|
|
12
|
-
* Mistral keeps pointed at its current generalist models —
|
|
13
|
-
* (Large 4) and `mistral-medium-latest` (Medium 3.5),
|
|
14
|
-
* overview.
|
|
9
|
+
* The provider is registered as a generic OpenAI-compatible API-key provider,
|
|
10
|
+
* which carries no catalog of its own: without this list, every model it serves
|
|
11
|
+
* stays absent until a discovery run happens to fetch them. These are the two
|
|
12
|
+
* `latest` aliases Mistral keeps pointed at its current generalist models —
|
|
13
|
+
* `mistral-large-latest` (Large 4) and `mistral-medium-latest` (Medium 3.5),
|
|
14
|
+
* per the Mistral model overview.
|
|
15
15
|
*
|
|
16
16
|
* Limits and pricing come from the base catalog via `providerId`: `defineModel`
|
|
17
17
|
* resolves `mistral:<id>` and falls back to the majority row, so no number is
|
|
@@ -23,11 +23,11 @@ const SESSION_COUNTER_MAX = 63;
|
|
|
23
23
|
* `ses_` + 12-char hex (bitwise inverted millisecond timestamp * 4096 + seq) + 14-char base62.
|
|
24
24
|
*
|
|
25
25
|
* The counter is capped rather than left to grow. Sixty-four dispatches inside
|
|
26
|
-
* one millisecond
|
|
27
|
-
*
|
|
26
|
+
* one millisecond emit ids the gate refuses, so a burst — exactly what a proxy
|
|
27
|
+
* pool produces — would 403 on its own headers while every other field was
|
|
28
28
|
* correct. On overflow the timestamp advances by one millisecond instead: the
|
|
29
29
|
* id stays inside the window, and the only cost is that ids minted in the same
|
|
30
|
-
* real millisecond
|
|
30
|
+
* real millisecond do not sort as the client's would.
|
|
31
31
|
*/
|
|
32
32
|
export function generateOpenCodeSessionId(now = Date.now()): string {
|
|
33
33
|
if (now !== lastTimestamp) {
|
|
@@ -79,7 +79,7 @@ const UNAVAILABLE_FREE_ZEN_IDS: readonly string[] = [
|
|
|
79
79
|
* `CARTETHYIA_OPENCODE_UNAVAILABLE_FREE` lets an operator correct that
|
|
80
80
|
* immediately: a comma-separated list that *replaces* the bundled one, or the
|
|
81
81
|
* single token `none` to trust the listing completely. The bundled ids remain
|
|
82
|
-
* the default so an unconfigured install
|
|
82
|
+
* the default so an unconfigured install keeps these refusals.
|
|
83
83
|
*/
|
|
84
84
|
function unavailableFreeZenIds(): readonly string[] {
|
|
85
85
|
const override = resolveOpenCodeUnavailableFree();
|
|
@@ -163,11 +163,11 @@ function opencodeDesktopHeaders(
|
|
|
163
163
|
// The free-tier gate refuses non-streaming dispatches with 403
|
|
164
164
|
// FreeTierError, so free models always advertise SSE regardless of the
|
|
165
165
|
// client's own Accept; billed models keep the JSON default. The value is
|
|
166
|
-
// what OpenCode 2.x's AI SDK sends
|
|
167
|
-
// `text/event-stream`
|
|
168
|
-
//
|
|
169
|
-
//
|
|
170
|
-
//
|
|
166
|
+
// what OpenCode 2.x's AI SDK sends — a broader Accept than the narrower
|
|
167
|
+
// `text/event-stream` the gate is known to accept, so this is alignment
|
|
168
|
+
// with the real client rather than a fix for a live failure. It costs
|
|
169
|
+
// nothing: `stream: true` is forced on the body either way, so the upstream
|
|
170
|
+
// answers SSE regardless.
|
|
171
171
|
...(freeModel ? { accept: FREE_TIER_ACCEPT } : {}),
|
|
172
172
|
};
|
|
173
173
|
}
|
|
@@ -498,7 +498,7 @@ export function systemoneLimits(): Pick<ModelDefinition, "contextLimit" | "outpu
|
|
|
498
498
|
export const OPENCODE_FREE_MODELS: readonly ModelDefinition[] = [
|
|
499
499
|
...sharedZenChat,
|
|
500
500
|
// `nemotron-3-ultra-free`, `nemotron-3.5-lightning-free` and
|
|
501
|
-
// `longcat-2.5-preview-free` are
|
|
501
|
+
// `longcat-2.5-preview-free` are excluded: the live Zen roster does not list
|
|
502
502
|
// them. A row the provider's own roster dropped can disappear from the wire
|
|
503
503
|
// without notice, which makes it a stale row — one that routes to a 404 at
|
|
504
504
|
// dispatch time rather than failing at catalog load. `big-pickle` and the
|
|
@@ -514,7 +514,7 @@ export const OPENCODE_ZEN_MODELS: readonly ModelDefinition[] = [
|
|
|
514
514
|
];
|
|
515
515
|
|
|
516
516
|
export const OPENCODE_GO_MODELS: readonly ModelDefinition[] = [
|
|
517
|
-
// `muse-spark-1.2` is
|
|
517
|
+
// `muse-spark-1.2` is not served upstream; the catalog files
|
|
518
518
|
// `muse-spark-1.2-contributor` at 1048576/131072, which is what this row
|
|
519
519
|
// serves.
|
|
520
520
|
defineModel({ id: "muse-spark-1.2-contributor", providerId: "opencode-go", wireFamily: "responses", endpoint: `${GO_PATH_PREFIX}/responses`, ctx: 1048576, out: 131072, vision: true, reasoning: true }),
|