dsh-workbuddy-connect 0.5.4 → 0.6.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 CHANGED
@@ -20,7 +20,15 @@ Both the CN **WorkBuddy** and the international **WorkBuddy AI** apps are suppor
20
20
 
21
21
  - **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.
22
22
 
23
- - **Status and detection**: Settings → Plugins → the matching card shows the account, token validity, remaining credit, and model offers. It also lets you refresh the model list manually and shows whether the current list came from the upstream or from the built-in fallback, and provides manual reasoning-level detection for eligible models.
23
+ - **Status and detection**: Settings → Plugins → the matching card shows the account, token validity, remaining credit, and model offers (on DSH `0.1.6+` the entry lives in the left sidebar Plugins panel — see the version table below). It also lets you refresh the model list manually and shows whether the current list came from the upstream or from the built-in fallback, and provides manual reasoning-level detection for eligible models.
24
+
25
+ - **Model visibility**: both WorkBuddy and WorkBuddy AI cards (Context window tab) let you check which models appear in the model picker. Hidden lists are **saved per signed-in account**: switching accounts switches to that account's own list, switching back restores it; new accounts and newly added models are visible by default. Hiding only affects pickability — **existing chats using a hidden model keep working**.
26
+
27
+ ![Model visibility in the context-window list (DSH 0.1.6+ plugin configuration page)](assets/6.png)
28
+
29
+ The same UI works unchanged inside the DSH 0.1.5 settings cards:
30
+
31
+ ![Model visibility in a DSH 0.1.5 settings card](assets/7.png)
24
32
 
25
33
  - **Enterprise credit**: on the CN product, enterprise accounts (non-empty `enterpriseId`) read their cycle quota from the enterprise billing endpoint, and the card shows an "enterprise quota" row with the cycle reset time.
26
34
 
@@ -48,18 +56,46 @@ For models without declared levels, Web and Desktop instead use user-authorized,
48
56
 
49
57
  Prerequisite: the WorkBuddy desktop app is installed and signed in. The plugin reuses the app's sign-in state and follows account switches automatically; the same applies to the international WorkBuddy AI app, and the two do not affect each other.
50
58
 
51
- **Match the plugin version to your DSH core** — a mismatched combination fails to start DSH:
59
+ **Match the plugin version to your DSH core** — from **`0.6.0`** on, one plugin version spans both core generations, removing the per-version pairing; earlier releases still pair one-to-one, and a mismatched combination fails to start DSH:
52
60
 
53
61
  | Plugin | Required DSH core | Desktop app |
54
62
  |---|---|---|
55
- | **0.3.2+** (international support since `0.5.0`) | `0.1.5-rc.1` or newer | `2.0.7`+ (bundled core `0.1.5-rc.1`) |
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). **Newer prereleases (e.g. `0.1.8-alpha.x`) are NOT covered automatically** — the plugin must extend its peer range first | `2.0.7`+ works today; desktop builds bundling `0.1.6+` will work too |
64
+ | **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`) |
56
65
  | **0.3.0 – 0.3.1** | `0.1.2-rc.1` | `2.0.5` |
57
66
  | **0.2.6** | `0.1.1-rc.2` (older line) | `2.0.3` / `2.0.4` |
58
67
 
59
- - On DSH `0.1.5-rc.1` or newer, just install the latest: `dsh plugin --profile web add dsh-workbuddy-connect`
68
+ - **`0.6.0` does not require upgrading to DSH `0.1.6` just to install WorkBuddy Connect**: the plugin adapts to whichever configuration surface the host actually provides at load time — `0.1.5` and `0.1.6+` each get their own UI, independently.
69
+ - **Where the cards live depends on the DSH version** — each generation has its own place:
70
+
71
+ ```text
72
+ DSH 0.1.5 + this plugin
73
+ ├─ Settings → Models
74
+ │ └─ no WorkBuddy rows ← unified with 0.1.6+ (only plugins ≤0.5.4 still showed those old
75
+ │ configurable-provider rows)
76
+ ├─ Settings → Plugins
77
+ │ ├─ DSH WorkBuddy Connect ✅ config card (CN)
78
+ │ └─ DSH WorkBuddy AI Connect ✅ config card (international)
79
+ └─ chat model picker
80
+ └─ WorkBuddy / WorkBuddy AI groups ✅
81
+
82
+ DSH 0.1.6+ + this plugin
83
+ ├─ Settings → Models
84
+ │ └─ no WorkBuddy rows ← intentional, consistent across both generations
85
+ ├─ Settings → Built-in Plugins
86
+ │ └─ workbuddy-connect ← read-only inventory (runtime status), no config entry
87
+ ├─ main UI → Plugins → workbuddy-connect → View
88
+ │ ├─ DSH WorkBuddy Connect ✅ new config entry (CN)
89
+ │ └─ DSH WorkBuddy AI Connect ✅ new config entry (international)
90
+ └─ chat model picker
91
+ └─ WorkBuddy / WorkBuddy AI groups ✅
92
+ ```
93
+
94
+ - 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`
60
96
  - Still on DSH `0.1.2-rc.1`? Stay on `0.3.1`: `dsh plugin --profile web add dsh-workbuddy-connect@0.3.1`
61
97
  - Still on DSH `0.1.1-rc.2`? Stay on the older release: `dsh plugin --profile web add dsh-workbuddy-connect@0.2.6`
62
- - The desktop app has bundled `0.1.5-rc.1` since `2.0.7`, so it can use `0.3.2` and newer directly; `2.0.5` and earlier apps (bundled `0.1.2-rc.1`) should stay on `0.3.1`
98
+ - 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`
63
99
 
64
100
  The plugin runs under all three DSH interfaces: **Web**, **Desktop**, and **TUI**. Pick the install command that matches the profile you use.
65
101
 
package/README.md CHANGED
@@ -28,7 +28,15 @@
28
28
  - **推理档位**:WorkBuddy 明确声明的档位会直接显示,例如 GLM-5.3 和 GLM-5.3-Flash 可选 low / high / max。对于部分没有声明可选档位的模型,Web 和 Desktop 可在模型选择器中点击「推理等级」手动检测;检测会发送少量请求,可能消耗积分。未检测或没有可用档位的模型仍使用 WorkBuddy 的默认档位。
29
29
 
30
30
 
31
- - **信息查看与检测**:设置 → 插件 → 对应卡片可查看账号、令牌有效期、剩余积分和模型优惠;也可以手动刷新模型列表,并在卡片上看到当前列表来自上游还是内置兜底。对于可检测模型,也可以在这里手动检测推理档位。
31
+ - **信息查看与检测**:设置 → 插件 → 对应卡片可查看账号、令牌有效期、剩余积分和模型优惠(DSH `0.1.6+` 上入口在左侧栏「插件」面板,见下方版本对应一节);也可以手动刷新模型列表,并在卡片上看到当前列表来自上游还是内置兜底。对于可检测模型,也可以在这里手动检测推理档位。
32
+
33
+ - **模型显隐**:WorkBuddy 与 WorkBuddy AI 都可以在对应卡片的「上下文窗口」标签里勾选要在模型选择器中显示的模型。隐藏配置**按登录账号分别保存**:切换账号自动切换各自的配置,切回后恢复;新账号和新上架的模型默认显示。隐藏只影响选择器里的可选性,**正在使用该模型的已有会话不受影响**。
34
+
35
+ ![上下文窗口列表里的模型显隐(DSH 0.1.6+ 插件配置页)](assets/6.png)
36
+
37
+ 同一份界面在 DSH 0.1.5 的设置卡片中原样生效:
38
+
39
+ ![DSH 0.1.5 设置卡片中的模型显隐](assets/7.png)
32
40
 
33
41
  - **企业账号积分**:国内版企业账号(`enterpriseId` 非空)走企业专用计费接口读取周期额度,卡片显示「企业额度」与周期重置时间。
34
42
 
@@ -58,18 +66,45 @@ WorkBuddy 中模型的推理档位信息目前分散在上游接口与客户端
58
66
 
59
67
  前置:已安装并登录 WorkBuddy 桌面 App。插件复用 App 的登录状态,账号切换自动跟随;装了国际版 WorkBuddy AI 的同样适用,两版互不影响。
60
68
 
61
- **版本对应(重要)**:本插件与 DSH 核心版本一一对应,不可混用——不匹配的组合会导致 DSH 启动失败:
69
+ **版本对应(重要)**:自 **`0.6.0`** 起,同一个插件版本横跨两代 DSH 核心,安装时无需再逐版本对照;更早的已发布版本仍与核心一一对应,不可混用——不匹配的组合会导致 DSH 启动失败:
62
70
 
63
71
  | 插件版本 | 要求的 DSH 核心 | 桌面 App |
64
72
  |---|---|---|
65
- | **0.3.2+**(国际版支持自 `0.5.0`) | `0.1.5-rc.1` 及以上 | `2.0.7`+(内置核心已跟进 `0.1.5-rc.1`) |
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` 正式版同样在范围内)。**更新的 prerelease(如 `0.1.8-alpha.x`)不自动覆盖**,需插件显式跟进 peer range 后才支持 | `2.0.7`+ 可直接使用;搭载 `0.1.6+` 核心的桌面版发布后同样适用 |
74
+ | **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`) |
66
75
  | **0.3.0 – 0.3.1** | `0.1.2-rc.1` | `2.0.5` |
67
76
  | **0.2.6** | `0.1.1-rc.2`(旧线) | `2.0.3` / `2.0.4` |
68
77
 
69
- - DSH `0.1.5-rc.1` 及以上的用户,正常安装最新版即可:`dsh plugin --profile web add dsh-workbuddy-connect`
78
+ - **计划中的 `0.6.0` 不要求为了安装 WorkBuddy Connect 强制升级到 DSH `0.1.6`**:插件在加载时按宿主实际提供的配置入口自适应,`0.1.5` 与 `0.1.6+` 各自走各自的界面,互不干扰。
79
+ - **配置入口随 DSH 版本不同**,两代各就各位:
80
+
81
+ ```text
82
+ DSH 0.1.5 + 本插件
83
+ ├─ 设置 → 模型
84
+ │ └─ 不显示 WorkBuddy 两行 ← 与 0.1.6+ 统一(≤0.5.4 旧版插件才显示那两行旧 configurable-provider 条目)
85
+ ├─ 设置 → 插件
86
+ │ ├─ DSH WorkBuddy Connect ✅ 配置卡片(国内版)
87
+ │ └─ DSH WorkBuddy AI Connect ✅ 配置卡片(国际版)
88
+ └─ 聊天模型选择器
89
+ └─ WorkBuddy / WorkBuddy AI 分组 ✅
90
+
91
+ DSH 0.1.6+ + 本插件
92
+ ├─ 设置 → 模型
93
+ │ └─ 不显示 WorkBuddy 两行 ← 有意如此,两代行为统一
94
+ ├─ 设置 → 内置插件
95
+ │ └─ workbuddy-connect ← 只读清单(运行状态),无配置入口,别找错地方
96
+ ├─ 主界面 → 插件 → workbuddy-connect → 查看
97
+ │ ├─ DSH WorkBuddy Connect ✅ 新配置入口(国内版)
98
+ │ └─ DSH WorkBuddy AI Connect ✅ 新配置入口(国际版)
99
+ └─ 聊天模型选择器
100
+ └─ WorkBuddy / WorkBuddy AI 分组 ✅
101
+ ```
102
+
103
+ - 自 `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`
70
105
  - 还在用 DSH `0.1.2-rc.1` 的用户,请停留在 `0.3.1`:`dsh plugin --profile web add dsh-workbuddy-connect@0.3.1`
71
106
  - 还在用 DSH `0.1.1-rc.2` 的用户,请停留在 `0.2.6`:`dsh plugin --profile web add dsh-workbuddy-connect@0.2.6`
72
- - 桌面 App 自 `2.0.7` 起内置核心已是 `0.1.5-rc.1`,可直接使用 `0.3.2` 及以上版本;`2.0.5` 及更早的 App(内置 `0.1.2-rc.1`)请继续使用 `0.3.1`
107
+ - 桌面 App 自 `2.0.7` 起内置核心已是 `0.1.5-rc.1`,可直接使用最新版插件;`2.0.5` 及更早的 App(内置 `0.1.2-rc.1`)请继续使用 `0.3.1`
73
108
 
74
109
  插件在三种 DSH 界面下均可运行:**Web**、**Desktop**、**TUI**。根据你使用的 profile 选对应命令安装。
75
110
 
package/lib/bin.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { E as WorkBuddyUpstreamClient, J as resolveAppVersion, b as WorkBuddyCredentialStore, f as WORKBUDDY_CONNECT_VERSION, g as FALLBACK_WORKBUDDY_MODELS, h as FALLBACK_WORKBUDDY_AI_MODELS, i as variantFor, l as readHostHeartbeat, n as CN_VARIANT, r as WORKBUDDY_VARIANTS, s as isHeartbeatProcessAlive, u as workbuddyHostHeartbeatPath } from "./variants-XUStsapF.js";
2
+ import { D as WorkBuddyUpstreamClient, Y as resolveAppVersion, b as WorkBuddyCredentialStore, f as WORKBUDDY_CONNECT_VERSION, g as FALLBACK_WORKBUDDY_MODELS, h as FALLBACK_WORKBUDDY_AI_MODELS, i as variantFor, l as readHostHeartbeat, n as CN_VARIANT, r as WORKBUDDY_VARIANTS, s as isHeartbeatProcessAlive, u as workbuddyHostHeartbeatPath } from "./variants-CnrmSn0Q.js";
3
3
  import { realpathSync } from "node:fs";
4
4
  import { fileURLToPath } from "node:url";
5
5
  //#region src/bin.ts
@@ -46,9 +46,12 @@ async function doctor(jsonOutput, variant) {
46
46
  const store = makeStore(variant);
47
47
  const status = await store.status();
48
48
  const desktopPresent = await store.desktopFilePresent();
49
+ const desktopFormat = await store.desktopAuthFormat();
50
+ const desktopPath = await store.resolvedDesktopAuthPath() ?? store.desktopAuthPath();
49
51
  const heartbeat = await readHostHeartbeat();
50
52
  const hostAlive = heartbeat !== void 0 && isHeartbeatProcessAlive(heartbeat);
51
53
  const appVersion = variant.region === "global" ? await resolveAppVersion() : void 0;
54
+ const decryptionNote = status.state === "signed-out" && desktopFormat === "encrypted" && status.reason !== void 0 ? `Encrypted desktop credential could not be used: ${status.reason}` : void 0;
52
55
  const report = {
53
56
  schemaVersion: JSON_SCHEMA_VERSION,
54
57
  package: "dsh-workbuddy-connect",
@@ -57,8 +60,9 @@ async function doctor(jsonOutput, variant) {
57
60
  provider: variant.id,
58
61
  displayName: variant.displayName,
59
62
  desktopAuthFile: {
60
- path: store.desktopAuthPath() ?? `(no platform default; set ${variant.env})`,
61
- present: desktopPresent
63
+ path: desktopPath ?? `(no platform default; set ${variant.env})`,
64
+ present: desktopPresent,
65
+ format: desktopFormat
62
66
  },
63
67
  ownAuthFile: ownAuthPath(variant),
64
68
  ...appVersion === void 0 ? {} : { catalogUserAgent: {
@@ -78,15 +82,18 @@ async function doctor(jsonOutput, variant) {
78
82
  signIn: status.state,
79
83
  fallbackModels: fallbackCount(variant),
80
84
  hints: [
81
- ...status.state === "signed-in" ? [] : [`Sign in once in the ${variant.appName} desktop app, then run status again.`],
85
+ ...decryptionNote !== void 0 ? [decryptionNote] : status.state === "signed-out" ? [`Sign in once in the ${variant.appName} desktop app, then run status again.`] : [],
82
86
  ...desktopPresent ? [] : [`No ${variant.appName} desktop auth file at the expected path; set ${variant.env} if it lives elsewhere.`],
83
87
  ...hostAlive ? [] : ["Host bundle not running in this DSH profile (or the process exited). The browser card and provider are unavailable until DSH starts the plugin."]
84
88
  ]
85
89
  };
86
- if (jsonOutput) printJson(report);
90
+ if (jsonOutput) printJson({
91
+ ...report,
92
+ ...decryptionNote === void 0 ? {} : { decryptionNote }
93
+ });
87
94
  else process.stdout.write([
88
95
  `${variant.displayName} Connect ${WORKBUDDY_CONNECT_VERSION} on ${process.version}`,
89
- `Desktop auth file: ${report.desktopAuthFile.present ? "present" : "missing"} (${report.desktopAuthFile.path})`,
96
+ `Desktop auth file: ${report.desktopAuthFile.present ? "present" : "missing"} — ${desktopFormat} (${report.desktopAuthFile.path})`,
90
97
  `Host bundle: ${hostAlive ? `running (pid ${heartbeat.pid})` : heartbeat !== void 0 ? "stale heartbeat (process exited)" : "not started"}`,
91
98
  `Sign-in state: ${report.signIn}`,
92
99
  `Static fallback models: ${report.fallbackModels}`,