dsh-connect-workbuddy 5.21.2 → 5.21.3

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,30 @@
1
1
  # Changelog
2
2
 
3
+ ## 5.21.3 (2026-11-09)
4
+
5
+ > 版本号是 **patch**:只改一句回复里的账号称谓,不动配置键、路由与重试策略。
6
+
7
+ ### 修复:自动换号的通知写账号名,不再写一串数字(issue #234)
8
+
9
+ 报告里那条通知是:
10
+
11
+ ```
12
+ > [dsh-connect-workbuddy] 「330135985725」被限流,已改用池中另一个账号回答
13
+ ```
14
+
15
+ 方括号里那串数字是 `uin`(手机号),报告者问的是「能不能直接写账号名」。这句话是
16
+ **唯一**一处用标识符而不是名字称呼账号的地方——卡片、账号池表格、输入框面板全都用
17
+ `preferredAccountName`(显示名 → 企业侧用户名 → 登录别名)。
18
+
19
+ - `describeAccount` 改为先走 `preferredAccountName`,`uin` 退为**兜底**。
20
+ - 兜底保留(而不是换成「未知账号」)是刻意的:桌面 App 没写出名字的账号仍要指得出来,
21
+ 一个能和表格里某一行对上的号码,胜过一句谁也没点名的说明。这一处也由测试钉住。
22
+ - 名字的顺序与卡片完全一致(同一个函数),不再有第二套「谁排第一」的知识。
23
+
24
+ 变异验证:把 `describeAccount` 退回「`uin` 优先、昵称其次」,新增的
25
+ `names the account left behind by its NAME` 立刻变红(失败信息里正是
26
+ `「selected」被限流`),恢复后转绿。
27
+
3
28
  ## 5.21.2 (2026-11-09)
4
29
 
5
30
  > 版本号是 **patch**:新增一个配置键(`pollIntervalMs`)与一个「能力」栏控件,
package/lib/bin.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { $ as DEFAULT_WIRE_PROFILE, Cn as hostPeersInfo, F as WorkBuddyCredentialStore, J as workbuddyOwnAuthPath, N as WORKBUDDY_AUTH_FILE_ENV, P as WORKBUDDY_VAULT_DIRNAME, R as defaultDesktopAuthCandidates, T as FALLBACK_WORKBUDDY_MODELS_GLOBAL, W as legacyWorkbuddyOwnAuthPath, X as APP_VERSION, Y as workbuddyVaultDir, a as readHostHeartbeat, an as deriveDeviceId, b as readDeviceSettings, c as WORKBUDDY_CONNECT_VERSION, cn as protectCredentialDirectory, d as rosterSeenPath, f as WORKBUDDY_CN_BASE_ENV, g as createTuringSdk, hn as findWorkbuddyAppExecutableWithSource, in as readDeviceSalt, ln as WORKBUDDY_APP_EXECUTABLE_ENV, m as piAiRuntimeInfo, nn as readDeviceTokenFile, nt as WorkBuddyUpstreamClient, o as workbuddyHostHeartbeatPath, ot as describeRequestHeaderNames, p as resolveCnGateway, r as isHeartbeatProcessAlive, rn as ensureDeviceSalt, sn as inspectCredentialDirectory, tn as WORKBUDDY_DEVICE_TOKEN_FILE_ENV, u as describeRosterSeenPayload, w as FALLBACK_WORKBUDDY_MODELS, wn as resolveDshHome, z as defaultDesktopAuthDirs } from "./host-heartbeat-CxvijdHh.js";
2
+ import { $ as DEFAULT_WIRE_PROFILE, Cn as hostPeersInfo, F as WorkBuddyCredentialStore, J as workbuddyOwnAuthPath, N as WORKBUDDY_AUTH_FILE_ENV, P as WORKBUDDY_VAULT_DIRNAME, R as defaultDesktopAuthCandidates, T as FALLBACK_WORKBUDDY_MODELS_GLOBAL, W as legacyWorkbuddyOwnAuthPath, X as APP_VERSION, Y as workbuddyVaultDir, a as readHostHeartbeat, an as deriveDeviceId, b as readDeviceSettings, c as WORKBUDDY_CONNECT_VERSION, cn as protectCredentialDirectory, d as rosterSeenPath, f as WORKBUDDY_CN_BASE_ENV, g as createTuringSdk, hn as findWorkbuddyAppExecutableWithSource, in as readDeviceSalt, ln as WORKBUDDY_APP_EXECUTABLE_ENV, m as piAiRuntimeInfo, nn as readDeviceTokenFile, nt as WorkBuddyUpstreamClient, o as workbuddyHostHeartbeatPath, ot as describeRequestHeaderNames, p as resolveCnGateway, r as isHeartbeatProcessAlive, rn as ensureDeviceSalt, sn as inspectCredentialDirectory, tn as WORKBUDDY_DEVICE_TOKEN_FILE_ENV, u as describeRosterSeenPayload, w as FALLBACK_WORKBUDDY_MODELS, wn as resolveDshHome, z as defaultDesktopAuthDirs } from "./host-heartbeat-WSrMdV6b.js";
3
3
  import { readFile } from "node:fs/promises";
4
4
  import { dirname, join } from "node:path";
5
5
  import { realpathSync } from "node:fs";
@@ -10527,7 +10527,7 @@ function describeRosterSeenPayload(raw) {
10527
10527
  //#endregion
10528
10528
  //#region src/version.ts
10529
10529
  /** The npm package version this build was produced from. */
10530
- const WORKBUDDY_CONNECT_VERSION = "5.21.2";
10530
+ const WORKBUDDY_CONNECT_VERSION = "5.21.3";
10531
10531
  //#endregion
10532
10532
  //#region src/host-heartbeat.ts
10533
10533
  /**
package/lib/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { $t as imageDefaultFor, A as withoutRouters, At as offRefused, B as defaultDesktopAuthPath, Bt as IMAGE_TAG_TEXT_TO_IMAGE, C as setDeviceMode, Ct as attachBusyLevels, D as applyContextBudgets, Dt as defaultOffModelIds, E as WorkBuddyCatalog, En as writeFileAtomic, Et as REFUSES_OFF_MODEL_IDS, F as WorkBuddyCredentialStore, Ft as WorkBuddyVideoError, G as parseWorkBuddyAuth, Gt as isBareBase64Image, H as isEncryptedCredentialError, Ht as WorkBuddyImageError, I as WorkBuddyEncryptedCredentialError, It as parseSupportedSecondsRange, J as workbuddyOwnAuthPath, Jt as sniffImageMime, K as preferredAccountName, Kt as parseImageDataUrl, L as authFileName, Lt as pickVideoModel, M as WORKBUDDY_AUTH_FILENAME, Mt as withEffectiveOff, N as WORKBUDDY_AUTH_FILE_ENV, Nt as VIDEO_TAG_IMAGE_TO_VIDEO, O as deriveCatalog, Ot as lastRefusalFor, Pt as VIDEO_TAG_TEXT_TO_VIDEO, Q as CREDENTIAL_REJECTED_CODE, Qt as NATIVE_MODALITY_BY_MODEL_ID, R as defaultDesktopAuthCandidates, Rt as resolveVideoParams, S as saveDeviceSdkSettings, Sn as workbuddyAppExecutableCandidates, St as rewriteSessionTitleModel, T as FALLBACK_WORKBUDDY_MODELS_GLOBAL, Tn as withFileLock, Tt as selectPromoBadge, U as isVaultAccountId, Ut as imageDataUrl, V as hasEncryptedCredentialFields, Vt as MAX_INPUT_IMAGE_BYTES, W as legacyWorkbuddyOwnAuthPath, Wt as imageMimeForPath, X as APP_VERSION, Xt as queueNoticeText, Yt as parseQueueAnswer, Z as CONTEXT_OVERFLOW_MARKER, Zt as pruneTempDir, _ as createDeviceProfileLookup, _n as isWorkbuddyBundle, _t as parseUpstreamModel, a as readHostHeartbeat, at as declaredTools, b as readDeviceSettings, bn as openEncryptedField, bt as regionOf, c as WORKBUDDY_CONNECT_VERSION, ct as isContextTooLongBody, dn as deriveAtRestKey, dt as isFirstMessageGateBody, en as nativeModalityOf, et as WORKBUDDY_FALLBACK_SYSTEM_PROMPT, fn as deriveAtRestKeyId, ft as knownRegionOf, g as createTuringSdk, gn as isEncryptedFieldWrapper, gt as parseReasoning, h as createDeviceSdkPort, ht as parseCreditMultiplier, i as processStartTimeMs, it as classifyUpstreamError, j as ENCRYPTED_CREDENTIAL_CODE, jt as recordRefusal, k as fallbackModelsFor, kt as offDefaultFor, l as createFileRosterSeenStore, ln as WORKBUDDY_APP_EXECUTABLE_ENV, lt as isConversationIdGateBody, m as piAiRuntimeInfo, mn as findWorkbuddyAppExecutable, mt as openingEvidenceOfBody, n as clearHostHeartbeat, nt as WorkBuddyUpstreamClient, o as workbuddyHostHeartbeatPath, on as isDeviceId, p as resolveCnGateway, pn as fetchAtRestKeyPayload, pt as modelIdOfBody, q as workbuddyAccountId, qt as pickMediaModel, r as isHeartbeatProcessAlive, rt as channelGateMemberOf, s as writeHostHeartbeat, st as forceNeutralHead, t as WORKBUDDY_HOST_HEARTBEAT_FILENAME, tt as WorkBuddyCredentialRejectedError, un as clearAtRestKeyCache, ut as isCredentialRejectedError, v as describeDerivedDevices, vn as macosBundleExecutable, vt as perturbChannelFingerprints, w as FALLBACK_WORKBUDDY_MODELS, wn as resolveDshHome, wt as promoBadgeTone, x as saveDeviceProfile, xn as readAtRestKey, xt as requestEvidenceOf, y as isDeviceMode, yn as macosNestedAppBundles, yt as prepareChatBody, z as defaultDesktopAuthDirs, zt as IMAGE_TAG_IMAGE_TO_IMAGE } from "./host-heartbeat-CxvijdHh.js";
1
+ import { $t as imageDefaultFor, A as withoutRouters, At as offRefused, B as defaultDesktopAuthPath, Bt as IMAGE_TAG_TEXT_TO_IMAGE, C as setDeviceMode, Ct as attachBusyLevels, D as applyContextBudgets, Dt as defaultOffModelIds, E as WorkBuddyCatalog, En as writeFileAtomic, Et as REFUSES_OFF_MODEL_IDS, F as WorkBuddyCredentialStore, Ft as WorkBuddyVideoError, G as parseWorkBuddyAuth, Gt as isBareBase64Image, H as isEncryptedCredentialError, Ht as WorkBuddyImageError, I as WorkBuddyEncryptedCredentialError, It as parseSupportedSecondsRange, J as workbuddyOwnAuthPath, Jt as sniffImageMime, K as preferredAccountName, Kt as parseImageDataUrl, L as authFileName, Lt as pickVideoModel, M as WORKBUDDY_AUTH_FILENAME, Mt as withEffectiveOff, N as WORKBUDDY_AUTH_FILE_ENV, Nt as VIDEO_TAG_IMAGE_TO_VIDEO, O as deriveCatalog, Ot as lastRefusalFor, Pt as VIDEO_TAG_TEXT_TO_VIDEO, Q as CREDENTIAL_REJECTED_CODE, Qt as NATIVE_MODALITY_BY_MODEL_ID, R as defaultDesktopAuthCandidates, Rt as resolveVideoParams, S as saveDeviceSdkSettings, Sn as workbuddyAppExecutableCandidates, St as rewriteSessionTitleModel, T as FALLBACK_WORKBUDDY_MODELS_GLOBAL, Tn as withFileLock, Tt as selectPromoBadge, U as isVaultAccountId, Ut as imageDataUrl, V as hasEncryptedCredentialFields, Vt as MAX_INPUT_IMAGE_BYTES, W as legacyWorkbuddyOwnAuthPath, Wt as imageMimeForPath, X as APP_VERSION, Xt as queueNoticeText, Yt as parseQueueAnswer, Z as CONTEXT_OVERFLOW_MARKER, Zt as pruneTempDir, _ as createDeviceProfileLookup, _n as isWorkbuddyBundle, _t as parseUpstreamModel, a as readHostHeartbeat, at as declaredTools, b as readDeviceSettings, bn as openEncryptedField, bt as regionOf, c as WORKBUDDY_CONNECT_VERSION, ct as isContextTooLongBody, dn as deriveAtRestKey, dt as isFirstMessageGateBody, en as nativeModalityOf, et as WORKBUDDY_FALLBACK_SYSTEM_PROMPT, fn as deriveAtRestKeyId, ft as knownRegionOf, g as createTuringSdk, gn as isEncryptedFieldWrapper, gt as parseReasoning, h as createDeviceSdkPort, ht as parseCreditMultiplier, i as processStartTimeMs, it as classifyUpstreamError, j as ENCRYPTED_CREDENTIAL_CODE, jt as recordRefusal, k as fallbackModelsFor, kt as offDefaultFor, l as createFileRosterSeenStore, ln as WORKBUDDY_APP_EXECUTABLE_ENV, lt as isConversationIdGateBody, m as piAiRuntimeInfo, mn as findWorkbuddyAppExecutable, mt as openingEvidenceOfBody, n as clearHostHeartbeat, nt as WorkBuddyUpstreamClient, o as workbuddyHostHeartbeatPath, on as isDeviceId, p as resolveCnGateway, pn as fetchAtRestKeyPayload, pt as modelIdOfBody, q as workbuddyAccountId, qt as pickMediaModel, r as isHeartbeatProcessAlive, rt as channelGateMemberOf, s as writeHostHeartbeat, st as forceNeutralHead, t as WORKBUDDY_HOST_HEARTBEAT_FILENAME, tt as WorkBuddyCredentialRejectedError, un as clearAtRestKeyCache, ut as isCredentialRejectedError, v as describeDerivedDevices, vn as macosBundleExecutable, vt as perturbChannelFingerprints, w as FALLBACK_WORKBUDDY_MODELS, wn as resolveDshHome, wt as promoBadgeTone, x as saveDeviceProfile, xn as readAtRestKey, xt as requestEvidenceOf, y as isDeviceMode, yn as macosNestedAppBundles, yt as prepareChatBody, z as defaultDesktopAuthDirs, zt as IMAGE_TAG_IMAGE_TO_IMAGE } from "./host-heartbeat-WSrMdV6b.js";
2
2
  import z from "@deepseek-ai/schemastery";
3
3
  import { appendFile, mkdir, open, readFile, rename, rm, stat, writeFile } from "node:fs/promises";
4
4
  import { randomBytes, randomUUID, timingSafeEqual } from "node:crypto";
@@ -5349,17 +5349,26 @@ function callsFrame(chunk, choice, calls) {
5349
5349
  return `data: ${JSON.stringify(next)}\n\n`;
5350
5350
  }
5351
5351
  /**
5352
- * How to name a pool account in a sentence the USER reads.
5352
+ * How to name a pool account in a sentence the USER reads (issue #234).
5353
5353
  *
5354
- * Prefers the phone number (`uin`) because that is what the pool table shows and
5355
- * what a person recognises; the nickname and the opaque account id are fallbacks
5356
- * so this can never render an empty name. Deliberately NOT the hashed account id
5357
- * on its own: a 24-character hex digest identifies an account to the plugin, but
5358
- * to the person reading the answer it identifies nothing.
5354
+ * The NAME comes first, in the very order the card and the pool table use —
5355
+ * `preferredAccountName` (display name, then the enterprise-side name, then the
5356
+ * login alias). The notice used to lead with `uin`, which is the phone number:
5357
+ * a reporter read 「330135985725」 and could not tell whether that was an
5358
+ * account at all, let alone which one. Every other surface names an account by
5359
+ * its name, so this one must too.
5360
+ *
5361
+ * The identifier survives only as a LAST resort, for the account the desktop
5362
+ * app published no name for — an unnamed account still has to be pointed at,
5363
+ * and a number the user can match against a row beats a sentence that names
5364
+ * nobody. Deliberately NOT the hashed account id while a `uin` exists: a
5365
+ * 24-character hex digest identifies an account to the plugin, but to the
5366
+ * person reading the answer it identifies nothing.
5359
5367
  */
5360
5368
  function describeAccount(credential) {
5369
+ const name = preferredAccountName(credential);
5370
+ if (name !== "") return name;
5361
5371
  if (credential.uin !== void 0 && credential.uin !== "") return credential.uin;
5362
- if (credential.nickname !== void 0 && credential.nickname !== "") return credential.nickname;
5363
5372
  return workbuddyAccountId(credential);
5364
5373
  }
5365
5374
  /**
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": "5.21.2",
5
+ "version": "5.21.3",
6
6
  "author": "dingminhua",
7
7
  "copyright": "Copyright (c) 2026 LaoDing",
8
8
  "license": "MIT",