@agentvault/agentvault 0.20.39 → 0.20.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 +33 -1
- package/dist/cli.js.map +2 -2
- package/dist/index.js +33 -1
- package/dist/index.js.map +2 -2
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -64203,6 +64203,38 @@ var init_channel = __esm({
|
|
|
64203
64203
|
}
|
|
64204
64204
|
}
|
|
64205
64205
|
}
|
|
64206
|
+
if (this._persisted?.mlsGroups && this._state === "ready" && this._ws) {
|
|
64207
|
+
for (const [gid, entry] of Object.entries(this._persisted.mlsGroups)) {
|
|
64208
|
+
if (sentSharedGroupIds.has(gid)) continue;
|
|
64209
|
+
if (!entry.mlsGroupId) continue;
|
|
64210
|
+
const mlsGroup = this._mlsGroups.get(`1to1-group:${gid}`);
|
|
64211
|
+
if (!mlsGroup?.isInitialized || Number(mlsGroup.epoch) <= 0) continue;
|
|
64212
|
+
try {
|
|
64213
|
+
const plaintextBytes = new TextEncoder().encode(plaintext);
|
|
64214
|
+
const cipherBytes = await mlsGroup.encrypt(plaintextBytes);
|
|
64215
|
+
await saveMlsState(this.config.dataDir, entry.mlsGroupId, JSON.stringify(mlsGroup.exportState()));
|
|
64216
|
+
const payload = {
|
|
64217
|
+
group_id: entry.mlsGroupId,
|
|
64218
|
+
epoch: Number(mlsGroup.epoch),
|
|
64219
|
+
payload: Buffer.from(cipherBytes).toString("hex"),
|
|
64220
|
+
topic_id: topicId,
|
|
64221
|
+
client_message_id: clientMessageId,
|
|
64222
|
+
message_type: messageType,
|
|
64223
|
+
priority,
|
|
64224
|
+
parent_span_id: parentSpanId,
|
|
64225
|
+
metadata: envelopeMetadata
|
|
64226
|
+
};
|
|
64227
|
+
if (this._persisted?.hubAddress) payload.hub_address = this._persisted.hubAddress;
|
|
64228
|
+
if (this._persisted?.hubId) payload.sender_hub_id = this._persisted.hubId;
|
|
64229
|
+
pendingWsSends.push(JSON.stringify({ event: "message_mls", data: payload }));
|
|
64230
|
+
sentSharedGroupIds.add(gid);
|
|
64231
|
+
sentCount++;
|
|
64232
|
+
console.log(`[SecureChannel] Shared MLS group send for group ${gid.slice(0, 8)} (${entry.mlsGroupId.slice(0, 8)})`);
|
|
64233
|
+
} catch (err) {
|
|
64234
|
+
console.error(`[SecureChannel] Shared MLS group send failed for ${gid.slice(0, 8)}:`, err);
|
|
64235
|
+
}
|
|
64236
|
+
}
|
|
64237
|
+
}
|
|
64206
64238
|
if (sentCount === 0 && this._sessions.size > 0) {
|
|
64207
64239
|
console.warn("[SecureChannel] send() delivered to 0 sessions (all skipped or failed)");
|
|
64208
64240
|
}
|
|
@@ -95426,7 +95458,7 @@ var init_index = __esm({
|
|
|
95426
95458
|
init_skill_invoker();
|
|
95427
95459
|
await init_skill_telemetry();
|
|
95428
95460
|
await init_policy_enforcer();
|
|
95429
|
-
VERSION = true ? "0.20.
|
|
95461
|
+
VERSION = true ? "0.20.40" : "0.0.0-dev";
|
|
95430
95462
|
}
|
|
95431
95463
|
});
|
|
95432
95464
|
await init_index();
|