@agentvault/agentvault 0.19.6 → 0.19.8
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 +14 -3
- package/dist/cli.js.map +2 -2
- package/dist/index.js +14 -3
- package/dist/index.js.map +2 -2
- package/dist/openclaw-entry.d.ts.map +1 -1
- package/dist/openclaw-entry.js +5 -0
- package/dist/openclaw-entry.js.map +2 -2
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -48530,21 +48530,28 @@ var init_channel = __esm({
|
|
|
48530
48530
|
if (!this._persisted.a2aChannels) {
|
|
48531
48531
|
this._persisted.a2aChannels = {};
|
|
48532
48532
|
}
|
|
48533
|
+
const myHub = this._persisted.hubAddress || "";
|
|
48533
48534
|
for (const ch of channels) {
|
|
48534
48535
|
if (ch.status === "active" || ch.status === "approved") {
|
|
48535
|
-
const
|
|
48536
|
+
const isInitiator = myHub ? ch.initiatorHubAddress === myHub : ch.responderHubAddress !== myHub;
|
|
48537
|
+
const otherAddress = isInitiator ? ch.responderHubAddress : ch.initiatorHubAddress;
|
|
48536
48538
|
const existing = this._persisted.a2aChannels[ch.channelId];
|
|
48537
48539
|
if (existing) {
|
|
48538
48540
|
existing.hubAddress = otherAddress;
|
|
48539
48541
|
existing.conversationId = ch.conversationId || existing.conversationId;
|
|
48542
|
+
if (!existing.role) {
|
|
48543
|
+
existing.role = isInitiator ? "initiator" : "responder";
|
|
48544
|
+
}
|
|
48540
48545
|
} else {
|
|
48541
|
-
const role = ch.initiatorHubAddress === this._persisted.hubAddress ? "initiator" : "responder";
|
|
48542
48546
|
this._persisted.a2aChannels[ch.channelId] = {
|
|
48543
48547
|
channelId: ch.channelId,
|
|
48544
48548
|
hubAddress: otherAddress,
|
|
48545
48549
|
conversationId: ch.conversationId || "",
|
|
48546
|
-
role
|
|
48550
|
+
role: isInitiator ? "initiator" : "responder"
|
|
48547
48551
|
};
|
|
48552
|
+
console.log(
|
|
48553
|
+
`[SecureChannel] Discovered A2A channel ${ch.channelId.slice(0, 8)}... peer=${otherAddress} role=${isInitiator ? "initiator" : "responder"}`
|
|
48554
|
+
);
|
|
48548
48555
|
}
|
|
48549
48556
|
}
|
|
48550
48557
|
}
|
|
@@ -48768,7 +48775,11 @@ var init_channel = __esm({
|
|
|
48768
48775
|
await this._fetchScanRules();
|
|
48769
48776
|
}
|
|
48770
48777
|
try {
|
|
48778
|
+
console.log(`[SecureChannel] Syncing A2A channels (hubAddress=${this._persisted?.hubAddress ?? "NOT SET"})`);
|
|
48771
48779
|
await this.listA2AChannels();
|
|
48780
|
+
const a2aCount = Object.keys(this._persisted?.a2aChannels ?? {}).length;
|
|
48781
|
+
console.log(`[SecureChannel] A2A sync complete: ${a2aCount} channels`);
|
|
48782
|
+
this.emit("a2a_channels_synced", { count: a2aCount });
|
|
48772
48783
|
} catch (err) {
|
|
48773
48784
|
console.warn("[SecureChannel] A2A channel sync failed (non-fatal):", err);
|
|
48774
48785
|
}
|