@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,458 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Static facts about the Kimi Code provider API.
|
|
3
|
+
*
|
|
4
|
+
* Kimi Code is the subscription product (https://www.kimi.com/code); it is a
|
|
5
|
+
* different system from the pay-as-you-go Moonshot Open Platform, and its keys
|
|
6
|
+
* and base URLs are not interchangeable. The facts below are transcribed from
|
|
7
|
+
* the official CLI sources and documentation:
|
|
8
|
+
*
|
|
9
|
+
* - the OAuth device flow lives on auth.kimi.com and is implemented by
|
|
10
|
+
* MoonshotAI/kimi-cli in src/kimi_cli/auth/oauth.py;
|
|
11
|
+
* - the managed provider is configured as type "kimi", an OpenAI-compatible
|
|
12
|
+
* client, against https://api.kimi.com/coding/v1;
|
|
13
|
+
* - the same service documents https://api.kimi.com/coding/ as an Anthropic
|
|
14
|
+
* Messages base URL for third-party tools;
|
|
15
|
+
* - account quota comes from GET /coding/v1/usages.
|
|
16
|
+
*
|
|
17
|
+
* See https://www.kimi.com/code/docs/en/kimi-code/models.html and
|
|
18
|
+
* https://www.kimi.com/code/docs/en/kimi-code/error-reference.html
|
|
19
|
+
*/
|
|
20
|
+
import type { KimiCodeReasoningEffort, KimiCodeRegion, KimiCodeThinkingType, KimiCodeWire } from '../../shared/kimi-code-contracts.ts';
|
|
21
|
+
import { LONG_CONTEXT_MESSAGE_BODY_BYTES, type KimiCodeCatalogModel } from './model-catalog.ts';
|
|
22
|
+
export declare const PROVIDER_ID = "kimi-code";
|
|
23
|
+
export declare const PROVIDER_NAME = "Kimi Code";
|
|
24
|
+
/**
|
|
25
|
+
* OAuth client id the official Kimi CLI registers.
|
|
26
|
+
*
|
|
27
|
+
* The device flow has no client secret: the client id alone identifies the
|
|
28
|
+
* public client, exactly as RFC 8628 intends for a device that cannot keep one.
|
|
29
|
+
*/
|
|
30
|
+
export declare const KIMI_CODE_CLIENT_ID = "17e5f671-d194-4dfb-9706-5516cb48c098";
|
|
31
|
+
/** OAuth host serving /api/oauth/device_authorization and /api/oauth/token. */
|
|
32
|
+
export declare const DEFAULT_OAUTH_HOST = "https://auth.kimi.com";
|
|
33
|
+
/** Device authorization endpoint (RFC 8628 section 3.1). */
|
|
34
|
+
export declare const DEVICE_AUTHORIZATION_PATH = "/api/oauth/device_authorization";
|
|
35
|
+
/** Token endpoint for both the device-code grant and refresh (RFC 8628 section 3.4). */
|
|
36
|
+
export declare const OAUTH_TOKEN_PATH = "/api/oauth/token";
|
|
37
|
+
/** Grant type the device-code polling request declares. */
|
|
38
|
+
export declare const DEVICE_CODE_GRANT_TYPE = "urn:ietf:params:oauth:grant-type:device_code";
|
|
39
|
+
/** Host set per region; a global account is served by the .ai properties. */
|
|
40
|
+
export declare const REGION_HOSTS: Record<KimiCodeRegion, {
|
|
41
|
+
oauth: string;
|
|
42
|
+
coding: string;
|
|
43
|
+
}>;
|
|
44
|
+
/** OpenAI-compatible prefix; append /chat/completions or /models. */
|
|
45
|
+
export declare const OPENAI_API_PREFIX = "/v1";
|
|
46
|
+
export declare const USER_AGENT = "dsh-multi-provider (+https://github.com/alm-allen/dsh-multi-provider)";
|
|
47
|
+
/**
|
|
48
|
+
* Product markers the managed service recognizes.
|
|
49
|
+
*
|
|
50
|
+
* The official client identifies itself as kimi_cli and reports a stable
|
|
51
|
+
* per-installation device id; sending the same vocabulary keeps the subscription
|
|
52
|
+
* endpoints answering the way they do for the official CLI.
|
|
53
|
+
*/
|
|
54
|
+
export declare const MSH_PLATFORM = "kimi_code_cli";
|
|
55
|
+
export declare const HEADER_MSH_PLATFORM = "x-msh-platform";
|
|
56
|
+
export declare const HEADER_MSH_VERSION = "x-msh-version";
|
|
57
|
+
export declare const HEADER_MSH_DEVICE_NAME = "x-msh-device-name";
|
|
58
|
+
export declare const HEADER_MSH_DEVICE_MODEL = "x-msh-device-model";
|
|
59
|
+
export declare const HEADER_MSH_OS_VERSION = "x-msh-os-version";
|
|
60
|
+
export declare const HEADER_MSH_DEVICE_ID = "x-msh-device-id";
|
|
61
|
+
/**
|
|
62
|
+
* Environment variable carrying extra headers for every Kimi Code request.
|
|
63
|
+
*
|
|
64
|
+
* The official client reads newline-separated `Name: Value` lines from
|
|
65
|
+
* `KIMI_CODE_CUSTOM_HEADERS` (it mirrors `ANTHROPIC_CUSTOM_HEADERS`) and
|
|
66
|
+
* applies them to every outbound request, the `/models` listing included.
|
|
67
|
+
*
|
|
68
|
+
* These headers are the LOWEST-precedence layer: the Kimi device identity
|
|
69
|
+
* headers and the caller's own headers both override them, so a deployment can
|
|
70
|
+
* add a header for one gateway without being able to weaken the identity the
|
|
71
|
+
* service attributes usage to.
|
|
72
|
+
*/
|
|
73
|
+
export declare const KIMI_CODE_CUSTOM_HEADERS_ENV = "KIMI_CODE_CUSTOM_HEADERS";
|
|
74
|
+
/** Version the plugin reports to the managed service's telemetry headers. */
|
|
75
|
+
export declare const MSH_VERSION = "1.0.0";
|
|
76
|
+
/**
|
|
77
|
+
* Refresh timing, copied from the official client.
|
|
78
|
+
*
|
|
79
|
+
* A token is refreshed once it is within max(300s, expires_in * 0.5) of expiry,
|
|
80
|
+
* so a short-lived token is replaced early enough to never be used while stale.
|
|
81
|
+
*/
|
|
82
|
+
export declare const MIN_REFRESH_THRESHOLD_SECONDS = 300;
|
|
83
|
+
export declare const REFRESH_THRESHOLD_RATIO = 0.5;
|
|
84
|
+
/** How long a rejected refresh token is remembered before a new attempt. */
|
|
85
|
+
export declare const UNAUTHORIZED_REFRESH_RETRY_COOLDOWN_MS = 300000;
|
|
86
|
+
/** Attempts one refresh gets before the stored credential is declared dead. */
|
|
87
|
+
export declare const REFRESH_MAX_RETRIES = 3;
|
|
88
|
+
/** Exponential backoff base for a retryable refresh failure. */
|
|
89
|
+
export declare const REFRESH_BACKOFF_BASE_MS = 1000;
|
|
90
|
+
/** Device-flow polling defaults when the service omits them. */
|
|
91
|
+
export declare const DEFAULT_DEVICE_INTERVAL_SECONDS = 5;
|
|
92
|
+
export declare const DEFAULT_DEVICE_EXPIRES_SECONDS = 600;
|
|
93
|
+
/** Local timeouts and cache lifetimes. */
|
|
94
|
+
export declare const DISCOVERY_TIMEOUT_MS = 15000;
|
|
95
|
+
export declare const LOGIN_TIMEOUT_MS: number;
|
|
96
|
+
export declare const QUOTA_CACHE_TTL_MS: number;
|
|
97
|
+
export declare const CATALOG_CACHE_TTL_MS: number;
|
|
98
|
+
/** Output cap used when neither the registry nor the live catalog states one. */
|
|
99
|
+
export declare const DEFAULT_MAX_TOKENS = 32768;
|
|
100
|
+
export declare const DEFAULT_CONTEXT_WINDOW = 262144;
|
|
101
|
+
/**
|
|
102
|
+
* How long a request may go without a single byte before the watchdog aborts it.
|
|
103
|
+
*
|
|
104
|
+
* Strictly INSIDE the transport's own deadline on purpose. undici answers a
|
|
105
|
+
* stalled HTTP/2 stream at exactly 300 s, so the 300 s this line used to carry
|
|
106
|
+
* never decided the outcome: both timers expired together, the transport error
|
|
107
|
+
* won the race, and the turn paid the full five minutes of silence before DSH
|
|
108
|
+
* heard about it — reported as a severed connection rather than a stalled one.
|
|
109
|
+
*
|
|
110
|
+
* 120 s is measured, not guessed. Over the 104 requests of the session that
|
|
111
|
+
* prompted this value, the longest wait from a step starting to its first chunk
|
|
112
|
+
* was 65 s (a 210k-token prompt) and the longest silence once chunks were
|
|
113
|
+
* flowing was 6.4 s across 6,539 measured gaps. The adapter pulses the watchdog
|
|
114
|
+
* when the response headers arrive, so the pre-first-byte window and the
|
|
115
|
+
* in-stream window are budgeted separately: a slow prefill is not read as a dead
|
|
116
|
+
* stream, while a stream that opens and then goes quiet is caught in two minutes
|
|
117
|
+
* instead of five.
|
|
118
|
+
*/
|
|
119
|
+
export declare const STREAM_IDLE_TIMEOUT_MS = 120000;
|
|
120
|
+
export declare const STREAM_IDLE_TIMEOUT_CODE = "LLM_STREAM_IDLE_TIMEOUT";
|
|
121
|
+
/**
|
|
122
|
+
* Long-window allowance before Kimi produces its first consumer-visible chunk.
|
|
123
|
+
*
|
|
124
|
+
* Large prompts can spend minutes in upstream prefill before response headers or
|
|
125
|
+
* body bytes arrive. Six minutes is the product choice for that phase; once the
|
|
126
|
+
* first chunk arrives, the ordinary 120 s activity budget above takes over.
|
|
127
|
+
*/
|
|
128
|
+
export declare const STREAM_FIRST_OUTPUT_TIMEOUT_MS = 360000;
|
|
129
|
+
/**
|
|
130
|
+
* Transport safety net for response headers, strictly beyond the app deadline.
|
|
131
|
+
* The watchdog must settle a slow first chunk as TIMEOUT before undici can turn
|
|
132
|
+
* the same silence into a retryable TRANSPORT error at its own default 300 s.
|
|
133
|
+
*/
|
|
134
|
+
export declare const TRANSPORT_HEADERS_TIMEOUT_MS = 420000;
|
|
135
|
+
/**
|
|
136
|
+
* Resolve the managed OAuth host.
|
|
137
|
+
*
|
|
138
|
+
* The official client lets an environment variable pin the host for testing or
|
|
139
|
+
* for a private deployment; the region then supplies the default.
|
|
140
|
+
*/
|
|
141
|
+
export declare function oauthHost(region?: KimiCodeRegion): string;
|
|
142
|
+
/**
|
|
143
|
+
* Resolve the coding API base URL without a trailing slash or version.
|
|
144
|
+
*
|
|
145
|
+
* The official client reads KIMI_CODE_BASE_URL, which already includes /v1;
|
|
146
|
+
* this plugin keeps the prefix separate so both dialects can be built from one
|
|
147
|
+
* value. An override that carries /v1 has it stripped exactly once.
|
|
148
|
+
*/
|
|
149
|
+
export declare function codingBaseUrl(region?: KimiCodeRegion): string;
|
|
150
|
+
/** OpenAI-compatible request URL for one endpoint suffix. */
|
|
151
|
+
export declare function openAIUrl(suffix: string, region?: KimiCodeRegion): string;
|
|
152
|
+
/** Anthropic-compatible request URL for one endpoint suffix, such as /v1/messages. */
|
|
153
|
+
export declare function anthropicUrl(suffix: string, region?: KimiCodeRegion): string;
|
|
154
|
+
/**
|
|
155
|
+
* Path the Anthropic-compatible Messages endpoint is posted to.
|
|
156
|
+
*
|
|
157
|
+
* The managed service exposes its Anthropic surface behind the beta gateway,
|
|
158
|
+
* exactly as the official client's `client.beta.messages.create` call does.
|
|
159
|
+
*/
|
|
160
|
+
export declare const ANTHROPIC_MESSAGES_PATH = "/v1/messages?beta=true";
|
|
161
|
+
/**
|
|
162
|
+
* Byte ceiling this route enforces on one text/image request body.
|
|
163
|
+
*
|
|
164
|
+
* Named with the DEFAULT_ prefix, like the MiniMax and Codex resolvers, because
|
|
165
|
+
* the budget belongs to the gateway in front of the route rather than to the
|
|
166
|
+
* shared image machinery: common/request-images.ts keeps Kimi's figures as the
|
|
167
|
+
* default arguments of functions other routes call with their own number.
|
|
168
|
+
*
|
|
169
|
+
* DSH_KIMI_CODE_MAX_BODY_BYTES pins a different ceiling for a deployment that has
|
|
170
|
+
* measured one — a proxy or gateway in front of this route. It is parsed as bytes
|
|
171
|
+
* and ignored when it is not a positive finite number, so a typo cannot silently
|
|
172
|
+
* disable the guard.
|
|
173
|
+
*
|
|
174
|
+
* It covers the text/image tier only. A request carrying video goes to
|
|
175
|
+
* MAX_VIDEO_MESSAGE_BODY_BYTES, which has no override on any route: one variable
|
|
176
|
+
* spanning both tiers could not express "relax the text ceiling, leave the video
|
|
177
|
+
* one alone", and a value chosen for a 2 MB conversation would collapse the video
|
|
178
|
+
* tier with it. MiniMax's video budget is likewise a bare constant.
|
|
179
|
+
*
|
|
180
|
+
* The text/image tier is now graded by model: this constant is what the 256K
|
|
181
|
+
* models keep and what an unknown model falls back to, while the 1M models
|
|
182
|
+
* declare their own, larger ceiling in the registry. {@link maxRequestBodyBytesFor}
|
|
183
|
+
* is the resolver that applies that grade.
|
|
184
|
+
*/
|
|
185
|
+
export declare const DEFAULT_MAX_MESSAGE_BODY_BYTES = 2097152;
|
|
186
|
+
/**
|
|
187
|
+
* Ceiling this process enforces when the caller has no model to key on.
|
|
188
|
+
*
|
|
189
|
+
* Kept alongside {@link maxRequestBodyBytesFor} rather than folded into it: this
|
|
190
|
+
* is the answer for "what does this deployment allow at all", which the video
|
|
191
|
+
* budget and the settings reporting paths need without naming a model. A request
|
|
192
|
+
* that DOES name one goes through the per-model resolver below, so a 1M-tier
|
|
193
|
+
* session gets its own tier instead of this floor.
|
|
194
|
+
*/
|
|
195
|
+
export declare function maxMessageBodyBytes(env?: NodeJS.ProcessEnv): number;
|
|
196
|
+
/**
|
|
197
|
+
* Request-body ceiling for one model, in precedence order.
|
|
198
|
+
*
|
|
199
|
+
* The middleware gateway that rejects a body is shared and the sessions are not:
|
|
200
|
+
* a 1M-tier session produces several megabytes of conversation the 256K tier
|
|
201
|
+
* cannot, so one number for both either starves the long tier or leaves the
|
|
202
|
+
* short one unguarded. Hence three sources, highest priority first:
|
|
203
|
+
*
|
|
204
|
+
* 1. DSH_KIMI_CODE_MAX_BODY_BYTES — a measured figure for THIS deployment, so it
|
|
205
|
+
* wins over every per-model default. It still has to be a positive integer:
|
|
206
|
+
* a typo falls through to the model's own default rather than switching the
|
|
207
|
+
* guard off, which is the one failure this variable must never cause;
|
|
208
|
+
* 2. the model's {@link KimiCodeCatalogModel.maxRequestBodyBytes};
|
|
209
|
+
* 3. {@link DEFAULT_MAX_MESSAGE_BODY_BYTES}, for a model the registry does not
|
|
210
|
+
* know — an unknown id keeps the most conservative ceiling rather than
|
|
211
|
+
* inheriting a long-context allowance nothing has vouched for.
|
|
212
|
+
*
|
|
213
|
+
* @param model the registry row for the model being called, or undefined when
|
|
214
|
+
* the id is not one this route ships.
|
|
215
|
+
* @param env environment the override is read from, injectable for tests.
|
|
216
|
+
*/
|
|
217
|
+
export declare function maxRequestBodyBytesFor(model: KimiCodeCatalogModel | undefined, env?: NodeJS.ProcessEnv): number;
|
|
218
|
+
export { LONG_CONTEXT_MESSAGE_BODY_BYTES };
|
|
219
|
+
/**
|
|
220
|
+
* Bytes one METERED token is assumed to occupy when a deployment asks this route
|
|
221
|
+
* to fold its published window against the byte ceiling.
|
|
222
|
+
*
|
|
223
|
+
* The unit is not "bytes per real token" but "bytes per token as the host COUNTS
|
|
224
|
+
* it": DSH prices text at a fixed four characters per token
|
|
225
|
+
* (`@deepseek-ai/dsh-token-meter`'s estimate.ts, CHARS_PER_TOKEN = 4) whatever
|
|
226
|
+
* those characters weigh on the wire. So the figure is four characters per token
|
|
227
|
+
* times the bytes of one character, and each density lands somewhere different:
|
|
228
|
+
*
|
|
229
|
+
* | density | bytes/metered token | 2 MB wall |
|
|
230
|
+
* | ------------------------------------------ | ------------------- | --------- |
|
|
231
|
+
* | ASCII: code, patches, JSON tool results | 4 | 524_288 |
|
|
232
|
+
* | CJK prose mixed with English code and JSON | 8 | 262_144 |
|
|
233
|
+
* | dense CJK | 12 | 174_763 |
|
|
234
|
+
*
|
|
235
|
+
* These are the values DSH_KIMI_CODE_BYTES_PER_TOKEN accepts, and what each buys.
|
|
236
|
+
* Folding is a choice about WHERE compaction fires, never about safety: with a
|
|
237
|
+
* wall at N metered tokens the host's threshold is
|
|
238
|
+
* `floor(min(0.8 x window, window - 65_536))` (this route declares no
|
|
239
|
+
* `defaultMaxTokens`, so nothing is reserved), and the table says which densities
|
|
240
|
+
* sit above it.
|
|
241
|
+
*
|
|
242
|
+
* - unset: no folding at all. The window the model declares — or the one the user
|
|
243
|
+
* explicitly overrode — is published exactly as it is. A long session reaches
|
|
244
|
+
* the 2 MB wall and recovers there, because the refusal carries
|
|
245
|
+
* CONTEXT_OVERFLOW_CODE; nothing is silently given up up front;
|
|
246
|
+
* - 4: publish 524_288, threshold 419_430. Code-dominated sessions compact
|
|
247
|
+
* BEFORE the wall with 104_858 metered tokens of slack, which is the point of
|
|
248
|
+
* the setting; mixed and CJK traffic still meets the wall first;
|
|
249
|
+
* - 5: publish 419_430, threshold 335_544. Same shape, a little less slack;
|
|
250
|
+
* - 8: publish 262_144, threshold 196_608. ASCII and mixed text both compact in
|
|
251
|
+
* time; dense CJK does not;
|
|
252
|
+
* - 12: publish 174_762, threshold 109_226. All three densities compact in time,
|
|
253
|
+
* at the cost of publishing a small window (a CJK-first deployment's choice).
|
|
254
|
+
*
|
|
255
|
+
* Anything smaller than 4 makes the published window larger than the byte ceiling
|
|
256
|
+
* can ever fill (2 -> 1_048_576 against a 524_288-token ASCII wall), so the
|
|
257
|
+
* threshold sits above even the ASCII wall and the setting buys nothing but a
|
|
258
|
+
* window every session is refused before filling.
|
|
259
|
+
*
|
|
260
|
+
* Bytes per metered token in this process, or undefined when folding is off.
|
|
261
|
+
*
|
|
262
|
+
* DSH_KIMI_CODE_BYTES_PER_TOKEN is an OPTIONAL early-compaction switch, not a
|
|
263
|
+
* safety guard, and the distinction decides what a bad value must do. A typo
|
|
264
|
+
* cannot weaken anything here — the recovery code on an oversized refusal is the
|
|
265
|
+
* safety net and it is always armed — so an empty, unparsable, zero or negative
|
|
266
|
+
* value simply means "no folding", the same as leaving the variable out. (The
|
|
267
|
+
* byte CEILING keeps the opposite rule, because THAT is a guard:
|
|
268
|
+
* `maxMessageBodyBytes` falls back to the real limit rather than to no limit.)
|
|
269
|
+
*
|
|
270
|
+
* Undefined rather than a sentinel number on purpose: every caller has to decide
|
|
271
|
+
* what "no ceiling" means for it, and a magic value like Infinity would silently
|
|
272
|
+
* flow into arithmetic instead of forcing that decision.
|
|
273
|
+
*/
|
|
274
|
+
export declare function wireBytesPerToken(env?: NodeJS.ProcessEnv): number | undefined;
|
|
275
|
+
/**
|
|
276
|
+
* Token ceiling the body limit implies at the configured density, or undefined
|
|
277
|
+
* when folding is off.
|
|
278
|
+
*
|
|
279
|
+
* The gateway in front of this route counts BYTES while DSH's compaction
|
|
280
|
+
* thresholds count metered tokens taken from the window an adapter declares, and
|
|
281
|
+
* the two never meet on their own. Expressing the byte ceiling in the unit the
|
|
282
|
+
* host acts on is the same budget-first rule the official kimi-cli applies in
|
|
283
|
+
* `soul/compaction.py::should_auto_compact` — it compacts at 85% of the window or
|
|
284
|
+
* with 50K tokens left and never special-cases 2097152. This route applies that
|
|
285
|
+
* rule only when a deployment asks for it, because "smaller window" is a
|
|
286
|
+
* behaviour change to the model's advertised capacity, not a bug fix.
|
|
287
|
+
*/
|
|
288
|
+
export declare function byteDerivedTokenCap(env?: NodeJS.ProcessEnv): number | undefined;
|
|
289
|
+
/**
|
|
290
|
+
* Context window this route will actually honour for one model.
|
|
291
|
+
*
|
|
292
|
+
* Both what `resolveModel` reports to DSH — which is where the compaction
|
|
293
|
+
* threshold is computed — and what the request builder budgets against, so the
|
|
294
|
+
* promise and the budget cannot drift apart.
|
|
295
|
+
*
|
|
296
|
+
* With folding OFF, which is the default, this is the declared window itself,
|
|
297
|
+
* including a window the user overrode by hand: the vendor's figure and the
|
|
298
|
+
* user's explicit choice are both respected, and a session that outgrows them is
|
|
299
|
+
* recovered at the byte wall rather than pre-emptively summarized.
|
|
300
|
+
*
|
|
301
|
+
* With folding ON it is the smaller of the declared window and
|
|
302
|
+
* {@link byteDerivedTokenCap}: one number for both readers, so what the host
|
|
303
|
+
* believes the model can hold is what the guard lets it send.
|
|
304
|
+
*
|
|
305
|
+
* A window that is missing, zero, negative or not finite is not trusted. It falls
|
|
306
|
+
* back to {@link DEFAULT_CONTEXT_WINDOW} (or to the byte-derived cap when that is
|
|
307
|
+
* smaller), and the result never drops below 1 so no caller ends up with an empty
|
|
308
|
+
* window.
|
|
309
|
+
*/
|
|
310
|
+
export declare function effectiveContextWindow(tokenWindow: number, env?: NodeJS.ProcessEnv): number;
|
|
311
|
+
/**
|
|
312
|
+
* Base64 image payload one request on this route may carry.
|
|
313
|
+
*
|
|
314
|
+
* Kimi's own CLI budgets request media at 20 MiB (REQUEST_MEDIA_BUDGET_BYTES),
|
|
315
|
+
* and this route now speaks the same number. The previous 1.5 MB figure was
|
|
316
|
+
* Kimi's TEXT-and-image body ceiling applied to the images alone, which threw
|
|
317
|
+
* away pictures the service was perfectly willing to accept: a conversation
|
|
318
|
+
* that carried three screenshots lost two of them to a limit that never
|
|
319
|
+
* existed upstream.
|
|
320
|
+
*
|
|
321
|
+
* DSH_KIMI_CODE_MAX_IMAGE_BYTES overrides it under the same rules: ignored,
|
|
322
|
+
* never applied as a disabled guard.
|
|
323
|
+
*/
|
|
324
|
+
export declare const DEFAULT_MAX_REQUEST_IMAGE_BYTES: number;
|
|
325
|
+
/**
|
|
326
|
+
* The mark the request is brought back under once it has passed the high one.
|
|
327
|
+
*
|
|
328
|
+
* Half the high mark, exactly as the official client does
|
|
329
|
+
* (REQUEST_MEDIA_BUDGET_LOW_BYTES). The gap between the two is the slack that
|
|
330
|
+
* keeps the number of retained images stable from turn to turn, and a stable
|
|
331
|
+
* image count is what keeps the cached prefix valid.
|
|
332
|
+
*/
|
|
333
|
+
export declare const DEFAULT_LOW_REQUEST_IMAGE_BYTES: number;
|
|
334
|
+
/** Image budget this process enforces, honouring the deployment override. */
|
|
335
|
+
export declare function maxRequestImageBytes(env?: NodeJS.ProcessEnv): number;
|
|
336
|
+
/**
|
|
337
|
+
* The low-water mark this process enforces, honouring the deployment override.
|
|
338
|
+
*
|
|
339
|
+
* Half of whatever the deployment pinned, so an override moves both marks
|
|
340
|
+
* together: a deployment that lowers the ceiling to 4 MB gets a 2 MB low mark
|
|
341
|
+
* rather than the built-in 10 MB, which would let every request sit above the
|
|
342
|
+
* mark it is supposed to recover to. A deployment that pins nothing gets
|
|
343
|
+
* Kimi's own 10 MiB.
|
|
344
|
+
*/
|
|
345
|
+
export declare function lowRequestImageBytes(env?: NodeJS.ProcessEnv): number;
|
|
346
|
+
/** Anthropic protocol revision the managed service documents. */
|
|
347
|
+
export declare const ANTHROPIC_VERSION = "2023-06-01";
|
|
348
|
+
/**
|
|
349
|
+
* Which wire dialect a model id is served over.
|
|
350
|
+
*
|
|
351
|
+
* Always the OpenAI-compatible chat completions dialect: this line uses that one
|
|
352
|
+
* protocol for every model, K3.1 Pro included, which is what the official agent
|
|
353
|
+
* configures for the managed provider (`type = "kimi"`). The Anthropic Messages
|
|
354
|
+
* dialect remains reachable only when a live listing declares it for an id
|
|
355
|
+
* (see `wireForCatalogEntry`), so the answer here is a constant rather than a
|
|
356
|
+
* per-model table.
|
|
357
|
+
*/
|
|
358
|
+
export declare function wireForModel(_modelId: string): KimiCodeWire;
|
|
359
|
+
/**
|
|
360
|
+
* Thinking levels one model advertises, from the static registry.
|
|
361
|
+
*
|
|
362
|
+
* A registry row that declares `thinkingType: 'only'` cannot be asked to stop
|
|
363
|
+
* reasoning — the service answers HTTP 400 for a disabled-thinking request — so
|
|
364
|
+
* `none` is filtered out of the list it publishes.
|
|
365
|
+
*/
|
|
366
|
+
export declare function reasoningEffortsFor(modelId: string): string[];
|
|
367
|
+
/**
|
|
368
|
+
* Thinking level one model uses when the conversation does not pick one.
|
|
369
|
+
*
|
|
370
|
+
* A declared default that the resolved effort list no longer contains is
|
|
371
|
+
* dropped rather than carried through: with `only` in force the list can lose
|
|
372
|
+
* `none`, and a default naming a level the model can no longer be asked for
|
|
373
|
+
* would fail on the first turn that relied on it.
|
|
374
|
+
*/
|
|
375
|
+
export declare function defaultReasoningEffortFor(modelId: string): KimiCodeReasoningEffort | undefined;
|
|
376
|
+
/**
|
|
377
|
+
* How a model handles thinking, from the static registry.
|
|
378
|
+
*
|
|
379
|
+
* Exposed so the request builder and the settings card read the same row rather
|
|
380
|
+
* than each re-deriving the rule; `undefined` means the registry says nothing
|
|
381
|
+
* about this id, which is not the same as "thinking can be switched off".
|
|
382
|
+
*/
|
|
383
|
+
export declare function thinkingTypeFor(modelId: string): KimiCodeThinkingType | undefined;
|
|
384
|
+
/** Live catalog fields consulted when coercing a disallowed thinking level. */
|
|
385
|
+
export interface KimiCodeThinkingGateEntry {
|
|
386
|
+
readonly id: string;
|
|
387
|
+
readonly thinkingType?: KimiCodeThinkingType;
|
|
388
|
+
readonly reasoningEfforts?: readonly string[];
|
|
389
|
+
readonly defaultReasoningEffort?: string;
|
|
390
|
+
}
|
|
391
|
+
/**
|
|
392
|
+
* Raise a disabled-thinking request to the lowest level the model can actually run.
|
|
393
|
+
*
|
|
394
|
+
* Asking a thinking-only model for `none` is refused by the service with
|
|
395
|
+
* HTTP 400 ("K3.1 Pro does not support disabled thinking mode"), and the user's
|
|
396
|
+
* real intent there is "don't spend my quota on thinking", not "fail the turn".
|
|
397
|
+
* So the effort is lifted to the lowest valid non-`none` level (`low` for the
|
|
398
|
+
* K3.1 pair) instead of jumping to `max`, consulting the live catalog entry
|
|
399
|
+
* first when provided so newly published or updated models follow the server's
|
|
400
|
+
* declaration. The lift is REPORTED through `coercedFrom` so a caller can tell
|
|
401
|
+
* the user what happened instead of silently spending more than they asked for.
|
|
402
|
+
*
|
|
403
|
+
* A model that does not declare `only`, and any effort other than `none`, is
|
|
404
|
+
* returned untouched. When a thinking-only row leaves no valid non-`none` level
|
|
405
|
+
* the effort becomes `undefined`, which sends no level at all and leaves the
|
|
406
|
+
* service on its own default — still never a disabled-thinking request.
|
|
407
|
+
*/
|
|
408
|
+
export declare function coerceThinkingEffort(modelId: string, effort: KimiCodeReasoningEffort | undefined, catalog?: readonly KimiCodeThinkingGateEntry[]): {
|
|
409
|
+
effort: KimiCodeReasoningEffort | undefined;
|
|
410
|
+
coercedFrom: 'none' | null;
|
|
411
|
+
};
|
|
412
|
+
/**
|
|
413
|
+
* Accepted request modalities for one model.
|
|
414
|
+
*
|
|
415
|
+
* An unknown model falls back to text-only, matching the sibling routes: DSH
|
|
416
|
+
* turns a false "no images" into a visible placeholder the user can correct,
|
|
417
|
+
* while a false "images accepted" sends bytes to an endpoint that rejects the
|
|
418
|
+
* whole request.
|
|
419
|
+
*/
|
|
420
|
+
export declare function inputModalitiesFor(modelId: string): Array<'text' | 'image' | 'video'>;
|
|
421
|
+
/**
|
|
422
|
+
* Room a request must leave below its context window.
|
|
423
|
+
*
|
|
424
|
+
* The service rejects a request whose prompt plus requested output exceeds the
|
|
425
|
+
* model's window ("Your request exceeded model token limit: 262144"), so the
|
|
426
|
+
* output cap is derived from the window rather than fixed. 4,096 tokens is the
|
|
427
|
+
* headroom reserved for the prompt on a request that declares no size — the same
|
|
428
|
+
* shape the official client's completion budgeting uses.
|
|
429
|
+
*/
|
|
430
|
+
export declare const CONTEXT_HEADROOM_TOKENS = 4096;
|
|
431
|
+
/**
|
|
432
|
+
* Output cap one request asks for when the caller omits one.
|
|
433
|
+
*
|
|
434
|
+
* The K3 family reasons by default and `reasoning_content` is billed as output,
|
|
435
|
+
* so a fixed 32K cap silently truncates a long `max`-effort turn mid-thought and
|
|
436
|
+
* returns a `length` finish — the official client instead caps output at the
|
|
437
|
+
* model's context window (clamped to window − prompt). The declared floor is
|
|
438
|
+
* kept as a minimum so a small window cannot starve the answer.
|
|
439
|
+
*/
|
|
440
|
+
export declare function maxOutputTokensFor(modelId: string, contextWindow?: number): number;
|
|
441
|
+
/**
|
|
442
|
+
* Reduce the requested output cap so prompt + output fit the window.
|
|
443
|
+
*
|
|
444
|
+
* `estimatedInputTokens` is the caller's own size estimate; when it is absent
|
|
445
|
+
* the cap is left alone rather than guessed at, because under-asking truncates
|
|
446
|
+
* reasoning while over-asking is rejected outright — the service is the final
|
|
447
|
+
* authority and only it knows the real prompt size.
|
|
448
|
+
*/
|
|
449
|
+
export declare function clampOutputToContext(requested: number, contextWindow: number, estimatedInputTokens?: number): number;
|
|
450
|
+
/** Reasoning levels the whole route understands, for route-level validation. */
|
|
451
|
+
export declare function isKimiCodeReasoningEffort(value: unknown): value is KimiCodeReasoningEffort;
|
|
452
|
+
/** Context window used before the live catalog has answered. */
|
|
453
|
+
export declare const FALLBACK_MODELS: ReadonlyArray<{
|
|
454
|
+
id: string;
|
|
455
|
+
name: string;
|
|
456
|
+
contextWindow: number;
|
|
457
|
+
}>;
|
|
458
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/host/kimi-code/types.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Kimi Code 的缓存命中连击:这次请求算不算「读回了几乎完整的前缀缓存」,
|
|
3
|
+
* 以及连续算了几次。
|
|
4
|
+
*
|
|
5
|
+
* 这个数字只用于诊断展示,不参与任何请求决策,也不改变发出去的字节。
|
|
6
|
+
*
|
|
7
|
+
* 判据是双轨的,因为比例轨在短会话上会被分母效应误判:
|
|
8
|
+
*
|
|
9
|
+
* 1. **比例轨**:命中占本次提示的比例不低于 0.97;
|
|
10
|
+
* 2. **前缀完整延续轨**:本轮命中至少 1024 token(已经形成实质缓存前缀)、存在
|
|
11
|
+
* 紧邻的上一次观测、那一轮没有真实漂移、本轮命中不比上轮缩水,且本轮新增
|
|
12
|
+
* 未命中不超过 256 token(一个缓存块的正常尾巴)。
|
|
13
|
+
*
|
|
14
|
+
* 漂移只在 `stable` / `first-request` 之外才算真实的:Kimi 对每个请求都会报告
|
|
15
|
+
* 生命周期状态,那两种是正常的。
|
|
16
|
+
*
|
|
17
|
+
* @module dsh-multi-provider/host/kimi-code/warmup-streak
|
|
18
|
+
*/
|
|
19
|
+
/** 一次观测里判据用到的部分。 */
|
|
20
|
+
export interface WarmupObservation {
|
|
21
|
+
/** 本次真正送去计算的未命中 token 数。 */
|
|
22
|
+
readonly inputTokens: number;
|
|
23
|
+
/** 其中命中缓存、没有重算的 token 数。 */
|
|
24
|
+
readonly cacheReadTokens: number;
|
|
25
|
+
/** 非空表示这次观测到前缀漂移。 */
|
|
26
|
+
readonly driftCause?: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* 缓存命中率 = 命中 / (未命中 + 命中)。
|
|
30
|
+
*
|
|
31
|
+
* 两个字段是互斥的两半,不是整体与部分:`inputTokens` 是这次真正送去计算的
|
|
32
|
+
* 未命中部分,`cacheReadTokens` 是命中缓存、没有重算的部分。所以分母必须是
|
|
33
|
+
* 两者之和;用 `cached / inputTokens` 在命中接近未命中时会算出大于 1 的数。
|
|
34
|
+
*
|
|
35
|
+
* @param observation - 至少含两个 token 数的观测。
|
|
36
|
+
* @returns 0-1 的命中率;两个数都为 0 时为 0。
|
|
37
|
+
*/
|
|
38
|
+
export declare function cacheWarmupHitRatio(observation: WarmupObservation): number;
|
|
39
|
+
/**
|
|
40
|
+
* 一条观测是否算作一次有效命中。
|
|
41
|
+
*
|
|
42
|
+
* @param observation - 本条观测。
|
|
43
|
+
* @param previous - 紧邻的上一条观测,可选。
|
|
44
|
+
* @returns 算作命中时为 true。
|
|
45
|
+
*/
|
|
46
|
+
export declare function isWarmupHit(observation: WarmupObservation, previous?: WarmupObservation): boolean;
|
|
47
|
+
/**
|
|
48
|
+
* 这次请求之后的连击数。
|
|
49
|
+
*
|
|
50
|
+
* 命中就接着上一轮的连击加一,没命中就归零。这个递推与「从最新一条往回数连续
|
|
51
|
+
* 命中条数」等价:中间任何一次未命中都会把计数截断,而良性与真实的漂移判定都
|
|
52
|
+
* 落在单次观测上。
|
|
53
|
+
*
|
|
54
|
+
* @param input - 本轮数字与上一轮的对照值。
|
|
55
|
+
* @returns 新的连击数;未命中时为 0。
|
|
56
|
+
*/
|
|
57
|
+
export declare function nextWarmupStreak(input: {
|
|
58
|
+
readonly cacheReadTokens: number;
|
|
59
|
+
readonly inputTokens: number;
|
|
60
|
+
readonly driftCause?: string;
|
|
61
|
+
readonly previousCachedTokens?: number;
|
|
62
|
+
readonly previousFreshTokens?: number;
|
|
63
|
+
readonly previousDriftCause?: string;
|
|
64
|
+
readonly priorStreak?: number;
|
|
65
|
+
}): number;
|
|
66
|
+
//# sourceMappingURL=warmup-streak.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"warmup-streak.d.ts","sourceRoot":"","sources":["../../../../src/host/kimi-code/warmup-streak.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAgBH,oBAAoB;AACpB,MAAM,WAAW,iBAAiB;IAChC,4BAA4B;IAC5B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,4BAA4B;IAC5B,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAA;IAChC,qBAAqB;IACrB,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAA;CAC7B;AAED;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,iBAAiB,GAAG,MAAM,CAO1E;AAOD;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,WAAW,EAAE,iBAAiB,EAAE,QAAQ,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAoBjG;AAED;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE;IACtC,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAA;IAChC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,oBAAoB,CAAC,EAAE,MAAM,CAAA;IACtC,QAAQ,CAAC,mBAAmB,CAAC,EAAE,MAAM,CAAA;IACrC,QAAQ,CAAC,kBAAkB,CAAC,EAAE,MAAM,CAAA;IACpC,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAC9B,GAAG,MAAM,CAeT"}
|