@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,117 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MiniMax Code Files API client.
|
|
3
|
+
*
|
|
4
|
+
* The one capability this line could not serve inline: a clip whose base64 would
|
|
5
|
+
* overrun the 64 MB request body. Uploading it to the Files API and sending an
|
|
6
|
+
* `mm_file://` reference is the only documented way to send a large media file.
|
|
7
|
+
*
|
|
8
|
+
* EVERY fact in this file was measured against the subscription endpoint on
|
|
9
|
+
* 2026-10-05, not read from the official client and not assumed:
|
|
10
|
+
*
|
|
11
|
+
* - The endpoint is `{agentBase}/mavis/api/v1/llm/v1/files/upload`. The
|
|
12
|
+
* `files_api_upload_endpoint: '/v1/files/upload'` in the official catalog is
|
|
13
|
+
* RELATIVE to the messages base, and the official resolver strips the
|
|
14
|
+
* `/anthropic` compatibility suffix before appending it.
|
|
15
|
+
* - It requires `multipart/form-data` with `purpose` FIRST and then `file`;
|
|
16
|
+
* `purpose` is `image_understanding` or `video_understanding`.
|
|
17
|
+
* - It answers `{"file":{"file_id":…},"base_resp":{"status_code":0}}`,
|
|
18
|
+
* and `status_code` must be 0 for the id to be usable.
|
|
19
|
+
* - **It rejects the `X-Msh-*` identity headers that every other request on this
|
|
20
|
+
* line sends.** With them the answer is `{"file":null,…"invalid params"}`,
|
|
21
|
+
* identical to a genuinely malformed body - so a request that is correct in
|
|
22
|
+
* every other respect fails with a message that points nowhere. This client
|
|
23
|
+
* therefore sends the bearer token ALONE, and the only thing that fixes a
|
|
24
|
+
* `2013 invalid params` here is dropping those headers, not changing the form.
|
|
25
|
+
* - A successful upload is referenced as `mm_file://<file_id>` in a
|
|
26
|
+
* `{ type, source: { type: 'url', url } }` block. A bare id is rejected with
|
|
27
|
+
* "image url must be http(s):// or data:...;base64", so the scheme is load-bearing.
|
|
28
|
+
* - There is no list or delete route on this surface (`GET /files` answers 503
|
|
29
|
+
* `direct_route_not_configured`), so expiry cannot be confirmed server-side.
|
|
30
|
+
*
|
|
31
|
+
* @module dsh-multi-provider/minimax-files-api
|
|
32
|
+
*/
|
|
33
|
+
/** Path suffix appended to the messages URL to reach the Files API. */
|
|
34
|
+
export declare const FILES_UPLOAD_PATH = "/files/upload";
|
|
35
|
+
/** Scheme a stored file is referenced by on the wire. */
|
|
36
|
+
export declare const FILE_REF_SCHEME = "mm_file://";
|
|
37
|
+
/**
|
|
38
|
+
* Lifetime this client assumes for an uploaded file id.
|
|
39
|
+
*
|
|
40
|
+
* 12 hours, matching the official client's own default (its resolver falls back
|
|
41
|
+
* to 43,200 seconds when the server states no TTL). It is deliberately shorter
|
|
42
|
+
* than a day: a stale reference is worth a cheap re-upload, while a reference
|
|
43
|
+
* that outlives its file is worth a failed turn.
|
|
44
|
+
*/
|
|
45
|
+
export declare const DEFAULT_FILE_ID_TTL_SEC = 43200;
|
|
46
|
+
/** Ceiling on one upload, so a runaway path cannot spend the whole budget. */
|
|
47
|
+
export declare const MAX_UPLOAD_BYTES: number;
|
|
48
|
+
/** Time budget for one upload request. */
|
|
49
|
+
export declare const UPLOAD_TIMEOUT_MS = 120000;
|
|
50
|
+
/** Why one upload could not produce a usable file id. */
|
|
51
|
+
export type FilesApiFailure = 'not-configured' | 'too-large' | 'unauthorized' | 'rejected'
|
|
52
|
+
/** The gateway answered 50115: the route is not enabled for this credential. */
|
|
53
|
+
| 'route-not-configured' | 'unreadable' | 'network';
|
|
54
|
+
/** One failed upload, with a message the settings surface can show. */
|
|
55
|
+
export declare class FilesApiError extends Error {
|
|
56
|
+
readonly reason: FilesApiFailure;
|
|
57
|
+
constructor(reason: FilesApiFailure, message: string);
|
|
58
|
+
}
|
|
59
|
+
/** What one upload request needs. */
|
|
60
|
+
export interface FilesApiUploadRequest {
|
|
61
|
+
readonly accessToken: string;
|
|
62
|
+
readonly baseUrl: string;
|
|
63
|
+
/** Bare base64 of the bytes, without a data-URL prefix. */
|
|
64
|
+
readonly base64: string;
|
|
65
|
+
/** Exact decoded byte length. */
|
|
66
|
+
readonly bytes: number;
|
|
67
|
+
readonly mediaType: string;
|
|
68
|
+
readonly purpose: 'image_understanding' | 'video_understanding';
|
|
69
|
+
readonly filename: string;
|
|
70
|
+
readonly signal?: AbortSignal;
|
|
71
|
+
}
|
|
72
|
+
/** Everything the Files API upload surface was measured to accept. */
|
|
73
|
+
export interface FilesApiUploadOptions {
|
|
74
|
+
readonly fetchFn?: typeof fetch;
|
|
75
|
+
/** Test seam: the clock, in epoch ms. */
|
|
76
|
+
readonly nowMs?: () => number;
|
|
77
|
+
/**
|
|
78
|
+
* Test seam: where the id cache lives.
|
|
79
|
+
*
|
|
80
|
+
* `undefined` keeps it in memory, so a test neither reads the real cache
|
|
81
|
+
* file nor leaves ids behind in it.
|
|
82
|
+
*/
|
|
83
|
+
readonly storePath?: string | undefined;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Forget every cached file id in the in-memory store.
|
|
87
|
+
*
|
|
88
|
+
* Test seam only. A file id is scoped to an account, so an id left over from
|
|
89
|
+
* another test would make the next upload look cached and never exercise the
|
|
90
|
+
* request at all.
|
|
91
|
+
*/
|
|
92
|
+
export declare function resetInMemoryFileIds(): void;
|
|
93
|
+
/** The wire reference for a stored file id. */
|
|
94
|
+
export declare function fileRef(fileId: string): string;
|
|
95
|
+
/**
|
|
96
|
+
* The Files API upload URL for one messages URL.
|
|
97
|
+
*
|
|
98
|
+
* The upload is a SIBLING of `/messages`, not a child of it: the measured route
|
|
99
|
+
* is `.../llm/v1/files/upload`. Appending to the messages URL would ask for
|
|
100
|
+
* `/messages/files/upload`, which answers 503 `direct_route_not_configured` -
|
|
101
|
+
* an error that reads like the feature is switched off rather than a path that
|
|
102
|
+
* is one segment off.
|
|
103
|
+
*/
|
|
104
|
+
export declare function filesUploadUrl(messagesEndpoint: string): string;
|
|
105
|
+
/** The `purpose` value one media type uploads under. */
|
|
106
|
+
export declare function filesPurposeFor(mediaType: string): 'image_understanding' | 'video_understanding' | undefined;
|
|
107
|
+
/**
|
|
108
|
+
* Upload one media file and return its id, reusing a live cached id when the
|
|
109
|
+
* same bytes were already uploaded by the same account.
|
|
110
|
+
*
|
|
111
|
+
* @param accountKey - identifies the account the bytes are uploaded under.
|
|
112
|
+
* Ids are never shared across accounts; see {@link FileIdStore}.
|
|
113
|
+
* @returns the file id, or undefined when the request should carry the media
|
|
114
|
+
* inline instead (too large, unconfigured, or the upload failed).
|
|
115
|
+
*/
|
|
116
|
+
export declare function uploadMediaFile(request: Omit<FilesApiUploadRequest, 'purpose' | 'filename'>, accountKey: string, options?: FilesApiUploadOptions): Promise<string | undefined>;
|
|
117
|
+
//# sourceMappingURL=files-api.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"files-api.d.ts","sourceRoot":"","sources":["../../../../src/host/minimax-code/files-api.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AASH,uEAAuE;AACvE,eAAO,MAAM,iBAAiB,kBAAkB,CAAA;AAEhD,yDAAyD;AACzD,eAAO,MAAM,eAAe,eAAe,CAAA;AAE3C;;;;;;;GAOG;AACH,eAAO,MAAM,uBAAuB,QAAS,CAAA;AAE7C,8EAA8E;AAC9E,eAAO,MAAM,gBAAgB,QAAmB,CAAA;AAEhD,0CAA0C;AAC1C,eAAO,MAAM,iBAAiB,SAAU,CAAA;AAExC,yDAAyD;AACzD,MAAM,MAAM,eAAe,GACvB,gBAAgB,GAChB,WAAW,GACX,cAAc,GACd,UAAU;AACZ,gFAAgF;GAC9E,sBAAsB,GACtB,YAAY,GACZ,SAAS,CAAA;AAEb,uEAAuE;AACvE,qBAAa,aAAc,SAAQ,KAAK;IACtC,QAAQ,CAAC,MAAM,EAAE,eAAe,CAAA;gBAEpB,MAAM,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM;CAKrD;AAED,qCAAqC;AACrC,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,2DAA2D;IAC3D,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,iCAAiC;IACjC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,OAAO,EAAE,qBAAqB,GAAG,qBAAqB,CAAA;IAC/D,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAA;CAC9B;AAED,sEAAsE;AACtE,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,KAAK,CAAA;IAC/B,yCAAyC;IACzC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,MAAM,CAAA;IAC7B;;;;;OAKG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CACxC;AAkED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,IAAI,IAAI,CAE3C;AA2ED,+CAA+C;AAC/C,wBAAgB,OAAO,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAE9C;AAsBD;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,gBAAgB,EAAE,MAAM,GAAG,MAAM,CAM/D;AAKD,wDAAwD;AACxD,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,qBAAqB,GAAG,qBAAqB,GAAG,SAAS,CAK5G;AAED;;;;;;;;GAQG;AACH,wBAAsB,eAAe,CACnC,OAAO,EAAE,IAAI,CAAC,qBAAqB,EAAE,SAAS,GAAG,UAAU,CAAC,EAC5D,UAAU,EAAE,MAAM,EAClB,OAAO,GAAE,qBAA0B,GAClC,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAW7B"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The smallest ISO BMFF duration reader this route needs, with no decoder.
|
|
3
|
+
*
|
|
4
|
+
* WHY IT EXISTS. A reference video must be sent to the generation service with
|
|
5
|
+
* its length in seconds beside it (docs/minimax-video-extended-spec.md section
|
|
6
|
+
* 4), and upstream reads that number out of the container itself rather than
|
|
7
|
+
* asking the caller for it - `readIsoBmffDurationSeconds` is the name of the
|
|
8
|
+
* upstream file too. A LOCAL reference video therefore owes the caller no
|
|
9
|
+
* `referenceVideoDurationSeconds` argument: this module supplies it.
|
|
10
|
+
*
|
|
11
|
+
* WHY IT IS NOT AFFMPEG. The number lives in exactly one box, `moov/mvhd`, at a
|
|
12
|
+
* fixed byte offset inside it. Reaching it is an eight-byte header walk, not a
|
|
13
|
+
* demux; pulling in a media toolchain (or a native binding) to read two integers
|
|
14
|
+
* would dwarf the rest of this plugin.
|
|
15
|
+
*
|
|
16
|
+
* THE TWO LAYOUTS, which is the whole reason the walk is written the way it is:
|
|
17
|
+
*
|
|
18
|
+
* | layout | box order | what a whole-file read would cost |
|
|
19
|
+
* | ------------- | -------------------- | --------------------------------- |
|
|
20
|
+
* | faststart | `ftyp moov mdat` | the moov is near the front |
|
|
21
|
+
* | ordinary mp4 | `ftyp mdat moov` | the moov is AFTER tens of megabytes |
|
|
22
|
+
*
|
|
23
|
+
* So the reader NEVER loads the file. It opens a handle, `stat`s the size, and
|
|
24
|
+
* seeks: it reads the eight-byte header of each TOP-LEVEL box only, jumps over a
|
|
25
|
+
* `mdat` by its declared size, and - once it lands on `moov` - reads that box's
|
|
26
|
+
* own child headers the same way until it finds `mvhd`, of which it keeps the
|
|
27
|
+
* last 32 bytes. A 500 MB clip costs a few dozen bytes of I/O.
|
|
28
|
+
*
|
|
29
|
+
* WHAT IT REFUSES, deliberately, instead of guessing:
|
|
30
|
+
* - a file that is not ISO BMFF at all (a WebM's EBML magic is not a box
|
|
31
|
+
* header) -> `MINIMAX_VIDEO_NOT_ISO_BMFF`;
|
|
32
|
+
* - a box header that runs past the end of its container, or a box smaller
|
|
33
|
+
* than its own header -> `MINIMAX_VIDEO_NOT_ISO_BMFF`;
|
|
34
|
+
* - an ISO BMFF file with no `moov`, no `mvhd`, or a `mvhd` too short to hold
|
|
35
|
+
* its own fields -> `MINIMAX_VIDEO_DURATION_UNREADABLE`;
|
|
36
|
+
* - a `timescale` of zero (the division has no answer) -> the same code;
|
|
37
|
+
* - `mvhd`'s documented "unknown duration" sentinels (all bits set) -> the
|
|
38
|
+
* same code, because reporting a made-up length is worse than refusing.
|
|
39
|
+
*
|
|
40
|
+
* Every refusal is an ERROR, never `undefined`: a caller that silently got no
|
|
41
|
+
* duration would send a reference video with no length, or `null`, and neither
|
|
42
|
+
* is a thing the service asked for.
|
|
43
|
+
*
|
|
44
|
+
* @module dsh-multi-provider/minimax-code/iso-bmff-duration
|
|
45
|
+
*/
|
|
46
|
+
import { HarnessError } from '@deepseek-ai/dsh-llm';
|
|
47
|
+
/**
|
|
48
|
+
* Raised when a file's length cannot be read out of its ISO BMFF container.
|
|
49
|
+
*
|
|
50
|
+
* A `HarnessError` subclass rather than a bare `Error`, so the tool layer can
|
|
51
|
+
* hand its `code` straight to the caller without re-wrapping the message.
|
|
52
|
+
*/
|
|
53
|
+
export declare class IsoBmffDurationError extends HarnessError {
|
|
54
|
+
constructor(message: string, code: string);
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Read one mp4/mov file's length in seconds, without decoding a frame.
|
|
58
|
+
*
|
|
59
|
+
* The walk, in full:
|
|
60
|
+
*
|
|
61
|
+
* 1. `stat` the file - the size is the only bound needed, and nothing is read
|
|
62
|
+
* before it is known.
|
|
63
|
+
* 2. From offset 0, read each TOP-LEVEL box header and jump to the next one, so
|
|
64
|
+
* an `mdat` is skipped by arithmetic rather than by reading it. The first box
|
|
65
|
+
* must be one of {@link ISO_BMFF_LEADING_BOX_TYPES}, which is where a
|
|
66
|
+
* non-mp4 file is caught.
|
|
67
|
+
* 3. On `moov`, walk ITS direct children the same way until `mvhd` appears. A
|
|
68
|
+
* `trak` is skipped by size, exactly like `mdat`.
|
|
69
|
+
* 4. Read the first {@link MVHD_MAX_READ_BYTES} bytes of `mvhd` and divide
|
|
70
|
+
* `duration` by `timescale`.
|
|
71
|
+
*
|
|
72
|
+
* Both measured layouts work for the same reason: the walk is driven by the
|
|
73
|
+
* sizes the boxes declare, so it does not care whether `moov` came before or
|
|
74
|
+
* after the media data. Faststart files find it on the first or second hop; a
|
|
75
|
+
* camera/encoder file finds it after one seek over the entire `mdat`.
|
|
76
|
+
*
|
|
77
|
+
* @param filePath - absolute path to the file to read.
|
|
78
|
+
* @returns the clip length in seconds, as an exact ratio.
|
|
79
|
+
* @throws IsoBmffDurationError (a `HarnessError`) whenever the length cannot be
|
|
80
|
+
* established - a missing file, a non-ISO-BMFF file, a truncated box, a
|
|
81
|
+
* missing `moov`/`mvhd`, an unreadable `mvhd`, or a zero timescale.
|
|
82
|
+
*/
|
|
83
|
+
export declare function readIsoBmffDurationSeconds(filePath: string): Promise<number>;
|
|
84
|
+
//# sourceMappingURL=iso-bmff-duration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"iso-bmff-duration.d.ts","sourceRoot":"","sources":["../../../../src/host/minimax-code/iso-bmff-duration.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAEnD;;;;;GAKG;AACH,qBAAa,oBAAqB,SAAQ,YAAY;gBACxC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;CAI1C;AAyOD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAsB,0BAA0B,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAkFlF"}
|
|
@@ -0,0 +1,351 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provider-wire mapping for the MiniMax Code subscription.
|
|
3
|
+
*
|
|
4
|
+
* The subscription speaks Anthropic Messages, so this file builds a
|
|
5
|
+
* \`/messages\` body and normalizes the SSE stream back into DSH's block/delta
|
|
6
|
+
* vocabulary.
|
|
7
|
+
*
|
|
8
|
+
* WHAT IS REUSED, AND WHAT IS NOT
|
|
9
|
+
*
|
|
10
|
+
* The generic halves of this problem already exist beside it in
|
|
11
|
+
* \`../kimi-code/mapper.ts\` and are imported rather than reimplemented: durable
|
|
12
|
+
* image resolution, the image budget that drops the oldest attachments first,
|
|
13
|
+
* JSON-Schema cleanup for tool parameters. None of those is provider-specific,
|
|
14
|
+
* and having one implementation is what keeps the two lines from drifting.
|
|
15
|
+
*
|
|
16
|
+
* The serialized-body guard is deliberately NOT in that shared list. It looks
|
|
17
|
+
* generic and is not: the byte ceiling it enforces is a property of the upstream
|
|
18
|
+
* gateway, so Kimi's 2 MB figure was Kimi's and had no standing here. It was
|
|
19
|
+
* imported anyway, and the cost was a local refusal on conversations this route
|
|
20
|
+
* would have served. The shape of the check is shared; the number is per-route,
|
|
21
|
+
* and \`maxMessageBodyBytes\` in ./types.ts is where the number lives.
|
|
22
|
+
*
|
|
23
|
+
* The provider-specific halves are written here:
|
|
24
|
+
*
|
|
25
|
+
* - the thinking control. The subscription's own model table names its thinking
|
|
26
|
+
* vocabulary (M2.7 always on with no level, M3 a two-state switch, M3.1 forced
|
|
27
|
+
* on with a level), which is not Kimi's low/high/max ladder; and
|
|
28
|
+
* - every diagnostic string, because an error a user reads must name the service
|
|
29
|
+
* they are actually talking to.
|
|
30
|
+
*
|
|
31
|
+
* WHAT IS MEASURED AND WHAT IS INFERRED
|
|
32
|
+
*
|
|
33
|
+
* Measured (brief sections 2.1 and 2.3): the endpoint, the URL shape
|
|
34
|
+
* \`<base>/mavis/api/v1/llm/v1/messages\`, the bearer header, the Anthropic
|
|
35
|
+
* protocol revision, the request body \`{model, max_tokens, messages}\` answering
|
|
36
|
+
* 200, and the four usage counters in the response.
|
|
37
|
+
*
|
|
38
|
+
* Since answered by MiniMax's own "Model Invocation" page, not inferred: thinking
|
|
39
|
+
* is on by default and needs no configuration, and the only documented control on
|
|
40
|
+
* the Anthropic-compatible surface is a top-level `output_config.effort` accepting
|
|
41
|
+
* low, medium, high, xhigh and max. There is no `thinking` object and no
|
|
42
|
+
* `budget_tokens` on this endpoint. See `outputConfigFor`.
|
|
43
|
+
*
|
|
44
|
+
* PROMPT CACHING IS ON BY DEFAULT, AND IT IS THE REQUEST THAT TURNS IT ON
|
|
45
|
+
*
|
|
46
|
+
* MiniMax documents two caching mechanisms, and they are not interchangeable:
|
|
47
|
+
*
|
|
48
|
+
* - an AUTOMATIC cache on its native API, which needs no marker at all; and
|
|
49
|
+
* - an EXPLICIT cache on its Anthropic-compatible API, where the
|
|
50
|
+
* `cache_control` breakpoints are what create the cache at all
|
|
51
|
+
* (`tools` -> `system` -> `messages`, at most MAX_CACHE_BREAKPOINTS per
|
|
52
|
+
* request, per the "Explicit Prompt Caching (Anthropic API)" page of the
|
|
53
|
+
* MiniMax docs).
|
|
54
|
+
*
|
|
55
|
+
* This line speaks the Anthropic dialect, so the explicit mechanism is the one
|
|
56
|
+
* that applies: a request with no breakpoint gets no `cache_read_input_tokens`
|
|
57
|
+
* back no matter how identical its bytes are turn over turn, which is exactly
|
|
58
|
+
* why this route showed no cache hits before the markers went in.
|
|
59
|
+
*
|
|
60
|
+
* The shape is the Claude line's (claude/mapper.ts, section 7), because the
|
|
61
|
+
* wire vocabulary is the same and that shape is the one MiniMax's
|
|
62
|
+
* explicit-caching page documents: breakpoints on the LAST system block, the
|
|
63
|
+
* last block of the LAST user message, and the last tool. The first requires
|
|
64
|
+
* `system` to go out as a block array rather than the plain string this line
|
|
65
|
+
* was first measured with, so the array form is used only while caching is on -
|
|
66
|
+
* a caller that opts out (MinimaxRequestOptions.cacheControl === false) gets
|
|
67
|
+
* the original string body byte-for-byte.
|
|
68
|
+
*/
|
|
69
|
+
import { type ContentBlock, type OutboundContentBlock, type GenerateOptions, type StreamChunk } from '../common/llm-compat.ts';
|
|
70
|
+
import { estimatedInputTokens } from '../common/prompt-estimate.ts';
|
|
71
|
+
import { offloadOldestRequestImages, resolveRequestImages, type AttachmentImageReader, type ResolvedRequestImages } from '../common/request-images.ts';
|
|
72
|
+
import { offloadOldestRequestVideos, requestHasVideo, resolveRequestVideos, type AttachmentVideoReader, type ResolvedRequestVideos } from '../common/video-request.ts';
|
|
73
|
+
export { offloadOldestRequestVideos, requestHasVideo, resolveRequestVideos, type AttachmentVideoReader, type ResolvedRequestVideos, };
|
|
74
|
+
import { ANTHROPIC_VERSION, DEFAULT_MAX_MESSAGE_BODY_BYTES, DEFAULT_MAX_REQUEST_IMAGE_BYTES, MAX_REQUEST_VIDEO_BYTES, maxMessageBodyBytes, maxRequestImageBytes } from './types.ts';
|
|
75
|
+
export { DEFAULT_MAX_MESSAGE_BODY_BYTES, DEFAULT_MAX_REQUEST_IMAGE_BYTES, MAX_REQUEST_VIDEO_BYTES, estimatedInputTokens, maxMessageBodyBytes, maxRequestImageBytes, offloadOldestRequestImages, resolveRequestImages, };
|
|
76
|
+
export type { AttachmentImageReader, ResolvedRequestImages };
|
|
77
|
+
/** Anthropic content blocks are plain JSON objects on the wire. */
|
|
78
|
+
type AnthropicBlock = Record<string, unknown>;
|
|
79
|
+
/** Provenance scope for safe thinking replay. */
|
|
80
|
+
export interface MinimaxReplayScope {
|
|
81
|
+
route: string;
|
|
82
|
+
model: string;
|
|
83
|
+
authOwner: string;
|
|
84
|
+
provider?: string;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* The rule a tool-enabled session must follow before it calls a tool.
|
|
88
|
+
*
|
|
89
|
+
* The official agent states it in the system prompt of every session that has
|
|
90
|
+
* tools: a non-trivial tool step starts with a user-visible assistant text
|
|
91
|
+
* block. Thinking does not count - a model that reasons and then calls the tool
|
|
92
|
+
* without saying anything has produced a step the user cannot see, and the
|
|
93
|
+
* official agent asks for that preamble explicitly.
|
|
94
|
+
*
|
|
95
|
+
* It is appended to the assembled system text rather than replacing it: the
|
|
96
|
+
* caller's own prompt keeps its place at the head (which is the cached prefix),
|
|
97
|
+
* and this rule lands after it.
|
|
98
|
+
*/
|
|
99
|
+
export declare const TOOL_CALL_PREAMBLE_REMINDER = "For any non-trivial tool-call step, you MUST first send a non-empty, user-visible assistant text block. Thinking or reasoning content does not count as the preamble.";
|
|
100
|
+
/**
|
|
101
|
+
* The `thinking` object one request carries, and the only thing that decides
|
|
102
|
+
* WHICH CHANNEL the reasoning comes back in.
|
|
103
|
+
*
|
|
104
|
+
* The official "Model Invocation" page says thinking is on by default and needs
|
|
105
|
+
* no configuration, and that the depth field is a top-level
|
|
106
|
+
* `output_config.effort`. Both are true - and they were read as "the request
|
|
107
|
+
* never carries a `thinking` key". Measured on this subscription endpoint on
|
|
108
|
+
* 2026-10-20 (`scripts/probe-minimax-thinking-channels.probe.ts`):
|
|
109
|
+
*
|
|
110
|
+
* | request | response block | where the reasoning lands |
|
|
111
|
+
* | --- | --- | --- |
|
|
112
|
+
* | no `thinking` field | `content_block.type = "text"` | **in the answer text** |
|
|
113
|
+
* | `thinking: { type: 'adaptive' }` | `content_block.type = "thinking"` | **in a thinking block** |
|
|
114
|
+
*
|
|
115
|
+
* The same model, the same prompt, the same reasoning - but without the object
|
|
116
|
+
* the service streams it as ordinary assistant text, so the model visibly
|
|
117
|
+
* thinks out loud inside the answer. That also means the harness never sees a
|
|
118
|
+
* reasoning block, and the interleaved-thinking replay has nothing to replay.
|
|
119
|
+
*
|
|
120
|
+
* M3.1 needs no object: measured, a forced-on model answers in the thinking
|
|
121
|
+
* channel either way, which is why the upstream managed path deletes the
|
|
122
|
+
* `thinking` key for forced-on models and keeps it for switchable ones.
|
|
123
|
+
*
|
|
124
|
+
* The off state is the same object with `disabled`, which is what the upstream
|
|
125
|
+
* managed path sends and what this endpoint measured as thinking off (10 output
|
|
126
|
+
* tokens, no thinking block).
|
|
127
|
+
*
|
|
128
|
+
* @returns the value for `thinking`, or undefined when the request should
|
|
129
|
+
* carry no thinking object at all.
|
|
130
|
+
*/
|
|
131
|
+
export declare function thinkingFieldFor(modelId: string, requestedEffort: string | undefined | null): {
|
|
132
|
+
type: 'adaptive' | 'disabled';
|
|
133
|
+
} | undefined;
|
|
134
|
+
/**
|
|
135
|
+
* The depth level one request carries, as `output_config`.
|
|
136
|
+
*
|
|
137
|
+
* The level belongs at the TOP level - `output_config.effort` - and accepts
|
|
138
|
+
* low, medium, high, xhigh and max. There is no `default` member: the page
|
|
139
|
+
* says omitting the field means max, so the old local `default` spelling never
|
|
140
|
+
* reached the wire. This line no longer leans on that either: every model that
|
|
141
|
+
* has levels states its default as NULL, so a request that asks for nothing
|
|
142
|
+
* resolves to no `output_config` at all - which is what the official agent
|
|
143
|
+
* sends when the conversation picked no level.
|
|
144
|
+
*
|
|
145
|
+
* The level is the DEPTH, not the channel: measured, low and max differ by
|
|
146
|
+
* about 3x thinking and 4x latency, and it composes with the `thinking` object.
|
|
147
|
+
*
|
|
148
|
+
* @returns the value for `output_config`, or undefined when the request should
|
|
149
|
+
* carry no thinking control at all - which is the case for an unset, empty or
|
|
150
|
+
* unknown level.
|
|
151
|
+
*/
|
|
152
|
+
export declare function outputConfigFor(modelId: string, requestedEffort: string | undefined | null): Record<string, unknown> | undefined;
|
|
153
|
+
/**
|
|
154
|
+
* Smallest output cap this line will send for a model whose thinking cannot be
|
|
155
|
+
* turned off.
|
|
156
|
+
*
|
|
157
|
+
* Such a model spends its cap on reasoning before it emits any text, so a caller
|
|
158
|
+
* that wants only a few words can be capped below the reasoning floor and get an
|
|
159
|
+
* empty answer. Measured on the M3.1 forced-thinking path with a session-title
|
|
160
|
+
* prompt: \`max_tokens: 64\` returns \`stop_reason: "max_tokens"\` with one thinking
|
|
161
|
+
* block and no text; \`max_tokens: 512\` returns \`stop_reason: "end_turn"\` with the
|
|
162
|
+
* title after ~53 output tokens.
|
|
163
|
+
*
|
|
164
|
+
* The floor only ever RAISES a cap smaller than this line's forced thinking needs,
|
|
165
|
+
* so a caller that states a larger cap keeps it - the catalog's "preserving
|
|
166
|
+
* explicit caller maxTokens" contract stays intact. It never raises past what
|
|
167
|
+
* the catalog says the model can emit either: a floor the wire would reject is
|
|
168
|
+
* not a floor.
|
|
169
|
+
*/
|
|
170
|
+
export declare const MINIMAX_FORCED_THINKING_FLOOR_TOKENS = 512;
|
|
171
|
+
/**
|
|
172
|
+
* Raise a cap that is too small for this line's forced thinking.
|
|
173
|
+
*
|
|
174
|
+
* Left alone: a model that can disable thinking (its caller may have asked for
|
|
175
|
+
* thinking off on purpose, and raising the cap would not enable it but a caller
|
|
176
|
+
* reading the number back would be misled), and an absent cap (the caller stated
|
|
177
|
+
* none, so \`maxOutputTokensFor\` owns the ceiling).
|
|
178
|
+
*
|
|
179
|
+
* @param modelId - the routed model id.
|
|
180
|
+
* @param requested - the caller's cap, undefined when it stated none.
|
|
181
|
+
* @returns the cap to request, raised only when that is the difference between an
|
|
182
|
+
* empty truncated answer and a usable one.
|
|
183
|
+
*/
|
|
184
|
+
export declare function floorForcedThinkingTokens(modelId: string, requested: number | undefined): number | undefined;
|
|
185
|
+
/** Output cap one request asks for, tracked against the model's declared ceiling. */
|
|
186
|
+
export declare function maxOutputTokensFor(modelId: string, contextWindow?: number): number;
|
|
187
|
+
/** Reduce a requested cap so prompt plus output still fit the window. */
|
|
188
|
+
export declare function clampOutputToContext(requested: number, contextWindow: number, estimatedInputTokens?: number): number;
|
|
189
|
+
/**
|
|
190
|
+
* Breakpoint budget the wire enforces.
|
|
191
|
+
*
|
|
192
|
+
* MiniMax's explicit-caching page caps a request at four `cache_control`
|
|
193
|
+
* markers, the same number Anthropic allows (claude/mapper.ts). This module
|
|
194
|
+
* marks at most three (see the module doc), so the budget is never the binding
|
|
195
|
+
* constraint - the constant exists so a test can assert that against the REAL
|
|
196
|
+
* number rather than a magic three.
|
|
197
|
+
*/
|
|
198
|
+
export declare const MAX_CACHE_BREAKPOINTS = 4;
|
|
199
|
+
/**
|
|
200
|
+
* How many cache_control markers one built body carries.
|
|
201
|
+
*
|
|
202
|
+
* Walks the finished body rather than counting calls to the marker: the number
|
|
203
|
+
* the wire enforces is the number of markers IN THE BYTES, so a test that
|
|
204
|
+
* counts its own marking calls could pass while the body carried a fourth
|
|
205
|
+
* breakpoint from somewhere else. Used by the tests only.
|
|
206
|
+
*/
|
|
207
|
+
export declare function countMinimaxCacheBreakpoints(body: unknown): number;
|
|
208
|
+
/** Options for one built request that are not part of the conversation itself. */
|
|
209
|
+
export interface MinimaxRequestOptions {
|
|
210
|
+
/**
|
|
211
|
+
* Emit prompt-cache breakpoints. Default TRUE: caching is what a caller that
|
|
212
|
+
* states nothing gets (see the module doc). Pass false only to opt out.
|
|
213
|
+
*
|
|
214
|
+
* When on, breakpoints go on the last system block, the last block of the
|
|
215
|
+
* last user message, and the last tool - at most
|
|
216
|
+
* {@link MAX_CACHE_BREAKPOINTS} in total, and `system` goes out as a block
|
|
217
|
+
* array because a plain string cannot carry a marker.
|
|
218
|
+
*/
|
|
219
|
+
cacheControl?: boolean;
|
|
220
|
+
/** Videos read for this request; absent means none were resolved. */
|
|
221
|
+
videos?: ResolvedRequestVideos;
|
|
222
|
+
/**
|
|
223
|
+
* Whether the selected model declares video input.
|
|
224
|
+
*
|
|
225
|
+
* Only M3 and M3.1 do. When false a clip degrades to a text placeholder
|
|
226
|
+
* rather than being dropped, so the model asks for a description instead of
|
|
227
|
+
* answering as though the message were empty.
|
|
228
|
+
*/
|
|
229
|
+
videoAccepted?: boolean;
|
|
230
|
+
/** Nonsecret hash of the adapter-selected auth owner, required to scope replay. */
|
|
231
|
+
authOwner?: string;
|
|
232
|
+
/** Route identity for replay scoping; defaults to PROVIDER_ID. */
|
|
233
|
+
route?: string;
|
|
234
|
+
}
|
|
235
|
+
/** Build one Anthropic Messages body for this subscription. */
|
|
236
|
+
export declare function buildMinimaxRequest(options: GenerateOptions, images?: ResolvedRequestImages, request?: MinimaxRequestOptions): Record<string, unknown>;
|
|
237
|
+
/**
|
|
238
|
+
* Reject a request past this route's byte ceiling, before spending the connection.
|
|
239
|
+
*
|
|
240
|
+
* The ceiling is this route's own (`maxMessageBodyBytes`), NOT Kimi Code's 2 MB
|
|
241
|
+
* figure: that number belongs to Kimi's gateway, was imported here on the
|
|
242
|
+
* "same family of endpoints" assumption, and refused locally conversations
|
|
243
|
+
* MiniMax would have served. See `types.ts` for the full derivation. The
|
|
244
|
+
* consequence that matters: this guard must never be the reason an ordinary
|
|
245
|
+
* turn fails, so it sits far above any real conversation and fires only on a
|
|
246
|
+
* runaway one.
|
|
247
|
+
*
|
|
248
|
+
* @returns the serialized body, so the caller about to send it does not serialize
|
|
249
|
+
* a multi-megabyte string a second time.
|
|
250
|
+
*/
|
|
251
|
+
export declare function assertRequestBodyFits(body: Record<string, unknown>, limit?: number): string;
|
|
252
|
+
/** One tool call accumulating across content-block deltas. */
|
|
253
|
+
interface PendingToolCall {
|
|
254
|
+
blockIndex: number;
|
|
255
|
+
id: string;
|
|
256
|
+
name: string;
|
|
257
|
+
arguments: string;
|
|
258
|
+
}
|
|
259
|
+
/** Stream accumulator for one Messages response. */
|
|
260
|
+
/** Native blocks the service issued for this turn, kept for exact replay. */
|
|
261
|
+
export interface MinimaxStreamState {
|
|
262
|
+
provenance?: MinimaxReplayScope;
|
|
263
|
+
/** Native blocks by DSH block index (null if text/tool-call that has no native thinking). */
|
|
264
|
+
replayBlocks: (AnthropicBlock | null)[];
|
|
265
|
+
/** Wire content index -> pending thinking block info. */
|
|
266
|
+
pendingThinking: Map<number, {
|
|
267
|
+
dshIndex: number;
|
|
268
|
+
kind: 'thinking' | 'redacted_thinking';
|
|
269
|
+
text: string;
|
|
270
|
+
signature: string;
|
|
271
|
+
data?: string;
|
|
272
|
+
}>;
|
|
273
|
+
blocks: OutboundContentBlock[];
|
|
274
|
+
current: {
|
|
275
|
+
index: number;
|
|
276
|
+
type: 'text' | 'reasoning';
|
|
277
|
+
text: string;
|
|
278
|
+
} | null;
|
|
279
|
+
/** wire content-block index -> accumulating call. */
|
|
280
|
+
toolCalls: Map<number, PendingToolCall>;
|
|
281
|
+
/** wire content-block index -> our block index. */
|
|
282
|
+
contentIndexes: Map<number, number>;
|
|
283
|
+
hasContent: boolean;
|
|
284
|
+
hasToolCall: boolean;
|
|
285
|
+
finishReason: string | null;
|
|
286
|
+
/**
|
|
287
|
+
* The wire `error` object of an in-band `error` event, recorded just before
|
|
288
|
+
* the mapper throws on it. The mapper cannot tell whether anything has reached
|
|
289
|
+
* the caller yet; the adapter can, and reclassifies a transient one from this
|
|
290
|
+
* while nothing has.
|
|
291
|
+
*/
|
|
292
|
+
streamError?: Record<string, unknown>;
|
|
293
|
+
/**
|
|
294
|
+
* The model id the service says it ANSWERED with, from
|
|
295
|
+
* `message_start.message.model`.
|
|
296
|
+
*
|
|
297
|
+
* Optional and one-way: a stream whose header omits the field simply leaves it
|
|
298
|
+
* undefined, and nothing here decides anything from it — the adapter compares it
|
|
299
|
+
* with the id the request carried. It is recorded rather than judged because the
|
|
300
|
+
* mapper cannot know what was asked for; see the adapter's check for why the
|
|
301
|
+
* comparison is the whole point of this route (this endpoint does not refuse an
|
|
302
|
+
* id it cannot route, it substitutes one).
|
|
303
|
+
*/
|
|
304
|
+
answeredModel?: string;
|
|
305
|
+
done: boolean;
|
|
306
|
+
finished: boolean;
|
|
307
|
+
inputTokens: number;
|
|
308
|
+
outputTokens: number;
|
|
309
|
+
cacheReadTokens: number;
|
|
310
|
+
cacheWriteTokens: number;
|
|
311
|
+
sawUsage: boolean;
|
|
312
|
+
/**
|
|
313
|
+
* The request's tool schemas by tool name, used to repair a streamed tool
|
|
314
|
+
* call's arguments against the schema the model was given.
|
|
315
|
+
*/
|
|
316
|
+
toolSchemas?: ReadonlyMap<string, unknown>;
|
|
317
|
+
}
|
|
318
|
+
export interface MinimaxStreamStateOptions {
|
|
319
|
+
model?: string;
|
|
320
|
+
authOwner?: string;
|
|
321
|
+
route?: string;
|
|
322
|
+
provider?: string;
|
|
323
|
+
/**
|
|
324
|
+
* The request's tools, so a streamed tool call can be repaired against the
|
|
325
|
+
* schema the model was given.
|
|
326
|
+
*/
|
|
327
|
+
tools?: ReadonlyArray<{
|
|
328
|
+
name: string;
|
|
329
|
+
parameters?: unknown;
|
|
330
|
+
}>;
|
|
331
|
+
}
|
|
332
|
+
export declare function createStreamState(options?: MinimaxStreamStateOptions): MinimaxStreamState;
|
|
333
|
+
/**
|
|
334
|
+
* The phrase this line stamps on the failure it reports for a turn that ended
|
|
335
|
+
* without an answer or a tool call.
|
|
336
|
+
*
|
|
337
|
+
* Exported so a host-side hook can recognise that failure by construction,
|
|
338
|
+
* instead of copying the sentence. Only the phrase is matched, never the whole
|
|
339
|
+
* message: the rest of it carries diagnostics that may change.
|
|
340
|
+
*/
|
|
341
|
+
export declare const NO_ANSWER_PHRASE = "ended the turn without an answer or a tool call";
|
|
342
|
+
/** Flush every open block, then emit usage and the terminal finish. */
|
|
343
|
+
export declare function closeMinimaxStream(state: MinimaxStreamState): StreamChunk[];
|
|
344
|
+
/** Raise when a stream ended without the terminal event the protocol promises. */
|
|
345
|
+
export declare function assertStreamComplete(state: MinimaxStreamState): void;
|
|
346
|
+
/** Feed one SSE line from the Messages endpoint. */
|
|
347
|
+
export declare function processMinimaxStreamLine(line: string, state: MinimaxStreamState): StreamChunk[];
|
|
348
|
+
/** Whether one chunk stream carried any assistant content at all. */
|
|
349
|
+
export declare function streamHasContent(state: MinimaxStreamState): boolean;
|
|
350
|
+
export { ANTHROPIC_VERSION, type ContentBlock };
|
|
351
|
+
//# sourceMappingURL=mapper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mapper.d.ts","sourceRoot":"","sources":["../../../../src/host/minimax-code/mapper.ts"],"names":[],"mappings":"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"}
|