@agentvault/claude-bridge 0.7.14 → 0.7.15
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 +29 -7
- package/dist/service/subcommand.d.ts.map +1 -1
- package/package.json +2 -1
package/dist/index.js
CHANGED
|
@@ -399,11 +399,20 @@ var subcommand_exports = {};
|
|
|
399
399
|
__export(subcommand_exports, {
|
|
400
400
|
maybeRunServiceSubcommand: () => maybeRunServiceSubcommand
|
|
401
401
|
});
|
|
402
|
+
function requireAgentName(env) {
|
|
403
|
+
const name = env.AV_AGENT_NAME?.trim();
|
|
404
|
+
if (!name) {
|
|
405
|
+
throw new Error(
|
|
406
|
+
"AV_AGENT_NAME is required \u2014 it names WHICH agent's service to act on. Re-run as: AV_AGENT_NAME=<agent-name> agentvault-claude-bridge <subcommand>"
|
|
407
|
+
);
|
|
408
|
+
}
|
|
409
|
+
return name;
|
|
410
|
+
}
|
|
402
411
|
function labelFor(env) {
|
|
403
|
-
return `dev.agentvault.bridge-${slugify2(env
|
|
412
|
+
return `dev.agentvault.bridge-${slugify2(requireAgentName(env))}`;
|
|
404
413
|
}
|
|
405
414
|
function legacyLabelFor(env) {
|
|
406
|
-
return `com.agentvault.claude-bridge.${slugify2(env
|
|
415
|
+
return `com.agentvault.claude-bridge.${slugify2(requireAgentName(env))}`;
|
|
407
416
|
}
|
|
408
417
|
function resolveLabel(backend, env) {
|
|
409
418
|
const current = labelFor(env);
|
|
@@ -414,7 +423,17 @@ function resolveLabel(backend, env) {
|
|
|
414
423
|
}
|
|
415
424
|
function maybeRunServiceSubcommand(argv, env, deps) {
|
|
416
425
|
const cmd = argv[2];
|
|
417
|
-
if (!cmd
|
|
426
|
+
if (!cmd) return false;
|
|
427
|
+
if (!SERVICE_CMDS.has(cmd)) {
|
|
428
|
+
const looksLikeToken = cmd.startsWith("av_tok_");
|
|
429
|
+
const looksLikeFlag = cmd.startsWith("-");
|
|
430
|
+
if (!looksLikeToken && !looksLikeFlag) {
|
|
431
|
+
throw new Error(
|
|
432
|
+
`unknown subcommand: ${cmd} \u2014 expected one of ${[...SERVICE_CMDS].join(", ")}, an invite token, or no argument at all`
|
|
433
|
+
);
|
|
434
|
+
}
|
|
435
|
+
return false;
|
|
436
|
+
}
|
|
418
437
|
const backend = deps?.backend ?? selectBackend(process.platform);
|
|
419
438
|
const entrypoint = deps?.entrypoint ?? process.argv[1];
|
|
420
439
|
const log = deps?.log ?? ((m6) => console.error("[bridge] " + m6));
|
|
@@ -436,7 +455,9 @@ function maybeRunServiceSubcommand(argv, env, deps) {
|
|
|
436
455
|
});
|
|
437
456
|
backend.install(spec);
|
|
438
457
|
log(`installed service ${spec.label} \u2014 logs: ${spec.logOut}`);
|
|
439
|
-
log(
|
|
458
|
+
log(
|
|
459
|
+
`check it with: AV_AGENT_NAME=${cfg.agentName} agentvault-claude-bridge status`
|
|
460
|
+
);
|
|
440
461
|
} else if (cmd === "uninstall") {
|
|
441
462
|
const label = resolveLabel(backend, env);
|
|
442
463
|
backend.uninstall(label);
|
|
@@ -69951,7 +69972,8 @@ ${messageText}`;
|
|
|
69951
69972
|
const candidateCount = candidates.filter(Boolean).length;
|
|
69952
69973
|
const joined = await joinWithFirstMatchingKp(welcomeBytes, candidates);
|
|
69953
69974
|
if (!joined) {
|
|
69954
|
-
console.error(`[SecureChannel] No matching KeyPackage found for Welcome \u2014 cannot join group ${groupId?.slice(0, 8)}. The Welcome is encrypted to a published KP's public key; none of our ${candidateCount} candidate bundle(s) decrypted it.
|
|
69975
|
+
console.error(`[SecureChannel] No matching KeyPackage found for Welcome \u2014 cannot join group ${groupId?.slice(0, 8)}. The Welcome is encrypted to a published KP's public key; none of our ${candidateCount} candidate bundle(s) decrypted it. Requesting a re-Welcome with a fresh KeyPackage.`);
|
|
69976
|
+
if (groupId) void this._requestWelcomeSelfHeal(groupId);
|
|
69955
69977
|
return;
|
|
69956
69978
|
}
|
|
69957
69979
|
const mgr = joined.mgr;
|
|
@@ -134435,7 +134457,7 @@ async function main() {
|
|
|
134435
134457
|
"[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"
|
|
134436
134458
|
);
|
|
134437
134459
|
}
|
|
134438
|
-
logLine(`[bridge] version: ${true ? "0.7.
|
|
134460
|
+
logLine(`[bridge] version: ${true ? "0.7.15" : "dev"}`);
|
|
134439
134461
|
logLine(`[bridge] data dir: ${cfg.dataDir} (${cfg.dataDirSource})`);
|
|
134440
134462
|
logLine(`[bridge] workspace: ${cfg.workspaceDir} \xB7 permissions: ${cfg.permissionMode} \xB7 enclave dir fenced`);
|
|
134441
134463
|
if (cfg.armRoom) {
|
|
@@ -134467,7 +134489,7 @@ async function main() {
|
|
|
134467
134489
|
// its default would render "@agentvault/agentvault@0.7.x" — the wrong
|
|
134468
134490
|
// package name attached to the bridge's version number, which is worse
|
|
134469
134491
|
// than either alone.
|
|
134470
|
-
clientVersion: `@agentvault/claude-bridge@${true ? "0.7.
|
|
134492
|
+
clientVersion: `@agentvault/claude-bridge@${true ? "0.7.15" : "dev"}`
|
|
134471
134493
|
});
|
|
134472
134494
|
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.`;
|
|
134473
134495
|
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;
|
|
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,CAsFT"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentvault/claude-bridge",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.15",
|
|
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",
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
"build": "npm --prefix ../plugin run build && tsc --emitDeclarationOnly && node build.mjs",
|
|
27
27
|
"start": "node dist/index.js",
|
|
28
28
|
"test": "vitest run",
|
|
29
|
+
"typecheck": "tsc -p tsconfig.test.json",
|
|
29
30
|
"prepublishOnly": "npm run build"
|
|
30
31
|
},
|
|
31
32
|
"dependencies": {
|