@agentvault/claude-bridge 0.6.0 → 0.6.1
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 +40 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -65555,7 +65555,7 @@ var init_channel = __esm2({
|
|
|
65555
65555
|
*/
|
|
65556
65556
|
sendActivitySpan(spanData) {
|
|
65557
65557
|
if (!this._ws || this._ws.readyState !== WebSocket2.OPEN) return;
|
|
65558
|
-
const pluginVersion = true ? "0.23.
|
|
65558
|
+
const pluginVersion = true ? "0.23.8" : "0.0.0-dev";
|
|
65559
65559
|
const agentName = this.config.agentName ?? "Agent";
|
|
65560
65560
|
const resource = {
|
|
65561
65561
|
"service.name": "agentvault-agent",
|
|
@@ -67172,7 +67172,7 @@ var init_channel = __esm2({
|
|
|
67172
67172
|
agentVersion: this.config.agentVersion ?? "0.0.0",
|
|
67173
67173
|
// __AV_VERSION__ is injected by esbuild from package.json at build time.
|
|
67174
67174
|
// Falls back to "0.0.0-dev" in non-bundled contexts (tests).
|
|
67175
|
-
pluginVersion: true ? "0.23.
|
|
67175
|
+
pluginVersion: true ? "0.23.8" : "0.0.0-dev"
|
|
67176
67176
|
});
|
|
67177
67177
|
this._telemetryReporter.startAutoFlush(3e4);
|
|
67178
67178
|
}
|
|
@@ -67251,6 +67251,10 @@ var init_channel = __esm2({
|
|
|
67251
67251
|
await this._handleDeviceRevoked();
|
|
67252
67252
|
return;
|
|
67253
67253
|
}
|
|
67254
|
+
if (data.event === "connection_rejected") {
|
|
67255
|
+
await this._handleConnectionRejected(data);
|
|
67256
|
+
return;
|
|
67257
|
+
}
|
|
67254
67258
|
if (data.event === "device_linked") {
|
|
67255
67259
|
await this._handleDeviceLinked(data.data);
|
|
67256
67260
|
return;
|
|
@@ -67486,7 +67490,7 @@ var init_channel = __esm2({
|
|
|
67486
67490
|
agentVersion: this.config.agentVersion ?? "0.0.0",
|
|
67487
67491
|
// __AV_VERSION__ is injected by esbuild from package.json at build time.
|
|
67488
67492
|
// Falls back to "0.0.0-dev" in non-bundled contexts (tests).
|
|
67489
|
-
pluginVersion: true ? "0.23.
|
|
67493
|
+
pluginVersion: true ? "0.23.8" : "0.0.0-dev"
|
|
67490
67494
|
});
|
|
67491
67495
|
this._telemetryReporter.startAutoFlush(3e4);
|
|
67492
67496
|
}
|
|
@@ -70678,6 +70682,37 @@ ${messageText}`;
|
|
|
70678
70682
|
* re-enrollment, which SHOULD wipe creds, goes through setup --force /
|
|
70679
70683
|
* _forceReEnroll in start().
|
|
70680
70684
|
*/
|
|
70685
|
+
/**
|
|
70686
|
+
* Handle a WS `connection_rejected` event.
|
|
70687
|
+
*
|
|
70688
|
+
* The server accepts the WS upgrade, then — for a device it will not serve —
|
|
70689
|
+
* emits `{event:"connection_rejected", reason, retryable}` and closes with
|
|
70690
|
+
* code 4403. `retryable:false` (e.g. `device_revoked`) is a TERMINAL
|
|
70691
|
+
* credential failure: retrying can only reconnect, get rejected, and close
|
|
70692
|
+
* again. Left unhandled, that generic close drove the reconnect classifier
|
|
70693
|
+
* into "reconnect loop detected", which the bridge treats as a restartable
|
|
70694
|
+
* exit — so launchd/systemd relaunched us every ~30s to hammer the backend
|
|
70695
|
+
* with the same rejected handshake (empirically ~1150 rejects / 2h).
|
|
70696
|
+
*
|
|
70697
|
+
* So we route a non-retryable rejection to the SAME `auth_failed` surface the
|
|
70698
|
+
* proactive/reactive reissue paths use (see channel.ts emit sites). The
|
|
70699
|
+
* bridge wires `auth_failed` to a clean exit(0) (packages/claude-room-bridge
|
|
70700
|
+
* /src/bridge.ts), so launchd stops relaunching. Mirrors those emitters:
|
|
70701
|
+
* emit only + mark the session; the consumer decides how to stop. A
|
|
70702
|
+
* `retryable` rejection is transient — fall through to a normal reconnect.
|
|
70703
|
+
*/
|
|
70704
|
+
async _handleConnectionRejected(data) {
|
|
70705
|
+
if (data?.retryable === true) {
|
|
70706
|
+
this._scheduleReconnect();
|
|
70707
|
+
return;
|
|
70708
|
+
}
|
|
70709
|
+
this._authFailedThisSession = true;
|
|
70710
|
+
const authReason = data?.reason === "device_jwt_expired" ? "device_jwt_expired" : "device_revoked";
|
|
70711
|
+
console.warn(
|
|
70712
|
+
`[SecureChannel] connection_rejected (reason=${data?.reason ?? "unknown"}, retryable=false) \u2014 terminal; surfacing auth_failed`
|
|
70713
|
+
);
|
|
70714
|
+
this.emit("auth_failed", { reason: authReason });
|
|
70715
|
+
}
|
|
70681
70716
|
async _handleDeviceRevoked() {
|
|
70682
70717
|
const now = Date.now();
|
|
70683
70718
|
this._revokeRecoveries = this._revokeRecoveries.filter(
|
|
@@ -97233,7 +97268,7 @@ var init_index = __esm2({
|
|
|
97233
97268
|
init_skill_invoker();
|
|
97234
97269
|
await init_skill_telemetry();
|
|
97235
97270
|
await init_policy_enforcer();
|
|
97236
|
-
VERSION = true ? "0.23.
|
|
97271
|
+
VERSION = true ? "0.23.8" : "0.0.0-dev";
|
|
97237
97272
|
}
|
|
97238
97273
|
});
|
|
97239
97274
|
await init_index();
|
|
@@ -133246,7 +133281,7 @@ async function main() {
|
|
|
133246
133281
|
"[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"
|
|
133247
133282
|
);
|
|
133248
133283
|
}
|
|
133249
|
-
console.error(`[bridge] version: ${true ? "0.6.
|
|
133284
|
+
console.error(`[bridge] version: ${true ? "0.6.1" : "dev"}`);
|
|
133250
133285
|
console.error(`[bridge] data dir: ${cfg.dataDir} (${cfg.dataDirSource})`);
|
|
133251
133286
|
console.error(`[bridge] workspace: ${cfg.workspaceDir} \xB7 permissions: ${cfg.permissionMode} \xB7 enclave dir fenced`);
|
|
133252
133287
|
if (cfg.armRoom) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentvault/claude-bridge",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.1",
|
|
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",
|