@foxden-app/foxclaw 0.5.0 → 0.5.1

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,14 @@
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.1 - 2026-06-04
6
+
7
+ ### 中文
8
+ - 串行化跨节点 auth 远端导入验证,避免多个同步包同时触发 usage 验证并反复重启同一个 Codex app-server,导致误报 `Codex app bridge stopped` 或 `SIGTERM`。
9
+
10
+ ### English
11
+ - Serialized cross-node auth remote import validation so multiple incoming bundles no longer validate in parallel and repeatedly restart the same Codex app-server, avoiding false `Codex app bridge stopped` or `SIGTERM` failures.
12
+
5
13
  ## 0.5.0 - 2026-06-04
6
14
 
7
15
  ### 中文
@@ -169,6 +169,7 @@ export declare class CrossNodeAuthSync {
169
169
  private readonly pendingTests;
170
170
  private seenNonces;
171
171
  private timer;
172
+ private importProcessorActive;
172
173
  private activeRemoteLease;
173
174
  private activeLocalLease;
174
175
  private lastNotifiedError;
@@ -25,6 +25,7 @@ export class CrossNodeAuthSync {
25
25
  pendingTests = new Map();
26
26
  seenNonces = new Map();
27
27
  timer = null;
28
+ importProcessorActive = false;
28
29
  activeRemoteLease = null;
29
30
  activeLocalLease = null;
30
31
  lastNotifiedError = null;
@@ -107,6 +108,7 @@ export class CrossNodeAuthSync {
107
108
  }
108
109
  isIdle() {
109
110
  return this.pendingImports.length === 0
111
+ && !this.importProcessorActive
110
112
  && this.pendingPulls.size === 0
111
113
  && this.pendingLeases.size === 0
112
114
  && this.pendingTests.size === 0;
@@ -548,7 +550,7 @@ export class CrossNodeAuthSync {
548
550
  }
549
551
  }
550
552
  enqueueImport(bundle, sourceNodeId, sourceLabel, fromPeer) {
551
- const queued = !this.callbacks.isIdle() || this.pendingImports.length > 0;
553
+ const queued = this.importProcessorActive || !this.callbacks.isIdle() || this.pendingImports.length > 0;
552
554
  this.pendingImports.push({
553
555
  bundle,
554
556
  sourceNodeId,
@@ -570,11 +572,21 @@ export class CrossNodeAuthSync {
570
572
  });
571
573
  }
572
574
  async processPendingImports() {
575
+ if (this.importProcessorActive)
576
+ return;
573
577
  if (!this.callbacks.isIdle())
574
578
  return;
575
- while (this.pendingImports.length > 0 && this.callbacks.isIdle()) {
576
- const pending = this.pendingImports.shift();
577
- await this.validateAndImport(pending.bundle, pending.sourceNodeId, pending.sourceLabel, pending.fromPeer, 'push');
579
+ this.importProcessorActive = true;
580
+ try {
581
+ while (this.pendingImports.length > 0) {
582
+ if (!this.callbacks.isIdle())
583
+ return;
584
+ const pending = this.pendingImports.shift();
585
+ await this.validateAndImport(pending.bundle, pending.sourceNodeId, pending.sourceLabel, pending.fromPeer, 'push');
586
+ }
587
+ }
588
+ finally {
589
+ this.importProcessorActive = false;
578
590
  }
579
591
  }
580
592
  async validateAndImport(bundle, sourceNodeId, sourceLabel, fromPeer, mode) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@foxden-app/foxclaw",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "description": "Foxden local execution claw for controlling Codex from trusted chat interfaces.",
5
5
  "type": "module",
6
6
  "main": "dist/main.js",