@alm-allen/dsh-multi-provider 0.0.0-stage → 0.90.2
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/CHANGELOG.md +70 -0
- package/LICENSE +21 -0
- package/README.md +229 -2
- package/cordis.patch.yml +6 -0
- package/icon.svg +28 -0
- package/lib/client.js +25708 -0
- package/lib/client.js.map +1 -0
- package/lib/index.js +93587 -0
- package/lib/types/client/CodexComposerQuota.d.ts +13 -0
- package/lib/types/client/CodexComposerQuota.d.ts.map +1 -0
- package/lib/types/client/CodexSubscriptionSection.d.ts +42 -0
- package/lib/types/client/CodexSubscriptionSection.d.ts.map +1 -0
- package/lib/types/client/ProviderHubSection.d.ts +21 -0
- package/lib/types/client/ProviderHubSection.d.ts.map +1 -0
- package/lib/types/client/api.d.ts +66 -0
- package/lib/types/client/api.d.ts.map +1 -0
- package/lib/types/client/claude/ClaudeComposerQuota.d.ts +29 -0
- package/lib/types/client/claude/ClaudeComposerQuota.d.ts.map +1 -0
- package/lib/types/client/claude/ClaudeSection.d.ts +12 -0
- package/lib/types/client/claude/ClaudeSection.d.ts.map +1 -0
- package/lib/types/client/claude/locales.d.ts +489 -0
- package/lib/types/client/claude/locales.d.ts.map +1 -0
- package/lib/types/client/claude/styles.d.ts +15 -0
- package/lib/types/client/claude/styles.d.ts.map +1 -0
- package/lib/types/client/claude/useClaudeSection.d.ts +106 -0
- package/lib/types/client/claude/useClaudeSection.d.ts.map +1 -0
- package/lib/types/client/claude-api/ClaudeApiSection.d.ts +5 -0
- package/lib/types/client/claude-api/ClaudeApiSection.d.ts.map +1 -0
- package/lib/types/client/claude-api/api.d.ts +23 -0
- package/lib/types/client/claude-api/api.d.ts.map +1 -0
- package/lib/types/client/claude-api/locales.d.ts +161 -0
- package/lib/types/client/claude-api/locales.d.ts.map +1 -0
- package/lib/types/client/claude-api/styles.d.ts +4 -0
- package/lib/types/client/claude-api/styles.d.ts.map +1 -0
- package/lib/types/client/claude-api/useClaudeApiSection.d.ts +37 -0
- package/lib/types/client/claude-api/useClaudeApiSection.d.ts.map +1 -0
- package/lib/types/client/cline-pass/ClinePassComposerQuota.d.ts +23 -0
- package/lib/types/client/cline-pass/ClinePassComposerQuota.d.ts.map +1 -0
- package/lib/types/client/cline-pass/ClinePassSection.d.ts +17 -0
- package/lib/types/client/cline-pass/ClinePassSection.d.ts.map +1 -0
- package/lib/types/client/cline-pass/api.d.ts +85 -0
- package/lib/types/client/cline-pass/api.d.ts.map +1 -0
- package/lib/types/client/cline-pass/locales.d.ts +911 -0
- package/lib/types/client/cline-pass/locales.d.ts.map +1 -0
- package/lib/types/client/cline-pass/styles.d.ts +7 -0
- package/lib/types/client/cline-pass/styles.d.ts.map +1 -0
- package/lib/types/client/command-code/CommandCodeComposerQuota.d.ts +20 -0
- package/lib/types/client/command-code/CommandCodeComposerQuota.d.ts.map +1 -0
- package/lib/types/client/command-code/CommandCodeSection.d.ts +8 -0
- package/lib/types/client/command-code/CommandCodeSection.d.ts.map +1 -0
- package/lib/types/client/command-code/locales.d.ts +305 -0
- package/lib/types/client/command-code/locales.d.ts.map +1 -0
- package/lib/types/client/common/AccountPoolSection.d.ts +104 -0
- package/lib/types/client/common/AccountPoolSection.d.ts.map +1 -0
- package/lib/types/client/common/ComposerQuotaBadge.d.ts +63 -0
- package/lib/types/client/common/ComposerQuotaBadge.d.ts.map +1 -0
- package/lib/types/client/common/ContextWindowEditor.d.ts +71 -0
- package/lib/types/client/common/ContextWindowEditor.d.ts.map +1 -0
- package/lib/types/client/common/LineProxySection.d.ts +78 -0
- package/lib/types/client/common/LineProxySection.d.ts.map +1 -0
- package/lib/types/client/common/ModelChecklist.d.ts +29 -0
- package/lib/types/client/common/ModelChecklist.d.ts.map +1 -0
- package/lib/types/client/common/account-pool-labels.d.ts +74 -0
- package/lib/types/client/common/account-pool-labels.d.ts.map +1 -0
- package/lib/types/client/common/account-quota.d.ts +60 -0
- package/lib/types/client/common/account-quota.d.ts.map +1 -0
- package/lib/types/client/common/format.d.ts +70 -0
- package/lib/types/client/common/format.d.ts.map +1 -0
- package/lib/types/client/common/host-locale-mirror.d.ts +24 -0
- package/lib/types/client/common/host-locale-mirror.d.ts.map +1 -0
- package/lib/types/client/common/line-api.d.ts +8 -0
- package/lib/types/client/common/line-api.d.ts.map +1 -0
- package/lib/types/client/common/line-locale.d.ts +21 -0
- package/lib/types/client/common/line-locale.d.ts.map +1 -0
- package/lib/types/client/common/model-checklist-styles.d.ts +2 -0
- package/lib/types/client/common/model-checklist-styles.d.ts.map +1 -0
- package/lib/types/client/common/plugin-style.d.ts +23 -0
- package/lib/types/client/common/plugin-style.d.ts.map +1 -0
- package/lib/types/client/common/quota-follow-up.d.ts +30 -0
- package/lib/types/client/common/quota-follow-up.d.ts.map +1 -0
- package/lib/types/client/common/styles.d.ts +11 -0
- package/lib/types/client/common/styles.d.ts.map +1 -0
- package/lib/types/client/common/use-store.d.ts +3 -0
- package/lib/types/client/common/use-store.d.ts.map +1 -0
- package/lib/types/client/glm-coding-plan/GlmCodingPlanComposerQuota.d.ts +27 -0
- package/lib/types/client/glm-coding-plan/GlmCodingPlanComposerQuota.d.ts.map +1 -0
- package/lib/types/client/glm-coding-plan/GlmCodingPlanSection.d.ts +22 -0
- package/lib/types/client/glm-coding-plan/GlmCodingPlanSection.d.ts.map +1 -0
- package/lib/types/client/glm-coding-plan/api.d.ts +4 -0
- package/lib/types/client/glm-coding-plan/api.d.ts.map +1 -0
- package/lib/types/client/glm-coding-plan/locales.d.ts +409 -0
- package/lib/types/client/glm-coding-plan/locales.d.ts.map +1 -0
- package/lib/types/client/glm-coding-plan/styles.d.ts +16 -0
- package/lib/types/client/glm-coding-plan/styles.d.ts.map +1 -0
- package/lib/types/client/glm-coding-plan/useGlmCodingPlanSection.d.ts +65 -0
- package/lib/types/client/glm-coding-plan/useGlmCodingPlanSection.d.ts.map +1 -0
- package/lib/types/client/hub/HubOverview.d.ts +16 -0
- package/lib/types/client/hub/HubOverview.d.ts.map +1 -0
- package/lib/types/client/hub/brand-icons.d.ts +64 -0
- package/lib/types/client/hub/brand-icons.d.ts.map +1 -0
- package/lib/types/client/hub/brand-svg.d.ts +51 -0
- package/lib/types/client/hub/brand-svg.d.ts.map +1 -0
- package/lib/types/client/hub/hub-styles.d.ts +2 -0
- package/lib/types/client/hub/hub-styles.d.ts.map +1 -0
- package/lib/types/client/hub/providers.d.ts +55 -0
- package/lib/types/client/hub/providers.d.ts.map +1 -0
- package/lib/types/client/index.d.ts +67 -0
- package/lib/types/client/index.d.ts.map +1 -0
- package/lib/types/client/kimi-code/KimiCodeComposerQuota.d.ts +21 -0
- package/lib/types/client/kimi-code/KimiCodeComposerQuota.d.ts.map +1 -0
- package/lib/types/client/kimi-code/KimiCodeSection.d.ts +8 -0
- package/lib/types/client/kimi-code/KimiCodeSection.d.ts.map +1 -0
- package/lib/types/client/kimi-code/KimiModelCapabilities.d.ts +16 -0
- package/lib/types/client/kimi-code/KimiModelCapabilities.d.ts.map +1 -0
- package/lib/types/client/kimi-code/KimiQuotaCard.d.ts +31 -0
- package/lib/types/client/kimi-code/KimiQuotaCard.d.ts.map +1 -0
- package/lib/types/client/kimi-code/labels.d.ts +66 -0
- package/lib/types/client/kimi-code/labels.d.ts.map +1 -0
- package/lib/types/client/kimi-code/locales.d.ts +640 -0
- package/lib/types/client/kimi-code/locales.d.ts.map +1 -0
- package/lib/types/client/kimi-code/staff-art.d.ts +19 -0
- package/lib/types/client/kimi-code/staff-art.d.ts.map +1 -0
- package/lib/types/client/kimi-code/styles.d.ts +4 -0
- package/lib/types/client/kimi-code/styles.d.ts.map +1 -0
- package/lib/types/client/locales-ru/account-pool.d.ts +11 -0
- package/lib/types/client/locales-ru/account-pool.d.ts.map +1 -0
- package/lib/types/client/locales-ru/claude-api.d.ts +3 -0
- package/lib/types/client/locales-ru/claude-api.d.ts.map +1 -0
- package/lib/types/client/locales-ru/claude.d.ts +3 -0
- package/lib/types/client/locales-ru/claude.d.ts.map +1 -0
- package/lib/types/client/locales-ru/cline-pass.d.ts +11 -0
- package/lib/types/client/locales-ru/cline-pass.d.ts.map +1 -0
- package/lib/types/client/locales-ru/command-code.d.ts +9 -0
- package/lib/types/client/locales-ru/command-code.d.ts.map +1 -0
- package/lib/types/client/locales-ru/glm-coding-plan.d.ts +10 -0
- package/lib/types/client/locales-ru/glm-coding-plan.d.ts.map +1 -0
- package/lib/types/client/locales-ru/hub.d.ts +3 -0
- package/lib/types/client/locales-ru/hub.d.ts.map +1 -0
- package/lib/types/client/locales-ru/index.d.ts +26 -0
- package/lib/types/client/locales-ru/index.d.ts.map +1 -0
- package/lib/types/client/locales-ru/kimi-code.d.ts +10 -0
- package/lib/types/client/locales-ru/kimi-code.d.ts.map +1 -0
- package/lib/types/client/locales-ru/minimax-code.d.ts +9 -0
- package/lib/types/client/locales-ru/minimax-code.d.ts.map +1 -0
- package/lib/types/client/locales-ru/ollama.d.ts +10 -0
- package/lib/types/client/locales-ru/ollama.d.ts.map +1 -0
- package/lib/types/client/locales-ru/opencode-go.d.ts +3 -0
- package/lib/types/client/locales-ru/opencode-go.d.ts.map +1 -0
- package/lib/types/client/locales-ru/opendesign.d.ts +10 -0
- package/lib/types/client/locales-ru/opendesign.d.ts.map +1 -0
- package/lib/types/client/locales-ru/qianwen-token-plan.d.ts +3 -0
- package/lib/types/client/locales-ru/qianwen-token-plan.d.ts.map +1 -0
- package/lib/types/client/locales-ru/qoder.d.ts +11 -0
- package/lib/types/client/locales-ru/qoder.d.ts.map +1 -0
- package/lib/types/client/locales-ru/relayone.d.ts +3 -0
- package/lib/types/client/locales-ru/relayone.d.ts.map +1 -0
- package/lib/types/client/locales-ru/step-code.d.ts +9 -0
- package/lib/types/client/locales-ru/step-code.d.ts.map +1 -0
- package/lib/types/client/locales-ru/workbuddy.d.ts +10 -0
- package/lib/types/client/locales-ru/workbuddy.d.ts.map +1 -0
- package/lib/types/client/locales.d.ts +497 -0
- package/lib/types/client/locales.d.ts.map +1 -0
- package/lib/types/client/minimax-code/MinimaxCodeComposerQuota.d.ts +23 -0
- package/lib/types/client/minimax-code/MinimaxCodeComposerQuota.d.ts.map +1 -0
- package/lib/types/client/minimax-code/MinimaxCodeSection.d.ts +23 -0
- package/lib/types/client/minimax-code/MinimaxCodeSection.d.ts.map +1 -0
- package/lib/types/client/minimax-code/api.d.ts +35 -0
- package/lib/types/client/minimax-code/api.d.ts.map +1 -0
- package/lib/types/client/minimax-code/commands-contract.d.ts +46 -0
- package/lib/types/client/minimax-code/commands-contract.d.ts.map +1 -0
- package/lib/types/client/minimax-code/locales.d.ts +422 -0
- package/lib/types/client/minimax-code/locales.d.ts.map +1 -0
- package/lib/types/client/minimax-code/styles.d.ts +12 -0
- package/lib/types/client/minimax-code/styles.d.ts.map +1 -0
- package/lib/types/client/minimax-code/useMinimaxCodeSection.d.ts +164 -0
- package/lib/types/client/minimax-code/useMinimaxCodeSection.d.ts.map +1 -0
- package/lib/types/client/ollama/OllamaSection.d.ts +25 -0
- package/lib/types/client/ollama/OllamaSection.d.ts.map +1 -0
- package/lib/types/client/ollama/api.d.ts +49 -0
- package/lib/types/client/ollama/api.d.ts.map +1 -0
- package/lib/types/client/ollama/locales.d.ts +479 -0
- package/lib/types/client/ollama/locales.d.ts.map +1 -0
- package/lib/types/client/opencode-go/OpenCodeGoQuotaCard.d.ts +20 -0
- package/lib/types/client/opencode-go/OpenCodeGoQuotaCard.d.ts.map +1 -0
- package/lib/types/client/opencode-go/OpenCodeGoSection.d.ts +8 -0
- package/lib/types/client/opencode-go/OpenCodeGoSection.d.ts.map +1 -0
- package/lib/types/client/opencode-go/locales.d.ts +210 -0
- package/lib/types/client/opencode-go/locales.d.ts.map +1 -0
- package/lib/types/client/opencode-go/styles.d.ts +10 -0
- package/lib/types/client/opencode-go/styles.d.ts.map +1 -0
- package/lib/types/client/opendesign/OpenDesignComposerQuota.d.ts +26 -0
- package/lib/types/client/opendesign/OpenDesignComposerQuota.d.ts.map +1 -0
- package/lib/types/client/opendesign/OpenDesignSection.d.ts +19 -0
- package/lib/types/client/opendesign/OpenDesignSection.d.ts.map +1 -0
- package/lib/types/client/opendesign/api.d.ts +45 -0
- package/lib/types/client/opendesign/api.d.ts.map +1 -0
- package/lib/types/client/opendesign/locales.d.ts +815 -0
- package/lib/types/client/opendesign/locales.d.ts.map +1 -0
- package/lib/types/client/opendesign/styles.d.ts +16 -0
- package/lib/types/client/opendesign/styles.d.ts.map +1 -0
- package/lib/types/client/qianwen-token-plan/QianwenComposerQuota.d.ts +14 -0
- package/lib/types/client/qianwen-token-plan/QianwenComposerQuota.d.ts.map +1 -0
- package/lib/types/client/qianwen-token-plan/QianwenTokenPlanSection.d.ts +4 -0
- package/lib/types/client/qianwen-token-plan/QianwenTokenPlanSection.d.ts.map +1 -0
- package/lib/types/client/qianwen-token-plan/api.d.ts +5 -0
- package/lib/types/client/qianwen-token-plan/api.d.ts.map +1 -0
- package/lib/types/client/qianwen-token-plan/locales.d.ts +158 -0
- package/lib/types/client/qianwen-token-plan/locales.d.ts.map +1 -0
- package/lib/types/client/qianwen-token-plan/styles.d.ts +3 -0
- package/lib/types/client/qianwen-token-plan/styles.d.ts.map +1 -0
- package/lib/types/client/qianwen-token-plan/useQianwenSection.d.ts +32 -0
- package/lib/types/client/qianwen-token-plan/useQianwenSection.d.ts.map +1 -0
- package/lib/types/client/qoder/QoderComposerQuota.d.ts +41 -0
- package/lib/types/client/qoder/QoderComposerQuota.d.ts.map +1 -0
- package/lib/types/client/qoder/QoderSection.d.ts +37 -0
- package/lib/types/client/qoder/QoderSection.d.ts.map +1 -0
- package/lib/types/client/qoder/api.d.ts +4 -0
- package/lib/types/client/qoder/api.d.ts.map +1 -0
- package/lib/types/client/qoder/locales.d.ts +322 -0
- package/lib/types/client/qoder/locales.d.ts.map +1 -0
- package/lib/types/client/qoder/styles.d.ts +16 -0
- package/lib/types/client/qoder/styles.d.ts.map +1 -0
- package/lib/types/client/qoder/useQoderSection.d.ts +97 -0
- package/lib/types/client/qoder/useQoderSection.d.ts.map +1 -0
- package/lib/types/client/quota.d.ts +9 -0
- package/lib/types/client/quota.d.ts.map +1 -0
- package/lib/types/client/relayone/RelayOneComposerQuota.d.ts +14 -0
- package/lib/types/client/relayone/RelayOneComposerQuota.d.ts.map +1 -0
- package/lib/types/client/relayone/RelayOneSection.d.ts +4 -0
- package/lib/types/client/relayone/RelayOneSection.d.ts.map +1 -0
- package/lib/types/client/relayone/api.d.ts +5 -0
- package/lib/types/client/relayone/api.d.ts.map +1 -0
- package/lib/types/client/relayone/locales.d.ts +221 -0
- package/lib/types/client/relayone/locales.d.ts.map +1 -0
- package/lib/types/client/relayone/quota-format.d.ts +6 -0
- package/lib/types/client/relayone/quota-format.d.ts.map +1 -0
- package/lib/types/client/relayone/styles.d.ts +3 -0
- package/lib/types/client/relayone/styles.d.ts.map +1 -0
- package/lib/types/client/relayone/useRelayOneSection.d.ts +32 -0
- package/lib/types/client/relayone/useRelayOneSection.d.ts.map +1 -0
- package/lib/types/client/step-code/StepCodeComposerQuota.d.ts +50 -0
- package/lib/types/client/step-code/StepCodeComposerQuota.d.ts.map +1 -0
- package/lib/types/client/step-code/StepCodeSection.d.ts +28 -0
- package/lib/types/client/step-code/StepCodeSection.d.ts.map +1 -0
- package/lib/types/client/step-code/api.d.ts +4 -0
- package/lib/types/client/step-code/api.d.ts.map +1 -0
- package/lib/types/client/step-code/locales.d.ts +657 -0
- package/lib/types/client/step-code/locales.d.ts.map +1 -0
- package/lib/types/client/step-code/styles.d.ts +28 -0
- package/lib/types/client/step-code/styles.d.ts.map +1 -0
- package/lib/types/client/step-code/useStepCodeSection.d.ts +122 -0
- package/lib/types/client/step-code/useStepCodeSection.d.ts.map +1 -0
- package/lib/types/client/store.d.ts +19 -0
- package/lib/types/client/store.d.ts.map +1 -0
- package/lib/types/client/styles.d.ts +26 -0
- package/lib/types/client/styles.d.ts.map +1 -0
- package/lib/types/client/workbuddy/WorkBuddyComposerQuota.d.ts +34 -0
- package/lib/types/client/workbuddy/WorkBuddyComposerQuota.d.ts.map +1 -0
- package/lib/types/client/workbuddy/WorkBuddySection.d.ts +91 -0
- package/lib/types/client/workbuddy/WorkBuddySection.d.ts.map +1 -0
- package/lib/types/client/workbuddy/locales.d.ts +768 -0
- package/lib/types/client/workbuddy/locales.d.ts.map +1 -0
- package/lib/types/client/workbuddy/styles.d.ts +21 -0
- package/lib/types/client/workbuddy/styles.d.ts.map +1 -0
- package/lib/types/client/workbuddy/useWorkBuddySection.d.ts +149 -0
- package/lib/types/client/workbuddy/useWorkBuddySection.d.ts.map +1 -0
- package/lib/types/compat.d.ts +139 -0
- package/lib/types/compat.d.ts.map +1 -0
- package/lib/types/host/adapter.d.ts +43 -0
- package/lib/types/host/adapter.d.ts.map +1 -0
- package/lib/types/host/callback-server.d.ts +22 -0
- package/lib/types/host/callback-server.d.ts.map +1 -0
- package/lib/types/host/claude/account-pool.d.ts +583 -0
- package/lib/types/host/claude/account-pool.d.ts.map +1 -0
- package/lib/types/host/claude/adapter.d.ts +424 -0
- package/lib/types/host/claude/adapter.d.ts.map +1 -0
- package/lib/types/host/claude/adopt.d.ts +292 -0
- package/lib/types/host/claude/adopt.d.ts.map +1 -0
- package/lib/types/host/claude/client.d.ts +579 -0
- package/lib/types/host/claude/client.d.ts.map +1 -0
- package/lib/types/host/claude/mapper.d.ts +802 -0
- package/lib/types/host/claude/mapper.d.ts.map +1 -0
- package/lib/types/host/claude/model-catalog.d.ts +560 -0
- package/lib/types/host/claude/model-catalog.d.ts.map +1 -0
- package/lib/types/host/claude/oauth.d.ts +419 -0
- package/lib/types/host/claude/oauth.d.ts.map +1 -0
- package/lib/types/host/claude/routes.d.ts +131 -0
- package/lib/types/host/claude/routes.d.ts.map +1 -0
- package/lib/types/host/claude/token-store.d.ts +347 -0
- package/lib/types/host/claude/token-store.d.ts.map +1 -0
- package/lib/types/host/claude/types.d.ts +417 -0
- package/lib/types/host/claude/types.d.ts.map +1 -0
- package/lib/types/host/claude-api/adapter.d.ts +70 -0
- package/lib/types/host/claude-api/adapter.d.ts.map +1 -0
- package/lib/types/host/claude-api/capability-memory.d.ts +4 -0
- package/lib/types/host/claude-api/capability-memory.d.ts.map +1 -0
- package/lib/types/host/claude-api/catalog-manager.d.ts +57 -0
- package/lib/types/host/claude-api/catalog-manager.d.ts.map +1 -0
- package/lib/types/host/claude-api/client-version.d.ts +4 -0
- package/lib/types/host/claude-api/client-version.d.ts.map +1 -0
- package/lib/types/host/claude-api/client.d.ts +55 -0
- package/lib/types/host/claude-api/client.d.ts.map +1 -0
- package/lib/types/host/claude-api/compaction-instruction.d.ts +23 -0
- package/lib/types/host/claude-api/compaction-instruction.d.ts.map +1 -0
- package/lib/types/host/claude-api/compaction-store.d.ts +62 -0
- package/lib/types/host/claude-api/compaction-store.d.ts.map +1 -0
- package/lib/types/host/claude-api/compaction.d.ts +47 -0
- package/lib/types/host/claude-api/compaction.d.ts.map +1 -0
- package/lib/types/host/claude-api/mapper.d.ts +61 -0
- package/lib/types/host/claude-api/mapper.d.ts.map +1 -0
- package/lib/types/host/claude-api/model-catalog.d.ts +76 -0
- package/lib/types/host/claude-api/model-catalog.d.ts.map +1 -0
- package/lib/types/host/claude-api/routes.d.ts +22 -0
- package/lib/types/host/claude-api/routes.d.ts.map +1 -0
- package/lib/types/host/claude-api/stream.d.ts +88 -0
- package/lib/types/host/claude-api/stream.d.ts.map +1 -0
- package/lib/types/host/claude-api/token-store.d.ts +60 -0
- package/lib/types/host/claude-api/token-store.d.ts.map +1 -0
- package/lib/types/host/claude-api/types.d.ts +68 -0
- package/lib/types/host/claude-api/types.d.ts.map +1 -0
- package/lib/types/host/cline-pass/account-pool.d.ts +63 -0
- package/lib/types/host/cline-pass/account-pool.d.ts.map +1 -0
- package/lib/types/host/cline-pass/adapter.d.ts +60 -0
- package/lib/types/host/cline-pass/adapter.d.ts.map +1 -0
- package/lib/types/host/cline-pass/catalog.d.ts +49 -0
- package/lib/types/host/cline-pass/catalog.d.ts.map +1 -0
- package/lib/types/host/cline-pass/client.d.ts +109 -0
- package/lib/types/host/cline-pass/client.d.ts.map +1 -0
- package/lib/types/host/cline-pass/engine.d.ts +93 -0
- package/lib/types/host/cline-pass/engine.d.ts.map +1 -0
- package/lib/types/host/cline-pass/line.d.ts +55 -0
- package/lib/types/host/cline-pass/line.d.ts.map +1 -0
- package/lib/types/host/cline-pass/mapper.d.ts +138 -0
- package/lib/types/host/cline-pass/mapper.d.ts.map +1 -0
- package/lib/types/host/cline-pass/oauth.d.ts +134 -0
- package/lib/types/host/cline-pass/oauth.d.ts.map +1 -0
- package/lib/types/host/cline-pass/protocol.d.ts +44 -0
- package/lib/types/host/cline-pass/protocol.d.ts.map +1 -0
- package/lib/types/host/cline-pass/routes.d.ts +92 -0
- package/lib/types/host/cline-pass/routes.d.ts.map +1 -0
- package/lib/types/host/cline-pass/store.d.ts +75 -0
- package/lib/types/host/cline-pass/store.d.ts.map +1 -0
- package/lib/types/host/cline-pass/token-store.d.ts +170 -0
- package/lib/types/host/cline-pass/token-store.d.ts.map +1 -0
- package/lib/types/host/cline-pass/tools.d.ts +21 -0
- package/lib/types/host/cline-pass/tools.d.ts.map +1 -0
- package/lib/types/host/cline-pass/types.d.ts +127 -0
- package/lib/types/host/cline-pass/types.d.ts.map +1 -0
- package/lib/types/host/codex-account-pool.d.ts +223 -0
- package/lib/types/host/codex-account-pool.d.ts.map +1 -0
- package/lib/types/host/codex-adopt.d.ts +255 -0
- package/lib/types/host/codex-adopt.d.ts.map +1 -0
- package/lib/types/host/codex-catalog.d.ts +69 -0
- package/lib/types/host/codex-catalog.d.ts.map +1 -0
- package/lib/types/host/codex-fetch.d.ts +17 -0
- package/lib/types/host/codex-fetch.d.ts.map +1 -0
- package/lib/types/host/codex-file-import.d.ts +35 -0
- package/lib/types/host/codex-file-import.d.ts.map +1 -0
- package/lib/types/host/codex-identity.d.ts +132 -0
- package/lib/types/host/codex-identity.d.ts.map +1 -0
- package/lib/types/host/codex-remote-compaction.d.ts +41 -0
- package/lib/types/host/codex-remote-compaction.d.ts.map +1 -0
- package/lib/types/host/codex-search.d.ts +11 -0
- package/lib/types/host/codex-search.d.ts.map +1 -0
- package/lib/types/host/command-code/account-pool.d.ts +72 -0
- package/lib/types/host/command-code/account-pool.d.ts.map +1 -0
- package/lib/types/host/command-code/adapter.d.ts +89 -0
- package/lib/types/host/command-code/adapter.d.ts.map +1 -0
- package/lib/types/host/command-code/client.d.ts +126 -0
- package/lib/types/host/command-code/client.d.ts.map +1 -0
- package/lib/types/host/command-code/mapper.d.ts +199 -0
- package/lib/types/host/command-code/mapper.d.ts.map +1 -0
- package/lib/types/host/command-code/model-catalog.d.ts +90 -0
- package/lib/types/host/command-code/model-catalog.d.ts.map +1 -0
- package/lib/types/host/command-code/oauth.d.ts +95 -0
- package/lib/types/host/command-code/oauth.d.ts.map +1 -0
- package/lib/types/host/command-code/plans.d.ts +40 -0
- package/lib/types/host/command-code/plans.d.ts.map +1 -0
- package/lib/types/host/command-code/routes.d.ts +44 -0
- package/lib/types/host/command-code/routes.d.ts.map +1 -0
- package/lib/types/host/command-code/token-store.d.ts +100 -0
- package/lib/types/host/command-code/token-store.d.ts.map +1 -0
- package/lib/types/host/command-code/types.d.ts +222 -0
- package/lib/types/host/command-code/types.d.ts.map +1 -0
- package/lib/types/host/common/account-pool.d.ts +584 -0
- package/lib/types/host/common/account-pool.d.ts.map +1 -0
- package/lib/types/host/common/account-quota.d.ts +44 -0
- package/lib/types/host/common/account-quota.d.ts.map +1 -0
- package/lib/types/host/common/brand-compat.d.ts +4 -0
- package/lib/types/host/common/brand-compat.d.ts.map +1 -0
- package/lib/types/host/common/cache-activity.d.ts +16 -0
- package/lib/types/host/common/cache-activity.d.ts.map +1 -0
- package/lib/types/host/common/cache-affinity.d.ts +23 -0
- package/lib/types/host/common/cache-affinity.d.ts.map +1 -0
- package/lib/types/host/common/cache-hint.d.ts +18 -0
- package/lib/types/host/common/cache-hint.d.ts.map +1 -0
- package/lib/types/host/common/capabilities.d.ts +100 -0
- package/lib/types/host/common/capabilities.d.ts.map +1 -0
- package/lib/types/host/common/catalog-snapshot.d.ts +80 -0
- package/lib/types/host/common/catalog-snapshot.d.ts.map +1 -0
- package/lib/types/host/common/claude-capability-memory.d.ts +51 -0
- package/lib/types/host/common/claude-capability-memory.d.ts.map +1 -0
- package/lib/types/host/common/claude-code-cch.d.ts +28 -0
- package/lib/types/host/common/claude-code-cch.d.ts.map +1 -0
- package/lib/types/host/common/claude-code-corrections.d.ts +6 -0
- package/lib/types/host/common/claude-code-corrections.d.ts.map +1 -0
- package/lib/types/host/common/claude-code-first-party.d.ts +68 -0
- package/lib/types/host/common/claude-code-first-party.d.ts.map +1 -0
- package/lib/types/host/common/claude-code-version.d.ts +90 -0
- package/lib/types/host/common/claude-code-version.d.ts.map +1 -0
- package/lib/types/host/common/concurrency-gate.d.ts +46 -0
- package/lib/types/host/common/concurrency-gate.d.ts.map +1 -0
- package/lib/types/host/common/context-budget-fetch.d.ts +7 -0
- package/lib/types/host/common/context-budget-fetch.d.ts.map +1 -0
- package/lib/types/host/common/context-overflow.d.ts +7 -0
- package/lib/types/host/common/context-overflow.d.ts.map +1 -0
- package/lib/types/host/common/context-window-overrides.d.ts +12 -0
- package/lib/types/host/common/context-window-overrides.d.ts.map +1 -0
- package/lib/types/host/common/credential-read-cache.d.ts +82 -0
- package/lib/types/host/common/credential-read-cache.d.ts.map +1 -0
- package/lib/types/host/common/credentials-compat.d.ts +73 -0
- package/lib/types/host/common/credentials-compat.d.ts.map +1 -0
- package/lib/types/host/common/failure-classification.d.ts +21 -0
- package/lib/types/host/common/failure-classification.d.ts.map +1 -0
- package/lib/types/host/common/file-preferences.d.ts +49 -0
- package/lib/types/host/common/file-preferences.d.ts.map +1 -0
- package/lib/types/host/common/gpt-engineering-guidance.d.ts +16 -0
- package/lib/types/host/common/gpt-engineering-guidance.d.ts.map +1 -0
- package/lib/types/host/common/home.d.ts +8 -0
- package/lib/types/host/common/home.d.ts.map +1 -0
- package/lib/types/host/common/hosted-media.d.ts +36 -0
- package/lib/types/host/common/hosted-media.d.ts.map +1 -0
- package/lib/types/host/common/i18n/en.d.ts +9 -0
- package/lib/types/host/common/i18n/en.d.ts.map +1 -0
- package/lib/types/host/common/i18n/index.d.ts +13 -0
- package/lib/types/host/common/i18n/index.d.ts.map +1 -0
- package/lib/types/host/common/i18n/provider-name.d.ts +10 -0
- package/lib/types/host/common/i18n/provider-name.d.ts.map +1 -0
- package/lib/types/host/common/i18n/ru.d.ts +10 -0
- package/lib/types/host/common/i18n/ru.d.ts.map +1 -0
- package/lib/types/host/common/i18n/runtime.d.ts +54 -0
- package/lib/types/host/common/i18n/runtime.d.ts.map +1 -0
- package/lib/types/host/common/i18n/t.d.ts +38 -0
- package/lib/types/host/common/i18n/t.d.ts.map +1 -0
- package/lib/types/host/common/i18n/zh.d.ts +172 -0
- package/lib/types/host/common/i18n/zh.d.ts.map +1 -0
- package/lib/types/host/common/idle-watchdog.d.ts +58 -0
- package/lib/types/host/common/idle-watchdog.d.ts.map +1 -0
- package/lib/types/host/common/legacy-preferences.d.ts +29 -0
- package/lib/types/host/common/legacy-preferences.d.ts.map +1 -0
- package/lib/types/host/common/llm-compat.d.ts +157 -0
- package/lib/types/host/common/llm-compat.d.ts.map +1 -0
- package/lib/types/host/common/model-request-control.d.ts +21 -0
- package/lib/types/host/common/model-request-control.d.ts.map +1 -0
- package/lib/types/host/common/orphan-tool-calls.d.ts +47 -0
- package/lib/types/host/common/orphan-tool-calls.d.ts.map +1 -0
- package/lib/types/host/common/output-reservation.d.ts +11 -0
- package/lib/types/host/common/output-reservation.d.ts.map +1 -0
- package/lib/types/host/common/pool-storage-settings.d.ts +41 -0
- package/lib/types/host/common/pool-storage-settings.d.ts.map +1 -0
- package/lib/types/host/common/pool-storage.d.ts +143 -0
- package/lib/types/host/common/pool-storage.d.ts.map +1 -0
- package/lib/types/host/common/prefix-request-coordinator.d.ts +46 -0
- package/lib/types/host/common/prefix-request-coordinator.d.ts.map +1 -0
- package/lib/types/host/common/prefix-stability.d.ts +24 -0
- package/lib/types/host/common/prefix-stability.d.ts.map +1 -0
- package/lib/types/host/common/prompt-cache-policy.d.ts +47 -0
- package/lib/types/host/common/prompt-cache-policy.d.ts.map +1 -0
- package/lib/types/host/common/prompt-estimate.d.ts +22 -0
- package/lib/types/host/common/prompt-estimate.d.ts.map +1 -0
- package/lib/types/host/common/provider-route.d.ts +56 -0
- package/lib/types/host/common/provider-route.d.ts.map +1 -0
- package/lib/types/host/common/quota-refresh.d.ts +35 -0
- package/lib/types/host/common/quota-refresh.d.ts.map +1 -0
- package/lib/types/host/common/reasoning-dialect.d.ts +24 -0
- package/lib/types/host/common/reasoning-dialect.d.ts.map +1 -0
- package/lib/types/host/common/reasoning-efforts.d.ts +2 -0
- package/lib/types/host/common/reasoning-efforts.d.ts.map +1 -0
- package/lib/types/host/common/request-diagnostics.d.ts +79 -0
- package/lib/types/host/common/request-diagnostics.d.ts.map +1 -0
- package/lib/types/host/common/request-images.d.ts +275 -0
- package/lib/types/host/common/request-images.d.ts.map +1 -0
- package/lib/types/host/common/same-origin.d.ts +30 -0
- package/lib/types/host/common/same-origin.d.ts.map +1 -0
- package/lib/types/host/common/session-cache-state.d.ts +29 -0
- package/lib/types/host/common/session-cache-state.d.ts.map +1 -0
- package/lib/types/host/common/session-effort-memory.d.ts +35 -0
- package/lib/types/host/common/session-effort-memory.d.ts.map +1 -0
- package/lib/types/host/common/settings-compat.d.ts +55 -0
- package/lib/types/host/common/settings-compat.d.ts.map +1 -0
- package/lib/types/host/common/sticky-image-budget.d.ts +10 -0
- package/lib/types/host/common/sticky-image-budget.d.ts.map +1 -0
- package/lib/types/host/common/stream-error.d.ts +93 -0
- package/lib/types/host/common/stream-error.d.ts.map +1 -0
- package/lib/types/host/common/tool-schema.d.ts +27 -0
- package/lib/types/host/common/tool-schema.d.ts.map +1 -0
- package/lib/types/host/common/video-request.d.ts +81 -0
- package/lib/types/host/common/video-request.d.ts.map +1 -0
- package/lib/types/host/common/video.d.ts +90 -0
- package/lib/types/host/common/video.d.ts.map +1 -0
- package/lib/types/host/common/webserver-compat.d.ts +7 -0
- package/lib/types/host/common/webserver-compat.d.ts.map +1 -0
- package/lib/types/host/credential-store-secret-service.d.ts +66 -0
- package/lib/types/host/credential-store-secret-service.d.ts.map +1 -0
- package/lib/types/host/fetch-address-policy.d.ts +79 -0
- package/lib/types/host/fetch-address-policy.d.ts.map +1 -0
- package/lib/types/host/fetch-configuration.d.ts +6 -0
- package/lib/types/host/fetch-configuration.d.ts.map +1 -0
- package/lib/types/host/glm-coding-plan/account-pool.d.ts +152 -0
- package/lib/types/host/glm-coding-plan/account-pool.d.ts.map +1 -0
- package/lib/types/host/glm-coding-plan/adapter.d.ts +169 -0
- package/lib/types/host/glm-coding-plan/adapter.d.ts.map +1 -0
- package/lib/types/host/glm-coding-plan/adopt.d.ts +354 -0
- package/lib/types/host/glm-coding-plan/adopt.d.ts.map +1 -0
- package/lib/types/host/glm-coding-plan/biz-token-cache.d.ts +99 -0
- package/lib/types/host/glm-coding-plan/biz-token-cache.d.ts.map +1 -0
- package/lib/types/host/glm-coding-plan/client.d.ts +218 -0
- package/lib/types/host/glm-coding-plan/client.d.ts.map +1 -0
- package/lib/types/host/glm-coding-plan/exchange.d.ts +223 -0
- package/lib/types/host/glm-coding-plan/exchange.d.ts.map +1 -0
- package/lib/types/host/glm-coding-plan/mapper-anthropic.d.ts +312 -0
- package/lib/types/host/glm-coding-plan/mapper-anthropic.d.ts.map +1 -0
- package/lib/types/host/glm-coding-plan/mapper-openai.d.ts +213 -0
- package/lib/types/host/glm-coding-plan/mapper-openai.d.ts.map +1 -0
- package/lib/types/host/glm-coding-plan/model-catalog.d.ts +241 -0
- package/lib/types/host/glm-coding-plan/model-catalog.d.ts.map +1 -0
- package/lib/types/host/glm-coding-plan/oauth.d.ts +211 -0
- package/lib/types/host/glm-coding-plan/oauth.d.ts.map +1 -0
- package/lib/types/host/glm-coding-plan/routes.d.ts +93 -0
- package/lib/types/host/glm-coding-plan/routes.d.ts.map +1 -0
- package/lib/types/host/glm-coding-plan/token-store.d.ts +202 -0
- package/lib/types/host/glm-coding-plan/token-store.d.ts.map +1 -0
- package/lib/types/host/glm-coding-plan/types.d.ts +492 -0
- package/lib/types/host/glm-coding-plan/types.d.ts.map +1 -0
- package/lib/types/host/hub-overview.d.ts +32 -0
- package/lib/types/host/hub-overview.d.ts.map +1 -0
- package/lib/types/host/kimi-code/account-pool.d.ts +124 -0
- package/lib/types/host/kimi-code/account-pool.d.ts.map +1 -0
- package/lib/types/host/kimi-code/adapter.d.ts +451 -0
- package/lib/types/host/kimi-code/adapter.d.ts.map +1 -0
- package/lib/types/host/kimi-code/api-key.d.ts +55 -0
- package/lib/types/host/kimi-code/api-key.d.ts.map +1 -0
- package/lib/types/host/kimi-code/cache-affinity.d.ts +112 -0
- package/lib/types/host/kimi-code/cache-affinity.d.ts.map +1 -0
- package/lib/types/host/kimi-code/cache-hint.d.ts +65 -0
- package/lib/types/host/kimi-code/cache-hint.d.ts.map +1 -0
- package/lib/types/host/kimi-code/client.d.ts +306 -0
- package/lib/types/host/kimi-code/client.d.ts.map +1 -0
- package/lib/types/host/kimi-code/mapper.d.ts +913 -0
- package/lib/types/host/kimi-code/mapper.d.ts.map +1 -0
- package/lib/types/host/kimi-code/media-files.d.ts +206 -0
- package/lib/types/host/kimi-code/media-files.d.ts.map +1 -0
- package/lib/types/host/kimi-code/modalities.d.ts +23 -0
- package/lib/types/host/kimi-code/modalities.d.ts.map +1 -0
- package/lib/types/host/kimi-code/model-catalog.d.ts +125 -0
- package/lib/types/host/kimi-code/model-catalog.d.ts.map +1 -0
- package/lib/types/host/kimi-code/oauth.d.ts +213 -0
- package/lib/types/host/kimi-code/oauth.d.ts.map +1 -0
- package/lib/types/host/kimi-code/routes.d.ts +52 -0
- package/lib/types/host/kimi-code/routes.d.ts.map +1 -0
- package/lib/types/host/kimi-code/session-cache-state.d.ts +156 -0
- package/lib/types/host/kimi-code/session-cache-state.d.ts.map +1 -0
- package/lib/types/host/kimi-code/token-store.d.ts +182 -0
- package/lib/types/host/kimi-code/token-store.d.ts.map +1 -0
- package/lib/types/host/kimi-code/tool-argument-guard.d.ts +43 -0
- package/lib/types/host/kimi-code/tool-argument-guard.d.ts.map +1 -0
- package/lib/types/host/kimi-code/types.d.ts +458 -0
- package/lib/types/host/kimi-code/types.d.ts.map +1 -0
- package/lib/types/host/kimi-code/warmup-streak.d.ts +66 -0
- package/lib/types/host/kimi-code/warmup-streak.d.ts.map +1 -0
- package/lib/types/host/minimax-code/account-pool.d.ts +309 -0
- package/lib/types/host/minimax-code/account-pool.d.ts.map +1 -0
- package/lib/types/host/minimax-code/adapter.d.ts +207 -0
- package/lib/types/host/minimax-code/adapter.d.ts.map +1 -0
- package/lib/types/host/minimax-code/checkin-gateway.d.ts +145 -0
- package/lib/types/host/minimax-code/checkin-gateway.d.ts.map +1 -0
- package/lib/types/host/minimax-code/checkin.d.ts +207 -0
- package/lib/types/host/minimax-code/checkin.d.ts.map +1 -0
- package/lib/types/host/minimax-code/client.d.ts +242 -0
- package/lib/types/host/minimax-code/client.d.ts.map +1 -0
- package/lib/types/host/minimax-code/files-api.d.ts +117 -0
- package/lib/types/host/minimax-code/files-api.d.ts.map +1 -0
- package/lib/types/host/minimax-code/iso-bmff-duration.d.ts +84 -0
- package/lib/types/host/minimax-code/iso-bmff-duration.d.ts.map +1 -0
- package/lib/types/host/minimax-code/mapper.d.ts +351 -0
- package/lib/types/host/minimax-code/mapper.d.ts.map +1 -0
- package/lib/types/host/minimax-code/matrix-client.d.ts +168 -0
- package/lib/types/host/minimax-code/matrix-client.d.ts.map +1 -0
- package/lib/types/host/minimax-code/modalities.d.ts +20 -0
- package/lib/types/host/minimax-code/modalities.d.ts.map +1 -0
- package/lib/types/host/minimax-code/model-catalog.d.ts +227 -0
- package/lib/types/host/minimax-code/model-catalog.d.ts.map +1 -0
- package/lib/types/host/minimax-code/oauth.d.ts +220 -0
- package/lib/types/host/minimax-code/oauth.d.ts.map +1 -0
- package/lib/types/host/minimax-code/reset-card.d.ts +136 -0
- package/lib/types/host/minimax-code/reset-card.d.ts.map +1 -0
- package/lib/types/host/minimax-code/routes.d.ts +82 -0
- package/lib/types/host/minimax-code/routes.d.ts.map +1 -0
- package/lib/types/host/minimax-code/token-store.d.ts +328 -0
- package/lib/types/host/minimax-code/token-store.d.ts.map +1 -0
- package/lib/types/host/minimax-code/tool-argument-repair.d.ts +72 -0
- package/lib/types/host/minimax-code/tool-argument-repair.d.ts.map +1 -0
- package/lib/types/host/minimax-code/types.d.ts +378 -0
- package/lib/types/host/minimax-code/types.d.ts.map +1 -0
- package/lib/types/host/model-catalog.d.ts +43 -0
- package/lib/types/host/model-catalog.d.ts.map +1 -0
- package/lib/types/host/oauth-service.d.ts +242 -0
- package/lib/types/host/oauth-service.d.ts.map +1 -0
- package/lib/types/host/ollama/account-pool.d.ts +65 -0
- package/lib/types/host/ollama/account-pool.d.ts.map +1 -0
- package/lib/types/host/ollama/adapter.d.ts +90 -0
- package/lib/types/host/ollama/adapter.d.ts.map +1 -0
- package/lib/types/host/ollama/client.d.ts +166 -0
- package/lib/types/host/ollama/client.d.ts.map +1 -0
- package/lib/types/host/ollama/mapper.d.ts +49 -0
- package/lib/types/host/ollama/mapper.d.ts.map +1 -0
- package/lib/types/host/ollama/routes.d.ts +22 -0
- package/lib/types/host/ollama/routes.d.ts.map +1 -0
- package/lib/types/host/ollama/token-store.d.ts +78 -0
- package/lib/types/host/ollama/token-store.d.ts.map +1 -0
- package/lib/types/host/ollama/types.d.ts +247 -0
- package/lib/types/host/ollama/types.d.ts.map +1 -0
- package/lib/types/host/opencode-go/account-pool.d.ts +50 -0
- package/lib/types/host/opencode-go/account-pool.d.ts.map +1 -0
- package/lib/types/host/opencode-go/adapter.d.ts +38 -0
- package/lib/types/host/opencode-go/adapter.d.ts.map +1 -0
- package/lib/types/host/opencode-go/client.d.ts +13 -0
- package/lib/types/host/opencode-go/client.d.ts.map +1 -0
- package/lib/types/host/opencode-go/mapper-gemini.d.ts +13 -0
- package/lib/types/host/opencode-go/mapper-gemini.d.ts.map +1 -0
- package/lib/types/host/opencode-go/mapper-messages.d.ts +8 -0
- package/lib/types/host/opencode-go/mapper-messages.d.ts.map +1 -0
- package/lib/types/host/opencode-go/mapper-responses.d.ts +9 -0
- package/lib/types/host/opencode-go/mapper-responses.d.ts.map +1 -0
- package/lib/types/host/opencode-go/mapper.d.ts +38 -0
- package/lib/types/host/opencode-go/mapper.d.ts.map +1 -0
- package/lib/types/host/opencode-go/model-catalog.d.ts +57 -0
- package/lib/types/host/opencode-go/model-catalog.d.ts.map +1 -0
- package/lib/types/host/opencode-go/native-shared.d.ts +31 -0
- package/lib/types/host/opencode-go/native-shared.d.ts.map +1 -0
- package/lib/types/host/opencode-go/protocol.d.ts +13 -0
- package/lib/types/host/opencode-go/protocol.d.ts.map +1 -0
- package/lib/types/host/opencode-go/routes.d.ts +13 -0
- package/lib/types/host/opencode-go/routes.d.ts.map +1 -0
- package/lib/types/host/opencode-go/token-store.d.ts +29 -0
- package/lib/types/host/opencode-go/token-store.d.ts.map +1 -0
- package/lib/types/host/opencode-go/types.d.ts +20 -0
- package/lib/types/host/opencode-go/types.d.ts.map +1 -0
- package/lib/types/host/opendesign/account-pool.d.ts +54 -0
- package/lib/types/host/opendesign/account-pool.d.ts.map +1 -0
- package/lib/types/host/opendesign/adapter.d.ts +88 -0
- package/lib/types/host/opendesign/adapter.d.ts.map +1 -0
- package/lib/types/host/opendesign/catalog.d.ts +58 -0
- package/lib/types/host/opendesign/catalog.d.ts.map +1 -0
- package/lib/types/host/opendesign/client.d.ts +304 -0
- package/lib/types/host/opendesign/client.d.ts.map +1 -0
- package/lib/types/host/opendesign/line.d.ts +60 -0
- package/lib/types/host/opendesign/line.d.ts.map +1 -0
- package/lib/types/host/opendesign/mapper.d.ts +218 -0
- package/lib/types/host/opendesign/mapper.d.ts.map +1 -0
- package/lib/types/host/opendesign/oauth.d.ts +105 -0
- package/lib/types/host/opendesign/oauth.d.ts.map +1 -0
- package/lib/types/host/opendesign/routes.d.ts +75 -0
- package/lib/types/host/opendesign/routes.d.ts.map +1 -0
- package/lib/types/host/opendesign/token-store.d.ts +241 -0
- package/lib/types/host/opendesign/token-store.d.ts.map +1 -0
- package/lib/types/host/opendesign/types.d.ts +235 -0
- package/lib/types/host/opendesign/types.d.ts.map +1 -0
- package/lib/types/host/platform-token-store.d.ts +3 -0
- package/lib/types/host/platform-token-store.d.ts.map +1 -0
- package/lib/types/host/preferences.d.ts +26 -0
- package/lib/types/host/preferences.d.ts.map +1 -0
- package/lib/types/host/proxy-manager.d.ts +261 -0
- package/lib/types/host/proxy-manager.d.ts.map +1 -0
- package/lib/types/host/qianwen-token-plan/adapter.d.ts +37 -0
- package/lib/types/host/qianwen-token-plan/adapter.d.ts.map +1 -0
- package/lib/types/host/qianwen-token-plan/cache-stats.d.ts +17 -0
- package/lib/types/host/qianwen-token-plan/cache-stats.d.ts.map +1 -0
- package/lib/types/host/qianwen-token-plan/client.d.ts +5 -0
- package/lib/types/host/qianwen-token-plan/client.d.ts.map +1 -0
- package/lib/types/host/qianwen-token-plan/mapper.d.ts +71 -0
- package/lib/types/host/qianwen-token-plan/mapper.d.ts.map +1 -0
- package/lib/types/host/qianwen-token-plan/model-catalog.d.ts +28 -0
- package/lib/types/host/qianwen-token-plan/model-catalog.d.ts.map +1 -0
- package/lib/types/host/qianwen-token-plan/routes.d.ts +12 -0
- package/lib/types/host/qianwen-token-plan/routes.d.ts.map +1 -0
- package/lib/types/host/qianwen-token-plan/token-store.d.ts +56 -0
- package/lib/types/host/qianwen-token-plan/token-store.d.ts.map +1 -0
- package/lib/types/host/qianwen-token-plan/types.d.ts +13 -0
- package/lib/types/host/qianwen-token-plan/types.d.ts.map +1 -0
- package/lib/types/host/qoder/account-pool.d.ts +141 -0
- package/lib/types/host/qoder/account-pool.d.ts.map +1 -0
- package/lib/types/host/qoder/adapter.d.ts +167 -0
- package/lib/types/host/qoder/adapter.d.ts.map +1 -0
- package/lib/types/host/qoder/adopt.d.ts +146 -0
- package/lib/types/host/qoder/adopt.d.ts.map +1 -0
- package/lib/types/host/qoder/client.d.ts +323 -0
- package/lib/types/host/qoder/client.d.ts.map +1 -0
- package/lib/types/host/qoder/cosy.d.ts +173 -0
- package/lib/types/host/qoder/cosy.d.ts.map +1 -0
- package/lib/types/host/qoder/mapper.d.ts +332 -0
- package/lib/types/host/qoder/mapper.d.ts.map +1 -0
- package/lib/types/host/qoder/model-catalog.d.ts +231 -0
- package/lib/types/host/qoder/model-catalog.d.ts.map +1 -0
- package/lib/types/host/qoder/oauth.d.ts +151 -0
- package/lib/types/host/qoder/oauth.d.ts.map +1 -0
- package/lib/types/host/qoder/routes.d.ts +119 -0
- package/lib/types/host/qoder/routes.d.ts.map +1 -0
- package/lib/types/host/qoder/token-store.d.ts +280 -0
- package/lib/types/host/qoder/token-store.d.ts.map +1 -0
- package/lib/types/host/qoder/types.d.ts +262 -0
- package/lib/types/host/qoder/types.d.ts.map +1 -0
- package/lib/types/host/relayone/account-pool.d.ts +129 -0
- package/lib/types/host/relayone/account-pool.d.ts.map +1 -0
- package/lib/types/host/relayone/adapter.d.ts +87 -0
- package/lib/types/host/relayone/adapter.d.ts.map +1 -0
- package/lib/types/host/relayone/catalog-manager.d.ts +45 -0
- package/lib/types/host/relayone/catalog-manager.d.ts.map +1 -0
- package/lib/types/host/relayone/client.d.ts +5 -0
- package/lib/types/host/relayone/client.d.ts.map +1 -0
- package/lib/types/host/relayone/mapper-anthropic.d.ts +49 -0
- package/lib/types/host/relayone/mapper-anthropic.d.ts.map +1 -0
- package/lib/types/host/relayone/mapper-openai.d.ts +36 -0
- package/lib/types/host/relayone/mapper-openai.d.ts.map +1 -0
- package/lib/types/host/relayone/mapper-shared.d.ts +25 -0
- package/lib/types/host/relayone/mapper-shared.d.ts.map +1 -0
- package/lib/types/host/relayone/model-catalog.d.ts +70 -0
- package/lib/types/host/relayone/model-catalog.d.ts.map +1 -0
- package/lib/types/host/relayone/quota.d.ts +29 -0
- package/lib/types/host/relayone/quota.d.ts.map +1 -0
- package/lib/types/host/relayone/routes.d.ts +33 -0
- package/lib/types/host/relayone/routes.d.ts.map +1 -0
- package/lib/types/host/relayone/token-store.d.ts +49 -0
- package/lib/types/host/relayone/token-store.d.ts.map +1 -0
- package/lib/types/host/relayone/types.d.ts +22 -0
- package/lib/types/host/relayone/types.d.ts.map +1 -0
- package/lib/types/host/responses-client.d.ts +125 -0
- package/lib/types/host/responses-client.d.ts.map +1 -0
- package/lib/types/host/responses-mapper.d.ts +133 -0
- package/lib/types/host/responses-mapper.d.ts.map +1 -0
- package/lib/types/host/routes.d.ts +30 -0
- package/lib/types/host/routes.d.ts.map +1 -0
- package/lib/types/host/search-provider-switcher.d.ts +45 -0
- package/lib/types/host/search-provider-switcher.d.ts.map +1 -0
- package/lib/types/host/session-title-guard/index.d.ts +80 -0
- package/lib/types/host/session-title-guard/index.d.ts.map +1 -0
- package/lib/types/host/step-code/account-pool.d.ts +187 -0
- package/lib/types/host/step-code/account-pool.d.ts.map +1 -0
- package/lib/types/host/step-code/adapter.d.ts +156 -0
- package/lib/types/host/step-code/adapter.d.ts.map +1 -0
- package/lib/types/host/step-code/adopt.d.ts +201 -0
- package/lib/types/host/step-code/adopt.d.ts.map +1 -0
- package/lib/types/host/step-code/cache-stats.d.ts +181 -0
- package/lib/types/host/step-code/cache-stats.d.ts.map +1 -0
- package/lib/types/host/step-code/client.d.ts +339 -0
- package/lib/types/host/step-code/client.d.ts.map +1 -0
- package/lib/types/host/step-code/mapper.d.ts +305 -0
- package/lib/types/host/step-code/mapper.d.ts.map +1 -0
- package/lib/types/host/step-code/model-catalog.d.ts +247 -0
- package/lib/types/host/step-code/model-catalog.d.ts.map +1 -0
- package/lib/types/host/step-code/oauth.d.ts +265 -0
- package/lib/types/host/step-code/oauth.d.ts.map +1 -0
- package/lib/types/host/step-code/routes.d.ts +129 -0
- package/lib/types/host/step-code/routes.d.ts.map +1 -0
- package/lib/types/host/step-code/token-store.d.ts +325 -0
- package/lib/types/host/step-code/token-store.d.ts.map +1 -0
- package/lib/types/host/step-code/types.d.ts +492 -0
- package/lib/types/host/step-code/types.d.ts.map +1 -0
- package/lib/types/host/token-store-linux.d.ts +20 -0
- package/lib/types/host/token-store-linux.d.ts.map +1 -0
- package/lib/types/host/token-store-macos.d.ts +39 -0
- package/lib/types/host/token-store-macos.d.ts.map +1 -0
- package/lib/types/host/token-store-windows.d.ts +26 -0
- package/lib/types/host/token-store-windows.d.ts.map +1 -0
- package/lib/types/host/token-store.d.ts +81 -0
- package/lib/types/host/token-store.d.ts.map +1 -0
- package/lib/types/host/usage-service.d.ts +109 -0
- package/lib/types/host/usage-service.d.ts.map +1 -0
- package/lib/types/host/web-provider-reconciler.d.ts +34 -0
- package/lib/types/host/web-provider-reconciler.d.ts.map +1 -0
- package/lib/types/host/wire-auth.d.ts +63 -0
- package/lib/types/host/wire-auth.d.ts.map +1 -0
- package/lib/types/host/workbuddy/account-pool.d.ts +389 -0
- package/lib/types/host/workbuddy/account-pool.d.ts.map +1 -0
- package/lib/types/host/workbuddy/adapter.d.ts +248 -0
- package/lib/types/host/workbuddy/adapter.d.ts.map +1 -0
- package/lib/types/host/workbuddy/atrest.d.ts +98 -0
- package/lib/types/host/workbuddy/atrest.d.ts.map +1 -0
- package/lib/types/host/workbuddy/checkin.d.ts +150 -0
- package/lib/types/host/workbuddy/checkin.d.ts.map +1 -0
- package/lib/types/host/workbuddy/client.d.ts +214 -0
- package/lib/types/host/workbuddy/client.d.ts.map +1 -0
- package/lib/types/host/workbuddy/dsml.d.ts +55 -0
- package/lib/types/host/workbuddy/dsml.d.ts.map +1 -0
- package/lib/types/host/workbuddy/guardrails.d.ts +111 -0
- package/lib/types/host/workbuddy/guardrails.d.ts.map +1 -0
- package/lib/types/host/workbuddy/identity.d.ts +71 -0
- package/lib/types/host/workbuddy/identity.d.ts.map +1 -0
- package/lib/types/host/workbuddy/mapper.d.ts +238 -0
- package/lib/types/host/workbuddy/mapper.d.ts.map +1 -0
- package/lib/types/host/workbuddy/model-catalog.d.ts +239 -0
- package/lib/types/host/workbuddy/model-catalog.d.ts.map +1 -0
- package/lib/types/host/workbuddy/oauth.d.ts +47 -0
- package/lib/types/host/workbuddy/oauth.d.ts.map +1 -0
- package/lib/types/host/workbuddy/outbound-identity.d.ts +139 -0
- package/lib/types/host/workbuddy/outbound-identity.d.ts.map +1 -0
- package/lib/types/host/workbuddy/routes.d.ts +56 -0
- package/lib/types/host/workbuddy/routes.d.ts.map +1 -0
- package/lib/types/host/workbuddy/token-store.d.ts +370 -0
- package/lib/types/host/workbuddy/token-store.d.ts.map +1 -0
- package/lib/types/host/workbuddy/types.d.ts +185 -0
- package/lib/types/host/workbuddy/types.d.ts.map +1 -0
- package/lib/types/index.d.ts +248 -0
- package/lib/types/index.d.ts.map +1 -0
- package/lib/types/shared/account-pool-contracts.d.ts +99 -0
- package/lib/types/shared/account-pool-contracts.d.ts.map +1 -0
- package/lib/types/shared/claude-api-contracts.d.ts +98 -0
- package/lib/types/shared/claude-api-contracts.d.ts.map +1 -0
- package/lib/types/shared/claude-contracts.d.ts +370 -0
- package/lib/types/shared/claude-contracts.d.ts.map +1 -0
- package/lib/types/shared/cline-pass-contracts.d.ts +234 -0
- package/lib/types/shared/cline-pass-contracts.d.ts.map +1 -0
- package/lib/types/shared/command-code-contracts.d.ts +163 -0
- package/lib/types/shared/command-code-contracts.d.ts.map +1 -0
- package/lib/types/shared/contracts.d.ts +343 -0
- package/lib/types/shared/contracts.d.ts.map +1 -0
- package/lib/types/shared/glm-coding-plan-contracts.d.ts +315 -0
- package/lib/types/shared/glm-coding-plan-contracts.d.ts.map +1 -0
- package/lib/types/shared/hub-contracts.d.ts +37 -0
- package/lib/types/shared/hub-contracts.d.ts.map +1 -0
- package/lib/types/shared/i18n-contracts.d.ts +35 -0
- package/lib/types/shared/i18n-contracts.d.ts.map +1 -0
- package/lib/types/shared/kimi-code-contracts.d.ts +435 -0
- package/lib/types/shared/kimi-code-contracts.d.ts.map +1 -0
- package/lib/types/shared/minimax-code-contracts.d.ts +263 -0
- package/lib/types/shared/minimax-code-contracts.d.ts.map +1 -0
- package/lib/types/shared/model-catalog.d.ts +302 -0
- package/lib/types/shared/model-catalog.d.ts.map +1 -0
- package/lib/types/shared/ollama-contracts.d.ts +73 -0
- package/lib/types/shared/ollama-contracts.d.ts.map +1 -0
- package/lib/types/shared/opencode-go-contracts.d.ts +80 -0
- package/lib/types/shared/opencode-go-contracts.d.ts.map +1 -0
- package/lib/types/shared/opendesign-contracts.d.ts +262 -0
- package/lib/types/shared/opendesign-contracts.d.ts.map +1 -0
- package/lib/types/shared/preferences.d.ts +60 -0
- package/lib/types/shared/preferences.d.ts.map +1 -0
- package/lib/types/shared/qianwen-token-plan-contracts.d.ts +94 -0
- package/lib/types/shared/qianwen-token-plan-contracts.d.ts.map +1 -0
- package/lib/types/shared/qoder-contracts.d.ts +342 -0
- package/lib/types/shared/qoder-contracts.d.ts.map +1 -0
- package/lib/types/shared/relayone-contracts.d.ts +95 -0
- package/lib/types/shared/relayone-contracts.d.ts.map +1 -0
- package/lib/types/shared/step-code-contracts.d.ts +443 -0
- package/lib/types/shared/step-code-contracts.d.ts.map +1 -0
- package/lib/types/shared/workbuddy-contracts.d.ts +531 -0
- package/lib/types/shared/workbuddy-contracts.d.ts.map +1 -0
- package/package.json +147 -4
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import type { StoredOAuthCredentials } from './token-store.ts';
|
|
2
|
+
type FetchLike = typeof fetch;
|
|
3
|
+
/** One model as the live listing describes it. */
|
|
4
|
+
export interface CodexCatalogEntry {
|
|
5
|
+
id: string;
|
|
6
|
+
name: string;
|
|
7
|
+
/** Window the listing stated, or null when it stated none. */
|
|
8
|
+
contextWindow: number | null;
|
|
9
|
+
inputModalities: readonly ('text' | 'image')[];
|
|
10
|
+
/** Reasoning levels the listing says the model accepts; absent when it stated none. */
|
|
11
|
+
reasoningEfforts?: readonly string[];
|
|
12
|
+
defaultReasoningEffort?: string | null;
|
|
13
|
+
/**
|
|
14
|
+
* Whether the listing says the model speaks the Responses Lite protocol.
|
|
15
|
+
*
|
|
16
|
+
* `undefined` when the listing stated nothing: the live listing is the
|
|
17
|
+
* authority on what this plan serves, but it is not the authority on what a
|
|
18
|
+
* model this line has never heard of speaks, so an absent flag falls back to
|
|
19
|
+
* the shipped table instead of being read as "not Lite".
|
|
20
|
+
*/
|
|
21
|
+
useResponsesLite?: boolean;
|
|
22
|
+
/** Server-stated automatic compaction threshold; null when absent. */
|
|
23
|
+
autoCompactTokenLimit?: number | null;
|
|
24
|
+
/** Opaque model-configuration compatibility key for compaction items. */
|
|
25
|
+
compHash?: string | null;
|
|
26
|
+
}
|
|
27
|
+
/** Drop the cached listing, forcing the next load to hit the network. */
|
|
28
|
+
export declare function clearCachedCatalog(): void;
|
|
29
|
+
/**
|
|
30
|
+
* The listing currently held, or undefined before the first load.
|
|
31
|
+
*
|
|
32
|
+
* "Currently held" is the entry a load wrote last: a picker asks what the
|
|
33
|
+
* account serving it can call, and that is the account whose listing was fetched
|
|
34
|
+
* most recently. Callers that need a catalog with no credential read the shipped
|
|
35
|
+
* table directly; returning it here under a different entry type would force
|
|
36
|
+
* every one of them to convert it.
|
|
37
|
+
*/
|
|
38
|
+
export declare function getCachedCatalog(): readonly CodexCatalogEntry[] | undefined;
|
|
39
|
+
/** Whether the held listing is the shipped table standing in for a failed call. */
|
|
40
|
+
export declare function isCatalogFallback(): boolean;
|
|
41
|
+
export interface CodexCatalogLoadOptions {
|
|
42
|
+
fetchFn?: FetchLike;
|
|
43
|
+
signal?: AbortSignal;
|
|
44
|
+
/** Bypass the cached listing and read the server again. */
|
|
45
|
+
force?: boolean;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Read the models this subscription can call.
|
|
49
|
+
*
|
|
50
|
+
* The shipped table in `shared/model-catalog.ts` stays the floor: it is what
|
|
51
|
+
* answers a picker before the first sign-in, and what a failed listing falls
|
|
52
|
+
* back to. The subscription listing is the authority once one is available,
|
|
53
|
+
* because only the backend knows which models a plan currently serves and at
|
|
54
|
+
* what context window — the reason subscription-only models exist at all.
|
|
55
|
+
*
|
|
56
|
+
* Single-flighted per account, because the harness resolves every model of every
|
|
57
|
+
* provider when it builds the picker; without that, one picker build is one
|
|
58
|
+
* round trip per model.
|
|
59
|
+
*/
|
|
60
|
+
export declare function loadCodexCatalog(credentials: StoredOAuthCredentials, options?: CodexCatalogLoadOptions): Promise<readonly CodexCatalogEntry[]>;
|
|
61
|
+
/**
|
|
62
|
+
* Read the listing payload.
|
|
63
|
+
*
|
|
64
|
+
* The documented shape is `{ models: [...] }`, but a bare array is accepted too
|
|
65
|
+
* so a backend that flattens the envelope does not read as an empty catalog.
|
|
66
|
+
*/
|
|
67
|
+
export declare function parseListing(payload: unknown): CodexCatalogEntry[];
|
|
68
|
+
export {};
|
|
69
|
+
//# sourceMappingURL=codex-catalog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codex-catalog.d.ts","sourceRoot":"","sources":["../../../src/host/codex-catalog.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAA;AAG9D,KAAK,SAAS,GAAG,OAAO,KAAK,CAAA;AAe7B,kDAAkD;AAClD,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,8DAA8D;IAC9D,aAAa,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,eAAe,EAAE,SAAS,CAAC,MAAM,GAAG,OAAO,CAAC,EAAE,CAAA;IAC9C,uFAAuF;IACvF,gBAAgB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IACpC,sBAAsB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACtC;;;;;;;OAOG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,sEAAsE;IACtE,qBAAqB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACrC,yEAAyE;IACzE,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CACzB;AA+BD,yEAAyE;AACzE,wBAAgB,kBAAkB,IAAI,IAAI,CAIzC;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,IAAI,SAAS,iBAAiB,EAAE,GAAG,SAAS,CAE3E;AAED,mFAAmF;AACnF,wBAAgB,iBAAiB,IAAI,OAAO,CAG3C;AAED,MAAM,WAAW,uBAAuB;IACtC,OAAO,CAAC,EAAE,SAAS,CAAA;IACnB,MAAM,CAAC,EAAE,WAAW,CAAA;IACpB,2DAA2D;IAC3D,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,gBAAgB,CAC9B,WAAW,EAAE,sBAAsB,EACnC,OAAO,GAAE,uBAA4B,GACpC,OAAO,CAAC,SAAS,iBAAiB,EAAE,CAAC,CAwBvC;AA6FD;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,OAAO,GAAG,iBAAiB,EAAE,CAKlE"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type WebFetchProvider } from '@deepseek-ai/dsh-web';
|
|
2
|
+
type FetchLike = typeof fetch;
|
|
3
|
+
/** Resolves a hostname to every address this machine's resolver returns. */
|
|
4
|
+
export type HostAddressResolver = (hostname: string) => Promise<readonly string[]>;
|
|
5
|
+
export interface CodexFetchProviderOptions {
|
|
6
|
+
fetchFn?: FetchLike;
|
|
7
|
+
maxResponseBytes?: number;
|
|
8
|
+
maxBodyChars?: number;
|
|
9
|
+
/**
|
|
10
|
+
* Address lookup behind the destination policy. Overridden only by focused
|
|
11
|
+
* tests; the policy itself is what every request goes through.
|
|
12
|
+
*/
|
|
13
|
+
resolveHostAddresses?: HostAddressResolver;
|
|
14
|
+
}
|
|
15
|
+
export declare function createCodexFetchProvider(options?: CodexFetchProviderOptions): WebFetchProvider;
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=codex-fetch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codex-fetch.d.ts","sourceRoot":"","sources":["../../../src/host/codex-fetch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,gBAAgB,EAA6C,MAAM,sBAAsB,CAAA;AAKjH,KAAK,SAAS,GAAG,OAAO,KAAK,CAAA;AAE7B,4EAA4E;AAC5E,MAAM,MAAM,mBAAmB,GAAG,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,SAAS,MAAM,EAAE,CAAC,CAAA;AAElF,MAAM,WAAW,yBAAyB;IACxC,OAAO,CAAC,EAAE,SAAS,CAAA;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB;;;OAGG;IACH,oBAAoB,CAAC,EAAE,mBAAmB,CAAA;CAC3C;AAED,wBAAgB,wBAAwB,CACtC,OAAO,GAAE,yBAA8B,GACtC,gBAAgB,CAgGlB"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { StoredOAuthCredentials } from './token-store.ts';
|
|
2
|
+
/**
|
|
3
|
+
* Reading a ChatGPT account backup: sub2api's JSON export and CPA's ZIP.
|
|
4
|
+
*
|
|
5
|
+
* BOTH FORMATS CARRY REAL REFRESH TOKENS, so this module is a validator first
|
|
6
|
+
* and a mapper second. An unrecognised shape is refused with a sentence instead
|
|
7
|
+
* of guessed at, every size is bounded before anything is allocated, and a ZIP
|
|
8
|
+
* entry that fails its integrity check aborts the whole archive: a partially
|
|
9
|
+
* imported backup is worse than one that was refused, because the user cannot
|
|
10
|
+
* tell which half landed.
|
|
11
|
+
*
|
|
12
|
+
* The files themselves are only ever READ. Whatever the export came from stays
|
|
13
|
+
* untouched, so a refused or repeated import cannot damage it.
|
|
14
|
+
*/
|
|
15
|
+
/** Largest upload this line accepts. Mirrored by the route's own 413. */
|
|
16
|
+
export declare const MAX_CREDENTIAL_IMPORT_BYTES: number;
|
|
17
|
+
export interface ParsedCodexCredentialFile {
|
|
18
|
+
format: 'cpa' | 'sub2api';
|
|
19
|
+
credentials: StoredOAuthCredentials[];
|
|
20
|
+
/** Records the file carried that are not a usable ChatGPT OAuth account. */
|
|
21
|
+
skipped: number;
|
|
22
|
+
}
|
|
23
|
+
/** The file was read but is not an export this line can import. */
|
|
24
|
+
export declare class CodexCredentialImportError extends Error {
|
|
25
|
+
constructor(message: string);
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* A CPA ZIP or a sub2api JSON export, recognised by content rather than by name.
|
|
29
|
+
*
|
|
30
|
+
* The two formats are told apart by their first four bytes (a ZIP local header),
|
|
31
|
+
* not by the upload's filename: the browser decides the name, and a user who
|
|
32
|
+
* renamed the file has not changed what is in it.
|
|
33
|
+
*/
|
|
34
|
+
export declare function parseCodexCredentialFile(buffer: Buffer): ParsedCodexCredentialFile;
|
|
35
|
+
//# sourceMappingURL=codex-file-import.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codex-file-import.d.ts","sourceRoot":"","sources":["../../../src/host/codex-file-import.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAA;AAG9D;;;;;;;;;;;;GAYG;AAEH,yEAAyE;AACzE,eAAO,MAAM,2BAA2B,QAAmB,CAAA;AAM3D,MAAM,WAAW,yBAAyB;IACxC,MAAM,EAAE,KAAK,GAAG,SAAS,CAAA;IACzB,WAAW,EAAE,sBAAsB,EAAE,CAAA;IACrC,4EAA4E;IAC5E,OAAO,EAAE,MAAM,CAAA;CAChB;AAED,mEAAmE;AACnE,qBAAa,0BAA2B,SAAQ,KAAK;gBACvC,OAAO,EAAE,MAAM;CAI5B;AAkMD;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,MAAM,GAAG,yBAAyB,CAWlF"}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import type { StoredOAuthCredentials } from './token-store.ts';
|
|
2
|
+
/**
|
|
3
|
+
* Who one ChatGPT credential belongs to, and what makes two sign-ins the same
|
|
4
|
+
* account.
|
|
5
|
+
*
|
|
6
|
+
* TWO IDENTITIES, AND THEY ARE NOT THE SAME THING.
|
|
7
|
+
*
|
|
8
|
+
* - The WORKSPACE identity is `chatgpt_account_id`, carried as
|
|
9
|
+
* `credentials.accountId` and sent upstream as `chatgpt-account-id`. It
|
|
10
|
+
* decides which workspace a request is billed to and what its listing serves,
|
|
11
|
+
* and every member of that workspace shares it.
|
|
12
|
+
* - The LOCAL LOGIN identity is (workspace, user): that same workspace id plus a
|
|
13
|
+
* stable id for the person who signed in. Two members of one workspace are two
|
|
14
|
+
* accounts here — separate tokens, separate rows, separately selectable — and
|
|
15
|
+
* re-authorizing the same person updates the row that person already owns.
|
|
16
|
+
*
|
|
17
|
+
* Keying the account pool on the workspace alone is the bug this module exists to
|
|
18
|
+
* prevent. Adding a second member of a workspace replaced the first: the card read
|
|
19
|
+
* "1 account signed in", the earlier sign-in was gone from the list, and nothing in
|
|
20
|
+
* the credential was wrong — the pool simply believed both sign-ins were one
|
|
21
|
+
* account, because that is what the key said.
|
|
22
|
+
*
|
|
23
|
+
* The user id is read from the tokens themselves, most explicit claim first:
|
|
24
|
+
* `chatgpt_user_id` (the field upstream states for exactly this purpose), then
|
|
25
|
+
* the OIDC `sub` that an id token always carries, then the address. Only when none
|
|
26
|
+
* of the three is present does the workspace stand in on its own, because nothing
|
|
27
|
+
* better exists then and merging is what every row written before this module
|
|
28
|
+
* already did. The workspace id alone is NEVER treated as a user identity while
|
|
29
|
+
* some user claim is available.
|
|
30
|
+
*/
|
|
31
|
+
/** Namespace of the ChatGPT auth claims inside an id or access token. */
|
|
32
|
+
export declare const CODEX_AUTH_CLAIMS_KEY = "https://api.openai.com/auth";
|
|
33
|
+
/**
|
|
34
|
+
* The claims this line reads, and no others.
|
|
35
|
+
*
|
|
36
|
+
* Every field is non-secret: an id, an address and a plan name. The token's
|
|
37
|
+
* signature is never touched and never verified here — the signing key is the
|
|
38
|
+
* issuer's, and what this module needs is who the token says it is, not whether
|
|
39
|
+
* someone could forge that claim. Forging it is the issuer's problem; a token this
|
|
40
|
+
* plugin accepted from the issuer is the input either way.
|
|
41
|
+
*/
|
|
42
|
+
export interface OAuthClaims {
|
|
43
|
+
/** Unix seconds. Read by 'codex-file-import.ts' to date an imported credential. */
|
|
44
|
+
exp?: unknown;
|
|
45
|
+
email?: unknown;
|
|
46
|
+
sub?: unknown;
|
|
47
|
+
chatgpt_account_id?: unknown;
|
|
48
|
+
chatgpt_user_id?: unknown;
|
|
49
|
+
chatgpt_plan_type?: unknown;
|
|
50
|
+
organizations?: Array<{
|
|
51
|
+
id?: unknown;
|
|
52
|
+
}>;
|
|
53
|
+
'https://api.openai.com/auth'?: {
|
|
54
|
+
chatgpt_account_id?: unknown;
|
|
55
|
+
chatgpt_user_id?: unknown;
|
|
56
|
+
chatgpt_plan_type?: unknown;
|
|
57
|
+
organizations?: Array<{
|
|
58
|
+
id?: unknown;
|
|
59
|
+
}>;
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
/** The non-secret facts a credential states about its owner. */
|
|
63
|
+
export interface CodexIdentity {
|
|
64
|
+
/** Upstream workspace id (`chatgpt-account-id`), shared by its whole membership. */
|
|
65
|
+
accountId?: string;
|
|
66
|
+
/** Stable id of the human who signed in; see {@link codexUserId}. */
|
|
67
|
+
userId?: string;
|
|
68
|
+
email?: string;
|
|
69
|
+
planType?: string;
|
|
70
|
+
}
|
|
71
|
+
/** The parts of a credential an identity can be read from. */
|
|
72
|
+
export type CodexIdentityInput = Pick<StoredOAuthCredentials, 'accessToken' | 'idToken' | 'accountId' | 'email' | 'userId'>;
|
|
73
|
+
/**
|
|
74
|
+
* The claims of a JWT, decoded in process, or nothing.
|
|
75
|
+
*
|
|
76
|
+
* The payload is the second base64url segment; the signature is never touched and
|
|
77
|
+
* the result is used only for the non-secret facts above. Never sent anywhere: a
|
|
78
|
+
* token handed to a decoder service is a token handed away.
|
|
79
|
+
*
|
|
80
|
+
* No verification is claimed and none is possible here. What this does instead is
|
|
81
|
+
* refuse to invent: a token that does not decode is treated as stating nothing,
|
|
82
|
+
* which leaves the caller on its own fallback rather than on a guessed identity.
|
|
83
|
+
*/
|
|
84
|
+
export declare function parseJwtClaims(token: string | undefined): OAuthClaims | undefined;
|
|
85
|
+
/**
|
|
86
|
+
* What the tokens state about their owner.
|
|
87
|
+
*
|
|
88
|
+
* The id token is read before the access token, because it is the document that
|
|
89
|
+
* describes the sign-in; the access token is the fallback for credentials stored
|
|
90
|
+
* without one. First statement wins, so a value the id token states is never
|
|
91
|
+
* overwritten by the access token's copy of it.
|
|
92
|
+
*/
|
|
93
|
+
export declare function extractIdentity(credentials: Pick<StoredOAuthCredentials, 'accessToken' | 'idToken'>): CodexIdentity;
|
|
94
|
+
/**
|
|
95
|
+
* The stable id of the human behind a credential, or nothing.
|
|
96
|
+
*
|
|
97
|
+
* Explicit claim first, then `sub`, and deliberately NOT the email: an address is
|
|
98
|
+
* the caller's fallback (see {@link codexAccountIdentity}), while this function
|
|
99
|
+
* answers the narrower question "does this credential name its user outright?".
|
|
100
|
+
* A persisted `userId` wins over anything re-derived from the tokens, so an opaque
|
|
101
|
+
* access token handed back by a rotation cannot make an account look like a
|
|
102
|
+
* different one.
|
|
103
|
+
*/
|
|
104
|
+
export declare function codexUserId(credentials: CodexIdentityInput): string | undefined;
|
|
105
|
+
/**
|
|
106
|
+
* One opaque key per local login: the pool's dedupe key, and the scope of every
|
|
107
|
+
* per-account cache this line keeps.
|
|
108
|
+
*
|
|
109
|
+
* A digest of an EXPLICIT serialization rather than a readable join, for three
|
|
110
|
+
* reasons that are really one: the string is a label, not data.
|
|
111
|
+
*
|
|
112
|
+
* - A separator can be forged. `workspace:user` joins two values that may
|
|
113
|
+
* themselves contain the separator, so `a` + `b:c` and `a:b` + `c` would have to
|
|
114
|
+
* be the same key. A JSON array has no such ambiguity: quotes and escapes are
|
|
115
|
+
* the boundary, and they cannot be re-cut by a value.
|
|
116
|
+
* - The key becomes a FILE NAME. `catalogSnapshotName` folds everything outside
|
|
117
|
+
* `[a-z0-9]` to `_`, so a readable key would collide with its neighbours after
|
|
118
|
+
* folding *and* leave an email address on disk. Hex survives the fold unchanged.
|
|
119
|
+
* - It is compared for equality only, so nothing is lost by making it opaque.
|
|
120
|
+
*
|
|
121
|
+
* `v1` is part of the serialized tuple, not decoration: a future change to the
|
|
122
|
+
* composition has to produce different keys, and a version tag is what lets that
|
|
123
|
+
* change be told apart from a corrupted row instead of silently merging two
|
|
124
|
+
* accounts that the new rule would separate.
|
|
125
|
+
*
|
|
126
|
+
* Returns `undefined` when the credential states nothing at all about who it is.
|
|
127
|
+
* The pool then mints its own `acc_<random>` and ADDS the row, which is the honest
|
|
128
|
+
* answer: a credential nothing identifies cannot be recognized again, and merging
|
|
129
|
+
* it with an unrelated one would be worse than a duplicate.
|
|
130
|
+
*/
|
|
131
|
+
export declare function codexAccountIdentity(credentials: CodexIdentityInput): string | undefined;
|
|
132
|
+
//# sourceMappingURL=codex-identity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codex-identity.d.ts","sourceRoot":"","sources":["../../../src/host/codex-identity.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAA;AAE9D;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,yEAAyE;AACzE,eAAO,MAAM,qBAAqB,gCAAgC,CAAA;AAElE;;;;;;;;GAQG;AACH,MAAM,WAAW,WAAW;IAC1B,mFAAmF;IACnF,GAAG,CAAC,EAAE,OAAO,CAAA;IACb,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,GAAG,CAAC,EAAE,OAAO,CAAA;IACb,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,aAAa,CAAC,EAAE,KAAK,CAAC;QAAE,EAAE,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC,CAAA;IACvC,6BAA6B,CAAC,EAAE;QAC9B,kBAAkB,CAAC,EAAE,OAAO,CAAA;QAC5B,eAAe,CAAC,EAAE,OAAO,CAAA;QACzB,iBAAiB,CAAC,EAAE,OAAO,CAAA;QAC3B,aAAa,CAAC,EAAE,KAAK,CAAC;YAAE,EAAE,CAAC,EAAE,OAAO,CAAA;SAAE,CAAC,CAAA;KACxC,CAAA;CACF;AAED,gEAAgE;AAChE,MAAM,WAAW,aAAa;IAC5B,oFAAoF;IACpF,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,qEAAqE;IACrE,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED,8DAA8D;AAC9D,MAAM,MAAM,kBAAkB,GAAG,IAAI,CACnC,sBAAsB,EACtB,aAAa,GAAG,SAAS,GAAG,WAAW,GAAG,OAAO,GAAG,QAAQ,CAC7D,CAAA;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,CAUjF;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAC7B,WAAW,EAAE,IAAI,CAAC,sBAAsB,EAAE,aAAa,GAAG,SAAS,CAAC,GACnE,aAAa,CAqBf;AAED;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CAAC,WAAW,EAAE,kBAAkB,GAAG,MAAM,GAAG,SAAS,CAI/E;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,kBAAkB,GAAG,MAAM,GAAG,SAAS,CAQxF"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { Message } from './common/llm-compat.ts';
|
|
2
|
+
/** Model/catalog facts that govern Codex Responses remote compaction v2. */
|
|
3
|
+
export interface CodexRemoteCompactionCapabilities {
|
|
4
|
+
contextWindow?: number | null;
|
|
5
|
+
autoCompactTokenLimit?: number | null;
|
|
6
|
+
compHash?: string | null;
|
|
7
|
+
}
|
|
8
|
+
/** An opaque server checkpoint plus the model configuration that minted it. */
|
|
9
|
+
export interface CodexRemoteCompactionCheckpoint {
|
|
10
|
+
item: Record<string, unknown>;
|
|
11
|
+
model: string;
|
|
12
|
+
compHash?: string;
|
|
13
|
+
}
|
|
14
|
+
/** Whether the Codex line currently owns compaction instead of DSH. */
|
|
15
|
+
export declare function codexRemoteCompactionEnabled(env?: NodeJS.ProcessEnv): boolean;
|
|
16
|
+
/** A definite protocol refusal disables remote compaction until restart. */
|
|
17
|
+
export declare function noteCodexRemoteCompactionFailure(error: unknown): boolean;
|
|
18
|
+
/** Test seam; production resets only by restarting the host. */
|
|
19
|
+
export declare function resetCodexRemoteCompaction(): void;
|
|
20
|
+
/** Official catalog thresholds win; otherwise Codex derives 90% of the window. */
|
|
21
|
+
export declare function codexRemoteCompactionThreshold(capabilities: CodexRemoteCompactionCapabilities): number | null;
|
|
22
|
+
/** Conservative, transport-independent estimate used only to schedule compaction. */
|
|
23
|
+
export declare function estimateCodexPayloadTokens(payload: Record<string, unknown>): number;
|
|
24
|
+
export declare function shouldCompactCodexPayload(payload: Record<string, unknown>, capabilities: CodexRemoteCompactionCapabilities, env?: NodeJS.ProcessEnv): boolean;
|
|
25
|
+
/** Official Codex remote-v2 uses an input item, not public /responses/compact. */
|
|
26
|
+
export declare function withCodexCompactionTrigger(payload: Record<string, unknown>): Record<string, unknown>;
|
|
27
|
+
/** Keep the static head and the latest user turn around a fresh checkpoint. */
|
|
28
|
+
export declare function projectFreshCodexCompaction<T extends Record<string, unknown>>(payload: T, checkpoint: CodexRemoteCompactionCheckpoint): T;
|
|
29
|
+
/** Latest valid checkpoint in the persisted DSH transcript, if one exists. */
|
|
30
|
+
export declare function latestCodexCompaction(messages: readonly Message[], model: string, compHash: string | null | undefined): {
|
|
31
|
+
index: number;
|
|
32
|
+
checkpoint: CodexRemoteCompactionCheckpoint;
|
|
33
|
+
} | null;
|
|
34
|
+
/** Read a checkpoint only when its model configuration remains compatible. */
|
|
35
|
+
export declare function checkpointFromMetadata(metadata: Record<string, unknown> | null, model: string, compHash: string | null | undefined): CodexRemoteCompactionCheckpoint | null;
|
|
36
|
+
/** Extract exactly one opaque compaction item from a completed remote-v2 stream. */
|
|
37
|
+
export declare function checkpointFromOutputItems(items: readonly unknown[], model: string, compHash: string | null | undefined): CodexRemoteCompactionCheckpoint | null;
|
|
38
|
+
/** Finish-chunk metadata persisted on the ordinary assistant answer. */
|
|
39
|
+
export declare function codexCompactionReplayMetadata(checkpoint: CodexRemoteCompactionCheckpoint): Record<string, unknown>;
|
|
40
|
+
export declare function isCompactionItem(value: unknown): value is Record<string, unknown>;
|
|
41
|
+
//# sourceMappingURL=codex-remote-compaction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codex-remote-compaction.d.ts","sourceRoot":"","sources":["../../../src/host/codex-remote-compaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AAErD,4EAA4E;AAC5E,MAAM,WAAW,iCAAiC;IAChD,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B,qBAAqB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACrC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CACzB;AAED,+EAA+E;AAC/E,MAAM,WAAW,+BAA+B;IAC9C,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC7B,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAID,uEAAuE;AACvE,wBAAgB,4BAA4B,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,OAAO,CAI1F;AAED,4EAA4E;AAC5E,wBAAgB,gCAAgC,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CASxE;AAED,gEAAgE;AAChE,wBAAgB,0BAA0B,IAAI,IAAI,CAEjD;AAED,kFAAkF;AAClF,wBAAgB,8BAA8B,CAC5C,YAAY,EAAE,iCAAiC,GAC9C,MAAM,GAAG,IAAI,CAOf;AAED,qFAAqF;AACrF,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CASnF;AAED,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAChC,YAAY,EAAE,iCAAiC,EAC/C,GAAG,GAAE,MAAM,CAAC,UAAwB,GACnC,OAAO,CAIT;AAED,kFAAkF;AAClF,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC/B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAGzB;AAED,+EAA+E;AAC/E,wBAAgB,2BAA2B,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC3E,OAAO,EAAE,CAAC,EACV,UAAU,EAAE,+BAA+B,GAC1C,CAAC,CAcH;AAED,8EAA8E;AAC9E,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,SAAS,OAAO,EAAE,EAC5B,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAClC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,+BAA+B,CAAA;CAAE,GAAG,IAAI,CAYvE;AAED,8EAA8E;AAC9E,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,EACxC,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAClC,+BAA+B,GAAG,IAAI,CASxC;AAED,oFAAoF;AACpF,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,SAAS,OAAO,EAAE,EACzB,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAClC,+BAA+B,GAAG,IAAI,CAQxC;AAED,wEAAwE;AACxE,wBAAgB,6BAA6B,CAC3C,UAAU,EAAE,+BAA+B,GAC1C,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAMzB;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAKjF"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type WebSearchProvider } from '@deepseek-ai/dsh-web';
|
|
2
|
+
import { OAuthService } from './oauth-service.ts';
|
|
3
|
+
type FetchLike = typeof fetch;
|
|
4
|
+
export interface CodexSearchProviderOptions {
|
|
5
|
+
fetchFn?: FetchLike;
|
|
6
|
+
model?: string;
|
|
7
|
+
idFactory?: () => string;
|
|
8
|
+
}
|
|
9
|
+
export declare function createCodexSearchProvider(oauth: OAuthService, options?: CodexSearchProviderOptions): WebSearchProvider;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=codex-search.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codex-search.d.ts","sourceRoot":"","sources":["../../../src/host/codex-search.ts"],"names":[],"mappings":"AAEA,OAAO,EAAY,KAAK,iBAAiB,EAAqE,MAAM,sBAAsB,CAAA;AAK1I,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAIjD,KAAK,SAAS,GAAG,OAAO,KAAK,CAAA;AAE7B,MAAM,WAAW,0BAA0B;IACzC,OAAO,CAAC,EAAE,SAAS,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,SAAS,CAAC,EAAE,MAAM,MAAM,CAAA;CACzB;AAID,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,YAAY,EACnB,OAAO,GAAE,0BAA+B,GACvC,iBAAiB,CA8BnB"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { AccountPoolCore, type PoolAccountShape, type PoolData } from '../common/account-pool.ts';
|
|
2
|
+
import type { CredentialStore } from '../token-store.ts';
|
|
3
|
+
import { FileCredentialStore, type CommandCodeCredentials } from './token-store.ts';
|
|
4
|
+
import type { CommandCodeAccountQuota, CommandCodeAccountSummaryDto, CommandCodeApiEnv } from '../../shared/command-code-contracts.ts';
|
|
5
|
+
import type { PoolAccountQuotaDto } from '../../shared/account-pool-contracts.ts';
|
|
6
|
+
/**
|
|
7
|
+
* One cached snapshot as the shared account card renders it.
|
|
8
|
+
*
|
|
9
|
+
* A usage window states its own consumed share, so it maps straight across; a
|
|
10
|
+
* window whose share nobody measured is dropped rather than drawn at 0, which
|
|
11
|
+
* would claim an unspent window no reading supports.
|
|
12
|
+
*
|
|
13
|
+
* Exported for the pool's regression tests; the card only reaches it through
|
|
14
|
+
* the summary hook.
|
|
15
|
+
*/
|
|
16
|
+
export declare function commandCodePoolQuota(cached: CommandCodeAccountQuota): PoolAccountQuotaDto | undefined;
|
|
17
|
+
/** One pooled Command Code key: the bearer key plus the account facts the card renders. */
|
|
18
|
+
export interface CommandCodePoolAccount extends PoolAccountShape<CommandCodeCredentials> {
|
|
19
|
+
email?: string;
|
|
20
|
+
userName?: string;
|
|
21
|
+
keyName?: string;
|
|
22
|
+
organizationName?: string;
|
|
23
|
+
planLabel?: string;
|
|
24
|
+
planId?: string;
|
|
25
|
+
userId?: string;
|
|
26
|
+
}
|
|
27
|
+
export type { CommandCodeAccountSummaryDto };
|
|
28
|
+
/** Encrypted pool file this line owns; the pre-pool credential file stays the mirror. */
|
|
29
|
+
export declare function commandCodePoolPath(): string;
|
|
30
|
+
/**
|
|
31
|
+
* Stable identity of one key.
|
|
32
|
+
*
|
|
33
|
+
* A user id plus the key name is what Command Code Studio itself shows, so two
|
|
34
|
+
* keys minted from the same account stay distinguishable; without a user id the
|
|
35
|
+
* key's digest is the identity. The digest is never written anywhere.
|
|
36
|
+
*/
|
|
37
|
+
export declare function commandCodeAccountKey(credentials: CommandCodeCredentials): string;
|
|
38
|
+
/** Validate and normalize one whole pool document. */
|
|
39
|
+
export declare function parseCommandCodePoolData(value: unknown): PoolData<CommandCodePoolAccount>;
|
|
40
|
+
export interface CommandCodeAccountPoolOptions {
|
|
41
|
+
/** Pre-pool credential file the pool mirrors its primary account into. */
|
|
42
|
+
store?: FileCredentialStore;
|
|
43
|
+
/** Test seam; production builds the platform backend from the pool path. */
|
|
44
|
+
backend?: CredentialStore<PoolData<CommandCodePoolAccount>>;
|
|
45
|
+
/** Accounts this pool accepts; defaults to the core's limit. */
|
|
46
|
+
maxAccounts?: number;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Command Code's account pool.
|
|
50
|
+
*
|
|
51
|
+
* A Command Code credential is a long-lived bearer key with nothing to refresh,
|
|
52
|
+
* so this wrapper only supplies identity, display facts and the mirror of the
|
|
53
|
+
* single-credential file the plugin used before the pool existed.
|
|
54
|
+
*/
|
|
55
|
+
export declare class CommandCodeAccountPool extends AccountPoolCore<CommandCodeCredentials, CommandCodePoolAccount, CommandCodeAccountSummaryDto> {
|
|
56
|
+
private readonly store;
|
|
57
|
+
constructor(options?: CommandCodeAccountPoolOptions);
|
|
58
|
+
/**
|
|
59
|
+
* Pick the key for the next request, with the API environment it belongs to.
|
|
60
|
+
*
|
|
61
|
+
* A key issued for one deployment must not be sent to another, so the
|
|
62
|
+
* environment travels with the credential rather than with the process.
|
|
63
|
+
*/
|
|
64
|
+
getEffectiveCredential(excludeIds?: ReadonlySet<string>, fetchFn?: typeof fetch): Promise<{
|
|
65
|
+
account: CommandCodePoolAccount;
|
|
66
|
+
credentials: CommandCodeCredentials;
|
|
67
|
+
apiEnv: CommandCodeApiEnv;
|
|
68
|
+
}>;
|
|
69
|
+
/** The pre-pool credential file this pool mirrors its primary account into. */
|
|
70
|
+
mirrorStore(): FileCredentialStore;
|
|
71
|
+
}
|
|
72
|
+
//# sourceMappingURL=account-pool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account-pool.d.ts","sourceRoot":"","sources":["../../../../src/host/command-code/account-pool.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,eAAe,EAGf,KAAK,gBAAgB,EACrB,KAAK,QAAQ,EACd,MAAM,2BAA2B,CAAA;AAClC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACxD,OAAO,EACL,mBAAmB,EAEnB,KAAK,sBAAsB,EAC5B,MAAM,kBAAkB,CAAA;AAKzB,OAAO,KAAK,EAAE,uBAAuB,EAAE,4BAA4B,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAA;AACtI,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAA;AAEjF;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,uBAAuB,GAAG,mBAAmB,GAAG,SAAS,CAMrG;AAeD,2FAA2F;AAC3F,MAAM,WAAW,sBAAuB,SAAQ,gBAAgB,CAAC,sBAAsB,CAAC;IACtF,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,YAAY,EAAE,4BAA4B,EAAE,CAAA;AAE5C,yFAAyF;AACzF,wBAAgB,mBAAmB,IAAI,MAAM,CAE5C;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,WAAW,EAAE,sBAAsB,GAAG,MAAM,CAKjF;AASD,sDAAsD;AACtD,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,OAAO,GAAG,QAAQ,CAAC,sBAAsB,CAAC,CAsCzF;AAED,MAAM,WAAW,6BAA6B;IAC5C,0EAA0E;IAC1E,KAAK,CAAC,EAAE,mBAAmB,CAAA;IAC3B,4EAA4E;IAC5E,OAAO,CAAC,EAAE,eAAe,CAAC,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAA;IAC3D,gEAAgE;IAChE,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AAED;;;;;;GAMG;AACH,qBAAa,sBAAuB,SAAQ,eAAe,CACzD,sBAAsB,EACtB,sBAAsB,EACtB,4BAA4B,CAC7B;IACC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAqB;gBAE/B,OAAO,GAAE,6BAAkC;IAwFvD;;;;;OAKG;IACG,sBAAsB,CAC1B,UAAU,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,EAChC,OAAO,GAAE,OAAO,KAAa,GAC5B,OAAO,CAAC;QAAE,OAAO,EAAE,sBAAsB,CAAC;QAAC,WAAW,EAAE,sBAAsB,CAAC;QAAC,MAAM,EAAE,iBAAiB,CAAA;KAAE,CAAC;IAK/G,+EAA+E;IAC/E,WAAW,IAAI,mBAAmB;CAGnC"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { LlmAdapter, ReasoningEffortId, type GenerateOptions, type LlmModelInfo, type LlmProviderInfo, type LlmResolvedModelInfo, type PreparedAdapterCall, type ResolvedRetryPolicy, type StreamChunk } from '@deepseek-ai/dsh-llm';
|
|
2
|
+
import { FileCredentialStore, FileModelSettingsStore, type CommandCodeCatalogModel, type CommandCodePreferenceStore } from './token-store.ts';
|
|
3
|
+
import { CommandCodeAccountPool } from './account-pool.ts';
|
|
4
|
+
import { type AttachmentImageReader } from './mapper.ts';
|
|
5
|
+
/** Configured effort when the model supports it, else the adapter's preference order. */
|
|
6
|
+
export declare function resolveDefaultReasoningEffort(efforts: readonly string[], configuredEffort?: string | null): ReasoningEffortId | undefined;
|
|
7
|
+
export interface CommandCodeAdapterOptions {
|
|
8
|
+
fetchFn?: typeof fetch;
|
|
9
|
+
attachments?: AttachmentImageReader;
|
|
10
|
+
/** Live catalog loader seam; defaults to the public `/provider/v1/models` call. */
|
|
11
|
+
loadCatalog?: () => Promise<CommandCodeCatalogModel[]>;
|
|
12
|
+
/** Opt into strict Zero Data Retention (ZDR) routing. Overrides host environment when set. */
|
|
13
|
+
zeroDataRetention?: boolean;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Resolves whether Zero Data Retention (ZDR) routing is active for Command Code.
|
|
17
|
+
* An explicit boolean on adapter options takes precedence over host environment variables.
|
|
18
|
+
* When not specified in options, DSH_COMMAND_CODE_ZDR is consulted first, then CMD_ZDR.
|
|
19
|
+
*/
|
|
20
|
+
export declare function resolveZeroDataRetention(optionsZdr?: boolean): boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Classifies model-specific access or plan entitlement denials.
|
|
23
|
+
* These are failures of permissions/entitlement for this model/account,
|
|
24
|
+
* not invalid API credentials, so the account must not be marked invalid
|
|
25
|
+
* and whole-account rotation must not occur.
|
|
26
|
+
*/
|
|
27
|
+
export declare function isCommandCodeModelAccessDenied(status: number, detail: string): boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Classifies actual credential invalidity (e.g. 401 Unauthorized, or 403 with explicit key errors).
|
|
30
|
+
*/
|
|
31
|
+
export declare function isCommandCodeCredentialInvalid(status: number, detail: string): boolean;
|
|
32
|
+
/** What one failed response means for this route's retry policy. */
|
|
33
|
+
export interface CommandCodeFailureClassification {
|
|
34
|
+
/** DSH error code; decides whether the route retries. */
|
|
35
|
+
code: string;
|
|
36
|
+
/** True only when the failure is worth repeating. */
|
|
37
|
+
retryable: boolean;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* The verdict one failed response becomes on this route.
|
|
41
|
+
*
|
|
42
|
+
* An in-band `error` event is a status the provider chose not to send as a
|
|
43
|
+
* status, so the chain that answers a non-2xx body has to answer it too rather
|
|
44
|
+
* than a second, looser one: every rule this route already owns - a model the
|
|
45
|
+
* plan does not include, a rejected key, a spent quota - keeps owning the
|
|
46
|
+
* answer, and the codes below are the ONLY place the HTTP path reads them from.
|
|
47
|
+
*
|
|
48
|
+
* `retryable` is membership of this route's own policy rather than a second
|
|
49
|
+
* judgement, because a code is worth repeating exactly when RETRY_POLICY repeats
|
|
50
|
+
* it; a verdict the policy would not act on must not be filed as transient.
|
|
51
|
+
*
|
|
52
|
+
* @param status - the response status, or the status an in-band type stands for.
|
|
53
|
+
* @param detail - the response body, or the serialized in-band error envelope.
|
|
54
|
+
*/
|
|
55
|
+
export declare function classifyCommandCodeFailure(status: number, detail: string): CommandCodeFailureClassification;
|
|
56
|
+
export declare class CommandCodeAdapter extends LlmAdapter {
|
|
57
|
+
private readonly store;
|
|
58
|
+
private readonly modelSettings;
|
|
59
|
+
private readonly preferences?;
|
|
60
|
+
private readonly options;
|
|
61
|
+
/**
|
|
62
|
+
* Rotation pool, or null for the single stored key.
|
|
63
|
+
*
|
|
64
|
+
* The pool is only ever installed by the plugin entry, which owns its storage.
|
|
65
|
+
* An adapter built without one must keep reading the one credential file and
|
|
66
|
+
* must not create pool state on its own: that state outlives the process and
|
|
67
|
+
* would leak cooldowns between unrelated runs.
|
|
68
|
+
*/
|
|
69
|
+
private readonly accountPool;
|
|
70
|
+
/** Follows the session's main-turn effort onto auxiliary (compaction/timeline/review) requests. */
|
|
71
|
+
private readonly effortMemory;
|
|
72
|
+
constructor(store?: FileCredentialStore, modelSettings?: FileModelSettingsStore, preferences?: CommandCodePreferenceStore | undefined, options?: CommandCodeAdapterOptions, accountPool?: CommandCodeAccountPool);
|
|
73
|
+
providerInfo(provider: string): LlmProviderInfo;
|
|
74
|
+
providerRetryPolicy(): ResolvedRetryPolicy;
|
|
75
|
+
imageRequestPricing(): undefined;
|
|
76
|
+
private settings;
|
|
77
|
+
/**
|
|
78
|
+
* Catalog for the picker: the live Command Code listing when reachable, the
|
|
79
|
+
* shipped fallback otherwise, narrowed by the user's enabled selection.
|
|
80
|
+
*/
|
|
81
|
+
private catalog;
|
|
82
|
+
private contextWindowFor;
|
|
83
|
+
listModels(provider?: string): Promise<readonly LlmModelInfo[]>;
|
|
84
|
+
resolveModel(provider: string, modelId: string, signal?: AbortSignal): Promise<LlmResolvedModelInfo>;
|
|
85
|
+
prepareCall(provider: string, model: string, signal?: AbortSignal): Promise<PreparedAdapterCall>;
|
|
86
|
+
stream(options: GenerateOptions): AsyncIterable<StreamChunk>;
|
|
87
|
+
private requestStream;
|
|
88
|
+
}
|
|
89
|
+
//# sourceMappingURL=adapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../../src/host/command-code/adapter.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,UAAU,EACV,iBAAiB,EAGjB,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,WAAW,EACjB,MAAM,sBAAsB,CAAA;AAoB7B,OAAO,EACL,mBAAmB,EACnB,sBAAsB,EACtB,KAAK,uBAAuB,EAC5B,KAAK,0BAA0B,EAChC,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAA;AAE1D,OAAO,EAUL,KAAK,qBAAqB,EAG3B,MAAM,aAAa,CAAA;AA4BpB,yFAAyF;AACzF,wBAAgB,6BAA6B,CAC3C,OAAO,EAAE,SAAS,MAAM,EAAE,EAC1B,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,GAC/B,iBAAiB,GAAG,SAAS,CAK/B;AAED,MAAM,WAAW,yBAAyB;IACxC,OAAO,CAAC,EAAE,OAAO,KAAK,CAAA;IACtB,WAAW,CAAC,EAAE,qBAAqB,CAAA;IACnC,mFAAmF;IACnF,WAAW,CAAC,EAAE,MAAM,OAAO,CAAC,uBAAuB,EAAE,CAAC,CAAA;IACtD,8FAA8F;IAC9F,iBAAiB,CAAC,EAAE,OAAO,CAAA;CAC5B;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,UAAU,CAAC,EAAE,OAAO,GAAG,OAAO,CAMtE;AAED;;;;;GAKG;AACH,wBAAgB,8BAA8B,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAsCtF;AAED;;GAEG;AACH,wBAAgB,8BAA8B,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAuBtF;AAED,oEAAoE;AACpE,MAAM,WAAW,gCAAgC;IAC/C,yDAAyD;IACzD,IAAI,EAAE,MAAM,CAAA;IACZ,qDAAqD;IACrD,SAAS,EAAE,OAAO,CAAA;CACnB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,0BAA0B,CACxC,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,GACb,gCAAgC,CAsBlC;AAKD,qBAAa,kBAAmB,SAAQ,UAAU;IAe9C,OAAO,CAAC,QAAQ,CAAC,KAAK;IACtB,OAAO,CAAC,QAAQ,CAAC,aAAa;IAC9B,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC;IAC7B,OAAO,CAAC,QAAQ,CAAC,OAAO;IAjB1B;;;;;;;OAOG;IACH,OAAO,CAAC,QAAQ,CAAC,WAAW,CAA+B;IAE3D,mGAAmG;IACnG,OAAO,CAAC,QAAQ,CAAC,YAAY,CAA4B;gBAGtC,KAAK,sBAA4B,EACjC,aAAa,yBAA+B,EAC5C,WAAW,CAAC,EAAE,0BAA0B,YAAA,EACxC,OAAO,GAAE,yBAA8B,EACxD,WAAW,CAAC,EAAE,sBAAsB;IAMtC,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,eAAe;IAI/C,mBAAmB,IAAI,mBAAmB;IAI1C,mBAAmB,IAAI,SAAS;IAIhC,OAAO,CAAC,QAAQ;IAIhB;;;OAGG;YACW,OAAO;IAYrB,OAAO,CAAC,gBAAgB;IAUlB,UAAU,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,YAAY,EAAE,CAAC;IAgB/D,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAgCpG,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAO/F,MAAM,CAAC,OAAO,EAAE,eAAe,GAAG,aAAa,CAAC,WAAW,CAAC;YAkCpD,aAAa;CA8S7B"}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { PROVIDER_ID } from './types.ts';
|
|
2
|
+
import { FileCredentialStore, type CommandCodeCatalogModel } from './token-store.ts';
|
|
3
|
+
import type { CommandCodeAccount, CommandCodeAccountQuota, CommandCodeApiEnv, CommandCodeMeter, CommandCodeUsageWindow, CommandCodeWire } from '../../shared/command-code-contracts.ts';
|
|
4
|
+
export interface CommandCodeRequestOptions {
|
|
5
|
+
fetchFn?: typeof fetch;
|
|
6
|
+
signal?: AbortSignal;
|
|
7
|
+
apiEnv?: CommandCodeApiEnv;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Attribution headers for every Command Code request.
|
|
11
|
+
*
|
|
12
|
+
* The alpha routes are the ones the official CLI calls, so the plugin
|
|
13
|
+
* identifies with the same vocabulary; the provider API only needs the bearer
|
|
14
|
+
* token plus a JSON content type.
|
|
15
|
+
*/
|
|
16
|
+
export declare function commandCodeHeaders(apiKey: string, extra?: Record<string, string>): Record<string, string>;
|
|
17
|
+
/** Map `/alpha/whoami` (or a stored key's own facts) onto the public account DTO. */
|
|
18
|
+
export declare function parseWhoami(payload: unknown, fallback?: Partial<CommandCodeAccount>): CommandCodeAccount;
|
|
19
|
+
/** Resolve the plan id the subscription or credits payload reports, when either does. */
|
|
20
|
+
export declare function parsePlanId(payloads: readonly unknown[]): string | null;
|
|
21
|
+
/**
|
|
22
|
+
* Subscription status such as `active`, `trialing`, or `past_due`.
|
|
23
|
+
*
|
|
24
|
+
* The CLI treats exactly `active`, `trialing`, and `past_due` as entitled, so
|
|
25
|
+
* the status is surfaced rather than swallowed: a card that showed an expired
|
|
26
|
+
* subscription's remaining credits as usable would be worse than showing none.
|
|
27
|
+
*/
|
|
28
|
+
export declare function parseSubscriptionStatus(payload: unknown): string | null;
|
|
29
|
+
/** End of the current billing period, in Unix milliseconds. */
|
|
30
|
+
export declare function parseSubscriptionPeriodEnd(payload: unknown): number | null;
|
|
31
|
+
/**
|
|
32
|
+
* Turn one billing/usage payload into meters.
|
|
33
|
+
*
|
|
34
|
+
* The named blocks the service actually sends are read first, so windows carry
|
|
35
|
+
* their real labels; the generic sweep afterwards still catches any bounded
|
|
36
|
+
* allowance a future payload introduces, rather than reporting nothing.
|
|
37
|
+
*/
|
|
38
|
+
export declare function parseMeters(payload: unknown): CommandCodeMeter[];
|
|
39
|
+
/** Parse an ISO string, Unix seconds, or Unix milliseconds into Unix milliseconds. */
|
|
40
|
+
export declare function parseTimestamp(value: unknown): number | null;
|
|
41
|
+
/** Map `/alpha/usage/summary` onto the windowed allowance DTO. */
|
|
42
|
+
export declare function parseUsageWindows(payload: unknown): CommandCodeUsageWindow[];
|
|
43
|
+
/**
|
|
44
|
+
* Total remaining credits.
|
|
45
|
+
*
|
|
46
|
+
* `/alpha/billing/credits` reports three separate pools rather than one total
|
|
47
|
+
* (`credits.monthlyCredits`, `purchasedCredits`, `freeCredits`), and a plain
|
|
48
|
+
* `credits` lookup only finds the containing object — which is why this used to
|
|
49
|
+
* answer null and the card showed a blank balance. The pools are summed exactly
|
|
50
|
+
* as the CLI sums them; a payload that reports a flat balance still works.
|
|
51
|
+
*/
|
|
52
|
+
/** Exported for the quota regression tests; not part of the route surface. */
|
|
53
|
+
export declare function extractCreditsBalanceForTest(payload: unknown): string | null;
|
|
54
|
+
/** Parse the public `/provider/v1/models` payload. */
|
|
55
|
+
export declare function parseProviderModels(payload: unknown): CommandCodeCatalogModel[];
|
|
56
|
+
/**
|
|
57
|
+
* Fetch the live catalog. The endpoint is public, so this works before sign-in
|
|
58
|
+
* and is what fills the settings card's context-window defaults.
|
|
59
|
+
*/
|
|
60
|
+
export declare function fetchProviderModels(options?: CommandCodeRequestOptions): Promise<CommandCodeCatalogModel[]>;
|
|
61
|
+
/** Cached catalog with a TTL; a failed refresh keeps the previous snapshot.
|
|
62
|
+
*
|
|
63
|
+
* On the first cache miss of a process the persisted snapshot is rehydrated
|
|
64
|
+
* first, so a restart serves the previous listing without waiting on the
|
|
65
|
+
* network. An expired snapshot still answers immediately (stale) while a
|
|
66
|
+
* refresh runs in the background — the catalog is not fast-moving data, and
|
|
67
|
+
* waiting on an unreachable endpoint turned a restart into the full discovery
|
|
68
|
+
* timeout on every model resolution.
|
|
69
|
+
*/
|
|
70
|
+
export declare function loadProviderModels(options?: CommandCodeRequestOptions & {
|
|
71
|
+
force?: boolean;
|
|
72
|
+
}): Promise<CommandCodeCatalogModel[]>;
|
|
73
|
+
export declare function getCachedCatalog(): CommandCodeCatalogModel[];
|
|
74
|
+
export declare function isCatalogStale(): boolean;
|
|
75
|
+
export declare function getCachedCatalogFetchedAt(): number | null;
|
|
76
|
+
export declare function clearCachedCatalog(): void;
|
|
77
|
+
/** Effective context window: a saved override wins over the catalog value. */
|
|
78
|
+
export declare function effectiveContextWindow(modelId: string, catalog: readonly CommandCodeCatalogModel[], overrides: Record<string, number>): number;
|
|
79
|
+
export declare function whoami(apiKey: string, options?: CommandCodeRequestOptions): Promise<unknown>;
|
|
80
|
+
/**
|
|
81
|
+
* Verify one API key and read the account facts behind it.
|
|
82
|
+
*
|
|
83
|
+
* This is the single validation point used by manual key entry, by the browser
|
|
84
|
+
* callback, and by the connection test, so a key that cannot answer `whoami`
|
|
85
|
+
* is never stored.
|
|
86
|
+
*/
|
|
87
|
+
export declare function verifyApiKey(apiKey: string, options?: CommandCodeRequestOptions): Promise<CommandCodeAccount>;
|
|
88
|
+
/**
|
|
89
|
+
* Returns the quota snapshot for the most recently requested account.
|
|
90
|
+
* Kept with a no-argument signature for backward compatibility.
|
|
91
|
+
*/
|
|
92
|
+
export declare function getCachedQuota(): CommandCodeAccountQuota | undefined;
|
|
93
|
+
/**
|
|
94
|
+
* The cached snapshot only when it belongs to this account.
|
|
95
|
+
*
|
|
96
|
+
* Passing no account keeps the pre-pool behavior of returning whatever was
|
|
97
|
+
* fetched last. This is the lookup the account pool calls while it builds its
|
|
98
|
+
* summaries: a pure memory read, never a fetch.
|
|
99
|
+
*/
|
|
100
|
+
export declare function getCachedQuotaFor(accountId?: string | null): CommandCodeAccountQuota | undefined;
|
|
101
|
+
export declare function clearCachedQuota(): void;
|
|
102
|
+
export interface FetchAccountQuotaOptions {
|
|
103
|
+
fetchFn?: typeof fetch;
|
|
104
|
+
force?: boolean;
|
|
105
|
+
accountId?: string;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Read credits, subscriptions, and usage, tolerating a service that answers
|
|
109
|
+
* only some of the three. Every failure is captured as a missing source rather
|
|
110
|
+
* than failing the whole snapshot, because a working credit balance is still
|
|
111
|
+
* worth showing when the usage route is down.
|
|
112
|
+
*/
|
|
113
|
+
export declare function fetchAccountQuota(store?: Pick<FileCredentialStore, 'read'>, fetchFnOrOptions?: typeof fetch | FetchAccountQuotaOptions, force?: boolean, accountId?: string): Promise<CommandCodeAccountQuota>;
|
|
114
|
+
/** Catalog entry list with the exact defaults the settings card renders. */
|
|
115
|
+
export declare function buildModelOptions(catalog: readonly CommandCodeCatalogModel[], enabledModelIds: readonly string[], overrides: Record<string, number>): Array<{
|
|
116
|
+
id: string;
|
|
117
|
+
name: string;
|
|
118
|
+
enabled: boolean;
|
|
119
|
+
defaultContextWindow: number;
|
|
120
|
+
contextWindow: number;
|
|
121
|
+
defaultMaxTokens: number;
|
|
122
|
+
reasoningEfforts?: string[];
|
|
123
|
+
wire: CommandCodeWire;
|
|
124
|
+
}>;
|
|
125
|
+
export { PROVIDER_ID };
|
|
126
|
+
//# sourceMappingURL=client.d.ts.map
|