dsh-wtq-pool 1.0.4 → 1.0.5
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 +96 -53
- package/README.en.md +74 -40
- package/README.md +75 -42
- package/cordis.patch.yml +6 -3
- package/lib/client.js +3 -1
- package/lib/index.d.ts +2 -12
- package/lib/index.js +2327 -780
- package/package.json +3 -2
- package/renderer/index.html +67 -16
- package/renderer/panel.css +123 -10
- package/renderer/panel.js +1316 -91
package/CHANGELOG.md
CHANGED
|
@@ -1,74 +1,117 @@
|
|
|
1
1
|
# 更新说明
|
|
2
2
|
|
|
3
|
+
## [1.0.5]
|
|
4
|
+
|
|
5
|
+
- **新增成长中心页签**:按账号列出连登档位,「读取状态」只读,「立即执行」单独跑成长环节,按补签卡、礼包与补偿、活跃上报、连登档位与抽奖分项报告,两个 region 都执行,不含任务奖励的列表、接取与领取。
|
|
6
|
+
- 读数连同时间留在宿主进程内,重开面板或重进页签直接绘制;超过两分钟、期间跑过一轮或账号池变动时重读,读取期间池子变化则不写回。
|
|
7
|
+
- 成长中心与签到互斥:它执行期间「全部签到」与定时签到被拒绝,单账号签到与延迟执行的 Qoder 签到等它结束;重载或重启后按「立即执行」会重新领取。
|
|
8
|
+
- 重载插件会中止仍在执行的签到。
|
|
9
|
+
- 命令面板不再提供本插件的 `xdpool.*` 命令,面板与卡片入口不受影响。
|
|
10
|
+
- 面板的「添加账号」在新标签页打开官方登录页,登录完成即入池,凭证写在 `signins/` 下,没有桌面 App 也能用。
|
|
11
|
+
- 面板添加的账号可删除,登录文件与留档一并清除,按两次确认、八秒内未再按即解除;删除先等进行中的扫描结束,并清掉停用标记、积分保底与首选设置。
|
|
12
|
+
- 删除确认超时后提示一并消失;该行忙碌时置灰,按下不进入确认状态。桌面 App 自身的登录没有该按钮。
|
|
13
|
+
- 凭证留档读不出或损坏时扫描不改写,被覆盖的账号仍可恢复。
|
|
14
|
+
- 挂起按原因区分:「额度用尽」读到余额即释放,「登录失效」需重新登录或手动重置;扫到新登录时释放并以该份登录请求,原因不被另一种改写。
|
|
15
|
+
- 未给重置时间的限流冷却逐次翻倍,封顶 15 分钟,间隔超过 30 分钟重新计数;上游给出重置时间时以它为准。
|
|
16
|
+
- 空池的拒绝状态码按原因区分,仍有账号在限流时随响应发出该期限。
|
|
17
|
+
- 轮转与临期积分优先都先排可用登录,被挂起的排后面;Qoder 延迟轮次只在真正完成时清除重试时间。
|
|
18
|
+
- WorkBuddy 模型拒绝缺省思考等级时,补上默认等级重发一次。
|
|
19
|
+
- Trae 的默认档与 Max 档都作为上限发布:窗口高于所有默认档才用 Max,目录未声明更大档位时取实测上限,同一模型的多份声明全部保留。
|
|
20
|
+
- Trae 的查询被拒时改用同模型的下一份声明重试一次,目录残缺时并入已缓存名单。
|
|
21
|
+
- 目录晚于启动返回时,该来源的模型组补发一次声明。
|
|
22
|
+
- Trae 模型发布实测可用的 1M 上限档,默认窗口不变。
|
|
23
|
+
- 面板三个来源页签右侧与 README 顶部写明封号风险。
|
|
24
|
+
- 模型页左列的编辑标记跟随当前打开的编辑面板,关闭、取消勾选或保存后清除。
|
|
25
|
+
- 模型页的预设档位含模型自身的上限,超出的不出现。
|
|
26
|
+
- 保存的上限高于当前目录时显示目录中的值,不计为未保存的改动。
|
|
27
|
+
- 数值被拒绝时回填实际保存的值,清空字段即回到跟随目录;手工输入的窗口与输出优先于夹紧时暂存的值。
|
|
28
|
+
- 打开模型页不中断后台刷新轮询;Trae、Qoder 按网关实际发布的列表显示勾选状态。
|
|
29
|
+
- 输入框的积分读数与网关使用同一账号顺序,刚被上游拒绝的账号不显示为当前账号。
|
|
30
|
+
- 在积分弹层内滚动时弹层保持打开。
|
|
31
|
+
- 「立即刷新」跑一轮令牌保活,按刷新、无需处理、失败、无刷新令牌分项报告,无定时任务与开关,重启后照常显示。
|
|
32
|
+
- 国际版登录文件被覆盖时,为读到的凭证留档并继续分发;服务运行期间每分钟重读一次桌面登录。
|
|
33
|
+
- 选择器不列出登录已过期的 Trae、Qoder 账号;夜间免费窗口的结束时间显示为 24:00;自动签到开关关闭时非法时间仍给出提示。
|
|
34
|
+
- 签到慢轮询失败三次后停止,页面隐藏时两个轮询都停。
|
|
35
|
+
- 面板补齐对比度与可访问名称,页签标出 `aria-selected`,失败提示标出 `role="alert"`。
|
|
36
|
+
- 账号行按钮按账号本身定位,焦点回到按下的那一行。
|
|
37
|
+
- 缺字文案补齐。
|
|
38
|
+
- 积分包的到期时间接受秒级时间戳。
|
|
39
|
+
- 端口回退时,提示中写出被占用的首选端口。
|
|
40
|
+
- 连接检查在 at-rest 检查通过时也写一行。
|
|
41
|
+
- 网关在目录全部失败时的 503 带上真实原因;请求体缺少工具调用标识时返回其自身的说明;回复里出现过工具调用又被预算截断时,发给宿主的是「被截断」。
|
|
42
|
+
- WorkBuddy 国内版拒绝对话请求时,面板说明原因与可用的来源。
|
|
43
|
+
- 新增 `tools/import-signins.cjs`:把其他工具的账号文件按本插件识别的形状写入 `signins/`,默认跳过已有账号,`--dry-run` 预览,`--force` 覆盖。
|
|
44
|
+
- 面板新增「客户端名称」开关,默认关闭:开启后提示词里 `DeepSeek Harness` 的每一处都改为 `DeepSeek`,国内版据此放行(11128);关掉即恢复原样。
|
|
45
|
+
|
|
3
46
|
## [1.0.4]
|
|
4
47
|
|
|
5
|
-
- Trae、Qoder
|
|
6
|
-
- Qoder
|
|
7
|
-
- WorkBuddy
|
|
8
|
-
-
|
|
48
|
+
- Trae、Qoder 的流式回复能完整推送到结束,不会中途停止。
|
|
49
|
+
- Qoder 在结束帧后最多等待 1 秒:无后续帧即补 `[DONE]` 并关闭,用量帧到达则立即收尾。
|
|
50
|
+
- WorkBuddy 网关同样先发出响应头,其余行为不变。
|
|
51
|
+
- 面板的签到汇总按三家合计显示领取账号数。
|
|
9
52
|
- 网关拒绝跨站请求(`Sec-Fetch-Site: cross-site`),面板的 `/invoke` 只接受 JSON;本机客户端与面板自身不受影响。
|
|
10
|
-
-
|
|
11
|
-
- 客户端提前断开时桥接流一并取消,泵送不再向已关闭的响应写入,释放读锁不再抛出。
|
|
53
|
+
- 面板的签到日志持续轮询至结束,模型勾选与自动签到时间的未保存草稿不被轮询覆盖,日志不强制滚动到底部,账号名单读取失败后可以重试。
|
|
12
54
|
|
|
13
55
|
## [1.0.3]
|
|
14
56
|
|
|
15
|
-
- WorkBuddy 国际版补齐会话头族与版本 UA
|
|
16
|
-
- WorkBuddy
|
|
17
|
-
- 额度用尽与登录失效退出轮换,直到余额重新读到或重新登录;400 / 422
|
|
18
|
-
- 上游主机不可达(DNS、连接重置、TLS、30x
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
- 超过 64 MiB
|
|
22
|
-
- Trae、Qoder
|
|
23
|
-
- Qoder 的失败帧(空 choices
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
- Qoder
|
|
27
|
-
- Trae
|
|
28
|
-
-
|
|
29
|
-
-
|
|
30
|
-
-
|
|
31
|
-
-
|
|
32
|
-
-
|
|
33
|
-
-
|
|
34
|
-
-
|
|
35
|
-
-
|
|
36
|
-
-
|
|
37
|
-
-
|
|
38
|
-
-
|
|
39
|
-
- 同伴依赖收紧到 `@deepseek-ai/*` 0.2.0 线与 `@earendil-works/pi-ai` `>=0.82.1 <0.88.0`,pi-ai 代际在激活时校验;新增 `prepare` 脚本,按仓库地址安装时从源码构建;旧版 schemastery 上 volatile 字段降级时给出告警。
|
|
57
|
+
- WorkBuddy 国际版补齐会话头族与版本 UA,通过渠道校验;不带会话标记的 401(含网关返回的 HTML 拒绝页)按登录失效分类并换号。
|
|
58
|
+
- WorkBuddy 无法获取本机密钥、或刷新令牌过期但访问令牌仍有效时,账号保留在账号池中;刷新得到的新令牌不被下一次扫描换回磁盘上的旧值,余额读到积分时释放扣留。
|
|
59
|
+
- 额度用尽与登录失效退出轮换,直到余额重新读到或重新登录;400 / 422 中的额度说明、429 响应体中的额度文案不作余额耗尽处理。
|
|
60
|
+
- 上游主机不可达(DNS、连接重置、TLS、30x 重定向)时换下一个登录重试;调用方挂断不计为上游故障,不冷却健康账号。
|
|
61
|
+
- 上游仅在 `Retry-After` 响应头给出等待时间时按该值冷却并透传给客户端(截断到两小时);响应头超时只覆盖等待响应头阶段,流中途的静默交由空闲看门狗处理。
|
|
62
|
+
- 调用方挂断后上游请求一并拆除,错误响应体在挂断或超限时立即取消。
|
|
63
|
+
- 超过 64 MiB 的请求体先排空再关闭并返回 413;peek 期间连接中断不绕过故障转移。
|
|
64
|
+
- Trae、Qoder 的首个登录不可用时改用下一个,模型目录同样换号读取;Trae 的登录拒绝与流内拒绝按真实状态码返回。
|
|
65
|
+
- Qoder 的失败帧(空 choices、字符串形式 `error` / `details`、`errcode` 拼写变体、嵌套确认码)按真实编码换号或冷却。
|
|
66
|
+
- Trae 的每个存储文件只在第一个认领它的版本下探测一次;一台安装登录多个账号时明确报告设备号为回退值。
|
|
67
|
+
- Qoder 发布目录给出的最大上下文窗口按上游数值发布;数字时间戳的到期时间按实际时间计算。
|
|
68
|
+
- Trae、Qoder 的登录发现按 30 秒缓存,Qoder 不为每个请求 spawn PowerShell 解密;目录读取失败进入 30 秒退避。
|
|
69
|
+
- Trae 与 Qoder 的 SSE 解码支持单独 CR 行分隔与 64 MiB 单行上限;中继按客户端消费速度读取上游,慢客户端不使整份回复缓存在网关内。
|
|
70
|
+
- 模型名册只采用实际读到的那份:读取超时留下的兜底列表不参与「已下线」判定;进入面板自动重新拉取名册,读取失败或账号扫描尚未完成时按 15 秒重试。
|
|
71
|
+
- 模型页保存的思考等级与上游声明的 `defaultEffort` 均生效。
|
|
72
|
+
- 设置文档与面板保存共用同一组边界(积分保底、模型 id 长度、覆写表大小、token 预算、模型 id 条数);`enabledModelIds: []` 对 Trae 与 Qoder 同样禁用全部模型;旧版 `imageModelIds` 与 `contextBudgets` 折入模型覆写。
|
|
73
|
+
- provider 行仅在网关预热时保留,退出登录后不常驻;网关启动失败按失败处理,模型组摘掉,连接检查报出原因。
|
|
74
|
+
- 账号池刷新:强制刷新采用互斥交接;`authFile` 改变指向后补一次扫描且旧目录不写回;全部冷却时面板继续轮询,停用账号退出探测;某个 region 启动失败只记警告并继续。
|
|
75
|
+
- 面板与命令:`/invoke` 等待期间关闭面板不影响插件子进程;内容安全策略、框架祖先限制与 `nosniff` 已补齐;输入框积分浮层在功能关闭后停止轮询并区分两种未知;两条命令同时运行时各自汇报结果。
|
|
76
|
+
- 签到与领取:Trae 签到响应缺省 `enable` 时按已开通处理;Qoder 的领取读取完整响应体,带 `grantId`/金额的已发放响应按已领取上报,200 中的业务错误码按失败上报并带上游原话;拒绝中含「already」计为当天已领;重启不重跑整天,时段落盘保留三天;Trae 返回 9074 时在失败原因中说明设备号来源。
|
|
77
|
+
- 签到一次执行一轮:单账号签到与整批签到互斥,面板的整批签到记录当次时段;旅行的失败计入统计;Qoder 活动列表读取失败与「该账号无签到活动」分开显示;面板的签到失败按失败显示并带上原因。
|
|
78
|
+
- 上游响应体无论是否为 JSON 都先脱敏再转给客户端;手写签到时段中的空值按 00:00 处理。
|
|
79
|
+
- 连接检查自身抛错会写入报告,超时后的回退读取受剩余预算约束;at-rest 的可执行文件候选只接受文件,注册表扫描结果按进程缓存。
|
|
80
|
+
- 面板与声明:声明的变更比对按键序归一化,页脚在第一次写入之前不显示「已更新」;积分弹层的账号包列表截断到 8 条,不触发宿主的 64 KB 应答上限。
|
|
40
81
|
|
|
41
82
|
## [1.0.2]
|
|
42
83
|
|
|
43
|
-
-
|
|
44
|
-
-
|
|
45
|
-
-
|
|
46
|
-
-
|
|
47
|
-
-
|
|
48
|
-
-
|
|
84
|
+
- 输入框积分弹层的「刷新」按宿主中继的时限留出余量作答,不触发熔断;未完成的探测在后台写入缓存。
|
|
85
|
+
- 设置保存中越界的 token 预算在保存前拦截,整批改动照常保存。
|
|
86
|
+
- 签到开关在小时框留有无效文本时仍可关闭,计时器不留运行状态;签到结束后重新拉取日志,手动结果即时可见。
|
|
87
|
+
- 面板框在文档就位、内容尚未到达的瞬间读取空对象;标题栏警告随问题消失而清除。
|
|
88
|
+
- 账号卡与设置卡单列堆叠、间距收紧,多数窗口不必滚动即可看全;签到日志框限高可滚动,新结果自动滚动到可见处。
|
|
89
|
+
- 输入框积分弹层宽度随内容变化并对齐触发器右侧,高度上限连内边距一并计算;账号名过长时在列内截断并保留悬停提示;切换账号后积分读数连续。
|
|
49
90
|
|
|
50
91
|
## [1.0.1]
|
|
51
92
|
|
|
52
|
-
-
|
|
53
|
-
-
|
|
54
|
-
-
|
|
55
|
-
-
|
|
56
|
-
-
|
|
57
|
-
-
|
|
58
|
-
-
|
|
59
|
-
-
|
|
60
|
-
-
|
|
61
|
-
-
|
|
62
|
-
-
|
|
93
|
+
- 设置保存使用插件条目的实际命名空间,来源开关、区域开关、签到与模型选择均可保存;宿主设置读取失败时保留上一次读到的设置。
|
|
94
|
+
- 面板路由挂载早于引擎就绪的窗口期不返回 500;某条路由注册失败时释放已注册的部分,面板不会停留在半挂载状态。
|
|
95
|
+
- 「重新检测账号」与加载期把账号扫描和网关启动纳入整段预算,按时应答,未完成部分由后台刷新补齐;重新检测移除登录文件已不存在的 WorkBuddy 账号。
|
|
96
|
+
- 输入框积分弹窗的「刷新」按总预算逐账号补读,多账号机器不必逐个等待。
|
|
97
|
+
- 首次读取 WorkBuddy 积分自动触发后台探测,冷启动与换号后的未知余额按 5 秒重读。
|
|
98
|
+
- 快速关闭再开启某来源时,新网关等待旧网关释放端口;首选端口被占用时改用实际绑定的端口,地址保持稳定。
|
|
99
|
+
- 插件重载后重新计算当天的签到时段;手动「立即运行」与命令面板签到计入当前已到点的时段;Qoder 当日轮次晚于签到时点开放时在开放时刻补收。
|
|
100
|
+
- WorkBuddy、Trae、Qoder 收到上游终止标记即完成响应,不等待 TCP 连接关闭;上游开始输出后才失败时发出带内错误帧、终止帧与 `[DONE]`。
|
|
101
|
+
- 上游回显的凭据在错误信息中脱敏(含 `Cosy-Key`、`X-Cloudide-Token`、`X-Ide-Token` 等写法);Trae 拒绝回包中途断开时保留真实状态码;国内 Trae、Qoder 的有效登录按有效处理。
|
|
102
|
+
- 轮流使用只在对话请求上换号,刷新模型列表与健康检查不拨动游标;首选来源账号改名后仍参与轮换;连登奖励只兑换已解锁的档位;模型 id 为 `__proto__` 时按普通 id 保存与读回。
|
|
103
|
+
- 面板配色统一为一组低饱和色相。
|
|
104
|
+
- 显示名、包名与仓库名统一为 **WTQ Pool** / `dsh-wtq-pool`,命令 id 与设置命名空间不变。
|
|
105
|
+
- Trae 模型倍率以 `x0.79` 标签显示。
|
|
106
|
+
- 面板右下角收成一排 GitHub、npm、文档与许可链接。
|
|
107
|
+
- 中英文文档明确故障转移、Trae/Qoder 分发限制与本地安装方式;网关拒绝凭据的提示指向连接检查。
|
|
63
108
|
|
|
64
109
|
## [1.0.0]
|
|
65
110
|
|
|
66
|
-
首个版本。把本机 WorkBuddy、Trae、Qoder 三家的桌面登录接进 DeepSeek Harness:每家成为一个 OpenAI 兼容的本地端点,模型选择器里直接可用。
|
|
67
|
-
|
|
68
111
|
- 只读本机三家桌面 App 的登录文件,不发起独立的 OAuth 流程。
|
|
69
|
-
- 按 region
|
|
70
|
-
- WorkBuddy
|
|
112
|
+
- 按 region 合成模型池并注册为 provider,没有账号的 region 不注册;每个网关只绑定 `127.0.0.1`,首选端口 42831–42881,被占用时改用临时端口。
|
|
113
|
+
- WorkBuddy 支持优先使用、轮流使用、临期积分优先和同一对话固定,被限流或额度用尽时自动换号;Trae、Qoder 按请求分发,支持轮流使用与临期积分优先。
|
|
71
114
|
- 后台积分自动化:每日签到、任务奖励领取、连登解锁,「立即运行」与到点执行同一轮。
|
|
72
|
-
- 插件页提供 **WTQ Pool** 配置卡片(账号池、模型、连接检查),以及 `xdpool.open
|
|
115
|
+
- 插件页提供 **WTQ Pool** 配置卡片(账号池、模型、连接检查),以及 `xdpool.open`、`rescan`、`resetCooldowns`、`doctor`、`checkin` 命令。
|
|
73
116
|
- 会话输入框左侧显示当前模型的账号积分,点开可切换账号。
|
|
74
117
|
- provider 通过运行时注册接入,不改写宿主 provider 配置;插件设置由宿主持久化至 profile;对 `@earendil-works/pi-ai` 按实际解析到的版本适配请求上下文。
|
package/README.en.md
CHANGED
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
|
|
19
19
|
<p align="center">
|
|
20
20
|
<a href="#install">Install</a> ·
|
|
21
|
-
<a href="#usage">Usage</a> ·
|
|
22
21
|
<a href="#features">Features</a> ·
|
|
22
|
+
<a href="#usage">Usage</a> ·
|
|
23
23
|
<a href="#settings">Settings</a> ·
|
|
24
24
|
<a href="CHANGELOG.md">Changelog</a> ·
|
|
25
25
|
<a href="https://github.com/chengzhi-c/dsh-wtq-pool/issues">Issues</a>
|
|
@@ -33,43 +33,52 @@
|
|
|
33
33
|
<a href="https://github.com/chengzhi-c/dsh-wtq-pool/stargazers"><img src="https://img.shields.io/github/stars/chengzhi-c/dsh-wtq-pool?style=flat-square" alt="GitHub stars"></a>
|
|
34
34
|
</p>
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
> **! A ban is possible. Use at your own discretion; no liability accepted !**
|
|
37
|
+
|
|
38
|
+
Use local WorkBuddy, Trae and Qoder desktop sign-ins in DeepSeek Harness. WorkBuddy fails over when an account is rate-limited or out of quota. Trae and Qoder select an account per request and move on to the next sign-in on an authentication failure, a rate limit or exhausted quota, while a problem with the request itself, such as an unknown model or a malformed body, is answered as the upstream answered it. Each source has its own switch, with domestic and international accounts grouped separately.
|
|
39
|
+
|
|
40
|
+
A rate limit cools for the wait the upstream stated, taking the reset time from the response header when that is the only place it appears. Exhausted quota and a dead sign-in do not recover on their own: that account leaves rotation. A balance read releases an exhausted-quota hold, a fresh sign-in or a manual cooldown reset releases a refused-sign-in hold, and both lapse after six hours (WorkBuddy). Trae and Qoder holds are accounted separately, demoting the sign-in only by the cooldown window (60 seconds by default, configurable up to 24 hours) or by the wait the upstream stated, and it is still used when it is the only one left. When the upstream host cannot be reached at all, the next sign-in is tried.
|
|
37
41
|
|
|
38
42
|
## Preview
|
|
39
43
|
|
|
40
|
-
The settings panel
|
|
44
|
+
The settings panel in its default light theme:
|
|
41
45
|
|
|
42
46
|

|
|
43
47
|
|
|
44
|
-
The panel reads the
|
|
48
|
+
The panel reads the host's `app.getAppearance()` when it loads, which fixes its palette and its language. After a host theme switch, press "Reload panel" on the card to read it again:
|
|
45
49
|
|
|
46
50
|

|
|
47
51
|
|
|
48
|
-
The model page edits the display name, context window, output limit, thinking levels and image support. A Trae model whose directory states a rate carries a cost tag such as `x0.79`; models
|
|
52
|
+
The model page edits the display name, context window, output limit, thinking levels and image support. A Trae directory row states only its plan default, which differs per model (116k to 400k). A model that states no larger tier is published with the measured 1M ceiling. A Trae model whose directory states a rate carries a cost tag such as `x0.79`; models whose directory states none, and every Qoder model, stay unlabelled:
|
|
49
53
|
|
|
50
54
|

|
|
51
55
|
|
|
56
|
+
The growth centre lists one row per account. "Read state" only reads; "Run now" performs that stage alone:
|
|
57
|
+
|
|
58
|
+

|
|
59
|
+
|
|
52
60
|
Live preview: <https://chengzhi-c.github.io/dsh-wtq-pool/>.
|
|
53
61
|
|
|
54
62
|
`docs/index.html` drives the actual panel code with synthetic demo data. It supports source switching, model settings and theme previews without reading local accounts or tokens.
|
|
55
63
|
|
|
56
64
|

|
|
57
65
|
|
|
58
|
-
With `showComposerPoints` enabled, the composer shows the
|
|
66
|
+
With `showComposerPoints` enabled, the composer toolbar shows the credits of the account behind the current model; click it to inspect that group and switch accounts. The image below is an off-screen render of the actual composer extension:
|
|
59
67
|
|
|
60
68
|

|
|
61
69
|
|
|
62
|
-
To run
|
|
70
|
+
To run the preview locally, clone the repository, run `node docs/serve.cjs`, and open the address it prints. The page cannot be opened over `file://`, because a browser will not let it read the panel files beside it.
|
|
63
71
|
|
|
64
72
|
## Features
|
|
65
73
|
|
|
66
|
-
- Reuse the local sign-ins: the
|
|
67
|
-
- Register model groups by region: each of
|
|
68
|
-
- Account distribution: WorkBuddy supports priority, round-robin, expiring credits first and conversation-sticky accounts,
|
|
69
|
-
- Credit automation: automatic check-in is off by default.
|
|
70
|
-
-
|
|
71
|
-
-
|
|
72
|
-
-
|
|
74
|
+
- Reuse the local sign-ins: the sign-in files the three desktop apps already saved are read and never modified, and no extra authorization is requested. The single exception is the panel's Add account, which opens the vendor's own login page and writes the result into the plugin's own directory.
|
|
75
|
+
- Register model groups by region: each region of each vendor becomes its own provider, and several can be on at once; a region with no account is not registered. A domestic model runs only on domestic accounts, and an international model only on international ones.
|
|
76
|
+
- Account distribution: WorkBuddy supports priority, round-robin, expiring credits first and conversation-sticky accounts, and fails over on a rate limit or exhausted quota. Trae and Qoder support priority, round-robin and expiring credits first, and move on to the next sign-in on an authentication failure, a rate limit or exhausted quota.
|
|
77
|
+
- Credit automation: automatic check-in is off by default. Once enabled, the scheduled run and "Run now" perform the same round: the three check-ins plus the WorkBuddy streak bonus and cat travel. The upstream advances the streak on a conversation, so the round reports one chat activity per account before reading the streak tiers, and a tier that comes due is unlocked and collected without the user opening WorkBuddy to send a message. The streak step also spends a make-up card when yesterday was missed, collects the one-off starter gift and campaign compensation, and spends the draws a redeemed tier awards. These growth steps run for domestic and international accounts alike; cat travel runs for domestic accounts only, because the international host has no such API. The plugin page carries a growth-centre tab that reads the state or runs that stage on its own and lists the accounts one row each.
|
|
78
|
+
- Token keep-alive: on demand, with no schedule behind it. "Refresh now" on the check-in card runs one pass by hand and handles only tokens within five minutes of expiry and tokens that report no expiry at all; a token with time left costs no request. It serves accounts nobody has used: once their token expires, the next request renews it, which pays that round trip on the user's own turn, and a dead refresh token fails that same turn. Disabled accounts and disabled regions stay out.
|
|
79
|
+
- Composer credits: with `showComposerPoints` on, the composer toolbar shows the balance of the account behind the current model; click it to switch accounts, and switching the feature off stops the readout's polling.
|
|
80
|
+
- Panel: account and pool state, model selection, the connection check and the growth centre all live in the account-pool card on the plugin page. The model catalogue loads at startup and refreshes on demand once its cache expires; it does not poll while idle. Disabled accounts are never probed, and the panel does not sit on "detecting" because of them.
|
|
81
|
+
- Connection check: every finding carries a verdict. A gateway that is not listening, a catalogue that could not be read, a published address that differs from the one actually bound, and a provider the host did not accept all count as failures and say what to change. A gateway whose start failed is reported with the reason, and the panel surfaces address drift as a reload hint. When the check itself throws, the failure becomes a finding rather than taking the whole channel down.
|
|
73
82
|
|
|
74
83
|
## Install
|
|
75
84
|
|
|
@@ -82,21 +91,40 @@ dsh plugin --profile desktop add $package
|
|
|
82
91
|
|
|
83
92
|
Requires DeepSeek Harness on the 0.2.0 line (`engines.dsh` in `package.json`: `>=0.2.0-rc.1 <0.2.1`) and Node `^22.19.0 || >=24.0.0`.
|
|
84
93
|
|
|
85
|
-
Replace `desktop` with
|
|
94
|
+
Replace `desktop` with the profile name actually in use. If `dsh` is not on `PATH`, use the CLI in its installation directory. The npm name `dsh-wtq-pool` and the repository URL also work as install sources; a repository-URL install builds from source through the `prepare` script, which requires `allowBuilds: dsh-wtq-pool: true` in the profile's `pnpm-workspace.yaml` and a pinned commit.
|
|
86
95
|
|
|
87
|
-
**Where the panel is**: open **Plugins** in the sidebar, then open the **dsh-wtq-pool** card
|
|
96
|
+
**Where the panel is**: open **Plugins** in the sidebar, then open the **dsh-wtq-pool** card, or the **Configure** control beside it; the full panel is embedded in that card. If the model groups do not appear, reload the plugin as the note at the top of the panel says.
|
|
88
97
|
|
|
89
98
|
## Usage
|
|
90
99
|
|
|
91
|
-
Sign in inside each vendor's desktop app, then click "Detect accounts again". WorkBuddy reads
|
|
100
|
+
Sign in inside each vendor's desktop app, then click "Detect accounts again". WorkBuddy reads several saved sign-ins; a `$wbEncrypted` sign-in from 5.6 on is read with a key obtained from the locally installed WorkBuddy. The domestic Trae build has two sign-in slots, Trae CN and TRAE SOLO CN. Qoder keeps one sign-in per installation, so signing in again in the app overwrites the previous one. The international WorkBuddy client keeps a single sign-in file, so switching accounts overwrites the previous one. The plugin archives a sign-in as it is overwritten, and that account keeps serving until its token expires; signing it in again in the app renews it.
|
|
101
|
+
|
|
102
|
+
An account can also be added without the desktop app: "Add account" in the panel's WorkBuddy header opens the vendor's login page in a new tab, and the account joins the pool once that page completes. The credential is written under `signins/` in the plugin's own data directory and takes part in distribution on the same terms as a desktop sign-in. Such an account also carries a "Delete" action, which confirms on a second press and then removes the sign-in file together with its archive entry, with no way back. The account is added to the region currently selected, so the domestic realm signs in a domestic account and the international realm an international one.
|
|
103
|
+
|
|
104
|
+
To migrate accounts left behind by another tool, write the files into that directory: `signins/` is the import format, and one `{auth, account}` document named `*.info` dropped there becomes an ordinary account on the next scan. `tools/import-signins.cjs` reads those account files (`--from` accepts files or directories) and writes them in the shape this plugin reads, skipping any account the plugin's own data directory already holds; `--dry-run` shows what would change and `--force` overwrites:
|
|
105
|
+
|
|
106
|
+
```
|
|
107
|
+
node tools/import-signins.cjs --data "<plugin data dir>" --from "<account file or directory>" [--region cn|global|all] [--dry-run] [--force]
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
The panel offers no import or export button. Those files hold live tokens whose reach equals that of the account itself, so exporting them would copy the token elsewhere. To back them up, copy the `signins/` directory, which already has the format a backup needs.
|
|
92
111
|
|
|
93
|
-
A source is selected at the top level; below it
|
|
112
|
+
A source is selected at the top level; below it sit four tabs: the account pool, the models, the connection check and the growth centre.
|
|
94
113
|
|
|
95
|
-
- **Account pool**: each account's label, remaining credits, quota expiry, cooldown state and check-in progress. An account can be disabled on its own or removed, and a region can be pinned to
|
|
114
|
+
- **Account pool**: each account's label, remaining credits, quota expiry, cooldown state and check-in progress. An account can be disabled on its own or removed, and a region can be pinned to one preferred account. WorkBuddy supports priority, round-robin, expiring credits first and conversation-sticky distribution; Trae and Qoder support priority, round-robin and expiring credits first.
|
|
96
115
|
- **Models**: select which models this region exposes; anything unselected stays out of the model picker. The display name, context window, output limit, thinking levels and image support are editable. A model group publishes at most 64 models; any beyond that are marked "not published" while the gateway still serves them.
|
|
97
|
-
- **Connection check**: reports
|
|
116
|
+
- **Connection check**: reports line by line whether each gateway is listening, how many models its catalogue returned, whether the registered address matches the one actually bound, and whether the host accepted each provider, and can copy the whole report.
|
|
117
|
+
- **Growth centre**: applies to WorkBuddy only. It lists one row per account, and expanding a row shows that account's streak tiers. "Read state" is read-only and claims nothing; "Run now" performs the growth stage of the scheduled pass on its own and reports it per step: the make-up card, the gift and compensation, the activity report, and the streak tiers with their draws.
|
|
118
|
+
|
|
119
|
+
Check-in runs per account, or for a whole source from the title bar. Automatic check-in is off by default; when on it claims at 09:00 (Beijing time), and a slot missed earlier the same day is still claimed at the next start, while one from a previous day is not. Trae's daily check-in is once per device; Qoder's new round opens at 10:00 (Beijing time).
|
|
120
|
+
|
|
121
|
+
The domestic WorkBuddy host refuses conversational requests whose client identifies itself as DeepSeek Harness (11128, channel check failed). Check-in, the growth centre and the keep-alive are unaffected, because they do not go through that check.
|
|
122
|
+
|
|
123
|
+
The panel's **Client name** switch controls that rewrite and is off by default. Turned on, every occurrence of `DeepSeek Harness` in the prompt is sent as `DeepSeek`; turned off, the original wording is sent.
|
|
98
124
|
|
|
99
|
-
|
|
125
|
+
The token keep-alive sits on the same card as the schedule, with no hour to set and no background timer: "Refresh now" runs one pass by hand and reports refreshed, already fresh, failed and without a refresh token separately. It touches no check-in progress.
|
|
126
|
+
|
|
127
|
+
Within the growth stage, the make-up card and the draws are consumed by a run, while the remaining steps are idempotent and repeating them pays nothing twice. A read stays in the host process, so reloading the panel still paints the last figures. Entering the tab re-reads when the figures are over two minutes old, when a pass ran after the read (including the growth stage of a scheduled check-in), or when a region was disabled.
|
|
100
128
|
|
|
101
129
|
## Settings
|
|
102
130
|
|
|
@@ -107,22 +135,23 @@ Every key below is declared in the host's settings schema and written back to th
|
|
|
107
135
|
| `enabled` | `true` | Off: the gateways do not start |
|
|
108
136
|
| `sourceWorkbuddy` / `sourceTrae` / `sourceQoder` | `true` | Off: that source is not scanned, published or requested |
|
|
109
137
|
| `distribution` | `priority` | How the WorkBuddy pool spreads requests: `priority` uses one account first, `round-robin` spreads evenly, `expiry` spends expiring credits first, `sticky` pins one account per conversation |
|
|
110
|
-
| `sourceDistributions` | `{}` | Trae/Qoder distribution: `round-robin` / `expiry`;
|
|
111
|
-
| `cooldownSeconds` | `60` | Rate-limit cooldown. A reset time the upstream reports takes precedence;
|
|
112
|
-
| `creditReserves` | `{}` | Per-account credit floor, keyed by account id; an account below its floor is not distributed to |
|
|
138
|
+
| `sourceDistributions` | `{}` | Trae/Qoder distribution: `priority` / `round-robin` / `expiry`; unset behaves as `priority` |
|
|
139
|
+
| `cooldownSeconds` | `60` | Rate-limit cooldown. A reset time the upstream reports takes precedence; with none, consecutive limits double it up to 15 minutes (a longer configured window is left alone) |
|
|
140
|
+
| `creditReserves` | `{}` | Per-account credit floor, keyed by account id; an account at or below its floor is not distributed to |
|
|
113
141
|
| `authFile` | `""` | WorkBuddy sign-in file path; every `.info` sign-in in its directory is scanned. Empty discovers it |
|
|
114
142
|
| `autoCheckin` | `{"enabled":false,"hours":[9]}` | Automatic check-in switch and times; `hours` are Beijing-time hours, empty means 09:00 |
|
|
115
143
|
| `showComposerPoints` | `false` | Show the active account's credits in the composer |
|
|
116
|
-
| `
|
|
117
|
-
| `
|
|
118
|
-
| `
|
|
144
|
+
| `rewriteClientName` | `false` | Send `DeepSeek` in place of the client name `DeepSeek Harness` in the prompt going to the domestic host, so its channel check (11128) passes; the international host is untouched |
|
|
145
|
+
| `disabledAccountIds` | `[]` | Account ids disabled in the panel |
|
|
146
|
+
| `disabledRegions` | `[]` | Regions disabled on their own, as `source:region` keys |
|
|
147
|
+
| `modelSelection` | `{}` | Which models each gateway publishes, plus display name, context window and other overrides |
|
|
119
148
|
| `preferredAccountIds` | `{}` | Preferred WorkBuddy account per region |
|
|
120
149
|
| `preferredSourceAccounts` | `{}` | Preferred Trae/Qoder account per region, keyed by `source:region` |
|
|
121
|
-
| `removedAccounts` | `[]` | Accounts removed from the pool
|
|
150
|
+
| `removedAccounts` | `[]` | Accounts removed from the pool, with label and region kept so the panel can offer a restore |
|
|
122
151
|
|
|
123
|
-
The default column lists effective values: `autoCheckin.hours` is stored as an empty array and normalises to `[9]
|
|
152
|
+
The default column lists effective values: `autoCheckin.hours` is stored as an empty array and normalises to `[9]`, and an unset or empty `authFile` means auto-discovery.
|
|
124
153
|
|
|
125
|
-
Model selection and preferred accounts are saved by the panel.
|
|
154
|
+
Model selection and preferred accounts are saved by the panel.
|
|
126
155
|
|
|
127
156
|
## Ports
|
|
128
157
|
|
|
@@ -132,24 +161,28 @@ Trae 42851 / 42861
|
|
|
132
161
|
Qoder 42871 / 42881
|
|
133
162
|
```
|
|
134
163
|
|
|
135
|
-
These are preferred ports.
|
|
164
|
+
These are the preferred ports. When one is taken, the gateway binds an ephemeral port and runtime provider registration uses that address, which the panel reports as the fallback.
|
|
165
|
+
|
|
166
|
+
When another process takes a port between the reservation and the listen, that gateway's start fails: its model group is dropped, the connection check reports the reason, and the panel surfaces address drift. Requests reach the new address only after the plugin is reloaded and the host re-reads its declaration.
|
|
136
167
|
|
|
137
|
-
|
|
168
|
+
The PI-Desktop edition uses a separate range starting at 41831, so both plugins can be installed on one machine with each range intact.
|
|
138
169
|
|
|
139
170
|
## Data and outbound requests
|
|
140
171
|
|
|
141
|
-
The plugin only reads local
|
|
172
|
+
The plugin only reads the vendors' local sign-in files and never writes back sign-in state. Providers are registered at runtime without rewriting host provider configuration, while the host still persists plugin settings in the profile. Tokens stay in the plugin process and are sent only to the relevant vendor endpoints. Gateways listen on `127.0.0.1`; panel assets and RPC require an actual loopback peer and ignore forwarded address headers, so a remote browser cannot use the panel directly. The plugin neither manages nor deletes host conversation records.
|
|
173
|
+
|
|
174
|
+
The plugin's own data directory, `~/.dsh/dsh-wtq-pool/` (or `$DSH_HOME` when set), holds three files. `checkin-slots.json` records the check-in slots already collected, kept for three days. `doctor.txt` is the most recent connection report, item by item, and names no account. `credentials-archive.json` keeps the sign-ins a later account switch overwrote, access tokens included, by token expiry, dropping each 30 days after it.
|
|
142
175
|
|
|
143
|
-
|
|
176
|
+
A sign-in added with "Add account" lands in a `signins/` subdirectory of the same place, named after the account's billing identity and read on the same terms as a desktop sign-in. "Delete" in the panel removes that file together with its archive entry, with no way back, whereas "Remove" only disables the account and "Removed accounts" restores it.
|
|
177
|
+
|
|
178
|
+
Another process on the same machine can call these loopback endpoints and spend a signed-in account's quota. If replies go missing after a restart, check both the plugin log and the host's persisted log. The plugin sends no telemetry, and panel links open only when clicked.
|
|
144
179
|
|
|
145
180
|
Tokens go only to the hosts below:
|
|
146
181
|
|
|
147
|
-
- WorkBuddy: `copilot.tencent.com`, `www.codebuddy.cn`, `www.codebuddy.ai`, `www.workbuddy.ai
|
|
182
|
+
- WorkBuddy: `copilot.tencent.com`, `www.codebuddy.cn`, `www.codebuddy.ai`, `www.workbuddy.ai`
|
|
148
183
|
- Trae: `api.trae.cn`, `solo.trae.cn`, `trae-api-cn.mchost.guru`, `coresg-normal.trae.ai`, `growsg-normal.trae.ai`
|
|
149
184
|
- Qoder: `gateway.qoder.com.cn`, `openapi.qoder.com.cn`, `api3.qoder.sh`, `openapi.qoder.sh`
|
|
150
185
|
|
|
151
|
-
The plugin sends no telemetry. Panel links open only when clicked.
|
|
152
|
-
|
|
153
186
|
## Development
|
|
154
187
|
|
|
155
188
|
```sh
|
|
@@ -160,16 +193,16 @@ pnpm run typecheck:client
|
|
|
160
193
|
pnpm test # Node's own test runner, offline regressions
|
|
161
194
|
```
|
|
162
195
|
|
|
163
|
-
`src/host.ts` is the engine (account discovery, the pool, the gateways, the panel channels), `src/index.ts` is the Cordis entry (settings schema, provider registration, panel routes), and `src/pi-compat.ts` adapts the host's capabilities to the calls the engine
|
|
196
|
+
`src/host.ts` is the engine (account discovery, the pool, the gateways, the panel channels), `src/index.ts` is the Cordis entry (settings schema, provider registration, panel routes), and `src/pi-compat.ts` adapts the host's capabilities to the calls the engine makes. `renderer/` is the panel itself, `index.html`, `panel.js` and `panel.css`, in plain JavaScript with no build step, mounted by `src/web-panel.ts` on the host's web server and served to the plugin card as a same-origin iframe. `src/client/` is the React half: the plugin-page card that embeds that iframe (`index.tsx`), its address construction (`panel-url.ts`), and the composer readout (`composer.tsx`). `lib/` is emitted by `tsdown`, listed in `package.json`'s `files` and committed, so it must be rebuilt after changing `src/`.
|
|
164
197
|
|
|
165
198
|
The host-agnostic core:
|
|
166
199
|
|
|
167
200
|
| Module | Responsibility |
|
|
168
201
|
| --- | --- |
|
|
169
|
-
| `loopback.ts` | The loopback security model (Host
|
|
202
|
+
| `loopback.ts` | The loopback security model (Host and Origin checks), response writing, stream relay and message redaction |
|
|
170
203
|
| `accounts.ts` | WorkBuddy sign-in parsing, token encryption, the account pool and its cooldowns |
|
|
171
204
|
| `upstream.ts` | The WorkBuddy upstream client, error classification, rate-limit reset parsing |
|
|
172
|
-
| `catalog.ts` | The model
|
|
205
|
+
| `catalog.ts` | The model catalogue and its static fallback list |
|
|
173
206
|
| `shim.ts` | The WorkBuddy gateway's OpenAI-compatible endpoint |
|
|
174
207
|
| `at-rest.ts` | Unsealing 5.6+ encrypted sign-in fields |
|
|
175
208
|
| `promo.ts` | Promotion window matching |
|
|
@@ -186,6 +219,7 @@ Several modules are ported from or reference the MIT projects below:
|
|
|
186
219
|
| [dingminhua/dsh-connect-workbuddy](https://github.com/dingminhua/dsh-connect-workbuddy) | (c) 2026 LaoDing | Upstream API and error classification |
|
|
187
220
|
| [dingminhua/dsh-connect-trae](https://github.com/dingminhua/dsh-connect-trae) | (c) 2026 dingminhua | Trae protocol reference |
|
|
188
221
|
| [eghrhegpe/dsh-connect-qoder](https://github.com/eghrhegpe/dsh-connect-qoder) | (c) 2026 eghrhegpe | Qoder protocol reference |
|
|
222
|
+
| [ardeyouxipianyi/workbuddy2api-hub](https://github.com/ardeyouxipianyi/workbuddy2api-hub) | (c) 2026 ardeyouxipianyi | Growth centre and streak loop (make-up cards, gift, compensation, lottery), multi-account credential retention, activity reporting for international accounts |
|
|
189
223
|
|
|
190
224
|
## License
|
|
191
225
|
|