@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,417 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Static facts about Anthropic's Claude subscription surface.
|
|
3
|
+
*
|
|
4
|
+
* The subscription (Claude Pro/Max, the credential Claude Code uses) is a
|
|
5
|
+
* distinct product from the pay-as-you-go Console API. It is served by the same
|
|
6
|
+
* host — https://api.anthropic.com — but a subscription credential is a Bearer
|
|
7
|
+
* **OAuth access token**, not an `x-api-key`, and the subscription routes are
|
|
8
|
+
* gated behind betas the API-key line never sends.
|
|
9
|
+
*
|
|
10
|
+
* Every constant below was read out of a locally installed reference
|
|
11
|
+
* implementation, not recalled: the Anthropic wire layer and OAuth module of
|
|
12
|
+
* `@earendil-works/pi-ai` (dist/api/anthropic-messages.js,
|
|
13
|
+
* dist/auth/oauth/anthropic.js) and its `data/anthropic.json` model snapshot.
|
|
14
|
+
* Each constant names the source that establishes it, so a later reviewer can
|
|
15
|
+
* re-check the claim instead of trusting this file.
|
|
16
|
+
*
|
|
17
|
+
* The one fact this module cannot assert is which models the *server* will
|
|
18
|
+
* serve, or at what entitlement: that answer is the server's own
|
|
19
|
+
* GET /v1/models plus the account's plan, and the sibling model table says so
|
|
20
|
+
* at length.
|
|
21
|
+
*/
|
|
22
|
+
/** Provider id registered with DSH. */
|
|
23
|
+
export declare const PROVIDER_ID = "claude-subscription";
|
|
24
|
+
/** Display name for the settings surface and the model picker. */
|
|
25
|
+
export declare const PROVIDER_NAME = "Claude\uFF08\u8BA2\u9605\uFF09";
|
|
26
|
+
/** Host serving both the Messages API and the subscription's own OAuth routes. */
|
|
27
|
+
export declare const API_BASE = "https://api.anthropic.com";
|
|
28
|
+
/**
|
|
29
|
+
* Path the Messages API is posted to.
|
|
30
|
+
*
|
|
31
|
+
* The `?beta=true` query is part of the subscription contract rather than a
|
|
32
|
+
* cache buster: it is the beta route, not an alias of the plain one, so dropping
|
|
33
|
+
* it changes which endpoint answers rather than how the same endpoint is cached.
|
|
34
|
+
*/
|
|
35
|
+
export declare const MESSAGES_PATH = "/v1/messages?beta=true";
|
|
36
|
+
/** Model listing. The authority on what this account can actually call. */
|
|
37
|
+
export declare const MODELS_PATH = "/v1/models";
|
|
38
|
+
/** Subscription usage meters (the 5-hour and 7-day windows). */
|
|
39
|
+
export declare const USAGE_PATH = "/api/oauth/usage";
|
|
40
|
+
/**
|
|
41
|
+
* Browser authorization endpoint of the subscription flow.
|
|
42
|
+
*
|
|
43
|
+
* This is the claude.ai property, which is what makes the resulting token a
|
|
44
|
+
* subscription credential. The Console's own authorization host mints
|
|
45
|
+
* API-key-scoped grants instead and is deliberately not used here.
|
|
46
|
+
*
|
|
47
|
+
* Overridable: see {@link oauthAuthorizeUrl}.
|
|
48
|
+
*/
|
|
49
|
+
export declare const OAUTH_AUTHORIZE_URL = "https://claude.com/cai/oauth/authorize";
|
|
50
|
+
/** Token endpoint for both the authorization-code grant and refresh. */
|
|
51
|
+
export declare const OAUTH_TOKEN_URL = "https://platform.claude.com/v1/oauth/token";
|
|
52
|
+
/**
|
|
53
|
+
* Redirect URI for the manual paste flow.
|
|
54
|
+
*
|
|
55
|
+
* The loopback flow ({@link loopbackRedirectUri}) is the primary one, but the
|
|
56
|
+
* authorization host only accepts a redirect URI the client is registered for.
|
|
57
|
+
* When no browser on this machine can complete the callback — a headless box, a
|
|
58
|
+
* remote shell, a browser in another profile — the user opens the authorize URL,
|
|
59
|
+
* lets the page fail to load, and pastes the resulting code back. Recognising
|
|
60
|
+
* this URI is what lets the flow tell the two apart.
|
|
61
|
+
*/
|
|
62
|
+
export declare const OAUTH_MANUAL_REDIRECT_URI = "https://platform.claude.com/oauth/code/callback";
|
|
63
|
+
/**
|
|
64
|
+
* Public OAuth client id of the subscription flow.
|
|
65
|
+
*
|
|
66
|
+
* A public client id is not a secret — it identifies the client, and PKCE is
|
|
67
|
+
* what actually protects the exchange. It is still a fixed upstream fact: the
|
|
68
|
+
* authorization host rejects an unknown client id before any user is asked to
|
|
69
|
+
* authorize anything.
|
|
70
|
+
*/
|
|
71
|
+
export declare const OAUTH_CLIENT_ID = "9d1c250a-e61b-44d9-88ed-5944d1962f5e";
|
|
72
|
+
/**
|
|
73
|
+
* Scopes the subscription flow requests, space-separated as the endpoint wants.
|
|
74
|
+
*
|
|
75
|
+
* `user:inference` is the one that makes the token usable against
|
|
76
|
+
* /v1/messages; `user:profile` is what the usage endpoint answers against.
|
|
77
|
+
* A narrower set yields a token that authenticates but is refused on the routes
|
|
78
|
+
* this provider exists to serve, so the full set is requested.
|
|
79
|
+
*/
|
|
80
|
+
export declare const OAUTH_SCOPES = "org:create_api_key user:profile user:inference user:sessions:claude_code user:mcp_servers user:file_upload";
|
|
81
|
+
/**
|
|
82
|
+
* Scopes a refresh asks for when the credential being refreshed records none.
|
|
83
|
+
*
|
|
84
|
+
* The claude.ai subset of {@link OAUTH_SCOPES} - everything but
|
|
85
|
+
* `org:create_api_key` - which is the set the official client sends on every
|
|
86
|
+
* refresh. The authorization host strips `org:create_api_key` from a
|
|
87
|
+
* subscription grant without failing the sign-in, and a refresh may not ask for
|
|
88
|
+
* a scope the grant does not hold (RFC 6749 section 6), so re-asking for the
|
|
89
|
+
* full authorize set is answered with `invalid_scope`. A credential that does
|
|
90
|
+
* record its scopes is refreshed with exactly those; see oauth.ts's
|
|
91
|
+
* refreshScopeFor.
|
|
92
|
+
*/
|
|
93
|
+
export declare const OAUTH_REFRESH_FALLBACK_SCOPES = "user:profile user:inference user:sessions:claude_code user:mcp_servers user:file_upload";
|
|
94
|
+
/**
|
|
95
|
+
* Required on any request authenticated with a subscription OAuth token.
|
|
96
|
+
*
|
|
97
|
+
* The `anthropic-beta` header is cumulative: one request carries every marker
|
|
98
|
+
* that applies, and the values below are the wire tokens, not capability names.
|
|
99
|
+
*/
|
|
100
|
+
export declare const OAUTH_BETA = "oauth-2025-04-20";
|
|
101
|
+
/** Identity beta pairing with the Claude Code system prompt and version headers. */
|
|
102
|
+
export declare const CLAUDE_CODE_BETA = "claude-code-20250219";
|
|
103
|
+
/** Lets thinking blocks interleave with tool use across a multi-turn loop. */
|
|
104
|
+
export declare const INTERLEAVED_THINKING_BETA = "interleaved-thinking-2025-05-14";
|
|
105
|
+
/**
|
|
106
|
+
* Licenses the extended one-hour prompt-cache TTL.
|
|
107
|
+
*
|
|
108
|
+
* `cache_control: { type: 'ephemeral', ttl: '1h' }` is NOT accepted without this
|
|
109
|
+
* beta: the one-hour tier is a separate licensed capability, and a body that
|
|
110
|
+
* asks for it without the marker is refused the same way `block_binding` is.
|
|
111
|
+
*/
|
|
112
|
+
export declare const EXTENDED_CACHE_TTL_BETA = "extended-cache-ttl-2025-04-11";
|
|
113
|
+
/**
|
|
114
|
+
* Prompt-cache TTL this line asks for.
|
|
115
|
+
*
|
|
116
|
+
* Anthropic offers two tiers. The official CLI documents that a Claude
|
|
117
|
+
* SUBSCRIPTION's main conversation uses the one-hour tier while it is drawing
|
|
118
|
+
* on included plan usage, and drops to five minutes once the plan is exhausted
|
|
119
|
+
* and requests bill against usage credits. This line authenticates with a
|
|
120
|
+
* subscription token, so the subscription tier is the one that matches the
|
|
121
|
+
* official client's behaviour — and a user comparing this plugin against the
|
|
122
|
+
* official CLI should see the same cache lifetime, not half of it.
|
|
123
|
+
*
|
|
124
|
+
* The write is 1.25x the price of a five-minute write, so a short session that
|
|
125
|
+
* never re-reads the prefix pays more. That is the official trade-off and the
|
|
126
|
+
* user may override it.
|
|
127
|
+
*/
|
|
128
|
+
export type ClaudeCacheTtl = '5m' | '1h';
|
|
129
|
+
/** TTL the official subscription client uses for its main conversation. */
|
|
130
|
+
export declare const CLAUDE_SUBSCRIPTION_CACHE_TTL: ClaudeCacheTtl;
|
|
131
|
+
/** The plain marker, i.e. the default five-minute tier. */
|
|
132
|
+
export declare const CLAUDE_DEFAULT_CACHE_TTL: ClaudeCacheTtl;
|
|
133
|
+
/** Tier the official client uses outside the main conversation: subagents and auxiliary requests. */
|
|
134
|
+
export declare const CLAUDE_SUBAGENT_CACHE_TTL: ClaudeCacheTtl;
|
|
135
|
+
/** A cache marker for one tier. Absent `ttl` means the five-minute default. */
|
|
136
|
+
export declare function cacheControlFor(ttl: ClaudeCacheTtl): {
|
|
137
|
+
type: 'ephemeral';
|
|
138
|
+
ttl: ClaudeCacheTtl;
|
|
139
|
+
};
|
|
140
|
+
/** Whether a stored preference names a tier this line can send. */
|
|
141
|
+
export declare function isClaudeCacheTtl(value: unknown): value is ClaudeCacheTtl;
|
|
142
|
+
/**
|
|
143
|
+
* Licenses `thinking.block_binding` in a request body.
|
|
144
|
+
*
|
|
145
|
+
* The field is not optional to license: the vendor documents that a body
|
|
146
|
+
* carrying `block_binding` WITHOUT this beta is a 400 whose message ends
|
|
147
|
+
* `block_binding: Extra inputs are not permitted` — every request, every turn.
|
|
148
|
+
* The mid-convo thinking form always sends `block_binding`, so a request that
|
|
149
|
+
* uses that form must carry this value. The reference sends it for exactly those
|
|
150
|
+
* models (`THINKING_BINDING_CONTROLS_BETA`, pushed when `supportsMidConvoEffort`).
|
|
151
|
+
*/
|
|
152
|
+
export declare const THINKING_BINDING_CONTROLS_BETA = "thinking-binding-controls-2026-08-01";
|
|
153
|
+
/**
|
|
154
|
+
* Licenses a mid-conversation `tool_addition` / `tool_removal` block.
|
|
155
|
+
*
|
|
156
|
+
* A tool change stated inside a `role: "system"` message is a beta shape: without
|
|
157
|
+
* this marker the blocks are an unknown content type and the request is refused.
|
|
158
|
+
* The name carries its own date because the vendor versions the shape, so a
|
|
159
|
+
* future revision arrives as a new constant rather than as a silent behaviour
|
|
160
|
+
* change under the old one.
|
|
161
|
+
*/
|
|
162
|
+
export declare const INLINE_TOOLS_BETA = "inline-tools-2026-09-15";
|
|
163
|
+
/** Anthropic protocol revision sent as `anthropic-version`. */
|
|
164
|
+
export declare const ANTHROPIC_VERSION = "2023-06-01";
|
|
165
|
+
/**
|
|
166
|
+
* Client version this route CLAIMS to be on the subscription gateway.
|
|
167
|
+
*
|
|
168
|
+
* Upstream enforces a *minimum reported client version* per model on the
|
|
169
|
+
* subscription path: the version travels in the `user-agent` header (built by
|
|
170
|
+
* `claudeUserAgent` in client.ts) and a claim below the floor is refused with
|
|
171
|
+
* HTTP 400 and an error body whose code is `claude_code_version_too_old`. That
|
|
172
|
+
* is a hard stop for the whole request rather than a per-request failure, and the
|
|
173
|
+
* number in the refusal is OUR OWN claim echoed back — so the user is told their
|
|
174
|
+
* client is too old without being told which model demanded more, which is
|
|
175
|
+
* exactly how it misleads people into signing in again.
|
|
176
|
+
*
|
|
177
|
+
* THE INVARIANT THIS CONSTANT CARRIES. It must be at or above the highest
|
|
178
|
+
* `minCliVersion` that any shipped model in `model-catalog.ts` declares. A
|
|
179
|
+
* default below a shipped model's floor is a model this package advertises in
|
|
180
|
+
* its own picker and then cannot call at all, which is the bug this comment now
|
|
181
|
+
* records: `2.1.251` shipped while `claude-opus-5-5` — also shipped, and the
|
|
182
|
+
* row the default picker leads with — requires `2.1.280`. The matching
|
|
183
|
+
* regression lock lives in `test/claude-model-catalog.test.ts` and fails
|
|
184
|
+
* loudly, naming both versions, when a future model's floor is added without
|
|
185
|
+
* raising this value.
|
|
186
|
+
*
|
|
187
|
+
* The value is a REAL published `@anthropic-ai/claude-code` release, not a
|
|
188
|
+
* number chosen merely to clear a floor: claiming a version that does not exist
|
|
189
|
+
* trades a clear refusal for an unpredictable one. Note that npm's `stable`
|
|
190
|
+
* dist-tag can itself sit below a model's floor, so `latest` is the tag to read.
|
|
191
|
+
*
|
|
192
|
+
* It must also be at or above the release that FIRST SHIPPED each model in the
|
|
193
|
+
* table, whether or not a floor for that model has been observed: upstream has
|
|
194
|
+
* so far gated a new model on the release that added it (Opus 5.5 arrived in
|
|
195
|
+
* 2.1.280 and is refused below 2.1.280). Claude Sonnet 5.5 arrived in 2.1.284,
|
|
196
|
+
* so 2.1.283 could not be relied on to reach it. Claude Haiku 5.5 arrived in
|
|
197
|
+
* 2.1.293, so 2.1.292 could not be relied on to reach it either — and that is
|
|
198
|
+
* not hypothetical: when this row was added, npm's `stable` dist-tag was STILL
|
|
199
|
+
* sitting at 2.1.285, five releases below the one that ships the model, while
|
|
200
|
+
* `latest` was already 2.1.293. The warning above about reading `stable` is
|
|
201
|
+
* therefore about this table's own newest model, not a hypothetical.
|
|
202
|
+
*
|
|
203
|
+
* It is still not a literal that only moves when this package is republished: a
|
|
204
|
+
* user whose installed baseline has aged past the server's floor has to be able
|
|
205
|
+
* to raise it without waiting for a release. Read the effective value with
|
|
206
|
+
* {@link claudeCliVersion}, pin one with {@link setClaudeCliVersion}.
|
|
207
|
+
*/
|
|
208
|
+
export declare const CLAUDE_CLI_VERSION = "2.1.330";
|
|
209
|
+
/**
|
|
210
|
+
* Loopback callback port the subscription flow defaults to.
|
|
211
|
+
*
|
|
212
|
+
* The port is not free-form: it is part of the redirect URI, and the
|
|
213
|
+
* authorization host only accepts a redirect URI registered for the client, so
|
|
214
|
+
* this default is the one known to be accepted. It is still only a *default* —
|
|
215
|
+
* see {@link CALLBACK_PORT_ATTEMPTS}.
|
|
216
|
+
*/
|
|
217
|
+
export declare const DEFAULT_CALLBACK_PORT = 53692;
|
|
218
|
+
/**
|
|
219
|
+
* How many consecutive ports one probe covers, starting at the default.
|
|
220
|
+
*
|
|
221
|
+
* Windows (Hyper-V/WinNAT) dynamically reserves TCP port ranges that change on
|
|
222
|
+
* every reboot. A fixed callback port can land inside one and `listen` fails
|
|
223
|
+
* with `EACCES`, so browser authorization never completes.
|
|
224
|
+
*
|
|
225
|
+
* An excluded run is not a block of a width anyone can look up. One Windows 11
|
|
226
|
+
* host was measured holding 277 consecutive unusable ports (51121-51397) plus
|
|
227
|
+
* scattered single ones that appear in no static table, and the picture changes
|
|
228
|
+
* across reboots — so a window justified as "covers any single block" is covering
|
|
229
|
+
* a block size that does not exist. A window narrower than the run the default
|
|
230
|
+
* starts inside ends INSIDE that run, and the consequence here is worse than an
|
|
231
|
+
* error: resolveCallbackPort returns null, which beginLogin reads as "fall back
|
|
232
|
+
* to manual". The user is then pushed into pasting a code with no visible cause
|
|
233
|
+
* on a machine that has hundreds of free ports immediately behind the run.
|
|
234
|
+
*
|
|
235
|
+
* 1024 is ~3.7x the widest run measured and still ends at 54716, far below the
|
|
236
|
+
* 65535 ceiling. The window is walked one failed bind at a time (~0.35ms per
|
|
237
|
+
* rejected listen here), so the worst case costs a fraction of a second once per
|
|
238
|
+
* sign-in and only when every port in it is unusable; the ordinary case stops at
|
|
239
|
+
* the first usable port. Widening changes neither which port is tried first nor
|
|
240
|
+
* the default status as the one port known to be registered for this client
|
|
241
|
+
* (see {@link DEFAULT_CALLBACK_PORT}).
|
|
242
|
+
*/
|
|
243
|
+
export declare const CALLBACK_PORT_ATTEMPTS = 1024;
|
|
244
|
+
/** Path of the loopback callback the browser is redirected to. */
|
|
245
|
+
export declare const CALLBACK_PATH = "/callback";
|
|
246
|
+
/**
|
|
247
|
+
* Idle ceiling for one streaming response before it is declared stalled.
|
|
248
|
+
*
|
|
249
|
+
* Strictly inside the transport's own 300 s stream timeout; see
|
|
250
|
+
* `host/common/idle-watchdog.ts` for the measured basis.
|
|
251
|
+
*/
|
|
252
|
+
export declare const STREAM_IDLE_TIMEOUT_MS = 120000;
|
|
253
|
+
/**
|
|
254
|
+
* Separate ceiling before the first streamed value arrives.
|
|
255
|
+
*
|
|
256
|
+
* A large prompt can spend much longer in prefill than a healthy stream may
|
|
257
|
+
* remain silent between values. Once the first value arrives, the watchdog
|
|
258
|
+
* returns to STREAM_IDLE_TIMEOUT_MS; this is not a whole-response deadline.
|
|
259
|
+
*/
|
|
260
|
+
export declare const STREAM_FIRST_OUTPUT_TIMEOUT_MS = 360000;
|
|
261
|
+
/** Failure code the adapter reports for that stall. */
|
|
262
|
+
export declare const STREAM_IDLE_TIMEOUT_CODE = "LLM_STREAM_IDLE_TIMEOUT";
|
|
263
|
+
/** Ceiling for a model-listing or usage fetch. */
|
|
264
|
+
export declare const DISCOVERY_TIMEOUT_MS = 20000;
|
|
265
|
+
/**
|
|
266
|
+
* Ceiling for the MODEL LISTING request, which is a separate and much tighter
|
|
267
|
+
* budget than the usage read that shares {@link DISCOVERY_TIMEOUT_MS}.
|
|
268
|
+
*
|
|
269
|
+
* TRANSCRIBED from the official client's own model-discovery request: it is
|
|
270
|
+
* sent with a 3-second timeout by default, and a gateway that answers slower
|
|
271
|
+
* than that fails the discovery silently. The listing is a startup convenience
|
|
272
|
+
* that fills the model picker - it is NOT on the request path - so a slow
|
|
273
|
+
* answer must not hold a picker open for twenty seconds.
|
|
274
|
+
*
|
|
275
|
+
* This is the official figure and nothing more: the request is bounded, and a
|
|
276
|
+
* timeout degrades to the shipped table rather than to an error.
|
|
277
|
+
*/
|
|
278
|
+
export declare const MODELS_DISCOVERY_TIMEOUT_MS = 3000;
|
|
279
|
+
/** Whole-request ceiling for one NON-STREAMING chat call.
|
|
280
|
+
*
|
|
281
|
+
* Deliberately never attached to a stream: an absolute `AbortSignal.timeout` on
|
|
282
|
+
* a streaming fetch keeps counting through the body and kills a long thinking
|
|
283
|
+
* pass mid-answer (opendesign shipped exactly that bug, at 180 s — see
|
|
284
|
+
* `docs/opendesign-line-plan.md` §5). A stream's liveness belongs to
|
|
285
|
+
* `STREAM_IDLE_TIMEOUT_MS`, which resets on every chunk. */
|
|
286
|
+
export declare const CHAT_TIMEOUT_MS = 300000;
|
|
287
|
+
/** How long a usage reading is served from cache before it is refetched. */
|
|
288
|
+
export declare const QUOTA_CACHE_TTL_MS = 120000;
|
|
289
|
+
/** How long a usage reading keeps answering while refreshes fail behind it. */
|
|
290
|
+
export declare const QUOTA_FULL_REFRESH_MS = 300000;
|
|
291
|
+
/** How long a model listing is served from cache. */
|
|
292
|
+
export declare const CATALOG_CACHE_TTL_MS = 1800000;
|
|
293
|
+
/** How long a sign-in may stay open before it is abandoned. */
|
|
294
|
+
export declare const LOGIN_TIMEOUT_MS = 600000;
|
|
295
|
+
/** Output cap requested when the caller states none. */
|
|
296
|
+
export declare const DEFAULT_MAX_TOKENS = 32768;
|
|
297
|
+
/**
|
|
298
|
+
* Context window assumed for a model the catalog does not describe.
|
|
299
|
+
*
|
|
300
|
+
* 200K is the window every non-1M Claude model ships, so it is the value that is
|
|
301
|
+
* wrong for the fewest ids. The dangerous direction is a window that is too
|
|
302
|
+
* large — the request is rejected outright — while one that is too small only
|
|
303
|
+
* compacts earlier than it had to.
|
|
304
|
+
*/
|
|
305
|
+
export declare const DEFAULT_CONTEXT_WINDOW = 200000;
|
|
306
|
+
/**
|
|
307
|
+
* Product identity for the `User-Agent`.
|
|
308
|
+
*
|
|
309
|
+
* The endpoint and the header vocabulary are Anthropic's own public contract, so
|
|
310
|
+
* this route identifies itself honestly as this plugin rather than
|
|
311
|
+
* impersonating a client it is not.
|
|
312
|
+
*/
|
|
313
|
+
export declare const PLUGIN_USER_AGENT = "dsh-multi-provider (+https://github.com/alm-allen/dsh-multi-provider)";
|
|
314
|
+
/**
|
|
315
|
+
* Anthropic error types this line classifies.
|
|
316
|
+
*
|
|
317
|
+
* Anthropic reports the real condition in the response body's `error.type`
|
|
318
|
+
* while the HTTP status stays coarse — several unrelated conditions share a
|
|
319
|
+
* status — so classification reads the body and only falls back to the status
|
|
320
|
+
* line when the body is unreadable.
|
|
321
|
+
*
|
|
322
|
+
* The keys are what this route calls each condition; the values are the wire
|
|
323
|
+
* strings, so an unknown string is never silently mapped onto a neighbour.
|
|
324
|
+
*/
|
|
325
|
+
export declare const ERROR_TYPE: {
|
|
326
|
+
/** 401 — the credential is absent, malformed, or expired. Re-signing in fixes it. */
|
|
327
|
+
readonly AUTHENTICATION: "authentication_error";
|
|
328
|
+
/** 403 — the credential is valid but the account may not use this resource. */
|
|
329
|
+
readonly PERMISSION: "permission_error";
|
|
330
|
+
/** 400 — the request itself is malformed or carries an unsupported parameter. */
|
|
331
|
+
readonly INVALID_REQUEST: "invalid_request_error";
|
|
332
|
+
/** 429 — request-rate or usage-window limit. The body may name a reset instant. */
|
|
333
|
+
readonly RATE_LIMIT: "rate_limit_error";
|
|
334
|
+
/** 529 — transient capacity shortage; retrying is the whole remedy. */
|
|
335
|
+
readonly OVERLOADED: "overloaded_error";
|
|
336
|
+
/** 404 — unknown model id or unknown resource. */
|
|
337
|
+
readonly NOT_FOUND: "not_found_error";
|
|
338
|
+
/** 500 — an unexpected server-side failure. */
|
|
339
|
+
readonly API: "api_error";
|
|
340
|
+
/** 413 — the request body exceeds the maximum size, independent of token count. */
|
|
341
|
+
readonly REQUEST_TOO_LARGE: "request_too_large";
|
|
342
|
+
};
|
|
343
|
+
/** One error type this line classifies. */
|
|
344
|
+
export type ClaudeErrorType = (typeof ERROR_TYPE)[keyof typeof ERROR_TYPE];
|
|
345
|
+
/**
|
|
346
|
+
* Error code the server reports when the client version it was told is too old.
|
|
347
|
+
*
|
|
348
|
+
* Distinct from {@link ERROR_TYPE}: the failure arrives as an ordinary
|
|
349
|
+
* `invalid_request_error` whose *details* carry this code, which is why it needs
|
|
350
|
+
* its own constant rather than a slot in the table above.
|
|
351
|
+
*/
|
|
352
|
+
export declare const ERROR_CODE_CLIENT_VERSION_TOO_OLD = "claude_code_version_too_old";
|
|
353
|
+
/** Every error type this line recognizes, for validation and tests. */
|
|
354
|
+
export declare const CLAUDE_ERROR_TYPES: readonly ClaudeErrorType[];
|
|
355
|
+
/** Whether a wire string is one of the error types this line classifies. */
|
|
356
|
+
export declare function isClaudeErrorType(value: unknown): value is ClaudeErrorType;
|
|
357
|
+
/**
|
|
358
|
+
* Effective client version to report.
|
|
359
|
+
*
|
|
360
|
+
* Resolution order is deliberate: an explicit {@link setClaudeCliVersion} pin
|
|
361
|
+
* wins, then the `DSH_CLAUDE_CLI_VERSION` environment variable, then the shipped
|
|
362
|
+
* baseline. The pin lets a running host react to
|
|
363
|
+
* `claude_code_version_too_old` without a restart; the environment variable lets a
|
|
364
|
+
* user do it without any code path at all.
|
|
365
|
+
*/
|
|
366
|
+
export declare function claudeCliVersion(): string;
|
|
367
|
+
/**
|
|
368
|
+
* Pin the reported client version.
|
|
369
|
+
*
|
|
370
|
+
* Pass `null` (or a blank string) to clear the pin and fall back to the
|
|
371
|
+
* environment and then the shipped baseline.
|
|
372
|
+
*/
|
|
373
|
+
export declare function setClaudeCliVersion(value: string | null): void;
|
|
374
|
+
/**
|
|
375
|
+
* Compare two dotted numeric versions, e.g. `'2.1.283'` against `'2.1.280'`.
|
|
376
|
+
*
|
|
377
|
+
* This exists so a version FLOOR can be checked before a request is sent. The
|
|
378
|
+
* comparison is deliberately small and TOTAL rather than a SemVer parser: the
|
|
379
|
+
* only strings it ever sees are this line's own reported version (a pin, the
|
|
380
|
+
* `DSH_CLAUDE_CLI_VERSION` override, or the shipped default) and the floors
|
|
381
|
+
* recorded in the model catalog, and it must not throw on any of them — a
|
|
382
|
+
* comparison that can throw would turn a misconfigured version into a crash
|
|
383
|
+
* instead of the precise pre-flight refusal it was added to produce.
|
|
384
|
+
*
|
|
385
|
+
* Total means: a missing segment compares as 0 (`'2.1'` equals `'2.1.0'`), and a
|
|
386
|
+
* segment that is not a run of decimal digits compares as 0 rather than as NaN
|
|
387
|
+
* (`'abc'` equals `'0.0.0'`, and so does `''`). Leading zeros are exact rather
|
|
388
|
+
* than octal, and an optional leading `v` is tolerated because that is how a
|
|
389
|
+
* release is often written down.
|
|
390
|
+
*
|
|
391
|
+
* @returns a negative number, 0, or a positive number — the sign is the whole
|
|
392
|
+
* contract, so callers compare against 0 rather than against ±1.
|
|
393
|
+
*/
|
|
394
|
+
export declare function compareDottedVersions(left: string, right: string): number;
|
|
395
|
+
/**
|
|
396
|
+
* Whether one reported version clears a floor.
|
|
397
|
+
*
|
|
398
|
+
* An absent floor (`undefined`) means "no known floor" rather than "no floor",
|
|
399
|
+
* so it never blocks a request: refusing a model because nobody recorded a
|
|
400
|
+
* number would be this line inventing a restriction upstream never stated.
|
|
401
|
+
* A MALFORMED version on either side, on the other hand, is refused — that is
|
|
402
|
+
* the conservative direction, since the check exists to stop an unknown claim
|
|
403
|
+
* from reaching a server that has already refused one.
|
|
404
|
+
*/
|
|
405
|
+
export declare function meetsDottedVersionFloor(version: string, floor?: string): boolean;
|
|
406
|
+
/**
|
|
407
|
+
* Resolve the browser authorization endpoint.
|
|
408
|
+
*
|
|
409
|
+
* The subscription flow has answered on more than one host, while its Console
|
|
410
|
+
* counterpart has always been a different product, so a user hitting an
|
|
411
|
+
* authorization failure needs a way to point this route elsewhere without a
|
|
412
|
+
* republish — the same escape hatch the sibling Kimi line gives its OAuth host.
|
|
413
|
+
*/
|
|
414
|
+
export declare function oauthAuthorizeUrl(): string;
|
|
415
|
+
/** Loopback redirect URI the authorization host is told to return to. */
|
|
416
|
+
export declare function loopbackRedirectUri(port?: number): string;
|
|
417
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/host/claude/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAIH,uCAAuC;AACvC,eAAO,MAAM,WAAW,wBAAwB,CAAA;AAChD,kEAAkE;AAClE,eAAO,MAAM,aAAa,mCAAe,CAAA;AAEzC,kFAAkF;AAClF,eAAO,MAAM,QAAQ,8BAA8B,CAAA;AAEnD;;;;;;GAMG;AACH,eAAO,MAAM,aAAa,2BAA2B,CAAA;AACrD,2EAA2E;AAC3E,eAAO,MAAM,WAAW,eAAe,CAAA;AACvC,gEAAgE;AAChE,eAAO,MAAM,UAAU,qBAAqB,CAAA;AAE5C;;;;;;;;GAQG;AACH,eAAO,MAAM,mBAAmB,2CAA2C,CAAA;AAC3E,wEAAwE;AACxE,eAAO,MAAM,eAAe,+CAA+C,CAAA;AAE3E;;;;;;;;;GASG;AACH,eAAO,MAAM,yBAAyB,oDAAoD,CAAA;AAE1F;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,yCAAyC,CAAA;AAErE;;;;;;;GAOG;AACH,eAAO,MAAM,YAAY,+GAA+G,CAAA;AAExI;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,6BAA6B,4FAA4F,CAAA;AAEtI;;;;;GAKG;AACH,eAAO,MAAM,UAAU,qBAAqB,CAAA;AAC5C,oFAAoF;AACpF,eAAO,MAAM,gBAAgB,yBAAyB,CAAA;AACtD,8EAA8E;AAC9E,eAAO,MAAM,yBAAyB,oCAAoC,CAAA;AAC1E;;;;;;GAMG;AACH,eAAO,MAAM,uBAAuB,kCAAkC,CAAA;AACtE;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,cAAc,GAAG,IAAI,GAAG,IAAI,CAAA;AACxC,2EAA2E;AAC3E,eAAO,MAAM,6BAA6B,EAAE,cAAqB,CAAA;AACjE,2DAA2D;AAC3D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ACH,wBAAgB,iBAAiB,IAAI,MAAM,CAG1C;AAED,yEAAyE;AACzE,wBAAgB,mBAAmB,CAAC,IAAI,GAAE,MAA8B,GAAG,MAAM,CAEhF"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { LlmAdapter, type GenerateOptions, type LlmProviderInfo, type LlmResolvedModelInfo, type PreparedAdapterCall, type ResolvedRetryPolicy, type StreamChunk } from '@deepseek-ai/dsh-llm';
|
|
2
|
+
import type { ImageAttachmentRef } from '@deepseek-ai/dsh-attachment';
|
|
3
|
+
import { LlmError } from '../common/llm-compat.ts';
|
|
4
|
+
import { type AttachmentImageReader } from '../common/request-images.ts';
|
|
5
|
+
import type { PromptCacheOverride } from '../common/prompt-cache-policy.ts';
|
|
6
|
+
import { ClaudeApiCatalogManager } from './catalog-manager.ts';
|
|
7
|
+
import { ClaudeApiCredentialStore, ClaudeApiSettingsStore } from './token-store.ts';
|
|
8
|
+
import type { ClaudeApiClientVersionResolver } from './client-version.ts';
|
|
9
|
+
import type { ClaudeApiCompactionStore } from './compaction-store.ts';
|
|
10
|
+
import { ClaudeApiCapabilityMemory } from './capability-memory.ts';
|
|
11
|
+
import { PROVIDER_ID, PROVIDER_NAME } from './types.ts';
|
|
12
|
+
/** Model-level refusals ("'<model>' does not support ... compaction ...") describe the
|
|
13
|
+
* model and last for the process; parameter/beta-level refusals describe the endpoint,
|
|
14
|
+
* which may be upgraded, and expire after the TTL. */
|
|
15
|
+
export declare function claudeApiUnsupportedUntil(now: number, bodyText: string): number | null;
|
|
16
|
+
/** The verified "model does not support the speed parameter" refusal (any error envelope). */
|
|
17
|
+
export declare function isClaudeApiSpeedUnsupported(bodyText: string): boolean;
|
|
18
|
+
/** The verified "model rejects the system role inside messages" refusal. A placement
|
|
19
|
+
* error ("role 'system' must follow ...") is a request bug, NOT a model limitation. */
|
|
20
|
+
export declare function isClaudeApiSystemRoleUnsupported(bodyText: string): boolean;
|
|
21
|
+
/** The verified "speed needs the fast-mode beta header" refusal (any error envelope). */
|
|
22
|
+
export declare function isClaudeApiSpeedNeedsBeta(bodyText: string): boolean;
|
|
23
|
+
export interface ClaudeApiAdapterOptions {
|
|
24
|
+
fetchFn?: typeof fetch;
|
|
25
|
+
attachments?: AttachmentImageReader;
|
|
26
|
+
promptCache?: PromptCacheOverride;
|
|
27
|
+
version: ClaudeApiClientVersionResolver;
|
|
28
|
+
compactionStore: ClaudeApiCompactionStore;
|
|
29
|
+
capabilityMemory?: ClaudeApiCapabilityMemory;
|
|
30
|
+
}
|
|
31
|
+
interface ClassifiedError extends LlmError {
|
|
32
|
+
status?: number;
|
|
33
|
+
claudeApiStatus?: number;
|
|
34
|
+
claudeApiDetail?: string;
|
|
35
|
+
/** Redacted raw error body, so the compaction predicates can read code/type fields too. */
|
|
36
|
+
claudeApiBody?: string;
|
|
37
|
+
}
|
|
38
|
+
export declare function classifyClaudeApiResponse(response: Response, apiKey?: string): Promise<ClassifiedError>;
|
|
39
|
+
export declare class ClaudeApiAdapter extends LlmAdapter {
|
|
40
|
+
private readonly store;
|
|
41
|
+
private readonly settingsStore;
|
|
42
|
+
private readonly catalog;
|
|
43
|
+
private readonly options;
|
|
44
|
+
private readonly fetchFn;
|
|
45
|
+
private readonly capabilityMemory;
|
|
46
|
+
private readonly firstParty;
|
|
47
|
+
/** Endpoint-level compaction refusals (30 min, in memory only); model-level facts live in the capability memory. */
|
|
48
|
+
private readonly unsupported;
|
|
49
|
+
/** The effort each session's most recent MAIN turn resolved; null means "no effort sent". */
|
|
50
|
+
private readonly sessionEfforts;
|
|
51
|
+
constructor(store: ClaudeApiCredentialStore, settingsStore: ClaudeApiSettingsStore, catalog: ClaudeApiCatalogManager, options: ClaudeApiAdapterOptions);
|
|
52
|
+
providerInfo(provider: string): LlmProviderInfo;
|
|
53
|
+
providerRetryPolicy(): ResolvedRetryPolicy;
|
|
54
|
+
imageRequestPricing(): undefined;
|
|
55
|
+
imageRequestTarget(_provider: string, _model: string, image: ImageAttachmentRef): import("../common/request-images.ts").CompatImageRequestTarget;
|
|
56
|
+
listModels(provider?: string): Promise<readonly LlmResolvedModelInfo[]>;
|
|
57
|
+
resolveModel(provider: string, model: string, signal?: AbortSignal): Promise<LlmResolvedModelInfo>;
|
|
58
|
+
private modelInfo;
|
|
59
|
+
prepareCall(provider: string, model: string, signal?: AbortSignal): Promise<PreparedAdapterCall>;
|
|
60
|
+
stream(options: GenerateOptions): AsyncIterable<StreamChunk>;
|
|
61
|
+
private streamWithEntry;
|
|
62
|
+
private rememberSessionEffort;
|
|
63
|
+
private isUnsupported;
|
|
64
|
+
private markUnsupported;
|
|
65
|
+
private openRequest;
|
|
66
|
+
private pump;
|
|
67
|
+
private requestStream;
|
|
68
|
+
}
|
|
69
|
+
export { PROVIDER_ID, PROVIDER_NAME };
|
|
70
|
+
//# sourceMappingURL=adapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../../src/host/claude-api/adapter.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EAGV,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,WAAW,EACjB,MAAM,sBAAsB,CAAA;AAC7B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAA;AAGrE,OAAO,EAAE,QAAQ,EAA4B,MAAM,yBAAyB,CAAA;AAG5E,OAAO,EAIL,KAAK,qBAAqB,EAC3B,MAAM,6BAA6B,CAAA;AACpC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAA;AAQ3E,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAA;AAO9D,OAAO,EAAE,wBAAwB,EAAE,sBAAsB,EAA0D,MAAM,kBAAkB,CAAA;AAC3I,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,qBAAqB,CAAA;AACzE,OAAO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 +1,4 @@
|
|
|
1
|
+
/** Compatibility exports for the API line; implementation is shared in common. */
|
|
2
|
+
export { ClaudeApiCapabilityMemory, ClaudeCapabilityMemory, claudeApiCapabilityMemoryPath, claudeCapabilityMemoryPath, parseClaudeApiCapabilityMemory, parseClaudeCapabilityMemory, serializeClaudeApiCapabilityMemory, serializeClaudeCapabilityMemory, CLAUDE_API_CAPABILITY_MEMORY_MAX_KEYS, CLAUDE_API_CAPABILITY_MEMORY_TTL_MS, CLAUDE_CAPABILITY_MEMORY_MAX_KEYS, CLAUDE_CAPABILITY_MEMORY_TTL_MS, } from '../common/claude-capability-memory.ts';
|
|
3
|
+
export type { ClaudeApiCapabilityFacts, ClaudeApiCapabilityRecord, ClaudeApiFastModeConclusion, ClaudeCapabilityFacts, ClaudeCapabilityRecord, ClaudeFastModeConclusion, } from '../common/claude-capability-memory.ts';
|
|
4
|
+
//# sourceMappingURL=capability-memory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"capability-memory.d.ts","sourceRoot":"","sources":["../../../../src/host/claude-api/capability-memory.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,OAAO,EACL,yBAAyB,EACzB,sBAAsB,EACtB,6BAA6B,EAC7B,0BAA0B,EAC1B,8BAA8B,EAC9B,2BAA2B,EAC3B,kCAAkC,EAClC,+BAA+B,EAC/B,qCAAqC,EACrC,mCAAmC,EACnC,iCAAiC,EACjC,+BAA+B,GAChC,MAAM,uCAAuC,CAAA;AAC9C,YAAY,EACV,wBAAwB,EACxB,yBAAyB,EACzB,2BAA2B,EAC3B,qBAAqB,EACrB,sBAAsB,EACtB,wBAAwB,GACzB,MAAM,uCAAuC,CAAA"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { ClaudeApiCatalogDto } from '../../shared/claude-api-contracts.ts';
|
|
2
|
+
import { ClaudeApiClientVersionResolver } from './client-version.ts';
|
|
3
|
+
import { type ClaudeApiModelEntry } from './model-catalog.ts';
|
|
4
|
+
import { type ClaudeApiCredentialStore, type ClaudeApiSettingsStore } from './token-store.ts';
|
|
5
|
+
export interface ClaudeApiCatalogSnapshot {
|
|
6
|
+
entries: readonly ClaudeApiModelEntry[];
|
|
7
|
+
fetchedAt: number | null;
|
|
8
|
+
error: string | null;
|
|
9
|
+
state: ClaudeApiCatalogDto['state'];
|
|
10
|
+
credentialScope: string | null;
|
|
11
|
+
/** false while entries are the shipped fallback table rather than a listing this key produced. */
|
|
12
|
+
live: boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface ClaudeApiCatalogManagerOptions {
|
|
15
|
+
/** Supplies the client version the listing request reports. */
|
|
16
|
+
version: ClaudeApiClientVersionResolver;
|
|
17
|
+
fetchFn?: typeof fetch;
|
|
18
|
+
now?: () => number;
|
|
19
|
+
ttlMs?: number;
|
|
20
|
+
onChanged?: (entries: readonly ClaudeApiModelEntry[]) => void;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Live, credential-and-endpoint-scoped model catalog with local-first rehydration.
|
|
24
|
+
*
|
|
25
|
+
* Before any listing this key produced, the catalog is the shipped fallback table
|
|
26
|
+
* and is reported as NOT live, so a user's whitelist never filters it away.
|
|
27
|
+
*/
|
|
28
|
+
export declare class ClaudeApiCatalogManager {
|
|
29
|
+
private readonly store;
|
|
30
|
+
private readonly settingsStore;
|
|
31
|
+
private readonly version;
|
|
32
|
+
private readonly fetchFn;
|
|
33
|
+
private readonly now;
|
|
34
|
+
private readonly ttlMs;
|
|
35
|
+
private readonly onChanged;
|
|
36
|
+
private entries;
|
|
37
|
+
private fetchedAt;
|
|
38
|
+
private error;
|
|
39
|
+
private state;
|
|
40
|
+
private live;
|
|
41
|
+
private credentialScope;
|
|
42
|
+
private warmedScope;
|
|
43
|
+
private warming;
|
|
44
|
+
private refreshing;
|
|
45
|
+
private refreshScope;
|
|
46
|
+
private epoch;
|
|
47
|
+
constructor(store: ClaudeApiCredentialStore, settingsStore: ClaudeApiSettingsStore, options: ClaudeApiCatalogManagerOptions);
|
|
48
|
+
snapshot(): ClaudeApiCatalogSnapshot;
|
|
49
|
+
dto(): ClaudeApiCatalogDto;
|
|
50
|
+
reset(): void;
|
|
51
|
+
/** Local disk only. Returns the post-rehydration fingerprint, never the pre-warm one. */
|
|
52
|
+
warm(): Promise<string>;
|
|
53
|
+
startRefresh(force?: boolean): void;
|
|
54
|
+
/** Network refresh, deduplicated per credential scope. Never waits in warm(). */
|
|
55
|
+
refresh(force?: boolean): Promise<boolean>;
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=catalog-manager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog-manager.d.ts","sourceRoot":"","sources":["../../../../src/host/claude-api/catalog-manager.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAA;AAQ/E,OAAO,EAAE,8BAA8B,EAAE,MAAM,qBAAqB,CAAA;AACpE,OAAO,EAIL,KAAK,mBAAmB,EACzB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAEL,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,EAC5B,MAAM,kBAAkB,CAAA;AAGzB,MAAM,WAAW,wBAAwB;IACvC,OAAO,EAAE,SAAS,mBAAmB,EAAE,CAAA;IACvC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,KAAK,EAAE,mBAAmB,CAAC,OAAO,CAAC,CAAA;IACnC,eAAe,EAAE,MAAM,GAAG,IAAI,CAAA;IAC9B,kGAAkG;IAClG,IAAI,EAAE,OAAO,CAAA;CACd;AAED,MAAM,WAAW,8BAA8B;IAC7C,+DAA+D;IAC/D,OAAO,EAAE,8BAA8B,CAAA;IACvC,OAAO,CAAC,EAAE,OAAO,KAAK,CAAA;IACtB,GAAG,CAAC,EAAE,MAAM,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,C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iClientVersionResolver, ClaudeCodeVersionResolver, ClaudeCodeVersionConfigurationError, claudeApiClientVersionPath, claudeCodeClientVersionPath, isClaudeApiCliVersion, isClaudeCodeCliVersion, parseClaudeApiClientVersion, parseClaudeCodeClientVersion, serializeClaudeApiClientVersion, serializeClaudeCodeClientVersion, setClaudeCodeVersionPin, } from '../common/claude-code-version.ts';
|
|
3
|
+
export type { ClaudeApiClientVersionOptions, ClaudeCodeLine, ClaudeCodeVersionOptions, ClaudeCodeVersionProfile, ClaudeCodeVersionSelection, PersistedClaudeApiClientVersion, PersistedClaudeCodeClientVersion, } from '../common/claude-code-version.ts';
|
|
4
|
+
//# sourceMappingURL=client-version.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client-version.d.ts","sourceRoot":"","sources":["../../../../src/host/claude-api/client-version.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAC/F,OAAO,EACL,8BAA8B,EAC9B,yBAAyB,EACzB,mCAAmC,EACnC,0BAA0B,EAC1B,2BAA2B,EAC3B,qBAAqB,EACrB,sBAAsB,EACtB,2BAA2B,EAC3B,4BAA4B,EAC5B,+BAA+B,EAC/B,gCAAgC,EAChC,uBAAuB,GACxB,MAAM,kCAAkC,CAAA;AACzC,YAAY,EACV,6BAA6B,EAC7B,cAAc,EACd,wBAAwB,EACxB,wBAAwB,EACxB,0BAA0B,EAC1B,+BAA+B,EAC/B,gCAAgC,GACjC,MAAM,kCAAkC,CAAA"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { ClaudeApiConnectionDto } from '../../shared/claude-api-contracts.ts';
|
|
2
|
+
import { type ClaudeCodeFirstPartyContext } from '../common/claude-code-first-party.ts';
|
|
3
|
+
import { type ClaudeApiModelEntry } from './model-catalog.ts';
|
|
4
|
+
/**
|
|
5
|
+
* Host I/O of the Claude API line: the official Claude Code header set, the
|
|
6
|
+
* paginated model listing and the explicit connectivity check.
|
|
7
|
+
*
|
|
8
|
+
* Every wire constant is imported from ./types.ts (capture-backed); this module
|
|
9
|
+
* only assembles requests and parses answers. See docs/claude-api-line-plan.md.
|
|
10
|
+
*/
|
|
11
|
+
export interface ClaudeApiHeadersInput {
|
|
12
|
+
apiKey: string;
|
|
13
|
+
version: string;
|
|
14
|
+
sessionUuid: string;
|
|
15
|
+
betas: readonly string[];
|
|
16
|
+
firstParty?: ClaudeCodeFirstPartyContext;
|
|
17
|
+
/**
|
|
18
|
+
* Accepted so a caller can state its intent, but it does NOT change the header
|
|
19
|
+
* set: the captured client sends accept: application/json on stream:true
|
|
20
|
+
* requests too (both requests of test/fixtures/claude-api/request-2.1.330.json).
|
|
21
|
+
*/
|
|
22
|
+
stream?: boolean;
|
|
23
|
+
}
|
|
24
|
+
/** Lower-case header names, exactly the captured set. */
|
|
25
|
+
export declare function buildClaudeApiHeaders(input: ClaudeApiHeadersInput): Record<string, string>;
|
|
26
|
+
export interface ClaudeApiErrorDetail {
|
|
27
|
+
message: string;
|
|
28
|
+
type: string | null;
|
|
29
|
+
code: string | null;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* The three body shapes of the plan's "error body" section: the official
|
|
33
|
+
* {type,error:{message,type,details:{error_code}},request_id}, the gateway's
|
|
34
|
+
* {error:{message,type},type} and the bare {code,message}. The public message
|
|
35
|
+
* always carries the HTTP status and is redacted before it can reach a DTO.
|
|
36
|
+
*/
|
|
37
|
+
export declare function parseClaudeApiError(status: number, text: string, apiKey?: string): ClaudeApiErrorDetail;
|
|
38
|
+
export interface ClaudeApiListingInput {
|
|
39
|
+
baseUrl: string;
|
|
40
|
+
apiKey: string;
|
|
41
|
+
version: string;
|
|
42
|
+
fetchFn: typeof fetch;
|
|
43
|
+
signal?: AbortSignal;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* GET <baseUrl>/v1/models?limit=1000, following has_more/last_id with after_id.
|
|
47
|
+
* The page cap bounds a gateway that always answers has_more:true; ids are
|
|
48
|
+
* de-duplicated across pages because a cursor may repeat the boundary row.
|
|
49
|
+
*/
|
|
50
|
+
export declare function listClaudeApiModels(input: ClaudeApiListingInput): Promise<ClaudeApiModelEntry[]>;
|
|
51
|
+
/** Explicit connectivity check through the real listing, never a paid generation. Never throws. */
|
|
52
|
+
export declare function testClaudeApiConnection(input: ClaudeApiListingInput & {
|
|
53
|
+
now?: () => number;
|
|
54
|
+
}): Promise<ClaudeApiConnectionDto>;
|
|
55
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../src/host/claude-api/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAA;AAClF,OAAO,EAA+B,KAAK,2BAA2B,EAAE,MAAM,sCAAsC,CAAA;AACpH,OAAO,EAA8B,KAAK,mBAAmB,EAAE,MAAM,oBAAoB,CAAA;AAazF;;;;;;GAMG;AAEH,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,MAAM,CAAA;IACf,WAAW,EAAE,MAAM,CAAA;IACnB,KAAK,EAAE,SAAS,MAAM,EAAE,CAAA;IACxB,UAAU,CAAC,EAAE,2BAA2B,CAAA;IACxC;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB;AAED,yDAAyD;AACzD,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,qBAAqB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAgB1F;AAED,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IACnB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;CACpB;AASD;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,oBAA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