creditdaddy 1.7.0-test.1 → 1.7.0

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/build.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
- "version": "1.7.0-test.1",
3
- "commit": "bccc25a",
2
+ "version": "1.7.0",
3
+ "commit": "0b573f6",
4
4
  "branch": "main",
5
- "builtAt": "2026-11-04T14:21:56.380Z",
5
+ "builtAt": "2026-11-06T10:13:35.722Z",
6
6
  "channel": "local",
7
7
  "dirty": true
8
8
  }
package/package.json CHANGED
@@ -1,34 +1,34 @@
1
- {
2
- "name": "creditdaddy",
3
- "version": "1.7.0-test.1",
4
- "description": "CreditDaddy — Qoder / WorkBuddy / ZCode / mirasim / 妙手 / Trae / MiniMax / ModelScope / 豆包 Doubao / 讯飞 Loomy 多账号本地管理与每日积分自动签到助手,及 10Router 供应商 Cookie 会话捕获与外部配额(Token Harbor / 小米 MiMo / River / ModelScope 魔搭 / LongCat)",
5
- "homepage": "https://github.com/techysy/CreditDaddy",
6
- "repository": {
7
- "type": "git",
8
- "url": "git+https://github.com/techysy/CreditDaddy.git"
9
- },
10
- "type": "module",
11
- "bin": {
12
- "creditdaddy": "bin/creditdaddy.js"
13
- },
14
- "files": [
15
- "bin",
16
- "src",
17
- "README.md",
18
- "LICENSE",
19
- "build.json"
20
- ],
21
- "engines": {
22
- "node": ">=20"
23
- },
24
- "scripts": {
25
- "start": "node bin/creditdaddy.js daemon",
26
- "test": "node --test",
27
- "release-check": "bash scripts/release-check.sh",
28
- "prepack": "node scripts/gen-build-info.js build.json"
29
- },
30
- "license": "MIT",
31
- "devDependencies": {
32
- "opencc-js": "1.4.2"
33
- }
34
- }
1
+ {
2
+ "name": "creditdaddy",
3
+ "version": "1.7.0",
4
+ "description": "CreditDaddy — Qoder / WorkBuddy / ZCode / mirasim / 妙手 / Trae / MiniMax / ModelScope / 豆包 Doubao / 讯飞 Loomy 多账号本地管理与每日积分自动签到助手,及 10Router 供应商 Cookie 会话捕获与外部配额(Token Harbor / 小米 MiMo / River / ModelScope 魔搭 / LongCat)",
5
+ "homepage": "https://github.com/techysy/CreditDaddy",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/techysy/CreditDaddy.git"
9
+ },
10
+ "type": "module",
11
+ "bin": {
12
+ "creditdaddy": "bin/creditdaddy.js"
13
+ },
14
+ "files": [
15
+ "bin",
16
+ "src",
17
+ "README.md",
18
+ "LICENSE",
19
+ "build.json"
20
+ ],
21
+ "engines": {
22
+ "node": ">=20"
23
+ },
24
+ "scripts": {
25
+ "start": "node bin/creditdaddy.js daemon",
26
+ "test": "node --test",
27
+ "release-check": "bash scripts/release-check.sh",
28
+ "prepack": "node scripts/gen-build-info.js build.json"
29
+ },
30
+ "license": "MIT",
31
+ "devDependencies": {
32
+ "opencc-js": "1.4.2"
33
+ }
34
+ }
package/src/accounts.js CHANGED
@@ -171,9 +171,11 @@ export function refreshContext(account, log) {
171
171
  });
172
172
  log?.('token 已刷新');
173
173
  if (account.provider.startsWith('workbuddy')) {
174
- const { currentWorkbuddyUid, writeWorkbuddySession } = await import('./workbuddyLocal.js');
174
+ const { currentWorkbuddyUids, writeWorkbuddySession } = await import('./workbuddyLocal.js');
175
175
  try {
176
- if (account.uid && await currentWorkbuddyUid() === account.uid) {
176
+ // 国内/国际桌面端是两个独立会话文件,任一侧正在登录该账号都要同步新 token
177
+ const uids = await currentWorkbuddyUids();
178
+ if (account.uid && (uids.cn === account.uid || uids.intl === account.uid)) {
177
179
  await writeWorkbuddySession(account);
178
180
  log?.('已同步新 token 到 WorkBuddy 客户端');
179
181
  }
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file