@agentvault/grok-bridge 0.4.6 → 0.4.7
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/index.js +28 -8
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -64605,11 +64605,11 @@ var init_mls_kp_pool = __esm2({
|
|
|
64605
64605
|
}
|
|
64606
64606
|
});
|
|
64607
64607
|
function ownIdentity() {
|
|
64608
|
-
const v2 = true ? "0.23.
|
|
64608
|
+
const v2 = true ? "0.23.34" : FALLBACK;
|
|
64609
64609
|
return `${PACKAGE}@${v2}`;
|
|
64610
64610
|
}
|
|
64611
64611
|
function buildSha() {
|
|
64612
|
-
const raw = true ? "
|
|
64612
|
+
const raw = true ? "6b305ca-dirty" : "";
|
|
64613
64613
|
const cleaned = (raw ?? "").trim();
|
|
64614
64614
|
return !cleaned || cleaned === "unknown" ? null : cleaned;
|
|
64615
64615
|
}
|
|
@@ -66807,7 +66807,7 @@ var init_channel = __esm2({
|
|
|
66807
66807
|
*/
|
|
66808
66808
|
sendActivitySpan(spanData) {
|
|
66809
66809
|
if (!this._ws || this._ws.readyState !== WebSocket.OPEN) return;
|
|
66810
|
-
const pluginVersion = true ? "0.23.
|
|
66810
|
+
const pluginVersion = true ? "0.23.34" : "0.0.0-dev";
|
|
66811
66811
|
const agentName = this.config.agentName ?? "Agent";
|
|
66812
66812
|
const resource = {
|
|
66813
66813
|
"service.name": "agentvault-agent",
|
|
@@ -68745,7 +68745,7 @@ var init_channel = __esm2({
|
|
|
68745
68745
|
agentVersion: this.config.agentVersion ?? "0.0.0",
|
|
68746
68746
|
// __AV_VERSION__ is injected by esbuild from package.json at build time.
|
|
68747
68747
|
// Falls back to "0.0.0-dev" in non-bundled contexts (tests).
|
|
68748
|
-
pluginVersion: true ? "0.23.
|
|
68748
|
+
pluginVersion: true ? "0.23.34" : "0.0.0-dev"
|
|
68749
68749
|
});
|
|
68750
68750
|
this._telemetryReporter.startAutoFlush(3e4);
|
|
68751
68751
|
}
|
|
@@ -69069,7 +69069,7 @@ var init_channel = __esm2({
|
|
|
69069
69069
|
agentVersion: this.config.agentVersion ?? "0.0.0",
|
|
69070
69070
|
// __AV_VERSION__ is injected by esbuild from package.json at build time.
|
|
69071
69071
|
// Falls back to "0.0.0-dev" in non-bundled contexts (tests).
|
|
69072
|
-
pluginVersion: true ? "0.23.
|
|
69072
|
+
pluginVersion: true ? "0.23.34" : "0.0.0-dev"
|
|
69073
69073
|
});
|
|
69074
69074
|
this._telemetryReporter.startAutoFlush(3e4);
|
|
69075
69075
|
}
|
|
@@ -69473,6 +69473,7 @@ var init_channel = __esm2({
|
|
|
69473
69473
|
try {
|
|
69474
69474
|
const cipherBytes = new Uint8Array(Buffer.from(data.payload, "hex"));
|
|
69475
69475
|
const result = await mgr.decrypt(cipherBytes);
|
|
69476
|
+
if (mgrKey) this._mlsDecryptFailCounts.delete(mgrKey);
|
|
69476
69477
|
const mlsGroupId = (convGroupId ? this._persisted?.mlsGroups?.[convGroupId]?.mlsGroupId : null) ?? this._persisted?.mlsConversations?.[convId]?.mlsGroupId ?? groupId;
|
|
69477
69478
|
if (mlsGroupId) {
|
|
69478
69479
|
await saveMlsState(this.config.dataDir, mlsGroupId, JSON.stringify(mgr.exportState()));
|
|
@@ -69577,6 +69578,10 @@ var init_channel = __esm2({
|
|
|
69577
69578
|
this.config.onMessage(text, metadata);
|
|
69578
69579
|
}
|
|
69579
69580
|
} catch (decryptErr) {
|
|
69581
|
+
if (classifyCommitFailure(data.epoch, mgr?.epoch) === "already-applied") {
|
|
69582
|
+
console.debug(`[SecureChannel] MLS 1:1 message at epoch ${String(data.epoch)} predates our epoch ${String(mgr?.epoch)} \u2014 cannot decrypt, ignoring`);
|
|
69583
|
+
return;
|
|
69584
|
+
}
|
|
69580
69585
|
const failKey = mgrKey || `unknown:${groupId}`;
|
|
69581
69586
|
const count = (this._mlsDecryptFailCounts.get(failKey) ?? 0) + 1;
|
|
69582
69587
|
this._mlsDecryptFailCounts.set(failKey, count);
|
|
@@ -70418,6 +70423,7 @@ ${baseText}`;
|
|
|
70418
70423
|
try {
|
|
70419
70424
|
const ciphertext = Buffer.from(data.payload, "hex");
|
|
70420
70425
|
const result = await mlsGroup.decrypt(new Uint8Array(ciphertext));
|
|
70426
|
+
this._mlsDecryptFailCounts.delete(resolvedRoomId);
|
|
70421
70427
|
await saveMlsState(this.config.dataDir, groupId, JSON.stringify(mlsGroup.exportState()));
|
|
70422
70428
|
if (result.isHandshake || !result.plaintext) {
|
|
70423
70429
|
return;
|
|
@@ -70507,6 +70513,10 @@ ${baseText}`;
|
|
|
70507
70513
|
console.error("[SecureChannel] onMessage callback error (MLS):", err);
|
|
70508
70514
|
});
|
|
70509
70515
|
} catch (err) {
|
|
70516
|
+
if (classifyCommitFailure(data.epoch, mlsGroup.epoch) === "already-applied") {
|
|
70517
|
+
console.debug(`[SecureChannel] MLS room message at epoch ${String(data.epoch)} predates our epoch ${String(mlsGroup.epoch)} for ${resolvedRoomId.slice(0, 8)} \u2014 cannot decrypt, ignoring`);
|
|
70518
|
+
return;
|
|
70519
|
+
}
|
|
70510
70520
|
const failKey = resolvedRoomId;
|
|
70511
70521
|
const count = (this._mlsDecryptFailCounts.get(failKey) ?? 0) + 1;
|
|
70512
70522
|
this._mlsDecryptFailCounts.set(failKey, count);
|
|
@@ -71546,6 +71556,11 @@ ${baseText}`;
|
|
|
71546
71556
|
nackedIds.push(msg.queue_id);
|
|
71547
71557
|
if (msg.group_id && (msg.message_type === "commit" || msg.message_type === "application")) {
|
|
71548
71558
|
const failKey = msg.conversation_group_id ? `1to1-group:${msg.conversation_group_id}` : `group:${msg.group_id}`;
|
|
71559
|
+
const localMgr = msg.room_id && this._mlsGroups.get(msg.room_id) || this._mlsGroups.get(failKey);
|
|
71560
|
+
if (classifyCommitFailure(msg.epoch, localMgr?.epoch) === "already-applied") {
|
|
71561
|
+
console.debug(`[SecureChannel] Delivery ${msg.message_type} at epoch ${String(msg.epoch)} predates our epoch ${String(localMgr?.epoch)} \u2014 not counting toward recovery`);
|
|
71562
|
+
continue;
|
|
71563
|
+
}
|
|
71549
71564
|
const count = (this._mlsDecryptFailCounts.get(failKey) ?? 0) + 1;
|
|
71550
71565
|
this._mlsDecryptFailCounts.set(failKey, count);
|
|
71551
71566
|
if (count >= _SecureChannel.MAX_MLS_DECRYPT_FAILS) {
|
|
@@ -72223,6 +72238,7 @@ ${baseText}`;
|
|
|
72223
72238
|
try {
|
|
72224
72239
|
const ciphertext = new Uint8Array(Buffer.from(data.payload, "hex"));
|
|
72225
72240
|
const result = await mlsGroup.decrypt(ciphertext);
|
|
72241
|
+
this._mlsDecryptFailCounts.delete(`a2a:${a2aChannelId}`);
|
|
72226
72242
|
await saveMlsState(this.config.dataDir, groupId, JSON.stringify(mlsGroup.exportState()));
|
|
72227
72243
|
if (result.isHandshake || !result.plaintext) {
|
|
72228
72244
|
return;
|
|
@@ -72243,6 +72259,10 @@ ${baseText}`;
|
|
|
72243
72259
|
this.config.onA2AMessage(a2aMsg);
|
|
72244
72260
|
}
|
|
72245
72261
|
} catch (err) {
|
|
72262
|
+
if (classifyCommitFailure(data.epoch, mlsGroup?.epoch) === "already-applied") {
|
|
72263
|
+
console.debug(`[SecureChannel] MLS A2A message at epoch ${String(data.epoch)} predates our epoch ${String(mlsGroup?.epoch)} for ${a2aChannelId.slice(0, 8)} \u2014 cannot decrypt, ignoring`);
|
|
72264
|
+
return;
|
|
72265
|
+
}
|
|
72246
72266
|
const failKey = `a2a:${a2aChannelId}`;
|
|
72247
72267
|
const count = (this._mlsDecryptFailCounts.get(failKey) ?? 0) + 1;
|
|
72248
72268
|
this._mlsDecryptFailCounts.set(failKey, count);
|
|
@@ -99461,7 +99481,7 @@ var init_index = __esm2({
|
|
|
99461
99481
|
await init_skill_telemetry();
|
|
99462
99482
|
await init_policy_enforcer();
|
|
99463
99483
|
init_room_protocol();
|
|
99464
|
-
VERSION = true ? "0.23.
|
|
99484
|
+
VERSION = true ? "0.23.34" : "0.0.0-dev";
|
|
99465
99485
|
}
|
|
99466
99486
|
});
|
|
99467
99487
|
await init_index();
|
|
@@ -100387,7 +100407,7 @@ async function main() {
|
|
|
100387
100407
|
const info = parseInfoFlags(process.argv.slice(2));
|
|
100388
100408
|
if (info.showVersion || info.showHelp) {
|
|
100389
100409
|
const version2 = buildClientVersion2(
|
|
100390
|
-
true ? "0.4.
|
|
100410
|
+
true ? "0.4.7" : void 0
|
|
100391
100411
|
);
|
|
100392
100412
|
if (info.showVersion) printLine(version2);
|
|
100393
100413
|
if (info.showHelp) {
|
|
@@ -100440,7 +100460,7 @@ async function main() {
|
|
|
100440
100460
|
agentName: cfg.agentName,
|
|
100441
100461
|
platform: "node",
|
|
100442
100462
|
clientVersion: buildClientVersion2(
|
|
100443
|
-
true ? "0.4.
|
|
100463
|
+
true ? "0.4.7" : void 0
|
|
100444
100464
|
)
|
|
100445
100465
|
});
|
|
100446
100466
|
channelRef = channel;
|
package/package.json
CHANGED