@agentvault/agentvault 0.19.3 → 0.19.4
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 +32 -0
- package/dist/cli.js.map +2 -2
- package/dist/index.js +32 -0
- package/dist/index.js.map +2 -2
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -49177,6 +49177,38 @@ var init_channel = __esm({
|
|
|
49177
49177
|
console.log(
|
|
49178
49178
|
`[SecureChannel] Observer ratchet initialized for channel ${obsAccChannelId.slice(0, 8)}... (side=${obsAccSide})`
|
|
49179
49179
|
);
|
|
49180
|
+
try {
|
|
49181
|
+
const seedText = JSON.stringify({ type: "observer_seed", text: "" });
|
|
49182
|
+
const seedEncrypted = obsRatchet.encrypt(seedText);
|
|
49183
|
+
const seedHeaderObj = {
|
|
49184
|
+
dhPublicKey: bytesToHex(seedEncrypted.header.dhPublicKey),
|
|
49185
|
+
previousChainLength: seedEncrypted.header.previousChainLength,
|
|
49186
|
+
messageNumber: seedEncrypted.header.messageNumber
|
|
49187
|
+
};
|
|
49188
|
+
obsAccEntry.observerSession.ratchetState = obsRatchet.serialize();
|
|
49189
|
+
await this._persistState();
|
|
49190
|
+
if (this._ws && obsAccEntry.conversationId) {
|
|
49191
|
+
this._ws.send(JSON.stringify({
|
|
49192
|
+
event: "a2a_message",
|
|
49193
|
+
data: {
|
|
49194
|
+
conversation_id: obsAccEntry.conversationId,
|
|
49195
|
+
channel_id: obsAccChannelId,
|
|
49196
|
+
// Dummy A2A payload (plaintext, won't relay to peer)
|
|
49197
|
+
text: "",
|
|
49198
|
+
message_type: "observer_seed",
|
|
49199
|
+
// Observer copy is the real payload
|
|
49200
|
+
observer_header_blob: Buffer.from(JSON.stringify(seedHeaderObj)).toString("hex"),
|
|
49201
|
+
observer_ciphertext: bytesToHex(seedEncrypted.ciphertext),
|
|
49202
|
+
observer_nonce: bytesToHex(seedEncrypted.nonce)
|
|
49203
|
+
}
|
|
49204
|
+
}));
|
|
49205
|
+
console.log(
|
|
49206
|
+
`[SecureChannel] Observer seed message sent for channel ${obsAccChannelId.slice(0, 8)}...`
|
|
49207
|
+
);
|
|
49208
|
+
}
|
|
49209
|
+
} catch (seedErr) {
|
|
49210
|
+
console.error("[SecureChannel] Observer seed message failed:", seedErr);
|
|
49211
|
+
}
|
|
49180
49212
|
} catch (err) {
|
|
49181
49213
|
console.error("[SecureChannel] Observer ratchet init failed:", err);
|
|
49182
49214
|
}
|