@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,52 @@
|
|
|
1
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
2
|
+
import { PROVIDER_ID, PROVIDER_NAME } from './types.ts';
|
|
3
|
+
import { FileCredentialStore, FileModelSettingsStore, type KimiCodeCatalogModel, type KimiCodePreferenceStore } from './token-store.ts';
|
|
4
|
+
import { KimiCodeAccountPool } from './account-pool.ts';
|
|
5
|
+
import { type KimiCodeWebStatus } from '../../shared/kimi-code-contracts.ts';
|
|
6
|
+
/**
|
|
7
|
+
* The selection the card should show.
|
|
8
|
+
*
|
|
9
|
+
* A stored list that still equals the shipped default has never been edited, so
|
|
10
|
+
* it cannot know about models the live catalog has since added; treating it as
|
|
11
|
+
* "everything currently offered" keeps a first run from hiding the whole
|
|
12
|
+
* catalog behind an unedited default. Any explicit edit is honoured exactly.
|
|
13
|
+
*/
|
|
14
|
+
export declare function resolveEnabledModelIds(stored: readonly string[], catalog: readonly KimiCodeCatalogModel[], enabled?: boolean): string[];
|
|
15
|
+
export interface KimiCodeStatusOptions {
|
|
16
|
+
fetchFn?: typeof fetch;
|
|
17
|
+
/** Whether this plugin currently owns the provider route; re-read on every status. */
|
|
18
|
+
serving?: boolean | (() => boolean);
|
|
19
|
+
/** Diagnostic when another plugin owns the provider route; re-read on every status. */
|
|
20
|
+
conflict?: string | null | (() => string | null);
|
|
21
|
+
/**
|
|
22
|
+
* Account pool to report on.
|
|
23
|
+
*
|
|
24
|
+
* Only the plugin entry installs one, because it owns the pool's storage; a
|
|
25
|
+
* caller that passes none keeps the single-account behavior.
|
|
26
|
+
*/
|
|
27
|
+
accountPool?: KimiCodeAccountPool;
|
|
28
|
+
/**
|
|
29
|
+
* Session whose cache numbers the card should show.
|
|
30
|
+
*
|
|
31
|
+
* Omitted means "no particular conversation", which reports the process
|
|
32
|
+
* aggregate. The cache is per conversation, so a card that names a session
|
|
33
|
+
* is the only way its hit ratio describes something a reader can act on.
|
|
34
|
+
*/
|
|
35
|
+
sessionId?: string;
|
|
36
|
+
/**
|
|
37
|
+
* 打开授权页的方式;缺省用 oauth.ts 的平台实现。
|
|
38
|
+
*
|
|
39
|
+
* 这一栏只是给测试留的口子:/login 会走 beginWebLogin,而它的缺省分支会真的
|
|
40
|
+
* spawn 浏览器(本文件的 /login 被十几条用例打中,将来只要有人补一条就会在
|
|
41
|
+
* 跑测试的机器上弹出窗口,而写用例的人不会事先知道)。
|
|
42
|
+
*
|
|
43
|
+
* 生产装配(src/index.ts)不传这个字段,所以**生产行为一点没变**:该开还是开。
|
|
44
|
+
*/
|
|
45
|
+
openBrowser?: (url: string) => void;
|
|
46
|
+
}
|
|
47
|
+
/** Everything the settings card renders: account, quota, and the model catalog. */
|
|
48
|
+
export declare function getKimiCodeWebStatus(store: FileCredentialStore, modelSettings: FileModelSettingsStore, preferences?: KimiCodePreferenceStore, options?: KimiCodeStatusOptions, accountPool?: KimiCodeAccountPool | undefined): Promise<KimiCodeWebStatus>;
|
|
49
|
+
/** Register the Kimi Code settings routes under `/kimi-code/api`. */
|
|
50
|
+
export declare function registerKimiCodeRoutes(ctx: Context, store: FileCredentialStore, modelSettings: FileModelSettingsStore, preferences?: KimiCodePreferenceStore, options?: KimiCodeStatusOptions, accountPool?: KimiCodeAccountPool | undefined): () => void;
|
|
51
|
+
export { PROVIDER_ID, PROVIDER_NAME };
|
|
52
|
+
//# sourceMappingURL=routes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../../src/host/kimi-code/routes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAIlD,OAAO,EAEL,WAAW,EACX,aAAa,EAMd,MAAM,YAAY,CAAA;AACnB,OAAO,EACL,mBAAmB,EACnB,sBAAsB,EAGtB,KAAK,oBAAoB,EAGzB,KAAK,uBAAuB,EAC7B,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAE,mBAAmB,EAAsB,MAAM,mBAAmB,CAAA;AA6B3E,OAAO,EAOL,KAAK,iBAAiB,EACvB,MAAM,qCAAqC,CAAA;AAwD5C;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,SAAS,MAAM,EAAE,EACzB,OAAO,EAAE,SAAS,oBAAoB,EAAE,EACxC,OAAO,UAAO,GACb,MAAM,EAAE,CAUV;AAED,MAAM,WAAW,qBAAqB;IACpC,OAAO,CAAC,EAAE,OAAO,KAAK,CAAA;IACtB,sFAAsF;IACtF,OAAO,CAAC,EAAE,OAAO,GAAG,CAAC,MAAM,OAAO,CAAC,CAAA;IACnC,uFAAuF;IACvF,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,CAAC,MAAM,MAAM,GAAG,IAAI,CAAC,CAAA;IAChD;;;;;OAKG;IACH,WAAW,CAAC,EAAE,mBAAmB,CAAA;IACjC;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;;;;;;OAQG;IACH,WAAW,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;CACpC;AAMD,mFAAmF;AACnF,wBAAsB,oBAAoB,CACxC,KAAK,EAAE,mBAAmB,EAC1B,aAAa,EAAE,sBAAsB,EACrC,WAAW,CAAC,EAAE,uBAAuB,EACrC,OAAO,GAAE,qBAA0B,EACnC,WAAW,GAAE,mBAAmB,GAAG,SAA+B,GACjE,OAAO,CAAC,iBAAiB,CAAC,CA+E5B;AAoPD,qEAAqE;AACrE,wBAAgB,sBAAsB,CACpC,GAAG,EAAE,OAAO,EACZ,KAAK,EAAE,mBAAmB,EAC1B,aAAa,EAAE,sBAAsB,EACrC,WAAW,CAAC,EAAE,uBAAuB,EACrC,OAAO,GAAE,qBAA0B,EACnC,WAAW,GAAE,mBAAmB,GAAG,SAA+B,GACjE,MAAM,IAAI,CAydZ;AAED,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,CAAA"}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Durable per-session cache state for the Kimi route.
|
|
3
|
+
*
|
|
4
|
+
* Kimi's prefix cache lives on the service, but everything a status card needs
|
|
5
|
+
* to describe it - when this conversation last ran, how large its prompt is, and
|
|
6
|
+
* why the last request's prefix broke - used to live in process memory only. A
|
|
7
|
+
* restart therefore erased the one fact the expiry hint depends on, exactly when
|
|
8
|
+
* the user resumes a task and pays for the whole prompt again: the card showed
|
|
9
|
+
* an empty state instead of "this conversation sat idle past the cache lifetime".
|
|
10
|
+
*
|
|
11
|
+
* This module keeps that state on disk, in the same storages directory the
|
|
12
|
+
* preferences store uses, so the hint and the attribution survive a restart.
|
|
13
|
+
* It is a diagnostic: nothing here changes a request.
|
|
14
|
+
* @module dsh-multi-provider/kimi-code-session-cache-state
|
|
15
|
+
*/
|
|
16
|
+
import { CommonSessionCacheStateStore } from '../common/session-cache-state.ts';
|
|
17
|
+
import type { KimiCodeRequestDiagnostic } from '../../shared/kimi-code-contracts.ts';
|
|
18
|
+
/**
|
|
19
|
+
* Conversations kept in the document.
|
|
20
|
+
*
|
|
21
|
+
* The hint only ever describes a conversation that ran recently, so an install
|
|
22
|
+
* that opens hundreds of sessions does not need all of them on disk. Old entries
|
|
23
|
+
* are dropped by {@link SessionCacheStateStore.write} in updatedAt order, which
|
|
24
|
+
* is the same order the "most recent conversation" fallback reads.
|
|
25
|
+
*/
|
|
26
|
+
export declare const MAX_SESSION_RECORDS = 64;
|
|
27
|
+
/** Bounded request evidence retained per conversation. */
|
|
28
|
+
export declare const MAX_REQUEST_DIAGNOSTICS = 20;
|
|
29
|
+
/** One conversation's cache state, as it survives the process. */
|
|
30
|
+
export interface KimiCodeSessionCacheRecord {
|
|
31
|
+
/** When this conversation last sent a request, epoch ms. */
|
|
32
|
+
lastActiveAt: number;
|
|
33
|
+
/**
|
|
34
|
+
* Prompt tokens of the most recent request (cache read + fresh input + cache write).
|
|
35
|
+
*
|
|
36
|
+
* The LAST request, not the rolling total: the expiry hint is about how much
|
|
37
|
+
* the next turn will have to reprocess, and summing every turn of a long
|
|
38
|
+
* conversation would overstate that by an order of magnitude.
|
|
39
|
+
*/
|
|
40
|
+
totalTokens: number;
|
|
41
|
+
/** Rolling totals for the card, mirroring the mapper's per-session stats. */
|
|
42
|
+
requests: number;
|
|
43
|
+
cachedTokens: number;
|
|
44
|
+
freshTokens: number;
|
|
45
|
+
outputTokens: number;
|
|
46
|
+
cacheWriteTokens: number;
|
|
47
|
+
cacheWrite5mTokens: number;
|
|
48
|
+
cacheWrite1hTokens: number;
|
|
49
|
+
/**
|
|
50
|
+
* Whether the service ever stated a cache-write count for this conversation.
|
|
51
|
+
*
|
|
52
|
+
* Durable for the same reason the totals are: after a restart the card still
|
|
53
|
+
* has to tell "the service reported zero writes" from "the service never said
|
|
54
|
+
* anything", and this record is then the only evidence either way. Absent in
|
|
55
|
+
* records written before the field existed, which reads as silence — the
|
|
56
|
+
* conservative side, and the one that cannot invent a number.
|
|
57
|
+
*/
|
|
58
|
+
cacheWriteReported?: boolean;
|
|
59
|
+
/** Cause attributed to the most recent request's prefix break, when there was one. */
|
|
60
|
+
lastDrift?: string;
|
|
61
|
+
/**
|
|
62
|
+
* Prompt tokens of this conversation's FIRST request that came from cache.
|
|
63
|
+
*
|
|
64
|
+
* The only measurement of cross-session inheritance: a brand-new conversation
|
|
65
|
+
* can read a prefix another conversation wrote minutes earlier, because the
|
|
66
|
+
* service matches the cache by content rather than by conversation. Written
|
|
67
|
+
* once, when the first request closes, and never rewritten — later turns pile
|
|
68
|
+
* up their own reads and would drown the one number that answers "did this
|
|
69
|
+
* conversation start warm".
|
|
70
|
+
*/
|
|
71
|
+
firstRequestCachedTokens?: number;
|
|
72
|
+
/** Total prompt tokens that first request carried (cache read + fresh input + cache write). */
|
|
73
|
+
firstRequestPromptTokens?: number;
|
|
74
|
+
/** Cache-read tokens from the most recent request, when this build recorded them. */
|
|
75
|
+
lastRequestCachedTokens?: number;
|
|
76
|
+
/** Newly processed input tokens from the most recent request. */
|
|
77
|
+
lastRequestFreshTokens?: number;
|
|
78
|
+
/** Prompt size of the request before the most recent one; the continuation baseline. */
|
|
79
|
+
previousRequestPromptTokens?: number;
|
|
80
|
+
/** Pool account that served the most recent successful usage-bearing request. */
|
|
81
|
+
lastAccountId?: string;
|
|
82
|
+
/** When that successful account observation was recorded, epoch ms. */
|
|
83
|
+
lastAccountAt?: number;
|
|
84
|
+
/** Most recent requests, oldest first, capped at MAX_REQUEST_DIAGNOSTICS. */
|
|
85
|
+
recentRequests?: KimiCodeRequestDiagnostic[];
|
|
86
|
+
/**
|
|
87
|
+
* Consecutive warmup-qualified hits recorded for this session, when non-zero.
|
|
88
|
+
*
|
|
89
|
+
* Optional and only persisted on secondary/explicit state updates so the
|
|
90
|
+
* initial turn record shape stays byte-identical when no warmup streak exists.
|
|
91
|
+
*/
|
|
92
|
+
warmupConsecutiveHits?: number;
|
|
93
|
+
/**
|
|
94
|
+
* Identities of the images this session has already given back to the image
|
|
95
|
+
* budget.
|
|
96
|
+
*
|
|
97
|
+
* Durable because the budget is STICKY: a picture that was omitted stays
|
|
98
|
+
* omitted for the rest of the conversation, and a restart that forgot that
|
|
99
|
+
* would send the picture again and rebuild the cached prefix on the very
|
|
100
|
+
* next turn.
|
|
101
|
+
*/
|
|
102
|
+
budgetDropped?: string[];
|
|
103
|
+
/** Base64 image bytes the most recent request carried. */
|
|
104
|
+
lastRequestImageBytes?: number;
|
|
105
|
+
/** Image occurrences the most recent request replaced with a placeholder. */
|
|
106
|
+
lastDroppedImages?: number;
|
|
107
|
+
/** When any field above last changed, epoch ms. Used for pruning and ordering. */
|
|
108
|
+
updatedAt: number;
|
|
109
|
+
}
|
|
110
|
+
/** Where the document lives; beside the other plugin-owned JSON. */
|
|
111
|
+
export declare function sessionCacheStatePath(): string;
|
|
112
|
+
/**
|
|
113
|
+
* Per-session cache state held in one JSON document.
|
|
114
|
+
*
|
|
115
|
+
* Reads are synchronous because every caller is answering a status request or
|
|
116
|
+
* closing a turn, both of which are allowed to block on a file this size. Writes
|
|
117
|
+
* are debounced: a turn reports once, and several turns in flight must not
|
|
118
|
+
* rewrite the document several times.
|
|
119
|
+
*/
|
|
120
|
+
export declare class SessionCacheStateStore extends CommonSessionCacheStateStore<KimiCodeSessionCacheRecord> {
|
|
121
|
+
constructor(filePath?: string, maxEntries?: number);
|
|
122
|
+
/** Append bounded request evidence, including a first request that failed before usage. */
|
|
123
|
+
noteRequest(sessionId: string, request: KimiCodeRequestDiagnostic): void;
|
|
124
|
+
/** Update the warmup streak without creating a record for an unknown session. */
|
|
125
|
+
noteWarmupStreak(sessionId: string, consecutiveHits: number): void;
|
|
126
|
+
}
|
|
127
|
+
/** What the running process knows about one conversation, before any disk read. */
|
|
128
|
+
export interface SessionCacheViewInput {
|
|
129
|
+
/** Last activity the process remembers, if the conversation ran in it. */
|
|
130
|
+
memoryLastActiveAt?: number;
|
|
131
|
+
/** Prompt tokens the process has seen for this conversation; 0 when none. */
|
|
132
|
+
memoryTotalTokens: number;
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Combine process memory with the durable record into the hint's two inputs.
|
|
136
|
+
*
|
|
137
|
+
* The process supplies the idle baseline whenever it has served the conversation,
|
|
138
|
+
* because only it knows about the turn that just ended. The prompt size comes
|
|
139
|
+
* from the file when it has one: the record is rewritten at every turn close, so
|
|
140
|
+
* it holds the LAST request's size, while the process only offers a sum across
|
|
141
|
+
* every turn of the conversation - which can overstate the next turn's cost by
|
|
142
|
+
* an order of magnitude. With no conversation named the file is the only source,
|
|
143
|
+
* because a process aggregate spans several conversations and would make "this
|
|
144
|
+
* conversation's prompt" a number no single conversation has.
|
|
145
|
+
* @param sessionId - Conversation being described; omit for "the most recent".
|
|
146
|
+
* @param memory - What this process knows about it.
|
|
147
|
+
* @param durable - What the last run on this machine left behind.
|
|
148
|
+
* @returns the idle baseline and prompt size the expiry rule needs.
|
|
149
|
+
*/
|
|
150
|
+
export declare function resolveSessionCacheView(sessionId: string | undefined, memory: SessionCacheViewInput, durable: KimiCodeSessionCacheRecord | undefined): {
|
|
151
|
+
lastActiveAt?: number;
|
|
152
|
+
totalTokens: number;
|
|
153
|
+
};
|
|
154
|
+
/** The process-wide store the adapter writes and the routes read. */
|
|
155
|
+
export declare const sessionCacheState: SessionCacheStateStore;
|
|
156
|
+
//# sourceMappingURL=session-cache-state.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-cache-state.d.ts","sourceRoot":"","sources":["../../../../src/host/kimi-code/session-cache-state.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,EAAE,4BAA4B,EAAE,MAAM,kCAAkC,CAAA;AAC/E,OAAO,KAAK,EAEV,yBAAyB,EAE1B,MAAM,qCAAqC,CAAA;AAE5C;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,KAAK,CAAA;AACrC,0DAA0D;AAC1D,eAAO,MAAM,uBAAuB,KAAK,CAAA;AAEzC,kEAAkE;AAClE,MAAM,WAAW,0BAA0B;IACzC,4DAA4D;IAC5D,YAAY,EAAE,MAAM,CAAA;IACpB;;;;;;OAMG;IACH,WAAW,EAAE,MAAM,CAAA;IACnB,6EAA6E;IAC7E,QAAQ,EAAE,MAAM,CAAA;IAChB,YAAY,EAAE,MAAM,CAAA;IACpB,WAAW,EAAE,MAAM,CAAA;IACnB,YAAY,EAAE,MAAM,CAAA;IACpB,gBAAgB,EAAE,MAAM,CAAA;IACxB,kBAAkB,EAAE,MAAM,CAAA;IAC1B,kBAAkB,EAAE,MAAM,CAAA;IAC1B;;;;;;;;OAQG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,sFAAsF;IACtF,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;;;;;;;OASG;IACH,wBAAwB,CAAC,EAAE,MAAM,CAAA;IACjC,+FAA+F;IAC/F,wBAAwB,CAAC,EAAE,MAAM,CAAA;IACjC,qFAAqF;IACrF,uBAAuB,CAAC,EAAE,MAAM,CAAA;IAChC,iEAAiE;IACjE,sBAAsB,CAAC,EAAE,MAAM,CAAA;IAC/B,wFAAwF;IACxF,2BAA2B,CAAC,EAAE,MAAM,CAAA;IACpC,iFAAiF;IACjF,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,uEAAuE;IACvE,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,6EAA6E;IAC7E,cAAc,CAAC,EAAE,yBAAyB,EAAE,CAAA;IAC5C;;;;;OAKG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAA;IAC9B;;;;;;;;OAQG;IACH,aAAa,CAAC,EAAE,MAAM,EAAE,CAAA;IACxB,0DAA0D;IAC1D,qBAAqB,CAAC,EAAE,MAAM,CAAA;IAC9B,6EAA6E;IAC7E,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,kFAAkF;IAClF,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,oEAAoE;AACpE,wBAAgB,qBAAqB,IAAI,MAAM,CAE9C;AAaD;;;;;;;GAOG;AACH,qBAAa,sBAAuB,SAAQ,4BAA4B,CAAC,0BAA0B,CAAC;gBACtF,QAAQ,SAA0B,EAAE,UAAU,SAAsB;IAShF,2FAA2F;IAC3F,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,yBAAyB,GAAG,IAAI;IAsBxE,iFAAiF;IACjF,gBAAgB,CAAC,SAAS,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,GAAG,IAAI;CASnE;AAyLD,mFAAmF;AACnF,MAAM,WAAW,qBAAqB;IACpC,0EAA0E;IAC1E,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,6EAA6E;IAC7E,iBAAiB,EAAE,MAAM,CAAA;CAC1B;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,uBAAuB,CACrC,SAAS,EAAE,MAAM,GAAG,SAAS,EAC7B,MAAM,EAAE,qBAAqB,EAC7B,OAAO,EAAE,0BAA0B,GAAG,SAAS,GAC9C;IAAE,YAAY,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,CAYhD;AAED,qEAAqE;AACrE,eAAO,MAAM,iBAAiB,wBAA+B,CAAA"}
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import type { KimiCodeReasoningEffort, KimiCodeRegion, KimiCodeThinkingType } from '../../shared/kimi-code-contracts.ts';
|
|
2
|
+
import type { CredentialStore } from '../token-store.ts';
|
|
3
|
+
import { type ContextWindowOverridePatch } from '../common/context-window-overrides.ts';
|
|
4
|
+
import { DEFAULT_OAUTH_HOST } from './types.ts';
|
|
5
|
+
export declare const KIMI_CODE_PREFERENCES_NAMESPACE = "dsh-kimi-code";
|
|
6
|
+
export type { KimiCodeReasoningEffort };
|
|
7
|
+
/**
|
|
8
|
+
* One stored Kimi Code credential.
|
|
9
|
+
*
|
|
10
|
+
* Kimi Code is an OAuth subscription: the bearer pair rotates, so both tokens
|
|
11
|
+
* are kept and the access token is refreshed shortly before it expires. The
|
|
12
|
+
* remaining fields are non-secret account facts the settings card renders
|
|
13
|
+
* without another round trip.
|
|
14
|
+
*/
|
|
15
|
+
export interface KimiCodeCredentials {
|
|
16
|
+
/** Bearer access token for the coding API. Host-only; never sent to a browser. */
|
|
17
|
+
accessToken: string;
|
|
18
|
+
/** Rotating refresh token. Host-only. */
|
|
19
|
+
refreshToken: string;
|
|
20
|
+
/** Unix milliseconds the access token stops being valid. */
|
|
21
|
+
expiresAt: number;
|
|
22
|
+
/** Lifetime the token endpoint reported, in seconds. */
|
|
23
|
+
expiresIn: number;
|
|
24
|
+
scope?: string;
|
|
25
|
+
tokenType?: string;
|
|
26
|
+
/** Region the credential was issued in; decides which hosts are used. */
|
|
27
|
+
region: KimiCodeRegion;
|
|
28
|
+
/** OAuth host the credential came from, so a refresh targets the same one. */
|
|
29
|
+
oauthHost: string;
|
|
30
|
+
/** Coding API base URL the credential was issued for, without /v1. */
|
|
31
|
+
baseUrl: string;
|
|
32
|
+
userId?: string;
|
|
33
|
+
nickname?: string;
|
|
34
|
+
email?: string;
|
|
35
|
+
planName?: string;
|
|
36
|
+
/** Unix milliseconds the credential was obtained. */
|
|
37
|
+
authenticatedAt?: number;
|
|
38
|
+
/**
|
|
39
|
+
* How this credential authenticates.
|
|
40
|
+
*
|
|
41
|
+
* Absent means the OAuth device-code pair this line has always stored, so
|
|
42
|
+
* every credential written before API keys existed reads back unchanged.
|
|
43
|
+
* `api-key` is a Kimi Code membership API key pasted from the Kimi Code
|
|
44
|
+
* console: it is sent exactly where an access token would be (bearer /
|
|
45
|
+
* `x-api-key`), it has no refresh token, and it does not expire on a clock —
|
|
46
|
+
* only a 401 from the service says it is no longer good.
|
|
47
|
+
*/
|
|
48
|
+
authKind?: 'api-key';
|
|
49
|
+
}
|
|
50
|
+
/** Whether a stored credential is a pasted membership API key rather than an OAuth pair. */
|
|
51
|
+
export declare function isKimiCodeApiKey(credentials: Pick<KimiCodeCredentials, 'authKind'>): boolean;
|
|
52
|
+
export interface KimiCodeCatalogModel {
|
|
53
|
+
id: string;
|
|
54
|
+
name?: string;
|
|
55
|
+
contextWindow?: number;
|
|
56
|
+
reasoningEfforts?: string[];
|
|
57
|
+
defaultReasoningEffort?: string;
|
|
58
|
+
inputModalities?: Array<'text' | 'image' | 'video'>;
|
|
59
|
+
protocol?: 'openai' | 'anthropic';
|
|
60
|
+
/** Whether the model also accepts video input (reported; DSH cannot send it). */
|
|
61
|
+
supportsVideo?: boolean;
|
|
62
|
+
/** One-line description from the official model table. */
|
|
63
|
+
description?: string;
|
|
64
|
+
/** Subscription tier the model needs, when not every member has it. */
|
|
65
|
+
minimumPlan?: string | null;
|
|
66
|
+
/**
|
|
67
|
+
* Whether the model supports dynamically loaded tools.
|
|
68
|
+
*
|
|
69
|
+
* K3 advertises this: extra tool definitions can be injected mid-conversation
|
|
70
|
+
* as a system message carrying a `tools` array, keeping the top-level list
|
|
71
|
+
* small and stable. DSH has no equivalent concept, so this is reported for
|
|
72
|
+
* information rather than acted on.
|
|
73
|
+
*/
|
|
74
|
+
supportsDynamicTools?: boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Server-declared toggle support for thinking.
|
|
77
|
+
*
|
|
78
|
+
* The three-state declaration, and the one that wins over the older
|
|
79
|
+
* `supports_reasoning` boolean: `only` means the model reasons at every
|
|
80
|
+
* level and cannot be turned off, `no` means it does not reason at all, and
|
|
81
|
+
* `both` means it can be toggled. A model declaring `only` must not be
|
|
82
|
+
* offered a `none` effort, because the service rejects one.
|
|
83
|
+
*
|
|
84
|
+
* Absent on older servers, where the effort list alone is the evidence.
|
|
85
|
+
*/
|
|
86
|
+
thinkingType?: KimiCodeThinkingType;
|
|
87
|
+
/**
|
|
88
|
+
* Largest prompt the model accepts, when it is smaller than the window.
|
|
89
|
+
*
|
|
90
|
+
* A model can have a 1M window and a lower input cap. The window still
|
|
91
|
+
* bounds the completion budget, but prompt budgeting has to use this, or a
|
|
92
|
+
* session is allowed to grow past what the endpoint will accept and the
|
|
93
|
+
* request fails instead of compacting first.
|
|
94
|
+
*/
|
|
95
|
+
maxInputTokens?: number;
|
|
96
|
+
/**
|
|
97
|
+
* Whether the model accepts tool declarations at all.
|
|
98
|
+
*
|
|
99
|
+
* Absent means the server said nothing, which is not the same as a denial —
|
|
100
|
+
* the parser keeps that distinction, so a silent listing does not disable
|
|
101
|
+
* tools on a model that still takes them.
|
|
102
|
+
*/
|
|
103
|
+
supportsToolUse?: boolean;
|
|
104
|
+
}
|
|
105
|
+
export interface KimiCodeModelSettings {
|
|
106
|
+
enabled?: boolean;
|
|
107
|
+
enabledModelIds: string[];
|
|
108
|
+
catalogModels: KimiCodeCatalogModel[];
|
|
109
|
+
contextWindowOverrides: Record<string, number>;
|
|
110
|
+
defaultReasoningEffort: KimiCodeReasoningEffort | null;
|
|
111
|
+
}
|
|
112
|
+
export interface KimiCodePreferenceStore {
|
|
113
|
+
status(): KimiCodeModelSettings;
|
|
114
|
+
update(patch: {
|
|
115
|
+
enabled?: boolean;
|
|
116
|
+
enabledModelIds?: string[];
|
|
117
|
+
/** `null` deletes one override and falls back to the catalog default. */
|
|
118
|
+
contextWindowOverrides?: ContextWindowOverridePatch;
|
|
119
|
+
defaultReasoningEffort?: KimiCodeReasoningEffort | null;
|
|
120
|
+
}): Promise<KimiCodeModelSettings>;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Bind the model selection to the DSH settings document when the harness still
|
|
124
|
+
* offers one, and to the JSON file beside it otherwise: a harness without the
|
|
125
|
+
* register seam (0.1.7, and a headless test) reads that file back on boot.
|
|
126
|
+
*/
|
|
127
|
+
export declare function registerKimiCodePreferenceStore(settings?: unknown, fallbackStore?: FileModelSettingsStore): KimiCodePreferenceStore;
|
|
128
|
+
export declare function credentialPath(): string;
|
|
129
|
+
export declare function modelSettingsPath(): string;
|
|
130
|
+
/** File the install channel uses to pin a region before the first login. */
|
|
131
|
+
export declare function regionMarkerPath(): string;
|
|
132
|
+
/**
|
|
133
|
+
* Stable per-installation device id the managed service expects.
|
|
134
|
+
*
|
|
135
|
+
* The official client writes this once and reuses it; it is not a secret, only
|
|
136
|
+
* an identity marker, so it lives beside the other plugin state.
|
|
137
|
+
*/
|
|
138
|
+
export declare function deviceIdPath(): string;
|
|
139
|
+
export declare function parseKimiCodeCredentials(value: unknown): KimiCodeCredentials;
|
|
140
|
+
/** Encrypted credential store; the plaintext JSON is only a migration source. */
|
|
141
|
+
export declare class FileCredentialStore {
|
|
142
|
+
private readonly filePath;
|
|
143
|
+
private readonly backend;
|
|
144
|
+
constructor(filePath?: string, backend?: CredentialStore<KimiCodeCredentials>);
|
|
145
|
+
path(): string;
|
|
146
|
+
private serialize;
|
|
147
|
+
private removeLegacy;
|
|
148
|
+
private saveVerified;
|
|
149
|
+
read(): Promise<KimiCodeCredentials | null>;
|
|
150
|
+
write(credentials: KimiCodeCredentials): Promise<void>;
|
|
151
|
+
delete(): Promise<void>;
|
|
152
|
+
}
|
|
153
|
+
/** Plain-JSON model settings used when the settings service is unavailable. */
|
|
154
|
+
export declare class FileModelSettingsStore {
|
|
155
|
+
private readonly filePath;
|
|
156
|
+
constructor(filePath?: string);
|
|
157
|
+
path(): string;
|
|
158
|
+
read(): Promise<KimiCodeModelSettings>;
|
|
159
|
+
write(settings: KimiCodeModelSettings): Promise<void>;
|
|
160
|
+
updateSettings(patch: {
|
|
161
|
+
enabled?: boolean;
|
|
162
|
+
enabledModelIds?: string[];
|
|
163
|
+
/** `null` deletes one override and falls back to the catalog default. */
|
|
164
|
+
contextWindowOverrides?: ContextWindowOverridePatch;
|
|
165
|
+
defaultReasoningEffort?: KimiCodeReasoningEffort | null;
|
|
166
|
+
}): Promise<KimiCodeModelSettings>;
|
|
167
|
+
setCatalogModels(catalogModels: KimiCodeCatalogModel[], options?: {
|
|
168
|
+
enabledModelIds?: string[];
|
|
169
|
+
}): Promise<KimiCodeModelSettings>;
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Resolve the region this installation belongs to.
|
|
173
|
+
*
|
|
174
|
+
* Read locally, never probed: an environment pin wins, then the marker file the
|
|
175
|
+
* install channel may have written, then the default. A region only selects
|
|
176
|
+
* hosts, so an unknown marker is ignored rather than fatal.
|
|
177
|
+
*/
|
|
178
|
+
export declare function resolveRegion(env?: NodeJS.ProcessEnv): Promise<KimiCodeRegion>;
|
|
179
|
+
/** Remember a region choice so a later status call reports the same one. */
|
|
180
|
+
export declare function persistRegion(region: KimiCodeRegion): Promise<void>;
|
|
181
|
+
export { DEFAULT_OAUTH_HOST };
|
|
182
|
+
//# sourceMappingURL=token-store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"token-store.d.ts","sourceRoot":"","sources":["../../../../src/host/kimi-code/token-store.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bounded, incremental defence for tool-call argument streams.
|
|
3
|
+
*
|
|
4
|
+
* The scanner only interprets a string followed by `:` as a JSON member key.
|
|
5
|
+
* Similar text inside a string value is never counted. All state lives in one
|
|
6
|
+
* tool call, so deltas may split escape sequences, keys, or UTF-16 surrogates.
|
|
7
|
+
*/
|
|
8
|
+
import type { KimiCodeRequestDiagnostic } from '../../shared/kimi-code-contracts.ts';
|
|
9
|
+
export type KimiToolGuardViolation = NonNullable<KimiCodeRequestDiagnostic['toolGuard']>;
|
|
10
|
+
export declare const TOOL_ARGUMENT_BYTES_EXCEEDED_CODE = "KIMI_TOOL_ARGUMENT_BYTES_EXCEEDED";
|
|
11
|
+
export declare const TOOL_ARGUMENT_REPEATED_KEY_CODE = "KIMI_TOOL_ARGUMENT_REPEATED_KEY";
|
|
12
|
+
export type KimiToolArgumentGuardCode = typeof TOOL_ARGUMENT_BYTES_EXCEEDED_CODE | typeof TOOL_ARGUMENT_REPEATED_KEY_CODE;
|
|
13
|
+
/** Whether one adapter failure belongs to the recoverable argument guard. */
|
|
14
|
+
export declare function isKimiToolArgumentGuardCode(code: unknown): code is KimiToolArgumentGuardCode;
|
|
15
|
+
/** Large source/file payloads need a different ceiling from coordination cards. */
|
|
16
|
+
export declare function toolArgumentLimit(toolName: string): number;
|
|
17
|
+
/**
|
|
18
|
+
* Repair only a complete ask_user_question call whose optional field names carry
|
|
19
|
+
* surrounding whitespace. One unambiguous source key and the expected value type
|
|
20
|
+
* are required; collisions, underscore variants, and all other tools stay intact
|
|
21
|
+
* so the execution guard can still reject payloads whose meaning is unclear.
|
|
22
|
+
*/
|
|
23
|
+
export declare function repairAskUserQuestionArgumentWhitespace(toolName: string, argumentText: string): string;
|
|
24
|
+
export declare class KimiToolArgumentGuard {
|
|
25
|
+
private readonly toolName;
|
|
26
|
+
private bytes;
|
|
27
|
+
private inString;
|
|
28
|
+
private escaped;
|
|
29
|
+
private afterString;
|
|
30
|
+
private stringRaw;
|
|
31
|
+
private stringTooLong;
|
|
32
|
+
private highSurrogate;
|
|
33
|
+
private readonly keyGroups;
|
|
34
|
+
private violation;
|
|
35
|
+
constructor(toolName: string);
|
|
36
|
+
observe(delta: string): KimiToolGuardViolation | undefined;
|
|
37
|
+
/** Account for a trailing unmatched surrogate without leaving it unbudgeted. */
|
|
38
|
+
finish(): KimiToolGuardViolation | undefined;
|
|
39
|
+
private fail;
|
|
40
|
+
private observeChar;
|
|
41
|
+
private observeKey;
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=tool-argument-guard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-argument-guard.d.ts","sourceRoot":"","sources":["../../../../src/host/kimi-code/tool-argument-guard.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,qCAAqC,CAAA;AAEpF,MAAM,MAAM,sBAAsB,GAAG,WAAW,CAAC,yBAAyB,CAAC,WAAW,CAAC,CAAC,CAAA;AAExF,eAAO,MAAM,iCAAiC,sCAAsC,CAAA;AACpF,eAAO,MAAM,+BAA+B,oCAAoC,CAAA;AAChF,MAAM,MAAM,yBAAyB,GAAG,OAAO,iCAAiC,GAAG,OAAO,+BAA+B,CAAA;AAEzH,6EAA6E;AAC7E,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,IAAI,yBAAyB,CAE5F;AASD,mFAAmF;AACnF,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAM1D;AAMD;;;;;GAKG;AACH,wBAAgB,uCAAuC,CAAC,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM,CA6BtG;AAcD,qBAAa,qBAAqB;IAWpB,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAVrC,OAAO,CAAC,KAAK,CAAI;IACjB,OAAO,CAAC,QAAQ,CAAQ;IACxB,OAAO,CAAC,OAAO,CAAQ;IACvB,OAAO,CAAC,WAAW,CAAQ;IAC3B,OAAO,CAAC,SAAS,CAAK;IACtB,OAAO,CAAC,aAAa,CAAQ;IAC7B,OAAO,CAAC,aAAa,CAAK;IAC1B,OAAO,CAAC,QAAQ,CAAC,SAAS,CAA8B;IACxD,OAAO,CAAC,SAAS,CAAoC;gBAExB,QAAQ,EAAE,MAAM;IAE7C,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,sBAAsB,GAAG,SAAS;IAmB1D,gFAAgF;IAChF,MAAM,IAAI,sBAAsB,GAAG,SAAS;IAS5C,OAAO,CAAC,IAAI;IAKZ,OAAO,CAAC,WAAW;IA8CnB,OAAO,CAAC,UAAU;CAqBnB"}
|