dsh-connect-workbuddy 5.24.8 → 5.24.9

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,59 @@
1
1
  # Changelog
2
2
 
3
+ ## 5.24.9 (2026-11-16)
4
+
5
+ > 版本号是 **patch**:新增一处只读展示,默认行为、开关、路由形状与池子排序一律未动;
6
+ > 无破坏性改动。来自 issue #263。
7
+
8
+ ### 新增:积分快过期这件事,账号里能直接看出来了(issue #263)
9
+
10
+ 报告者贴了 dsh-connect-trae 的琥珀色横幅(「有 143 积分将在 3 天内过期(1 个套餐)/
11
+ 最早到期:2026/11/19 08:05」)并问:「每个账号快要过期的积分能不能在账号里简单的表达出来?」
12
+
13
+ 事实是:**数据早就算好了,只是没渲染。** `WorkBuddyCredits` 一直带着 `expiringSoon`(3 天内到期
14
+ 的积分合计)与 `nearestExpiryMs`(最近一次到期时刻),账号池表格也早就在成员行里打印
15
+ `{count} 积分 3 天内过期`。缺的是另外两个表面:
16
+
17
+ - **编写器(composer)的账号面板**:那张表每行只印余额,没有任何临期信息。
18
+ - **卡片的「账号」分区**:完全没有临期提醒。`status.credits` 一直在文档里,但卡片只读过
19
+ `status.creditsError`,余额字段一次都没被渲染过。
20
+
21
+ 这次把这条事实接到这两个表面上:
22
+
23
+ 1. **`/usage` 之外的账号积分路由**(`workBuddyAccountCredits`)现在每个账号额外带回
24
+ `expiringSoon` 与 `nearestExpiryMs`。这条路由本来就逐个账号读余额,信息是现成的;不补这两个
25
+ 字段,面板就永远无从知道某个余额即将蒸发。**必须补**的原因还有一个:账号池的 `otherAccounts`
26
+ 只列非成员账号、且不带余额,所以对「不在池里的账号」,这是唯一的来源。
27
+ 2. **编写器面板每行**在余额下面加一行小字:`{count} 积分 3 天内过期`,措辞**复用账号池的
28
+ `row.poolCreditSoon`**——同一个事实、同一次测量,两处不能各写一套话术,否则读者要去分辨它们
29
+ 讲的是不是一件事。
30
+ 3. **卡片「账号」分区顶部**加一条琥珀色横幅:**点名当前选用账号** + 临期数量 + 最早到期时刻。
31
+ 点名是必要的:`status.credits` 是**当前选用那个账号**的账单答案,不是整池合计——一个不带主语
32
+ 的数字摆在多账号表格上方,必然被读成"所有账号加起来"。
33
+
34
+ ### 为什么行内只说数量、日期只在悬停里
35
+
36
+ 5.20.22 有过明确决定:账号行里那行「最近积分包 11/27 03:46 过期」被**按用户要求撤掉**了——它
37
+ 在每个账号上都占第二行,而那个日期几个月后才到,没人在拿它做决定。留下的是**能据以行动的数量**。
38
+ 这次严格沿用:面板每行仍然只印数量,绝对时刻进整行的 `title`(悬停可读、屏幕阅读器可读),
39
+ **不**打印出来。
40
+
41
+ 卡片横幅是唯一例外:那里只出现**一次**(为一个账号),而不是每行一次,且它回答的是「我要损失多少、
42
+ 最近一次什么时候」——所以允许同时印出数量与最早到期时刻。
43
+
44
+ ### 关键约束:`expiringSoon > 0` 是唯一的触发条件
45
+
46
+ `nearestExpiryMs` 是**所有**积分包里最近的一次到期,所以一个**没有任何积分要过期**的账号照样可能
47
+ 带着一个未来日期(月度包到期后刷新,从不真正过期)。因此两处展示都只认 `expiringSoon > 0`:
48
+
49
+ - 余额没读到时(`credits` 缺失)**什么都不显示**——「0 积分过期」是一次测量结论,不能替一个没人
50
+ 测量过的账号下这个结论,那会让本该显示「—」的行宣称用户积分安全。
51
+ - 只有日期、没有数量时**什么都不显示**——否则就是 5.20.22 撤掉的那行日期卷土重来。
52
+
53
+ 守护测试(均已做变异验证:改坏映射、改坏触发条件、去掉账号名,都会变红):路由两个字段的透传与
54
+ 读取失败时的缺省;面板每行的数量与悬停时刻、以及「没临期 / 没测量」两种沉默;卡片横幅的账号名、
55
+ 数量与时刻,以及同样两种沉默。
56
+
3
57
  ## 5.24.8 (2026-11-16)
4
58
 
5
59
  > 版本号是 **patch**:这是一次**文档 / 打包**修复版,默认行为零变化(开关仍默认关闭、无接口变化、
package/lib/bin.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { F as WorkBuddyCredentialStore, J as workbuddyOwnAuthPath, Mn as hostPeersInfo, N as WORKBUDDY_AUTH_FILE_ENV, Nn as resolveDshHome, P as WORKBUDDY_VAULT_DIRNAME, R as defaultDesktopAuthCandidates, T as FALLBACK_WORKBUDDY_MODELS_GLOBAL, W as legacyWorkbuddyOwnAuthPath, X as APP_VERSION, Y as workbuddyVaultDir, _n as protectCredentialDirectory, a as readHostHeartbeat, b as readDeviceSettings, c as WORKBUDDY_CONNECT_VERSION, ct as describeRequestHeaderNames, d as rosterSeenPath, dn as readDeviceTokenFile, et as DEFAULT_WIRE_PROFILE, f as WORKBUDDY_CN_BASE_ENV, fn as ensureDeviceSalt, g as createTuringSdk, gn as inspectCredentialDirectory, m as piAiRuntimeInfo, mn as deriveDeviceId, o as workbuddyHostHeartbeatPath, p as resolveCnGateway, pn as readDeviceSalt, r as isHeartbeatProcessAlive, rt as WorkBuddyUpstreamClient, u as describeRosterSeenPayload, un as WORKBUDDY_DEVICE_TOKEN_FILE_ENV, vn as WORKBUDDY_APP_EXECUTABLE_ENV, w as FALLBACK_WORKBUDDY_MODELS, wn as findWorkbuddyAppExecutableWithSource, z as defaultDesktopAuthDirs } from "./host-heartbeat-BUtle_vT.js";
2
+ import { F as WorkBuddyCredentialStore, J as workbuddyOwnAuthPath, Mn as hostPeersInfo, N as WORKBUDDY_AUTH_FILE_ENV, Nn as resolveDshHome, P as WORKBUDDY_VAULT_DIRNAME, R as defaultDesktopAuthCandidates, T as FALLBACK_WORKBUDDY_MODELS_GLOBAL, W as legacyWorkbuddyOwnAuthPath, X as APP_VERSION, Y as workbuddyVaultDir, _n as protectCredentialDirectory, a as readHostHeartbeat, b as readDeviceSettings, c as WORKBUDDY_CONNECT_VERSION, ct as describeRequestHeaderNames, d as rosterSeenPath, dn as readDeviceTokenFile, et as DEFAULT_WIRE_PROFILE, f as WORKBUDDY_CN_BASE_ENV, fn as ensureDeviceSalt, g as createTuringSdk, gn as inspectCredentialDirectory, m as piAiRuntimeInfo, mn as deriveDeviceId, o as workbuddyHostHeartbeatPath, p as resolveCnGateway, pn as readDeviceSalt, r as isHeartbeatProcessAlive, rt as WorkBuddyUpstreamClient, u as describeRosterSeenPayload, un as WORKBUDDY_DEVICE_TOKEN_FILE_ENV, vn as WORKBUDDY_APP_EXECUTABLE_ENV, w as FALLBACK_WORKBUDDY_MODELS, wn as findWorkbuddyAppExecutableWithSource, z as defaultDesktopAuthDirs } from "./host-heartbeat-CgkojTgC.js";
3
3
  import { readFile } from "node:fs/promises";
4
4
  import { dirname, join } from "node:path";
5
5
  import { realpathSync } from "node:fs";
package/lib/client.js CHANGED
@@ -7761,6 +7761,27 @@ ${u} ${p}-pool .sw input:checked+.sw-track::after{transform:translateX(16px)}
7761
7761
  .dsm-workbuddy-pool-hint{font-size:12px;line-height:18px;color:var(--dsw-alias-label-secondary,#c6c9d0)}
7762
7762
  .dsm-workbuddy-pool-note{margin:0;font-size:12px;line-height:17px;color:var(--dsw-alias-label-secondary,#c6c9d0)}
7763
7763
  .dsm-workbuddy-pool-warn{margin:0;padding:9px 11px;border-radius:9px;font-size:12px;line-height:17px;color:var(--dsw-alias-state-warn-primary,#f59e0b);background:rgba(245,158,11,.09);border:1px solid rgba(245,158,11,.3)}
7764
+ /* Credits about to lapse, once for the account in use (issue #263).
7765
+ The pool's .dsm-workbuddy-pool-warn is the same amber box, but this one is a
7766
+ COLUMN because it carries two facts: the amount (the actionable half) and the
7767
+ earliest instant (the "when"). Two lines rather than one wrapped sentence —
7768
+ at the card's width a single line would break the amount away from its own
7769
+ sentence on a long date, and the amount is what must stay scannable. */
7770
+ .dsm-workbuddy-expiry{
7771
+ display:flex;flex-direction:column;gap:2px;margin:0;
7772
+ padding:9px 11px;border-radius:9px;
7773
+ font-size:12px;line-height:17px;
7774
+ color:var(--dsw-alias-state-warn-primary,#f59e0b);
7775
+ background:rgba(245,158,11,.09);
7776
+ border:1px solid rgba(245,158,11,.3);
7777
+ }
7778
+ .dsm-workbuddy-expiry strong{font-weight:600}
7779
+ /* The instant, a notch quieter than the amount it belongs to: it answers a
7780
+ follow-up question, it is not the message. */
7781
+ .dsm-workbuddy-expiry-detail{
7782
+ font-size:11px;line-height:16px;font-weight:400;
7783
+ color:var(--dsw-alias-label-secondary,#c6c9d0);
7784
+ }
7764
7785
  /* Ghost members (issue #60): the warning plus one removable chip per id. The
7765
7786
  chips are what make the warning actionable — a ghost has no row in the table
7766
7787
  above, because that roster is the sign-ins this machine still has. */
@@ -8863,6 +8884,17 @@ ${u} ${p}-pool .sw input:checked+.sw-track::after{transform:translateX(16px)}
8863
8884
  .dsm-workbuddy-composer-panel-num{
8864
8885
  text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap;
8865
8886
  }
8887
+ /* The "N lapsing within 3 days" warning, under the balance (issue #263).
8888
+ display:block is what puts it on its own line: the cell is a nowrap numeric
8889
+ column, so an inline span would sit beside the figure and stretch the column
8890
+ for every row in a 248px popover. Smaller and quieter than the balance it
8891
+ annotates, in the same warn tone the pool table uses for the same fact — one
8892
+ measurement must read the same on both surfaces. */
8893
+ .dsm-workbuddy-composer-panel-soon{
8894
+ display:block;margin-top:1px;
8895
+ font-size:11px;line-height:15px;font-weight:400;
8896
+ color:var(--dsw-alias-state-warn-primary,#f59e0b);
8897
+ }
8866
8898
  .dsm-workbuddy-composer-panel-table thead th.dsm-workbuddy-composer-panel-num{padding-right:0}
8867
8899
  .dsm-workbuddy-composer-panel-table tbody th{
8868
8900
  padding:0;font-weight:400;text-align:left;vertical-align:middle;
@@ -12377,6 +12409,17 @@ ${u} ${p}-pool .sw input:checked+.sw-track::after{transform:translateX(16px)}
12377
12409
  className: "dsm-workbuddy-usage-error",
12378
12410
  children: t("row.creditsError", { message: status.creditsError })
12379
12411
  }),
12412
+ status.credits === void 0 || status.credits.expiringSoon <= 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", {
12413
+ className: "dsm-workbuddy-expiry",
12414
+ role: "status",
12415
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: t("row.creditExpirySoon", {
12416
+ accountName: nameOf(status.accountName),
12417
+ count: formatNumber(status.credits.expiringSoon)
12418
+ }) }), status.credits.nearestExpiryMs === void 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
12419
+ className: "dsm-workbuddy-expiry-detail",
12420
+ children: t("row.creditExpiryEarliest", { time: formatDate(status.credits.nearestExpiryMs) })
12421
+ })]
12422
+ }),
12380
12423
  status.refreshError === void 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
12381
12424
  className: "dsm-workbuddy-usage-error",
12382
12425
  role: "alert",
@@ -13941,7 +13984,9 @@ ${u} ${p}-pool .sw input:checked+.sw-track::after{transform:translateX(16px)}
13941
13984
  const usable = stateTone(availability) === "ok";
13942
13985
  const currentMark = live ? t("composer.current") : void 0;
13943
13986
  const reasonMark = usable ? void 0 : availabilityMark(t, availability);
13944
- const spoken = detailLine(live ? t("composer.current") : void 0, usable ? void 0 : availabilityLine(t, availability));
13987
+ const lapsing = row.credits === void 0 || row.expiringSoon === void 0 || row.expiringSoon <= 0 ? void 0 : t("row.poolCreditSoon", { count: formatCredits(row.expiringSoon) });
13988
+ const soonest = lapsing === void 0 || row.nearestExpiryMs === void 0 ? void 0 : t("composer.creditSoonHint", { time: formatShortClock(row.nearestExpiryMs) });
13989
+ const spoken = detailLine(live ? t("composer.current") : void 0, usable ? void 0 : availabilityLine(t, availability), soonest);
13945
13990
  const whoLabel = spoken === void 0 ? row.accountName : `${row.accountName} — ${spoken}`;
13946
13991
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("tr", {
13947
13992
  className: live ? "dsm-workbuddy-composer-panel-row-current" : void 0,
@@ -13977,9 +14022,12 @@ ${u} ${p}-pool .sw input:checked+.sw-track::after{transform:translateX(16px)}
13977
14022
  })]
13978
14023
  })]
13979
14024
  })
13980
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("td", {
14025
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("td", {
13981
14026
  className: "dsm-workbuddy-composer-panel-num",
13982
- children: row.credits === void 0 ? "—" : formatCredits(row.credits)
14027
+ children: [row.credits === void 0 ? "—" : formatCredits(row.credits), lapsing === void 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
14028
+ className: "dsm-workbuddy-composer-panel-soon",
14029
+ children: lapsing
14030
+ })]
13983
14031
  })]
13984
14032
  }, row.id);
13985
14033
  }) })]
@@ -15374,6 +15422,8 @@ ${u} ${p}-pool .sw input:checked+.sw-track::after{transform:translateX(16px)}
15374
15422
  "row.poolLogBenefitFailed": "{accountName} claim failed: {message}",
15375
15423
  "row.poolBenefitHint": "Claim it on the plans page: {url}",
15376
15424
  "row.poolCreditSoon": "{count} expiring within 3 days",
15425
+ "row.creditExpirySoon": "{accountName}: {count} credits expiring within 3 days",
15426
+ "row.creditExpiryEarliest": "Earliest expiry: {time}",
15377
15427
  "row.poolExcludedRateLimited": "Rate limited",
15378
15428
  "row.poolExcludedModelBusy": "Model busy",
15379
15429
  "row.poolExcludedOutOfCredit": "Out of credits",
@@ -15670,6 +15720,7 @@ ${u} ${p}-pool .sw input:checked+.sw-track::after{transform:translateX(16px)}
15670
15720
  "composer.credits": "Credits",
15671
15721
  "composer.switchTo": "Switch to {account}",
15672
15722
  "composer.current": "In use",
15723
+ "composer.creditSoonHint": "Earliest expiry: {time}",
15673
15724
  "composer.noAccounts": "No account in this region",
15674
15725
  "composer.signedOut": "Not signed in",
15675
15726
  "composer.openSettings": "Settings",
@@ -15941,6 +15992,8 @@ ${u} ${p}-pool .sw input:checked+.sw-track::after{transform:translateX(16px)}
15941
15992
  "row.poolLogBenefitFailed": "{accountName} 领取失败:{message}",
15942
15993
  "row.poolBenefitHint": "去套餐与积分页领取:{url}",
15943
15994
  "row.poolCreditSoon": "{count} 积分 3 天内过期",
15995
+ "row.creditExpirySoon": "{accountName}:{count} 积分将在 3 天内过期",
15996
+ "row.creditExpiryEarliest": "最早到期:{time}",
15944
15997
  "row.poolExcludedRateLimited": "被限流",
15945
15998
  "row.poolExcludedModelBusy": "模型繁忙",
15946
15999
  "row.poolExcludedOutOfCredit": "积分耗尽",
@@ -16237,6 +16290,7 @@ ${u} ${p}-pool .sw input:checked+.sw-track::after{transform:translateX(16px)}
16237
16290
  "composer.credits": "积分",
16238
16291
  "composer.switchTo": "切换到 {account}",
16239
16292
  "composer.current": "当前选用",
16293
+ "composer.creditSoonHint": "最早到期:{time}",
16240
16294
  "composer.noAccounts": "该区域暂无账号",
16241
16295
  "composer.signedOut": "未登录",
16242
16296
  "composer.openSettings": "设置",
@@ -11239,7 +11239,7 @@ function describeRosterSeenPayload(raw) {
11239
11239
  //#endregion
11240
11240
  //#region src/version.ts
11241
11241
  /** The npm package version this build was produced from. */
11242
- const WORKBUDDY_CONNECT_VERSION = "5.24.8";
11242
+ const WORKBUDDY_CONNECT_VERSION = "5.24.9";
11243
11243
  //#endregion
11244
11244
  //#region src/host-heartbeat.ts
11245
11245
  /**
package/lib/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as CREDENTIAL_REJECTED_CODE, $t as isBareBase64Image, A as withoutRouters, An as readAtRestKey, At as selectPromoBadge, B as defaultDesktopAuthPath, Bt as WorkBuddyVideoError, C as setDeviceMode, Cn as findWorkbuddyAppExecutable, Ct as prepareChatBody, D as applyContextBudgets, Dn as macosBundleExecutable, Dt as toolSchemaRejectAdvice, E as WorkBuddyCatalog, En as isWorkbuddyBundle, Et as rewriteSessionTitleModel, F as WorkBuddyCredentialStore, Fn as writeFileAtomic, Ft as offRefused, G as parseWorkBuddyAuth, Gt as IMAGE_TAG_IMAGE_TO_IMAGE, H as isEncryptedCredentialError, Ht as pickVideoModel, I as WorkBuddyEncryptedCredentialError, It as recordRefusal, J as workbuddyOwnAuthPath, Jt as WorkBuddyImageError, K as preferredAccountName, Kt as IMAGE_TAG_TEXT_TO_IMAGE, L as authFileName, Lt as withEffectiveOff, M as WORKBUDDY_AUTH_FILENAME, Mt as defaultOffModelIds, N as WORKBUDDY_AUTH_FILE_ENV, Nn as resolveDshHome, Nt as lastRefusalFor, O as deriveCatalog, On as macosNestedAppBundles, Ot as attachBusyLevels, Pn as withFileLock, Pt as offDefaultFor, Q as CONTEXT_OVERFLOW_MARKER, Qt as imageSizeLimitsOf, R as defaultDesktopAuthCandidates, Rt as VIDEO_TAG_IMAGE_TO_VIDEO, S as saveDeviceSdkSettings, Sn as fetchAtRestKeyPayload, St as perturbChannelFingerprints, T as FALLBACK_WORKBUDDY_MODELS_GLOBAL, Tn as isEncryptedFieldWrapper, Tt as requestEvidenceOf, U as isVaultAccountId, Ut as resolveVideoParams, V as hasEncryptedCredentialFields, Vt as parseSupportedSecondsRange, W as legacyWorkbuddyOwnAuthPath, Wt as IMAGE_SIZE_LIMITS_WIDE, X as APP_VERSION, Xt as imageMimeForPath, Yt as imageDataUrl, Z as BODY_OVERSIZE_MARKER, Zt as imageModelChoices, _ as createDeviceProfileLookup, _t as modelIdOfBody, a as readHostHeartbeat, an as queueNoticeText, at as classifyUpstreamError, b as readDeviceSettings, bn as deriveAtRestKey, bt as parseReasoning, c as WORKBUDDY_CONNECT_VERSION, cn as imageDefaultFor, dt as isContextTooLongBody, en as isWatermarkFreeImageModel, ft as isConversationIdGateBody, g as createTuringSdk, gt as knownRegionOf, h as createDeviceSdkPort, hn as isDeviceId, ht as isToolSchemaRejectBody, i as processStartTimeMs, in as parseQueueAnswer, it as channelGateMemberOf, j as ENCRYPTED_CREDENTIAL_CODE, jn as workbuddyAppExecutableCandidates, jt as REFUSES_OFF_MODEL_IDS, k as fallbackModelsFor, kn as openEncryptedField, kt as promoBadgeTone, l as createFileRosterSeenStore, ln as nativeModalityOf, lt as forceNeutralHead, m as piAiRuntimeInfo, mt as isFirstMessageGateBody, n as clearHostHeartbeat, nn as pickMediaModel, nt as WorkBuddyCredentialRejectedError, o as workbuddyHostHeartbeatPath, on as pruneTempDir, ot as declaredTools, p as resolveCnGateway, pt as isCredentialRejectedError, q as workbuddyAccountId, qt as MAX_INPUT_IMAGE_BYTES, r as isHeartbeatProcessAlive, rn as sniffImageMime, rt as WorkBuddyUpstreamClient, s as writeHostHeartbeat, sn as NATIVE_MODALITY_BY_MODEL_ID, st as deriveStableConversationId, t as WORKBUDDY_HOST_HEARTBEAT_FILENAME, tn as parseImageDataUrl, tt as WORKBUDDY_FALLBACK_SYSTEM_PROMPT, ut as isBodyOversizeRefusal, v as describeDerivedDevices, vn as WORKBUDDY_APP_EXECUTABLE_ENV, vt as openingEvidenceOfBody, w as FALLBACK_WORKBUDDY_MODELS, wt as regionOf, x as saveDeviceProfile, xn as deriveAtRestKeyId, xt as parseUpstreamModel, y as isDeviceMode, yn as clearAtRestKeyCache, yt as parseCreditMultiplier, z as defaultDesktopAuthDirs, zt as VIDEO_TAG_TEXT_TO_VIDEO } from "./host-heartbeat-BUtle_vT.js";
1
+ import { $ as CREDENTIAL_REJECTED_CODE, $t as isBareBase64Image, A as withoutRouters, An as readAtRestKey, At as selectPromoBadge, B as defaultDesktopAuthPath, Bt as WorkBuddyVideoError, C as setDeviceMode, Cn as findWorkbuddyAppExecutable, Ct as prepareChatBody, D as applyContextBudgets, Dn as macosBundleExecutable, Dt as toolSchemaRejectAdvice, E as WorkBuddyCatalog, En as isWorkbuddyBundle, Et as rewriteSessionTitleModel, F as WorkBuddyCredentialStore, Fn as writeFileAtomic, Ft as offRefused, G as parseWorkBuddyAuth, Gt as IMAGE_TAG_IMAGE_TO_IMAGE, H as isEncryptedCredentialError, Ht as pickVideoModel, I as WorkBuddyEncryptedCredentialError, It as recordRefusal, J as workbuddyOwnAuthPath, Jt as WorkBuddyImageError, K as preferredAccountName, Kt as IMAGE_TAG_TEXT_TO_IMAGE, L as authFileName, Lt as withEffectiveOff, M as WORKBUDDY_AUTH_FILENAME, Mt as defaultOffModelIds, N as WORKBUDDY_AUTH_FILE_ENV, Nn as resolveDshHome, Nt as lastRefusalFor, O as deriveCatalog, On as macosNestedAppBundles, Ot as attachBusyLevels, Pn as withFileLock, Pt as offDefaultFor, Q as CONTEXT_OVERFLOW_MARKER, Qt as imageSizeLimitsOf, R as defaultDesktopAuthCandidates, Rt as VIDEO_TAG_IMAGE_TO_VIDEO, S as saveDeviceSdkSettings, Sn as fetchAtRestKeyPayload, St as perturbChannelFingerprints, T as FALLBACK_WORKBUDDY_MODELS_GLOBAL, Tn as isEncryptedFieldWrapper, Tt as requestEvidenceOf, U as isVaultAccountId, Ut as resolveVideoParams, V as hasEncryptedCredentialFields, Vt as parseSupportedSecondsRange, W as legacyWorkbuddyOwnAuthPath, Wt as IMAGE_SIZE_LIMITS_WIDE, X as APP_VERSION, Xt as imageMimeForPath, Yt as imageDataUrl, Z as BODY_OVERSIZE_MARKER, Zt as imageModelChoices, _ as createDeviceProfileLookup, _t as modelIdOfBody, a as readHostHeartbeat, an as queueNoticeText, at as classifyUpstreamError, b as readDeviceSettings, bn as deriveAtRestKey, bt as parseReasoning, c as WORKBUDDY_CONNECT_VERSION, cn as imageDefaultFor, dt as isContextTooLongBody, en as isWatermarkFreeImageModel, ft as isConversationIdGateBody, g as createTuringSdk, gt as knownRegionOf, h as createDeviceSdkPort, hn as isDeviceId, ht as isToolSchemaRejectBody, i as processStartTimeMs, in as parseQueueAnswer, it as channelGateMemberOf, j as ENCRYPTED_CREDENTIAL_CODE, jn as workbuddyAppExecutableCandidates, jt as REFUSES_OFF_MODEL_IDS, k as fallbackModelsFor, kn as openEncryptedField, kt as promoBadgeTone, l as createFileRosterSeenStore, ln as nativeModalityOf, lt as forceNeutralHead, m as piAiRuntimeInfo, mt as isFirstMessageGateBody, n as clearHostHeartbeat, nn as pickMediaModel, nt as WorkBuddyCredentialRejectedError, o as workbuddyHostHeartbeatPath, on as pruneTempDir, ot as declaredTools, p as resolveCnGateway, pt as isCredentialRejectedError, q as workbuddyAccountId, qt as MAX_INPUT_IMAGE_BYTES, r as isHeartbeatProcessAlive, rn as sniffImageMime, rt as WorkBuddyUpstreamClient, s as writeHostHeartbeat, sn as NATIVE_MODALITY_BY_MODEL_ID, st as deriveStableConversationId, t as WORKBUDDY_HOST_HEARTBEAT_FILENAME, tn as parseImageDataUrl, tt as WORKBUDDY_FALLBACK_SYSTEM_PROMPT, ut as isBodyOversizeRefusal, v as describeDerivedDevices, vn as WORKBUDDY_APP_EXECUTABLE_ENV, vt as openingEvidenceOfBody, w as FALLBACK_WORKBUDDY_MODELS, wt as regionOf, x as saveDeviceProfile, xn as deriveAtRestKeyId, xt as parseUpstreamModel, y as isDeviceMode, yn as clearAtRestKeyCache, yt as parseCreditMultiplier, z as defaultDesktopAuthDirs, zt as VIDEO_TAG_TEXT_TO_VIDEO } from "./host-heartbeat-CgkojTgC.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";
@@ -12141,6 +12141,13 @@ function volatileFlagOf(field) {
12141
12141
  * carries NO `credits` field rather than `0`, so the panel renders "—" instead
12142
12142
  * of telling the user they are out of credits.
12143
12143
  *
12144
+ * Each row also carries how much of that balance lapses within three days
12145
+ * (issue #263). This route is the only place the panel can learn it: the pool
12146
+ * block covers pool MEMBERS only, and an account outside the pool is exactly
12147
+ * the one whose expiring credits would otherwise go unmentioned. The whole
12148
+ * answer is kept rather than just `total` for that reason — the expiry split is
12149
+ * already computed by the same read, so forwarding it costs no extra call.
12150
+ *
12144
12151
  * Failures are contained per account: one dead credential must not blank the
12145
12152
  * table for the accounts that are fine.
12146
12153
  */
@@ -12150,13 +12157,15 @@ async function workBuddyAccountCredits(deps, region) {
12150
12157
  const exclusions = await deps.accountExclusions?.(region).catch(() => void 0) ?? {};
12151
12158
  return Promise.all(accounts.map(async (account) => {
12152
12159
  const credential = await store.credentialFor(account.id).catch(() => void 0);
12153
- const credits = credential === void 0 ? void 0 : await deps.client.fetchCredits(credential).then((answer) => answer.total).catch(() => void 0);
12160
+ const answer = credential === void 0 ? void 0 : await deps.client.fetchCredits(credential).catch(() => void 0);
12154
12161
  const excludedBy = exclusions[account.id];
12155
12162
  return {
12156
12163
  id: account.id,
12157
12164
  accountName: account.accountName,
12158
12165
  selected: account.selected,
12159
- ...credits === void 0 ? {} : { credits },
12166
+ ...answer === void 0 ? {} : { credits: answer.total },
12167
+ ...answer === void 0 ? {} : { expiringSoon: answer.expiringSoon },
12168
+ ...answer?.nearestExpiryMs === void 0 ? {} : { nearestExpiryMs: answer.nearestExpiryMs },
12160
12169
  ...excludedBy === void 0 ? {} : { excludedBy }
12161
12170
  };
12162
12171
  }));
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.24.8",
5
+ "version": "5.24.9",
6
6
  "author": "dingminhua",
7
7
  "copyright": "Copyright (c) 2026 LaoDing",
8
8
  "license": "MIT",