DSH WorkBuddy Connect
corrinehu/dsh-workbuddy-connect将 WorkBuddy 桌面 App 包含的模型自动接入 DeepSeek Harness,在 DSH 对话窗口里零配置使用。
通过 OAuth 将 ChatGPT Codex、Claude、Grok 与 Antigravity 订阅注册为 DeepSeek Harness 的 LLM 提供方,无需为其配置 API Key。
Personal AI Subscription Bridge, Multi-Account Pool Rotation & Zero-Leak OAuth for DeepSeek Harness
🇬🇧 English • 🇷🇺 Русский • 🇨🇳 中文说明
`dsh-subscriptions` bridges your paid personal AI subscriptions directly into DeepSeek Harness as first-class LLM providers.
Instead of burning expensive pay-as-you-go API credits for everyday agent tasks, dsh-subscriptions allows you to authenticate your existing web subscriptions via standard OAuth PKCE. It features multi-account rotation pools (automatically switching accounts when a rate limit or cooldown is reached), preemptive quota switching, and an in-process Cordis service (`ctx.subscriptions`) that safely powers sibling plugins like dsh-image-gen and dsh-grok-xsearch with zero token leakage.
graph LR
subgraph DSHCore [DeepSeek Harness Session]
Agent[🤖 DSH Agent Execution] --> Router{Provider Router}
end
subgraph SubscriptionsCore [dsh-subscriptions Engine]
Router --> Pool{Multi-Account Vendor Pool}
Pool -->|Account #1| Acc1[👤 Primary Account: Active]
Pool -->|Account #2| Acc2[👤 Secondary Account: Standby]
Pool -->|Account #3| Acc3[👤 Fallback Account: Cooldown]
Acc1 -->|HTTP 429 / Quota Limit| Rotate[Smart Quota & Cooldown Rotator]
Rotate -->|Switches Traffic| Acc2
end
subgraph VendorBridges [4 Upstream Vendor Bridges]
Acc1 --> B1[ChatGPT / Codex Backend]
Acc1 --> B2[Claude Pro / Max Protocol]
Acc1 --> B3[xAI / Grok Subscriptions]
Acc1 --> B4[Google Cloud Code Assist / Antigravity]
end
subgraph EcosystemBridge [In-Process Cordis Service: ctx.subscriptions]
Pool --> ImgGen[dsh-image-gen: Zero-Cost Image Drawing]
Pool --> XSearch[dsh-grok-xsearch: Live Twitter Search]
end
style DSHCore fill:#1e1e2e,stroke:#89b4fa,stroke-width:2px,color:#cdd6f4
style SubscriptionsCore fill:#181825,stroke:#cba6f7,stroke-width:2px,color:#cdd6f4
style VendorBridges fill:#11111b,stroke:#a6e3a1,stroke-width:2px,color:#cdd6f4
style EcosystemBridge fill:#181825,stroke:#f38ba8,stroke-width:2px,color:#cdd6f4Vendor Key · Subscription Tier · Protocol & Features codex · ChatGPT Plus / Pro · Codex streaming responses, tool calling & image drawing (/backend-api/codex/...) claude · Claude Pro / Max · Native Claude Messages protocol, usage tracking (/v1/messages, /api/oauth/...) grok · xAI / X Premium · Real-time reasoning responses, billing checks & social search antigravity · Google Cloud Code Assist · Antigravity engine (/v1/loadCodeAssist, /v1/streamGenerateContent) kimi · Moonshot Kimi · OAuth Device Flow login (auth.kimi.com), OpenAI-compatible chat glm · Z.ai GLM Coding Plan · GLM coding endpoint (api.z.ai), live quota monitor (/api/monitor/usage/quota/limit) cursor · Cursor · Cursor backend (api2.cursor.sh), billing-period usage dashboard parsing kiro · AWS Kiro · Kiro desktop OAuth (app.kiro.dev), streaming code assistance copilot · GitHub Copilot · GitHub Device Flow login (github.com/login/device), Copilot chat completions qwen · Alibaba Qwen (DashScope) · OpenAI-compatible endpoint (dashscope.aliyuncs.com/compatible-mode/v1), API key auth ernie · Baidu ERNIE (Qianfan) · OAuth2 token refresh via API Key + Secret Key, Wenxinworkshop chat spark · iFlytek Spark · OpenAI-compatible Spark HTTP API (spark-api-open.xf-yun.com/v1) jetbrains · JetBrains AI Assistant · JetBrains AI relay (api.jetbrains.ai) perplexity · Perplexity Pro · Sonar model catalog (api.perplexity.ai) replit · Replit Core · Replit AI API (replit.com/api/v1/ai), connect-token auth cody · Sourcegraph Cody Pro · Sourcegraph API (sourcegraph.com/.api), access-token auth
*Custom vendors can also be dynamically registered via the createVendorFromProfile factory.*
rotate.js, ratelimit.js)CODEX_OAUTH_1, CODEX_OAUTH_2, CODEX_OAUTH_3).HTTP 429, RATE_LIMIT, QUOTA_EXCEEDED), traffic instantly fails over to the next healthy account in the pool.Retry-After, x-ratelimit-reset, ISO dates, epoch timestamps) and auto-restores cooled-down accounts when their window resets.vision, tools, reasoning, coding, fast), and live reset countdowns.dsh-app://) bypass web-only host equality checks while strictly preserving loopback socket verification and fail-closed cross-site protection.$DSH_HOME/.credentials.yaml managed by the host credentials service.localhost, simply paste the redirected callback URL or authorization code directly into the account card.ctx.subscriptions)Sibling plugins can tap into subscription capabilities directly in memory via Cordis:
// Example in dsh-image-gen or custom plugins:
const res = await ctx.subscriptions.request('codex', '/backend-api/codex/images/generations', {
method: 'POST',
body: JSON.stringify({ prompt: 'Cyberpunk landscape', size: '1024x1024' }),
})v0.4.9):1455, Grok :56121), the plugin spins up a temporary local HTTP server and catches the callback by itself — no URL pasting needed. The paste fallback always stays available.auth.openai.com, you open https://auth.openai.com/codex/device on any device, enter the code, and the plugin completes the standard PKCE exchange automatically.useWebCallback) and manual paste of the redirected URL / authorization code remain available for custom OAuth clients.v0.4.9)http://, https://, socks5://[user:pass@]host:port). All requests for that account — OAuth token refresh, vendor checks, model requests — are routed through it. Empty = direct connection.ms) in the history store, so you can compare direct vs proxied latency over time.v0.4.9)j***n@example.com everywhere (account lists, status labels, check results). Designed for screen sharing and streaming. Server-side masking means labels never leak through API responses either; the underlying account data is never overwritten.v0.4.9)Route · Method · Purpose /dsh-subscriptions/diagnostics · GET · Anonymized diagnostics report (no secrets, no tokens, no proxy URLs) /dsh-subscriptions/proxy-check · POST · Latency check of a slot's proxy against its vendor base URL /dsh-subscriptions/oauth/device/start · POST · Begin Codex device-code login (returns user code + verification URL) /dsh-subscriptions/oauth/device/poll · POST · Poll device-code authorization status /dsh-subscriptions/quarantine/park · POST · Park an account into quarantine for custom duration (durationMs, reason) /dsh-subscriptions/quarantine/probe · POST · Run immediate live warmup health probe or force-release account /dsh-subscriptions/alerts · GET · List recent in-app alerts and notifications
v0.4.17)ollamaBaseUrl (default http://127.0.0.1:11434), it appears in the native DSH model picker with the models discovered from /api/tags. No API key needed.ollamaFallbackModel, or the first model from /api/tags). The fallback is logged and recorded in request history as kind: fallback.v0.4.17)reasoning.effort in the Codex /responses protocol. Grok forwards effort with its own catalog-aware filtering.low / medium / high is sent as text.verbosity for Codex reasoning models. Empty = protocol default.service_tier: priority (1.5x speed billing tier) with every Codex request. The active-subscription chip shows a ⚡ prefix while enabled.v0.4.17)*thinking*, grok *reasoning*, all codex models) cools down only the reasoning family of that account — standard models on the same account keep working immediately. Legacy cooldowns (from older versions) still block the whole account until expiry.test/preview/dev/alpha/beta/legacy model ids out of the native picker (applies to live catalogs and the static fallback).v0.4.18)reset / nothing to reset (nothing consumed) / no usable credit / already redeemed.v0.4.18)conversation.input.right slot).off / percent (85%) / bar (40px mini bar, green>30 / amber 10-30 / red <10) / forecast.calibrating…, with no consumption it says no usage. Ready state shows ~4.5h / ~12m.v0.4.18)SUBS (N) in the session header actions area with a pool-health LED: green <50% max usage, amber 50-90%, red ≥90%, gray when nothing is connected.v0.4.18)shell.overlay: a 64px circle with an SVG ring gauge of the active subscription balance, mounted via createPortal.localStorage.backdrop-filter: blur(28px) panel listing every account with usage bars. Clicking the bubble refreshes quota data; data also refreshes every 60 s.IconChevronDownOutline14 primitive; explicit settings snapshot states (loading / unavailable + Retry) guard against phantom input.v0.6.6)Host online (XX ms)), real-time connected account indicators, and pool size at a glance.HistoryStore debounces disk persistence asynchronously to prevent blocking the Node.js event loop during high-throughput streaming.POST /dsh-subscriptions/quarantine/park) for maintenance or pause, or trigger an immediate live warmup probe and instant release (POST /dsh-subscriptions/quarantine/probe) right from the account slot card.SubsPill session widget and account settings cards, showing exact time remaining until rolling rate-limit windows (five_hour, seven_day, primary_window) reset.notifyQuarantineEntered and notifyQuarantineReleased.thoughtSignature: 'skip_thought_signature_validator' on reconstructed tool calls, enabling reliable multi-turn tool calling without Gemini 3 validation failures.*-flash-tiered mapping.cch session hash and cc_turn_index counter) per subscription account (accountId) in a bounded module Map instead of globalThis, preventing cross-account telemetry mixing in multi-account pools.cc_prompt_index from multi-turn messages history and supports suppression via CLAUDE_CODE_ATTRIBUTION_HEADER=0 or disableBillingHeader: true.copilot-cli.js supporting execution via local copilot / github-copilot-cli binaries with zero network token emulation risk.auto (prefers local CLI with graceful web API fallback), cli (strict CLI SDK execution), and web (direct OAuth/API).gh hosts.yml), Copilot config files (hosts.json, apps.json), and environment variables (GITHUB_COPILOT_TOKEN, GH_TOKEN).low, medium, high, max) or disable reasoning (off) per conversation session via REST endpoints (GET, POST, DELETE /dsh-subscriptions/session-reasoning).o1) to a standard model (e.g. gpt-4o), avoiding upstream HTTP 400 parameter errors.o1, o3), Claude (claude-3-7-sonnet*, claude-4.6+ thinking tokens & budgets), Antigravity/Gemini (thinkingConfig), Grok (grok-3-mini), and Kimi (k1.5).test/contract-matrix.test.mjs) testing 8 provider