dsh-workbuddy-connect 0.6.3 → 0.6.5
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 +4 -3
- package/README.md +4 -3
- package/lib/bin.js +5 -7
- package/lib/client.js +845 -38
- package/lib/{variants-D_oxWP_K.js → host-heartbeat-C98mqVKh.js} +237 -139
- package/lib/index.d.ts +67 -13
- package/lib/index.js +313 -8
- package/package.json +8 -8
package/README.en.md
CHANGED
|
@@ -60,7 +60,8 @@ Prerequisite: the WorkBuddy desktop app is installed and signed in. The plugin r
|
|
|
60
60
|
|
|
61
61
|
| Plugin | Required DSH core | Desktop app |
|
|
62
62
|
|---|---|---|
|
|
63
|
-
| **0.6.0 (dual-UI adaptive)** | `0.1.5-rc.1` / `rc.2` / `rc.3`; the `0.1.6-alpha` line (incl. `alpha.1` / `alpha.2`) and `0.1.6` stable; verified against `0.1.7-alpha.1` (`0.1.7` stable is inside the range too). **
|
|
63
|
+
| **0.6.0 (dual-UI adaptive)** | `0.1.5-rc.1` / `rc.2` / `rc.3`; the `0.1.6-alpha` line (incl. `alpha.1` / `alpha.2`) and `0.1.6` stable; verified against `0.1.7-alpha.1` (`0.1.7` stable is inside the range too). **Subsequent `0.1.x` prereleases (e.g. `0.1.8-alpha.x`) DO fall inside the `^0.1.7-alpha.1` arm** — the host's compatibility check resolves peer ranges with includePrerelease semantics (our earlier "not covered" claim was wrong; corrected here); prereleases crossing into `0.2.0` are the ones that need an explicit peer-range extension | `2.0.7`+ works today; desktop builds bundling `0.1.6+` will work too |
|
|
64
|
+
| **0.6.5** | adds `0.2.0-rc.1` on top of the `0.6.0` surface (`0.1.5` / `0.1.6` / `0.1.7` unchanged), verified on a real `0.2.0-rc.1` host (web: loading, catalogs, encrypted credentials, chat & image round-trips all fine). Releases up to and including `0.6.4` do not carry that range and are skipped wholesale by DSH `0.2.0-rc.1` (see [#63](https://github.com/corrinehu/dsh-workbuddy-connect/issues/63)) | `2.0.7`+; core compatibility extended to `0.2.0-rc.1` (verified on web; desktop builds not yet verified) |
|
|
64
65
|
| **0.3.2 – 0.5.4** (international support since `0.5.0`) | the `0.1.5-rc.1` line only (no `0.1.6+`; see [#41](https://github.com/corrinehu/dsh-workbuddy-connect/issues/41)) | `2.0.7`+ (bundled core `0.1.5-rc.1`) |
|
|
65
66
|
| **0.3.0 – 0.3.1** | `0.1.2-rc.1` | `2.0.5` |
|
|
66
67
|
| **0.2.6** | `0.1.1-rc.2` (older line) | `2.0.3` / `2.0.4` |
|
|
@@ -92,7 +93,7 @@ Prerequisite: the WorkBuddy desktop app is installed and signed in. The plugin r
|
|
|
92
93
|
```
|
|
93
94
|
|
|
94
95
|
- From `0.6.0` on, the Models settings page no longer shows the non-editable WorkBuddy / WorkBuddy AI cards (consistent across both core generations); the model picker, `/model`, and chat calls are unaffected.
|
|
95
|
-
- On DSH `0.1.5` / `0.1.6` / `0.1.7`, just install the latest: `dsh plugin --profile web add dsh-workbuddy-connect`
|
|
96
|
+
- On DSH `0.1.5` / `0.1.6` / `0.1.7` / `0.2.0-rc.1`, just install the latest: `dsh plugin --profile web add dsh-workbuddy-connect`
|
|
96
97
|
- Still on DSH `0.1.2-rc.1`? Stay on `0.3.1`: `dsh plugin --profile web add dsh-workbuddy-connect@0.3.1`
|
|
97
98
|
- Still on DSH `0.1.1-rc.2`? Stay on the older release: `dsh plugin --profile web add dsh-workbuddy-connect@0.2.6`
|
|
98
99
|
- The desktop app has bundled `0.1.5-rc.1` since `2.0.7`, so it can use the latest plugin directly; `2.0.5` and earlier apps (bundled `0.1.2-rc.1`) should stay on `0.3.1`
|
|
@@ -145,7 +146,7 @@ dsh plugin --profile web exec dsh-workbuddy-connect doctor --provider workbuddy-
|
|
|
145
146
|
## Known limitations
|
|
146
147
|
|
|
147
148
|
- Verified on macOS with the DSH Web / Desktop / TUI profiles (as of 0.3.2 this requires `0.1.5-rc.1`+ and Node 22+; TUI requires the terminal UI package `0.10.0-beta.5` or newer — see the Install section). Windows probes Local and Roaming AppData in order; WSL first reads credentials from the mounted Windows user profile. If the Windows and Linux user names differ and Windows environment variables are not forwarded into WSL, point `WORKBUDDY_AUTH_FILE` (or `WORKBUDDY_AI_AUTH_FILE` for the international version) at the actual file.
|
|
148
|
-
- **Encrypted desktop credential helper discovery**: the CN
|
|
149
|
+
- **Encrypted desktop credential helper discovery**: both the CN and international versions (whose credentials are encrypted since 5.6.2) use their own verified default path and app discovery on macOS; on Windows the CN version first checks `%LOCALAPPDATA%\Programs\WorkBuddy\WorkBuddy.exe` and then the WorkBuddy uninstall registry records, while the international version has no verified default install location and checks the registry records only. Each product locates and runs only its own app identity (bundle id / registry name / executable name), so neither can pick the other's app; both apps currently happening to share one at-rest key on a machine is an upstream coincidence the plugin does not rely on — if the keys diverge, the diagnosis is reported rather than a wrong open attempted. If automatic discovery still fails, set the product's variable — `WORKBUDDY_ELECTRON_BIN` for CN, `WORKBUDDY_AI_ELECTRON_BIN` for international (separate since 0.6.4; if you previously pointed `WORKBUDDY_ELECTRON_BIN` at the international app, switch to the new variable and clear the old one) — then fully quit and restart DSH (the variable is read when the plugin is constructed); on Windows, sign out and back in first if possible (explorer caches the old environment block). Linux has no built-in auto-discovery; the card offers Agent Assist when needed, while an explicit environment path remains supported.
|
|
149
150
|
- **The international version's model catalog comes from the app's own interface**: the service splits it by User-Agent, which is a private implementation detail that a server-side change can break. When that happens the plugin degrades to this account's last successful catalog and then to its built-in roster, showing the source (live / saved / built-in), the fetch time, and the failure reason on the card — but long-term compatibility is not guaranteed. The CN version's catalog uses the same interface as the official CLI and is unaffected.
|
|
150
151
|
- **International-version environments not yet covered**: on Windows / WSL / Linux no reliable source for the international app's version has been located yet, so the saved value or the built-in default is used. On macOS, real-shim checks covered complete GPT-family replies, tool calls, and continued turns.
|
|
151
152
|
- **Behaviour change with no credentials**: a version whose app was never signed in — and that left no plugin-owned copy — no longer shows a model group. The CN version used to display a built-in fallback list, but every model on it failed when selected.
|
package/README.md
CHANGED
|
@@ -70,7 +70,8 @@ WorkBuddy 中模型的推理档位信息目前分散在上游接口与客户端
|
|
|
70
70
|
|
|
71
71
|
| 插件版本 | 要求的 DSH 核心 | 桌面 App |
|
|
72
72
|
|---|---|---|
|
|
73
|
-
| **0.6.0(双界面自适应)** | `0.1.5-rc.1` / `rc.2` / `rc.3`;`0.1.6-alpha` 系列(含 `alpha.1` / `alpha.2`)与 `0.1.6` 正式版;已实测 `0.1.7-alpha.1`(`0.1.7`
|
|
73
|
+
| **0.6.0(双界面自适应)** | `0.1.5-rc.1` / `rc.2` / `rc.3`;`0.1.6-alpha` 系列(含 `alpha.1` / `alpha.2`)与 `0.1.6` 正式版;已实测 `0.1.7-alpha.1`(`0.1.7` 正式版同样在范围内)。**后续 `0.1.x` prerelease(如 `0.1.8-alpha.x`)同样落在 `^0.1.7-alpha.1` 区间内**——宿主兼容判定按 includePrerelease 语义解析 peer range(早先「不自动覆盖」的说法有误,已更正);跨入 `0.2.0` 的 prerelease 才需要插件显式扩展 peer range | `2.0.7`+ 可直接使用;搭载 `0.1.6+` 核心的桌面版发布后同样适用 |
|
|
74
|
+
| **0.6.5** | 在 `0.6.0` 的支持面上追加 `0.2.0-rc.1`(`0.1.5` / `0.1.6` / `0.1.7` 支持不变),已在 `0.2.0-rc.1` 真机实测(web 端:加载、目录、加密凭据、对话与图片往返正常)。已发布的 `0.6.4` 及更早版本不含该区间,在 DSH `0.2.0-rc.1` 上会被宿主整体跳过(见 [#63](https://github.com/corrinehu/dsh-workbuddy-connect/issues/63)) | `2.0.7`+;核心兼容范围已扩展至 `0.2.0-rc.1`(web 端已实测,桌面版待实测) |
|
|
74
75
|
| **0.3.2 – 0.5.4**(国际版支持自 `0.5.0`) | `0.1.5-rc.1` 系列(不支持 `0.1.6+`,见 [#41](https://github.com/corrinehu/dsh-workbuddy-connect/issues/41)) | `2.0.7`+(内置核心已跟进 `0.1.5-rc.1`) |
|
|
75
76
|
| **0.3.0 – 0.3.1** | `0.1.2-rc.1` | `2.0.5` |
|
|
76
77
|
| **0.2.6** | `0.1.1-rc.2`(旧线) | `2.0.3` / `2.0.4` |
|
|
@@ -101,7 +102,7 @@ WorkBuddy 中模型的推理档位信息目前分散在上游接口与客户端
|
|
|
101
102
|
```
|
|
102
103
|
|
|
103
104
|
- 自 `0.6.0` 起,Models 设置页不再显示 WorkBuddy / WorkBuddy AI 的不可编辑卡片(两代核心行为一致);模型选择器、`/model` 与对话调用不受影响。
|
|
104
|
-
- DSH `0.1.5` / `0.1.6` / `0.1.7` 的用户,安装最新版即可:`dsh plugin --profile web add dsh-workbuddy-connect`
|
|
105
|
+
- DSH `0.1.5` / `0.1.6` / `0.1.7` / `0.2.0-rc.1` 的用户,安装最新版即可:`dsh plugin --profile web add dsh-workbuddy-connect`
|
|
105
106
|
- 还在用 DSH `0.1.2-rc.1` 的用户,请停留在 `0.3.1`:`dsh plugin --profile web add dsh-workbuddy-connect@0.3.1`
|
|
106
107
|
- 还在用 DSH `0.1.1-rc.2` 的用户,请停留在 `0.2.6`:`dsh plugin --profile web add dsh-workbuddy-connect@0.2.6`
|
|
107
108
|
- 桌面 App 自 `2.0.7` 起内置核心已是 `0.1.5-rc.1`,可直接使用最新版插件;`2.0.5` 及更早的 App(内置 `0.1.2-rc.1`)请继续使用 `0.3.1`
|
|
@@ -154,7 +155,7 @@ dsh plugin --profile web exec dsh-workbuddy-connect doctor --provider workbuddy-
|
|
|
154
155
|
## 已知限制
|
|
155
156
|
|
|
156
157
|
- 在 macOS 的 DSH Web / Desktop / TUI 下验证通过(0.3.2 起要求 `0.1.5-rc.1`+、Node 22+;TUI 需终端界面插件 `0.10.0-beta.5` 及以上,见安装章节说明)。Windows 会依次探测 Local 与 Roaming AppData;WSL 会优先从挂载的 Windows 用户目录读取登录凭据。若 Windows 与 Linux 用户名不同且 Windows 环境变量未传入 WSL,请通过 `WORKBUDDY_AUTH_FILE`(国际版为 `WORKBUDDY_AI_AUTH_FILE`)指定实际位置。
|
|
157
|
-
-
|
|
158
|
+
- **加密桌面凭据的解密程序定位**:国内版与国际版(WorkBuddy AI 的凭据自 5.6.2 起同样加密)在 macOS 使用各自的默认路径与 App 发现;Windows 上国内版先检查 `%LOCALAPPDATA%\Programs\WorkBuddy\WorkBuddy.exe` 再查卸载注册表记录,国际版没有已验证的默认安装位置、仅查注册表记录。两个产品只按各自的 App 身份(bundle id / 注册表名 / 可执行文件名)定位与执行解密程序,不会互相误选;同机两个 App 当前恰好共用同一把静态保护密钥,这属于上游实现的巧合,插件不依赖它,密钥分叉后会如实报诊断而不是误读。若自动定位仍不可用,可按产品设置环境变量:国内版 `WORKBUDDY_ELECTRON_BIN`、国际版 `WORKBUDDY_AI_ELECTRON_BIN`(两变量自 0.6.4 起分离;此前把 `WORKBUDDY_ELECTRON_BIN` 指向过国际版 App 的用户请改用新变量并清理旧值),设置后需完全退出并重启 DSH(插件在构造时读取该变量);Windows 上建议注销重登后再启动(explorer 会缓存旧的环境块)。Linux 没有内置自动定位;失败时卡片提供 Agent Assist,显式环境变量仍可用。
|
|
158
159
|
- **国际版的模型目录来自 App 界面接口**:服务端按 User-Agent 分流下发,属私有实现,上游改动可能使其失效。届时插件按「本账号上次成功目录 → 内置目录」降级,并在卡片上标明来源(实时 / 已保存 / 内置)、更新时间与失败原因,但不能保证长期兼容。国内版目录走官方 CLI 同款接口,不受此影响。
|
|
159
160
|
- **国际版仍未覆盖的环境**:Windows / WSL / Linux 下国际版 App 的版本读取尚未找到可靠来源,会退回最近保存的版本或内置值。macOS 上已通过真实 shim 验证 GPT 系完整回复、工具调用与续轮。
|
|
160
161
|
- **无凭据时的行为变化**:某版 App 从未登录、也没留下插件自留副本时,该版模型分组不再显示。此前国内版会显示一份内置兜底列表,但那些模型选了必然报错。
|
package/lib/bin.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
2
|
+
import { C as WORKBUDDY_VARIANTS, O as WorkBuddyUpstreamClient, S as CN_VARIANT, Z as resolveAppVersion, a as readHostHeartbeat, b as atRestKeyProviderFor, c as WORKBUDDY_CONNECT_VERSION, l as FALLBACK_WORKBUDDY_AI_MODELS, m as WorkBuddyCredentialStore, o as workbuddyHostHeartbeatPath, r as isHeartbeatProcessAlive, u as FALLBACK_WORKBUDDY_MODELS, w as variantFor } from "./host-heartbeat-C98mqVKh.js";
|
|
3
3
|
import { realpathSync } from "node:fs";
|
|
4
4
|
import { fileURLToPath } from "node:url";
|
|
5
5
|
//#region src/bin.ts
|
|
@@ -29,18 +29,16 @@ function printJson(value) {
|
|
|
29
29
|
/**
|
|
30
30
|
* One variant's store plus the client that performs its refreshes.
|
|
31
31
|
*
|
|
32
|
-
* The key provider is
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
* `discovery: 'none'`, and relying on it here would quietly strip the CN CLI
|
|
36
|
-
* of the decryption it has always had.
|
|
32
|
+
* The key provider is built by the same shared helper the plugin host uses,
|
|
33
|
+
* so the CLI's `doctor`/`status` and the browser card can never disagree
|
|
34
|
+
* about which product's Electron a variant resolves.
|
|
37
35
|
*/
|
|
38
36
|
function makeStore(variant) {
|
|
39
37
|
const client = new WorkBuddyUpstreamClient();
|
|
40
38
|
return new WorkBuddyCredentialStore({
|
|
41
39
|
variant,
|
|
42
40
|
refresh: (credential) => client.refreshToken(credential),
|
|
43
|
-
keyProvider:
|
|
41
|
+
keyProvider: atRestKeyProviderFor(variant)
|
|
44
42
|
});
|
|
45
43
|
}
|
|
46
44
|
/** The plugin-owned credential copy for one variant, for display. */
|