@agentvault/agentvault 0.19.13 → 0.19.14
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 +30 -24
- package/dist/cli.js.map +2 -2
- package/dist/index.js +30 -24
- package/dist/index.js.map +2 -2
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -49095,31 +49095,37 @@ var init_channel = __esm({
|
|
|
49095
49095
|
}
|
|
49096
49096
|
if (this._persisted && convId) {
|
|
49097
49097
|
if (!this._persisted.a2aChannels) this._persisted.a2aChannels = {};
|
|
49098
|
-
const
|
|
49099
|
-
|
|
49100
|
-
|
|
49101
|
-
|
|
49102
|
-
|
|
49103
|
-
|
|
49104
|
-
|
|
49105
|
-
|
|
49106
|
-
|
|
49107
|
-
|
|
49108
|
-
|
|
49109
|
-
|
|
49110
|
-
|
|
49111
|
-
|
|
49112
|
-
|
|
49113
|
-
|
|
49114
|
-
|
|
49115
|
-
|
|
49116
|
-
|
|
49117
|
-
|
|
49118
|
-
|
|
49119
|
-
|
|
49120
|
-
|
|
49098
|
+
const existingNow = this._persisted.a2aChannels[channelId];
|
|
49099
|
+
if (existingNow?.pendingEphemeralPrivateKey || existingNow?.session) {
|
|
49100
|
+
console.log(`[SecureChannel] A2A channel ${channelId.slice(0, 8)}... key exchange already in progress, skipping`);
|
|
49101
|
+
} else {
|
|
49102
|
+
const a2aEphemeral = await generateEphemeralKeypair();
|
|
49103
|
+
const ephPubHex = bytesToHex(a2aEphemeral.publicKey);
|
|
49104
|
+
const ephPrivHex = bytesToHex(a2aEphemeral.privateKey);
|
|
49105
|
+
this._persisted.a2aChannels[channelId] = {
|
|
49106
|
+
...existingNow,
|
|
49107
|
+
channelId,
|
|
49108
|
+
hubAddress: existingNow?.hubAddress || peerHub,
|
|
49109
|
+
conversationId: convId,
|
|
49110
|
+
role: existingNow?.role || role,
|
|
49111
|
+
pendingEphemeralPrivateKey: ephPrivHex
|
|
49112
|
+
};
|
|
49113
|
+
if (this._ws) {
|
|
49114
|
+
this._ws.send(
|
|
49115
|
+
JSON.stringify({
|
|
49116
|
+
event: "a2a_key_exchange",
|
|
49117
|
+
data: {
|
|
49118
|
+
channel_id: channelId,
|
|
49119
|
+
ephemeral_key: ephPubHex
|
|
49120
|
+
}
|
|
49121
|
+
})
|
|
49122
|
+
);
|
|
49123
|
+
console.log(
|
|
49124
|
+
`[SecureChannel] A2A key exchange sent for channel ${channelId.slice(0, 8)}... (role=${role})`
|
|
49125
|
+
);
|
|
49126
|
+
}
|
|
49127
|
+
await this._persistState();
|
|
49121
49128
|
}
|
|
49122
|
-
await this._persistState();
|
|
49123
49129
|
}
|
|
49124
49130
|
this.emit("a2a_channel_approved", channelData);
|
|
49125
49131
|
if (this.config.onA2AChannelReady && convId) {
|