@foxden-app/foxclaw 0.5.62 → 0.5.63

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
@@ -2,6 +2,16 @@
2
2
 
3
3
  All notable FoxClaw changes are listed here. Each release note is bilingual so GitHub Releases and the npm package are useful to both Chinese and English readers.
4
4
 
5
+ ## 0.5.63 - 2026-06-28
6
+
7
+ ### 中文
8
+ - 修复 auth 切换失败分类:`failed to fetch codex rate limits` 中如果同时包含 `401 Unauthorized` / `token_invalidated`,现在按登录失效处理并标记候选为 `needs_repair`,不再误判为额度耗尽。
9
+ - 自动轮转遇到这类失效候选时会把它标为需登录修复,然后继续尝试下一个可用候选。
10
+
11
+ ### English
12
+ - Fixed auth switch failure classification. `failed to fetch codex rate limits` errors that also contain `401 Unauthorized` / `token_invalidated` are now treated as invalid auth and mark the candidate `needs_repair`, instead of being mistaken for quota exhaustion.
13
+ - Auto-rotation now marks these invalid candidates for login repair and continues trying the next usable candidate.
14
+
5
15
  ## 0.5.62 - 2026-06-22
6
16
 
7
17
  ### 中文
@@ -6180,9 +6180,11 @@ export class BridgeSessionCore {
6180
6180
  error: toErrorMeta(error),
6181
6181
  });
6182
6182
  }
6183
- const validationFailureKind = isCodexQuotaLimitError(validation.error)
6184
- ? 'quota_limited'
6185
- : 'auth_invalid';
6183
+ const validationFailureKind = isCodexAuthInvalidError(validation.error)
6184
+ ? 'auth_invalid'
6185
+ : isCodexQuotaLimitError(validation.error)
6186
+ ? 'quota_limited'
6187
+ : 'auth_invalid';
6186
6188
  const repairDisposition = validationFailureKind === 'auth_invalid'
6187
6189
  ? await this.markCodexAuthCandidateNeedsRepair(candidate.name)
6188
6190
  : { deleted: false, restarted: false };
@@ -10711,6 +10713,9 @@ function classifyCodexAuthRotationError(params) {
10711
10713
  const code = stringOrNull(params?.error?.codexErrorInfo) ?? stringOrNull(params?.error?.code);
10712
10714
  const message = stringOrNull(params?.error?.message) ?? '';
10713
10715
  const text = `${code ?? ''}\n${message}\n${collected}`;
10716
+ if (isCodexAuthInvalidError(text)) {
10717
+ return 'auth_invalid';
10718
+ }
10714
10719
  if (isCodexQuotaLimitError(text)) {
10715
10720
  return 'quota_limited';
10716
10721
  }
@@ -10721,6 +10726,15 @@ function classifyCodexAuthRotationError(params) {
10721
10726
  ? 'auth_invalid'
10722
10727
  : null;
10723
10728
  }
10729
+ function isCodexAuthInvalidError(text) {
10730
+ return /token[_\s-]?invalidated/i.test(text)
10731
+ || /authentication token has been invalidated/i.test(text)
10732
+ || /\b401\s+unauthorized\b/i.test(text)
10733
+ || /\bunauthorized\b/i.test(text)
10734
+ || /\bnot authenticated\b/i.test(text)
10735
+ || /\bsign in again\b/i.test(text)
10736
+ || /\blog in again\b/i.test(text);
10737
+ }
10724
10738
  function isCodexQuotaLimitError(text) {
10725
10739
  return /usageLimitExceeded/i.test(text)
10726
10740
  || /you['’]?ve hit your usage limit/i.test(text)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@foxden-app/foxclaw",
3
- "version": "0.5.62",
3
+ "version": "0.5.63",
4
4
  "description": "Foxden local execution claw for controlling Codex from trusted chat interfaces.",
5
5
  "type": "module",
6
6
  "main": "dist/main.js",