@agentvault/agentvault 0.19.39 → 0.19.40
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/channel.d.ts.map +1 -1
- package/dist/cli.js +2 -45
- package/dist/cli.js.map +3 -3
- package/dist/index.js +2 -45
- package/dist/index.js.map +3 -3
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -62887,30 +62887,6 @@ var init_channel = __esm({
|
|
|
62887
62887
|
if (roomConvIds.has(convId)) continue;
|
|
62888
62888
|
if (targetConvId && convId !== targetConvId) continue;
|
|
62889
62889
|
try {
|
|
62890
|
-
const mlsMgr = this._mlsGroups.get(`conv:${convId}`);
|
|
62891
|
-
if (mlsMgr && this._state === "ready" && this._ws) {
|
|
62892
|
-
const plainBytes = new TextEncoder().encode(plaintext);
|
|
62893
|
-
const ciphertext = await mlsMgr.encrypt(plainBytes);
|
|
62894
|
-
const mlsGroupId = this._persisted?.mlsConversations?.[convId]?.mlsGroupId;
|
|
62895
|
-
if (mlsGroupId) {
|
|
62896
|
-
const payloadHex = Buffer.from(ciphertext).toString("hex");
|
|
62897
|
-
pendingWsSends.push(
|
|
62898
|
-
JSON.stringify({
|
|
62899
|
-
event: "message_mls",
|
|
62900
|
-
data: {
|
|
62901
|
-
group_id: mlsGroupId,
|
|
62902
|
-
conversation_id: convId,
|
|
62903
|
-
epoch: Number(mlsMgr.epoch),
|
|
62904
|
-
payload: payloadHex,
|
|
62905
|
-
topic_id: topicId
|
|
62906
|
-
}
|
|
62907
|
-
})
|
|
62908
|
-
);
|
|
62909
|
-
await saveMlsState(this.config.dataDir, mlsGroupId, JSON.stringify(mlsMgr.exportState()));
|
|
62910
|
-
sentCount++;
|
|
62911
|
-
continue;
|
|
62912
|
-
}
|
|
62913
|
-
}
|
|
62914
62890
|
const encrypted = session.ratchet.encrypt(plaintext);
|
|
62915
62891
|
const transport = encryptedMessageToTransport(encrypted);
|
|
62916
62892
|
const msg = {
|
|
@@ -63195,13 +63171,7 @@ var init_channel = __esm({
|
|
|
63195
63171
|
if (initRes.ok) {
|
|
63196
63172
|
const groupData = await initRes.json();
|
|
63197
63173
|
mlsRoom.mlsGroupId = groupData.group_id;
|
|
63198
|
-
|
|
63199
|
-
const identity2 = new TextEncoder().encode(this._deviceId);
|
|
63200
|
-
const kp = await mgr.generateKeyPackage(identity2);
|
|
63201
|
-
await mgr.createGroup(new TextEncoder().encode(groupData.group_id), kp);
|
|
63202
|
-
this._mlsGroups.set(roomData.roomId, mgr);
|
|
63203
|
-
await saveMlsState(this.config.dataDir, groupData.group_id, JSON.stringify(mgr.exportState()));
|
|
63204
|
-
console.log(`[SecureChannel] MLS group created for room ${roomData.roomId.slice(0, 8)} (groupId=${groupData.group_id.slice(0, 8)})`);
|
|
63174
|
+
console.log(`[SecureChannel] MLS room ${roomData.roomId.slice(0, 8)} registered (groupId=${groupData.group_id.slice(0, 8)}, awaiting Welcome from owner)`);
|
|
63205
63175
|
}
|
|
63206
63176
|
} catch (mlsInitErr) {
|
|
63207
63177
|
console.error(`[SecureChannel] MLS room init failed:`, mlsInitErr);
|
|
@@ -64733,22 +64703,9 @@ var init_channel = __esm({
|
|
|
64733
64703
|
const entry = this._persisted.a2aChannels?.[channelId];
|
|
64734
64704
|
if (entry) {
|
|
64735
64705
|
entry.mlsGroupId = mlsData.group_id;
|
|
64736
|
-
const mgr = new MLSGroupManager();
|
|
64737
|
-
const identity = new TextEncoder().encode(this._deviceId);
|
|
64738
|
-
const kp = await mgr.generateKeyPackage(identity);
|
|
64739
|
-
await mgr.createGroup(
|
|
64740
|
-
new TextEncoder().encode(mlsData.group_id),
|
|
64741
|
-
kp
|
|
64742
|
-
);
|
|
64743
|
-
this._mlsGroups.set(`a2a:${channelId}`, mgr);
|
|
64744
|
-
await saveMlsState(
|
|
64745
|
-
this.config.dataDir,
|
|
64746
|
-
mlsData.group_id,
|
|
64747
|
-
JSON.stringify(mgr.exportState())
|
|
64748
|
-
);
|
|
64749
64706
|
await this._persistState();
|
|
64750
64707
|
console.log(
|
|
64751
|
-
`[SecureChannel]
|
|
64708
|
+
`[SecureChannel] A2A ${channelId.slice(0, 8)} MLS registered (groupId=${mlsData.group_id.slice(0, 8)}, awaiting Welcome)`
|
|
64752
64709
|
);
|
|
64753
64710
|
}
|
|
64754
64711
|
}
|