dsh-workbuddy-bridge 0.1.0 → 0.3.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/README.md CHANGED
@@ -1,3 +1,7 @@
1
+ <p align="center">
2
+ <img src="icon.svg" alt="dsh-workbuddy-bridge" width="80" height="80">
3
+ </p>
4
+
1
5
  <p align="center">
2
6
  <h1 align="center">dsh-workbuddy-bridge</h1>
3
7
  </p>
@@ -7,11 +11,16 @@
7
11
  <p><em>WorkBuddy desktop models in DeepSeek Harness</em></p>
8
12
 
9
13
  <p>
10
- <a href="https://github.com/deepseek-ai/deepseek-harness"><img src="https://img.shields.io/badge/DeepSeek%20Harness-Plugin-4176E6?style=flat" alt="DeepSeek Harness Plugin"></a>
14
+ <a href="https://www.npmjs.com/package/dsh-workbuddy-bridge"><img src="https://img.shields.io/npm/v/dsh-workbuddy-bridge?style=flat" alt="npm"></a>
11
15
  <a href="https://github.com/zlZayn/dsh-workbuddy-bridge/actions/workflows/ci.yml"><img src="https://github.com/zlZayn/dsh-workbuddy-bridge/actions/workflows/ci.yml/badge.svg" alt="CI"></a>
16
+ <a href="https://github.com/deepseek-ai/deepseek-harness"><img src="https://img.shields.io/badge/DeepSeek%20Harness-Plugin-4176E6?style=flat" alt="DeepSeek Harness Plugin"></a>
12
17
  <a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="MIT 许可证"></a>
13
18
  </p>
14
19
 
20
+ <p>
21
+ 各版本改动 → <a href="https://github.com/zlZayn/dsh-workbuddy-bridge/releases">Releases</a>(与 npm 版本一一对应)
22
+ </p>
23
+
15
24
  <p>
16
25
  <strong><a href="README.md">简体中文</a></strong> · <a href="README_en.md">English</a>
17
26
  </p>
@@ -23,190 +32,104 @@
23
32
  > **凭据不出本机**:登录状态取自 WorkBuddy 桌面 App 自己的凭据文件,插件只在本机留一份加密副本;
24
33
  > 浏览器半边拿不到令牌,界面里也永远不出现凭据原文。
25
34
 
26
- 国内版 **WorkBuddy** 与国际版 **WorkBuddy AI** 并存:装哪个就出现哪个模型分组,两个都装就两组并排,
35
+ 国内版 **WorkBuddy** 与国际版 **WorkBuddy AI** 并存:装哪个 App 就出现哪个模型分组,两个都装就两组并排,
27
36
  各自用自己的账号与积分。模型直接出现在 DSH 的模型选择器里,不必为它单独配一个 provider。
28
37
 
29
38
  <p align="center">
30
- <img src="assets/1.png" alt="WorkBuddy 模型出现在 DSH 模型选择器中" width="330">
39
+ <img src="assets/model-picker.png" alt="WorkBuddy 模型出现在 DSH 模型选择器中" width="300">
31
40
  <br>
32
- <em>国内版在模型选择器中自成一组(含积分倍率与促销徽章),与 DSH 自带分组并排;装国际版则出现「WorkBuddy AI」组。</em>
41
+ <em>国内版在模型选择器中自成一组,模型名后直接跟积分倍率与促销徽章;装国际版则出现「WorkBuddy AI」组。</em>
33
42
  </p>
34
43
 
35
44
  ## 能力
36
45
 
37
- - **开箱即用**:装完启用,模型分组自己出现,没有必填项。
38
- - **两版互不串号**:国内版是「WorkBuddy」分组、国际版是「WorkBuddy AI」分组,模型、账号与积分互不混用;
39
- **各自只跟随自己那版 App 的登录状态** —— 退出其中一版,对应分组消失,另一版不受影响。
40
- - **图片输入**:多数模型可直接粘贴或拖入图片(GLM-5.3-Flash、GLM-5.2、DeepSeek-V4 系列等);
41
- 少数纯文字模型(如 GLM-5.1)会明确说明不支持。
42
- - **推理档位**:上游声明了档位的模型直接可选(如 GLM-5.3 / GLM-5.3-Flash 的 low / high / max);
43
- 没声明的模型可在 Web 与 Desktop 上**手动检测**(见[为什么是手动检测](#为什么是手动检测))。
44
- 未检测或没有可用档位的模型继续用 WorkBuddy 的默认档位。
45
- - **模型显隐**:卡片的「模型」标签里勾选哪些模型出现在选择器里;**按登录账号分别保存**,
46
- 切换账号自动切换各自的配置。隐藏只影响可选择性,**已在用该模型的会话照常继续**。
47
- - **账号与积分**:插件页里看账号、令牌有效期(自动续期)、剩余积分与模型优惠,可手动刷新模型列表,
48
- 并看到当前列表来自上游还是内置兜底。
49
- - **费率与促销**:模型名后直接跟积分倍率(如 `GLM-5.2 · x0.79`)与促销徽章(限时免费 / 夜间折扣),
50
- `/model` 弹窗与输入框下拉都能看到。倍率只是显示,不影响请求。
51
- - **企业账号**:国内版企业账号走企业专用计费接口读周期额度,卡片显示「企业额度」与周期重置时间。
52
- - **三种界面**:Web / Desktop / TUI 都能跑;只有 TUI 不提供手动检测。
53
- - **插件页里以显示名出现**:`DSH WorkBuddy Bridge`(中英界面同名),标题下面另有一行代码体写着包名
54
- `dsh-workbuddy-bridge` —— 两处都要能对上,才不会在插件列表里认错。
46
+ - **开箱即用** —— 装完启用,模型分组自己出现。
47
+ - **两版隔离** —— 国内版与国际版各自分组,模型、账号、积分互不混用,只跟随各自 App 的登录状态。
48
+ - **推理档位** —— 上游声明了档位的模型直接可选;没声明的可在插件页**手动检测**。
49
+ 灯泡表示「这个模型能切档位」,不是「检测过」——已声明的模型也显示灯泡,只是不需要检测。
50
+ - **积分可见** —— 每条回复下方显示本次消耗,模型选择器旁常驻剩余积分。观测不到就不显示。
51
+ - **模型显隐** —— 卡片「模型」标签里勾选哪些模型出现在选择器里,按登录账号分别保存。
52
+ - **图片输入** —— 多数模型可直接粘贴或拖入图片;纯文字模型会明确说明。
53
+ - **三种界面** —— Web / Desktop / TUI;仅 TUI 无手动检测。
55
54
 
56
- ## 安装
55
+ <p align="center">
56
+ <img src="assets/composer-row.png" alt="输入区那一行:剩余积分与推理档位灯泡并排" width="560">
57
+ <br>
58
+ <em>对话窗口里每天看到的样子:左边是剩余积分,右边是推理档位灯泡——都在模型选择器旁。</em>
59
+ </p>
57
60
 
58
- ### 前置
61
+ <p align="center">
62
+ <img src="assets/plugin-page.png" alt="插件详情页:配置表单与两张状态卡片" width="480">
63
+ <br>
64
+ <em>插件页:上面是配置表单,下面两张卡片各跟随自己 App 的登录状态。</em>
65
+ </p>
59
66
 
60
- - 已安装并登录 **WorkBuddy 桌面 App**(国际版为 WorkBuddy AI App)。插件复用 App 的登录状态,
61
- 账号切换自动跟随;两版互不影响。
62
- - DSH 的版本范围以 [package.json](package.json) 的 `engines` 与 `peerDependencies` 为准 —— 本仓只跟 **DSH `0.1.7` 线**。
63
- - Node 22+(同上,真源是 `engines.node`)。
67
+ ## 安装
64
68
 
65
- ### 从 npm 安装
69
+ 前置只有一条:已安装并登录 **WorkBuddy 桌面 App**(国际版为 WorkBuddy AI App)—— 插件复用 App 的登录状态。
66
70
 
67
71
  ```sh
68
72
  dsh plugin --profile web add dsh-workbuddy-bridge
69
73
  dsh web
70
74
  ```
71
75
 
72
- ### 从源码安装
76
+ Desktop 与 TUI 把 `--profile web` 换成 `desktop` / `dsh-tui`(TUI 需终端插件
77
+ `@deepseek-harness-tui/dsh-tui` ≥ `0.10.0-beta.5`,详见其文档)。
78
+
79
+ 也可以从源码安装:
73
80
 
74
81
  ```sh
75
82
  git clone https://github.com/zlZayn/dsh-workbuddy-bridge.git
76
83
  cd dsh-workbuddy-bridge
77
84
  pnpm install && pnpm build
78
-
79
85
  dsh plugin --profile web add "$PWD"
80
- dsh web
81
- ```
82
-
83
- ### 三种界面
84
-
85
- ```sh
86
- # Desktop(DSH Desktop 桌面版)
87
- dsh plugin --profile desktop add dsh-workbuddy-bridge
88
- dsh --profile desktop
89
- ```
90
-
91
- ```sh
92
- # TUI(终端界面)
93
- dsh plugin --profile dsh-tui add dsh-workbuddy-bridge
94
- dsh --profile dsh-tui
95
86
  ```
96
87
 
97
- > **TUI 的版本搭配**:终端界面插件 `@deepseek-harness-tui/dsh-tui` 需 **`0.10.0-beta.5` 及以上** ——
98
- > 更早的版本装了本插件会启动失败,报 `events is not iterable`。先用 TUI 自带的方式把壳升上去,再装本插件。
99
-
100
- > **TUI 的 pnpm**:`dsh-tui` profile 需用 pnpm 11 安装(PATH 里是其他版本会报 `ERR_PNPM_UNEXPECTED_STORE`,
101
- > 用 `npx pnpm@11` 即可)。
102
-
103
- ### 发现与安装
104
-
105
- - **GitHub**:[`zlZayn/dsh-workbuddy-bridge`](https://github.com/zlZayn/dsh-workbuddy-bridge)
106
- - 仓库带 GitHub topic `dsh-plugin`,插件市场据此自动发现。
107
-
108
- ## 版本兼容
88
+ ## 插件页
109
89
 
110
- - 本仓只支持 **DSH `0.1.7` 线**(实测在 `0.1.7-rc.2` 上通过);下限见 [package.json](package.json) 的 `engines.dsh`,本文不重抄。
111
- - **不提供跨代兼容**:宿主换线时本仓跟着抬下限,不在一份代码里同时伺候两条线。
112
- - 本仓**不查宿主版本号**:它按宿主声明的契约注册(槽、服务、配置接缝),没有防御性包装;
113
- 接缝缺席时对应功能静默不出现,不会拖垮界面。
90
+ 侧边栏 **插件(Plugins)** → 已安装 → 点 **DSH WorkBuddy Bridge**。配置区在描述下面,保存即生效:
114
91
 
115
- ## 配置
116
-
117
- 侧边栏 **插件(Plugins)** →「已安装(Installed)」→ 点插件名进详情页 ——
118
- **配置区就在描述下面,直接可改**,那一行上没有第二个 Configure 步骤:
119
-
120
- - **配置表单**:`authFile`(国内版登录文件路径)、`authFileAI`(国际版)、**允许推理档位检测**、
121
- **使用上游声明的最大上下文窗口**。前两项留空即用 App 自己的位置。
122
- - **两张卡片**:国内版与国际版各一张,各显示自己账号的信息。账号、令牌有效期与模型列表来源常驻展开区顶部,
123
- 下面三个标签按「读者要做什么」划分:
124
- - **积分**:合计、周期重置与各套餐余量,一处读完。
125
- - **模型**:完整目录一张表 —— **模型显隐**勾选、上下文窗口、积分倍率与促销徽章。
126
- - **检测**:推理档位检测,一模型一行;没有可检测的模型时这一页为空。
92
+ - **登录文件路径**(国内版 / 国际版)—— 留空即用 App 自己的位置。
93
+ - **允许推理档位检测**、**使用上游声明的最大上下文窗口** —— 两个开关。
127
94
 
128
95
  <p align="center">
129
- <img src="assets/2.png" alt="插件详情页:配置表单与两张状态卡片" width="480">
96
+ <img src="assets/models-tab.png" alt="模型标签:显隐、窗口、倍率" width="480">
130
97
  <br>
131
- <em>配置表单与两张卡片上下排列;国内版与国际版各一张,各自跟随自己 App 的登录状态。</em>
98
+ <em>「模型」标签:勾选哪些模型出现在选择器里,同时看窗口与倍率。</em>
132
99
  </p>
133
100
 
134
101
  <p align="center">
135
- <img src="assets/3.png" alt="积分标签:合计与套餐余量" width="420">
136
- <img src="assets/6.png" alt="模型标签:显隐、窗口、倍率" width="420">
137
- <img src="assets/7.png" alt="检测标签:推理档位检测" width="420">
102
+ <img src="assets/detection-tab.png" alt="检测标签:每个推理模型一行" width="300">
103
+ <img src="assets/credits-tab.png" alt="积分标签:合计与套餐余量" width="300">
138
104
  <br>
139
- <em>卡片展开分三个标签:积分(合计与套餐余量)、模型(显隐、窗口、倍率)、检测(推理档位)。</em>
105
+ <em>左「检测」:每个推理模型一行,点按钮确认它接受哪些推理档位;右「积分」:合计一行,下面是各套餐余量条。</em>
140
106
  </p>
141
107
 
142
- 保存即生效。**配置改动不需要重启宿主**(配置是 volatile 引用);**改了插件代码才需要**。
143
-
144
- > 设置弹窗里的「内置插件」页是**只读清单**(名称与运行状态),没有配置入口 —— 别在那里找配置。
145
-
146
108
  ## 为什么是手动检测
147
109
 
148
- WorkBuddy 的推理档位信息分散在上游接口与客户端私有 UI 逻辑里,且模型目录变化很快。
149
- 若插件按经验给所有未声明模型补齐一套统一档位,就得持续追赶没有稳定契约的未公开逻辑。
150
-
151
- 实测还发现:有些模型**接受** `reasoning_effort` 却忽略未知值、回退到默认行为 ——
152
- 一次请求成功并不能证明某个档位真的可用。
110
+ 上游不保证档位信息可靠——实测有的模型**接受** `reasoning_effort` 却忽略未知值。
111
+ 所以插件不猜:按需对单个模型发少量真实请求确认;结果只表示**上游当前接受该档位**,
112
+ 不承诺它改变推理行为。已声明档位的模型跳过这一步,直接用声明值。
113
+ 机制与取舍见 [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md)。
153
114
 
154
115
  <p align="center">
155
- <img src="assets/4.png" alt="输入框模型选择器旁的「推理等级」检测控件" width="620">
116
+ <img src="assets/reasoning-levels-declared.png" alt="推理档位控件:上游已声明档位、检测按钮禁用" width="300">
156
117
  <br>
157
- <em>检测控件就在模型选择器旁;结果显示在模型下拉里,也回写到卡片上。</em>
118
+ <em>已声明档位的模型:灯泡点亮、档位直接可选,检测按钮禁用。</em>
158
119
  </p>
159
120
 
160
- 所以对没有声明档位的模型,Web 与 Desktop 改为**先授权、再按需检测**:先确认上游会校验这个参数,
161
- 再逐项确认哪些规范档位被接受。检测会发送少量请求、可能消耗积分;结果只表示**上游当前接受该档位**,
162
- 不承诺它改变推理效果、速度或积分消耗。
163
-
164
- ## 命令行
121
+ ## 兼容与限制
165
122
 
166
- ```sh
167
- dsh plugin --profile <web|desktop|dsh-tui> exec dsh-workbuddy-bridge status
168
- ```
169
-
170
- 登录状态与剩余积分;`--json` 输出机器可读格式,另有 `doctor`(诊断)与 `logout`(清理凭据)。
171
-
172
- 默认操作国内版,加 `--provider workbuddy-ai` 操作国际版:
173
-
174
- ```sh
175
- dsh plugin --profile web exec dsh-workbuddy-bridge status --provider workbuddy-ai
176
- dsh plugin --profile web exec dsh-workbuddy-bridge doctor --provider workbuddy-ai
177
- ```
178
-
179
- `logout` 只删除该版插件自留的凭据副本,不动桌面 App 自己的登录,也不承诺模型分组一定消失
180
- (App 的凭据文件仍在时依然生效)。
181
-
182
- ## 安全与边界
123
+ 无凭据的分组不显示。宿主版本下限、平台支持、目录来源与已知缺口
124
+ → [docs/COMPATIBILITY.md](docs/COMPATIBILITY.md)。
183
125
 
184
- - **凭据只在本机**:从 App 的凭据文件读出后,插件自留一份**静态加密**的副本;
185
- 浏览器半边永远拿不到令牌、文件路径或平台事实。
186
- - **界面里不出现凭据原文**:卡片只报账号与状态。
187
- - **只访问 WorkBuddy 自己的接口**,不代理、不转发其他流量。
188
- - 依赖的是 **WorkBuddy 客户端接口(非公开 API)**,上游改动可能使其失效;届时按
189
- 「本账号上次成功目录 → 内置目录」降级,并在卡片上标明来源与失败原因。
190
-
191
- ## 已知限制
192
-
193
- - 在 macOS 的 DSH Web / Desktop / TUI 下验证通过。Windows 依次探测 Local 与 Roaming AppData;
194
- WSL 优先从挂载的 Windows 用户目录读取登录凭据。Windows 与 Linux 用户名不同、且 Windows 环境变量
195
- 未传入 WSL 时,用 `WORKBUDDY_AUTH_FILE`(国际版 `WORKBUDDY_AI_AUTH_FILE`)指定实际位置。
196
- - **国际版的模型目录来自 App 界面接口**:服务端按 User-Agent 分流,属私有实现,改动可能使其失效;
197
- 国内版走官方 CLI 同款接口,不受此影响。
198
- - **国际版仍未覆盖的环境**:Windows / WSL / Linux 下国际版 App 的版本读取尚未找到可靠来源,
199
- 会退回最近保存的版本或内置值。
200
- - **无凭据时的行为**:某版 App 从未登录、也没留下插件自留副本时,该版模型分组不再显示
201
- (此前国内版会显示一份内置兜底列表,但那些模型选了必然报错)。
202
- - **企业账号积分目前仅覆盖国内版**:国际版企业计费接口尚未验证,仍按个人版接口读取。
203
- - 手动检测只在 Web 与 Desktop 提供,TUI 没有。
126
+ 设计取舍 → [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md);发版流程 → [docs/PUBLISHING.md](docs/PUBLISHING.md);
127
+ 维护者文档地图 → [AGENTS.md](AGENTS.md)。
204
128
 
205
129
  ## 免责声明
206
130
 
207
131
  - 本项目**仅供个人学习和研究使用**,仅驱动使用者自己的 WorkBuddy 账号在本机调用,请勿用于商业用途或超出个人合理使用的场景。
208
- - 使用者需遵守 WorkBuddy 的服务条款;因使用本项目产生的任何后果(包括但不限于账号被限制、额度被清空、服务中断),由使用者自行承担。
209
- - 本项目作者不对任何因使用或滥用本项目产生的直接或间接损失负责。
132
+ - 使用者需遵守 WorkBuddy 的服务条款;因使用本项目产生的任何后果,由使用者自行承担。
210
133
  - 本项目与腾讯、WorkBuddy、DeepSeek 均无关联,未获其授权或认可;文中出现的名称仅用于描述兼容关系,其商标权利归各自所有。
211
134
 
212
135
  ## 致谢
@@ -220,7 +143,4 @@ dsh plugin --profile web exec dsh-workbuddy-bridge doctor --provider workbuddy-a
220
143
 
221
144
  ## 贡献
222
145
 
223
- 报缺陷请附 DSH 版本、插件版本与复现步骤;提功能前先翻 [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) 看设计取舍。
224
-
225
- 设计取向 → [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md);发布流程与版本号判定 → [docs/PUBLISHING.md](docs/PUBLISHING.md);
226
- 维护者文档地图 → [AGENTS.md](AGENTS.md)。
146
+ 流程与本地钩子 → [CONTRIBUTING.md](CONTRIBUTING.md)。缺陷与需求走仓库 Issues。
package/README_en.md CHANGED
@@ -1,240 +1,156 @@
1
+ <p align="center">
2
+ <img src="icon.svg" alt="dsh-workbuddy-bridge" width="80" height="80">
3
+ </p>
4
+
1
5
  <p align="center">
2
6
  <h1 align="center">dsh-workbuddy-bridge</h1>
3
7
  </p>
4
8
 
5
9
  <div align="center">
6
- <p><strong>WorkBuddy desktop models in your DSH chat</strong></p>
7
- <p><em>把 WorkBuddy 桌面 App 的模型接进 DSH 对话窗口</em></p>
10
+ <p><strong>WorkBuddy desktop models in DeepSeek Harness</strong></p>
8
11
 
9
12
  <p>
10
- <a href="https://github.com/deepseek-ai/deepseek-harness"><img src="https://img.shields.io/badge/DeepSeek%20Harness-Plugin-4176E6?style=flat" alt="DeepSeek Harness Plugin"></a>
13
+ <a href="https://www.npmjs.com/package/dsh-workbuddy-bridge"><img src="https://img.shields.io/npm/v/dsh-workbuddy-bridge?style=flat" alt="npm"></a>
11
14
  <a href="https://github.com/zlZayn/dsh-workbuddy-bridge/actions/workflows/ci.yml"><img src="https://github.com/zlZayn/dsh-workbuddy-bridge/actions/workflows/ci.yml/badge.svg" alt="CI"></a>
15
+ <a href="https://github.com/deepseek-ai/deepseek-harness"><img src="https://img.shields.io/badge/DeepSeek%20Harness-Plugin-4176E6?style=flat" alt="DeepSeek Harness Plugin"></a>
12
16
  <a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="MIT License"></a>
13
17
  </p>
14
18
 
15
19
  <p>
16
- <a href="README.md">简体中文</a> · <strong><a href="README_en.md">English</a></strong>
20
+ Per-version changes → <a href="https://github.com/zlZayn/dsh-workbuddy-bridge/releases">Releases</a> (one-to-one with npm versions)
21
+ </p>
22
+
23
+ <p>
24
+ <strong><a href="README.md">简体中文</a></strong> · <a href="README_en.md">English</a>
17
25
  </p>
18
26
  </div>
19
27
 
20
28
  ---
21
29
 
22
30
  > [!NOTE]
23
- > **Credentials never leave your machine**: the sign-in state is read from the WorkBuddy desktop
24
- > app's own credential file and kept as one encrypted local copy. The browser half never receives
25
- > the token, and no credential text ever reaches the UI.
31
+ > **Credentials never leave this machine**: sign-in state is read from the WorkBuddy desktop app's own
32
+ > credential file and kept as one encrypted local copy; the browser half never sees a token, and none
33
+ > ever appears in the UI.
26
34
 
27
- The CN **WorkBuddy** and the international **WorkBuddy AI** apps live side by side: whichever you
28
- have installed shows up as its own model group, and both installed shows both groups, each with its
29
- own account and credit. The models appear directly in the DSH model picker — no separate provider to configure.
35
+ The CN **WorkBuddy** and the international **WorkBuddy AI** coexist: install one app and its model group
36
+ appears; install both and the two groups sit side by side, each with its own account and credit. The
37
+ models appear directly in the DSH model picker — no separate provider to configure.
30
38
 
31
39
  <p align="center">
32
- <img src="assets/1.png" alt="WorkBuddy models in the DSH model picker" width="330">
40
+ <img src="assets/model-picker.png" alt="WorkBuddy models in the DSH model picker" width="300">
33
41
  <br>
34
- <em>The CN version forms its own group in the model picker (with credit rates and promo badges), beside DSH's
35
- own groups; installing the international version adds a "WorkBuddy AI" group the same way.</em>
42
+ <em>The CN version forms its own group in the model picker, each model carrying its credit rate and promo
43
+ badge; installing the international version adds a "WorkBuddy AI" group the same way.</em>
36
44
  </p>
37
45
 
38
46
  ## Capabilities
39
47
 
40
- - **Works out of the box**: install and enable — the model groups appear on their own, with nothing required to fill in.
41
- - **The two versions never mix**: the CN app is the "WorkBuddy" group and the international one is "WorkBuddy AI";
42
- models, accounts, and credit stay separate. **Each group follows only its own app's sign-in** — sign out of one
43
- and that group disappears, leaving the other untouched.
44
- - **Image input**: most models accept pasted or dropped images (GLM-5.3-Flash, GLM-5.2, the DeepSeek-V4 series, and more);
45
- the few text-only models (e.g. GLM-5.1) say so explicitly.
46
- - **Reasoning levels**: models that declare levels expose them directly (low / high / max on GLM-5.3 and GLM-5.3-Flash);
47
- models that do not can be **checked manually** on Web and Desktop (see [Why detection is manual](#why-detection-is-manual)).
48
- Models without a check result or usable levels keep WorkBuddy's default.
49
- - **Model visibility**: the card's "Models" tab selects which models appear in the picker; the choice is
50
- **saved per signed-in account** and follows account switches. Hiding only affects pickability — **chats already
51
- using that model keep working**.
52
- - **Account and credit**: the plugin page shows the account, token validity (auto-renewed), remaining credit, and model
53
- offers; it can refresh the model list and shows whether the list came from the upstream or the built-in fallback.
54
- - **Rates and promos**: each model name carries its credit multiplier (e.g. `GLM-5.2 · x0.79`) and promo badges
55
- (limited-time free / night discount) in both the `/model` popup and the composer dropdown. The rate is display-only.
56
- - **Enterprise accounts**: CN enterprise accounts read their cycle quota from the enterprise billing endpoint, and the
57
- card shows an "enterprise quota" row with the reset time.
58
- - **The plugin page shows a display name**: `DSH WorkBuddy Bridge` (the same in both UI languages), with the
59
- package name `dsh-workbuddy-bridge` on the code-style line beneath it.
48
+ - **Zero configuration** — install, enable, and the model group appears by itself.
49
+ - **Two isolated versions** — "WorkBuddy" (CN) and "WorkBuddy AI" (international) each form their own group;
50
+ models, accounts and credit never mix, and each follows only its own app's sign-in.
51
+ - **Reasoning levels** — models that declare levels expose them directly; the rest can be **checked manually**
52
+ on the plugin page. The bulb means "this model can switch levels", not "it has been detected" — a declared
53
+ model shows the bulb too, it just has nothing to detect.
54
+ - **Credit in view** — each reply shows what it consumed, and remaining credit sits beside the model picker.
55
+ Nothing renders when a figure cannot be observed.
56
+ - **Model visibility** — tick which models appear in the picker on the card's "Models" tab, saved per
57
+ signed-in account.
58
+ - **Image input** — most models accept pasted or dropped images; text-only models say so explicitly.
59
+ - **Three surfaces** — Web, Desktop and TUI; only the TUI lacks manual detection.
60
60
 
61
- ## Install
61
+ <p align="center">
62
+ <img src="assets/composer-row.png" alt="The composer row: remaining credit beside the reasoning-level bulb" width="560">
63
+ <br>
64
+ <em>The everyday view in the conversation window: remaining credit on the left, the reasoning-level bulb on
65
+ the right — both beside the model picker.</em>
66
+ </p>
62
67
 
63
- ### Prerequisites
68
+ <p align="center">
69
+ <img src="assets/plugin-page.png" alt="Plugin detail page: the configuration form and the two status cards" width="480">
70
+ <br>
71
+ <em>The plugin page: the configuration form on top, two cards below, each following its own app's sign-in.</em>
72
+ </p>
64
73
 
65
- - The **WorkBuddy desktop app** is installed and signed in (WorkBuddy AI for the international version). The plugin
66
- reuses the app's sign-in state and follows account switches; the two versions do not affect each other.
67
- - The DSH version range is whatever [package.json](package.json) declares in `engines` and `peerDependencies` —
68
- this repository tracks the **DSH `0.1.7` line** only.
69
- - Node 22+ (same source: `engines.node`).
74
+ ## Install
70
75
 
71
- ### From npm
76
+ One prerequisite: the **WorkBuddy desktop app** is installed and signed in (WorkBuddy AI for the
77
+ international version) — the plugin reuses the app's sign-in state.
72
78
 
73
79
  ```sh
74
80
  dsh plugin --profile web add dsh-workbuddy-bridge
75
81
  dsh web
76
82
  ```
77
83
 
78
- ### From source
84
+ For Desktop and TUI swap `--profile web` for `desktop` / `dsh-tui` (the TUI needs the terminal plugin
85
+ `@deepseek-harness-tui/dsh-tui` ≥ `0.10.0-beta.5` — see its docs).
86
+
87
+ Or from source:
79
88
 
80
89
  ```sh
81
90
  git clone https://github.com/zlZayn/dsh-workbuddy-bridge.git
82
91
  cd dsh-workbuddy-bridge
83
92
  pnpm install && pnpm build
84
-
85
93
  dsh plugin --profile web add "$PWD"
86
- dsh web
87
- ```
88
-
89
- ### Other interfaces
90
-
91
- ```sh
92
- # Desktop (the DSH Desktop app)
93
- dsh plugin --profile desktop add dsh-workbuddy-bridge
94
- dsh --profile desktop
95
- ```
96
-
97
- ```sh
98
- # TUI (terminal UI)
99
- dsh plugin --profile dsh-tui add dsh-workbuddy-bridge
100
- dsh --profile dsh-tui
101
94
  ```
102
95
 
103
- > **TUI version pairing**: the terminal UI package `@deepseek-harness-tui/dsh-tui` must be **`0.10.0-beta.5` or newer** —
104
- > older versions fail at startup with `events is not iterable` once this plugin is installed. Update the shell first.
105
-
106
- > **TUI and pnpm**: the `dsh-tui` profile needs pnpm 11 (a different pnpm on PATH fails with
107
- > `ERR_PNPM_UNEXPECTED_STORE` — use `npx pnpm@11`).
108
-
109
- ### Discovery
96
+ ## The plugin page
110
97
 
111
- - **GitHub**: [`zlZayn/dsh-workbuddy-bridge`](https://github.com/zlZayn/dsh-workbuddy-bridge)
112
- - The repository carries the GitHub topic `dsh-plugin`, which the plugin market uses for discovery.
98
+ Sidebar **Plugins** → installed → click **DSH WorkBuddy Bridge**. The configuration area sits right under
99
+ the description and takes effect on save:
113
100
 
114
- ## Version compatibility
115
-
116
- - This repository supports the **DSH `0.1.7` line** only, verified on `0.1.7-rc.2`; the floor lives in
117
- [package.json](package.json) (`engines.dsh`) and is not copied here.
118
- - **No cross-generation compatibility**: when the host moves lines, this repository moves its floor with it rather
119
- than serving two lines from one codebase.
120
- - The plugin **never probes the host version**: it registers against the contracts the host declares (slots, services,
121
- the configuration seam) with no defensive wrappers. Where a seam is absent the corresponding feature quietly does not
122
- appear, and nothing else is dragged down with it.
123
-
124
- ## Configuration
125
-
126
- Sidebar **Plugins** → "Installed" → click the plugin name to open its detail page — **the configuration area sits right
127
- under the description and is editable in place**, with no second Configure step on that row:
128
-
129
- - **Configuration form**: `authFile` (CN sign-in file), `authFileAI` (international), **allow reasoning-level detection**,
130
- and **use the largest context window the upstream declares**. Leave the first two blank to use the app's own location.
131
- - **Two cards**: one per version, each reporting its own account. The account, token validity and catalog source
132
- sit above the tabs; the three tabs below split by what a reader came to do:
133
- - **Credits**: total, cycle reset, and per-package allowances in one place.
134
- - **Models**: the full catalog in one table — **visibility** checkboxes, context windows, credit rates and badges.
135
- - **Detection**: reasoning-level detection, one row per model; empty when nothing needs detecting.
101
+ - **Sign-in file paths** (CN / international) — leave blank to use the app's own location.
102
+ - **Allow reasoning-level detection** and **use the largest declared context window** — two switches.
136
103
 
137
104
  <p align="center">
138
- <img src="assets/2.png" alt="Plugin detail page: the configuration form and the two status cards" width="480">
105
+ <img src="assets/models-tab.png" alt="Models tab: visibility, windows, rates" width="480">
139
106
  <br>
140
- <em>The configuration form sits above the two cards — one per version, each following its own app's sign-in.</em>
107
+ <em>The Models tab: tick which models appear in the picker, and read each one's window and rate.</em>
141
108
  </p>
142
109
 
143
110
  <p align="center">
144
- <img src="assets/3.png" alt="Credits tab: total and per-package allowances" width="420">
145
- <img src="assets/6.png" alt="Models tab: visibility, windows, rates" width="420">
146
- <img src="assets/7.png" alt="Detection tab: reasoning-level detection" width="420">
111
+ <img src="assets/detection-tab.png" alt="Detection tab: one row per reasoning model" width="300">
112
+ <img src="assets/credits-tab.png" alt="Credits tab: total and per-package allowances" width="300">
147
113
  <br>
148
- <em>Expanding a card shows three tabs: Credits (total and per-package), Models (visibility, windows, rates), and Detection (reasoning levels).</em>
114
+ <em>Left, "Detection": one row per reasoning model — press the button to confirm which reasoning levels it
115
+ accepts. Right, "Credits": the total on one line, each package's allowance as a bar below.</em>
149
116
  </p>
150
117
 
151
- Saving takes effect immediately. **Configuration changes do not need a host restart** (configuration is a volatile
152
- reference); **changing the plugin's code does**.
153
-
154
- > The "Built-in Plugins" page in the settings dialog is a **read-only inventory** (name and runtime status) with no
155
- > configuration entry — do not look for configuration there.
156
-
157
118
  ## Why detection is manual
158
119
 
159
- WorkBuddy's reasoning-level information is split between upstream API responses and private UI logic in the client,
160
- while the model catalog changes quickly. Filling in one uniform set of levels for every undeclared model would mean
161
- chasing unpublished product logic with no stable contract.
162
-
163
- Testing also found that some models **accept** `reasoning_effort` while ignoring unknown values and falling back to
164
- their default — so one successful request does not prove that a level is actually usable.
120
+ The upstream does not guarantee that level information is reliable — some models were observed to
121
+ **accept** `reasoning_effort` while silently ignoring unknown values. So the plugin does not guess: it
122
+ confirms one model at a time with a few real requests on demand, and a result only means **the upstream
123
+ currently accepts that level** — it does not promise any change in behaviour. Models that declare their
124
+ levels skip this step and use the declared set directly.
125
+ Mechanism and trade-offs in [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md).
165
126
 
166
127
  <p align="center">
167
- <img src="assets/4.png" alt="The reasoning-level control beside the composer's model picker" width="620">
128
+ <img src="assets/reasoning-levels-declared.png" alt="The reasoning-level control: levels declared upstream, detect disabled" width="300">
168
129
  <br>
169
- <em>The control sits next to the model picker; results land in the model dropdown and are written back to the card.</em>
130
+ <em>A model with declared levels: the bulb is lit, the levels are directly selectable, and detection is disabled.</em>
170
131
  </p>
171
132
 
172
- For models without declared levels, Web and Desktop therefore use **authorize first, then detect on demand**: confirm
173
- that the upstream validates the parameter, then check which standard levels it accepts. Detection sends a few requests
174
- and may consume credit; the result means only that **the upstream currently accepts that level** — it does not promise
175
- a change in reasoning quality, speed, or credit use.
176
-
177
- ## CLI
178
-
179
- ```sh
180
- dsh plugin --profile <web|desktop|dsh-tui> exec dsh-workbuddy-bridge status
181
- ```
133
+ ## Compatibility and limits
182
134
 
183
- Sign-in state and remaining credit; `--json` for machine-readable output, plus `doctor` (diagnostics) and `logout`
184
- (credential cleanup).
135
+ A group without credentials does not appear. The host version floor, platform support, catalog sources and
136
+ known gaps
137
+ → [docs/COMPATIBILITY.md](docs/COMPATIBILITY.md).
185
138
 
186
- Both target the CN version by default; add `--provider workbuddy-ai` for the international one:
187
-
188
- ```sh
189
- dsh plugin --profile web exec dsh-workbuddy-bridge status --provider workbuddy-ai
190
- dsh plugin --profile web exec dsh-workbuddy-bridge doctor --provider workbuddy-ai
191
- ```
192
-
193
- `logout` removes only that version's plugin-owned credential copy. It leaves the desktop app's own sign-in alone and
194
- does not promise the model group will disappear (the app's credential file still supplies one).
195
-
196
- ## Security and boundaries
197
-
198
- - **Credentials stay local**: read from the app's credential file, then kept as one **encrypted** plugin-owned copy.
199
- The browser half never receives the token, file paths, or platform facts.
200
- - **No credential text in the UI**: the cards report the account and status only.
201
- - **Only WorkBuddy's own endpoints are contacted** — no proxying or forwarding of other traffic.
202
- - The plugin depends on **WorkBuddy client interfaces (not a public API)**; upstream changes can break it. When that
203
- happens it degrades to "this account's last successful catalog → built-in roster" and labels the source and failure
204
- reason on the card.
205
-
206
- ## Known limitations
207
-
208
- - Verified on macOS with the DSH Web / Desktop / TUI profiles. Windows probes Local and Roaming AppData in order; WSL
209
- first reads credentials from the mounted Windows user profile. If the Windows and Linux user names differ and Windows
210
- environment variables are not forwarded into WSL, point `WORKBUDDY_AUTH_FILE` (or `WORKBUDDY_AI_AUTH_FILE`) at the
211
- actual file.
212
- - **The international version's catalog comes from the app's own interface**: the service splits it by User-Agent, a
213
- private implementation detail a server-side change can break. The CN version uses the same interface as the official
214
- CLI and is unaffected.
215
- - **International-version environments not yet covered**: on Windows / WSL / Linux no reliable source for the
216
- international app's version has been located, so the saved value or the built-in default is used.
217
- - **Behaviour with no credentials**: a version whose app was never signed in — and that left no plugin-owned copy —
218
- no longer shows a model group. (The CN version used to display a built-in fallback list, but every model on it failed
219
- when selected.)
220
- - **The enterprise credit path currently covers the CN product only**: the international enterprise billing interface is
221
- unverified, so those accounts still read through the personal endpoint.
222
- - Manual detection is available on Web and Desktop only; TUI has none.
139
+ Design notes → [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md); release process → [docs/PUBLISHING.md](docs/PUBLISHING.md);
140
+ maintainer map → [AGENTS.md](AGENTS.md).
223
141
 
224
142
  ## Disclaimer
225
143
 
226
- - This project is for **personal learning and research only**, driving your own WorkBuddy account on your own machine.
227
- Do not use it commercially or beyond reasonable personal use.
228
- - Users must comply with the WorkBuddy terms of service. Any consequence of using this project (including but not limited
229
- to account restrictions, depleted credit, or service interruption) is borne by the user.
230
- - The author is not liable for any direct or indirect loss arising from the use or misuse of this project.
231
- - This project is not affiliated with, endorsed by, or sponsored by Tencent, WorkBuddy, or DeepSeek. Product names are
232
- used for compatibility description only; trademarks belong to their respective owners.
144
+ - This project is **for personal study and research only**; it drives your own WorkBuddy account on your own
145
+ machine. Do not use it commercially or beyond reasonable personal use.
146
+ - You must comply with WorkBuddy's terms of service; any consequences are your own responsibility.
147
+ - Not affiliated with, nor endorsed by, Tencent, WorkBuddy, or DeepSeek; names appear only to describe
148
+ compatibility, and trademarks belong to their owners.
233
149
 
234
150
  ## Acknowledgements
235
151
 
236
- - [Sliverkiss/workbuddy2api](https://github.com/Sliverkiss/workbuddy2api) (MIT) — reference implementation of the WorkBuddy upstream protocol.
237
- - [franksong2702/dsh-codex-connect](https://github.com/franksong2702/dsh-codex-connect) (Apache-2.0) — reference for the DSH plugin structure and provider registration.
152
+ - [Sliverkiss/workbuddy2api](https://github.com/Sliverkiss/workbuddy2api) (MIT) — reference for the WorkBuddy upstream protocol.
153
+ - [franksong2702/dsh-codex-connect](https://github.com/franksong2702/dsh-codex-connect) (Apache-2.0) — reference for DSH plugin structure and provider registration.
238
154
 
239
155
  ## License
240
156
 
@@ -242,8 +158,4 @@ does not promise the model group will disappear (the app's credential file still
242
158
 
243
159
  ## Contributing
244
160
 
245
- Bug reports should include the DSH version, the plugin version, and reproduction steps. Before proposing a feature, read
246
- [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) for the design trade-offs.
247
-
248
- Design → [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md); release process and version semantics → [docs/PUBLISHING.md](docs/PUBLISHING.md);
249
- maintainer doc map → [AGENTS.md](AGENTS.md).
161
+ Process and local hooks → [CONTRIBUTING.md](CONTRIBUTING.md). Bugs and requests go to the repo Issues.