@agentvault/claude-bridge 0.8.15 → 0.8.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 +32 -18
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1103,6 +1103,19 @@ var init_abstention = __esm2({
|
|
|
1103
1103
|
INSTRUCTION = "not every message needs an answer from you: if this one is not addressed to you and asks nothing of you, reply with exactly " + SENTINEL + " and nothing else \u2014 that is discarded, not posted, and is how you stay quiet; never post a message SAYING that you are staying quiet";
|
|
1104
1104
|
}
|
|
1105
1105
|
});
|
|
1106
|
+
function envelopeText(parsed, raw) {
|
|
1107
|
+
if (parsed !== null && typeof parsed === "object") {
|
|
1108
|
+
const obj = parsed;
|
|
1109
|
+
if (typeof obj.text === "string") return obj.text;
|
|
1110
|
+
if ("type" in obj || "attachment" in obj) return "";
|
|
1111
|
+
}
|
|
1112
|
+
return raw;
|
|
1113
|
+
}
|
|
1114
|
+
var init_envelope_text = __esm2({
|
|
1115
|
+
"src/envelope-text.ts"() {
|
|
1116
|
+
"use strict";
|
|
1117
|
+
}
|
|
1118
|
+
});
|
|
1106
1119
|
function toEpoch(v22) {
|
|
1107
1120
|
if (typeof v22 === "bigint") return v22;
|
|
1108
1121
|
if (typeof v22 === "number") {
|
|
@@ -64664,11 +64677,11 @@ var init_mls_kp_pool = __esm2({
|
|
|
64664
64677
|
}
|
|
64665
64678
|
});
|
|
64666
64679
|
function ownIdentity() {
|
|
64667
|
-
const v22 = true ? "0.23.
|
|
64680
|
+
const v22 = true ? "0.23.44" : FALLBACK;
|
|
64668
64681
|
return `${PACKAGE}@${v22}`;
|
|
64669
64682
|
}
|
|
64670
64683
|
function buildSha() {
|
|
64671
|
-
const raw = true ? "
|
|
64684
|
+
const raw = true ? "765ae19-dirty" : "";
|
|
64672
64685
|
const cleaned = (raw ?? "").trim();
|
|
64673
64686
|
return !cleaned || cleaned === "unknown" ? null : cleaned;
|
|
64674
64687
|
}
|
|
@@ -65590,6 +65603,7 @@ var init_channel = __esm2({
|
|
|
65590
65603
|
async "src/channel.ts"() {
|
|
65591
65604
|
"use strict";
|
|
65592
65605
|
init_abstention();
|
|
65606
|
+
init_envelope_text();
|
|
65593
65607
|
init_mls_commit_classify();
|
|
65594
65608
|
init_room_protocol();
|
|
65595
65609
|
await init_libsodium_wrappers();
|
|
@@ -66919,7 +66933,7 @@ ${text}`;
|
|
|
66919
66933
|
*/
|
|
66920
66934
|
sendActivitySpan(spanData) {
|
|
66921
66935
|
if (!this._ws || this._ws.readyState !== WebSocket2.OPEN) return;
|
|
66922
|
-
const pluginVersion = true ? "0.23.
|
|
66936
|
+
const pluginVersion = true ? "0.23.44" : "0.0.0-dev";
|
|
66923
66937
|
const agentName = this.config.agentName ?? "Agent";
|
|
66924
66938
|
const resource = {
|
|
66925
66939
|
"service.name": "agentvault-agent",
|
|
@@ -68857,7 +68871,7 @@ ${text}`;
|
|
|
68857
68871
|
agentVersion: this.config.agentVersion ?? "0.0.0",
|
|
68858
68872
|
// __AV_VERSION__ is injected by esbuild from package.json at build time.
|
|
68859
68873
|
// Falls back to "0.0.0-dev" in non-bundled contexts (tests).
|
|
68860
|
-
pluginVersion: true ? "0.23.
|
|
68874
|
+
pluginVersion: true ? "0.23.44" : "0.0.0-dev"
|
|
68861
68875
|
});
|
|
68862
68876
|
this._telemetryReporter.startAutoFlush(3e4);
|
|
68863
68877
|
}
|
|
@@ -69181,7 +69195,7 @@ ${text}`;
|
|
|
69181
69195
|
agentVersion: this.config.agentVersion ?? "0.0.0",
|
|
69182
69196
|
// __AV_VERSION__ is injected by esbuild from package.json at build time.
|
|
69183
69197
|
// Falls back to "0.0.0-dev" in non-bundled contexts (tests).
|
|
69184
|
-
pluginVersion: true ? "0.23.
|
|
69198
|
+
pluginVersion: true ? "0.23.44" : "0.0.0-dev"
|
|
69185
69199
|
});
|
|
69186
69200
|
this._telemetryReporter.startAutoFlush(3e4);
|
|
69187
69201
|
}
|
|
@@ -69635,7 +69649,7 @@ ${text}`;
|
|
|
69635
69649
|
let mlsAttachment = null;
|
|
69636
69650
|
try {
|
|
69637
69651
|
const parsed = JSON.parse(plaintext);
|
|
69638
|
-
text = parsed
|
|
69652
|
+
text = envelopeText(parsed, plaintext);
|
|
69639
69653
|
messageType = parsed.type ?? "text";
|
|
69640
69654
|
topicId = parsed.topicId ?? topicId;
|
|
69641
69655
|
if (parsed.attachment) mlsAttachment = parsed.attachment;
|
|
@@ -69830,7 +69844,7 @@ ${text}`;
|
|
|
69830
69844
|
try {
|
|
69831
69845
|
const parsed = JSON.parse(plaintext);
|
|
69832
69846
|
messageType = parsed.type || "message";
|
|
69833
|
-
messageText = parsed
|
|
69847
|
+
messageText = envelopeText(parsed, plaintext);
|
|
69834
69848
|
if (parsed.attachment) {
|
|
69835
69849
|
attachmentInfo = parsed.attachment;
|
|
69836
69850
|
}
|
|
@@ -70588,14 +70602,14 @@ ${baseText}`;
|
|
|
70588
70602
|
try {
|
|
70589
70603
|
const parsed = JSON.parse(rawPlaintext);
|
|
70590
70604
|
messageType = parsed.type || "message";
|
|
70591
|
-
messageText = parsed
|
|
70605
|
+
messageText = envelopeText(parsed, rawPlaintext);
|
|
70592
70606
|
if (parsed.attachment) roomAttachment = parsed.attachment;
|
|
70593
70607
|
} catch {
|
|
70594
70608
|
messageType = "message";
|
|
70595
70609
|
messageText = rawPlaintext;
|
|
70596
70610
|
}
|
|
70597
70611
|
if (CREDENTIAL_MESSAGE_TYPES.has(messageType)) {
|
|
70598
|
-
this._handleCredentialMessage(resolvedRoomId, messageType,
|
|
70612
|
+
this._handleCredentialMessage(resolvedRoomId, messageType, rawPlaintext, data.message_id);
|
|
70599
70613
|
if (data.created_at && this._persisted) {
|
|
70600
70614
|
this._persisted.lastMessageTimestamp = data.created_at;
|
|
70601
70615
|
}
|
|
@@ -70604,7 +70618,7 @@ ${baseText}`;
|
|
|
70604
70618
|
}
|
|
70605
70619
|
if (CATCHUP_MESSAGE_TYPES.has(messageType)) {
|
|
70606
70620
|
if (messageType === "history_catchup_request") {
|
|
70607
|
-
await this._handleHistoryCatchupRequest(resolvedRoomId,
|
|
70621
|
+
await this._handleHistoryCatchupRequest(resolvedRoomId, rawPlaintext, data.message_id);
|
|
70608
70622
|
}
|
|
70609
70623
|
return;
|
|
70610
70624
|
}
|
|
@@ -72588,7 +72602,7 @@ ${baseText}`;
|
|
|
72588
72602
|
try {
|
|
72589
72603
|
const parsed = JSON.parse(plaintext);
|
|
72590
72604
|
messageType = parsed.type || "message";
|
|
72591
|
-
messageText = parsed
|
|
72605
|
+
messageText = envelopeText(parsed, plaintext);
|
|
72592
72606
|
} catch {
|
|
72593
72607
|
messageType = "message";
|
|
72594
72608
|
messageText = plaintext;
|
|
@@ -73187,7 +73201,7 @@ ${baseText}`;
|
|
|
73187
73201
|
try {
|
|
73188
73202
|
const parsed = JSON.parse(plaintext);
|
|
73189
73203
|
messageType = parsed.type || "message";
|
|
73190
|
-
messageText = parsed
|
|
73204
|
+
messageText = envelopeText(parsed, plaintext);
|
|
73191
73205
|
} catch {
|
|
73192
73206
|
messageType = "message";
|
|
73193
73207
|
messageText = plaintext;
|
|
@@ -73472,7 +73486,7 @@ ${baseText}`;
|
|
|
73472
73486
|
try {
|
|
73473
73487
|
const parsed = JSON.parse(plaintext);
|
|
73474
73488
|
messageType = parsed.type || "message";
|
|
73475
|
-
messageText = parsed
|
|
73489
|
+
messageText = envelopeText(parsed, plaintext);
|
|
73476
73490
|
} catch {
|
|
73477
73491
|
messageType = "message";
|
|
73478
73492
|
messageText = plaintext;
|
|
@@ -74101,7 +74115,7 @@ var init_harness_compat = __esm2({
|
|
|
74101
74115
|
"use strict";
|
|
74102
74116
|
}
|
|
74103
74117
|
});
|
|
74104
|
-
var
|
|
74118
|
+
var managedRoutesRequested;
|
|
74105
74119
|
var init_openclaw_entry = __esm2({
|
|
74106
74120
|
"src/openclaw-entry.ts"() {
|
|
74107
74121
|
"use strict";
|
|
@@ -74114,7 +74128,7 @@ var init_openclaw_entry = __esm2({
|
|
|
74114
74128
|
init_tool_audit();
|
|
74115
74129
|
init_harness_compat();
|
|
74116
74130
|
init_types();
|
|
74117
|
-
|
|
74131
|
+
managedRoutesRequested = false;
|
|
74118
74132
|
}
|
|
74119
74133
|
});
|
|
74120
74134
|
var util;
|
|
@@ -100165,7 +100179,7 @@ var init_index = __esm2({
|
|
|
100165
100179
|
await init_skill_telemetry();
|
|
100166
100180
|
await init_policy_enforcer();
|
|
100167
100181
|
init_room_protocol();
|
|
100168
|
-
VERSION = true ? "0.23.
|
|
100182
|
+
VERSION = true ? "0.23.44" : "0.0.0-dev";
|
|
100169
100183
|
}
|
|
100170
100184
|
});
|
|
100171
100185
|
await init_index();
|
|
@@ -136581,7 +136595,7 @@ async function main() {
|
|
|
136581
136595
|
"[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"
|
|
136582
136596
|
);
|
|
136583
136597
|
}
|
|
136584
|
-
logLine(`[bridge] version: ${true ? "0.8.
|
|
136598
|
+
logLine(`[bridge] version: ${true ? "0.8.16" : "dev"}`);
|
|
136585
136599
|
logLine(`[bridge] data dir: ${cfg.dataDir} (${cfg.dataDirSource})`);
|
|
136586
136600
|
logLine(`[bridge] workspace: ${cfg.workspaceDir} \xB7 permissions: ${cfg.permissionMode} \xB7 enclave dir fenced`);
|
|
136587
136601
|
if (cfg.armRoom) {
|
|
@@ -136613,7 +136627,7 @@ async function main() {
|
|
|
136613
136627
|
// its default would render "@agentvault/agentvault@0.7.x" — the wrong
|
|
136614
136628
|
// package name attached to the bridge's version number, which is worse
|
|
136615
136629
|
// than either alone.
|
|
136616
|
-
clientVersion: `@agentvault/claude-bridge@${true ? "0.8.
|
|
136630
|
+
clientVersion: `@agentvault/claude-bridge@${true ? "0.8.16" : "dev"}`
|
|
136617
136631
|
});
|
|
136618
136632
|
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.`;
|
|
136619
136633
|
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.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",
|