@agentvault/claude-bridge 0.8.24 → 0.8.25
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/bridge.d.ts +7 -1
- package/dist/index.js +491 -92
- package/dist/service/self-uninstall.d.ts +30 -2
- package/dist/service/self-uninstall.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/bridge.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { type ToolSpanSink } from "@agentvault/agentvault";
|
|
1
2
|
import { ArmingState } from "./arming.js";
|
|
3
|
+
import { type TerminalVerdict } from "./service/self-uninstall.js";
|
|
2
4
|
export interface RoomMessage {
|
|
3
5
|
roomId: string;
|
|
4
6
|
senderName: string;
|
|
@@ -122,6 +124,9 @@ export type BridgeTarget = {
|
|
|
122
124
|
export interface ReplyChannel {
|
|
123
125
|
sendToRoom(roomId: string, text: string): Promise<void>;
|
|
124
126
|
send(text: string): Promise<void>;
|
|
127
|
+
/** SecureChannel's TelemetryReporter (device JWT, buffered). Optional so
|
|
128
|
+
* fixtures and a channel without telemetry keep working. */
|
|
129
|
+
readonly telemetry?: ToolSpanSink | null;
|
|
125
130
|
/** #1418 — SecureChannel: run `fn` as `conversationId`'s turn, so an
|
|
126
131
|
* untargeted send inside it reaches that conversation's person only. */
|
|
127
132
|
runForConversation?<T>(conversationId: string | undefined, fn: () => Promise<T>, opts?: {
|
|
@@ -156,6 +161,7 @@ export declare class ActiveTarget {
|
|
|
156
161
|
export interface LifecycleChannel {
|
|
157
162
|
on(ev: "auth_failed", cb: (e: {
|
|
158
163
|
reason: string;
|
|
164
|
+
deviceGone?: boolean;
|
|
159
165
|
}) => void): unknown;
|
|
160
166
|
on(ev: "session_replaced", cb: (e: {
|
|
161
167
|
code?: number;
|
|
@@ -188,7 +194,7 @@ export declare function attachLifecycle(channel: LifecycleChannel, opts?: {
|
|
|
188
194
|
* well would put the same rule in two files, and the two would eventually
|
|
189
195
|
* disagree — which is how `session_replaced` (device still alive) would end
|
|
190
196
|
* up removing a healthy install. */
|
|
191
|
-
selfUninstall?: (
|
|
197
|
+
selfUninstall?: (verdict: TerminalVerdict, env: NodeJS.ProcessEnv) => boolean;
|
|
192
198
|
}): void;
|
|
193
199
|
/**
|
|
194
200
|
* Slice 2 Plan C (Task 11) — one drain of the local-approval marker dir.
|
package/dist/index.js
CHANGED
|
@@ -38,12 +38,14 @@ import { homedir } from "node:os";
|
|
|
38
38
|
import { dirname, join as join4, resolve } from "node:path";
|
|
39
39
|
import { Writable } from "node:stream";
|
|
40
40
|
import { createInterface } from "node:readline";
|
|
41
|
+
import { AsyncLocalStorage } from "node:async_hooks";
|
|
42
|
+
import { randomBytes as randomBytes3 } from "node:crypto";
|
|
41
43
|
import { Readable } from "node:stream";
|
|
42
44
|
import { readdir as readdir2, readFile as readFile4, writeFile as writeFile2, rename as rename4, stat, unlink, mkdir as mkdir3 } from "node:fs/promises";
|
|
43
45
|
import { join as join5 } from "node:path";
|
|
44
46
|
import { randomUUID as randomUUID3 } from "node:crypto";
|
|
45
47
|
import { EventEmitter } from "node:events";
|
|
46
|
-
import { AsyncLocalStorage } from "node:async_hooks";
|
|
48
|
+
import { AsyncLocalStorage as AsyncLocalStorage2 } from "node:async_hooks";
|
|
47
49
|
import { createServer } from "node:http";
|
|
48
50
|
import { randomUUID as randomUUID4, createHash } from "node:crypto";
|
|
49
51
|
import { readFileSync } from "node:fs";
|
|
@@ -53,7 +55,7 @@ import { join as join6 } from "node:path";
|
|
|
53
55
|
import { readFile as readFile5 } from "node:fs/promises";
|
|
54
56
|
import WebSocket2 from "ws";
|
|
55
57
|
import { resolve as resolve2 } from "node:path";
|
|
56
|
-
import { AsyncLocalStorage as
|
|
58
|
+
import { AsyncLocalStorage as AsyncLocalStorage3 } from "node:async_hooks";
|
|
57
59
|
import { Http2ServerRequest as Http2ServerRequest2 } from "http2";
|
|
58
60
|
import { Http2ServerRequest } from "http2";
|
|
59
61
|
import { Readable as Readable2 } from "stream";
|
|
@@ -9219,7 +9221,7 @@ function eddsa(Point, cHash, eddsaOpts = {}) {
|
|
|
9219
9221
|
});
|
|
9220
9222
|
const { prehash } = eddsaOpts;
|
|
9221
9223
|
const { BASE, Fp: Fp3, Fn: Fn3 } = Point;
|
|
9222
|
-
const
|
|
9224
|
+
const randomBytes4 = eddsaOpts.randomBytes || randomBytes2;
|
|
9223
9225
|
const adjustScalarBytes3 = eddsaOpts.adjustScalarBytes || ((bytes) => bytes);
|
|
9224
9226
|
const domain2 = eddsaOpts.domain || ((data, ctx, phflag) => {
|
|
9225
9227
|
_abool2(phflag, "phflag");
|
|
@@ -9301,7 +9303,7 @@ function eddsa(Point, cHash, eddsaOpts = {}) {
|
|
|
9301
9303
|
signature: 2 * _size2,
|
|
9302
9304
|
seed: _size2
|
|
9303
9305
|
};
|
|
9304
|
-
function randomSecretKey(seed =
|
|
9306
|
+
function randomSecretKey(seed = randomBytes4(lengths.seed)) {
|
|
9305
9307
|
return _abytes2(seed, lengths.seed, "seed");
|
|
9306
9308
|
}
|
|
9307
9309
|
function keygen(seed) {
|
|
@@ -10680,7 +10682,7 @@ function ecdsa(Point, hash2, ecdsaOpts = {}) {
|
|
|
10680
10682
|
bits2int: "function",
|
|
10681
10683
|
bits2int_modN: "function"
|
|
10682
10684
|
});
|
|
10683
|
-
const
|
|
10685
|
+
const randomBytes4 = ecdsaOpts.randomBytes || randomBytes2;
|
|
10684
10686
|
const hmac4 = ecdsaOpts.hmac || ((key, ...msgs) => hmac2(hash2, key, concatBytes2(...msgs)));
|
|
10685
10687
|
const { Fp: Fp3, Fn: Fn3 } = Point;
|
|
10686
10688
|
const { ORDER: CURVE_ORDER, BITS: fnBits } = Fn3;
|
|
@@ -10835,7 +10837,7 @@ function ecdsa(Point, hash2, ecdsaOpts = {}) {
|
|
|
10835
10837
|
const d22 = _normFnElement(Fn3, privateKey);
|
|
10836
10838
|
const seedArgs = [int2octets(d22), int2octets(h1int)];
|
|
10837
10839
|
if (extraEntropy != null && extraEntropy !== false) {
|
|
10838
|
-
const e7 = extraEntropy === true ?
|
|
10840
|
+
const e7 = extraEntropy === true ? randomBytes4(lengths.secretKey) : extraEntropy;
|
|
10839
10841
|
seedArgs.push(ensureBytes("extraEntropy", e7));
|
|
10840
10842
|
}
|
|
10841
10843
|
const seed = concatBytes2(...seedArgs);
|
|
@@ -11713,11 +11715,11 @@ async function joinWithFirstMatchingKp(welcomeBytes, candidates) {
|
|
|
11713
11715
|
return null;
|
|
11714
11716
|
}
|
|
11715
11717
|
function ownIdentity() {
|
|
11716
|
-
const v22 = true ? "0.23.
|
|
11718
|
+
const v22 = true ? "0.23.54" : FALLBACK;
|
|
11717
11719
|
return `${PACKAGE}@${v22}`;
|
|
11718
11720
|
}
|
|
11719
11721
|
function buildSha() {
|
|
11720
|
-
const raw = true ? "
|
|
11722
|
+
const raw = true ? "429977f" : "";
|
|
11721
11723
|
const cleaned = (raw ?? "").trim();
|
|
11722
11724
|
return !cleaned || cleaned === "unknown" ? null : cleaned;
|
|
11723
11725
|
}
|
|
@@ -11869,13 +11871,18 @@ async function enrollDevice(apiUrl, inviteToken, identityPkHex, ephemeralPkHex,
|
|
|
11869
11871
|
return res.json();
|
|
11870
11872
|
}
|
|
11871
11873
|
async function pollDeviceStatus(apiUrl, deviceId) {
|
|
11872
|
-
const res = await fetch(`${apiUrl}/api/v1/devices/${deviceId}/status
|
|
11874
|
+
const res = await fetch(`${apiUrl}/api/v1/devices/${deviceId}/status`, {
|
|
11875
|
+
signal: AbortSignal.timeout(1e4)
|
|
11876
|
+
});
|
|
11873
11877
|
if (res.status === 429) {
|
|
11874
11878
|
return { device_id: deviceId, status: "PENDING", fingerprint: "", rateLimited: true };
|
|
11875
11879
|
}
|
|
11876
11880
|
if (!res.ok) {
|
|
11877
11881
|
const detail = await res.text();
|
|
11878
|
-
|
|
11882
|
+
const err = new Error(`Status poll failed (${res.status}): ${detail}`);
|
|
11883
|
+
err.httpStatus = res.status;
|
|
11884
|
+
err.body = detail;
|
|
11885
|
+
throw err;
|
|
11879
11886
|
}
|
|
11880
11887
|
return res.json();
|
|
11881
11888
|
}
|
|
@@ -11925,9 +11932,10 @@ function a2aChannelSignature(channels) {
|
|
|
11925
11932
|
})).sort((a2, b22) => (a2.id ?? "").localeCompare(b22.id ?? ""))
|
|
11926
11933
|
);
|
|
11927
11934
|
}
|
|
11928
|
-
function mlsMembershipFromStatus(status) {
|
|
11935
|
+
function mlsMembershipFromStatus(status, detail) {
|
|
11929
11936
|
if (status === 200) return true;
|
|
11930
|
-
if (status ===
|
|
11937
|
+
if (status === 404) return false;
|
|
11938
|
+
if (status === 403 && detail === NOT_A_MEMBER_DETAIL) return false;
|
|
11931
11939
|
return null;
|
|
11932
11940
|
}
|
|
11933
11941
|
function sanitizeError(error210) {
|
|
@@ -12495,6 +12503,91 @@ function _resetCompatCacheForTest() {
|
|
|
12495
12503
|
_agentEventFn = null;
|
|
12496
12504
|
_transcriptFn = null;
|
|
12497
12505
|
}
|
|
12506
|
+
function safeErrorKind(value) {
|
|
12507
|
+
if (typeof value !== "string") return UNCLASSIFIED_ERROR;
|
|
12508
|
+
if (KNOWN_CODES.has(value)) return value;
|
|
12509
|
+
if (!CLASS_NAME_RE.test(value)) return UNCLASSIFIED_ERROR;
|
|
12510
|
+
if ((value.match(/[0-9]/g) ?? []).length > 3) return UNCLASSIFIED_ERROR;
|
|
12511
|
+
return value;
|
|
12512
|
+
}
|
|
12513
|
+
function codeForText(text) {
|
|
12514
|
+
const t22 = text.replace(/^[A-Za-z]*Error: /, "");
|
|
12515
|
+
for (const [re22, code] of ERROR_TEXT_CODES) if (re22.test(t22)) return code;
|
|
12516
|
+
return void 0;
|
|
12517
|
+
}
|
|
12518
|
+
function classifyToolError(err) {
|
|
12519
|
+
try {
|
|
12520
|
+
if (err instanceof Error) {
|
|
12521
|
+
return codeForText(err.message) ?? safeErrorKind(err.constructor?.name);
|
|
12522
|
+
}
|
|
12523
|
+
if (typeof err === "string") return codeForText(err) ?? UNCLASSIFIED_ERROR;
|
|
12524
|
+
} catch {
|
|
12525
|
+
}
|
|
12526
|
+
return UNCLASSIFIED_ERROR;
|
|
12527
|
+
}
|
|
12528
|
+
function classifyDeliveryReceipt(receipt) {
|
|
12529
|
+
if (!receipt) return "no_receipt";
|
|
12530
|
+
if (receipt.ambiguous) return "ambiguous_target";
|
|
12531
|
+
if (typeof receipt.error === "string") return codeForText(receipt.error) ?? "delivery_failed";
|
|
12532
|
+
return "delivery_failed";
|
|
12533
|
+
}
|
|
12534
|
+
function currentToolConversation() {
|
|
12535
|
+
const store = _conversation.getStore();
|
|
12536
|
+
if (!store || store.ended) return { kind: "unknown" };
|
|
12537
|
+
return store.conversation;
|
|
12538
|
+
}
|
|
12539
|
+
function conversationForTarget(target, opts = {}) {
|
|
12540
|
+
if (typeof opts.conversationId === "string" && opts.conversationId) {
|
|
12541
|
+
return { kind: "direct", id: opts.conversationId };
|
|
12542
|
+
}
|
|
12543
|
+
const turn = currentToolConversation();
|
|
12544
|
+
if (!target || target.kind === "context") return turn;
|
|
12545
|
+
switch (target.kind) {
|
|
12546
|
+
case "room":
|
|
12547
|
+
return target.roomId ? { kind: "room", id: target.roomId } : { kind: "unknown" };
|
|
12548
|
+
case "owner":
|
|
12549
|
+
return turn.kind === "direct" ? turn : { kind: "unknown" };
|
|
12550
|
+
default:
|
|
12551
|
+
return { kind: "unknown" };
|
|
12552
|
+
}
|
|
12553
|
+
}
|
|
12554
|
+
function buildToolInvokeSpan(report) {
|
|
12555
|
+
const isError = report.outcome === "error";
|
|
12556
|
+
const outcome = isError ? "error" : report.outcome === "cancelled" ? "cancelled" : "success";
|
|
12557
|
+
const durationMs = Math.max(0, Math.round(Number(report.durationMs) || 0));
|
|
12558
|
+
const endTime = report.endTime ?? Date.now();
|
|
12559
|
+
const conv = report.conversation ?? currentToolConversation();
|
|
12560
|
+
const kind = conv.kind === "room" || conv.kind === "direct" ? conv.kind : "unknown";
|
|
12561
|
+
const attributes = {
|
|
12562
|
+
"tool.name": TOOL_NAME_RE.test(report.toolName) ? report.toolName : "unknown",
|
|
12563
|
+
"tool.outcome": outcome,
|
|
12564
|
+
"av.conversation_kind": kind,
|
|
12565
|
+
"tool.duration_ms": durationMs
|
|
12566
|
+
};
|
|
12567
|
+
if (isError) attributes["tool.error_kind"] = safeErrorKind(report.errorKind);
|
|
12568
|
+
if (kind !== "unknown" && typeof conv.id === "string" && conv.id) {
|
|
12569
|
+
attributes["av.conversation_id"] = conv.id.slice(0, 64);
|
|
12570
|
+
}
|
|
12571
|
+
return {
|
|
12572
|
+
traceId: randomBytes3(16).toString("hex"),
|
|
12573
|
+
spanId: randomBytes3(8).toString("hex"),
|
|
12574
|
+
name: TOOL_INVOKE_SPAN_NAME,
|
|
12575
|
+
kind: "internal",
|
|
12576
|
+
startTime: endTime - durationMs,
|
|
12577
|
+
endTime,
|
|
12578
|
+
attributes,
|
|
12579
|
+
// OTLP codes: 1 = ok, 2 = error (the backend stores "ok" / "error").
|
|
12580
|
+
// A cancellation is not a problem: OK status, outcome "cancelled".
|
|
12581
|
+
status: { code: isError ? 2 : 1 }
|
|
12582
|
+
};
|
|
12583
|
+
}
|
|
12584
|
+
function reportToolInvoke(sink, report) {
|
|
12585
|
+
try {
|
|
12586
|
+
if (!sink || typeof sink.reportCustomSpan !== "function") return;
|
|
12587
|
+
sink.reportCustomSpan(buildToolInvokeSpan(report));
|
|
12588
|
+
} catch {
|
|
12589
|
+
}
|
|
12590
|
+
}
|
|
12498
12591
|
function ownerRoutingFrom(parsed) {
|
|
12499
12592
|
const out = {};
|
|
12500
12593
|
if (parsed.conversation_id !== void 0) {
|
|
@@ -12519,6 +12612,34 @@ function statusOf(receipt) {
|
|
|
12519
12612
|
return receipt.ok ? 200 : 500;
|
|
12520
12613
|
}
|
|
12521
12614
|
async function handleSendRequest(parsed, channel) {
|
|
12615
|
+
const startedAt = Date.now();
|
|
12616
|
+
const result = await _handleSendRequest(parsed, channel);
|
|
12617
|
+
try {
|
|
12618
|
+
const body = result.body;
|
|
12619
|
+
const failed = body?.ok !== true;
|
|
12620
|
+
reportToolInvoke(channel.telemetry, {
|
|
12621
|
+
toolName: "agentvault_send",
|
|
12622
|
+
outcome: failed ? "error" : "success",
|
|
12623
|
+
errorKind: !failed ? void 0 : result.status === 400 ? "invalid_request" : result.status === 409 ? "ambiguous_target" : classifyDeliveryReceipt(body),
|
|
12624
|
+
durationMs: Date.now() - startedAt,
|
|
12625
|
+
conversation: sendConversation(parsed)
|
|
12626
|
+
});
|
|
12627
|
+
} catch {
|
|
12628
|
+
}
|
|
12629
|
+
return result;
|
|
12630
|
+
}
|
|
12631
|
+
function sendConversation(parsed) {
|
|
12632
|
+
const str = (v22) => typeof v22 === "string" && v22 ? v22 : void 0;
|
|
12633
|
+
if (str(parsed.hub_address) ?? str(parsed.a2a_address) ?? str(parsed.a2aAddress) ?? str(parsed.channel_id)) {
|
|
12634
|
+
return { kind: "unknown" };
|
|
12635
|
+
}
|
|
12636
|
+
const roomId = str(parsed.room_id);
|
|
12637
|
+
if (roomId) return conversationForTarget({ kind: "room", roomId });
|
|
12638
|
+
if (parsed.target === "context") return conversationForTarget({ kind: "context" });
|
|
12639
|
+
if (parsed.audience === "everyone") return { kind: "unknown" };
|
|
12640
|
+
return conversationForTarget({ kind: "owner" }, { conversationId: str(parsed.conversation_id) });
|
|
12641
|
+
}
|
|
12642
|
+
async function _handleSendRequest(parsed, channel) {
|
|
12522
12643
|
const text = parsed.text;
|
|
12523
12644
|
if (!text || typeof text !== "string") {
|
|
12524
12645
|
return { status: 400, body: { ok: false, error: "Missing 'text' field" } };
|
|
@@ -17681,7 +17802,7 @@ function armSseKeepAlive(intervalMs, onTick) {
|
|
|
17681
17802
|
timer.unref?.();
|
|
17682
17803
|
return timer;
|
|
17683
17804
|
}
|
|
17684
|
-
var __create, __defProp2, __getOwnPropDesc, __getOwnPropNames2, __getProtoOf, __hasOwnProp, __esm2, __commonJS, __export2, __copyProps, __toESM, SENTINEL, WRAPPERS, INSTRUCTION, init_abstention, AMBIGUOUS_OWNER_ERROR, init_owner_routing, init_envelope_text, init_mls_commit_classify, MENTION_RE, BROADCAST_NAMES, init_room_protocol, __filename, __dirname, url, path, Module, Module, root, window_, crypto_, randomValuesStandard, crypto2, randomValueNodeJS, _Module, libsodium_sumo_default, init_libsodium_sumo, a, r, t, c, libsodium_wrappers_default, init_libsodium_wrappers, init_keys, init_x3dh, MAX_SKIP, CHAIN_KEY_SEED, MSG_KEY_SEED, HEADER_KEY_SEED, DoubleRatchet, init_ratchet, init_file_crypto, DOMAIN_DID_DOCUMENT, DOMAIN_TRANSFER_INTENT, DOMAIN_TRANSFER_ACCEPT, BASE58_ALPHABET, init_did, BUILTIN_PATTERNS, ScanEngine, init_scan_engine, init_merkle, VC_CONTEXT_V2, AV_CREDENTIAL_CONTEXT, CRYPTOSUITE, BASE58_ALPHABET2, init_vc, init_transport, init_telemetry, TelemetryReporter, init_telemetry_reporter, CROCKFORD, ARGON2_OPSLIMIT, ARGON2_MEMLIMIT, SALT_BYTES, NONCE_BYTES, KEY_BYTES, BACKUP_VERSION, MAX_BACKUP_SIZE, init_backup, atitle, aobject, aopts, isLE, swap8IfBE, swap32IfBE, hasHexBuiltin, hexes, oidNist, init_utils, BSIGMA, init_blake, U32_MASK64, _32n, fromNumH, fromNumL, shrSH, shrSL, rotrSH, rotrSL, rotrBH, rotrBL, rotr32H, rotr32L, add3L, add3H, add4L, add4H, add5L, add5H, init_u64, HashMD, SHA256_IV, SHA384_IV, SHA512_IV, init_md, B2B_IV, BBUF, _BLAKE2, _BLAKE2b, blake2b, init_blake2, CROCKFORD2, SALT_BYTES2, NONCE_BYTES2, KEY_BYTES2, TAG_BYTES, ENVELOPE_OVERHEAD, AAD_PREFIX, UUID_RE, UUID_V4_RE, DIGEST_ID_RE, TIMESTAMP_RE, encoder, decoder, HISTORY_MAGIC, HISTORY_ARCHIVE_VERSION, HISTORY_MAX_ENTRIES, HISTORY_MAX_BLOB_BYTES, HISTORY_KDF_OPSLIMIT, HISTORY_KDF_MEMLIMIT, HistoryEntryTooLargeError, init_history_backup, init_approval, encVoid, init_tlsEncoder, uint8Encoder, encodeUint8, decodeUint8, uint16Encoder, encodeUint16, decodeUint16, uint32Encoder, encodeUint32, decodeUint32, uint64Encoder, encodeUint64, decodeUint64, init_number, init_tlsDecoder, init_enumHelpers, defaultProposalTypes, defaultProposalTypeEncoder, encodeDefaultProposalType, decodeDefaultProposalType, init_defaultProposalType, defaultExtensionTypes, defaultExtensionTypeEncoder, encodeDefaultExtensionType, decodeDefaultExtensionType, init_defaultExtensionType, acceptAll, init_incomingMessageAction, MlsError, ValidationError, CodecError, UsageError, DependencyError, CryptoVerificationError, CryptoError, InternalError, init_mlsError, init_byteArray, varLenDataEncoder, decodeVarLenData, init_variableLength, init_constantTimeCompare, extensionTypeEncoder, encodeExtensionType, decodeExtensionType, extensionEncoder, encodeExtension, decodeExtension, init_extension, credentialTypes, credentialTypeEncoder, encodeCredentialType, decodeCredentialType, init_credentialType, credentialBasicEncoder, encodeCredentialBasic, credentialX509Encoder, encodeCredentialX509, credentialCustomEncoder, encodeCredentialCustom, credentialEncoder, encodeCredential, decodeCredentialBasic, decodeCredentialX509, decodeCredential, init_credential, externalSenderEncoder, encodeExternalSender, decodeExternalSender, init_externalSender, init_hash, init_optional, ciphersuites, ciphersuiteEncoder, encodeCiphersuite, decodeCiphersuite, ciphersuiteValues, init_ciphersuite, init_signature, protocolVersions, protocolVersionEncoder, encodeProtocolVersion, decodeProtocolVersion, init_protocolVersion, capabilitiesEncoder, encodeCapabilities, decodeCapabilities, init_capabilities, leafNodeSources, leafNodeSourceEncoder, encodeLeafNodeSource, decodeLeafNodeSource, init_leafNodeSource, lifetimeEncoder, encodeLifetime, decodeLifetime, defaultLifetime, init_lifetime, leafNodeDataEncoder, encodeLeafNodeData, decodeLeafNodeData, leafNodeInfoKeyPackageEncoder, encodeLeafNodeInfoKeyPackage, leafNodeInfoUpdateOmittedEncoder, encodeLeafNodeInfoUpdateOmitted, leafNodeInfoCommitOmittedEncoder, encodeLeafNodeInfoCommitOmitted, leafNodeInfoOmittedEncoder, encodeLeafNodeInfoOmitted, decodeLeafNodeInfoKeyPackage, decodeLeafNodeInfoUpdateOmitted, decodeLeafNodeInfoCommitOmitted, decodeLeafNodeInfoOmitted, leafNodeInfoUpdateEncoder, encodeLeafNodeInfoUpdate, leafNodeInfoCommitEncoder, encodeLeafNodeInfoCommit, leafNodeInfoEncoder, encodeLeafNodeInfo, decodeLeafNodeInfoUpdate, decodeLeafNodeInfoCommit, decodeLeafNodeInfo, leafNodeTBSEncoder, encodeLeafNodeTBS, leafNodeEncoder, encodeLeafNode, decodeLeafNode, decodeLeafNodeKeyPackage, decodeLeafNodeCommit, decodeLeafNodeUpdate, init_leafNode, keyPackageTBSEncoder, encodeKeyPackageTBS, decodeKeyPackageTBS, keyPackageEncoder, encodeKeyPackage, decodeKeyPackage, init_keyPackage, init_kdf, pskTypes, pskTypeEncoder, encodePskType, decodePskType, resumptionPSKUsages, resumptionPSKUsageEncoder, encodeResumptionPSKUsage, decodeResumptionPSKUsage, encodePskInfoExternal, encodePskInfoResumption, decodePskInfoResumption, pskInfoEncoder, encodePskInfo, decodePskInfo, pskIdEncoder, encodePskId, decodePskId, pskLabelEncoder, encodePskLabel, decodePskLabel, init_presharedkey, addEncoder, encodeAdd, decodeAdd, updateEncoder, encodeUpdate, decodeUpdate, removeEncoder, encodeRemove, decodeRemove, pskEncoder, encodePSK, decodePSK, reinitEncoder, encodeReinit, decodeReinit, externalInitEncoder, encodeExternalInit, decodeExternalInit, groupContextExtensionsEncoder, encodeGroupContextExtensions, decodeGroupContextExtensions, proposalAddEncoder, encodeProposalAdd, proposalUpdateEncoder, encodeProposalUpdate, proposalRemoveEncoder, encodeProposalRemove, proposalPSKEncoder, encodeProposalPSK, proposalReinitEncoder, encodeProposalReinit, proposalExternalInitEncoder, encodeProposalExternalInit, proposalGroupContextExtensionsEncoder, encodeProposalGroupContextExtensions, proposalCustomEncoder, encodeProposalCustom, proposalEncoder, encodeProposal, decodeProposalAdd, decodeProposalUpdate, decodeProposalRemove, decodeProposalPSK, decodeProposalReinit, decodeProposalExternalInit, decodeProposalGroupContextExtensions, decodeProposal, init_proposal, proposalOrRefTypes, proposalOrRefTypeEncoder, encodeProposalOrRefType, decodeProposalOrRefType, proposalOrRefProposalEncoder, encodeProposalOrRefProposal, proposalOrRefProposalRefEncoder, encodeProposalOrRefProposalRef, proposalOrRefEncoder, encodeProposalOrRef, decodeProposalOrRef, init_proposalOrRefType, init_hpke, groupContextEncoder, encodeGroupContext, decodeGroupContext, init_groupContext, nodeTypes, nodeTypeEncoder, encodeNodeType, decodeNodeType, init_nodeType, parentNodeEncoder, encodeParentNode, decodeParentNode, init_parentNode, init_treemath, nodeEncoder, encodeNode, decodeNode, ratchetTreeEncoder, encodeRatchetTree, decodeRatchetTree, init_ratchetTree, leafNodeHashInputEncoder, encodeLeafNodeHashInput, decodeLeafNodeHashInput, parentNodeHashInputEncoder, encodeParentNodeHashInput, decodeParentNodeHashInput, treeHashInputEncoder, encodeTreeHashInput, decodeTreeHashInput, init_treeHash, parentHashInputEncoder, encodeParentHashInput, decodeParentHashInput, init_parentHash, hpkeCiphertextEncoder, encodeHpkeCiphertext, decodeHpkeCiphertext, init_hpkeCiphertext, updatePathNodeEncoder, encodeUpdatePathNode, decodeUpdatePathNode, updatePathEncoder, encodeUpdatePath, decodeUpdatePath, init_updatePath, commitEncoder, encodeCommit, decodeCommit, init_commit, contentTypes, contentTypeEncoder, encodeContentType, decodeContentType, init_contentType, wireformats, wireformatEncoder, encodeWireformat, decodeWireformat, init_wireformat, senderTypes, senderTypeEncoder, encodeSenderType, decodeSenderType, senderEncoder, encodeSender, decodeSender, reuseGuardEncoder, encodeReuseGuard, decodeReuseGuard, senderDataEncoder, encodeSenderData, decodeSenderData, senderDataAADEncoder, encodeSenderDataAAD, decodeSenderDataAAD, init_sender, framedContentApplicationDataEncoder, encodeFramedContentApplicationData, framedContentProposalDataEncoder, encodeFramedContentProposalData, framedContentCommitDataEncoder, encodeFramedContentCommitData, framedContentInfoEncoder, encodeFramedContentInfo, decodeFramedContentApplicationData, decodeFramedContentProposalData, decodeFramedContentCommitData, decodeFramedContentInfo, framedContentEncoder, encodeFramedContent, decodeFramedContent, senderInfoEncoder, encodeSenderInfo, framedContentTBSEncoder, encodeFramedContentTBS, encodeFramedContentAuthDataContent, encodeFramedContentAuthDataCommit, framedContentAuthDataEncoder, encodeFramedContentAuthData, decodeFramedContentAuthDataCommit, init_framedContent, authenticatedContentEncoder, encodeAuthenticatedContent, decodeAuthenticatedContent, authenticatedContentTBMEncoder, encodeAuthenticatedContentTBM, init_authenticatedContent, publicMessageInfoEncoder, encodePublicMessageInfo, publicMessageEncoder, encodePublicMessage, decodePublicMessage, init_publicMessage, init_messageProtectionPublic, init_externalProposal, requiredCapabilitiesEncoder, encodeRequiredCapabilities, decodeRequiredCapabilities, init_requiredCapabilities, defaultAuthenticationService, init_authenticationService, defaultPaddingConfig, init_paddingConfig, defaultKeyPackageEqualityConfig, init_keyPackageEqualityConfig, defaultLifetimeConfig, init_lifetimeConfig, defaultKeyRetentionConfig, init_keyRetentionConfig, groupInfoTBSEncoder, encodeGroupInfoTBS, decodeGroupInfoTBS, groupInfoEncoder, encodeGroupInfo, decodeGroupInfo, init_groupInfo, keyScheduleEncoder, encodeKeySchedule, decodeKeySchedule, init_keySchedule, generationSecretEncoder, decodeGenerationSecret, secretTreeNodeEncoder, decodeSecretTreeNode, secretTreeEncoder, decodeSecretTree, init_secretTree, confirmedTranscriptHashInputEncoder, encodeConfirmedTranscriptHashInput, decodeConfirmedTranscriptHashInput, init_transcriptHash, groupSecretsEncoder, encodeGroupSecrets, decodeGroupSecrets, init_groupSecrets, encryptedGroupSecretsEncoder, encodeEncryptedGroupSecrets, decodeEncryptedGroupSecrets, welcomeEncoder, encodeWelcome, decodeWelcome, init_welcome, init_pathSecrets, privateKeyPathEncoder, decodePrivateKeyPath, init_privateKeyPath, proposalWithSenderEncoder, decodeProposalWithSender, unappliedProposalsEncoder, decodeUnappliedProposals, init_unappliedProposals, emptyPskIndex, init_pskIndex, init_addToMap, defaultClientConfig, init_clientConfig, init_array, stringEncoder, encodeString, decodeString, init_string, activeEncoder, suspendedPendingReinitEncoder, removedFromGroupEncoder, groupActiveStateEncoder, decodeGroupActiveState, init_groupActiveState, epochReceiverDataEncoder, decodeEpochReceiverData, init_epochReceiverData, groupStateEncoder, encodeGroupState, decodeGroupState, groupStateEncoderWithoutTree, encodeGroupStateWithoutTree, emptyProposals, init_clientState, privateMessageEncoder, encodePrivateMessage, decodePrivateMessage, privateContentAADEncoder, encodePrivateContentAAD, decodePrivateContentAAD, init_privateMessage, init_messageProtection, init_createMessage, init_createCommit, init_processMessages, init_makeHashImpl, HpkeError, InvalidParamError, SerializeError, DeserializeError, EncapError, DecapError, ExportError, SealError, OpenError, MessageLimitReachedError, DeriveKeyPairError, NotSupportedError, init_errors, dntGlobals, dntGlobalThis, init_dnt_shims, NativeAlgorithm, init_algorithm, Mode, KemId, KdfId, AeadId, init_identifiers, INPUT_LENGTH_LIMIT, INFO_LENGTH_LIMIT, MINIMUM_PSK_LENGTH, EMPTY, BYTE_TO_BIGINT_256, init_consts, SUITE_ID_HEADER_KEM, init_kemInterface, HPKE_VERSION, HkdfNative, HkdfSha256Native, HkdfSha384Native, HkdfSha512Native, init_hkdf, isCryptoKeyPair, init_misc, LABEL_EAE_PRK, LABEL_SHARED_SECRET, Dhkem, init_dhkem, KEM_USAGES, LABEL_DKP_PRK, LABEL_SK, init_dhkemPrimitives, Bignum, init_bignum, LABEL_CANDIDATE, ORDER_P_256, ORDER_P_384, ORDER_P_521, PKCS8_ALG_ID_P_256, PKCS8_ALG_ID_P_384, PKCS8_ALG_ID_P_521, EC_P_256_PARAMS, EC_P_384_PARAMS, EC_P_521_PARAMS, Ec, init_ec, init_xCryptoKey, init_xCurve, init_hybridkem, AEAD_USAGES, init_aeadEncryptionContext, _endianTestBuffer, _endianTestBytes, isLE2, init_noble, init_hash2, _HMAC, hmac, init_hmac, init_md2, U32_MASK642, _32n2, init_u642, init_sha2, _0n, _1n, _2n, _7n, _256n, _0x71n, SHA3_PI, SHA3_ROTL, _SHA3_IOTA, IOTAS, SHA3_IOTA_H, SHA3_IOTA_L, init_sha3, init_modular, init_curve, init_montgomery, init_mod, AesGcmContext, Aes128Gcm, Aes256Gcm, init_aesGcm, init_exportOnly, init_emitNotSupported, LABEL_SEC, ExporterContextImpl, RecipientExporterContextImpl, SenderExporterContextImpl, init_exporterContext, EncryptionContextImpl, init_encryptionContext, __classPrivateFieldGet, __classPrivateFieldSet, _Mutex_locked, Mutex, init_mutex, __classPrivateFieldGet2, __classPrivateFieldSet2, _RecipientContextImpl_mutex, RecipientContextImpl, init_recipientContext, __classPrivateFieldGet3, __classPrivateFieldSet3, _SenderContextImpl_mutex, SenderContextImpl, init_senderContext, LABEL_BASE_NONCE, LABEL_EXP, LABEL_INFO_HASH, LABEL_KEY, LABEL_PSK_ID_HASH, LABEL_SECRET, SUITE_ID_HEADER_HPKE, CipherSuiteNative, init_cipherSuiteNative, DhkemP256HkdfSha256Native, DhkemP384HkdfSha384Native, DhkemP521HkdfSha512Native, init_dhkemNative, CipherSuite, DhkemP256HkdfSha256, DhkemP384HkdfSha384, DhkemP521HkdfSha512, HkdfSha256, HkdfSha384, HkdfSha512, init_native, ALG_NAME, PKCS8_ALG_ID_X25519, BASE_POINT_X25519, X25519, init_x25519, DhkemX25519HkdfSha256, init_dhkemX25519, PKCS8_ALG_ID_X448, init_x448, init_dhkemX448, init_mod2, init_hpke2, isLE3, wrapCipher, init_utils2, encodeStr, sigma16, sigma32, sigma16_32, sigma32_32, BLOCK_LEN, BLOCK_LEN32, MAX_COUNTER, U32_EMPTY, _XorStreamPRG, createPRG, init_arx, Poly1305, poly1305, init_poly1305, chacha_exports, chacha20orig, chacha20, xchacha20, chacha8, chacha12, ZEROS16, updatePadded, ZEROS32, _poly1305_aead, chacha20poly1305, xchacha20poly1305, rngChacha20, rngChacha8, init_chacha, init_makeAead, init_makeKdfImpl, init_makeDhKem, init_makeHpke, defaultRng, init_rng, crypto3, init_cryptoNode, isLE4, swap32IfBE3, hasHexBuiltin2, hexes2, asciis, Hash, init_utils3, HashMD3, SHA256_IV3, SHA384_IV3, SHA512_IV3, init_md3, U32_MASK643, _32n3, shrSH3, shrSL3, rotrSH3, rotrSL3, rotrBH3, rotrBL3, rotlSH2, rotlSL2, rotlBH2, rotlBL2, add3L3, add3H3, add4L3, add4H3, add5L3, add5H3, init_u643, SHA256_K, SHA256_W, SHA256, K512, SHA512_Kh, SHA512_Kl, SHA512_W_H, SHA512_W_L, SHA512, SHA384, sha2563, sha5122, sha3842, init_sha22, _0n2, _1n2, isPosBig, bitMask, notImplemented, init_utils4, _0n3, _1n3, _2n2, _3n, _4n, _5n, _7n2, _8n, _9n, _16n, isNegativeLE, FIELD_FIELDS, init_modular2, _0n4, _1n4, pointPrecomputes, pointWindowSizes, wNAF, init_curve2, _0n5, _1n5, _2n3, _8n2, PrimeEdwardsPoint, init_edwards, os2ip, _DST_scalar, init_hash_to_curve, _0n6, _1n6, _2n4, init_montgomery2, ed25519_exports, _0n7, _1n7, _2n5, _3n2, _5n2, _8n3, ed25519_CURVE_p, ed25519_CURVE, ED25519_SQRT_M1, Fp, Fn, ed25519Defaults, ed25519, ed25519ctx, ed25519ph, x25519, ELL2_C1, ELL2_C2, ELL2_C3, ELL2_C1_EDWARDS, ed25519_hasher, SQRT_M1, SQRT_AD_MINUS_ONE, INVSQRT_A_MINUS_D, ONE_MINUS_D_SQ, D_MINUS_ONE_SQ, invertSqrt, MAX_255B, bytes255ToNumberLE, _RistrettoPoint, ristretto255, ristretto255_hasher, ED25519_TORSION_SUBGROUP, edwardsToMontgomery, RistrettoPoint, hashToCurve, encodeToCurve, hashToRistretto255, hash_to_ristretto255, init_ed25519, _0n8, _1n8, _2n6, _7n3, _256n2, _0x71n2, SHA3_PI2, SHA3_ROTL2, _SHA3_IOTA2, IOTAS2, SHA3_IOTA_H2, SHA3_IOTA_L2, rotlH, rotlL, Keccak, genShake, shake2562, init_sha32, ed448_exports, ed448_CURVE, E448_CURVE, shake256_114, shake256_64, _1n9, _2n7, _3n3, _4n2, _11n, _22n, _44n, _88n, _223n, Fp2, Fn2, Fp448, Fn448, ED448_DEF, ed448, ed448ph, E448, x448, ELL2_C12, ELL2_J, ed448_hasher, ONE_MINUS_D, ONE_MINUS_TWO_D, SQRT_MINUS_D, INVSQRT_MINUS_D, invertSqrt2, _DecafPoint, decaf448, decaf448_hasher, ED448_TORSION_SUBGROUP, DecafPoint, hashToCurve2, encodeToCurve2, hashToDecaf448, hash_to_decaf448, edwardsToMontgomery2, init_ed448, HMAC, hmac2, init_hmac2, divNearest, DERErr, DER, _0n9, _1n10, _2n8, _3n4, _4n3, init_weierstrass, init_shortw_utils, nist_exports, p256_CURVE, p384_CURVE, p521_CURVE, Fp256, Fp384, Fp521, p256, p256_hasher, p384, p384_hasher, p521, secp256r1, secp384r1, secp521r1, p521_hasher, init_nist, init_makeNobleSignatureImpl, defaultCryptoProvider, init_provider, init_getCiphersuiteImpl, init_resumption, SHA256_K2, SHA256_W2, SHA2_32B, _SHA256, K5122, SHA512_Kh2, SHA512_Kl2, SHA512_W_H2, SHA512_W_L2, SHA2_64B, _SHA512, _SHA384, sha2564, sha5123, sha3843, init_sha23, _HMAC2, hmac3, init_hmac3, init_makeHashImpl2, init_makeNobleSignatureImpl2, BLOCK_SIZE, ZEROS162, ZEROS322, POLY, mul2, swapLE, estimateWindow, GHASH, Polyval, ghash, polyval, init_polyval, BLOCK_SIZE2, BLOCK_SIZE32, EMPTY_BLOCK, POLY2, sbox, rotr32_8, rotl32_8, tableEncoding, xPowers, gcm, _CMAC, cmac, init_aes, init_makeAead2, init_makeKdfImpl2, init_makeDhKem2, init_makeHpke2, init_rng2, nobleCryptoProvider, init_provider2, mlsPublicMessageEncoder, encodeMlsPublicMessage, mlsWelcomeEncoder, encodeMlsWelcome, mlsPrivateMessageEncoder, encodeMlsPrivateMessage, mlsGroupInfoEncoder, encodeMlsGroupInfo, mlsKeyPackageEncoder, encodeMlsKeyPackage, mlsMessageContentEncoder, encodeMlsMessageContent, decodeMlsMessageContent, mlsMessageEncoder, encodeMlsMessage, decodeMlsMessage, init_message, greaseValues, defaultGreaseConfig, init_grease, init_defaultCapabilities, init_src, DEFAULT_CIPHERSUITE, MLSGroupManager, init_mls_group, DOMAIN, NONCE_BYTES3, init_owner_sync, init_mls_delivery_order, init_mls_presend_epoch, dist_exports, init_dist2, DIR_MODE, FILE_MODE, init_secure_file, SYNC_LOCK_STALE_MS, pendingKpPath, init_mls_state, init_mls_kp_pool, PACKAGE, FALLBACK, MAX_LEN, DISALLOWED, init_client_version, CredentialStore, init_credential_store, init_crypto_helpers, STATE_FILE, LEGACY_STATE_FILE, init_state, ACTIVATION_DOMAIN, UUID_RE2, init_transport2, A2ALogGate, init_a2a_log_gate, init_mls_membership_probe, FIRST_DIRTY_DELAY_MS, RETRY_BASE_DELAYS_MS, MAX_RETRY_DELAY_MS, JITTER_FRACTION, HistoryBackupScheduler, init_history_backup_scheduler, FILE_MODE2, init_history_recovery_file, TENANT_ID_PATTERN, DIR_MODE2, FILE_MODE3, HISTORY_RECOVERY_VERIFY_TIMEOUT_MS, VERIFY_TIMEOUT_MESSAGE, HistoryRecoveryVerificationTimeoutError, init_history_recovery_code, ACTIONS, init_decision_reply, KP_BACKOFF_INITIAL_MS, KP_BACKOFF_MAX_MS, KP_RACE_RETRY_MS, KP_RACE_RETRY_LIMIT, consoleLogger, short, WelcomeKeyPackageBackoff, init_welcome_kp_backoff, history_backup_client_exports, HISTORY_RESTORE_TIMEOUT_MS, HISTORY_RESTORE_RESPONSE_MAX_BYTES, HISTORY_ENVELOPE_MIN_BYTES, HISTORY_AAD_PREFIX, UUID_RE3, GENERATION_RESPONSE_KEYS, utf8Encoder, utf8Decoder, HistoryBackupClient, init_history_backup_client, openclaw_compat_exports, defaultImporter, HEARTBEAT_CANDIDATES, AGENT_EVENT_CANDIDATES, TRANSCRIPT_CANDIDATES, _heartbeatFn, _agentEventFn, _transcriptFn, init_openclaw_compat, http_handlers_exports, init_http_handlers, mcp_proxy_helpers_exports, init_mcp_proxy_helpers, workspace_handlers_exports, MAX_FILE_SIZE, init_workspace_handlers, ROOM_AGENT_TYPES, CREDENTIAL_MESSAGE_TYPES, CATCHUP_MESSAGE_TYPES, POLL_INTERVAL_MS, RECONNECT_BASE_MS, UUID_RE4, RECONNECT_MAX_MS, PENDING_POLL_INTERVAL_MS, HISTORY_RESTORE_TIMEOUT_MS2, HISTORY_UPLOAD_TIMEOUT_MS, CANONICAL_TIMESTAMP_RE, OUTBOUND_DEDUPE_WINDOW_MS, OUTBOUND_DEDUPE_MAX_SUPPRESS_MS, OUTBOUND_DEDUPE_MAX, OUTBOUND_DEDUPE_TYPES, RETRY_CANDIDATE_TTL_MS, RETRY_CANDIDATE_MAX, _turnConversation, PERSON_INVOLVED_WINDOW_MS, ATTESTED_INBOUND_MAX, UNMAPPED_RECONCILE_COOLDOWN_MS, TOPIC_ID_RE, ROOM_FULFIL_COOLDOWN_MS, SecureChannel, init_channel, init_types, DEFAULT_API_URL, DEFAULT_HTTP_PORT, init_account_config, init_lifecycle, _ocRuntime, _channels, agentVaultPlugin, init_openclaw_plugin, init_gateway_send, init_llm_response_parser, OPENROUTER_PRICING, init_llm_pricing_openrouter, LEGACY_PRICING, PRICING, init_llm_cost, traceStore, init_fetch_interceptor, init_tool_audit, init_harness_compat, managedRoutesRequested, init_openclaw_entry, util, objectUtil, ZodParsedType, getParsedType, init_util, ZodIssueCode, ZodError, init_ZodError, errorMap, en_default, init_en, overrideErrorMap, init_errors2, makeIssue, ParseStatus, INVALID, DIRTY, OK, isAborted, isDirty, isValid, isAsync, init_parseUtil, init_typeAliases, errorUtil, init_errorUtil, ParseInputLazyPath, handleResult, ZodType, cuidRegex, cuid2Regex, ulidRegex, uuidRegex, nanoidRegex, jwtRegex, durationRegex, emailRegex, _emojiRegex, emojiRegex, ipv4Regex, ipv4CidrRegex, ipv6Regex, ipv6CidrRegex, base64Regex, base64urlRegex, dateRegexSource, dateRegex, ZodString, ZodNumber, ZodBigInt, ZodBoolean, ZodDate, ZodSymbol, ZodUndefined, ZodNull, ZodAny, ZodUnknown, ZodNever, ZodVoid, ZodArray, ZodObject, ZodUnion, getDiscriminator, ZodDiscriminatedUnion, ZodIntersection, ZodTuple, ZodRecord, ZodMap, ZodSet, ZodFunction, ZodLazy, ZodLiteral, ZodEnum, ZodNativeEnum, ZodPromise, ZodEffects, ZodOptional, ZodNullable, ZodDefault, ZodCatch, ZodNaN, ZodBranded, ZodPipeline, ZodReadonly, late, ZodFirstPartyTypeKind, stringType, numberType, nanType, bigIntType, booleanType, dateType, symbolType, undefinedType, nullType, anyType, unknownType, neverType, voidType, arrayType, objectType, strictObjectType, unionType, discriminatedUnionType, intersectionType, tupleType, recordType, mapType, setType, functionType, lazyType, literalType, enumType, nativeEnumType, promiseType, effectsType, optionalType, nullableType, preprocessType, pipelineType, init_types2, init_external, init_v3, util_exports, Cached, EVALUATING, captureStackTrace, allowsEval, getParsedType2, propertyKeyTypes, primitiveTypes, NUMBER_FORMAT_RANGES, BIGINT_FORMAT_RANGES, highSurrogate, Class, installing, broke, breaker, CONSTANT_CATCH, init_util2, _a2, _zodDesc, _E, $ZodAsyncError, $ZodEncodeError, globalConfig, init_core, _messageDesc, _issuesDesc, _installedToString, initializer, $ZodError, $ZodRealError, init_errors3, _parse, parse, _parseAsync, parseAsync, _safeParse, safeParse, _safeParseAsync, safeParseAsync, COMPILE_INVALID, COMPILE_FALLBACK, validate, validateAsync, _encode, _decode, _encodeAsync, _decodeAsync, _safeEncode, _safeDecode, _safeEncodeAsync, _safeDecodeAsync, init_parse, cuid, cuid2, ulid, xid, ksuid, nanoid, duration, guid, uuid, email, _emoji, ipv4, ipv6, cidrv4, cidrv6, base64, base64url, httpProtocol, e164, dateSource, date, anyString, integer, number, boolean, _null, lowercase, uppercase, init_regexes, $ZodCheck, _whenHasLength, numericOriginMap, $ZodCheckLessThan, $ZodCheckGreaterThan, $ZodCheckMultipleOf, $ZodCheckNumberFormat, $ZodCheckMaxLength, $ZodCheckMinLength, $ZodCheckLengthEquals, $ZodCheckStringFormat, $ZodCheckRegex, $ZodCheckLowerCase, $ZodCheckUpperCase, $ZodCheckIncludes, $ZodCheckStartsWith, $ZodCheckEndsWith, $ZodCheckOverwrite, init_checks, Doc, init_doc, version, init_versions, $ZodType, toStandardResult, $ZodString, $ZodStringFormat, $ZodGUID, $ZodUUID, $ZodEmail, URL_BAD_FORMAT, URL_UNPARSEABLE, asciiTabOrNewline, $ZodURL, $ZodEmoji, $ZodNanoID, $ZodCUID, $ZodCUID2, $ZodULID, $ZodXID, $ZodKSUID, $ZodISODateTime, $ZodISODate, $ZodISOTime, $ZodISODuration, $ZodIPv4, ipv6Alphabet, $ZodIPv6, $ZodCIDRv4, $ZodCIDRv6, base64Charset, $ZodBase64, base64urlCharset, $ZodBase64URL, $ZodE164, $ZodJWT, $ZodNumber, $ZodNumberFormat, $ZodBoolean, $ZodNull, $ZodUnknown, $ZodNever, arraySize, $ZodArray, NO_SYMBOL_KEYS, $ZodObject, $ZodObjectJIT, $ZodUnion, $ZodDiscriminatedUnion, $ZodIntersection, $ZodRecord, $ZodEnum, $ZodLiteral, $ZodTransform, $ZodOptional, $ZodExactOptional, $ZodNullable, $ZodDefault, $ZodPrefault, $ZodNonOptional, $ZodCatch, $ZodPipe, $ZodPreprocess, $ZodReadonly, $ZodCustom, init_schemas, $ZodCyclicError, STATE, NO_ISSUES, recursive, NONE, ASSUMED, PROVEN, handoff, open4, memo, init_memoizer, error, init_en2, init_locales, _a3, $ZodRegistry, globalRegistry, init_registries, init_compile, init_api, FOLDABLE_KEYS, UNION_KEYS, createToJSONSchemaMethod, createStandardJSONSchemaMethod, init_to_json_schema, narrowMin, narrowMax, narrowBoth, addDivisor, addPattern, intersectMime, setFormat, minContributor, maxContributor, formatContributor, contributors, formatMap, exactPatterns, exactPattern, stringProcessor, numberProcessor, booleanProcessor, bigintProcessor, symbolProcessor, nullProcessor, undefinedProcessor, voidProcessor, neverProcessor, anyProcessor, unknownProcessor, dateProcessor, enumProcessor, literalProcessor, nanProcessor, templateLiteralProcessor, fileProcessor, successProcessor, customProcessor, functionProcessor, transformProcessor, mapProcessor, setProcessor, arrayProcessor, objectProcessor, unionProcessor, intersectionProcessor, tupleProcessor, pendingRecords, recordProcessor, nullableProcessor, nonoptionalProcessor, UNREPRESENTABLE_DEFAULT, defaultProcessor, prefaultProcessor, catchProcessor, pipeProcessor, readonlyProcessor, promiseProcessor, optionalProcessor, lazyProcessor, allProcessors, init_json_schema_processors, init_json_schema, init_core2, init_parse2, ZodMiniType, ZodMiniObject, init_schemas2, init_checks2, init_iso, init_coerce, init_external2, init_v4_mini, init_zod_compat, init_checks3, _installedErrorProtos, initializer2, ZodRealError, init_errors4, parse2, parseAsync2, safeParse3, safeParseAsync3, encode3, decode2, encodeAsync2, decodeAsync2, safeEncode2, safeDecode2, safeEncodeAsync2, safeDecodeAsync2, init_parse3, ZodType2, _ZodString, ZodString2, ZodStringFormat, ZodISODateTime, ZodISODate, ZodISOTime, ZodISODuration, ZodEmail, ZodGUID, ZodUUID, ZodURL, ZodEmoji, ZodNanoID, ZodCUID, ZodCUID2, ZodULID, ZodXID, ZodKSUID, ZodIPv4, ZodIPv6, ZodCIDRv4, ZodCIDRv6, ZodBase64, ZodBase64URL, ZodE164, ZodJWT, ZodNumber2, ZodNumberFormat, ZodBoolean2, ZodNull2, ZodUnknown2, ZodNever2, ZodArray2, ZodObject2, ZodUnion2, ZodDiscriminatedUnion2, ZodIntersection2, ZodRecord2, ZodEnum2, ZodLiteral2, ZodTransform, ZodOptional2, ZodExactOptional, ZodNullable2, ZodDefault2, ZodPrefault, ZodNonOptional, ZodCatch2, ZodPipe, ZodPreprocess, ZodReadonly2, ZodCustom, init_schemas3, ZodFirstPartyTypeKind2, init_compat, iso_exports2, init_iso2, init_coerce2, init_external3, init_classic, init_v4, LATEST_PROTOCOL_VERSION, DEFAULT_NEGOTIATED_PROTOCOL_VERSION, SUPPORTED_PROTOCOL_VERSIONS, RELATED_TASK_META_KEY, JSONRPC_VERSION, AssertObjectSchema, ProgressTokenSchema, CursorSchema, TaskCreationParamsSchema, TaskMetadataSchema, RelatedTaskMetadataSchema, RequestMetaSchema, BaseRequestParamsSchema, TaskAugmentedRequestParamsSchema, isTaskAugmentedRequestParams, RequestSchema, NotificationsParamsSchema, NotificationSchema, ResultSchema, RequestIdSchema, JSONRPCRequestSchema, isJSONRPCRequest, JSONRPCNotificationSchema, isJSONRPCNotification, JSONRPCResultResponseSchema, isJSONRPCResultResponse, ErrorCode, JSONRPCErrorResponseSchema, isJSONRPCErrorResponse, JSONRPCMessageSchema, JSONRPCResponseSchema, EmptyResultSchema, CancelledNotificationParamsSchema, CancelledNotificationSchema, IconSchema, IconsSchema, BaseMetadataSchema, ImplementationSchema, FormElicitationCapabilitySchema, ElicitationCapabilitySchema, ClientTasksCapabilitySchema, ServerTasksCapabilitySchema, ClientCapabilitiesSchema, InitializeRequestParamsSchema, InitializeRequestSchema, isInitializeRequest, ServerCapabilitiesSchema, InitializeResultSchema, InitializedNotificationSchema, PingRequestSchema, ProgressSchema, ProgressNotificationParamsSchema, ProgressNotificationSchema, PaginatedRequestParamsSchema, PaginatedRequestSchema, PaginatedResultSchema, TaskStatusSchema, TaskSchema, CreateTaskResultSchema, TaskStatusNotificationParamsSchema, TaskStatusNotificationSchema, GetTaskRequestSchema, GetTaskResultSchema, GetTaskPayloadRequestSchema, GetTaskPayloadResultSchema, ListTasksRequestSchema, ListTasksResultSchema, CancelTaskRequestSchema, CancelTaskResultSchema, ResourceContentsSchema, TextResourceContentsSchema, Base64Schema, BlobResourceContentsSchema, RoleSchema, AnnotationsSchema, ResourceSchema, ResourceTemplateSchema, ListResourcesRequestSchema, ListResourcesResultSchema, ListResourceTemplatesRequestSchema, ListResourceTemplatesResultSchema, ResourceRequestParamsSchema, ReadResourceRequestParamsSchema, ReadResourceRequestSchema, ReadResourceResultSchema, ResourceListChangedNotificationSchema, SubscribeRequestParamsSchema, SubscribeRequestSchema, UnsubscribeRequestParamsSchema, UnsubscribeRequestSchema, ResourceUpdatedNotificationParamsSchema, ResourceUpdatedNotificationSchema, PromptArgumentSchema, PromptSchema, ListPromptsRequestSchema, ListPromptsResultSchema, GetPromptRequestParamsSchema, GetPromptRequestSchema, TextContentSchema, ImageContentSchema, AudioContentSchema, ToolUseContentSchema, EmbeddedResourceSchema, ResourceLinkSchema, ContentBlockSchema, PromptMessageSchema, GetPromptResultSchema, PromptListChangedNotificationSchema, ToolAnnotationsSchema, ToolExecutionSchema, ToolSchema, ListToolsRequestSchema, ListToolsResultSchema, CallToolResultSchema, CompatibilityCallToolResultSchema, CallToolRequestParamsSchema, CallToolRequestSchema, ToolListChangedNotificationSchema, ListChangedOptionsBaseSchema, LoggingLevelSchema, SetLevelRequestParamsSchema, SetLevelRequestSchema, LoggingMessageNotificationParamsSchema, LoggingMessageNotificationSchema, ModelHintSchema, ModelPreferencesSchema, ToolChoiceSchema, ToolResultContentSchema, SamplingContentSchema, SamplingMessageContentBlockSchema, SamplingMessageSchema, CreateMessageRequestParamsSchema, CreateMessageRequestSchema, CreateMessageResultSchema, CreateMessageResultWithToolsSchema, BooleanSchemaSchema, StringSchemaSchema, NumberSchemaSchema, UntitledSingleSelectEnumSchemaSchema, TitledSingleSelectEnumSchemaSchema, LegacyTitledEnumSchemaSchema, SingleSelectEnumSchemaSchema, UntitledMultiSelectEnumSchemaSchema, TitledMultiSelectEnumSchemaSchema, MultiSelectEnumSchemaSchema, EnumSchemaSchema, PrimitiveSchemaDefinitionSchema, ElicitRequestFormParamsSchema, ElicitRequestURLParamsSchema, ElicitRequestParamsSchema, ElicitRequestSchema, ElicitationCompleteNotificationParamsSchema, ElicitationCompleteNotificationSchema, ElicitResultSchema, ResourceTemplateReferenceSchema, PromptReferenceSchema, CompleteRequestParamsSchema, CompleteRequestSchema, CompleteResultSchema, RootSchema, ListRootsRequestSchema, ListRootsResultSchema, RootsListChangedNotificationSchema, ClientRequestSchema, ClientNotificationSchema, ClientResultSchema, ServerRequestSchema, ServerNotificationSchema, ServerResultSchema, McpError, UrlElicitationRequiredError, init_types3, init_interfaces, ignoreOverride, defaultOptions, getDefaultOptions, init_Options, getRefs, init_Refs, init_errorMessages, getRelativePath, init_getRelativePath, init_any, init_array2, init_bigint, init_boolean, init_branded, parseCatchDef, init_catch, integerDateParser, init_date, init_default, init_effects, init_enum, isJsonSchema7AllOfType, init_intersection, init_literal, emojiRegex2, zodPatterns, ALPHA_NUMERIC, init_string2, init_record, init_map, init_nativeEnum, init_never, init_null, primitiveMappings, asAnyOf, init_union, init_nullable, init_number2, init_object, parseOptionalDef, init_optional2, parsePipelineDef, init_pipeline, init_promise, init_set, init_tuple, init_undefined, init_unknown, parseReadonlyDef, init_readonly, selectParser, init_selectParser, get$ref, addMeta, init_parseDef, init_parseTypes, zodToJsonSchema, init_zodToJsonSchema, init_esm, init_zod_json_schema_compat, DEFAULT_REQUEST_TIMEOUT_MSEC, Protocol, init_protocol, require_code, require_scope, require_codegen, require_util, require_names, require_errors, require_boolSchema, require_rules, require_applicability, require_dataType, require_defaults, require_code2, require_keyword, require_subschema, require_fast_deep_equal, require_json_schema_traverse, require_resolve, require_validate, require_validation_error, require_ref_error, require_compile, require_data, require_utils, require_schemes, require_fast_uri, require_uri, require_core, require_id, require_ref, require_core2, require_limitNumber, require_multipleOf, require_ucs2length, require_limitLength, require_pattern, require_limitProperties, require_required, require_limitItems, require_equal, require_uniqueItems, require_const, require_enum, require_validation, require_additionalItems, require_items, require_prefixItems, require_items2020, require_contains, require_dependencies, require_propertyNames, require_additionalProperties, require_properties, require_patternProperties, require_not, require_anyOf, require_oneOf, require_allOf, require_if, require_thenElse, require_applicator, require_format, require_format2, require_metadata, require_draft7, require_types, require_discriminator, require_json_schema_draft_07, require_ajv, require_formats, require_limit, require_dist, import_ajv, import_ajv_formats, AjvJsonSchemaValidator, init_ajv_provider, ExperimentalServerTasks, init_server, init_helpers, Server, init_server2, COMPLETABLE_SYMBOL, McpZodTypeKind, init_completable, init_uriTemplate, TOOL_NAME_REGEX, init_toolNameValidation, ExperimentalMcpServerTasks, init_mcp_server, init_zod, McpServer, EMPTY_OBJECT_JSON_SCHEMA, EMPTY_COMPLETION_RESULT, init_mcp, RequestError, toRequestError, GlobalRequest, Request2, newHeadersFromIncoming, wrapBodyStream, newRequestFromIncoming, getRequestCache, requestCache, incomingKey, urlKey, headersKey, abortControllerKey, getAbortController, requestPrototype, newRequest, responseCache, getResponseCache, cacheKey, GlobalResponse, Response2, buildOutgoingHttpHeaders, X_ALREADY_SENT, outgoingEnded, handleRequestError, handleFetchError, handleResponseError, flushHeaders, responseViaCache, isPromise, responseViaResponseObject, getRequestListener, init_dist22, require_content_type, import_content_type, init_mediaType, DEFAULT_MAX_REQUEST_BODY_SIZE, MAX_BATCH_SIZE, init_requestBody, DEFAULT_SSE_KEEP_ALIVE_MS, MAX_TIMER_DELAY_MS, init_sseKeepAlive, WebStandardStreamableHTTPServerTransport, init_webStandardStreamableHttp, StreamableHTTPServerTransport, init_streamableHttp, AgentVaultMcpServer, init_mcp_server2, init_mcp_handlers, init_skill_manifest, init_skill_invoker, spanBuffer, init_skill_telemetry, PolicyEnforcer, init_policy_enforcer, VERSION, init_index;
|
|
17805
|
+
var __create, __defProp2, __getOwnPropDesc, __getOwnPropNames2, __getProtoOf, __hasOwnProp, __esm2, __commonJS, __export2, __copyProps, __toESM, SENTINEL, WRAPPERS, INSTRUCTION, init_abstention, AMBIGUOUS_OWNER_ERROR, init_owner_routing, init_envelope_text, init_mls_commit_classify, MENTION_RE, BROADCAST_NAMES, init_room_protocol, __filename, __dirname, url, path, Module, Module, root, window_, crypto_, randomValuesStandard, crypto2, randomValueNodeJS, _Module, libsodium_sumo_default, init_libsodium_sumo, a, r, t, c, libsodium_wrappers_default, init_libsodium_wrappers, init_keys, init_x3dh, MAX_SKIP, CHAIN_KEY_SEED, MSG_KEY_SEED, HEADER_KEY_SEED, DoubleRatchet, init_ratchet, init_file_crypto, DOMAIN_DID_DOCUMENT, DOMAIN_TRANSFER_INTENT, DOMAIN_TRANSFER_ACCEPT, BASE58_ALPHABET, init_did, BUILTIN_PATTERNS, ScanEngine, init_scan_engine, init_merkle, VC_CONTEXT_V2, AV_CREDENTIAL_CONTEXT, CRYPTOSUITE, BASE58_ALPHABET2, init_vc, init_transport, init_telemetry, TelemetryReporter, init_telemetry_reporter, CROCKFORD, ARGON2_OPSLIMIT, ARGON2_MEMLIMIT, SALT_BYTES, NONCE_BYTES, KEY_BYTES, BACKUP_VERSION, MAX_BACKUP_SIZE, init_backup, atitle, aobject, aopts, isLE, swap8IfBE, swap32IfBE, hasHexBuiltin, hexes, oidNist, init_utils, BSIGMA, init_blake, U32_MASK64, _32n, fromNumH, fromNumL, shrSH, shrSL, rotrSH, rotrSL, rotrBH, rotrBL, rotr32H, rotr32L, add3L, add3H, add4L, add4H, add5L, add5H, init_u64, HashMD, SHA256_IV, SHA384_IV, SHA512_IV, init_md, B2B_IV, BBUF, _BLAKE2, _BLAKE2b, blake2b, init_blake2, CROCKFORD2, SALT_BYTES2, NONCE_BYTES2, KEY_BYTES2, TAG_BYTES, ENVELOPE_OVERHEAD, AAD_PREFIX, UUID_RE, UUID_V4_RE, DIGEST_ID_RE, TIMESTAMP_RE, encoder, decoder, HISTORY_MAGIC, HISTORY_ARCHIVE_VERSION, HISTORY_MAX_ENTRIES, HISTORY_MAX_BLOB_BYTES, HISTORY_KDF_OPSLIMIT, HISTORY_KDF_MEMLIMIT, HistoryEntryTooLargeError, init_history_backup, init_approval, encVoid, init_tlsEncoder, uint8Encoder, encodeUint8, decodeUint8, uint16Encoder, encodeUint16, decodeUint16, uint32Encoder, encodeUint32, decodeUint32, uint64Encoder, encodeUint64, decodeUint64, init_number, init_tlsDecoder, init_enumHelpers, defaultProposalTypes, defaultProposalTypeEncoder, encodeDefaultProposalType, decodeDefaultProposalType, init_defaultProposalType, defaultExtensionTypes, defaultExtensionTypeEncoder, encodeDefaultExtensionType, decodeDefaultExtensionType, init_defaultExtensionType, acceptAll, init_incomingMessageAction, MlsError, ValidationError, CodecError, UsageError, DependencyError, CryptoVerificationError, CryptoError, InternalError, init_mlsError, init_byteArray, varLenDataEncoder, decodeVarLenData, init_variableLength, init_constantTimeCompare, extensionTypeEncoder, encodeExtensionType, decodeExtensionType, extensionEncoder, encodeExtension, decodeExtension, init_extension, credentialTypes, credentialTypeEncoder, encodeCredentialType, decodeCredentialType, init_credentialType, credentialBasicEncoder, encodeCredentialBasic, credentialX509Encoder, encodeCredentialX509, credentialCustomEncoder, encodeCredentialCustom, credentialEncoder, encodeCredential, decodeCredentialBasic, decodeCredentialX509, decodeCredential, init_credential, externalSenderEncoder, encodeExternalSender, decodeExternalSender, init_externalSender, init_hash, init_optional, ciphersuites, ciphersuiteEncoder, encodeCiphersuite, decodeCiphersuite, ciphersuiteValues, init_ciphersuite, init_signature, protocolVersions, protocolVersionEncoder, encodeProtocolVersion, decodeProtocolVersion, init_protocolVersion, capabilitiesEncoder, encodeCapabilities, decodeCapabilities, init_capabilities, leafNodeSources, leafNodeSourceEncoder, encodeLeafNodeSource, decodeLeafNodeSource, init_leafNodeSource, lifetimeEncoder, encodeLifetime, decodeLifetime, defaultLifetime, init_lifetime, leafNodeDataEncoder, encodeLeafNodeData, decodeLeafNodeData, leafNodeInfoKeyPackageEncoder, encodeLeafNodeInfoKeyPackage, leafNodeInfoUpdateOmittedEncoder, encodeLeafNodeInfoUpdateOmitted, leafNodeInfoCommitOmittedEncoder, encodeLeafNodeInfoCommitOmitted, leafNodeInfoOmittedEncoder, encodeLeafNodeInfoOmitted, decodeLeafNodeInfoKeyPackage, decodeLeafNodeInfoUpdateOmitted, decodeLeafNodeInfoCommitOmitted, decodeLeafNodeInfoOmitted, leafNodeInfoUpdateEncoder, encodeLeafNodeInfoUpdate, leafNodeInfoCommitEncoder, encodeLeafNodeInfoCommit, leafNodeInfoEncoder, encodeLeafNodeInfo, decodeLeafNodeInfoUpdate, decodeLeafNodeInfoCommit, decodeLeafNodeInfo, leafNodeTBSEncoder, encodeLeafNodeTBS, leafNodeEncoder, encodeLeafNode, decodeLeafNode, decodeLeafNodeKeyPackage, decodeLeafNodeCommit, decodeLeafNodeUpdate, init_leafNode, keyPackageTBSEncoder, encodeKeyPackageTBS, decodeKeyPackageTBS, keyPackageEncoder, encodeKeyPackage, decodeKeyPackage, init_keyPackage, init_kdf, pskTypes, pskTypeEncoder, encodePskType, decodePskType, resumptionPSKUsages, resumptionPSKUsageEncoder, encodeResumptionPSKUsage, decodeResumptionPSKUsage, encodePskInfoExternal, encodePskInfoResumption, decodePskInfoResumption, pskInfoEncoder, encodePskInfo, decodePskInfo, pskIdEncoder, encodePskId, decodePskId, pskLabelEncoder, encodePskLabel, decodePskLabel, init_presharedkey, addEncoder, encodeAdd, decodeAdd, updateEncoder, encodeUpdate, decodeUpdate, removeEncoder, encodeRemove, decodeRemove, pskEncoder, encodePSK, decodePSK, reinitEncoder, encodeReinit, decodeReinit, externalInitEncoder, encodeExternalInit, decodeExternalInit, groupContextExtensionsEncoder, encodeGroupContextExtensions, decodeGroupContextExtensions, proposalAddEncoder, encodeProposalAdd, proposalUpdateEncoder, encodeProposalUpdate, proposalRemoveEncoder, encodeProposalRemove, proposalPSKEncoder, encodeProposalPSK, proposalReinitEncoder, encodeProposalReinit, proposalExternalInitEncoder, encodeProposalExternalInit, proposalGroupContextExtensionsEncoder, encodeProposalGroupContextExtensions, proposalCustomEncoder, encodeProposalCustom, proposalEncoder, encodeProposal, decodeProposalAdd, decodeProposalUpdate, decodeProposalRemove, decodeProposalPSK, decodeProposalReinit, decodeProposalExternalInit, decodeProposalGroupContextExtensions, decodeProposal, init_proposal, proposalOrRefTypes, proposalOrRefTypeEncoder, encodeProposalOrRefType, decodeProposalOrRefType, proposalOrRefProposalEncoder, encodeProposalOrRefProposal, proposalOrRefProposalRefEncoder, encodeProposalOrRefProposalRef, proposalOrRefEncoder, encodeProposalOrRef, decodeProposalOrRef, init_proposalOrRefType, init_hpke, groupContextEncoder, encodeGroupContext, decodeGroupContext, init_groupContext, nodeTypes, nodeTypeEncoder, encodeNodeType, decodeNodeType, init_nodeType, parentNodeEncoder, encodeParentNode, decodeParentNode, init_parentNode, init_treemath, nodeEncoder, encodeNode, decodeNode, ratchetTreeEncoder, encodeRatchetTree, decodeRatchetTree, init_ratchetTree, leafNodeHashInputEncoder, encodeLeafNodeHashInput, decodeLeafNodeHashInput, parentNodeHashInputEncoder, encodeParentNodeHashInput, decodeParentNodeHashInput, treeHashInputEncoder, encodeTreeHashInput, decodeTreeHashInput, init_treeHash, parentHashInputEncoder, encodeParentHashInput, decodeParentHashInput, init_parentHash, hpkeCiphertextEncoder, encodeHpkeCiphertext, decodeHpkeCiphertext, init_hpkeCiphertext, updatePathNodeEncoder, encodeUpdatePathNode, decodeUpdatePathNode, updatePathEncoder, encodeUpdatePath, decodeUpdatePath, init_updatePath, commitEncoder, encodeCommit, decodeCommit, init_commit, contentTypes, contentTypeEncoder, encodeContentType, decodeContentType, init_contentType, wireformats, wireformatEncoder, encodeWireformat, decodeWireformat, init_wireformat, senderTypes, senderTypeEncoder, encodeSenderType, decodeSenderType, senderEncoder, encodeSender, decodeSender, reuseGuardEncoder, encodeReuseGuard, decodeReuseGuard, senderDataEncoder, encodeSenderData, decodeSenderData, senderDataAADEncoder, encodeSenderDataAAD, decodeSenderDataAAD, init_sender, framedContentApplicationDataEncoder, encodeFramedContentApplicationData, framedContentProposalDataEncoder, encodeFramedContentProposalData, framedContentCommitDataEncoder, encodeFramedContentCommitData, framedContentInfoEncoder, encodeFramedContentInfo, decodeFramedContentApplicationData, decodeFramedContentProposalData, decodeFramedContentCommitData, decodeFramedContentInfo, framedContentEncoder, encodeFramedContent, decodeFramedContent, senderInfoEncoder, encodeSenderInfo, framedContentTBSEncoder, encodeFramedContentTBS, encodeFramedContentAuthDataContent, encodeFramedContentAuthDataCommit, framedContentAuthDataEncoder, encodeFramedContentAuthData, decodeFramedContentAuthDataCommit, init_framedContent, authenticatedContentEncoder, encodeAuthenticatedContent, decodeAuthenticatedContent, authenticatedContentTBMEncoder, encodeAuthenticatedContentTBM, init_authenticatedContent, publicMessageInfoEncoder, encodePublicMessageInfo, publicMessageEncoder, encodePublicMessage, decodePublicMessage, init_publicMessage, init_messageProtectionPublic, init_externalProposal, requiredCapabilitiesEncoder, encodeRequiredCapabilities, decodeRequiredCapabilities, init_requiredCapabilities, defaultAuthenticationService, init_authenticationService, defaultPaddingConfig, init_paddingConfig, defaultKeyPackageEqualityConfig, init_keyPackageEqualityConfig, defaultLifetimeConfig, init_lifetimeConfig, defaultKeyRetentionConfig, init_keyRetentionConfig, groupInfoTBSEncoder, encodeGroupInfoTBS, decodeGroupInfoTBS, groupInfoEncoder, encodeGroupInfo, decodeGroupInfo, init_groupInfo, keyScheduleEncoder, encodeKeySchedule, decodeKeySchedule, init_keySchedule, generationSecretEncoder, decodeGenerationSecret, secretTreeNodeEncoder, decodeSecretTreeNode, secretTreeEncoder, decodeSecretTree, init_secretTree, confirmedTranscriptHashInputEncoder, encodeConfirmedTranscriptHashInput, decodeConfirmedTranscriptHashInput, init_transcriptHash, groupSecretsEncoder, encodeGroupSecrets, decodeGroupSecrets, init_groupSecrets, encryptedGroupSecretsEncoder, encodeEncryptedGroupSecrets, decodeEncryptedGroupSecrets, welcomeEncoder, encodeWelcome, decodeWelcome, init_welcome, init_pathSecrets, privateKeyPathEncoder, decodePrivateKeyPath, init_privateKeyPath, proposalWithSenderEncoder, decodeProposalWithSender, unappliedProposalsEncoder, decodeUnappliedProposals, init_unappliedProposals, emptyPskIndex, init_pskIndex, init_addToMap, defaultClientConfig, init_clientConfig, init_array, stringEncoder, encodeString, decodeString, init_string, activeEncoder, suspendedPendingReinitEncoder, removedFromGroupEncoder, groupActiveStateEncoder, decodeGroupActiveState, init_groupActiveState, epochReceiverDataEncoder, decodeEpochReceiverData, init_epochReceiverData, groupStateEncoder, encodeGroupState, decodeGroupState, groupStateEncoderWithoutTree, encodeGroupStateWithoutTree, emptyProposals, init_clientState, privateMessageEncoder, encodePrivateMessage, decodePrivateMessage, privateContentAADEncoder, encodePrivateContentAAD, decodePrivateContentAAD, init_privateMessage, init_messageProtection, init_createMessage, init_createCommit, init_processMessages, init_makeHashImpl, HpkeError, InvalidParamError, SerializeError, DeserializeError, EncapError, DecapError, ExportError, SealError, OpenError, MessageLimitReachedError, DeriveKeyPairError, NotSupportedError, init_errors, dntGlobals, dntGlobalThis, init_dnt_shims, NativeAlgorithm, init_algorithm, Mode, KemId, KdfId, AeadId, init_identifiers, INPUT_LENGTH_LIMIT, INFO_LENGTH_LIMIT, MINIMUM_PSK_LENGTH, EMPTY, BYTE_TO_BIGINT_256, init_consts, SUITE_ID_HEADER_KEM, init_kemInterface, HPKE_VERSION, HkdfNative, HkdfSha256Native, HkdfSha384Native, HkdfSha512Native, init_hkdf, isCryptoKeyPair, init_misc, LABEL_EAE_PRK, LABEL_SHARED_SECRET, Dhkem, init_dhkem, KEM_USAGES, LABEL_DKP_PRK, LABEL_SK, init_dhkemPrimitives, Bignum, init_bignum, LABEL_CANDIDATE, ORDER_P_256, ORDER_P_384, ORDER_P_521, PKCS8_ALG_ID_P_256, PKCS8_ALG_ID_P_384, PKCS8_ALG_ID_P_521, EC_P_256_PARAMS, EC_P_384_PARAMS, EC_P_521_PARAMS, Ec, init_ec, init_xCryptoKey, init_xCurve, init_hybridkem, AEAD_USAGES, init_aeadEncryptionContext, _endianTestBuffer, _endianTestBytes, isLE2, init_noble, init_hash2, _HMAC, hmac, init_hmac, init_md2, U32_MASK642, _32n2, init_u642, init_sha2, _0n, _1n, _2n, _7n, _256n, _0x71n, SHA3_PI, SHA3_ROTL, _SHA3_IOTA, IOTAS, SHA3_IOTA_H, SHA3_IOTA_L, init_sha3, init_modular, init_curve, init_montgomery, init_mod, AesGcmContext, Aes128Gcm, Aes256Gcm, init_aesGcm, init_exportOnly, init_emitNotSupported, LABEL_SEC, ExporterContextImpl, RecipientExporterContextImpl, SenderExporterContextImpl, init_exporterContext, EncryptionContextImpl, init_encryptionContext, __classPrivateFieldGet, __classPrivateFieldSet, _Mutex_locked, Mutex, init_mutex, __classPrivateFieldGet2, __classPrivateFieldSet2, _RecipientContextImpl_mutex, RecipientContextImpl, init_recipientContext, __classPrivateFieldGet3, __classPrivateFieldSet3, _SenderContextImpl_mutex, SenderContextImpl, init_senderContext, LABEL_BASE_NONCE, LABEL_EXP, LABEL_INFO_HASH, LABEL_KEY, LABEL_PSK_ID_HASH, LABEL_SECRET, SUITE_ID_HEADER_HPKE, CipherSuiteNative, init_cipherSuiteNative, DhkemP256HkdfSha256Native, DhkemP384HkdfSha384Native, DhkemP521HkdfSha512Native, init_dhkemNative, CipherSuite, DhkemP256HkdfSha256, DhkemP384HkdfSha384, DhkemP521HkdfSha512, HkdfSha256, HkdfSha384, HkdfSha512, init_native, ALG_NAME, PKCS8_ALG_ID_X25519, BASE_POINT_X25519, X25519, init_x25519, DhkemX25519HkdfSha256, init_dhkemX25519, PKCS8_ALG_ID_X448, init_x448, init_dhkemX448, init_mod2, init_hpke2, isLE3, wrapCipher, init_utils2, encodeStr, sigma16, sigma32, sigma16_32, sigma32_32, BLOCK_LEN, BLOCK_LEN32, MAX_COUNTER, U32_EMPTY, _XorStreamPRG, createPRG, init_arx, Poly1305, poly1305, init_poly1305, chacha_exports, chacha20orig, chacha20, xchacha20, chacha8, chacha12, ZEROS16, updatePadded, ZEROS32, _poly1305_aead, chacha20poly1305, xchacha20poly1305, rngChacha20, rngChacha8, init_chacha, init_makeAead, init_makeKdfImpl, init_makeDhKem, init_makeHpke, defaultRng, init_rng, crypto3, init_cryptoNode, isLE4, swap32IfBE3, hasHexBuiltin2, hexes2, asciis, Hash, init_utils3, HashMD3, SHA256_IV3, SHA384_IV3, SHA512_IV3, init_md3, U32_MASK643, _32n3, shrSH3, shrSL3, rotrSH3, rotrSL3, rotrBH3, rotrBL3, rotlSH2, rotlSL2, rotlBH2, rotlBL2, add3L3, add3H3, add4L3, add4H3, add5L3, add5H3, init_u643, SHA256_K, SHA256_W, SHA256, K512, SHA512_Kh, SHA512_Kl, SHA512_W_H, SHA512_W_L, SHA512, SHA384, sha2563, sha5122, sha3842, init_sha22, _0n2, _1n2, isPosBig, bitMask, notImplemented, init_utils4, _0n3, _1n3, _2n2, _3n, _4n, _5n, _7n2, _8n, _9n, _16n, isNegativeLE, FIELD_FIELDS, init_modular2, _0n4, _1n4, pointPrecomputes, pointWindowSizes, wNAF, init_curve2, _0n5, _1n5, _2n3, _8n2, PrimeEdwardsPoint, init_edwards, os2ip, _DST_scalar, init_hash_to_curve, _0n6, _1n6, _2n4, init_montgomery2, ed25519_exports, _0n7, _1n7, _2n5, _3n2, _5n2, _8n3, ed25519_CURVE_p, ed25519_CURVE, ED25519_SQRT_M1, Fp, Fn, ed25519Defaults, ed25519, ed25519ctx, ed25519ph, x25519, ELL2_C1, ELL2_C2, ELL2_C3, ELL2_C1_EDWARDS, ed25519_hasher, SQRT_M1, SQRT_AD_MINUS_ONE, INVSQRT_A_MINUS_D, ONE_MINUS_D_SQ, D_MINUS_ONE_SQ, invertSqrt, MAX_255B, bytes255ToNumberLE, _RistrettoPoint, ristretto255, ristretto255_hasher, ED25519_TORSION_SUBGROUP, edwardsToMontgomery, RistrettoPoint, hashToCurve, encodeToCurve, hashToRistretto255, hash_to_ristretto255, init_ed25519, _0n8, _1n8, _2n6, _7n3, _256n2, _0x71n2, SHA3_PI2, SHA3_ROTL2, _SHA3_IOTA2, IOTAS2, SHA3_IOTA_H2, SHA3_IOTA_L2, rotlH, rotlL, Keccak, genShake, shake2562, init_sha32, ed448_exports, ed448_CURVE, E448_CURVE, shake256_114, shake256_64, _1n9, _2n7, _3n3, _4n2, _11n, _22n, _44n, _88n, _223n, Fp2, Fn2, Fp448, Fn448, ED448_DEF, ed448, ed448ph, E448, x448, ELL2_C12, ELL2_J, ed448_hasher, ONE_MINUS_D, ONE_MINUS_TWO_D, SQRT_MINUS_D, INVSQRT_MINUS_D, invertSqrt2, _DecafPoint, decaf448, decaf448_hasher, ED448_TORSION_SUBGROUP, DecafPoint, hashToCurve2, encodeToCurve2, hashToDecaf448, hash_to_decaf448, edwardsToMontgomery2, init_ed448, HMAC, hmac2, init_hmac2, divNearest, DERErr, DER, _0n9, _1n10, _2n8, _3n4, _4n3, init_weierstrass, init_shortw_utils, nist_exports, p256_CURVE, p384_CURVE, p521_CURVE, Fp256, Fp384, Fp521, p256, p256_hasher, p384, p384_hasher, p521, secp256r1, secp384r1, secp521r1, p521_hasher, init_nist, init_makeNobleSignatureImpl, defaultCryptoProvider, init_provider, init_getCiphersuiteImpl, init_resumption, SHA256_K2, SHA256_W2, SHA2_32B, _SHA256, K5122, SHA512_Kh2, SHA512_Kl2, SHA512_W_H2, SHA512_W_L2, SHA2_64B, _SHA512, _SHA384, sha2564, sha5123, sha3843, init_sha23, _HMAC2, hmac3, init_hmac3, init_makeHashImpl2, init_makeNobleSignatureImpl2, BLOCK_SIZE, ZEROS162, ZEROS322, POLY, mul2, swapLE, estimateWindow, GHASH, Polyval, ghash, polyval, init_polyval, BLOCK_SIZE2, BLOCK_SIZE32, EMPTY_BLOCK, POLY2, sbox, rotr32_8, rotl32_8, tableEncoding, xPowers, gcm, _CMAC, cmac, init_aes, init_makeAead2, init_makeKdfImpl2, init_makeDhKem2, init_makeHpke2, init_rng2, nobleCryptoProvider, init_provider2, mlsPublicMessageEncoder, encodeMlsPublicMessage, mlsWelcomeEncoder, encodeMlsWelcome, mlsPrivateMessageEncoder, encodeMlsPrivateMessage, mlsGroupInfoEncoder, encodeMlsGroupInfo, mlsKeyPackageEncoder, encodeMlsKeyPackage, mlsMessageContentEncoder, encodeMlsMessageContent, decodeMlsMessageContent, mlsMessageEncoder, encodeMlsMessage, decodeMlsMessage, init_message, greaseValues, defaultGreaseConfig, init_grease, init_defaultCapabilities, init_src, DEFAULT_CIPHERSUITE, MLSGroupManager, init_mls_group, DOMAIN, NONCE_BYTES3, init_owner_sync, init_mls_delivery_order, init_mls_presend_epoch, dist_exports, init_dist2, DIR_MODE, FILE_MODE, init_secure_file, SYNC_LOCK_STALE_MS, pendingKpPath, init_mls_state, init_mls_kp_pool, PACKAGE, FALLBACK, MAX_LEN, DISALLOWED, init_client_version, CredentialStore, init_credential_store, init_crypto_helpers, STATE_FILE, LEGACY_STATE_FILE, init_state, ACTIVATION_DOMAIN, UUID_RE2, init_transport2, A2ALogGate, init_a2a_log_gate, NOT_A_MEMBER_DETAIL, init_mls_membership_probe, FIRST_DIRTY_DELAY_MS, RETRY_BASE_DELAYS_MS, MAX_RETRY_DELAY_MS, JITTER_FRACTION, HistoryBackupScheduler, init_history_backup_scheduler, FILE_MODE2, init_history_recovery_file, TENANT_ID_PATTERN, DIR_MODE2, FILE_MODE3, HISTORY_RECOVERY_VERIFY_TIMEOUT_MS, VERIFY_TIMEOUT_MESSAGE, HistoryRecoveryVerificationTimeoutError, init_history_recovery_code, ACTIONS, init_decision_reply, KP_BACKOFF_INITIAL_MS, KP_BACKOFF_MAX_MS, KP_RACE_RETRY_MS, KP_RACE_RETRY_LIMIT, consoleLogger, short, WelcomeKeyPackageBackoff, init_welcome_kp_backoff, history_backup_client_exports, HISTORY_RESTORE_TIMEOUT_MS, HISTORY_RESTORE_RESPONSE_MAX_BYTES, HISTORY_ENVELOPE_MIN_BYTES, HISTORY_AAD_PREFIX, UUID_RE3, GENERATION_RESPONSE_KEYS, utf8Encoder, utf8Decoder, HistoryBackupClient, init_history_backup_client, openclaw_compat_exports, defaultImporter, HEARTBEAT_CANDIDATES, AGENT_EVENT_CANDIDATES, TRANSCRIPT_CANDIDATES, _heartbeatFn, _agentEventFn, _transcriptFn, init_openclaw_compat, TOOL_INVOKE_SPAN_NAME, UNCLASSIFIED_ERROR, KNOWN_TOOL_ERROR_CODES, KNOWN_CODES, CLASS_NAME_RE, TOOL_NAME_RE, ERROR_TEXT_CODES, _conversation, init_tool_telemetry, http_handlers_exports, init_http_handlers, mcp_proxy_helpers_exports, init_mcp_proxy_helpers, workspace_handlers_exports, MAX_FILE_SIZE, init_workspace_handlers, ROOM_AGENT_TYPES, CREDENTIAL_MESSAGE_TYPES, CATCHUP_MESSAGE_TYPES, POLL_INTERVAL_MS, RECONNECT_BASE_MS, UUID_RE4, RECONNECT_MAX_MS, PENDING_POLL_INTERVAL_MS, HISTORY_RESTORE_TIMEOUT_MS2, HISTORY_UPLOAD_TIMEOUT_MS, CANONICAL_TIMESTAMP_RE, OUTBOUND_DEDUPE_WINDOW_MS, OUTBOUND_DEDUPE_MAX_SUPPRESS_MS, OUTBOUND_DEDUPE_MAX, OUTBOUND_DEDUPE_TYPES, RETRY_CANDIDATE_TTL_MS, RETRY_CANDIDATE_MAX, _turnConversation, PERSON_INVOLVED_WINDOW_MS, ATTESTED_INBOUND_MAX, UNMAPPED_RECONCILE_COOLDOWN_MS, TOPIC_ID_RE, ROOM_FULFIL_COOLDOWN_MS, SecureChannel, init_channel, init_types, DEFAULT_API_URL, DEFAULT_HTTP_PORT, init_account_config, init_lifecycle, _ocRuntime, _channels, agentVaultPlugin, init_openclaw_plugin, init_gateway_send, init_llm_response_parser, OPENROUTER_PRICING, init_llm_pricing_openrouter, LEGACY_PRICING, PRICING, init_llm_cost, traceStore, init_fetch_interceptor, init_tool_audit, init_harness_compat, managedRoutesRequested, init_openclaw_entry, util, objectUtil, ZodParsedType, getParsedType, init_util, ZodIssueCode, ZodError, init_ZodError, errorMap, en_default, init_en, overrideErrorMap, init_errors2, makeIssue, ParseStatus, INVALID, DIRTY, OK, isAborted, isDirty, isValid, isAsync, init_parseUtil, init_typeAliases, errorUtil, init_errorUtil, ParseInputLazyPath, handleResult, ZodType, cuidRegex, cuid2Regex, ulidRegex, uuidRegex, nanoidRegex, jwtRegex, durationRegex, emailRegex, _emojiRegex, emojiRegex, ipv4Regex, ipv4CidrRegex, ipv6Regex, ipv6CidrRegex, base64Regex, base64urlRegex, dateRegexSource, dateRegex, ZodString, ZodNumber, ZodBigInt, ZodBoolean, ZodDate, ZodSymbol, ZodUndefined, ZodNull, ZodAny, ZodUnknown, ZodNever, ZodVoid, ZodArray, ZodObject, ZodUnion, getDiscriminator, ZodDiscriminatedUnion, ZodIntersection, ZodTuple, ZodRecord, ZodMap, ZodSet, ZodFunction, ZodLazy, ZodLiteral, ZodEnum, ZodNativeEnum, ZodPromise, ZodEffects, ZodOptional, ZodNullable, ZodDefault, ZodCatch, ZodNaN, ZodBranded, ZodPipeline, ZodReadonly, late, ZodFirstPartyTypeKind, stringType, numberType, nanType, bigIntType, booleanType, dateType, symbolType, undefinedType, nullType, anyType, unknownType, neverType, voidType, arrayType, objectType, strictObjectType, unionType, discriminatedUnionType, intersectionType, tupleType, recordType, mapType, setType, functionType, lazyType, literalType, enumType, nativeEnumType, promiseType, effectsType, optionalType, nullableType, preprocessType, pipelineType, init_types2, init_external, init_v3, util_exports, Cached, EVALUATING, captureStackTrace, allowsEval, getParsedType2, propertyKeyTypes, primitiveTypes, NUMBER_FORMAT_RANGES, BIGINT_FORMAT_RANGES, highSurrogate, Class, installing, broke, breaker, CONSTANT_CATCH, init_util2, _a2, _zodDesc, _E, $ZodAsyncError, $ZodEncodeError, globalConfig, init_core, _messageDesc, _issuesDesc, _installedToString, initializer, $ZodError, $ZodRealError, init_errors3, _parse, parse, _parseAsync, parseAsync, _safeParse, safeParse, _safeParseAsync, safeParseAsync, COMPILE_INVALID, COMPILE_FALLBACK, validate, validateAsync, _encode, _decode, _encodeAsync, _decodeAsync, _safeEncode, _safeDecode, _safeEncodeAsync, _safeDecodeAsync, init_parse, cuid, cuid2, ulid, xid, ksuid, nanoid, duration, guid, uuid, email, _emoji, ipv4, ipv6, cidrv4, cidrv6, base64, base64url, httpProtocol, e164, dateSource, date, anyString, integer, number, boolean, _null, lowercase, uppercase, init_regexes, $ZodCheck, _whenHasLength, numericOriginMap, $ZodCheckLessThan, $ZodCheckGreaterThan, $ZodCheckMultipleOf, $ZodCheckNumberFormat, $ZodCheckMaxLength, $ZodCheckMinLength, $ZodCheckLengthEquals, $ZodCheckStringFormat, $ZodCheckRegex, $ZodCheckLowerCase, $ZodCheckUpperCase, $ZodCheckIncludes, $ZodCheckStartsWith, $ZodCheckEndsWith, $ZodCheckOverwrite, init_checks, Doc, init_doc, version, init_versions, $ZodType, toStandardResult, $ZodString, $ZodStringFormat, $ZodGUID, $ZodUUID, $ZodEmail, URL_BAD_FORMAT, URL_UNPARSEABLE, asciiTabOrNewline, $ZodURL, $ZodEmoji, $ZodNanoID, $ZodCUID, $ZodCUID2, $ZodULID, $ZodXID, $ZodKSUID, $ZodISODateTime, $ZodISODate, $ZodISOTime, $ZodISODuration, $ZodIPv4, ipv6Alphabet, $ZodIPv6, $ZodCIDRv4, $ZodCIDRv6, base64Charset, $ZodBase64, base64urlCharset, $ZodBase64URL, $ZodE164, $ZodJWT, $ZodNumber, $ZodNumberFormat, $ZodBoolean, $ZodNull, $ZodUnknown, $ZodNever, arraySize, $ZodArray, NO_SYMBOL_KEYS, $ZodObject, $ZodObjectJIT, $ZodUnion, $ZodDiscriminatedUnion, $ZodIntersection, $ZodRecord, $ZodEnum, $ZodLiteral, $ZodTransform, $ZodOptional, $ZodExactOptional, $ZodNullable, $ZodDefault, $ZodPrefault, $ZodNonOptional, $ZodCatch, $ZodPipe, $ZodPreprocess, $ZodReadonly, $ZodCustom, init_schemas, $ZodCyclicError, STATE, NO_ISSUES, recursive, NONE, ASSUMED, PROVEN, handoff, open4, memo, init_memoizer, error, init_en2, init_locales, _a3, $ZodRegistry, globalRegistry, init_registries, init_compile, init_api, FOLDABLE_KEYS, UNION_KEYS, createToJSONSchemaMethod, createStandardJSONSchemaMethod, init_to_json_schema, narrowMin, narrowMax, narrowBoth, addDivisor, addPattern, intersectMime, setFormat, minContributor, maxContributor, formatContributor, contributors, formatMap, exactPatterns, exactPattern, stringProcessor, numberProcessor, booleanProcessor, bigintProcessor, symbolProcessor, nullProcessor, undefinedProcessor, voidProcessor, neverProcessor, anyProcessor, unknownProcessor, dateProcessor, enumProcessor, literalProcessor, nanProcessor, templateLiteralProcessor, fileProcessor, successProcessor, customProcessor, functionProcessor, transformProcessor, mapProcessor, setProcessor, arrayProcessor, objectProcessor, unionProcessor, intersectionProcessor, tupleProcessor, pendingRecords, recordProcessor, nullableProcessor, nonoptionalProcessor, UNREPRESENTABLE_DEFAULT, defaultProcessor, prefaultProcessor, catchProcessor, pipeProcessor, readonlyProcessor, promiseProcessor, optionalProcessor, lazyProcessor, allProcessors, init_json_schema_processors, init_json_schema, init_core2, init_parse2, ZodMiniType, ZodMiniObject, init_schemas2, init_checks2, init_iso, init_coerce, init_external2, init_v4_mini, init_zod_compat, init_checks3, _installedErrorProtos, initializer2, ZodRealError, init_errors4, parse2, parseAsync2, safeParse3, safeParseAsync3, encode3, decode2, encodeAsync2, decodeAsync2, safeEncode2, safeDecode2, safeEncodeAsync2, safeDecodeAsync2, init_parse3, ZodType2, _ZodString, ZodString2, ZodStringFormat, ZodISODateTime, ZodISODate, ZodISOTime, ZodISODuration, ZodEmail, ZodGUID, ZodUUID, ZodURL, ZodEmoji, ZodNanoID, ZodCUID, ZodCUID2, ZodULID, ZodXID, ZodKSUID, ZodIPv4, ZodIPv6, ZodCIDRv4, ZodCIDRv6, ZodBase64, ZodBase64URL, ZodE164, ZodJWT, ZodNumber2, ZodNumberFormat, ZodBoolean2, ZodNull2, ZodUnknown2, ZodNever2, ZodArray2, ZodObject2, ZodUnion2, ZodDiscriminatedUnion2, ZodIntersection2, ZodRecord2, ZodEnum2, ZodLiteral2, ZodTransform, ZodOptional2, ZodExactOptional, ZodNullable2, ZodDefault2, ZodPrefault, ZodNonOptional, ZodCatch2, ZodPipe, ZodPreprocess, ZodReadonly2, ZodCustom, init_schemas3, ZodFirstPartyTypeKind2, init_compat, iso_exports2, init_iso2, init_coerce2, init_external3, init_classic, init_v4, LATEST_PROTOCOL_VERSION, DEFAULT_NEGOTIATED_PROTOCOL_VERSION, SUPPORTED_PROTOCOL_VERSIONS, RELATED_TASK_META_KEY, JSONRPC_VERSION, AssertObjectSchema, ProgressTokenSchema, CursorSchema, TaskCreationParamsSchema, TaskMetadataSchema, RelatedTaskMetadataSchema, RequestMetaSchema, BaseRequestParamsSchema, TaskAugmentedRequestParamsSchema, isTaskAugmentedRequestParams, RequestSchema, NotificationsParamsSchema, NotificationSchema, ResultSchema, RequestIdSchema, JSONRPCRequestSchema, isJSONRPCRequest, JSONRPCNotificationSchema, isJSONRPCNotification, JSONRPCResultResponseSchema, isJSONRPCResultResponse, ErrorCode, JSONRPCErrorResponseSchema, isJSONRPCErrorResponse, JSONRPCMessageSchema, JSONRPCResponseSchema, EmptyResultSchema, CancelledNotificationParamsSchema, CancelledNotificationSchema, IconSchema, IconsSchema, BaseMetadataSchema, ImplementationSchema, FormElicitationCapabilitySchema, ElicitationCapabilitySchema, ClientTasksCapabilitySchema, ServerTasksCapabilitySchema, ClientCapabilitiesSchema, InitializeRequestParamsSchema, InitializeRequestSchema, isInitializeRequest, ServerCapabilitiesSchema, InitializeResultSchema, InitializedNotificationSchema, PingRequestSchema, ProgressSchema, ProgressNotificationParamsSchema, ProgressNotificationSchema, PaginatedRequestParamsSchema, PaginatedRequestSchema, PaginatedResultSchema, TaskStatusSchema, TaskSchema, CreateTaskResultSchema, TaskStatusNotificationParamsSchema, TaskStatusNotificationSchema, GetTaskRequestSchema, GetTaskResultSchema, GetTaskPayloadRequestSchema, GetTaskPayloadResultSchema, ListTasksRequestSchema, ListTasksResultSchema, CancelTaskRequestSchema, CancelTaskResultSchema, ResourceContentsSchema, TextResourceContentsSchema, Base64Schema, BlobResourceContentsSchema, RoleSchema, AnnotationsSchema, ResourceSchema, ResourceTemplateSchema, ListResourcesRequestSchema, ListResourcesResultSchema, ListResourceTemplatesRequestSchema, ListResourceTemplatesResultSchema, ResourceRequestParamsSchema, ReadResourceRequestParamsSchema, ReadResourceRequestSchema, ReadResourceResultSchema, ResourceListChangedNotificationSchema, SubscribeRequestParamsSchema, SubscribeRequestSchema, UnsubscribeRequestParamsSchema, UnsubscribeRequestSchema, ResourceUpdatedNotificationParamsSchema, ResourceUpdatedNotificationSchema, PromptArgumentSchema, PromptSchema, ListPromptsRequestSchema, ListPromptsResultSchema, GetPromptRequestParamsSchema, GetPromptRequestSchema, TextContentSchema, ImageContentSchema, AudioContentSchema, ToolUseContentSchema, EmbeddedResourceSchema, ResourceLinkSchema, ContentBlockSchema, PromptMessageSchema, GetPromptResultSchema, PromptListChangedNotificationSchema, ToolAnnotationsSchema, ToolExecutionSchema, ToolSchema, ListToolsRequestSchema, ListToolsResultSchema, CallToolResultSchema, CompatibilityCallToolResultSchema, CallToolRequestParamsSchema, CallToolRequestSchema, ToolListChangedNotificationSchema, ListChangedOptionsBaseSchema, LoggingLevelSchema, SetLevelRequestParamsSchema, SetLevelRequestSchema, LoggingMessageNotificationParamsSchema, LoggingMessageNotificationSchema, ModelHintSchema, ModelPreferencesSchema, ToolChoiceSchema, ToolResultContentSchema, SamplingContentSchema, SamplingMessageContentBlockSchema, SamplingMessageSchema, CreateMessageRequestParamsSchema, CreateMessageRequestSchema, CreateMessageResultSchema, CreateMessageResultWithToolsSchema, BooleanSchemaSchema, StringSchemaSchema, NumberSchemaSchema, UntitledSingleSelectEnumSchemaSchema, TitledSingleSelectEnumSchemaSchema, LegacyTitledEnumSchemaSchema, SingleSelectEnumSchemaSchema, UntitledMultiSelectEnumSchemaSchema, TitledMultiSelectEnumSchemaSchema, MultiSelectEnumSchemaSchema, EnumSchemaSchema, PrimitiveSchemaDefinitionSchema, ElicitRequestFormParamsSchema, ElicitRequestURLParamsSchema, ElicitRequestParamsSchema, ElicitRequestSchema, ElicitationCompleteNotificationParamsSchema, ElicitationCompleteNotificationSchema, ElicitResultSchema, ResourceTemplateReferenceSchema, PromptReferenceSchema, CompleteRequestParamsSchema, CompleteRequestSchema, CompleteResultSchema, RootSchema, ListRootsRequestSchema, ListRootsResultSchema, RootsListChangedNotificationSchema, ClientRequestSchema, ClientNotificationSchema, ClientResultSchema, ServerRequestSchema, ServerNotificationSchema, ServerResultSchema, McpError, UrlElicitationRequiredError, init_types3, init_interfaces, ignoreOverride, defaultOptions, getDefaultOptions, init_Options, getRefs, init_Refs, init_errorMessages, getRelativePath, init_getRelativePath, init_any, init_array2, init_bigint, init_boolean, init_branded, parseCatchDef, init_catch, integerDateParser, init_date, init_default, init_effects, init_enum, isJsonSchema7AllOfType, init_intersection, init_literal, emojiRegex2, zodPatterns, ALPHA_NUMERIC, init_string2, init_record, init_map, init_nativeEnum, init_never, init_null, primitiveMappings, asAnyOf, init_union, init_nullable, init_number2, init_object, parseOptionalDef, init_optional2, parsePipelineDef, init_pipeline, init_promise, init_set, init_tuple, init_undefined, init_unknown, parseReadonlyDef, init_readonly, selectParser, init_selectParser, get$ref, addMeta, init_parseDef, init_parseTypes, zodToJsonSchema, init_zodToJsonSchema, init_esm, init_zod_json_schema_compat, DEFAULT_REQUEST_TIMEOUT_MSEC, Protocol, init_protocol, require_code, require_scope, require_codegen, require_util, require_names, require_errors, require_boolSchema, require_rules, require_applicability, require_dataType, require_defaults, require_code2, require_keyword, require_subschema, require_fast_deep_equal, require_json_schema_traverse, require_resolve, require_validate, require_validation_error, require_ref_error, require_compile, require_data, require_utils, require_schemes, require_fast_uri, require_uri, require_core, require_id, require_ref, require_core2, require_limitNumber, require_multipleOf, require_ucs2length, require_limitLength, require_pattern, require_limitProperties, require_required, require_limitItems, require_equal, require_uniqueItems, require_const, require_enum, require_validation, require_additionalItems, require_items, require_prefixItems, require_items2020, require_contains, require_dependencies, require_propertyNames, require_additionalProperties, require_properties, require_patternProperties, require_not, require_anyOf, require_oneOf, require_allOf, require_if, require_thenElse, require_applicator, require_format, require_format2, require_metadata, require_draft7, require_types, require_discriminator, require_json_schema_draft_07, require_ajv, require_formats, require_limit, require_dist, import_ajv, import_ajv_formats, AjvJsonSchemaValidator, init_ajv_provider, ExperimentalServerTasks, init_server, init_helpers, Server, init_server2, COMPLETABLE_SYMBOL, McpZodTypeKind, init_completable, init_uriTemplate, TOOL_NAME_REGEX, init_toolNameValidation, ExperimentalMcpServerTasks, init_mcp_server, init_zod, McpServer, EMPTY_OBJECT_JSON_SCHEMA, EMPTY_COMPLETION_RESULT, init_mcp, RequestError, toRequestError, GlobalRequest, Request2, newHeadersFromIncoming, wrapBodyStream, newRequestFromIncoming, getRequestCache, requestCache, incomingKey, urlKey, headersKey, abortControllerKey, getAbortController, requestPrototype, newRequest, responseCache, getResponseCache, cacheKey, GlobalResponse, Response2, buildOutgoingHttpHeaders, X_ALREADY_SENT, outgoingEnded, handleRequestError, handleFetchError, handleResponseError, flushHeaders, responseViaCache, isPromise, responseViaResponseObject, getRequestListener, init_dist22, require_content_type, import_content_type, init_mediaType, DEFAULT_MAX_REQUEST_BODY_SIZE, MAX_BATCH_SIZE, init_requestBody, DEFAULT_SSE_KEEP_ALIVE_MS, MAX_TIMER_DELAY_MS, init_sseKeepAlive, WebStandardStreamableHTTPServerTransport, init_webStandardStreamableHttp, StreamableHTTPServerTransport, init_streamableHttp, AgentVaultMcpServer, init_mcp_server2, init_mcp_handlers, init_skill_manifest, init_skill_invoker, spanBuffer, init_skill_telemetry, PolicyEnforcer, init_policy_enforcer, VERSION, init_index;
|
|
17685
17806
|
var init_dist = __esm({
|
|
17686
17807
|
async "../plugin/dist/index.js"() {
|
|
17687
17808
|
"use strict";
|
|
@@ -70153,6 +70274,7 @@ var init_dist = __esm({
|
|
|
70153
70274
|
init_mls_membership_probe = __esm2({
|
|
70154
70275
|
"src/mls-membership-probe.ts"() {
|
|
70155
70276
|
"use strict";
|
|
70277
|
+
NOT_A_MEMBER_DETAIL = "Not authorized for this MLS group";
|
|
70156
70278
|
}
|
|
70157
70279
|
});
|
|
70158
70280
|
init_history_backup_scheduler = __esm2({
|
|
@@ -70671,6 +70793,55 @@ var init_dist = __esm({
|
|
|
70671
70793
|
_transcriptFn = null;
|
|
70672
70794
|
}
|
|
70673
70795
|
});
|
|
70796
|
+
init_tool_telemetry = __esm2({
|
|
70797
|
+
"src/tool-telemetry.ts"() {
|
|
70798
|
+
"use strict";
|
|
70799
|
+
TOOL_INVOKE_SPAN_NAME = "ai.agent.tool.invoke";
|
|
70800
|
+
UNCLASSIFIED_ERROR = "unclassified";
|
|
70801
|
+
KNOWN_TOOL_ERROR_CODES = [
|
|
70802
|
+
"relay_not_connected",
|
|
70803
|
+
"mls_group_not_initialized",
|
|
70804
|
+
"mls_encrypt_failed",
|
|
70805
|
+
"room_not_found",
|
|
70806
|
+
"a2a_channel_not_found",
|
|
70807
|
+
"channel_not_ready",
|
|
70808
|
+
"channel_not_started",
|
|
70809
|
+
"no_active_sessions",
|
|
70810
|
+
"no_conversation_ready",
|
|
70811
|
+
"blocked_by_policy",
|
|
70812
|
+
"unknown_target",
|
|
70813
|
+
"unsupported_destination",
|
|
70814
|
+
"delivery_timeout",
|
|
70815
|
+
"delivery_cancelled",
|
|
70816
|
+
"delivery_failed",
|
|
70817
|
+
"ambiguous_target",
|
|
70818
|
+
"no_receipt",
|
|
70819
|
+
"invalid_request",
|
|
70820
|
+
UNCLASSIFIED_ERROR
|
|
70821
|
+
];
|
|
70822
|
+
KNOWN_CODES = new Set(KNOWN_TOOL_ERROR_CODES);
|
|
70823
|
+
CLASS_NAME_RE = /^(?:[A-Za-z][A-Za-z0-9_]{0,47})?(?:Error|Exception)$/;
|
|
70824
|
+
TOOL_NAME_RE = /^[A-Za-z0-9_.:-]{1,64}$/;
|
|
70825
|
+
ERROR_TEXT_CODES = [
|
|
70826
|
+
[/relay socket is not open/, "relay_not_connected"],
|
|
70827
|
+
[/has no initialized MLS group/, "mls_group_not_initialized"],
|
|
70828
|
+
[/^MLS encrypt failed/, "mls_encrypt_failed"],
|
|
70829
|
+
[/^Room .+ not found$/, "room_not_found"],
|
|
70830
|
+
[/^No A2A channel found|^A2A channel .+ not found$/, "a2a_channel_not_found"],
|
|
70831
|
+
[/^Channel is not ready$|^Channel is in \w+ state$/, "channel_not_ready"],
|
|
70832
|
+
[/^AgentVault channel not connected$|^Channel not started$/, "channel_not_started"],
|
|
70833
|
+
[/^No active sessions$/, "no_active_sessions"],
|
|
70834
|
+
[/^No conversation is ready to receive/, "no_conversation_ready"],
|
|
70835
|
+
[/^Message blocked by scan rule/, "blocked_by_policy"],
|
|
70836
|
+
[/^Unknown target kind$/, "unknown_target"],
|
|
70837
|
+
[/can only be sent to owner|cannot be sent to A2A targets/, "unsupported_destination"],
|
|
70838
|
+
[/^Delivery timed out$/, "delivery_timeout"],
|
|
70839
|
+
[/^Delivery cancelled$/, "delivery_cancelled"],
|
|
70840
|
+
[/^Delivery failed$/, "delivery_failed"]
|
|
70841
|
+
];
|
|
70842
|
+
_conversation = new AsyncLocalStorage();
|
|
70843
|
+
}
|
|
70844
|
+
});
|
|
70674
70845
|
http_handlers_exports = {};
|
|
70675
70846
|
__export2(http_handlers_exports, {
|
|
70676
70847
|
handleActionRequest: () => handleActionRequest,
|
|
@@ -70685,6 +70856,7 @@ var init_dist = __esm({
|
|
|
70685
70856
|
"src/http-handlers.ts"() {
|
|
70686
70857
|
"use strict";
|
|
70687
70858
|
init_owner_routing();
|
|
70859
|
+
init_tool_telemetry();
|
|
70688
70860
|
}
|
|
70689
70861
|
});
|
|
70690
70862
|
mcp_proxy_helpers_exports = {};
|
|
@@ -70765,7 +70937,7 @@ var init_dist = __esm({
|
|
|
70765
70937
|
OUTBOUND_DEDUPE_TYPES = /* @__PURE__ */ new Set(["text", "status_alert", "artifact", "attachment"]);
|
|
70766
70938
|
RETRY_CANDIDATE_TTL_MS = 6e4;
|
|
70767
70939
|
RETRY_CANDIDATE_MAX = 32;
|
|
70768
|
-
_turnConversation = new
|
|
70940
|
+
_turnConversation = new AsyncLocalStorage2();
|
|
70769
70941
|
PERSON_INVOLVED_WINDOW_MS = 5 * 6e4;
|
|
70770
70942
|
ATTESTED_INBOUND_MAX = 64;
|
|
70771
70943
|
UNMAPPED_RECONCILE_COOLDOWN_MS = 6e4;
|
|
@@ -71132,6 +71304,119 @@ ${text}`;
|
|
|
71132
71304
|
console.warn("[SecureChannel] failed to post auth_failed:", err);
|
|
71133
71305
|
}
|
|
71134
71306
|
}
|
|
71307
|
+
/**
|
|
71308
|
+
* Ask the PUBLIC status endpoint what this device is right now. Used to
|
|
71309
|
+
* CONFIRM a credential rejection before acting on it — a 403 on its own
|
|
71310
|
+
* cannot tell "revoked" from "paused by its owner" (both are non-ACTIVE to
|
|
71311
|
+
* get_device_auth), and treating a pause as a revoke is what removed
|
|
71312
|
+
* loopita's launchd service on 2026-10-25.
|
|
71313
|
+
*
|
|
71314
|
+
* Only two answers are terminal: REVOKED, and a deleted row (404 whose
|
|
71315
|
+
* JSON `detail` is exactly get_device_or_404's "Device not found" — any
|
|
71316
|
+
* other 404 is something in the way, not proof). Everything unreadable or inconclusive (network, 5xx, 429,
|
|
71317
|
+
* PENDING, an ACTIVE device answering 403) is `unknown`, which callers MUST
|
|
71318
|
+
* treat as transient: never terminal, never an uninstall, never a banner.
|
|
71319
|
+
*/
|
|
71320
|
+
async _readDeviceStanding() {
|
|
71321
|
+
const deviceId = this._deviceId ?? this._persisted?.deviceId;
|
|
71322
|
+
if (!deviceId) return { kind: "unknown", why: "no device id" };
|
|
71323
|
+
try {
|
|
71324
|
+
const st = await pollDeviceStatus(this.config.apiUrl, deviceId);
|
|
71325
|
+
if (!st || st.rateLimited) return { kind: "unknown", why: "rate limited" };
|
|
71326
|
+
if (st.status === "SUSPENDED") return { kind: "suspended" };
|
|
71327
|
+
if (st.status === "REVOKED") return { kind: "gone", reason: "device_revoked" };
|
|
71328
|
+
if (st.status === "ACTIVE" || st.status === "APPROVED") return { kind: "active" };
|
|
71329
|
+
return { kind: "unknown", why: `status ${String(st.status)}` };
|
|
71330
|
+
} catch (err) {
|
|
71331
|
+
const e7 = err;
|
|
71332
|
+
if (e7?.httpStatus === 404) {
|
|
71333
|
+
try {
|
|
71334
|
+
const parsed = JSON.parse(e7.body ?? "");
|
|
71335
|
+
if (parsed?.detail === _SecureChannel.DEVICE_DELETED_DETAIL) {
|
|
71336
|
+
return { kind: "gone", reason: "device_deleted" };
|
|
71337
|
+
}
|
|
71338
|
+
} catch {
|
|
71339
|
+
}
|
|
71340
|
+
}
|
|
71341
|
+
return { kind: "unknown", why: err instanceof Error ? err.message : String(err) };
|
|
71342
|
+
}
|
|
71343
|
+
}
|
|
71344
|
+
/**
|
|
71345
|
+
* A credential path answered 403 (today: /auth/reissue). Confirm before
|
|
71346
|
+
* concluding anything:
|
|
71347
|
+
* - REVOKED / deleted -> terminal: re_enroll health report + `auth_failed`
|
|
71348
|
+
* carrying `deviceGone: true` (the ONLY verdict the
|
|
71349
|
+
* bridges' self-uninstall acts on).
|
|
71350
|
+
* - SUSPENDED -> suspended-wait (idle, keep polling, resume).
|
|
71351
|
+
* - anything else -> transient; nothing is emitted or reported.
|
|
71352
|
+
* Already paused => stay paused without another status read: the
|
|
71353
|
+
* suspended-wait poll owns that question and will see a later revoke.
|
|
71354
|
+
*/
|
|
71355
|
+
async _confirmForbidden(source) {
|
|
71356
|
+
if (this._suspended) return "suspended";
|
|
71357
|
+
const standing = await this._readDeviceStanding();
|
|
71358
|
+
if (standing.kind === "gone") {
|
|
71359
|
+
console.warn(
|
|
71360
|
+
`[SecureChannel] ${source}: 403 confirmed by the status endpoint (${standing.reason}) \u2014 terminal`
|
|
71361
|
+
);
|
|
71362
|
+
this._authFailedThisSession = true;
|
|
71363
|
+
await this._postAuthFailedToBackend(standing.reason);
|
|
71364
|
+
this.emit("auth_failed", { reason: standing.reason, deviceGone: true });
|
|
71365
|
+
return "gone";
|
|
71366
|
+
}
|
|
71367
|
+
if (standing.kind === "suspended") {
|
|
71368
|
+
this._enterSuspendedWait(source);
|
|
71369
|
+
return "suspended";
|
|
71370
|
+
}
|
|
71371
|
+
console.warn(
|
|
71372
|
+
`[SecureChannel] ${source}: 403 but the device is not confirmed revoked (${standing.kind === "unknown" ? standing.why : standing.kind}) \u2014 treating as transient`
|
|
71373
|
+
);
|
|
71374
|
+
return "transient";
|
|
71375
|
+
}
|
|
71376
|
+
/** The backend's exact detail for an inactive (paused/revoked/deleted) device. */
|
|
71377
|
+
static INACTIVE_DEVICE_DETAIL = "Device not found or not active";
|
|
71378
|
+
/** get_device_or_404's exact detail — the only 404 that means "row deleted". */
|
|
71379
|
+
static DEVICE_DELETED_DETAIL = "Device not found";
|
|
71380
|
+
/**
|
|
71381
|
+
* After a TRANSIENT inactive-403 verdict, how long before another 403 may
|
|
71382
|
+
* re-read the status endpoint. Long enough that a burst cannot trip the
|
|
71383
|
+
* 1-per-5s limiter (which would itself read as "unknown"); short enough that
|
|
71384
|
+
* a revoke behind an outage is still noticed within the session (dr-evil Q1).
|
|
71385
|
+
*/
|
|
71386
|
+
static INACTIVE_403_RECHECK_MS = 3e4;
|
|
71387
|
+
/** Read a FastAPI error `detail` without consuming the caller's body. */
|
|
71388
|
+
async _errorDetail(resp) {
|
|
71389
|
+
try {
|
|
71390
|
+
const body = await resp.clone().json();
|
|
71391
|
+
return typeof body?.detail === "string" ? body.detail : null;
|
|
71392
|
+
} catch {
|
|
71393
|
+
return null;
|
|
71394
|
+
}
|
|
71395
|
+
}
|
|
71396
|
+
// One confirmation per WS session, shared by every caller: a burst of 403s
|
|
71397
|
+
// (the open handler fires several REST calls at once) must not turn into a
|
|
71398
|
+
// burst of status reads against a 1-per-5s rate limit. Reset in _connect.
|
|
71399
|
+
_inactive403Check = null;
|
|
71400
|
+
_inactive403RetryAt = 0;
|
|
71401
|
+
/**
|
|
71402
|
+
* A REST call answered 403 "Device not found or not active". With the
|
|
71403
|
+
* companion backend change this is how EVERY inactive-device auth failure
|
|
71404
|
+
* arrives (401 now means a bad token only, so `_authedFetch`'s reissue never
|
|
71405
|
+
* runs for it). Same rule as the reissue path: confirm, then act.
|
|
71406
|
+
*/
|
|
71407
|
+
_confirmInactive403(source) {
|
|
71408
|
+
if (this._inactive403Check) return this._inactive403Check;
|
|
71409
|
+
if (Date.now() < this._inactive403RetryAt) return Promise.resolve("transient");
|
|
71410
|
+
const check2 = this._confirmForbidden(source).then((verdict) => {
|
|
71411
|
+
if (verdict === "transient" && this._inactive403Check === check2) {
|
|
71412
|
+
this._inactive403Check = null;
|
|
71413
|
+
this._inactive403RetryAt = Date.now() + _SecureChannel.INACTIVE_403_RECHECK_MS;
|
|
71414
|
+
}
|
|
71415
|
+
return verdict;
|
|
71416
|
+
});
|
|
71417
|
+
this._inactive403Check = check2;
|
|
71418
|
+
return check2;
|
|
71419
|
+
}
|
|
71135
71420
|
/**
|
|
71136
71421
|
* Proactively reissue the persisted device JWT when its remaining lifetime
|
|
71137
71422
|
* is under 30 days. Called before each WebSocket connect attempt so the
|
|
@@ -71150,6 +71435,9 @@ ${text}`;
|
|
|
71150
71435
|
* than read back off `_authFailedThisSession`, whose lifetime is reset per
|
|
71151
71436
|
* connect and is easy to get subtly wrong.
|
|
71152
71437
|
*/
|
|
71438
|
+
//
|
|
71439
|
+
// 2026-10-25: a TRUE return now also covers "paused by its owner" (a 403
|
|
71440
|
+
// confirmed SUSPENDED). The caller tells the two apart by `_suspended`.
|
|
71153
71441
|
async _maybeReissueDeviceJwt() {
|
|
71154
71442
|
const jwt2 = this._persisted?.deviceJwt ?? this._deviceJwt;
|
|
71155
71443
|
if (!jwt2) return false;
|
|
@@ -71177,12 +71465,16 @@ ${text}`;
|
|
|
71177
71465
|
}
|
|
71178
71466
|
return false;
|
|
71179
71467
|
}
|
|
71180
|
-
if (resp.status ===
|
|
71468
|
+
if (resp.status === 403) {
|
|
71469
|
+
console.warn("[SecureChannel] reissue rejected (403); confirming device status");
|
|
71470
|
+
const verdict = await this._confirmForbidden("reissue_forbidden");
|
|
71471
|
+
return verdict !== "transient";
|
|
71472
|
+
}
|
|
71473
|
+
if (resp.status === 401) {
|
|
71181
71474
|
console.warn(`[SecureChannel] reissue rejected (${resp.status}); credentials need attention`);
|
|
71182
71475
|
this._authFailedThisSession = true;
|
|
71183
|
-
|
|
71184
|
-
|
|
71185
|
-
this.emit("auth_failed", { reason });
|
|
71476
|
+
await this._postAuthFailedToBackend("device_jwt_expired");
|
|
71477
|
+
this.emit("auth_failed", { reason: "device_jwt_expired", deviceGone: false });
|
|
71186
71478
|
return true;
|
|
71187
71479
|
}
|
|
71188
71480
|
console.warn(`[SecureChannel] reissue ${resp.status}; keeping current jwt`);
|
|
@@ -71241,13 +71533,17 @@ ${text}`;
|
|
|
71241
71533
|
};
|
|
71242
71534
|
resp = await fetch(url22, { ...init, headers: retryHeaders });
|
|
71243
71535
|
}
|
|
71244
|
-
} else if (reissueResp.status ===
|
|
71536
|
+
} else if (reissueResp.status === 403) {
|
|
71537
|
+
await this._confirmForbidden("reissue_forbidden");
|
|
71538
|
+
} else if (reissueResp.status === 401) {
|
|
71245
71539
|
this._authFailedThisSession = true;
|
|
71246
|
-
|
|
71247
|
-
|
|
71248
|
-
this.emit("auth_failed", { reason });
|
|
71540
|
+
await this._postAuthFailedToBackend("device_jwt_expired");
|
|
71541
|
+
this.emit("auth_failed", { reason: "device_jwt_expired", deviceGone: false });
|
|
71249
71542
|
}
|
|
71250
71543
|
}
|
|
71544
|
+
if (resp.status === 403 && await this._errorDetail(resp) === _SecureChannel.INACTIVE_DEVICE_DETAIL) {
|
|
71545
|
+
await this._confirmInactive403("rest_forbidden");
|
|
71546
|
+
}
|
|
71251
71547
|
return resp;
|
|
71252
71548
|
}
|
|
71253
71549
|
get state() {
|
|
@@ -72933,7 +73229,7 @@ ${text}`;
|
|
|
72933
73229
|
*/
|
|
72934
73230
|
sendActivitySpan(spanData) {
|
|
72935
73231
|
if (!this._ws || this._ws.readyState !== WebSocket2.OPEN) return;
|
|
72936
|
-
const pluginVersion = true ? "0.23.
|
|
73232
|
+
const pluginVersion = true ? "0.23.54" : "0.0.0-dev";
|
|
72937
73233
|
const agentName = this.config.agentName ?? "Agent";
|
|
72938
73234
|
const resource = {
|
|
72939
73235
|
"service.name": "agentvault-agent",
|
|
@@ -73301,15 +73597,27 @@ ${text}`;
|
|
|
73301
73597
|
*/
|
|
73302
73598
|
async _quarantineOrphanedMlsGroups() {
|
|
73303
73599
|
if (!this._deviceJwt) return;
|
|
73600
|
+
let deviceActive = null;
|
|
73601
|
+
const confirmDeviceActive = () => deviceActive ??= this._readDeviceStanding().then((st) => st.kind === "active");
|
|
73304
73602
|
const quarantined = await quarantineOrphanedMlsState(
|
|
73305
73603
|
this.config.dataDir,
|
|
73306
73604
|
async (groupId) => {
|
|
73307
73605
|
try {
|
|
73606
|
+
if (this._suspended) return null;
|
|
73308
73607
|
const res = await fetch(
|
|
73309
73608
|
`${this.config.apiUrl}/api/v1/mls/groups/${encodeURIComponent(groupId)}`,
|
|
73310
73609
|
{ headers: { Authorization: `Bearer ${this._deviceJwt}` } }
|
|
73311
73610
|
);
|
|
73312
|
-
|
|
73611
|
+
const detail = res.status === 403 ? await this._errorDetail(res) : null;
|
|
73612
|
+
if (detail === _SecureChannel.INACTIVE_DEVICE_DETAIL) {
|
|
73613
|
+
await this._confirmInactive403("mls_probe");
|
|
73614
|
+
return null;
|
|
73615
|
+
}
|
|
73616
|
+
const verdict = mlsMembershipFromStatus(res.status, detail);
|
|
73617
|
+
if (verdict === false && res.status === 403) {
|
|
73618
|
+
if (!await confirmDeviceActive() || this._suspended) return null;
|
|
73619
|
+
}
|
|
73620
|
+
return verdict;
|
|
73313
73621
|
} catch {
|
|
73314
73622
|
return null;
|
|
73315
73623
|
}
|
|
@@ -75044,6 +75352,8 @@ ${text}`;
|
|
|
75044
75352
|
async _connect() {
|
|
75045
75353
|
if (this._stopped) return;
|
|
75046
75354
|
this._reissueAttempted = false;
|
|
75355
|
+
this._inactive403Check = null;
|
|
75356
|
+
this._inactive403RetryAt = 0;
|
|
75047
75357
|
this._authFailedThisSession = false;
|
|
75048
75358
|
if (this._reconnectTimer) {
|
|
75049
75359
|
clearTimeout(this._reconnectTimer);
|
|
@@ -75059,6 +75369,10 @@ ${text}`;
|
|
|
75059
75369
|
}
|
|
75060
75370
|
this._setState("connecting");
|
|
75061
75371
|
if (await this._maybeReissueDeviceJwt()) {
|
|
75372
|
+
if (this._suspended) {
|
|
75373
|
+
console.log("[SecureChannel] device is paused \u2014 not connecting until it is resumed");
|
|
75374
|
+
return;
|
|
75375
|
+
}
|
|
75062
75376
|
console.warn(
|
|
75063
75377
|
"[SecureChannel] credentials are terminally dead \u2014 aborting connect (no WS attempt)"
|
|
75064
75378
|
);
|
|
@@ -75069,16 +75383,26 @@ ${text}`;
|
|
|
75069
75383
|
const url22 = `${wsUrl}/api/v1/ws?token=${encodeURIComponent(this._deviceJwt)}&device_id=${this._deviceId}&client_version=${encodeURIComponent(buildClientVersion(this.config.clientVersion))}`;
|
|
75070
75384
|
const ws = new WebSocket2(url22);
|
|
75071
75385
|
this._ws = ws;
|
|
75386
|
+
const served = this._createServedGate();
|
|
75072
75387
|
ws.on("open", async () => {
|
|
75073
75388
|
try {
|
|
75074
|
-
this._reconnectAttempt = 0;
|
|
75075
75389
|
this._lastWsOpenTime = Date.now();
|
|
75076
75390
|
this._startPing(ws);
|
|
75077
75391
|
this._startWakeDetector();
|
|
75392
|
+
if (!await served.wait()) {
|
|
75393
|
+
console.log("[SecureChannel] connection rejected before it was served \u2014 skipping connect-time work");
|
|
75394
|
+
return;
|
|
75395
|
+
}
|
|
75396
|
+
const aborted22 = () => this._stopped || this._suspended || this._ws !== ws || served.rejected;
|
|
75397
|
+
if (aborted22()) return;
|
|
75398
|
+
this._reconnectAttempt = 0;
|
|
75078
75399
|
this._startPendingPoll();
|
|
75079
75400
|
await this._syncMissedMessages();
|
|
75401
|
+
if (aborted22()) return;
|
|
75080
75402
|
await this._pullDrDeliveryQueue();
|
|
75403
|
+
if (aborted22()) return;
|
|
75081
75404
|
await this._flushOutboundQueue();
|
|
75405
|
+
if (aborted22()) return;
|
|
75082
75406
|
this._setState("ready");
|
|
75083
75407
|
void this._reconcileConversationGroups().catch((err) => {
|
|
75084
75408
|
console.warn("[SecureChannel] Conversation-group reconcile failed:", err);
|
|
@@ -75110,7 +75434,7 @@ ${text}`;
|
|
|
75110
75434
|
agentVersion: this.config.agentVersion ?? "0.0.0",
|
|
75111
75435
|
// __AV_VERSION__ is injected by esbuild from package.json at build time.
|
|
75112
75436
|
// Falls back to "0.0.0-dev" in non-bundled contexts (tests).
|
|
75113
|
-
pluginVersion: true ? "0.23.
|
|
75437
|
+
pluginVersion: true ? "0.23.54" : "0.0.0-dev"
|
|
75114
75438
|
});
|
|
75115
75439
|
this._telemetryReporter.startAutoFlush(3e4);
|
|
75116
75440
|
}
|
|
@@ -75118,6 +75442,7 @@ ${text}`;
|
|
|
75118
75442
|
await this.listA2AChannels().catch((err) => {
|
|
75119
75443
|
console.warn("[SecureChannel] A2A channel sync on connect failed:", err);
|
|
75120
75444
|
});
|
|
75445
|
+
if (aborted22()) return;
|
|
75121
75446
|
await this._ensureKpPoolPublished();
|
|
75122
75447
|
this._startKpReplenishTimer();
|
|
75123
75448
|
this._pullDeliveryQueue().catch((err) => {
|
|
@@ -75179,6 +75504,8 @@ ${text}`;
|
|
|
75179
75504
|
this._lastWakeTick = Date.now();
|
|
75180
75505
|
try {
|
|
75181
75506
|
const data = JSON.parse(raw.toString());
|
|
75507
|
+
if (data?.event === "connection_rejected") served.markRejected();
|
|
75508
|
+
else served.markServed();
|
|
75182
75509
|
if (data.event && data.event !== "ping" && data.event !== "typing") {
|
|
75183
75510
|
const d22 = data.data ?? {};
|
|
75184
75511
|
const conv = (data.conversation_id || d22.conversation_id || "").toString();
|
|
@@ -75438,7 +75765,7 @@ ${text}`;
|
|
|
75438
75765
|
agentVersion: this.config.agentVersion ?? "0.0.0",
|
|
75439
75766
|
// __AV_VERSION__ is injected by esbuild from package.json at build time.
|
|
75440
75767
|
// Falls back to "0.0.0-dev" in non-bundled contexts (tests).
|
|
75441
|
-
pluginVersion: true ? "0.23.
|
|
75768
|
+
pluginVersion: true ? "0.23.54" : "0.0.0-dev"
|
|
75442
75769
|
});
|
|
75443
75770
|
this._telemetryReporter.startAutoFlush(3e4);
|
|
75444
75771
|
}
|
|
@@ -75807,6 +76134,7 @@ ${text}`;
|
|
|
75807
76134
|
});
|
|
75808
76135
|
ws.on("close", (code) => {
|
|
75809
76136
|
this._lastCloseCode = typeof code === "number" ? code : null;
|
|
76137
|
+
served.markRejected();
|
|
75810
76138
|
this._stopPing();
|
|
75811
76139
|
this._stopWakeDetector();
|
|
75812
76140
|
this._stopPendingPoll();
|
|
@@ -79896,7 +80224,7 @@ ${baseText}`;
|
|
|
79896
80224
|
);
|
|
79897
80225
|
this._authFailedThisSession = true;
|
|
79898
80226
|
this._setState("error");
|
|
79899
|
-
this.emit("auth_failed", { reason: "ws_auth_rejected" });
|
|
80227
|
+
this.emit("auth_failed", { reason: "ws_auth_rejected", deviceGone: false });
|
|
79900
80228
|
return;
|
|
79901
80229
|
}
|
|
79902
80230
|
if (lastCode === 4e3) {
|
|
@@ -79935,7 +80263,7 @@ ${baseText}`;
|
|
|
79935
80263
|
this._state = newState;
|
|
79936
80264
|
this.emit("state", newState);
|
|
79937
80265
|
this.config.onStateChange?.(newState);
|
|
79938
|
-
if (newState === "disconnected" && !this._pollFallbackTimer && this._deviceJwt) {
|
|
80266
|
+
if (newState === "disconnected" && !this._pollFallbackTimer && this._deviceJwt && !this._suspended) {
|
|
79939
80267
|
this._startPollFallback();
|
|
79940
80268
|
}
|
|
79941
80269
|
if (newState === "ready" || newState === "error" || this._stopped) {
|
|
@@ -80072,8 +80400,10 @@ ${baseText}`;
|
|
|
80072
80400
|
* blindly. We ask the PUBLIC /devices/{id}/status endpoint (no JWT needed, so
|
|
80073
80401
|
* it answers even when our device JWT is being rejected):
|
|
80074
80402
|
* - ACTIVE -> reconnect in place (transient); stay online.
|
|
80075
|
-
* -
|
|
80076
|
-
* -
|
|
80403
|
+
* - SUSPENDED -> suspended-wait (owner paused it; resume later).
|
|
80404
|
+
* - REVOKED/deleted -> terminal via `_terminalDeviceGone` (auth_failed with
|
|
80405
|
+
* deviceGone: the bridges exit and remove their service).
|
|
80406
|
+
* - anything else / unreachable / 429 -> reconnect (inconclusive; a network blip shouldn't
|
|
80077
80407
|
* permanently kill a healthy agent — the WS is down too,
|
|
80078
80408
|
* so normal backoff handles it, and the war cap bounds
|
|
80079
80409
|
* thrash if the device really is dead).
|
|
@@ -80113,10 +80443,58 @@ ${baseText}`;
|
|
|
80113
80443
|
}
|
|
80114
80444
|
this._authFailedThisSession = true;
|
|
80115
80445
|
const authReason = data?.reason ?? "unknown";
|
|
80446
|
+
const standing = await this._readDeviceStanding();
|
|
80447
|
+
if (standing.kind === "suspended") {
|
|
80448
|
+
this._authFailedThisSession = false;
|
|
80449
|
+
this._enterSuspendedWait("connection_rejected");
|
|
80450
|
+
return;
|
|
80451
|
+
}
|
|
80452
|
+
const deviceGone = standing.kind === "gone";
|
|
80116
80453
|
console.warn(
|
|
80117
|
-
`[SecureChannel] connection_rejected (reason=${data?.reason ?? "unknown"}, retryable=false) \u2014 terminal; surfacing auth_failed`
|
|
80454
|
+
`[SecureChannel] connection_rejected (reason=${data?.reason ?? "unknown"}, retryable=false) \u2014 terminal; surfacing auth_failed (deviceGone=${deviceGone})`
|
|
80118
80455
|
);
|
|
80119
|
-
this.emit("auth_failed", { reason: authReason });
|
|
80456
|
+
this.emit("auth_failed", { reason: authReason, deviceGone });
|
|
80457
|
+
}
|
|
80458
|
+
/**
|
|
80459
|
+
* How long an opened socket may stay silent before we treat it as served.
|
|
80460
|
+
* The backend's reject_connection sends `connection_rejected` immediately
|
|
80461
|
+
* after the accept, so a refused socket's first frame lands well inside
|
|
80462
|
+
* this; a served agent with a hub gets `hub_identity_sync` sooner still.
|
|
80463
|
+
*/
|
|
80464
|
+
static OPEN_SETTLE_MS = 1500;
|
|
80465
|
+
/**
|
|
80466
|
+
* Per-socket "has the server agreed to serve this session?" latch. Settles
|
|
80467
|
+
* once: served on the first non-rejection frame or when the settle window
|
|
80468
|
+
* passes quietly; rejected on `connection_rejected` or a close first.
|
|
80469
|
+
* `rejected` stays readable afterwards so long open-handler work can bail.
|
|
80470
|
+
*/
|
|
80471
|
+
_createServedGate() {
|
|
80472
|
+
let verdict = null;
|
|
80473
|
+
let rejected = false;
|
|
80474
|
+
let timer = null;
|
|
80475
|
+
const waiters = [];
|
|
80476
|
+
const settle22 = (ok2) => {
|
|
80477
|
+
if (!ok2) rejected = true;
|
|
80478
|
+
if (verdict !== null) return;
|
|
80479
|
+
verdict = ok2;
|
|
80480
|
+
if (timer) {
|
|
80481
|
+
clearTimeout(timer);
|
|
80482
|
+
timer = null;
|
|
80483
|
+
}
|
|
80484
|
+
for (const w2 of waiters.splice(0)) w2(ok2);
|
|
80485
|
+
};
|
|
80486
|
+
return {
|
|
80487
|
+
wait: () => {
|
|
80488
|
+
if (verdict !== null) return Promise.resolve(verdict && !rejected);
|
|
80489
|
+
if (!timer) timer = setTimeout(() => settle22(true), _SecureChannel.OPEN_SETTLE_MS);
|
|
80490
|
+
return new Promise((resolve42) => waiters.push(resolve42));
|
|
80491
|
+
},
|
|
80492
|
+
markServed: () => settle22(true),
|
|
80493
|
+
markRejected: () => settle22(false),
|
|
80494
|
+
get rejected() {
|
|
80495
|
+
return rejected;
|
|
80496
|
+
}
|
|
80497
|
+
};
|
|
80120
80498
|
}
|
|
80121
80499
|
// --- Owner pause (device SUSPENDED) — NON-final ---------------------------
|
|
80122
80500
|
//
|
|
@@ -80141,6 +80519,7 @@ ${baseText}`;
|
|
|
80141
80519
|
this._reconnectTimer = null;
|
|
80142
80520
|
}
|
|
80143
80521
|
this._rapidDisconnects = 0;
|
|
80522
|
+
this._stopPollFallback();
|
|
80144
80523
|
if (!this._suspended) {
|
|
80145
80524
|
this._suspended = true;
|
|
80146
80525
|
console.log(
|
|
@@ -80167,30 +80546,40 @@ ${baseText}`;
|
|
|
80167
80546
|
}
|
|
80168
80547
|
async _pollWhileSuspended() {
|
|
80169
80548
|
if (this._stopped || !this._suspended) return;
|
|
80170
|
-
const
|
|
80171
|
-
if (
|
|
80172
|
-
|
|
80173
|
-
|
|
80174
|
-
|
|
80175
|
-
|
|
80176
|
-
|
|
80177
|
-
|
|
80178
|
-
|
|
80179
|
-
|
|
80180
|
-
|
|
80181
|
-
|
|
80182
|
-
|
|
80183
|
-
|
|
80184
|
-
|
|
80185
|
-
|
|
80186
|
-
return;
|
|
80187
|
-
}
|
|
80188
|
-
} catch (err) {
|
|
80189
|
-
console.warn("[SecureChannel] status check while paused failed; still waiting:", err);
|
|
80190
|
-
}
|
|
80549
|
+
const standing = await this._readDeviceStanding();
|
|
80550
|
+
if (this._stopped || !this._suspended) return;
|
|
80551
|
+
if (standing.kind === "active") {
|
|
80552
|
+
this._clearSuspendedWait();
|
|
80553
|
+
this._reconnectAttempt = 0;
|
|
80554
|
+
console.log("[SecureChannel] Agent resumed by its owner \u2014 reconnecting");
|
|
80555
|
+
this.emit("resumed");
|
|
80556
|
+
this._connect();
|
|
80557
|
+
return;
|
|
80558
|
+
}
|
|
80559
|
+
if (standing.kind === "gone") {
|
|
80560
|
+
await this._terminalDeviceGone(standing.reason, "suspended_wait");
|
|
80561
|
+
return;
|
|
80562
|
+
}
|
|
80563
|
+
if (standing.kind === "unknown") {
|
|
80564
|
+
console.warn(`[SecureChannel] status check while paused inconclusive (${standing.why}); still waiting`);
|
|
80191
80565
|
}
|
|
80192
80566
|
this._scheduleSuspendedPoll();
|
|
80193
80567
|
}
|
|
80568
|
+
/**
|
|
80569
|
+
* The device is CONFIRMED gone (status endpoint: REVOKED, or the row is
|
|
80570
|
+
* deleted). Stop for good through the documented terminal surface:
|
|
80571
|
+
* re_enroll report, `auth_failed{deviceGone:true}` (bridges exit and remove
|
|
80572
|
+
* their service), then the legacy `error("Device was revoked")` the OpenClaw
|
|
80573
|
+
* lifecycle and older listeners key on.
|
|
80574
|
+
*/
|
|
80575
|
+
async _terminalDeviceGone(reason, source) {
|
|
80576
|
+
this._clearSuspendedWait();
|
|
80577
|
+
this._authFailedThisSession = true;
|
|
80578
|
+
console.warn(`[SecureChannel] ${source}: device confirmed gone (${reason}) \u2014 terminal`);
|
|
80579
|
+
await this._postAuthFailedToBackend(reason);
|
|
80580
|
+
this.emit("auth_failed", { reason, deviceGone: true });
|
|
80581
|
+
this._handleError(new Error("Device was revoked"));
|
|
80582
|
+
}
|
|
80194
80583
|
async _handleDeviceRevoked() {
|
|
80195
80584
|
const now = Date.now();
|
|
80196
80585
|
this._revokeRecoveries = this._revokeRecoveries.filter(
|
|
@@ -80208,35 +80597,25 @@ ${baseText}`;
|
|
|
80208
80597
|
this._handleError(new Error("Device was revoked"));
|
|
80209
80598
|
return;
|
|
80210
80599
|
}
|
|
80211
|
-
|
|
80212
|
-
|
|
80213
|
-
|
|
80214
|
-
|
|
80215
|
-
this._enterSuspendedWait("device_revoked");
|
|
80216
|
-
return;
|
|
80217
|
-
}
|
|
80218
|
-
reconnect = status.rateLimited === true || status.status === "ACTIVE";
|
|
80219
|
-
if (!reconnect) {
|
|
80220
|
-
console.warn(
|
|
80221
|
-
`[SecureChannel] device_revoked confirmed by server (status=${status.status}) \u2014 terminal`
|
|
80222
|
-
);
|
|
80223
|
-
}
|
|
80224
|
-
} catch (err) {
|
|
80225
|
-
console.warn(
|
|
80226
|
-
"[SecureChannel] device_revoked status check failed; reconnecting (inconclusive):",
|
|
80227
|
-
err
|
|
80228
|
-
);
|
|
80229
|
-
reconnect = true;
|
|
80600
|
+
const standing = await this._readDeviceStanding();
|
|
80601
|
+
if (standing.kind === "suspended") {
|
|
80602
|
+
this._enterSuspendedWait("device_revoked");
|
|
80603
|
+
return;
|
|
80230
80604
|
}
|
|
80231
|
-
if (
|
|
80232
|
-
this.
|
|
80233
|
-
console.log(
|
|
80234
|
-
"[SecureChannel] device_revoked but device not confirmed dead \u2014 reconnecting (self-heal)"
|
|
80235
|
-
);
|
|
80236
|
-
this._scheduleReconnect();
|
|
80605
|
+
if (standing.kind === "gone") {
|
|
80606
|
+
await this._terminalDeviceGone(standing.reason, "device_revoked");
|
|
80237
80607
|
return;
|
|
80238
80608
|
}
|
|
80239
|
-
|
|
80609
|
+
if (standing.kind === "unknown") {
|
|
80610
|
+
console.warn(
|
|
80611
|
+
`[SecureChannel] device_revoked status check inconclusive (${standing.why}); reconnecting`
|
|
80612
|
+
);
|
|
80613
|
+
}
|
|
80614
|
+
this._revokeRecoveries.push(now);
|
|
80615
|
+
console.log(
|
|
80616
|
+
"[SecureChannel] device_revoked but device not confirmed dead \u2014 reconnecting (self-heal)"
|
|
80617
|
+
);
|
|
80618
|
+
this._scheduleReconnect();
|
|
80240
80619
|
}
|
|
80241
80620
|
/**
|
|
80242
80621
|
* Persist all ratchet session states to disk.
|
|
@@ -81036,7 +81415,7 @@ ${actionsText}`);
|
|
|
81036
81415
|
"use strict";
|
|
81037
81416
|
init_llm_response_parser();
|
|
81038
81417
|
init_llm_cost();
|
|
81039
|
-
traceStore = new
|
|
81418
|
+
traceStore = new AsyncLocalStorage3();
|
|
81040
81419
|
}
|
|
81041
81420
|
});
|
|
81042
81421
|
init_tool_audit = __esm2({
|
|
@@ -81059,6 +81438,7 @@ ${actionsText}`);
|
|
|
81059
81438
|
init_openclaw_compat();
|
|
81060
81439
|
init_lifecycle();
|
|
81061
81440
|
init_tool_audit();
|
|
81441
|
+
init_tool_telemetry();
|
|
81062
81442
|
init_harness_compat();
|
|
81063
81443
|
init_types();
|
|
81064
81444
|
managedRoutesRequested = false;
|
|
@@ -101784,7 +102164,8 @@ data:
|
|
|
101784
102164
|
await init_skill_telemetry();
|
|
101785
102165
|
await init_policy_enforcer();
|
|
101786
102166
|
init_room_protocol();
|
|
101787
|
-
|
|
102167
|
+
init_tool_telemetry();
|
|
102168
|
+
VERSION = true ? "0.23.54" : "0.0.0-dev";
|
|
101788
102169
|
}
|
|
101789
102170
|
});
|
|
101790
102171
|
await init_index();
|
|
@@ -144834,9 +145215,8 @@ var ArmingState = class {
|
|
|
144834
145215
|
init_subcommand();
|
|
144835
145216
|
init_backend();
|
|
144836
145217
|
init_log();
|
|
144837
|
-
|
|
144838
|
-
|
|
144839
|
-
if (reason !== DEVICE_IS_GONE) return false;
|
|
145218
|
+
function selfUninstallOnTerminal(verdict, env, deps = {}) {
|
|
145219
|
+
if (verdict?.deviceGone !== true) return false;
|
|
144840
145220
|
const log = deps.log ?? ((m6) => logLine("[bridge] " + m6));
|
|
144841
145221
|
let label = "";
|
|
144842
145222
|
try {
|
|
@@ -144846,12 +145226,12 @@ function selfUninstallOnTerminal(reason, env, deps = {}) {
|
|
|
144846
145226
|
if (!backend.status(label).loaded) return false;
|
|
144847
145227
|
backend.uninstall(label);
|
|
144848
145228
|
log(
|
|
144849
|
-
`device
|
|
145229
|
+
`device is gone (${verdict.reason}) \u2014 removed the supervised service ${label} so it does not sit installed on this machine pointing at an agent that no longer exists. Your credentials are still on disk and were NOT touched; re-install with a fresh invite token from AgentVault to reconnect.`
|
|
144850
145230
|
);
|
|
144851
145231
|
return true;
|
|
144852
145232
|
} catch (e7) {
|
|
144853
145233
|
log(
|
|
144854
|
-
`device
|
|
145234
|
+
`device is gone (${verdict.reason}), but the supervised service ${label || "for this agent"} could not be removed: ${e7.message}. Remove it by hand with: AV_AGENT_NAME=<agent-name> agentvault-claude-bridge uninstall`
|
|
144855
145235
|
);
|
|
144856
145236
|
return false;
|
|
144857
145237
|
}
|
|
@@ -145011,6 +145391,18 @@ var RoomHushState = class {
|
|
|
145011
145391
|
return t7 !== void 0 && now < t7;
|
|
145012
145392
|
}
|
|
145013
145393
|
};
|
|
145394
|
+
function reportSay(channel, t7, startedAt, failure3) {
|
|
145395
|
+
try {
|
|
145396
|
+
reportToolInvoke(channel.telemetry, {
|
|
145397
|
+
toolName: "say",
|
|
145398
|
+
outcome: failure3 ? "error" : "success",
|
|
145399
|
+
errorKind: failure3 ? classifyToolError(failure3.err) : void 0,
|
|
145400
|
+
durationMs: Date.now() - startedAt,
|
|
145401
|
+
conversation: t7.kind === "room" ? { kind: "room", id: t7.roomId } : t7.conversationId ? { kind: "direct", id: t7.conversationId } : { kind: "unknown" }
|
|
145402
|
+
});
|
|
145403
|
+
} catch {
|
|
145404
|
+
}
|
|
145405
|
+
}
|
|
145014
145406
|
async function sendDm(channel, t7, text) {
|
|
145015
145407
|
if ((t7.conversationId || t7.groupId) && typeof channel.runForConversation === "function") {
|
|
145016
145408
|
await channel.runForConversation(
|
|
@@ -145056,13 +145448,17 @@ var ActiveTarget = class {
|
|
|
145056
145448
|
const where = !t7 ? "nowhere" : t7.kind === "room" ? `room ${t7.roomId.slice(0, 8)}` : "1:1 owner";
|
|
145057
145449
|
return async (text) => {
|
|
145058
145450
|
if (!t7) return;
|
|
145451
|
+
const startedAt = Date.now();
|
|
145059
145452
|
try {
|
|
145060
145453
|
if (t7.kind === "room") await channel.sendToRoom(t7.roomId, text);
|
|
145061
145454
|
else await sendDm(channel, t7, text);
|
|
145062
145455
|
log(`said to ${where}`);
|
|
145063
145456
|
} catch (err) {
|
|
145064
145457
|
log(`send failed to ${where}: ${err instanceof Error ? err.message : String(err)}`);
|
|
145458
|
+
reportSay(channel, t7, startedAt, { err });
|
|
145459
|
+
return;
|
|
145065
145460
|
}
|
|
145461
|
+
reportSay(channel, t7, startedAt);
|
|
145066
145462
|
};
|
|
145067
145463
|
}
|
|
145068
145464
|
};
|
|
@@ -145071,14 +145467,17 @@ function attachLifecycle2(channel, opts = {}) {
|
|
|
145071
145467
|
});
|
|
145072
145468
|
const selfUninstall = opts.selfUninstall ?? selfUninstallOnTerminal;
|
|
145073
145469
|
const onTerminal = opts.onTerminal ?? ((_reason, o10) => process.exit(o10.restart ? 1 : 0));
|
|
145074
|
-
const terminal = (reason, restart) => {
|
|
145470
|
+
const terminal = (reason, restart, deviceGone = false) => {
|
|
145075
145471
|
log(
|
|
145076
145472
|
`terminal condition (${reason}) \u2014 ${restart ? "gave up reconnecting; supervisor may respawn" : "this device must re-enroll or another session has taken over"}. Re-run/re-install with a fresh invite token from AgentVault if this persists.`
|
|
145077
145473
|
);
|
|
145078
|
-
selfUninstall(reason, process.env);
|
|
145474
|
+
selfUninstall({ reason, deviceGone }, process.env);
|
|
145079
145475
|
onTerminal(reason, { restart });
|
|
145080
145476
|
};
|
|
145081
|
-
channel.on(
|
|
145477
|
+
channel.on(
|
|
145478
|
+
"auth_failed",
|
|
145479
|
+
(e7) => terminal(e7.reason, false, e7?.deviceGone === true)
|
|
145480
|
+
);
|
|
145082
145481
|
channel.on(
|
|
145083
145482
|
"session_replaced",
|
|
145084
145483
|
(e7) => terminal(e7?.code ? `session_replaced (${e7.code})` : "session_replaced", false)
|
|
@@ -145353,7 +145752,7 @@ async function main() {
|
|
|
145353
145752
|
"[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"
|
|
145354
145753
|
);
|
|
145355
145754
|
}
|
|
145356
|
-
logLine(`[bridge] version: ${true ? "0.8.
|
|
145755
|
+
logLine(`[bridge] version: ${true ? "0.8.25" : "dev"}`);
|
|
145357
145756
|
logLine(`[bridge] data dir: ${cfg.dataDir} (${cfg.dataDirSource})`);
|
|
145358
145757
|
logLine(`[bridge] workspace: ${cfg.workspaceDir} \xB7 permissions: ${cfg.permissionMode} \xB7 enclave dir fenced`);
|
|
145359
145758
|
if (cfg.armRoom) {
|
|
@@ -145385,7 +145784,7 @@ async function main() {
|
|
|
145385
145784
|
// its default would render "@agentvault/agentvault@0.7.x" — the wrong
|
|
145386
145785
|
// package name attached to the bridge's version number, which is worse
|
|
145387
145786
|
// than either alone.
|
|
145388
|
-
clientVersion: `@agentvault/claude-bridge@${true ? "0.8.
|
|
145787
|
+
clientVersion: `@agentvault/claude-bridge@${true ? "0.8.25" : "dev"}`
|
|
145389
145788
|
});
|
|
145390
145789
|
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.`;
|
|
145391
145790
|
const deviceJwt = () => {
|
|
@@ -1,10 +1,38 @@
|
|
|
1
1
|
import { type ServiceBackend } from "./backend.js";
|
|
2
|
+
/**
|
|
3
|
+
* #913 item 2 / 2026-10-25 — what it takes to remove this agent's service.
|
|
4
|
+
*
|
|
5
|
+
* `attachLifecycle` routes every terminal signal here, and most of them mean
|
|
6
|
+
* the device is ALIVE:
|
|
7
|
+
*
|
|
8
|
+
* session_replaced another session took over — the device still exists
|
|
9
|
+
* device_jwt_expired the JWT aged out — the device still exists
|
|
10
|
+
* reconnect_loop gave up reconnecting — the device still exists
|
|
11
|
+
*
|
|
12
|
+
* This used to key on the reason string `device_revoked`. That was not proof:
|
|
13
|
+
* on 2026-10-25 a PAUSED (suspended) device's reissue 403 was mapped to
|
|
14
|
+
* "device_revoked" and this function removed loopita's launchd service — the
|
|
15
|
+
* owner switched the agent back on and nothing was installed to resume.
|
|
16
|
+
*
|
|
17
|
+
* So it now keys on the channel's CONFIRMED verdict only. SecureChannel sets
|
|
18
|
+
* `deviceGone: true` on `auth_failed` exclusively after the public status
|
|
19
|
+
* endpoint answered REVOKED or the device row is gone (404). Any reason string
|
|
20
|
+
* without that verdict — including `device_revoked` — leaves the service alone.
|
|
21
|
+
* An older channel that never sets the flag therefore never uninstalls: the
|
|
22
|
+
* safe direction.
|
|
23
|
+
*/
|
|
24
|
+
export interface TerminalVerdict {
|
|
25
|
+
reason: string;
|
|
26
|
+
/** Set by SecureChannel only when the status endpoint CONFIRMED revoked/deleted. */
|
|
27
|
+
deviceGone?: boolean;
|
|
28
|
+
}
|
|
2
29
|
export interface SelfUninstallDeps {
|
|
3
30
|
backend?: ServiceBackend;
|
|
4
31
|
log?: (msg: string) => void;
|
|
5
32
|
}
|
|
6
33
|
/**
|
|
7
|
-
* Remove this agent's supervised service after its device was
|
|
34
|
+
* Remove this agent's supervised service after its device was CONFIRMED
|
|
35
|
+
* revoked or deleted.
|
|
8
36
|
*
|
|
9
37
|
* Returns whether a service was actually removed. NEVER throws: this runs on
|
|
10
38
|
* the shutdown path, and a cleanup that cannot happen must not stop the bridge
|
|
@@ -15,5 +43,5 @@ export interface SelfUninstallDeps {
|
|
|
15
43
|
* and LEAVES the credentials on disk. A false positive therefore costs the
|
|
16
44
|
* customer a re-install, not their identity.
|
|
17
45
|
*/
|
|
18
|
-
export declare function selfUninstallOnTerminal(
|
|
46
|
+
export declare function selfUninstallOnTerminal(verdict: TerminalVerdict, env: NodeJS.ProcessEnv, deps?: SelfUninstallDeps): boolean;
|
|
19
47
|
//# sourceMappingURL=self-uninstall.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"self-uninstall.d.ts","sourceRoot":"","sources":["../../src/service/self-uninstall.ts"],"names":[],"mappings":"AACA,OAAO,EAAiB,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"self-uninstall.d.ts","sourceRoot":"","sources":["../../src/service/self-uninstall.ts"],"names":[],"mappings":"AACA,OAAO,EAAiB,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAGlE;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,oFAAoF;IACpF,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;CAC7B;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,eAAe,EACxB,GAAG,EAAE,MAAM,CAAC,UAAU,EACtB,IAAI,GAAE,iBAAsB,GAC3B,OAAO,CAoCT"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentvault/claude-bridge",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.25",
|
|
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",
|