@agentvault/agentvault 0.14.20 → 0.14.22
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 +14 -2
- package/dist/cli.js.map +2 -2
- package/dist/http-handlers.d.ts.map +1 -1
- package/dist/index.js +14 -2
- package/dist/index.js.map +2 -2
- package/dist/openclaw-entry.js +3 -2
- package/dist/openclaw-entry.js.map +2 -2
- 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,CA0CxB;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
|
@@ -46465,10 +46465,11 @@ async function handleSendRequest(parsed, channel) {
|
|
|
46465
46465
|
const hubAddr = channel.resolveA2AChannelHub(parsed.channel_id);
|
|
46466
46466
|
if (hubAddr) a2aTarget = hubAddr;
|
|
46467
46467
|
}
|
|
46468
|
+
const roomId = parsed.room_id ?? channel.lastInboundRoomId;
|
|
46468
46469
|
if (a2aTarget && typeof a2aTarget === "string") {
|
|
46469
46470
|
await channel.sendToAgent(a2aTarget, text);
|
|
46470
|
-
} else if (
|
|
46471
|
-
await channel.sendToRoom(
|
|
46471
|
+
} else if (roomId) {
|
|
46472
|
+
await channel.sendToRoom(roomId, text, {
|
|
46472
46473
|
messageType: parsed.message_type,
|
|
46473
46474
|
priority: parsed.priority,
|
|
46474
46475
|
metadata: parsed.metadata
|
|
@@ -46786,6 +46787,8 @@ var init_channel = __esm({
|
|
|
46786
46787
|
_telemetryReporter = null;
|
|
46787
46788
|
/** Topic ID from the most recent inbound message — used as fallback for replies. */
|
|
46788
46789
|
_lastIncomingTopicId;
|
|
46790
|
+
/** Room ID from the most recent inbound room message — used as fallback for HTTP /send replies. */
|
|
46791
|
+
_lastInboundRoomId;
|
|
46789
46792
|
/** Rate-limit: last resync_request timestamp per conversation (5-min cooldown). */
|
|
46790
46793
|
_lastResyncRequest = /* @__PURE__ */ new Map();
|
|
46791
46794
|
/** Debounce timer for server backup uploads (60s). */
|
|
@@ -46819,6 +46822,10 @@ var init_channel = __esm({
|
|
|
46819
46822
|
get sessionCount() {
|
|
46820
46823
|
return this._sessions.size;
|
|
46821
46824
|
}
|
|
46825
|
+
/** Room ID from the most recent inbound room message (for HTTP /send fallback). */
|
|
46826
|
+
get lastInboundRoomId() {
|
|
46827
|
+
return this._lastInboundRoomId;
|
|
46828
|
+
}
|
|
46822
46829
|
/** Returns hub addresses of all persisted A2A peer channels. */
|
|
46823
46830
|
get a2aPeerAddresses() {
|
|
46824
46831
|
if (!this._persisted?.a2aChannels) return [];
|
|
@@ -48724,6 +48731,7 @@ ${messageText}`;
|
|
|
48724
48731
|
}
|
|
48725
48732
|
}
|
|
48726
48733
|
}
|
|
48734
|
+
if (!roomId) this._lastInboundRoomId = void 0;
|
|
48727
48735
|
const metadata = {
|
|
48728
48736
|
messageId: msgData.message_id,
|
|
48729
48737
|
conversationId: convId,
|
|
@@ -49103,6 +49111,7 @@ ${messageText}`;
|
|
|
49103
49111
|
*/
|
|
49104
49112
|
async _handleRoomMessage(msgData) {
|
|
49105
49113
|
if (msgData.sender_device_id === this._deviceId) return;
|
|
49114
|
+
this._lastInboundRoomId = msgData.room_id;
|
|
49106
49115
|
const convId = msgData.conversation_id ?? this._findConversationForSender(msgData.sender_device_id, msgData.room_id);
|
|
49107
49116
|
if (!convId) {
|
|
49108
49117
|
console.warn(
|
|
@@ -49243,6 +49252,9 @@ ${messageText}`;
|
|
|
49243
49252
|
if (msgData.message_id) {
|
|
49244
49253
|
this._sendAck(msgData.message_id);
|
|
49245
49254
|
}
|
|
49255
|
+
if (msgData.created_at && this._persisted) {
|
|
49256
|
+
this._persisted.lastMessageTimestamp = msgData.created_at;
|
|
49257
|
+
}
|
|
49246
49258
|
await this._persistState();
|
|
49247
49259
|
const metadata = {
|
|
49248
49260
|
messageId: msgData.message_id ?? "",
|