@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 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../src/host/command-code/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAYL,WAAW,EAYZ,MAAM,YAAY,CAAA;AACnB,OAAO,EAAE,mBAAmB,EAAE,KAAK,uBAAuB,EAA+B,MAAM,kBAAkB,CAAA;AAEjH,OAAO,KAAK,EACV,kBAAkB,EAClB,uBAAuB,EACvB,iBAAiB,EACjB,gBAAgB,EAChB,sBAAsB,EACtB,eAAe,EAChB,MAAM,wCAAwC,CAAA;AAK/C,MAAM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ACrC,KAAK,GAAE,IAAI,CAAC,mBAAmB,EAAE,MAAM,CAA6B,EACpE,gBAAgB,GAAE,OAAO,KAAK,GAAG,wBAAgC,EACjE,KAAK,UAAQ,EACb,SAAS,CAAC,EAAE,MAAM,GACjB,OAAO,CAAC,uBAAuB,CAAC,CAkGlC;AAED,4EAA4E;AAC5E,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,SAAS,uBAAuB,EAAE,EAC3C,eAAe,EAAE,SAAS,MAAM,EAAE,EAClC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAChC,KAAK,CAAC;IACP,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,OAAO,CAAA;IAChB,oBAAoB,EAAE,MAAM,CAAA;IAC5B,aAAa,EAAE,MAAM,CAAA;IACrB,gBAAgB,EAAE,MAAM,CAAA;IACxB,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAA;IAC3B,IAAI,EAAE,eAAe,CAAA;CACtB,CAAC,CAkBD;AAED,OAAO,EAAE,WAAW,EAAE,CAAA"}
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provider-wire mapping for the two Command Code provider endpoints.
|
|
3
|
+
*
|
|
4
|
+
* The API serves Anthropic-format models on `/messages` and everything else on
|
|
5
|
+
* `/chat/completions`; it validates the split and rejects a model sent to the
|
|
6
|
+
* wrong endpoint. Both wires are mapped here so one adapter can serve the whole
|
|
7
|
+
* catalog, and both streams are normalized into DSH's block/delta vocabulary.
|
|
8
|
+
*
|
|
9
|
+
* https://commandcode.ai/blog/command-code-provider-api
|
|
10
|
+
*/
|
|
11
|
+
import { type OutboundContentBlock, type GenerateOptions, type StreamChunk } from '../common/llm-compat.ts';
|
|
12
|
+
import type { AttachmentStore } from '@deepseek-ai/dsh-attachment';
|
|
13
|
+
import type { CommandCodeWire } from '../../shared/command-code-contracts.ts';
|
|
14
|
+
/** Attachment seam this route needs: verified bytes for one durable image. */
|
|
15
|
+
export type AttachmentImageReader = Pick<AttachmentStore, 'readImage'>;
|
|
16
|
+
/** One durable user image resolved for an in-flight request, or proven unreadable. */
|
|
17
|
+
export type ResolvedRequestImage = {
|
|
18
|
+
readonly kind: 'inline';
|
|
19
|
+
readonly mediaType: string;
|
|
20
|
+
readonly data: string;
|
|
21
|
+
} | {
|
|
22
|
+
readonly kind: 'unavailable';
|
|
23
|
+
};
|
|
24
|
+
/** Resolved images keyed by durable attachment id; consumed by one request build. */
|
|
25
|
+
export type ResolvedRequestImages = ReadonlyMap<string, ResolvedRequestImage>;
|
|
26
|
+
/**
|
|
27
|
+
* Base64 image payload one request may carry.
|
|
28
|
+
*
|
|
29
|
+
* Both Command Code endpoints are proxies: the body is forwarded to whichever
|
|
30
|
+
* upstream serves the model, so the bound has to hold for the strictest of
|
|
31
|
+
* them. 12 MB matches what this plugin already allows its Gemini route and
|
|
32
|
+
* keeps the conversation text, tool schemas, and system prompt inside the same
|
|
33
|
+
* body.
|
|
34
|
+
*/
|
|
35
|
+
export declare const MAX_REQUEST_IMAGE_BYTES: number;
|
|
36
|
+
/**
|
|
37
|
+
* Replace the oldest inline images with a text placeholder once one request
|
|
38
|
+
* would carry more than {@link MAX_REQUEST_IMAGE_BYTES} of base64 image data.
|
|
39
|
+
* Durable history is untouched; only the request about to be sent changes.
|
|
40
|
+
*/
|
|
41
|
+
export declare function offloadOldestRequestImages(options: GenerateOptions): GenerateOptions;
|
|
42
|
+
/**
|
|
43
|
+
* Read every durable `{ type: 'image', attachment }` block one request carries.
|
|
44
|
+
* An unreadable image resolves to `unavailable` rather than disappearing, so
|
|
45
|
+
* the model is told the picture is missing instead of answering about a blank.
|
|
46
|
+
*/
|
|
47
|
+
export declare function resolveRequestImages(options: GenerateOptions, attachments: AttachmentImageReader | undefined, signal?: AbortSignal): Promise<ResolvedRequestImages>;
|
|
48
|
+
/** Drop the JSON-Schema keywords provider gateways reject or ignore. */
|
|
49
|
+
export declare function stripMetaSchema(schema: unknown): Record<string, unknown>;
|
|
50
|
+
/** Build one `/chat/completions` body. */
|
|
51
|
+
export declare function buildOpenAIRequest(options: GenerateOptions, images?: ResolvedRequestImages): Record<string, unknown>;
|
|
52
|
+
/**
|
|
53
|
+
* Smallest thinking budget the Anthropic wire accepts.
|
|
54
|
+
*
|
|
55
|
+
* Anthropic refuses a budget below 1024 tokens, so a cap that leaves no room
|
|
56
|
+
* for that one simply omits thinking. This is the wire's own minimum.
|
|
57
|
+
*/
|
|
58
|
+
export declare const MIN_THINKING_BUDGET_TOKENS = 1024;
|
|
59
|
+
/**
|
|
60
|
+
* Visible answer the thinking budget has to leave under the cap.
|
|
61
|
+
*
|
|
62
|
+
* A budget that eats the whole cap leaves the model no room to answer, so the
|
|
63
|
+
* budget never reaches the last {@link MIN_ANSWER_TOKENS} of it. The room is
|
|
64
|
+
* what keeps a small cap from turning the answer into a single token.
|
|
65
|
+
*/
|
|
66
|
+
export declare const MIN_ANSWER_TOKENS = 1024;
|
|
67
|
+
/**
|
|
68
|
+
* Reasoning budget a thinking-enabled request may spend, given its output cap.
|
|
69
|
+
*
|
|
70
|
+
* The budget is the one the effort level asks for, trimmed to fit under the
|
|
71
|
+
* cap. Two floors decide the rest:
|
|
72
|
+
*
|
|
73
|
+
* - it must leave {@link MIN_ANSWER_TOKENS} under the cap for the visible
|
|
74
|
+
* answer, so a budget never eats the whole output and the answer is not
|
|
75
|
+
* squeezed down to a token;
|
|
76
|
+
* - it must be at least {@link MIN_THINKING_BUDGET_TOKENS}, because the wire
|
|
77
|
+
* refuses a budget below its own minimum.
|
|
78
|
+
*
|
|
79
|
+
* A cap that cannot satisfy both gets NO thinking at all: a budget that leaves
|
|
80
|
+
* the answer no room is worse than no thinking.
|
|
81
|
+
*
|
|
82
|
+
* A request with no cap has nothing to fit a budget into, so it gets no
|
|
83
|
+
* thinking either: there is no number to compare the level against, and a
|
|
84
|
+
* budget invented from nothing is the same guess this rule exists to remove.
|
|
85
|
+
*/
|
|
86
|
+
export declare function thinkingBudgetFor(effort: string | undefined, maxTokens: number | undefined): number | undefined;
|
|
87
|
+
/**
|
|
88
|
+
* Output cap the Anthropic wire sends when nothing else applies.
|
|
89
|
+
*
|
|
90
|
+
* The Anthropic Messages format requires `max_tokens`, so the wire cannot
|
|
91
|
+
* leave the field out the way the OpenAI-compatible wire does; the official
|
|
92
|
+
* CLI's own answer for a request without a declared cap is 64000, and that is
|
|
93
|
+
* the number used here.
|
|
94
|
+
*/
|
|
95
|
+
export declare const ANTHROPIC_DEFAULT_MAX_TOKENS = 64000;
|
|
96
|
+
/** Build one `/messages` body. */
|
|
97
|
+
export declare function buildAnthropicRequest(options: GenerateOptions, images?: ResolvedRequestImages): Record<string, unknown>;
|
|
98
|
+
/** Build the body for whichever endpoint serves `modelId`. */
|
|
99
|
+
export declare function buildRequest(options: GenerateOptions, wire: CommandCodeWire, images?: ResolvedRequestImages): Record<string, unknown>;
|
|
100
|
+
export declare function buildResponsesRequest(options: GenerateOptions, images?: ResolvedRequestImages): Record<string, unknown>;
|
|
101
|
+
/** One tool call accumulating across `chat/completions` deltas. */
|
|
102
|
+
interface PendingToolCall {
|
|
103
|
+
blockIndex: number;
|
|
104
|
+
id: string;
|
|
105
|
+
name: string;
|
|
106
|
+
arguments: string;
|
|
107
|
+
started: boolean;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* One failure a Command Code stream reported INSIDE a 200 response.
|
|
111
|
+
*
|
|
112
|
+
* ALL THREE of this line's wires can answer 200 and then report the failure in
|
|
113
|
+
* the stream, in the envelope a non-2xx body would have carried, and they speak
|
|
114
|
+
* three different vocabularies. The messages wire sends `{ type: `error`, error:
|
|
115
|
+
* { type, message } }`, where `type` stands for a STATUS. The Responses wire sends
|
|
116
|
+
* `response.failed` or `error` whose error may be an object, a nested
|
|
117
|
+
* `response.error`, or a bare string. The chat-completions wire puts the error
|
|
118
|
+
* straight on the chunk - `{"error":{"message","type"}}`, the body this route's own
|
|
119
|
+
* upstream reports, which names `type` where the others would name a code.
|
|
120
|
+
*/
|
|
121
|
+
export interface InBandStreamError {
|
|
122
|
+
/**
|
|
123
|
+
* Which wire named it, and so which rule reads it.
|
|
124
|
+
*
|
|
125
|
+
* Recorded rather than inferred from the request that produced it: only the
|
|
126
|
+
* branch that threw knows, and the rules genuinely differ - a `type` that stands
|
|
127
|
+
* for a status on the messages wire, a code or plain prose that stands for one
|
|
128
|
+
* on the other two. The values are the wire values themselves, so an adapter
|
|
129
|
+
* reading them cannot mistake one vocabulary for another.
|
|
130
|
+
*/
|
|
131
|
+
vocabulary: 'openai' | 'anthropic' | 'responses';
|
|
132
|
+
/**
|
|
133
|
+
* The event's wire `error` object, or null when the event carried only text.
|
|
134
|
+
*
|
|
135
|
+
* A Responses `error` event may be a bare string, and then nothing structured
|
|
136
|
+
* is left to read: the message below is the whole signal.
|
|
137
|
+
*/
|
|
138
|
+
error: Record<string, unknown> | null;
|
|
139
|
+
/** The provider's own diagnostic, as this mapper folded it into its message. */
|
|
140
|
+
message: string;
|
|
141
|
+
}
|
|
142
|
+
export interface CommandCodeStreamState {
|
|
143
|
+
wire: CommandCodeWire;
|
|
144
|
+
blocks: OutboundContentBlock[];
|
|
145
|
+
current: {
|
|
146
|
+
index: number;
|
|
147
|
+
type: 'text' | 'reasoning';
|
|
148
|
+
text: string;
|
|
149
|
+
} | null;
|
|
150
|
+
/** wire tool index -> accumulating call (OpenAI route). */
|
|
151
|
+
toolCalls: Map<number, PendingToolCall>;
|
|
152
|
+
/** anthropic content-block index -> our block index. */
|
|
153
|
+
contentIndexes: Map<number, number>;
|
|
154
|
+
/** anthropic content index of the block currently open. */
|
|
155
|
+
openContentIndex: number | null;
|
|
156
|
+
hasContent: boolean;
|
|
157
|
+
hasToolCall: boolean;
|
|
158
|
+
finishReason: string | null;
|
|
159
|
+
/**
|
|
160
|
+
* The in-band failure this wire reported inside a 200 response, recorded just
|
|
161
|
+
* before the mapper throws on it. Undefined until such an event arrives, and
|
|
162
|
+
* never set by any other failure.
|
|
163
|
+
*
|
|
164
|
+
* The mapper cannot know whether anything has reached the caller, so the code
|
|
165
|
+
* it throws is the general one; the adapter can, and reclassifies a transient
|
|
166
|
+
* one from this while nothing has. It is left in place afterwards so a reader
|
|
167
|
+
* of the state can still see what the stream ended on.
|
|
168
|
+
*/
|
|
169
|
+
streamError?: InBandStreamError;
|
|
170
|
+
done: boolean;
|
|
171
|
+
finished: boolean;
|
|
172
|
+
inputTokens: number;
|
|
173
|
+
outputTokens: number;
|
|
174
|
+
cacheReadTokens: number;
|
|
175
|
+
cacheWriteTokens: number;
|
|
176
|
+
reasoningTokens: number;
|
|
177
|
+
sawUsage: boolean;
|
|
178
|
+
}
|
|
179
|
+
export declare function createStreamState(wire: CommandCodeWire): CommandCodeStreamState;
|
|
180
|
+
/** Feed one SSE `data:` payload from `/chat/completions`. */
|
|
181
|
+
export declare function processOpenAIStreamLine(line: string, state: CommandCodeStreamState): StreamChunk[];
|
|
182
|
+
/** Feed one SSE `data:` payload from `/messages`. */
|
|
183
|
+
export declare function processAnthropicStreamLine(line: string, state: CommandCodeStreamState): StreamChunk[];
|
|
184
|
+
/**
|
|
185
|
+
* Fold one SSE line from `/responses`.
|
|
186
|
+
*
|
|
187
|
+
* The Responses stream is event-typed rather than delta-shaped: text arrives as
|
|
188
|
+
* `response.output_text.delta`, tool calls as `function_call_arguments.delta`
|
|
189
|
+
* keyed by an item id, and the turn ends on `response.completed` or
|
|
190
|
+
* `response.failed`. Those are read as written; there is no Chat Completions
|
|
191
|
+
* shape to reinterpret.
|
|
192
|
+
*/
|
|
193
|
+
export declare function processResponsesStreamLine(line: string, state: CommandCodeStreamState): StreamChunk[];
|
|
194
|
+
/** Flush every open block, then emit usage and the terminal finish. */
|
|
195
|
+
export declare function closeStream(state: CommandCodeStreamState): StreamChunk[];
|
|
196
|
+
/** Model families whose stream never carried a terminal event. */
|
|
197
|
+
export declare function assertStreamComplete(state: CommandCodeStreamState): void;
|
|
198
|
+
export {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AAM,EAAE,KAAK,EAAE,sBAAsB,GAAG,WAAW,EAAE,CAuKrG;AAmBD;;;;;;;;GAQG;AACH,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,sBAAsB,GAAG,WAAW,EAAE,CA4GrG;AAwFD,uEAAuE;AACvE,wBAAgB,WAAW,CAAC,KAAK,EAAE,sBAAsB,GAAG,WAAW,EAAE,CAOxE;AAED,kEAAkE;AAClE,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,sBAAsB,GAAG,IAAI,CAIxE"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Command Code model capability table.
|
|
3
|
+
*
|
|
4
|
+
* Transcribed from the official CLI's own model registry - the table it builds
|
|
5
|
+
* `createModelRegistry` over - which is the only authoritative source for which
|
|
6
|
+
* models accept image input and which reasoning levels each one exposes: the
|
|
7
|
+
* public `/provider/v1/models` listing carries an id, a display name, and a
|
|
8
|
+
* context length, but says nothing about modalities or reasoning.
|
|
9
|
+
*
|
|
10
|
+
* Transcribing means the whole table, not the entries someone happened to use.
|
|
11
|
+
* An id the table omits is not treated as merely unknown by the adapter: it
|
|
12
|
+
* falls back to text-only with NO reasoning ladder, so a real model missing
|
|
13
|
+
* from here silently loses its image input and its effort selector. That is how
|
|
14
|
+
* `deepseek/deepseek-v4.1-flash-fast` shipped with no thinking control while
|
|
15
|
+
* the live catalog had been serving it, and how `gpt-6-sol`, `gpt-6-luna`,
|
|
16
|
+
* `gpt-6.1-sol`, `claude-sonnet-5-5`, `claude-opus-5-5`, `xai/grok-4.7`,
|
|
17
|
+
* `z-ai/glm-5.3-flashx` and others went missing at once.
|
|
18
|
+
*
|
|
19
|
+
* Family heuristics are not a substitute. Within one vendor the split is not
|
|
20
|
+
* derivable from the id: `deepseek/deepseek-v4-flash` is text-only while
|
|
21
|
+
* `deepseek/deepseek-v4.1-flash` and `deepseek/deepseek-v4-flash-vision-exp` take
|
|
22
|
+
* images, and `z-ai/glm-5.3-flash` takes images while `zai-org/GLM-5.3` does not.
|
|
23
|
+
*
|
|
24
|
+
* THE TABLE BELOW is the registry `command-code@1.88.4` embeds in its CLI
|
|
25
|
+
* bundle (`dist/cli.mjs`), transcribed in full: 109 entries, in registry order.
|
|
26
|
+
* The redacted snapshot of that registry is checked in under
|
|
27
|
+
* `test/fixtures/command-code/official-model-catalog.json`, and
|
|
28
|
+
* `test/command-code-model-catalog.test.ts` compares this table against it
|
|
29
|
+
* entry by entry, so a later refresh that forgets a model fails the suite
|
|
30
|
+
* instead of shipping silently.
|
|
31
|
+
*
|
|
32
|
+
* Two registry facts are NOT carried through verbatim:
|
|
33
|
+
*
|
|
34
|
+
* - the `off` level, which Command Code spells "do not think" and DSH spells
|
|
35
|
+
* `none`. The translation happens in `reasoningEffortsFor` (see `./types.ts`),
|
|
36
|
+
* so the table stays a faithful transcription and keeps `off` where the
|
|
37
|
+
* registry puts it. Sending the literal `off` would be wrong in the other
|
|
38
|
+
* direction too: the OpenAI-family wire has no such level, so it is dropped
|
|
39
|
+
* rather than transmitted (see the request builders in `./mapper.ts`).
|
|
40
|
+
* - the `file` modality, which one model (`meta/muse-wonder-1.0`) declares and
|
|
41
|
+
* which DSH's own modality vocabulary does not carry. The table keeps it, and
|
|
42
|
+
* `inputModalitiesFor` narrows it away at the harness boundary.
|
|
43
|
+
*
|
|
44
|
+
* `maxTokens` is the cap the registry DECLARES, and most entries declare
|
|
45
|
+
* none. A null there means the provider decides the cap, not that the model
|
|
46
|
+
* has a small one, so a request must not invent a number for it (see
|
|
47
|
+
* `declaredMaxOutputTokens` in `./types.ts`).
|
|
48
|
+
*/
|
|
49
|
+
/**
|
|
50
|
+
* One modality the official registry declares for a model.
|
|
51
|
+
*
|
|
52
|
+
* `file` is part of the official vocabulary but not of DSH's: the harness's
|
|
53
|
+
* modality map knows `text` and `image`, and this route sends no file parts, so
|
|
54
|
+
* the registry's `file` never reaches the harness.
|
|
55
|
+
*/
|
|
56
|
+
export type CommandCodeModality = 'text' | 'image' | 'file';
|
|
57
|
+
export interface CommandCodeModelDef {
|
|
58
|
+
id: string;
|
|
59
|
+
name: string;
|
|
60
|
+
/** Accepted request modalities, exactly as the registry declares them. */
|
|
61
|
+
inputModalities: CommandCodeModality[];
|
|
62
|
+
/** Selectable reasoning levels; empty when the model exposes none. */
|
|
63
|
+
reasoningEfforts: string[];
|
|
64
|
+
/** Context window the registry declares, when it declares one. */
|
|
65
|
+
contextWindow: number | null;
|
|
66
|
+
/** Output cap the registry declares, when it declares one; null means it declares none. */
|
|
67
|
+
maxTokens: number | null;
|
|
68
|
+
/** Whether the official catalog hides the model from its own picker. */
|
|
69
|
+
hidden: boolean;
|
|
70
|
+
}
|
|
71
|
+
/** Every model the Command Code registry describes, in registry order. */
|
|
72
|
+
export declare const COMMAND_CODE_MODELS: readonly CommandCodeModelDef[];
|
|
73
|
+
/** Registry entry for one model id, or undefined when it describes no such model. */
|
|
74
|
+
export declare function commandCodeModelDef(modelId: string): CommandCodeModelDef | undefined;
|
|
75
|
+
/**
|
|
76
|
+
* One catalog refresh's changes to the shipped default selection, newest first.
|
|
77
|
+
*
|
|
78
|
+
* Applying these in order reconstructs every earlier unedited selection: remove
|
|
79
|
+
* the ids that refresh added, then restore the ids it retired. Keeping each
|
|
80
|
+
* generation separate matters once two refreshes have shipped; folding their
|
|
81
|
+
* additions into one list would skip the intermediate default entirely.
|
|
82
|
+
*/
|
|
83
|
+
export interface ShippedDefaultMigration {
|
|
84
|
+
version: string;
|
|
85
|
+
added: readonly string[];
|
|
86
|
+
retired: readonly string[];
|
|
87
|
+
}
|
|
88
|
+
/** Default-selection deltas recognized by `resolveEnabledModelIds` in `./routes.ts`. */
|
|
89
|
+
export declare const SHIPPED_DEFAULT_MIGRATIONS: readonly ShippedDefaultMigration[];
|
|
90
|
+
//# sourceMappingURL=model-catalog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model-catalog.d.ts","sourceRoot":"","sources":["../../../../src/host/command-code/model-catalog.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AAEH;;;;;;GAMG;AACH,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAA;AAE3D,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,0EAA0E;IAC1E,eAAe,EAAE,mBAAmB,EAAE,CAAA;IACtC,sEAAsE;IACtE,gBAAgB,EAAE,MAAM,EAAE,CAAA;IAC1B,kEAAkE;IAClE,aAAa,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,2FAA2F;IAC3F,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,wEAAwE;IACxE,MAAM,EAAE,OAAO,CAAA;CAChB;AAED,0EAA0E;AAC1E,eAAO,MAAM,mBAAmB,EAAE,SAAS,mBAAmB,EAs9B7D,CAAA;AAED,qFAAqF;AACrF,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,mBAAmB,GAAG,SAAS,CAEpF;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,SAAS,MAAM,EAAE,CAAA;IACxB,OAAO,EAAE,SAAS,MAAM,EAAE,CAAA;CAC3B;AAED,wFAAwF;AACxF,eAAO,MAAM,0BAA0B,EAAE,SAAS,uBAAuB,EAmCxE,CAAA"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { type Server } from 'node:http';
|
|
2
|
+
import { FileCredentialStore, type CommandCodeCredentials } from './token-store.ts';
|
|
3
|
+
import type { CommandCodeAccount } from '../../shared/command-code-contracts.ts';
|
|
4
|
+
export type CommandCodeLoginStatus = 'idle' | 'pending' | 'complete' | 'error';
|
|
5
|
+
export interface CommandCodeLoginFlowState {
|
|
6
|
+
status: CommandCodeLoginStatus;
|
|
7
|
+
authUrl?: string;
|
|
8
|
+
startedAt?: number;
|
|
9
|
+
completedAt?: number;
|
|
10
|
+
progress?: string;
|
|
11
|
+
account?: CommandCodeAccount;
|
|
12
|
+
error?: string;
|
|
13
|
+
}
|
|
14
|
+
/** Credential body the studio POSTs back to the loopback callback. */
|
|
15
|
+
export interface CommandCodeCallbackCredentials {
|
|
16
|
+
apiKey: string;
|
|
17
|
+
state: string;
|
|
18
|
+
userId: string;
|
|
19
|
+
userName: string;
|
|
20
|
+
keyName: string;
|
|
21
|
+
}
|
|
22
|
+
export declare function getWebLoginStatus(): CommandCodeLoginFlowState;
|
|
23
|
+
/** Reset the flow so a cancelled attempt cannot keep a later one from starting. */
|
|
24
|
+
export declare function resetWebLogin(): void;
|
|
25
|
+
export declare function openBrowser(url: string): void;
|
|
26
|
+
/** Browser sign-in URL; identical shape to the official CLI's. */
|
|
27
|
+
export declare function buildAuthUrl(input: {
|
|
28
|
+
port: number;
|
|
29
|
+
state: string;
|
|
30
|
+
}): string;
|
|
31
|
+
/** State token the studio must echo back; 32 random bytes, base64url. */
|
|
32
|
+
export declare function generateState(): string;
|
|
33
|
+
/**
|
|
34
|
+
* First free loopback port in the probe range.
|
|
35
|
+
*
|
|
36
|
+
* The studio receives the port in the callback URL, so any free port works;
|
|
37
|
+
* starting at the CLI's own default keeps behavior identical on a machine where
|
|
38
|
+
* a server-side allowlist is ever introduced. `probe` is the seam the tests walk
|
|
39
|
+
* a reserved run through, which is what lets the width of the window be asserted
|
|
40
|
+
* without binding a thousand real sockets on a machine whose own reservations
|
|
41
|
+
* move underneath the test.
|
|
42
|
+
*/
|
|
43
|
+
export declare function findAvailablePort(start?: number, attempts?: number, probe?: (port: number) => Promise<boolean>): Promise<number>;
|
|
44
|
+
export interface CommandCodeAuthServerHandle {
|
|
45
|
+
server: Server;
|
|
46
|
+
port: number;
|
|
47
|
+
/** Resolves once the studio has posted a credential (or rejects on denial). */
|
|
48
|
+
waitForCredentials: () => Promise<CommandCodeCallbackCredentials>;
|
|
49
|
+
close: () => void;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* One-shot loopback server the Command Code studio page posts the freshly
|
|
53
|
+
* minted API key to.
|
|
54
|
+
*
|
|
55
|
+
* The contract is the official CLI's, because the studio page is the same
|
|
56
|
+
* client: the browser POSTs `{apiKey,state,userId,userName,keyName}` as JSON or
|
|
57
|
+
* form data from `https://commandcode.ai`, so the endpoint must answer the
|
|
58
|
+
* cross-origin preflight (including Chrome's private-network request header)
|
|
59
|
+
* and then redirect the tab to a human-readable completion page.
|
|
60
|
+
*
|
|
61
|
+
* @param port - loopback port to bind; the caller resolved a free one.
|
|
62
|
+
* @param expectedState - state token the studio must echo back.
|
|
63
|
+
* @param options - landing grace and clock seams for tests.
|
|
64
|
+
*/
|
|
65
|
+
export declare function createAuthServer(port: number, expectedState: string, options?: {
|
|
66
|
+
landingGraceMs?: number;
|
|
67
|
+
}): Promise<CommandCodeAuthServerHandle>;
|
|
68
|
+
/**
|
|
69
|
+
* Start the browser sign-in.
|
|
70
|
+
*
|
|
71
|
+
* Resolves immediately with the flow state the settings card polls; the
|
|
72
|
+
* credential is validated against `/alpha/whoami` and persisted in the
|
|
73
|
+
* background, exactly like the manual key path, so a key that cannot
|
|
74
|
+
* authenticate is never stored.
|
|
75
|
+
*/
|
|
76
|
+
export declare function beginWebLogin(store: FileCredentialStore, options?: {
|
|
77
|
+
fetchFn?: typeof fetch;
|
|
78
|
+
openBrowser?: (url: string) => void;
|
|
79
|
+
timeoutMs?: number;
|
|
80
|
+
/** Called with the validated credential so a pool can keep every sign-in. */
|
|
81
|
+
onSave?: (credentials: CommandCodeCredentials) => Promise<unknown>;
|
|
82
|
+
}): Promise<CommandCodeLoginFlowState>;
|
|
83
|
+
/**
|
|
84
|
+
* Persist a manually entered API key after proving it authenticates.
|
|
85
|
+
*
|
|
86
|
+
* Manual entry is the recovery path when the browser flow is unavailable
|
|
87
|
+
* (headless host, blocked popup, or a key minted in Command Code Studio).
|
|
88
|
+
*/
|
|
89
|
+
export declare function saveApiKey(store: FileCredentialStore, apiKey: string, options?: {
|
|
90
|
+
fetchFn?: typeof fetch;
|
|
91
|
+
onSave?: (credentials: CommandCodeCredentials) => Promise<unknown>;
|
|
92
|
+
}): Promise<CommandCodeAccount>;
|
|
93
|
+
/** Stable per-attempt id the settings card can correlate; kept for symmetry with other routes. */
|
|
94
|
+
export declare function newLoginAttemptId(): string;
|
|
95
|
+
//# sourceMappingURL=oauth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oauth.d.ts","sourceRoot":"","sources":["../../../../src/host/command-code/oauth.ts"],"names":[],"mappings":"AAEA,OAAO,EAAsC,KAAK,MAAM,EAAuB,MAAM,WAAW,CAAA;AAehG,OAAO,EAAE,mBAAmB,EAAE,KAAK,sBAAsB,EAAE,MAAM,kBAAkB,CAAA;AAEnF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAA;AAEhF,MAAM,MAAM,sBAAsB,GAAG,MAAM,GAAG,SAAS,GAAG,UAAU,GAAG,OAAO,CAAA;AAE9E,MAAM,WAAW,yBAAyB;IACxC,MAAM,EAAE,sBAAsB,CAAA;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,OAAO,CAAC,EAAE,kBAAkB,CAAA;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,sEAAsE;AACtE,MAAM,WAAW,8BAA8B;IAC7C,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;CAChB;AAID,wBAAgB,iBAAiB,IAAI,yBAAyB,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C,CAAA;CAC9D,GACL,OAAO,CAAC,yBAAyB,CAAC,CAqEpC;AAED;;;;;GAKG;AACH,wBAAsB,UAAU,CAC9B,KAAK,EAAE,mBAAmB,EAC1B,MAAM,EAAE,MAAM,EACd,OAAO,GAAE;IAAE,OAAO,CAAC,EAAE,OAAO,KAAK,CAAC;IAAC,MAAM,CAAC,EAAE,CAAC,WAAW,EAAE,sBAAsB,KAAK,OAAO,CAAC,OAAO,CAAC,CAAA;CAAO,GAC3G,OAAO,CAAC,kBAAkB,CAAC,CAkB7B;AAED,kGAAkG;AAClG,wBAAgB,iBAAiB,IAAI,MAAM,CAE1C"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Command Code subscription plans.
|
|
3
|
+
*
|
|
4
|
+
* Transcribed from the official CLI's own plan table, which is the only place
|
|
5
|
+
* the service's `planId` strings are given human names — `/alpha/whoami` says
|
|
6
|
+
* nothing about the plan and `/alpha/billing/subscriptions` only reports the
|
|
7
|
+
* machine id (`individual-goat`), so a card that shows the raw id shows nothing
|
|
8
|
+
* a user recognizes.
|
|
9
|
+
*/
|
|
10
|
+
/** One subscription plan, with the monthly credit allowance the CLI assigns it. */
|
|
11
|
+
export interface CommandCodePlan {
|
|
12
|
+
id: string;
|
|
13
|
+
/** Display name the CLI renders, e.g. `GOAT`. */
|
|
14
|
+
name: string;
|
|
15
|
+
/** Monthly credit allowance the plan grants. */
|
|
16
|
+
monthlyCredits: number;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Every plan, longest id first.
|
|
20
|
+
*
|
|
21
|
+
* The order matters: the service appends suffixes (`individual-pro-v1`) and
|
|
22
|
+
* shares prefixes across plans (`individual-pro` is a prefix of both
|
|
23
|
+
* `individual-pro-v1` and `individual-provider`), so the match must try the
|
|
24
|
+
* longest id first or `individual-provider` would resolve to `Pro`.
|
|
25
|
+
*/
|
|
26
|
+
export declare const COMMAND_CODE_PLANS: readonly CommandCodePlan[];
|
|
27
|
+
/**
|
|
28
|
+
* Resolve one `planId` string to its plan.
|
|
29
|
+
*
|
|
30
|
+
* The service is not consistent about case or separators, so the id is
|
|
31
|
+
* normalized before matching and the comparison is a prefix test, exactly as
|
|
32
|
+
* the CLI does it.
|
|
33
|
+
*
|
|
34
|
+
* @param planId - raw id from the subscription or credits payload.
|
|
35
|
+
* @returns the matching plan, or null when the id is absent or unrecognized.
|
|
36
|
+
*/
|
|
37
|
+
export declare function resolveCommandCodePlan(planId: string | null | undefined): CommandCodePlan | null;
|
|
38
|
+
/** Display name for one plan id, falling back to the raw id so nothing is hidden. */
|
|
39
|
+
export declare function commandCodePlanLabel(planId: string | null | undefined): string | null;
|
|
40
|
+
//# sourceMappingURL=plans.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plans.d.ts","sourceRoot":"","sources":["../../../../src/host/command-code/plans.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,mFAAmF;AACnF,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAA;IACV,iDAAiD;IACjD,IAAI,EAAE,MAAM,CAAA;IACZ,gDAAgD;IAChD,cAAc,EAAE,MAAM,CAAA;CACvB;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,EAAE,SAAS,eAAe,EASxD,CAAA;AAED;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,eAAe,GAAG,IAAI,CAKhG;AAED,qFAAqF;AACrF,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,IAAI,CAGrF"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
2
|
+
import { PROVIDER_ID, PROVIDER_NAME } from './types.ts';
|
|
3
|
+
import { FileCredentialStore, FileModelSettingsStore, type CommandCodeCatalogModel, type CommandCodePreferenceStore } from './token-store.ts';
|
|
4
|
+
import { CommandCodeAccountPool } from './account-pool.ts';
|
|
5
|
+
import { getCachedCatalog } from './client.ts';
|
|
6
|
+
import type { CommandCodeApiEnv, CommandCodeWebStatus } from '../../shared/command-code-contracts.ts';
|
|
7
|
+
/**
|
|
8
|
+
* The selection the card should show.
|
|
9
|
+
*
|
|
10
|
+
* A stored list that still equals the shipped default has never been edited, so
|
|
11
|
+
* it cannot know about models the live catalog has since added; treating it as
|
|
12
|
+
* "everything currently offered" keeps a first run from hiding the whole
|
|
13
|
+
* catalog behind an unedited default. Any explicit edit is honoured exactly.
|
|
14
|
+
*
|
|
15
|
+
* The default the PREVIOUS release shipped counts as well: a catalog refresh
|
|
16
|
+
* moves models in and out of the default, and a user who never touched the
|
|
17
|
+
* selection still carries the old list. Calling that list edited would hide
|
|
18
|
+
* every model the refresh added behind a list nobody touched, so the ids the
|
|
19
|
+
* refresh moved are used to rebuild the previous default and compare with it.
|
|
20
|
+
*/
|
|
21
|
+
export declare function resolveEnabledModelIds(stored: readonly string[], catalog: readonly CommandCodeCatalogModel[], enabled?: boolean): string[];
|
|
22
|
+
export interface CommandCodeStatusOptions {
|
|
23
|
+
fetchFn?: typeof fetch;
|
|
24
|
+
/** Whether this plugin currently owns the provider route; re-read on every status. */
|
|
25
|
+
serving?: boolean | (() => boolean);
|
|
26
|
+
/** Diagnostic when another plugin owns the provider route; re-read on every status. */
|
|
27
|
+
conflict?: string | null | (() => string | null);
|
|
28
|
+
/**
|
|
29
|
+
* Account pool instance used for multi-account management.
|
|
30
|
+
*
|
|
31
|
+
* Only the plugin entry installs one, because it owns the pool's storage. A
|
|
32
|
+
* caller that passes none keeps the single-key behavior, and no code path
|
|
33
|
+
* invents pool state that would outlive the process.
|
|
34
|
+
*/
|
|
35
|
+
accountPool?: CommandCodeAccountPool;
|
|
36
|
+
/** Whether Zero Data Retention (ZDR) routing is active for Command Code requests. */
|
|
37
|
+
zeroDataRetention?: boolean;
|
|
38
|
+
}
|
|
39
|
+
/** Everything the settings card renders: account, quota, and the model catalog. */
|
|
40
|
+
export declare function getCommandCodeWebStatus(store: FileCredentialStore, modelSettings: FileModelSettingsStore, preferences?: CommandCodePreferenceStore, options?: CommandCodeStatusOptions, accountPool?: CommandCodeAccountPool | undefined): Promise<CommandCodeWebStatus>;
|
|
41
|
+
/** Register the Command Code settings routes under `/command-code/api`. */
|
|
42
|
+
export declare function registerCommandCodeRoutes(ctx: Context, store: FileCredentialStore, modelSettings: FileModelSettingsStore, preferences?: CommandCodePreferenceStore, options?: CommandCodeStatusOptions, accountPool?: CommandCodeAccountPool | undefined): () => void;
|
|
43
|
+
export { PROVIDER_ID, PROVIDER_NAME, type CommandCodeApiEnv, getCachedCatalog };
|
|
44
|
+
//# sourceMappingURL=routes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../../src/host/command-code/routes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAIlD,OAAO,EAAmB,WAAW,EAAE,aAAa,EAAqC,MAAM,YAAY,CAAA;AAG3G,OAAO,EACL,mBAAmB,EACnB,sBAAsB,EACtB,KAAK,uBAAuB,EAE5B,KAAK,0BAA0B,EAChC,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAA;AAE1D,OAAO,EAKL,gBAAgB,EAQjB,MAAM,aAAa,CAAA;AAGpB,OAAO,KAAK,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAA;AAqDrG;;;;;;;;;;;;;GAaG;AACH,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,SAAS,MAAM,EAAE,EACzB,OAAO,EAAE,SAAS,uBAAuB,EAAE,EAC3C,OAAO,UAAO,GACb,MAAM,EAAE,CAOV;AA0BD,MAAM,WAAW,wBAAwB;IACvC,OAAO,CAAC,EAAE,OAAO,KAAK,CAAA;IACtB,sFAAsF;IACtF,OAAO,CAAC,EAAE,OAAO,GAAG,CAAC,MAAM,OAAO,CAAC,CAAA;IACnC,uFAAuF;IACvF,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,CAAC,MAAM,MAAM,GAAG,IAAI,CAAC,CAAA;IAChD;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,sBAAsB,CAAA;IACpC,qFAAqF;IACrF,iBAAiB,CAAC,EAAE,OAAO,CAAA;CAC5B;AAMD,mFAAmF;AACnF,wBAAsB,uBAAuB,CAC3C,KAAK,EAAE,mBAAmB,EAC1B,aAAa,EAAE,sBAAsB,EACrC,WAAW,CAAC,EAAE,0BAA0B,EACxC,OAAO,GAAE,wBAA6B,EACtC,WAAW,GAAE,sBAAsB,GAAG,SAA+B,GACpE,OAAO,CAAC,oBAAoB,CAAC,CA+E/B;AAED,2EAA2E;AAC3E,wBAAgB,yBAAyB,CACvC,GAAG,EAAE,OAAO,EACZ,KAAK,EAAE,mBAAmB,EAC1B,aAAa,EAAE,sBAAsB,EACrC,WAAW,CAAC,EAAE,0BAA0B,EACxC,OAAO,GAAE,wBAA6B,EACtC,WAAW,GAAE,sBAAsB,GAAG,SAA+B,GACpE,MAAM,IAAI,CAkPZ;AAED,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,KAAK,iBAAiB,EAAE,gBAAgB,EAAE,CAAA"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import type { CommandCodeApiEnv, CommandCodeReasoningEffort } from '../../shared/command-code-contracts.ts';
|
|
2
|
+
import type { CredentialStore } from '../token-store.ts';
|
|
3
|
+
import { type ContextWindowOverridePatch } from '../common/context-window-overrides.ts';
|
|
4
|
+
export declare const COMMAND_CODE_PREFERENCES_NAMESPACE = "dsh-command-code";
|
|
5
|
+
export type { CommandCodeReasoningEffort };
|
|
6
|
+
/**
|
|
7
|
+
* One stored Command Code credential.
|
|
8
|
+
*
|
|
9
|
+
* The provider API authenticates with a bearer API key rather than the rotating
|
|
10
|
+
* OAuth pair the other routes in this plugin store, so there is no refresh
|
|
11
|
+
* token and nothing expires. The browser sign-in returns the same key a user
|
|
12
|
+
* can paste by hand, which is why both paths converge on this shape.
|
|
13
|
+
*/
|
|
14
|
+
export interface CommandCodeCredentials {
|
|
15
|
+
/** Bearer key issued by Command Code Studio. Host-only; never sent to a browser. */
|
|
16
|
+
apiKey: string;
|
|
17
|
+
userId?: string;
|
|
18
|
+
userName?: string;
|
|
19
|
+
email?: string;
|
|
20
|
+
keyName?: string;
|
|
21
|
+
organizationName?: string;
|
|
22
|
+
planLabel?: string;
|
|
23
|
+
planId?: string;
|
|
24
|
+
/** Unix milliseconds the key was obtained. */
|
|
25
|
+
authenticatedAt?: number;
|
|
26
|
+
/** Which API deployment the key belongs to. */
|
|
27
|
+
apiEnv?: CommandCodeApiEnv;
|
|
28
|
+
}
|
|
29
|
+
export interface CommandCodeCatalogModel {
|
|
30
|
+
id: string;
|
|
31
|
+
name?: string;
|
|
32
|
+
contextWindow?: number;
|
|
33
|
+
/**
|
|
34
|
+
* Endpoints the provider published for this model, verbatim.
|
|
35
|
+
*
|
|
36
|
+
* Absent means the listing said nothing, and the adapter then routes on the
|
|
37
|
+
* shipped table instead — never on a guess about an unlisted model.
|
|
38
|
+
*/
|
|
39
|
+
supportedEndpoints?: string[];
|
|
40
|
+
}
|
|
41
|
+
export interface CommandCodeModelSettings {
|
|
42
|
+
enabled?: boolean;
|
|
43
|
+
enabledModelIds: string[];
|
|
44
|
+
catalogModels: CommandCodeCatalogModel[];
|
|
45
|
+
contextWindowOverrides: Record<string, number>;
|
|
46
|
+
defaultReasoningEffort: CommandCodeReasoningEffort | null;
|
|
47
|
+
}
|
|
48
|
+
export interface CommandCodePreferenceStore {
|
|
49
|
+
status(): CommandCodeModelSettings;
|
|
50
|
+
update(patch: {
|
|
51
|
+
enabled?: boolean;
|
|
52
|
+
enabledModelIds?: string[];
|
|
53
|
+
/** `null` deletes one override and falls back to the catalog default. */
|
|
54
|
+
contextWindowOverrides?: ContextWindowOverridePatch;
|
|
55
|
+
defaultReasoningEffort?: CommandCodeReasoningEffort | null;
|
|
56
|
+
}): Promise<CommandCodeModelSettings>;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Bind the model selection to the DSH settings document when the harness still
|
|
60
|
+
* offers one, and to the JSON file beside it otherwise: a harness without the
|
|
61
|
+
* register seam (0.1.7, and a headless test) reads that file back on boot.
|
|
62
|
+
*/
|
|
63
|
+
export declare function registerCommandCodePreferenceStore(settings?: unknown, fallbackStore?: FileModelSettingsStore): CommandCodePreferenceStore;
|
|
64
|
+
export declare function credentialPath(): string;
|
|
65
|
+
export declare function modelSettingsPath(): string;
|
|
66
|
+
export declare function parseCommandCodeCredentials(value: unknown): CommandCodeCredentials;
|
|
67
|
+
/** Encrypted credential store; the plaintext JSON is only a migration source. */
|
|
68
|
+
export declare class FileCredentialStore {
|
|
69
|
+
private readonly filePath;
|
|
70
|
+
private readonly backend;
|
|
71
|
+
constructor(filePath?: string, backend?: CredentialStore<CommandCodeCredentials>);
|
|
72
|
+
path(): string;
|
|
73
|
+
private serialize;
|
|
74
|
+
private removeLegacy;
|
|
75
|
+
private saveVerified;
|
|
76
|
+
read(): Promise<CommandCodeCredentials | null>;
|
|
77
|
+
write(credentials: CommandCodeCredentials): Promise<void>;
|
|
78
|
+
delete(): Promise<void>;
|
|
79
|
+
}
|
|
80
|
+
/** Plain-JSON model settings used when the settings service is unavailable. */
|
|
81
|
+
export declare class FileModelSettingsStore {
|
|
82
|
+
private readonly filePath;
|
|
83
|
+
constructor(filePath?: string);
|
|
84
|
+
path(): string;
|
|
85
|
+
read(): Promise<CommandCodeModelSettings>;
|
|
86
|
+
write(settings: CommandCodeModelSettings): Promise<void>;
|
|
87
|
+
updateSettings(patch: {
|
|
88
|
+
enabled?: boolean;
|
|
89
|
+
enabledModelIds?: string[];
|
|
90
|
+
/** `null` deletes one override and falls back to the catalog default. */
|
|
91
|
+
contextWindowOverrides?: ContextWindowOverridePatch;
|
|
92
|
+
defaultReasoningEffort?: CommandCodeReasoningEffort | null;
|
|
93
|
+
}): Promise<CommandCodeModelSettings>;
|
|
94
|
+
setCatalogModels(catalogModels: CommandCodeCatalogModel[], options?: {
|
|
95
|
+
enabledModelIds?: string[];
|
|
96
|
+
}): Promise<CommandCodeModelSettings>;
|
|
97
|
+
}
|
|
98
|
+
/** Environment the credential was last used against; defaults to the current one. */
|
|
99
|
+
export declare function credentialApiEnv(credentials: CommandCodeCredentials | null): CommandCodeApiEnv;
|
|
100
|
+
//# sourceMappingURL=token-store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"token-store.d.ts","sourceRoot":"","sources":["../../../../src/host/command-code/token-store.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,iBAAiB,EAAE,0BAA0B,EAAE,MAAM,wCAAwC,CAAA;AAG3G,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAExD,OAAO,EAA+B,KAAK,0BAA0B,EAAE,MAAM,uCAAuC,CAAA;AAMpH,eAAO,MAAM,kCAAkC,qBAAqB,CAAA;AAEpE,YAAY,EAAE,0BAA0B,EAAE,CAAA;AAO1C;;;;;;;GAOG;AACH,MAAM,WAAW,sBAAsB;IACrC,oFAAoF;IACpF,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,8CAA8C;IAC9C,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,+CAA+C;IAC/C,MAAM,CAAC,EAAE,iBAAiB,CAA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