dsh-connect-workbuddy 4.6.2 → 4.6.4

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 CHANGED
@@ -1,5 +1,49 @@
1
1
  # Changelog
2
2
 
3
+ ## 4.6.4 (2026-10-16)
4
+
5
+ > 版本号是 **patch**:只动开发脚本与测试,**不改插件运行时行为**。
6
+
7
+ ### Fixes
8
+
9
+ - **`probe-region-token-accounting.mjs` 补上 `tool-result` 与高熵类 —— 这正是 #59 那个「预测不出上游数字」缺口的关键一格(issue #59)**
10
+ - **为什么补**:本仓库的探针原先只有 `prose` / `code` / `json` 三档。而一份真实长会话的 body 构成(`WORKBUDDY_BODY_REPORT` 抓下来的 35 个真实请求)是 **`tool-result` 占 47% 字符**,是三档里**一档都没覆盖**的内容类别。用三档去预测,结论是「上游报的数比最贵档还高 28%」,看起来像发现了新机制;而把实测的 `tool-result` 系数(**455.5 tok/1k**,跨区域 455.5 vs 455.6)代回去,**缺口从 28% 收到约 1%**。**缺的是系数表的一行,不是新机制。**
11
+ - **新增的 `--kind`**:`base64`(实测 2.50× 于 `code`)、`hex`(2.04×)、`ansi`(1.92×)、`proc`(1.63×)、`tool-result`。报告者的实测显示**高熵内容是长会话里最贵的一类**,而 base64 恰是 `code` 的 2.5 倍 —— 老表把 `code` 当成天花板,因此系统性低估。
12
+ - **生成器必须是确定性的**:两个区域要收到**逐字节相同**的填充文本,否则测出来的比值是在量生成器而不是量网关。故不读时钟、不读随机源、不读文件系统;用固定种子的 32 位 LCG。**这一点由测试直接断言源码文本**(`Math.random` / `Date.now` / `new Date` / `fs` 调用一律不得出现),因为行为断言只能证明「这次恰好相同」。
13
+ - **★ 写测试时抓到一个真缺陷**:初版生成器是 `(state >>> 8) % alphabet.length` —— 只取 LCG 状态的 log2(L) 位,**在 L=64 时每 16384 字符就重复一次**,于是 65536 字符的填充里同一段 16 KiB 出现四次。**短周期正是这个类存在要避免的「可压缩」**:一个能看出重复的分词器会少收 token,于是实测水位被**低估**,而这正是原始 #59 现象的形状。修法是在取模前先做两轮 xorshift-multiply 混合(实测 12 万字符内无周期)。
14
+ - **采样规则**(写进模块注释):**不得只取日志开头**。报告者实测同一类真实 `tool-result` 文本,取开头 12k 字符得 322.6 tok/1k,全时段均匀采样得 455.5 —— **差 41%**。填充文本不仅要跨区域逐字节相同,还要与真实分布同构,否则量到的是一类内容的系数、却被当作整份历史用。
15
+ - **`tool-result` 刻意不走 `entropy()`**:逐字符打散模板会产出没有任何工具会发出的文本,而这个类的**全部意义就在于内容形状**(标识符、花括号、引号键、路径、对齐数字)真实。它的变化来自「每轮以递进的偏移重复模板」,因此同样没有短周期。
16
+ - **守卫**:新增 `tests/probe-fillers.spec.ts`,8 例 —— ① 十个 `语言:类别` 组合都存在;② 每次生成逐字节相同;③ **源码文本里不得出现随机源或时钟**;④ **不得有 64 / 1024 / 16384 的周期**(这一条就是抓到上面那个真缺陷的那条);⑤ `tool-result` 仍像 tool-result(含 `export function` / `"path"` / `await fs.readFile`,且中文版确实是中文);⑥ `ansi` 是**真的控制字节** `<ESC>[31m`,不是字面的 `\u001B` 六字符;⑦ 结构化类别里不得出现 `NaN`;⑧ 每个填充长度都超过默认 `--chars=12000`。
17
+ - **第 ⑦ 条的取法有讲究,写在测试注释里**:`NaN` 只查 `ansi` / `proc` / `tool-result` 三类 —— 它们是**格式化**出来的(`\u001B[3${n}m`、`.padStart`),出现 `NaN` 必是缺陷;而 base64 / hex 是从字母表里取的,字母表本身含 `N`、`a`、`N`,子串会以约 64³ 分之一的概率偶然出现。初版断言查了全部类别,**是错的**(会在无关的地方随机转红)—— 这是我写完立刻遇到并改掉的。
18
+ - **变异验证(5 个变异,全部转红,各自只打中应打中的用例)**:① 去掉取模前的混合(重现 16384 周期)→ 红 1 例;② 顺序循环字母表(64 周期)→ 红 1 例;③ 改用 `Math.random` → 红 1 例;④ `ansi` 退化成字面 `\u001B` → 红 1 例;⑤ `tool-result` 逐字符打散成乱码 → 红 1 例。
19
+ - **来源**:本条的补类与采样规则由 issue #59 的报告者提出并附实测数据(`tool-result` 455.5、高熵四档、尺寸梯度 12k→500k),本仓库按其建议固化。**探针脚本不随包发布**(`files` 白名单不含 `scripts/`),所以这一版与已安装插件的行为无关。
20
+
21
+ ## 4.6.3 (2026-10-16)
22
+
23
+ > 版本号是 **patch**:没有接口、配置或界面变更,但它修的是一个**所有国际版模型全部不可用**的缺陷。
24
+
25
+ ### Fixes
26
+
27
+ - **国际版全部模型 400 / `11128 conversation id missing`:网关新增了一道「会话身份」闸,插件一个头都没发(issue #66)**
28
+ - **症状**:`workbuddy-global` 的**每一个**模型、**每一步**都失败,报文是 `400` + 业务码 `11128` / `conversation id missing`。而上游自带的 `displayTips` 把它描述成「这次调用没通过渠道校验,可能不是官方客户端发出的」—— **那句话把人引向客户端身份**(UA / 渠道),真正的可执行信息是字面那句「缺会话 id」。
29
+ - **根因**:国际网关在 3.1.0 修过的「首条必须是 system」之外,**又加了一道**:chat 请求必须携带官方桌面端的会话身份三件套(`X-Conversation-ID` / `X-Conversation-Request-ID` / `X-Conversation-Message-ID`,见官方 bundle 的 `applyGatewayHeaders`),而本插件的 `chatHeaders()` 只发 `X-Product: SaaS` 与 `X-No-*` 系列,**三件套一个都没有**。
30
+ - **两道闸是叠加的,不是替代关系** —— 这是本条最容易改错的地方。报告者用真实国际网关做了矩阵(请求体固定,只改两个变量):
31
+
32
+ | 请求头 | messages | 结果 |
33
+ |---|---|---|
34
+ | 插件现状(含 3.1.0 的 system 兜底) | `["system","user"]` | **400 / 11128** |
35
+ | 现状 **+ 三件套** | `["system","user"]` | **200** |
36
+ | 现状 **+ 三件套** | `["user"]` | **400 / 11128** |
37
+
38
+ 末行是**不能把 `ensureSystemHead()` 当成「已经不需要了」而删掉**的证据:system 规则从**充分**变成了**必要不充分**。CHANGELOG 的 3.1.0 那节记着当年的矩阵(空格 system → 200),今天同样的形状是 11128 —— 上游在这期间收紧了校验,而这次收紧**没有**替换掉旧规则。
39
+ - **改了什么**:新增 `conversationHeaders()`,三个头各用一个**新生成的 UUID**(`randomUUID()`,与官方客户端每次请求 `randomUUID()` 的行为一致),在 `chatHeaders()` 里展开。这是报告者逐项二分测出的**最小必需集**:单独一个 `X-Conversation-ID` 仍然 11128,官方还发的 `acp-connection-id` / `X-Agent-*` / `X-IDE-*` / `X-Private-Data` / trace 系列**都不需要**。三个 id 的值上游**不校验来源**,但不复用同一个值 —— 复用等于拿一个 id 冒充三次会话身份,而上游拿它做的就是关联。
40
+ - **两个区域都加,是刻意的**:国内网关当前容忍缺失,所以加在那边无害;而「只在一边发某个头」正是 3.1.0 那个缺陷长成**国际版专有、且在国内侧完全看不见**的原因。一条代码路径、两个区域,少一个分支就少一种只在一边复现的故障形状。
41
+ - **范围**:只加在 chat 端点(`chatHeaders()`)。billing / refresh 等端点**不加** —— 官方客户端调它们时也不带,报告者的矩阵也只在 chat 端点上取过数。
42
+ - **`11128` 的错误分类(报告者建议的第 3 条)本次没有采纳**:他建议把它并入 `policy_reject`(与 `11140` 同类)。但另一位报告者提供了反例 —— 同一批测试、同一毫秒内,一个账号 `ok`、另一个 `11128`,两者**同样缺三件套**。若 11128 其实是按账号生效的,那么「换号能过」意味着它可恢复,落进 `failed` + 冷却 30 分钟后回池反而更合适(`policy_reject` 会让它**不冷却、仍当候选**)。分类改错会让账号池做出更差的调度,所以先把确定的正向做掉,分类问题留待更多数据。
43
+ - **守卫**:`tests/upstream.spec.ts` 新增 7 例 —— ① 国际网关三个头都发;② 国内网关也发(钉住「一条代码路径」这个决定,而不是国内的需求);③ **三个值互不相同**;④ 每个都是合法 UUID 形态;⑤ **每个请求新生成**(防止有人把它提升成模块级常量「优化」掉);⑥ **探针路径也带**(探针打的就是 chat 端点,这也是「一键测试所有账号」能看出 11128 的原因 —— 只修 `chatStream()` 会让账号池拿着不满足规则的请求去测账号);⑦ billing 端点**不带**。
44
+ - **第 ⑦ 条的形态本身踩过一个坑**:初版是 **grep 源码文本**来判断 `billingHeaders()` 里有没有 `conversationHeaders`。变异验证时把一个变异体加进去,**它没红** —— 因为那段文本切片压根没匹配上,测试是在对一个空片段做断言。改为**行为断言**(真的调 `fetchCredits()` 并看发出去的头)后,同一个变异体立刻转红。**变异验证(5 个变异)**:① 从 `chatHeaders` 去掉三件套 → 红 6 例(等价修复前);② 三个值写成同一个 → 红 1 例;③ 提升为模块级常量 → 红 1 例;④ 三件套泄漏到 billing 端点 → 红 1 例;⑤ UUID 形态被破坏 → 红 1 例。
45
+ - **端到端**:报告者已在本地对 `4.6.2` 打同一处补丁并**实测国际版恢复正常**;本仓库侧改动与其独立实现等价(他手写十六进制拼 UUID,本仓库用 `node:crypto` 的 `randomUUID`,后者本仓库 `oauth.ts` / `dsml-recovery.ts` 已在用)。
46
+
3
47
  ## 4.6.2 (2026-10-16)
4
48
 
5
49
  > 版本号是 **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-De95rlXS.js";
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-BvxLN-O5.js";
3
3
  import { realpathSync } from "node:fs";
4
4
  import { fileURLToPath } from "node:url";
5
5
  //#region src/bin.ts
@@ -1,5 +1,5 @@
1
1
  import { lstat, mkdir, readFile, readdir, rename, rm, stat, writeFile } from "node:fs/promises";
2
- import { createDecipheriv, createHash, randomBytes } from "node:crypto";
2
+ import { createDecipheriv, createHash, randomBytes, randomUUID } from "node:crypto";
3
3
  import { homedir } from "node:os";
4
4
  import { dirname, join, resolve, win32 } from "node:path";
5
5
  import { execFile, execFileSync } from "node:child_process";
@@ -847,6 +847,34 @@ function clearAtRestKeyCache() {
847
847
  }
848
848
  //#endregion
849
849
  //#region src/upstream.ts
850
+ /**
851
+ * WorkBuddy (CodeBuddy / copilot.tencent.com) upstream client: chat streaming,
852
+ * token refresh, model catalog, and credit balance.
853
+ *
854
+ * 参考:corrinehu/dsh-workbuddy-connect(MIT,Copyright (c) 2026 Corrine Hu)
855
+ * — 端点与 wire behavior 由其实现,上游协议本身参照
856
+ * Sliverkiss/workbuddy2api(MIT)。照搬的部分:按 domain 选择
857
+ * CN/global base、强制 stream:true、tool_choice 压平为字符串、
858
+ * CLI 形态请求头、chat 请求绝不携带 refresh token 的安全红线、
859
+ * 中英文额度不足标记与错误分类、token 刷新的 X-Refresh-Token 头。
860
+ * 改动:原版的 `fetchModels` 只保留 id/name/maxInputTokens/maxOutputTokens,
861
+ * 丢弃了上游其余 20 个字段。实测上游每个模型还给出 `credits` 积分倍率、
862
+ * `supportsImages` 多模态、`reasoning.supportedEfforts` 推理档位、
863
+ * `descriptionZh/En` 描述等,这些正是模型管理卡片所需的信息,
864
+ * 本实现将其完整解析(解析不出则留空,不虚构)。
865
+ * `reasoning` 另有两种拼写:复数 `supportedEfforts` 形态与单数 `effort`
866
+ * 形态(只声明默认档;两网关实测这些模型接受全阶梯,不发参数即不
867
+ * 思考),解析层将单数形态折叠为复数(见 parseReasoning,issue #7)。
868
+ * 另:积分接口改为按套餐名聚合,实测单个账号下同名「运营裂变包」
869
+ * 可达 19 个,逐条渲染会淹没卡片。
870
+ * 模型目录路径改为 `/v2/enterprises/personal/models`(原版为
871
+ * `/console/enterprises/personal/models`):两版官方桌面 App 均调用
872
+ * `/v2` 形态,CN 网关两条路径逐字节同答,而国际版网关(workbuddy.ai)
873
+ * 只答 `/v2`、`/console` 形态返回 HTTP 500——统一 `/v2` 即同时覆盖
874
+ * 国内版与国际版(WorkBuddy AI)账号,区域由 `domain` 自动路由。
875
+ *
876
+ * @module dsh-connect-workbuddy/upstream
877
+ */
850
878
  const CN_CHAT_BASE = "https://copilot.tencent.com";
851
879
  const CN_BILLING_BASE = "https://www.codebuddy.cn";
852
880
  const GLOBAL_BASE = "https://www.workbuddy.ai";
@@ -1135,6 +1163,59 @@ function commonHeaders(credential) {
1135
1163
  "User-Agent": CLIENT_UA
1136
1164
  };
1137
1165
  }
1166
+ /**
1167
+ * The conversation-identity triple the chat endpoint now requires (issue #66).
1168
+ *
1169
+ * WHY THIS EXISTS. The international gateway added a second gate on top of the
1170
+ * `system`-head rule from 3.1.0: a chat request must carry the official desktop
1171
+ * client's conversation identity, or every step is refused with business code
1172
+ * `11128` / `conversation id missing`. That error's own `displayTips` blames
1173
+ * "渠道校验 / 不是官方客户端发出的", which reads as a client-identity problem —
1174
+ * the literal message is the actionable part, and it names a MISSING CONVERSATION
1175
+ * ID, not a missing or wrong user agent.
1176
+ *
1177
+ * The two gates are independent, and both must hold (measured 2026-10-16 on the
1178
+ * real international gateway, plugin body shape unchanged):
1179
+ *
1180
+ * headers messages result
1181
+ * ----------------- ---------------- --------------
1182
+ * plugin as-shipped ["system","user"] 400 / 11128
1183
+ * plugin + triple ["system","user"] 200
1184
+ * plugin + triple ["user"] 400 / 11128
1185
+ *
1186
+ * So `ensureSystemHead()` must NOT be dropped as "no longer needed": the system
1187
+ * rule went from sufficient to necessary-but-not-sufficient. The last row is what
1188
+ * keeps this function from being mistaken for a replacement for it.
1189
+ *
1190
+ * MINIMAL SET. The official bundle's `applyGatewayHeaders` also sends
1191
+ * `acp-connection-id`, `X-Agent-Intent` / `X-Agent-Purpose`, `X-IDE-*`,
1192
+ * `X-Private-Data` and trace headers. Bisecting them one at a time showed NONE of
1193
+ * those is required: `X-Conversation-Request-ID` and `-Message-ID` are needed
1194
+ * alongside `X-Conversation-ID` (that one alone still fails), and each of the
1195
+ * extras is satisfied by the triple without it. Hence exactly three.
1196
+ *
1197
+ * VALUES. The gateway does not verify where these ids come from — any well-formed
1198
+ * UUID passes — so nothing here is a secret and nothing is persisted. They are
1199
+ * still freshly generated per request, matching the official client's
1200
+ * `randomUUID()` per call: reusing one value across requests would forge a
1201
+ * conversation identity the plugin does not actually have, and the first thing
1202
+ * that would break is the upstream's own correlation of a session it is being
1203
+ * told about twice under one id.
1204
+ *
1205
+ * APPLIED TO BOTH REGIONS on purpose. The CN gateway tolerates their absence
1206
+ * today, so this is harmless there — and a header that is only ever sent on one
1207
+ * side is exactly how the 3.1.0 defect became international-only and invisible
1208
+ * from the CN side. One code path, both regions.
1209
+ *
1210
+ * @returns the three headers, every value distinct.
1211
+ */
1212
+ function conversationHeaders() {
1213
+ return {
1214
+ "X-Conversation-ID": randomUUID(),
1215
+ "X-Conversation-Request-ID": randomUUID(),
1216
+ "X-Conversation-Message-ID": randomUUID()
1217
+ };
1218
+ }
1138
1219
  /** Chat request headers, including the X-No-* conventions the official CLI uses. */
1139
1220
  function chatHeaders(credential) {
1140
1221
  return {
@@ -1143,7 +1224,8 @@ function chatHeaders(credential) {
1143
1224
  ...credential.uid === "" ? { "X-No-User-Id": "1" } : { "X-User-Id": credential.uid },
1144
1225
  ...credential.enterpriseId === void 0 || credential.enterpriseId === "" ? { "X-No-Enterprise-Id": "1" } : { "X-Enterprise-Id": credential.enterpriseId },
1145
1226
  ...credential.domain === "" ? { "X-No-Department-Info": "1" } : { "X-Domain": credential.domain },
1146
- "X-Product": "SaaS"
1227
+ "X-Product": "SaaS",
1228
+ ...conversationHeaders()
1147
1229
  };
1148
1230
  }
1149
1231
  /** Refresh-endpoint headers; X-Refresh-Token appears here and nowhere else. */
@@ -3825,7 +3907,7 @@ function generationOf(version) {
3825
3907
  //#endregion
3826
3908
  //#region src/version.ts
3827
3909
  /** The npm package version this build was produced from. */
3828
- const WORKBUDDY_CONNECT_VERSION = "4.6.2";
3910
+ const WORKBUDDY_CONNECT_VERSION = "4.6.4";
3829
3911
  //#endregion
3830
3912
  //#region src/host-heartbeat.ts
3831
3913
  /**
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-De95rlXS.js";
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-BvxLN-O5.js";
2
2
  import z from "@deepseek-ai/schemastery";
3
3
  import { appendFile, mkdir, readFile } 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.6.2",
5
+ "version": "4.6.4",
6
6
  "author": "dingminhua",
7
7
  "copyright": "Copyright (c) 2026 LaoDing",
8
8
  "license": "MIT",