@agentvault/muse-bridge 0.1.28 → 0.1.29
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 +4 -0
- package/dist/index.js +503 -87
- package/package.json +1 -1
package/dist/bridge.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/** Muse-owned room/DM wiring. Owner power is two raw booleans from
|
|
2
2
|
* `arming_snapshot` (`=== true` only). Do not copy grok grant-trim.
|
|
3
3
|
* Do not call decideArming, host-trust, or osIsolated. */
|
|
4
|
+
import { type ToolSpanSink } from "@agentvault/agentvault";
|
|
4
5
|
import type { RoomSession } from "./muse-session.js";
|
|
5
6
|
export declare function workAllowed(): boolean;
|
|
6
7
|
export declare function gatesRemoved(): boolean;
|
|
@@ -63,6 +64,9 @@ export type BridgeTarget = {
|
|
|
63
64
|
export interface ReplyChannel {
|
|
64
65
|
sendToRoom(roomId: string, text: string): Promise<void>;
|
|
65
66
|
send(text: string): Promise<void>;
|
|
67
|
+
/** SecureChannel's TelemetryReporter (device JWT, buffered). Optional so
|
|
68
|
+
* fixtures and a channel without telemetry keep working. */
|
|
69
|
+
readonly telemetry?: ToolSpanSink | null;
|
|
66
70
|
/** #1418 — SecureChannel: run `fn` as `conversationId`'s turn, so an
|
|
67
71
|
* untargeted send inside it reaches that conversation's person only. */
|
|
68
72
|
runForConversation?<T>(conversationId: string | undefined, fn: () => Promise<T>, opts?: {
|
package/dist/index.js
CHANGED
|
@@ -21,12 +21,17 @@ __export(dist_exports, {
|
|
|
21
21
|
CredentialStore: () => CredentialStore,
|
|
22
22
|
PolicyEnforcer: () => PolicyEnforcer,
|
|
23
23
|
SecureChannel: () => SecureChannel,
|
|
24
|
+
TOOL_INVOKE_SPAN_NAME: () => TOOL_INVOKE_SPAN_NAME,
|
|
24
25
|
VERSION: () => VERSION,
|
|
25
26
|
agentVaultPlugin: () => agentVaultPlugin,
|
|
27
|
+
buildToolInvokeSpan: () => buildToolInvokeSpan,
|
|
26
28
|
checkGateway: () => checkGateway,
|
|
29
|
+
classifyDeliveryReceipt: () => classifyDeliveryReceipt,
|
|
30
|
+
classifyToolError: () => classifyToolError,
|
|
27
31
|
clearHistoryRecoveryCode: () => clearHistoryRecoveryCode,
|
|
28
32
|
configureHistoryRecoveryCode: () => configureHistoryRecoveryCode,
|
|
29
33
|
createMcpHandler: () => createMcpHandler,
|
|
34
|
+
currentToolConversation: () => currentToolConversation,
|
|
30
35
|
drainSkillSpans: () => drainSkillSpans,
|
|
31
36
|
getActiveChannel: () => getActiveChannel,
|
|
32
37
|
getMcpStatus: () => getMcpStatus,
|
|
@@ -54,9 +59,12 @@ __export(dist_exports, {
|
|
|
54
59
|
parseTarget: () => parseTarget,
|
|
55
60
|
readMaskedHistoryRecoveryCode: () => readMaskedHistoryRecoveryCode,
|
|
56
61
|
reportSkillInvocation: () => reportSkillInvocation,
|
|
62
|
+
reportToolInvoke: () => reportToolInvoke,
|
|
57
63
|
requestHeartbeatNow: () => requestHeartbeatNow,
|
|
58
64
|
resolveAccount: () => resolveAccount,
|
|
59
65
|
runHistoryRecoveryCommand: () => runHistoryRecoveryCommand,
|
|
66
|
+
runWithToolConversation: () => runWithToolConversation,
|
|
67
|
+
safeErrorKind: () => safeErrorKind,
|
|
60
68
|
sendDecisionToOwner: () => sendDecisionToOwner,
|
|
61
69
|
sendToOwner: () => sendToOwner,
|
|
62
70
|
sendToRoom: () => sendToRoom,
|
|
@@ -89,12 +97,14 @@ import { homedir } from "node:os";
|
|
|
89
97
|
import { dirname, join as join4, resolve } from "node:path";
|
|
90
98
|
import { Writable } from "node:stream";
|
|
91
99
|
import { createInterface } from "node:readline";
|
|
100
|
+
import { AsyncLocalStorage } from "node:async_hooks";
|
|
101
|
+
import { randomBytes as randomBytes3 } from "node:crypto";
|
|
92
102
|
import { Readable } from "node:stream";
|
|
93
103
|
import { readdir as readdir2, readFile as readFile4, writeFile as writeFile2, rename as rename4, stat, unlink, mkdir as mkdir3 } from "node:fs/promises";
|
|
94
104
|
import { join as join5 } from "node:path";
|
|
95
105
|
import { randomUUID as randomUUID3 } from "node:crypto";
|
|
96
106
|
import { EventEmitter } from "node:events";
|
|
97
|
-
import { AsyncLocalStorage } from "node:async_hooks";
|
|
107
|
+
import { AsyncLocalStorage as AsyncLocalStorage2 } from "node:async_hooks";
|
|
98
108
|
import { createServer } from "node:http";
|
|
99
109
|
import { randomUUID as randomUUID4, createHash } from "node:crypto";
|
|
100
110
|
import { readFileSync } from "node:fs";
|
|
@@ -104,7 +114,7 @@ import { join as join6 } from "node:path";
|
|
|
104
114
|
import { readFile as readFile5 } from "node:fs/promises";
|
|
105
115
|
import WebSocket from "ws";
|
|
106
116
|
import { resolve as resolve2 } from "node:path";
|
|
107
|
-
import { AsyncLocalStorage as
|
|
117
|
+
import { AsyncLocalStorage as AsyncLocalStorage3 } from "node:async_hooks";
|
|
108
118
|
import { Http2ServerRequest as Http2ServerRequest2 } from "http2";
|
|
109
119
|
import { Http2ServerRequest } from "http2";
|
|
110
120
|
import { Readable as Readable2 } from "stream";
|
|
@@ -9294,7 +9304,7 @@ function eddsa(Point, cHash, eddsaOpts = {}) {
|
|
|
9294
9304
|
});
|
|
9295
9305
|
const { prehash } = eddsaOpts;
|
|
9296
9306
|
const { BASE, Fp: Fp3, Fn: Fn3 } = Point;
|
|
9297
|
-
const
|
|
9307
|
+
const randomBytes42 = eddsaOpts.randomBytes || randomBytes2;
|
|
9298
9308
|
const adjustScalarBytes3 = eddsaOpts.adjustScalarBytes || ((bytes) => bytes);
|
|
9299
9309
|
const domain = eddsaOpts.domain || ((data, ctx, phflag) => {
|
|
9300
9310
|
_abool2(phflag, "phflag");
|
|
@@ -9376,7 +9386,7 @@ function eddsa(Point, cHash, eddsaOpts = {}) {
|
|
|
9376
9386
|
signature: 2 * _size2,
|
|
9377
9387
|
seed: _size2
|
|
9378
9388
|
};
|
|
9379
|
-
function randomSecretKey(seed =
|
|
9389
|
+
function randomSecretKey(seed = randomBytes42(lengths.seed)) {
|
|
9380
9390
|
return _abytes2(seed, lengths.seed, "seed");
|
|
9381
9391
|
}
|
|
9382
9392
|
function keygen(seed) {
|
|
@@ -10755,7 +10765,7 @@ function ecdsa(Point, hash, ecdsaOpts = {}) {
|
|
|
10755
10765
|
bits2int: "function",
|
|
10756
10766
|
bits2int_modN: "function"
|
|
10757
10767
|
});
|
|
10758
|
-
const
|
|
10768
|
+
const randomBytes42 = ecdsaOpts.randomBytes || randomBytes2;
|
|
10759
10769
|
const hmac4 = ecdsaOpts.hmac || ((key, ...msgs) => hmac2(hash, key, concatBytes2(...msgs)));
|
|
10760
10770
|
const { Fp: Fp3, Fn: Fn3 } = Point;
|
|
10761
10771
|
const { ORDER: CURVE_ORDER, BITS: fnBits } = Fn3;
|
|
@@ -10910,7 +10920,7 @@ function ecdsa(Point, hash, ecdsaOpts = {}) {
|
|
|
10910
10920
|
const d2 = _normFnElement(Fn3, privateKey);
|
|
10911
10921
|
const seedArgs = [int2octets(d2), int2octets(h1int)];
|
|
10912
10922
|
if (extraEntropy != null && extraEntropy !== false) {
|
|
10913
|
-
const e = extraEntropy === true ?
|
|
10923
|
+
const e = extraEntropy === true ? randomBytes42(lengths.secretKey) : extraEntropy;
|
|
10914
10924
|
seedArgs.push(ensureBytes("extraEntropy", e));
|
|
10915
10925
|
}
|
|
10916
10926
|
const seed = concatBytes2(...seedArgs);
|
|
@@ -11788,11 +11798,11 @@ async function joinWithFirstMatchingKp(welcomeBytes, candidates) {
|
|
|
11788
11798
|
return null;
|
|
11789
11799
|
}
|
|
11790
11800
|
function ownIdentity() {
|
|
11791
|
-
const v2 = true ? "0.23.
|
|
11801
|
+
const v2 = true ? "0.23.54" : FALLBACK;
|
|
11792
11802
|
return `${PACKAGE}@${v2}`;
|
|
11793
11803
|
}
|
|
11794
11804
|
function buildSha() {
|
|
11795
|
-
const raw = true ? "
|
|
11805
|
+
const raw = true ? "429977f" : "";
|
|
11796
11806
|
const cleaned = (raw ?? "").trim();
|
|
11797
11807
|
return !cleaned || cleaned === "unknown" ? null : cleaned;
|
|
11798
11808
|
}
|
|
@@ -11944,13 +11954,18 @@ async function enrollDevice(apiUrl, inviteToken, identityPkHex, ephemeralPkHex,
|
|
|
11944
11954
|
return res.json();
|
|
11945
11955
|
}
|
|
11946
11956
|
async function pollDeviceStatus(apiUrl, deviceId) {
|
|
11947
|
-
const res = await fetch(`${apiUrl}/api/v1/devices/${deviceId}/status
|
|
11957
|
+
const res = await fetch(`${apiUrl}/api/v1/devices/${deviceId}/status`, {
|
|
11958
|
+
signal: AbortSignal.timeout(1e4)
|
|
11959
|
+
});
|
|
11948
11960
|
if (res.status === 429) {
|
|
11949
11961
|
return { device_id: deviceId, status: "PENDING", fingerprint: "", rateLimited: true };
|
|
11950
11962
|
}
|
|
11951
11963
|
if (!res.ok) {
|
|
11952
11964
|
const detail = await res.text();
|
|
11953
|
-
|
|
11965
|
+
const err = new Error(`Status poll failed (${res.status}): ${detail}`);
|
|
11966
|
+
err.httpStatus = res.status;
|
|
11967
|
+
err.body = detail;
|
|
11968
|
+
throw err;
|
|
11954
11969
|
}
|
|
11955
11970
|
return res.json();
|
|
11956
11971
|
}
|
|
@@ -12000,9 +12015,10 @@ function a2aChannelSignature(channels) {
|
|
|
12000
12015
|
})).sort((a2, b2) => (a2.id ?? "").localeCompare(b2.id ?? ""))
|
|
12001
12016
|
);
|
|
12002
12017
|
}
|
|
12003
|
-
function mlsMembershipFromStatus(status) {
|
|
12018
|
+
function mlsMembershipFromStatus(status, detail) {
|
|
12004
12019
|
if (status === 200) return true;
|
|
12005
|
-
if (status ===
|
|
12020
|
+
if (status === 404) return false;
|
|
12021
|
+
if (status === 403 && detail === NOT_A_MEMBER_DETAIL) return false;
|
|
12006
12022
|
return null;
|
|
12007
12023
|
}
|
|
12008
12024
|
function sanitizeError(error2) {
|
|
@@ -12596,6 +12612,102 @@ function _resetCompatCacheForTest() {
|
|
|
12596
12612
|
_agentEventFn = null;
|
|
12597
12613
|
_transcriptFn = null;
|
|
12598
12614
|
}
|
|
12615
|
+
function safeErrorKind(value) {
|
|
12616
|
+
if (typeof value !== "string") return UNCLASSIFIED_ERROR;
|
|
12617
|
+
if (KNOWN_CODES.has(value)) return value;
|
|
12618
|
+
if (!CLASS_NAME_RE.test(value)) return UNCLASSIFIED_ERROR;
|
|
12619
|
+
if ((value.match(/[0-9]/g) ?? []).length > 3) return UNCLASSIFIED_ERROR;
|
|
12620
|
+
return value;
|
|
12621
|
+
}
|
|
12622
|
+
function codeForText(text) {
|
|
12623
|
+
const t2 = text.replace(/^[A-Za-z]*Error: /, "");
|
|
12624
|
+
for (const [re2, code] of ERROR_TEXT_CODES) if (re2.test(t2)) return code;
|
|
12625
|
+
return void 0;
|
|
12626
|
+
}
|
|
12627
|
+
function classifyToolError(err) {
|
|
12628
|
+
try {
|
|
12629
|
+
if (err instanceof Error) {
|
|
12630
|
+
return codeForText(err.message) ?? safeErrorKind(err.constructor?.name);
|
|
12631
|
+
}
|
|
12632
|
+
if (typeof err === "string") return codeForText(err) ?? UNCLASSIFIED_ERROR;
|
|
12633
|
+
} catch {
|
|
12634
|
+
}
|
|
12635
|
+
return UNCLASSIFIED_ERROR;
|
|
12636
|
+
}
|
|
12637
|
+
function classifyDeliveryReceipt(receipt) {
|
|
12638
|
+
if (!receipt) return "no_receipt";
|
|
12639
|
+
if (receipt.ambiguous) return "ambiguous_target";
|
|
12640
|
+
if (typeof receipt.error === "string") return codeForText(receipt.error) ?? "delivery_failed";
|
|
12641
|
+
return "delivery_failed";
|
|
12642
|
+
}
|
|
12643
|
+
async function runWithToolConversation(conversation, fn) {
|
|
12644
|
+
const store = {
|
|
12645
|
+
conversation: conversation.kind === "unknown" || !conversation.id ? { kind: "unknown" } : { kind: conversation.kind, id: conversation.id },
|
|
12646
|
+
ended: false
|
|
12647
|
+
};
|
|
12648
|
+
try {
|
|
12649
|
+
return await _conversation.run(store, fn);
|
|
12650
|
+
} finally {
|
|
12651
|
+
store.ended = true;
|
|
12652
|
+
}
|
|
12653
|
+
}
|
|
12654
|
+
function currentToolConversation() {
|
|
12655
|
+
const store = _conversation.getStore();
|
|
12656
|
+
if (!store || store.ended) return { kind: "unknown" };
|
|
12657
|
+
return store.conversation;
|
|
12658
|
+
}
|
|
12659
|
+
function conversationForTarget(target, opts = {}) {
|
|
12660
|
+
if (typeof opts.conversationId === "string" && opts.conversationId) {
|
|
12661
|
+
return { kind: "direct", id: opts.conversationId };
|
|
12662
|
+
}
|
|
12663
|
+
const turn = currentToolConversation();
|
|
12664
|
+
if (!target || target.kind === "context") return turn;
|
|
12665
|
+
switch (target.kind) {
|
|
12666
|
+
case "room":
|
|
12667
|
+
return target.roomId ? { kind: "room", id: target.roomId } : { kind: "unknown" };
|
|
12668
|
+
case "owner":
|
|
12669
|
+
return turn.kind === "direct" ? turn : { kind: "unknown" };
|
|
12670
|
+
default:
|
|
12671
|
+
return { kind: "unknown" };
|
|
12672
|
+
}
|
|
12673
|
+
}
|
|
12674
|
+
function buildToolInvokeSpan(report) {
|
|
12675
|
+
const isError = report.outcome === "error";
|
|
12676
|
+
const outcome = isError ? "error" : report.outcome === "cancelled" ? "cancelled" : "success";
|
|
12677
|
+
const durationMs = Math.max(0, Math.round(Number(report.durationMs) || 0));
|
|
12678
|
+
const endTime = report.endTime ?? Date.now();
|
|
12679
|
+
const conv = report.conversation ?? currentToolConversation();
|
|
12680
|
+
const kind = conv.kind === "room" || conv.kind === "direct" ? conv.kind : "unknown";
|
|
12681
|
+
const attributes = {
|
|
12682
|
+
"tool.name": TOOL_NAME_RE.test(report.toolName) ? report.toolName : "unknown",
|
|
12683
|
+
"tool.outcome": outcome,
|
|
12684
|
+
"av.conversation_kind": kind,
|
|
12685
|
+
"tool.duration_ms": durationMs
|
|
12686
|
+
};
|
|
12687
|
+
if (isError) attributes["tool.error_kind"] = safeErrorKind(report.errorKind);
|
|
12688
|
+
if (kind !== "unknown" && typeof conv.id === "string" && conv.id) {
|
|
12689
|
+
attributes["av.conversation_id"] = conv.id.slice(0, 64);
|
|
12690
|
+
}
|
|
12691
|
+
return {
|
|
12692
|
+
traceId: randomBytes3(16).toString("hex"),
|
|
12693
|
+
spanId: randomBytes3(8).toString("hex"),
|
|
12694
|
+
name: TOOL_INVOKE_SPAN_NAME,
|
|
12695
|
+
kind: "internal",
|
|
12696
|
+
startTime: endTime - durationMs,
|
|
12697
|
+
endTime,
|
|
12698
|
+
attributes,
|
|
12699
|
+
// OTLP codes: 1 = ok, 2 = error (the backend stores "ok" / "error").
|
|
12700
|
+
// A cancellation is not a problem: OK status, outcome "cancelled".
|
|
12701
|
+
status: { code: isError ? 2 : 1 }
|
|
12702
|
+
};
|
|
12703
|
+
}
|
|
12704
|
+
function reportToolInvoke(sink, report) {
|
|
12705
|
+
try {
|
|
12706
|
+
if (!sink || typeof sink.reportCustomSpan !== "function") return;
|
|
12707
|
+
sink.reportCustomSpan(buildToolInvokeSpan(report));
|
|
12708
|
+
} catch {
|
|
12709
|
+
}
|
|
12710
|
+
}
|
|
12599
12711
|
function ownerRoutingFrom(parsed) {
|
|
12600
12712
|
const out = {};
|
|
12601
12713
|
if (parsed.conversation_id !== void 0) {
|
|
@@ -12620,6 +12732,34 @@ function statusOf(receipt) {
|
|
|
12620
12732
|
return receipt.ok ? 200 : 500;
|
|
12621
12733
|
}
|
|
12622
12734
|
async function handleSendRequest(parsed, channel) {
|
|
12735
|
+
const startedAt = Date.now();
|
|
12736
|
+
const result = await _handleSendRequest(parsed, channel);
|
|
12737
|
+
try {
|
|
12738
|
+
const body = result.body;
|
|
12739
|
+
const failed = body?.ok !== true;
|
|
12740
|
+
reportToolInvoke(channel.telemetry, {
|
|
12741
|
+
toolName: "agentvault_send",
|
|
12742
|
+
outcome: failed ? "error" : "success",
|
|
12743
|
+
errorKind: !failed ? void 0 : result.status === 400 ? "invalid_request" : result.status === 409 ? "ambiguous_target" : classifyDeliveryReceipt(body),
|
|
12744
|
+
durationMs: Date.now() - startedAt,
|
|
12745
|
+
conversation: sendConversation(parsed)
|
|
12746
|
+
});
|
|
12747
|
+
} catch {
|
|
12748
|
+
}
|
|
12749
|
+
return result;
|
|
12750
|
+
}
|
|
12751
|
+
function sendConversation(parsed) {
|
|
12752
|
+
const str = (v2) => typeof v2 === "string" && v2 ? v2 : void 0;
|
|
12753
|
+
if (str(parsed.hub_address) ?? str(parsed.a2a_address) ?? str(parsed.a2aAddress) ?? str(parsed.channel_id)) {
|
|
12754
|
+
return { kind: "unknown" };
|
|
12755
|
+
}
|
|
12756
|
+
const roomId = str(parsed.room_id);
|
|
12757
|
+
if (roomId) return conversationForTarget({ kind: "room", roomId });
|
|
12758
|
+
if (parsed.target === "context") return conversationForTarget({ kind: "context" });
|
|
12759
|
+
if (parsed.audience === "everyone") return { kind: "unknown" };
|
|
12760
|
+
return conversationForTarget({ kind: "owner" }, { conversationId: str(parsed.conversation_id) });
|
|
12761
|
+
}
|
|
12762
|
+
async function _handleSendRequest(parsed, channel) {
|
|
12623
12763
|
const text = parsed.text;
|
|
12624
12764
|
if (!text || typeof text !== "string") {
|
|
12625
12765
|
return { status: 400, body: { ok: false, error: "Missing 'text' field" } };
|
|
@@ -18371,7 +18511,7 @@ function reportSkillInvocation(opts) {
|
|
|
18371
18511
|
spanBuffer.push(span);
|
|
18372
18512
|
return span;
|
|
18373
18513
|
}
|
|
18374
|
-
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_exports2, 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;
|
|
18514
|
+
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_exports2, 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;
|
|
18375
18515
|
var init_dist = __esm({
|
|
18376
18516
|
async "../plugin/dist/index.js"() {
|
|
18377
18517
|
"use strict";
|
|
@@ -70843,6 +70983,7 @@ var init_dist = __esm({
|
|
|
70843
70983
|
init_mls_membership_probe = __esm2({
|
|
70844
70984
|
"src/mls-membership-probe.ts"() {
|
|
70845
70985
|
"use strict";
|
|
70986
|
+
NOT_A_MEMBER_DETAIL = "Not authorized for this MLS group";
|
|
70846
70987
|
}
|
|
70847
70988
|
});
|
|
70848
70989
|
init_history_backup_scheduler = __esm2({
|
|
@@ -71361,6 +71502,55 @@ var init_dist = __esm({
|
|
|
71361
71502
|
_transcriptFn = null;
|
|
71362
71503
|
}
|
|
71363
71504
|
});
|
|
71505
|
+
init_tool_telemetry = __esm2({
|
|
71506
|
+
"src/tool-telemetry.ts"() {
|
|
71507
|
+
"use strict";
|
|
71508
|
+
TOOL_INVOKE_SPAN_NAME = "ai.agent.tool.invoke";
|
|
71509
|
+
UNCLASSIFIED_ERROR = "unclassified";
|
|
71510
|
+
KNOWN_TOOL_ERROR_CODES = [
|
|
71511
|
+
"relay_not_connected",
|
|
71512
|
+
"mls_group_not_initialized",
|
|
71513
|
+
"mls_encrypt_failed",
|
|
71514
|
+
"room_not_found",
|
|
71515
|
+
"a2a_channel_not_found",
|
|
71516
|
+
"channel_not_ready",
|
|
71517
|
+
"channel_not_started",
|
|
71518
|
+
"no_active_sessions",
|
|
71519
|
+
"no_conversation_ready",
|
|
71520
|
+
"blocked_by_policy",
|
|
71521
|
+
"unknown_target",
|
|
71522
|
+
"unsupported_destination",
|
|
71523
|
+
"delivery_timeout",
|
|
71524
|
+
"delivery_cancelled",
|
|
71525
|
+
"delivery_failed",
|
|
71526
|
+
"ambiguous_target",
|
|
71527
|
+
"no_receipt",
|
|
71528
|
+
"invalid_request",
|
|
71529
|
+
UNCLASSIFIED_ERROR
|
|
71530
|
+
];
|
|
71531
|
+
KNOWN_CODES = new Set(KNOWN_TOOL_ERROR_CODES);
|
|
71532
|
+
CLASS_NAME_RE = /^(?:[A-Za-z][A-Za-z0-9_]{0,47})?(?:Error|Exception)$/;
|
|
71533
|
+
TOOL_NAME_RE = /^[A-Za-z0-9_.:-]{1,64}$/;
|
|
71534
|
+
ERROR_TEXT_CODES = [
|
|
71535
|
+
[/relay socket is not open/, "relay_not_connected"],
|
|
71536
|
+
[/has no initialized MLS group/, "mls_group_not_initialized"],
|
|
71537
|
+
[/^MLS encrypt failed/, "mls_encrypt_failed"],
|
|
71538
|
+
[/^Room .+ not found$/, "room_not_found"],
|
|
71539
|
+
[/^No A2A channel found|^A2A channel .+ not found$/, "a2a_channel_not_found"],
|
|
71540
|
+
[/^Channel is not ready$|^Channel is in \w+ state$/, "channel_not_ready"],
|
|
71541
|
+
[/^AgentVault channel not connected$|^Channel not started$/, "channel_not_started"],
|
|
71542
|
+
[/^No active sessions$/, "no_active_sessions"],
|
|
71543
|
+
[/^No conversation is ready to receive/, "no_conversation_ready"],
|
|
71544
|
+
[/^Message blocked by scan rule/, "blocked_by_policy"],
|
|
71545
|
+
[/^Unknown target kind$/, "unknown_target"],
|
|
71546
|
+
[/can only be sent to owner|cannot be sent to A2A targets/, "unsupported_destination"],
|
|
71547
|
+
[/^Delivery timed out$/, "delivery_timeout"],
|
|
71548
|
+
[/^Delivery cancelled$/, "delivery_cancelled"],
|
|
71549
|
+
[/^Delivery failed$/, "delivery_failed"]
|
|
71550
|
+
];
|
|
71551
|
+
_conversation = new AsyncLocalStorage();
|
|
71552
|
+
}
|
|
71553
|
+
});
|
|
71364
71554
|
http_handlers_exports = {};
|
|
71365
71555
|
__export2(http_handlers_exports, {
|
|
71366
71556
|
handleActionRequest: () => handleActionRequest,
|
|
@@ -71375,6 +71565,7 @@ var init_dist = __esm({
|
|
|
71375
71565
|
"src/http-handlers.ts"() {
|
|
71376
71566
|
"use strict";
|
|
71377
71567
|
init_owner_routing();
|
|
71568
|
+
init_tool_telemetry();
|
|
71378
71569
|
}
|
|
71379
71570
|
});
|
|
71380
71571
|
mcp_proxy_helpers_exports = {};
|
|
@@ -71455,7 +71646,7 @@ var init_dist = __esm({
|
|
|
71455
71646
|
OUTBOUND_DEDUPE_TYPES = /* @__PURE__ */ new Set(["text", "status_alert", "artifact", "attachment"]);
|
|
71456
71647
|
RETRY_CANDIDATE_TTL_MS = 6e4;
|
|
71457
71648
|
RETRY_CANDIDATE_MAX = 32;
|
|
71458
|
-
_turnConversation = new
|
|
71649
|
+
_turnConversation = new AsyncLocalStorage2();
|
|
71459
71650
|
PERSON_INVOLVED_WINDOW_MS = 5 * 6e4;
|
|
71460
71651
|
ATTESTED_INBOUND_MAX = 64;
|
|
71461
71652
|
UNMAPPED_RECONCILE_COOLDOWN_MS = 6e4;
|
|
@@ -71822,6 +72013,119 @@ ${text}`;
|
|
|
71822
72013
|
console.warn("[SecureChannel] failed to post auth_failed:", err);
|
|
71823
72014
|
}
|
|
71824
72015
|
}
|
|
72016
|
+
/**
|
|
72017
|
+
* Ask the PUBLIC status endpoint what this device is right now. Used to
|
|
72018
|
+
* CONFIRM a credential rejection before acting on it — a 403 on its own
|
|
72019
|
+
* cannot tell "revoked" from "paused by its owner" (both are non-ACTIVE to
|
|
72020
|
+
* get_device_auth), and treating a pause as a revoke is what removed
|
|
72021
|
+
* loopita's launchd service on 2026-10-25.
|
|
72022
|
+
*
|
|
72023
|
+
* Only two answers are terminal: REVOKED, and a deleted row (404 whose
|
|
72024
|
+
* JSON `detail` is exactly get_device_or_404's "Device not found" — any
|
|
72025
|
+
* other 404 is something in the way, not proof). Everything unreadable or inconclusive (network, 5xx, 429,
|
|
72026
|
+
* PENDING, an ACTIVE device answering 403) is `unknown`, which callers MUST
|
|
72027
|
+
* treat as transient: never terminal, never an uninstall, never a banner.
|
|
72028
|
+
*/
|
|
72029
|
+
async _readDeviceStanding() {
|
|
72030
|
+
const deviceId = this._deviceId ?? this._persisted?.deviceId;
|
|
72031
|
+
if (!deviceId) return { kind: "unknown", why: "no device id" };
|
|
72032
|
+
try {
|
|
72033
|
+
const st = await pollDeviceStatus(this.config.apiUrl, deviceId);
|
|
72034
|
+
if (!st || st.rateLimited) return { kind: "unknown", why: "rate limited" };
|
|
72035
|
+
if (st.status === "SUSPENDED") return { kind: "suspended" };
|
|
72036
|
+
if (st.status === "REVOKED") return { kind: "gone", reason: "device_revoked" };
|
|
72037
|
+
if (st.status === "ACTIVE" || st.status === "APPROVED") return { kind: "active" };
|
|
72038
|
+
return { kind: "unknown", why: `status ${String(st.status)}` };
|
|
72039
|
+
} catch (err) {
|
|
72040
|
+
const e = err;
|
|
72041
|
+
if (e?.httpStatus === 404) {
|
|
72042
|
+
try {
|
|
72043
|
+
const parsed = JSON.parse(e.body ?? "");
|
|
72044
|
+
if (parsed?.detail === _SecureChannel.DEVICE_DELETED_DETAIL) {
|
|
72045
|
+
return { kind: "gone", reason: "device_deleted" };
|
|
72046
|
+
}
|
|
72047
|
+
} catch {
|
|
72048
|
+
}
|
|
72049
|
+
}
|
|
72050
|
+
return { kind: "unknown", why: err instanceof Error ? err.message : String(err) };
|
|
72051
|
+
}
|
|
72052
|
+
}
|
|
72053
|
+
/**
|
|
72054
|
+
* A credential path answered 403 (today: /auth/reissue). Confirm before
|
|
72055
|
+
* concluding anything:
|
|
72056
|
+
* - REVOKED / deleted -> terminal: re_enroll health report + `auth_failed`
|
|
72057
|
+
* carrying `deviceGone: true` (the ONLY verdict the
|
|
72058
|
+
* bridges' self-uninstall acts on).
|
|
72059
|
+
* - SUSPENDED -> suspended-wait (idle, keep polling, resume).
|
|
72060
|
+
* - anything else -> transient; nothing is emitted or reported.
|
|
72061
|
+
* Already paused => stay paused without another status read: the
|
|
72062
|
+
* suspended-wait poll owns that question and will see a later revoke.
|
|
72063
|
+
*/
|
|
72064
|
+
async _confirmForbidden(source) {
|
|
72065
|
+
if (this._suspended) return "suspended";
|
|
72066
|
+
const standing = await this._readDeviceStanding();
|
|
72067
|
+
if (standing.kind === "gone") {
|
|
72068
|
+
console.warn(
|
|
72069
|
+
`[SecureChannel] ${source}: 403 confirmed by the status endpoint (${standing.reason}) \u2014 terminal`
|
|
72070
|
+
);
|
|
72071
|
+
this._authFailedThisSession = true;
|
|
72072
|
+
await this._postAuthFailedToBackend(standing.reason);
|
|
72073
|
+
this.emit("auth_failed", { reason: standing.reason, deviceGone: true });
|
|
72074
|
+
return "gone";
|
|
72075
|
+
}
|
|
72076
|
+
if (standing.kind === "suspended") {
|
|
72077
|
+
this._enterSuspendedWait(source);
|
|
72078
|
+
return "suspended";
|
|
72079
|
+
}
|
|
72080
|
+
console.warn(
|
|
72081
|
+
`[SecureChannel] ${source}: 403 but the device is not confirmed revoked (${standing.kind === "unknown" ? standing.why : standing.kind}) \u2014 treating as transient`
|
|
72082
|
+
);
|
|
72083
|
+
return "transient";
|
|
72084
|
+
}
|
|
72085
|
+
/** The backend's exact detail for an inactive (paused/revoked/deleted) device. */
|
|
72086
|
+
static INACTIVE_DEVICE_DETAIL = "Device not found or not active";
|
|
72087
|
+
/** get_device_or_404's exact detail — the only 404 that means "row deleted". */
|
|
72088
|
+
static DEVICE_DELETED_DETAIL = "Device not found";
|
|
72089
|
+
/**
|
|
72090
|
+
* After a TRANSIENT inactive-403 verdict, how long before another 403 may
|
|
72091
|
+
* re-read the status endpoint. Long enough that a burst cannot trip the
|
|
72092
|
+
* 1-per-5s limiter (which would itself read as "unknown"); short enough that
|
|
72093
|
+
* a revoke behind an outage is still noticed within the session (dr-evil Q1).
|
|
72094
|
+
*/
|
|
72095
|
+
static INACTIVE_403_RECHECK_MS = 3e4;
|
|
72096
|
+
/** Read a FastAPI error `detail` without consuming the caller's body. */
|
|
72097
|
+
async _errorDetail(resp) {
|
|
72098
|
+
try {
|
|
72099
|
+
const body = await resp.clone().json();
|
|
72100
|
+
return typeof body?.detail === "string" ? body.detail : null;
|
|
72101
|
+
} catch {
|
|
72102
|
+
return null;
|
|
72103
|
+
}
|
|
72104
|
+
}
|
|
72105
|
+
// One confirmation per WS session, shared by every caller: a burst of 403s
|
|
72106
|
+
// (the open handler fires several REST calls at once) must not turn into a
|
|
72107
|
+
// burst of status reads against a 1-per-5s rate limit. Reset in _connect.
|
|
72108
|
+
_inactive403Check = null;
|
|
72109
|
+
_inactive403RetryAt = 0;
|
|
72110
|
+
/**
|
|
72111
|
+
* A REST call answered 403 "Device not found or not active". With the
|
|
72112
|
+
* companion backend change this is how EVERY inactive-device auth failure
|
|
72113
|
+
* arrives (401 now means a bad token only, so `_authedFetch`'s reissue never
|
|
72114
|
+
* runs for it). Same rule as the reissue path: confirm, then act.
|
|
72115
|
+
*/
|
|
72116
|
+
_confirmInactive403(source) {
|
|
72117
|
+
if (this._inactive403Check) return this._inactive403Check;
|
|
72118
|
+
if (Date.now() < this._inactive403RetryAt) return Promise.resolve("transient");
|
|
72119
|
+
const check = this._confirmForbidden(source).then((verdict) => {
|
|
72120
|
+
if (verdict === "transient" && this._inactive403Check === check) {
|
|
72121
|
+
this._inactive403Check = null;
|
|
72122
|
+
this._inactive403RetryAt = Date.now() + _SecureChannel.INACTIVE_403_RECHECK_MS;
|
|
72123
|
+
}
|
|
72124
|
+
return verdict;
|
|
72125
|
+
});
|
|
72126
|
+
this._inactive403Check = check;
|
|
72127
|
+
return check;
|
|
72128
|
+
}
|
|
71825
72129
|
/**
|
|
71826
72130
|
* Proactively reissue the persisted device JWT when its remaining lifetime
|
|
71827
72131
|
* is under 30 days. Called before each WebSocket connect attempt so the
|
|
@@ -71840,6 +72144,9 @@ ${text}`;
|
|
|
71840
72144
|
* than read back off `_authFailedThisSession`, whose lifetime is reset per
|
|
71841
72145
|
* connect and is easy to get subtly wrong.
|
|
71842
72146
|
*/
|
|
72147
|
+
//
|
|
72148
|
+
// 2026-10-25: a TRUE return now also covers "paused by its owner" (a 403
|
|
72149
|
+
// confirmed SUSPENDED). The caller tells the two apart by `_suspended`.
|
|
71843
72150
|
async _maybeReissueDeviceJwt() {
|
|
71844
72151
|
const jwt = this._persisted?.deviceJwt ?? this._deviceJwt;
|
|
71845
72152
|
if (!jwt) return false;
|
|
@@ -71867,12 +72174,16 @@ ${text}`;
|
|
|
71867
72174
|
}
|
|
71868
72175
|
return false;
|
|
71869
72176
|
}
|
|
71870
|
-
if (resp.status ===
|
|
72177
|
+
if (resp.status === 403) {
|
|
72178
|
+
console.warn("[SecureChannel] reissue rejected (403); confirming device status");
|
|
72179
|
+
const verdict = await this._confirmForbidden("reissue_forbidden");
|
|
72180
|
+
return verdict !== "transient";
|
|
72181
|
+
}
|
|
72182
|
+
if (resp.status === 401) {
|
|
71871
72183
|
console.warn(`[SecureChannel] reissue rejected (${resp.status}); credentials need attention`);
|
|
71872
72184
|
this._authFailedThisSession = true;
|
|
71873
|
-
|
|
71874
|
-
|
|
71875
|
-
this.emit("auth_failed", { reason });
|
|
72185
|
+
await this._postAuthFailedToBackend("device_jwt_expired");
|
|
72186
|
+
this.emit("auth_failed", { reason: "device_jwt_expired", deviceGone: false });
|
|
71876
72187
|
return true;
|
|
71877
72188
|
}
|
|
71878
72189
|
console.warn(`[SecureChannel] reissue ${resp.status}; keeping current jwt`);
|
|
@@ -71931,13 +72242,17 @@ ${text}`;
|
|
|
71931
72242
|
};
|
|
71932
72243
|
resp = await fetch(url2, { ...init, headers: retryHeaders });
|
|
71933
72244
|
}
|
|
71934
|
-
} else if (reissueResp.status ===
|
|
72245
|
+
} else if (reissueResp.status === 403) {
|
|
72246
|
+
await this._confirmForbidden("reissue_forbidden");
|
|
72247
|
+
} else if (reissueResp.status === 401) {
|
|
71935
72248
|
this._authFailedThisSession = true;
|
|
71936
|
-
|
|
71937
|
-
|
|
71938
|
-
this.emit("auth_failed", { reason });
|
|
72249
|
+
await this._postAuthFailedToBackend("device_jwt_expired");
|
|
72250
|
+
this.emit("auth_failed", { reason: "device_jwt_expired", deviceGone: false });
|
|
71939
72251
|
}
|
|
71940
72252
|
}
|
|
72253
|
+
if (resp.status === 403 && await this._errorDetail(resp) === _SecureChannel.INACTIVE_DEVICE_DETAIL) {
|
|
72254
|
+
await this._confirmInactive403("rest_forbidden");
|
|
72255
|
+
}
|
|
71941
72256
|
return resp;
|
|
71942
72257
|
}
|
|
71943
72258
|
get state() {
|
|
@@ -73623,7 +73938,7 @@ ${text}`;
|
|
|
73623
73938
|
*/
|
|
73624
73939
|
sendActivitySpan(spanData) {
|
|
73625
73940
|
if (!this._ws || this._ws.readyState !== WebSocket.OPEN) return;
|
|
73626
|
-
const pluginVersion = true ? "0.23.
|
|
73941
|
+
const pluginVersion = true ? "0.23.54" : "0.0.0-dev";
|
|
73627
73942
|
const agentName = this.config.agentName ?? "Agent";
|
|
73628
73943
|
const resource = {
|
|
73629
73944
|
"service.name": "agentvault-agent",
|
|
@@ -73991,15 +74306,27 @@ ${text}`;
|
|
|
73991
74306
|
*/
|
|
73992
74307
|
async _quarantineOrphanedMlsGroups() {
|
|
73993
74308
|
if (!this._deviceJwt) return;
|
|
74309
|
+
let deviceActive = null;
|
|
74310
|
+
const confirmDeviceActive = () => deviceActive ??= this._readDeviceStanding().then((st) => st.kind === "active");
|
|
73994
74311
|
const quarantined = await quarantineOrphanedMlsState(
|
|
73995
74312
|
this.config.dataDir,
|
|
73996
74313
|
async (groupId) => {
|
|
73997
74314
|
try {
|
|
74315
|
+
if (this._suspended) return null;
|
|
73998
74316
|
const res = await fetch(
|
|
73999
74317
|
`${this.config.apiUrl}/api/v1/mls/groups/${encodeURIComponent(groupId)}`,
|
|
74000
74318
|
{ headers: { Authorization: `Bearer ${this._deviceJwt}` } }
|
|
74001
74319
|
);
|
|
74002
|
-
|
|
74320
|
+
const detail = res.status === 403 ? await this._errorDetail(res) : null;
|
|
74321
|
+
if (detail === _SecureChannel.INACTIVE_DEVICE_DETAIL) {
|
|
74322
|
+
await this._confirmInactive403("mls_probe");
|
|
74323
|
+
return null;
|
|
74324
|
+
}
|
|
74325
|
+
const verdict = mlsMembershipFromStatus(res.status, detail);
|
|
74326
|
+
if (verdict === false && res.status === 403) {
|
|
74327
|
+
if (!await confirmDeviceActive() || this._suspended) return null;
|
|
74328
|
+
}
|
|
74329
|
+
return verdict;
|
|
74003
74330
|
} catch {
|
|
74004
74331
|
return null;
|
|
74005
74332
|
}
|
|
@@ -75734,6 +76061,8 @@ ${text}`;
|
|
|
75734
76061
|
async _connect() {
|
|
75735
76062
|
if (this._stopped) return;
|
|
75736
76063
|
this._reissueAttempted = false;
|
|
76064
|
+
this._inactive403Check = null;
|
|
76065
|
+
this._inactive403RetryAt = 0;
|
|
75737
76066
|
this._authFailedThisSession = false;
|
|
75738
76067
|
if (this._reconnectTimer) {
|
|
75739
76068
|
clearTimeout(this._reconnectTimer);
|
|
@@ -75749,6 +76078,10 @@ ${text}`;
|
|
|
75749
76078
|
}
|
|
75750
76079
|
this._setState("connecting");
|
|
75751
76080
|
if (await this._maybeReissueDeviceJwt()) {
|
|
76081
|
+
if (this._suspended) {
|
|
76082
|
+
console.log("[SecureChannel] device is paused \u2014 not connecting until it is resumed");
|
|
76083
|
+
return;
|
|
76084
|
+
}
|
|
75752
76085
|
console.warn(
|
|
75753
76086
|
"[SecureChannel] credentials are terminally dead \u2014 aborting connect (no WS attempt)"
|
|
75754
76087
|
);
|
|
@@ -75759,16 +76092,26 @@ ${text}`;
|
|
|
75759
76092
|
const url2 = `${wsUrl}/api/v1/ws?token=${encodeURIComponent(this._deviceJwt)}&device_id=${this._deviceId}&client_version=${encodeURIComponent(buildClientVersion(this.config.clientVersion))}`;
|
|
75760
76093
|
const ws = new WebSocket(url2);
|
|
75761
76094
|
this._ws = ws;
|
|
76095
|
+
const served = this._createServedGate();
|
|
75762
76096
|
ws.on("open", async () => {
|
|
75763
76097
|
try {
|
|
75764
|
-
this._reconnectAttempt = 0;
|
|
75765
76098
|
this._lastWsOpenTime = Date.now();
|
|
75766
76099
|
this._startPing(ws);
|
|
75767
76100
|
this._startWakeDetector();
|
|
76101
|
+
if (!await served.wait()) {
|
|
76102
|
+
console.log("[SecureChannel] connection rejected before it was served \u2014 skipping connect-time work");
|
|
76103
|
+
return;
|
|
76104
|
+
}
|
|
76105
|
+
const aborted2 = () => this._stopped || this._suspended || this._ws !== ws || served.rejected;
|
|
76106
|
+
if (aborted2()) return;
|
|
76107
|
+
this._reconnectAttempt = 0;
|
|
75768
76108
|
this._startPendingPoll();
|
|
75769
76109
|
await this._syncMissedMessages();
|
|
76110
|
+
if (aborted2()) return;
|
|
75770
76111
|
await this._pullDrDeliveryQueue();
|
|
76112
|
+
if (aborted2()) return;
|
|
75771
76113
|
await this._flushOutboundQueue();
|
|
76114
|
+
if (aborted2()) return;
|
|
75772
76115
|
this._setState("ready");
|
|
75773
76116
|
void this._reconcileConversationGroups().catch((err) => {
|
|
75774
76117
|
console.warn("[SecureChannel] Conversation-group reconcile failed:", err);
|
|
@@ -75800,7 +76143,7 @@ ${text}`;
|
|
|
75800
76143
|
agentVersion: this.config.agentVersion ?? "0.0.0",
|
|
75801
76144
|
// __AV_VERSION__ is injected by esbuild from package.json at build time.
|
|
75802
76145
|
// Falls back to "0.0.0-dev" in non-bundled contexts (tests).
|
|
75803
|
-
pluginVersion: true ? "0.23.
|
|
76146
|
+
pluginVersion: true ? "0.23.54" : "0.0.0-dev"
|
|
75804
76147
|
});
|
|
75805
76148
|
this._telemetryReporter.startAutoFlush(3e4);
|
|
75806
76149
|
}
|
|
@@ -75808,6 +76151,7 @@ ${text}`;
|
|
|
75808
76151
|
await this.listA2AChannels().catch((err) => {
|
|
75809
76152
|
console.warn("[SecureChannel] A2A channel sync on connect failed:", err);
|
|
75810
76153
|
});
|
|
76154
|
+
if (aborted2()) return;
|
|
75811
76155
|
await this._ensureKpPoolPublished();
|
|
75812
76156
|
this._startKpReplenishTimer();
|
|
75813
76157
|
this._pullDeliveryQueue().catch((err) => {
|
|
@@ -75869,6 +76213,8 @@ ${text}`;
|
|
|
75869
76213
|
this._lastWakeTick = Date.now();
|
|
75870
76214
|
try {
|
|
75871
76215
|
const data = JSON.parse(raw.toString());
|
|
76216
|
+
if (data?.event === "connection_rejected") served.markRejected();
|
|
76217
|
+
else served.markServed();
|
|
75872
76218
|
if (data.event && data.event !== "ping" && data.event !== "typing") {
|
|
75873
76219
|
const d2 = data.data ?? {};
|
|
75874
76220
|
const conv = (data.conversation_id || d2.conversation_id || "").toString();
|
|
@@ -76128,7 +76474,7 @@ ${text}`;
|
|
|
76128
76474
|
agentVersion: this.config.agentVersion ?? "0.0.0",
|
|
76129
76475
|
// __AV_VERSION__ is injected by esbuild from package.json at build time.
|
|
76130
76476
|
// Falls back to "0.0.0-dev" in non-bundled contexts (tests).
|
|
76131
|
-
pluginVersion: true ? "0.23.
|
|
76477
|
+
pluginVersion: true ? "0.23.54" : "0.0.0-dev"
|
|
76132
76478
|
});
|
|
76133
76479
|
this._telemetryReporter.startAutoFlush(3e4);
|
|
76134
76480
|
}
|
|
@@ -76497,6 +76843,7 @@ ${text}`;
|
|
|
76497
76843
|
});
|
|
76498
76844
|
ws.on("close", (code) => {
|
|
76499
76845
|
this._lastCloseCode = typeof code === "number" ? code : null;
|
|
76846
|
+
served.markRejected();
|
|
76500
76847
|
this._stopPing();
|
|
76501
76848
|
this._stopWakeDetector();
|
|
76502
76849
|
this._stopPendingPoll();
|
|
@@ -80586,7 +80933,7 @@ ${baseText}`;
|
|
|
80586
80933
|
);
|
|
80587
80934
|
this._authFailedThisSession = true;
|
|
80588
80935
|
this._setState("error");
|
|
80589
|
-
this.emit("auth_failed", { reason: "ws_auth_rejected" });
|
|
80936
|
+
this.emit("auth_failed", { reason: "ws_auth_rejected", deviceGone: false });
|
|
80590
80937
|
return;
|
|
80591
80938
|
}
|
|
80592
80939
|
if (lastCode === 4e3) {
|
|
@@ -80625,7 +80972,7 @@ ${baseText}`;
|
|
|
80625
80972
|
this._state = newState;
|
|
80626
80973
|
this.emit("state", newState);
|
|
80627
80974
|
this.config.onStateChange?.(newState);
|
|
80628
|
-
if (newState === "disconnected" && !this._pollFallbackTimer && this._deviceJwt) {
|
|
80975
|
+
if (newState === "disconnected" && !this._pollFallbackTimer && this._deviceJwt && !this._suspended) {
|
|
80629
80976
|
this._startPollFallback();
|
|
80630
80977
|
}
|
|
80631
80978
|
if (newState === "ready" || newState === "error" || this._stopped) {
|
|
@@ -80762,8 +81109,10 @@ ${baseText}`;
|
|
|
80762
81109
|
* blindly. We ask the PUBLIC /devices/{id}/status endpoint (no JWT needed, so
|
|
80763
81110
|
* it answers even when our device JWT is being rejected):
|
|
80764
81111
|
* - ACTIVE -> reconnect in place (transient); stay online.
|
|
80765
|
-
* -
|
|
80766
|
-
* -
|
|
81112
|
+
* - SUSPENDED -> suspended-wait (owner paused it; resume later).
|
|
81113
|
+
* - REVOKED/deleted -> terminal via `_terminalDeviceGone` (auth_failed with
|
|
81114
|
+
* deviceGone: the bridges exit and remove their service).
|
|
81115
|
+
* - anything else / unreachable / 429 -> reconnect (inconclusive; a network blip shouldn't
|
|
80767
81116
|
* permanently kill a healthy agent — the WS is down too,
|
|
80768
81117
|
* so normal backoff handles it, and the war cap bounds
|
|
80769
81118
|
* thrash if the device really is dead).
|
|
@@ -80803,10 +81152,58 @@ ${baseText}`;
|
|
|
80803
81152
|
}
|
|
80804
81153
|
this._authFailedThisSession = true;
|
|
80805
81154
|
const authReason = data?.reason ?? "unknown";
|
|
81155
|
+
const standing = await this._readDeviceStanding();
|
|
81156
|
+
if (standing.kind === "suspended") {
|
|
81157
|
+
this._authFailedThisSession = false;
|
|
81158
|
+
this._enterSuspendedWait("connection_rejected");
|
|
81159
|
+
return;
|
|
81160
|
+
}
|
|
81161
|
+
const deviceGone = standing.kind === "gone";
|
|
80806
81162
|
console.warn(
|
|
80807
|
-
`[SecureChannel] connection_rejected (reason=${data?.reason ?? "unknown"}, retryable=false) \u2014 terminal; surfacing auth_failed`
|
|
81163
|
+
`[SecureChannel] connection_rejected (reason=${data?.reason ?? "unknown"}, retryable=false) \u2014 terminal; surfacing auth_failed (deviceGone=${deviceGone})`
|
|
80808
81164
|
);
|
|
80809
|
-
this.emit("auth_failed", { reason: authReason });
|
|
81165
|
+
this.emit("auth_failed", { reason: authReason, deviceGone });
|
|
81166
|
+
}
|
|
81167
|
+
/**
|
|
81168
|
+
* How long an opened socket may stay silent before we treat it as served.
|
|
81169
|
+
* The backend's reject_connection sends `connection_rejected` immediately
|
|
81170
|
+
* after the accept, so a refused socket's first frame lands well inside
|
|
81171
|
+
* this; a served agent with a hub gets `hub_identity_sync` sooner still.
|
|
81172
|
+
*/
|
|
81173
|
+
static OPEN_SETTLE_MS = 1500;
|
|
81174
|
+
/**
|
|
81175
|
+
* Per-socket "has the server agreed to serve this session?" latch. Settles
|
|
81176
|
+
* once: served on the first non-rejection frame or when the settle window
|
|
81177
|
+
* passes quietly; rejected on `connection_rejected` or a close first.
|
|
81178
|
+
* `rejected` stays readable afterwards so long open-handler work can bail.
|
|
81179
|
+
*/
|
|
81180
|
+
_createServedGate() {
|
|
81181
|
+
let verdict = null;
|
|
81182
|
+
let rejected = false;
|
|
81183
|
+
let timer = null;
|
|
81184
|
+
const waiters = [];
|
|
81185
|
+
const settle2 = (ok) => {
|
|
81186
|
+
if (!ok) rejected = true;
|
|
81187
|
+
if (verdict !== null) return;
|
|
81188
|
+
verdict = ok;
|
|
81189
|
+
if (timer) {
|
|
81190
|
+
clearTimeout(timer);
|
|
81191
|
+
timer = null;
|
|
81192
|
+
}
|
|
81193
|
+
for (const w2 of waiters.splice(0)) w2(ok);
|
|
81194
|
+
};
|
|
81195
|
+
return {
|
|
81196
|
+
wait: () => {
|
|
81197
|
+
if (verdict !== null) return Promise.resolve(verdict && !rejected);
|
|
81198
|
+
if (!timer) timer = setTimeout(() => settle2(true), _SecureChannel.OPEN_SETTLE_MS);
|
|
81199
|
+
return new Promise((resolve42) => waiters.push(resolve42));
|
|
81200
|
+
},
|
|
81201
|
+
markServed: () => settle2(true),
|
|
81202
|
+
markRejected: () => settle2(false),
|
|
81203
|
+
get rejected() {
|
|
81204
|
+
return rejected;
|
|
81205
|
+
}
|
|
81206
|
+
};
|
|
80810
81207
|
}
|
|
80811
81208
|
// --- Owner pause (device SUSPENDED) — NON-final ---------------------------
|
|
80812
81209
|
//
|
|
@@ -80831,6 +81228,7 @@ ${baseText}`;
|
|
|
80831
81228
|
this._reconnectTimer = null;
|
|
80832
81229
|
}
|
|
80833
81230
|
this._rapidDisconnects = 0;
|
|
81231
|
+
this._stopPollFallback();
|
|
80834
81232
|
if (!this._suspended) {
|
|
80835
81233
|
this._suspended = true;
|
|
80836
81234
|
console.log(
|
|
@@ -80857,30 +81255,40 @@ ${baseText}`;
|
|
|
80857
81255
|
}
|
|
80858
81256
|
async _pollWhileSuspended() {
|
|
80859
81257
|
if (this._stopped || !this._suspended) return;
|
|
80860
|
-
const
|
|
80861
|
-
if (
|
|
80862
|
-
|
|
80863
|
-
|
|
80864
|
-
|
|
80865
|
-
|
|
80866
|
-
|
|
80867
|
-
|
|
80868
|
-
|
|
80869
|
-
|
|
80870
|
-
|
|
80871
|
-
|
|
80872
|
-
|
|
80873
|
-
|
|
80874
|
-
|
|
80875
|
-
|
|
80876
|
-
return;
|
|
80877
|
-
}
|
|
80878
|
-
} catch (err) {
|
|
80879
|
-
console.warn("[SecureChannel] status check while paused failed; still waiting:", err);
|
|
80880
|
-
}
|
|
81258
|
+
const standing = await this._readDeviceStanding();
|
|
81259
|
+
if (this._stopped || !this._suspended) return;
|
|
81260
|
+
if (standing.kind === "active") {
|
|
81261
|
+
this._clearSuspendedWait();
|
|
81262
|
+
this._reconnectAttempt = 0;
|
|
81263
|
+
console.log("[SecureChannel] Agent resumed by its owner \u2014 reconnecting");
|
|
81264
|
+
this.emit("resumed");
|
|
81265
|
+
this._connect();
|
|
81266
|
+
return;
|
|
81267
|
+
}
|
|
81268
|
+
if (standing.kind === "gone") {
|
|
81269
|
+
await this._terminalDeviceGone(standing.reason, "suspended_wait");
|
|
81270
|
+
return;
|
|
81271
|
+
}
|
|
81272
|
+
if (standing.kind === "unknown") {
|
|
81273
|
+
console.warn(`[SecureChannel] status check while paused inconclusive (${standing.why}); still waiting`);
|
|
80881
81274
|
}
|
|
80882
81275
|
this._scheduleSuspendedPoll();
|
|
80883
81276
|
}
|
|
81277
|
+
/**
|
|
81278
|
+
* The device is CONFIRMED gone (status endpoint: REVOKED, or the row is
|
|
81279
|
+
* deleted). Stop for good through the documented terminal surface:
|
|
81280
|
+
* re_enroll report, `auth_failed{deviceGone:true}` (bridges exit and remove
|
|
81281
|
+
* their service), then the legacy `error("Device was revoked")` the OpenClaw
|
|
81282
|
+
* lifecycle and older listeners key on.
|
|
81283
|
+
*/
|
|
81284
|
+
async _terminalDeviceGone(reason, source) {
|
|
81285
|
+
this._clearSuspendedWait();
|
|
81286
|
+
this._authFailedThisSession = true;
|
|
81287
|
+
console.warn(`[SecureChannel] ${source}: device confirmed gone (${reason}) \u2014 terminal`);
|
|
81288
|
+
await this._postAuthFailedToBackend(reason);
|
|
81289
|
+
this.emit("auth_failed", { reason, deviceGone: true });
|
|
81290
|
+
this._handleError(new Error("Device was revoked"));
|
|
81291
|
+
}
|
|
80884
81292
|
async _handleDeviceRevoked() {
|
|
80885
81293
|
const now = Date.now();
|
|
80886
81294
|
this._revokeRecoveries = this._revokeRecoveries.filter(
|
|
@@ -80898,35 +81306,25 @@ ${baseText}`;
|
|
|
80898
81306
|
this._handleError(new Error("Device was revoked"));
|
|
80899
81307
|
return;
|
|
80900
81308
|
}
|
|
80901
|
-
|
|
80902
|
-
|
|
80903
|
-
|
|
80904
|
-
|
|
80905
|
-
this._enterSuspendedWait("device_revoked");
|
|
80906
|
-
return;
|
|
80907
|
-
}
|
|
80908
|
-
reconnect = status.rateLimited === true || status.status === "ACTIVE";
|
|
80909
|
-
if (!reconnect) {
|
|
80910
|
-
console.warn(
|
|
80911
|
-
`[SecureChannel] device_revoked confirmed by server (status=${status.status}) \u2014 terminal`
|
|
80912
|
-
);
|
|
80913
|
-
}
|
|
80914
|
-
} catch (err) {
|
|
80915
|
-
console.warn(
|
|
80916
|
-
"[SecureChannel] device_revoked status check failed; reconnecting (inconclusive):",
|
|
80917
|
-
err
|
|
80918
|
-
);
|
|
80919
|
-
reconnect = true;
|
|
81309
|
+
const standing = await this._readDeviceStanding();
|
|
81310
|
+
if (standing.kind === "suspended") {
|
|
81311
|
+
this._enterSuspendedWait("device_revoked");
|
|
81312
|
+
return;
|
|
80920
81313
|
}
|
|
80921
|
-
if (
|
|
80922
|
-
this.
|
|
80923
|
-
console.log(
|
|
80924
|
-
"[SecureChannel] device_revoked but device not confirmed dead \u2014 reconnecting (self-heal)"
|
|
80925
|
-
);
|
|
80926
|
-
this._scheduleReconnect();
|
|
81314
|
+
if (standing.kind === "gone") {
|
|
81315
|
+
await this._terminalDeviceGone(standing.reason, "device_revoked");
|
|
80927
81316
|
return;
|
|
80928
81317
|
}
|
|
80929
|
-
|
|
81318
|
+
if (standing.kind === "unknown") {
|
|
81319
|
+
console.warn(
|
|
81320
|
+
`[SecureChannel] device_revoked status check inconclusive (${standing.why}); reconnecting`
|
|
81321
|
+
);
|
|
81322
|
+
}
|
|
81323
|
+
this._revokeRecoveries.push(now);
|
|
81324
|
+
console.log(
|
|
81325
|
+
"[SecureChannel] device_revoked but device not confirmed dead \u2014 reconnecting (self-heal)"
|
|
81326
|
+
);
|
|
81327
|
+
this._scheduleReconnect();
|
|
80930
81328
|
}
|
|
80931
81329
|
/**
|
|
80932
81330
|
* Persist all ratchet session states to disk.
|
|
@@ -81726,7 +82124,7 @@ ${actionsText}`);
|
|
|
81726
82124
|
"use strict";
|
|
81727
82125
|
init_llm_response_parser();
|
|
81728
82126
|
init_llm_cost();
|
|
81729
|
-
traceStore = new
|
|
82127
|
+
traceStore = new AsyncLocalStorage3();
|
|
81730
82128
|
}
|
|
81731
82129
|
});
|
|
81732
82130
|
init_tool_audit = __esm2({
|
|
@@ -81749,6 +82147,7 @@ ${actionsText}`);
|
|
|
81749
82147
|
init_openclaw_compat();
|
|
81750
82148
|
init_lifecycle();
|
|
81751
82149
|
init_tool_audit();
|
|
82150
|
+
init_tool_telemetry();
|
|
81752
82151
|
init_harness_compat();
|
|
81753
82152
|
init_types();
|
|
81754
82153
|
managedRoutesRequested = false;
|
|
@@ -102474,7 +102873,8 @@ data:
|
|
|
102474
102873
|
await init_skill_telemetry();
|
|
102475
102874
|
await init_policy_enforcer();
|
|
102476
102875
|
init_room_protocol();
|
|
102477
|
-
|
|
102876
|
+
init_tool_telemetry();
|
|
102877
|
+
VERSION = true ? "0.23.54" : "0.0.0-dev";
|
|
102478
102878
|
}
|
|
102479
102879
|
});
|
|
102480
102880
|
await init_index();
|
|
@@ -103370,7 +103770,7 @@ function museSpawnArgs(opts) {
|
|
|
103370
103770
|
}
|
|
103371
103771
|
|
|
103372
103772
|
// src/muse-provider.ts
|
|
103373
|
-
import { randomBytes as
|
|
103773
|
+
import { randomBytes as randomBytes4 } from "node:crypto";
|
|
103374
103774
|
import { createServer as createServer2 } from "node:http";
|
|
103375
103775
|
import { once } from "node:events";
|
|
103376
103776
|
var META_RESPONSES_URL = "https://api.meta.ai/v1/responses";
|
|
@@ -103486,7 +103886,7 @@ async function forward(response, res, signal, inspected) {
|
|
|
103486
103886
|
}
|
|
103487
103887
|
}
|
|
103488
103888
|
async function createMuseProviderAdapter(opts) {
|
|
103489
|
-
const route = `/${
|
|
103889
|
+
const route = `/${randomBytes4(24).toString("hex")}/v1/responses`;
|
|
103490
103890
|
const turn = new AbortController();
|
|
103491
103891
|
const sockets = /* @__PURE__ */ new Set();
|
|
103492
103892
|
const log = (message) => {
|
|
@@ -103908,7 +104308,7 @@ function redactSecrets(text) {
|
|
|
103908
104308
|
|
|
103909
104309
|
// src/muse-room-http.ts
|
|
103910
104310
|
import { createServer as createServer3 } from "node:http";
|
|
103911
|
-
import { randomBytes as
|
|
104311
|
+
import { randomBytes as randomBytes5, randomUUID as randomUUID6, timingSafeEqual } from "node:crypto";
|
|
103912
104312
|
|
|
103913
104313
|
// src/muse-room-mcp.ts
|
|
103914
104314
|
var PROTOCOL = "2024-11-05";
|
|
@@ -103985,7 +104385,7 @@ function acceptOf(req) {
|
|
|
103985
104385
|
async function startRoomMcpServer(opts) {
|
|
103986
104386
|
const seen = [];
|
|
103987
104387
|
const traces = [];
|
|
103988
|
-
const token =
|
|
104388
|
+
const token = randomBytes5(24).toString("base64url");
|
|
103989
104389
|
const path2 = `/mcp/${token}`;
|
|
103990
104390
|
const log = opts.log ?? (() => {
|
|
103991
104391
|
});
|
|
@@ -104233,6 +104633,18 @@ var RoomHushState = class {
|
|
|
104233
104633
|
return t2 !== void 0 && now < t2;
|
|
104234
104634
|
}
|
|
104235
104635
|
};
|
|
104636
|
+
function reportSay(channel, t2, startedAt, failure2) {
|
|
104637
|
+
try {
|
|
104638
|
+
reportToolInvoke(channel.telemetry, {
|
|
104639
|
+
toolName: "say",
|
|
104640
|
+
outcome: failure2 ? "error" : "success",
|
|
104641
|
+
errorKind: failure2 ? classifyToolError(failure2.err) : void 0,
|
|
104642
|
+
durationMs: Date.now() - startedAt,
|
|
104643
|
+
conversation: t2.kind === "room" ? { kind: "room", id: t2.roomId } : t2.conversationId ? { kind: "direct", id: t2.conversationId } : { kind: "unknown" }
|
|
104644
|
+
});
|
|
104645
|
+
} catch {
|
|
104646
|
+
}
|
|
104647
|
+
}
|
|
104236
104648
|
async function sendDm(channel, t2, text) {
|
|
104237
104649
|
if ((t2.conversationId || t2.groupId) && typeof channel.runForConversation === "function") {
|
|
104238
104650
|
await channel.runForConversation(
|
|
@@ -104265,13 +104677,17 @@ var ActiveTarget = class {
|
|
|
104265
104677
|
const where = !t2 ? "nowhere" : t2.kind === "room" ? `room ${t2.roomId.slice(0, 8)}` : "1:1 owner";
|
|
104266
104678
|
return async (text) => {
|
|
104267
104679
|
if (!t2) return;
|
|
104680
|
+
const startedAt = Date.now();
|
|
104268
104681
|
try {
|
|
104269
104682
|
if (t2.kind === "room") await channel.sendToRoom(t2.roomId, text);
|
|
104270
104683
|
else await sendDm(channel, t2, text);
|
|
104271
104684
|
log(`said to ${where}`);
|
|
104272
104685
|
} catch (err) {
|
|
104273
104686
|
log(`send failed to ${where}: ${err instanceof Error ? err.message : String(err)}`);
|
|
104687
|
+
reportSay(channel, t2, startedAt, { err });
|
|
104688
|
+
return;
|
|
104274
104689
|
}
|
|
104690
|
+
reportSay(channel, t2, startedAt);
|
|
104275
104691
|
};
|
|
104276
104692
|
}
|
|
104277
104693
|
};
|
|
@@ -104434,7 +104850,7 @@ function mkdir700(path2) {
|
|
|
104434
104850
|
chmodSync5(path2, 448);
|
|
104435
104851
|
}
|
|
104436
104852
|
function packageVersion() {
|
|
104437
|
-
return true ? "0.1.
|
|
104853
|
+
return true ? "0.1.29" : void 0;
|
|
104438
104854
|
}
|
|
104439
104855
|
function helpText(version2) {
|
|
104440
104856
|
return [
|
package/package.json
CHANGED