@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,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The compaction directive the Claude API line restates server-side.
|
|
3
|
+
*
|
|
4
|
+
* This file is what survived of the former `host/compaction-prompt.ts`: the thin
|
|
5
|
+
* build keeps only the constants the Claude API adapter needs to recognise the
|
|
6
|
+
* directive DSH ships and to send its own, not the `llm/stream` splice that used
|
|
7
|
+
* to rewrite the final message for every other line.
|
|
8
|
+
*
|
|
9
|
+
* @module dsh-multi-provider/host/claude-api/compaction-instruction
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* First line of the directive DSH ships.
|
|
13
|
+
*
|
|
14
|
+
* Matched as a prefix rather than the whole text: the harness owns that
|
|
15
|
+
* constant and may reword its later sections without warning, and a matcher
|
|
16
|
+
* pinned to the full string would silently stop replacing anything.
|
|
17
|
+
*/
|
|
18
|
+
export declare const SHIPPED_INSTRUCTION_OPENING = "You are now acting as a compaction engine for this AI coding assistant.";
|
|
19
|
+
/** Marker the harness wraps a prior checkpoint in; the replacement must keep folding it. */
|
|
20
|
+
export declare const PRIOR_CHECKPOINT_OPEN_TAG = "<compacted-summary>";
|
|
21
|
+
/** The replacement directive. */
|
|
22
|
+
export declare const COMPACTION_INSTRUCTION: string;
|
|
23
|
+
//# sourceMappingURL=compaction-instruction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compaction-instruction.d.ts","sourceRoot":"","sources":["../../../../src/host/claude-api/compaction-instruction.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH;;;;;;GAMG;AACH,eAAO,MAAM,2BAA2B,4EACmC,CAAA;AAE3E,4FAA4F;AAC5F,eAAO,MAAM,yBAAyB,wBAAwB,CAAA;AAE9D,iCAAiC;AACjC,eAAO,MAAM,sBAAsB,QAqBvB,CAAA"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Persistence for server-compaction blocks of the claude-api line. A block is keyed by
|
|
3
|
+
* the SHA-256 of its TRIMMED content, so a checkpoint summary that was edited by even
|
|
4
|
+
* one character is not found and the request falls back to the text form. The file is
|
|
5
|
+
* owner-only (0600), capped at 200 entries and 30 days, and written atomically.
|
|
6
|
+
*
|
|
7
|
+
* The writer/reader pair (serializeClaudeApiCompactionBlocks / parseClaudeApiCompactionBlocks)
|
|
8
|
+
* is the whole persistence contract and is tested as a pair through the production writer.
|
|
9
|
+
*/
|
|
10
|
+
/** One stored compaction block, exactly as the wire sent it plus provenance. */
|
|
11
|
+
export interface StoredBlock {
|
|
12
|
+
content: string;
|
|
13
|
+
signature: string;
|
|
14
|
+
toolChanges?: unknown;
|
|
15
|
+
model: string;
|
|
16
|
+
createdAt: number;
|
|
17
|
+
/** Credential fingerprint + endpoint this block was produced against; absent on legacy entries. */
|
|
18
|
+
scope?: string;
|
|
19
|
+
}
|
|
20
|
+
export declare const CLAUDE_API_COMPACTION_MAX_ENTRIES = 200;
|
|
21
|
+
export declare const CLAUDE_API_COMPACTION_MAX_AGE_MS: number;
|
|
22
|
+
export declare function claudeApiCompactionBlocksPath(): string;
|
|
23
|
+
/** The storage key of one summary: SHA-256 of the trimmed content, hex. */
|
|
24
|
+
export declare function compactionBlockKey(summary: string): string;
|
|
25
|
+
/** Writer half: the on-disk document for one key->block table. */
|
|
26
|
+
export declare function serializeClaudeApiCompactionBlocks(blocks: Readonly<Record<string, StoredBlock>>): string;
|
|
27
|
+
/**
|
|
28
|
+
* Reader half: the inverse of serializeClaudeApiCompactionBlocks after JSON.parse.
|
|
29
|
+
* Damaged entries are dropped, and an entry whose key does not match its content is
|
|
30
|
+
* dropped too (the key IS the integrity check).
|
|
31
|
+
*/
|
|
32
|
+
export declare function parseClaudeApiCompactionBlocks(value: unknown): Record<string, StoredBlock>;
|
|
33
|
+
export declare class ClaudeApiCompactionStore {
|
|
34
|
+
private readonly filePath;
|
|
35
|
+
private readonly now;
|
|
36
|
+
private blocks;
|
|
37
|
+
private warmed;
|
|
38
|
+
private writeSequence;
|
|
39
|
+
constructor(filePath?: string, now?: () => number);
|
|
40
|
+
path(): string;
|
|
41
|
+
/** Load the persisted table once. A missing or damaged file is simply "nothing stored". */
|
|
42
|
+
warm(): Promise<void>;
|
|
43
|
+
/**
|
|
44
|
+
* Synchronous, from memory: the adapter warms the store at startup. A block is returned
|
|
45
|
+
* only for the SAME scope (credential fingerprint + endpoint) it was stored under;
|
|
46
|
+
* entries without a scope are never found. The model is deliberately not part of the
|
|
47
|
+
* match: upstream accepts a block on another model that supports compaction.
|
|
48
|
+
*/
|
|
49
|
+
lookup(summary: string, scope: string): StoredBlock | undefined;
|
|
50
|
+
remember(block: {
|
|
51
|
+
content: string;
|
|
52
|
+
signature: string;
|
|
53
|
+
toolChanges?: unknown;
|
|
54
|
+
model: string;
|
|
55
|
+
scope: string;
|
|
56
|
+
}): Promise<void>;
|
|
57
|
+
/** Removes only the entry of this scope; another scope's block survives. */
|
|
58
|
+
forget(summary: string, scope: string): Promise<void>;
|
|
59
|
+
private prune;
|
|
60
|
+
private persist;
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=compaction-store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compaction-store.d.ts","sourceRoot":"","sources":["../../../../src/host/claude-api/compaction-store.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAOH,gFAAgF;AAChF,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,MAAM,CAAA;IACjB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,EAAE,MAAM,CAAA;IACjB,mGAAmG;IACnG,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,eAAO,MAAM,iCAAiC,MAAM,CAAA;AACpD,eAAO,MAAM,gCAAgC,QAA2B,CAAA;AAExE,wBAAgB,6BAA6B,IAAI,MAAM,CAEtD;AAED,2EAA2E;AAC3E,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAE1D;AASD,kEAAkE;AAClE,wBAAgB,kCAAkC,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC,GAAG,MAAM,CAExG;AAED;;;;GAIG;AACH,wBAAgB,8BAA8B,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAmB1F;AAED,qBAAa,wBAAwB;IACnC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAQ;IACjC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAc;IAClC,OAAO,CAAC,MAAM,CAAiC;IAC/C,OAAO,CAAC,MAAM,CAA6B;IAC3C,OAAO,CAAC,aAAa,CAAI;gBAEb,QAAQ,GAAE,MAAwC,EAAE,GAAG,GAAE,MAAM,MAAiB;IAK5F,IAAI,IAAI,MAAM;IAEd,2FAA2F;IAC3F,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAYrB;;;;;OAKG;IACH,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS;IAKzD,QAAQ,CAAC,KAAK,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,OAAO,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAcjI,4EAA4E;IACtE,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAS3D,OAAO,CAAC,KAAK;YAQC,OAAO;CAatB"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Server-side compaction for the claude-api line (spec: docs/claude-api-line-plan.md,
|
|
3
|
+
* server compaction section). The request is built THROUGH buildClaudeApiRequest so system, tools,
|
|
4
|
+
* cache markers and thinking are byte-identical to a main turn, then adjusted: the
|
|
5
|
+
* trailing directive message is stripped, context_management / stop_sequences /
|
|
6
|
+
* structured output / forced tool_choice are removed, compaction: { type: 'summarize',
|
|
7
|
+
* instructions } is added, and max_tokens is at least 8192.
|
|
8
|
+
*/
|
|
9
|
+
import type { GenerateOptions } from '../common/llm-compat.ts';
|
|
10
|
+
import type { ResolvedRequestImages } from '../common/request-images.ts';
|
|
11
|
+
import { type ClaudeApiRequestContext } from './mapper.ts';
|
|
12
|
+
/** The compaction engine's auxiliary call is the one with purpose 'compaction'. */
|
|
13
|
+
export declare function isClaudeApiCompactionRequest(options: GenerateOptions): boolean;
|
|
14
|
+
/**
|
|
15
|
+
* A copy of the options without the trailing directive user message, or null when the
|
|
16
|
+
* last message is not that directive. The directive is recognized by the FIRST LINE of
|
|
17
|
+
* either the shipped instruction or this repo's replacement (both exported by
|
|
18
|
+
* src/host/compaction-prompt.ts); the harness may reword later sections without warning.
|
|
19
|
+
*/
|
|
20
|
+
export declare function stripClaudeApiCompactionDirective(options: GenerateOptions): GenerateOptions | null;
|
|
21
|
+
/**
|
|
22
|
+
* One compaction request. The shared mapper adds a wire-only user continuation when
|
|
23
|
+
* the stripped history ends in assistant content, because upstream rejects prefill.
|
|
24
|
+
*/
|
|
25
|
+
export declare function buildClaudeApiCompactionRequest(options: GenerateOptions, images: ResolvedRequestImages, context: ClaudeApiRequestContext): Record<string, unknown>;
|
|
26
|
+
/**
|
|
27
|
+
* A 400 about the compaction BLOCK itself - its content/signature or its placement.
|
|
28
|
+
* Such a block is stale or misplaced, not a missing capability: the caller forgets the
|
|
29
|
+
* stored summary and retries once. Co-usage errors (compaction + context_management)
|
|
30
|
+
* are request-shape problems and match neither predicate.
|
|
31
|
+
*/
|
|
32
|
+
export declare function isClaudeApiCompactionBlockInvalid(status: number, bodyText: string): boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Whether an upstream 400 is a real "server compaction not supported" signal: the
|
|
35
|
+
* compaction parameter refused as an unknown/extra input, an unexpected/unsupported
|
|
36
|
+
* anthropic-beta value naming compact-2026-09-04, or a message saying the model does
|
|
37
|
+
* not support compaction. Block-validity errors and the context_management co-usage
|
|
38
|
+
* error are explicitly NOT unsupported signals.
|
|
39
|
+
*/
|
|
40
|
+
export declare function isClaudeApiCompactionUnsupported(status: number, bodyText: string): boolean;
|
|
41
|
+
/**
|
|
42
|
+
* The trimmed text between <compacted-summary> and </compacted-summary> (the marker
|
|
43
|
+
* the harness wraps a checkpoint in, see compaction-prompt.ts PRIOR_CHECKPOINT_OPEN_TAG),
|
|
44
|
+
* or null when the text carries no such block.
|
|
45
|
+
*/
|
|
46
|
+
export declare function extractCheckpointSummary(text: string): string | null;
|
|
47
|
+
//# sourceMappingURL=compaction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compaction.d.ts","sourceRoot":"","sources":["../../../../src/host/claude-api/compaction.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AAC9D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAA;AAExE,OAAO,EAAyB,KAAK,uBAAuB,EAAE,MAAM,aAAa,CAAA;AAUjF,mFAAmF;AACnF,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAE9E;AAID;;;;;GAKG;AACH,wBAAgB,iCAAiC,CAAC,OAAO,EAAE,eAAe,GAAG,eAAe,GAAG,IAAI,CAQlG;AAED;;;GAGG;AACH,wBAAgB,+BAA+B,CAC7C,OAAO,EAAE,eAAe,EACxB,MAAM,EAAE,qBAAqB,EAC7B,OAAO,EAAE,uBAAuB,GAC/B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAYzB;AAwBD;;;;;GAKG;AACH,wBAAgB,iCAAiC,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAK3F;AAED;;;;;;GAMG;AACH,wBAAgB,gCAAgC,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAW1F;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAIpE"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure wire mapping for the claude-api line: DSH GenerateOptions -> the body of
|
|
3
|
+
* POST <baseUrl>/v1/messages?beta=true in the official Claude Code shape.
|
|
4
|
+
*
|
|
5
|
+
* SPEC: docs/claude-api-line-plan.md (request shape / beta rules / message mapping). Wire constants and
|
|
6
|
+
* the identity/billing/fingerprint functions are frozen in ./types.ts; per-model
|
|
7
|
+
* capabilities are frozen in ./model-catalog.ts. This module holds no credential,
|
|
8
|
+
* performs no I/O and is deterministic: the same (options, images, context) always
|
|
9
|
+
* produces the same body, byte for byte.
|
|
10
|
+
*
|
|
11
|
+
* Reference implementations read but NOT imported: relayone/mapper-anthropic.ts
|
|
12
|
+
* (closest template; it drops system/developer messages, this line must not) and
|
|
13
|
+
* claude/mapper.ts (system-in-place rule, tool changes, placeholder tool, cache
|
|
14
|
+
* breakpoints, signed-thinking replay).
|
|
15
|
+
*/
|
|
16
|
+
import { type GenerateOptions } from '../common/llm-compat.ts';
|
|
17
|
+
import { type ClaudeCodeFirstPartyContext } from '../common/claude-code-first-party.ts';
|
|
18
|
+
import { type ResolvedRequestImages } from '../common/request-images.ts';
|
|
19
|
+
import type { ClaudeApiModelEntry } from './model-catalog.ts';
|
|
20
|
+
import type { ClaudeApiSettings } from './token-store.ts';
|
|
21
|
+
/** Everything one request build needs beyond the options and the resolved images. */
|
|
22
|
+
export interface ClaudeApiRequestContext {
|
|
23
|
+
entry: ClaudeApiModelEntry;
|
|
24
|
+
settings: ClaudeApiSettings;
|
|
25
|
+
/** The ONE version this request reports: billing block and fingerprint share it (the UA is the adapter's job). */
|
|
26
|
+
version: string;
|
|
27
|
+
deviceId: string;
|
|
28
|
+
sessionUuid: string;
|
|
29
|
+
firstParty: ClaudeCodeFirstPartyContext;
|
|
30
|
+
/** Synchronous lookup of stored server-compaction blocks, keyed by summary text. */
|
|
31
|
+
compactionBlocks?: {
|
|
32
|
+
lookup(summary: string): {
|
|
33
|
+
content: string;
|
|
34
|
+
signature: string;
|
|
35
|
+
toolChanges?: unknown;
|
|
36
|
+
} | undefined;
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* The user's OWN first prompt text: the first non-reminder text block of the first user
|
|
41
|
+
* turn that carries one. Tool-result turns are skipped, and so are <system-reminder>
|
|
42
|
+
* blocks placed ahead of the user's text (the capture shows both in the first turn).
|
|
43
|
+
* CHOICE: a reminder-only user turn is skipped entirely and the scan continues, because
|
|
44
|
+
* DSH appends reminder-only records that contain no user text at all.
|
|
45
|
+
*/
|
|
46
|
+
export declare function claudeApiFirstUserText(options: GenerateOptions): string;
|
|
47
|
+
/** How many cache_control markers one built body carries (walks the bytes, not the marking calls). */
|
|
48
|
+
export declare function countClaudeApiCacheBreakpoints(body: unknown): number;
|
|
49
|
+
/**
|
|
50
|
+
* Build one main-turn Messages request body. Pure: no clock, no randomness, no I/O.
|
|
51
|
+
* The leading compact-checkpoint message is replaced by the stored compaction block
|
|
52
|
+
* when the context's lookup finds it; otherwise it keeps its text form.
|
|
53
|
+
*/
|
|
54
|
+
export declare function buildClaudeApiRequest(options: GenerateOptions, images: ResolvedRequestImages, context: ClaudeApiRequestContext): Record<string, unknown>;
|
|
55
|
+
/**
|
|
56
|
+
* The anthropic-beta list derived from the FINAL BODY (never from settings): the base
|
|
57
|
+
* set first, then the conditional betas in the spec table's order. A gateway silently
|
|
58
|
+
* strips unlicensed fields, so the header must follow the bytes.
|
|
59
|
+
*/
|
|
60
|
+
export declare function deriveClaudeApiBetas(body: Record<string, unknown>, entry: ClaudeApiModelEntry, thinkingTokenCount?: boolean): string[];
|
|
61
|
+
//# sourceMappingURL=mapper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mapper.d.ts","sourceRoot":"","sources":["../../../../src/host/claude-api/mapper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAKL,KAAK,eAAe,EAErB,MAAM,yBAAyB,CAAA;AAEhC,OAAO,EAKL,KAAK,2BAA2B,EACjC,MAAM,sCAAsC,CAAA;AAG7C,OAAO,EAIL,KAAK,qBAAqB,EAC3B,MAAM,6BAA6B,CAAA;AACpC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAA;AAC7D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAczD,qFAAqF;AACrF,MAAM,WAAW,uBAAuB;IACtC,KAAK,EAAE,mBAAmB,CAAA;IAC1B,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,kHAAkH;IAClH,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,MAAM,CAAA;IAChB,WAAW,EAAE,MAAM,CAAA;IACnB,UAAU,EAAE,2BAA2B,CAAA;IACvC,oFAAoF;IACpF,gBAAgB,CAAC,EAAE;QAAE,MAAM,CAAC,OAAO,EAAE,MAAM,GAAG;YAAE,OAAO,EAAE,MAAM,CAAC;YAAC,SAAS,EAAE,MAAM,CAAC;YAAC,WAAW,CAAC,EAAE,OAAO,CAAA;SAAE,GAAG,SAAS,CAAA;KAAE,CAAA;CAC1H;AAmJD;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,eAAe,GAAG,MAAM,CAEvE;AAmTD,sGAAsG;AACtG,wBAAgB,8BAA8B,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,CAUpE;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,eAAe,EACxB,MAAM,EAAE,qBAAqB,EAC7B,OAAO,EAAE,uBAAuB,GAC/B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAsIzB;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,KAAK,EAAE,mBAAmB,EAC1B,kBAAkB,UAAO,GACxB,MAAM,EAAE,CAkBV"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import type { ClaudeApiModelDto, ClaudeApiReasoningEffort } from '../../shared/claude-api-contracts.ts';
|
|
2
|
+
import type { ClaudeApiSettings } from './token-store.ts';
|
|
3
|
+
/**
|
|
4
|
+
* Per-model capability table of the Claude API line.
|
|
5
|
+
*
|
|
6
|
+
* SOURCES. Support lists are the featureMetadata.supportedModels blocks of the official
|
|
7
|
+
* pages fetched 2026-11-21 under https://platform.claude.com/docs/en/ :
|
|
8
|
+
* build-with-claude/mid-conversation-system-messages -> midConversationSystem
|
|
9
|
+
* build-with-claude/preserved-thinking/prefix-checks -> preservedThinking
|
|
10
|
+
* build-with-claude/compaction-on-demand -> serverCompaction
|
|
11
|
+
* build-with-claude/fast-mode -> fastMode ('beta' = needs the fast-mode header)
|
|
12
|
+
* build-with-claude/context-editing -> contextEditing
|
|
13
|
+
* Window, output cap, thinking form, effort ladder and temperature come from the in-repo
|
|
14
|
+
* transcription src/host/claude/model-catalog.ts (read as a reference, not imported), and
|
|
15
|
+
* three of them were re-checked live: claude-haiku-5-5 rejects budget thinking and a
|
|
16
|
+
* non-default temperature, and 128000 is the output cap of claude-haiku-5-5 and claude-opus-5-5.
|
|
17
|
+
* UNVERIFIED: the Mythos rows mirror their Fable siblings because the docs list them together.
|
|
18
|
+
*/
|
|
19
|
+
export type ClaudeApiThinkingMode = 'adaptive' | 'budget' | 'none';
|
|
20
|
+
export type ClaudeApiFastMode = 'ga' | 'beta' | null;
|
|
21
|
+
type Effort = Exclude<ClaudeApiReasoningEffort, 'none'>;
|
|
22
|
+
export interface ClaudeApiModelEntry {
|
|
23
|
+
id: string;
|
|
24
|
+
name: string;
|
|
25
|
+
contextWindow: number;
|
|
26
|
+
maxOutputTokens: number;
|
|
27
|
+
supportsImages: boolean;
|
|
28
|
+
supportsTemperature: boolean;
|
|
29
|
+
thinkingMode: ClaudeApiThinkingMode;
|
|
30
|
+
/** Selectable effort levels, lowest first; never contains 'none'. */
|
|
31
|
+
reasoningEfforts: readonly Effort[];
|
|
32
|
+
canDisableThinking: boolean;
|
|
33
|
+
/** Accepts role:system entries inside messages (and tool_addition / tool_removal in them). */
|
|
34
|
+
midConversationSystem: boolean;
|
|
35
|
+
/** Runs the preserved-thinking prefix check, so block_binding is sent. */
|
|
36
|
+
preservedThinking: boolean;
|
|
37
|
+
fastMode: ClaudeApiFastMode;
|
|
38
|
+
serverCompaction: boolean;
|
|
39
|
+
contextEditing: boolean;
|
|
40
|
+
/** false when the id is not in the shipped table and a template was used. */
|
|
41
|
+
known: boolean;
|
|
42
|
+
}
|
|
43
|
+
export declare const CLAUDE_API_MODELS: readonly ClaudeApiModelEntry[];
|
|
44
|
+
/** Facts for one model id: the caller's catalog first, then the shipped table, then a template. */
|
|
45
|
+
export declare function resolveClaudeApiModel(id: string, catalog?: readonly ClaudeApiModelEntry[]): ClaudeApiModelEntry;
|
|
46
|
+
/** The shipped table as a fresh array; the cold-start placeholder before any live listing. */
|
|
47
|
+
export declare function claudeApiFallbackEntries(): ClaudeApiModelEntry[];
|
|
48
|
+
/**
|
|
49
|
+
* Parse the live GET /v1/models envelope ({ data: [{ id, display_name }] }).
|
|
50
|
+
* Capabilities always come from this module, never from the listing: a gateway may
|
|
51
|
+
* synthesize the listing (observed: display_name equal to the id and no capability fields).
|
|
52
|
+
*/
|
|
53
|
+
export declare function parseClaudeApiModelListing(payload: unknown): ClaudeApiModelEntry[];
|
|
54
|
+
/** One persisted snapshot record. Written by persistedClaudeApiModelRecord, read by parsePersistedClaudeApiModelEntries. */
|
|
55
|
+
export interface PersistedClaudeApiModelRecord {
|
|
56
|
+
id: string;
|
|
57
|
+
name: string;
|
|
58
|
+
}
|
|
59
|
+
/** Snapshot writer half. Only identity is persisted; capabilities are recomputed on read so a table fix reaches old snapshots. */
|
|
60
|
+
export declare function persistedClaudeApiModelRecord(entry: ClaudeApiModelEntry): PersistedClaudeApiModelRecord;
|
|
61
|
+
/** Snapshot reader half: the inverse of mapping persistedClaudeApiModelRecord over a catalog. */
|
|
62
|
+
export declare function parsePersistedClaudeApiModelEntries(value: unknown): ClaudeApiModelEntry[];
|
|
63
|
+
/**
|
|
64
|
+
* The ids a request may use: THE one selection rule for listModels, the settings card and the hub count.
|
|
65
|
+
*
|
|
66
|
+
* null means every listed model. An explicit [] means none, in both phases. An explicit list is
|
|
67
|
+
* applied only to a LIVE catalog: the shipped fallback table and a user's list are different id
|
|
68
|
+
* vocabularies, so filtering the fallback through the list could hide the whole line on a cold start.
|
|
69
|
+
*/
|
|
70
|
+
export declare function convergeClaudeApiSelection(entries: readonly ClaudeApiModelEntry[], settings: Pick<ClaudeApiSettings, 'enabledModelIds'>, live: boolean): Set<string>;
|
|
71
|
+
/** Context window after the user's override, or the model default. */
|
|
72
|
+
export declare function claudeApiContextWindow(entry: ClaudeApiModelEntry, settings: Pick<ClaudeApiSettings, 'contextWindowOverrides'>): number;
|
|
73
|
+
/** Public rows for the settings card. */
|
|
74
|
+
export declare function claudeApiModelOptions(entries: readonly ClaudeApiModelEntry[], settings: ClaudeApiSettings, live: boolean): ClaudeApiModelDto[];
|
|
75
|
+
export {};
|
|
76
|
+
//# sourceMappingURL=model-catalog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model-catalog.d.ts","sourceRoot":"","sources":["../../../../src/host/claude-api/model-catalog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAA;AACvG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAEzD;;;;;;;;;;;;;;;GAeG;AACH,MAAM,MAAM,qBAAqB,GAAG,UAAU,GAAG,QAAQ,GAAG,MAAM,CAAA;AAClE,MAAM,MAAM,iBAAiB,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,CAAA;AACpD,KAAK,MAAM,GAAG,OAAO,CAAC,wBAAwB,EAAE,MAAM,CAAC,CAAA;AAEvD,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,aAAa,EAAE,MAAM,CAAA;IACrB,eAAe,EAAE,MAAM,CAAA;IACvB,cAAc,EAAE,OAAO,CAAA;IACvB,mBAAmB,EAAE,OAAO,CAAA;IAC5B,YAAY,EAAE,qBAAqB,CAAA;IACnC,qEAAqE;IACrE,gBAAgB,EAAE,SAAS,MAAM,EAAE,CAAA;IACnC,kBAAkB,EAAE,OAAO,CAAA;IAC3B,8FAA8F;IAC9F,qBAAqB,EAAE,OAAO,CAAA;IAC9B,0EAA0E;IAC1E,iBAAiB,EAAE,OAAO,CAAA;IAC1B,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,gBAAgB,EAAE,OAAO,CAAA;IACzB,cAAc,EAAE,OAAO,CAAA;IACvB,6EAA6E;IAC7E,KAAK,EAAE,OAAO,CAAA;CACf;AAoBD,eAAO,MAAM,iBAAiB,EAAE,SAAS,mBAAmB,EAuB1D,CAAA;AAeF,mGAAmG;AACnG,wBAAgB,qBAAqB,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,SAAS,mBAAmB,EAAE,GAAG,mBAAmB,CAI/G;AAED,8FAA8F;AAC9F,wBAAgB,wBAAwB,IAAI,mBAAmB,EAAE,CAEhE;AAWD;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,OAAO,GAAG,mBAAmB,EAAE,CAalF;AAED,4HAA4H;AAC5H,MAAM,WAAW,6BAA6B;IAAG,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE;AAE3E,kIAAkI;AAClI,wBAAgB,6BAA6B,CAAC,KAAK,EAAE,mBAAmB,GAAG,6BAA6B,CAEvG;AAED,iGAAiG;AACjG,wBAAgB,mCAAmC,CAAC,KAAK,EAAE,OAAO,GAAG,mBAAmB,EAAE,CAazF;AAED;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,SAAS,mBAAmB,EAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,iBAAiB,EAAE,iBAAiB,CAAC,EAAE,IAAI,EAAE,OAAO,GAAG,GAAG,CAAC,MAAM,CAAC,CAOpK;AAOD,sEAAsE;AACtE,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,mBAAmB,EAAE,QAAQ,EAAE,IAAI,CAAC,iBAAiB,EAAE,wBAAwB,CAAC,GAAG,MAAM,CAEtI;AAED,yCAAyC;AACzC,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,SAAS,mBAAmB,EAAE,EAAE,QAAQ,EAAE,iBAAiB,EAAE,IAAI,EAAE,OAAO,GAAG,iBAAiB,EAAE,CAe9I"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
2
|
+
import { type ClaudeApiStatusDto } from '../../shared/claude-api-contracts.ts';
|
|
3
|
+
import type { ClaudeApiCatalogManager } from './catalog-manager.ts';
|
|
4
|
+
import type { ClaudeApiClientVersionResolver } from './client-version.ts';
|
|
5
|
+
import type { ClaudeApiCredentialStore, ClaudeApiSettingsStore } from './token-store.ts';
|
|
6
|
+
export interface ClaudeApiRouteDeps {
|
|
7
|
+
version: ClaudeApiClientVersionResolver;
|
|
8
|
+
serving?: boolean | (() => boolean);
|
|
9
|
+
conflict?: string | null | (() => string | null);
|
|
10
|
+
fetchFn?: typeof fetch;
|
|
11
|
+
}
|
|
12
|
+
/** Local-first status; the network refresh begins behind the answer. */
|
|
13
|
+
export declare function getClaudeApiWebStatus(store: ClaudeApiCredentialStore, settingsStore: ClaudeApiSettingsStore, catalog: ClaudeApiCatalogManager, deps: ClaudeApiRouteDeps): Promise<ClaudeApiStatusDto>;
|
|
14
|
+
/**
|
|
15
|
+
* Route table mirrored by src/client/claude-api/api.ts. The settings body is a
|
|
16
|
+
* ClaudeApiSettingsUpdateDto; the key is removed with DELETE /key (the prefix
|
|
17
|
+
* router dispatches on request.method, so no extra registration is needed).
|
|
18
|
+
*/
|
|
19
|
+
export declare function registerClaudeApiRoutes(ctx: Context, store: ClaudeApiCredentialStore, settingsStore: ClaudeApiSettingsStore, catalog: ClaudeApiCatalogManager, deps: ClaudeApiRouteDeps): () => void;
|
|
20
|
+
/** Startup warm-up is deliberately fire-and-forget in the plugin entry. */
|
|
21
|
+
export declare function warmClaudeApiCatalogOnStartup(catalog: ClaudeApiCatalogManager): Promise<void>;
|
|
22
|
+
//# sourceMappingURL=routes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../../src/host/claude-api/routes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAIlD,OAAO,EAQL,KAAK,kBAAkB,EACxB,MAAM,sCAAsC,CAAA;AAC7C,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAA;AAEnE,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,qBAAqB,CAAA;AAEzE,OAAO,KAAK,EACV,wBAAwB,EAExB,sBAAsB,EACvB,MAAM,kBAAkB,CAAA;AA8BzB,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,8BAA8B,CAAA;IACvC,OAAO,CAAC,EAAE,OAAO,GAAG,CAAC,MAAM,OAAO,CAAC,CAAA;IACnC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,CAAC,MAAM,MAAM,GAAG,IAAI,CAAC,CAAA;IAChD,OAAO,CAAC,EAAE,OAAO,KAAK,CAAA;CACvB;AAED,wEAAwE;AACxE,wBAAsB,qBAAqB,CACzC,KAAK,EAAE,wBAAwB,EAC/B,aAAa,EAAE,sBAAsB,EACrC,OAAO,EAAE,uBAAuB,EAChC,IAAI,EAAE,kBAAkB,GACvB,OAAO,CAAC,kBAAkB,CAAC,CA2B7B;AAsDD;;;;GAIG;AACH,wBAAgB,uBAAuB,CACrC,GAAG,EAAE,OAAO,EACZ,KAAK,EAAE,wBAAwB,EAC/B,aAAa,EAAE,sBAAsB,EACrC,OAAO,EAAE,uBAAuB,EAChC,IAAI,EAAE,kBAAkB,GACvB,MAAM,IAAI,CA8EZ;AAED,2EAA2E;AAC3E,wBAAsB,6BAA6B,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,IAAI,CAAC,CAGnG"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SSE state machine for the claude-api line: one Anthropic Messages event line in,
|
|
3
|
+
* DSH StreamChunks out. Mirrors relayone/mapper-anthropic.ts (read, not imported)
|
|
4
|
+
* with the claude-api additions:
|
|
5
|
+
*
|
|
6
|
+
* - a content_block_start of type "compaction" arrives WHOLE (no deltas): its content
|
|
7
|
+
* is emitted as text and exposed as state.compaction for the adapter to store;
|
|
8
|
+
* - thinking blocks with empty text but a signature are kept for replay; unsigned
|
|
9
|
+
* thinking is not replayable and gets a null replay slot;
|
|
10
|
+
* - server_tool_use and its result blocks are kept for replay verbatim without
|
|
11
|
+
* emitting DSH blocks (the harness must not dispatch a server-side call locally);
|
|
12
|
+
* - usage is read from message_start / message_delta and, when usage.iterations is
|
|
13
|
+
* present, summed over the iterations (top-level counts are 0 on a compaction
|
|
14
|
+
* response);
|
|
15
|
+
* - stop_reason "compaction" finishes normally; a stream without message_stop is an
|
|
16
|
+
* error (assertClaudeApiStreamComplete), never a success.
|
|
17
|
+
*/
|
|
18
|
+
import { type OutboundContentBlock, type StreamChunk, type TokenUsage } from '../common/llm-compat.ts';
|
|
19
|
+
type Block = Record<string, unknown>;
|
|
20
|
+
interface OpenText {
|
|
21
|
+
index: number;
|
|
22
|
+
replayIndex: number;
|
|
23
|
+
text: string;
|
|
24
|
+
}
|
|
25
|
+
interface PendingTool {
|
|
26
|
+
index: number;
|
|
27
|
+
replayIndex: number;
|
|
28
|
+
id: string;
|
|
29
|
+
name: string;
|
|
30
|
+
arguments: string;
|
|
31
|
+
}
|
|
32
|
+
interface PendingThinking {
|
|
33
|
+
index: number;
|
|
34
|
+
replayIndex: number;
|
|
35
|
+
kind: 'thinking' | 'redacted_thinking';
|
|
36
|
+
text: string;
|
|
37
|
+
signature: string;
|
|
38
|
+
data: string;
|
|
39
|
+
}
|
|
40
|
+
interface PendingServerTool {
|
|
41
|
+
replay: Block;
|
|
42
|
+
arguments: string;
|
|
43
|
+
}
|
|
44
|
+
/** The whole-block compaction event the adapter stores and later replays. */
|
|
45
|
+
export interface ClaudeApiCompactionEvent {
|
|
46
|
+
content: string;
|
|
47
|
+
signature: string;
|
|
48
|
+
toolChanges?: unknown;
|
|
49
|
+
}
|
|
50
|
+
export interface ClaudeApiStreamState {
|
|
51
|
+
blocks: OutboundContentBlock[];
|
|
52
|
+
openText: Map<number, OpenText>;
|
|
53
|
+
tools: Map<number, PendingTool>;
|
|
54
|
+
thinking: Map<number, PendingThinking>;
|
|
55
|
+
serverTools: Map<number, PendingServerTool>;
|
|
56
|
+
/** One slot per DSH block (reserved at open) plus replay-only wire blocks in wire order. */
|
|
57
|
+
replayBlocks: (Block | null)[];
|
|
58
|
+
compaction: ClaudeApiCompactionEvent | null;
|
|
59
|
+
sawMessageStart: boolean;
|
|
60
|
+
sawMessageStop: boolean;
|
|
61
|
+
finishReason: string | null;
|
|
62
|
+
stopExplanation: string | null;
|
|
63
|
+
inputTokens: number;
|
|
64
|
+
outputTokens: number;
|
|
65
|
+
cacheReadTokens: number;
|
|
66
|
+
cacheWriteTokens: number;
|
|
67
|
+
reasoningTokens: number;
|
|
68
|
+
speed?: 'standard' | 'fast';
|
|
69
|
+
serviceTier?: string;
|
|
70
|
+
inferenceGeo?: string;
|
|
71
|
+
sawUsage: boolean;
|
|
72
|
+
sawIterations: boolean;
|
|
73
|
+
finished: boolean;
|
|
74
|
+
hasToolCall: boolean;
|
|
75
|
+
}
|
|
76
|
+
export declare function createClaudeApiStreamState(): ClaudeApiStreamState;
|
|
77
|
+
export type ClaudeApiTokenUsage = TokenUsage & {
|
|
78
|
+
speed?: 'standard' | 'fast';
|
|
79
|
+
service_tier?: string;
|
|
80
|
+
inference_geo?: string;
|
|
81
|
+
};
|
|
82
|
+
export declare function closeClaudeApiStream(state: ClaudeApiStreamState): StreamChunk[];
|
|
83
|
+
/** A stream that ends without message_stop is an error, never a success. */
|
|
84
|
+
export declare function assertClaudeApiStreamComplete(state: ClaudeApiStreamState): void;
|
|
85
|
+
export declare function feedClaudeApiPayload(state: ClaudeApiStreamState, event: unknown): StreamChunk[];
|
|
86
|
+
export declare function processClaudeApiLine(line: string, state: ClaudeApiStreamState): StreamChunk[];
|
|
87
|
+
export {};
|
|
88
|
+
//# sourceMappingURL=stream.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stream.d.ts","sourceRoot":"","sources":["../../../../src/host/claude-api/stream.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAY,KAAK,oBAAoB,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,MAAM,yBAAyB,CAAA;AAGhH,KAAK,KAAK,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AAkBpC,UAAU,QAAQ;IAAG,KAAK,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE;AACvE,UAAU,WAAW;IAAG,KAAK,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE;AACzG,UAAU,eAAe;IAAG,KAAK,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,UAAU,GAAG,mBAAmB,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE;AACvJ,UAAU,iBAAiB;IAAG,MAAM,EAAE,KAAK,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE;AAEhE,6EAA6E;AAC7E,MAAM,WAAW,wBAAwB;IAAG,OAAO,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,OAAO,CAAA;CAAE;AAEvG,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,oBAAoB,EAAE,CAAA;IAC9B,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;IAC/B,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAA;IAC/B,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,eAAe,CAAC,CAAA;IACtC,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAA;IAC3C,4FAA4F;IAC5F,YAAY,EAAE,CAAC,KAAK,GAAG,IAAI,CAAC,EAAE,CAAA;IAC9B,UAAU,EAAE,wBAAwB,GAAG,IAAI,CAAA;IAC3C,eAAe,EAAE,OAAO,CAAA;IACxB,cAAc,EAAE,OAAO,CAAA;IACvB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,eAAe,EAAE,MAAM,GAAG,IAAI,CAAA;IAC9B,WAAW,EAAE,MAAM,CAAA;IACnB,YAAY,EAAE,MAAM,CAAA;IACpB,eAAe,EAAE,MAAM,CAAA;IACvB,gBAAgB,EAAE,MAAM,CAAA;IACxB,eAAe,EAAE,MAAM,CAAA;IACvB,KAAK,CAAC,EAAE,UAAU,GAAG,MAAM,CAAA;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,QAAQ,EAAE,OAAO,CAAA;IACjB,aAAa,EAAE,OAAO,CAAA;IACtB,QAAQ,EAAE,OAAO,CAAA;IACjB,WAAW,EAAE,OAAO,CAAA;CACrB;AAED,wBAAgB,0BAA0B,IAAI,oBAAoB,CAQjE;AAiGD,MAAM,MAAM,mBAAmB,GAAG,UAAU,GAAG;IAC7C,KAAK,CAAC,EAAE,UAAU,GAAG,MAAM,CAAA;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB,CAAA;AAeD,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,oBAAoB,GAAG,WAAW,EAAE,CAgB/E;AAED,4EAA4E;AAC5E,wBAAgB,6BAA6B,CAAC,KAAK,EAAE,oBAAoB,GAAG,IAAI,CAE/E;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,oBAAoB,EAAE,KAAK,EAAE,OAAO,GAAG,WAAW,EAAE,CAqJ/F;AAED,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,oBAAoB,GAAG,WAAW,EAAE,CAS7F"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { CredentialStore } from '../token-store.ts';
|
|
2
|
+
import { type ContextWindowOverridePatch } from '../common/context-window-overrides.ts';
|
|
3
|
+
import { type ClaudeApiCacheTtl, type ClaudeApiReasoningEffort } from '../../shared/claude-api-contracts.ts';
|
|
4
|
+
export interface ClaudeApiCredentials {
|
|
5
|
+
apiKey: string;
|
|
6
|
+
authenticatedAt: number;
|
|
7
|
+
}
|
|
8
|
+
export interface ClaudeApiSettings {
|
|
9
|
+
enabled: boolean;
|
|
10
|
+
/** Normalized endpoint; always a valid http(s) origin with an optional path prefix. */
|
|
11
|
+
baseUrl: string;
|
|
12
|
+
/** null = every currently listed model; [] = explicitly none. */
|
|
13
|
+
enabledModelIds: string[] | null;
|
|
14
|
+
contextWindowOverrides: Record<string, number>;
|
|
15
|
+
defaultReasoningEffort: ClaudeApiReasoningEffort | null;
|
|
16
|
+
cacheTtl: ClaudeApiCacheTtl;
|
|
17
|
+
fastMode: boolean;
|
|
18
|
+
serverCompaction: boolean;
|
|
19
|
+
/** 64 hex chars, generated once per install; '' until ensureDeviceId ran. Never sent to the client. */
|
|
20
|
+
deviceId: string;
|
|
21
|
+
}
|
|
22
|
+
export interface ClaudeApiSettingsPatch {
|
|
23
|
+
enabled?: boolean;
|
|
24
|
+
/** null restores the default endpoint. A value must already be normalized by the caller. */
|
|
25
|
+
baseUrl?: string | null;
|
|
26
|
+
enabledModelIds?: string[];
|
|
27
|
+
contextWindowOverrides?: ContextWindowOverridePatch;
|
|
28
|
+
defaultReasoningEffort?: ClaudeApiReasoningEffort | null;
|
|
29
|
+
cacheTtl?: ClaudeApiCacheTtl;
|
|
30
|
+
fastMode?: boolean;
|
|
31
|
+
serverCompaction?: boolean;
|
|
32
|
+
}
|
|
33
|
+
export declare function parseClaudeApiCredentials(value: unknown): ClaudeApiCredentials;
|
|
34
|
+
export declare function claudeApiCredentialPath(): string;
|
|
35
|
+
export declare function claudeApiSettingsPath(): string;
|
|
36
|
+
/** Scope of everything cached per credential: the key AND the endpoint it is used against. */
|
|
37
|
+
export declare function claudeApiCredentialFingerprint(credentials: ClaudeApiCredentials, baseUrl: string): string;
|
|
38
|
+
export declare class ClaudeApiCredentialStore {
|
|
39
|
+
private readonly filePath;
|
|
40
|
+
private readonly backend;
|
|
41
|
+
constructor(filePath?: string, backend?: CredentialStore<ClaudeApiCredentials>);
|
|
42
|
+
path(): string;
|
|
43
|
+
read(): Promise<ClaudeApiCredentials | null>;
|
|
44
|
+
write(credentials: ClaudeApiCredentials): Promise<void>;
|
|
45
|
+
delete(): Promise<void>;
|
|
46
|
+
}
|
|
47
|
+
export declare function defaultClaudeApiSettings(): ClaudeApiSettings;
|
|
48
|
+
export declare function parseClaudeApiSettings(value: unknown): ClaudeApiSettings;
|
|
49
|
+
export declare function mergeClaudeApiSettings(current: ClaudeApiSettings, patch: ClaudeApiSettingsPatch): ClaudeApiSettings;
|
|
50
|
+
export declare class ClaudeApiSettingsStore {
|
|
51
|
+
private readonly filePath;
|
|
52
|
+
constructor(filePath?: string);
|
|
53
|
+
path(): string;
|
|
54
|
+
read(): Promise<ClaudeApiSettings>;
|
|
55
|
+
write(settings: ClaudeApiSettings): Promise<void>;
|
|
56
|
+
update(patch: ClaudeApiSettingsPatch): Promise<ClaudeApiSettings>;
|
|
57
|
+
/** The persisted device id, generated on first use. Stable for the life of the install. */
|
|
58
|
+
ensureDeviceId(): Promise<string>;
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=token-store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"token-store.d.ts","sourceRoot":"","sources":["../../../../src/host/claude-api/token-store.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAKxD,OAAO,EAA+B,KAAK,0BAA0B,EAAE,MAAM,uCAAuC,CAAA;AACpH,OAAO,EAKL,KAAK,iBAAiB,EACtB,KAAK,wBAAwB,EAC9B,MAAM,sCAAsC,CAAA;AAG7C,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,MAAM,CAAA;IACd,eAAe,EAAE,MAAM,CAAA;CACxB;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,OAAO,CAAA;IAChB,uFAAuF;IACvF,OAAO,EAAE,MAAM,CAAA;IACf,iEAAiE;IACjE,eAAe,EAAE,MAAM,EAAE,GAAG,IAAI,CAAA;IAChC,sBAAsB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC9C,sBAAsB,EAAE,wBAAwB,GAAG,IAAI,CAAA;IACvD,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,QAAQ,EAAE,OAAO,CAAA;IACjB,gBAAgB,EAAE,OAAO,CAAA;IACzB,uGAAuG;IACvG,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,WAAW,sBAAsB;IACrC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,4FAA4F;IAC5F,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,eAAe,CAAC,EAAE,MAAM,EAAE,CAAA;IAC1B,sBAAsB,CAAC,EAAE,0BAA0B,CAAA;IACnD,sBAAsB,CAAC,EAAE,wBAAwB,GAAG,IAAI,CAAA;IACxD,QAAQ,CAAC,EAAE,iBAAiB,CAAA;IAC5B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B;AAQD,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,OAAO,GAAG,oBAAoB,CAS9E;AAED,wBAAgB,uBAAuB,IAAI,MAAM,CAEhD;AACD,wBAAgB,qBAAqB,IAAI,MAAM,CAE9C;AACD,8FAA8F;AAC9F,wBAAgB,8BAA8B,CAAC,WAAW,EAAE,oBAAoB,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAEzG;AAqBD,qBAAa,wBAAwB;IAEvB,OAAO,CAAC,QAAQ,CAAC,QAAQ;IADrC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAuC;gBAClC,QAAQ,GAAE,MAAkC,EAAE,OAAO,CAAC,EAAE,eAAe,CAAC,oBAAoB,CAAC;IAG1H,IAAI,IAAI,MAAM;IAId,IAAI,IAAI,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC;IAG5C,KAAK,CAAC,WAAW,EAAE,oBAAoB,GAAG,OAAO,CAAC,IAAI,CAAC;IAQvD,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;CAGxB;AAED,wBAAgB,wBAAwB,IAAI,iBAAiB,CAY5D;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,OAAO,GAAG,iBAAiB,CAuBxE;AAED,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,iBAAiB,EAAE,KAAK,EAAE,sBAAsB,GAAG,iBAAiB,CAanH;AAGD,qBAAa,sBAAsB;IACrB,OAAO,CAAC,QAAQ,CAAC,QAAQ;gBAAR,QAAQ,GAAE,MAAgC;IACvE,IAAI,IAAI,MAAM;IACR,IAAI,IAAI,OAAO,CAAC,iBAAiB,CAAC;IAIlC,KAAK,CAAC,QAAQ,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;IAcjD,MAAM,CAAC,KAAK,EAAE,sBAAsB,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAOvE,2FAA2F;IACrF,cAAc,IAAI,OAAO,CAAC,MAAM,CAAC;CASxC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { type ClaudeCodeFirstPartyContext } from '../common/claude-code-first-party.ts';
|
|
2
|
+
export declare const PROVIDER_ID = "claude-api";
|
|
3
|
+
export declare const PROVIDER_NAME = "Claude API";
|
|
4
|
+
/**
|
|
5
|
+
* Wire constants of the official Claude Code client as an API-key user sends them.
|
|
6
|
+
*
|
|
7
|
+
* SOURCE for every value in this file unless stated otherwise: a local capture of
|
|
8
|
+
* @anthropic-ai/claude-code@2.1.330 pointed at a loopback port with an API key
|
|
9
|
+
* (structural copy in test/fixtures/claude-api/request-2.1.330.json), cross-checked
|
|
10
|
+
* against the 2026-03-31 source snapshot (services/api/client.ts, constants/system.ts,
|
|
11
|
+
* utils/fingerprint.ts, services/api/claude.ts getAPIMetadata). See docs/claude-api-line-plan.md.
|
|
12
|
+
*/
|
|
13
|
+
export declare const CLAUDE_API_MESSAGES_PATH = "/v1/messages?beta=true";
|
|
14
|
+
export declare const CLAUDE_API_COUNT_TOKENS_PATH = "/v1/messages/count_tokens?beta=true";
|
|
15
|
+
export declare const CLAUDE_API_MODELS_PATH = "/v1/models";
|
|
16
|
+
export declare const CLAUDE_API_ANTHROPIC_VERSION = "2023-06-01";
|
|
17
|
+
/** Shipped fallback. npm updates are adopted only when a verified cch seed exists (client-version.ts). */
|
|
18
|
+
export declare const CLAUDE_API_DEFAULT_CLI_VERSION = "2.1.330";
|
|
19
|
+
/** Operator pin, mirroring DSH_CLAUDE_CLI_VERSION of the subscription line. */
|
|
20
|
+
export declare const CLAUDE_API_CLI_VERSION_ENV = "DSH_CLAUDE_API_CLI_VERSION";
|
|
21
|
+
/** npm registry document whose version field is the latest published client. */
|
|
22
|
+
export declare const CLAUDE_API_NPM_LATEST_URL = "https://registry.npmjs.org/@anthropic-ai/claude-code/latest";
|
|
23
|
+
export declare const CLAUDE_API_CLIENT_VERSION_REFRESH_MS: number;
|
|
24
|
+
export declare const CLAUDE_API_CLIENT_VERSION_TIMEOUT_MS = 10000;
|
|
25
|
+
/** Interactive entrypoint. UNVERIFIED BY CAPTURE: the capture ran print mode (sdk-cli); cli comes from the source snapshot and was accepted live. */
|
|
26
|
+
export declare const CLAUDE_API_ENTRYPOINT = "cli";
|
|
27
|
+
/** Identity line of the interactive client (constants/system.ts DEFAULT_PREFIX). */
|
|
28
|
+
export declare const CLAUDE_API_IDENTITY_TEXT = "You are Claude Code, Anthropic's official CLI for Claude.";
|
|
29
|
+
export declare const CLAUDE_API_BILLING_HEADER_PREFIX = "x-anthropic-billing-header";
|
|
30
|
+
/** utils/fingerprint.ts FINGERPRINT_SALT; re-verified against the 2.1.330 capture (9e1). */
|
|
31
|
+
export declare const CLAUDE_API_FINGERPRINT_SALT = "59cf53e54c78";
|
|
32
|
+
/** Stainless SDK headers exactly as captured. They do NOT follow the npm version; see the plan's limitations. */
|
|
33
|
+
export declare const CLAUDE_API_STAINLESS_HEADERS: Readonly<Record<string, string>>;
|
|
34
|
+
/** First-party API-key betas in capture order; model-specific order comes from the shared helper. */
|
|
35
|
+
export declare const CLAUDE_API_BASE_BETAS: readonly string[];
|
|
36
|
+
/** Licenses thinking.block_binding. Without it the gateway strips the field and upstream rejects it. */
|
|
37
|
+
export declare const CLAUDE_API_BETA_THINKING_BINDING = "thinking-binding-controls-2026-08-01";
|
|
38
|
+
/** Licenses the compaction parameter and every later request that carries a signed compaction block. */
|
|
39
|
+
export declare const CLAUDE_API_BETA_COMPACT = "compact-2026-09-04";
|
|
40
|
+
/** Licenses a tool defined by value inside tool_addition, and tool_changes on a compaction block. */
|
|
41
|
+
export declare const CLAUDE_API_BETA_INLINE_TOOLS = "inline-tools-2026-09-15";
|
|
42
|
+
/** Licenses clear_at on a role:system message. */
|
|
43
|
+
export declare const CLAUDE_API_BETA_CLEAR_AT = "mid-conversation-system-clear-at-2026-08-21";
|
|
44
|
+
/** Required for speed on models whose fast mode is still beta. */
|
|
45
|
+
export declare const CLAUDE_API_BETA_FAST_MODE = "fast-mode-2026-02-01";
|
|
46
|
+
export declare const CLAUDE_API_CATALOG_TTL_MS: number;
|
|
47
|
+
export declare const CLAUDE_API_MAX_REQUEST_IMAGE_BYTES: number;
|
|
48
|
+
/** Message source kinds rendered as turn-scoped system messages (clear_at). A user decision; see the plan. */
|
|
49
|
+
export declare const CLAUDE_API_TURN_SCOPED_SOURCE_KINDS: readonly string[];
|
|
50
|
+
/** Remove a credential echoed by an upstream error before truncating its public detail. */
|
|
51
|
+
export declare function claudeApiSafeDetail(value: unknown, apiKey?: string, limit?: number): string;
|
|
52
|
+
/** Join a normalized base URL with one of the path constants above. */
|
|
53
|
+
export declare function claudeApiUrl(baseUrl: string, path: string): string;
|
|
54
|
+
/** User-Agent of the interactive client for one version. */
|
|
55
|
+
export declare function claudeApiUserAgent(version: string): string;
|
|
56
|
+
/**
|
|
57
|
+
* Three-hex attribution fingerprint: SHA256(salt + text[4] + text[7] + text[20] + version)[:3],
|
|
58
|
+
* with '0' standing in for a missing character. The text is the user's OWN first prompt text,
|
|
59
|
+
* not a reminder block placed in front of it (verified against the capture).
|
|
60
|
+
*/
|
|
61
|
+
export declare function claudeApiFingerprint(firstUserText: string, version: string): string;
|
|
62
|
+
/** Text of the first system block. It carries no cache marker. */
|
|
63
|
+
export declare function claudeApiBillingBlock(version: string, firstUserText: string, context: ClaudeCodeFirstPartyContext): string;
|
|
64
|
+
/** Deterministic UUID-shaped id for one DSH session, stable across retries and restarts. */
|
|
65
|
+
export declare function claudeApiSessionUuid(sessionId: string): string;
|
|
66
|
+
/** metadata.user_id in the JSON form current clients send. account_uuid is empty for API-key users. */
|
|
67
|
+
export declare function claudeApiMetadataUserId(deviceId: string, sessionUuid: string): string;
|
|
68
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/host/claude-api/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAQL,KAAK,2BAA2B,EACjC,MAAM,sCAAsC,CAAA;AAM7C,eAAO,MAAM,WAAW,eAAyB,CAAA;AACjD,eAAO,MAAM,aAAa,eAA2B,CAAA;AAErD;;;;;;;;GAQG;AACH,eAAO,MAAM,wBAAwB,2BAA2B,CAAA;AAChE,eAAO,MAAM,4BAA4B,wCAAwC,CAAA;AACjF,eAAO,MAAM,sBAAsB,eAAe,CAAA;AAClD,eAAO,MAAM,4BAA4B,eAAe,CAAA;AAExD,0GAA0G;AAC1G,eAAO,MAAM,8BAA8B,YAAY,CAAA;AACvD,+EAA+E;AAC/E,eAAO,MAAM,0BAA0B,+BAA+B,CAAA;AACtE,gFAAgF;AAChF,eAAO,MAAM,yBAAyB,gEAAgE,CAAA;AACtG,eAAO,MAAM,oCAAoC,QAAmB,CAAA;AACpE,eAAO,MAAM,oCAAoC,QAAS,CAAA;AAE1D,qJAAqJ;AACrJ,eAAO,MAAM,qBAAqB,QAAQ,CAAA;AAC1C,oFAAoF;AACpF,eAAO,MAAM,wBAAwB,8DAA8D,CAAA;AACnG,eAAO,MAAM,gCAAgC,+BAA+B,CAAA;AAC5E,4FAA4F;AAC5F,eAAO,MAAM,2BAA2B,iBAA+B,CAAA;AAEvE,iHAAiH;AACjH,eAAO,MAAM,4BAA4B,kCAAgC,CAAA;AAEzE,qGAAqG;AACrG,eAAO,MAAM,qBAAqB,EAAE,SAAS,MAAM,EAAkE,CAAA;AACrH,wGAAwG;AACxG,eAAO,MAAM,gCAAgC,yCAAyC,CAAA;AACtF,wGAAwG;AACxG,eAAO,MAAM,uBAAuB,uBAAuB,CAAA;AAC3D,qGAAqG;AACrG,eAAO,MAAM,4BAA4B,4BAA4B,CAAA;AACrE,kDAAkD;AAClD,eAAO,MAAM,wBAAwB,gDAAgD,CAAA;AACrF,kEAAkE;AAClE,eAAO,MAAM,yBAAyB,yBAAyB,CAAA;AAE/D,eAAO,MAAM,yBAAyB,QAAa,CAAA;AACnD,eAAO,MAAM,kCAAkC,QAAmB,CAAA;AAElE,8GAA8G;AAC9G,eAAO,MAAM,mCAAmC,EAAE,SAAS,MAAM,EAA2C,CAAA;AAE5G,2FAA2F;AAC3F,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,KAAK,SAAO,GAAG,MAAM,CAGzF;AAED,uEAAuE;AACvE,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAElE;AAED,4DAA4D;AAC5D,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAE1D;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,aAAa,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAEnF;AAED,kEAAkE;AAClE,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,MAAM,EACf,aAAa,EAAE,MAAM,EACrB,OAAO,EAAE,2BAA2B,GACnC,MAAM,CAER;AAED,4FAA4F;AAC5F,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAE9D;AAED,uGAAuG;AACvG,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,CAErF"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { AccountPoolCore, type PoolAccountShape, type PoolData } from '../common/account-pool.ts';
|
|
2
|
+
import type { CredentialStore } from '../token-store.ts';
|
|
3
|
+
import { FileCredentialStore, type ClinePassCredentials } from './token-store.ts';
|
|
4
|
+
import type { AccountPoolStatusDto, AccountRotationStrategy } from '../../shared/account-pool-contracts.ts';
|
|
5
|
+
import type { ClinePassAccountSummaryDto } from '../../shared/cline-pass-contracts.ts';
|
|
6
|
+
/** One pooled Cline Pass key: the bearer key plus the display facts the card renders. */
|
|
7
|
+
export interface ClinePassPoolAccount extends PoolAccountShape<ClinePassCredentials> {
|
|
8
|
+
/** Model id this account last served, for the card's detail line. */
|
|
9
|
+
lastModelId?: string;
|
|
10
|
+
}
|
|
11
|
+
export type ClinePassPoolStatusDto = AccountPoolStatusDto;
|
|
12
|
+
/** Encrypted pool file this line owns. */
|
|
13
|
+
export declare function clinePassPoolPath(): string;
|
|
14
|
+
/** The credential name the standalone plugin reads when no key was pasted. */
|
|
15
|
+
export declare const CLINE_PASS_API_KEY_ENV = "CLINE_PASS_API_KEY";
|
|
16
|
+
/**
|
|
17
|
+
* Stable identity of one key.
|
|
18
|
+
*
|
|
19
|
+
* Cline hands the user a bare key and nothing else — no account id, no email —
|
|
20
|
+
* so the key's own digest is the only identity available. It is never written
|
|
21
|
+
* anywhere: it exists to tell two pasted keys apart inside the pool document,
|
|
22
|
+
* and it is not a credential and cannot be used as one.
|
|
23
|
+
*/
|
|
24
|
+
export declare function clinePassAccountKey(credentials: ClinePassCredentials): string;
|
|
25
|
+
/** Validate and normalize one whole pool document. */
|
|
26
|
+
export declare function parseClinePassPoolData(value: unknown): PoolData<ClinePassPoolAccount>;
|
|
27
|
+
export interface ClinePassAccountPoolOptions {
|
|
28
|
+
/** Pre-pool credential file the pool mirrors its primary account into. */
|
|
29
|
+
store?: FileCredentialStore;
|
|
30
|
+
/** Test seam; production builds the platform backend from the pool path. */
|
|
31
|
+
backend?: CredentialStore<PoolData<ClinePassPoolAccount>>;
|
|
32
|
+
maxAccounts?: number;
|
|
33
|
+
/** The line's current chat base URL, used when an account names none. */
|
|
34
|
+
baseURL?: () => string;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Cline Pass's account pool.
|
|
38
|
+
*
|
|
39
|
+
* Two credential kinds share one pool: an OAuth session (WorkOS device sign-in,
|
|
40
|
+
* rotating refresh token, expiry) and a legacy static API key. The kernel's
|
|
41
|
+
* refresh hooks are wired for the first and are no-ops for the second.
|
|
42
|
+
*/
|
|
43
|
+
export declare class ClinePassAccountPool extends AccountPoolCore<ClinePassCredentials, ClinePassPoolAccount, ClinePassAccountSummaryDto> {
|
|
44
|
+
private readonly store;
|
|
45
|
+
constructor(options?: ClinePassAccountPoolOptions);
|
|
46
|
+
/**
|
|
47
|
+
* Pick the key for the next request, skipping accounts already tried.
|
|
48
|
+
*
|
|
49
|
+
* The credential carries its own base-URL override, so the account and the key
|
|
50
|
+
* are returned together.
|
|
51
|
+
*/
|
|
52
|
+
getEffectiveCredential(excludeIds?: ReadonlySet<string>, fetchFn?: typeof fetch): Promise<{
|
|
53
|
+
account: ClinePassPoolAccount;
|
|
54
|
+
credentials: ClinePassCredentials;
|
|
55
|
+
}>;
|
|
56
|
+
/** The pre-pool credential file this pool mirrors its primary account into. */
|
|
57
|
+
mirrorStore(): FileCredentialStore;
|
|
58
|
+
/** The rotation strategy as the settings card renders it. */
|
|
59
|
+
strategy(): Promise<AccountRotationStrategy>;
|
|
60
|
+
/** Remember which model an account last served, best-effort. */
|
|
61
|
+
recordModel(accountId: string, model: string): Promise<void>;
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=account-pool.d.ts.map
|