dsh-workbuddy-connect 0.3.2 → 0.4.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.en.md +17 -5
- package/README.md +18 -7
- package/lib/bin.js +1 -1
- package/lib/client.js +866 -31
- package/lib/{host-heartbeat-BSsKUoB8.js → host-heartbeat-0UAWqWac.js} +232 -3
- package/lib/index.d.ts +224 -1
- package/lib/index.js +563 -43
- package/package.json +11 -5
package/README.en.md
CHANGED
|
@@ -12,20 +12,30 @@ Brings every model in the WorkBuddy desktop app (GLM-5.3, GLM-5.2, DeepSeek-V4-P
|
|
|
12
12
|
|
|
13
13
|
- **Image input**: most models accept images — paste or drop one straight into the conversation (GLM-5.3-Flash, GLM-5.2, the DeepSeek-V4 series, and more); the few text-only models (e.g. GLM-5.1) clearly say so.
|
|
14
14
|
|
|
15
|
-
- **
|
|
15
|
+
- **Reasoning levels**: levels explicitly declared by WorkBuddy appear directly — for example, GLM-5.3 and GLM-5.3-Flash offer low / high / max. For some models that do not declare selectable levels, Web and Desktop provide a **Reasoning levels** control in the model picker for a manual check. It sends a few requests and may consume credit. Models without a check result or selectable levels continue to use WorkBuddy's default.
|
|
16
16
|
|
|
17
|
-
- **
|
|
17
|
+
- **Status and detection**: the Settings → Plugins → DSH WorkBuddy Connect card shows the account, token validity, remaining credit, and model offers. It also provides manual reasoning-level detection for eligible models.
|
|
18
18
|
|
|
19
19
|
- **Rate**: every model name carries its credits multiplier (e.g. `GLM-5.2 · x0.79`, `Hy3 · x0.00`) in both the `/model` popup and the composer's model dropdown. The rate is display-only and never affects requests.
|
|
20
20
|
|
|
21
|
-
- **
|
|
21
|
+
- **Promo badges**: promo badges (`限时免费`, `夜间折扣`) ride the model name itself (e.g. `Hy4 preview · x0.00 · 限时免费`), visible wherever you pick a model; the status card also collects currently-discounted models. Per the WorkBuddy service data, synced each time DSH starts.
|
|
22
22
|
|
|
23
23
|

|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
The expanded card has three tabs: **Status** shows the account, token validity, total credit, and reasoning-level detection; **Context** lists each model's context window; **Details** shows per-package credit and model offers.
|
|
26
26
|
|
|
27
27
|

|
|
28
28
|
|
|
29
|
+
## Why reasoning levels work this way
|
|
30
|
+
|
|
31
|
+
Information about WorkBuddy models' reasoning levels is currently split between upstream API responses and private UI logic in the client, while the model catalog changes quickly. If the plugin filled in one uniform set of levels for every model without an upstream declaration, it would need to keep chasing unpublished product logic with no stable contract.
|
|
32
|
+
|
|
33
|
+

|
|
34
|
+
|
|
35
|
+
Testing also found that some models accept the `reasoning_effort` parameter while ignoring unknown values and falling back to their default behavior. A successful request alone therefore does not prove that a level is actually usable.
|
|
36
|
+
|
|
37
|
+
For models without declared levels, Web and Desktop instead use user-authorized, on-demand detection: it first confirms that the upstream validates the parameter, then checks which standard levels it accepts. The check sends a few requests and may consume credit. Its result means only that the upstream currently accepts that level; it does not promise a particular change in reasoning quality, speed, or credit use.
|
|
38
|
+
|
|
29
39
|
## Install
|
|
30
40
|
|
|
31
41
|
Prerequisite: the WorkBuddy desktop app is installed and signed in (the plugin reuses the app's sign-in state and follows account switches automatically).
|
|
@@ -69,9 +79,11 @@ dsh --profile dsh-tui
|
|
|
69
79
|
|
|
70
80
|
> **TUI users, check the version pairing**: the terminal UI package (`@deepseek-harness-tui/dsh-tui`) must be **`0.10.0-beta.5` or newer** — older versions fail at startup with `events is not iterable` when this plugin is installed. Update the shell first (via its built-in update command or a fresh install), then add this plugin; the newest release is a beta, and a stable one will work the same way.
|
|
71
81
|
|
|
82
|
+
> Manual reasoning-level detection is currently available only on Web and Desktop; TUI does not provide a detection action.
|
|
83
|
+
|
|
72
84
|
> Note: the `dsh-tui` profile requires pnpm 11 to install packages (a different pnpm on PATH fails with `ERR_PNPM_UNEXPECTED_STORE` — use `npx pnpm@11`).
|
|
73
85
|
|
|
74
|
-
After installing, switch to a WorkBuddy model in the model picker of the interface you chose. On Web, the settings card
|
|
86
|
+
After installing, switch to a WorkBuddy model in the model picker of the interface you chose. On Web and Desktop, the settings card shows the account, token validity, and remaining credit, and can manually check eligible models for reasoning levels. On TUI, configure `authFile` in `/settings`.
|
|
75
87
|
|
|
76
88
|
## CLI
|
|
77
89
|
|
package/README.md
CHANGED
|
@@ -18,24 +18,33 @@
|
|
|
18
18
|
- **图片输入**:大部分模型支持发图,在对话里直接粘贴或拖入图片即可(GLM-5.3-Flash、GLM-5.2、DeepSeek-V4 系列等);少数只支持文字的模型(如 GLM-5.1)会明确提示不支持。
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
-
|
|
21
|
+
- **推理档位**:WorkBuddy 明确声明的档位会直接显示,例如 GLM-5.3 和 GLM-5.3-Flash 可选 low / high / max。对于部分没有声明可选档位的模型,Web 和 Desktop 可在模型选择器中点击「推理等级」手动检测;检测会发送少量请求,可能消耗积分。未检测或没有可用档位的模型仍使用 WorkBuddy 的默认档位。
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
-
|
|
25
|
-
|
|
24
|
+
- **信息查看与检测**:设置 → 插件 → DSH WorkBuddy Connect 卡片可查看账号、令牌有效期、剩余积分和模型优惠;对于可检测模型,也可以在这里手动检测推理档位。
|
|
26
25
|
|
|
27
26
|
- **费率比例**:模型选择列表里每个模型名后直接显示积分倍率(如 `GLM-5.2 · x0.79`、`Hy3 · x0.00`),`/model` 弹窗与输入框的模型下拉都能看到。倍率只是显示,不影响实际请求。
|
|
28
27
|
|
|
29
28
|
|
|
30
|
-
-
|
|
31
|
-
|
|
29
|
+
- **徽章展示**:促销徽章(限时免费、夜间折扣)直接跟在模型名后面(如 `Hy4 preview · x0.00 · 限时免费`),选模型时一眼可见;设置卡片里也会汇总当前有优惠的模型。以 WorkBuddy 服务端的数据为准,每次启动 DSH 时同步。
|
|
32
30
|
|
|
33
31
|

|
|
34
32
|
|
|
35
|
-
|
|
33
|
+
卡片展开后分为「状态 / 上下文 / 明细」三个标签:状态页展示账号、令牌有效期、合计积分和推理档位检测;上下文页列出各模型的上下文窗口;明细页展示各套餐余量与模型优惠。
|
|
36
34
|
|
|
37
35
|

|
|
38
36
|
|
|
37
|
+
## 推理档位为什么这样设计
|
|
38
|
+
|
|
39
|
+
WorkBuddy 中模型的推理档位信息目前分散在上游接口与客户端自身的私有 UI 逻辑中,且模型目录变化很快。若插件根据经验为所有未声明模型补齐统一档位,就需要持续追赶这些未公开、没有稳定契约的产品逻辑。
|
|
40
|
+
|
|
41
|
+

|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
实测还发现,有些模型虽然接受 `reasoning_effort` 参数,却可能忽略未知值并回退到默认行为;一次请求返回成功,并不能证明某个档位真实可用。
|
|
45
|
+
|
|
46
|
+
因此,对于没有声明档位的模型,Web 和 Desktop 采用用户主动授权触发、动态获取档位的方式:先确认上游会校验该参数,再逐项确认哪些规范档位被接受。检测会发送少量请求,可能消耗积分;结果只表示当前上游接受该档位,不承诺它一定改变推理效果、速度或积分消耗。
|
|
47
|
+
|
|
39
48
|
## 安装
|
|
40
49
|
|
|
41
50
|
前置:已安装并登录 WorkBuddy 桌面 App(插件复用 App 的登录状态,账号切换自动跟随)。
|
|
@@ -79,9 +88,11 @@ dsh --profile dsh-tui
|
|
|
79
88
|
|
|
80
89
|
> **TUI 用户请注意版本搭配**:终端界面插件 `@deepseek-harness-tui/dsh-tui` 需要 **`0.10.0-beta.5` 及以上**(更早的版本装了本插件会启动失败,报 `events is not iterable`)。请先用 TUI 自带的更新方式把壳升到 beta.5 及以上,再安装本插件;当前最新的是 beta 版,正式版发布后同样可用。
|
|
81
90
|
|
|
91
|
+
> 推理档位的手动检测入口目前仅提供给 Web 和 Desktop;TUI 不提供检测操作。
|
|
92
|
+
|
|
82
93
|
> 提示:`dsh-tui` profile 需用 pnpm 11 安装(PATH 里是其他版本会报 `ERR_PNPM_UNEXPECTED_STORE`,用 `npx pnpm@11` 即可)。
|
|
83
94
|
|
|
84
|
-
安装后,在对应界面的模型选择器里切换到 WorkBuddy
|
|
95
|
+
安装后,在对应界面的模型选择器里切换到 WorkBuddy 模型即可使用。Web 和 Desktop 下,设置卡片可查看账号信息、令牌有效期与剩余积分,并手动检测符合条件模型的推理档位;TUI 下可在 `/settings` 里配置 `authFile`。
|
|
85
96
|
|
|
86
97
|
## 命令行
|
|
87
98
|
|
package/lib/bin.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
2
|
+
import { T as workbuddyOwnAuthPath, _ as FALLBACK_WORKBUDDY_MODELS, a as readHostHeartbeat, c as WORKBUDDY_CONNECT_VERSION, l as WorkBuddyUpstreamClient, o as workbuddyHostHeartbeatPath, r as isHeartbeatProcessAlive, x as WorkBuddyCredentialStore } from "./host-heartbeat-0UAWqWac.js";
|
|
3
3
|
import { realpathSync } from "node:fs";
|
|
4
4
|
import { fileURLToPath } from "node:url";
|
|
5
5
|
//#region src/bin.ts
|