dsh-wtq-pool 1.3.0 → 1.3.6
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 +42 -0
- package/README.en.md +76 -142
- package/README.md +75 -143
- package/THIRD-PARTY-NOTICES.md +47 -0
- package/lib/client.js +7 -5
- package/lib/index.d.ts +1 -1
- package/lib/index.js +592 -348
- package/package.json +5 -2
- package/renderer/index.html +12 -12
- package/renderer/panel.js +119 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,47 @@
|
|
|
1
1
|
# 更新说明
|
|
2
2
|
|
|
3
|
+
## [1.3.6]
|
|
4
|
+
|
|
5
|
+
- 安全:数据目录按 0700、签到记录按 0600 创建。
|
|
6
|
+
- 隐私:说明请求携带厂商账号与设备标识(账号 UID、机器码、设备 ID)。
|
|
7
|
+
- 成长中心:执行超过宿主等待时间后,任务结束时按钮恢复可用。
|
|
8
|
+
- 自动签到:上一轮仍在进行时,按钮显示运行中并保持不可点,结束后恢复。
|
|
9
|
+
- 文档:精简 README。
|
|
10
|
+
|
|
11
|
+
## [1.3.5]
|
|
12
|
+
|
|
13
|
+
- 流式对话:收到 WorkBuddy、Trae、Qoder 的拒绝响应后及时关闭上游连接,避免换号或重试时遗留连接。
|
|
14
|
+
- WorkBuddy:扫描时从磁盘清除超过 30 天保留期的过期凭证归档。
|
|
15
|
+
- WorkBuddy:删除账号与重新登录同时进行时,保留新登录。
|
|
16
|
+
- 输入框积分:整轮刷新共用 15 秒等待上限,覆盖登录读取和账号查询。
|
|
17
|
+
- 面板:来源和区域选择器改用带状态的按钮组;页面标签支持方向键导航与 Enter/Space 激活。
|
|
18
|
+
|
|
19
|
+
## [1.3.4]
|
|
20
|
+
|
|
21
|
+
- 流式对话:宿主采集响应流时,上游拒绝请求可及时返回错误,避免等待响应流结束而卡住。
|
|
22
|
+
- 取消请求:停止生成或取消响应流时,同时关闭上游连接,释放宿主采集与网络资源。
|
|
23
|
+
|
|
24
|
+
## [1.3.3]
|
|
25
|
+
|
|
26
|
+
- Trae 对话:主路由失效后改用备用路由时,按备用路由的窗口启用 Max 模式,避免长对话被较小的默认窗口拒绝。
|
|
27
|
+
- Qoder:支持读取 macOS 国内版桌面登录。
|
|
28
|
+
- Trae 签到:设备 ID 迁移后同时存在数字设备号与非数字旧键时,使用唯一数字设备号,修复已签到仍显示可签到、领取返回 9074 的问题。
|
|
29
|
+
- Qoder:解密成功但登录内容缺少账号标识时,正确提示登录数据无效。
|
|
30
|
+
- 隐私:流式失败日志仅记录错误类别和 Trae 错误码;macOS 读取 Qoder 登录时需访问登录钥匙串。
|
|
31
|
+
|
|
32
|
+
## [1.3.1]
|
|
33
|
+
|
|
34
|
+
- 账号池:两个区域共用一个账号池时,轮流使用与同一对话固定账号的轮转位置按区域分开;跳过刷新失败的登录后仍会轮到每个账号,两个区域也不会重复落在同一个账号上。
|
|
35
|
+
- 输入框积分:已有会话中点击读数可以正常打开换号弹窗,滚动或缩放窗口时不再报错。
|
|
36
|
+
- 积分读数:额度耗尽的账号在冷却期间仍会读取余额,充值后下一次读取即可解除挂起,面板的刷新判断不再把它当作无需更新。
|
|
37
|
+
- 积分读数:手动刷新后按最新结果重新计时,未读到的余额不会等满五分钟;请求未返回时切换模型或提供商,弹窗不再停留在切换中。
|
|
38
|
+
- 换号:登录失效返回 200 且刷新令牌成功、会话仍然失效时,该账号挂起并改用下一个,不再反复刷新同一账号。
|
|
39
|
+
- 模型:Trae、Qoder 保存的默认思考等级会写入声明,选中该模型时按设置的等级发送,不再回落到目录默认值。
|
|
40
|
+
- 换号:上游主机不可达时,尚未失败的网关仍有尝试机会,不再因同域名的连续超时错过健康账号。
|
|
41
|
+
- 账号池:同一对话固定账号命中时刷新使用顺序,长时间对话不会因绑定上限被换到新账号;不同区域的同名对话不再共用绑定。
|
|
42
|
+
- 设置:写入与当前值相同时不再影响对宿主修改的判断,插件保存后宿主刚做的修改不再丢失。
|
|
43
|
+
- 面板:登录链接缺失时按界面语言提示,不再显示英文原文。
|
|
44
|
+
|
|
3
45
|
## [1.3.0]
|
|
4
46
|
|
|
5
47
|
- 账号池:升级前的停用、移除、保底与偏好设置按旧账号 ID 继续生效。
|
package/README.en.md
CHANGED
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
|
|
9
9
|
<h1 align="center">WTQ Pool</h1>
|
|
10
10
|
|
|
11
|
-
<p align="center"><sub>
|
|
11
|
+
<p align="center"><sub>DeepSeek Harness edition · <a href="https://github.com/chengzhi-c/pi-desktop-wtq-pool">PI-Desktop edition</a></sub></p>
|
|
12
12
|
|
|
13
|
-
<p align="center"><b>Use local WorkBuddy, Trae and Qoder sign-ins in DeepSeek Harness, with
|
|
13
|
+
<p align="center"><b>Use local WorkBuddy, Trae and Qoder sign-ins in DeepSeek Harness, with account failover based on each sign-in's state.</b></p>
|
|
14
14
|
|
|
15
15
|
<p align="center">
|
|
16
16
|
<b>English</b> | <a href="README.md">简体中文</a>
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
|
|
19
19
|
<p align="center">
|
|
20
20
|
<a href="#install">Install</a> ·
|
|
21
|
-
<a href="#features">Features</a> ·
|
|
22
21
|
<a href="#usage">Usage</a> ·
|
|
22
|
+
<a href="#features">Features</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>
|
|
@@ -27,205 +27,139 @@
|
|
|
27
27
|
|
|
28
28
|
<p align="center">
|
|
29
29
|
<a href="https://www.npmjs.com/package/dsh-wtq-pool"><img src="https://img.shields.io/npm/v/dsh-wtq-pool?style=flat-square&label=npm&color=cb3837" alt="npm version"></a>
|
|
30
|
-
<a href="https://www.npmjs.com/package/dsh-wtq-pool"><img src="https://img.shields.io/npm/d18m/dsh-wtq-pool?style=flat-square&label=downloads&color=cb3837" alt="npm downloads"></a>
|
|
31
30
|
<a href="LICENSE"><img src="https://img.shields.io/github/license/chengzhi-c/dsh-wtq-pool?style=flat-square" alt="MIT license"></a>
|
|
32
|
-
<a href="https://github.com/chengzhi-c/dsh-wtq-pool/releases"><img src="https://img.shields.io/github/v/release/chengzhi-c/dsh-wtq-pool?style=flat-square&label=release" alt="release"></a>
|
|
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
31
|
</p>
|
|
35
32
|
|
|
36
33
|
> This project is for learning use only. Unofficial clients may trigger account restrictions. Review the risks and the relevant service terms before use.
|
|
37
34
|
|
|
38
|
-
|
|
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, 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. A Trae sign-in expiry can arrive as one sentence with no error code; a frame matching the known wording is read as an expired sign-in and rotated past, and any other wording is answered as upstream failure with 502.
|
|
41
|
-
|
|
42
|
-
## Preview
|
|
43
|
-
|
|
44
|
-
The settings panel in its default light theme:
|
|
45
|
-
|
|
46
|
-

|
|
47
|
-
|
|
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:
|
|
49
|
-
|
|
50
|
-

|
|
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 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
|
-
|
|
54
|
-

|
|
35
|
+
Providers are registered separately by vendor and region. When an account is rate-limited, out of credits or signed out, requests fail over according to that source's rules.
|
|
55
36
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-

|
|
59
|
-
|
|
60
|
-
Live preview: <https://chengzhi-c.github.io/dsh-wtq-pool/>.
|
|
61
|
-
|
|
62
|
-
`docs/index.html` drives the actual panel code with synthetic demo data. It supports source switching, model settings and theme previews.
|
|
37
|
+
## Install
|
|
63
38
|
|
|
64
|
-
|
|
39
|
+
Supports DeepSeek Harness `0.2.0` and the `0.2.2` series, including prereleases allowed by `engines.dsh`. Requires Node `^22.19.0 || >=24.0.0`, as well as the Node version required by the host.
|
|
65
40
|
|
|
66
|
-
|
|
41
|
+
### Desktop app
|
|
67
42
|
|
|
68
|
-
|
|
43
|
+
On the **Plugins** page, select **Add plugin** → **Install third-party plugin**, enter `dsh-wtq-pool` and install, then enable the plugin.
|
|
69
44
|
|
|
70
|
-
|
|
71
|
-
- 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.
|
|
72
|
-
- Account distribution: WorkBuddy supports priority, round-robin, expiring credits first and conversation-sticky accounts, and fails over on a rate limit, exhausted quota or upstream 5xx. 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.
|
|
73
|
-
- Gateway responses are SSE streams of `chat.completion.chunk`; the `stream` field in the request body does not change the format.
|
|
74
|
-
- Credit automation: automatic check-in is off by default. When enabled, scheduled runs perform check-ins and WorkBuddy growth claims. Streak days advance through upstream conversations, so each pass posts one activity report per account before reading its tiers; a tier becomes claimable the moment it unlocks. A make-up card is spent only when yesterday is missing and a card is available. After streak tiers are claimed, available lottery draws are used. Cat travel is available only for domestic accounts.
|
|
75
|
-
- 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.
|
|
76
|
-
- Composer credits: with `showComposerPoints` on, the composer toolbar shows the balance of the account behind the current model; click it to switch accounts. In round-robin and conversation-sticky modes it names the account that serves next or served last. 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.
|
|
77
|
-
- 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.
|
|
78
|
-
- 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.
|
|
45
|
+
### CLI
|
|
79
46
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
For a local package, run these in the source directory:
|
|
47
|
+
Requires the DSH CLI (`@deepseek-ai/dsh`). The CLI manages non-desktop profiles such as `web` and `tui`; the `desktop` profile is reserved by the desktop app, so install there through its plugin page.
|
|
83
48
|
|
|
84
49
|
```powershell
|
|
85
|
-
|
|
86
|
-
pnpm run build
|
|
87
|
-
New-Item -ItemType Directory -Force dist | Out-Null
|
|
88
|
-
npm pack --pack-destination dist
|
|
50
|
+
dsh plugin --profile web add dsh-wtq-pool
|
|
89
51
|
```
|
|
90
52
|
|
|
91
|
-
|
|
53
|
+
`web` is the DSH profile; replace it with the profile you use. Open **dsh-wtq-pool** on the **Plugins** page. After upgrading from 1.1.x to 1.2.0, provider IDs changed to `wtqpool-*`; select your models again.
|
|
92
54
|
|
|
93
|
-
|
|
94
|
-
$package = (Get-ChildItem .\dist\*.tgz | Sort-Object LastWriteTime | Select-Object -Last 1).FullName
|
|
95
|
-
dsh plugin --profile desktop add $package
|
|
96
|
-
```
|
|
55
|
+
## Usage
|
|
97
56
|
|
|
98
|
-
|
|
57
|
+
Sign in to WorkBuddy, Trae or Qoder, then select **Detect accounts again**. WorkBuddy supports multiple sign-ins; domestic Trae reads Trae CN and TRAE SOLO CN separately. Each Qoder installation and the international WorkBuddy edition retain one sign-in, so switching accounts replaces it.
|
|
99
58
|
|
|
100
|
-
|
|
59
|
+
WorkBuddy 5.6+ `$wbEncrypted` sign-ins need a decryption key from the local WorkBuddy installation. On Windows, only signed installations with a supported key on a fixed local drive are used; decryption is skipped when the host runs elevated. On macOS, the local app is run to read the key without signature verification; root processes on macOS and Linux also skip decryption. Use a trusted installation.
|
|
101
60
|
|
|
102
|
-
|
|
61
|
+
### Add an account
|
|
103
62
|
|
|
104
|
-
|
|
63
|
+
Add one through the official sign-in page in the panel, or import an `.info` file containing `{auth, account}`. Run this from a source checkout:
|
|
105
64
|
|
|
106
|
-
|
|
65
|
+
```powershell
|
|
66
|
+
$dshHome = if ($env:DSH_HOME) { $env:DSH_HOME } else { Join-Path $HOME ".dsh" }
|
|
67
|
+
$pluginData = Join-Path $dshHome "dsh-wtq-pool"
|
|
68
|
+
$accountFile = Read-Host "Sign-in file path"
|
|
69
|
+
node .\tools\import-signins.cjs --data $pluginData --from $accountFile
|
|
70
|
+
```
|
|
107
71
|
|
|
108
|
-
|
|
72
|
+
Optional arguments: `--region cn|global|all`, `--dry-run`, `--force`.
|
|
109
73
|
|
|
110
|
-
|
|
74
|
+
Files in `signins/` contain usable access and refresh tokens; protect them like account passwords. Plugin-owned sign-ins can be deleted after a second confirmation; the desktop app's active sign-in cannot be deleted from the panel.
|
|
111
75
|
|
|
112
|
-
|
|
76
|
+
### Panel
|
|
113
77
|
|
|
114
|
-
|
|
78
|
+
**Account pool** manages sign-ins and account status. **Models** controls published models and display options; **Connection check** reports gateways, catalogues, addresses and host registration; **Growth centre** manages WorkBuddy rewards.
|
|
115
79
|
|
|
116
|
-
|
|
117
|
-
node tools/import-signins.cjs --data "<plugin data dir>" --from "<account file or directory>" [--region cn|global|all] [--dry-run] [--force]
|
|
118
|
-
```
|
|
80
|
+
Automatic check-in is off by default, defaults to 09:00 Beijing time and can be changed in the panel; check-in and **Run now** may claim rewards using make-up cards or lottery draws. Domestic Trae allows one check-in per device each day; Qoder commonly opens at 10:00 Beijing time.
|
|
119
81
|
|
|
120
|
-
|
|
82
|
+
**Refresh now** renews plugin-owned sign-ins issued at least six hours ago or expiring within five minutes; the desktop app renews its active sign-in.
|
|
121
83
|
|
|
122
|
-
|
|
123
|
-
- **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.
|
|
124
|
-
- **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.
|
|
125
|
-
- **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.
|
|
84
|
+
## Features
|
|
126
85
|
|
|
127
|
-
|
|
86
|
+
- Distribution: priority, round robin, expiring credits first and WorkBuddy conversation stickiness.
|
|
87
|
+
- Composer credits show and switch the active account's balance; when disabled, balances are read every five minutes.
|
|
88
|
+
- Each model group publishes up to 64 models; catalogues refresh on demand and gateways return SSE `chat.completion.chunk` responses.
|
|
128
89
|
|
|
129
|
-
|
|
90
|
+
### Failover and recovery
|
|
130
91
|
|
|
131
|
-
|
|
92
|
+
| Condition | Behaviour |
|
|
93
|
+
| --- | --- |
|
|
94
|
+
| Invalid request or Trae/Qoder model missing from the catalogue | Return 400 or 404 without sending a chat request |
|
|
95
|
+
| WorkBuddy rate limit, upstream 5xx or host unavailable | Try the next account; rate limits follow the upstream wait time or configured cooldown |
|
|
96
|
+
| WorkBuddy exhausted credits | Hold the account for up to six hours; a positive balance or manual cooldown reset releases the hold |
|
|
97
|
+
| WorkBuddy expired sign-in | Hold the account for up to six hours; successful refresh, a new sign-in or manual cooldown reset releases the hold |
|
|
98
|
+
| WorkBuddy plan excludes a model (11158) | Disable that model on the account for 24 hours; return 400 if no account supports it |
|
|
99
|
+
| Trae/Qoder authentication failure, rate limit, exhausted credits or empty response | Try the next sign-in and lower its priority for the cooldown; a sole sign-in is still used |
|
|
100
|
+
| Trae/Qoder upstream 5xx | Return the upstream failure |
|
|
132
101
|
|
|
133
|
-
|
|
102
|
+
Trae/Qoder cooldowns default to 60 seconds and can be set up to 24 hours. WorkBuddy refreshes once after an expired sign-in; domestic error 11128 retries once for the channel check without holding the account.
|
|
134
103
|
|
|
135
104
|
## Settings
|
|
136
105
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
| Key | Default (effective) | Meaning |
|
|
140
|
-
| --- | --- | --- |
|
|
141
|
-
| `enabled` | `true` | Off: the gateways do not start |
|
|
142
|
-
| `sourceWorkbuddy` / `sourceTrae` / `sourceQoder` | `true` | Off: that source is not scanned, published or requested |
|
|
143
|
-
| `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 |
|
|
144
|
-
| `sourceDistributions` | `{}` | Trae/Qoder distribution: `priority` / `round-robin` / `expiry`; unset behaves as `priority` |
|
|
145
|
-
| `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 |
|
|
146
|
-
| `creditReserves` | `{}` | Per-account credit floor, keyed by account id; an account at or below its floor is not distributed to |
|
|
147
|
-
| `authFile` | `""` | WorkBuddy sign-in file path; every `.info` sign-in in its directory is scanned. Empty discovers it |
|
|
148
|
-
| `autoCheckin` | `{"enabled":false,"hours":[9]}` | Automatic check-in switch and times; `hours` are Beijing-time hours, empty means 09:00 |
|
|
149
|
-
| `showComposerPoints` | `false` | Show the active account's credits in the composer |
|
|
150
|
-
| `disabledAccountIds` | `[]` | Account ids disabled in the panel |
|
|
151
|
-
| `disabledRegions` | `[]` | Regions disabled on their own, as `source:region` keys |
|
|
152
|
-
| `modelSelection` | `{}` | Which models each gateway publishes, plus display name, context window and other overrides |
|
|
153
|
-
| `preferredAccountIds` | `{}` | Preferred WorkBuddy account per region |
|
|
154
|
-
| `preferredSourceAccounts` | `{}` | Preferred Trae/Qoder account per region, keyed by `source:region` |
|
|
155
|
-
| `removedAccounts` | `[]` | Accounts removed from the pool, with label and region kept so the panel can offer a restore |
|
|
156
|
-
|
|
157
|
-
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.
|
|
158
|
-
|
|
159
|
-
Model selection and preferred accounts are saved by the panel.
|
|
106
|
+
Edit settings on the plugin page or DSH settings page: source switches, WorkBuddy distribution, cooldowns, automatic check-in and composer credits. Complete definitions and defaults are in the [settings source](https://github.com/chengzhi-c/dsh-wtq-pool/blob/main/src/index.ts).
|
|
160
107
|
|
|
161
108
|
## Ports
|
|
162
109
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
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.
|
|
170
|
-
|
|
171
|
-
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.
|
|
110
|
+
| Source | Domestic | International |
|
|
111
|
+
| --- | ---: | ---: |
|
|
112
|
+
| WorkBuddy | `42831` | `42841` |
|
|
113
|
+
| Trae | `42851` | `42861` |
|
|
114
|
+
| Qoder | `42871` | `42881` |
|
|
172
115
|
|
|
173
|
-
|
|
116
|
+
If a preferred port is occupied, the gateway uses an ephemeral port and runtime registration and the panel report the actual address; if a port is taken after reservation but before listening, that model group is not published. The PI-Desktop edition uses a separate range starting at `41831`; the editions keep settings and credentials separately, and sharing a WorkBuddy sign-in can let refresh-token rotation invalidate the other edition.
|
|
174
117
|
|
|
175
|
-
##
|
|
118
|
+
## Privacy and data
|
|
176
119
|
|
|
177
|
-
The plugin
|
|
120
|
+
The plugin sends conversation content to the selected vendor and does not save local chat history. Requests also carry the selected vendor's account and device identifiers (account uid, machine id, device id), as the vendor's own desktop client does. On macOS, reading a Qoder sign-in accesses the login Keychain and may prompt for access.
|
|
178
121
|
|
|
179
|
-
|
|
122
|
+
Gateways listen only on `127.0.0.1`, but local processes and OS users can still call them and spend account quota. Sign-in files and token archives have no additional encryption and rely on OS file permissions; restrict the plugin data directory ACL on Windows.
|
|
180
123
|
|
|
181
|
-
|
|
124
|
+
The data directory is `~/.dsh/dsh-wtq-pool/`, or `$DSH_HOME/dsh-wtq-pool/` when `DSH_HOME` is set. `signins/` and `credentials-archive.json` contain usable sign-in tokens; filenames may include billing identity. Archives remain for 30 days after the later recorded access or refresh expiry; records without an expiry are cleared when deleted.
|
|
182
125
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
Tokens go only to the hosts below:
|
|
126
|
+
Panel **Delete** removes a plugin-owned sign-in and its archive entry and prevents an old desktop snapshot from rejoining; **Remove** only excludes it from distribution. External links open on click; sign-in pages and token requests use only these vendor hosts:
|
|
186
127
|
|
|
187
128
|
- WorkBuddy: `copilot.tencent.com`, `www.codebuddy.cn`, `www.codebuddy.ai`, `www.workbuddy.ai`
|
|
188
129
|
- Trae: `api.trae.cn`, `solo.trae.cn`, `trae-api-cn.mchost.guru`, `coresg-normal.trae.ai`, `growsg-normal.trae.ai`
|
|
189
130
|
- Qoder: `gateway.qoder.com.cn`, `openapi.qoder.com.cn`, `api3.qoder.sh`, `openapi.qoder.sh`
|
|
190
131
|
|
|
132
|
+
## Preview
|
|
133
|
+
|
|
134
|
+

|
|
135
|
+
|
|
136
|
+
The [live preview](https://chengzhi-c.github.io/dsh-wtq-pool/) runs the actual panel code with demo data.
|
|
137
|
+
|
|
191
138
|
## Development
|
|
192
139
|
|
|
193
140
|
```sh
|
|
194
141
|
pnpm install
|
|
195
|
-
pnpm run build
|
|
196
|
-
pnpm run typecheck
|
|
142
|
+
pnpm run build
|
|
143
|
+
pnpm run typecheck
|
|
197
144
|
pnpm run typecheck:client
|
|
198
|
-
pnpm test
|
|
145
|
+
pnpm test
|
|
199
146
|
```
|
|
200
147
|
|
|
201
|
-
`src
|
|
202
|
-
|
|
203
|
-
The host-agnostic core:
|
|
204
|
-
|
|
205
|
-
| Module | Responsibility |
|
|
206
|
-
| --- | --- |
|
|
207
|
-
| `loopback.ts` | The loopback security model (Host and Origin checks), response writing, stream relay and message redaction |
|
|
208
|
-
| `accounts.ts` | WorkBuddy sign-in parsing, the account pool and its cooldowns |
|
|
209
|
-
| `upstream.ts` | The WorkBuddy upstream client, error classification, rate-limit reset parsing |
|
|
210
|
-
| `catalog.ts` | The model catalogue and its static fallback list |
|
|
211
|
-
| `shim.ts` | The WorkBuddy gateway's OpenAI-compatible endpoint |
|
|
212
|
-
| `at-rest.ts` | Unsealing 5.6+ encrypted sign-in fields |
|
|
213
|
-
| `promo.ts` | Promotion window matching |
|
|
214
|
-
| `trae-*.ts` / `qoder-*.ts` | Sign-in discovery, protocol clients, SSE decoding and gateways for both vendors |
|
|
148
|
+
`src/` contains plugin logic, `renderer/` the plain JavaScript panel and `lib/` the `tsdown` build shipped in the package. Rebuild `lib/` after changing `src/`. `typecheck` excludes `src/host.ts`; `typecheck:client` checks the client code. Tests use Node's built-in runner and run offline.
|
|
215
149
|
|
|
216
150
|
## Credits
|
|
217
151
|
|
|
218
|
-
|
|
152
|
+
| Project | Reference |
|
|
153
|
+
| --- | --- |
|
|
154
|
+
| [XDTrees/dsh-xdpool](https://github.com/XDTrees/dsh-xdpool) | WorkBuddy pool and porting base |
|
|
155
|
+
| [corrinehu/dsh-workbuddy-connect](https://github.com/corrinehu/dsh-workbuddy-connect) | Loopback endpoint security model |
|
|
156
|
+
| [dingminhua/dsh-connect-workbuddy](https://github.com/dingminhua/dsh-connect-workbuddy) | WorkBuddy API and error classification |
|
|
157
|
+
| [dingminhua/dsh-connect-trae](https://github.com/dingminhua/dsh-connect-trae) | Trae protocol |
|
|
158
|
+
| [eghrhegpe/dsh-connect-qoder](https://github.com/eghrhegpe/dsh-connect-qoder) | Qoder protocol |
|
|
159
|
+
| [ardeyouxipianyi/workbuddy2api-hub](https://github.com/ardeyouxipianyi/workbuddy2api-hub) | Growth centre, account retention and international activity reports |
|
|
219
160
|
|
|
220
|
-
|
|
221
|
-
| --- | --- | --- |
|
|
222
|
-
| [XDTrees/dsh-workbuddy-xdpool](https://github.com/XDTrees/dsh-workbuddy-xdpool) | (c) 2026 XDTrees | WorkBuddy account pool and the port this plugin came from |
|
|
223
|
-
| [corrinehu/dsh-workbuddy-connect](https://github.com/corrinehu/dsh-workbuddy-connect) | (c) 2026 Corrine Hu | The loopback endpoint's security model |
|
|
224
|
-
| [dingminhua/dsh-connect-workbuddy](https://github.com/dingminhua/dsh-connect-workbuddy) | (c) 2026 LaoDing | Upstream API and error classification |
|
|
225
|
-
| [dingminhua/dsh-connect-trae](https://github.com/dingminhua/dsh-connect-trae) | (c) 2026 dingminhua | Trae protocol reference |
|
|
226
|
-
| [eghrhegpe/dsh-connect-qoder](https://github.com/eghrhegpe/dsh-connect-qoder) | (c) 2026 eghrhegpe | Qoder protocol reference |
|
|
227
|
-
| [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 |
|
|
161
|
+
Copyright and license notices for ported code shipped with the plugin are in [THIRD-PARTY-NOTICES.md](THIRD-PARTY-NOTICES.md). Other projects are listed as references.
|
|
228
162
|
|
|
229
163
|
## License
|
|
230
164
|
|
|
231
|
-
MIT
|
|
165
|
+
This project is licensed under MIT; see [LICENSE](./LICENSE). Third-party notices for ported code shipped with the plugin are in [THIRD-PARTY-NOTICES.md](THIRD-PARTY-NOTICES.md).
|