@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,275 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Image resolution, byte budgeting and data-URL handling for one request.
|
|
3
|
+
*
|
|
4
|
+
* Shared by the provider lines that send inline images, because the budget is a
|
|
5
|
+
* property of the deployment rather than of any one endpoint, and because two
|
|
6
|
+
* lines that budget differently send different request bytes for the same picture.
|
|
7
|
+
*
|
|
8
|
+
* The notable decision is SCALE, not drop: see {@link resolveRequestImages}.
|
|
9
|
+
*
|
|
10
|
+
* @module dsh-multi-provider/request-images
|
|
11
|
+
*/
|
|
12
|
+
import type { GenerateOptions } from "./llm-compat.ts";
|
|
13
|
+
import type { AttachmentStore, ImageAttachmentRef } from "@deepseek-ai/dsh-attachment";
|
|
14
|
+
/**
|
|
15
|
+
* Attachment seam this route needs: verified bytes for one durable image, and a
|
|
16
|
+
* downscaled request version of one that does not fit the image budget.
|
|
17
|
+
*
|
|
18
|
+
* Every harness generation in the peer range declares readImageRequest; a
|
|
19
|
+
* backend that cannot derive request versions rejects the call, and that
|
|
20
|
+
* rejection is handled like any other unreadable image.
|
|
21
|
+
*/
|
|
22
|
+
export type AttachmentImageReader = Pick<AttachmentStore, 'readImage' | 'readImageRequest'>;
|
|
23
|
+
/** One durable user image resolved for an in-flight request, or proven unreadable. */
|
|
24
|
+
export type ResolvedRequestImage = {
|
|
25
|
+
readonly kind: 'inline';
|
|
26
|
+
readonly mediaType: string;
|
|
27
|
+
readonly data: string;
|
|
28
|
+
} | {
|
|
29
|
+
readonly kind: 'unavailable';
|
|
30
|
+
};
|
|
31
|
+
/** Resolved images keyed by durable attachment id; consumed by one request build. */
|
|
32
|
+
export type ResolvedRequestImages = ReadonlyMap<string, ResolvedRequestImage>;
|
|
33
|
+
export declare const NO_RESOLVED_IMAGES: ResolvedRequestImages;
|
|
34
|
+
/**
|
|
35
|
+
* Base64 image payload one request may carry.
|
|
36
|
+
*
|
|
37
|
+
* Kimi rejects a request whose total message size exceeds 2 MB with a 400, and
|
|
38
|
+
* the image bytes share that budget with the conversation text, tool schemas,
|
|
39
|
+
* and system prompt — so the bound is deliberately the smaller of the two
|
|
40
|
+
* documented limits rather than the largest body the transport would accept.
|
|
41
|
+
*/
|
|
42
|
+
export declare const MAX_REQUEST_IMAGE_BYTES = 1500000;
|
|
43
|
+
/** Message-body ceiling the service documents for one request. */
|
|
44
|
+
export declare const MAX_MESSAGE_BODY_BYTES = 2097152;
|
|
45
|
+
/**
|
|
46
|
+
* Body ceiling once a request carries video.
|
|
47
|
+
*
|
|
48
|
+
* The 2 MB figure above is the documented limit for text and images, and it is
|
|
49
|
+
* far too small for video: a single frame-sequence clip dwarfs it. Kimi's own
|
|
50
|
+
* video guidance carries a separate, much larger request budget, so the ceiling
|
|
51
|
+
* is raised only for a request that actually attaches video. A text-only or
|
|
52
|
+
* image-only request keeps the tighter guard, because catching that 400 locally
|
|
53
|
+
* is the whole reason it exists.
|
|
54
|
+
*/
|
|
55
|
+
export declare const MAX_VIDEO_MESSAGE_BODY_BYTES: number;
|
|
56
|
+
/**
|
|
57
|
+
* Base64 video budget for one request.
|
|
58
|
+
*
|
|
59
|
+
* Deliberately below {@link MAX_VIDEO_MESSAGE_BODY_BYTES} so the surrounding
|
|
60
|
+
* JSON envelope, tool schemas and text still fit; the oldest clips are dropped
|
|
61
|
+
* first once the total would exceed it.
|
|
62
|
+
*/
|
|
63
|
+
export declare const MAX_REQUEST_VIDEO_BYTES: number;
|
|
64
|
+
/** Media types both upstream wires accept as inline base64. */
|
|
65
|
+
export declare const SUPPORTED_IMAGE_MEDIA_TYPES: Set<string>;
|
|
66
|
+
export declare function attachmentLabel(block: Record<string, unknown>): string | undefined;
|
|
67
|
+
/**
|
|
68
|
+
* Wire-level base64 payload of each image occurrence one request carries, in the
|
|
69
|
+
* order the request sends them, so index N is the Nth oldest image.
|
|
70
|
+
*/
|
|
71
|
+
export declare function requestImagePayloadLengths(options: GenerateOptions, images?: ResolvedRequestImages): number[];
|
|
72
|
+
/** How many of the oldest occurrences must go to bring the total under `maxBytes`. */
|
|
73
|
+
export declare function imagesToOffloadCount(lengths: readonly number[], maxBytes: number): number;
|
|
74
|
+
/**
|
|
75
|
+
* Replace the first `count` image occurrences with a visible placeholder,
|
|
76
|
+
* recursing into tool results. Durable history is untouched; only the request
|
|
77
|
+
* about to be sent changes.
|
|
78
|
+
*
|
|
79
|
+
* `images` must be the same resolution {@link requestImagePayloadLengths} was
|
|
80
|
+
* measured with. An image that resolved to `unavailable` is already serialized
|
|
81
|
+
* as a short text placeholder, so dropping it frees no bytes — counting it as
|
|
82
|
+
* replaceable here would shift every later occurrence by one against the
|
|
83
|
+
* measured lengths, and the caller would under-drop for as long as such an
|
|
84
|
+
* image is in the conversation.
|
|
85
|
+
*/
|
|
86
|
+
export declare function replaceOldestRequestImages(options: GenerateOptions, count: number, images?: ResolvedRequestImages): GenerateOptions;
|
|
87
|
+
/**
|
|
88
|
+
* Longest edge any image of this request may keep.
|
|
89
|
+
*
|
|
90
|
+
* Kimi's own client compresses an oversized image down to roughly 2 MB of raw
|
|
91
|
+
* bytes before it sends it, and this route has to fit every image of one request
|
|
92
|
+
* inside a far smaller shared budget. Screening on the long edge rather than on
|
|
93
|
+
* the encoded size is what makes the decision stable: it reads only the
|
|
94
|
+
* attachment's own dimensions, so the same image yields the same target in every
|
|
95
|
+
* later turn and the cached prefix survives.
|
|
96
|
+
*/
|
|
97
|
+
export declare const REQUEST_IMAGE_MAX_EDGE = 1024;
|
|
98
|
+
/**
|
|
99
|
+
* Cross-generation request-image target accepted by every harness in the peer
|
|
100
|
+
* range:
|
|
101
|
+
* - DSH `0.2.3-alpha.1+` reads `width`, `height`, `maxImageBytes`, and `imageTargetBytes`
|
|
102
|
+
* - DSH `0.1.3`..`0.2.2-rc.5` reads `width`, `height`, and `maxBytes`
|
|
103
|
+
* - DSH `0.1.2-alpha.5` reads `maxPixels` and `maxBytes`
|
|
104
|
+
*/
|
|
105
|
+
export interface CompatImageRequestTarget {
|
|
106
|
+
width: number;
|
|
107
|
+
height: number;
|
|
108
|
+
maxImageBytes: number;
|
|
109
|
+
imageTargetBytes: number;
|
|
110
|
+
maxBytes: number;
|
|
111
|
+
maxPixels?: number;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Request-version target for one stored image whose long edge is over the
|
|
115
|
+
* ceiling, or undefined when it fits and is sent as stored.
|
|
116
|
+
*
|
|
117
|
+
* A reference without usable dimensions is sent as stored: there is no basis
|
|
118
|
+
* for choosing a target, and the budget fallback still applies to it.
|
|
119
|
+
*/
|
|
120
|
+
export declare function requestImageTarget(ref: ImageAttachmentRef, edge?: number): (CompatImageRequestTarget & {
|
|
121
|
+
maxPixels: number;
|
|
122
|
+
}) | undefined;
|
|
123
|
+
export declare function requestImageTargetOrOriginal(ref: ImageAttachmentRef, edge?: number): CompatImageRequestTarget;
|
|
124
|
+
/**
|
|
125
|
+
* Replace the oldest inline images with a text placeholder once one request
|
|
126
|
+
* would carry more than `maxBytes` of base64 image data.
|
|
127
|
+
*
|
|
128
|
+
* The MECHANISM is shared because it is generic: measure the retained
|
|
129
|
+
* occurrences' encoded length, drop oldest-first, leave durable history alone.
|
|
130
|
+
* The BUDGET is not, and it is a parameter for exactly that reason — an
|
|
131
|
+
* image budget is a property of the upstream gateway, and importing one route's
|
|
132
|
+
* number into another refuses that other route's own legal images. The default
|
|
133
|
+
* is Kimi's, so every existing call site is byte-for-byte unchanged; a route
|
|
134
|
+
* with a different ceiling passes its own.
|
|
135
|
+
*
|
|
136
|
+
* Durable history is untouched; only the request about to be sent changes.
|
|
137
|
+
*/
|
|
138
|
+
export declare function offloadOldestRequestImages(options: GenerateOptions, maxBytes?: number, images?: ResolvedRequestImages): GenerateOptions;
|
|
139
|
+
/**
|
|
140
|
+
* A stable identity for one image occurrence.
|
|
141
|
+
*
|
|
142
|
+
* Two occurrences of the SAME picture have to share one identity, and that
|
|
143
|
+
* identity has to survive the turn: a durable attachment keeps its id, and an
|
|
144
|
+
* inline payload keeps its bytes, so hashing the payload names the same
|
|
145
|
+
* picture the same way on every later request.
|
|
146
|
+
*
|
|
147
|
+
* `undefined` for a block that carries no sendable payload: an image that
|
|
148
|
+
* resolved to `unavailable` is serialized as a short text placeholder, so it
|
|
149
|
+
* is not an image on the wire and has nothing to remember.
|
|
150
|
+
*/
|
|
151
|
+
export declare function requestImageKey(block: Record<string, unknown>, images?: ResolvedRequestImages): string | undefined;
|
|
152
|
+
/**
|
|
153
|
+
* Inline base64 bytes one request actually carries.
|
|
154
|
+
*
|
|
155
|
+
* `inlineExcludedKeys` names occurrences serialized as hosted references on
|
|
156
|
+
* this build. Their original resolution still supplies the identity, but the
|
|
157
|
+
* reference—not the base64 payload—is what goes on the wire, so those bytes
|
|
158
|
+
* must not be reported as request image usage.
|
|
159
|
+
*/
|
|
160
|
+
export declare function requestInlineImageBytes(options: GenerateOptions, images?: ResolvedRequestImages, inlineExcludedKeys?: ReadonlySet<string>): number;
|
|
161
|
+
/**
|
|
162
|
+
* The identities of the images one request still carries, each once.
|
|
163
|
+
*
|
|
164
|
+
* The caller compares two of these to learn what a later build gave back: the
|
|
165
|
+
* difference names the images a body-fit pass dropped after the budget pass
|
|
166
|
+
* had already run.
|
|
167
|
+
*/
|
|
168
|
+
export declare function collectRemainingImageKeys(options: GenerateOptions, images?: ResolvedRequestImages): string[];
|
|
169
|
+
/**
|
|
170
|
+
* What one sticky image-budget pass did.
|
|
171
|
+
*
|
|
172
|
+
* The identities travel out because they are the whole point: a picture the
|
|
173
|
+
* budget gave back has to stay gone for the rest of the session, and only the
|
|
174
|
+
* caller can remember that across requests.
|
|
175
|
+
*/
|
|
176
|
+
export interface StickyImageOffloadResult {
|
|
177
|
+
/** The request to send, with every dropped image replaced. */
|
|
178
|
+
readonly options: GenerateOptions;
|
|
179
|
+
/** Base64 image bytes the request still carries. */
|
|
180
|
+
readonly remainingBytes: number;
|
|
181
|
+
/** How many image occurrences were replaced in this request. */
|
|
182
|
+
readonly droppedCount: number;
|
|
183
|
+
/** Identities this pass dropped, which were not dropped before. */
|
|
184
|
+
readonly newlyDroppedKeys: string[];
|
|
185
|
+
/** Every identity dropped so far, this pass included. */
|
|
186
|
+
readonly allDroppedKeys: Set<string>;
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* Offload images against a budget that RECOVERS instead of a budget that resets.
|
|
190
|
+
*
|
|
191
|
+
* WHY THE TWO WATERMARKS. A single ceiling makes the retained prefix depend
|
|
192
|
+
* on the request: two conversations carrying the same images drop a different
|
|
193
|
+
* number of them as one more image arrives, so the prefix the service cached
|
|
194
|
+
* is rewritten on the next turn and the cache is cold again. Native `kimi-cli`
|
|
195
|
+
* therefore keeps a HIGH mark (20 MiB) and a LOW mark (10 MiB): the request
|
|
196
|
+
* is allowed to grow to the high mark, and once it passes it, the oldest
|
|
197
|
+
* images are given back until the request is back under the LOW mark. The gap
|
|
198
|
+
* between the two is the slack that keeps the number of retained images — and
|
|
199
|
+
* therefore the cached prefix — stable across turns.
|
|
200
|
+
*
|
|
201
|
+
* WHY THE DROPS ARE STICKY. The images a request gives back are replaced for
|
|
202
|
+
* the REST of the session: `priorDroppedKeys` carries the identities a
|
|
203
|
+
* previous turn already dropped, and they are replaced again here. A picture
|
|
204
|
+
* that was omitted stays omitted, so the request the service caches stops
|
|
205
|
+
* changing once the session has settled under its low mark.
|
|
206
|
+
*
|
|
207
|
+
* @param options - the request to budget.
|
|
208
|
+
* @param maxBytes - high-water mark; images are untouched below it.
|
|
209
|
+
* @param lowBytes - low-water mark; the trimming stops once the request is back under it.
|
|
210
|
+
* @param images - the resolution the request will be sent with.
|
|
211
|
+
* @param priorDroppedKeys - identities dropped by earlier turns.
|
|
212
|
+
* @param inlineExcludedKeys - identities whose actual wire form is a hosted
|
|
213
|
+
* reference rather than inline bytes. They stay in request order with a zero
|
|
214
|
+
* byte weight; only genuinely inline images consume this budget.
|
|
215
|
+
* @param maxImageBytes - per-image limit when the mapper independently replaces
|
|
216
|
+
* larger images with placeholders. Those images do not consume the total budget.
|
|
217
|
+
*/
|
|
218
|
+
export declare function offloadRequestImagesWithStickyBudget(options: GenerateOptions, maxBytes?: number, lowBytes?: number, images?: ResolvedRequestImages, priorDroppedKeys?: ReadonlySet<string>, inlineExcludedKeys?: ReadonlySet<string>, maxImageBytes?: number): StickyImageOffloadResult;
|
|
219
|
+
/**
|
|
220
|
+
* Whether a request still carries at least one image the mapper can send.
|
|
221
|
+
*
|
|
222
|
+
* A request whose images have all been replaced by placeholders can no longer
|
|
223
|
+
* shrink, which is what separates "drop more images" from "this body is too
|
|
224
|
+
* large for a reason no image budget can fix".
|
|
225
|
+
*
|
|
226
|
+
* DEFINED AS the counter, not as a traversal of its own. The two have to agree
|
|
227
|
+
* by construction: when they did not, {@link collectRequestImagePayloads} saw
|
|
228
|
+
* the images inside a `tool-result` — which is where a `read_image` result
|
|
229
|
+
* or a screenshot lands — while this answer reported that nothing was left to
|
|
230
|
+
* give back, so the body-fit loop refused a request that dropping one image
|
|
231
|
+
* would have fitted. A fifth hand-written recursion would have fixed that one
|
|
232
|
+
* instance; deriving one from the other makes the next drift impossible rather
|
|
233
|
+
* than merely unlikely.
|
|
234
|
+
*
|
|
235
|
+
* `images` must be the same resolution the builder will use. An image that
|
|
236
|
+
* resolved to `unavailable` is serialized as text and therefore is not a
|
|
237
|
+
* sendable image; reporting it as one only spins the loop until it gives up.
|
|
238
|
+
*/
|
|
239
|
+
export declare function requestHasSendableImage(options: GenerateOptions, images?: ResolvedRequestImages): boolean;
|
|
240
|
+
/**
|
|
241
|
+
* Read every durable `{ type: 'image', attachment }` block one request carries.
|
|
242
|
+
* An unreadable image resolves to `unavailable` rather than disappearing, so
|
|
243
|
+
* the model is told the picture is missing instead of answering about a blank.
|
|
244
|
+
*
|
|
245
|
+
* An image whose long edge is over the ceiling is sent as the harness's
|
|
246
|
+
* downscaled request version (see {@link requestImageTarget}). The stored image
|
|
247
|
+
* and durable history do not change, and an image that already fits is sent
|
|
248
|
+
* byte-for-byte as stored.
|
|
249
|
+
*
|
|
250
|
+
* The ceiling is a PARAMETER because it belongs to the upstream route, exactly
|
|
251
|
+
* like the image budget: `edge` defaults to the shared
|
|
252
|
+
* {@link REQUEST_IMAGE_MAX_EDGE}, so every caller that does not name one keeps
|
|
253
|
+
* the ceiling it always had. A route whose own CLI downscales to a different
|
|
254
|
+
* long edge passes its value here and gets the same number in both places that
|
|
255
|
+
* matter — the target it asks the attachment store for AND the check that the
|
|
256
|
+
* version handed back really is that target. Deriving the target from one
|
|
257
|
+
* constant and validating it against another is how a 2000 px request gets
|
|
258
|
+
* discarded as if the store had ignored it.
|
|
259
|
+
*
|
|
260
|
+
* WHY scale instead of drop. `offloadOldestRequestImages` has to drop an image
|
|
261
|
+
* once the request exceeds `MAX_REQUEST_IMAGE_BYTES`, and the number it drops
|
|
262
|
+
* grows with every later image. Each change rewrites the retained prefix, so the
|
|
263
|
+
* prompt cache is invalidated again on the very next turn. Scaling keeps the
|
|
264
|
+
* image COUNT stable, which is what preserves that prefix: a conversation that
|
|
265
|
+
* outgrew the budget once stays inside it instead of breaking the cache every
|
|
266
|
+
* time an image is added.
|
|
267
|
+
*/
|
|
268
|
+
export declare function resolveRequestImages(options: GenerateOptions, attachments: AttachmentImageReader | undefined, signal?: AbortSignal, edge?: number): Promise<ResolvedRequestImages>;
|
|
269
|
+
export declare function unavailableImageText(block: Record<string, unknown>): string;
|
|
270
|
+
export interface InlineImage {
|
|
271
|
+
mediaType: string;
|
|
272
|
+
data: string;
|
|
273
|
+
}
|
|
274
|
+
export declare function imageBlockToInline(block: Record<string, unknown>, images: ResolvedRequestImages): InlineImage | undefined;
|
|
275
|
+
//# sourceMappingURL=request-images.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"request-images.d.ts","sourceRoot":"","sources":["../../../../src/host/common/request-images.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,KAAK,EAAgB,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACpE,OAAO,KAAK,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAA;AAuBtF;;;;;;;GAOG;AACH,MAAM,MAAM,qBAAqB,GAAG,IAAI,CAAC,eAAe,EAAE,WAAW,GAAG,kBAAkB,CAAC,CAAA;AAE3F,sFAAsF;AACtF,MAAM,MAAM,oBAAoB,GAC5B;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAC9E;IAAE,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAA;CAAE,CAAA;AAEpC,qFAAqF;AACrF,MAAM,MAAM,qBAAqB,GAAG,WAAW,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAA;AAE7E,eAAO,MAAM,kBAAkB,EAAE,qBAAiC,CAAA;AAElE;;;;;;;GAOG;AACH,eAAO,MAAM,uBAAuB,UAAY,CAAA;AAEhD,kEAAkE;AAClE,eAAO,MAAM,sBAAsB,UAAY,CAAA;AAE/C;;;;;;;;;GASG;AACH,eAAO,MAAM,4BAA4B,QAAmB,CAAA;AAE5D;;;;;;GAMG;AACH,eAAO,MAAM,uBAAuB,QAAmB,CAAA;AAUvD,+DAA+D;AAC/D,eAAO,MAAM,2BAA2B,aAAkE,CAAA;AAQ1G,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,GAAG,SAAS,CAGlF;AAgGD;;;GAGG;AACH,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,eAAe,EACxB,MAAM,CAAC,EAAE,qBAAqB,GAC7B,MAAM,EAAE,CAIV;AAED,sFAAsF;AACtF,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAWzF;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,eAAe,EACxB,KAAK,EAAE,MAAM,EACb,MAAM,CAAC,EAAE,qBAAqB,GAC7B,eAAe,CAiCjB;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,sBAAsB,OAAO,CAAA;AAe1C;;;;;;GAMG;AACH,MAAM,WAAW,wBAAwB;IACvC,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;IACd,aAAa,EAAE,MAAM,CAAA;IACrB,gBAAgB,EAAE,MAAM,CAAA;IACxB,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAChC,GAAG,EAAE,kBAAkB,EACvB,IAAI,GAAE,MAA+B,GACpC,CAAC,wBAAwB,GAAG;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC,GAAG,SAAS,CAahE;AAED,wBAAgB,4BAA4B,CAC1C,GAAG,EAAE,kBAAkB,EACvB,IAAI,GAAE,MAA+B,GACpC,wBAAwB,CAQ1B;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,eAAe,EACxB,QAAQ,GAAE,MAAgC,EAC1C,MAAM,CAAC,EAAE,qBAAqB,GAC7B,eAAe,CAKjB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,eAAe,CAC7B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9B,MAAM,CAAC,EAAE,qBAAqB,GAC7B,MAAM,GAAG,SAAS,CAOpB;AAuCD;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,eAAe,EACxB,MAAM,CAAC,EAAE,qBAAqB,EAC9B,kBAAkB,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,GACvC,MAAM,CAOR;AAED;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,eAAe,EACxB,MAAM,CAAC,EAAE,qBAAqB,GAC7B,MAAM,EAAE,CASV;AAiDD;;;;;;GAMG;AACH,MAAM,WAAW,wBAAwB;IACvC,8DAA8D;IAC9D,QAAQ,CAAC,OAAO,EAAE,eAAe,CAAA;IACjC,oDAAoD;IACpD,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAA;IAC/B,gEAAgE;IAChE,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;IAC7B,mEAAmE;IACnE,QAAQ,CAAC,gBAAgB,EAAE,MAAM,EAAE,CAAA;IACnC,yDAAyD;IACzD,QAAQ,CAAC,cAAc,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;CACrC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,oCAAoC,CAClD,OAAO,EAAE,eAAe,EACxB,QAAQ,GAAE,MAAgC,EAC1C,QAAQ,GAAE,MAA8C,EACxD,MAAM,CAAC,EAAE,qBAAqB,EAC9B,gBAAgB,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,EACtC,kBAAkB,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,EACxC,aAAa,SAA2B,GACvC,wBAAwB,CAoC1B;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,eAAe,EAAE,MAAM,CAAC,EAAE,qBAAqB,GAAG,OAAO,CAEzG;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,eAAe,EACxB,WAAW,EAAE,qBAAqB,GAAG,SAAS,EAC9C,MAAM,CAAC,EAAE,WAAW,EACpB,IAAI,GAAE,MAA+B,GACpC,OAAO,CAAC,qBAAqB,CAAC,CAkChC;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAI3E;AAED,MAAM,WAAW,WAAW;IAC1B,SAAS,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,MAAM,CAAA;CACb;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,qBAAqB,GAAG,WAAW,GAAG,SAAS,CAuBzH"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { IncomingMessage } from 'node:http';
|
|
2
|
+
/**
|
|
3
|
+
* Whether one mutation request comes from this application's own document.
|
|
4
|
+
*
|
|
5
|
+
* Two shapes reach these routes:
|
|
6
|
+
*
|
|
7
|
+
* 1. A browser page served by this Host. The browser states its origin, and it
|
|
8
|
+
* must name the same authority the request was addressed to. A cross-site
|
|
9
|
+
* POST always states the foreign origin, so this comparison is what rejects
|
|
10
|
+
* it.
|
|
11
|
+
*
|
|
12
|
+
* 2. The DSH Desktop shell. Electron's `forwardWebRequest` admits only requests
|
|
13
|
+
* whose origin is the `dsh-app://app` document, then *removes* the `origin`
|
|
14
|
+
* header before forwarding to the Host — that application scheme is not an
|
|
15
|
+
* HTTP origin the Host could compare against. A forwarded request therefore
|
|
16
|
+
* arrives with no `origin` at all, addressed to the loopback Host.
|
|
17
|
+
*
|
|
18
|
+
* A missing `origin` is consequently accepted only when the request was
|
|
19
|
+
* addressed to a loopback authority, and a stated `origin` must still match
|
|
20
|
+
* exactly. This is not a CSRF opening: a browser cannot issue a cross-site POST
|
|
21
|
+
* without stating the foreign origin, so every cross-site request still fails
|
|
22
|
+
* the comparison — the loopback clause admits only the desktop shell's already
|
|
23
|
+
* validated forward, and a request that never reached loopback keeps the strict
|
|
24
|
+
* requirement.
|
|
25
|
+
*
|
|
26
|
+
* @param request - Incoming mutation request.
|
|
27
|
+
* @returns whether the request may be treated as same-origin.
|
|
28
|
+
*/
|
|
29
|
+
export declare function isSameOriginMutation(request: IncomingMessage): boolean;
|
|
30
|
+
//# sourceMappingURL=same-origin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"same-origin.d.ts","sourceRoot":"","sources":["../../../../src/host/common/same-origin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAEhD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAYtE"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export interface SessionCacheRecordShape {
|
|
2
|
+
readonly updatedAt: number;
|
|
3
|
+
}
|
|
4
|
+
export interface CommonSessionCacheStateOptions<T extends SessionCacheRecordShape> {
|
|
5
|
+
readonly filePath: string;
|
|
6
|
+
readonly maxEntries?: number;
|
|
7
|
+
readonly allowWrite?: boolean;
|
|
8
|
+
readonly normalizeRecord: (value: unknown) => T | undefined;
|
|
9
|
+
}
|
|
10
|
+
export declare class CommonSessionCacheStateStore<T extends SessionCacheRecordShape> {
|
|
11
|
+
private document;
|
|
12
|
+
private pending;
|
|
13
|
+
private readonly filePath;
|
|
14
|
+
private readonly maxEntries;
|
|
15
|
+
private readonly allowWrite;
|
|
16
|
+
private readonly normalizeRecord;
|
|
17
|
+
private static writeSequence;
|
|
18
|
+
constructor(options: CommonSessionCacheStateOptions<T>);
|
|
19
|
+
read(sessionId?: string): T | undefined;
|
|
20
|
+
write(sessionId: string, record: T): void;
|
|
21
|
+
/** Update an existing record; absence is not created implicitly. */
|
|
22
|
+
update(sessionId: string, update: (record: T) => T): boolean;
|
|
23
|
+
flush(): void;
|
|
24
|
+
private load;
|
|
25
|
+
private schedule;
|
|
26
|
+
private cancelPending;
|
|
27
|
+
private persist;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=session-cache-state.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-cache-state.d.ts","sourceRoot":"","sources":["../../../../src/host/common/session-cache-state.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;CAC3B;AAED,MAAM,WAAW,8BAA8B,CAAC,CAAC,SAAS,uBAAuB;IAC/E,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAA;IAC7B,QAAQ,CAAC,eAAe,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,CAAC,GAAG,SAAS,CAAA;CAC5D;AAED,qBAAa,4BAA4B,CAAC,CAAC,SAAS,uBAAuB;IACzE,OAAO,CAAC,QAAQ,CAAyD;IACzE,OAAO,CAAC,OAAO,CAA2C;IAC1D,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAQ;IACjC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAQ;IACnC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAS;IACpC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAmC;IACnE,OAAO,CAAC,MAAM,CAAC,aAAa,CAAI;gBAEpB,OAAO,EAAE,8BAA8B,CAAC,CAAC,CAAC;IAOtD,IAAI,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,CAAC,GAAG,SAAS;IAWvC,KAAK,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,GAAG,IAAI;IAazC,oEAAoE;IACpE,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,GAAG,OAAO;IAa5D,KAAK,IAAI,IAAI;IAKb,OAAO,CAAC,IAAI;IAqBZ,OAAO,CAAC,QAAQ;IAShB,OAAO,CAAC,aAAa;IAMrB,OAAO,CAAC,OAAO;CAWhB"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Session effort memory for auxiliary requests.
|
|
3
|
+
*
|
|
4
|
+
* The harness sends compaction summaries, Timeline reports and auto-review
|
|
5
|
+
* calls without a reasoning effort, while the session's own turns may name one.
|
|
6
|
+
* Most upstreams render the effort into the request they cache against, so an
|
|
7
|
+
* auxiliary call at a different level re-reads the whole conversation cold: at
|
|
8
|
+
* long context that is slow, expensive, or refused outright (Kimi answers 429).
|
|
9
|
+
*
|
|
10
|
+
* Only the main turn's NAMED effort is remembered, including its absence. A line
|
|
11
|
+
* that fills an unnamed request from its own default then reproduces exactly
|
|
12
|
+
* what the main turn sent, whether that default is a setting or nothing at all.
|
|
13
|
+
*/
|
|
14
|
+
/** The request fields this memory reads; every harness generation's options satisfy it. */
|
|
15
|
+
export interface EffortFollowRequest {
|
|
16
|
+
readonly model: string;
|
|
17
|
+
readonly sessionId?: unknown;
|
|
18
|
+
readonly purpose?: unknown;
|
|
19
|
+
readonly reasoningEffort?: unknown;
|
|
20
|
+
}
|
|
21
|
+
/** Per-line memory of each session's latest main-turn model and named effort. */
|
|
22
|
+
export declare class SessionEffortMemory {
|
|
23
|
+
private readonly cap;
|
|
24
|
+
private readonly entries;
|
|
25
|
+
constructor(cap?: number);
|
|
26
|
+
/**
|
|
27
|
+
* Record a main turn, or give an unnamed auxiliary request the session's effort.
|
|
28
|
+
*
|
|
29
|
+
* Pass unrelated for a request that is structurally a separate conversation (a
|
|
30
|
+
* title request on a harness that states no purpose). Returns the same object,
|
|
31
|
+
* or a copy carrying the followed effort.
|
|
32
|
+
*/
|
|
33
|
+
follow<T extends EffortFollowRequest>(options: T, unrelated?: boolean): T;
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=session-effort-memory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-effort-memory.d.ts","sourceRoot":"","sources":["../../../../src/host/common/session-effort-memory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,2FAA2F;AAC3F,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAA;IAC5B,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAA;IAC1B,QAAQ,CAAC,eAAe,CAAC,EAAE,OAAO,CAAA;CACnC;AAkBD,iFAAiF;AACjF,qBAAa,mBAAmB;IAGlB,OAAO,CAAC,QAAQ,CAAC,GAAG;IAFhC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAsC;gBAEjC,GAAG,GAAE,MAAoB;IAEtD;;;;;;OAMG;IACH,MAAM,CAAC,CAAC,SAAS,mBAAmB,EAAE,OAAO,EAAE,CAAC,EAAE,SAAS,UAAQ,GAAG,CAAC;CAuBxE"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Local structural stand-ins for the harness settings seam.
|
|
3
|
+
*
|
|
4
|
+
* Harness 0.1.7 replaced the register-based settings API with `SettingsForms`
|
|
5
|
+
* (plugin `Config` fields plus the profile patch), so `@deepseek-ai/dsh-settings`
|
|
6
|
+
* no longer exports `SettingsProvider`, `SettingsScope`, `SettingsRegisterOptions`
|
|
7
|
+
* or `settingsNamespace`, and `ctx.settings.register` is gone. This plugin still
|
|
8
|
+
* supports 0.1.2-alpha.5 … 0.1.6-alpha.2, where the register seam is the only
|
|
9
|
+
* storage, so the small shape it actually uses is declared here instead of being
|
|
10
|
+
* imported from the harness, and the seam is probed at runtime.
|
|
11
|
+
*
|
|
12
|
+
* Nothing else in `src/host/**` may import those removed names.
|
|
13
|
+
* @module dsh-multi-provider/settings-compat
|
|
14
|
+
*/
|
|
15
|
+
/** Change listener a settings scope calls with the next and previous value. */
|
|
16
|
+
export type SettingsWatch<T> = (next: T, prev: T) => void | Promise<void>;
|
|
17
|
+
/** One registered settings namespace, as this plugin reads and writes it. */
|
|
18
|
+
export interface SettingsScope<T> {
|
|
19
|
+
/** Current value of the namespace; the scope owns the defaults. */
|
|
20
|
+
get(): T;
|
|
21
|
+
/**
|
|
22
|
+
* Merge a partial patch into the namespace and persist it.
|
|
23
|
+
*
|
|
24
|
+
* Typed `object` because that is what the 0.1.5/0.1.6 harness accepted and
|
|
25
|
+
* what this plugin hands over: a deep partial of the namespace value.
|
|
26
|
+
*/
|
|
27
|
+
update(patch: object): Promise<unknown>;
|
|
28
|
+
/** Observe later changes; the returned function unsubscribes. */
|
|
29
|
+
watch(callback: SettingsWatch<T>): () => void;
|
|
30
|
+
}
|
|
31
|
+
/** The `settings` service on a harness generation that still registers namespaces. */
|
|
32
|
+
export interface SettingsService {
|
|
33
|
+
/** Register (or look up) one namespace scope. */
|
|
34
|
+
register(namespace: unknown, schema: unknown): SettingsScope<unknown>;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Whether a live settings service still exposes the register-based seam.
|
|
38
|
+
*
|
|
39
|
+
* `false` for harness 0.1.7's `SettingsForms`, for a reduced test context, and
|
|
40
|
+
* for a composition that injects no settings service at all.
|
|
41
|
+
* @param settings - Candidate service from `ctx.settings` or a caller.
|
|
42
|
+
* @returns Whether {@link SettingsService.register} may be called.
|
|
43
|
+
*/
|
|
44
|
+
export declare function hasRegister(settings: unknown): settings is SettingsService;
|
|
45
|
+
/**
|
|
46
|
+
* Resolve the handle one namespace is registered under.
|
|
47
|
+
*
|
|
48
|
+
* Harness builds up to 0.1.6 brand a namespace string through an exported
|
|
49
|
+
* `settingsNamespace` factory; a build that dropped that export — and every
|
|
50
|
+
* register-capable test double — takes the plain string.
|
|
51
|
+
* @param namespace - Plain namespace id, e.g. `dsh-chatgpt-subscription`.
|
|
52
|
+
* @returns The namespace handle the settings service expects.
|
|
53
|
+
*/
|
|
54
|
+
export declare function resolveSettingsNamespace(namespace: string): unknown;
|
|
55
|
+
//# sourceMappingURL=settings-compat.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings-compat.d.ts","sourceRoot":"","sources":["../../../../src/host/common/settings-compat.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAIH,+EAA+E;AAC/E,MAAM,MAAM,aAAa,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;AAEzE,6EAA6E;AAC7E,MAAM,WAAW,aAAa,CAAC,CAAC;IAC9B,mEAAmE;IACnE,GAAG,IAAI,CAAC,CAAA;IACR;;;;;OAKG;IACH,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;IACvC,iEAAiE;IACjE,KAAK,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,MAAM,IAAI,CAAA;CAC9C;AAED,sFAAsF;AACtF,MAAM,WAAW,eAAe;IAC9B,iDAAiD;IACjD,QAAQ,CAAC,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,GAAG,aAAa,CAAC,OAAO,CAAC,CAAA;CACtE;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI,eAAe,CAG1E;AAED;;;;;;;;GAQG;AACH,wBAAgB,wBAAwB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAInE"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare class StickyImageBudgetStore {
|
|
2
|
+
private readonly store;
|
|
3
|
+
constructor(provider: string, filePath?: string);
|
|
4
|
+
/** Identities already omitted in this session, including before a restart. */
|
|
5
|
+
priorDroppedKeys(sessionId?: string): ReadonlySet<string>;
|
|
6
|
+
/** Persist the complete set, not just the newest omissions. */
|
|
7
|
+
record(sessionId: string | undefined, keys: ReadonlySet<string>): void;
|
|
8
|
+
flush(): void;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=sticky-image-budget.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sticky-image-budget.d.ts","sourceRoot":"","sources":["../../../../src/host/common/sticky-image-budget.ts"],"names":[],"mappings":"AAyBA,qBAAa,sBAAsB;IACjC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAiD;gBAE3D,QAAQ,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM;IAS/C,8EAA8E;IAC9E,gBAAgB,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC;IAKzD,+DAA+D;IAC/D,MAAM,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,EAAE,IAAI,EAAE,WAAW,CAAC,MAAM,CAAC,GAAG,IAAI;IAKtE,KAAK,IAAI,IAAI;CACd"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { LlmError } from './llm-compat.ts';
|
|
2
|
+
/**
|
|
3
|
+
* A failure the provider reported INSIDE a 200 stream.
|
|
4
|
+
*
|
|
5
|
+
* A service can answer 200 and then report the failure in the stream, in the
|
|
6
|
+
* same `{ error: { type, message } }` envelope a non-2xx body carries. A mapper
|
|
7
|
+
* has to type that event with one code, and the code that is right in general is
|
|
8
|
+
* PROVIDER_ERROR - it cannot know whether output has started - which is outside
|
|
9
|
+
* every retry set. So a transient failure delivered this way ends the turn on
|
|
10
|
+
* the first try while the identical failure delivered as a status is retried.
|
|
11
|
+
*
|
|
12
|
+
* The reclassification itself is per line, because only the adapter knows
|
|
13
|
+
* whether anything has reached the caller yet, and because every line owns rules
|
|
14
|
+
* its own HTTP path already owns. What is shared is the question each line asks
|
|
15
|
+
* its own classifier: what status WOULD this failure have carried?
|
|
16
|
+
*/
|
|
17
|
+
/**
|
|
18
|
+
* The status an in-band `error` event stands for, or null for a type this
|
|
19
|
+
* vocabulary does not name.
|
|
20
|
+
*
|
|
21
|
+
* The Anthropic-compatible shims (MiniMax Code, Kimi Code, and Command Code's
|
|
22
|
+
* messages stream) speak one vocabulary, and each of these types already has a
|
|
23
|
+
* status: 529 is Anthropic's documented overload, 429 the rate limit, and a 5xx
|
|
24
|
+
* the server-side failure. Naming the STATUS rather than the verdict is what lets
|
|
25
|
+
* each line hand the answer to its own classifier, so a rule that line already
|
|
26
|
+
* owns - a 429 that names an exhausted plan, a credential refusal reported as
|
|
27
|
+
* 403 - keeps owning it here.
|
|
28
|
+
*
|
|
29
|
+
* Null for everything else: a request the provider rejected, a context
|
|
30
|
+
* overflow, a credential refusal, a type from the future. Null is what keeps
|
|
31
|
+
* the mapper's own verdict, and that is the safe direction to fail in - a
|
|
32
|
+
* fallback to some made-up status would file an unknown type as a retryable
|
|
33
|
+
* server error, which is worse than not retrying at all.
|
|
34
|
+
*/
|
|
35
|
+
export declare function inBandAnthropicStatus(error: unknown): number | null;
|
|
36
|
+
/**
|
|
37
|
+
* The DSH code an in-band Responses-vocabulary failure becomes, or null when it
|
|
38
|
+
* names nothing transient.
|
|
39
|
+
*
|
|
40
|
+
* The Responses stream reports failure as `response.failed` or `error`, whose
|
|
41
|
+
* message is free text and whose structured evidence is split across TWO fields:
|
|
42
|
+
* this plugin's own routes document `{"error":{"message":"Upstream model
|
|
43
|
+
* provider is temporarily unavailable. Please try again in a moment.","type":
|
|
44
|
+
* "server_error"}}` - `type`, not `code` - so reading only `code` would miss
|
|
45
|
+
* the exact body this exists for, and its message names nothing the heuristic
|
|
46
|
+
* would catch. Both fields are read, and the message is read too, because a
|
|
47
|
+
* deployment that says "overloaded" in prose is the whole signal there.
|
|
48
|
+
*
|
|
49
|
+
* Anything not recognized keeps the mapper's verdict.
|
|
50
|
+
*/
|
|
51
|
+
export declare function inBandResponsesCode(error: unknown, message: string): string | null;
|
|
52
|
+
/**
|
|
53
|
+
* The error one in-band stream failure becomes, or `thrown` itself when the
|
|
54
|
+
* line's own verdict stands.
|
|
55
|
+
*
|
|
56
|
+
* Call this only while nothing has reached the caller: the whole reason a fresh
|
|
57
|
+
* request is still free is what makes the retry safe (see module note 1 in the
|
|
58
|
+
* Claude adapter, which this generalizes). After the first chunk the mapper's
|
|
59
|
+
* verdict stands and this must not be called at all.
|
|
60
|
+
*
|
|
61
|
+
* Only the CODE changes. The message stays the mapper's, which names the wire
|
|
62
|
+
* type the user saw, and no `status` is attached: the response really was a
|
|
63
|
+
* 200, and a synthetic one would misreport what the provider said.
|
|
64
|
+
*
|
|
65
|
+
* @param thrown - the mapper's own verdict, passed through when it stands.
|
|
66
|
+
* @param rawError - the event's wire `error` object, from the stream state.
|
|
67
|
+
* @param classify - this line's own failure classifier, so every rule its HTTP
|
|
68
|
+
* path owns still owns the verdict reached here.
|
|
69
|
+
* @param statusFor - the vocabulary's status table; Responses lines pass
|
|
70
|
+
* {@link inBandResponsesCode} through {@link reclassifyInBandResponsesError}.
|
|
71
|
+
*/
|
|
72
|
+
export declare function reclassifyInBandError(thrown: LlmError, rawError: unknown, classify: (status: number, bodyText: string) => {
|
|
73
|
+
code: string;
|
|
74
|
+
retryable: boolean;
|
|
75
|
+
}, statusFor?: (error: unknown) => number | null): LlmError;
|
|
76
|
+
/**
|
|
77
|
+
* {@link reclassifyInBandError} for a line whose classifier reads a status, fed
|
|
78
|
+
* by the Responses vocabulary instead of the Anthropic one.
|
|
79
|
+
*
|
|
80
|
+
* The transient verdict found here is a QUESTION, not the answer: a
|
|
81
|
+
* `rate_limit` code says only that the failure is worth retrying, and whether
|
|
82
|
+
* it actually is - a 429 naming a spent balance is this route's PROVIDER_ERROR,
|
|
83
|
+
* not a RATE_LIMIT - is a rule the line's own classifier owns. So the answer is
|
|
84
|
+
* asked of `classify` at the status the verdict stands for, exactly as the
|
|
85
|
+
* Anthropic sibling does, and the CODE that comes back is the one the HTTP path
|
|
86
|
+
* would have produced for the same body. That agreement is the whole point: the
|
|
87
|
+
* in-band delivery must not be the one delivery with its own opinion.
|
|
88
|
+
*/
|
|
89
|
+
export declare function reclassifyInBandResponsesError(thrown: LlmError, rawError: unknown, message: string, classify: (status: number, bodyText: string) => {
|
|
90
|
+
code: string;
|
|
91
|
+
retryable: boolean;
|
|
92
|
+
}): LlmError;
|
|
93
|
+
//# sourceMappingURL=stream-error.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stream-error.d.ts","sourceRoot":"","sources":["../../../../src/host/common/stream-error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAE1C;;;;;;;;;;;;;;GAcG;AAEH;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAInE;AASD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAclF;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,QAAQ,EAChB,QAAQ,EAAE,OAAO,EACjB,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,OAAO,CAAA;CAAE,EACpF,SAAS,GAAE,CAAC,KAAK,EAAE,OAAO,KAAK,MAAM,GAAG,IAA4B,GACnE,QAAQ,CAMV;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,8BAA8B,CAC5C,MAAM,EAAE,QAAQ,EAChB,QAAQ,EAAE,OAAO,EACjB,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,OAAO,CAAA;CAAE,GACnF,QAAQ,CAMV"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* JSON-Schema normalization for tool parameter schemas.
|
|
3
|
+
*
|
|
4
|
+
* Provider gateways reject or ignore parts of a JSON Schema that a TypeBox/Zod-style
|
|
5
|
+
* schema carries, and a few keywords arrive unresolved. This module is shared
|
|
6
|
+
* because several provider lines send the same normalized shape and the
|
|
7
|
+
* normalization is behaviour, not preference: two lines that normalize
|
|
8
|
+
* differently send different request bytes for the same tool.
|
|
9
|
+
*
|
|
10
|
+
* The work is:
|
|
11
|
+
*
|
|
12
|
+
* - drop the meta keywords ($schema) a gateway ignores;
|
|
13
|
+
* - INLINE $defs / definitions / $ref, so no reference survives to the wire;
|
|
14
|
+
* - give enum and const nodes an explicit type, which some gateways require;
|
|
15
|
+
* - walk the whole tree, with cycle detection so a self-referential schema
|
|
16
|
+
* terminates instead of recursing forever.
|
|
17
|
+
*
|
|
18
|
+
* @module dsh-multi-provider/tool-schema
|
|
19
|
+
*/
|
|
20
|
+
/**
|
|
21
|
+
* Normalizes tool parameter schemas for Kimi by stripping meta keywords ($schema),
|
|
22
|
+
* inlining definitions ($defs/definitions/$ref), and ensuring property types for enums/consts.
|
|
23
|
+
*/
|
|
24
|
+
export declare function normalizeKimiToolSchema(schema: unknown): Record<string, unknown>;
|
|
25
|
+
/** Drop the JSON-Schema keywords provider gateways reject or ignore, and normalize properties. */
|
|
26
|
+
export declare function stripMetaSchema(schema: unknown): Record<string, unknown>;
|
|
27
|
+
//# sourceMappingURL=tool-schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-schema.d.ts","sourceRoot":"","sources":["../../../../src/host/common/tool-schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAoIH;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAYhF;AAED,kGAAkG;AAClG,wBAAgB,eAAe,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAExE"}
|