dsh-connect-workbuddy 4.9.0 → 4.9.1
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 +34 -13
- package/lib/bin.js +1 -1
- package/lib/client.js +19 -2
- package/lib/{host-heartbeat-CS6PxirW.js → host-heartbeat-DahwuDGO.js} +1 -1
- package/lib/index.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,21 +1,25 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## 4.
|
|
3
|
+
## 4.9.1 (2026-10-19)
|
|
4
4
|
|
|
5
|
-
> 版本号是 **patch
|
|
5
|
+
> 版本号是 **patch**:只改账号池里两枚「当前使用」徽章的配色,外加一处 CHANGELOG 排序修正;不改请求、响应、计费、排序规则或任何配置项。发往上游的请求体与 4.9.0 逐字节相同。
|
|
6
6
|
|
|
7
|
-
###
|
|
7
|
+
### Fixes
|
|
8
8
|
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
|
|
13
|
-
|
|
|
14
|
-
|
|
|
15
|
-
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
-
|
|
9
|
+
- **账号池的两枚「当前使用」徽章改成实心绿底 + 白字**
|
|
10
|
+
- **原来错在哪**:两枚徽章(`src/client/styles.ts:303` 的区块标题行、`:353` 的表格行内)的颜色由**两个互不相干的来源**拼成 —— 底色是写死的淡蓝 `rgba(86,134,254,.16)`,字色却取 `--dsw-alias-brand-primary`。后者是宿主主题的**对比色**(见同文件约 118 行那条 checkbox 注释:它曾被用来画勾选框,在浅色主题下把格子涂成沉重的黑色药丸),于是同一枚徽章在浅色主题下是「近黑字 + 淡蓝底」,读起来像一条**禁用标签**,而不是「这一行正在服务」。
|
|
11
|
+
- **为什么底色也要一起换**:只把字改成绿色(4.9.0 之后内部试过的一版)仍然是一枚**淡色药丸上的彩色小字**,属于安静的批注。徽章存在的全部意义就是让人一眼找到正在服务的那一行,需要找的东西不算数。所以改成填充态:绿底本身就是底,白字压在上面。
|
|
12
|
+
- **现在的形状**:
|
|
13
|
+
| 片段 | 值 | 说明 |
|
|
14
|
+
| --- | --- | --- |
|
|
15
|
+
| 背景 | `var(--dsw-alias-state-success-primary,#22c55e)` | 与右列「已签到」「✓ 可用」**同一个绿**,跟随主题(深色 `#22c55e` / 浅色 `#16a34a`) |
|
|
16
|
+
| 文字 | `#fff` | 直接写死而非取 token:字色与底色各走一路,正是这条故障的成因 |
|
|
17
|
+
| 描边 | `1px solid rgba(34,197,94,.55)` | 主题把 success 改成深色时,防止药丸与行底色糊在一起 |
|
|
18
|
+
- **对比度要说准**:白字在 `#22c55e` 上约 **2.2:1**、在 `#16a34a` 上约 **3.3:1**,低于正文 4.5:1 的门槛。这是有意的取舍,已写在 CSS 注释里:徽章保持 11–12px **粗体**、只承载两个字的短标签,先被当作「形状」看见,再被当作字读到。若要更硬的对比需改深绿底(`#15803d`,白字约 4.9:1),本版没这么做。
|
|
19
|
+
- **刻意没动的**:账号名左侧那条实心色条(`:343`)、手动排序的「第 N 位」排名徽章(`:357`)、↑↓ 按钮的 hover 态(`:359`)、行底色(`:325`/`:329`)仍用 `brand-primary`。它们描摹的是「顺序」与「可操作性」,与「是不是我在用的那个」是两件事 —— 4.8.1 之前那版正因为把一种颜色同时用于多件事才读不出来。
|
|
20
|
+
- **测试**:`tests/client-host-contract.spec.ts` 新增用例,逐个选择器从提取出的 CSS 里断言「绿底 + `color:#fff`」,同时钉住两条**不得回归**:不得再出现 `brand-primary`,不得再出现淡蓝 `rgba(86,134,254,.16)`。按选择器逐条断言而非全文断言,是为了防止其中一枚悄悄改回去而测试仍然通过。
|
|
21
|
+
- **`CHANGELOG.md` 的版本节顺序修正**
|
|
22
|
+
- 4.9.0 上次发布时被插到了 4.8.2 **之后**,最新版本不在最上面。本版把 4.9.0 一节移回 4.8.2 之前;两节正文一字未改。
|
|
19
23
|
|
|
20
24
|
## 4.9.0 (2026-10-18)
|
|
21
25
|
|
|
@@ -39,6 +43,23 @@
|
|
|
39
43
|
- **没有一并「修」掉的**:同区内换模型仍降级(那是真的换了模型,thinking 签名对新模型未必有效,保留才是错的);升级前录进历史的消息带旧的按区域 id,重放时仍按旧规则降级,但只会越聊越少,不影响新录的消息。真正的修法仍在上游:`isSameModel` 应当能读「provider 等价组」声明,而不是让插件去伪装身份。
|
|
40
44
|
- **测试如何证明**:`transformMessages` 上跑了两组对照 —— 旧的一对按区域 id 复现出 `[text, text]`(这正是报告的成因),新的一对给出 `[thinking, text]` 且正文原样保留;另有一条断言**不同 model id 仍然降级**,防止这次修复被误读成「任何模型都算同一个」。本地 pi-ai 0.85.1 与宿主 1.1.0 在这条判据上的行为已分别核对一致。
|
|
41
45
|
|
|
46
|
+
## 4.8.2 (2026-10-18)
|
|
47
|
+
|
|
48
|
+
> 版本号是 **patch**:只改积分面板第二行的文字配色,不改请求、响应、计费、排序或任何配置项。`stateTone` 的判定、圆点的颜色规则、行的顺序都与本版之前完全相同。
|
|
49
|
+
|
|
50
|
+
### Changes
|
|
51
|
+
|
|
52
|
+
- **积分面板第二行的「当前选用」改成绿色**
|
|
53
|
+
- **原来错在哪**:`ComposerCredits.tsx` 把那两个事实拼成**一个** span —— `detailLine(当前选用, 被限流 · 约 6 小时后)`。一个 span 只能有一种颜色,而它挂的是 `.dsm-workbuddy-composer-panel-mark`,颜色是原因用的琥珀色 `--dsw-alias-state-warn-primary`。于是「当前选用」这句陈述事实的话,被涂成了问题的颜色:在一张「被限流」的表格里,它看起来像第三种警告。
|
|
54
|
+
- **现在的形状**:第二行拆成两个 span,各得各的语气 ——
|
|
55
|
+
| 片段 | 类名 | 颜色 | 出现在 |
|
|
56
|
+
| --- | --- | --- | --- |
|
|
57
|
+
| 当前选用 | `.dsm-workbuddy-composer-panel-mark-current` | `--dsw-alias-state-success-primary`(绿) | 正在服务本 tab 的那一行 |
|
|
58
|
+
| 被限流 · 约 X 小时后 | `.dsm-workbuddy-composer-panel-mark-reason` | `--dsw-alias-state-warn-primary`(琥珀,**未变**) | 用不了的行 |
|
|
59
|
+
- **分隔符改由 CSS 画**:两个 span 之间的 ` · ` 来自相邻兄弟选择器 `-current + -reason::before{content:" · "}`,所以把这一行当**纯文本**读出来仍是 `当前选用 · 被限流 · 约 6 小时后` —— 行 `title` 的悬浮提示、`th` 的 `aria-label`、以及既有的字符串断言都不受影响。这也是没有把两段文案在 TS 里拼成一个字符串的原因:拼了就没法给它们分别上色。
|
|
60
|
+
- **刻意没动的**:圆点的颜色规则(能用=绿、不能用=红、未测=灰)与 `stateTone` 的判定一行未改。选哪个颜色回答的是「能不能用」,第二行回答的是「是不是我在用的那个」,这两条规则各自独立 —— 4.8.1 之前那一版正是因为把颜色同时用于两件事才读不出来。
|
|
61
|
+
- **测试**:`tests/composer-credits-render.spec.tsx` 新增用例钉住「选中为独立绿色 span、原因为独立琥珀 span、两者共存仍不合并」,颜色断言直接从 `WORKBUDDY_COMPOSER_CSS` 里读规则,而不是断言类名存在就算过。
|
|
62
|
+
|
|
42
63
|
## 4.8.1 (2026-10-18)
|
|
43
64
|
|
|
44
65
|
> 版本号是 **patch**:只改卡片界面的样式与排版,不改请求、响应、计费或任何配置项。发往上游的请求体与本版之前逐字节相同。
|
package/lib/bin.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { C as defaultDesktopAuthDirs, F as WorkBuddyUpstreamClient, K as WORKBUDDY_APP_EXECUTABLE_ENV, O as legacyWorkbuddyOwnAuthPath, Q as findWorkbuddyAppExecutableWithSource, S as defaultDesktopAuthCandidates, a as readHostHeartbeat, c as WORKBUDDY_CONNECT_VERSION, d as FALLBACK_WORKBUDDY_MODELS_GLOBAL, j as workbuddyOwnAuthPath, l as piAiRuntimeInfo, o as workbuddyHostHeartbeatPath, ot as hostPeersInfo, r as isHeartbeatProcessAlive, u as FALLBACK_WORKBUDDY_MODELS, v as WORKBUDDY_AUTH_FILE_ENV, y as WorkBuddyCredentialStore } from "./host-heartbeat-
|
|
2
|
+
import { C as defaultDesktopAuthDirs, F as WorkBuddyUpstreamClient, K as WORKBUDDY_APP_EXECUTABLE_ENV, O as legacyWorkbuddyOwnAuthPath, Q as findWorkbuddyAppExecutableWithSource, S as defaultDesktopAuthCandidates, a as readHostHeartbeat, c as WORKBUDDY_CONNECT_VERSION, d as FALLBACK_WORKBUDDY_MODELS_GLOBAL, j as workbuddyOwnAuthPath, l as piAiRuntimeInfo, o as workbuddyHostHeartbeatPath, ot as hostPeersInfo, r as isHeartbeatProcessAlive, u as FALLBACK_WORKBUDDY_MODELS, v as WORKBUDDY_AUTH_FILE_ENV, y as WorkBuddyCredentialStore } from "./host-heartbeat-DahwuDGO.js";
|
|
3
3
|
import { realpathSync } from "node:fs";
|
|
4
4
|
import { fileURLToPath } from "node:url";
|
|
5
5
|
//#region src/bin.ts
|
package/lib/client.js
CHANGED
|
@@ -3822,7 +3822,24 @@ window.__ModuleLoader__.load({
|
|
|
3822
3822
|
* space-between, so it stays on the right edge even if a future change adds a
|
|
3823
3823
|
* child or removes one. */
|
|
3824
3824
|
.dsm-workbuddy-pool-head{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
|
|
3825
|
-
|
|
3825
|
+
/* SOLID badge: white ink on the success green itself, plus a matching hairline.
|
|
3826
|
+
*
|
|
3827
|
+
* This is deliberately a stronger stop than a tinted pill. Green TEXT on the old
|
|
3828
|
+
* pale-blue tint still read as a quiet annotation — and a comment that has to be
|
|
3829
|
+
* looked for is not doing its job when the badge's whole point is "THIS row is
|
|
3830
|
+
* the one serving". Filled also matches how the host marks primary affordances.
|
|
3831
|
+
*
|
|
3832
|
+
* Both halves now come from the SAME token, so they cannot drift apart the way
|
|
3833
|
+
* they did when the ink was --dsw-alias-brand-primary — the host's CONTRAST
|
|
3834
|
+
* colour, which painted near-BLACK on light themes (see the checkbox note at
|
|
3835
|
+
* line ~118). Theme-following: #22c55e dark / #16a34a light.
|
|
3836
|
+
*
|
|
3837
|
+
* Contrast: white on #22c55e ≈ 2.2:1, on #16a34a ≈ 3.3:1 — under the 4.5:1 bar
|
|
3838
|
+
* for body text, which is why the badge stays 11-12px and BOLD and never carries
|
|
3839
|
+
* a sentence: it is read as a shape first, a word second. The border keeps the
|
|
3840
|
+
* pill from bleeding into the row tint if a theme remaps success to something
|
|
3841
|
+
* dark. */
|
|
3842
|
+
.dsm-workbuddy-pool-current-badge{margin-left:auto;padding:2px 10px;border-radius:999px;background:var(--dsw-alias-state-success-primary,#22c55e);border:1px solid rgba(34,197,94,.55);color:#fff;font-size:12px;font-weight:600;line-height:18px;white-space:nowrap}
|
|
3826
3843
|
/* Sits under the header block, before the batch buttons: account discovery is
|
|
3827
3844
|
the first step of using the pool, so it reads above the actions it enables. */
|
|
3828
3845
|
/* Manual-mode account picker: shares the settings row layout (.pool-set), and
|
|
@@ -3869,7 +3886,7 @@ window.__ModuleLoader__.load({
|
|
|
3869
3886
|
.dsm-workbuddy-pool-account-name span{font-size:11px;line-height:16px;color:var(--dsw-alias-label-tertiary,#999)}
|
|
3870
3887
|
/* Declared AFTER the blanket span rule so it wins: the badge must not inherit
|
|
3871
3888
|
the muted 11px tertiary treatment the membership line uses. */
|
|
3872
|
-
.dsm-workbuddy-pool-account-name .dsm-workbuddy-pool-current-tag{align-self:flex-start;margin-top:2px;padding:1px 6px;border-radius:999px;background:
|
|
3889
|
+
.dsm-workbuddy-pool-account-name .dsm-workbuddy-pool-current-tag{align-self:flex-start;margin-top:2px;padding:1px 6px;border-radius:999px;background:var(--dsw-alias-state-success-primary,#22c55e);border:1px solid rgba(34,197,94,.55);color:#fff;font-size:11px;font-weight:600;line-height:16px;white-space:nowrap}
|
|
3873
3890
|
/* Manual-priority chrome (order badge + up/down arrows). The rank badge is a SPAN,
|
|
3874
3891
|
not a button: it only DESCRIBES the current order and must not read as a
|
|
3875
3892
|
control (nor join the row's button list). The solid vs dashed distinction is
|
|
@@ -3966,7 +3966,7 @@ function generationOf(version) {
|
|
|
3966
3966
|
//#endregion
|
|
3967
3967
|
//#region src/version.ts
|
|
3968
3968
|
/** The npm package version this build was produced from. */
|
|
3969
|
-
const WORKBUDDY_CONNECT_VERSION = "4.9.
|
|
3969
|
+
const WORKBUDDY_CONNECT_VERSION = "4.9.1";
|
|
3970
3970
|
//#endregion
|
|
3971
3971
|
//#region src/host-heartbeat.ts
|
|
3972
3972
|
/**
|
package/lib/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as isEncryptedFieldWrapper, A as workbuddyAccountId, B as modelIdOfBody, C as defaultDesktopAuthDirs, D as isVaultAccountId, E as isEncryptedCredentialError, F as WorkBuddyUpstreamClient, G as regionOf, H as parseReasoning, I as classifyUpstreamError, J as deriveAtRestKey, K as WORKBUDDY_APP_EXECUTABLE_ENV, L as declaredTools, M as CREDENTIAL_REJECTED_CODE, N as WORKBUDDY_FALLBACK_SYSTEM_PROMPT, O as legacyWorkbuddyOwnAuthPath, P as WorkBuddyCredentialRejectedError, R as isCredentialRejectedError, S as defaultDesktopAuthCandidates, T as hasEncryptedCredentialFields, U as parseUpstreamModel, V as parseCreditMultiplier, W as prepareChatBody, X as fetchAtRestKeyPayload, Y as deriveAtRestKeyId, Z as findWorkbuddyAppExecutable, _ as WORKBUDDY_AUTH_FILENAME, a as readHostHeartbeat, at as workbuddyAppExecutableCandidates, b as WorkBuddyEncryptedCredentialError, c as WORKBUDDY_CONNECT_VERSION, ct as withFileLock, d as FALLBACK_WORKBUDDY_MODELS_GLOBAL, et as isWorkbuddyBundle, f as WorkBuddyCatalog, g as ENCRYPTED_CREDENTIAL_CODE, h as fallbackModelsFor, i as processStartTimeMs, it as readAtRestKey, j as workbuddyOwnAuthPath, k as parseWorkBuddyAuth, l as piAiRuntimeInfo, lt as writeFileAtomic, m as deriveCatalog, n as clearHostHeartbeat, nt as macosNestedAppBundles, o as workbuddyHostHeartbeatPath, p as applyContextBudgets, q as clearAtRestKeyCache, r as isHeartbeatProcessAlive, rt as openEncryptedField, s as writeHostHeartbeat, st as resolveDshHome, t as WORKBUDDY_HOST_HEARTBEAT_FILENAME, tt as macosBundleExecutable, u as FALLBACK_WORKBUDDY_MODELS, v as WORKBUDDY_AUTH_FILE_ENV, w as defaultDesktopAuthPath, x as authFileName, y as WorkBuddyCredentialStore, z as knownRegionOf } from "./host-heartbeat-
|
|
1
|
+
import { $ as isEncryptedFieldWrapper, A as workbuddyAccountId, B as modelIdOfBody, C as defaultDesktopAuthDirs, D as isVaultAccountId, E as isEncryptedCredentialError, F as WorkBuddyUpstreamClient, G as regionOf, H as parseReasoning, I as classifyUpstreamError, J as deriveAtRestKey, K as WORKBUDDY_APP_EXECUTABLE_ENV, L as declaredTools, M as CREDENTIAL_REJECTED_CODE, N as WORKBUDDY_FALLBACK_SYSTEM_PROMPT, O as legacyWorkbuddyOwnAuthPath, P as WorkBuddyCredentialRejectedError, R as isCredentialRejectedError, S as defaultDesktopAuthCandidates, T as hasEncryptedCredentialFields, U as parseUpstreamModel, V as parseCreditMultiplier, W as prepareChatBody, X as fetchAtRestKeyPayload, Y as deriveAtRestKeyId, Z as findWorkbuddyAppExecutable, _ as WORKBUDDY_AUTH_FILENAME, a as readHostHeartbeat, at as workbuddyAppExecutableCandidates, b as WorkBuddyEncryptedCredentialError, c as WORKBUDDY_CONNECT_VERSION, ct as withFileLock, d as FALLBACK_WORKBUDDY_MODELS_GLOBAL, et as isWorkbuddyBundle, f as WorkBuddyCatalog, g as ENCRYPTED_CREDENTIAL_CODE, h as fallbackModelsFor, i as processStartTimeMs, it as readAtRestKey, j as workbuddyOwnAuthPath, k as parseWorkBuddyAuth, l as piAiRuntimeInfo, lt as writeFileAtomic, m as deriveCatalog, n as clearHostHeartbeat, nt as macosNestedAppBundles, o as workbuddyHostHeartbeatPath, p as applyContextBudgets, q as clearAtRestKeyCache, r as isHeartbeatProcessAlive, rt as openEncryptedField, s as writeHostHeartbeat, st as resolveDshHome, t as WORKBUDDY_HOST_HEARTBEAT_FILENAME, tt as macosBundleExecutable, u as FALLBACK_WORKBUDDY_MODELS, v as WORKBUDDY_AUTH_FILE_ENV, w as defaultDesktopAuthPath, x as authFileName, y as WorkBuddyCredentialStore, z as knownRegionOf } from "./host-heartbeat-DahwuDGO.js";
|
|
2
2
|
import z from "@deepseek-ai/schemastery";
|
|
3
3
|
import { appendFile, mkdir, readFile, writeFile } from "node:fs/promises";
|
|
4
4
|
import { randomBytes, randomUUID, timingSafeEqual } from "node:crypto";
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "dsh-connect-workbuddy",
|
|
3
3
|
"displayName": "DSH Connect WorkBuddy",
|
|
4
4
|
"description": "把本机登录的 WorkBuddy 模型接入 DeepSeek Harness,并提供只读的积分概览与模型管理。",
|
|
5
|
-
"version": "4.9.
|
|
5
|
+
"version": "4.9.1",
|
|
6
6
|
"author": "dingminhua",
|
|
7
7
|
"copyright": "Copyright (c) 2026 LaoDing",
|
|
8
8
|
"license": "MIT",
|