@agentvault/claude-bridge 0.8.2 → 0.8.3
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 +37 -13
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -64596,17 +64596,28 @@ var init_mls_kp_pool = __esm2({
|
|
|
64596
64596
|
}
|
|
64597
64597
|
});
|
|
64598
64598
|
function ownIdentity() {
|
|
64599
|
-
const v22 = true ? "0.23.
|
|
64599
|
+
const v22 = true ? "0.23.30" : FALLBACK;
|
|
64600
64600
|
return `${PACKAGE}@${v22}`;
|
|
64601
64601
|
}
|
|
64602
|
+
function buildSha() {
|
|
64603
|
+
const raw = true ? "1fff5d6" : "";
|
|
64604
|
+
const cleaned = (raw ?? "").trim();
|
|
64605
|
+
return !cleaned || cleaned === "unknown" ? null : cleaned;
|
|
64606
|
+
}
|
|
64607
|
+
function withBuildSha(identity) {
|
|
64608
|
+
const sha = buildSha();
|
|
64609
|
+
if (!sha || identity.includes("+")) return identity;
|
|
64610
|
+
const stamped = `${identity}+${sha}`;
|
|
64611
|
+
return stamped.length <= MAX_LEN ? stamped : identity;
|
|
64612
|
+
}
|
|
64602
64613
|
function buildClientVersion(override) {
|
|
64603
64614
|
try {
|
|
64604
64615
|
const candidate = (override ?? "").trim();
|
|
64605
64616
|
if (candidate) {
|
|
64606
|
-
const cleaned = candidate.replace(DISALLOWED, "").slice(0, MAX_LEN);
|
|
64617
|
+
const cleaned = withBuildSha(candidate.replace(DISALLOWED, "").slice(0, MAX_LEN));
|
|
64607
64618
|
if (cleaned && !cleaned.includes("..")) return cleaned;
|
|
64608
64619
|
}
|
|
64609
|
-
return ownIdentity().replace(DISALLOWED, "").slice(0, MAX_LEN);
|
|
64620
|
+
return withBuildSha(ownIdentity().replace(DISALLOWED, "").slice(0, MAX_LEN));
|
|
64610
64621
|
} catch {
|
|
64611
64622
|
return FALLBACK;
|
|
64612
64623
|
}
|
|
@@ -66667,7 +66678,7 @@ var init_channel = __esm2({
|
|
|
66667
66678
|
*/
|
|
66668
66679
|
sendActivitySpan(spanData) {
|
|
66669
66680
|
if (!this._ws || this._ws.readyState !== WebSocket2.OPEN) return;
|
|
66670
|
-
const pluginVersion = true ? "0.23.
|
|
66681
|
+
const pluginVersion = true ? "0.23.30" : "0.0.0-dev";
|
|
66671
66682
|
const agentName = this.config.agentName ?? "Agent";
|
|
66672
66683
|
const resource = {
|
|
66673
66684
|
"service.name": "agentvault-agent",
|
|
@@ -68605,7 +68616,7 @@ var init_channel = __esm2({
|
|
|
68605
68616
|
agentVersion: this.config.agentVersion ?? "0.0.0",
|
|
68606
68617
|
// __AV_VERSION__ is injected by esbuild from package.json at build time.
|
|
68607
68618
|
// Falls back to "0.0.0-dev" in non-bundled contexts (tests).
|
|
68608
|
-
pluginVersion: true ? "0.23.
|
|
68619
|
+
pluginVersion: true ? "0.23.30" : "0.0.0-dev"
|
|
68609
68620
|
});
|
|
68610
68621
|
this._telemetryReporter.startAutoFlush(3e4);
|
|
68611
68622
|
}
|
|
@@ -68929,7 +68940,7 @@ var init_channel = __esm2({
|
|
|
68929
68940
|
agentVersion: this.config.agentVersion ?? "0.0.0",
|
|
68930
68941
|
// __AV_VERSION__ is injected by esbuild from package.json at build time.
|
|
68931
68942
|
// Falls back to "0.0.0-dev" in non-bundled contexts (tests).
|
|
68932
|
-
pluginVersion: true ? "0.23.
|
|
68943
|
+
pluginVersion: true ? "0.23.30" : "0.0.0-dev"
|
|
68933
68944
|
});
|
|
68934
68945
|
this._telemetryReporter.startAutoFlush(3e4);
|
|
68935
68946
|
}
|
|
@@ -73075,21 +73086,30 @@ var init_gateway_send = __esm2({
|
|
|
73075
73086
|
});
|
|
73076
73087
|
function parseMentions(text) {
|
|
73077
73088
|
const mentions = [];
|
|
73078
|
-
const re22 =
|
|
73089
|
+
const re22 = new RegExp(MENTION_RE.source, MENTION_RE.flags);
|
|
73079
73090
|
let match;
|
|
73080
73091
|
while ((match = re22.exec(text)) !== null) {
|
|
73081
73092
|
mentions.push(match[1].toLowerCase());
|
|
73082
73093
|
}
|
|
73083
73094
|
return mentions;
|
|
73084
73095
|
}
|
|
73096
|
+
function resolveOwn(mention, names) {
|
|
73097
|
+
if (names.has(mention)) return mention;
|
|
73098
|
+
const parts = mention.split("-");
|
|
73099
|
+
for (let i2 = parts.length - 1; i2 > 0; i2--) {
|
|
73100
|
+
const candidate = parts.slice(0, i2).join("-");
|
|
73101
|
+
if (names.has(candidate)) return candidate;
|
|
73102
|
+
}
|
|
73103
|
+
return null;
|
|
73104
|
+
}
|
|
73085
73105
|
function owesRoomReply(plaintext, agentName, accountId, senderIsAgent, roomDisplayName, ownDisplayName, selfResolved = true) {
|
|
73086
73106
|
const mentions = parseMentions(plaintext);
|
|
73087
73107
|
if (mentions.length === 0) return false;
|
|
73088
|
-
|
|
73108
|
+
const ownNames = ownRoomNames(agentName, accountId, roomDisplayName, ownDisplayName);
|
|
73109
|
+
if (mentions.some((m22) => resolveOwn(m22, ownNames) !== null)) return true;
|
|
73110
|
+
if (mentions.some((m22) => resolveOwn(m22, BROADCAST_NAMES) !== null)) {
|
|
73089
73111
|
return senderIsAgent !== true;
|
|
73090
73112
|
}
|
|
73091
|
-
const ownNames = ownRoomNames(agentName, accountId, roomDisplayName, ownDisplayName);
|
|
73092
|
-
if (mentions.some((m22) => ownNames.has(m22))) return true;
|
|
73093
73113
|
if (!selfResolved) return true;
|
|
73094
73114
|
return false;
|
|
73095
73115
|
}
|
|
@@ -73107,9 +73127,13 @@ function ownRoomNames(agentName, accountId, roomDisplayName, ownDisplayName) {
|
|
|
73107
73127
|
add4(ownDisplayName);
|
|
73108
73128
|
return names;
|
|
73109
73129
|
}
|
|
73130
|
+
var MENTION_RE;
|
|
73131
|
+
var BROADCAST_NAMES;
|
|
73110
73132
|
var init_room_protocol = __esm2({
|
|
73111
73133
|
"src/room-protocol.ts"() {
|
|
73112
73134
|
"use strict";
|
|
73135
|
+
MENTION_RE = /@([\w-]+)/gi;
|
|
73136
|
+
BROADCAST_NAMES = /* @__PURE__ */ new Set(["all", "everyone"]);
|
|
73113
73137
|
}
|
|
73114
73138
|
});
|
|
73115
73139
|
var init_llm_response_parser = __esm2({
|
|
@@ -99205,7 +99229,7 @@ var init_index = __esm2({
|
|
|
99205
99229
|
await init_skill_telemetry();
|
|
99206
99230
|
await init_policy_enforcer();
|
|
99207
99231
|
init_room_protocol();
|
|
99208
|
-
VERSION = true ? "0.23.
|
|
99232
|
+
VERSION = true ? "0.23.30" : "0.0.0-dev";
|
|
99209
99233
|
}
|
|
99210
99234
|
});
|
|
99211
99235
|
await init_index();
|
|
@@ -135609,7 +135633,7 @@ async function main() {
|
|
|
135609
135633
|
"[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"
|
|
135610
135634
|
);
|
|
135611
135635
|
}
|
|
135612
|
-
logLine(`[bridge] version: ${true ? "0.8.
|
|
135636
|
+
logLine(`[bridge] version: ${true ? "0.8.3" : "dev"}`);
|
|
135613
135637
|
logLine(`[bridge] data dir: ${cfg.dataDir} (${cfg.dataDirSource})`);
|
|
135614
135638
|
logLine(`[bridge] workspace: ${cfg.workspaceDir} \xB7 permissions: ${cfg.permissionMode} \xB7 enclave dir fenced`);
|
|
135615
135639
|
if (cfg.armRoom) {
|
|
@@ -135641,7 +135665,7 @@ async function main() {
|
|
|
135641
135665
|
// its default would render "@agentvault/agentvault@0.7.x" — the wrong
|
|
135642
135666
|
// package name attached to the bridge's version number, which is worse
|
|
135643
135667
|
// than either alone.
|
|
135644
|
-
clientVersion: `@agentvault/claude-bridge@${true ? "0.8.
|
|
135668
|
+
clientVersion: `@agentvault/claude-bridge@${true ? "0.8.3" : "dev"}`
|
|
135645
135669
|
});
|
|
135646
135670
|
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.`;
|
|
135647
135671
|
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.3",
|
|
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",
|