dsh-connect-workbuddy 5.24.10 → 5.24.11
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,37 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 5.24.11 (2026-11-17)
|
|
4
|
+
|
|
5
|
+
> 版本号是 **patch**:只纠正一处 OAuth 账号资料采集,默认行为、出站字节(仅登录成功那一刻)、
|
|
6
|
+
> 既有开关与池子排序一律未动;无破坏性改动。来自 issue #267 / #268 / #269。
|
|
7
|
+
|
|
8
|
+
### 修复:OAuth 添加的账号不再显示「未命名账号」,多个账号不再互相覆盖
|
|
9
|
+
|
|
10
|
+
报告者的现象一致:网页/扫码登录添加账号后显示 `未命名账号`;登录第二个账号只显示一个,前一个被覆盖;
|
|
11
|
+
密码登录两个账号也只看到一个。三者是同一个根因。
|
|
12
|
+
|
|
13
|
+
`collectAccount()`(`src/oauth.ts`)此前只从 `{API_PREFIX}/login/account` 读账号资料。上游现在对这个端点
|
|
14
|
+
**无论哪把凭据**都回 `{"code":12151,"msg":"12151:not choose login account","data":{}}`。空 envelope 被当成
|
|
15
|
+
正常资料接受后,`uid` / `nickname` / `uin` 全为空:
|
|
16
|
+
|
|
17
|
+
- 显示上,空名字走到卡片的 `row.accountUnnamed` → `未命名账号`;
|
|
18
|
+
- 身份上,`workbuddyAccountId()` 以 `uin ?? uid ?? nickname ?? 'unknown'` 求 sha256,空字段让每个账号
|
|
19
|
+
都落到同一个 vault id,于是第二个登录直接覆盖第一个的文件。
|
|
20
|
+
|
|
21
|
+
改动只有一条采集链,分三层:
|
|
22
|
+
|
|
23
|
+
1. **先试 `/v2/plugin/account`**:同一 Bearer / X-Domain 头,返回完整身份(uid / nickname / uin);旧端点
|
|
24
|
+
仅作为仍服务它的主机的回退保留。
|
|
25
|
+
2. **拒绝空资料**:任一端点返回的 data 没有非空 uid 就当作没拿到,继续试下一个——12151 的空 envelope
|
|
26
|
+
不再被当成有效身份。
|
|
27
|
+
3. **JWT 兜底**:两端点都空或不可达时,从 access token 的 JWT payload 里取 `sub` / `nickname` /
|
|
28
|
+
`uin` / `preferred_username`。这**不是鉴权**(token 已被 `/auth/token` 接受,这里只当显示元数据与稳定
|
|
29
|
+
id 种子读,非空才用),只是让身份不会因为上游端点故障而彻底丢失。
|
|
30
|
+
|
|
31
|
+
守护测试在 `tests/oauth.spec.ts`:优先新端点、拒绝 12151 空资料后回退旧端点、JWT 兜底、两个空资料账号得到
|
|
32
|
+
不同 vault id、畸形 token 不抛错、身份调用仍带 Bearer + X-Domain。三项均已做变异验证——把端点顺序改回旧
|
|
33
|
+
的、去掉空资料拒绝、去掉 JWT 兜底,相应测试都会变红。
|
|
34
|
+
|
|
3
35
|
## 5.24.10 (2026-11-17)
|
|
4
36
|
|
|
5
37
|
> 版本号是 **patch**:新增一个**默认关闭**的实验开关(路线 B),默认行为、出站字节、
|
package/lib/bin.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { F as WorkBuddyCredentialStore, J as workbuddyOwnAuthPath, N as WORKBUDDY_AUTH_FILE_ENV, Nn as hostPeersInfo, P as WORKBUDDY_VAULT_DIRNAME, Pn as resolveDshHome, R as defaultDesktopAuthCandidates, T as FALLBACK_WORKBUDDY_MODELS_GLOBAL, Tn as findWorkbuddyAppExecutableWithSource, W as legacyWorkbuddyOwnAuthPath, X as APP_VERSION, Y as workbuddyVaultDir, _n as inspectCredentialDirectory, a as readHostHeartbeat, b as readDeviceSettings, c as WORKBUDDY_CONNECT_VERSION, d as rosterSeenPath, dn as WORKBUDDY_DEVICE_TOKEN_FILE_ENV, et as DEFAULT_WIRE_PROFILE, f as WORKBUDDY_CN_BASE_ENV, fn as readDeviceTokenFile, g as createTuringSdk, hn as deriveDeviceId, lt as describeRequestHeaderNames, m as piAiRuntimeInfo, mn as readDeviceSalt, o as workbuddyHostHeartbeatPath, p as resolveCnGateway, pn as ensureDeviceSalt, r as isHeartbeatProcessAlive, rt as WorkBuddyUpstreamClient, u as describeRosterSeenPayload, vn as protectCredentialDirectory, w as FALLBACK_WORKBUDDY_MODELS, yn as WORKBUDDY_APP_EXECUTABLE_ENV, z as defaultDesktopAuthDirs } from "./host-heartbeat-
|
|
2
|
+
import { F as WorkBuddyCredentialStore, J as workbuddyOwnAuthPath, N as WORKBUDDY_AUTH_FILE_ENV, Nn as hostPeersInfo, P as WORKBUDDY_VAULT_DIRNAME, Pn as resolveDshHome, R as defaultDesktopAuthCandidates, T as FALLBACK_WORKBUDDY_MODELS_GLOBAL, Tn as findWorkbuddyAppExecutableWithSource, W as legacyWorkbuddyOwnAuthPath, X as APP_VERSION, Y as workbuddyVaultDir, _n as inspectCredentialDirectory, a as readHostHeartbeat, b as readDeviceSettings, c as WORKBUDDY_CONNECT_VERSION, d as rosterSeenPath, dn as WORKBUDDY_DEVICE_TOKEN_FILE_ENV, et as DEFAULT_WIRE_PROFILE, f as WORKBUDDY_CN_BASE_ENV, fn as readDeviceTokenFile, g as createTuringSdk, hn as deriveDeviceId, lt as describeRequestHeaderNames, m as piAiRuntimeInfo, mn as readDeviceSalt, o as workbuddyHostHeartbeatPath, p as resolveCnGateway, pn as ensureDeviceSalt, r as isHeartbeatProcessAlive, rt as WorkBuddyUpstreamClient, u as describeRosterSeenPayload, vn as protectCredentialDirectory, w as FALLBACK_WORKBUDDY_MODELS, yn as WORKBUDDY_APP_EXECUTABLE_ENV, z as defaultDesktopAuthDirs } from "./host-heartbeat-BWUu5KWc.js";
|
|
3
3
|
import { readFile } from "node:fs/promises";
|
|
4
4
|
import { dirname, join } from "node:path";
|
|
5
5
|
import { realpathSync } from "node:fs";
|
|
@@ -11267,7 +11267,7 @@ function describeRosterSeenPayload(raw) {
|
|
|
11267
11267
|
//#endregion
|
|
11268
11268
|
//#region src/version.ts
|
|
11269
11269
|
/** The npm package version this build was produced from. */
|
|
11270
|
-
const WORKBUDDY_CONNECT_VERSION = "5.24.
|
|
11270
|
+
const WORKBUDDY_CONNECT_VERSION = "5.24.11";
|
|
11271
11271
|
//#endregion
|
|
11272
11272
|
//#region src/host-heartbeat.ts
|
|
11273
11273
|
/**
|
package/lib/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as CREDENTIAL_REJECTED_CODE, $t as imageSizeLimitsOf, A as withoutRouters, An as openEncryptedField, At as promoBadgeTone, B as defaultDesktopAuthPath, Bt as VIDEO_TAG_TEXT_TO_VIDEO, C as setDeviceMode, Cn as fetchAtRestKeyPayload, Ct as perturbChannelFingerprints, D as applyContextBudgets, Dn as isWorkbuddyBundle, Dt as rewriteSessionTitleModel, E as WorkBuddyCatalog, En as isEncryptedFieldWrapper, Et as requestEvidenceOf, F as WorkBuddyCredentialStore, Fn as withFileLock, Ft as offDefaultFor, G as parseWorkBuddyAuth, Gt as IMAGE_SIZE_LIMITS_WIDE, H as isEncryptedCredentialError, Ht as parseSupportedSecondsRange, I as WorkBuddyEncryptedCredentialError, In as writeFileAtomic, It as offRefused, J as workbuddyOwnAuthPath, Jt as MAX_INPUT_IMAGE_BYTES, K as preferredAccountName, Kt as IMAGE_TAG_IMAGE_TO_IMAGE, L as authFileName, Lt as recordRefusal, M as WORKBUDDY_AUTH_FILENAME, Mn as workbuddyAppExecutableCandidates, Mt as REFUSES_OFF_MODEL_IDS, N as WORKBUDDY_AUTH_FILE_ENV, Nt as defaultOffModelIds, O as deriveCatalog, On as macosBundleExecutable, Ot as toolSchemaRejectAdvice, Pn as resolveDshHome, Pt as lastRefusalFor, Q as CONTEXT_OVERFLOW_MARKER, Qt as imageModelChoices, R as defaultDesktopAuthCandidates, Rt as withEffectiveOff, S as saveDeviceSdkSettings, Sn as deriveAtRestKeyId, St as parseUpstreamModel, T as FALLBACK_WORKBUDDY_MODELS_GLOBAL, Tt as regionOf, U as isVaultAccountId, Ut as pickVideoModel, V as hasEncryptedCredentialFields, Vt as WorkBuddyVideoError, W as legacyWorkbuddyOwnAuthPath, Wt as resolveVideoParams, X as APP_VERSION, Xt as imageDataUrl, Yt as WorkBuddyImageError, Z as BODY_OVERSIZE_MARKER, Zt as imageMimeForPath, _ as createDeviceProfileLookup, _t as knownRegionOf, a as readHostHeartbeat, an as parseQueueAnswer, at as classifyUpstreamError, b as readDeviceSettings, bn as clearAtRestKeyCache, bt as parseCreditMultiplier, c as WORKBUDDY_CONNECT_VERSION, cn as NATIVE_MODALITY_BY_MODEL_ID, ct as deriveStableConversationId, dt as isBodyOversizeRefusal, en as isBareBase64Image, ft as isContextTooLongBody, g as createTuringSdk, gn as isDeviceId, gt as isToolSchemaRejectBody, h as createDeviceSdkPort, ht as isFirstMessageGateBody, i as processStartTimeMs, in as sniffImageMime, it as channelGateMemberOf, j as ENCRYPTED_CREDENTIAL_CODE, jn as readAtRestKey, jt as selectPromoBadge, k as fallbackModelsFor, kn as macosNestedAppBundles, kt as attachBusyLevels, l as createFileRosterSeenStore, ln as imageDefaultFor, m as piAiRuntimeInfo, mt as isCredentialRejectedError, n as clearHostHeartbeat, nn as parseImageDataUrl, nt as WorkBuddyCredentialRejectedError, o as workbuddyHostHeartbeatPath, on as queueNoticeText, ot as conversationIdFromSessionId, p as resolveCnGateway, pt as isConversationIdGateBody, q as workbuddyAccountId, qt as IMAGE_TAG_TEXT_TO_IMAGE, r as isHeartbeatProcessAlive, rn as pickMediaModel, rt as WorkBuddyUpstreamClient, s as writeHostHeartbeat, sn as pruneTempDir, st as declaredTools, t as WORKBUDDY_HOST_HEARTBEAT_FILENAME, tn as isWatermarkFreeImageModel, tt as WORKBUDDY_FALLBACK_SYSTEM_PROMPT, un as nativeModalityOf, ut as forceNeutralHead, v as describeDerivedDevices, vt as modelIdOfBody, w as FALLBACK_WORKBUDDY_MODELS, wn as findWorkbuddyAppExecutable, wt as prepareChatBody, x as saveDeviceProfile, xn as deriveAtRestKey, xt as parseReasoning, y as isDeviceMode, yn as WORKBUDDY_APP_EXECUTABLE_ENV, yt as openingEvidenceOfBody, z as defaultDesktopAuthDirs, zt as VIDEO_TAG_IMAGE_TO_VIDEO } from "./host-heartbeat-
|
|
1
|
+
import { $ as CREDENTIAL_REJECTED_CODE, $t as imageSizeLimitsOf, A as withoutRouters, An as openEncryptedField, At as promoBadgeTone, B as defaultDesktopAuthPath, Bt as VIDEO_TAG_TEXT_TO_VIDEO, C as setDeviceMode, Cn as fetchAtRestKeyPayload, Ct as perturbChannelFingerprints, D as applyContextBudgets, Dn as isWorkbuddyBundle, Dt as rewriteSessionTitleModel, E as WorkBuddyCatalog, En as isEncryptedFieldWrapper, Et as requestEvidenceOf, F as WorkBuddyCredentialStore, Fn as withFileLock, Ft as offDefaultFor, G as parseWorkBuddyAuth, Gt as IMAGE_SIZE_LIMITS_WIDE, H as isEncryptedCredentialError, Ht as parseSupportedSecondsRange, I as WorkBuddyEncryptedCredentialError, In as writeFileAtomic, It as offRefused, J as workbuddyOwnAuthPath, Jt as MAX_INPUT_IMAGE_BYTES, K as preferredAccountName, Kt as IMAGE_TAG_IMAGE_TO_IMAGE, L as authFileName, Lt as recordRefusal, M as WORKBUDDY_AUTH_FILENAME, Mn as workbuddyAppExecutableCandidates, Mt as REFUSES_OFF_MODEL_IDS, N as WORKBUDDY_AUTH_FILE_ENV, Nt as defaultOffModelIds, O as deriveCatalog, On as macosBundleExecutable, Ot as toolSchemaRejectAdvice, Pn as resolveDshHome, Pt as lastRefusalFor, Q as CONTEXT_OVERFLOW_MARKER, Qt as imageModelChoices, R as defaultDesktopAuthCandidates, Rt as withEffectiveOff, S as saveDeviceSdkSettings, Sn as deriveAtRestKeyId, St as parseUpstreamModel, T as FALLBACK_WORKBUDDY_MODELS_GLOBAL, Tt as regionOf, U as isVaultAccountId, Ut as pickVideoModel, V as hasEncryptedCredentialFields, Vt as WorkBuddyVideoError, W as legacyWorkbuddyOwnAuthPath, Wt as resolveVideoParams, X as APP_VERSION, Xt as imageDataUrl, Yt as WorkBuddyImageError, Z as BODY_OVERSIZE_MARKER, Zt as imageMimeForPath, _ as createDeviceProfileLookup, _t as knownRegionOf, a as readHostHeartbeat, an as parseQueueAnswer, at as classifyUpstreamError, b as readDeviceSettings, bn as clearAtRestKeyCache, bt as parseCreditMultiplier, c as WORKBUDDY_CONNECT_VERSION, cn as NATIVE_MODALITY_BY_MODEL_ID, ct as deriveStableConversationId, dt as isBodyOversizeRefusal, en as isBareBase64Image, ft as isContextTooLongBody, g as createTuringSdk, gn as isDeviceId, gt as isToolSchemaRejectBody, h as createDeviceSdkPort, ht as isFirstMessageGateBody, i as processStartTimeMs, in as sniffImageMime, it as channelGateMemberOf, j as ENCRYPTED_CREDENTIAL_CODE, jn as readAtRestKey, jt as selectPromoBadge, k as fallbackModelsFor, kn as macosNestedAppBundles, kt as attachBusyLevels, l as createFileRosterSeenStore, ln as imageDefaultFor, m as piAiRuntimeInfo, mt as isCredentialRejectedError, n as clearHostHeartbeat, nn as parseImageDataUrl, nt as WorkBuddyCredentialRejectedError, o as workbuddyHostHeartbeatPath, on as queueNoticeText, ot as conversationIdFromSessionId, p as resolveCnGateway, pt as isConversationIdGateBody, q as workbuddyAccountId, qt as IMAGE_TAG_TEXT_TO_IMAGE, r as isHeartbeatProcessAlive, rn as pickMediaModel, rt as WorkBuddyUpstreamClient, s as writeHostHeartbeat, sn as pruneTempDir, st as declaredTools, t as WORKBUDDY_HOST_HEARTBEAT_FILENAME, tn as isWatermarkFreeImageModel, tt as WORKBUDDY_FALLBACK_SYSTEM_PROMPT, un as nativeModalityOf, ut as forceNeutralHead, v as describeDerivedDevices, vt as modelIdOfBody, w as FALLBACK_WORKBUDDY_MODELS, wn as findWorkbuddyAppExecutable, wt as prepareChatBody, x as saveDeviceProfile, xn as deriveAtRestKey, xt as parseReasoning, y as isDeviceMode, yn as WORKBUDDY_APP_EXECUTABLE_ENV, yt as openingEvidenceOfBody, z as defaultDesktopAuthDirs, zt as VIDEO_TAG_IMAGE_TO_VIDEO } from "./host-heartbeat-BWUu5KWc.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";
|
|
@@ -10755,7 +10755,10 @@ function resolveTargetModel(catalog, preferredId) {
|
|
|
10755
10755
|
* 向 `{billing_base}{API_PREFIX}/auth/state?platform={platform}` 申请一个
|
|
10756
10756
|
* state,用户在浏览器打开授权页完成登录,客户端轮询
|
|
10757
10757
|
* `{billing_base}{API_PREFIX}/auth/token?state={state}` 换取凭据,再以
|
|
10758
|
-
* Bearer 调 `{API_PREFIX}/
|
|
10758
|
+
* Bearer 调 `{API_PREFIX}/account` 拉取账号资料(旧实现用的是
|
|
10759
|
+
* `{API_PREFIX}/login/account`,但上游已让该端点对任何凭据都回
|
|
10760
|
+
* `12151:not choose login account`、data 为空,见 issue #267/#268/#269;
|
|
10761
|
+
* 现在先试 `/account`,再为仍服务旧端点的主机保留回退)。三步的 URL 形态、
|
|
10759
10762
|
* 响应字段双拼写(camelCase/snake_case)容错、以及「区域必须绑定会话」的
|
|
10760
10763
|
* 约定均沿用该实现。
|
|
10761
10764
|
* 改动:端点按本插件 `upstream.ts` 的区域约定路由 —— CN 为
|
|
@@ -10926,7 +10929,69 @@ function terminalOf(session) {
|
|
|
10926
10929
|
error: session.error ?? "the sign-in ended without a result"
|
|
10927
10930
|
};
|
|
10928
10931
|
}
|
|
10929
|
-
/**
|
|
10932
|
+
/**
|
|
10933
|
+
* Decode an access token's unsigned JWT payload, purely to recover identity
|
|
10934
|
+
* when the profile endpoints answer empty (issue #267/#268/#269). This is NOT
|
|
10935
|
+
* authentication — the token was already accepted by `/auth/token` and every
|
|
10936
|
+
* byte here is attacker-controlled; only non-empty strings are ever used, as
|
|
10937
|
+
* display metadata and as a stable account-id seed, never as a permission.
|
|
10938
|
+
* A malformed/unsupported token simply yields no claims.
|
|
10939
|
+
*/
|
|
10940
|
+
function jwtIdentityOf(token) {
|
|
10941
|
+
const empty = {
|
|
10942
|
+
sub: "",
|
|
10943
|
+
nickname: "",
|
|
10944
|
+
uin: "",
|
|
10945
|
+
preferredUsername: ""
|
|
10946
|
+
};
|
|
10947
|
+
if (typeof token !== "string") return empty;
|
|
10948
|
+
const parts = token.split(".");
|
|
10949
|
+
if (parts.length < 2) return empty;
|
|
10950
|
+
let decoded;
|
|
10951
|
+
try {
|
|
10952
|
+
decoded = Buffer.from(parts[1] ?? "", "base64url").toString("utf8");
|
|
10953
|
+
} catch {
|
|
10954
|
+
return empty;
|
|
10955
|
+
}
|
|
10956
|
+
let parsed;
|
|
10957
|
+
try {
|
|
10958
|
+
parsed = JSON.parse(decoded);
|
|
10959
|
+
} catch {
|
|
10960
|
+
return empty;
|
|
10961
|
+
}
|
|
10962
|
+
if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) return empty;
|
|
10963
|
+
const payload = parsed;
|
|
10964
|
+
return {
|
|
10965
|
+
sub: firstString(payload, ["sub", "Sub"]),
|
|
10966
|
+
nickname: firstString(payload, ["nickname", "NickName"]),
|
|
10967
|
+
uin: firstString(payload, ["uin", "Uin"]),
|
|
10968
|
+
preferredUsername: firstString(payload, [
|
|
10969
|
+
"preferred_username",
|
|
10970
|
+
"preferredUsername",
|
|
10971
|
+
"PreferredUsername"
|
|
10972
|
+
])
|
|
10973
|
+
};
|
|
10974
|
+
}
|
|
10975
|
+
/** Whether a profile carries the one field every real identity must have. */
|
|
10976
|
+
function hasIdentity(profile) {
|
|
10977
|
+
return firstString(profile, [
|
|
10978
|
+
"uid",
|
|
10979
|
+
"Uid",
|
|
10980
|
+
"userId",
|
|
10981
|
+
"UserID"
|
|
10982
|
+
]) !== "";
|
|
10983
|
+
}
|
|
10984
|
+
/**
|
|
10985
|
+
* Fetch the account profile and assemble the success value.
|
|
10986
|
+
*
|
|
10987
|
+
* The upstream's `/login/account` endpoint answers `code 12151` ("not choose
|
|
10988
|
+
* login account") with an empty `data` envelope for EVERY credential. Taking
|
|
10989
|
+
* that empty profile at face value made every OAuth account hash to the same
|
|
10990
|
+
* vault id and display as 未命名账号 (#267/#268/#269). So try `/account` first
|
|
10991
|
+
* on the same host with the same headers, keep the legacy endpoint only as a
|
|
10992
|
+
* fallback, accept neither when its data has no uid, and as a last resort read
|
|
10993
|
+
* the identity claims from the token itself.
|
|
10994
|
+
*/
|
|
10930
10995
|
async function collectAccount(session, accessToken, tokenData, doFetch) {
|
|
10931
10996
|
const headers = {
|
|
10932
10997
|
"Authorization": `Bearer ${accessToken}`,
|
|
@@ -10935,27 +11000,32 @@ async function collectAccount(session, accessToken, tokenData, doFetch) {
|
|
|
10935
11000
|
const domain = firstString(tokenData, ["domain", "Domain"]);
|
|
10936
11001
|
if (domain !== "") headers["X-Domain"] = domain;
|
|
10937
11002
|
let profile = {};
|
|
10938
|
-
try {
|
|
10939
|
-
const document = await readJson(await doFetch(`${session.base}${
|
|
11003
|
+
for (const profilePath of [`${API_PREFIX}/account`, `${API_PREFIX}/login/account`]) try {
|
|
11004
|
+
const document = await readJson(await doFetch(`${session.base}${profilePath}`, {
|
|
10940
11005
|
method: "GET",
|
|
10941
11006
|
headers,
|
|
10942
11007
|
signal: AbortSignal.timeout(3e4)
|
|
10943
11008
|
}));
|
|
10944
|
-
if (document
|
|
11009
|
+
if (document === void 0) continue;
|
|
11010
|
+
const candidate = envelopeData(document);
|
|
11011
|
+
if (!hasIdentity(candidate)) continue;
|
|
11012
|
+
profile = candidate;
|
|
11013
|
+
break;
|
|
10945
11014
|
} catch {}
|
|
11015
|
+
const jwt = jwtIdentityOf(accessToken);
|
|
10946
11016
|
const uid = firstString(profile, [
|
|
10947
11017
|
"uid",
|
|
10948
11018
|
"Uid",
|
|
10949
11019
|
"userId",
|
|
10950
11020
|
"UserID"
|
|
10951
|
-
]);
|
|
11021
|
+
]) || jwt.sub;
|
|
10952
11022
|
const nickname = optionalString(profile, [
|
|
10953
11023
|
"nickname",
|
|
10954
11024
|
"NickName",
|
|
10955
11025
|
"nickname",
|
|
10956
11026
|
"ScreenName"
|
|
10957
|
-
]);
|
|
10958
|
-
const uin = optionalString(profile, ["uin", "Uin"]);
|
|
11027
|
+
]) ?? optionalString(jwt, ["nickname", "preferredUsername"]);
|
|
11028
|
+
const uin = optionalString(profile, ["uin", "Uin"]) ?? optionalString(jwt, ["uin"]);
|
|
10959
11029
|
const enterpriseId = optionalString(profile, ["enterpriseId", "EnterpriseId"]);
|
|
10960
11030
|
const expiresAtMs = expiryMs(tokenData, ["expiresAt", "expires_at"], ["expiresIn", "expires_in"]) ?? 0;
|
|
10961
11031
|
const refreshExpiresAtMs = expiryMs(tokenData, ["refreshExpiresAt", "refresh_expires_at"], ["refreshExpiresIn", "refresh_expires_in"]);
|
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.
|
|
5
|
+
"version": "5.24.11",
|
|
6
6
|
"author": "dingminhua",
|
|
7
7
|
"copyright": "Copyright (c) 2026 LaoDing",
|
|
8
8
|
"license": "MIT",
|