@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,112 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which account should serve this request when one of them still has it warm.
|
|
3
|
+
*
|
|
4
|
+
* Kimi's prefix cache lives on the service, one cache per account, so two
|
|
5
|
+
* accounts in the same pool do not share a warm prefix: the account that
|
|
6
|
+
* answered this exact prompt a minute ago reads it back at the cache price,
|
|
7
|
+
* while the account the rotation strategy happens to pick reprocesses the whole
|
|
8
|
+
* thing. Rotation cannot see that difference — it knows cooldowns, tokens and
|
|
9
|
+
* last use, never prompt content — so the request names the accounts it would
|
|
10
|
+
* rather use and the pool honours the order.
|
|
11
|
+
*
|
|
12
|
+
* The whole decision is here, as a pure function of four inputs, for the same
|
|
13
|
+
* reason `cache-hint` is: the numbers behind it (how long an entry survives, how
|
|
14
|
+
* much a cache read costs against a fresh one) are measured elsewhere, and
|
|
15
|
+
* swapping a source must change only where a value comes from, never the rule.
|
|
16
|
+
*
|
|
17
|
+
* @module dsh-multi-provider/kimi-code-cache-affinity
|
|
18
|
+
*/
|
|
19
|
+
import type { KimiCodeAccountQuota } from '../../shared/kimi-code-contracts.ts';
|
|
20
|
+
/**
|
|
21
|
+
* Remaining share below which a warm account stops being preferred.
|
|
22
|
+
*
|
|
23
|
+
* Affinity is a discount, not a right: an account holding 4% of its window can
|
|
24
|
+
* serve a few cheap cache reads and then take the line offline mid-conversation,
|
|
25
|
+
* which costs far more than the prefix it saved. 20% is the same floor the
|
|
26
|
+
* background warmup uses before it spends anything (`DEFAULT_MIN_WARMUP_QUOTA_RATIO`),
|
|
27
|
+
* so the two decisions agree about when an account is running dry instead of
|
|
28
|
+
* each inventing its own answer.
|
|
29
|
+
*/
|
|
30
|
+
export declare const AFFINITY_QUOTA_FLOOR_SHARE = 0.2;
|
|
31
|
+
/**
|
|
32
|
+
* The share of its tightest window an account has left, or null when unknown.
|
|
33
|
+
*
|
|
34
|
+
* The TIGHTEST window is the only honest answer: a pool row can carry several
|
|
35
|
+
* at once, and an account with 90% of a weekly window but 2% of its five-hour
|
|
36
|
+
* one is about to be refused. A window whose consumption was never measured
|
|
37
|
+
* is skipped rather than read as empty or full, and a snapshot with no measured
|
|
38
|
+
* window at all answers null — "unknown", which the caller treats as "not
|
|
39
|
+
* provably short" instead of blocking the account on a number nobody measured.
|
|
40
|
+
*
|
|
41
|
+
* @param quota - The account's newest quota snapshot, when one was ever read.
|
|
42
|
+
* @returns the smallest remaining fraction in `[0, 1]`, or null when unknown.
|
|
43
|
+
*/
|
|
44
|
+
export declare function remainingQuotaShare(quota: KimiCodeAccountQuota | null | undefined): number | null;
|
|
45
|
+
/** Settings-card description for the cache-affinity switch. */
|
|
46
|
+
export declare const CACHE_AFFINITY_SETTING_DESCRIPTION: string;
|
|
47
|
+
/**
|
|
48
|
+
* Environment override for the affinity switch.
|
|
49
|
+
*
|
|
50
|
+
* The same contract as the wait-time warmup switch beside it in settings: an
|
|
51
|
+
* explicit value wins over the stored setting, so a deployment can pin the
|
|
52
|
+
* behavioural change without editing preferences on disk.
|
|
53
|
+
*/
|
|
54
|
+
export declare const CACHE_AFFINITY_ENV = "DSH_KIMI_CODE_CACHE_AFFINITY";
|
|
55
|
+
/**
|
|
56
|
+
* Resolve whether cache-affinity routing is enabled.
|
|
57
|
+
*
|
|
58
|
+
* Enabled by default. `0`/`false`/`no`/`off` and `1`/`true`/`yes`/`on` override
|
|
59
|
+
* the stored setting; otherwise the live `cacheAffinity` setting (default
|
|
60
|
+
* `true`) governs. Anything unreadable falls back to enabled rather than
|
|
61
|
+
* throwing inside a request path.
|
|
62
|
+
*
|
|
63
|
+
* @param config - Plugin config carrying the live setting.
|
|
64
|
+
* @param env - Environment to consult; `process.env` in production.
|
|
65
|
+
* @returns whether a request may state an account preference.
|
|
66
|
+
*/
|
|
67
|
+
export declare function resolveCacheAffinityEnabled(config?: {
|
|
68
|
+
cacheAffinity?: {
|
|
69
|
+
get(): boolean | undefined;
|
|
70
|
+
} | boolean;
|
|
71
|
+
}, env?: Record<string, string | undefined>): boolean;
|
|
72
|
+
/** One account the request could be served by. */
|
|
73
|
+
export interface AffinityCandidate {
|
|
74
|
+
/** Pool account id. */
|
|
75
|
+
readonly id: string;
|
|
76
|
+
/**
|
|
77
|
+
* Whether this account's own prefix group for this request is warm right now.
|
|
78
|
+
*
|
|
79
|
+
* Per account by design: the pool's cache is per account, so "the prefix is
|
|
80
|
+
* warm" is a fact about one account, never about the pool.
|
|
81
|
+
*/
|
|
82
|
+
readonly warm: boolean;
|
|
83
|
+
}
|
|
84
|
+
export interface AffinityOrderInput {
|
|
85
|
+
/** Accounts that may serve this request right now, in pool order. */
|
|
86
|
+
readonly candidates: readonly AffinityCandidate[];
|
|
87
|
+
/** Remaining share per account id; a missing or null entry means unknown. */
|
|
88
|
+
readonly remainingShareById?: Readonly<Record<string, number | null | undefined>>;
|
|
89
|
+
/** Floor below which a warm account gives way; defaults to {@link AFFINITY_QUOTA_FLOOR_SHARE}. */
|
|
90
|
+
readonly floorShare?: number;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Order the accounts this request would rather use, warmest and safest first.
|
|
94
|
+
*
|
|
95
|
+
* Only accounts whose prefix is warm AND whose remaining share is either
|
|
96
|
+
* unknown or at least the floor are returned: a warm account that is nearly
|
|
97
|
+
* spent is deliberately absent, because the pool then falls back to its own
|
|
98
|
+
* rotation instead of spending the last of a window on a discount. An empty
|
|
99
|
+
* result means "no preference" — the caller passes no hint at all and the
|
|
100
|
+
* strategy behaves exactly as it would have without this module.
|
|
101
|
+
*
|
|
102
|
+
* Order: a warm account with a known-and-sufficient share first (largest
|
|
103
|
+
* remaining first, so two warm accounts spread the load instead of always
|
|
104
|
+
* spending one), then a warm account whose share nobody measured. Unknown last
|
|
105
|
+
* because a measured account is a better bet than an unmeasured one, but still
|
|
106
|
+
* listed: an unmeasured warm account is not evidence of anything bad.
|
|
107
|
+
*
|
|
108
|
+
* @param input - candidates plus the quota evidence behind them.
|
|
109
|
+
* @returns account ids in preference order; empty when nothing is preferred.
|
|
110
|
+
*/
|
|
111
|
+
export declare function orderAffinityCandidates(input: AffinityOrderInput): string[];
|
|
112
|
+
//# sourceMappingURL=cache-affinity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cache-affinity.d.ts","sourceRoot":"","sources":["../../../../src/host/kimi-code/cache-affinity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAA;AAO/E;;;;;;;;;GASG;AACH,eAAO,MAAM,0BAA0B,MAAqC,CAAA;AAE5E;;;;;;;;;;;;GAYG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,oBAAoB,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,IAAI,CAEjG;AAED,+DAA+D;AAC/D,eAAO,MAAM,kCAAkC,QAEwB,CAAA;AAEvE;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,iCAAiC,CAAA;AAEhE;;;;;;;;;;;GAWG;AACH,wBAAgB,2BAA2B,CACzC,MAAM,CAAC,EAAE;IAAE,aAAa,CAAC,EAAE;QAAE,GAAG,IAAI,OAAO,GAAG,SAAS,CAAA;KAAE,GAAG,OAAO,CAAA;CAAE,EACrE,GAAG,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAe,GACpD,OAAO,CAcT;AAED,kDAAkD;AAClD,MAAM,WAAW,iBAAiB;IAChC,uBAAuB;IACvB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB;;;;;OAKG;IACH,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAA;CACvB;AAED,MAAM,WAAW,kBAAkB;IACjC,qEAAqE;IACrE,QAAQ,CAAC,UAAU,EAAE,SAAS,iBAAiB,EAAE,CAAA;IACjD,6EAA6E;IAC7E,QAAQ,CAAC,kBAAkB,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC,CAAA;IACjF,kGAAkG;IAClG,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAA;CAC7B;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,kBAAkB,GAAG,MAAM,EAAE,CAE3E"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { type CacheHintDecision, type CacheHintInput } from '../common/cache-hint.ts';
|
|
2
|
+
/**
|
|
3
|
+
* When it is worth telling the user their prompt cache has gone cold.
|
|
4
|
+
*
|
|
5
|
+
* Kimi's cache is automatic and content-hash based, so a client gets no marker
|
|
6
|
+
* that it is no longer being reused — the only evidence is the read ratio in
|
|
7
|
+
* the usage stream. A conversation that sat idle past the cache lifetime pays
|
|
8
|
+
* the full prompt again on its next turn, and it is large enough on a real
|
|
9
|
+
* codebase to be worth a sentence.
|
|
10
|
+
*
|
|
11
|
+
* The trigger mirrors the official client's: idle beyond the cache lifetime AND
|
|
12
|
+
* a context large enough that reprocessing it actually costs something. The
|
|
13
|
+
* upstream rules arrive from a remote config that a private deployment cannot
|
|
14
|
+
* reach, so the lifetime here is the measured one; the decision function stays
|
|
15
|
+
* a pure function of its inputs so swapping the source later changes only where
|
|
16
|
+
* the number comes from.
|
|
17
|
+
*/
|
|
18
|
+
/**
|
|
19
|
+
* How long an entry survives, in milliseconds.
|
|
20
|
+
*
|
|
21
|
+
* MEASURED, not documented. The coding endpoint publishes no cache lifetime and
|
|
22
|
+
* its `5m`/`1h` write tiers cannot be selected from any official client, so the
|
|
23
|
+
* only figure available is the survival curve: 30 minutes, derived from the
|
|
24
|
+
* endpoint's own measured behaviour.
|
|
25
|
+
*
|
|
26
|
+
* The measurement (2026-10-02/03, three replicas per age, one fresh prefix per
|
|
27
|
+
* age so the probe does not renew what it is timing) put Kimi's coding plan at
|
|
28
|
+
* 3/3 warm through 25 minutes, 1/3 at 30 minutes, and 0/3 at 35 minutes — a
|
|
29
|
+
* 25–35 minute bracket around a fuzzy edge.
|
|
30
|
+
*
|
|
31
|
+
* 25 minutes is the last age at which every replica was still warm, and that is
|
|
32
|
+
* what this notice needs: it must arrive BEFORE the entry is surely gone. The
|
|
33
|
+
* 30-minute point where most replicas had gone cold is too late — by then the
|
|
34
|
+
* user has already paid for the reprocessed prefix, so a notice there describes
|
|
35
|
+
* the bill instead of preventing it.
|
|
36
|
+
*
|
|
37
|
+
* The old value was 5 minutes, taken from the `5m` write tier's NAME. On this
|
|
38
|
+
* endpoint the name is not the lifetime: that estimate warned from minute 6
|
|
39
|
+
* onward while the entry was still warm for another 19.
|
|
40
|
+
*/
|
|
41
|
+
export declare const CACHE_TTL_MS: number;
|
|
42
|
+
/**
|
|
43
|
+
* Context below which a cold cache is not worth mentioning.
|
|
44
|
+
*
|
|
45
|
+
* Reprocessing a few thousand tokens is invisible; reprocessing a few hundred
|
|
46
|
+
* thousand is the difference between an instant and a visible pause, and
|
|
47
|
+
* telling someone about the former trains them to ignore the notice.
|
|
48
|
+
*/
|
|
49
|
+
export declare const MIN_TOKENS_TO_HINT = 100000;
|
|
50
|
+
/**
|
|
51
|
+
* Note that a session just did something.
|
|
52
|
+
*
|
|
53
|
+
* Called on every turn, so the timestamp answers how long since this
|
|
54
|
+
* conversation last ran, which is what decides whether its cache entry can
|
|
55
|
+
* still be alive.
|
|
56
|
+
*/
|
|
57
|
+
export declare function markSessionActive(sessionId: string | undefined, now?: number): void;
|
|
58
|
+
/** When a session last did something, or undefined when it never has. */
|
|
59
|
+
export declare function sessionLastActiveAt(sessionId: string | undefined): number | undefined;
|
|
60
|
+
/** Forget one session's activity, or all of it. Test seam and teardown. */
|
|
61
|
+
export declare function resetSessionActivity(sessionId?: string): void;
|
|
62
|
+
export type { CacheHintDecision, CacheHintInput } from '../common/cache-hint.ts';
|
|
63
|
+
/** Kimi supplies its measured defaults; other providers call the common pure function directly. */
|
|
64
|
+
export declare function evaluateCacheHint(input: CacheHintInput): CacheHintDecision;
|
|
65
|
+
//# sourceMappingURL=cache-hint.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cache-hint.d.ts","sourceRoot":"","sources":["../../../../src/host/kimi-code/cache-hint.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACpB,MAAM,yBAAyB,CAAA;AAEhC;;;;;;;;;;;;;;;GAeG;AAEH;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,YAAY,QAAiB,CAAA;AAE1C;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,SAAU,CAAA;AAczC;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,EAAE,GAAG,GAAE,MAAmB,GAAG,IAAI,CAS/F;AAED,yEAAyE;AACzE,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAGrF;AAED,2EAA2E;AAC3E,wBAAgB,oBAAoB,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAM7D;AAED,YAAY,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAEhF,mGAAmG;AACnG,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,cAAc,GAAG,iBAAiB,CAM1E"}
|
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
import { PROVIDER_NAME } from './types.ts';
|
|
2
|
+
import { FileCredentialStore, type KimiCodeCatalogModel, type KimiCodeCredentials } from './token-store.ts';
|
|
3
|
+
import type { KimiCodeAccount, KimiCodeAccountQuota, KimiCodeExtraUsage, KimiCodeModelOption, KimiCodeRegion, KimiCodeUsageWindow, KimiCodeWire } from '../../shared/kimi-code-contracts.ts';
|
|
4
|
+
/** Endpoint suffixes on the coding API base. */
|
|
5
|
+
export declare const MODELS_PATH = "/models";
|
|
6
|
+
export declare const USAGES_PATH = "/usages";
|
|
7
|
+
export declare const ME_PATH = "/me";
|
|
8
|
+
/** Parse an ISO string, Unix seconds, or Unix milliseconds into Unix milliseconds. */
|
|
9
|
+
export declare function parseTimestamp(value: unknown): number | null;
|
|
10
|
+
/**
|
|
11
|
+
* Headers for a managed coding API request.
|
|
12
|
+
*
|
|
13
|
+
* The OpenAI-compatible surface authenticates with a bearer token. On the
|
|
14
|
+
* Anthropic-compatible surface the Anthropic SDK sends the token as
|
|
15
|
+
* `x-api-key` instead and deliberately omits `authorization`, so both are
|
|
16
|
+
* emitted — the service documents each surface and only reads its own field.
|
|
17
|
+
*/
|
|
18
|
+
export declare function kimiCodeHeaders(accessToken: string, wire?: KimiCodeWire, extra?: Record<string, string>): Promise<Record<string, string>>;
|
|
19
|
+
/**
|
|
20
|
+
* Headers for one model call.
|
|
21
|
+
*
|
|
22
|
+
* The managed service attributes usage to the installation, so the same
|
|
23
|
+
* \`X-Msh-*\` device identity the account endpoints require is sent here too.
|
|
24
|
+
* The product token stays this plugin's own: the service documents third-party
|
|
25
|
+
* clients against this endpoint, and claiming to be the official CLI is both
|
|
26
|
+
* dishonest and, per its own terms, grounds for suspending the subscription.
|
|
27
|
+
* The cost of that honesty is that a non-whitelisted user agent can be routed to
|
|
28
|
+
* a deprioritized pool, which answers with a transient 429 — the retry policy in
|
|
29
|
+
* the adapter is what absorbs it.
|
|
30
|
+
*/
|
|
31
|
+
export declare function modelRequestHeaders(accessToken: string, wire: KimiCodeWire): Promise<Record<string, string>>;
|
|
32
|
+
/** Test seam: resolve the URL one request goes to. */
|
|
33
|
+
export declare function requestUrl(wire: KimiCodeWire, region: KimiCodeRegion): string;
|
|
34
|
+
export declare function clearCachedCatalog(): void;
|
|
35
|
+
export declare function getCachedCatalog(): KimiCodeCatalogModel[];
|
|
36
|
+
/**
|
|
37
|
+
* Fetch the models the signed-in subscription can use.
|
|
38
|
+
*
|
|
39
|
+
* The live listing is authoritative — it is what tells the plugin which models
|
|
40
|
+
* the account's tier actually unlocks — so it is cached for half an hour and
|
|
41
|
+
* re-read on demand from the settings card.
|
|
42
|
+
*
|
|
43
|
+
* The cache is consulted BEFORE a token is acquired whenever the caller does not
|
|
44
|
+
* already hold one. That order is load-bearing: acquiring a token reads the
|
|
45
|
+
* credential store, and on Windows that is a DPAPI unprotect through a spawned
|
|
46
|
+
* `powershell.exe` (~200 ms). The harness resolves every model of every
|
|
47
|
+
* provider when it builds the picker's catalog, and each resolution calls in
|
|
48
|
+
* here, so acquiring first turned one catalog into one process launch per
|
|
49
|
+
* model. A caller that passes `accessToken` still keys the cache on the token,
|
|
50
|
+
* because a different account can see a different listing.
|
|
51
|
+
*/
|
|
52
|
+
export declare function loadProviderModels(options?: {
|
|
53
|
+
fetchFn?: typeof fetch;
|
|
54
|
+
store?: FileCredentialStore;
|
|
55
|
+
accessToken?: string;
|
|
56
|
+
region?: KimiCodeRegion;
|
|
57
|
+
signal?: AbortSignal;
|
|
58
|
+
force?: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Read the active credential from the account pool.
|
|
61
|
+
*
|
|
62
|
+
* Every refresh rotates the refresh token and invalidates the previous one.
|
|
63
|
+
* The single-credential file is a *copy* of the pool's primary account, so
|
|
64
|
+
* refreshing that copy spends the token the pool will present on the next
|
|
65
|
+
* model request — the account then reads as rejected until a new sign-in.
|
|
66
|
+
* Supplying this keeps the loader on the one credential authority.
|
|
67
|
+
*/
|
|
68
|
+
credentialProvider?: (region: KimiCodeRegion) => Promise<string | undefined>;
|
|
69
|
+
}): Promise<KimiCodeCatalogModel[]>;
|
|
70
|
+
/**
|
|
71
|
+
* Record which credential the last listing used, so a token-free caller for the
|
|
72
|
+
* same region can reuse it instead of decrypting the mirror.
|
|
73
|
+
*/
|
|
74
|
+
export declare function rememberCatalogCredential(region: KimiCodeRegion, accessToken: string): void;
|
|
75
|
+
/** Test seam: forget which credential the cached listings were fetched with. */
|
|
76
|
+
export declare function clearCatalogCredentials(): void;
|
|
77
|
+
/** Choose the wire dialect for one model, from the live catalog when it says. */
|
|
78
|
+
export declare function wireForCatalogEntry(modelId: string, catalog: readonly KimiCodeCatalogModel[]): KimiCodeWire;
|
|
79
|
+
/**
|
|
80
|
+
* Thinking levels for one model, from the catalog when it declares them.
|
|
81
|
+
*
|
|
82
|
+
* `supports_thinking_type` is applied last because it is the field that can
|
|
83
|
+
* invalidate the effort list itself. A model that declares `only` reasons at
|
|
84
|
+
* every level, so offering `none` asks for a turn the service will reject; a
|
|
85
|
+
* model that declares `no` does not reason at all, so exposing its levels would
|
|
86
|
+
* advertise behaviour it does not have.
|
|
87
|
+
*/
|
|
88
|
+
export declare function reasoningEffortsForEntry(modelId: string, catalog: readonly KimiCodeCatalogModel[]): string[];
|
|
89
|
+
/**
|
|
90
|
+
* Default thinking level for one model, when the server states one.
|
|
91
|
+
*
|
|
92
|
+
* A declared default that the resolved effort list no longer contains is
|
|
93
|
+
* dropped rather than carried through: with `only` in force the list can lose
|
|
94
|
+
* `none`, and a default naming a level the model can no longer be asked for
|
|
95
|
+
* would fail on the first turn that relied on it.
|
|
96
|
+
*/
|
|
97
|
+
export declare function defaultReasoningEffortForEntry(modelId: string, catalog: readonly KimiCodeCatalogModel[]): string | undefined;
|
|
98
|
+
/**
|
|
99
|
+
* Whether one model accepts tool declarations at all.
|
|
100
|
+
*
|
|
101
|
+
* Distinct from {@link dynamicToolsForEntry}, which asks the narrower question
|
|
102
|
+
* of message-level declarations: a model can take tools at the top level and
|
|
103
|
+
* not accept them per message, and collapsing the two would disable tools on a
|
|
104
|
+
* model that still works. Precedence is the live listing, including an
|
|
105
|
+
* explicit false, then the shipped registry.
|
|
106
|
+
*/
|
|
107
|
+
export declare function toolUseForEntry(modelId: string, catalog: readonly KimiCodeCatalogModel[]): boolean;
|
|
108
|
+
/**
|
|
109
|
+
* Prompt ceiling for one model, or undefined when it equals the window.
|
|
110
|
+
*
|
|
111
|
+
* The completion budget still uses the full window — the cap bounds what may be
|
|
112
|
+
* sent, not how much may be generated — but a caller sizing a prompt needs the
|
|
113
|
+
* smaller of the two whenever the service states a lower input bound.
|
|
114
|
+
*/
|
|
115
|
+
export declare function maxInputTokensForEntry(modelId: string, catalog: readonly KimiCodeCatalogModel[]): number | undefined;
|
|
116
|
+
/**
|
|
117
|
+
* Whether one model accepts message-level tool declarations.
|
|
118
|
+
*
|
|
119
|
+
* THE single resolution point for `dynamically_loaded_tools`: the settings card
|
|
120
|
+
* and the request builder must never disagree, because the failure mode is a UI
|
|
121
|
+
* that promises a capability the sent request silently drops. Precedence is the
|
|
122
|
+
* live listing (including an explicit false), then the shipped registry.
|
|
123
|
+
*
|
|
124
|
+
* @param modelId - exact model id.
|
|
125
|
+
* @param catalog - live catalog, possibly empty when offline.
|
|
126
|
+
*/
|
|
127
|
+
export declare function dynamicToolsForEntry(modelId: string, catalog: readonly KimiCodeCatalogModel[]): boolean;
|
|
128
|
+
/** Input modalities for one model, from the catalog when it declares them. */
|
|
129
|
+
export declare function inputModalitiesForEntry(modelId: string, catalog: readonly KimiCodeCatalogModel[]): Array<'text' | 'image' | 'video'>;
|
|
130
|
+
/** Build the picker entries the settings card renders. */
|
|
131
|
+
export declare function buildModelOptions(catalog: readonly KimiCodeCatalogModel[], enabledModelIds: readonly string[], contextWindowOverrides: Record<string, number>): KimiCodeModelOption[];
|
|
132
|
+
/**
|
|
133
|
+
* The snapshot read most recently, whichever account it belongs to.
|
|
134
|
+
*
|
|
135
|
+
* Kept for the pre-pool single-credential card, which has no account id to ask
|
|
136
|
+
* with. A pooled caller asks {@link getCachedQuotaFor} instead.
|
|
137
|
+
*/
|
|
138
|
+
export declare function getCachedQuota(): KimiCodeAccountQuota | null;
|
|
139
|
+
/**
|
|
140
|
+
* The cached snapshot only when it belongs to this account.
|
|
141
|
+
*
|
|
142
|
+
* Passing no account keeps the pre-pool behavior of returning whatever was
|
|
143
|
+
* fetched last. Passing one answers that account's own newest snapshot, or null
|
|
144
|
+
* when this line has never read it — null is "never read", which is a different
|
|
145
|
+
* statement from a snapshot whose windows are all at zero.
|
|
146
|
+
*/
|
|
147
|
+
export declare function getCachedQuotaFor(accountId?: string | null): KimiCodeAccountQuota | null;
|
|
148
|
+
/**
|
|
149
|
+
* The newest snapshot held for one account, for display only.
|
|
150
|
+
*
|
|
151
|
+
* The pool asks here while it builds the account list for the settings card, so
|
|
152
|
+
* this is a pure memory read: it never fetches.
|
|
153
|
+
*/
|
|
154
|
+
export declare function cachedQuotaFor(accountId: string): KimiCodeAccountQuota | null;
|
|
155
|
+
export declare function clearCachedQuota(): void;
|
|
156
|
+
/**
|
|
157
|
+
* Read the windowed quota block.
|
|
158
|
+
*
|
|
159
|
+
* The service's own shape nests one entry per window under `usages`; a
|
|
160
|
+
* community-documented alternative reports a top-level `usage` plus a
|
|
161
|
+
* `limits[]` array. Both are read so a service-side change of shape does not
|
|
162
|
+
* silently blank the card, and an unrecognized payload yields no windows rather
|
|
163
|
+
* than a fabricated 0%.
|
|
164
|
+
*/
|
|
165
|
+
export declare function parseUsageWindows(payload: unknown): KimiCodeUsageWindow[];
|
|
166
|
+
/**
|
|
167
|
+
* Convert the fixed-point money field the service uses into cents.
|
|
168
|
+
*
|
|
169
|
+
* Amounts arrive as 1e-6 cents; a positive amount that would round to zero is
|
|
170
|
+
* reported as one cent, because "you have something left" is closer to the
|
|
171
|
+
* truth than "you have nothing".
|
|
172
|
+
*/
|
|
173
|
+
export declare function fixedPointToCents(value: unknown): number | null;
|
|
174
|
+
/**
|
|
175
|
+
* Read the booster wallet (the pay-as-you-go top-up pool).
|
|
176
|
+
*
|
|
177
|
+
* The wallet only counts when its balance is a real booster balance; anything
|
|
178
|
+
* else is reported as absent so the card does not advertise credit the account
|
|
179
|
+
* cannot spend.
|
|
180
|
+
*/
|
|
181
|
+
export declare function parseExtraUsage(payload: unknown): KimiCodeExtraUsage | null;
|
|
182
|
+
/** Human name for one machine level code, or the code itself when unknown. */
|
|
183
|
+
export declare function membershipLevelName(level: string | null | undefined): string | null;
|
|
184
|
+
/**
|
|
185
|
+
* Subscription tier the payload names, from any documented shape.
|
|
186
|
+
*
|
|
187
|
+
* Prefers the display name when the service still sends one, then the machine
|
|
188
|
+
* level (mapped to its marketing name), so a payload that dropped
|
|
189
|
+
* `user_level_name` still yields a readable tier instead of a raw enum.
|
|
190
|
+
*/
|
|
191
|
+
export declare function parsePlanName(payload: unknown): string | null;
|
|
192
|
+
/** Machine tier level when the service reports one. */
|
|
193
|
+
export declare function parsePlanLevel(payload: unknown): string | null;
|
|
194
|
+
/**
|
|
195
|
+
* Turn a `/me` payload into the public account DTO.
|
|
196
|
+
*
|
|
197
|
+
* The endpoint answers with snake_case fields while the card consumes
|
|
198
|
+
* camelCase, and either profile source may be the one that answered, so both
|
|
199
|
+
* spellings are accepted.
|
|
200
|
+
*/
|
|
201
|
+
export declare function parseUserInfo(payload: unknown, fallback?: Partial<KimiCodeAccount>): KimiCodeAccount;
|
|
202
|
+
/**
|
|
203
|
+
* Fold the facts a `/me` read established into a credential.
|
|
204
|
+
*
|
|
205
|
+
* Sign-in only names the account through its token, which carries an id and —
|
|
206
|
+
* for an account with a mailbox — an address. The nickname lives on `/me` and
|
|
207
|
+
* nowhere else, so the caller reads it once and stores it here; without this,
|
|
208
|
+
* a phone-signed-in account could never be called anything but `账号 N`.
|
|
209
|
+
*
|
|
210
|
+
* Only fields the profile actually names are written: a gateway that drops the
|
|
211
|
+
* nickname must not blank one learned earlier, and the token pair is copied
|
|
212
|
+
* through untouched. Returns the same object when nothing new was learned, so a
|
|
213
|
+
* caller can tell "nothing to store" from "store this".
|
|
214
|
+
*/
|
|
215
|
+
export declare function credentialsWithProfile(credentials: KimiCodeCredentials, profile: unknown): KimiCodeCredentials;
|
|
216
|
+
export interface QuotaFetchOptions {
|
|
217
|
+
fetchFn?: typeof fetch;
|
|
218
|
+
signal?: AbortSignal;
|
|
219
|
+
/** Bypass the local cache and read the service again. */
|
|
220
|
+
force?: boolean;
|
|
221
|
+
/**
|
|
222
|
+
* Credentials to read usage for.
|
|
223
|
+
*
|
|
224
|
+
* A pool supplies the active account's credential here; without it the single
|
|
225
|
+
* stored account is refreshed and used.
|
|
226
|
+
*/
|
|
227
|
+
credentials?: KimiCodeCredentials;
|
|
228
|
+
/**
|
|
229
|
+
* Account the snapshot belongs to.
|
|
230
|
+
*
|
|
231
|
+
* With a pool the card must never render one account's quota under another
|
|
232
|
+
* account's name, so each account keeps its own cache entry, keyed by this id.
|
|
233
|
+
* Omitted, the reading is filed under the single-credential slot.
|
|
234
|
+
*/
|
|
235
|
+
accountId?: string;
|
|
236
|
+
/**
|
|
237
|
+
* Refresh this credential and hand back the replacement, or undefined when
|
|
238
|
+
* the caller has no way to renew it.
|
|
239
|
+
*
|
|
240
|
+
* A usage call that answers 401 is the only signal that an access token
|
|
241
|
+
* stopped being accepted; rotation bookkeeping cannot see it, because the
|
|
242
|
+
* token still looks unexpired locally. The caller that owns the credential —
|
|
243
|
+
* the pool — supplies the write-back here, so the one retry happens where the
|
|
244
|
+
* rotated refresh token can actually be persisted.
|
|
245
|
+
*/
|
|
246
|
+
renewFn?: (credentials: KimiCodeCredentials) => Promise<KimiCodeCredentials | undefined>;
|
|
247
|
+
/**
|
|
248
|
+
* Called with the account this reading describes, once it has been assembled.
|
|
249
|
+
*
|
|
250
|
+
* A pool owns the account rows, so it is the pool that persists what `/me`
|
|
251
|
+
* taught: the nickname, the address, the tier — and, for a row still titled
|
|
252
|
+
* with the placeholder minted at sign-in, the name the card should carry.
|
|
253
|
+
* This runs on the pooled path too, where the credential write-back below is
|
|
254
|
+
* deliberately skipped because the pool, not this function, owns that file.
|
|
255
|
+
*/
|
|
256
|
+
onAccount?: (account: KimiCodeAccount, credentials: KimiCodeCredentials) => void | Promise<void>;
|
|
257
|
+
}
|
|
258
|
+
/**
|
|
259
|
+
* Fetch and cache the account's quota snapshot.
|
|
260
|
+
*
|
|
261
|
+
* A 401 is surfaced as a rejection so the caller can invalidate the stored
|
|
262
|
+
* credential; every other failure leaves the previous snapshot in place rather
|
|
263
|
+
* than blanking the card, because a transient outage says nothing about the
|
|
264
|
+
* account's real usage.
|
|
265
|
+
*/
|
|
266
|
+
export declare function fetchAccountQuota(store: FileCredentialStore, options?: QuotaFetchOptions): Promise<KimiCodeAccountQuota | null>;
|
|
267
|
+
/**
|
|
268
|
+
* Build the account view for one credential.
|
|
269
|
+
*
|
|
270
|
+
* There is no account-profile endpoint on the coding API: the signed-in
|
|
271
|
+
* identity lives in the token's own claims, so the account is assembled from
|
|
272
|
+
* the stored credential (which the login and every refresh keep populated) and
|
|
273
|
+
* enriched by whatever the usage payload reports about the tier.
|
|
274
|
+
*/
|
|
275
|
+
export declare function accountFromCredentials(credentials: KimiCodeCredentials, payload?: unknown, profile?: unknown): KimiCodeAccount;
|
|
276
|
+
/**
|
|
277
|
+
* Read the plan profile from `/me`.
|
|
278
|
+
*
|
|
279
|
+
* The endpoint exists and is the only remaining source of the plan's display
|
|
280
|
+
* name: `/usages` used to carry `user_level_name` and stopped. It is called
|
|
281
|
+
* with the OAuth access token only (never a pasted plan key) and is treated as
|
|
282
|
+
* enrichment — a failure returns null so the card still renders the identity it
|
|
283
|
+
* already has from the token.
|
|
284
|
+
*/
|
|
285
|
+
export declare function fetchProfile(store: FileCredentialStore, options?: QuotaFetchOptions): Promise<unknown | null>;
|
|
286
|
+
/**
|
|
287
|
+
* Read the account identity for a stored credential.
|
|
288
|
+
*
|
|
289
|
+
* Combines the token's own claims (the identity) with `/me` (the plan name) and
|
|
290
|
+
* persists what it learns, so a later call needs no network work. It never
|
|
291
|
+
* throws for a missing profile: the identity is derived locally.
|
|
292
|
+
*/
|
|
293
|
+
export declare function fetchUserInfo(store: FileCredentialStore, options?: QuotaFetchOptions): Promise<KimiCodeAccount | null>;
|
|
294
|
+
/**
|
|
295
|
+
* Prove the stored credential still authenticates, and report how long that took.
|
|
296
|
+
*
|
|
297
|
+
* The probe is the real usage call rather than a profile lookup, because there
|
|
298
|
+
* is no profile endpoint: a 200 from `/usages` is what shows the token is
|
|
299
|
+
* accepted, and it doubles as a quota refresh for the card.
|
|
300
|
+
*/
|
|
301
|
+
export declare function testConnection(store: FileCredentialStore, options?: QuotaFetchOptions): Promise<{
|
|
302
|
+
account: KimiCodeAccount | null;
|
|
303
|
+
latencyMs: number;
|
|
304
|
+
}>;
|
|
305
|
+
export { PROVIDER_NAME };
|
|
306
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../src/host/kimi-code/client.ts"],"names":[],"mappings":"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"}
|