@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,36 @@
|
|
|
1
|
+
import type { GenerateOptions, OutboundContentBlock, StreamChunk, TokenUsage } from '../common/llm-compat.ts';
|
|
2
|
+
import type { ResolvedRequestImages } from '../common/request-images.ts';
|
|
3
|
+
import { type RelayOneModelEntry } from './model-catalog.ts';
|
|
4
|
+
import type { RelayOneSettings } from './token-store.ts';
|
|
5
|
+
/** Standard OpenAI Responses request; no Codex subscription-only headers or Lite items. */
|
|
6
|
+
export declare function buildRelayOneResponsesRequest(options: GenerateOptions, images: ResolvedRequestImages, entry: RelayOneModelEntry, settings: RelayOneSettings): Record<string, unknown>;
|
|
7
|
+
export declare function buildRelayOneChatRequest(options: GenerateOptions, images: ResolvedRequestImages, entry: RelayOneModelEntry, settings: RelayOneSettings): Record<string, unknown>;
|
|
8
|
+
interface OpenText {
|
|
9
|
+
index: number;
|
|
10
|
+
kind: 'text' | 'reasoning';
|
|
11
|
+
text: string;
|
|
12
|
+
}
|
|
13
|
+
interface PendingTool {
|
|
14
|
+
index: number;
|
|
15
|
+
id: string;
|
|
16
|
+
name: string;
|
|
17
|
+
arguments: string;
|
|
18
|
+
started: boolean;
|
|
19
|
+
}
|
|
20
|
+
export interface RelayOneChatStreamState {
|
|
21
|
+
blocks: OutboundContentBlock[];
|
|
22
|
+
open: OpenText | null;
|
|
23
|
+
tools: Map<string, PendingTool>;
|
|
24
|
+
finishReason: string | null;
|
|
25
|
+
sawDone: boolean;
|
|
26
|
+
sawUsage: boolean;
|
|
27
|
+
usage: TokenUsage | null;
|
|
28
|
+
finished: boolean;
|
|
29
|
+
}
|
|
30
|
+
export declare function createRelayOneChatStreamState(): RelayOneChatStreamState;
|
|
31
|
+
export declare function feedRelayOneChatPayload(state: RelayOneChatStreamState, payload: unknown): StreamChunk[];
|
|
32
|
+
export declare function closeRelayOneChatStream(state: RelayOneChatStreamState): StreamChunk[];
|
|
33
|
+
export declare function processRelayOneChatLine(line: string, state: RelayOneChatStreamState): StreamChunk[];
|
|
34
|
+
export declare function assertRelayOneChatStreamComplete(state: RelayOneChatStreamState): void;
|
|
35
|
+
export {};
|
|
36
|
+
//# sourceMappingURL=mapper-openai.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mapper-openai.d.ts","sourceRoot":"","sources":["../../../../src/host/relayone/mapper-openai.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAW,oBAAoB,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AAItH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,C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,KAAK,EAAE,uBAAuB,EAAE,OAAO,EAAE,OAAO,GAAG,WAAW,EAAE,CA6CvG;AACD,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,uBAAuB,GAAG,WAAW,EAAE,CAmBrF;AACD,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,uBAAuB,GAAG,WAAW,EAAE,CAUnG;AACD,wBAAgB,gCAAgC,CAAC,KAAK,EAAE,uBAAuB,GAAG,IAAI,CAErF"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type ContentBlock, type GenerateOptions, type Message } from '../common/llm-compat.ts';
|
|
2
|
+
import { type ResolvedRequestImages } from '../common/request-images.ts';
|
|
3
|
+
export declare function isRelayOneRecord(value: unknown): value is Record<string, unknown>;
|
|
4
|
+
export declare const relayOneString: (value: unknown) => string | undefined;
|
|
5
|
+
export declare const relayOneNumber: (value: unknown) => number | undefined;
|
|
6
|
+
export declare function relayOneArgsText(value: unknown): string;
|
|
7
|
+
export declare function relayOneSafeJson(value: string): unknown;
|
|
8
|
+
export declare function relayOneValidArguments(value: string): boolean;
|
|
9
|
+
export declare function relayOneTextOf(content: unknown): string;
|
|
10
|
+
export declare function relayOneToolResult(message: Message): ContentBlock & {
|
|
11
|
+
type: 'tool-result';
|
|
12
|
+
} | undefined;
|
|
13
|
+
export declare function relayOneInstructionText(message: Message): string;
|
|
14
|
+
export declare function relayOneLeadingInstructionEndIndex(messages: readonly Message[]): number;
|
|
15
|
+
export declare function relayOneSystemText(options: GenerateOptions): string;
|
|
16
|
+
export declare function relayOneReplayOutputItems(message: Message): Record<string, unknown>[] | null;
|
|
17
|
+
export declare function relayOneReplayBlocks(message: Message): (Record<string, unknown> | null)[] | null;
|
|
18
|
+
export declare function relayOneImageParts(content: readonly ContentBlock[], images: ResolvedRequestImages, accepted: boolean): Array<{
|
|
19
|
+
mediaType: string;
|
|
20
|
+
data: string;
|
|
21
|
+
} | {
|
|
22
|
+
unavailable: string;
|
|
23
|
+
}>;
|
|
24
|
+
export declare function relayOneEffort(options: GenerateOptions, configured: string | null, supported: readonly string[]): string | undefined;
|
|
25
|
+
//# sourceMappingURL=mapper-shared.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mapper-shared.d.ts","sourceRoot":"","sources":["../../../../src/host/relayone/mapper-shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,OAAO,EACb,MAAM,yBAAyB,CAAA;AAChC,OAAO,EAIL,KAAK,qBAAqB,EAC3B,MAAM,6BAA6B,CAAA;AAEpC,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAEjF;AACD,eAAO,MAAM,cAAc,UAAW,OAAO,KAAG,MAAM,GAAG,SAA0D,CAAA;AACnH,eAAO,MAAM,cAAc,UAAW,OAAO,KAAG,MAAM,GAAG,SAC8B,CAAA;AACvF,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAIvD;AACD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAEvD;AACD,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAG7D;AACD,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAUvD;AACD,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,GAAG,YAAY,GAAG;IAAE,IAAI,EAAE,aAAa,CAAA;CAAE,GAAG,SAAS,CAEvG;AACD,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAOhE;AACD,wBAAgB,kCAAkC,CAAC,QAAQ,EAAE,SAAS,OAAO,EAAE,GAAG,MAAM,CAMvF;AACD,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,eAAe,GAAG,MAAM,CAQnE;AACD,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,IAAI,CAS5F;AACD,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC,EAAE,GAAG,IAAI,CAMhG;AACD,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,SAAS,YAAY,EAAE,EAChC,MAAM,EAAE,qBAAqB,EAC7B,QAAQ,EAAE,OAAO,GAChB,KAAK,CAAC;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,WAAW,EAAE,MAAM,CAAA;CAAE,CAAC,CAYtE;AACD,wBAAgB,cAAc,CAC5B,OAAO,EAAE,eAAe,EACxB,UAAU,EAAE,MAAM,GAAG,IAAI,EACzB,SAAS,EAAE,SAAS,MAAM,EAAE,GAC3B,MAAM,GAAG,SAAS,CAIpB"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import type { RelayOneModelDto, RelayOneModelKind, RelayOneProtocol, RelayOneReasoningEffort } from '../../shared/relayone-contracts.ts';
|
|
2
|
+
import type { RelayOneSettings } from './token-store.ts';
|
|
3
|
+
export interface RelayOneModelEntry {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
kind: RelayOneModelKind;
|
|
7
|
+
groups: readonly string[];
|
|
8
|
+
endpoints: readonly string[];
|
|
9
|
+
protocol: RelayOneProtocol | null;
|
|
10
|
+
vendor: string | null;
|
|
11
|
+
description: string | null;
|
|
12
|
+
contextWindow: number;
|
|
13
|
+
maxOutputTokens: number;
|
|
14
|
+
reasoningEfforts: readonly RelayOneReasoningEffort[];
|
|
15
|
+
supportsImages: boolean;
|
|
16
|
+
/** Model-specific media billing/input schema published by /api/pricing. */
|
|
17
|
+
parameterSchema: Readonly<Record<string, unknown>> | null;
|
|
18
|
+
}
|
|
19
|
+
interface UpstreamModel {
|
|
20
|
+
id: string;
|
|
21
|
+
ownedBy: string | null;
|
|
22
|
+
endpoints: readonly string[];
|
|
23
|
+
}
|
|
24
|
+
interface PricingRecord {
|
|
25
|
+
groups: readonly string[];
|
|
26
|
+
endpoints: readonly string[];
|
|
27
|
+
vendorId: number | null;
|
|
28
|
+
description: string | null;
|
|
29
|
+
tags: string;
|
|
30
|
+
parameterSchema: Readonly<Record<string, unknown>> | null;
|
|
31
|
+
}
|
|
32
|
+
interface PricingCatalog {
|
|
33
|
+
rows: ReadonlyMap<string, PricingRecord>;
|
|
34
|
+
vendors: ReadonlyMap<number, string>;
|
|
35
|
+
}
|
|
36
|
+
/** Parse the OpenAI-shaped /v1/models envelope. Only these ids are callable by the key. */
|
|
37
|
+
export declare function parseRelayOneModelListing(payload: unknown): UpstreamModel[];
|
|
38
|
+
export declare function parseRelayOnePricing(payload: unknown): PricingCatalog;
|
|
39
|
+
interface AdaptiveThinkingPolicy {
|
|
40
|
+
efforts: readonly RelayOneReasoningEffort[];
|
|
41
|
+
enabledByDefault: boolean;
|
|
42
|
+
allowsTemperatureWhenOff: boolean;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Public Messages capabilities, not the Claude Code subscription's OAuth/betas.
|
|
46
|
+
* https://platform.claude.com/docs/en/build-with-claude/thinking#when-thinking-turns-on
|
|
47
|
+
* https://platform.claude.com/docs/en/build-with-claude/effort#effort-levels
|
|
48
|
+
*/
|
|
49
|
+
export declare function relayOneClaudeAdaptiveThinking(id: string): AdaptiveThinkingPolicy | undefined;
|
|
50
|
+
export declare function isRelayOneOpenAIModel(id: string, vendor: string | null): boolean;
|
|
51
|
+
/** Host-side protocol policy; clients render the result instead of inferring from a name. */
|
|
52
|
+
export declare function selectRelayOneProtocol(id: string, vendor: string | null, endpoints: readonly string[], kind?: RelayOneModelKind): RelayOneProtocol | null;
|
|
53
|
+
/** Merge live accessibility with public metadata. Public-only models are deliberately not added. */
|
|
54
|
+
export declare function mergeRelayOneCatalog(listingPayload: unknown, pricingPayload?: unknown): RelayOneModelEntry[];
|
|
55
|
+
export declare function relayOneProtocolLabel(protocol: RelayOneProtocol | null): string;
|
|
56
|
+
export declare function describeRelayOneModel(entry: RelayOneModelEntry): string;
|
|
57
|
+
export declare function convergeRelayOneEnabledModelIds(catalog: readonly RelayOneModelEntry[], selected: readonly string[] | null): string[] | null;
|
|
58
|
+
export declare function relayOneModelOptions(catalog: readonly RelayOneModelEntry[], settings: RelayOneSettings): RelayOneModelDto[];
|
|
59
|
+
export declare function resolveRelayOneModel(catalog: readonly RelayOneModelEntry[], id: string): RelayOneModelEntry | undefined;
|
|
60
|
+
export declare function relayOneCatalogGroups(catalog: readonly RelayOneModelEntry[]): string[];
|
|
61
|
+
/** Stable content fingerprint; reference equality is not a change detector. */
|
|
62
|
+
export declare function relayOneCatalogFingerprint(catalog: readonly RelayOneModelEntry[]): string;
|
|
63
|
+
/** The production snapshot writer uses this exact record shape. */
|
|
64
|
+
export declare function persistedRelayOneModelRecord(entry: RelayOneModelEntry): Record<string, unknown>;
|
|
65
|
+
/** Parser paired with persistedRelayOneModelRecord; malformed snapshots are rejected as a whole. */
|
|
66
|
+
export declare function parsePersistedRelayOneModelEntries(value: unknown): RelayOneModelEntry[] | undefined;
|
|
67
|
+
export declare function isRelayOneProtocolUnsupported(status: number, detail: string): boolean;
|
|
68
|
+
export declare function fallbackRelayOneProtocol(entry: RelayOneModelEntry, current: RelayOneProtocol): RelayOneProtocol | null;
|
|
69
|
+
export {};
|
|
70
|
+
//# sourceMappingURL=model-catalog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model-catalog.d.ts","sourceRoot":"","sources":["../../../../src/host/relayone/model-catalog.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EAChB,uBAAuB,EACxB,MAAM,oCAAoC,CAAA;AAC3C,OA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,oBAAoB,CAClC,OAAO,EAAE,SAAS,kBAAkB,EAAE,EACtC,EAAE,EAAE,MAAM,GACT,kBAAkB,GAAG,SAAS,CAGhC;AAED,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,SAAS,kBAAkB,EAAE,GAAG,MAAM,EAAE,CAEtF;AAED,+EAA+E;AAC/E,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,SAAS,kBAAkB,EAAE,GAAG,MAAM,CAEzF;AAED,mEAAmE;AACnE,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,kBAAkB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAQ/F;AAED,oGAAoG;AACpG,wBAAgB,kCAAkC,CAAC,KAAK,EAAE,OAAO,GAAG,kBAAkB,EAAE,GAAG,SAAS,CA0BnG;AAED,wBAAgB,6BAA6B,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAMrF;AAED,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,kBAAkB,EAAE,OAAO,EAAE,gBAAgB,GAAG,gBAAgB,GAAG,IAAI,CAOtH"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { RelayOneQuotaDto } from '../../shared/relayone-contracts.ts';
|
|
2
|
+
import { type RelayOneCredentialStore } from './token-store.ts';
|
|
3
|
+
import type { RelayOneAccountPool } from './account-pool.ts';
|
|
4
|
+
export declare const RELAYONE_TOKEN_USAGE_URL: string;
|
|
5
|
+
export declare const RELAYONE_STATUS_URL: string;
|
|
6
|
+
export declare const RELAYONE_QUOTA_TTL_MS = 60000;
|
|
7
|
+
export declare function idleRelayOneQuota(): RelayOneQuotaDto;
|
|
8
|
+
export interface RelayOneQuotaOptions {
|
|
9
|
+
fetchFn?: typeof fetch;
|
|
10
|
+
ttlMs?: number;
|
|
11
|
+
now?: () => number;
|
|
12
|
+
}
|
|
13
|
+
/** Credential-scoped New API token quota with a 60-second single-flight cache. */
|
|
14
|
+
export declare class RelayOneQuotaReader {
|
|
15
|
+
private readonly store;
|
|
16
|
+
private readonly fetchFn;
|
|
17
|
+
private readonly ttlMs;
|
|
18
|
+
private readonly now;
|
|
19
|
+
private value;
|
|
20
|
+
private scope;
|
|
21
|
+
private refreshing;
|
|
22
|
+
private epoch;
|
|
23
|
+
constructor(store: RelayOneCredentialStore | RelayOneAccountPool, options?: RelayOneQuotaOptions);
|
|
24
|
+
snapshot(): RelayOneQuotaDto;
|
|
25
|
+
reset(): void;
|
|
26
|
+
startRefresh(force?: boolean): void;
|
|
27
|
+
refresh(force?: boolean): Promise<void>;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=quota.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quota.d.ts","sourceRoot":"","sources":["../../../../src/host/relayone/quota.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAA;AAC1E,OAAO,EAEL,KAAK,uBAAuB,EAE7B,MAAM,kBAAkB,CAAA;AACzB,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AAG5D,eAAO,MAAM,wBAAwB,QAAuC,CAAA;AAC5E,eAAO,MAAM,mBAAmB,QAAkC,CAAA;AAClE,eAAO,MAAM,qBAAqB,QAAS,CAAA;AAE3C,wBAAgB,iBAAiB,IAAI,gBAAgB,CAKpD;AAuBD,MAAM,WAAW,oBAAoB;IACnC,OAAO,CAAC,EAAE,OAAO,KAAK,CAAA;IACtB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,GAAG,CAAC,EAAE,MAAM,MAAM,CAAA;CACnB;AAED,kFAAkF;AAClF,qBAAa,mBAAmB;IAU5B,OAAO,CAAC,QAAQ,CAAC,KAAK;IATxB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAc;IACtC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAQ;IAC9B,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAc;IAClC,OAAO,CAAC,KAAK,CAAsB;IACnC,OAAO,CAAC,KAAK,CAAsB;IACnC,OAAO,CAAC,UAAU,CAA6B;IAC/C,OAAO,CAAC,KAAK,CAAI;gBAGE,KAAK,EAAE,uBAAuB,GAAG,mBAAmB,EACrE,OAAO,GAAE,oBAAyB;IAMpC,QAAQ,IAAI,gBAAgB;IAC5B,KAAK,IAAI,IAAI;IAMb,YAAY,CAAC,KAAK,UAAQ,GAAG,IAAI;IAE3B,OAAO,CAAC,KAAK,UAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;CAoE5C"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
2
|
+
import { type RelayOneStatusDto } from '../../shared/relayone-contracts.ts';
|
|
3
|
+
import { RelayOneAccountPool } from './account-pool.ts';
|
|
4
|
+
import { RelayOneCatalogManager } from './catalog-manager.ts';
|
|
5
|
+
import { RelayOneCredentialStore, RelayOneSettingsStore } from './token-store.ts';
|
|
6
|
+
import { type RelayOneQuotaReader } from './quota.ts';
|
|
7
|
+
export interface RelayOneRouteOptions {
|
|
8
|
+
quota?: RelayOneQuotaReader;
|
|
9
|
+
serving?: boolean | (() => boolean);
|
|
10
|
+
conflict?: string | null | (() => string | null);
|
|
11
|
+
/**
|
|
12
|
+
* The multi-key pool.
|
|
13
|
+
*
|
|
14
|
+
* Absent keeps the pre-pool routes working against the single key file, which
|
|
15
|
+
* is what a host built before the pool answers.
|
|
16
|
+
*/
|
|
17
|
+
accountPool?: RelayOneAccountPool | null;
|
|
18
|
+
/**
|
|
19
|
+
* Fetch used to verify a pasted key.
|
|
20
|
+
*
|
|
21
|
+
* The host passes the line's own proxy-aware fetch here: verifying a key with
|
|
22
|
+
* the process's bare `fetch` would fail behind a proxy the line is configured
|
|
23
|
+
* to use, and report a working key as refused.
|
|
24
|
+
*/
|
|
25
|
+
fetchFn?: typeof fetch;
|
|
26
|
+
}
|
|
27
|
+
/** Local-first status; the network refresh begins behind the answer. */
|
|
28
|
+
export declare function getRelayOneWebStatus(store: RelayOneCredentialStore, settingsStore: RelayOneSettingsStore, catalog: RelayOneCatalogManager, options?: RelayOneRouteOptions): Promise<RelayOneStatusDto>;
|
|
29
|
+
/** Route table mirrored by src/client/relayone/api.ts. */
|
|
30
|
+
export declare function registerRelayOneRoutes(ctx: Context, store: RelayOneCredentialStore, settingsStore: RelayOneSettingsStore, catalog: RelayOneCatalogManager, options?: RelayOneRouteOptions): () => void;
|
|
31
|
+
/** Startup warm-up is deliberately fire-and-forget in the plugin entry. */
|
|
32
|
+
export declare function warmRelayOneCatalogOnStartup(catalog: RelayOneCatalogManager): Promise<void>;
|
|
33
|
+
//# sourceMappingURL=routes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../../src/host/relayone/routes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAIlD,OAAO,EAML,KAAK,iBAAiB,EACvB,MAAM,oCAAoC,CAAA;AAC3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AACvD,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAA;AAE7D,OAAO,EACL,uBAAuB,EACvB,qBAAqB,EAEtB,MAAM,kBAAkB,CAAA;AAEzB,OAAO,EAAqB,KAAK,mBAAmB,EAAE,MAAM,YAAY,CAAA;AAgDxE,MAAM,WAAW,oBAAoB;IACnC,KAAK,CAAC,EAAE,mBAAmB,CAAA;IAC3B,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;;;;;OAKG;IACH,WAAW,CAAC,EAAE,mBAAmB,GAAG,IAAI,CAAA;IACxC;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,OAAO,KAAK,CAAA;CACvB;AAWD,wEAAwE;AACxE,wBAAsB,oBAAoB,CACxC,KAAK,EAAE,uBAAuB,EAC9B,aAAa,EAAE,qBAAqB,EACpC,OAAO,EAAE,sBAAsB,EAC/B,OAAO,GAAE,oBAAyB,GACjC,OAAO,CAAC,iBAAiB,CAAC,CAiC5B;AAiDD,0DAA0D;AAC1D,wBAAgB,sBAAsB,CACpC,GAAG,EAAE,OAAO,EACZ,KAAK,EAAE,uBAAuB,EAC9B,aAAa,EAAE,qBAAqB,EACpC,OAAO,EAAE,sBAAsB,EAC/B,OAAO,GAAE,oBAAyB,GACjC,MAAM,IAAI,CAyJZ;AAED,2EAA2E;AAC3E,wBAAsB,4BAA4B,CAAC,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAAC,IAAI,CAAC,CAGjG"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { CredentialStore } from '../token-store.ts';
|
|
2
|
+
import { type ContextWindowOverridePatch } from '../common/context-window-overrides.ts';
|
|
3
|
+
import { type RelayOneReasoningEffort } from '../../shared/relayone-contracts.ts';
|
|
4
|
+
export interface RelayOneCredentials {
|
|
5
|
+
apiKey: string;
|
|
6
|
+
authenticatedAt: number;
|
|
7
|
+
}
|
|
8
|
+
export interface RelayOneSettings {
|
|
9
|
+
enabled: boolean;
|
|
10
|
+
/** null = every currently accessible chat model; [] = explicitly none. */
|
|
11
|
+
enabledModelIds: string[] | null;
|
|
12
|
+
contextWindowOverrides: Record<string, number>;
|
|
13
|
+
defaultReasoningEffort: RelayOneReasoningEffort | null;
|
|
14
|
+
imageModel: string | null;
|
|
15
|
+
videoModel: string | null;
|
|
16
|
+
}
|
|
17
|
+
export interface RelayOneSettingsPatch {
|
|
18
|
+
enabled?: boolean;
|
|
19
|
+
enabledModelIds?: string[];
|
|
20
|
+
contextWindowOverrides?: ContextWindowOverridePatch;
|
|
21
|
+
defaultReasoningEffort?: RelayOneReasoningEffort | null;
|
|
22
|
+
imageModel?: string | null;
|
|
23
|
+
videoModel?: string | null;
|
|
24
|
+
}
|
|
25
|
+
export declare function parseRelayOneCredentials(value: unknown): RelayOneCredentials;
|
|
26
|
+
export declare function relayOneCredentialPath(): string;
|
|
27
|
+
export declare function relayOneSettingsPath(): string;
|
|
28
|
+
export declare function relayOneCredentialFingerprint(credentials: RelayOneCredentials): string;
|
|
29
|
+
export declare class RelayOneCredentialStore {
|
|
30
|
+
private readonly filePath;
|
|
31
|
+
private readonly backend;
|
|
32
|
+
constructor(filePath?: string, backend?: CredentialStore<RelayOneCredentials>);
|
|
33
|
+
path(): string;
|
|
34
|
+
read(): Promise<RelayOneCredentials | null>;
|
|
35
|
+
write(credentials: RelayOneCredentials): Promise<void>;
|
|
36
|
+
delete(): Promise<void>;
|
|
37
|
+
}
|
|
38
|
+
export declare function defaultRelayOneSettings(): RelayOneSettings;
|
|
39
|
+
export declare function parseRelayOneSettings(value: unknown): RelayOneSettings;
|
|
40
|
+
export declare function mergeRelayOneSettings(current: RelayOneSettings, patch: RelayOneSettingsPatch): RelayOneSettings;
|
|
41
|
+
export declare class RelayOneSettingsStore {
|
|
42
|
+
private readonly filePath;
|
|
43
|
+
constructor(filePath?: string);
|
|
44
|
+
path(): string;
|
|
45
|
+
read(): Promise<RelayOneSettings>;
|
|
46
|
+
write(settings: RelayOneSettings): Promise<void>;
|
|
47
|
+
updateSettings(patch: RelayOneSettingsPatch): Promise<RelayOneSettings>;
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=token-store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"token-store.d.ts","sourceRoot":"","sources":["../../../../src/host/relayone/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,EAEL,KAAK,uBAAuB,EAC7B,MAAM,oC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,WAAW,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC;IAQtD,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;CAGxB;AAED,wBAAgB,uBAAuB,IAAI,gBAAgB,CAS1D;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,gBAAgB,CAmBtE;AAED,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,gBAAgB,EAAE,KAAK,EAAE,qBAAqB,GAAG,gBAAgB,CAY/G;AAGD,qBAAa,qBAAqB;IACpB,OAAO,CAAC,QAAQ,CAAC,QAAQ;gBAAR,QAAQ,GAAE,MAA+B;IACtE,IAAI,IAAI,MAAM;IACR,IAAI,IAAI,OAAO,CAAC,gBAAgB,CAAC;IAIjC,KAAK,CAAC,QAAQ,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;IActD,cAAc,CAAC,KAAK,EAAE,qBAAqB,GAAG,OAAO,CAAC,gBAAgB,CAAC;CAOxE"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export declare const PROVIDER_ID = "relayone";
|
|
2
|
+
export declare const PROVIDER_NAME = "RelayOne";
|
|
3
|
+
/** Site documentation: https://z1rry.cyou/docs#/overview */
|
|
4
|
+
export declare const RELAYONE_ORIGIN = "https://z1rry.cyou";
|
|
5
|
+
export declare const RELAYONE_BASE_URL: string;
|
|
6
|
+
export declare const RELAYONE_MODELS_URL: string;
|
|
7
|
+
export declare const RELAYONE_PRICING_URL: string;
|
|
8
|
+
export declare const RELAYONE_CHAT_URL: string;
|
|
9
|
+
export declare const RELAYONE_RESPONSES_URL: string;
|
|
10
|
+
export declare const RELAYONE_MESSAGES_URL: string;
|
|
11
|
+
export declare const RELAYONE_IMAGES_URL: string;
|
|
12
|
+
export declare const RELAYONE_IMAGE_EDITS_URL: string;
|
|
13
|
+
export declare const RELAYONE_VIDEO_URL: string;
|
|
14
|
+
export declare const RELAYONE_TASKS_URL: string;
|
|
15
|
+
export declare const RELAYONE_DOCS_URL: string;
|
|
16
|
+
export declare const RELAYONE_USER_AGENT = "dsh-multi-provider (+https://github.com/alm-allen/dsh-multi-provider)";
|
|
17
|
+
export declare const RELAYONE_CATALOG_TTL_MS: number;
|
|
18
|
+
export declare const RELAYONE_MAX_REQUEST_IMAGE_BYTES: number;
|
|
19
|
+
/** Remove a credential echoed by an upstream error before truncating its public detail. */
|
|
20
|
+
export declare function relayOneSafeDetail(value: unknown, apiKey?: string, limit?: number): string;
|
|
21
|
+
export declare function relayOneHeaders(apiKey: string, json?: boolean): Record<string, string>;
|
|
22
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/host/relayone/types.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,WAAW,aAAuB,CAAA;AAC/C,eAAO,MAAM,aAAa,aAAyB,CAAA;AAEnD,4DAA4D;AAC5D,eAAO,MAAM,eAAe,uBAAuB,CAAA;AACnD,eAAO,MAAM,iBAAiB,QAA0B,CAAA;AACxD,eAAO,MAAM,mBAAmB,QAAgC,CAAA;AAChE,eAAO,MAAM,oBAAoB,QAAmC,CAAA;AACpE,eAAO,MAAM,iBAAiB,QAA0C,CAAA;AACxE,eAAO,MAAM,sBAAsB,QAAmC,CAAA;AACtE,eAAO,MAAM,qBAAqB,QAAkC,CAAA;AACpE,eAAO,MAAM,mBAAmB,QAA4C,CAAA;AAC5E,eAAO,MAAM,wBAAwB,QAAsC,CAAA;AAC3E,eAAO,MAAM,kBAAkB,QAA2C,CAAA;AAC1E,eAAO,MAAM,kBAAkB,QAA+B,CAAA;AAC9D,eAAO,MAAM,iBAAiB,QAA4B,CAAA;AAC1D,eAAO,MAAM,mBAAmB,0EAA0E,CAAA;AAC1G,eAAO,MAAM,uBAAuB,QAAa,CAAA;AACjD,eAAO,MAAM,gCAAgC,QAAmB,CAAA;AAEhE,2FAA2F;AAC3F,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,KAAK,SAAO,GAAG,MAAM,CAGxF;AAED,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,UAAO,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAOnF"}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { type GenerateOptions, type StreamChunk } from '@deepseek-ai/dsh-llm';
|
|
2
|
+
import { type CodexWireCapabilities } from '../shared/model-catalog.ts';
|
|
3
|
+
import { type StreamActivity } from './common/idle-watchdog.ts';
|
|
4
|
+
import { type CodexAccountPool } from './codex-account-pool.ts';
|
|
5
|
+
import { OAuthService } from './oauth-service.ts';
|
|
6
|
+
import { type LocalRawImageOptions } from './responses-mapper.ts';
|
|
7
|
+
import { type PromptCacheOverride } from './common/prompt-cache-policy.ts';
|
|
8
|
+
import type { AttachmentStore } from '@deepseek-ai/dsh-attachment';
|
|
9
|
+
import type { CodexOutputVerbosity, CodexReasoningSummary } from '../shared/contracts.ts';
|
|
10
|
+
import { type CodexRemoteCompactionCheckpoint } from './codex-remote-compaction.ts';
|
|
11
|
+
type FetchLike = typeof fetch;
|
|
12
|
+
export interface ResponsesClientOptions {
|
|
13
|
+
fetchFn?: FetchLike;
|
|
14
|
+
localRawImages?: LocalRawImageOptions;
|
|
15
|
+
onGenerationFinished?: () => void;
|
|
16
|
+
outputVerbosity?: () => CodexOutputVerbosity | null;
|
|
17
|
+
fastMode?: () => boolean;
|
|
18
|
+
reasoningSummary?: () => CodexReasoningSummary | null;
|
|
19
|
+
/** Account pool to rotate over; without one the single stored credential is used. */
|
|
20
|
+
accountPool?: CodexAccountPool;
|
|
21
|
+
/**
|
|
22
|
+
* Idle budget for one Responses stream, counted on transport activity rather
|
|
23
|
+
* than on visible chunks. Defaults to the shared five-minute budget; the
|
|
24
|
+
* plugin config exposes it so a deployment can retune it without a rebuild.
|
|
25
|
+
*/
|
|
26
|
+
codexStreamIdleTimeoutMs?: number;
|
|
27
|
+
/**
|
|
28
|
+
* Resolves what a model speaks on the wire.
|
|
29
|
+
*
|
|
30
|
+
* The adapter binds this to the catalog its resolution used, so the request
|
|
31
|
+
* speaks the same protocol the model was resolved against. Without it the
|
|
32
|
+
* shipped table answers, which is the right floor for a model nothing else
|
|
33
|
+
* states a protocol for.
|
|
34
|
+
*/
|
|
35
|
+
capabilities?: CodexWireCapabilityResolver;
|
|
36
|
+
/** Optional deployment override for cache-prefix behaviour. */
|
|
37
|
+
promptCache?: PromptCacheOverride;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Resolves the wire capabilities of one model.
|
|
41
|
+
*
|
|
42
|
+
* A resolver rather than a fixed value, because a fallback moves the request
|
|
43
|
+
* to a DIFFERENT model, and that model may speak a different protocol.
|
|
44
|
+
*/
|
|
45
|
+
export type CodexWireCapabilityResolver = (model: string) => CodexWireCapabilities;
|
|
46
|
+
export declare class ResponsesClient {
|
|
47
|
+
private readonly oauth;
|
|
48
|
+
private readonly attachments;
|
|
49
|
+
private readonly options;
|
|
50
|
+
private readonly fetchFn;
|
|
51
|
+
private readonly onGenerationFinished;
|
|
52
|
+
private readonly outputVerbosity;
|
|
53
|
+
private readonly fastMode;
|
|
54
|
+
private readonly reasoningSummary;
|
|
55
|
+
private readonly accountPool;
|
|
56
|
+
private readonly codexStreamIdleTimeoutMs;
|
|
57
|
+
private readonly capabilities;
|
|
58
|
+
/**
|
|
59
|
+
* Opaque backend routing state, keyed by a unique model-request nonce.
|
|
60
|
+
* The host does not expose a reliable human-turn identity, so this is the
|
|
61
|
+
* conservative no-cross-request-reuse fallback, not full turn continuity.
|
|
62
|
+
*
|
|
63
|
+
* The Codex backend hands `x-codex-turn-state` back on each response and
|
|
64
|
+
* expects it on the next request of the SAME turn, which lets it resume the
|
|
65
|
+
* turn instead of re-ingesting the whole history.
|
|
66
|
+
*
|
|
67
|
+
* It is a client/server contract with a one-turn scope: the official client
|
|
68
|
+
* creates a fresh per-turn session and warns that replaying the token across
|
|
69
|
+
* turns breaks routing. The value is also account-scoped, so each entry
|
|
70
|
+
* records the auth owner that minted it and is discarded when the signer
|
|
71
|
+
* changes. It is only ever an optimization, so a miss costs a full resend and
|
|
72
|
+
* never correctness.
|
|
73
|
+
*/
|
|
74
|
+
private readonly turnStates;
|
|
75
|
+
constructor(oauth: OAuthService, attachments: Pick<AttachmentStore, 'readImage'> & Partial<Pick<AttachmentStore, 'imageLimits'>>, options?: ResponsesClientOptions);
|
|
76
|
+
private readonly localRawImages;
|
|
77
|
+
stream(rawOptions: GenerateOptions, capabilities?: CodexWireCapabilityResolver): AsyncIterable<StreamChunk>;
|
|
78
|
+
private remoteCompact;
|
|
79
|
+
private send;
|
|
80
|
+
/**
|
|
81
|
+
* Record the routing state a response carried, for this turn's next request.
|
|
82
|
+
*
|
|
83
|
+
* A response that carries none clears any stored value: a backend that stops
|
|
84
|
+
* sending the header has stopped honouring it, and replaying a stale value
|
|
85
|
+
* would be guessing. An empty header is treated the same as absent.
|
|
86
|
+
*/
|
|
87
|
+
private rememberTurnState;
|
|
88
|
+
/**
|
|
89
|
+
* Bounded store: a long-lived host serves many sessions and turns, and nothing
|
|
90
|
+
* here ever signals that either ended, so the map is capped and evicts the
|
|
91
|
+
* oldest entry. The value is an optimization, so a miss only costs a resend.
|
|
92
|
+
*/
|
|
93
|
+
private storeTurnState;
|
|
94
|
+
/**
|
|
95
|
+
* Routing state this turn may replay, or undefined.
|
|
96
|
+
*
|
|
97
|
+
* A token minted by a different auth owner is dropped rather than sent: the
|
|
98
|
+
* value is account-scoped, and sending it to another account is at best a
|
|
99
|
+
* routing hint for the wrong machine and at worst a replay of state that
|
|
100
|
+
* account never issued. Dropping it only costs a full resend.
|
|
101
|
+
*/
|
|
102
|
+
private turnStateFor;
|
|
103
|
+
/**
|
|
104
|
+
* Send one payload with account rotation.
|
|
105
|
+
*
|
|
106
|
+
* The pool picks the account — skipping cooling, quota-exhausted and failed
|
|
107
|
+
* ones — and has already refreshed a token that was about to expire. A 429
|
|
108
|
+
* cools that account down and retries the identical payload on the next
|
|
109
|
+
* eligible account; a 401 forces exactly one refresh, and an account whose
|
|
110
|
+
* refresh is rejected leaves the rotation instead of invalidating the others.
|
|
111
|
+
* The payload is account-independent, so it is never rebuilt between attempts.
|
|
112
|
+
*/
|
|
113
|
+
/** What one pool attempt produced, including the account that served it. */
|
|
114
|
+
private sendWithPool;
|
|
115
|
+
private request;
|
|
116
|
+
}
|
|
117
|
+
export declare function parseResponsesStream(response: Response, signal?: AbortSignal,
|
|
118
|
+
/** Kept for the public parser's positional compatibility; native arguments are never stripped. */
|
|
119
|
+
_legacyHiddenSandboxControls?: ReadonlySet<string>,
|
|
120
|
+
/** Reports transport activity so a caller-side idle watchdog keeps rearming. */
|
|
121
|
+
activity?: StreamActivity,
|
|
122
|
+
/** A remote-v2 checkpoint minted immediately before this ordinary answer. */
|
|
123
|
+
nativeCompaction?: CodexRemoteCompactionCheckpoint): AsyncIterable<StreamChunk>;
|
|
124
|
+
export {};
|
|
125
|
+
//# sourceMappingURL=responses-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"responses-client.d.ts","sourceRoot":"","sources":["../../../src/host/responses-client.ts"],"names":[],"mappings":"AAKA,OAAO,EAIL,KAAK,eAAe,EACpB,KAAK,WAAW,EAEjB,MAAM,sBAAsB,CAAA;AAE7B,OAAO,EAAoF,KAAK,qBAAqB,EAAE,MAAM,4BAA4B,CAAA;AACzJ,OAAO,EAA0D,KAAK,cAAc,EAAE,MAAM,2BAA2B,CAAA;AACvH,OAAO,EAAsB,KAAK,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AACnF,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACjD,OAAO,EAAgF,KAAK,oBAAoB,EAAE,MAAM,uBAAuB,CAAA;AAI/I,OAAO,EAAuB,KAAK,mBAAmB,EAAE,MAAM,iCAAiC,CAAA;AAG/F,OA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Q,CAAC,WAAW,CAAyB;IACrD,OAAO,CAAC,QAAQ,CAAC,wBAAwB,CAAQ;IACjD,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAyC;IACtE;;;;;;;;;;;;;;;OAeG;IACH,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAoC;gBAE5C,KAAK,EAAE,YAAY,EACnB,WAAW,EAAE,IAAI,CAAC,eAAe,EAAE,WAAW,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,eAAe,EAAE,aAAa,CAAC,CAAC,EAC/F,OAAO,GAAE,sBAA2B;IAavD,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAsB;IAE9C,MAAM,CACX,UAAU,EAAE,eAAe,EAC3B,YAAY,CAAC,EAAE,2BAA2B,GACzC,aAAa,CAAC,WAAW,CAAC;YA8Hf,aAAa;YA4Cb,IAAI;IAoBlB;;;;;;OAMG;IACH,OAAO,CAAC,iBAAiB;IAUzB;;;;OAIG;IACH,OAAO,CAAC,cAAc;IAetB;;;;;;;OAOG;IACH,OAAO,CAAC,YAAY;IAapB;;;;;;;;;OASG;IACH,4EAA4E;YAC9D,YAAY;YAuEZ,OAAO;CAmEtB;AA0GD,wBAAuB,oBAAoB,CACzC,QAAQ,EAAE,QAAQ,EAClB,MAAM,CAAC,EAAE,WAAW;AACpB,kGAAkG;AAClG,4BAA4B,GAAE,WAAW,CAAC,MAAM,CAAa;AAC7D,gFAAgF;AAChF,QAAQ,CAAC,EAAE,cAAc;AACzB,6EAA6E;AAC7E,gBAAgB,CAAC,EAAE,+BAA+B,GACjD,aAAa,CAAC,WAAW,CAAC,CAiS5B"}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import type { AttachmentStore } from '@deepseek-ai/dsh-attachment';
|
|
2
|
+
import { type GenerateOptions } from './common/llm-compat.ts';
|
|
3
|
+
import type { CodexOutputVerbosity, CodexReasoningSummary } from '../shared/contracts.ts';
|
|
4
|
+
import { type CodexRemoteCompactionCheckpoint } from './codex-remote-compaction.ts';
|
|
5
|
+
/**
|
|
6
|
+
* The Responses request body, in the field order the official client sends.
|
|
7
|
+
*
|
|
8
|
+
* The order is not cosmetic: the official client keeps the routing fields
|
|
9
|
+
* first because a gateway may inspect the body incrementally before a
|
|
10
|
+
* multi-megabyte `input` arrives, so `model` and `stream` have to be readable
|
|
11
|
+
* without reading the whole document.
|
|
12
|
+
*/
|
|
13
|
+
export interface ResponsesPayload extends Record<string, unknown> {
|
|
14
|
+
model: string;
|
|
15
|
+
stream: true;
|
|
16
|
+
service_tier?: string;
|
|
17
|
+
input: Array<Record<string, unknown>>;
|
|
18
|
+
/** Tool declarations; absent on a Lite request, which carries them in `input`. */
|
|
19
|
+
tools?: Array<Record<string, unknown>>;
|
|
20
|
+
tool_choice?: string;
|
|
21
|
+
parallel_tool_calls?: boolean;
|
|
22
|
+
reasoning?: Record<string, unknown>;
|
|
23
|
+
store: false;
|
|
24
|
+
include?: string[];
|
|
25
|
+
/** Stable per-conversation cache key; lets the backend reuse prompt prefix. */
|
|
26
|
+
prompt_cache_key?: string;
|
|
27
|
+
text?: {
|
|
28
|
+
verbosity: CodexOutputVerbosity;
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Wire options for one request.
|
|
33
|
+
*/
|
|
34
|
+
export interface ResponsesWireOptions {
|
|
35
|
+
/**
|
|
36
|
+
* Whether the model speaks the Responses Lite protocol.
|
|
37
|
+
*
|
|
38
|
+
* Optional on purpose: without it the model's own catalog decides, and a
|
|
39
|
+
* model no catalog states a protocol for is not Lite - the Lite body is a
|
|
40
|
+
* different request, not a different spelling of this one. A caller that
|
|
41
|
+
* knows more than the shipped table (the live listing, say) states it here.
|
|
42
|
+
*/
|
|
43
|
+
useResponsesLite?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Stable per-conversation identity the official client derives its item ids
|
|
46
|
+
* from.
|
|
47
|
+
*
|
|
48
|
+
* The official client namespaces its item ids by the conversation thread, so
|
|
49
|
+
* the same instructions carry the same id inside one conversation and a
|
|
50
|
+
* different one in another. Without a namespace the id is still stable, but
|
|
51
|
+
* it is stable across conversations too.
|
|
52
|
+
*/
|
|
53
|
+
idNamespace?: string;
|
|
54
|
+
/** Current model-configuration hash used to validate persisted checkpoints. */
|
|
55
|
+
compHash?: string;
|
|
56
|
+
/** A just-created checkpoint to put before the latest user turn. */
|
|
57
|
+
freshCompaction?: CodexRemoteCompactionCheckpoint;
|
|
58
|
+
}
|
|
59
|
+
export type FetchLike = (input: string | URL | Request, init?: RequestInit) => Promise<Response>;
|
|
60
|
+
export interface LocalRawImageOptions {
|
|
61
|
+
baseUrl?: string;
|
|
62
|
+
fetchFn?: FetchLike;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Base64 image payload one Codex request may carry.
|
|
66
|
+
*
|
|
67
|
+
* THIS ROUTE HAD NO BOUND AT ALL, which is what made a long session fail
|
|
68
|
+
* intermittently (issue #50). Every turn re-inlines every image still in
|
|
69
|
+
* history, so the request body grew with the number of images ever read and
|
|
70
|
+
* nothing ever trimmed it. Past roughly 4 MB the transport itself gives up: the
|
|
71
|
+
* report's field logs show 18/18 successes in the 3–4 MB band and 3/10 in the
|
|
72
|
+
* 4–5 MB band, and a synthetic probe against the subscription endpoint returned
|
|
73
|
+
* `NGHTTP2_ENHANCE_YOUR_CALM` / `NGHTTP2_INTERNAL_ERROR` on every ≥4 MB body
|
|
74
|
+
* while ≤3 MB always passed.
|
|
75
|
+
*
|
|
76
|
+
* The NUMBER is this route's own, derived from those measurements rather than
|
|
77
|
+
* borrowed. Kimi's 1.5 MB figure is sized for Kimi's 2 MB request limit and
|
|
78
|
+
* would silently drop images this endpoint accepts; MiniMax's 16 MB is sized
|
|
79
|
+
* for a 64 MB body ceiling this route does not have. 2 MiB of image data keeps
|
|
80
|
+
* the whole body inside the band that never failed, even after the
|
|
81
|
+
* conversation text, tool schemas and system prompt are added. It is a
|
|
82
|
+
* transport property of this deployment, not a documented API limit, so
|
|
83
|
+
* `DSH_CODEX_MAX_IMAGE_BYTES` overrides it.
|
|
84
|
+
*
|
|
85
|
+
* It bounds the IMAGE contribution only. A request whose text alone exceeds the
|
|
86
|
+
* transport is still refused by the transport, and no image budget can fix that.
|
|
87
|
+
*/
|
|
88
|
+
export declare const DEFAULT_MAX_REQUEST_IMAGE_BYTES: number;
|
|
89
|
+
/**
|
|
90
|
+
* Image budget this process enforces, honouring the deployment override.
|
|
91
|
+
*
|
|
92
|
+
* Parsed as bytes and ignored when it is not a positive finite number, so a
|
|
93
|
+
* typo cannot silently disable the guard by producing `NaN`.
|
|
94
|
+
*/
|
|
95
|
+
export declare function maxRequestImageBytes(env?: NodeJS.ProcessEnv): number;
|
|
96
|
+
/**
|
|
97
|
+
* Replace the oldest images with that placeholder once the built request would
|
|
98
|
+
* carry more than `maxBytes` of base64 image data.
|
|
99
|
+
*
|
|
100
|
+
* WHY THIS RUNS ON THE BUILT INPUT rather than on `options.messages` like the
|
|
101
|
+
* other routes. Two image forms reach this wire and only one of them is a
|
|
102
|
+
* message block: a pasted attachment arrives as `{ type: 'image', attachment }`,
|
|
103
|
+
* but the tool-read images in issue #50 arrive as local markdown links
|
|
104
|
+
* (``) that `mapUserText` fetches and inlines
|
|
105
|
+
* while building. A message-level pass cannot see the second form at all, and
|
|
106
|
+
* the shared `offloadOldestRequestImages` additionally does not recurse into
|
|
107
|
+
* `tool-result` content — so measuring here, after every form has become an
|
|
108
|
+
* `input_image` item, is the one place that bounds what actually goes out.
|
|
109
|
+
*
|
|
110
|
+
* The oldest occurrences go first and durable history is untouched; only the
|
|
111
|
+
* request about to be sent changes. A retry after a model fallback reuses the
|
|
112
|
+
* bounded input instead of re-inflating it.
|
|
113
|
+
*
|
|
114
|
+
* @param input - the payload's `input` items, mutated in place.
|
|
115
|
+
* @param maxBytes - base64 image budget for the whole request.
|
|
116
|
+
* @returns how many images were replaced.
|
|
117
|
+
*/
|
|
118
|
+
export declare function offloadOldestInputImages(input: Array<Record<string, unknown>>, maxBytes?: number): number;
|
|
119
|
+
export declare function buildResponsesPayload(options: GenerateOptions, attachments: Pick<AttachmentStore, 'readImage'> & Partial<Pick<AttachmentStore, 'imageLimits'>>, localRawImages?: LocalRawImageOptions, outputVerbosity?: CodexOutputVerbosity | null, fastMode?: boolean, reasoningSummary?: CodexReasoningSummary | null, promptCacheKey?: string, wire?: ResponsesWireOptions): Promise<ResponsesPayload>;
|
|
120
|
+
/**
|
|
121
|
+
* The same request with every tool change taken back out.
|
|
122
|
+
*
|
|
123
|
+
* This is the shape a backend that refuses the update channel gets: the complete
|
|
124
|
+
* current declaration list at the head, no change messages, no deferred markers.
|
|
125
|
+
* It is exactly what the line sent before the capability existed, so the fallback
|
|
126
|
+
* costs a cache miss and nothing else.
|
|
127
|
+
*
|
|
128
|
+
* @param options - the request that was refused.
|
|
129
|
+
* @returns a request the line can always send.
|
|
130
|
+
*/
|
|
131
|
+
export declare function withoutCodexToolChanges<T extends GenerateOptions>(options: T): T;
|
|
132
|
+
export declare const CODEX_BASE_INSTRUCTIONS_KIND = "model.base_instructions";
|
|
133
|
+
//# sourceMappingURL=responses-mapper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"responses-mapper.d.ts","sourceRoot":"","sources":["../../../src/host/responses-mapper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAsC,MAAM,6BAA6B,CAAA;AACtG,OAAO,EAIL,KAAK,eAAe,EAErB,MAAM,wBAAwB,CAAA;AAI/B,OAAO,KAAK,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAA;AACzF,OAAO,EAML,KAAK,+BAA+B,EACrC,MAAM,8BAA8B,CAAA;AAErC;;;;;;;GAOG;AACH,MAAM,WAAW,gBAAiB,SAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAC/D,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,IAAI,CAAA;IACZ,YAAY,CAAC,EAAE,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;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EACrC,QAAQ,GAAE,MAA+B,GACxC,MAAM,CAsBR;AAsCD,wBAAsB,qBAAqB,CACzC,OAAO,EAAE,eAAe,EACxB,WAAW,EAAE,IAAI,CAAC,eAAe,EAAE,WAAW,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,eAAe,EAAE,aAAa,CAAC,CAAC,EAC/F,cAAc,GAAE,oBAAyB,EACzC,eAAe,GAAE,oBAAoB,GAAG,IAAW,EACnD,QAAQ,GAAE,OAAe,EACzB,gBAAgB,GAAE,qBAAqB,GAAG,IAAW,EACrD,cAAc,CAAC,EAAE,MAAM,EACvB,IAAI,GAAE,oBAAyB,GAC9B,OAAO,CAAC,gBAAgB,CAAC,CAsM3B;AA2HD;;;;;;;;;;GAUG;AACH,wBAAgB,uBAAuB,CAAC,CAAC,SAAS,eAAe,EAAE,OAAO,EAAE,CAAC,GAAG,CAAC,CAUhF;AAUD,eAAO,MAAM,4BAA4B,4BAA4B,CAAA"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
2
|
+
import type { FetchConfigurationDto } from '../shared/contracts.ts';
|
|
3
|
+
import type { CodexAccountPool } from './codex-account-pool.ts';
|
|
4
|
+
import { OAuthService } from './oauth-service.ts';
|
|
5
|
+
import { type SubscriptionPreferenceStore } from './preferences.ts';
|
|
6
|
+
import type { PoolStorageSettings } from './common/pool-storage-settings.ts';
|
|
7
|
+
import type { ProxyManager } from './proxy-manager.ts';
|
|
8
|
+
import type { SearchProviderSwitcher } from './search-provider-switcher.ts';
|
|
9
|
+
import { UsageService } from './usage-service.ts';
|
|
10
|
+
/**
|
|
11
|
+
* Test seam for the adopt routes: the paths the Codex reader consults.
|
|
12
|
+
*
|
|
13
|
+
* Present for the same reason the Claude line carries 'adoptPaths': the reader
|
|
14
|
+
* resolves its own path from CODEX_HOME, and a test must point it at a fixture
|
|
15
|
+
* rather than at the machine it is running on. Production callers take the default.
|
|
16
|
+
*/
|
|
17
|
+
export interface RouteAdoptOptions {
|
|
18
|
+
adoptPaths?: readonly string[];
|
|
19
|
+
/**
|
|
20
|
+
* Where the account-storage choice is persisted, when this host has a place.
|
|
21
|
+
*
|
|
22
|
+
* Absent means the route is not served at all: a host that did not wire the
|
|
23
|
+
* setting answers 404 for `POST /storage` — it answers that in the handler
|
|
24
|
+
* itself, because a bare `Error` thrown from there is mapped to `internal` and
|
|
25
|
+
* would report a 500 for a route that simply does not exist here.
|
|
26
|
+
*/
|
|
27
|
+
storage?: PoolStorageSettings;
|
|
28
|
+
}
|
|
29
|
+
export declare function registerRoutes(ctx: Context, oauth: OAuthService, usage: UsageService, preferences: SubscriptionPreferenceStore, proxyManager?: ProxyManager, searchSwitcher?: SearchProviderSwitcher, accountPool?: CodexAccountPool, fetchConfiguration?: FetchConfigurationDto, adopt?: RouteAdoptOptions): () => void;
|
|
30
|
+
//# sourceMappingURL=routes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../src/host/routes.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAGlD,OAAO,KAAK,EAGV,qBAAqB,EAKtB,MAAM,wBAAwB,CAAA;AAQ/B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAK/D,OAAO,EAAE,YAAY,EAAe,MAAM,oBAAoB,CAAA;AAC9D,OAAO,EAAmB,KAAK,2BAA2B,EAAE,MAAM,kBAAkB,CAAA;AACpF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAA;AAC5E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACtD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAA;AAC3E,OAAO,EAAE,YAAY,EAAqB,MAAM,oBAAoB,CAAA;AAMpE;;;;;;GAMG;AACH,MAAM,WAAW,iBAAiB;IAChC,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IAC9B;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,mBAAmB,CAAA;CAC9B;AAED,wBAAgB,cAAc,CAC5B,GAAG,EAAE,OAAO,EACZ,KAAK,EAAE,YAAY,EACnB,KAAK,EAAE,YAAY,EACnB,WAAW,EAAE,2BAA2B,EACxC,YAAY,CAAC,EAAE,YAAY,EAC3B,cAAc,CAAC,EAAE,sBAAsB,EACvC,WAAW,CAAC,EAAE,gBAAgB,EAC9B,kBAAkB,CAAC,EAAE,qBAAqB,EAC1C,KAAK,CAAC,EAAE,iBAAiB,GACxB,MAAM,IAAI,CAqZZ"}
|