@foxden-app/foxclaw 0.6.3 → 0.6.4

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.6.4 - 2026-08-09
6
+
7
+ ### 中文
8
+ - 将 Codex 上游 `willRetry: true` 的 `responseStreamDisconnected` 识别为自动恢复中的传输事件,不再把 `Reconnecting... n/5` 写入 Telegram 最终回复或桥接错误状态。
9
+ - WebSocket 重试耗尽后自动切换 HTTPS 的 `Falling back from WebSockets to HTTPS transport` 提示改为仅记录内部 info 日志,不再单独打扰聊天;若 HTTPS 最终仍失败且 `willRetry: false`,真实错误继续正常展示。
10
+
11
+ ### English
12
+ - Treats Codex `responseStreamDisconnected` events with `willRetry: true` as in-progress transport recovery, so `Reconnecting... n/5` no longer replaces Telegram output or becomes the bridge's last error.
13
+ - Records the automatic `Falling back from WebSockets to HTTPS transport` notice as internal info instead of a separate chat warning. A final HTTPS failure with `willRetry: false` remains user-visible.
14
+
5
15
  ## 0.6.3 - 2026-08-09
6
16
 
7
17
  ### 中文
@@ -1425,6 +1425,14 @@ export class BridgeSessionCore {
1425
1425
  this.updateStatus();
1426
1426
  }
1427
1427
  async handleCodexErrorNotification(params) {
1428
+ if (isRetryableCodexTransportError(params)) {
1429
+ this.logger.info('codex.transport.retrying', {
1430
+ message: stringOrNull(params?.error?.message),
1431
+ threadId: stringOrNull(params?.threadId),
1432
+ turnId: stringOrNull(params?.turnId),
1433
+ });
1434
+ return;
1435
+ }
1428
1436
  const message = formatCodexNotificationError(params);
1429
1437
  this.lastError = message;
1430
1438
  this.logger.error('codex.notification.error', params);
@@ -1859,6 +1867,13 @@ export class BridgeSessionCore {
1859
1867
  await this.notifyBoundScopes(message);
1860
1868
  }
1861
1869
  async handleBridgeWarningNotification(method, params) {
1870
+ if (isCodexTransportFallbackWarning(method, params)) {
1871
+ this.logger.info('codex.transport.fallback', {
1872
+ message: stringOrNull(params?.message),
1873
+ threadId: stringOrNull(params?.threadId),
1874
+ });
1875
+ return;
1876
+ }
1862
1877
  const threadId = stringOrNull(params?.threadId);
1863
1878
  const scopeId = threadId ? this.findChatByThread(threadId) : null;
1864
1879
  const locale = scopeId ? this.localeForChat(scopeId) : 'en';
@@ -9856,6 +9871,12 @@ function formatWarningNotification(locale, method, params) {
9856
9871
  }
9857
9872
  return `${t(locale, 'warning_title')}\n${String(params?.message ?? t(locale, 'unknown'))}`;
9858
9873
  }
9874
+ function isCodexTransportFallbackWarning(method, params) {
9875
+ if (method !== 'warning') {
9876
+ return false;
9877
+ }
9878
+ return /falling back from websockets? to https transport/i.test(String(params?.message ?? ''));
9879
+ }
9859
9880
  function normalizeThreadStatusLabel(raw) {
9860
9881
  if (typeof raw === 'string') {
9861
9882
  return raw;
@@ -10933,6 +10954,13 @@ function formatCodexNotificationError(params) {
10933
10954
  }
10934
10955
  return clipUserFacingError(cleanUserFacingError(JSON.stringify(params?.error ?? params ?? {})));
10935
10956
  }
10957
+ function isRetryableCodexTransportError(params) {
10958
+ if (params?.willRetry !== true) {
10959
+ return false;
10960
+ }
10961
+ const errorInfo = params?.error?.codexErrorInfo;
10962
+ return Boolean(errorInfo && typeof errorInfo === 'object' && 'responseStreamDisconnected' in errorInfo);
10963
+ }
10936
10964
  function collectCodexErrorText(params) {
10937
10965
  const parts = [
10938
10966
  stringOrNull(params?.error?.message),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@foxden-app/foxclaw",
3
- "version": "0.6.3",
3
+ "version": "0.6.4",
4
4
  "description": "Foxden local execution claw for controlling Codex and OpenCode from trusted chat interfaces.",
5
5
  "type": "module",
6
6
  "main": "dist/main.js",