@agentvault/agentvault 0.23.38 → 0.23.39
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 +13 -0
- package/dist/channel.d.ts.map +1 -1
- package/dist/cli.js +34 -10
- package/dist/cli.js.map +2 -2
- package/dist/index.js +32 -8
- package/dist/index.js.map +2 -2
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -63266,11 +63266,11 @@ var init_mls_kp_pool = __esm({
|
|
|
63266
63266
|
|
|
63267
63267
|
// src/client-version.ts
|
|
63268
63268
|
function ownIdentity() {
|
|
63269
|
-
const v2 = true ? "0.23.
|
|
63269
|
+
const v2 = true ? "0.23.39" : FALLBACK;
|
|
63270
63270
|
return `${PACKAGE}@${v2}`;
|
|
63271
63271
|
}
|
|
63272
63272
|
function buildSha() {
|
|
63273
|
-
const raw = true ? "
|
|
63273
|
+
const raw = true ? "9982fc8-dirty" : "";
|
|
63274
63274
|
const cleaned = (raw ?? "").trim();
|
|
63275
63275
|
return !cleaned || cleaned === "unknown" ? null : cleaned;
|
|
63276
63276
|
}
|
|
@@ -64386,6 +64386,27 @@ var init_channel = __esm({
|
|
|
64386
64386
|
* this process (GH #366). Cleared on (re)join so the next first message
|
|
64387
64387
|
* re-fetches the authoritative roster. Prevents per-message refetch storms. */
|
|
64388
64388
|
_roomRosterRefreshed = /* @__PURE__ */ new Set();
|
|
64389
|
+
/**
|
|
64390
|
+
* #1181: the last attachment saved per room, so the NEXT room turn can name
|
|
64391
|
+
* it. wren saved an un-mentioned file (no reply, #1107), was asked "@wren can
|
|
64392
|
+
* you read this file?" 14 s later, and answered "I don't see a file
|
|
64393
|
+
* attached" — the note lived only in the prior history line. Hermes defers
|
|
64394
|
+
* un-mentioned attachments and fetches on the next addressed turn (#1162);
|
|
64395
|
+
* this is the plugin's equivalent surface. In-memory: a restart forgets it,
|
|
64396
|
+
* which is the right default for "this file".
|
|
64397
|
+
*/
|
|
64398
|
+
_recentRoomAttachments = /* @__PURE__ */ new Map();
|
|
64399
|
+
static RECENT_ROOM_ATTACHMENT_MS = 10 * 60 * 1e3;
|
|
64400
|
+
/** #1181: prefix a room turn that carries no attachment with the one saved in this room recently. */
|
|
64401
|
+
_withRecentRoomAttachmentNote(roomId, text) {
|
|
64402
|
+
const recent = this._recentRoomAttachments.get(roomId);
|
|
64403
|
+
if (!recent) return text;
|
|
64404
|
+
const ageMs = Date.now() - recent.at;
|
|
64405
|
+
if (ageMs > _SecureChannel.RECENT_ROOM_ATTACHMENT_MS) return text;
|
|
64406
|
+
return `[Most recent file in this room: ${recent.filePath} (${recent.name}, received ${Math.round(ageMs / 1e3)}s ago). If this message refers to "the file" or "this file", it means that one \u2014 use your Read tool on it.]
|
|
64407
|
+
|
|
64408
|
+
${text}`;
|
|
64409
|
+
}
|
|
64389
64410
|
/** In-flight roster-refresh promises (per room) — dedup concurrent refreshes. */
|
|
64390
64411
|
_roomRosterRefreshInFlight = /* @__PURE__ */ new Map();
|
|
64391
64412
|
/** Dedup buffer for A2A message IDs (prevents double-delivery via direct + Redis) */
|
|
@@ -65481,7 +65502,7 @@ var init_channel = __esm({
|
|
|
65481
65502
|
*/
|
|
65482
65503
|
sendActivitySpan(spanData) {
|
|
65483
65504
|
if (!this._ws || this._ws.readyState !== WebSocket.OPEN) return;
|
|
65484
|
-
const pluginVersion = true ? "0.23.
|
|
65505
|
+
const pluginVersion = true ? "0.23.39" : "0.0.0-dev";
|
|
65485
65506
|
const agentName = this.config.agentName ?? "Agent";
|
|
65486
65507
|
const resource = {
|
|
65487
65508
|
"service.name": "agentvault-agent",
|
|
@@ -67419,7 +67440,7 @@ var init_channel = __esm({
|
|
|
67419
67440
|
agentVersion: this.config.agentVersion ?? "0.0.0",
|
|
67420
67441
|
// __AV_VERSION__ is injected by esbuild from package.json at build time.
|
|
67421
67442
|
// Falls back to "0.0.0-dev" in non-bundled contexts (tests).
|
|
67422
|
-
pluginVersion: true ? "0.23.
|
|
67443
|
+
pluginVersion: true ? "0.23.39" : "0.0.0-dev"
|
|
67423
67444
|
});
|
|
67424
67445
|
this._telemetryReporter.startAutoFlush(3e4);
|
|
67425
67446
|
}
|
|
@@ -67743,7 +67764,7 @@ var init_channel = __esm({
|
|
|
67743
67764
|
agentVersion: this.config.agentVersion ?? "0.0.0",
|
|
67744
67765
|
// __AV_VERSION__ is injected by esbuild from package.json at build time.
|
|
67745
67766
|
// Falls back to "0.0.0-dev" in non-bundled contexts (tests).
|
|
67746
|
-
pluginVersion: true ? "0.23.
|
|
67767
|
+
pluginVersion: true ? "0.23.39" : "0.0.0-dev"
|
|
67747
67768
|
});
|
|
67748
67769
|
this._telemetryReporter.startAutoFlush(3e4);
|
|
67749
67770
|
}
|
|
@@ -68516,12 +68537,13 @@ ${messageText}`;
|
|
|
68516
68537
|
* Returns the text unchanged when there is no attachment or the fetch fails —
|
|
68517
68538
|
* but a failure is LOGGED and announced in the text, never silent.
|
|
68518
68539
|
*/
|
|
68519
|
-
async _augmentWithAttachment(attachmentInfo, baseText) {
|
|
68540
|
+
async _augmentWithAttachment(attachmentInfo, baseText, roomId) {
|
|
68520
68541
|
if (!attachmentInfo) return baseText;
|
|
68521
68542
|
try {
|
|
68522
68543
|
const { filePath, decrypted } = await this._downloadAndDecryptAttachment(attachmentInfo);
|
|
68523
68544
|
const mime = String(attachmentInfo.mime ?? "application/octet-stream");
|
|
68524
68545
|
const name = String(attachmentInfo.filename ?? "attachment");
|
|
68546
|
+
if (roomId) this._recentRoomAttachments.set(roomId, { filePath, name, at: Date.now() });
|
|
68525
68547
|
const textMimes = ["text/", "application/json", "application/xml", "application/csv"];
|
|
68526
68548
|
if (textMimes.some((m2) => mime.startsWith(m2))) {
|
|
68527
68549
|
const content = new TextDecoder().decode(decrypted);
|
|
@@ -69151,7 +69173,9 @@ ${baseText}`;
|
|
|
69151
69173
|
}
|
|
69152
69174
|
}
|
|
69153
69175
|
if (roomAttachment) {
|
|
69154
|
-
messageText = await this._augmentWithAttachment(roomAttachment, messageText);
|
|
69176
|
+
messageText = await this._augmentWithAttachment(roomAttachment, messageText, resolvedRoomId);
|
|
69177
|
+
} else {
|
|
69178
|
+
messageText = this._withRecentRoomAttachmentNote(resolvedRoomId, messageText);
|
|
69155
69179
|
}
|
|
69156
69180
|
const roomMembers = this._persisted?.rooms?.[resolvedRoomId]?.members ?? [];
|
|
69157
69181
|
const senderMember = roomMembers.find((m2) => m2.deviceId === senderDeviceId);
|
|
@@ -98643,7 +98667,7 @@ var init_index = __esm({
|
|
|
98643
98667
|
await init_skill_telemetry();
|
|
98644
98668
|
await init_policy_enforcer();
|
|
98645
98669
|
init_room_protocol();
|
|
98646
|
-
VERSION = true ? "0.23.
|
|
98670
|
+
VERSION = true ? "0.23.39" : "0.0.0-dev";
|
|
98647
98671
|
}
|
|
98648
98672
|
});
|
|
98649
98673
|
await init_index();
|