@agentvault/agentvault 0.23.24 → 0.23.26
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 +56 -11
- package/dist/cli.js.map +2 -2
- package/dist/index.js +56 -11
- package/dist/index.js.map +2 -2
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -63099,7 +63099,7 @@ var init_mls_kp_pool = __esm({
|
|
|
63099
63099
|
|
|
63100
63100
|
// src/client-version.ts
|
|
63101
63101
|
function ownIdentity() {
|
|
63102
|
-
const v2 = true ? "0.23.
|
|
63102
|
+
const v2 = true ? "0.23.26" : FALLBACK;
|
|
63103
63103
|
return `${PACKAGE}@${v2}`;
|
|
63104
63104
|
}
|
|
63105
63105
|
function buildClientVersion(override) {
|
|
@@ -64863,13 +64863,35 @@ var init_channel = __esm({
|
|
|
64863
64863
|
const pendingWsSends = [];
|
|
64864
64864
|
const sentSharedGroupIds = /* @__PURE__ */ new Set();
|
|
64865
64865
|
const addressedMlsGroupIds = [];
|
|
64866
|
+
if (!(this._persisted?.mlsGroups && this._state === "ready" && this._ws)) {
|
|
64867
|
+
console.warn(
|
|
64868
|
+
`[SecureChannel] send(): shared-MLS block SKIPPED \u2014 mlsGroups=${this._persisted?.mlsGroups ? Object.keys(this._persisted.mlsGroups).length : "none"} state=${this._state} ws=${this._ws ? "open" : "null"}`
|
|
64869
|
+
);
|
|
64870
|
+
}
|
|
64866
64871
|
if (this._persisted?.mlsGroups && this._state === "ready" && this._ws) {
|
|
64867
64872
|
const targetSharedGid = targetConvId ? this._sessionGroupIds?.get(targetConvId) : void 0;
|
|
64873
|
+
console.log(
|
|
64874
|
+
`[SecureChannel] send(): considering ${Object.keys(this._persisted.mlsGroups).length} shared group(s); targetConvId=${targetConvId ? targetConvId.slice(0, 8) : "(none \u2014 broadcast)"} targetSharedGid=${targetSharedGid ? targetSharedGid.slice(0, 8) : "(none)"}`
|
|
64875
|
+
);
|
|
64876
|
+
const skipped = [];
|
|
64868
64877
|
for (const [gid, entry] of Object.entries(this._persisted.mlsGroups)) {
|
|
64869
|
-
if (targetConvId && gid !== targetSharedGid)
|
|
64870
|
-
|
|
64878
|
+
if (targetConvId && gid !== targetSharedGid) {
|
|
64879
|
+
skipped.push(`${gid.slice(0, 8)}:not-target`);
|
|
64880
|
+
continue;
|
|
64881
|
+
}
|
|
64882
|
+
if (!entry.mlsGroupId) {
|
|
64883
|
+
skipped.push(`${gid.slice(0, 8)}:no-mlsGroupId`);
|
|
64884
|
+
continue;
|
|
64885
|
+
}
|
|
64871
64886
|
const mlsGroup = this._mlsGroups.get(`1to1-group:${gid}`);
|
|
64872
|
-
if (!mlsGroup?.isInitialized
|
|
64887
|
+
if (!mlsGroup?.isInitialized) {
|
|
64888
|
+
skipped.push(`${gid.slice(0, 8)}:not-in-memory`);
|
|
64889
|
+
continue;
|
|
64890
|
+
}
|
|
64891
|
+
if (Number(mlsGroup.epoch) <= 0) {
|
|
64892
|
+
skipped.push(`${gid.slice(0, 8)}:epoch<=0`);
|
|
64893
|
+
continue;
|
|
64894
|
+
}
|
|
64873
64895
|
try {
|
|
64874
64896
|
const plaintextBytes = new TextEncoder().encode(plaintext);
|
|
64875
64897
|
const cipherBytes = await mlsGroup.encrypt(plaintextBytes);
|
|
@@ -64894,8 +64916,12 @@ var init_channel = __esm({
|
|
|
64894
64916
|
console.log(`[SecureChannel] Shared MLS group send for group ${gid.slice(0, 8)} (${entry.mlsGroupId.slice(0, 8)})`);
|
|
64895
64917
|
} catch (err) {
|
|
64896
64918
|
console.error(`[SecureChannel] Shared MLS group send failed for ${gid.slice(0, 8)}:`, err);
|
|
64919
|
+
skipped.push(`${gid.slice(0, 8)}:encrypt-threw`);
|
|
64897
64920
|
}
|
|
64898
64921
|
}
|
|
64922
|
+
if (skipped.length > 0) {
|
|
64923
|
+
console.log(`[SecureChannel] send(): skipped ${skipped.length} group(s) \u2014 ${skipped.join(", ")}`);
|
|
64924
|
+
}
|
|
64899
64925
|
}
|
|
64900
64926
|
for (const [convId, session] of this._sessions) {
|
|
64901
64927
|
if (!session.activated) continue;
|
|
@@ -65036,13 +65062,26 @@ var init_channel = __esm({
|
|
|
65036
65062
|
}
|
|
65037
65063
|
}
|
|
65038
65064
|
}
|
|
65039
|
-
if (sentCount === 0
|
|
65040
|
-
console.warn(
|
|
65065
|
+
if (sentCount === 0) {
|
|
65066
|
+
console.warn(
|
|
65067
|
+
`[SecureChannel] send() delivered to 0 destinations \u2014 nothing was encrypted or queued (sessions=${this._sessions.size}, sharedGroups=${this._persisted?.mlsGroups ? Object.keys(this._persisted.mlsGroups).length : 0})`
|
|
65068
|
+
);
|
|
65041
65069
|
}
|
|
65042
65070
|
await this._persistState();
|
|
65071
|
+
const wsReady = this._ws?.readyState === 1;
|
|
65072
|
+
if (pendingWsSends.length > 0 && !wsReady) {
|
|
65073
|
+
console.warn(
|
|
65074
|
+
`[SecureChannel] send(): ${pendingWsSends.length} frame(s) NOT written \u2014 socket readyState=${this._ws?.readyState ?? "null"} (1=OPEN)`
|
|
65075
|
+
);
|
|
65076
|
+
}
|
|
65043
65077
|
for (const frame of pendingWsSends) {
|
|
65044
65078
|
this._ws.send(frame);
|
|
65045
65079
|
}
|
|
65080
|
+
if (pendingWsSends.length > 0) {
|
|
65081
|
+
console.log(
|
|
65082
|
+
`[SecureChannel] send(): wrote ${pendingWsSends.length} frame(s) to the socket (sentCount=${sentCount}, readyState=${this._ws?.readyState ?? "null"})`
|
|
65083
|
+
);
|
|
65084
|
+
}
|
|
65046
65085
|
if (!options?.isResend) {
|
|
65047
65086
|
for (const mlsGroupId of addressedMlsGroupIds) {
|
|
65048
65087
|
this._rememberRetryCandidate(mlsGroupId, plaintext, options);
|
|
@@ -65092,7 +65131,7 @@ var init_channel = __esm({
|
|
|
65092
65131
|
*/
|
|
65093
65132
|
sendActivitySpan(spanData) {
|
|
65094
65133
|
if (!this._ws || this._ws.readyState !== WebSocket.OPEN) return;
|
|
65095
|
-
const pluginVersion = true ? "0.23.
|
|
65134
|
+
const pluginVersion = true ? "0.23.26" : "0.0.0-dev";
|
|
65096
65135
|
const agentName = this.config.agentName ?? "Agent";
|
|
65097
65136
|
const resource = {
|
|
65098
65137
|
"service.name": "agentvault-agent",
|
|
@@ -65553,7 +65592,13 @@ var init_channel = __esm({
|
|
|
65553
65592
|
const before = this._persisted.groupId;
|
|
65554
65593
|
this._sessionGroupIds = new Map(mine.map((r2) => [r2.id, r2.group_id]));
|
|
65555
65594
|
this._persisted.conversationGroupIds = Object.fromEntries(this._sessionGroupIds);
|
|
65556
|
-
const
|
|
65595
|
+
const joined = mine.find((r2) => this._persisted.mlsGroups?.[r2.group_id]);
|
|
65596
|
+
const primary = mine.find((r2) => r2.id === this._persisted.primaryConversationId) ?? joined ?? mine[0];
|
|
65597
|
+
if (!mine.some((r2) => r2.id === this._persisted.primaryConversationId)) {
|
|
65598
|
+
console.log(
|
|
65599
|
+
`[SecureChannel] Adopting new primary conversation ${primary.id.slice(0, 8)} (group ${primary.group_id.slice(0, 8)}) \u2014 ${joined ? "we hold MLS state for it" : "no joined conversation found, first active row"}`
|
|
65600
|
+
);
|
|
65601
|
+
}
|
|
65557
65602
|
this._persisted.groupId = primary.group_id;
|
|
65558
65603
|
this._persisted.primaryConversationId = primary.id;
|
|
65559
65604
|
const liveGroupIds = new Set(mine.map((r2) => r2.group_id));
|
|
@@ -67005,7 +67050,7 @@ var init_channel = __esm({
|
|
|
67005
67050
|
agentVersion: this.config.agentVersion ?? "0.0.0",
|
|
67006
67051
|
// __AV_VERSION__ is injected by esbuild from package.json at build time.
|
|
67007
67052
|
// Falls back to "0.0.0-dev" in non-bundled contexts (tests).
|
|
67008
|
-
pluginVersion: true ? "0.23.
|
|
67053
|
+
pluginVersion: true ? "0.23.26" : "0.0.0-dev"
|
|
67009
67054
|
});
|
|
67010
67055
|
this._telemetryReporter.startAutoFlush(3e4);
|
|
67011
67056
|
}
|
|
@@ -67329,7 +67374,7 @@ var init_channel = __esm({
|
|
|
67329
67374
|
agentVersion: this.config.agentVersion ?? "0.0.0",
|
|
67330
67375
|
// __AV_VERSION__ is injected by esbuild from package.json at build time.
|
|
67331
67376
|
// Falls back to "0.0.0-dev" in non-bundled contexts (tests).
|
|
67332
|
-
pluginVersion: true ? "0.23.
|
|
67377
|
+
pluginVersion: true ? "0.23.26" : "0.0.0-dev"
|
|
67333
67378
|
});
|
|
67334
67379
|
this._telemetryReporter.startAutoFlush(3e4);
|
|
67335
67380
|
}
|
|
@@ -97780,7 +97825,7 @@ var init_index = __esm({
|
|
|
97780
97825
|
init_skill_invoker();
|
|
97781
97826
|
await init_skill_telemetry();
|
|
97782
97827
|
await init_policy_enforcer();
|
|
97783
|
-
VERSION = true ? "0.23.
|
|
97828
|
+
VERSION = true ? "0.23.26" : "0.0.0-dev";
|
|
97784
97829
|
}
|
|
97785
97830
|
});
|
|
97786
97831
|
await init_index();
|