@agentvault/agentvault 0.14.15 → 0.14.17
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 +4 -0
- package/dist/channel.d.ts.map +1 -1
- package/dist/cli.js +28 -3
- package/dist/cli.js.map +2 -2
- package/dist/http-handlers.d.ts.map +1 -1
- package/dist/index.js +28 -3
- package/dist/index.js.map +2 -2
- package/dist/openclaw-entry.d.ts.map +1 -1
- package/dist/openclaw-entry.js +28 -16
- package/dist/openclaw-entry.js.map +2 -2
- package/dist/types.d.ts +1 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http-handlers.d.ts","sourceRoot":"","sources":["../src/http-handlers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAElD,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC/B;AAED;;GAEG;AACH,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,OAAO,EAAE,aAAa,GACrB,OAAO,CAAC,aAAa,CAAC,
|
|
1
|
+
{"version":3,"file":"http-handlers.d.ts","sourceRoot":"","sources":["../src/http-handlers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAElD,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC/B;AAED;;GAEG;AACH,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,OAAO,EAAE,aAAa,GACrB,OAAO,CAAC,aAAa,CAAC,CAuCxB;AAED;;GAEG;AACH,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,OAAO,EAAE,aAAa,GACrB,OAAO,CAAC,aAAa,CAAC,CAuBxB;AAED;;GAEG;AACH,wBAAsB,qBAAqB,CACzC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,OAAO,EAAE,aAAa,GACrB,OAAO,CAAC,aAAa,CAAC,CA8BxB;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,aAAa,GAAG,aAAa,CAUzE"}
|
package/dist/index.js
CHANGED
|
@@ -45940,8 +45940,13 @@ async function handleSendRequest(parsed, channel) {
|
|
|
45940
45940
|
return { status: 400, body: { ok: false, error: "Missing 'text' field" } };
|
|
45941
45941
|
}
|
|
45942
45942
|
try {
|
|
45943
|
-
|
|
45944
|
-
|
|
45943
|
+
let a2aTarget = parsed.hub_address ?? parsed.a2a_address ?? parsed.a2aAddress;
|
|
45944
|
+
if (!a2aTarget && parsed.channel_id && typeof parsed.channel_id === "string") {
|
|
45945
|
+
const hubAddr = channel.resolveA2AChannelHub(parsed.channel_id);
|
|
45946
|
+
if (hubAddr) a2aTarget = hubAddr;
|
|
45947
|
+
}
|
|
45948
|
+
if (a2aTarget && typeof a2aTarget === "string") {
|
|
45949
|
+
await channel.sendToAgent(a2aTarget, text);
|
|
45945
45950
|
} else if (parsed.room_id && typeof parsed.room_id === "string") {
|
|
45946
45951
|
await channel.sendToRoom(parsed.room_id, text, {
|
|
45947
45952
|
messageType: parsed.message_type,
|
|
@@ -46287,6 +46292,16 @@ var init_channel = __esm({
|
|
|
46287
46292
|
get sessionCount() {
|
|
46288
46293
|
return this._sessions.size;
|
|
46289
46294
|
}
|
|
46295
|
+
/** Returns hub addresses of all persisted A2A peer channels. */
|
|
46296
|
+
get a2aPeerAddresses() {
|
|
46297
|
+
if (!this._persisted?.a2aChannels) return [];
|
|
46298
|
+
return Object.values(this._persisted.a2aChannels).map((ch) => ch.hubAddress);
|
|
46299
|
+
}
|
|
46300
|
+
/** Resolves an A2A channel ID to the peer's hub address, or null if not found. */
|
|
46301
|
+
resolveA2AChannelHub(channelId) {
|
|
46302
|
+
const entry = this._persisted?.a2aChannels?.[channelId];
|
|
46303
|
+
return entry?.hubAddress ?? null;
|
|
46304
|
+
}
|
|
46290
46305
|
/** Returns the TelemetryReporter instance (available after WebSocket connect). */
|
|
46291
46306
|
get telemetry() {
|
|
46292
46307
|
return this._telemetryReporter;
|
|
@@ -47668,7 +47683,8 @@ var init_channel = __esm({
|
|
|
47668
47683
|
channelId,
|
|
47669
47684
|
peerHubAddress: peerHub,
|
|
47670
47685
|
role,
|
|
47671
|
-
conversationId: convId
|
|
47686
|
+
conversationId: convId,
|
|
47687
|
+
topic: channelData.topic || void 0
|
|
47672
47688
|
});
|
|
47673
47689
|
}
|
|
47674
47690
|
}
|
|
@@ -48233,6 +48249,14 @@ ${messageText}`;
|
|
|
48233
48249
|
*/
|
|
48234
48250
|
async _relaySyncToSiblings(sourceConvId, senderOwnerDeviceId, messageText, topicId) {
|
|
48235
48251
|
if (!this._ws || this._sessions.size <= 1) return;
|
|
48252
|
+
const roomConvIds = /* @__PURE__ */ new Set();
|
|
48253
|
+
if (this._persisted?.rooms) {
|
|
48254
|
+
for (const room of Object.values(this._persisted.rooms)) {
|
|
48255
|
+
for (const cid of room.conversationIds) {
|
|
48256
|
+
roomConvIds.add(cid);
|
|
48257
|
+
}
|
|
48258
|
+
}
|
|
48259
|
+
}
|
|
48236
48260
|
const syncPayload = JSON.stringify({
|
|
48237
48261
|
type: "sync",
|
|
48238
48262
|
sender: senderOwnerDeviceId,
|
|
@@ -48243,6 +48267,7 @@ ${messageText}`;
|
|
|
48243
48267
|
for (const [siblingConvId, siblingSession] of this._sessions) {
|
|
48244
48268
|
if (siblingConvId === sourceConvId) continue;
|
|
48245
48269
|
if (!siblingSession.activated) continue;
|
|
48270
|
+
if (roomConvIds.has(siblingConvId)) continue;
|
|
48246
48271
|
const syncEncrypted = siblingSession.ratchet.encrypt(syncPayload);
|
|
48247
48272
|
const syncTransport = encryptedMessageToTransport(syncEncrypted);
|
|
48248
48273
|
this._ws.send(
|