@agentvault/agentvault 0.19.18 → 0.19.20
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 +11 -19
- package/dist/cli.js.map +2 -2
- package/dist/index.js +11 -19
- package/dist/index.js.map +2 -2
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -47953,27 +47953,19 @@ var init_channel = __esm({
|
|
|
47953
47953
|
(ch) => (ch.status === "active" || ch.status === "approved") && (ch.initiatorHubAddress === target.hubAddress || ch.responderHubAddress === target.hubAddress)
|
|
47954
47954
|
);
|
|
47955
47955
|
if (match?.conversationId) {
|
|
47956
|
-
const
|
|
47957
|
-
|
|
47958
|
-
|
|
47959
|
-
|
|
47960
|
-
|
|
47961
|
-
|
|
47962
|
-
|
|
47956
|
+
const peerAddress = target.hubAddress;
|
|
47957
|
+
if (this._persisted?.a2aChannels?.[match.channelId]) {
|
|
47958
|
+
this._persisted.a2aChannels[match.channelId].hubAddress = peerAddress;
|
|
47959
|
+
this._persisted.a2aChannels[match.channelId].conversationId = match.conversationId;
|
|
47960
|
+
await this._persistState();
|
|
47961
|
+
console.log(`[deliver] A2A force-fixed: peer=${peerAddress} conv=${match.conversationId.slice(0, 8)}...`);
|
|
47962
|
+
}
|
|
47963
47963
|
try {
|
|
47964
|
-
await this.sendToAgent(
|
|
47965
|
-
console.log(`[deliver] A2A sendToAgent OK \u2192 ${
|
|
47966
|
-
return { ok: true, destination: { kind: "a2a", id:
|
|
47964
|
+
await this.sendToAgent(peerAddress, content.text || "");
|
|
47965
|
+
console.log(`[deliver] A2A sendToAgent OK \u2192 ${peerAddress}`);
|
|
47966
|
+
return { ok: true, destination: { kind: "a2a", id: peerAddress }, timestamp: ts };
|
|
47967
47967
|
} catch (sendErr) {
|
|
47968
|
-
console.
|
|
47969
|
-
const wsReady = this._ws && this._ws.readyState === 1;
|
|
47970
|
-
if (wsReady) {
|
|
47971
|
-
this._ws.send(JSON.stringify({ event: "a2a_message", data: payload }));
|
|
47972
|
-
console.log(`[deliver] A2A raw WS send OK \u2192 ${target.hubAddress}`);
|
|
47973
|
-
return { ok: true, destination: { kind: "a2a", id: target.hubAddress }, timestamp: ts };
|
|
47974
|
-
} else {
|
|
47975
|
-
console.warn(`[deliver] A2A WS not ready (state=${this._ws?.readyState})`);
|
|
47976
|
-
}
|
|
47968
|
+
console.warn(`[deliver] A2A sendToAgent failed after fix: ${sendErr}`);
|
|
47977
47969
|
}
|
|
47978
47970
|
}
|
|
47979
47971
|
} catch (syncErr) {
|