@agentvault/claude-bridge 0.8.6 → 0.8.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
|
@@ -64612,11 +64612,11 @@ var init_mls_kp_pool = __esm2({
|
|
|
64612
64612
|
}
|
|
64613
64613
|
});
|
|
64614
64614
|
function ownIdentity() {
|
|
64615
|
-
const v22 = true ? "0.23.
|
|
64615
|
+
const v22 = true ? "0.23.34" : FALLBACK;
|
|
64616
64616
|
return `${PACKAGE}@${v22}`;
|
|
64617
64617
|
}
|
|
64618
64618
|
function buildSha() {
|
|
64619
|
-
const raw = true ? "
|
|
64619
|
+
const raw = true ? "6b305ca-dirty" : "";
|
|
64620
64620
|
const cleaned = (raw ?? "").trim();
|
|
64621
64621
|
return !cleaned || cleaned === "unknown" ? null : cleaned;
|
|
64622
64622
|
}
|
|
@@ -66814,7 +66814,7 @@ var init_channel = __esm2({
|
|
|
66814
66814
|
*/
|
|
66815
66815
|
sendActivitySpan(spanData) {
|
|
66816
66816
|
if (!this._ws || this._ws.readyState !== WebSocket2.OPEN) return;
|
|
66817
|
-
const pluginVersion = true ? "0.23.
|
|
66817
|
+
const pluginVersion = true ? "0.23.34" : "0.0.0-dev";
|
|
66818
66818
|
const agentName = this.config.agentName ?? "Agent";
|
|
66819
66819
|
const resource = {
|
|
66820
66820
|
"service.name": "agentvault-agent",
|
|
@@ -68752,7 +68752,7 @@ var init_channel = __esm2({
|
|
|
68752
68752
|
agentVersion: this.config.agentVersion ?? "0.0.0",
|
|
68753
68753
|
// __AV_VERSION__ is injected by esbuild from package.json at build time.
|
|
68754
68754
|
// Falls back to "0.0.0-dev" in non-bundled contexts (tests).
|
|
68755
|
-
pluginVersion: true ? "0.23.
|
|
68755
|
+
pluginVersion: true ? "0.23.34" : "0.0.0-dev"
|
|
68756
68756
|
});
|
|
68757
68757
|
this._telemetryReporter.startAutoFlush(3e4);
|
|
68758
68758
|
}
|
|
@@ -69076,7 +69076,7 @@ var init_channel = __esm2({
|
|
|
69076
69076
|
agentVersion: this.config.agentVersion ?? "0.0.0",
|
|
69077
69077
|
// __AV_VERSION__ is injected by esbuild from package.json at build time.
|
|
69078
69078
|
// Falls back to "0.0.0-dev" in non-bundled contexts (tests).
|
|
69079
|
-
pluginVersion: true ? "0.23.
|
|
69079
|
+
pluginVersion: true ? "0.23.34" : "0.0.0-dev"
|
|
69080
69080
|
});
|
|
69081
69081
|
this._telemetryReporter.startAutoFlush(3e4);
|
|
69082
69082
|
}
|
|
@@ -69480,6 +69480,7 @@ var init_channel = __esm2({
|
|
|
69480
69480
|
try {
|
|
69481
69481
|
const cipherBytes = new Uint8Array(Buffer.from(data.payload, "hex"));
|
|
69482
69482
|
const result = await mgr.decrypt(cipherBytes);
|
|
69483
|
+
if (mgrKey) this._mlsDecryptFailCounts.delete(mgrKey);
|
|
69483
69484
|
const mlsGroupId = (convGroupId ? this._persisted?.mlsGroups?.[convGroupId]?.mlsGroupId : null) ?? this._persisted?.mlsConversations?.[convId]?.mlsGroupId ?? groupId;
|
|
69484
69485
|
if (mlsGroupId) {
|
|
69485
69486
|
await saveMlsState(this.config.dataDir, mlsGroupId, JSON.stringify(mgr.exportState()));
|
|
@@ -69584,6 +69585,10 @@ var init_channel = __esm2({
|
|
|
69584
69585
|
this.config.onMessage(text, metadata);
|
|
69585
69586
|
}
|
|
69586
69587
|
} catch (decryptErr) {
|
|
69588
|
+
if (classifyCommitFailure(data.epoch, mgr?.epoch) === "already-applied") {
|
|
69589
|
+
console.debug(`[SecureChannel] MLS 1:1 message at epoch ${String(data.epoch)} predates our epoch ${String(mgr?.epoch)} \u2014 cannot decrypt, ignoring`);
|
|
69590
|
+
return;
|
|
69591
|
+
}
|
|
69587
69592
|
const failKey = mgrKey || `unknown:${groupId}`;
|
|
69588
69593
|
const count = (this._mlsDecryptFailCounts.get(failKey) ?? 0) + 1;
|
|
69589
69594
|
this._mlsDecryptFailCounts.set(failKey, count);
|
|
@@ -70425,6 +70430,7 @@ ${baseText}`;
|
|
|
70425
70430
|
try {
|
|
70426
70431
|
const ciphertext = Buffer.from(data.payload, "hex");
|
|
70427
70432
|
const result = await mlsGroup.decrypt(new Uint8Array(ciphertext));
|
|
70433
|
+
this._mlsDecryptFailCounts.delete(resolvedRoomId);
|
|
70428
70434
|
await saveMlsState(this.config.dataDir, groupId, JSON.stringify(mlsGroup.exportState()));
|
|
70429
70435
|
if (result.isHandshake || !result.plaintext) {
|
|
70430
70436
|
return;
|
|
@@ -70514,6 +70520,10 @@ ${baseText}`;
|
|
|
70514
70520
|
console.error("[SecureChannel] onMessage callback error (MLS):", err);
|
|
70515
70521
|
});
|
|
70516
70522
|
} catch (err) {
|
|
70523
|
+
if (classifyCommitFailure(data.epoch, mlsGroup.epoch) === "already-applied") {
|
|
70524
|
+
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`);
|
|
70525
|
+
return;
|
|
70526
|
+
}
|
|
70517
70527
|
const failKey = resolvedRoomId;
|
|
70518
70528
|
const count = (this._mlsDecryptFailCounts.get(failKey) ?? 0) + 1;
|
|
70519
70529
|
this._mlsDecryptFailCounts.set(failKey, count);
|
|
@@ -71553,6 +71563,11 @@ ${baseText}`;
|
|
|
71553
71563
|
nackedIds.push(msg.queue_id);
|
|
71554
71564
|
if (msg.group_id && (msg.message_type === "commit" || msg.message_type === "application")) {
|
|
71555
71565
|
const failKey = msg.conversation_group_id ? `1to1-group:${msg.conversation_group_id}` : `group:${msg.group_id}`;
|
|
71566
|
+
const localMgr = msg.room_id && this._mlsGroups.get(msg.room_id) || this._mlsGroups.get(failKey);
|
|
71567
|
+
if (classifyCommitFailure(msg.epoch, localMgr?.epoch) === "already-applied") {
|
|
71568
|
+
console.debug(`[SecureChannel] Delivery ${msg.message_type} at epoch ${String(msg.epoch)} predates our epoch ${String(localMgr?.epoch)} \u2014 not counting toward recovery`);
|
|
71569
|
+
continue;
|
|
71570
|
+
}
|
|
71556
71571
|
const count = (this._mlsDecryptFailCounts.get(failKey) ?? 0) + 1;
|
|
71557
71572
|
this._mlsDecryptFailCounts.set(failKey, count);
|
|
71558
71573
|
if (count >= _SecureChannel.MAX_MLS_DECRYPT_FAILS) {
|
|
@@ -72230,6 +72245,7 @@ ${baseText}`;
|
|
|
72230
72245
|
try {
|
|
72231
72246
|
const ciphertext = new Uint8Array(Buffer.from(data.payload, "hex"));
|
|
72232
72247
|
const result = await mlsGroup.decrypt(ciphertext);
|
|
72248
|
+
this._mlsDecryptFailCounts.delete(`a2a:${a2aChannelId}`);
|
|
72233
72249
|
await saveMlsState(this.config.dataDir, groupId, JSON.stringify(mlsGroup.exportState()));
|
|
72234
72250
|
if (result.isHandshake || !result.plaintext) {
|
|
72235
72251
|
return;
|
|
@@ -72250,6 +72266,10 @@ ${baseText}`;
|
|
|
72250
72266
|
this.config.onA2AMessage(a2aMsg);
|
|
72251
72267
|
}
|
|
72252
72268
|
} catch (err) {
|
|
72269
|
+
if (classifyCommitFailure(data.epoch, mlsGroup?.epoch) === "already-applied") {
|
|
72270
|
+
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`);
|
|
72271
|
+
return;
|
|
72272
|
+
}
|
|
72253
72273
|
const failKey = `a2a:${a2aChannelId}`;
|
|
72254
72274
|
const count = (this._mlsDecryptFailCounts.get(failKey) ?? 0) + 1;
|
|
72255
72275
|
this._mlsDecryptFailCounts.set(failKey, count);
|
|
@@ -99468,7 +99488,7 @@ var init_index = __esm2({
|
|
|
99468
99488
|
await init_skill_telemetry();
|
|
99469
99489
|
await init_policy_enforcer();
|
|
99470
99490
|
init_room_protocol();
|
|
99471
|
-
VERSION = true ? "0.23.
|
|
99491
|
+
VERSION = true ? "0.23.34" : "0.0.0-dev";
|
|
99472
99492
|
}
|
|
99473
99493
|
});
|
|
99474
99494
|
await init_index();
|
|
@@ -135872,7 +135892,7 @@ async function main() {
|
|
|
135872
135892
|
"[bridge] warning: passing the invite token on the command line is visible to other local users via 'ps'. Prefer: AV_INVITE_TOKEN=\u2026 npx @agentvault/claude-bridge"
|
|
135873
135893
|
);
|
|
135874
135894
|
}
|
|
135875
|
-
logLine(`[bridge] version: ${true ? "0.8.
|
|
135895
|
+
logLine(`[bridge] version: ${true ? "0.8.7" : "dev"}`);
|
|
135876
135896
|
logLine(`[bridge] data dir: ${cfg.dataDir} (${cfg.dataDirSource})`);
|
|
135877
135897
|
logLine(`[bridge] workspace: ${cfg.workspaceDir} \xB7 permissions: ${cfg.permissionMode} \xB7 enclave dir fenced`);
|
|
135878
135898
|
if (cfg.armRoom) {
|
|
@@ -135904,7 +135924,7 @@ async function main() {
|
|
|
135904
135924
|
// its default would render "@agentvault/agentvault@0.7.x" — the wrong
|
|
135905
135925
|
// package name attached to the bridge's version number, which is worse
|
|
135906
135926
|
// than either alone.
|
|
135907
|
-
clientVersion: `@agentvault/claude-bridge@${true ? "0.8.
|
|
135927
|
+
clientVersion: `@agentvault/claude-bridge@${true ? "0.8.7" : "dev"}`
|
|
135908
135928
|
});
|
|
135909
135929
|
const agentSystemPrompt = cfg.systemPrompt ?? `You are ${cfg.agentName}, an AI agent on AgentVault. You talk with your owner in 1:1 direct messages and collaborate with other agents in shared rooms. That is your identity \u2014 introduce yourself by that name and do not claim to be any other agent. To speak, call the say tool. In a 1:1 with your owner, reply to what they say. In a room you see every message \u2014 call say only when you have something worth adding, and otherwise stay silent. Keep messages concise.`;
|
|
135910
135930
|
const deviceJwt = () => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentvault/claude-bridge",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "AgentVault Claude Bridge — daemon for bridging a Claude agent into secure E2E-encrypted AgentVault 1:1 direct messages and rooms.",
|
|
6
6
|
"main": "dist/index.js",
|