dsh-wtq-pool 1.0.51 → 1.2.0
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 +44 -98
- package/README.en.md +28 -30
- package/README.md +29 -31
- package/lib/client.js +40 -8
- package/lib/index.d.ts +0 -2
- package/lib/index.js +2087 -578
- package/package.json +9 -12
- package/renderer/index.html +14 -23
- package/renderer/panel.css +16 -5
- package/renderer/panel.js +188 -132
package/CHANGELOG.md
CHANGED
|
@@ -1,121 +1,67 @@
|
|
|
1
1
|
# 更新说明
|
|
2
2
|
|
|
3
|
+
## [1.2.0]
|
|
4
|
+
|
|
5
|
+
- 品牌:模型提供商 ID 由 `xdpool-*` 改为 `wtqpool-*`;升级后模型选择需要重新选一次。
|
|
6
|
+
|
|
7
|
+
## [1.1.1]
|
|
8
|
+
|
|
9
|
+
- 登录:刷新失败的账号在本轮请求内跳过,不再反复重试同一个账号;200 信封的登录失效也区分「被拒」与「刷新失败」,后者不再写 6 小时停用。
|
|
10
|
+
- 渠道校验:11128 出现在 HTTP 200 的 JSON 信封时同样折叠系统消息并重试一次,通过的提示照常按 region 记住。
|
|
11
|
+
- 签到:Trae、Qoder 的单账号签到在超时后继续占用守卫,避免第二次点击与仍在进行的领取并行。
|
|
12
|
+
- Qoder:展示用量只带到期时间、没有可用额度时回退到 quota 路由,不再直接报「用量不可用」。
|
|
13
|
+
- 设置:宿主推送的旧设置文档不再覆盖刚保存的账号停用、移除与模型选择;DSH 重载保留 provider 声明与 Trae/Qoder 目录,地址漂移按实际发布地址判断。
|
|
14
|
+
- 面板与文档:保活卡片只在 WorkBuddy 页签显示;补充刷新重置时间的 2 小时上限、输入框积分关闭后的慢轮询、助手历史改名说明。
|
|
15
|
+
|
|
16
|
+
## [1.1.0]
|
|
17
|
+
|
|
18
|
+
- 登录:多处登录按签发时间取最新;续期写回插件自管文件;被拒登录先刷新重试,刷新令牌也失效才挂起 6 小时,挂起期间跳过轮询、签到、成长与保活。
|
|
19
|
+
- 账号限制:11140 标注「已限制」并换号,全部受限回 403 提示申诉;11158 按账号 × 模型停用 24 小时,全部被拒回 400。
|
|
20
|
+
- 网络:刷新超时、限流或网络故障时账号留在轮换;网络错误结束本轮,不冷却账号。
|
|
21
|
+
- 网关:200 信封里的账号级业务码按原因处理;缺结束帧时补 `finish_reason` 与 `[DONE]`;Trae、Qoder 等待期间发保活;路由支持查询串;空正文回 502。
|
|
22
|
+
- 对话:国内版渠道校验(11128)拒绝提示词时,自动把系统消息并入首条用户消息并重试一次;通过的提示按 region 记住,后续轮次不再重复这次往返。移除「客户端名称」开关。
|
|
23
|
+
- 面板:区分「需重新登录」「已限制」与普通冷却;删除立即消失且不被桌面快照带回;签到防连点;重载后提示刷新。
|
|
24
|
+
- 令牌保活:独立卡片,按签发时间续期;桌面遗留快照由插件接管,正在使用的由桌面端续期。
|
|
25
|
+
- 连接检查:网关启动失败原因与端口记入报告,停用、重启与卸载时清除;重载清掉未完成的设备登录。
|
|
26
|
+
|
|
3
27
|
## [1.0.51]
|
|
4
28
|
|
|
5
29
|
- Qoder 不再列出 Ultimate、Efficient、Sonus、Cantus 四条内部路由,只保留有名称的模型。
|
|
6
30
|
|
|
7
31
|
## [1.0.5]
|
|
8
32
|
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
- 面板添加的账号可删除,登录文件与留档一并清除,按两次确认、八秒内未再按即解除;删除先等进行中的扫描结束,并清掉停用标记、积分保底与首选设置。
|
|
16
|
-
- 删除确认超时后提示一并消失;该行忙碌时置灰,按下不进入确认状态。桌面 App 自身的登录没有该按钮。
|
|
17
|
-
- 凭证留档读不出或损坏时扫描不改写,被覆盖的账号仍可恢复。
|
|
18
|
-
- 挂起按原因区分:「额度用尽」读到余额即释放,「登录失效」需重新登录或手动重置;扫到新登录时释放并以该份登录请求,原因不被另一种改写。
|
|
19
|
-
- 未给重置时间的限流冷却逐次翻倍,封顶 15 分钟,间隔超过 30 分钟重新计数;上游给出重置时间时以它为准。
|
|
20
|
-
- 空池的拒绝状态码按原因区分,仍有账号在限流时随响应发出该期限。
|
|
21
|
-
- 轮转与临期积分优先都先排可用登录,被挂起的排后面;Qoder 延迟轮次只在真正完成时清除重试时间。
|
|
22
|
-
- WorkBuddy 模型拒绝缺省思考等级时,补上默认等级重发一次。
|
|
23
|
-
- Trae 的默认档与 Max 档都作为上限发布:窗口高于所有默认档才用 Max,目录未声明更大档位时取实测上限,同一模型的多份声明全部保留。
|
|
24
|
-
- Trae 的查询被拒时改用同模型的下一份声明重试一次,目录残缺时并入已缓存名单。
|
|
25
|
-
- 目录晚于启动返回时,该来源的模型组补发一次声明。
|
|
26
|
-
- Trae 模型发布实测可用的 1M 上限档,默认窗口不变。
|
|
27
|
-
- 面板三个来源页签右侧与 README 顶部写明封号风险。
|
|
28
|
-
- 模型页左列的编辑标记跟随当前打开的编辑面板,关闭、取消勾选或保存后清除。
|
|
29
|
-
- 模型页的预设档位含模型自身的上限,超出的不出现。
|
|
30
|
-
- 保存的上限高于当前目录时显示目录中的值,不计为未保存的改动。
|
|
31
|
-
- 数值被拒绝时回填实际保存的值,清空字段即回到跟随目录;手工输入的窗口与输出优先于夹紧时暂存的值。
|
|
32
|
-
- 打开模型页不中断后台刷新轮询;Trae、Qoder 按网关实际发布的列表显示勾选状态。
|
|
33
|
-
- 输入框的积分读数与网关使用同一账号顺序,刚被上游拒绝的账号不显示为当前账号。
|
|
34
|
-
- 在积分弹层内滚动时弹层保持打开。
|
|
35
|
-
- 「立即刷新」跑一轮令牌保活,按刷新、无需处理、失败、无刷新令牌分项报告,无定时任务与开关,重启后照常显示。
|
|
36
|
-
- 国际版登录文件被覆盖时,为读到的凭证留档并继续分发;服务运行期间每分钟重读一次桌面登录。
|
|
37
|
-
- 选择器不列出登录已过期的 Trae、Qoder 账号;夜间免费窗口的结束时间显示为 24:00;自动签到开关关闭时非法时间仍给出提示。
|
|
38
|
-
- 签到慢轮询失败三次后停止,页面隐藏时两个轮询都停。
|
|
39
|
-
- 面板补齐对比度与可访问名称,页签标出 `aria-selected`,失败提示标出 `role="alert"`。
|
|
40
|
-
- 账号行按钮按账号本身定位,焦点回到按下的那一行。
|
|
41
|
-
- 缺字文案补齐。
|
|
42
|
-
- 积分包的到期时间接受秒级时间戳。
|
|
43
|
-
- 端口回退时,提示中写出被占用的首选端口。
|
|
44
|
-
- 连接检查在 at-rest 检查通过时也写一行。
|
|
45
|
-
- 网关在目录全部失败时的 503 带上真实原因;请求体缺少工具调用标识时返回其自身的说明;回复里出现过工具调用又被预算截断时,发给宿主的是「被截断」。
|
|
46
|
-
- WorkBuddy 国内版拒绝对话请求时,面板说明原因与可用的来源。
|
|
47
|
-
- 新增 `tools/import-signins.cjs`:把其他工具的账号文件按本插件识别的形状写入 `signins/`,默认跳过已有账号,`--dry-run` 预览,`--force` 覆盖。
|
|
48
|
-
- 面板新增「客户端名称」开关,默认关闭:开启后提示词里 `DeepSeek Harness` 的每一处都改为 `DeepSeek`,国内版据此放行(11128);关掉即恢复原样。
|
|
33
|
+
- 新增成长中心页签:按账号列出连登档位,「读取状态」显示当前档位与可领取项,「立即执行」执行补签、礼包、活跃上报、连登与抽奖,两个 region 都执行。
|
|
34
|
+
- 面板「添加账号」在浏览器打开官方登录页,凭证写入 `signins/`;面板添加的账号可在两次确认后删除,登录文件与留档一并清除。
|
|
35
|
+
- Trae 的默认档与 Max 档按实际上限发布,目录晚到或查询被拒时补发声明并重试;缺省思考等级按模型声明补发一次。
|
|
36
|
+
- 面板新增「客户端名称」开关,开启后提示词里的 `DeepSeek Harness` 改为 `DeepSeek`。
|
|
37
|
+
- 冷却间隔逐次翻倍、封顶 15 分钟;签到慢轮询失败三次停止,页面隐藏时轮询暂停;面板补齐对比度、焦点、`aria` 与缺字文案。
|
|
38
|
+
- 新增 `tools/import-signins.cjs`,按插件识别的形状导入其他工具的账号文件。
|
|
49
39
|
|
|
50
40
|
## [1.0.4]
|
|
51
41
|
|
|
52
|
-
- Trae、Qoder
|
|
53
|
-
-
|
|
54
|
-
- WorkBuddy 网关同样先发出响应头,其余行为不变。
|
|
55
|
-
- 面板的签到汇总按三家合计显示领取账号数。
|
|
56
|
-
- 网关拒绝跨站请求(`Sec-Fetch-Site: cross-site`),面板的 `/invoke` 只接受 JSON;本机客户端与面板自身不受影响。
|
|
57
|
-
- 面板的签到日志持续轮询至结束,模型勾选与自动签到时间的未保存草稿不被轮询覆盖,日志不强制滚动到底部,账号名单读取失败后可以重试。
|
|
42
|
+
- Trae、Qoder 的流式回复完整收到结束帧;Qoder 在结束帧后最多等 1 秒补 `[DONE]`,WorkBuddy 先发响应头。
|
|
43
|
+
- 网关拒绝跨站请求与面板的非 JSON 请求;面板签到日志与未保存草稿不再被轮询覆盖。
|
|
58
44
|
|
|
59
45
|
## [1.0.3]
|
|
60
46
|
|
|
61
|
-
- WorkBuddy
|
|
62
|
-
-
|
|
63
|
-
-
|
|
64
|
-
-
|
|
65
|
-
- 上游仅在 `Retry-After` 响应头给出等待时间时按该值冷却并透传给客户端(截断到两小时);响应头超时只覆盖等待响应头阶段,流中途的静默交由空闲看门狗处理。
|
|
66
|
-
- 调用方挂断后上游请求一并拆除,错误响应体在挂断或超限时立即取消。
|
|
67
|
-
- 超过 64 MiB 的请求体先排空再关闭并返回 413;peek 期间连接中断不绕过故障转移。
|
|
68
|
-
- Trae、Qoder 的首个登录不可用时改用下一个,模型目录同样换号读取;Trae 的登录拒绝与流内拒绝按真实状态码返回。
|
|
69
|
-
- Qoder 的失败帧(空 choices、字符串形式 `error` / `details`、`errcode` 拼写变体、嵌套确认码)按真实编码换号或冷却。
|
|
70
|
-
- Trae 的每个存储文件只在第一个认领它的版本下探测一次;一台安装登录多个账号时明确报告设备号为回退值。
|
|
71
|
-
- Qoder 发布目录给出的最大上下文窗口按上游数值发布;数字时间戳的到期时间按实际时间计算。
|
|
72
|
-
- Trae、Qoder 的登录发现按 30 秒缓存,Qoder 不为每个请求 spawn PowerShell 解密;目录读取失败进入 30 秒退避。
|
|
73
|
-
- Trae 与 Qoder 的 SSE 解码支持单独 CR 行分隔与 64 MiB 单行上限;中继按客户端消费速度读取上游,慢客户端不使整份回复缓存在网关内。
|
|
74
|
-
- 模型名册只采用实际读到的那份:读取超时留下的兜底列表不参与「已下线」判定;进入面板自动重新拉取名册,读取失败或账号扫描尚未完成时按 15 秒重试。
|
|
75
|
-
- 模型页保存的思考等级与上游声明的 `defaultEffort` 均生效。
|
|
76
|
-
- 设置文档与面板保存共用同一组边界(积分保底、模型 id 长度、覆写表大小、token 预算、模型 id 条数);`enabledModelIds: []` 对 Trae 与 Qoder 同样禁用全部模型;旧版 `imageModelIds` 与 `contextBudgets` 折入模型覆写。
|
|
77
|
-
- provider 行仅在网关预热时保留,退出登录后不常驻;网关启动失败按失败处理,模型组摘掉,连接检查报出原因。
|
|
78
|
-
- 账号池刷新:强制刷新采用互斥交接;`authFile` 改变指向后补一次扫描且旧目录不写回;全部冷却时面板继续轮询,停用账号退出探测;某个 region 启动失败只记警告并继续。
|
|
79
|
-
- 面板与命令:`/invoke` 等待期间关闭面板不影响插件子进程;内容安全策略、框架祖先限制与 `nosniff` 已补齐;输入框积分浮层在功能关闭后停止轮询并区分两种未知;两条命令同时运行时各自汇报结果。
|
|
80
|
-
- 签到与领取:Trae 签到响应缺省 `enable` 时按已开通处理;Qoder 的领取读取完整响应体,带 `grantId`/金额的已发放响应按已领取上报,200 中的业务错误码按失败上报并带上游原话;拒绝中含「already」计为当天已领;重启不重跑整天,时段落盘保留三天;Trae 返回 9074 时在失败原因中说明设备号来源。
|
|
81
|
-
- 签到一次执行一轮:单账号签到与整批签到互斥,面板的整批签到记录当次时段;旅行的失败计入统计;Qoder 活动列表读取失败与「该账号无签到活动」分开显示;面板的签到失败按失败显示并带上原因。
|
|
82
|
-
- 上游响应体无论是否为 JSON 都先脱敏再转给客户端;手写签到时段中的空值按 00:00 处理。
|
|
83
|
-
- 连接检查自身抛错会写入报告,超时后的回退读取受剩余预算约束;at-rest 的可执行文件候选只接受文件,注册表扫描结果按进程缓存。
|
|
84
|
-
- 面板与声明:声明的变更比对按键序归一化,页脚在第一次写入之前不显示「已更新」;积分弹层的账号包列表截断到 8 条,不触发宿主的 64 KB 应答上限。
|
|
47
|
+
- WorkBuddy 国际版补齐渠道头与 UA;不带会话标记的 401 按登录失效换号;无法取密钥或刷新令牌过期但访问令牌有效时,账号留在池中。
|
|
48
|
+
- 额度用尽与登录失效退出轮换,余额或重新登录释放;`Retry-After` 与响应头、流超时有界,调用方挂断即拆除上游请求。
|
|
49
|
+
- 超过 64 MiB 的请求体回 413;Trae、Qoder 首个登录不可用时换号,目录读取失败退避,SSE 支持单独 CR 行并按客户端消费速度中继。
|
|
50
|
+
- 凭据在错误信息中脱敏;签到、连接检查、provider 声明与面板设置的多处边界修复。
|
|
85
51
|
|
|
86
52
|
## [1.0.2]
|
|
87
53
|
|
|
88
|
-
-
|
|
89
|
-
- 设置保存中越界的 token 预算在保存前拦截,整批改动照常保存。
|
|
90
|
-
- 签到开关在小时框留有无效文本时仍可关闭,计时器不留运行状态;签到结束后重新拉取日志,手动结果即时可见。
|
|
91
|
-
- 面板框在文档就位、内容尚未到达的瞬间读取空对象;标题栏警告随问题消失而清除。
|
|
92
|
-
- 账号卡与设置卡单列堆叠、间距收紧,多数窗口不必滚动即可看全;签到日志框限高可滚动,新结果自动滚动到可见处。
|
|
93
|
-
- 输入框积分弹层宽度随内容变化并对齐触发器右侧,高度上限连内边距一并计算;账号名过长时在列内截断并保留悬停提示;切换账号后积分读数连续。
|
|
54
|
+
- 输入框积分刷新按宿主时限留余量,越界预算保存前拦截;面板焦点与布局、签到开关与日志、弹层定位修复。
|
|
94
55
|
|
|
95
56
|
## [1.0.1]
|
|
96
57
|
|
|
97
|
-
-
|
|
98
|
-
-
|
|
99
|
-
- 「重新检测账号」与加载期把账号扫描和网关启动纳入整段预算,按时应答,未完成部分由后台刷新补齐;重新检测移除登录文件已不存在的 WorkBuddy 账号。
|
|
100
|
-
- 输入框积分弹窗的「刷新」按总预算逐账号补读,多账号机器不必逐个等待。
|
|
101
|
-
- 首次读取 WorkBuddy 积分自动触发后台探测,冷启动与换号后的未知余额按 5 秒重读。
|
|
102
|
-
- 快速关闭再开启某来源时,新网关等待旧网关释放端口;首选端口被占用时改用实际绑定的端口,地址保持稳定。
|
|
103
|
-
- 插件重载后重新计算当天的签到时段;手动「立即运行」与命令面板签到计入当前已到点的时段;Qoder 当日轮次晚于签到时点开放时在开放时刻补收。
|
|
104
|
-
- WorkBuddy、Trae、Qoder 收到上游终止标记即完成响应,不等待 TCP 连接关闭;上游开始输出后才失败时发出带内错误帧、终止帧与 `[DONE]`。
|
|
105
|
-
- 上游回显的凭据在错误信息中脱敏(含 `Cosy-Key`、`X-Cloudide-Token`、`X-Ide-Token` 等写法);Trae 拒绝回包中途断开时保留真实状态码;国内 Trae、Qoder 的有效登录按有效处理。
|
|
106
|
-
- 轮流使用只在对话请求上换号,刷新模型列表与健康检查不拨动游标;首选来源账号改名后仍参与轮换;连登奖励只兑换已解锁的档位;模型 id 为 `__proto__` 时按普通 id 保存与读回。
|
|
107
|
-
- 面板配色统一为一组低饱和色相。
|
|
108
|
-
- 显示名、包名与仓库名统一为 **WTQ Pool** / `dsh-wtq-pool`,命令 id 与设置命名空间不变。
|
|
109
|
-
- Trae 模型倍率以 `x0.79` 标签显示。
|
|
110
|
-
- 面板右下角收成一排 GitHub、npm、文档与许可链接。
|
|
111
|
-
- 中英文文档明确故障转移、Trae/Qoder 分发限制与本地安装方式;网关拒绝凭据的提示指向连接检查。
|
|
58
|
+
- 设置保存、面板路由与端口回退修复;重新检测账号纳入预算并移除已不存在的登录。
|
|
59
|
+
- 重载后重算签到时段;上游终止帧即完成响应,失败时补错误帧与 `[DONE]`;错误信息脱敏;轮流使用不拨动健康检查游标。
|
|
112
60
|
|
|
113
61
|
## [1.0.0]
|
|
114
62
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
- WorkBuddy
|
|
118
|
-
-
|
|
119
|
-
-
|
|
120
|
-
- 会话输入框左侧显示当前模型的账号积分,点开可切换账号。
|
|
121
|
-
- provider 通过运行时注册接入,不改写宿主 provider 配置;插件设置由宿主持久化至 profile;对 `@earendil-works/pi-ai` 按实际解析到的版本适配请求上下文。
|
|
63
|
+
首个版本。把 WorkBuddy、Trae、Qoder 的桌面登录接入 DeepSeek Harness,按 region 注册为 provider,仅监听 `127.0.0.1`。
|
|
64
|
+
|
|
65
|
+
- WorkBuddy 支持优先、轮流、临期积分优先与对话固定,限流或额度用尽时自动换号;Trae、Qoder 按请求分发。
|
|
66
|
+
- 插件页提供账号池、模型与连接检查,输入框可显示当前账号积分并换号。
|
|
67
|
+
- 自动签到默认关闭,09:00 执行并补领,顺带执行连登奖励与猫猫旅行。
|
package/README.en.md
CHANGED
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
|
|
38
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
39
|
|
|
40
|
-
A rate limit cools for the wait the upstream stated,
|
|
40
|
+
A rate limit cools for the wait the upstream stated, or the configured window when it stated none. 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 successful token refresh, a fresh sign-in or a manual cooldown reset releases a refused-sign-in hold, and both lapse after six hours (WorkBuddy). The non-stream reads of credits, check-in state, the model catalogue and check-ins force one token refresh and one retry when a sign-in is refused: an account whose refresh token still works recovers on the spot and never leaves rotation, and only one whose refresh token is spent too is held. 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 turn ends with a network error. When the upstream says an account's plan does not include a model (11158), that model is disabled on that account for 24 hours while its other models keep serving; if no account includes it, the turn is answered with 400.
|
|
41
41
|
|
|
42
42
|
## Preview
|
|
43
43
|
|
|
@@ -49,17 +49,17 @@ The panel reads the host's `app.getAppearance()` when it loads, which fixes its
|
|
|
49
49
|
|
|
50
50
|

|
|
51
51
|
|
|
52
|
-
The model page edits
|
|
52
|
+
The model page edits each model's display and publishing settings. 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:
|
|
53
53
|
|
|
54
54
|

|
|
55
55
|
|
|
56
|
-
|
|
56
|
+
Growth centre:
|
|
57
57
|
|
|
58
58
|

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

|
|
65
65
|
|
|
@@ -71,14 +71,15 @@ To run the preview locally, clone the repository, run `node docs/serve.cjs`, and
|
|
|
71
71
|
|
|
72
72
|
## Features
|
|
73
73
|
|
|
74
|
-
- Reuse the local sign-ins: the sign-in files the three desktop apps
|
|
74
|
+
- Reuse the local sign-ins: the sign-in files the three desktop apps saved are read as they are. The panel's Add account opens the vendor's own login page and writes the result into the plugin's own directory.
|
|
75
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
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
|
-
-
|
|
78
|
-
-
|
|
79
|
-
-
|
|
80
|
-
-
|
|
81
|
-
-
|
|
77
|
+
- Gateway responses are SSE streams of `chat.completion.chunk`; the `stream` field in the request body does not change the format.
|
|
78
|
+
- 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.
|
|
79
|
+
- Token keep-alive: on demand, on a card of its own. A snapshot the desktop client left behind is adopted into the plugin's own sign-in directory when the pool scans, and the plugin renews it from then on; the desktop app renews the sign-in it is using. "Refresh now" works on the plugin's own copies and judges by issue time: anything signed more than six hours ago is refreshed, and a token within five minutes of expiry takes the same path. The answer is written back into the sign-in file the plugin owns, so a sign-in the upstream refused is found the same day. When one account has sign-ins in several places, the newest issue time wins. Disabled accounts, disabled regions and accounts whose sign-in the upstream refused stay out.
|
|
80
|
+
- Composer credits: with `showComposerPoints` on, the composer toolbar shows the balance of the account behind the current model; click it to switch accounts. Switching the feature off hides the readout and slows the poll to once every five minutes, so switching it back on recovers without a model change.
|
|
81
|
+
- 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 and accounts whose sign-in the upstream refused are never probed.
|
|
82
|
+
- 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. A check that fails on its own becomes a finding, and the rest of the report still appears.
|
|
82
83
|
|
|
83
84
|
## Install
|
|
84
85
|
|
|
@@ -91,6 +92,8 @@ dsh plugin --profile desktop add $package
|
|
|
91
92
|
|
|
92
93
|
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`.
|
|
93
94
|
|
|
95
|
+
> After upgrading from 1.1.x to 1.2.0, provider ids are `wtqpool-*`; reselect your model once.
|
|
96
|
+
|
|
94
97
|
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.
|
|
95
98
|
|
|
96
99
|
**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.
|
|
@@ -99,7 +102,7 @@ Replace `desktop` with the profile name actually in use. If `dsh` is not on `PAT
|
|
|
99
102
|
|
|
100
103
|
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
104
|
|
|
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
|
|
105
|
+
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; see the Data section for what it removes. An account the desktop app is signed into right now has no Delete: that session belongs to the app. The account is added to the region currently selected, so the domestic region signs in a domestic account and the international region an international one.
|
|
103
106
|
|
|
104
107
|
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
108
|
|
|
@@ -107,28 +110,24 @@ To migrate accounts left behind by another tool, write the files into that direc
|
|
|
107
110
|
node tools/import-signins.cjs --data "<plugin data dir>" --from "<account file or directory>" [--region cn|global|all] [--dry-run] [--force]
|
|
108
111
|
```
|
|
109
112
|
|
|
110
|
-
|
|
111
|
-
|
|
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.
|
|
113
|
+
To back them up, copy the `signins/` directory, which already has the format a backup needs. Those files hold live tokens whose reach equals that of the account itself.
|
|
113
114
|
|
|
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.
|
|
115
|
+
- **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. An account whose sign-in the upstream refused shows a "re-login needed" badge, the reason and a "held until" time; credits and check-in stay blank while held. An account the upstream restricted instead shows a "restricted" badge and a "restricted by the upstream until" stamp, is retried every six hours, and needs an appeal in the WorkBuddy console.
|
|
115
116
|
- **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.
|
|
116
117
|
- **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"
|
|
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).
|
|
118
|
+
- **Growth centre**: applies to WorkBuddy only. It lists one row per account, and expanding a row shows that account's streak tiers. "Read state" reads the current tiers and what is due; "Run now" claims them and runs the growth stage, reporting every step: the make-up card, the gift and compensation, the activity report, and the streak tiers with their draws. An account whose sign-in the upstream refused is skipped in that round.
|
|
120
119
|
|
|
121
|
-
|
|
120
|
+
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). An account whose sign-in the upstream refused is skipped in that round.
|
|
122
121
|
|
|
123
|
-
The
|
|
122
|
+
The domestic WorkBuddy host refuses conversational requests whose client identifies itself as DeepSeek Harness (11128, channel check failed), whether the refusal arrives as HTTP 400 or as a JSON envelope with HTTP 200. When it lands, the plugin folds the system messages into the first user message and retries once; the client name is also removed from assistant history, because the channel check reads assistant turns too. An accepted prompt is remembered per region, so the same prompt does not pay that round trip again. Check-in, the growth centre and the keep-alive use their own endpoints.
|
|
124
123
|
|
|
125
|
-
|
|
124
|
+
"Refresh now" reports refreshed, already fresh, failed and without a refresh token separately.
|
|
126
125
|
|
|
127
|
-
|
|
126
|
+
A read stays in the host process, so reloading the panel still paints the last figures. Entering the tab re-reads figures older than two minutes, figures a later pass has outdated, or figures from a region since disabled.
|
|
128
127
|
|
|
129
128
|
## Settings
|
|
130
129
|
|
|
131
|
-
Every key below is
|
|
130
|
+
Every key below is editable in the plugin page or the DSH settings page and saved on confirm:
|
|
132
131
|
|
|
133
132
|
| Key | Default (effective) | Meaning |
|
|
134
133
|
| --- | --- | --- |
|
|
@@ -136,12 +135,11 @@ Every key below is declared in the host's settings schema and written back to th
|
|
|
136
135
|
| `sourceWorkbuddy` / `sourceTrae` / `sourceQoder` | `true` | Off: that source is not scanned, published or requested |
|
|
137
136
|
| `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 |
|
|
138
137
|
| `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) |
|
|
138
|
+
| `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). A reported reset is capped at two hours; a spent balance or a refused sign-in is held for six hours instead |
|
|
140
139
|
| `creditReserves` | `{}` | Per-account credit floor, keyed by account id; an account at or below its floor is not distributed to |
|
|
141
140
|
| `authFile` | `""` | WorkBuddy sign-in file path; every `.info` sign-in in its directory is scanned. Empty discovers it |
|
|
142
141
|
| `autoCheckin` | `{"enabled":false,"hours":[9]}` | Automatic check-in switch and times; `hours` are Beijing-time hours, empty means 09:00 |
|
|
143
142
|
| `showComposerPoints` | `false` | Show the active account's credits in the composer |
|
|
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
143
|
| `disabledAccountIds` | `[]` | Account ids disabled in the panel |
|
|
146
144
|
| `disabledRegions` | `[]` | Regions disabled on their own, as `source:region` keys |
|
|
147
145
|
| `modelSelection` | `{}` | Which models each gateway publishes, plus display name, context window and other overrides |
|
|
@@ -165,17 +163,17 @@ These are the preferred ports. When one is taken, the gateway binds an ephemeral
|
|
|
165
163
|
|
|
166
164
|
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.
|
|
167
165
|
|
|
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.
|
|
166
|
+
The PI-Desktop edition uses a separate range starting at 41831, so both plugins can be installed on one machine with each range intact. Each edition keeps its own copy of a sign-in and renews it on its own schedule, and the upstream rotates the refresh token whenever one does. A single account is therefore held by whichever edition renewed it last: the other one's refresh token stops working, its panel marks the account as needing a sign-in, and "Add account" puts it back. The token days differ for the same reason, since each row shows the expiry of that edition's own copy. To keep one account working in both editions, add it in only one of them, or re-add it in the one that was marked.
|
|
169
167
|
|
|
170
168
|
## Data and outbound requests
|
|
171
169
|
|
|
172
|
-
The plugin
|
|
170
|
+
The plugin reads the vendors' local sign-in files. Providers are registered at runtime; the host persists plugin settings in the profile. Tokens are held by the plugin and go only to the relevant vendor endpoints. Gateways listen on `127.0.0.1`; the panel accepts loopback requests only.
|
|
173
171
|
|
|
174
|
-
The plugin's own data directory, `~/.dsh/dsh-wtq-pool/` (or `$DSH_HOME` when set), holds
|
|
172
|
+
The plugin's own data directory, `~/.dsh/dsh-wtq-pool/` (or `$DSH_HOME` when set), holds four files (a `deleted-signins.json.lock` appears for a moment while the delete record is written). `checkin-slots.json` records the check-in slots already collected and the pending Qoder retry time; slots are 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. `deleted-signins.json` records deleted sign-ins as a token digest, the sign-in's issue time and a delete time, so a scan cannot take the same superseded snapshot back over from the desktop app; the entry lapses once that account signs in again.
|
|
175
173
|
|
|
176
|
-
|
|
174
|
+
Every sign-in the plugin writes lives in `signins/` beside it: ones added from the panel, snapshots adopted from the desktop app, and renewed copies. Each file is 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, and the snapshot the desktop app left behind stops being adopted; signing the account in again brings it back. "Remove" only disables the account, and "Removed accounts" restores it.
|
|
177
175
|
|
|
178
|
-
|
|
176
|
+
The plugin sends requests only to the vendor endpoints; panel links open only when clicked.
|
|
179
177
|
|
|
180
178
|
Tokens go only to the hosts below:
|
|
181
179
|
|
package/README.md
CHANGED
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
|
|
38
38
|
把本机 WorkBuddy、Trae、Qoder 的桌面登录接入 DeepSeek Harness。WorkBuddy 在账号被限流或额度用尽时自动换号;Trae、Qoder 按请求选择账号,认证失败、限流或余额耗尽时改用下一个登录重试,模型不存在、请求体非法这类请求自身的问题则按上游原样返回。三个来源各自开关,国内与国际账号分别成组。
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
限流按上游给出的等待时间冷却,上游未给出时按配置的窗口。额度用尽与登录失效不会自行恢复,账号退出轮换:额度用尽的挂起在余额重新读到后释放,登录失效的挂起在刷新成功、重新登录或手动重置冷却后释放,两者都在六小时后(WorkBuddy 侧)到期。积分、签到状态、模型目录与手动签到这些非流式读取遇到登录失效,会先强制刷新令牌并重试一次:刷新令牌还有效的账号当场恢复,不退出轮换;刷新令牌同样失效的才挂起。Trae、Qoder 的失败挂起另计:只按冷却窗口(默认 60 秒,最长可配到 24 小时)或上游给出的等待时间降权,池中只剩它一个时仍会使用。上游主机不可达时结束本轮并报告网络错误。上游判定账号套餐不含某模型(11158)时,该账号的这个模型停用 24 小时,其他模型照常服务;全部账号都不含该模型时按 400 返回。
|
|
41
41
|
|
|
42
42
|
## 预览
|
|
43
43
|
|
|
@@ -49,17 +49,17 @@
|
|
|
49
49
|
|
|
50
50
|

|
|
51
51
|
|
|
52
|
-
|
|
52
|
+
模型页编辑每个模型的显示与发布参数。Trae 目录给出的默认窗口因模型而异(116k 至 400k);未声明更大档位的模型,本插件按实测可用的 1M 发布上限。Trae 目录给出费率的模型带 `x0.79` 形式的费率标签;目录未给出费率的模型以及全部 Qoder 模型均不标注:
|
|
53
53
|
|
|
54
54
|

|
|
55
55
|
|
|
56
|
-
|
|
56
|
+
成长中心:
|
|
57
57
|
|
|
58
58
|

|
|
59
59
|
|
|
60
60
|
在线预览:<https://chengzhi-c.github.io/dsh-wtq-pool/>。
|
|
61
61
|
|
|
62
|
-
`docs/index.html`
|
|
62
|
+
`docs/index.html` 以虚构演示数据加载实际面板代码,支持来源切换、模型设置与主题预览。
|
|
63
63
|
|
|
64
64
|

|
|
65
65
|
|
|
@@ -71,14 +71,15 @@
|
|
|
71
71
|
|
|
72
72
|
## 功能
|
|
73
73
|
|
|
74
|
-
-
|
|
74
|
+
- 复用本机登录:读取三家桌面 App 已保存的登录文件。面板的「添加账号」打开厂商官方登录页,并把登录写入插件自管目录。
|
|
75
75
|
- 按 region 注册模型分组:三家厂商各自的 region 各注册为一个 provider,可同时启用;没有账号的 region 不注册。国内模型只走国内账号,国际版模型只走国际账号。
|
|
76
76
|
- 账号分发:WorkBuddy 支持先用一个账号、轮流使用、临期积分优先和同一对话固定一个账号,并在限流或额度用尽时自动换号;Trae、Qoder 支持优先使用、轮流使用与临期积分优先,认证失败、限流或余额耗尽时改用下一个登录重试。
|
|
77
|
-
-
|
|
78
|
-
-
|
|
79
|
-
-
|
|
80
|
-
-
|
|
81
|
-
-
|
|
77
|
+
- 网关以 SSE 返回 `chat.completion.chunk`;请求体里的 `stream` 字段不改变响应格式。
|
|
78
|
+
- 积分自动化:自动签到默认关闭。开启后的定时任务与「立即运行」执行同一轮,包含三家签到、WorkBuddy 的连登奖励和猫猫旅行。连登天数由上游按对话推进,该轮在每个账号读取连登档位前先补发一次对话活动上报,因此档位到点即可解锁领取,用户无需再进 WorkBuddy 发一句消息。连登环节还会在昨日漏签且持有补签卡时自动补签以保住连续天数,领取一次性的新手礼包与活动补偿,并在兑换解锁的档位后把由此获得的抽奖次数抽完。这些成长步骤国内版与国际版都执行;猫猫旅行只跑国内账号,国际版没有对应接口。
|
|
79
|
+
- 登录令牌保活:独立卡片,按需执行。桌面端留下的登录快照在扫描时并入插件自己的登录目录,由插件接管续期;桌面端正在使用的登录由桌面端续期。「立即刷新」处理插件自管的副本,按签发时间判断:签发满 6 小时的刷新,距到期不足 5 分钟的同样刷新。刷新结果写回插件自己的登录文件,登录被上游拒绝时当天即可发现。同一账号在多处留有登录时按签发时间取最新的一份。停用账号、已停用的 region 与登录已被上游拒绝的账号不参与。
|
|
80
|
+
- 输入框积分:开启 `showComposerPoints` 后,输入框工具栏显示当前模型所用账号的余额,点开可换号。功能关闭后浮层隐藏,读数降为每 5 分钟一次,重新开启后无需切换模型即可恢复。
|
|
81
|
+
- 面板:账号与池状态、模型勾选、连接检查、成长中心都在插件页的「账号池」卡片内。模型目录在启动时加载,缓存过期后按需刷新,空闲时不轮询。停用的账号与登录已被上游拒绝的账号不参与探测。
|
|
82
|
+
- 连接检查:每条发现都带判定。网关没有监听、模型目录读取失败、发布的地址与实际绑定的不一致、provider 未被宿主接受,都算失败并给出需要修改的内容。网关启动失败时给出原因,面板按地址漂移提示重新加载插件。检查自身出错也记一条发现,报告照常给出其余结果。
|
|
82
83
|
|
|
83
84
|
## 安装
|
|
84
85
|
|
|
@@ -91,15 +92,17 @@ dsh plugin --profile desktop add $package
|
|
|
91
92
|
|
|
92
93
|
需要 DeepSeek Harness 0.2.0 线(`package.json` 的 `engines.dsh`:`>=0.2.0-rc.1 <0.2.1`)与 Node `^22.19.0 || >=24.0.0`。
|
|
93
94
|
|
|
95
|
+
> 从 1.1.x 升级到 1.2.0 后,模型提供商 ID 改为 `wtqpool-*`,请在模型选择里重新选一次。
|
|
96
|
+
|
|
94
97
|
请将 `desktop` 替换为实际使用的 profile 名。若 `dsh` 不在 `PATH` 中,改用安装目录中的 CLI。也可按 npm 包名 `dsh-wtq-pool` 或仓库地址安装;按仓库地址安装时 pnpm 会通过 `prepare` 脚本从源码构建,需要在 profile 的 `pnpm-workspace.yaml` 中写入 `allowBuilds: dsh-wtq-pool: true`,并固定在某个 commit 上。
|
|
95
98
|
|
|
96
99
|
**面板位置**:在侧边栏进入 **插件**,打开 **dsh-wtq-pool** 卡片(或其旁的 **配置**),完整面板嵌在该卡片内。模型分组未出现时,按面板顶部的提示重新加载插件。
|
|
97
100
|
|
|
98
101
|
## 使用
|
|
99
102
|
|
|
100
|
-
在各家桌面 App 中登录,再点面板的「重新检测账号」。WorkBuddy
|
|
103
|
+
在各家桌面 App 中登录,再点面板的「重新检测账号」。WorkBuddy 支持读取多个已保存的登录,需要多个账号就在 App 里逐个登录;5.6 起的 `$wbEncrypted` 登录由插件向本机已安装的 WorkBuddy 索取密钥后读取。Trae 国内版有 Trae CN 与 TRAE SOLO CN 两个登录位;Qoder 每个安装只保存一个登录,在 App 里重新登录会覆盖前一个。WorkBuddy 国际版只有一个登录文件,切换账号会直接覆盖上一个。插件在扫描时为被覆盖的登录留档,该账号照常参与分发,直到它的令牌到期;在 App 里重新登录即可续期。
|
|
101
104
|
|
|
102
|
-
没有桌面 App 也可以添加账号:面板 WorkBuddy 标题栏的「添加账号」在新标签页中打开官方登录页,登录完成后该账号即加入账号池。凭证写在插件自管目录的 `signins/`
|
|
105
|
+
没有桌面 App 也可以添加账号:面板 WorkBuddy 标题栏的「添加账号」在新标签页中打开官方登录页,登录完成后该账号即加入账号池。凭证写在插件自管目录的 `signins/` 下,与桌面登录同等参与分发。这类账号在面板上另有「删除」,按两次确认;删除范围见「数据」一节。桌面端正在登录的账号不给删除,那份会话属于桌面端。添加的账号属于当前选中的 region,国内版登国内号,国际版登国际号。
|
|
103
106
|
|
|
104
107
|
迁移其他工具留下的账号,直接向该目录写入文件即可:`signins/` 本身就是导入导出格式,放入一份以 `.info` 结尾的 `{auth, account}` 登录文件,下次扫描即作为一个普通账号。仓库中的 `tools/import-signins.cjs` 读取其他工具留下的账号文件(`--from` 接受文件或目录),按本插件识别的形状写入 `signins/`,默认跳过本插件数据目录里已有的账号,`--dry-run` 先查看,`--force` 才覆盖:
|
|
105
108
|
|
|
@@ -107,28 +110,24 @@ dsh plugin --profile desktop add $package
|
|
|
107
110
|
node tools/import-signins.cjs --data <插件数据目录> --from <账号文件或目录> [--region cn|global|all] [--dry-run] [--force]
|
|
108
111
|
```
|
|
109
112
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
顶层选来源,其下为账号池、模型、连接检查与成长中心四个页签。
|
|
113
|
+
需要备份时直接复制 `signins/` 目录,它已经是备份应有的格式;这些文件持有完整可用的令牌,其权能与账号本身相同。
|
|
113
114
|
|
|
114
|
-
- **账号池**:每个账号的标签、剩余积分、额度到期时间、冷却状态与签到进度。可单独停用某个账号、将其移除,或指定某个 region
|
|
115
|
+
- **账号池**:每个账号的标签、剩余积分、额度到期时间、冷却状态与签到进度。可单独停用某个账号、将其移除,或指定某个 region 优先使用哪个账号。登录被上游拒绝的账号另显示「需重新登录」徽标、拒绝原因与「暂停至」时间,挂起期间积分与签到留空。被上游判定异常使用的账号另显示「已限制」徽标与「被上游限制,直至」时间,六小时重试一次,需要到官方后台申诉。
|
|
115
116
|
- **模型**:勾选该 region 要暴露的模型,未勾选的模型不进入模型选择器。可修改显示名、上下文窗口、输出上限、思考等级与贴图支持。一个模型组最多发布 64 个模型,超出部分标记为「未发布」,网关仍会服务它们。
|
|
116
117
|
- **连接检查**:逐条报告网关是否监听、模型目录读到几个、注册的地址与实际绑定的是否一致、每个 provider 是否被宿主接受,并可复制整份报告。
|
|
117
|
-
- **成长中心**:仅对 WorkBuddy
|
|
118
|
-
|
|
119
|
-
签到可对单个账号执行,也可在标题栏一次领完该来源。自动签到默认关闭,开启后默认于 09:00(北京时间)执行;当天错过的时段在当天内的下一次启动仍会补领,跨天则不补。Trae 的每日签到每台设备限领一次;Qoder 的新一轮于每天 10:00(北京时间)开放。
|
|
118
|
+
- **成长中心**:仅对 WorkBuddy 生效。页面按账号逐行列出,展开一行可见该账号的连登档位。「读取状态」读取当前档位与可领取项;「立即执行」产生领取并执行成长环节,按步骤报告结果。登录被上游拒绝的账号在该轮被跳过。
|
|
120
119
|
|
|
121
|
-
|
|
120
|
+
签到可对单个账号执行,也可在标题栏一次领完该来源。自动签到默认关闭,开启后默认于 09:00(北京时间)执行;当天错过的时段在当天内的下一次启动仍会补领,跨天则不补。Trae 的每日签到每台设备限领一次;Qoder 的新一轮于每天 10:00(北京时间)开放。登录被上游拒绝的账号在该轮被跳过。
|
|
122
121
|
|
|
123
|
-
|
|
122
|
+
WorkBuddy 国内版上游会拒绝「客户端身份写着 DeepSeek Harness」的对话请求(返回 11128,渠道校验未通过)。插件遇到这条拒绝时,会把系统消息并入首条用户消息并重试一次;助手历史里的客户端名称也会移除,因为渠道校验同样读取助手消息。通过的提示按 region 记住,同一段提示之后不再重复这次往返。签到、成长中心与保活走各自的接口。
|
|
124
123
|
|
|
125
|
-
|
|
124
|
+
「立即刷新」的结果按刷新、已是最新、失败、无刷新令牌分项报告。
|
|
126
125
|
|
|
127
|
-
|
|
126
|
+
读取结果留在宿主进程内:重新载入面板仍显示上次的数字。读数超过两分钟、之后又跑过一轮,或某个 region 被停用时,进入页签会重读。
|
|
128
127
|
|
|
129
128
|
## 设置
|
|
130
129
|
|
|
131
|
-
|
|
130
|
+
以下键在插件页或 DSH 的设置页修改,保存后生效:
|
|
132
131
|
|
|
133
132
|
| 键 | 默认(生效值) | 说明 |
|
|
134
133
|
| --- | --- | --- |
|
|
@@ -136,12 +135,11 @@ WorkBuddy 国内版上游会拒绝「客户端身份写着 DeepSeek Harness」
|
|
|
136
135
|
| `sourceWorkbuddy` / `sourceTrae` / `sourceQoder` | `true` | 关闭后该来源不扫描、不发布、不请求 |
|
|
137
136
|
| `distribution` | `priority` | WorkBuddy 池的发放方式:`priority` 先用一个账号,`round-robin` 均摊,`expiry` 优先消耗临期积分,`sticky` 同一对话固定 |
|
|
138
137
|
| `sourceDistributions` | `{}` | Trae、Qoder 的分发方式:`priority` / `round-robin` / `expiry`;未设时按 `priority` |
|
|
139
|
-
| `cooldownSeconds` | `60` | 限流冷却时长。上游报出重置时间时以它为准;没有重置时间时,连续限流会让它逐次翻倍,封顶 15 分钟(窗口本身超过 15
|
|
138
|
+
| `cooldownSeconds` | `60` | 限流冷却时长。上游报出重置时间时以它为准;没有重置时间时,连续限流会让它逐次翻倍,封顶 15 分钟(窗口本身超过 15 分钟时不再翻倍)。上游给出的重置时间最长按 2 小时计;余额耗尽或登录被上游拒绝另按 6 小时停用 |
|
|
140
139
|
| `creditReserves` | `{}` | 按账号 id 设定的积分保底,余额不高于它的账号不参与分发 |
|
|
141
140
|
| `authFile` | `""` | WorkBuddy 登录文件路径;扫描其所在目录的全部 `.info` 登录,留空则自动发现 |
|
|
142
141
|
| `autoCheckin` | `{"enabled":false,"hours":[9]}` | 自动签到的开关与时点;`hours` 为北京时间整点,留空用 09:00 |
|
|
143
142
|
| `showComposerPoints` | `false` | 在输入框工具栏显示当前账号积分 |
|
|
144
|
-
| `rewriteClientName` | `false` | 发往国内版的提示词里把客户端名称 `DeepSeek Harness` 改为 `DeepSeek`,供渠道校验(11128)通过;国际版不受影响 |
|
|
145
143
|
| `disabledAccountIds` | `[]` | 面板中停用的账号 id |
|
|
146
144
|
| `disabledRegions` | `[]` | 单独停用的 region,形如 `source:region` |
|
|
147
145
|
| `modelSelection` | `{}` | 每个网关勾选哪些模型,以及显示名、上下文窗口等覆写 |
|
|
@@ -163,19 +161,19 @@ Qoder 42871 / 42881
|
|
|
163
161
|
|
|
164
162
|
以上为首选端口。端口被占用时网关绑定系统分配的临时端口,运行时注册的 provider 使用本次实际地址,面板显示回退结果。
|
|
165
163
|
|
|
166
|
-
PI-Desktop 版使用 41831
|
|
164
|
+
PI-Desktop 版使用 41831 开头的另一段端口,两个插件可以同时安装在同一台机器上,两套端口各自正确。两版各自保留一份登录并各自续期,上游在续期时轮换刷新令牌,因此同一账号只会被先续期的那一版持有:另一版手上的刷新令牌随之失效,面板会把它标成「需重新登录」,用「添加账号」补一次即可。签名天数因此也会一边一个样,那是两份登录各自的到期时间。想让同一账号两版都能用,就只在其中一版里添加,或在被标出的那一版重新添加。
|
|
167
165
|
|
|
168
166
|
端口在预留与监听之间被其他进程占用时,该网关本次启动失败:其模型组被摘掉,连接检查报出失败原因,面板提示重新加载插件。重新加载后宿主重新读取声明,请求才会落到新地址。
|
|
169
167
|
|
|
170
168
|
## 数据与出网
|
|
171
169
|
|
|
172
|
-
|
|
170
|
+
读取三家 App 的本机登录文件。provider 通过运行时注册接入,插件设置由宿主持久化至 profile。令牌由插件保管,只发往对应厂商的接口。网关监听 `127.0.0.1`,面板只接受本机回环请求。
|
|
173
171
|
|
|
174
|
-
插件自管数据目录 `~/.dsh/dsh-wtq-pool/`(设置了 `DSH_HOME`
|
|
172
|
+
插件自管数据目录 `~/.dsh/dsh-wtq-pool/`(设置了 `DSH_HOME` 时改用它)包含四个文件(写删除记录时会短暂多一个 `deleted-signins.json.lock`)。`checkin-slots.json` 记录已领取的签到时段和待重试的 Qoder 时点,时段只保留三天。`doctor.txt` 是最近一次连接检查的报告,逐项记录通过与否,不含账号名称。`credentials-archive.json` 留存被切号覆盖的登录,含访问令牌;按令牌到期时间保留,到期后再过 30 天清除。`deleted-signins.json` 记录已删除的登录,只存令牌摘要、该登录的签发时间与删除时间,用来阻止扫描把桌面端遗留的同一份快照重新接管回来;同一个账号重新登录后(签发时间更新)该记录自动失效。
|
|
175
173
|
|
|
176
|
-
|
|
174
|
+
插件写入的登录都在同目录的 `signins/`:面板添加的、接管桌面端快照的、续期后的副本。文件名带账号的计费身份,与桌面登录同等参与分发。在面板中「删除」该账号会连同 `credentials-archive.json` 里的留档一起清除,桌面端遗留的同一份快照随之失效;重新登录该账号即解除。「移除」只是停用,可在「已移除的账号」中恢复。
|
|
177
175
|
|
|
178
|
-
|
|
176
|
+
插件只向三家厂商的接口发起请求;面板外链仅在用户点击时打开。
|
|
179
177
|
|
|
180
178
|
令牌只会发往以下主机:
|
|
181
179
|
|