@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,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Request-side machinery for video input, shared by every line that accepts it.
|
|
3
|
+
*
|
|
4
|
+
* Everything here walks ContentBlocks and base64-encodes bytes; none of it knows
|
|
5
|
+
* which provider it is serving. A line contributes the two things that DO differ:
|
|
6
|
+
* the wording for a video it cannot send, and the byte budget its endpoint
|
|
7
|
+
* tolerates.
|
|
8
|
+
*
|
|
9
|
+
* @module dsh-multi-provider/video-request
|
|
10
|
+
*/
|
|
11
|
+
import type { GenerateOptions } from './llm-compat.ts';
|
|
12
|
+
import { type VideoAttachmentRef, type VideoOmissionText } from './video.ts';
|
|
13
|
+
/**
|
|
14
|
+
* One durable video resolved for an in-flight request, or proven unreadable.
|
|
15
|
+
*
|
|
16
|
+
* The shape mirrors the image counterpart so the two media kinds travel the
|
|
17
|
+
* same path and differ only in the wire part each produces.
|
|
18
|
+
*/
|
|
19
|
+
export type ResolvedRequestVideo = {
|
|
20
|
+
readonly kind: 'inline';
|
|
21
|
+
readonly mediaType: string;
|
|
22
|
+
readonly data: string;
|
|
23
|
+
} | {
|
|
24
|
+
readonly kind: 'unavailable';
|
|
25
|
+
};
|
|
26
|
+
/** Resolved videos keyed by attachment id; consumed by one request build. */
|
|
27
|
+
export type ResolvedRequestVideos = ReadonlyMap<string, ResolvedRequestVideo>;
|
|
28
|
+
/**
|
|
29
|
+
* Attachment seam for video bytes.
|
|
30
|
+
*
|
|
31
|
+
* DSH's own attachment service stores images only, so a video reference can
|
|
32
|
+
* only exist if some producer in this deployment created it. Rather than
|
|
33
|
+
* pretend otherwise, the reader is an injected seam: absent means every video
|
|
34
|
+
* resolves to `unavailable` and the model is told the clip is missing, which is
|
|
35
|
+
* strictly better than silently sending a request with no video at all.
|
|
36
|
+
*/
|
|
37
|
+
export type AttachmentVideoReader = {
|
|
38
|
+
readVideo(ref: VideoAttachmentRef, signal?: AbortSignal): Promise<{
|
|
39
|
+
data: Uint8Array;
|
|
40
|
+
mediaType: string;
|
|
41
|
+
}>;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Read every durable `{ type: 'video', attachment }` block one request carries.
|
|
45
|
+
*
|
|
46
|
+
* An unreadable clip resolves to `unavailable` rather than disappearing, so the
|
|
47
|
+
* model is told the video is missing instead of answering about a blank.
|
|
48
|
+
*/
|
|
49
|
+
export declare function resolveRequestVideos(options: GenerateOptions, attachments: AttachmentVideoReader | undefined, signal?: AbortSignal): Promise<ResolvedRequestVideos>;
|
|
50
|
+
/** True when the request carries any video occurrence at all. */
|
|
51
|
+
export declare function requestHasVideo(options: GenerateOptions): boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Drop the oldest videos once one request would exceed `maxBytes` of base64
|
|
54
|
+
* video data, replacing each with a text placeholder.
|
|
55
|
+
*
|
|
56
|
+
* Durable history is untouched; only the request about to be sent changes.
|
|
57
|
+
* Images are left alone — they have their own, much smaller budget and their own
|
|
58
|
+
* offload pass.
|
|
59
|
+
*
|
|
60
|
+
* @param maxBytes - the endpoint's base64 video budget.
|
|
61
|
+
*/
|
|
62
|
+
export declare function offloadOldestRequestVideos(options: GenerateOptions, maxBytes: number): GenerateOptions;
|
|
63
|
+
/** One video block resolved for the wire, or the reason it cannot be sent. */
|
|
64
|
+
export type ResolvedVideoBlock = {
|
|
65
|
+
readonly inline: {
|
|
66
|
+
readonly mediaType: string;
|
|
67
|
+
readonly data: string;
|
|
68
|
+
};
|
|
69
|
+
} | {
|
|
70
|
+
readonly omission: string;
|
|
71
|
+
};
|
|
72
|
+
/**
|
|
73
|
+
* Resolve one video block for the wire, or explain why it cannot be sent.
|
|
74
|
+
*
|
|
75
|
+
* @param block - the durable video occurrence.
|
|
76
|
+
* @param videos - videos read for this request.
|
|
77
|
+
* @param videoAccepted - whether the selected model declares video input.
|
|
78
|
+
* @param omit - the line's wording for a video it cannot send.
|
|
79
|
+
*/
|
|
80
|
+
export declare function videoBlockToInline(block: Record<string, unknown>, videos: ResolvedRequestVideos, videoAccepted: boolean, omit: VideoOmissionText): ResolvedVideoBlock;
|
|
81
|
+
//# sourceMappingURL=video-request.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"video-request.d.ts","sourceRoot":"","sources":["../../../../src/host/common/video-request.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAgB,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACpE,OAAO,EAIL,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACvB,MAAM,YAAY,CAAA;AAyCnB;;;;;GAKG;AACH,MAAM,MAAM,oBAAoB,GAC5B;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAC9E;IAAE,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAA;CAAE,CAAA;AAEpC,6EAA6E;AAC7E,MAAM,MAAM,qBAAqB,GAAG,WAAW,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAA;AAI7E;;;;;;;;GAQG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC,SAAS,CAAC,GAAG,EAAE,kBAAkB,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC;QAAE,IAAI,EAAE,UAAU,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAC3G,CAAA;AAED;;;;;GAKG;AACH,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,eAAe,EACxB,WAAW,EAAE,qBAAqB,GAAG,SAAS,EAC9C,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,qBAAqB,CAAC,CA0BhC;AASD,iEAAiE;AACjE,wBAAgB,eAAe,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAGjE;AAWD;;;;;;;;;GASG;AACH,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,eAAe,EACxB,QAAQ,EAAE,MAAM,GACf,eAAe,CA4BjB;AAED,8EAA8E;AAC9E,MAAM,MAAM,kBAAkB,GAC1B;IAAE,QAAQ,CAAC,MAAM,EAAE;QAAE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,GAC1E;IAAE,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAA;AAEjC;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9B,MAAM,EAAE,qBAAqB,EAC7B,aAAa,EAAE,OAAO,EACtB,IAAI,EAAE,iBAAiB,GACtB,kBAAkB,CAwBpB"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Video input, shared by every line in this plugin that accepts it.
|
|
3
|
+
*
|
|
4
|
+
* DSH ships ModelModalityMap = { text, image } and a ContentBlockMap with no
|
|
5
|
+
* video entry, but both are merge-extensible interfaces. This module performs
|
|
6
|
+
* that widening ONCE, in the plugin's own compilation unit, so the video
|
|
7
|
+
* capability travels through DSH's real pipeline - the one that gates prompt
|
|
8
|
+
* admission, the model picker and subagent delegation - rather than living in
|
|
9
|
+
* a tooltip. Two providers now declare video (Kimi Code and MiniMax Code), and
|
|
10
|
+
* a second augmentation of the same key would be a conflicting redeclaration,
|
|
11
|
+
* so the vocabulary has to be shared rather than copied per line.
|
|
12
|
+
*
|
|
13
|
+
* Nothing here is provider-specific. A line supplies the wording for a video it
|
|
14
|
+
* cannot send (see {@link VideoOmissionText}) and the media types its endpoint
|
|
15
|
+
* accepts, and inherits the traversal, byte budgeting and base64 encoding.
|
|
16
|
+
*
|
|
17
|
+
* @module dsh-multi-provider/video
|
|
18
|
+
*/
|
|
19
|
+
/**
|
|
20
|
+
* Container formats the coding endpoints accept as video input.
|
|
21
|
+
*
|
|
22
|
+
* The services validate the media type, so an unlisted container is reported
|
|
23
|
+
* before it is base64-expanded into a request that would be rejected.
|
|
24
|
+
*/
|
|
25
|
+
export declare const VIDEO_MEDIA_TYPES: readonly string[];
|
|
26
|
+
/** Runtime membership test for one video container. */
|
|
27
|
+
export declare function isVideoMediaType(mediaType: string): boolean;
|
|
28
|
+
/**
|
|
29
|
+
* One durable video reference carried by a request.
|
|
30
|
+
*
|
|
31
|
+
* attachmentId is a plain string rather than DSH's branded AttachmentId: no
|
|
32
|
+
* DSH service issues this identifier, so branding it would imply an origin that
|
|
33
|
+
* does not exist. The field name matches ImageAttachmentRef so one traversal
|
|
34
|
+
* helper can walk both block kinds.
|
|
35
|
+
*/
|
|
36
|
+
export interface VideoAttachmentRef {
|
|
37
|
+
attachmentId: string;
|
|
38
|
+
/** Verified media type, for example video/mp4. */
|
|
39
|
+
mediaType: string;
|
|
40
|
+
/** Exact encoded byte length. */
|
|
41
|
+
bytes: number;
|
|
42
|
+
/** Intrinsic duration in milliseconds, when the producer knows it. */
|
|
43
|
+
durationMs?: number;
|
|
44
|
+
/** Optional display name, stripped of any local path. */
|
|
45
|
+
name?: string;
|
|
46
|
+
}
|
|
47
|
+
/** One video occurrence in message content. */
|
|
48
|
+
export interface VideoBlock {
|
|
49
|
+
type: 'video';
|
|
50
|
+
attachment: VideoAttachmentRef;
|
|
51
|
+
}
|
|
52
|
+
declare module '@deepseek-ai/dsh-llm' {
|
|
53
|
+
interface ModelModalityMap {
|
|
54
|
+
/** Widened by this plugin for the providers that accept video. */
|
|
55
|
+
video: 'video';
|
|
56
|
+
}
|
|
57
|
+
interface ContentBlockMap {
|
|
58
|
+
/** Widened by this plugin; only this package's request mappers read it. */
|
|
59
|
+
video: VideoBlock;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
/** Base64 length of raw bytes, including padding. */
|
|
63
|
+
export declare function base64LengthOf(bytes: number): number;
|
|
64
|
+
/** Canonical data URL an inline video part carries. */
|
|
65
|
+
export declare function videoDataUrl(mediaType: string, base64: string): string;
|
|
66
|
+
/**
|
|
67
|
+
* Human-readable byte size for a refusal message.
|
|
68
|
+
* @param bytes - exact encoded byte length.
|
|
69
|
+
*/
|
|
70
|
+
export declare function formatMediaBytes(bytes: number): string;
|
|
71
|
+
/** Why one video occurrence was replaced by text instead of being sent. */
|
|
72
|
+
export type VideoOmissionReason = 'unsupported-model' | 'unreadable' | 'unsupported-container'
|
|
73
|
+
/** The selected protocol has no documented video part, so none is sent. */
|
|
74
|
+
| 'unsupported-wire';
|
|
75
|
+
/**
|
|
76
|
+
* A line's own wording for a video it cannot send.
|
|
77
|
+
*
|
|
78
|
+
* A function rather than a fixed string because the actionable half differs per
|
|
79
|
+
* provider: the models that DO take video, and whether the selected wire has a
|
|
80
|
+
* video part at all, are different answers on different routes.
|
|
81
|
+
*/
|
|
82
|
+
export type VideoOmissionText = (reason: VideoOmissionReason, label?: string) => string;
|
|
83
|
+
/** Attachment id or display name for one block, whichever is present. */
|
|
84
|
+
export declare function videoBlockLabel(block: {
|
|
85
|
+
attachment?: {
|
|
86
|
+
name?: string;
|
|
87
|
+
attachmentId?: string;
|
|
88
|
+
};
|
|
89
|
+
}): string | undefined;
|
|
90
|
+
//# sourceMappingURL=video.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"video.d.ts","sourceRoot":"","sources":["../../../../src/host/common/video.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,EAAE,SAAS,MAAM,EAU9C,CAAA;AAED,uDAAuD;AACvD,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAE3D;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,kBAAkB;IACjC,YAAY,EAAE,MAAM,CAAA;IACpB,kDAAkD;IAClD,SAAS,EAAE,MAAM,CAAA;IACjB,iCAAiC;IACjC,KAAK,EAAE,MAAM,CAAA;IACb,sEAAsE;IACtE,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,yDAAyD;IACzD,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED,+CAA+C;AAC/C,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,OAAO,CAAA;IACb,UAAU,EAAE,kBAAkB,CAAA;CAC/B;AAED,OAAO,QAAQ,sBAAsB,CAAC;IACpC,UAAU,gBAAgB;QACxB,kEAAkE;QAClE,KAAK,EAAE,OAAO,CAAA;KACf;IAED,UAAU,eAAe;QACvB,2EAA2E;QAC3E,KAAK,EAAE,UAAU,CAAA;KAClB;CACF;AAED,qDAAqD;AACrD,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEpD;AAED,uDAAuD;AACvD,wBAAgB,YAAY,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAEtE;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAItD;AAED,2EAA2E;AAC3E,MAAM,MAAM,mBAAmB,GAC3B,mBAAmB,GACnB,YAAY,GACZ,uBAAuB;AACzB,2EAA2E;GACzE,kBAAkB,CAAA;AAEtB;;;;;;GAMG;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,MAAM,EAAE,mBAAmB,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,MAAM,CAAA;AAEvF,yEAAyE;AACzE,wBAAgB,eAAe,CAAC,KAAK,EAAE;IAAE,UAAU,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,YAAY,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,GAAG,MAAM,GAAG,SAAS,CAIpH"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webserver-compat.d.ts","sourceRoot":"","sources":["../../../../src/host/common/webserver-compat.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,CAAA;IACjC,SAAS,CAAC,IAAI,MAAM,CAAA;CACrB;AAED,wBAAgB,eAAe,CAAC,MAAM,EAAE,qBAAqB,GAAG,MAAM,CAOrE"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import type { CredentialStore } from './token-store.ts';
|
|
2
|
+
/** The verdict of {@link SecretServiceCredentialStore.ping}: usable, or why not. */
|
|
3
|
+
export interface SecretServiceAvailability {
|
|
4
|
+
available: boolean;
|
|
5
|
+
/** Why the keyring cannot be used, present exactly when `available` is false. */
|
|
6
|
+
reason?: string;
|
|
7
|
+
}
|
|
8
|
+
/** Secrets travel over stdin/stdout; command arguments contain only lookup attributes. */
|
|
9
|
+
export declare class SecretServiceCredentialStore<T> implements CredentialStore<T> {
|
|
10
|
+
private readonly service;
|
|
11
|
+
private readonly account;
|
|
12
|
+
private readonly parse;
|
|
13
|
+
private readonly cache;
|
|
14
|
+
constructor(service: string, account: string, parse: (value: unknown) => T);
|
|
15
|
+
/**
|
|
16
|
+
* Label the desktop keyring manager shows for this entry.
|
|
17
|
+
*
|
|
18
|
+
* Derived from the entry's own `service` attribute rather than a shared
|
|
19
|
+
* hardcoded product name, so every pool remains distinguishable in the desktop
|
|
20
|
+
* keyring manager. The label is display-only, so existing entries keep working.
|
|
21
|
+
*/
|
|
22
|
+
private get label();
|
|
23
|
+
private attributes;
|
|
24
|
+
/**
|
|
25
|
+
* Lookup attributes of one shard entry. Secret Service matching is exact on
|
|
26
|
+
* every given attribute pair, so the primary account value never matches a
|
|
27
|
+
* shard and vice versa.
|
|
28
|
+
*/
|
|
29
|
+
private shardAttributes;
|
|
30
|
+
/**
|
|
31
|
+
* Whether this host has a usable Secret Service at all.
|
|
32
|
+
*
|
|
33
|
+
* One lookup is the whole question, and its ANSWER is not the point: an entry
|
|
34
|
+
* that is not there exits 1 with empty stderr, which still proves the daemon
|
|
35
|
+
* answered. A host with no `secret-tool`, no session bus, no
|
|
36
|
+
* `org.freedesktop.secrets` or a locked keyring fails instead — by refusing the
|
|
37
|
+
* spawn, or by exiting non-zero with a message. Never throws, because it is
|
|
38
|
+
* asked by a fallback chain whose next step is the answer to "no".
|
|
39
|
+
*/
|
|
40
|
+
ping(): Promise<SecretServiceAvailability>;
|
|
41
|
+
load(): Promise<T | null>;
|
|
42
|
+
save(value: T): Promise<void>;
|
|
43
|
+
/**
|
|
44
|
+
* Store an oversized payload as shard entries plus an envelope. The shards
|
|
45
|
+
* are written under a fresh generation tag first and the primary entry last:
|
|
46
|
+
* that entry is the commit point, so an interrupted save leaves the previous
|
|
47
|
+
* envelope and its shards fully intact and the new generation is either
|
|
48
|
+
* committed whole or cleaned up.
|
|
49
|
+
*/
|
|
50
|
+
private saveChunked;
|
|
51
|
+
/**
|
|
52
|
+
* Envelope of the currently stored value, or null when the entry is missing,
|
|
53
|
+
* holds a plain value, or cannot be read at all. A save that goes on to fail
|
|
54
|
+
* surfaces its own error, so a probe failure must not fail the save first.
|
|
55
|
+
*/
|
|
56
|
+
private storedEnvelope;
|
|
57
|
+
/**
|
|
58
|
+
* Remove shard entries, tolerating the ones that are already gone. A missing
|
|
59
|
+
* entry exits 1 with empty stderr — the same shape a segfaulting secret-tool
|
|
60
|
+
* takes through the close event (Ubuntu libsecret-tools 0.20.4 crashes on
|
|
61
|
+
* clearing an entry that does not exist) — so that answer is never an error.
|
|
62
|
+
*/
|
|
63
|
+
private clearShards;
|
|
64
|
+
clear(): Promise<void>;
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=credential-store-secret-service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credential-store-secret-service.d.ts","sourceRoot":"","sources":["../../../src/host/credential-store-secret-service.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAKvD,oFAAoF;AACpF,MAAM,WAAW,yBAAyB;IACxC,SAAS,EAAE,OAAO,CAAA;IAClB,iFAAiF;IACjF,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAsED,0FAA0F;AAC1F,qBAAa,4BAA4B,CAAC,CAAC,CAAE,YAAW,eAAe,CAAC,CAAC,CAAC;IAMtE,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,KAAK;IAPxB,OAAO,CAAC,QAAQ,CAAC,KAAK,CAErB;gBAGkB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,CAAC;IAG/C;;;;;;OAMG;IACH,OAAO,KAAK,KAAK,GAEhB;IAED,OAAO,CAAC,UAAU;IAIlB;;;;OAIG;IACH,OAAO,CAAC,eAAe;IAIvB;;;;;;;;;OASG;IACG,IAAI,IAAI,OAAO,CAAC,yBAAyB,CAAC;IAU1C,IAAI,IAAI,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC;IAqCzB,IAAI,CAAC,KAAK,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAgBnC;;;;;;OAMG;YACW,WAAW;IA2BzB;;;;OAIG;YACW,cAAc;IAU5B;;;;;OAKG;YACW,WAAW;IAWnB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAmB7B"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Destination policy for this plugin's fetch provider.
|
|
3
|
+
*
|
|
4
|
+
* DSH's built-in provider resolves every destination and validates and pins the
|
|
5
|
+
* address before it connects. That cannot work on a machine whose proxy answers
|
|
6
|
+
* DNS with its own fake-ip range (`198.18.0.0/15` for Clash/Mihomo, the usual
|
|
7
|
+
* companion of a system proxy): the hostname is ordinary, the answer is reserved
|
|
8
|
+
* space, and every request is refused before the proxy that could have resolved
|
|
9
|
+
* it is ever consulted. This provider exists for that machine, so it cannot
|
|
10
|
+
* validate names the way the built-in one does.
|
|
11
|
+
*
|
|
12
|
+
* It keeps the half of the policy that needs no resolution — an address the URL
|
|
13
|
+
* states outright is refused unless it is globally reachable unicast, because a
|
|
14
|
+
* proxy on this machine must not become a path into loopback or a LAN — and it
|
|
15
|
+
* also refuses a name this machine resolves into private space. Only the proxy's
|
|
16
|
+
* own fake-ip answers are accepted, since that is what the proxy's name
|
|
17
|
+
* resolution looks like from here: the IPv4 one, and the IPv6 one only beside it
|
|
18
|
+
* (see assertPublicFetchTarget). The URL hostname still reaches the proxy
|
|
19
|
+
* intact, so the proxy decides where the name really goes.
|
|
20
|
+
*
|
|
21
|
+
* @module dsh-multi-provider/fetch-address-policy
|
|
22
|
+
*/
|
|
23
|
+
/**
|
|
24
|
+
* Resolve one hostname to every address the local resolver returns, or to no
|
|
25
|
+
* addresses when it cannot.
|
|
26
|
+
*
|
|
27
|
+
* A failure is not evidence of a local destination: the configured proxy
|
|
28
|
+
* resolves the origin itself, so a name this machine cannot resolve must not
|
|
29
|
+
* fail a request the proxy could have served.
|
|
30
|
+
*
|
|
31
|
+
* @param hostname - the URL hostname, without brackets.
|
|
32
|
+
* @returns the resolved addresses, or an empty list when resolution failed.
|
|
33
|
+
*/
|
|
34
|
+
export declare function lookupHostAddresses(hostname: string): Promise<readonly string[]>;
|
|
35
|
+
/**
|
|
36
|
+
* Whether a host is stated as an IP address rather than as a name.
|
|
37
|
+
*
|
|
38
|
+
* @param hostname - a URL hostname, bracketed or not.
|
|
39
|
+
* @returns true when the host is an IPv4 or IPv6 literal.
|
|
40
|
+
*/
|
|
41
|
+
export declare function isIpLiteral(hostname: string): boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Whether an address is one only a proxy's fake-ip resolver hands out. The IANA
|
|
44
|
+
* benchmarking range carries no real host, so an answer inside it is this
|
|
45
|
+
* machine's proxy claiming the name, not a private destination.
|
|
46
|
+
*
|
|
47
|
+
* @param address - a textual IPv4 (or IPv4-mapped IPv6) address.
|
|
48
|
+
* @returns true when the address is inside the proxy fake-ip range.
|
|
49
|
+
*/
|
|
50
|
+
export declare function isProxyFakeIpAddress(address: string): boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Whether an address is globally reachable unicast. IPv4-mapped IPv6 is
|
|
53
|
+
* classified by the IPv4 address it embeds; every other IPv6 address is public
|
|
54
|
+
* only inside `2000::/3`, which excludes loopback, unique-local, link-local,
|
|
55
|
+
* multicast, and the transition and translation prefixes whose real destination
|
|
56
|
+
* cannot be seen from the address alone.
|
|
57
|
+
*
|
|
58
|
+
* @param address - a textual IPv4 or IPv6 address, bracketed or not.
|
|
59
|
+
* @returns true only for a public unicast destination.
|
|
60
|
+
*/
|
|
61
|
+
export declare function isPublicIpAddress(address: string): boolean;
|
|
62
|
+
/**
|
|
63
|
+
* Whether a hostname is an IP literal no request may target.
|
|
64
|
+
*
|
|
65
|
+
* @param hostname - a URL hostname, bracketed or not.
|
|
66
|
+
* @returns true when the host is a literal address that is not public.
|
|
67
|
+
*/
|
|
68
|
+
export declare function isNonPublicIpLiteral(hostname: string): boolean;
|
|
69
|
+
/**
|
|
70
|
+
* Refuse a fetch destination the local network policy exists to keep out of
|
|
71
|
+
* reach, before any request is made.
|
|
72
|
+
*
|
|
73
|
+
* @param hostname - the URL hostname, bracketed or not.
|
|
74
|
+
* @param addresses - every address the local resolver returned for the host.
|
|
75
|
+
* @throws WebError `WEB_BLOCKED_URL` for a non-public literal, or for a name
|
|
76
|
+
* this machine resolves into private space that is not the proxy's fake-ip.
|
|
77
|
+
*/
|
|
78
|
+
export declare function assertPublicFetchTarget(hostname: string, addresses: readonly string[]): void;
|
|
79
|
+
//# sourceMappingURL=fetch-address-policy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetch-address-policy.d.ts","sourceRoot":"","sources":["../../../src/host/fetch-address-policy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAkCH;;;;;;;;;;GAUG;AACH,wBAAsB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,MAAM,EAAE,CAAC,CAOtF;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAErD;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAG7D;AAED;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAQ1D;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAG9D;AAED;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI,CAe5F"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { FetchConfigurationDto } from '../shared/contracts.ts';
|
|
2
|
+
export declare const DEFAULT_FETCH_MAX_BODY_CHARS = 100000;
|
|
3
|
+
export declare const DEFAULT_FETCH_MAX_RESPONSE_BYTES: number;
|
|
4
|
+
export declare function positiveFetchLimit(value: number | undefined, fallback: number, name: string): number;
|
|
5
|
+
export declare function resolveFetchConfiguration(config: Partial<FetchConfigurationDto>): FetchConfigurationDto;
|
|
6
|
+
//# sourceMappingURL=fetch-configuration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetch-configuration.d.ts","sourceRoot":"","sources":["../../../src/host/fetch-configuration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAA;AAEnE,eAAO,MAAM,4BAA4B,SAAU,CAAA;AACnD,eAAO,MAAM,gCAAgC,QAAkB,CAAA;AAE/D,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAIpG;AAED,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,OAAO,CAAC,qBAAqB,CAAC,GAAG,qBAAqB,CAUvG"}
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GLM(ZCode 账号)线路的号池。
|
|
3
|
+
*
|
|
4
|
+
* 走共享的 `AccountPoolCore`:存储、序列化、可用性、轮转、429 冷却都��它管,
|
|
5
|
+
* 本文件只回答「GLM 这条线的凭据长什么样、谁能被刷新、配额怎么装配」。
|
|
6
|
+
*
|
|
7
|
+
* 三个与兄弟线路不同的地方,各有理由:
|
|
8
|
+
*
|
|
9
|
+
* 1. **两区可以同时在池里**。区域是凭据的属性(计划 §1、§3.3),一区铸造的 Key 被另一区拒绝,
|
|
10
|
+
* 所以去重键里必须带区域,否则两个部署上同一个邮箱会被合并成一行,
|
|
11
|
+
* 然后那一行的凭据被拿去打另一个区的主机——一次不会被任何本地检查发现的串区。
|
|
12
|
+
* 2. **adopt 来的账号永不可刷新**。它只是本机 ZCode 客户端登录态的一份拷贝,
|
|
13
|
+
* 上游才是权威;计划 §3.6 又没有 refresh 接口。`needsRefresh` 对它恒为 false,
|
|
14
|
+
* `refresh` 直接拒绝,而卡片上它标记为 `removable: false`——删掉它等于删掉用户的
|
|
15
|
+
* ZCode 客户端登录态,那不是本插件的文件。
|
|
16
|
+
* 3. **配额装配调用共享的 `quotaWindow()` / `poolQuota()`**,不另写第三份。
|
|
17
|
+
* 窗口长度取 `types.ts` 的 `QUOTA_WINDOW_MINUTES`(共享的窗口 DTO 里没有窗口 key,
|
|
18
|
+
* 那是线路自己的桥),`label` 传空串(窗口名的规范在客户端字典里),
|
|
19
|
+
* `usedPercent` 为 null 的窗口由 `quotaWindow()` 丢弃(null 不是 0%,是「未说明」)。
|
|
20
|
+
*/
|
|
21
|
+
import { AccountPoolCore, type PoolAccountShape, type PoolData } from '../common/account-pool.ts';
|
|
22
|
+
import type { CredentialStore } from '../token-store.ts';
|
|
23
|
+
import { GlmCodingPlanCredentialStore, type GlmCodingPlanCredentials } from './token-store.ts';
|
|
24
|
+
import type { GlmAdoptedCredential } from './adopt.ts';
|
|
25
|
+
import type { GlmAccountSummaryDto, GlmQuotaSnapshotDto, GlmRegion } from '../../shared/glm-coding-plan-contracts.ts';
|
|
26
|
+
import type { AccountRotationStrategy, PoolAccountQuotaDto } from '../../shared/account-pool-contracts.ts';
|
|
27
|
+
/** 一个池内账号行。凭据整个随行存放;其余是卡片渲染用的非机密事实。 */
|
|
28
|
+
export interface GlmCodingPlanPoolAccount extends PoolAccountShape<GlmCodingPlanCredentials> {
|
|
29
|
+
/** 账号所属部署;由凭据决定,这里是给它做索引用。 */
|
|
30
|
+
region: GlmRegion;
|
|
31
|
+
/** 浏览器登录 / adopt 捡回。 */
|
|
32
|
+
origin: GlmCodingPlanCredentials['origin'];
|
|
33
|
+
/** 兑换链解析出的默认机构 id(非机密,用于诊断两区是否串号)。 */
|
|
34
|
+
organizationId?: string;
|
|
35
|
+
/** 控制台侧的机构名 / 用户邮箱。 */
|
|
36
|
+
accountName?: string;
|
|
37
|
+
email?: string;
|
|
38
|
+
}
|
|
39
|
+
/** 号池切片:共享摘要 + 本线路的区域与来源。 */
|
|
40
|
+
export interface GlmCodingPlanAccountSummary extends GlmAccountSummaryDto {
|
|
41
|
+
/** 这份快照是不是从本机 ZCode 客户端捡回来的(捡回来的永不可刷新,也不可删除)。 */
|
|
42
|
+
adopted?: boolean;
|
|
43
|
+
}
|
|
44
|
+
/** 本线路自己拥有的加密号池文件。与凭据文件分开:池可以有多行,凭据文件只有主账号一份。 */
|
|
45
|
+
export declare function glmCodingPlanPoolPath(): string;
|
|
46
|
+
/**
|
|
47
|
+
* 身份:两个凭据什么时候是同一个上游账号。
|
|
48
|
+
*
|
|
49
|
+
* 组成是「区域 + 机构 + 上游 user_id」,三段都非机密,且都不随重新兑换而变:
|
|
50
|
+
* `codingPlanKey` 每次兑换都可能换一把新的(同名 Key 被轮转时就换),拿它当键会让
|
|
51
|
+
* 同一个账号在每次轮转后看起来都是新账号,于是号池无限增长。
|
|
52
|
+
*
|
|
53
|
+
* user_id 缺失时退回机构 + 邮箱,再退回机构 + apiKeyId(apiKeyId 是 `{id}.{secret}` 的 id 段,
|
|
54
|
+
* 非机密且由本线路自己建的那把 Key 给出)。三段全空才返回 undefined:那时没有稳定的东西可键,
|
|
55
|
+
* 核心会自己生成 `acc_<random>`,把这一行**新增**而不是与某个无关凭据合并。
|
|
56
|
+
*/
|
|
57
|
+
export declare function glmCodingPlanPoolIdentity(credentials: GlmCodingPlanCredentials): string | undefined;
|
|
58
|
+
/**
|
|
59
|
+
* 校验并归一化整份号池文档。
|
|
60
|
+
*
|
|
61
|
+
* 凭据重新过一遍 token-store 的校验器,所以一行不可能装着一份 store 会拒绝写回的形状。
|
|
62
|
+
* `region` / `origin` 必须显式恢复:行上的这两个字段是索引,丢了会让卡片把国区账号画成国际区。
|
|
63
|
+
* 一行凭据读不通就**丢弃这一行**而不是整体报错——`read()` 会吞掉一次加载失败并回落,
|
|
64
|
+
* 抛错等于让一行坏数据带走整个池。
|
|
65
|
+
*/
|
|
66
|
+
export declare function parseGlmCodingPlanPoolData(value: unknown): PoolData<GlmCodingPlanPoolAccount>;
|
|
67
|
+
/**
|
|
68
|
+
* 配额快照 → 号池卡片渲染的形状。
|
|
69
|
+
*
|
|
70
|
+
* 每个窗口**按长度**而不是按一个字符串来标注:窗口名的规范在客户端字典里,host 没有资格
|
|
71
|
+
* 下发展示文案,而知道自己长度的窗口可以让共享卡片直接从长度推出名字。
|
|
72
|
+
* `usedPercent` 为 null 的窗口由 `quotaWindow()` 丢掉——null 不是 0%,是「未说明」,
|
|
73
|
+
* 画成一条进度条等于谎报用量。
|
|
74
|
+
*/
|
|
75
|
+
export declare function glmCodingPlanPoolQuota(snapshot: GlmQuotaSnapshotDto | null | undefined): PoolAccountQuotaDto | undefined;
|
|
76
|
+
/** 本线路的号池。 */
|
|
77
|
+
export interface GlmCodingPlanAccountPoolOptions {
|
|
78
|
+
/** 凭据存储:号池把主账号镜像进去,也在号池为空时用它投影出一个账号。 */
|
|
79
|
+
store?: GlmCodingPlanCredentialStore;
|
|
80
|
+
/** 测试缝;生产按池文件路径构造平台后端。 */
|
|
81
|
+
backend?: CredentialStore<PoolData<GlmCodingPlanPoolAccount>>;
|
|
82
|
+
/** 本池接受的账号数上限。 */
|
|
83
|
+
maxAccounts?: number;
|
|
84
|
+
/** 用户在设置里钉住的账号;钉住的账号冷却时自动让位给轮转(核心自己处理)。 */
|
|
85
|
+
preferAccountId?: () => string | null;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* 对一份 adopt 快照的凭据提出的刷新。
|
|
89
|
+
*
|
|
90
|
+
* 它永远不会成功,而**必须**是一个显式错误而不是一次静默的空操作:调用方(核心的刷新路径)
|
|
91
|
+
* 会把这个错误报给用户,而静默返回旧凭据会让一次注定失败的请求看起来像成功了。
|
|
92
|
+
*/
|
|
93
|
+
export declare class GlmAdoptedCredentialRefreshError extends Error {
|
|
94
|
+
constructor();
|
|
95
|
+
}
|
|
96
|
+
export declare class GlmCodingPlanAccountPool extends AccountPoolCore<GlmCodingPlanCredentials, GlmCodingPlanPoolAccount, GlmCodingPlanAccountSummary> {
|
|
97
|
+
private readonly store;
|
|
98
|
+
constructor(options?: GlmCodingPlanAccountPoolOptions);
|
|
99
|
+
/**
|
|
100
|
+
* 把一份 adopt 快照收进号池。
|
|
101
|
+
*
|
|
102
|
+
* 快照本身已经跑过兑换链并验过活,所以这里只做形状转换;账号仍以
|
|
103
|
+
* {@link glmCodingPlanPoolIdentity} 的身份落进池,重复 adopt 同一次登录只会更新同一行。
|
|
104
|
+
*/
|
|
105
|
+
addAdoptedCredential(adopted: GlmAdoptedCredential, alias?: string): Promise<GlmCodingPlanPoolAccount>;
|
|
106
|
+
/**
|
|
107
|
+
* 移除一个账号(事务内)。
|
|
108
|
+
*
|
|
109
|
+
* adopt 来的账号被拒绝:它对应的是 ZCode 客户端自己的登录态文件,删掉它等于把用户
|
|
110
|
+
* 从那个客户端里登出,而那不是本插件有权做的事。卡片上它是 `removable: false`。
|
|
111
|
+
*/
|
|
112
|
+
protected deleteAccountFromPool(data: PoolData<GlmCodingPlanPoolAccount>, accountId: string): void;
|
|
113
|
+
/**
|
|
114
|
+
* 适配器取下一个账号用的入口。
|
|
115
|
+
*
|
|
116
|
+
* 核心在这里做轮转、冷却、可用性判断与(被拒绝的)刷新;本方法只多给适配器一件事:
|
|
117
|
+
* 一次请求内换过账号时,把试过的账号排除掉。
|
|
118
|
+
*/
|
|
119
|
+
getEffectiveCredential(excludeIds?: ReadonlySet<string>, fetchFn?: typeof fetch): Promise<{
|
|
120
|
+
account: GlmCodingPlanPoolAccount;
|
|
121
|
+
credentials: GlmCodingPlanCredentials;
|
|
122
|
+
}>;
|
|
123
|
+
/**
|
|
124
|
+
* 一次配额读属于哪个账号,连同读它用的凭据。
|
|
125
|
+
*
|
|
126
|
+
* 写在这里而不是路由里,是因为它是线路形状的:路由需要的是凭据**和**这次读所属的账号,
|
|
127
|
+
* 这样快照才能记在它描述的那一行上,不会被一次轮转画到另一行名下。
|
|
128
|
+
* 选谁读是核心自己对「没有指名账号的调用方」的规则,这里照抄那三行,
|
|
129
|
+
* 因为核心只通过 `getFreshCredential` 暴露凭据本身。
|
|
130
|
+
*/
|
|
131
|
+
getQuotaReadTarget(fetchFn?: typeof fetch): Promise<{
|
|
132
|
+
accountId: string;
|
|
133
|
+
credentials: GlmCodingPlanCredentials;
|
|
134
|
+
}>;
|
|
135
|
+
/** 本池镜像主账号进去的那份凭据存储。 */
|
|
136
|
+
mirrorStore(): GlmCodingPlanCredentialStore;
|
|
137
|
+
}
|
|
138
|
+
/** 状态应答里的号池切片。 */
|
|
139
|
+
export interface GlmCodingPlanPoolStatus {
|
|
140
|
+
accounts: GlmCodingPlanAccountSummary[];
|
|
141
|
+
activeAccountId?: string;
|
|
142
|
+
rotationStrategy: AccountRotationStrategy;
|
|
143
|
+
/** 本进程是否装上了号池。 */
|
|
144
|
+
poolInstalled: boolean;
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* 读状态应答的号池切片。
|
|
148
|
+
*
|
|
149
|
+
* 读不出来的号池不能带倒整张卡:连接那一半仍然值得渲染,只是账号列表是空的。
|
|
150
|
+
*/
|
|
151
|
+
export declare function glmCodingPlanPoolStatus(pool: GlmCodingPlanAccountPool | undefined): Promise<GlmCodingPlanPoolStatus>;
|
|
152
|
+
//# sourceMappingURL=account-pool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account-pool.d.ts","sourceRoot":"","sources":["../../../../src/host/glm-coding-plan/account-pool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAGH,OAAO,EACL,eAAe,EAGf,KAAK,gBAAgB,EACrB,KAAK,QAAQ,EACd,MAAM,2BAA2B,CAAA;AAElC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAExD,OAAO,EACL,4BAA4B,EAI5B,KAAK,wBAAwB,EAC9B,MAAM,kBAAkB,CAAA;AAEzB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAA;AAGtD,OAAO,KAAK,EACV,oBAAoB,EACpB,mBAAmB,EACnB,SAAS,EACV,MAAM,2CAA2C,CAAA;AAClD,OAAO,KAAK,EAEV,uBAAuB,EACvB,mBAAmB,EAEpB,MAAM,wCAAwC,CAAA;AAM/C,uCAAuC;AACvC,MAAM,WAAW,wBAAyB,SAAQ,gBAAgB,CAAC,wBAAwB,CAAC;IAC1F,8BAA8B;IAC9B,MAAM,EAAE,SAAS,CAAA;IACjB,wBAAwB;IACxB,MAAM,EAAE,wBAAwB,CAAC,QAAQ,CAAC,CAAA;IAC1C,sCAAsC;IACtC,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,uBAAuB;IACvB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,6BAA6B;AAC7B,MAAM,WAAW,2BAA4B,SAAQ,oBAAoB;IACvE,iDAAiD;IACjD,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,iDAAiD;AACjD,wBAAgB,qBAAqB,IAAI,MAAM,CAE9C;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,yBAAyB,CAAC,WAAW,EAAE,wBAAwB,GAAG,MAAM,GAAG,SAAS,CAOnG;AAoDD;;;;;;;GAOG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,OAAO,GAAG,QAAQ,CAAC,wBAAwB,CAAC,CAuC7F;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,mBAAmB,GAAG,IAAI,GAAG,SAAS,GAC/C,mBAAmB,GAAG,SAAS,CAWjC;AAkBD,cAAc;AACd,MAAM,WAAW,+BAA+B;IAC9C,wCAAwC;IACxC,KAAK,CAAC,EAAE,4BAA4B,CAAA;IACpC,0BAA0B;IAC1B,OAAO,CAAC,EAAE,eAAe,CAAC,QAAQ,CAAC,wBAAwB,CAAC,CAAC,CAAA;IAC7D,kBAAkB;IAClB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,2CAA2C;IAC3C,eAAe,CAAC,EAAE,MAAM,MAAM,GAAG,IAAI,CAAA;CACtC;AAED;;;;;GAKG;AACH,qBAAa,gCAAiC,SAAQ,KAAK;;CAQ1D;AAED,qBAAa,wBAAyB,SAAQ,eAAe,CAC3D,wBAAwB,EACxB,wBAAwB,EACxB,2BAA2B,CAC5B;IAEC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAA8B;gBAExC,OAAO,GAAE,+BAAoC;IA+FzD;;;;;OAKG;IACG,oBAAoB,CAAC,OAAO,EAAE,oBAAoB,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,wBAAwB,CAAC;IAI5G;;;;;OAKG;cACgB,qBAAqB,CAAC,IAAI,EAAE,QAAQ,CAAC,wBAAwB,CAAC,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI;IAW3G;;;;;OAKG;IACG,sBAAsB,CAC1B,UAAU,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,EAChC,OAAO,GAAE,OAAO,KAAa,GAC5B,OAAO,CAAC;QAAE,OAAO,EAAE,wBAAwB,CAAC;QAAC,WAAW,EAAE,wBAAwB,CAAA;KAAE,CAAC;IAIxF;;;;;;;OAOG;IACG,kBAAkB,CAAC,OAAO,GAAE,OAAO,KAAa,GAAG,OAAO,CAAC;QAC/D,SAAS,EAAE,MAAM,CAAA;QACjB,WAAW,EAAE,wBAAwB,CAAA;KACtC,CAAC;IAaF,wBAAwB;IACxB,WAAW,IAAI,4BAA4B;CAG5C;AAED,kBAAkB;AAClB,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,2BAA2B,EAAE,CAAA;IACvC,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,gBAAgB,EAAE,uBAAuB,CAAA;IACzC,kBAAkB;IAClB,aAAa,EAAE,OAAO,CAAA;CACvB;AAED;;;;GAIG;AACH,wBAAsB,uBAAuB,CAC3C,IAAI,EAAE,wBAAwB,GAAG,SAAS,GACzC,OAAO,CAAC,uBAAuB,CAAC,CAYlC"}
|