@agentvault/agentvault 0.20.20 → 0.20.21

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/dist/index.js CHANGED
@@ -67062,10 +67062,38 @@ ${messageText}`;
67062
67062
  await saveMlsState(this.config.dataDir, groupId, JSON.stringify(mlsGroup.exportState()));
67063
67063
  console.log(`[SecureChannel] MLS commit processed for room ${roomId.slice(0, 8)} (epoch=${mlsGroup.epoch})`);
67064
67064
  } catch (err) {
67065
- console.error(`[SecureChannel] MLS commit failed for room ${roomId.slice(0, 8)}:`, err);
67065
+ const isOldEpoch = err?.message?.includes("epoch") || err?.message?.includes("old") || err?.message?.includes("Validation");
67066
+ if (isOldEpoch) {
67067
+ console.log(`[SecureChannel] Discarding old-epoch commit for room ${roomId.slice(0, 8)}`);
67068
+ } else {
67069
+ console.error(`[SecureChannel] MLS commit failed for room ${roomId.slice(0, 8)}:`, err);
67070
+ throw err;
67071
+ }
67066
67072
  }
67067
67073
  }
67068
- break;
67074
+ return;
67075
+ }
67076
+ }
67077
+ for (const [chId, chState] of Object.entries(this._persisted?.a2aChannels ?? {})) {
67078
+ if (chState.mlsGroupId === groupId) {
67079
+ const mlsGroup = this._mlsGroups.get(`a2a:${chId}`);
67080
+ if (mlsGroup?.isInitialized) {
67081
+ try {
67082
+ const commitBytes = new Uint8Array(Buffer.from(data.payload, "hex"));
67083
+ await mlsGroup.processCommit(commitBytes);
67084
+ await saveMlsState(this.config.dataDir, groupId, JSON.stringify(mlsGroup.exportState()));
67085
+ console.log(`[SecureChannel] MLS commit processed for A2A ${chId.slice(0, 8)} (epoch=${mlsGroup.epoch})`);
67086
+ } catch (err) {
67087
+ const isOldEpoch = err?.message?.includes("epoch") || err?.message?.includes("old") || err?.message?.includes("Validation");
67088
+ if (isOldEpoch) {
67089
+ console.log(`[SecureChannel] Discarding old-epoch commit for A2A ${chId.slice(0, 8)}`);
67090
+ } else {
67091
+ console.error(`[SecureChannel] MLS commit failed for A2A ${chId.slice(0, 8)}:`, err);
67092
+ throw err;
67093
+ }
67094
+ }
67095
+ }
67096
+ return;
67069
67097
  }
67070
67098
  }
67071
67099
  }
@@ -94776,7 +94804,7 @@ var init_index = __esm({
94776
94804
  init_skill_invoker();
94777
94805
  await init_skill_telemetry();
94778
94806
  await init_policy_enforcer();
94779
- VERSION = true ? "0.20.20" : "0.0.0-dev";
94807
+ VERSION = true ? "0.20.21" : "0.0.0-dev";
94780
94808
  }
94781
94809
  });
94782
94810
  await init_index();