@agentvault/agentvault 0.19.56 → 0.19.58

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/cli.js CHANGED
@@ -63106,11 +63106,15 @@ var init_channel = __esm({
63106
63106
  if (!this._persisted.rooms) {
63107
63107
  this._persisted.rooms = {};
63108
63108
  }
63109
+ const existingMlsGroupId = this._persisted.rooms[roomData.roomId]?.mlsGroupId;
63110
+ const existingMlsTs = this._persisted.rooms[roomData.roomId]?.lastMlsMessageTs;
63109
63111
  this._persisted.rooms[roomData.roomId] = {
63110
63112
  roomId: roomData.roomId,
63111
63113
  name: roomData.name,
63112
63114
  conversationIds,
63113
- members: roomData.members
63115
+ members: roomData.members,
63116
+ ...existingMlsGroupId && { mlsGroupId: existingMlsGroupId },
63117
+ ...existingMlsTs && { lastMlsMessageTs: existingMlsTs }
63114
63118
  };
63115
63119
  const mlsRoom = this._persisted.rooms[roomData.roomId];
63116
63120
  if (mlsRoom.mlsGroupId && !roomData.forceRekey) {
@@ -65775,11 +65779,17 @@ ${messageText}`;
65775
65779
  }
65776
65780
  }
65777
65781
  if (!roomId) {
65778
- console.warn(`[SecureChannel] No room found for MLS group ${groupId?.slice(0, 8)}`);
65779
- return;
65782
+ if (data.room_id && this._persisted?.rooms?.[data.room_id]) {
65783
+ roomId = data.room_id;
65784
+ console.log(`[SecureChannel] Room ${roomId.slice(0, 8)} matched by room_id (group_id ${groupId?.slice(0, 8)} mismatch)`);
65785
+ } else {
65786
+ console.warn(`[SecureChannel] No room found for MLS group ${groupId?.slice(0, 8)}`);
65787
+ return;
65788
+ }
65780
65789
  }
65781
65790
  this._lastInboundRoomId = roomId;
65782
65791
  const mlsGroup = this._mlsGroups.get(roomId);
65792
+ console.log(`[SecureChannel] MLS decrypt attempt room=${roomId.slice(0, 8)} group=${groupId?.slice(0, 8)} loaded=${!!mlsGroup} init=${mlsGroup?.isInitialized} mlsGroupsKeys=[${Array.from(this._mlsGroups.keys()).join(",")}]`);
65783
65793
  if (!mlsGroup?.isInitialized) {
65784
65794
  console.warn(`[SecureChannel] MLS group not loaded for room ${roomId.slice(0, 8)}`);
65785
65795
  return;