@agentvault/claude-bridge 0.7.15 → 0.7.16
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 +52 -11
- package/dist/service/subcommand.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -439,6 +439,7 @@ function maybeRunServiceSubcommand(argv, env, deps) {
|
|
|
439
439
|
const log = deps?.log ?? ((m6) => console.error("[bridge] " + m6));
|
|
440
440
|
try {
|
|
441
441
|
if (cmd === "install") {
|
|
442
|
+
requireAgentName(env);
|
|
442
443
|
const cfg = loadConfig(env, []);
|
|
443
444
|
if (!hasPersistedCreds(cfg.dataDir)) {
|
|
444
445
|
throw new Error(
|
|
@@ -553,6 +554,25 @@ var __toESM = (mod4, isNodeMode, target) => (target = mod4 != null ? __create(__
|
|
|
553
554
|
isNodeMode || !mod4 || !mod4.__esModule ? __defProp2(target, "default", { value: mod4, enumerable: true }) : target,
|
|
554
555
|
mod4
|
|
555
556
|
));
|
|
557
|
+
function toEpoch(v22) {
|
|
558
|
+
if (typeof v22 === "bigint") return v22;
|
|
559
|
+
if (typeof v22 === "number") {
|
|
560
|
+
return Number.isFinite(v22) ? BigInt(Math.trunc(v22)) : null;
|
|
561
|
+
}
|
|
562
|
+
if (typeof v22 === "string" && /^\d+$/.test(v22)) return BigInt(v22);
|
|
563
|
+
return null;
|
|
564
|
+
}
|
|
565
|
+
function classifyCommitFailure(messageEpoch, groupEpoch) {
|
|
566
|
+
const msg = toEpoch(messageEpoch);
|
|
567
|
+
const grp = toEpoch(groupEpoch);
|
|
568
|
+
if (msg === null || grp === null) return "count";
|
|
569
|
+
return msg < grp ? "already-applied" : "count";
|
|
570
|
+
}
|
|
571
|
+
var init_mls_commit_classify = __esm2({
|
|
572
|
+
"src/mls-commit-classify.ts"() {
|
|
573
|
+
"use strict";
|
|
574
|
+
}
|
|
575
|
+
});
|
|
556
576
|
var __filename;
|
|
557
577
|
var __dirname;
|
|
558
578
|
var url2;
|
|
@@ -63900,7 +63920,7 @@ var init_mls_kp_pool = __esm2({
|
|
|
63900
63920
|
}
|
|
63901
63921
|
});
|
|
63902
63922
|
function ownIdentity() {
|
|
63903
|
-
const v22 = true ? "0.23.
|
|
63923
|
+
const v22 = true ? "0.23.23" : FALLBACK;
|
|
63904
63924
|
return `${PACKAGE}@${v22}`;
|
|
63905
63925
|
}
|
|
63906
63926
|
function buildClientVersion(override) {
|
|
@@ -64812,6 +64832,7 @@ var SecureChannel;
|
|
|
64812
64832
|
var init_channel = __esm2({
|
|
64813
64833
|
async "src/channel.ts"() {
|
|
64814
64834
|
"use strict";
|
|
64835
|
+
init_mls_commit_classify();
|
|
64815
64836
|
await init_libsodium_wrappers();
|
|
64816
64837
|
await init_dist();
|
|
64817
64838
|
await init_dist();
|
|
@@ -65878,7 +65899,7 @@ var init_channel = __esm2({
|
|
|
65878
65899
|
*/
|
|
65879
65900
|
sendActivitySpan(spanData) {
|
|
65880
65901
|
if (!this._ws || this._ws.readyState !== WebSocket2.OPEN) return;
|
|
65881
|
-
const pluginVersion = true ? "0.23.
|
|
65902
|
+
const pluginVersion = true ? "0.23.23" : "0.0.0-dev";
|
|
65882
65903
|
const agentName = this.config.agentName ?? "Agent";
|
|
65883
65904
|
const resource = {
|
|
65884
65905
|
"service.name": "agentvault-agent",
|
|
@@ -67788,7 +67809,7 @@ var init_channel = __esm2({
|
|
|
67788
67809
|
agentVersion: this.config.agentVersion ?? "0.0.0",
|
|
67789
67810
|
// __AV_VERSION__ is injected by esbuild from package.json at build time.
|
|
67790
67811
|
// Falls back to "0.0.0-dev" in non-bundled contexts (tests).
|
|
67791
|
-
pluginVersion: true ? "0.23.
|
|
67812
|
+
pluginVersion: true ? "0.23.23" : "0.0.0-dev"
|
|
67792
67813
|
});
|
|
67793
67814
|
this._telemetryReporter.startAutoFlush(3e4);
|
|
67794
67815
|
}
|
|
@@ -68112,7 +68133,7 @@ var init_channel = __esm2({
|
|
|
68112
68133
|
agentVersion: this.config.agentVersion ?? "0.0.0",
|
|
68113
68134
|
// __AV_VERSION__ is injected by esbuild from package.json at build time.
|
|
68114
68135
|
// Falls back to "0.0.0-dev" in non-bundled contexts (tests).
|
|
68115
|
-
pluginVersion: true ? "0.23.
|
|
68136
|
+
pluginVersion: true ? "0.23.23" : "0.0.0-dev"
|
|
68116
68137
|
});
|
|
68117
68138
|
this._telemetryReporter.startAutoFlush(3e4);
|
|
68118
68139
|
}
|
|
@@ -69518,7 +69539,14 @@ ${messageText}`;
|
|
|
69518
69539
|
console.log(`[SecureChannel] MLS commit processed for room ${roomId.slice(0, 8)} (epoch=${mlsGroup.epoch})`);
|
|
69519
69540
|
this._mlsCommitFailCounts.delete(roomId);
|
|
69520
69541
|
} catch (err) {
|
|
69521
|
-
await this._onCommitFailure(
|
|
69542
|
+
await this._onCommitFailure(
|
|
69543
|
+
roomId,
|
|
69544
|
+
groupId,
|
|
69545
|
+
err,
|
|
69546
|
+
`room ${roomId.slice(0, 8)}`,
|
|
69547
|
+
data.epoch,
|
|
69548
|
+
mlsGroup.epoch
|
|
69549
|
+
);
|
|
69522
69550
|
}
|
|
69523
69551
|
} else {
|
|
69524
69552
|
this._bufferMlsCommit(groupId, epoch, data);
|
|
@@ -69538,7 +69566,14 @@ ${messageText}`;
|
|
|
69538
69566
|
console.log(`[SecureChannel] MLS commit processed for A2A ${chId.slice(0, 8)} (epoch=${mlsGroup.epoch})`);
|
|
69539
69567
|
this._mlsCommitFailCounts.delete(`a2a:${chId}`);
|
|
69540
69568
|
} catch (err) {
|
|
69541
|
-
await this._onCommitFailure(
|
|
69569
|
+
await this._onCommitFailure(
|
|
69570
|
+
`a2a:${chId}`,
|
|
69571
|
+
groupId,
|
|
69572
|
+
err,
|
|
69573
|
+
`A2A ${chId.slice(0, 8)}`,
|
|
69574
|
+
data.epoch,
|
|
69575
|
+
mlsGroup.epoch
|
|
69576
|
+
);
|
|
69542
69577
|
}
|
|
69543
69578
|
} else {
|
|
69544
69579
|
this._bufferMlsCommit(groupId, epoch, data);
|
|
@@ -69624,7 +69659,13 @@ ${messageText}`;
|
|
|
69624
69659
|
* Never re-throws. The caller's only handler logs and drops, so throwing here
|
|
69625
69660
|
* is indistinguishable from swallowing — it just moves the swallow one frame up.
|
|
69626
69661
|
*/
|
|
69627
|
-
async _onCommitFailure(groupKey, mlsGroupId, err, label) {
|
|
69662
|
+
async _onCommitFailure(groupKey, mlsGroupId, err, label, messageEpoch, groupEpoch) {
|
|
69663
|
+
if (classifyCommitFailure(messageEpoch, groupEpoch) === "already-applied") {
|
|
69664
|
+
console.debug(
|
|
69665
|
+
`[SecureChannel] Skipping already-applied MLS commit for ${label} (commit epoch ${String(messageEpoch)} is behind group epoch ${String(groupEpoch)})`
|
|
69666
|
+
);
|
|
69667
|
+
return;
|
|
69668
|
+
}
|
|
69628
69669
|
const count = (this._mlsCommitFailCounts.get(groupKey) ?? 0) + 1;
|
|
69629
69670
|
this._mlsCommitFailCounts.set(groupKey, count);
|
|
69630
69671
|
console.error(
|
|
@@ -71522,7 +71563,7 @@ ${messageText}`;
|
|
|
71522
71563
|
return;
|
|
71523
71564
|
}
|
|
71524
71565
|
this._authFailedThisSession = true;
|
|
71525
|
-
const authReason = data?.reason ?? "
|
|
71566
|
+
const authReason = data?.reason ?? "unknown";
|
|
71526
71567
|
console.warn(
|
|
71527
71568
|
`[SecureChannel] connection_rejected (reason=${data?.reason ?? "unknown"}, retryable=false) \u2014 terminal; surfacing auth_failed`
|
|
71528
71569
|
);
|
|
@@ -98103,7 +98144,7 @@ var init_index = __esm2({
|
|
|
98103
98144
|
init_skill_invoker();
|
|
98104
98145
|
await init_skill_telemetry();
|
|
98105
98146
|
await init_policy_enforcer();
|
|
98106
|
-
VERSION = true ? "0.23.
|
|
98147
|
+
VERSION = true ? "0.23.23" : "0.0.0-dev";
|
|
98107
98148
|
}
|
|
98108
98149
|
});
|
|
98109
98150
|
await init_index();
|
|
@@ -134457,7 +134498,7 @@ async function main() {
|
|
|
134457
134498
|
"[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"
|
|
134458
134499
|
);
|
|
134459
134500
|
}
|
|
134460
|
-
logLine(`[bridge] version: ${true ? "0.7.
|
|
134501
|
+
logLine(`[bridge] version: ${true ? "0.7.16" : "dev"}`);
|
|
134461
134502
|
logLine(`[bridge] data dir: ${cfg.dataDir} (${cfg.dataDirSource})`);
|
|
134462
134503
|
logLine(`[bridge] workspace: ${cfg.workspaceDir} \xB7 permissions: ${cfg.permissionMode} \xB7 enclave dir fenced`);
|
|
134463
134504
|
if (cfg.armRoom) {
|
|
@@ -134489,7 +134530,7 @@ async function main() {
|
|
|
134489
134530
|
// its default would render "@agentvault/agentvault@0.7.x" — the wrong
|
|
134490
134531
|
// package name attached to the bridge's version number, which is worse
|
|
134491
134532
|
// than either alone.
|
|
134492
|
-
clientVersion: `@agentvault/claude-bridge@${true ? "0.7.
|
|
134533
|
+
clientVersion: `@agentvault/claude-bridge@${true ? "0.7.16" : "dev"}`
|
|
134493
134534
|
});
|
|
134494
134535
|
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.`;
|
|
134495
134536
|
const deviceJwt = () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subcommand.d.ts","sourceRoot":"","sources":["../../src/service/subcommand.ts"],"names":[],"mappings":"AAEA,OAAO,EAAiB,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAElE,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,cAAc,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,GAAG,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;CAC5B;AAuDD;;uFAEuF;AACvF,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,MAAM,EAAE,EACd,GAAG,EAAE,MAAM,CAAC,UAAU,EACtB,IAAI,CAAC,EAAE,cAAc,GACpB,OAAO,
|
|
1
|
+
{"version":3,"file":"subcommand.d.ts","sourceRoot":"","sources":["../../src/service/subcommand.ts"],"names":[],"mappings":"AAEA,OAAO,EAAiB,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAElE,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,cAAc,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,GAAG,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;CAC5B;AAuDD;;uFAEuF;AACvF,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,MAAM,EAAE,EACd,GAAG,EAAE,MAAM,CAAC,UAAU,EACtB,IAAI,CAAC,EAAE,cAAc,GACpB,OAAO,CA0FT"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentvault/claude-bridge",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.16",
|
|
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",
|