dsh-xdpool README

The project's README from github.com/XDTrees/dsh-xdpool. As one markdown file: README.md.

DSH XD Pool

npm version npm downloads under the previous name MIT license GitHub stars

下载量统计沿用旧包名 dsh-workbuddy-xdpool(截至 2026-10-12 为 8,976 次/月,改名前的全部下载;shields 的实时徽章常被 npm 上游限流,所以这里用了快照数字)。新包 dsh-xdpool 的统计会随时间累积,之后徽章会换回实时数据。

English | 中文

把你手上所有能白嫖的模型额度,接进 DSH 的同一个模型池。

它从一件事开始——把本机 WorkBuddy 桌面 App 里登录过的所有账号合成一个自动容错的池子,哪个号被限流了、积分用光了,请求自动换到下一个能用的号上去。你不用挑号,不用手动导入。

然后它长成了七页:账号池之外,还能扫码登录十三家厂商的免费模型、把 76 家厂商的免费额度聚合成一条通道、看用量账本、把几个模型串成链、把池子开成一个本地 OpenAI 兼容网关。

页面 干什么
账号池 本机 WorkBuddy 账号、池健康、实时用量、积分自动化
扫码登录 十三家支持网页 / 扫码登录的厂商,登一次,它们的免费模型就进选择器
聚合渠道 76 家厂商的免费额度接进同一个池(默认一家都不开,填了 key 才亮)
数据看板 今天的轮次、调用、失败、换号救回、token、缓存命中、速度
billion-context 只读观测本机 billion-context 压缩器的运行状态
路由 把多个模型串成一条链,按顺序或轮换使用
网关 把池子开成本地 OpenAI 兼容接口,可转发给局域网其它设备

另外附送一整套「积分自动化」:签到、领任务奖励、连登兑换、开猫猫旅行……这些每天都要手动点一遍的活儿,插件在后台替你干完了。

和单账号连接插件的区别:dsh-workbuddy-connect 那类插件是「一次一个账号」。XD Pool 把多账号当默认情况——不挑号、不手动导入,你在桌面 App 换登过的每个号都被池记下并跨重启保存,对外用一个 xdpool provider 分组,池内自动容错。

从旧名升级:这个插件以前叫 dsh-workbuddy-xdpool。改名后旧数据会自动接过来(你的 API key、忽略名单、账号 pin 都还在);唯一需要你动手的是「默认模型」如果指向旧 id,见从旧版升级。

先看几张图

账号池(卡片首页:品牌栏 + 七个页面标签,顶部就是用量)

账号池:顶栏显示 XD Pool 与版本号、七个页面标签、用量面板在页面最上方、下方是 WorkBuddy 国内版账号卡与「已接入」状态

扫码登录(十三家支持网页或扫码登录的厂商,登一次就能用它们的免费模型)

扫码登录:十三家厂商列表,CodeArts 华为云、WorkBuddy 国内版与国际版各带说明与登录按钮

聚合渠道(把各家的免费额度接进同一个模型池,76 家厂商按分类筛选)

聚合渠道:聚合开关、搜索框、全部分类 76 / API Key 60 / 免费 1 / 有免费额度 10 / 本地 3 / 需授权 2 的分类筛选

账号积分详情(池中账号:积分包、连签天数、今日已签、保留积分)

账号积分详情:当前使用的账号展开后显示合计积分、连签 16 天、每日 +100 积分、今日已签按钮、CodeBuddy 积分包余额与到期时间,以及保留积分输入框

积分自动化面板

积分自动化:总开关、立即运行按钮、每个任务的上次执行时间与当轮具体领取到的任务清单、连登解锁倒计时

模型选择器(国内版 / 国际版 两个独立分组)

模型选择器:国内版与国际版各占一个分组,每个模型名后显示积分倍率与促销标签

国内版 / 国际版 双供应商(各自独立账号、积分与模型,可同时使用)

切换国内版与国际版:未登录的一侧给出该区域的登录步骤

功能

一、多账号池

二、积分自动化

卡片上一个开关,插件在后台把你成长中心的日常动作全做掉。默认全自动,也可以随时点「立即运行」手动跑一轮。

它管这五件事:

任务 默认时间 干什么
每日签到 09:00 领取当天签到奖励
活跃上报 10:00 报个到,让成长中心知道你还在用
任务奖励 11:00 把任务中心的奖励该报名的报名、该领的领掉
连登奖励 12:00 连登档位兑换 + 抽奖
猫猫旅行 09:00 · 21:00 把猫派出去、回来领奖励

「任务奖励」这一项覆盖了 13 个任务,包括那些看起来非得本人坐在电脑前点鼠标才能完成的:

探索优秀灵感 · 使用 5 个模板 · 尝鲜热门技能 · 换「和平精英」主题 · 逛资料库 · 召唤 5 次专家 · 召唤 3 次专家团 · 体验腾讯轻量云专家 · 进入任一小助手应用 · 进入企鹅教师助手 · 设计创意模式建画布 · 创建定时任务 · 猫猫对话

实测一轮跑下来,四个账号合计领到 3300 积分 + 135 能量。

卡片上会告诉你这一轮具体领到了什么——不是只写「领了 8 个任务」,而是把任务名字列出来。连登还差几天解锁也会写清楚(比如「还差 4 天解锁 7 天档」),免得你以为是坏了。

关于「今日收益」:卡片按来源分四行显示——任务奖励、签到、连登、旅行。今天赚了多少一眼看到,跨天自动清零。

关于保留积分:可以给每个账号设一个积分下限,余额低于这个数的账号就不派活了,省着点用。

国际版不显示这个面板——那边的网关压根没有积分系统。

安装

前置条件:装好 WorkBuddy 桌面 App 并登录(插件复用它存在本机的登录状态)。多账号 = 在桌面 App 里换着登几次,每次登录都会被自动吸进池里。

兼容 host 0.1.1-rc.2 起的整个 0.1.x 系列,以及 0.2.0-rc.2。安装设置节时会按 host 能力自动选择 settings.installSection(0.1.2-rc.1+)或更早的自由函数写法;卡片在 0.2.0 上作为设置面板里一个平级标签页渲染。

卡片在哪儿打开:DSH 设置面板本身。开法是侧边栏左下角的齿轮,或者快捷键 Ctrl+Alt+,。 面板顶部是平级标签:通用设置 / 模型 / 内置插件 / Agent 预设 / XD Pool —— 本插件就是最后那个 XD Pool。 (0.1.x 时代它叫「设置 → 插件 → DSH WorkBuddy XD Pool」,0.2.0 起改成了平级标签,按老路径找不到。)

方式一:从 npm 安装(推荐)

# dsh 不在 PATH 时,用 node ~/.dsh/profiles/node_modules/@deepseek-ai/dsh/lib/bin.js 代替 dsh
dsh plugin --profile desktop add dsh-xdpool

推荐 npm:需要拉取的依赖只有插件自己(约 1 个包,几秒搞定)。 从 GitHub 源码装会连带装开发依赖(构建器、测试框架等几百个包),慢得多。

方式二:从 GitHub 源码安装

dsh plugin --profile desktop add github:XDTrees/dsh-xdpool

方式三:手动注册 bundle

# 1) 先装包(npm 或 GitHub 任选)
dsh plugin --profile desktop add dsh-xdpool

# 2) 注册 bundle:编辑 ~/.dsh/profiles/desktop/package.json,
#    在 "dsh" → "profile" → "bundles" 数组末尾加上 "dsh-xdpool"

# 3) 重启 DSH Desktop

本地构建(开发者)

pnpm install
pnpm build              # 产出 lib/index.js + lib/index.d.ts + lib/bin.js + lib/client.js
pnpm test               # 814 项测试
pnpm typecheck          # 宿主侧类型检查
pnpm typecheck:client   # 客户端类型检查

构建产物已随仓库提交(lib/ 不在 gitignore 里),所以从 GitHub 装不需要任何安装期脚本,也不会弹 pnpm 那句「构建脚本被拦截,请放行」。改了 src/ 记得重新 pnpm build 并把 lib/ 一起提交,否则用户拿到的是旧产物。

注意:pnpm install 要用 pnpm 11(npx pnpm@11),必要时加 --config.confirmModulesPurge=false --config.minimumReleaseAge=0——pnpm 11 默认的 minimumReleaseAge 供应链年龄策略会拦下刚发布的 rc 包。

装完以后:模型选择器里会出现 XD Pool(国内版) 和 XD Pool(国际版) 两个分组(另有「聚合渠道」和「XD Pool · 免费模型」按需出现);打开设置面板(左下角齿轮或 Ctrl+Alt+,)切到 XD Pool 一栏,能看池健康、各账号的令牌 / 积分 / 签到 / 冷却状态,还有「重新检测账号」「清除所有冷却」按钮和每个账号的签到按钮。

Web / TUI profile 也能用(--profile web / --profile dsh-tui)。

从旧版升级

这个插件以前叫 dsh-workbuddy-xdpool(显示名 DSH WorkBuddy XD Pool)。从 2.1.0 起改名为 dsh-xdpool。

你的数据不会丢。 插件自己的目录从 ~/.dsh/.workbuddy-xdpool 变成了 ~/.dsh/.xdpool,启动时会自动把旧目录复制过来——你填过的第三方 API key、忽略名单、账号 pin、启动日志,都在。旧目录只复制、不删除,所以想退回旧版、或者两个版本并存,都还能用。

唯一需要你动手的地方:如果你的「默认模型」指向旧 id,它不会自己改。旧 id 是宿主配置里的一个字符串,插件不去改宿主的配置文件(那等于插件改自己的加载器配置)。

旧 id 新 id
workbuddy-xdpool xdpool
workbuddy-xdpool-global xdpool-global
workbuddy-xdpool-aggregate xdpool-aggregate
workbuddy-xdpool-free xdpool-free

要改两处(都在 profile 目录里):

# ~/.dsh/profiles/desktop/home/settings.yaml
agent-default-model:
  provider: xdpool        # 原来是 workbuddy-xdpool
  model: hy3
# ~/.dsh/profiles/desktop/cordis.patch.yml
- id: agent-default-model
  config:
    provider: xdpool-global   # 原来是 workbuddy-xdpool-global

插件每次启动都会把这件事写进 ~/.dsh/.xdpool/startup.log,所以忘了改也能在日志里找到确切该改什么。

命令行

统一用 dsh plugin --profile desktop exec dsh-xdpool <子命令> 调用:

dsh plugin --profile desktop exec dsh-xdpool status    # 池里几个号 / 几个冷却 + shim 状态(--credits 查积分、--json 机器可读、--rates 看倍率)
dsh plugin --profile desktop exec dsh-xdpool accounts  # 已发现的账号(--json)
dsh plugin --profile desktop exec dsh-xdpool doctor    # 诊断发现 / 冷却 / 上游连通性
dsh plugin --profile desktop exec dsh-xdpool reset     # 立刻清掉所有 429 冷却
dsh plugin --profile desktop exec dsh-xdpool checkin   # 查每个账号今天签到了没(--json 机器可读)
dsh plugin --profile desktop exec dsh-xdpool checkin all
                                                                 # 领掉所有账号今天的签到奖励;也可以只传一个账号标签领单个
dsh plugin --profile desktop exec dsh-xdpool login     # 教你怎么在桌面再加一个号进池

池里怎么多账号?

桌面 App 同一时间只保留当前登录账号的凭据(每次换号都会覆盖同一个文件),所以 XD Pool 自己把账号记下来:你在桌面 App 里换着登几个号,每个号在切走的瞬间就被池收进 ~/.dsh/.xdpool/accounts.json 持久保存——重启 DSH 也不会丢。之后点卡片上的「重新检测账号」,或者直接开始用,池都会带着全部历史账号服务。

如果你想给桌面 App 之外的一次登录做个显式快照(比如临时固定某个号做验证),也可以手动导入:

# 在 WorkBuddy 桌面 App 登录账号后(key 自己起名):
dsh plugin --profile desktop exec dsh-xdpool import myKey
# 查看 / 删除已导入的快照:
dsh plugin --profile desktop exec dsh-xdpool accounts
dsh plugin --profile desktop exec dsh-xdpool remove myKey

导入的快照与自动保存的账号存在同一个目录 ~/.dsh/.xdpool/ 下,每次扫描都会被一并收进池——不再是「导入了但没人读」。快照以 key 的 MD5 前 8 位命名(key 本身记在文件里),中文、带 /、带空格的 key 都安全。长期使用靠 refresh token 自动续期;失效了就回桌面重新登录,再 import <key> --force 覆盖。

配置

池的配置走插件设置节(settings.xdpool),模型设置页里能改,改完立即生效:

字段 说明 默认
authFile 覆盖 WorkBuddy 桌面 auth 文件路径(跨平台自动探测出问题时用,等同于 WORKBUDDY_AUTH_FILE) 自动探测
cooldownMs 单账号 429 冷却时长(毫秒) 60000
distribution 账号分配方式:sticky(每对话固定一个账号,新对话换下一个)/ priority(先用完一个)/ round-robin(按顺序轮换)/ balanced(随机,偏向闲置久的) priority

上游 prompt 缓存按账号隔离,所以对话中途换号会把缓存整段作废。想让多账号同时分摊额度又不想掉命中率,用 sticky。

也可以直接写进 ~/.dsh/settings.yaml:

xdpool:
  cooldownMs: 120000
  distribution: sticky

架构

已知限制

免责声明

致谢

本项目的实现参考了以下已公开的项目,并按其许可证要求保留版权声明。参考方向为设计思路与既有结论,代码为独立实现;关键模块在源文件头部注释中也标注了所参考的项目与模式:

以上项目的版权归各自作者所有。本项目采用参考设计思路 + 独立实现的方式,未整体复制任何参考项目的源码。若标注有遗漏或不当之处,欢迎提交 issue 指正。

许可证

MIT

dsh-xdpool (XDTrees/dsh-xdpool)

qr-code
Searching Database…

What is this?XD Pool is a DSH plugin that merges every free model quota you can get your hands on into one shared pool: it auto-pools your WorkBuddy desktop accounts with failover, lets you QR-login to 13 extra vendors, aggregates free quotas from 76 vendors, and adds a usage dashboard, a model router, and a local OpenAI-compatible gateway on top.
Is this a standalone app or a plugin I add to something else?It's a plugin for the DSH (DeepSeek Harness) host application, opened from DSH's own settings panel; it is not something you launch or run on its own.
How do I install and start using it?Install the npm package 'dsh-xdpool' (recommended, it pulls almost no extra dependencies), then open the DSH settings panel and switch to the 'XD Pool' tab to see pool health, accounts and token/credit status.
Do I need the WorkBuddy desktop app already set up?Yes — you must install and log into the WorkBuddy desktop app first; the plugin reuses its local login state and automatically pools every account you've logged into there.
Can this log me into WorkBuddy by itself?No. The main WorkBuddy account login still goes through the desktop app's Tencent SSO and is tied to the device; XD Pool only initiates QR logins for its own 13 extra vendor channels and never logs you into WorkBuddy itself.
Who actually benefits from this plugin?Mainly people running DSH with the WorkBuddy desktop app who juggle several free accounts; the aggregated free-quota pool and local OpenAI-compatible gateway also suit anyone who wants one endpoint spanning many free LLM vendors.
Does it still work if WorkBuddy is on Windows but DSH runs under WSL/Linux?Yes, but if the Windows and Linux usernames differ and Windows environment variables aren't passed into WSL, you need to point it at the real auth file path manually via the WORKBUDDYAUTHFILE variable or the authFile setting.
How does automatic account failover work?Each pooled account tracks its own rate-limit cooldown; when one gets a 429 it is cooled down and the next healthy account takes over automatically, with four assignment strategies available — priority, round-robin, balanced, and sticky (keeps one conversation on one account to preserve upstream prompt cache).
What does the points automation feature actually do?On a schedule it runs five WorkBuddy growth-center chores per account — daily check-in, activity report, task-reward claiming, consecutive-login rewards, and the cat-travel mini-game — so you don't have to click through them manually every day.
What happens to my settings if I'm upgrading from the old package name?Nothing is lost: on first run it copies your old ~/.dsh/.workbuddy-xdpool directory (API keys, ignore list, account pins) into the new ~/.dsh/.xdpool location without deleting the original, so you can still roll back if needed.
Creator
XDTrees
Size
5.2 MB
Stars
159
Age
1mo
Commits · 90 Days