@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,45 @@
|
|
|
1
|
+
import type { Entry } from '@deepseek-ai/cordis-plugin-loader';
|
|
2
|
+
import type { SearchProviderPreference } from '../shared/contracts.ts';
|
|
3
|
+
interface LoaderLike {
|
|
4
|
+
entries(): Iterable<Entry>;
|
|
5
|
+
}
|
|
6
|
+
export interface WebProviderSelectionOptions {
|
|
7
|
+
readonly pluginFetch?: boolean;
|
|
8
|
+
/** Explicit mode overrides both proxy detection and the search preference. */
|
|
9
|
+
readonly fetchProvider?: 'auto' | 'plugin' | 'dsh';
|
|
10
|
+
}
|
|
11
|
+
/** Configuration diagnostics, not proof that an in-flight tool uses this service. */
|
|
12
|
+
export interface SearchProviderSwitcherStatus {
|
|
13
|
+
readonly state: 'idle' | 'applying' | 'applied' | 'missing' | 'failed';
|
|
14
|
+
readonly configuredSearchProvider: string | null;
|
|
15
|
+
readonly configuredFetchProvider: string | null;
|
|
16
|
+
}
|
|
17
|
+
export declare class SearchProviderSwitcher {
|
|
18
|
+
private readonly loader;
|
|
19
|
+
private originalSearchProvider;
|
|
20
|
+
private originalFetchProvider;
|
|
21
|
+
private initialized;
|
|
22
|
+
private pending;
|
|
23
|
+
private disposed;
|
|
24
|
+
dispose(): void;
|
|
25
|
+
private state;
|
|
26
|
+
constructor(loader: LoaderLike);
|
|
27
|
+
status(): SearchProviderSwitcherStatus;
|
|
28
|
+
select(preference: SearchProviderPreference, options?: WebProviderSelectionOptions): Promise<void>;
|
|
29
|
+
private applySelection;
|
|
30
|
+
/**
|
|
31
|
+
* Wait until the entry's fiber has finished restarting, not just until it
|
|
32
|
+
* happens not to be mid-restart when asked.
|
|
33
|
+
*
|
|
34
|
+
* `Fiber.await()` alone is a single sample: it returns at once when `inertia`
|
|
35
|
+
* is unset, which is exactly the state the fiber is in on the first tick after
|
|
36
|
+
* `update()` queues its restart. Sampling that reports success while the entry
|
|
37
|
+
* is still UNLOADING. This waits for a restart to actually be observed, then
|
|
38
|
+
* lets `Fiber.await()` drain whatever queue is left, so a slow or multi-pass
|
|
39
|
+
* restart cannot be reported as applied either.
|
|
40
|
+
*/
|
|
41
|
+
private awaitSettled;
|
|
42
|
+
private findWebEntry;
|
|
43
|
+
}
|
|
44
|
+
export {};
|
|
45
|
+
//# sourceMappingURL=search-provider-switcher.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search-provider-switcher.d.ts","sourceRoot":"","sources":["../../../src/host/search-provider-switcher.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mCAAmC,CAAA;AAG9D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAA;AAEtE,UAAU,UAAU;IAClB,OAAO,IAAI,QAAQ,CAAC,KAAK,CAAC,CAAA;CAC3B;AA2BD,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,WAAW,CAAC,EAAE,OAAO,CAAA;IAC9B,8EAA8E;IAC9E,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,KAAK,CAAA;CACnD;AAED,qFAAqF;AACrF,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,UAAU,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAA;IACtE,QAAQ,CAAC,wBAAwB,EAAE,MAAM,GAAG,IAAI,CAAA;IAChD,QAAQ,CAAC,uBAAuB,EAAE,MAAM,GAAG,IAAI,CAAA;CAChD;AAED,qBAAa,sBAAsB;IAUrB,OAAO,CAAC,QAAQ,CAAC,MAAM;IATnC,OAAO,CAAC,sBAAsB,CAAoB;IAClD,OAAO,CAAC,qBAAqB,CAAoB;IACjD,OAAO,CAAC,WAAW,CAAQ;IAC3B,OAAO,CAAC,OAAO,CAAmC;IAClD,OAAO,CAAC,QAAQ,CAAQ;IAExB,OAAO,IAAI,IAAI;IACf,OAAO,CAAC,KAAK,CAAgD;gBAEhC,MAAM,EAAE,UAAU;IAE/C,MAAM,IAAI,4BAA4B;IAUtC,MAAM,CAAC,UAAU,EAAE,wBAAwB,EAAE,OAAO,GAAE,2BAAgC,GAAG,OAAO,CAAC,IAAI,CAAC;YAOxF,cAAc;IAoE5B;;;;;;;;;;OAUG;YACW,YAAY;IAiB1B,OAAO,CAAC,YAAY;CAMrB"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Skip the automatic LLM session-title request on this plugin's own lines.
|
|
3
|
+
*
|
|
4
|
+
* DSH titles a fresh session by sending one extra auxiliary `llm/stream` call
|
|
5
|
+
* (`purpose: 'session-title'`) through the conversation's own provider/model
|
|
6
|
+
* after the first human message. Every subscription line in this plugin pays
|
|
7
|
+
* for that call out of its own quota, and the user does not want it.
|
|
8
|
+
*
|
|
9
|
+
* The seam is `llm/stream`, the same one `compaction-route` uses: it wraps the
|
|
10
|
+
* adapter dispatch, so returning without `next()` never reaches the provider
|
|
11
|
+
* and spends nothing. The title service treats a request that yields no text as
|
|
12
|
+
* an ordinary generation failure — it logs one warning and keeps the
|
|
13
|
+
* deterministic first-message fallback title — so the sidebar keeps a real
|
|
14
|
+
* title while no title request leaves the machine.
|
|
15
|
+
*
|
|
16
|
+
* Scope is the plugin's own lines: any other provider a user happens to have
|
|
17
|
+
* configured keeps its titles untouched.
|
|
18
|
+
*
|
|
19
|
+
* @module dsh-multi-provider/session-title-guard
|
|
20
|
+
*/
|
|
21
|
+
/** The subset of `llm/stream` options this guard reads. */
|
|
22
|
+
export interface SessionTitleStreamOptions {
|
|
23
|
+
readonly provider?: string | undefined;
|
|
24
|
+
/** `session-title` on the auxiliary title call; absent on a conversation turn. */
|
|
25
|
+
readonly purpose?: string | undefined;
|
|
26
|
+
}
|
|
27
|
+
/** A chunk as it crosses the stream boundary; only a terminal `finish` is produced. */
|
|
28
|
+
export interface SessionTitleChunk {
|
|
29
|
+
readonly type: string;
|
|
30
|
+
readonly reason?: {
|
|
31
|
+
readonly kind?: string | undefined;
|
|
32
|
+
} | undefined;
|
|
33
|
+
}
|
|
34
|
+
/** The `llm/stream` waterfall listener this guard registers. */
|
|
35
|
+
export type SessionTitleStreamListener = (options: SessionTitleStreamOptions, next: () => AsyncIterable<SessionTitleChunk>) => AsyncIterable<SessionTitleChunk>;
|
|
36
|
+
/** Services the guard needs, injected so the decision is testable without a host. */
|
|
37
|
+
export interface SessionTitleGuardDeps {
|
|
38
|
+
/** The providers whose sessions skip the automatic title request. */
|
|
39
|
+
readonly providers: readonly string[];
|
|
40
|
+
/** Live switch, read per request so a settings change applies at once. */
|
|
41
|
+
readonly enabled?: (() => boolean) | undefined;
|
|
42
|
+
}
|
|
43
|
+
/** The context surface this guard needs, declared structurally per harness generation. */
|
|
44
|
+
export interface SessionTitleGuardContext {
|
|
45
|
+
on?(event: 'llm/stream', listener: SessionTitleStreamListener, options?: {
|
|
46
|
+
readonly global?: boolean;
|
|
47
|
+
}): unknown;
|
|
48
|
+
}
|
|
49
|
+
/** Live handle for teardown. */
|
|
50
|
+
export interface SessionTitleGuardHandle {
|
|
51
|
+
dispose(): void;
|
|
52
|
+
}
|
|
53
|
+
/** The `skipSessionTitle` plugin field: a live reference after the loader, a plain value before. */
|
|
54
|
+
export type SessionTitleConfigField = {
|
|
55
|
+
get(): boolean | undefined;
|
|
56
|
+
} | boolean | undefined;
|
|
57
|
+
/**
|
|
58
|
+
* Resolve whether automatic title requests are skipped.
|
|
59
|
+
*
|
|
60
|
+
* Reads a volatile reference at call time, so a settings save applies to the
|
|
61
|
+
* next title request without remounting the plugin row. Only an explicit
|
|
62
|
+
* `false` turns the skip off; anything unreadable stays enabled rather than
|
|
63
|
+
* throwing inside a title path.
|
|
64
|
+
*
|
|
65
|
+
* @param field - The `skipSessionTitle` plugin field.
|
|
66
|
+
* @returns whether this plugin's lines skip the automatic title request.
|
|
67
|
+
*/
|
|
68
|
+
export declare function resolveSessionTitleSkipped(field: SessionTitleConfigField): boolean;
|
|
69
|
+
/**
|
|
70
|
+
* Install the `llm/stream` listener that short-circuits title requests.
|
|
71
|
+
*
|
|
72
|
+
* Returns `undefined` when the host exposes no event bus, so a caller can skip
|
|
73
|
+
* installation instead of failing the plugin's load.
|
|
74
|
+
*
|
|
75
|
+
* @param ctx - structural context: the event bus.
|
|
76
|
+
* @param deps - the scoped providers and the live enable switch.
|
|
77
|
+
* @returns the live handle, or `undefined` on a host without an event bus.
|
|
78
|
+
*/
|
|
79
|
+
export declare function installSessionTitleGuard(ctx: SessionTitleGuardContext, deps: SessionTitleGuardDeps): SessionTitleGuardHandle | undefined;
|
|
80
|
+
//# sourceMappingURL=index.d.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AAM,MAAM,uBAAuB,GAAG;IAAE,GAAG,IAAI,OAAO,GAAG,SAAS,CAAA;CAAE,GAAG,OAAO,GAAG,SAAS,CAAA;AAE1F;;;;;;;;;;GAUG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,uBAAuB,GAAG,OAAO,CAUlF;AAED;;;;;;;;;GASG;AACH,wBAAgB,wBAAwB,CACtC,GAAG,EAAE,wBAAwB,EAC7B,IAAI,EAAE,qBAAqB,GAC1B,uBAAuB,GAAG,SAAS,CAerC"}
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Step Code 线路的号池:共享 `AccountPoolCore` 之上的薄封装。
|
|
3
|
+
*
|
|
4
|
+
* 存储、序列化、可用性、轮转、429 冷却都由 `src/host/common/account-pool.ts` 管;
|
|
5
|
+
* 本文件只回答「Step 这条线的凭据长什么样、谁能被刷新、身份怎么算、卡片怎么装配」。
|
|
6
|
+
*
|
|
7
|
+
* 四个与兄弟线路不同的地方,各有理由:
|
|
8
|
+
*
|
|
9
|
+
* 1. **两区可以同时在池里。** 区域是凭据的属性(计划 §1),一区铸造的 Key 被另一区拒绝,
|
|
10
|
+
* 所以去重键里必须带区域:否则同一个账号名在两个部署上会被合并成一行,
|
|
11
|
+
* 然后那一行的凭据被拿去打另一个区的主机——一次不会被任何本地检查发现的串区。
|
|
12
|
+
* 2. **凭据永不过期、永不刷新。** `needsRefresh` 恒为 false,`refresh` **一定抛错**;
|
|
13
|
+
* `expiresAt` 恒为 `STATIC_EXPIRES_AT`(Number.MAX_SAFE_INTEGER)且刻意**不**实现
|
|
14
|
+
* `expiresAt` 钩子——把一个「永不过期」写成卡片上的 expiresAt 会让人以为它会过期。
|
|
15
|
+
* 适配器收到 401 时 markAuthFailed,那才是上游自己说的失效。
|
|
16
|
+
* 3. **adopt 快照可删。** 与 codex/claude/glm 不同:本插件只读 `~/.stepcode/auth.json`,
|
|
17
|
+
* 从不写它;删掉池里的一行只是删掉本插件自己的加密记录,用户的 stepcode 会话不动。
|
|
18
|
+
* 所以这里没有 glm 那条「adopt 账号不可删」的规则。
|
|
19
|
+
* 4. **额度装配复用共享的 `quotaWindow()` / `poolQuota()`**,不另写第三份。
|
|
20
|
+
* 窗口长度取 types.ts 的 QUOTA_WINDOW_MINUTES(共享窗口 DTO 里没有窗口 key,
|
|
21
|
+
* 那是线路自己的桥),`label` 传空串(窗口名的规范在客户端字典里),
|
|
22
|
+
* `usedPercent` 为 null 的窗口由 `quotaWindow()` 丢弃(null 不是 0%,是「未说明」)。
|
|
23
|
+
*/
|
|
24
|
+
import { AccountPoolCore, type AccountSelectionHint, type PoolAccountShape, type PoolData } from '../common/account-pool.ts';
|
|
25
|
+
import type { CredentialStore } from '../token-store.ts';
|
|
26
|
+
import type { AccountRotationStrategy, PoolAccountQuotaDto } from '../../shared/account-pool-contracts.ts';
|
|
27
|
+
import { type StepCodeAccountSummaryDto, type StepCodeProfile, type StepCodeQuotaSnapshotDto, type StepCodeRegion, type StepCodeStatusDto } from '../../shared/step-code-contracts.ts';
|
|
28
|
+
import { type StepCodeStoredCredential } from './oauth.ts';
|
|
29
|
+
/**
|
|
30
|
+
* 号池里存的一份凭据。
|
|
31
|
+
*
|
|
32
|
+
* 它是 `oauth.ts` 的 `StepCodeStoredCredential` 加两个**来源**标记:
|
|
33
|
+
*
|
|
34
|
+
* - `adopted`:这一份是本机 stepcode 登录态的拷贝(卡片的来源标记)。
|
|
35
|
+
* - `sourcePath`:读到它的确切文件,卡片可以显示给用户。
|
|
36
|
+
*
|
|
37
|
+
* 凭据本身(access / refresh / expires / profile / uid)与 OAuth 模块装配的完全一致,
|
|
38
|
+
* 因为它们**就是**同一个东西:Step 的 api_key 不分来源,池里也不该分。
|
|
39
|
+
*/
|
|
40
|
+
export interface StepCodeCredentials extends StepCodeStoredCredential {
|
|
41
|
+
adopted?: true;
|
|
42
|
+
sourcePath?: string;
|
|
43
|
+
}
|
|
44
|
+
/** 一个池内账号行。凭据整个随行存放;其余是卡片渲染用的非机密事实。 */
|
|
45
|
+
export interface StepCodePoolAccount extends PoolAccountShape<StepCodeCredentials> {
|
|
46
|
+
/** 账号所属区域;由凭据的 profile 决定,这里是给它做索引用。 */
|
|
47
|
+
region: StepCodeRegion;
|
|
48
|
+
/** 这份凭据的来源(浏览器授权 / 手动粘贴 / adopt),供卡片显示。 */
|
|
49
|
+
source: StepCodeCredentialSource;
|
|
50
|
+
/** 控制台侧的账号显示名(非机密)。 */
|
|
51
|
+
accountName?: string;
|
|
52
|
+
}
|
|
53
|
+
/** 凭据来源,逐字取自 types.ts 的 PROFILE_HOSTS[].credentialSource 之外的用户动作。 */
|
|
54
|
+
export type StepCodeCredentialSource = 'browser' | 'apiKey' | 'adopt';
|
|
55
|
+
/** 号池切片:共享摘要 + 本线路的 profile 与区域。 */
|
|
56
|
+
export type StepCodeAccountSummary = StepCodeAccountSummaryDto;
|
|
57
|
+
/** 本线路自己的加密号池文件。与凭据文件分开:池可以有多行,凭据文件只有主账号一份。 */
|
|
58
|
+
export declare function stepCodePoolPath(): string;
|
|
59
|
+
/** keychain / Secret Service 的服务名。与其它线路各用各的,互不相干。 */
|
|
60
|
+
export declare const STEP_CODE_POOL_KEYCHAIN_SERVICE = "dsh-step-code-pool";
|
|
61
|
+
/**
|
|
62
|
+
* 身份:两个凭据什么时候是同一个上游账号。
|
|
63
|
+
*
|
|
64
|
+
* 组成是「区域 + uid」,两段都非机密,也都不随重新登录而变(Step 的 api_key 每次登录
|
|
65
|
+
* 都可能换一把新的,拿 api_key 当键会让同一个账号每次登录都长成新账号,号池无限增长)。
|
|
66
|
+
*
|
|
67
|
+
* 没有 uid 时退回「区域 + api_key 的 SHA-256 前 16 字节」:那是**指纹**,不是身份,
|
|
68
|
+
* 但它至少保证同一把 Key 落到同一行;两段全空才返回 undefined,那时核心自己生成
|
|
69
|
+
* `acc_<random>`,把这一行**新增**而不是与某个无关凭据合并。
|
|
70
|
+
*/
|
|
71
|
+
export declare function stepCodePoolIdentity(credentials: StepCodeCredentials): string | undefined;
|
|
72
|
+
/**
|
|
73
|
+
* 校验并归一化一份凭据。
|
|
74
|
+
*
|
|
75
|
+
* 规则刻意收得比 OAuth 模块更紧(`access` 必须非空、`expires` 必须等于静态值),
|
|
76
|
+
* 因为池里的一行是**要被直接发去上游**的:一份半截的凭据会让号池把一个必然 401 的请求
|
|
77
|
+
* 当成可路由的账号打出去。
|
|
78
|
+
*/
|
|
79
|
+
export declare function parseStepCodeCredentials(value: unknown): StepCodeCredentials;
|
|
80
|
+
/**
|
|
81
|
+
* 校验并归一化整份号池文档。
|
|
82
|
+
*
|
|
83
|
+
* 凭据重新过一遍 `parseStepCodeCredentials`,所以一行不可能装着一份 store 会拒绝写回的形状。
|
|
84
|
+
* `region` / `source` 必须显式恢复:行上的这两个字段是索引,丢了会让卡片把国区账号画成国际区。
|
|
85
|
+
* 一行凭据读不通就**丢弃这一行**而不是整体报错——`read()` 会吞掉一次加载失败并回落,
|
|
86
|
+
* 抛错等于让一行坏数据带走整个池。
|
|
87
|
+
*/
|
|
88
|
+
export declare function parseStepCodePoolData(value: unknown): PoolData<StepCodePoolAccount>;
|
|
89
|
+
/**
|
|
90
|
+
* 额度快照 → 号池卡片渲染的形状。
|
|
91
|
+
*
|
|
92
|
+
* 每个窗口**按长度**而不是按一个字符串来标注:窗口名的规范在客户端字典里,host 没有
|
|
93
|
+
* 资格下发展示文案,而知道自己长度的窗口可以让共享卡片直接从长度推出名字。
|
|
94
|
+
* `usedPercent` 为 null 的窗口由 `quotaWindow()` 丢掉——null 不是 0%,是「未说明」,
|
|
95
|
+
* 画成一条进度条等于谎报用量。
|
|
96
|
+
*/
|
|
97
|
+
export declare function stepCodePoolQuota(snapshot: StepCodeQuotaSnapshotDto | null | undefined): PoolAccountQuotaDto | undefined;
|
|
98
|
+
/** 本线路号池的构造选项。全部可选:生产按池文件路径构造平台后端。 */
|
|
99
|
+
export interface StepCodeAccountPoolOptions {
|
|
100
|
+
/** 测试缝;生产按池文件路径构造平台后端(DPAPI / Keychain / SecretService)。 */
|
|
101
|
+
backend?: CredentialStore<PoolData<StepCodePoolAccount>>;
|
|
102
|
+
/** 本池接受的账号数上限。 */
|
|
103
|
+
maxAccounts?: number;
|
|
104
|
+
/** 用户在设置里钉住的账号;钉住的账号冷却时自动让位给轮转(核心自己处理)。 */
|
|
105
|
+
preferAccountId?: () => string | null;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* 对一份凭据提出的刷新。
|
|
109
|
+
*
|
|
110
|
+
* 它**永远不会成功**,而**必须**是一个显式错误而不是一次静默的空操作:核心的刷新路径
|
|
111
|
+
* 会把这个错误报给用户,而静默返回旧凭据会让一次注定失败的请求看起来像成功了。
|
|
112
|
+
* 逐字照抄官方 refreshStepOAuth(index.ts:316-321)的拒绝语义。
|
|
113
|
+
*/
|
|
114
|
+
export declare class StepCodeCredentialRefreshError extends Error {
|
|
115
|
+
constructor();
|
|
116
|
+
}
|
|
117
|
+
/** 本线路的号池。凭据类型是本线路自己的,静态凭据不刷新。 */
|
|
118
|
+
export declare class StepCodeAccountPool extends AccountPoolCore<StepCodeCredentials, StepCodePoolAccount, StepCodeAccountSummary> {
|
|
119
|
+
constructor(options?: StepCodeAccountPoolOptions);
|
|
120
|
+
/**
|
|
121
|
+
* 把一份 adopt 快照收进号池。
|
|
122
|
+
*
|
|
123
|
+
* 快照已经跑过 `adopt.ts` 的解析(形状、占位符、profile 都已确认),这里只补来源标记;
|
|
124
|
+
* 账号仍以 `stepCodePoolIdentity` 的身份落进池,重复 adopt 同一次登录只会更新同一行。
|
|
125
|
+
*/
|
|
126
|
+
addAdoptedCredential(adopted: {
|
|
127
|
+
readonly credentials: StepCodeStoredCredential;
|
|
128
|
+
readonly sourcePath?: string;
|
|
129
|
+
}, alias?: string): Promise<StepCodePoolAccount>;
|
|
130
|
+
/**
|
|
131
|
+
* 手动粘贴 Platform API Key 的入口(形状与登录完全一致,见 `stepCodeCredentialFromApiKey`)。
|
|
132
|
+
*/
|
|
133
|
+
addApiKeyCredential(credentials: StepCodeStoredCredential, alias?: string): Promise<StepCodePoolAccount>;
|
|
134
|
+
/**
|
|
135
|
+
* 适配器取下一个账号用的入口。
|
|
136
|
+
*
|
|
137
|
+
* 核心在这里做轮转、冷却、可用性判断与(被拒绝的)刷新;本方法只多给适配器一件事:
|
|
138
|
+
* 一次请求内换过账号时,把试过的账号排除掉。
|
|
139
|
+
*/
|
|
140
|
+
getEffectiveCredential(excludeIds?: ReadonlySet<string>, fetchFn?: typeof fetch, selection?: AccountSelectionHint): Promise<{
|
|
141
|
+
account: StepCodePoolAccount;
|
|
142
|
+
credentials: StepCodeCredentials;
|
|
143
|
+
}>;
|
|
144
|
+
/**
|
|
145
|
+
* 一次额度读属于哪个账号,连同读它用的凭据。
|
|
146
|
+
*
|
|
147
|
+
* 写在这里而不是路由里,是因为它是线路形状的:路由需要的是凭据**和**这次读所属的账号,
|
|
148
|
+
* 这样快照才能记在它描述的那一行上,不会被一次轮转画到另一行名下。
|
|
149
|
+
* 选谁读是核心自己对「没有指名账号的调用方」的规则,这里照抄那三行,
|
|
150
|
+
* 因为核心只通过 `getFreshCredential` 暴露凭据本身。
|
|
151
|
+
*/
|
|
152
|
+
getQuotaReadTarget(fetchFn?: typeof fetch): Promise<{
|
|
153
|
+
accountId: string;
|
|
154
|
+
profile: StepCodeProfile;
|
|
155
|
+
region: StepCodeRegion;
|
|
156
|
+
credentials: StepCodeCredentials;
|
|
157
|
+
}>;
|
|
158
|
+
}
|
|
159
|
+
/** 状态应答里的号池切片。 */
|
|
160
|
+
export interface StepCodePoolStatus {
|
|
161
|
+
accounts: StepCodeAccountSummary[];
|
|
162
|
+
activeAccountId?: string;
|
|
163
|
+
rotationStrategy: AccountRotationStrategy;
|
|
164
|
+
/** 本进程是否装上了号池。 */
|
|
165
|
+
poolInstalled: boolean;
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* 读状态应答的号池切片。
|
|
169
|
+
*
|
|
170
|
+
* 读不出来的号池不能带倒整张卡:连接那一半仍然值得渲染,只是账号列表是空的。
|
|
171
|
+
*/
|
|
172
|
+
export declare function stepCodePoolStatus(pool: StepCodeAccountPool | undefined): Promise<StepCodePoolStatus>;
|
|
173
|
+
/**
|
|
174
|
+
* 把池状态装配成 `StepCodeStatusDto` 的号池切片。
|
|
175
|
+
*
|
|
176
|
+
* 这是**唯一**装配号池切片的地方(照抄 glm 的 `glmCodingPlanPoolStatus` + 同族先例):
|
|
177
|
+
* 一旦卡片、hub 汇总与适配器各装配一次,三处就会在「activeAccountId 缺失时给不给"
|
|
178
|
+
* activeAccountId: undefined"」这种细节上漂移。
|
|
179
|
+
*
|
|
180
|
+
* 两个刻意的省略:
|
|
181
|
+
*
|
|
182
|
+
* - `activeAccountId` 只在**真的读到**时下发(共享 DTO 的 enabledModelIds 语义同源:
|
|
183
|
+
* 缺省 = 没有钉住,而不是「钉住了 undefined」)。
|
|
184
|
+
* - 读不出来的池给空列表而不是抛错:连接那一半仍然值得渲染。
|
|
185
|
+
*/
|
|
186
|
+
export declare function stepCodePoolStatusSlice(pool: StepCodeAccountPool | undefined): Promise<Pick<StepCodeStatusDto, 'accounts' | 'rotationStrategy' | 'activeAccountId'>>;
|
|
187
|
+
//# sourceMappingURL=account-pool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account-pool.d.ts","sourceRoot":"","sources":["../../../../src/host/step-code/account-pool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAIH,OAAO,EACL,eAAe,EAGf,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,KAAK,QAAQ,EACd,MAAM,2BAA2B,CAAA;AAIlC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACxD,OAAO,KAAK,EACV,uBAAuB,EACvB,mBAAmB,EACpB,MAAM,wCAAwC,CAAA;AAC/C,OAAO,EAEL,KAAK,yBAAyB,EAC9B,KAAK,e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BAAkB;IACjC,QAAQ,EAAE,sBAAsB,EAAE,CAAA;IAClC,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,gBAAgB,EAAE,uBAAuB,CAAA;IACzC,kBAAkB;IAClB,aAAa,EAAE,OAAO,CAAA;CACvB;AAED;;;;GAIG;AACH,wBAAsB,kBAAkB,CACtC,IAAI,EAAE,mBAAmB,GAAG,SAAS,GACpC,OAAO,CAAC,kBAAkB,CAAC,CAY7B;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,uBAAuB,CAC3C,IAAI,EAAE,mBAAmB,GAAG,SAAS,GACpC,OAAO,CAAC,IAAI,CAAC,iBAAiB,EAAE,UAAU,GAAG,kBAAkB,GAAG,iBAAiB,CAAC,CAAC,CAOvF"}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Step Code(Step Plan 订阅)线路的 DSH 适配器。
|
|
3
|
+
*
|
|
4
|
+
* 形状与 GLM 同构(`extends LlmAdapter`:`listModels` / `resolveModel` /
|
|
5
|
+
* `prepareCall` / `stream` / `catalog` / `credentialFor`),但它**不碰任何协议细节**:
|
|
6
|
+
*
|
|
7
|
+
* - 请求体、流解析、用量与错误分类全部来自 `./mapper.ts`;
|
|
8
|
+
* - URL 全部来自 `./client.ts`(`stepChatCompletionsUrl` / `stepModelCatalogUrl`);
|
|
9
|
+
* - 目录的归一化全部来自 `./model-catalog.ts`。
|
|
10
|
+
*
|
|
11
|
+
* 也就是说本文件只回答三件事:**这一行请求用哪个目录行**、**用哪把凭据**、
|
|
12
|
+
* **失败之后换不换账号**。任何一份 URL 拼接或 JSON 解析在这里出现第二遍,
|
|
13
|
+
* 就等于给线路造了第二条会漂移的真相。
|
|
14
|
+
*
|
|
15
|
+
* 三处刻意如此:
|
|
16
|
+
*
|
|
17
|
+
* 1. **凭据只在 `credentialFor()` 一处取。** 有号池时轮转,没有池时读单凭据存储
|
|
18
|
+
* (无头 host 与测试的形态)。两条路径都**不刷新**:Step 的 api_key 永不过期,
|
|
19
|
+
* 号池的 refresh 钩子恒抛 `StepCodeCredentialRefreshError`,所以这里没有「捕获后重登」
|
|
20
|
+
* 这种分支——上游撤销一把 Key 的唯一诚实的处置是 401 时的 `markAuthFailed`。
|
|
21
|
+
* 2. **请求路径不联网。** 目录只读 `client.ts` 的进程内缓存,随包目录兜底;
|
|
22
|
+
* 实时目录是 `/catalog/refresh` 与登录/adopt 的产物。
|
|
23
|
+
* 3. **缓存用量在本进程累计。** 累计器住在本文件(流的末端是唯一知道用量帧的地方),
|
|
24
|
+
* `/status` 由 `readStepCodeCacheStats()` 读它;路由不另算第二套口径。
|
|
25
|
+
*/
|
|
26
|
+
import { LlmAdapter, type GenerateOptions, type LlmModelInfo, type LlmProviderInfo, type LlmResolvedModelInfo, type PreparedAdapterCall, type ResolvedRetryPolicy, type StreamChunk } from '@deepseek-ai/dsh-llm';
|
|
27
|
+
import type { ImageAttachmentRef } from '@deepseek-ai/dsh-attachment';
|
|
28
|
+
import { type PromptCacheOverride } from '../common/prompt-cache-policy.ts';
|
|
29
|
+
import { type AttachmentImageReader } from '../common/request-images.ts';
|
|
30
|
+
import { type StepCodeCacheUsage } from './cache-stats.ts';
|
|
31
|
+
import { type StepCodeCatalogEntry, type StepCodeUpstreamCredential } from './client.ts';
|
|
32
|
+
import { type StepCodeModelEntry } from './model-catalog.ts';
|
|
33
|
+
import { StepCodeCredentialStore, StepCodeModelSettingsStore, type StepCodePreferenceStore } from './token-store.ts';
|
|
34
|
+
import type { StepCodeAccountPool } from './account-pool.ts';
|
|
35
|
+
import { PROVIDER_ID, PROVIDER_NAME } from './types.ts';
|
|
36
|
+
import type { StepCodeCacheStatsDto, StepCodeProfile } from '../../shared/step-code-contracts.ts';
|
|
37
|
+
/**
|
|
38
|
+
* 这条路由的瞬时故障重试策略,与兄弟线路逐字一致。
|
|
39
|
+
*
|
|
40
|
+
* 刻意不在集合里:AUTH(被拒的 Key 每次都一样,而它只能重新授权)、
|
|
41
|
+
* PROVIDER_ERROR(400 或套餐拒绝)、ABORTED(调用方自己取消)。
|
|
42
|
+
*/
|
|
43
|
+
export declare const STEP_CODE_RETRY_POLICY_CONFIG: {
|
|
44
|
+
mode: 'normal';
|
|
45
|
+
maxRetries: number;
|
|
46
|
+
retryableCodes: string[];
|
|
47
|
+
backoff: {
|
|
48
|
+
initialDelayMs: number;
|
|
49
|
+
maxDelayMs: number;
|
|
50
|
+
jitterRatio: number;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
/** 上游没有给 `Retry-After` 时,一次 429 按 5 分钟冷却。 */
|
|
54
|
+
export declare const STEP_CODE_POOL_COOLDOWN_MS: number;
|
|
55
|
+
/**
|
|
56
|
+
* 目录缓存 → 能力行。
|
|
57
|
+
*
|
|
58
|
+
* `client.ts` 的缓存装的是 `StepCodeCatalogEntry`(**只含端点真的报了的字段**),
|
|
59
|
+
* 而请求面与设置面要的是 `model-catalog.ts` 的 `StepCodeModelEntry`。
|
|
60
|
+
* 这里把前者还原成上游载荷再交给 {@link parseStepCodeModelListing},而不是自己映射一遍:
|
|
61
|
+
* 档位表、`model_type` 过滤、上下文窗口兜底与 hint 生成都因此只有**一份**实现。
|
|
62
|
+
*
|
|
63
|
+
* 还原是等价的:缓存条目里每个字段都对应上游记录里的同名键,
|
|
64
|
+
* 而 `model_type` 的过滤在 `client.ts` 已经按同一条规则做过一次,
|
|
65
|
+
* 再跑一遍得到同一份集合(缓存里要么全带 `model_type` 要么全不带)。
|
|
66
|
+
*/
|
|
67
|
+
export declare function stepCodeModelCatalogFrom(entries: readonly StepCodeCatalogEntry[]): StepCodeModelEntry[];
|
|
68
|
+
/**
|
|
69
|
+
* 这个部署能调的模型:**进程内缓存优先、随包目录兜底,请求路径上绝不联网**。
|
|
70
|
+
*
|
|
71
|
+
* 实时目录只由 `/catalog/refresh` 与登录/adopt 产生(见 `routes.ts`),
|
|
72
|
+
* 卡片打开时就能把它同步好;让每一次模型解析都去打上游只会把设置页变成一条压测。
|
|
73
|
+
*/
|
|
74
|
+
export declare function cachedStepCodeModelCatalog(profile?: StepCodeProfile): readonly StepCodeModelEntry[];
|
|
75
|
+
/** 设置卡片渲染的模型总数(hub 概览与状态共用同一份读数)。 */
|
|
76
|
+
export declare function stepCodeCatalogSize(): number;
|
|
77
|
+
/**
|
|
78
|
+
* 记下一次请求的用量(流读到终止帧之后调用)。
|
|
79
|
+
*
|
|
80
|
+
* 口径全部借自 `cache-stats.ts` 的 {@link promptTokensOf}——它是本线路对
|
|
81
|
+
* 「聚合 prompt = 未命中 + 缓存读入 + 缓存写入」的唯一写法,这里不再复述一遍。
|
|
82
|
+
*/
|
|
83
|
+
export declare function rememberStepCodeCacheUsage(usage: StepCodeCacheUsage): void;
|
|
84
|
+
/**
|
|
85
|
+
* 卡片要的那份切片;**尚无样本时返回 undefined**。
|
|
86
|
+
*
|
|
87
|
+
* 「还没有样本」与「样本全都没命中」必须能被区分:契约里 `cacheStats` 是可选的,
|
|
88
|
+
* 客户端把缺失渲染成占位符、把 0 渲染成真实的 0%,所以这里绝不下发一个全 0 的对象。
|
|
89
|
+
*/
|
|
90
|
+
export declare function readStepCodeCacheStats(): StepCodeCacheStatsDto | undefined;
|
|
91
|
+
/** 一行请求要用的凭据:发请求只需要 `client.ts` 认得的那三件事。 */
|
|
92
|
+
export interface StepCodePickedCredential {
|
|
93
|
+
/** 号池里的账号 id;无池(单凭据路径)时为 null。 */
|
|
94
|
+
accountId: string | null;
|
|
95
|
+
credentials: StepCodeUpstreamCredential;
|
|
96
|
+
}
|
|
97
|
+
export interface StepCodeAdapterOptions {
|
|
98
|
+
fetchFn?: typeof fetch;
|
|
99
|
+
attachments?: AttachmentImageReader;
|
|
100
|
+
/** 多账号号池;缺省走单凭据路径(无头 host 与测试)。 */
|
|
101
|
+
accountPool?: StepCodeAccountPool;
|
|
102
|
+
/** Optional deployment override for cache-prefix behaviour. */
|
|
103
|
+
promptCache?: PromptCacheOverride;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Step Code(Step Plan 订阅)线路的 LlmAdapter 实现。
|
|
107
|
+
*
|
|
108
|
+
* 请求面只有一个:四条 profile 全部走 OpenAI Chat Completions(官方
|
|
109
|
+
* `STEP_MODEL_API = "openai-completions"` 对所有模型一视同仁),所以本文件里
|
|
110
|
+
* **没有**协议面判定——而 region 也不在这里拼,URL 由 `client.ts` 从凭据的 profile 得出。
|
|
111
|
+
*/
|
|
112
|
+
export declare class StepCodeAdapter extends LlmAdapter {
|
|
113
|
+
private readonly store;
|
|
114
|
+
private readonly modelSettings;
|
|
115
|
+
private readonly preferences;
|
|
116
|
+
private readonly accountPool;
|
|
117
|
+
private readonly options;
|
|
118
|
+
/** 辅助请求(压缩摘要等)不带档位,靠这里沿用主回合的档位,否则请求体与缓存前缀不一致。 */
|
|
119
|
+
private readonly effortMemory;
|
|
120
|
+
constructor(store?: StepCodeCredentialStore, modelSettings?: StepCodeModelSettingsStore, preferences?: StepCodePreferenceStore, options?: StepCodeAdapterOptions);
|
|
121
|
+
providerInfo(provider: string): LlmProviderInfo;
|
|
122
|
+
providerRetryPolicy(): ResolvedRetryPolicy;
|
|
123
|
+
imageRequestPricing(): undefined;
|
|
124
|
+
imageRequestTarget(_provider: string, _model: string, image: ImageAttachmentRef): import("../common/request-images.ts").CompatImageRequestTarget;
|
|
125
|
+
private settings;
|
|
126
|
+
/** 这个部署的目录行(缓存优先,请求路径不联网)。 */
|
|
127
|
+
private catalog;
|
|
128
|
+
/**
|
|
129
|
+
* 这一行请求用哪份凭据。
|
|
130
|
+
*
|
|
131
|
+
* 有池时轮转;没有池时读单凭据存储(无头 host 与测试的形态)。
|
|
132
|
+
* 两条路径都**不刷新**:Step 的 api_key 永不过期,号池的 refresh 钩子恒抛
|
|
133
|
+
* `StepCodeCredentialRefreshError`,所以这里不存在「刷新失败后再试一次」的分支。
|
|
134
|
+
*/
|
|
135
|
+
private credentialFor;
|
|
136
|
+
/** Warm-prefix account preference, inert unless a deployment proves account scope. */
|
|
137
|
+
private cacheAffinityHint;
|
|
138
|
+
listModels(provider?: string): Promise<readonly LlmModelInfo[]>;
|
|
139
|
+
resolveModel(provider: string, model: string, signal?: AbortSignal): Promise<LlmResolvedModelInfo>;
|
|
140
|
+
prepareCall(provider: string, model: string, signal?: AbortSignal): Promise<PreparedAdapterCall>;
|
|
141
|
+
stream(options: GenerateOptions): AsyncIterable<StreamChunk>;
|
|
142
|
+
/**
|
|
143
|
+
* 一次请求的完整往返:选账号 → 定目录行 → 发 → 解析流。
|
|
144
|
+
*
|
|
145
|
+
* 账号轮转的循环只有一处:一次 429 或一次 AUTH 会把那个账号移出本次请求,
|
|
146
|
+
* 由另一个账号来发**同一份**请求体。没有池时这个循环只跑一次。
|
|
147
|
+
*/
|
|
148
|
+
private requestStream;
|
|
149
|
+
}
|
|
150
|
+
/** Cache-expiry hint for one session, or the latest recorded session when omitted. */
|
|
151
|
+
export declare function readStepCodeCacheHint(sessionId?: string, override?: PromptCacheOverride): {
|
|
152
|
+
idleMs: number;
|
|
153
|
+
totalTokens: number;
|
|
154
|
+
} | null;
|
|
155
|
+
export { PROVIDER_ID, PROVIDER_NAME };
|
|
156
|
+
//# sourceMappingURL=adapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../../src/host/step-code/adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,EACL,UAAU,EAGV,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,WAAW,EACjB,MAAM,sBAAsB,CAAA;AAE7B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAA;AAerE,OAAO,EAAuB,KAAK,mBAAmB,EAAE,MAAM,kCAAkC,CAAA;AAEhG,OAAO,EAAgC,KAAK,qBAAqB,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