@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,309 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MiniMax Code 号池:the account pool for the MiniMax Code (编程订阅) line.
|
|
3
|
+
*
|
|
4
|
+
* This line pools a credential it does not own, and that one fact decides every
|
|
5
|
+
* shape below:
|
|
6
|
+
*
|
|
7
|
+
* 1. MiniMax Code's normal credential is the desktop application's own
|
|
8
|
+
* \`~/.minimax/auth/<buildEnv>/<region>/mcode-public/auth.json\`. The plugin
|
|
9
|
+
* reads it so a user already signed in to the app never signs in twice,
|
|
10
|
+
* instead of asking for a second sign-in of its own.
|
|
11
|
+
* 2. ADOPTED MEANS NEVER DESTROYED. That file belongs to an application the
|
|
12
|
+
* user is running. The pool may read it, may adopt it into its own account
|
|
13
|
+
* list, and may write a rotated token back through the store's atomic
|
|
14
|
+
* replacement — but no path in this file may revoke it or delete it. A
|
|
15
|
+
* deleted \`auth.json\` signs the user out of MiniMax Code itself, so such an
|
|
16
|
+
* account is reported as \`removable: false\` and deletion is refused
|
|
17
|
+
* ({@link MinimaxCodeAccountPool.deleteAccount}), like every other adopted
|
|
18
|
+
* desktop account.
|
|
19
|
+
* 3. What the pool adds on top of the single-credential line is rotation: more
|
|
20
|
+
* than one sign-in can serve requests, a 429 cools one account down instead
|
|
21
|
+
* of taking the line offline, and the settings card can list, alias, promote
|
|
22
|
+
* and switch between them.
|
|
23
|
+
*
|
|
24
|
+
* The credential format stays the store's: this file never invents a field of
|
|
25
|
+
* its own inside a token record, so a write back into the app's document keeps
|
|
26
|
+
* the exact shape the app expects.
|
|
27
|
+
*/
|
|
28
|
+
import type { IncomingMessage, ServerResponse } from 'node:http';
|
|
29
|
+
import { AccountPoolCore, type PoolAccountShape, type PoolData } from '../common/account-pool.ts';
|
|
30
|
+
import type { CredentialStore } from '../token-store.ts';
|
|
31
|
+
import { MinimaxCodeCredentialStore, type MinimaxCodeCredentialSource, type MinimaxCodeCredentials } from './token-store.ts';
|
|
32
|
+
import type { MinimaxCodeRegion, MinimaxCodeQuota } from '../../shared/minimax-code-contracts.ts';
|
|
33
|
+
import type { AccountRotationStrategy, PoolAccountQuotaDto, PoolAccountSummaryDto } from '../../shared/account-pool-contracts.ts';
|
|
34
|
+
/**
|
|
35
|
+
* One pooled MiniMax Code account.
|
|
36
|
+
*
|
|
37
|
+
* The credential travels whole (the pool persists it, and the store knows how to
|
|
38
|
+
* write it back to the file it came from); everything else here is a non-secret
|
|
39
|
+
* fact the settings card renders without a second round trip.
|
|
40
|
+
*/
|
|
41
|
+
export interface MinimaxCodePoolAccount extends PoolAccountShape<MinimaxCodeCredentials> {
|
|
42
|
+
/** Region the credential was issued in; decides every host this account uses. */
|
|
43
|
+
region: MinimaxCodeRegion;
|
|
44
|
+
/**
|
|
45
|
+
* Which store owns the credential.
|
|
46
|
+
*
|
|
47
|
+
* \`minimax-native\` is MiniMax Code's own \`auth.json\`: adopted and renewed,
|
|
48
|
+
* never deletable from here. \`file\` is the plugin's own store, written by a
|
|
49
|
+
* device-code sign-in started in this plugin.
|
|
50
|
+
*/
|
|
51
|
+
source: MinimaxCodeCredentialSource;
|
|
52
|
+
/** Display facts, when the credential's token claims carry them. */
|
|
53
|
+
email?: string;
|
|
54
|
+
planName?: string;
|
|
55
|
+
}
|
|
56
|
+
/** The pool slice the settings card renders, mirroring {@link AccountPoolStatusDto}. */
|
|
57
|
+
export interface MinimaxCodeAccountSummaryDto extends PoolAccountSummaryDto {
|
|
58
|
+
region?: MinimaxCodeRegion;
|
|
59
|
+
source?: MinimaxCodeCredentialSource;
|
|
60
|
+
/** Credential generation; diagnostics for two-sided refresh contention with the app. */
|
|
61
|
+
generation?: number;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Encrypted pool file this line owns.
|
|
65
|
+
*
|
|
66
|
+
* Separate from the credential file on purpose: the pool may hold several
|
|
67
|
+
* accounts, while \`~/.minimax/auth\` holds exactly one session per region and is
|
|
68
|
+
* the desktop app's to write.
|
|
69
|
+
*/
|
|
70
|
+
export declare function minimaxCodePoolPath(): string;
|
|
71
|
+
/**
|
|
72
|
+
* Identity two credentials share when they are the same account.
|
|
73
|
+
*
|
|
74
|
+
* Neither token can be used for this: the access token is replaced on every
|
|
75
|
+
* refresh and the refresh token rotates, so keying on either would make one
|
|
76
|
+
* account look new after every rotation. A hash of the refresh token would have
|
|
77
|
+
* the same defect and no compensating benefit, so it is not done.
|
|
78
|
+
*
|
|
79
|
+
* Two different identities are available, one per provenance:
|
|
80
|
+
*
|
|
81
|
+
* - A native credential names the desktop app's own record slot through
|
|
82
|
+
* \`recordKey\`. That key is a non-secret digest of the app's auth-home path, so
|
|
83
|
+
* it is stable across every rotation, and the app keeps exactly one session per
|
|
84
|
+
* slot: re-signing in there replaces the session, which for routing purposes is
|
|
85
|
+
* the same account, so updating the row in place is the correct outcome.
|
|
86
|
+
* - A plugin-owned credential has no record slot (the app's key is a hash this
|
|
87
|
+
* plugin cannot reproduce) and no account profile, so the sign-in that produced
|
|
88
|
+
* it — its \`loginEpoch\`, which survives every rotation — is the identity. A
|
|
89
|
+
* second device-code sign-in is genuinely a second session with its own refresh
|
|
90
|
+
* token chain, so it is its own account.
|
|
91
|
+
*
|
|
92
|
+
* When neither is present there is nothing stable to key on: the function returns
|
|
93
|
+
* undefined, the core mints \`acc_<random>\`, and the row is added rather than
|
|
94
|
+
* silently merged with an unrelated credential.
|
|
95
|
+
*/
|
|
96
|
+
export declare function minimaxCodePoolIdentity(credentials: MinimaxCodeCredentials): string | undefined;
|
|
97
|
+
/**
|
|
98
|
+
* Validate and normalize one whole pool document.
|
|
99
|
+
*
|
|
100
|
+
* The credential is re-parsed through the store's own validator, so a row can
|
|
101
|
+
* never hold a token shape the store would refuse to write back. \`source\`,
|
|
102
|
+
* \`recordKey\` and \`buildEnv\` have to be restored explicitly: the validator
|
|
103
|
+
* takes them from its fallback rather than from the payload, and a native account
|
|
104
|
+
* that lost them would be re-labelled as plugin-owned (so the card would offer a
|
|
105
|
+
* delete that must never happen, and a rotation would land in the plugin's file
|
|
106
|
+
* instead of the app's).
|
|
107
|
+
*/
|
|
108
|
+
export declare function parseMinimaxCodePoolData(value: unknown): PoolData<MinimaxCodePoolAccount>;
|
|
109
|
+
export interface MinimaxCodeAccountPoolOptions {
|
|
110
|
+
/**
|
|
111
|
+
* Credential store the pool reads the desktop app's sign-in through and mirrors
|
|
112
|
+
* its primary account into.
|
|
113
|
+
*/
|
|
114
|
+
store?: MinimaxCodeCredentialStore;
|
|
115
|
+
/** Test seam; production builds the platform backend from the pool path. */
|
|
116
|
+
backend?: CredentialStore<PoolData<MinimaxCodePoolAccount>>;
|
|
117
|
+
/** Accounts this pool accepts; defaults to the core's limit. */
|
|
118
|
+
maxAccounts?: number;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* One cached read as the shared account card renders it.
|
|
122
|
+
*
|
|
123
|
+
* Every window is labeled through its LENGTH rather than with a string: the
|
|
124
|
+
* canonical window names live in the client's dictionary, and the host has no
|
|
125
|
+
* business shipping display text. A window whose consumed share nobody measured
|
|
126
|
+
* is dropped by {@link quotaWindow} — a null percentage is not 0%, it is
|
|
127
|
+
* "not stated", and a bar would lie about it. An `unlimited` window states no
|
|
128
|
+
* consumed share at all and the per-account shape has no way to say
|
|
129
|
+
* "unlimited", so it is dropped too rather than drawn as an empty bar.
|
|
130
|
+
*/
|
|
131
|
+
export declare function minimaxCodePoolQuota(quota: MinimaxCodeQuota | null | undefined): PoolAccountQuotaDto | undefined;
|
|
132
|
+
/**
|
|
133
|
+
* MiniMax Code's account pool.
|
|
134
|
+
*
|
|
135
|
+
* It owns rotation and the write-back, exactly like the sibling lines, with one
|
|
136
|
+
* asymmetry the hooks below enforce: an account whose credential lives in the
|
|
137
|
+
* desktop app's file is adopted, never owned.
|
|
138
|
+
*/
|
|
139
|
+
export declare class MinimaxCodeAccountPool extends AccountPoolCore<MinimaxCodeCredentials, MinimaxCodePoolAccount, MinimaxCodeAccountSummaryDto> {
|
|
140
|
+
private readonly store;
|
|
141
|
+
constructor(options?: MinimaxCodeAccountPoolOptions);
|
|
142
|
+
/**
|
|
143
|
+
* Account summaries, with a false auth failure cleared.
|
|
144
|
+
*
|
|
145
|
+
* A row can carry an `authStatus` of expired for a rotation that actually
|
|
146
|
+
* succeeded — the second of two concurrent rotations of one session gets a final
|
|
147
|
+
* verdict for a token the first already spent. Nobody comes back to clear that
|
|
148
|
+
* marker, so the account stays out of rotation until the user presses 重新登录.
|
|
149
|
+
*
|
|
150
|
+
* The verdict is re-checked against the token in force instead: a row whose
|
|
151
|
+
* credential has moved on since the failure is routable again, and the marker is
|
|
152
|
+
* removed. A row still holding the refused token keeps its marker, because that
|
|
153
|
+
* one really does need a sign-in.
|
|
154
|
+
*/
|
|
155
|
+
listAccounts(): Promise<MinimaxCodeAccountSummaryDto[]>;
|
|
156
|
+
/**
|
|
157
|
+
* Pick an account, healing a stale auth failure first.
|
|
158
|
+
*
|
|
159
|
+
* The healing matters here, not only on the card: an account marked expired is
|
|
160
|
+
* excluded by the core's eligibility rule, so until the marker is gone the line
|
|
161
|
+
* answers a single-account pool with "all accounts need a new sign-in" — for a
|
|
162
|
+
* rotation that succeeded. Doing it on the request path means the very next
|
|
163
|
+
* request after a false refusal routes normally instead of waiting for the card's
|
|
164
|
+
* next poll.
|
|
165
|
+
*/
|
|
166
|
+
getEffectiveAccount(excludeIds?: ReadonlySet<string>, fetchFn?: typeof fetch): Promise<{
|
|
167
|
+
account: MinimaxCodePoolAccount;
|
|
168
|
+
credentials: MinimaxCodeCredentials;
|
|
169
|
+
}>;
|
|
170
|
+
/**
|
|
171
|
+
* Drop an `authStatus` that describes a credential this machine no longer holds.
|
|
172
|
+
*
|
|
173
|
+
* A row can be marked expired by a rotation that actually SUCCEEDED: the refresh
|
|
174
|
+
* token is single-use, so when two callers of one session rotate at the same time
|
|
175
|
+
* the loser is told `invalid_grant` for a token the winner already spent. That is
|
|
176
|
+
* a verdict about a spent generation, not about the sign-in — and nothing else in
|
|
177
|
+
* the system ever revisits it, which is why the account stayed parked at
|
|
178
|
+
* "需要重新登录" until the user pressed a button.
|
|
179
|
+
*
|
|
180
|
+
* The verdict is re-checked against the credential in force: if the stored
|
|
181
|
+
* credential for the same session has moved on, the marker was about the old
|
|
182
|
+
* token and is removed. A row still holding the refused token keeps its marker,
|
|
183
|
+
* because that one genuinely needs a sign-in.
|
|
184
|
+
*/
|
|
185
|
+
private healStaleAuthFailures;
|
|
186
|
+
/**
|
|
187
|
+
* The account a usage read belongs to, together with the credential to read it
|
|
188
|
+
* with.
|
|
189
|
+
*
|
|
190
|
+
* Authored here rather than in the routes because it is provider-shaped: the
|
|
191
|
+
* routes need a credential and the ACCOUNT it was read for, so a snapshot can
|
|
192
|
+
* be remembered against the row whose numbers it describes. The selection is
|
|
193
|
+
* the core's own rule for a caller that names no account — the active one, then
|
|
194
|
+
* the primary, then the first — repeated in these three lines because the core
|
|
195
|
+
* exposes it only through `getFreshCredential`, which returns the credential
|
|
196
|
+
* alone; the credential (and its single-flight refresh, write-back and
|
|
197
|
+
* bookkeeping) still comes from the core, so no rotation rule lives here.
|
|
198
|
+
*
|
|
199
|
+
* No upstream request is made for the selection itself, and none of this moves
|
|
200
|
+
* the rotation: reading quota is not serving a request.
|
|
201
|
+
*/
|
|
202
|
+
getQuotaReadTarget(fetchFn?: typeof fetch): Promise<{
|
|
203
|
+
accountId: string;
|
|
204
|
+
credentials: MinimaxCodeCredentials;
|
|
205
|
+
}>;
|
|
206
|
+
/**
|
|
207
|
+
* Pick the account for the next request.
|
|
208
|
+
*
|
|
209
|
+
* The returned credential carries its own region and record key, so a caller
|
|
210
|
+
* must use those rather than any process-wide default. This is the method the
|
|
211
|
+
* adapter uses; {@link getEffectiveAccount} beneath it already refreshes a
|
|
212
|
+
* credential that is about to expire and writes the rotation back.
|
|
213
|
+
*/
|
|
214
|
+
getEffectiveCredential(excludeIds?: ReadonlySet<string>, fetchFn?: typeof fetch): Promise<{
|
|
215
|
+
account: MinimaxCodePoolAccount;
|
|
216
|
+
credentials: MinimaxCodeCredentials;
|
|
217
|
+
}>;
|
|
218
|
+
/**
|
|
219
|
+
* The desktop app's own current copy of one native account's credential.
|
|
220
|
+
*
|
|
221
|
+
* The app rotates its token on its own schedule, so the copy the pool adopted
|
|
222
|
+
* can be older than what is on disk. Only the same record slot counts: a
|
|
223
|
+
* different record key or region is a different account, and substituting it
|
|
224
|
+
* would present one account's token as another's. A file whose token is already
|
|
225
|
+
* stale is not newer authority either — the refresh path has just written the
|
|
226
|
+
* pair back, and reading the pre-refresh file would undo it.
|
|
227
|
+
*/
|
|
228
|
+
private liveNativeCredential;
|
|
229
|
+
/**
|
|
230
|
+
* The desktop app's own copy of one native account's session, and whether it has
|
|
231
|
+
* moved on from the row's copy.
|
|
232
|
+
*
|
|
233
|
+
* The app rotates its token on its own schedule, so the copy the pool adopted can
|
|
234
|
+
* be older than what is on disk. Only the same record slot counts: a different
|
|
235
|
+
* record key or region is a different account, and substituting it would present
|
|
236
|
+
* one account's token as another's.
|
|
237
|
+
*
|
|
238
|
+
* `advanced` is the whole reason this does not simply return the file: an
|
|
239
|
+
* EXPIRED file is not newer authority (that is the app's session having lapsed),
|
|
240
|
+
* while one that has moved on from the row is. The row's refresh token was spent
|
|
241
|
+
* by whichever side rotated last, and only the file can say what replaced it.
|
|
242
|
+
*/
|
|
243
|
+
private nativeAuthority;
|
|
244
|
+
/**
|
|
245
|
+
* Adopt the sign-in the desktop app currently holds into the pool.
|
|
246
|
+
*
|
|
247
|
+
* The pre-pool projection ({@link legacyAccount}) only surfaces when the pool is
|
|
248
|
+
* empty, so a user who already has a plugin-owned account needs an explicit way
|
|
249
|
+
* to bring the app's session in as well. Nothing is ever removed from the app;
|
|
250
|
+
* the account is added under its own record-slot identity, so adopting twice
|
|
251
|
+
* updates the same row.
|
|
252
|
+
*/
|
|
253
|
+
adoptNativeAccount(alias?: string): Promise<MinimaxCodePoolAccount>;
|
|
254
|
+
/**
|
|
255
|
+
* Remove one account inside a transaction.
|
|
256
|
+
*
|
|
257
|
+
* An account whose credential is the desktop app's own \`auth.json\` is refused:
|
|
258
|
+
* this plugin does not own that file, and removing the account would either
|
|
259
|
+
* strand the app's session or — if the deletion were ever allowed to reach the
|
|
260
|
+
* file — sign the user out of MiniMax Code itself. Signing out there is the
|
|
261
|
+
* supported way to end it, and the card is told so by \`removable: false\`.
|
|
262
|
+
*/
|
|
263
|
+
protected deleteAccountFromPool(data: PoolData<MinimaxCodePoolAccount>, accountId: string): void;
|
|
264
|
+
/** The credential store this pool mirrors its primary account into. */
|
|
265
|
+
mirrorStore(): MinimaxCodeCredentialStore;
|
|
266
|
+
}
|
|
267
|
+
/** The pool slice of a status response; exactly the fields the card renders. */
|
|
268
|
+
export interface MinimaxCodePoolStatus {
|
|
269
|
+
accounts: MinimaxCodeAccountSummaryDto[];
|
|
270
|
+
activeAccountId?: string;
|
|
271
|
+
rotationStrategy: AccountRotationStrategy;
|
|
272
|
+
/** Whether this process installed a pool at all. */
|
|
273
|
+
poolInstalled: boolean;
|
|
274
|
+
}
|
|
275
|
+
/**
|
|
276
|
+
* Read the pool slice of the status DTO.
|
|
277
|
+
*
|
|
278
|
+
* A pool that cannot be read must not fail the whole card: the connection
|
|
279
|
+
* section is still worth rendering, just with an empty account list.
|
|
280
|
+
*/
|
|
281
|
+
export declare function minimaxCodePoolStatus(pool: MinimaxCodeAccountPool | undefined): Promise<MinimaxCodePoolStatus>;
|
|
282
|
+
export interface MinimaxCodeAccountsRouteOptions {
|
|
283
|
+
/**
|
|
284
|
+
* Status the route answers a mutation with, so the card re-renders in one round
|
|
285
|
+
* trip. Defaults to the pool slice alone.
|
|
286
|
+
*/
|
|
287
|
+
readStatus?: () => Promise<unknown>;
|
|
288
|
+
/**
|
|
289
|
+
* Called after a mutation that can move which account serves a request, so the
|
|
290
|
+
* caller can drop per-account caches (quota, catalog) that belong to the account
|
|
291
|
+
* that just changed.
|
|
292
|
+
*/
|
|
293
|
+
onAccountsChanged?: () => void;
|
|
294
|
+
}
|
|
295
|
+
/**
|
|
296
|
+
* The \`/accounts\` route for this line, as a self-contained handler.
|
|
297
|
+
*
|
|
298
|
+
* It is a handler rather than a second \`webServer.register\` call because the
|
|
299
|
+
* parent route already owns the \`/minimax-code/api\` prefix: registering a nested
|
|
300
|
+
* prefix beside it would make which handler sees \`/accounts\` depend on the
|
|
301
|
+
* server's prefix-matching order. The parent dispatches on \`path === 'accounts'\`
|
|
302
|
+
* and calls this.
|
|
303
|
+
*
|
|
304
|
+
* Every POST goes through {@link isSameOriginMutation}, exactly like the sibling
|
|
305
|
+
* lines' account routes, and no response ever carries a credential: what leaves
|
|
306
|
+
* here is the summary DTO the card renders.
|
|
307
|
+
*/
|
|
308
|
+
export declare function createMinimaxCodeAccountsHandler(pool: MinimaxCodeAccountPool | undefined, options?: MinimaxCodeAccountsRouteOptions): (request: IncomingMessage, response: ServerResponse) => Promise<void>;
|
|
309
|
+
//# sourceMappingURL=account-pool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account-pool.d.ts","sourceRoot":"","sources":["../../../../src/host/minimax-code/account-pool.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The DSH adapter for the MiniMax Code subscription.
|
|
3
|
+
*
|
|
4
|
+
* It follows the shape every other line in this package uses — claim the provider
|
|
5
|
+
* id, list the hardcoded directory, resolve one model, stream one request — with
|
|
6
|
+
* two differences that belong to this line alone:
|
|
7
|
+
*
|
|
8
|
+
* 1. the credential is the desktop app's own \`auth.json\`, read and renewed through
|
|
9
|
+
* ./oauth.ts under the read-only-first discipline; and
|
|
10
|
+
* 2. there is no account pool. Pooling exists to rotate several signed-in accounts
|
|
11
|
+
* against one subscription; here there is exactly one credential, shared with an
|
|
12
|
+
* application the user is also running, and inventing a second one would mean
|
|
13
|
+
* racing that application for a rotation neither of them needs.
|
|
14
|
+
*/
|
|
15
|
+
import { LlmAdapter, type GenerateOptions, type LlmModelInfo, type LlmProviderInfo, type LlmResolvedModelInfo, type PreparedAdapterCall, type ResolvedRetryPolicy, type StreamChunk } from '@deepseek-ai/dsh-llm';
|
|
16
|
+
import type { ImageAttachmentRef } from '@deepseek-ai/dsh-attachment';
|
|
17
|
+
import { PROVIDER_ID } from './types.ts';
|
|
18
|
+
import { MinimaxCodeCredentialStore, MinimaxCodeModelSettingsStore, type MinimaxCodePreferenceStore } from './token-store.ts';
|
|
19
|
+
import { clampOutputToContext, maxOutputTokensFor, type AttachmentVideoReader, type AttachmentImageReader } from './mapper.ts';
|
|
20
|
+
import type { MinimaxCodeAccountPool } from './account-pool.ts';
|
|
21
|
+
import { type PromptCacheOverride } from '../common/prompt-cache-policy.ts';
|
|
22
|
+
import type { ProviderFailureClassification } from '../common/failure-classification.ts';
|
|
23
|
+
/**
|
|
24
|
+
* Transient-failure retry policy for the minimax-code route.
|
|
25
|
+
*
|
|
26
|
+
* The subscription fronts the model providers, so a call can fail with a 502/503
|
|
27
|
+
* while the subscription and the credential stay perfectly usable. The retryable
|
|
28
|
+
* set is therefore SERVER (any 5xx), RATE_LIMIT (genuine back-pressure), TRANSPORT
|
|
29
|
+
* (a connection that produced no response) and TIMEOUT (a stalled stream, handled
|
|
30
|
+
* by the idle watchdog).
|
|
31
|
+
*
|
|
32
|
+
* Deliberately outside the set: INVALID_CREDENTIAL (a rejected token fails
|
|
33
|
+
* identically every time), PROVIDER_ERROR (a 400 or a plan refusal), and ABORTED
|
|
34
|
+
* (the caller already cancelled).
|
|
35
|
+
*/
|
|
36
|
+
export declare const MINIMAX_CODE_RETRY_POLICY_CONFIG: {
|
|
37
|
+
mode: 'normal';
|
|
38
|
+
maxRetries: number;
|
|
39
|
+
retryableCodes: string[];
|
|
40
|
+
backoff: {
|
|
41
|
+
initialDelayMs: number;
|
|
42
|
+
maxDelayMs: number;
|
|
43
|
+
jitterRatio: number;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
/** What one failed response means for the retry policy. */
|
|
47
|
+
export interface MinimaxFailureClassification extends ProviderFailureClassification {
|
|
48
|
+
/** DSH error code; decides whether the route retries. */
|
|
49
|
+
code: string;
|
|
50
|
+
/** Message shown to the user, with the service's own text appended. */
|
|
51
|
+
message: string;
|
|
52
|
+
/** True only when the failure is worth retrying. */
|
|
53
|
+
retryable: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Whether the verdict is about the ACCOUNT that made the request.
|
|
56
|
+
*
|
|
57
|
+
* False for every failure that belongs to the request or to the plan: ordinary
|
|
58
|
+
* back-pressure, an overload, a malformed body. True only for a Token Plan window
|
|
59
|
+
* this account has spent, which stays spent — so cooling it is what lets the NEXT
|
|
60
|
+
* request land on an account that can answer, and cooling a plan-scoped refusal
|
|
61
|
+
* would take a whole pool offline over one request. Same rule and same field name
|
|
62
|
+
* as the sibling lines' `accountScoped` (kimi-code/adapter.ts:246).
|
|
63
|
+
*/
|
|
64
|
+
accountScoped: boolean;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Classify one non-2xx response for the retry policy.
|
|
68
|
+
*
|
|
69
|
+
* A 401 on this route is the one failure with an unambiguous remedy, and it is the
|
|
70
|
+
* one the credentials rule exists for: the service answers
|
|
71
|
+
* \`{"code":401,"message":"token is required"}\` both when no credential was sent
|
|
72
|
+
* and when the one that was sent is no longer accepted, so the message names the
|
|
73
|
+
* sign-in path instead of asking the user to guess.
|
|
74
|
+
*/
|
|
75
|
+
export declare function classifyMinimaxFailure(status: number, bodyText: string): MinimaxFailureClassification;
|
|
76
|
+
export interface MinimaxCodeAdapterOptions {
|
|
77
|
+
fetchFn?: typeof fetch;
|
|
78
|
+
/** Attachment seam: verified bytes for one durable image. */
|
|
79
|
+
attachments?: AttachmentImageReader;
|
|
80
|
+
/**
|
|
81
|
+
* Attachment seam: verified bytes for one durable video.
|
|
82
|
+
*
|
|
83
|
+
* Absent means every video resolves to `unavailable` and the model is told the
|
|
84
|
+
* clip is missing, which is the same honest degradation the image seam uses.
|
|
85
|
+
*/
|
|
86
|
+
videos?: AttachmentVideoReader;
|
|
87
|
+
/**
|
|
88
|
+
* The account pool, when this process installed one.
|
|
89
|
+
*
|
|
90
|
+
* With a pool the adapter rotates between accounts and lets a 429 cool one
|
|
91
|
+
* account down instead of taking the whole line offline; without one it keeps
|
|
92
|
+
* the single-credential behaviour it had before, reading and renewing the one
|
|
93
|
+
* stored credential. Both postures are supported because the pool is optional
|
|
94
|
+
* in a composition (a headless host, a test), and a missing pool must not make
|
|
95
|
+
* the route unusable.
|
|
96
|
+
*/
|
|
97
|
+
accountPool?: MinimaxCodeAccountPool;
|
|
98
|
+
/** Optional deployment override for cache-prefix behaviour. */
|
|
99
|
+
promptCache?: PromptCacheOverride;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* The error code for "the model this request named is not the model that answered".
|
|
103
|
+
*
|
|
104
|
+
* Deliberately NOT in `MINIMAX_CODE_RETRY_POLICY_CONFIG.retryableCodes` (which is
|
|
105
|
+
* RATE_LIMIT / SERVER / TIMEOUT / TRANSPORT), so the harness never retries it:
|
|
106
|
+
* re-issuing the SAME body against the SAME substitution answers the SAME wrong
|
|
107
|
+
* model, and each attempt is billed at the substituted model's price. The failure
|
|
108
|
+
* is terminal until a human changes the model, which is exactly what the retry
|
|
109
|
+
* policy is keyed on.
|
|
110
|
+
*
|
|
111
|
+
* Exported so a test (and any later caller) can name it instead of copying the
|
|
112
|
+
* literal, the same way NO_ANSWER_PHRASE is.
|
|
113
|
+
*/
|
|
114
|
+
export declare const MODEL_SUBSTITUTED_CODE = "MODEL_SUBSTITUTED";
|
|
115
|
+
export declare class MinimaxCodeAdapter extends LlmAdapter {
|
|
116
|
+
private readonly store;
|
|
117
|
+
/**
|
|
118
|
+
* The JSON file fallback for the model selection.
|
|
119
|
+
*
|
|
120
|
+
* Every sibling line has one, and it is not dead weight even where a settings
|
|
121
|
+
* service exists: it is what a later run on a harness that dropped the register
|
|
122
|
+
* seam reads back.
|
|
123
|
+
*/
|
|
124
|
+
private readonly modelSettings;
|
|
125
|
+
/**
|
|
126
|
+
* Registered model settings, when the harness still offers the register seam.
|
|
127
|
+
*
|
|
128
|
+
* Optional because the adapter is also constructed by tooling and tests that
|
|
129
|
+
* have no settings service; {@link settings} then reads the file directly, so
|
|
130
|
+
* both shapes answer the same three questions.
|
|
131
|
+
*/
|
|
132
|
+
private readonly preferences;
|
|
133
|
+
private readonly options;
|
|
134
|
+
/** Follows the session's main-turn effort onto auxiliary (compaction/timeline/review) requests. */
|
|
135
|
+
private readonly effortMemory;
|
|
136
|
+
constructor(store?: MinimaxCodeCredentialStore, options?: MinimaxCodeAdapterOptions, modelSettings?: MinimaxCodeModelSettingsStore, preferences?: MinimaxCodePreferenceStore);
|
|
137
|
+
/**
|
|
138
|
+
* The current model selection.
|
|
139
|
+
*
|
|
140
|
+
* Synchronous on the register seam (the scope reads from memory) and a single
|
|
141
|
+
* file read otherwise. The loop over models that consults it runs on every
|
|
142
|
+
* model-picker query, so this is deliberately not memoized: a cached snapshot
|
|
143
|
+
* would keep serving a model the user disabled in the card until the process
|
|
144
|
+
* restarted, which is the complaint this whole settings surface exists to fix.
|
|
145
|
+
*/
|
|
146
|
+
private settings;
|
|
147
|
+
/**
|
|
148
|
+
* The credential one request should present, and the pool account behind it.
|
|
149
|
+
*
|
|
150
|
+
* With a pool, the pool picks the account (rotation, cooldown, stickiness) and
|
|
151
|
+
* owns the refresh, so this must not read the single-credential file: that file
|
|
152
|
+
* mirrors one pooled account, and presenting it would silently pin every request
|
|
153
|
+
* to whichever account was mirrored last.
|
|
154
|
+
*
|
|
155
|
+
* Without a pool the previous behaviour is kept exactly, including the
|
|
156
|
+
* read-only-first refresh policy.
|
|
157
|
+
*/
|
|
158
|
+
private acquireCredential;
|
|
159
|
+
/**
|
|
160
|
+
* Renew the credential the service just refused.
|
|
161
|
+
*
|
|
162
|
+
* With a pool, the account that failed is the one renewed, so the rotation lands
|
|
163
|
+
* on that account's own record instead of the single-credential file; without a
|
|
164
|
+
* pool the store's own forced refresh is what ran before the pool existed.
|
|
165
|
+
*/
|
|
166
|
+
private renewCredential;
|
|
167
|
+
providerInfo(provider: string): LlmProviderInfo;
|
|
168
|
+
providerRetryPolicy(): ResolvedRetryPolicy;
|
|
169
|
+
imageRequestPricing(): undefined;
|
|
170
|
+
imageRequestTarget(_provider: string, _model: string, image: ImageAttachmentRef): import("../common/request-images.ts").CompatImageRequestTarget;
|
|
171
|
+
/**
|
|
172
|
+
* The hardcoded directory, narrowed to what the user enabled it to serve.
|
|
173
|
+
*
|
|
174
|
+
* Nothing is fetched: the listing route is unavailable on this endpoint, so a
|
|
175
|
+
* "live catalog" would be a request that can only ever fail.
|
|
176
|
+
*
|
|
177
|
+
* The line-wide switch is honoured before the selection is even resolved, so
|
|
178
|
+
* turning the card's switch off exposes no model at all — including the ones
|
|
179
|
+
* the user left ticked, which is what "off" has to mean if it is to mean
|
|
180
|
+
* anything.
|
|
181
|
+
*/
|
|
182
|
+
listModels(provider?: string): Promise<readonly LlmModelInfo[]>;
|
|
183
|
+
/**
|
|
184
|
+
* One model's resolved metadata, read through the current selection.
|
|
185
|
+
*
|
|
186
|
+
* The effective context window is the override when one is saved, and the
|
|
187
|
+
* wire output cap is sized against that same number in requestStream. It is
|
|
188
|
+
* deliberately not exposed as a fixed defaultMaxTokens reservation here.
|
|
189
|
+
*/
|
|
190
|
+
resolveModel(provider: string, modelId: string, signal?: AbortSignal): Promise<LlmResolvedModelInfo>;
|
|
191
|
+
prepareCall(provider: string, model: string, signal?: AbortSignal): Promise<PreparedAdapterCall>;
|
|
192
|
+
/**
|
|
193
|
+
* One request, with the line's default reasoning effort materialized.
|
|
194
|
+
*
|
|
195
|
+
* A caller that states an effort is passed through untouched: DSH materializes
|
|
196
|
+
* {@link resolveModel}'s default into the options for a picker-driven turn, so
|
|
197
|
+
* a value arriving here is a deliberate choice and must not be replaced. Only
|
|
198
|
+
* an unstated one is filled in, and only when the user actually configured a
|
|
199
|
+
* global level — the shipped default is "say nothing", because the model has
|
|
200
|
+
* its own and restating it in every body is a chance to disagree with it.
|
|
201
|
+
*/
|
|
202
|
+
stream(options: GenerateOptions): AsyncIterable<StreamChunk>;
|
|
203
|
+
private requestStream;
|
|
204
|
+
}
|
|
205
|
+
export { PROVIDER_ID, MinimaxCodeCredentialStore };
|
|
206
|
+
export { maxOutputTokensFor, clampOutputToContext };
|
|
207
|
+
//# sourceMappingURL=adapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../../src/host/minimax-code/adapter.ts"],"names":[],"mappings":"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"}
|