@agentvault/agentvault 0.23.7 → 0.23.8
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/channel.d.ts +20 -0
- package/dist/channel.d.ts.map +1 -1
- package/dist/cli.js +46 -5
- package/dist/cli.js.map +2 -2
- package/dist/index.js +46 -5
- package/dist/index.js.map +2 -2
- package/openclaw.plugin.json +1 -17
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -64792,7 +64792,7 @@ var init_channel = __esm({
|
|
|
64792
64792
|
*/
|
|
64793
64793
|
sendActivitySpan(spanData) {
|
|
64794
64794
|
if (!this._ws || this._ws.readyState !== WebSocket.OPEN) return;
|
|
64795
|
-
const pluginVersion = true ? "0.23.
|
|
64795
|
+
const pluginVersion = true ? "0.23.8" : "0.0.0-dev";
|
|
64796
64796
|
const agentName = this.config.agentName ?? "Agent";
|
|
64797
64797
|
const resource = {
|
|
64798
64798
|
"service.name": "agentvault-agent",
|
|
@@ -66409,7 +66409,7 @@ var init_channel = __esm({
|
|
|
66409
66409
|
agentVersion: this.config.agentVersion ?? "0.0.0",
|
|
66410
66410
|
// __AV_VERSION__ is injected by esbuild from package.json at build time.
|
|
66411
66411
|
// Falls back to "0.0.0-dev" in non-bundled contexts (tests).
|
|
66412
|
-
pluginVersion: true ? "0.23.
|
|
66412
|
+
pluginVersion: true ? "0.23.8" : "0.0.0-dev"
|
|
66413
66413
|
});
|
|
66414
66414
|
this._telemetryReporter.startAutoFlush(3e4);
|
|
66415
66415
|
}
|
|
@@ -66488,6 +66488,10 @@ var init_channel = __esm({
|
|
|
66488
66488
|
await this._handleDeviceRevoked();
|
|
66489
66489
|
return;
|
|
66490
66490
|
}
|
|
66491
|
+
if (data.event === "connection_rejected") {
|
|
66492
|
+
await this._handleConnectionRejected(data);
|
|
66493
|
+
return;
|
|
66494
|
+
}
|
|
66491
66495
|
if (data.event === "device_linked") {
|
|
66492
66496
|
await this._handleDeviceLinked(data.data);
|
|
66493
66497
|
return;
|
|
@@ -66661,6 +66665,7 @@ var init_channel = __esm({
|
|
|
66661
66665
|
if (data.event === "arming_snapshot") {
|
|
66662
66666
|
this.emit("arming_snapshot", {
|
|
66663
66667
|
workAllowed: data.data?.work_allowed === true,
|
|
66668
|
+
gatesRemoved: data.data?.gates_removed === true,
|
|
66664
66669
|
roomIds: data.data?.room_ids ?? []
|
|
66665
66670
|
});
|
|
66666
66671
|
}
|
|
@@ -66722,7 +66727,7 @@ var init_channel = __esm({
|
|
|
66722
66727
|
agentVersion: this.config.agentVersion ?? "0.0.0",
|
|
66723
66728
|
// __AV_VERSION__ is injected by esbuild from package.json at build time.
|
|
66724
66729
|
// Falls back to "0.0.0-dev" in non-bundled contexts (tests).
|
|
66725
|
-
pluginVersion: true ? "0.23.
|
|
66730
|
+
pluginVersion: true ? "0.23.8" : "0.0.0-dev"
|
|
66726
66731
|
});
|
|
66727
66732
|
this._telemetryReporter.startAutoFlush(3e4);
|
|
66728
66733
|
}
|
|
@@ -68032,7 +68037,12 @@ ${messageText}`;
|
|
|
68032
68037
|
senderName: senderLabel,
|
|
68033
68038
|
plaintext: messageText,
|
|
68034
68039
|
messageType,
|
|
68035
|
-
timestamp: data.created_at ?? (/* @__PURE__ */ new Date()).toISOString()
|
|
68040
|
+
timestamp: data.created_at ?? (/* @__PURE__ */ new Date()).toISOString(),
|
|
68041
|
+
// Native bridge (claude-room-bridge) consumes this to decide reply
|
|
68042
|
+
// expectation: a human/owner speaking in a room always expects a reply,
|
|
68043
|
+
// an agent does not. Derived from the room roster (line ~5394) — the same
|
|
68044
|
+
// signal the OpenClaw mention-filter uses for loop prevention.
|
|
68045
|
+
senderIsAgent
|
|
68036
68046
|
});
|
|
68037
68047
|
const contextualMessage = senderIsAgent ? messageText : `[${senderLabel}]: ${messageText}`;
|
|
68038
68048
|
Promise.resolve(this.config.onMessage?.(contextualMessage, metadata)).catch((err) => {
|
|
@@ -69909,6 +69919,37 @@ ${messageText}`;
|
|
|
69909
69919
|
* re-enrollment, which SHOULD wipe creds, goes through setup --force /
|
|
69910
69920
|
* _forceReEnroll in start().
|
|
69911
69921
|
*/
|
|
69922
|
+
/**
|
|
69923
|
+
* Handle a WS `connection_rejected` event.
|
|
69924
|
+
*
|
|
69925
|
+
* The server accepts the WS upgrade, then — for a device it will not serve —
|
|
69926
|
+
* emits `{event:"connection_rejected", reason, retryable}` and closes with
|
|
69927
|
+
* code 4403. `retryable:false` (e.g. `device_revoked`) is a TERMINAL
|
|
69928
|
+
* credential failure: retrying can only reconnect, get rejected, and close
|
|
69929
|
+
* again. Left unhandled, that generic close drove the reconnect classifier
|
|
69930
|
+
* into "reconnect loop detected", which the bridge treats as a restartable
|
|
69931
|
+
* exit — so launchd/systemd relaunched us every ~30s to hammer the backend
|
|
69932
|
+
* with the same rejected handshake (empirically ~1150 rejects / 2h).
|
|
69933
|
+
*
|
|
69934
|
+
* So we route a non-retryable rejection to the SAME `auth_failed` surface the
|
|
69935
|
+
* proactive/reactive reissue paths use (see channel.ts emit sites). The
|
|
69936
|
+
* bridge wires `auth_failed` to a clean exit(0) (packages/claude-room-bridge
|
|
69937
|
+
* /src/bridge.ts), so launchd stops relaunching. Mirrors those emitters:
|
|
69938
|
+
* emit only + mark the session; the consumer decides how to stop. A
|
|
69939
|
+
* `retryable` rejection is transient — fall through to a normal reconnect.
|
|
69940
|
+
*/
|
|
69941
|
+
async _handleConnectionRejected(data) {
|
|
69942
|
+
if (data?.retryable === true) {
|
|
69943
|
+
this._scheduleReconnect();
|
|
69944
|
+
return;
|
|
69945
|
+
}
|
|
69946
|
+
this._authFailedThisSession = true;
|
|
69947
|
+
const authReason = data?.reason === "device_jwt_expired" ? "device_jwt_expired" : "device_revoked";
|
|
69948
|
+
console.warn(
|
|
69949
|
+
`[SecureChannel] connection_rejected (reason=${data?.reason ?? "unknown"}, retryable=false) \u2014 terminal; surfacing auth_failed`
|
|
69950
|
+
);
|
|
69951
|
+
this.emit("auth_failed", { reason: authReason });
|
|
69952
|
+
}
|
|
69912
69953
|
async _handleDeviceRevoked() {
|
|
69913
69954
|
const now = Date.now();
|
|
69914
69955
|
this._revokeRecoveries = this._revokeRecoveries.filter(
|
|
@@ -96900,7 +96941,7 @@ var init_index = __esm({
|
|
|
96900
96941
|
init_skill_invoker();
|
|
96901
96942
|
await init_skill_telemetry();
|
|
96902
96943
|
await init_policy_enforcer();
|
|
96903
|
-
VERSION = true ? "0.23.
|
|
96944
|
+
VERSION = true ? "0.23.8" : "0.0.0-dev";
|
|
96904
96945
|
}
|
|
96905
96946
|
});
|
|
96906
96947
|
await init_index();
|