dsh-wtq-pool 1.2.0 → 1.2.1

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 CHANGED
@@ -1,5 +1,14 @@
1
1
  # 更新说明
2
2
 
3
+ ## [1.2.1]
4
+
5
+ - 签到:单账号与批量领取后立即更新账号卡片;已领取的回执按已签到处理,单账号签到遇到当日已领取时直接显示成功;已领取的活动不再遮住其后可领取的轮次;过期登录在批量签到前跳过;Trae 设备签到当天用完后,同批剩余同版本账号标记为跳过;国际版不显示签到入口与说明。
6
+ - 网关:WorkBuddy 轮换尝试数覆盖整个账号池;传输失败与首字节前断流换号,最多重试一次;空 200 流同样换号;流内失败保留上游原因与等待时间,耗尽时返回 `Retry-After`;WAF 页面不再按额度耗尽处理。
7
+ - Qoder:只含 role 或 usage 的帧不再被当作已输出,随后的失败帧仍会触发换号;嵌套错误不覆盖外层可读原因,但嵌套的等待时间与失败类别仍会被读取;错误响应体读取有上限。
8
+ - 安全:WorkBuddy 标准安装路径、环境变量指定的可执行文件与注册表扫描结果都必须通过 Authenticode 校验;注册表扫描不访问 UNC 或相对路径。
9
+ - 隐私:日志中的账号标签改为短哈希,令牌、路径与邮箱在写入前统一脱敏;面板登录只打开 https 链接。
10
+ - 面板:初始语言跟随宿主;全部账号停用时健康点不再显示正常;键盘操作后焦点回到原控件;账号控件与模型字段提供可访问名称,签到按钮的名称与可见文字一致;成长记录按最新一次运行显示;登录过期后签到按钮不可点;批量签到结束后清除进行中提示;Qoder 时间标注北京时间;深色删除确认按钮对比度修正。
11
+
3
12
  ## [1.2.0]
4
13
 
5
14
  - 品牌:模型提供商 ID 由 `xdpool-*` 改为 `wtqpool-*`;升级后模型选择需要重新选一次。
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, 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.
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, that account is skipped for the request and the next one is tried; after two accounts fail that way, 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,7 +49,7 @@ The panel reads the host's `app.getAppearance()` when it loads, which fixes its
49
49
 
50
50
  ![Dark theme](https://github.com/chengzhi-c/dsh-wtq-pool/raw/main/docs/preview-dark.png)
51
51
 
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:
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 a 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
  ![Model settings](https://github.com/chengzhi-c/dsh-wtq-pool/raw/main/docs/preview-models.png)
55
55
 
@@ -63,10 +63,6 @@ Live preview: <https://chengzhi-c.github.io/dsh-wtq-pool/>.
63
63
 
64
64
  ![Preview page](https://github.com/chengzhi-c/dsh-wtq-pool/raw/main/docs/preview-page.png)
65
65
 
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:
67
-
68
- ![Composer credits](https://github.com/chengzhi-c/dsh-wtq-pool/raw/main/docs/preview-composer.png)
69
-
70
66
  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.
71
67
 
72
68
  ## Features
@@ -83,7 +79,16 @@ To run the preview locally, clone the repository, run `node docs/serve.cjs`, and
83
79
 
84
80
  ## Install
85
81
 
86
- For a local package, run `pnpm install && pnpm run build && npm pack --pack-destination dist` in the source directory, then install the generated `.tgz`:
82
+ For a local package, run these in the source directory:
83
+
84
+ ```powershell
85
+ pnpm install
86
+ pnpm run build
87
+ New-Item -ItemType Directory -Force dist | Out-Null
88
+ npm pack --pack-destination dist
89
+ ```
90
+
91
+ Then install the generated `.tgz`:
87
92
 
88
93
  ```powershell
89
94
  $package = (Get-ChildItem .\dist\*.tgz | Sort-Object LastWriteTime | Select-Object -Last 1).FullName
@@ -117,7 +122,7 @@ To back them up, copy the `signins/` directory, which already has the format a b
117
122
  - **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.
118
123
  - **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.
119
124
 
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.
125
+ 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 CN's new round opens at 10:00 (Beijing time). The international WorkBuddy, Trae and Qoder services have no daily check-in, and the panel shows no check-in entry for them. An account whose sign-in the upstream refused is skipped in that round.
121
126
 
122
127
  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.
123
128
 
@@ -169,9 +174,9 @@ The PI-Desktop edition uses a separate range starting at 41831, so both plugins
169
174
 
170
175
  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.
171
176
 
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.
177
+ 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 lists no account label. `credentials-archive.json` keeps the sign-ins a later account switch overwrote: access and refresh tokens, account identifiers (nickname, uin/uid, enterprise id) and the local sign-in path. Entries are kept by token expiry, dropping each 30 days after it; an entry with no stated expiry is kept until the account is deleted. `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. These files carry no additional encryption; access is bounded by the operating system's file ACLs.
173
178
 
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.
179
+ 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. These files are not additionally encrypted either; access is bounded by the operating system's file ACLs. "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.
175
180
 
176
181
  The plugin sends requests only to the vendor endpoints; panel links open only when clicked.
177
182
 
package/README.md CHANGED
@@ -37,7 +37,7 @@
37
37
 
38
38
  把本机 WorkBuddy、Trae、Qoder 的桌面登录接入 DeepSeek Harness。WorkBuddy 在账号被限流或额度用尽时自动换号;Trae、Qoder 按请求选择账号,认证失败、限流或余额耗尽时改用下一个登录重试,模型不存在、请求体非法这类请求自身的问题则按上游原样返回。三个来源各自开关,国内与国际账号分别成组。
39
39
 
40
- 限流按上游给出的等待时间冷却,上游未给出时按配置的窗口。额度用尽与登录失效不会自行恢复,账号退出轮换:额度用尽的挂起在余额重新读到后释放,登录失效的挂起在刷新成功、重新登录或手动重置冷却后释放,两者都在六小时后(WorkBuddy 侧)到期。积分、签到状态、模型目录与手动签到这些非流式读取遇到登录失效,会先强制刷新令牌并重试一次:刷新令牌还有效的账号当场恢复,不退出轮换;刷新令牌同样失效的才挂起。Trae、Qoder 的失败挂起另计:只按冷却窗口(默认 60 秒,最长可配到 24 小时)或上游给出的等待时间降权,池中只剩它一个时仍会使用。上游主机不可达时结束本轮并报告网络错误。上游判定账号套餐不含某模型(11158)时,该账号的这个模型停用 24 小时,其他模型照常服务;全部账号都不含该模型时按 400 返回。
40
+ 限流按上游给出的等待时间冷却,上游未给出时按配置的窗口。额度用尽与登录失效不会自行恢复,账号退出轮换:额度用尽的挂起在余额重新读到后释放,登录失效的挂起在刷新成功、重新登录或手动重置冷却后释放,两者都在六小时后(WorkBuddy 侧)到期。积分、签到状态、模型目录与手动签到这些非流式读取遇到登录失效,会先强制刷新令牌并重试一次:刷新令牌还有效的账号当场恢复,不退出轮换;刷新令牌同样失效的才挂起。Trae、Qoder 的失败挂起另计:只按冷却窗口(默认 60 秒,最长可配到 24 小时)或上游给出的等待时间降权,池中只剩它一个时仍会使用。上游主机不可达时跳过该账号并尝试下一个;连续两个账号都不可达时结束本轮并报告网络错误。上游判定账号套餐不含某模型(11158)时,该账号的这个模型停用 24 小时,其他模型照常服务;全部账号都不含该模型时按 400 返回。
41
41
 
42
42
  ## 预览
43
43
 
@@ -49,7 +49,7 @@
49
49
 
50
50
  ![暗色主题](https://github.com/chengzhi-c/dsh-wtq-pool/raw/main/docs/preview-dark.png)
51
51
 
52
- 模型页编辑每个模型的显示与发布参数。Trae 目录给出的默认窗口因模型而异(116k 至 400k);未声明更大档位的模型,本插件按实测可用的 1M 发布上限。Trae 目录给出费率的模型带 `x0.79` 形式的费率标签;目录未给出费率的模型以及全部 Qoder 模型均不标注:
52
+ 模型页编辑每个模型的显示与发布参数。Trae 目录给出的默认窗口因模型而异(116k 至 400k);未声明更大档位的模型,按 1M 发布上限。Trae 目录给出费率的模型带 `x0.79` 形式的费率标签;目录未给出费率的模型以及全部 Qoder 模型均不标注:
53
53
 
54
54
  ![模型设置](https://github.com/chengzhi-c/dsh-wtq-pool/raw/main/docs/preview-models.png)
55
55
 
@@ -63,10 +63,6 @@
63
63
 
64
64
  ![预览页](https://github.com/chengzhi-c/dsh-wtq-pool/raw/main/docs/preview-page.png)
65
65
 
66
- 开启 `showComposerPoints` 后,输入框工具栏显示当前模型所用账号的积分,点击可查看该组账号并切换。下图为实际输入框扩展的离屏渲染:
67
-
68
- ![输入框积分](https://github.com/chengzhi-c/dsh-wtq-pool/raw/main/docs/preview-composer.png)
69
-
70
66
  本地预览需先克隆仓库,运行 `node docs/serve.cjs`,再打开它输出的地址。该页面不能用 `file://` 打开,因为浏览器不允许它读取同目录下的面板文件。
71
67
 
72
68
  ## 功能
@@ -83,7 +79,16 @@
83
79
 
84
80
  ## 安装
85
81
 
86
- 本地包:在源码目录执行 `pnpm install && pnpm run build && npm pack --pack-destination dist`,再安装生成的 `.tgz`:
82
+ 本地包:在源码目录依次执行:
83
+
84
+ ```powershell
85
+ pnpm install
86
+ pnpm run build
87
+ New-Item -ItemType Directory -Force dist | Out-Null
88
+ npm pack --pack-destination dist
89
+ ```
90
+
91
+ 再安装生成的 `.tgz`:
87
92
 
88
93
  ```powershell
89
94
  $package = (Get-ChildItem .\dist\*.tgz | Sort-Object LastWriteTime | Select-Object -Last 1).FullName
@@ -117,7 +122,7 @@ node tools/import-signins.cjs --data <插件数据目录> --from <账号文件
117
122
  - **连接检查**:逐条报告网关是否监听、模型目录读到几个、注册的地址与实际绑定的是否一致、每个 provider 是否被宿主接受,并可复制整份报告。
118
123
  - **成长中心**:仅对 WorkBuddy 生效。页面按账号逐行列出,展开一行可见该账号的连登档位。「读取状态」读取当前档位与可领取项;「立即执行」产生领取并执行成长环节,按步骤报告结果。登录被上游拒绝的账号在该轮被跳过。
119
124
 
120
- 签到可对单个账号执行,也可在标题栏一次领完该来源。自动签到默认关闭,开启后默认于 09:00(北京时间)执行;当天错过的时段在当天内的下一次启动仍会补领,跨天则不补。Trae 的每日签到每台设备限领一次;Qoder 的新一轮于每天 10:00(北京时间)开放。登录被上游拒绝的账号在该轮被跳过。
125
+ 签到可对单个账号执行,也可在标题栏一次领完该来源。自动签到默认关闭,开启后默认于 09:00(北京时间)执行;当天错过的时段在当天内的下一次启动仍会补领,跨天则不补。Trae 的每日签到每台设备限领一次;Qoder 国内版的新一轮于每天 10:00(北京时间)开放。WorkBuddy、Trae、Qoder 的国际版没有每日签到,面板不显示签到入口。登录被上游拒绝的账号在该轮被跳过。
121
126
 
122
127
  WorkBuddy 国内版上游会拒绝「客户端身份写着 DeepSeek Harness」的对话请求(返回 11128,渠道校验未通过)。插件遇到这条拒绝时,会把系统消息并入首条用户消息并重试一次;助手历史里的客户端名称也会移除,因为渠道校验同样读取助手消息。通过的提示按 region 记住,同一段提示之后不再重复这次往返。签到、成长中心与保活走各自的接口。
123
128
 
@@ -169,9 +174,9 @@ PI-Desktop 版使用 41831 开头的另一段端口,两个插件可以同时
169
174
 
170
175
  读取三家 App 的本机登录文件。provider 通过运行时注册接入,插件设置由宿主持久化至 profile。令牌由插件保管,只发往对应厂商的接口。网关监听 `127.0.0.1`,面板只接受本机回环请求。
171
176
 
172
- 插件自管数据目录 `~/.dsh/dsh-wtq-pool/`(设置了 `DSH_HOME` 时改用它)包含四个文件(写删除记录时会短暂多一个 `deleted-signins.json.lock`)。`checkin-slots.json` 记录已领取的签到时段和待重试的 Qoder 时点,时段只保留三天。`doctor.txt` 是最近一次连接检查的报告,逐项记录通过与否,不含账号名称。`credentials-archive.json` 留存被切号覆盖的登录,含访问令牌;按令牌到期时间保留,到期后再过 30 天清除。`deleted-signins.json` 记录已删除的登录,只存令牌摘要、该登录的签发时间与删除时间,用来阻止扫描把桌面端遗留的同一份快照重新接管回来;同一个账号重新登录后(签发时间更新)该记录自动失效。
177
+ 插件自管数据目录 `~/.dsh/dsh-wtq-pool/`(设置了 `DSH_HOME` 时改用它)包含四个文件(写删除记录时会短暂多一个 `deleted-signins.json.lock`)。`checkin-slots.json` 记录已领取的签到时段和待重试的 Qoder 时点,时段只保留三天。`doctor.txt` 是最近一次连接检查的报告,逐项记录通过与否,不列账号标签。`credentials-archive.json` 留存被切号覆盖的登录,含访问令牌、刷新令牌、账号标识(昵称、uin/uid、企业 ID)与本机登录文件路径;按令牌到期时间保留,到期后再过 30 天清除,没有到期时间的记录保留到该账号被删除。`deleted-signins.json` 记录已删除的登录,只存令牌摘要、该登录的签发时间与删除时间,用来阻止扫描把桌面端遗留的同一份快照重新接管回来;同一个账号重新登录后(签发时间更新)该记录自动失效。上述文件未额外加密,访问权限由操作系统文件 ACL 决定。
173
178
 
174
- 插件写入的登录都在同目录的 `signins/`:面板添加的、接管桌面端快照的、续期后的副本。文件名带账号的计费身份,与桌面登录同等参与分发。在面板中「删除」该账号会连同 `credentials-archive.json` 里的留档一起清除,桌面端遗留的同一份快照随之失效;重新登录该账号即解除。「移除」只是停用,可在「已移除的账号」中恢复。
179
+ 插件写入的登录都在同目录的 `signins/`:面板添加的、接管桌面端快照的、续期后的副本。文件名带账号的计费身份,与桌面登录同等参与分发。这些文件同样未额外加密,访问权限由操作系统文件 ACL 决定。在面板中「删除」该账号会连同 `credentials-archive.json` 里的留档一起清除,桌面端遗留的同一份快照随之失效;重新登录该账号即解除。「移除」只是停用,可在「已移除的账号」中恢复。
175
180
 
176
181
  插件只向三家厂商的接口发起请求;面板外链仅在用户点击时打开。
177
182