@agentvault/muse-bridge 0.1.3 → 0.1.5
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 +6 -0
- package/dist/index.js +743 -501
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -239,465 +239,7 @@ var init_log = __esm({
|
|
|
239
239
|
}
|
|
240
240
|
});
|
|
241
241
|
|
|
242
|
-
//
|
|
243
|
-
import { dirname as dirname2 } from "node:path";
|
|
244
|
-
function sq(s2) {
|
|
245
|
-
return `'${s2.replace(/'/g, `'\\''`)}'`;
|
|
246
|
-
}
|
|
247
|
-
function candidateExpr(c2) {
|
|
248
|
-
return c2.includes("$") ? `"${c2}"` : sq(c2);
|
|
249
|
-
}
|
|
250
|
-
function renderLauncher(opts) {
|
|
251
|
-
const candidates = ["node", ...opts.fallbacks ?? FALLBACK_NODES];
|
|
252
|
-
const lines = [
|
|
253
|
-
"#!/usr/bin/env bash",
|
|
254
|
-
"# AgentVault muse-bridge launcher \u2014 regenerated on every `install`. Resolves node at",
|
|
255
|
-
"# boot so a node upgrade / version-manager switch can't strand the daemon."
|
|
256
|
-
];
|
|
257
|
-
if (opts.installPath) lines.push(`export PATH=${sq(opts.installPath)}:"$PATH"`);
|
|
258
|
-
for (const c2 of candidates) {
|
|
259
|
-
lines.push(`if n=$(command -v ${candidateExpr(c2)} 2>/dev/null); then exec "$n" ${sq(opts.entrypoint)} "$@"; fi`);
|
|
260
|
-
}
|
|
261
|
-
lines.push(
|
|
262
|
-
`echo "[muse-bridge] node not found on PATH or known locations \u2014 re-run: agentvault-muse-bridge install" >&2`,
|
|
263
|
-
"exit 0"
|
|
264
|
-
);
|
|
265
|
-
return lines.join("\n") + "\n";
|
|
266
|
-
}
|
|
267
|
-
function writeLauncher(deps, spec) {
|
|
268
|
-
deps.mkdir(dirname2(spec.launcherPath));
|
|
269
|
-
deps.writeFile(spec.launcherPath, spec.launcherScript);
|
|
270
|
-
deps.chmod(spec.launcherPath, 493);
|
|
271
|
-
}
|
|
272
|
-
var FALLBACK_NODES;
|
|
273
|
-
var init_launcher = __esm({
|
|
274
|
-
"src/service/launcher.ts"() {
|
|
275
|
-
"use strict";
|
|
276
|
-
FALLBACK_NODES = [
|
|
277
|
-
"/opt/homebrew/bin/node",
|
|
278
|
-
"/usr/local/bin/node",
|
|
279
|
-
"/usr/bin/node",
|
|
280
|
-
"$HOME/.volta/bin/node",
|
|
281
|
-
"$HOME/.asdf/shims/node",
|
|
282
|
-
"$HOME/.local/bin/node"
|
|
283
|
-
];
|
|
284
|
-
}
|
|
285
|
-
});
|
|
286
|
-
|
|
287
|
-
// src/service/spec.ts
|
|
288
|
-
import { join as join6 } from "node:path";
|
|
289
|
-
function buildServiceSpec(cfg, opts) {
|
|
290
|
-
const env = {
|
|
291
|
-
AV_AGENT_NAME: cfg.agentName,
|
|
292
|
-
AV_DATA_DIR: cfg.dataDir,
|
|
293
|
-
AV_API_URL: cfg.apiUrl,
|
|
294
|
-
AV_FENCE_HOME: cfg.fenceHome,
|
|
295
|
-
AV_MUSE_PATH: cfg.musePath
|
|
296
|
-
};
|
|
297
|
-
if (cfg.workspaceDir) env.AV_WORKSPACE_DIR = cfg.workspaceDir;
|
|
298
|
-
const launcherPath = join6(cfg.dataDir, "launch-muse-bridge.sh");
|
|
299
|
-
return {
|
|
300
|
-
label: `dev.agentvault.muse-${slugify(cfg.agentName)}`,
|
|
301
|
-
programArgs: [launcherPath],
|
|
302
|
-
launcherPath,
|
|
303
|
-
launcherScript: renderLauncher({ installPath: opts.path, entrypoint: opts.entrypoint }),
|
|
304
|
-
env,
|
|
305
|
-
workingDir: cfg.workspaceDir ? cfg.workspaceDir : opts.home,
|
|
306
|
-
logOut: join6(cfg.dataDir, "logs", "muse-bridge.log"),
|
|
307
|
-
logErr: join6(cfg.dataDir, "logs", "muse-bridge.error.log"),
|
|
308
|
-
keepAliveUnlessCleanExit: true,
|
|
309
|
-
runAtLoad: true
|
|
310
|
-
};
|
|
311
|
-
}
|
|
312
|
-
var init_spec = __esm({
|
|
313
|
-
"src/service/spec.ts"() {
|
|
314
|
-
"use strict";
|
|
315
|
-
init_config();
|
|
316
|
-
init_launcher();
|
|
317
|
-
}
|
|
318
|
-
});
|
|
319
|
-
|
|
320
|
-
// src/service/launchd.ts
|
|
321
|
-
import { dirname as dirname3, join as join7 } from "node:path";
|
|
322
|
-
function esc(s2) {
|
|
323
|
-
return s2.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
324
|
-
}
|
|
325
|
-
function renderLaunchdPlist(spec) {
|
|
326
|
-
const args = spec.programArgs.map((a2) => ` <string>${esc(a2)}</string>`).join("\n");
|
|
327
|
-
const envEntries = Object.entries(spec.env).map(([k2, v2]) => ` <key>${esc(k2)}</key>
|
|
328
|
-
<string>${esc(v2)}</string>`).join("\n");
|
|
329
|
-
const keepAlive = spec.keepAliveUnlessCleanExit ? "<key>KeepAlive</key>\n <dict>\n <key>SuccessfulExit</key>\n <false/>\n </dict>" : "<key>KeepAlive</key>\n <false/>";
|
|
330
|
-
return `<?xml version="1.0" encoding="UTF-8"?>
|
|
331
|
-
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
332
|
-
<plist version="1.0">
|
|
333
|
-
<dict>
|
|
334
|
-
<key>Label</key>
|
|
335
|
-
<string>${esc(spec.label)}</string>
|
|
336
|
-
<key>ProgramArguments</key>
|
|
337
|
-
<array>
|
|
338
|
-
${args}
|
|
339
|
-
</array>
|
|
340
|
-
<key>EnvironmentVariables</key>
|
|
341
|
-
<dict>
|
|
342
|
-
${envEntries}
|
|
343
|
-
</dict>
|
|
344
|
-
<key>WorkingDirectory</key>
|
|
345
|
-
<string>${esc(spec.workingDir)}</string>
|
|
346
|
-
<key>StandardOutPath</key>
|
|
347
|
-
<string>${esc(spec.logOut)}</string>
|
|
348
|
-
<key>StandardErrorPath</key>
|
|
349
|
-
<string>${esc(spec.logErr)}</string>
|
|
350
|
-
${keepAlive}
|
|
351
|
-
<key>RunAtLoad</key>
|
|
352
|
-
${spec.runAtLoad ? "<true/>" : "<false/>"}
|
|
353
|
-
</dict>
|
|
354
|
-
</plist>
|
|
355
|
-
`;
|
|
356
|
-
}
|
|
357
|
-
function parsePlistEnv(xml) {
|
|
358
|
-
const out = {};
|
|
359
|
-
const keyIdx = xml.indexOf("<key>EnvironmentVariables</key>");
|
|
360
|
-
if (keyIdx < 0) return out;
|
|
361
|
-
const open = xml.indexOf("<dict>", keyIdx);
|
|
362
|
-
if (open < 0) return out;
|
|
363
|
-
let depth = 0;
|
|
364
|
-
let i2 = open;
|
|
365
|
-
let close = -1;
|
|
366
|
-
const tag = /<(\/?)dict>/g;
|
|
367
|
-
tag.lastIndex = open;
|
|
368
|
-
let m2;
|
|
369
|
-
while (m2 = tag.exec(xml)) {
|
|
370
|
-
depth += m2[1] ? -1 : 1;
|
|
371
|
-
if (depth === 0) {
|
|
372
|
-
close = m2.index;
|
|
373
|
-
break;
|
|
374
|
-
}
|
|
375
|
-
i2 = m2.index;
|
|
376
|
-
}
|
|
377
|
-
void i2;
|
|
378
|
-
if (close < 0) return out;
|
|
379
|
-
const body = xml.slice(open, close);
|
|
380
|
-
const pair = /<key>([\s\S]*?)<\/key>\s*<string>([\s\S]*?)<\/string>/g;
|
|
381
|
-
let p2;
|
|
382
|
-
while (p2 = pair.exec(body)) out[unesc(p2[1])] = unesc(p2[2]);
|
|
383
|
-
return out;
|
|
384
|
-
}
|
|
385
|
-
function unesc(s2) {
|
|
386
|
-
return s2.replace(/</g, "<").replace(/>/g, ">").replace(/&/g, "&");
|
|
387
|
-
}
|
|
388
|
-
var LaunchdBackend;
|
|
389
|
-
var init_launchd = __esm({
|
|
390
|
-
"src/service/launchd.ts"() {
|
|
391
|
-
"use strict";
|
|
392
|
-
init_launcher();
|
|
393
|
-
LaunchdBackend = class {
|
|
394
|
-
constructor(deps) {
|
|
395
|
-
this.deps = deps;
|
|
396
|
-
}
|
|
397
|
-
deps;
|
|
398
|
-
plistPath(label) {
|
|
399
|
-
return join7(this.deps.home, "Library", "LaunchAgents", `${label}.plist`);
|
|
400
|
-
}
|
|
401
|
-
domain() {
|
|
402
|
-
return `gui/${this.deps.uid}`;
|
|
403
|
-
}
|
|
404
|
-
install(spec) {
|
|
405
|
-
const path2 = this.plistPath(spec.label);
|
|
406
|
-
this.deps.mkdir(dirname3(spec.logOut));
|
|
407
|
-
writeLauncher(this.deps, spec);
|
|
408
|
-
this.deps.mkdir(dirname3(path2));
|
|
409
|
-
this.deps.writeFile(path2, renderLaunchdPlist(spec));
|
|
410
|
-
const svc = `${this.domain()}/${spec.label}`;
|
|
411
|
-
this.deps.exec("launchctl", ["bootout", svc]);
|
|
412
|
-
this.waitUntilGone(svc);
|
|
413
|
-
let r2 = this.deps.exec("launchctl", ["bootstrap", this.domain(), path2]);
|
|
414
|
-
for (let i2 = 0; i2 < 5 && r2.code !== 0; i2++) {
|
|
415
|
-
this.deps.exec("sleep", ["0.3"]);
|
|
416
|
-
r2 = this.deps.exec("launchctl", ["bootstrap", this.domain(), path2]);
|
|
417
|
-
}
|
|
418
|
-
this.deps.exec("launchctl", ["kickstart", "-k", svc]);
|
|
419
|
-
}
|
|
420
|
-
waitUntilGone(svc) {
|
|
421
|
-
for (let i2 = 0; i2 < 20; i2++) {
|
|
422
|
-
if (this.deps.exec("launchctl", ["print", svc]).code !== 0) return;
|
|
423
|
-
this.deps.exec("sleep", ["0.25"]);
|
|
424
|
-
}
|
|
425
|
-
}
|
|
426
|
-
restart(label) {
|
|
427
|
-
this.deps.exec("launchctl", ["kickstart", "-k", `${this.domain()}/${label}`]);
|
|
428
|
-
}
|
|
429
|
-
uninstall(label) {
|
|
430
|
-
this.deps.exec("launchctl", ["bootout", `${this.domain()}/${label}`]);
|
|
431
|
-
const path2 = this.plistPath(label);
|
|
432
|
-
if (this.deps.exists(path2)) this.deps.rm(path2);
|
|
433
|
-
}
|
|
434
|
-
status(label) {
|
|
435
|
-
const r2 = this.deps.exec("launchctl", ["print", `${this.domain()}/${label}`]);
|
|
436
|
-
return { loaded: r2.code === 0, detail: r2.stdout };
|
|
437
|
-
}
|
|
438
|
-
list(prefix) {
|
|
439
|
-
const dir = join7(this.deps.home, "Library", "LaunchAgents");
|
|
440
|
-
const out = [];
|
|
441
|
-
for (const name of this.deps.readdir(dir)) {
|
|
442
|
-
if (!name.startsWith(prefix) || !name.endsWith(".plist")) continue;
|
|
443
|
-
const path2 = join7(dir, name);
|
|
444
|
-
out.push({
|
|
445
|
-
label: name.slice(0, -".plist".length),
|
|
446
|
-
path: path2,
|
|
447
|
-
env: parsePlistEnv(this.deps.readFile(path2))
|
|
448
|
-
});
|
|
449
|
-
}
|
|
450
|
-
return out.sort((a2, b2) => a2.label.localeCompare(b2.label));
|
|
451
|
-
}
|
|
452
|
-
};
|
|
453
|
-
}
|
|
454
|
-
});
|
|
455
|
-
|
|
456
|
-
// src/service/systemd.ts
|
|
457
|
-
import { dirname as dirname4, join as join8 } from "node:path";
|
|
458
|
-
function q(s2) {
|
|
459
|
-
const esc3 = s2.replace(/\\/g, "\\\\").replace(/"/g, '\\"').replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/\t/g, "\\t").replace(/%/g, "%%");
|
|
460
|
-
return `"${esc3}"`;
|
|
461
|
-
}
|
|
462
|
-
function renderSystemdUnit(spec) {
|
|
463
|
-
const exec = spec.programArgs.map(q).join(" ");
|
|
464
|
-
const envLines = Object.entries(spec.env).map(([k2, v2]) => `Environment=${q(`${k2}=${v2}`)}`).join("\n");
|
|
465
|
-
return `[Unit]
|
|
466
|
-
Description=AgentVault muse bridge (${spec.label})
|
|
467
|
-
Wants=network-online.target
|
|
468
|
-
After=network-online.target
|
|
469
|
-
|
|
470
|
-
[Service]
|
|
471
|
-
ExecStart=${exec}
|
|
472
|
-
WorkingDirectory=${spec.workingDir}
|
|
473
|
-
${envLines}
|
|
474
|
-
Restart=on-failure
|
|
475
|
-
SuccessExitStatus=0
|
|
476
|
-
StandardOutput=append:${spec.logOut}
|
|
477
|
-
StandardError=append:${spec.logErr}
|
|
478
|
-
|
|
479
|
-
[Install]
|
|
480
|
-
WantedBy=default.target
|
|
481
|
-
`;
|
|
482
|
-
}
|
|
483
|
-
function parseUnitEnv(text) {
|
|
484
|
-
const out = {};
|
|
485
|
-
for (const line of text.split("\n")) {
|
|
486
|
-
const m2 = /^Environment="([\s\S]*)"\s*$/.exec(line.trim());
|
|
487
|
-
if (!m2) continue;
|
|
488
|
-
const eq = unq(m2[1]);
|
|
489
|
-
const at = eq.indexOf("=");
|
|
490
|
-
if (at <= 0) continue;
|
|
491
|
-
out[eq.slice(0, at)] = eq.slice(at + 1);
|
|
492
|
-
}
|
|
493
|
-
return out;
|
|
494
|
-
}
|
|
495
|
-
function unq(s2) {
|
|
496
|
-
return s2.replace(/%%/g, "%").replace(
|
|
497
|
-
/\\([\s\S])/g,
|
|
498
|
-
(_2, c2) => c2 === "n" ? "\n" : c2 === "r" ? "\r" : c2 === "t" ? " " : c2
|
|
499
|
-
);
|
|
500
|
-
}
|
|
501
|
-
var SystemdBackend;
|
|
502
|
-
var init_systemd = __esm({
|
|
503
|
-
"src/service/systemd.ts"() {
|
|
504
|
-
"use strict";
|
|
505
|
-
init_launcher();
|
|
506
|
-
SystemdBackend = class {
|
|
507
|
-
constructor(deps) {
|
|
508
|
-
this.deps = deps;
|
|
509
|
-
}
|
|
510
|
-
deps;
|
|
511
|
-
unitPath(label) {
|
|
512
|
-
return join8(this.deps.home, ".config", "systemd", "user", `${label}.service`);
|
|
513
|
-
}
|
|
514
|
-
install(spec) {
|
|
515
|
-
const path2 = this.unitPath(spec.label);
|
|
516
|
-
this.deps.mkdir(dirname4(spec.logOut));
|
|
517
|
-
writeLauncher(this.deps, spec);
|
|
518
|
-
this.deps.mkdir(dirname4(path2));
|
|
519
|
-
this.deps.writeFile(path2, renderSystemdUnit(spec));
|
|
520
|
-
this.deps.exec("loginctl", ["enable-linger", this.deps.user]);
|
|
521
|
-
this.deps.exec("systemctl", ["--user", "daemon-reload"]);
|
|
522
|
-
this.deps.exec("systemctl", ["--user", "enable", `${spec.label}.service`]);
|
|
523
|
-
this.deps.exec("systemctl", ["--user", "restart", `${spec.label}.service`]);
|
|
524
|
-
}
|
|
525
|
-
restart(label) {
|
|
526
|
-
this.deps.exec("systemctl", ["--user", "restart", `${label}.service`]);
|
|
527
|
-
}
|
|
528
|
-
uninstall(label) {
|
|
529
|
-
this.deps.exec("systemctl", ["--user", "disable", "--now", `${label}.service`]);
|
|
530
|
-
const path2 = this.unitPath(label);
|
|
531
|
-
if (this.deps.exists(path2)) this.deps.rm(path2);
|
|
532
|
-
this.deps.exec("systemctl", ["--user", "daemon-reload"]);
|
|
533
|
-
}
|
|
534
|
-
status(label) {
|
|
535
|
-
const enabled = this.deps.exec("systemctl", ["--user", "is-enabled", `${label}.service`]);
|
|
536
|
-
const active = this.deps.exec("systemctl", ["--user", "is-active", `${label}.service`]);
|
|
537
|
-
return { loaded: enabled.code === 0, detail: `${enabled.stdout.trim() || "?"} / ${active.stdout.trim() || "?"}` };
|
|
538
|
-
}
|
|
539
|
-
list(prefix) {
|
|
540
|
-
const dir = join8(this.deps.home, ".config", "systemd", "user");
|
|
541
|
-
const out = [];
|
|
542
|
-
for (const name of this.deps.readdir(dir)) {
|
|
543
|
-
if (!name.startsWith(prefix) || !name.endsWith(".service")) continue;
|
|
544
|
-
const path2 = join8(dir, name);
|
|
545
|
-
out.push({
|
|
546
|
-
label: name.slice(0, -".service".length),
|
|
547
|
-
path: path2,
|
|
548
|
-
env: parseUnitEnv(this.deps.readFile(path2))
|
|
549
|
-
});
|
|
550
|
-
}
|
|
551
|
-
return out.sort((a2, b2) => a2.label.localeCompare(b2.label));
|
|
552
|
-
}
|
|
553
|
-
};
|
|
554
|
-
}
|
|
555
|
-
});
|
|
556
|
-
|
|
557
|
-
// src/service/backend.ts
|
|
558
|
-
import { spawnSync } from "node:child_process";
|
|
559
|
-
import { mkdirSync as mkdirSync5, writeFileSync as writeFileSync4, rmSync, existsSync as existsSync4, chmodSync as chmodSync4, readdirSync, readFileSync as readFileSync4 } from "node:fs";
|
|
560
|
-
import { userInfo } from "node:os";
|
|
561
|
-
function defaultDeps() {
|
|
562
|
-
return {
|
|
563
|
-
home: process.env.HOME ?? "",
|
|
564
|
-
uid: userInfo().uid,
|
|
565
|
-
user: userInfo().username,
|
|
566
|
-
exec: (cmd, args) => {
|
|
567
|
-
const r2 = spawnSync(cmd, args, { encoding: "utf8" });
|
|
568
|
-
return { code: r2.status ?? 1, stdout: r2.stdout ?? "" };
|
|
569
|
-
},
|
|
570
|
-
writeFile: (p2, d2) => writeFileSync4(p2, d2),
|
|
571
|
-
mkdir: (p2) => mkdirSync5(p2, { recursive: true }),
|
|
572
|
-
chmod: (p2, m2) => chmodSync4(p2, m2),
|
|
573
|
-
rm: (p2) => rmSync(p2, { force: true }),
|
|
574
|
-
exists: (p2) => existsSync4(p2),
|
|
575
|
-
readdir: (p2) => {
|
|
576
|
-
try {
|
|
577
|
-
return readdirSync(p2);
|
|
578
|
-
} catch {
|
|
579
|
-
return [];
|
|
580
|
-
}
|
|
581
|
-
},
|
|
582
|
-
readFile: (p2) => {
|
|
583
|
-
try {
|
|
584
|
-
return readFileSync4(p2, "utf8");
|
|
585
|
-
} catch {
|
|
586
|
-
return "";
|
|
587
|
-
}
|
|
588
|
-
}
|
|
589
|
-
};
|
|
590
|
-
}
|
|
591
|
-
function selectBackend(platform, deps) {
|
|
592
|
-
if (platform === "darwin") {
|
|
593
|
-
return new LaunchdBackend(deps ?? defaultDeps());
|
|
594
|
-
}
|
|
595
|
-
if (platform === "linux") {
|
|
596
|
-
return new SystemdBackend(deps ?? defaultDeps());
|
|
597
|
-
}
|
|
598
|
-
throw new Error(`unsupported platform for muse-bridge service install: ${platform}`);
|
|
599
|
-
}
|
|
600
|
-
var init_backend = __esm({
|
|
601
|
-
"src/service/backend.ts"() {
|
|
602
|
-
"use strict";
|
|
603
|
-
init_launchd();
|
|
604
|
-
init_systemd();
|
|
605
|
-
}
|
|
606
|
-
});
|
|
607
|
-
|
|
608
|
-
// src/service/subcommand.ts
|
|
609
|
-
var subcommand_exports = {};
|
|
610
|
-
__export(subcommand_exports, {
|
|
611
|
-
labelFor: () => labelFor,
|
|
612
|
-
maybeRunServiceSubcommand: () => maybeRunServiceSubcommand
|
|
613
|
-
});
|
|
614
|
-
import { join as join9 } from "node:path";
|
|
615
|
-
function requireAgentName(env) {
|
|
616
|
-
const name = env.AV_AGENT_NAME?.trim();
|
|
617
|
-
if (!name) {
|
|
618
|
-
throw new Error(
|
|
619
|
-
"AV_AGENT_NAME is required \u2014 it names WHICH agent's service to act on. Re-run as: AV_AGENT_NAME=<agent-name> agentvault-muse-bridge <subcommand>"
|
|
620
|
-
);
|
|
621
|
-
}
|
|
622
|
-
return name;
|
|
623
|
-
}
|
|
624
|
-
function labelFor(env) {
|
|
625
|
-
return `dev.agentvault.muse-${slugify(requireAgentName(env))}`;
|
|
626
|
-
}
|
|
627
|
-
function dataDirFor(env, agentName) {
|
|
628
|
-
if (env.AV_DATA_DIR) return env.AV_DATA_DIR;
|
|
629
|
-
return join9(env.HOME ?? "", ".agentvault", "muse-room-bridge", slugify(agentName));
|
|
630
|
-
}
|
|
631
|
-
function maybeRunServiceSubcommand(argv, env, deps) {
|
|
632
|
-
const cmd = argv[2];
|
|
633
|
-
if (!cmd) return false;
|
|
634
|
-
if (!SERVICE_CMDS.has(cmd)) {
|
|
635
|
-
const looksLikeToken = cmd.startsWith("av_tok_");
|
|
636
|
-
const looksLikeFlag = cmd.startsWith("-");
|
|
637
|
-
if (!looksLikeToken && !looksLikeFlag) {
|
|
638
|
-
throw new Error(
|
|
639
|
-
`unknown subcommand: ${cmd} \u2014 expected one of ${[...SERVICE_CMDS].join(", ")}, an invite token, or no argument at all`
|
|
640
|
-
);
|
|
641
|
-
}
|
|
642
|
-
return false;
|
|
643
|
-
}
|
|
644
|
-
const backend = deps?.backend ?? selectBackend(process.platform);
|
|
645
|
-
const entrypoint = deps?.entrypoint ?? process.argv[1];
|
|
646
|
-
const log = deps?.log ?? ((m2) => logLine("[muse-bridge] " + m2));
|
|
647
|
-
try {
|
|
648
|
-
if (cmd === "install") {
|
|
649
|
-
const agentName = requireAgentName(env);
|
|
650
|
-
assertInstallableEntrypoint(entrypoint);
|
|
651
|
-
const dataDir = dataDirFor(env, agentName);
|
|
652
|
-
if (!hasPersistedCreds(dataDir)) {
|
|
653
|
-
throw new Error(
|
|
654
|
-
"cannot install a supervised service before this agent has enrolled \u2014 run agentvault-muse-bridge <invite-token> once so credentials persist, then: AV_AGENT_NAME=<agent-name> agentvault-muse-bridge install"
|
|
655
|
-
);
|
|
656
|
-
}
|
|
657
|
-
const cfg = loadConfig(env, []);
|
|
658
|
-
const spec = buildServiceSpec(cfg, {
|
|
659
|
-
entrypoint,
|
|
660
|
-
home: env.HOME ?? "",
|
|
661
|
-
path: env.PATH ?? ""
|
|
662
|
-
});
|
|
663
|
-
backend.install(spec);
|
|
664
|
-
log(`installed service ${spec.label} \u2014 logs: ${spec.logErr}`);
|
|
665
|
-
log(`check it with: AV_AGENT_NAME=${cfg.agentName} agentvault-muse-bridge status`);
|
|
666
|
-
} else if (cmd === "uninstall") {
|
|
667
|
-
const label = labelFor(env);
|
|
668
|
-
backend.uninstall(label);
|
|
669
|
-
log(`uninstalled service ${label}`);
|
|
670
|
-
} else if (cmd === "restart") {
|
|
671
|
-
const label = labelFor(env);
|
|
672
|
-
backend.restart(label);
|
|
673
|
-
log(`restarted service ${label}`);
|
|
674
|
-
} else if (cmd === "status") {
|
|
675
|
-
const label = labelFor(env);
|
|
676
|
-
const st = backend.status(label);
|
|
677
|
-
log(`${label}: ${st.loaded ? "loaded" : "not loaded"}`);
|
|
678
|
-
} else if (cmd === "logs") {
|
|
679
|
-
const label = labelFor(env);
|
|
680
|
-
log(`logs for ${label} are at <dataDir>/logs/muse-bridge.log (tail -f it)`);
|
|
681
|
-
}
|
|
682
|
-
} catch (e) {
|
|
683
|
-
log(e.message);
|
|
684
|
-
process.exitCode = 1;
|
|
685
|
-
}
|
|
686
|
-
return true;
|
|
687
|
-
}
|
|
688
|
-
var SERVICE_CMDS;
|
|
689
|
-
var init_subcommand = __esm({
|
|
690
|
-
"src/service/subcommand.ts"() {
|
|
691
|
-
"use strict";
|
|
692
|
-
init_config();
|
|
693
|
-
init_log();
|
|
694
|
-
init_spec();
|
|
695
|
-
init_backend();
|
|
696
|
-
SERVICE_CMDS = /* @__PURE__ */ new Set(["install", "uninstall", "restart", "status", "logs"]);
|
|
697
|
-
}
|
|
698
|
-
});
|
|
699
|
-
|
|
700
|
-
// ../../../../packages/plugin/dist/index.js
|
|
242
|
+
// ../plugin/dist/index.js
|
|
701
243
|
var dist_exports = {};
|
|
702
244
|
__export(dist_exports, {
|
|
703
245
|
AgentVaultMcpServer: () => AgentVaultMcpServer,
|
|
@@ -725,6 +267,8 @@ __export(dist_exports, {
|
|
|
725
267
|
mergeSkills: () => mergeSkills,
|
|
726
268
|
onAgentEvent: () => onAgentEvent,
|
|
727
269
|
onSessionTranscriptUpdate: () => onSessionTranscriptUpdate,
|
|
270
|
+
owesRoomReply: () => owesRoomReply,
|
|
271
|
+
parseMentions: () => parseMentions,
|
|
728
272
|
parseSkillMd: () => parseSkillMd,
|
|
729
273
|
parseTarget: () => parseTarget,
|
|
730
274
|
reportSkillInvocation: () => reportSkillInvocation,
|
|
@@ -735,12 +279,13 @@ __export(dist_exports, {
|
|
|
735
279
|
sendToRoom: () => sendToRoom,
|
|
736
280
|
sendToTarget: () => sendToTarget,
|
|
737
281
|
setOcRuntime: () => setOcRuntime,
|
|
282
|
+
stripMentions: () => stripMentions,
|
|
738
283
|
wrapSkillExecution: () => wrapSkillExecution
|
|
739
284
|
});
|
|
740
285
|
import * as nc from "node:crypto";
|
|
741
286
|
import { chmod, mkdir, writeFile } from "node:fs/promises";
|
|
742
287
|
import { readdir, readFile, rename, rm } from "node:fs/promises";
|
|
743
|
-
import { join as
|
|
288
|
+
import { join as join6 } from "node:path";
|
|
744
289
|
import { readFile as readFile2, rename as rename2, rm as rm2 } from "node:fs/promises";
|
|
745
290
|
import { join as join22 } from "node:path";
|
|
746
291
|
import { Readable } from "node:stream";
|
|
@@ -750,7 +295,7 @@ import { randomUUID as randomUUID3 } from "node:crypto";
|
|
|
750
295
|
import { EventEmitter } from "node:events";
|
|
751
296
|
import { createServer as createServer2 } from "node:http";
|
|
752
297
|
import { randomUUID as randomUUID22, createHash } from "node:crypto";
|
|
753
|
-
import { readFileSync as
|
|
298
|
+
import { readFileSync as readFileSync4 } from "node:fs";
|
|
754
299
|
import { homedir as osHomedir } from "node:os";
|
|
755
300
|
import { writeFile as writeFile3, mkdir as mkdir3 } from "node:fs/promises";
|
|
756
301
|
import { join as join42 } from "node:path";
|
|
@@ -762,8 +307,19 @@ import { Http2ServerRequest as Http2ServerRequest2 } from "http2";
|
|
|
762
307
|
import { Http2ServerRequest } from "http2";
|
|
763
308
|
import { Readable as Readable2 } from "stream";
|
|
764
309
|
import crypto3 from "crypto";
|
|
765
|
-
import { readFileSync as readFileSync22, existsSync as
|
|
310
|
+
import { readFileSync as readFileSync22, existsSync as existsSync4, readdirSync } from "node:fs";
|
|
766
311
|
import { resolve as resolve22, join as join52 } from "node:path";
|
|
312
|
+
function stripWrappers(s2) {
|
|
313
|
+
let start = 0;
|
|
314
|
+
let end = s2.length;
|
|
315
|
+
while (start < end && WRAPPERS.includes(s2[start])) start++;
|
|
316
|
+
while (end > start && WRAPPERS.includes(s2[end - 1])) end--;
|
|
317
|
+
return s2.slice(start, end);
|
|
318
|
+
}
|
|
319
|
+
function isAbstention(text) {
|
|
320
|
+
if (typeof text !== "string") return false;
|
|
321
|
+
return stripWrappers(text).toLowerCase().startsWith(SENTINEL);
|
|
322
|
+
}
|
|
767
323
|
function toEpoch(v2) {
|
|
768
324
|
if (typeof v2 === "bigint") return v2;
|
|
769
325
|
if (typeof v2 === "number") {
|
|
@@ -1340,7 +896,7 @@ function W(e) {
|
|
|
1340
896
|
var n2 = p(t2, e);
|
|
1341
897
|
return g(r2), n2;
|
|
1342
898
|
}
|
|
1343
|
-
function
|
|
899
|
+
function q(e, r2, t2) {
|
|
1344
900
|
var _2 = [];
|
|
1345
901
|
i(t2);
|
|
1346
902
|
var n2 = u(e = E(_2, e, "message")), s2 = e.length;
|
|
@@ -11760,7 +11316,7 @@ async function writeSecureFile(filePath, data, flag) {
|
|
|
11760
11316
|
}
|
|
11761
11317
|
function syncLockPath(dataDir, channelId) {
|
|
11762
11318
|
const safe = channelId.replace(/[^a-zA-Z0-9_-]/g, "_");
|
|
11763
|
-
return
|
|
11319
|
+
return join6(dataDir, `mls-a2a-sync-${safe}.lock`);
|
|
11764
11320
|
}
|
|
11765
11321
|
async function acquireA2ASyncLock(dataDir, channelId) {
|
|
11766
11322
|
await ensureSecureDir(dataDir);
|
|
@@ -11843,12 +11399,12 @@ async function clearPendingWelcome(dataDir, groupId) {
|
|
|
11843
11399
|
}
|
|
11844
11400
|
async function saveMlsState(dataDir, groupId, state) {
|
|
11845
11401
|
await ensureSecureDir(dataDir);
|
|
11846
|
-
const filePath =
|
|
11402
|
+
const filePath = join6(dataDir, mlsFileName(groupId));
|
|
11847
11403
|
await writeSecureFile(filePath, state);
|
|
11848
11404
|
}
|
|
11849
11405
|
async function loadMlsState(dataDir, groupId) {
|
|
11850
11406
|
try {
|
|
11851
|
-
const filePath =
|
|
11407
|
+
const filePath = join6(dataDir, mlsFileName(groupId));
|
|
11852
11408
|
return await readFile(filePath, "utf-8");
|
|
11853
11409
|
} catch {
|
|
11854
11410
|
return null;
|
|
@@ -11856,7 +11412,7 @@ async function loadMlsState(dataDir, groupId) {
|
|
|
11856
11412
|
}
|
|
11857
11413
|
async function deleteMlsState(dataDir, groupId) {
|
|
11858
11414
|
try {
|
|
11859
|
-
const filePath =
|
|
11415
|
+
const filePath = join6(dataDir, mlsFileName(groupId));
|
|
11860
11416
|
await rm(filePath);
|
|
11861
11417
|
} catch {
|
|
11862
11418
|
}
|
|
@@ -11883,7 +11439,7 @@ async function quarantineOrphanedMlsState(dataDir, isStillMember, opts = {}) {
|
|
|
11883
11439
|
}
|
|
11884
11440
|
if (member === null || member === true) continue;
|
|
11885
11441
|
try {
|
|
11886
|
-
await rename(
|
|
11442
|
+
await rename(join6(dataDir, name), join6(dataDir, `${name}.orphaned`));
|
|
11887
11443
|
quarantined.push(groupId);
|
|
11888
11444
|
} catch {
|
|
11889
11445
|
}
|
|
@@ -11909,17 +11465,28 @@ async function joinWithFirstMatchingKp(welcomeBytes, candidates) {
|
|
|
11909
11465
|
return null;
|
|
11910
11466
|
}
|
|
11911
11467
|
function ownIdentity() {
|
|
11912
|
-
const v2 = true ? "0.23.
|
|
11468
|
+
const v2 = true ? "0.23.30" : FALLBACK;
|
|
11913
11469
|
return `${PACKAGE}@${v2}`;
|
|
11914
11470
|
}
|
|
11915
|
-
function
|
|
11471
|
+
function buildSha() {
|
|
11472
|
+
const raw = true ? "1fff5d6" : "";
|
|
11473
|
+
const cleaned = (raw ?? "").trim();
|
|
11474
|
+
return !cleaned || cleaned === "unknown" ? null : cleaned;
|
|
11475
|
+
}
|
|
11476
|
+
function withBuildSha(identity) {
|
|
11477
|
+
const sha = buildSha();
|
|
11478
|
+
if (!sha || identity.includes("+")) return identity;
|
|
11479
|
+
const stamped = `${identity}+${sha}`;
|
|
11480
|
+
return stamped.length <= MAX_LEN ? stamped : identity;
|
|
11481
|
+
}
|
|
11482
|
+
function buildClientVersion(override) {
|
|
11916
11483
|
try {
|
|
11917
11484
|
const candidate = (override ?? "").trim();
|
|
11918
11485
|
if (candidate) {
|
|
11919
|
-
const cleaned = candidate.replace(DISALLOWED, "").slice(0, MAX_LEN);
|
|
11486
|
+
const cleaned = withBuildSha(candidate.replace(DISALLOWED, "").slice(0, MAX_LEN));
|
|
11920
11487
|
if (cleaned && !cleaned.includes("..")) return cleaned;
|
|
11921
11488
|
}
|
|
11922
|
-
return ownIdentity().replace(DISALLOWED, "").slice(0, MAX_LEN);
|
|
11489
|
+
return withBuildSha(ownIdentity().replace(DISALLOWED, "").slice(0, MAX_LEN));
|
|
11923
11490
|
} catch {
|
|
11924
11491
|
return FALLBACK;
|
|
11925
11492
|
}
|
|
@@ -12634,7 +12201,7 @@ function formatChannelError(err) {
|
|
|
12634
12201
|
}
|
|
12635
12202
|
return `[AgentVault] channel error (non-fatal to the connection): ${msg}`;
|
|
12636
12203
|
}
|
|
12637
|
-
function
|
|
12204
|
+
function attachLifecycle(channel, opts = {}) {
|
|
12638
12205
|
const log = opts.log ?? (() => {
|
|
12639
12206
|
});
|
|
12640
12207
|
const agentName = opts.agentName ?? "";
|
|
@@ -12907,6 +12474,58 @@ async function checkGateway(options) {
|
|
|
12907
12474
|
return { ok: false, error: friendlyError(err) };
|
|
12908
12475
|
}
|
|
12909
12476
|
}
|
|
12477
|
+
function parseMentions(text) {
|
|
12478
|
+
const mentions = [];
|
|
12479
|
+
const re2 = new RegExp(MENTION_RE.source, MENTION_RE.flags);
|
|
12480
|
+
let match;
|
|
12481
|
+
while ((match = re2.exec(text)) !== null) {
|
|
12482
|
+
mentions.push(match[1].toLowerCase());
|
|
12483
|
+
}
|
|
12484
|
+
return mentions;
|
|
12485
|
+
}
|
|
12486
|
+
function resolveOwn(mention, names) {
|
|
12487
|
+
if (names.has(mention)) return mention;
|
|
12488
|
+
const parts = mention.split("-");
|
|
12489
|
+
for (let i2 = parts.length - 1; i2 > 0; i2--) {
|
|
12490
|
+
const candidate = parts.slice(0, i2).join("-");
|
|
12491
|
+
if (names.has(candidate)) return candidate;
|
|
12492
|
+
}
|
|
12493
|
+
return null;
|
|
12494
|
+
}
|
|
12495
|
+
function owesRoomReply(plaintext, agentName, accountId, senderIsAgent, roomDisplayName, ownDisplayName, selfResolved = true) {
|
|
12496
|
+
const mentions = parseMentions(plaintext);
|
|
12497
|
+
if (mentions.length === 0) return false;
|
|
12498
|
+
const ownNames = ownRoomNames(agentName, accountId, roomDisplayName, ownDisplayName);
|
|
12499
|
+
if (mentions.some((m2) => resolveOwn(m2, ownNames) !== null)) return true;
|
|
12500
|
+
if (mentions.some((m2) => resolveOwn(m2, BROADCAST_NAMES) !== null)) {
|
|
12501
|
+
return senderIsAgent !== true;
|
|
12502
|
+
}
|
|
12503
|
+
if (!selfResolved) return true;
|
|
12504
|
+
return false;
|
|
12505
|
+
}
|
|
12506
|
+
function ownRoomNames(agentName, accountId, roomDisplayName, ownDisplayName) {
|
|
12507
|
+
const names = /* @__PURE__ */ new Set();
|
|
12508
|
+
const add4 = (n2) => {
|
|
12509
|
+
if (!n2) return;
|
|
12510
|
+
const lower = n2.toLowerCase();
|
|
12511
|
+
names.add(lower);
|
|
12512
|
+
names.add(lower.split(/[\s(]/)[0]);
|
|
12513
|
+
};
|
|
12514
|
+
add4(agentName);
|
|
12515
|
+
add4(accountId);
|
|
12516
|
+
add4(roomDisplayName);
|
|
12517
|
+
add4(ownDisplayName);
|
|
12518
|
+
return names;
|
|
12519
|
+
}
|
|
12520
|
+
function stripMentions(text, agentName, accountId, roomDisplayName, ownDisplayName) {
|
|
12521
|
+
const ownNames = ownRoomNames(agentName, accountId, roomDisplayName, ownDisplayName);
|
|
12522
|
+
return text.replace(new RegExp(MENTION_RE.source, MENTION_RE.flags), (full, name) => {
|
|
12523
|
+
const lower = name.toLowerCase();
|
|
12524
|
+
const matched = resolveOwn(lower, ownNames) ?? resolveOwn(lower, BROADCAST_NAMES);
|
|
12525
|
+
if (matched === null) return full;
|
|
12526
|
+
return name.slice(matched.length);
|
|
12527
|
+
}).replace(/^\s+/, "").trim();
|
|
12528
|
+
}
|
|
12910
12529
|
function getErrorMap() {
|
|
12911
12530
|
return overrideErrorMap;
|
|
12912
12531
|
}
|
|
@@ -13280,7 +12899,7 @@ function randomString(length = 10) {
|
|
|
13280
12899
|
}
|
|
13281
12900
|
return str;
|
|
13282
12901
|
}
|
|
13283
|
-
function
|
|
12902
|
+
function esc(str) {
|
|
13284
12903
|
return JSON.stringify(str);
|
|
13285
12904
|
}
|
|
13286
12905
|
function slugify2(input) {
|
|
@@ -17190,7 +16809,7 @@ function parseSimpleYaml(yaml) {
|
|
|
17190
16809
|
function loadSkillsFromDirectory(dir) {
|
|
17191
16810
|
const skills = [];
|
|
17192
16811
|
const absDir = resolve22(dir);
|
|
17193
|
-
if (!
|
|
16812
|
+
if (!existsSync4(absDir)) return skills;
|
|
17194
16813
|
const seen = /* @__PURE__ */ new Set();
|
|
17195
16814
|
function tryLoad(filePath) {
|
|
17196
16815
|
if (seen.has(filePath)) return;
|
|
@@ -17203,13 +16822,13 @@ function loadSkillsFromDirectory(dir) {
|
|
|
17203
16822
|
}
|
|
17204
16823
|
}
|
|
17205
16824
|
try {
|
|
17206
|
-
const entries =
|
|
16825
|
+
const entries = readdirSync(absDir, { withFileTypes: true });
|
|
17207
16826
|
for (const entry of entries) {
|
|
17208
16827
|
if (entry.isFile() && entry.name.endsWith("SKILL.md")) {
|
|
17209
16828
|
tryLoad(join52(absDir, entry.name));
|
|
17210
16829
|
} else if (entry.isDirectory()) {
|
|
17211
16830
|
const subSkill = join52(absDir, entry.name, "SKILL.md");
|
|
17212
|
-
if (
|
|
16831
|
+
if (existsSync4(subSkill)) {
|
|
17213
16832
|
tryLoad(subSkill);
|
|
17214
16833
|
}
|
|
17215
16834
|
}
|
|
@@ -17437,9 +17056,9 @@ function reportSkillInvocation(opts) {
|
|
|
17437
17056
|
spanBuffer.push(span);
|
|
17438
17057
|
return span;
|
|
17439
17058
|
}
|
|
17440
|
-
var __create, __defProp2, __getOwnPropDesc, __getOwnPropNames2, __getProtoOf, __hasOwnProp, __esm2, __commonJS, __export2, __copyProps, __toESM, init_mls_commit_classify, __filename, __dirname, url2, path, Module, Module, root, window_, crypto_, randomValuesStandard, crypto4, 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, 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, isLE, init_noble, init_hash2, _HMAC, hmac, init_hmac, init_md, U32_MASK64, _32n, init_u64, 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, isLE2, wrapCipher, init_utils, 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, crypto2, init_cryptoNode, isLE3, swap32IfBE2, hasHexBuiltin, hexes, asciis, Hash, init_utils2, HashMD2, SHA256_IV2, SHA384_IV2, SHA512_IV2, init_md2, U32_MASK642, _32n2, shrSH2, shrSL2, rotrSH2, rotrSL2, rotrBH2, rotrBL2, rotlSH2, rotlSL2, rotlBH2, rotlBL2, add3L2, add3H2, add4L2, add4H2, add5L2, add5H2, init_u642, 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_utils3, _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, oidNist2, init_utils4, HashMD3, SHA256_IV3, SHA384_IV3, SHA512_IV3, init_md3, U32_MASK643, _32n3, shrSH3, shrSL3, rotrSH3, rotrSL3, rotrBH3, rotrBL3, add3L3, add3H3, add4L3, add4H3, add5L3, add5H3, init_u643, 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_BYTES2, 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, init_transport2, A2ALogGate, init_a2a_log_gate, init_mls_membership_probe, 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, RECONNECT_MAX_MS, PENDING_POLL_INTERVAL_MS, OUTBOUND_DEDUPE_WINDOW_MS, OUTBOUND_DEDUPE_MAX_SUPPRESS_MS, OUTBOUND_DEDUPE_MAX, OUTBOUND_DEDUPE_TYPES, RETRY_CANDIDATE_TTL_MS, RETRY_CANDIDATE_MAX, 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, init_llm_cost, traceStore, init_fetch_interceptor, init_tool_audit, init_harness_compat, isUsingManagedRoutes, 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, NEVER, $ZodAsyncError, $ZodEncodeError, globalConfig, init_core, util_exports, EVALUATING, captureStackTrace, allowsEval, getParsedType2, propertyKeyTypes, primitiveTypes, NUMBER_FORMAT_RANGES, BIGINT_FORMAT_RANGES, Class, init_util2, initializer, $ZodError, $ZodRealError, init_errors3, _parse, parse, _parseAsync, parseAsync, _safeParse, safeParse, _safeParseAsync, safeParseAsync, _encode, _decode, _encodeAsync, _decodeAsync, _safeEncode, _safeDecode, _safeEncodeAsync, _safeDecodeAsync, init_parse, regexes_exports, cuid, cuid2, ulid, xid, ksuid, nanoid, duration, extendedDuration, guid, uuid, uuid4, uuid6, uuid7, email, html5Email, rfc5322Email, unicodeEmail, idnEmail, browserEmail, _emoji, ipv4, ipv6, mac, cidrv4, cidrv6, base64, base64url, hostname, domain, e164, dateSource, date, string, bigint, integer, number, boolean, _null, _undefined, lowercase, uppercase, hex, md5_hex, md5_base64, md5_base64url, sha1_hex, sha1_base64, sha1_base64url, sha256_hex, sha256_base64, sha256_base64url, sha384_hex, sha384_base64, sha384_base64url, sha512_hex, sha512_base64, sha512_base64url, init_regexes, $ZodCheck, numericOriginMap, $ZodCheckLessThan, $ZodCheckGreaterThan, $ZodCheckMultipleOf, $ZodCheckNumberFormat, $ZodCheckBigIntFormat, $ZodCheckMaxSize, $ZodCheckMinSize, $ZodCheckSizeEquals, $ZodCheckMaxLength, $ZodCheckMinLength, $ZodCheckLengthEquals, $ZodCheckStringFormat, $ZodCheckRegex, $ZodCheckLowerCase, $ZodCheckUpperCase, $ZodCheckIncludes, $ZodCheckStartsWith, $ZodCheckEndsWith, $ZodCheckProperty, $ZodCheckMimeType, $ZodCheckOverwrite, init_checks, Doc, init_doc, version, init_versions, $ZodType, $ZodString, $ZodStringFormat, $ZodGUID, $ZodUUID, $ZodEmail, $ZodURL, $ZodEmoji, $ZodNanoID, $ZodCUID, $ZodCUID2, $ZodULID, $ZodXID, $ZodKSUID, $ZodISODateTime, $ZodISODate, $ZodISOTime, $ZodISODuration, $ZodIPv4, $ZodIPv6, $ZodMAC, $ZodCIDRv4, $ZodCIDRv6, $ZodBase64, $ZodBase64URL, $ZodE164, $ZodJWT, $ZodCustomStringFormat, $ZodNumber, $ZodNumberFormat, $ZodBoolean, $ZodBigInt, $ZodBigIntFormat, $ZodSymbol, $ZodUndefined, $ZodNull, $ZodAny, $ZodUnknown, $ZodNever, $ZodVoid, $ZodDate, $ZodArray, $ZodObject, $ZodObjectJIT, $ZodUnion, $ZodXor, $ZodDiscriminatedUnion, $ZodIntersection, $ZodTuple, $ZodRecord, $ZodMap, $ZodSet, $ZodEnum, $ZodLiteral, $ZodFile, $ZodTransform, $ZodOptional, $ZodExactOptional, $ZodNullable, $ZodDefault, $ZodPrefault, $ZodNonOptional, $ZodSuccess, $ZodCatch, $ZodNaN, $ZodPipe, $ZodCodec, $ZodReadonly, $ZodTemplateLiteral, $ZodFunction, $ZodPromise, $ZodLazy, $ZodCustom, init_schemas, init_ar, init_az, init_be, init_bg, init_ca, init_cs, init_da, init_de, error, init_en2, init_eo, init_es, init_fa, init_fi, init_fr, init_fr_CA, init_he, init_hu, init_hy, init_id, init_is, init_it, init_ja, init_ka, init_km, init_kh, init_ko, init_lt, init_mk, init_ms, init_nl, init_no, init_ota, init_ps, init_pl, init_pt, init_ru, init_sl, init_sv, init_ta, init_th, init_tr, init_uk, init_ua, init_ur, init_uz, init_vi, init_zh_CN, init_zh_TW, init_yo, init_locales, _a2, $ZodRegistry, globalRegistry, init_registries, init_api, createToJSONSchemaMethod, createStandardJSONSchemaMethod, init_to_json_schema, formatMap, 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, recordProcessor, nullableProcessor, nonoptionalProcessor, defaultProcessor, prefaultProcessor, catchProcessor, pipeProcessor, readonlyProcessor, promiseProcessor, optionalProcessor, lazyProcessor, allProcessors, init_json_schema_processors, init_json_schema_generator, 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, checks_exports2, init_checks3, iso_exports2, ZodISODateTime, ZodISODate, ZodISOTime, ZodISODuration, init_iso2, initializer2, ZodError2, ZodRealError, init_errors4, parse2, parseAsync2, safeParse3, safeParseAsync3, encode3, decode2, encodeAsync2, decodeAsync2, safeEncode2, safeDecode2, safeEncodeAsync2, safeDecodeAsync2, init_parse3, schemas_exports3, ZodType2, _ZodString, ZodString2, ZodStringFormat, ZodEmail, ZodGUID, ZodUUID, ZodURL, ZodEmoji, ZodNanoID, ZodCUID, ZodCUID2, ZodULID, ZodXID, ZodKSUID, ZodIPv4, ZodMAC, ZodIPv6, ZodCIDRv4, ZodCIDRv6, ZodBase64, ZodBase64URL, ZodE164, ZodJWT, ZodCustomStringFormat, ZodNumber2, ZodNumberFormat, ZodBoolean2, ZodBigInt2, ZodBigIntFormat, ZodSymbol2, ZodUndefined2, ZodNull2, ZodAny2, ZodUnknown2, ZodNever2, ZodVoid2, ZodDate2, ZodArray2, ZodObject2, ZodUnion2, ZodXor, ZodDiscriminatedUnion2, ZodIntersection2, ZodTuple2, ZodRecord2, ZodMap2, ZodSet2, ZodEnum2, ZodLiteral2, ZodFile, ZodTransform, ZodOptional2, ZodExactOptional, ZodNullable2, ZodDefault2, ZodPrefault, ZodNonOptional, ZodSuccess, ZodCatch2, ZodNaN2, ZodPipe, ZodCodec, ZodReadonly2, ZodTemplateLiteral, ZodLazy2, ZodPromise2, ZodFunction2, ZodCustom, describe2, meta2, stringbool, init_schemas3, ZodFirstPartyTypeKind2, init_compat, z2, init_from_json_schema, 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, 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;
|
|
17059
|
+
var __create, __defProp2, __getOwnPropDesc, __getOwnPropNames2, __getProtoOf, __hasOwnProp, __esm2, __commonJS, __export2, __copyProps, __toESM, SENTINEL, WRAPPERS, INSTRUCTION, init_abstention, init_mls_commit_classify, __filename, __dirname, url2, path, Module, Module, root, window_, crypto_, randomValuesStandard, crypto4, 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, 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, isLE, init_noble, init_hash2, _HMAC, hmac, init_hmac, init_md, U32_MASK64, _32n, init_u64, 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, isLE2, wrapCipher, init_utils, 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, crypto2, init_cryptoNode, isLE3, swap32IfBE2, hasHexBuiltin, hexes, asciis, Hash, init_utils2, HashMD2, SHA256_IV2, SHA384_IV2, SHA512_IV2, init_md2, U32_MASK642, _32n2, shrSH2, shrSL2, rotrSH2, rotrSL2, rotrBH2, rotrBL2, rotlSH2, rotlSL2, rotlBH2, rotlBL2, add3L2, add3H2, add4L2, add4H2, add5L2, add5H2, init_u642, 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_utils3, _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, oidNist2, init_utils4, HashMD3, SHA256_IV3, SHA384_IV3, SHA512_IV3, init_md3, U32_MASK643, _32n3, shrSH3, shrSL3, rotrSH3, rotrSL3, rotrBH3, rotrBL3, add3L3, add3H3, add4L3, add4H3, add5L3, add5H3, init_u643, 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_BYTES2, 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, init_transport2, A2ALogGate, init_a2a_log_gate, init_mls_membership_probe, 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, RECONNECT_MAX_MS, PENDING_POLL_INTERVAL_MS, OUTBOUND_DEDUPE_WINDOW_MS, OUTBOUND_DEDUPE_MAX_SUPPRESS_MS, OUTBOUND_DEDUPE_MAX, OUTBOUND_DEDUPE_TYPES, RETRY_CANDIDATE_TTL_MS, RETRY_CANDIDATE_MAX, 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, MENTION_RE, BROADCAST_NAMES, init_room_protocol, init_llm_response_parser, init_llm_cost, traceStore, init_fetch_interceptor, init_tool_audit, init_harness_compat, isUsingManagedRoutes, 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, NEVER, $ZodAsyncError, $ZodEncodeError, globalConfig, init_core, util_exports, EVALUATING, captureStackTrace, allowsEval, getParsedType2, propertyKeyTypes, primitiveTypes, NUMBER_FORMAT_RANGES, BIGINT_FORMAT_RANGES, Class, init_util2, initializer, $ZodError, $ZodRealError, init_errors3, _parse, parse, _parseAsync, parseAsync, _safeParse, safeParse, _safeParseAsync, safeParseAsync, _encode, _decode, _encodeAsync, _decodeAsync, _safeEncode, _safeDecode, _safeEncodeAsync, _safeDecodeAsync, init_parse, regexes_exports, cuid, cuid2, ulid, xid, ksuid, nanoid, duration, extendedDuration, guid, uuid, uuid4, uuid6, uuid7, email, html5Email, rfc5322Email, unicodeEmail, idnEmail, browserEmail, _emoji, ipv4, ipv6, mac, cidrv4, cidrv6, base64, base64url, hostname, domain, e164, dateSource, date, string, bigint, integer, number, boolean, _null, _undefined, lowercase, uppercase, hex, md5_hex, md5_base64, md5_base64url, sha1_hex, sha1_base64, sha1_base64url, sha256_hex, sha256_base64, sha256_base64url, sha384_hex, sha384_base64, sha384_base64url, sha512_hex, sha512_base64, sha512_base64url, init_regexes, $ZodCheck, numericOriginMap, $ZodCheckLessThan, $ZodCheckGreaterThan, $ZodCheckMultipleOf, $ZodCheckNumberFormat, $ZodCheckBigIntFormat, $ZodCheckMaxSize, $ZodCheckMinSize, $ZodCheckSizeEquals, $ZodCheckMaxLength, $ZodCheckMinLength, $ZodCheckLengthEquals, $ZodCheckStringFormat, $ZodCheckRegex, $ZodCheckLowerCase, $ZodCheckUpperCase, $ZodCheckIncludes, $ZodCheckStartsWith, $ZodCheckEndsWith, $ZodCheckProperty, $ZodCheckMimeType, $ZodCheckOverwrite, init_checks, Doc, init_doc, version, init_versions, $ZodType, $ZodString, $ZodStringFormat, $ZodGUID, $ZodUUID, $ZodEmail, $ZodURL, $ZodEmoji, $ZodNanoID, $ZodCUID, $ZodCUID2, $ZodULID, $ZodXID, $ZodKSUID, $ZodISODateTime, $ZodISODate, $ZodISOTime, $ZodISODuration, $ZodIPv4, $ZodIPv6, $ZodMAC, $ZodCIDRv4, $ZodCIDRv6, $ZodBase64, $ZodBase64URL, $ZodE164, $ZodJWT, $ZodCustomStringFormat, $ZodNumber, $ZodNumberFormat, $ZodBoolean, $ZodBigInt, $ZodBigIntFormat, $ZodSymbol, $ZodUndefined, $ZodNull, $ZodAny, $ZodUnknown, $ZodNever, $ZodVoid, $ZodDate, $ZodArray, $ZodObject, $ZodObjectJIT, $ZodUnion, $ZodXor, $ZodDiscriminatedUnion, $ZodIntersection, $ZodTuple, $ZodRecord, $ZodMap, $ZodSet, $ZodEnum, $ZodLiteral, $ZodFile, $ZodTransform, $ZodOptional, $ZodExactOptional, $ZodNullable, $ZodDefault, $ZodPrefault, $ZodNonOptional, $ZodSuccess, $ZodCatch, $ZodNaN, $ZodPipe, $ZodCodec, $ZodReadonly, $ZodTemplateLiteral, $ZodFunction, $ZodPromise, $ZodLazy, $ZodCustom, init_schemas, init_ar, init_az, init_be, init_bg, init_ca, init_cs, init_da, init_de, error, init_en2, init_eo, init_es, init_fa, init_fi, init_fr, init_fr_CA, init_he, init_hu, init_hy, init_id, init_is, init_it, init_ja, init_ka, init_km, init_kh, init_ko, init_lt, init_mk, init_ms, init_nl, init_no, init_ota, init_ps, init_pl, init_pt, init_ru, init_sl, init_sv, init_ta, init_th, init_tr, init_uk, init_ua, init_ur, init_uz, init_vi, init_zh_CN, init_zh_TW, init_yo, init_locales, _a2, $ZodRegistry, globalRegistry, init_registries, init_api, createToJSONSchemaMethod, createStandardJSONSchemaMethod, init_to_json_schema, formatMap, 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, recordProcessor, nullableProcessor, nonoptionalProcessor, defaultProcessor, prefaultProcessor, catchProcessor, pipeProcessor, readonlyProcessor, promiseProcessor, optionalProcessor, lazyProcessor, allProcessors, init_json_schema_processors, init_json_schema_generator, 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, checks_exports2, init_checks3, iso_exports2, ZodISODateTime, ZodISODate, ZodISOTime, ZodISODuration, init_iso2, initializer2, ZodError2, ZodRealError, init_errors4, parse2, parseAsync2, safeParse3, safeParseAsync3, encode3, decode2, encodeAsync2, decodeAsync2, safeEncode2, safeDecode2, safeEncodeAsync2, safeDecodeAsync2, init_parse3, schemas_exports3, ZodType2, _ZodString, ZodString2, ZodStringFormat, ZodEmail, ZodGUID, ZodUUID, ZodURL, ZodEmoji, ZodNanoID, ZodCUID, ZodCUID2, ZodULID, ZodXID, ZodKSUID, ZodIPv4, ZodMAC, ZodIPv6, ZodCIDRv4, ZodCIDRv6, ZodBase64, ZodBase64URL, ZodE164, ZodJWT, ZodCustomStringFormat, ZodNumber2, ZodNumberFormat, ZodBoolean2, ZodBigInt2, ZodBigIntFormat, ZodSymbol2, ZodUndefined2, ZodNull2, ZodAny2, ZodUnknown2, ZodNever2, ZodVoid2, ZodDate2, ZodArray2, ZodObject2, ZodUnion2, ZodXor, ZodDiscriminatedUnion2, ZodIntersection2, ZodTuple2, ZodRecord2, ZodMap2, ZodSet2, ZodEnum2, ZodLiteral2, ZodFile, ZodTransform, ZodOptional2, ZodExactOptional, ZodNullable2, ZodDefault2, ZodPrefault, ZodNonOptional, ZodSuccess, ZodCatch2, ZodNaN2, ZodPipe, ZodCodec, ZodReadonly2, ZodTemplateLiteral, ZodLazy2, ZodPromise2, ZodFunction2, ZodCustom, describe2, meta2, stringbool, init_schemas3, ZodFirstPartyTypeKind2, init_compat, z2, init_from_json_schema, 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, 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;
|
|
17441
17060
|
var init_dist = __esm({
|
|
17442
|
-
async "
|
|
17061
|
+
async "../plugin/dist/index.js"() {
|
|
17443
17062
|
"use strict";
|
|
17444
17063
|
__create = Object.create;
|
|
17445
17064
|
__defProp2 = Object.defineProperty;
|
|
@@ -17473,6 +17092,14 @@ var init_dist = __esm({
|
|
|
17473
17092
|
isNodeMode || !mod4 || !mod4.__esModule ? __defProp2(target, "default", { value: mod4, enumerable: true }) : target,
|
|
17474
17093
|
mod4
|
|
17475
17094
|
));
|
|
17095
|
+
init_abstention = __esm2({
|
|
17096
|
+
"src/abstention.ts"() {
|
|
17097
|
+
"use strict";
|
|
17098
|
+
SENTINEL = "[[no-reply]]";
|
|
17099
|
+
WRAPPERS = " \r\n`\"'*_";
|
|
17100
|
+
INSTRUCTION = "not every message needs an answer from you: if this one is not addressed to you and asks nothing of you, reply with exactly " + SENTINEL + " and nothing else \u2014 that is discarded, not posted, and is how you stay quiet; never post a message SAYING that you are staying quiet";
|
|
17101
|
+
}
|
|
17102
|
+
});
|
|
17476
17103
|
init_mls_commit_classify = __esm2({
|
|
17477
17104
|
"src/mls-commit-classify.ts"() {
|
|
17478
17105
|
"use strict";
|
|
@@ -59482,7 +59109,7 @@ var init_dist = __esm({
|
|
|
59482
59109
|
t = libsodium_sumo_default.ready.then(function() {
|
|
59483
59110
|
function t2() {
|
|
59484
59111
|
if (a._sodium_init() < 0) throw new Error("libsodium was not correctly initialized.");
|
|
59485
|
-
for (var e = ["crypto_aead_aegis128l_decrypt", "crypto_aead_aegis128l_decrypt_detached", "crypto_aead_aegis128l_encrypt", "crypto_aead_aegis128l_encrypt_detached", "crypto_aead_aegis128l_keygen", "crypto_aead_aegis256_decrypt", "crypto_aead_aegis256_decrypt_detached", "crypto_aead_aegis256_encrypt", "crypto_aead_aegis256_encrypt_detached", "crypto_aead_aegis256_keygen", "crypto_aead_chacha20poly1305_decrypt", "crypto_aead_chacha20poly1305_decrypt_detached", "crypto_aead_chacha20poly1305_encrypt", "crypto_aead_chacha20poly1305_encrypt_detached", "crypto_aead_chacha20poly1305_ietf_decrypt", "crypto_aead_chacha20poly1305_ietf_decrypt_detached", "crypto_aead_chacha20poly1305_ietf_encrypt", "crypto_aead_chacha20poly1305_ietf_encrypt_detached", "crypto_aead_chacha20poly1305_ietf_keygen", "crypto_aead_chacha20poly1305_keygen", "crypto_aead_xchacha20poly1305_ietf_decrypt", "crypto_aead_xchacha20poly1305_ietf_decrypt_detached", "crypto_aead_xchacha20poly1305_ietf_encrypt", "crypto_aead_xchacha20poly1305_ietf_encrypt_detached", "crypto_aead_xchacha20poly1305_ietf_keygen", "crypto_auth", "crypto_auth_hmacsha256", "crypto_auth_hmacsha256_final", "crypto_auth_hmacsha256_init", "crypto_auth_hmacsha256_keygen", "crypto_auth_hmacsha256_update", "crypto_auth_hmacsha256_verify", "crypto_auth_hmacsha512", "crypto_auth_hmacsha512256", "crypto_auth_hmacsha512256_final", "crypto_auth_hmacsha512256_init", "crypto_auth_hmacsha512256_keygen", "crypto_auth_hmacsha512256_update", "crypto_auth_hmacsha512256_verify", "crypto_auth_hmacsha512_final", "crypto_auth_hmacsha512_init", "crypto_auth_hmacsha512_keygen", "crypto_auth_hmacsha512_update", "crypto_auth_hmacsha512_verify", "crypto_auth_keygen", "crypto_auth_verify", "crypto_box_beforenm", "crypto_box_curve25519xchacha20poly1305_beforenm", "crypto_box_curve25519xchacha20poly1305_detached", "crypto_box_curve25519xchacha20poly1305_detached_afternm", "crypto_box_curve25519xchacha20poly1305_easy", "crypto_box_curve25519xchacha20poly1305_easy_afternm", "crypto_box_curve25519xchacha20poly1305_keypair", "crypto_box_curve25519xchacha20poly1305_open_detached", "crypto_box_curve25519xchacha20poly1305_open_detached_afternm", "crypto_box_curve25519xchacha20poly1305_open_easy", "crypto_box_curve25519xchacha20poly1305_open_easy_afternm", "crypto_box_curve25519xchacha20poly1305_seal", "crypto_box_curve25519xchacha20poly1305_seal_open", "crypto_box_curve25519xchacha20poly1305_seed_keypair", "crypto_box_detached", "crypto_box_easy", "crypto_box_easy_afternm", "crypto_box_keypair", "crypto_box_open_detached", "crypto_box_open_easy", "crypto_box_open_easy_afternm", "crypto_box_seal", "crypto_box_seal_open", "crypto_box_seed_keypair", "crypto_core_ed25519_add", "crypto_core_ed25519_from_hash", "crypto_core_ed25519_from_uniform", "crypto_core_ed25519_is_valid_point", "crypto_core_ed25519_random", "crypto_core_ed25519_scalar_add", "crypto_core_ed25519_scalar_complement", "crypto_core_ed25519_scalar_invert", "crypto_core_ed25519_scalar_mul", "crypto_core_ed25519_scalar_negate", "crypto_core_ed25519_scalar_random", "crypto_core_ed25519_scalar_reduce", "crypto_core_ed25519_scalar_sub", "crypto_core_ed25519_sub", "crypto_core_hchacha20", "crypto_core_hsalsa20", "crypto_core_ristretto255_add", "crypto_core_ristretto255_from_hash", "crypto_core_ristretto255_is_valid_point", "crypto_core_ristretto255_random", "crypto_core_ristretto255_scalar_add", "crypto_core_ristretto255_scalar_complement", "crypto_core_ristretto255_scalar_invert", "crypto_core_ristretto255_scalar_mul", "crypto_core_ristretto255_scalar_negate", "crypto_core_ristretto255_scalar_random", "crypto_core_ristretto255_scalar_reduce", "crypto_core_ristretto255_scalar_sub", "crypto_core_ristretto255_sub", "crypto_generichash", "crypto_generichash_blake2b_salt_personal", "crypto_generichash_final", "crypto_generichash_init", "crypto_generichash_keygen", "crypto_generichash_update", "crypto_hash", "crypto_hash_sha256", "crypto_hash_sha256_final", "crypto_hash_sha256_init", "crypto_hash_sha256_update", "crypto_hash_sha512", "crypto_hash_sha512_final", "crypto_hash_sha512_init", "crypto_hash_sha512_update", "crypto_kdf_derive_from_key", "crypto_kdf_keygen", "crypto_kx_client_session_keys", "crypto_kx_keypair", "crypto_kx_seed_keypair", "crypto_kx_server_session_keys", "crypto_onetimeauth", "crypto_onetimeauth_final", "crypto_onetimeauth_init", "crypto_onetimeauth_keygen", "crypto_onetimeauth_update", "crypto_onetimeauth_verify", "crypto_pwhash", "crypto_pwhash_scryptsalsa208sha256", "crypto_pwhash_scryptsalsa208sha256_ll", "crypto_pwhash_scryptsalsa208sha256_str", "crypto_pwhash_scryptsalsa208sha256_str_verify", "crypto_pwhash_str", "crypto_pwhash_str_needs_rehash", "crypto_pwhash_str_verify", "crypto_scalarmult", "crypto_scalarmult_base", "crypto_scalarmult_ed25519", "crypto_scalarmult_ed25519_base", "crypto_scalarmult_ed25519_base_noclamp", "crypto_scalarmult_ed25519_noclamp", "crypto_scalarmult_ristretto255", "crypto_scalarmult_ristretto255_base", "crypto_secretbox_detached", "crypto_secretbox_easy", "crypto_secretbox_keygen", "crypto_secretbox_open_detached", "crypto_secretbox_open_easy", "crypto_secretstream_xchacha20poly1305_init_pull", "crypto_secretstream_xchacha20poly1305_init_push", "crypto_secretstream_xchacha20poly1305_keygen", "crypto_secretstream_xchacha20poly1305_pull", "crypto_secretstream_xchacha20poly1305_push", "crypto_secretstream_xchacha20poly1305_rekey", "crypto_shorthash", "crypto_shorthash_keygen", "crypto_shorthash_siphashx24", "crypto_sign", "crypto_sign_detached", "crypto_sign_ed25519_pk_to_curve25519", "crypto_sign_ed25519_sk_to_curve25519", "crypto_sign_ed25519_sk_to_pk", "crypto_sign_ed25519_sk_to_seed", "crypto_sign_final_create", "crypto_sign_final_verify", "crypto_sign_init", "crypto_sign_keypair", "crypto_sign_open", "crypto_sign_seed_keypair", "crypto_sign_update", "crypto_sign_verify_detached", "crypto_stream_chacha20", "crypto_stream_chacha20_ietf_xor", "crypto_stream_chacha20_ietf_xor_ic", "crypto_stream_chacha20_keygen", "crypto_stream_chacha20_xor", "crypto_stream_chacha20_xor_ic", "crypto_stream_keygen", "crypto_stream_xchacha20_keygen", "crypto_stream_xchacha20_xor", "crypto_stream_xchacha20_xor_ic", "randombytes_buf", "randombytes_buf_deterministic", "randombytes_close", "randombytes_random", "randombytes_set_implementation", "randombytes_stir", "randombytes_uniform", "sodium_version_string"], t3 = [x, k, S, T, w, Y, B, A, M, I, K, N, L, O, U, C, P, R, X, G, D, F, V, H, W,
|
|
59112
|
+
for (var e = ["crypto_aead_aegis128l_decrypt", "crypto_aead_aegis128l_decrypt_detached", "crypto_aead_aegis128l_encrypt", "crypto_aead_aegis128l_encrypt_detached", "crypto_aead_aegis128l_keygen", "crypto_aead_aegis256_decrypt", "crypto_aead_aegis256_decrypt_detached", "crypto_aead_aegis256_encrypt", "crypto_aead_aegis256_encrypt_detached", "crypto_aead_aegis256_keygen", "crypto_aead_chacha20poly1305_decrypt", "crypto_aead_chacha20poly1305_decrypt_detached", "crypto_aead_chacha20poly1305_encrypt", "crypto_aead_chacha20poly1305_encrypt_detached", "crypto_aead_chacha20poly1305_ietf_decrypt", "crypto_aead_chacha20poly1305_ietf_decrypt_detached", "crypto_aead_chacha20poly1305_ietf_encrypt", "crypto_aead_chacha20poly1305_ietf_encrypt_detached", "crypto_aead_chacha20poly1305_ietf_keygen", "crypto_aead_chacha20poly1305_keygen", "crypto_aead_xchacha20poly1305_ietf_decrypt", "crypto_aead_xchacha20poly1305_ietf_decrypt_detached", "crypto_aead_xchacha20poly1305_ietf_encrypt", "crypto_aead_xchacha20poly1305_ietf_encrypt_detached", "crypto_aead_xchacha20poly1305_ietf_keygen", "crypto_auth", "crypto_auth_hmacsha256", "crypto_auth_hmacsha256_final", "crypto_auth_hmacsha256_init", "crypto_auth_hmacsha256_keygen", "crypto_auth_hmacsha256_update", "crypto_auth_hmacsha256_verify", "crypto_auth_hmacsha512", "crypto_auth_hmacsha512256", "crypto_auth_hmacsha512256_final", "crypto_auth_hmacsha512256_init", "crypto_auth_hmacsha512256_keygen", "crypto_auth_hmacsha512256_update", "crypto_auth_hmacsha512256_verify", "crypto_auth_hmacsha512_final", "crypto_auth_hmacsha512_init", "crypto_auth_hmacsha512_keygen", "crypto_auth_hmacsha512_update", "crypto_auth_hmacsha512_verify", "crypto_auth_keygen", "crypto_auth_verify", "crypto_box_beforenm", "crypto_box_curve25519xchacha20poly1305_beforenm", "crypto_box_curve25519xchacha20poly1305_detached", "crypto_box_curve25519xchacha20poly1305_detached_afternm", "crypto_box_curve25519xchacha20poly1305_easy", "crypto_box_curve25519xchacha20poly1305_easy_afternm", "crypto_box_curve25519xchacha20poly1305_keypair", "crypto_box_curve25519xchacha20poly1305_open_detached", "crypto_box_curve25519xchacha20poly1305_open_detached_afternm", "crypto_box_curve25519xchacha20poly1305_open_easy", "crypto_box_curve25519xchacha20poly1305_open_easy_afternm", "crypto_box_curve25519xchacha20poly1305_seal", "crypto_box_curve25519xchacha20poly1305_seal_open", "crypto_box_curve25519xchacha20poly1305_seed_keypair", "crypto_box_detached", "crypto_box_easy", "crypto_box_easy_afternm", "crypto_box_keypair", "crypto_box_open_detached", "crypto_box_open_easy", "crypto_box_open_easy_afternm", "crypto_box_seal", "crypto_box_seal_open", "crypto_box_seed_keypair", "crypto_core_ed25519_add", "crypto_core_ed25519_from_hash", "crypto_core_ed25519_from_uniform", "crypto_core_ed25519_is_valid_point", "crypto_core_ed25519_random", "crypto_core_ed25519_scalar_add", "crypto_core_ed25519_scalar_complement", "crypto_core_ed25519_scalar_invert", "crypto_core_ed25519_scalar_mul", "crypto_core_ed25519_scalar_negate", "crypto_core_ed25519_scalar_random", "crypto_core_ed25519_scalar_reduce", "crypto_core_ed25519_scalar_sub", "crypto_core_ed25519_sub", "crypto_core_hchacha20", "crypto_core_hsalsa20", "crypto_core_ristretto255_add", "crypto_core_ristretto255_from_hash", "crypto_core_ristretto255_is_valid_point", "crypto_core_ristretto255_random", "crypto_core_ristretto255_scalar_add", "crypto_core_ristretto255_scalar_complement", "crypto_core_ristretto255_scalar_invert", "crypto_core_ristretto255_scalar_mul", "crypto_core_ristretto255_scalar_negate", "crypto_core_ristretto255_scalar_random", "crypto_core_ristretto255_scalar_reduce", "crypto_core_ristretto255_scalar_sub", "crypto_core_ristretto255_sub", "crypto_generichash", "crypto_generichash_blake2b_salt_personal", "crypto_generichash_final", "crypto_generichash_init", "crypto_generichash_keygen", "crypto_generichash_update", "crypto_hash", "crypto_hash_sha256", "crypto_hash_sha256_final", "crypto_hash_sha256_init", "crypto_hash_sha256_update", "crypto_hash_sha512", "crypto_hash_sha512_final", "crypto_hash_sha512_init", "crypto_hash_sha512_update", "crypto_kdf_derive_from_key", "crypto_kdf_keygen", "crypto_kx_client_session_keys", "crypto_kx_keypair", "crypto_kx_seed_keypair", "crypto_kx_server_session_keys", "crypto_onetimeauth", "crypto_onetimeauth_final", "crypto_onetimeauth_init", "crypto_onetimeauth_keygen", "crypto_onetimeauth_update", "crypto_onetimeauth_verify", "crypto_pwhash", "crypto_pwhash_scryptsalsa208sha256", "crypto_pwhash_scryptsalsa208sha256_ll", "crypto_pwhash_scryptsalsa208sha256_str", "crypto_pwhash_scryptsalsa208sha256_str_verify", "crypto_pwhash_str", "crypto_pwhash_str_needs_rehash", "crypto_pwhash_str_verify", "crypto_scalarmult", "crypto_scalarmult_base", "crypto_scalarmult_ed25519", "crypto_scalarmult_ed25519_base", "crypto_scalarmult_ed25519_base_noclamp", "crypto_scalarmult_ed25519_noclamp", "crypto_scalarmult_ristretto255", "crypto_scalarmult_ristretto255_base", "crypto_secretbox_detached", "crypto_secretbox_easy", "crypto_secretbox_keygen", "crypto_secretbox_open_detached", "crypto_secretbox_open_easy", "crypto_secretstream_xchacha20poly1305_init_pull", "crypto_secretstream_xchacha20poly1305_init_push", "crypto_secretstream_xchacha20poly1305_keygen", "crypto_secretstream_xchacha20poly1305_pull", "crypto_secretstream_xchacha20poly1305_push", "crypto_secretstream_xchacha20poly1305_rekey", "crypto_shorthash", "crypto_shorthash_keygen", "crypto_shorthash_siphashx24", "crypto_sign", "crypto_sign_detached", "crypto_sign_ed25519_pk_to_curve25519", "crypto_sign_ed25519_sk_to_curve25519", "crypto_sign_ed25519_sk_to_pk", "crypto_sign_ed25519_sk_to_seed", "crypto_sign_final_create", "crypto_sign_final_verify", "crypto_sign_init", "crypto_sign_keypair", "crypto_sign_open", "crypto_sign_seed_keypair", "crypto_sign_update", "crypto_sign_verify_detached", "crypto_stream_chacha20", "crypto_stream_chacha20_ietf_xor", "crypto_stream_chacha20_ietf_xor_ic", "crypto_stream_chacha20_keygen", "crypto_stream_chacha20_xor", "crypto_stream_chacha20_xor_ic", "crypto_stream_keygen", "crypto_stream_xchacha20_keygen", "crypto_stream_xchacha20_xor", "crypto_stream_xchacha20_xor_ic", "randombytes_buf", "randombytes_buf_deterministic", "randombytes_close", "randombytes_random", "randombytes_set_implementation", "randombytes_stir", "randombytes_uniform", "sodium_version_string"], t3 = [x, k, S, T, w, Y, B, A, M, I, K, N, L, O, U, C, P, R, X, G, D, F, V, H, W, q, z, j, J, Q, Z, $, ee, ae, re, te, _e, ne, se, ce, he, oe, pe, ye, ie, le, ue, de, ve, ge, be, fe, me, Ee, xe, ke, Se, Te, we, Ye, Be, Ae, Me, Ie, Ke, Ne, Le, Oe, Ue, Ce, Pe, Re, Xe, Ge, De, Fe, Ve, He, We, qe, ze, je, Je, Qe, Ze, $e, ea, aa, ra, ta, _a, na, sa, ca, ha, oa, pa, ya, ia, la, ua, da, va, ga, ba, fa, ma, Ea, xa, ka, Sa, Ta, wa, Ya, Ba, Aa, Ma, Ia, Ka, Na, La, Oa, Ua, Ca, Pa, Ra, Xa, Ga, Da, Fa, Va, Ha, Wa, qa, za, ja, Ja, Qa, Za, $a, er, ar, rr, tr, _r, nr, sr, cr, hr, or, pr, yr, ir, lr, ur, dr, vr, gr, br, fr, mr, Er, xr, kr, Sr, Tr, wr, Yr, Br, Ar, Mr, Ir, Kr, Nr, Lr, Or, Ur, Cr, Pr, Rr, Xr, Gr, Dr, Fr, Vr, Hr, Wr, qr], _3 = 0; _3 < t3.length; _3++) "function" == typeof a["_" + e[_3]] && (r[e[_3]] = t3[_3]);
|
|
59486
59113
|
var n3 = ["SODIUM_LIBRARY_VERSION_MAJOR", "SODIUM_LIBRARY_VERSION_MINOR", "crypto_aead_aegis128l_ABYTES", "crypto_aead_aegis128l_KEYBYTES", "crypto_aead_aegis128l_MESSAGEBYTES_MAX", "crypto_aead_aegis128l_NPUBBYTES", "crypto_aead_aegis128l_NSECBYTES", "crypto_aead_aegis256_ABYTES", "crypto_aead_aegis256_KEYBYTES", "crypto_aead_aegis256_MESSAGEBYTES_MAX", "crypto_aead_aegis256_NPUBBYTES", "crypto_aead_aegis256_NSECBYTES", "crypto_aead_aes256gcm_ABYTES", "crypto_aead_aes256gcm_KEYBYTES", "crypto_aead_aes256gcm_MESSAGEBYTES_MAX", "crypto_aead_aes256gcm_NPUBBYTES", "crypto_aead_aes256gcm_NSECBYTES", "crypto_aead_chacha20poly1305_ABYTES", "crypto_aead_chacha20poly1305_IETF_ABYTES", "crypto_aead_chacha20poly1305_IETF_KEYBYTES", "crypto_aead_chacha20poly1305_IETF_MESSAGEBYTES_MAX", "crypto_aead_chacha20poly1305_IETF_NPUBBYTES", "crypto_aead_chacha20poly1305_IETF_NSECBYTES", "crypto_aead_chacha20poly1305_KEYBYTES", "crypto_aead_chacha20poly1305_MESSAGEBYTES_MAX", "crypto_aead_chacha20poly1305_NPUBBYTES", "crypto_aead_chacha20poly1305_NSECBYTES", "crypto_aead_chacha20poly1305_ietf_ABYTES", "crypto_aead_chacha20poly1305_ietf_KEYBYTES", "crypto_aead_chacha20poly1305_ietf_MESSAGEBYTES_MAX", "crypto_aead_chacha20poly1305_ietf_NPUBBYTES", "crypto_aead_chacha20poly1305_ietf_NSECBYTES", "crypto_aead_xchacha20poly1305_IETF_ABYTES", "crypto_aead_xchacha20poly1305_IETF_KEYBYTES", "crypto_aead_xchacha20poly1305_IETF_MESSAGEBYTES_MAX", "crypto_aead_xchacha20poly1305_IETF_NPUBBYTES", "crypto_aead_xchacha20poly1305_IETF_NSECBYTES", "crypto_aead_xchacha20poly1305_ietf_ABYTES", "crypto_aead_xchacha20poly1305_ietf_KEYBYTES", "crypto_aead_xchacha20poly1305_ietf_MESSAGEBYTES_MAX", "crypto_aead_xchacha20poly1305_ietf_NPUBBYTES", "crypto_aead_xchacha20poly1305_ietf_NSECBYTES", "crypto_auth_BYTES", "crypto_auth_KEYBYTES", "crypto_auth_hmacsha256_BYTES", "crypto_auth_hmacsha256_KEYBYTES", "crypto_auth_hmacsha512256_BYTES", "crypto_auth_hmacsha512256_KEYBYTES", "crypto_auth_hmacsha512_BYTES", "crypto_auth_hmacsha512_KEYBYTES", "crypto_box_BEFORENMBYTES", "crypto_box_MACBYTES", "crypto_box_MESSAGEBYTES_MAX", "crypto_box_NONCEBYTES", "crypto_box_PUBLICKEYBYTES", "crypto_box_SEALBYTES", "crypto_box_SECRETKEYBYTES", "crypto_box_SEEDBYTES", "crypto_box_curve25519xchacha20poly1305_BEFORENMBYTES", "crypto_box_curve25519xchacha20poly1305_MACBYTES", "crypto_box_curve25519xchacha20poly1305_MESSAGEBYTES_MAX", "crypto_box_curve25519xchacha20poly1305_NONCEBYTES", "crypto_box_curve25519xchacha20poly1305_PUBLICKEYBYTES", "crypto_box_curve25519xchacha20poly1305_SEALBYTES", "crypto_box_curve25519xchacha20poly1305_SECRETKEYBYTES", "crypto_box_curve25519xchacha20poly1305_SEEDBYTES", "crypto_box_curve25519xsalsa20poly1305_BEFORENMBYTES", "crypto_box_curve25519xsalsa20poly1305_MACBYTES", "crypto_box_curve25519xsalsa20poly1305_MESSAGEBYTES_MAX", "crypto_box_curve25519xsalsa20poly1305_NONCEBYTES", "crypto_box_curve25519xsalsa20poly1305_PUBLICKEYBYTES", "crypto_box_curve25519xsalsa20poly1305_SECRETKEYBYTES", "crypto_box_curve25519xsalsa20poly1305_SEEDBYTES", "crypto_core_ed25519_BYTES", "crypto_core_ed25519_HASHBYTES", "crypto_core_ed25519_NONREDUCEDSCALARBYTES", "crypto_core_ed25519_SCALARBYTES", "crypto_core_ed25519_UNIFORMBYTES", "crypto_core_hchacha20_CONSTBYTES", "crypto_core_hchacha20_INPUTBYTES", "crypto_core_hchacha20_KEYBYTES", "crypto_core_hchacha20_OUTPUTBYTES", "crypto_core_hsalsa20_CONSTBYTES", "crypto_core_hsalsa20_INPUTBYTES", "crypto_core_hsalsa20_KEYBYTES", "crypto_core_hsalsa20_OUTPUTBYTES", "crypto_core_ristretto255_BYTES", "crypto_core_ristretto255_HASHBYTES", "crypto_core_ristretto255_NONREDUCEDSCALARBYTES", "crypto_core_ristretto255_SCALARBYTES", "crypto_core_salsa2012_CONSTBYTES", "crypto_core_salsa2012_INPUTBYTES", "crypto_core_salsa2012_KEYBYTES", "crypto_core_salsa2012_OUTPUTBYTES", "crypto_core_salsa208_CONSTBYTES", "crypto_core_salsa208_INPUTBYTES", "crypto_core_salsa208_KEYBYTES", "crypto_core_salsa208_OUTPUTBYTES", "crypto_core_salsa20_CONSTBYTES", "crypto_core_salsa20_INPUTBYTES", "crypto_core_salsa20_KEYBYTES", "crypto_core_salsa20_OUTPUTBYTES", "crypto_generichash_BYTES", "crypto_generichash_BYTES_MAX", "crypto_generichash_BYTES_MIN", "crypto_generichash_KEYBYTES", "crypto_generichash_KEYBYTES_MAX", "crypto_generichash_KEYBYTES_MIN", "crypto_generichash_blake2b_BYTES", "crypto_generichash_blake2b_BYTES_MAX", "crypto_generichash_blake2b_BYTES_MIN", "crypto_generichash_blake2b_KEYBYTES", "crypto_generichash_blake2b_KEYBYTES_MAX", "crypto_generichash_blake2b_KEYBYTES_MIN", "crypto_generichash_blake2b_PERSONALBYTES", "crypto_generichash_blake2b_SALTBYTES", "crypto_hash_BYTES", "crypto_hash_sha256_BYTES", "crypto_hash_sha512_BYTES", "crypto_kdf_BYTES_MAX", "crypto_kdf_BYTES_MIN", "crypto_kdf_CONTEXTBYTES", "crypto_kdf_KEYBYTES", "crypto_kdf_blake2b_BYTES_MAX", "crypto_kdf_blake2b_BYTES_MIN", "crypto_kdf_blake2b_CONTEXTBYTES", "crypto_kdf_blake2b_KEYBYTES", "crypto_kdf_hkdf_sha256_BYTES_MAX", "crypto_kdf_hkdf_sha256_BYTES_MIN", "crypto_kdf_hkdf_sha256_KEYBYTES", "crypto_kdf_hkdf_sha512_BYTES_MAX", "crypto_kdf_hkdf_sha512_BYTES_MIN", "crypto_kdf_hkdf_sha512_KEYBYTES", "crypto_kx_PUBLICKEYBYTES", "crypto_kx_SECRETKEYBYTES", "crypto_kx_SEEDBYTES", "crypto_kx_SESSIONKEYBYTES", "crypto_onetimeauth_BYTES", "crypto_onetimeauth_KEYBYTES", "crypto_onetimeauth_poly1305_BYTES", "crypto_onetimeauth_poly1305_KEYBYTES", "crypto_pwhash_ALG_ARGON2I13", "crypto_pwhash_ALG_ARGON2ID13", "crypto_pwhash_ALG_DEFAULT", "crypto_pwhash_BYTES_MAX", "crypto_pwhash_BYTES_MIN", "crypto_pwhash_MEMLIMIT_INTERACTIVE", "crypto_pwhash_MEMLIMIT_MAX", "crypto_pwhash_MEMLIMIT_MIN", "crypto_pwhash_MEMLIMIT_MODERATE", "crypto_pwhash_MEMLIMIT_SENSITIVE", "crypto_pwhash_OPSLIMIT_INTERACTIVE", "crypto_pwhash_OPSLIMIT_MAX", "crypto_pwhash_OPSLIMIT_MIN", "crypto_pwhash_OPSLIMIT_MODERATE", "crypto_pwhash_OPSLIMIT_SENSITIVE", "crypto_pwhash_PASSWD_MAX", "crypto_pwhash_PASSWD_MIN", "crypto_pwhash_SALTBYTES", "crypto_pwhash_STRBYTES", "crypto_pwhash_argon2i_BYTES_MAX", "crypto_pwhash_argon2i_BYTES_MIN", "crypto_pwhash_argon2i_MEMLIMIT_INTERACTIVE", "crypto_pwhash_argon2i_MEMLIMIT_MAX", "crypto_pwhash_argon2i_MEMLIMIT_MIN", "crypto_pwhash_argon2i_MEMLIMIT_MODERATE", "crypto_pwhash_argon2i_MEMLIMIT_SENSITIVE", "crypto_pwhash_argon2i_OPSLIMIT_INTERACTIVE", "crypto_pwhash_argon2i_OPSLIMIT_MAX", "crypto_pwhash_argon2i_OPSLIMIT_MIN", "crypto_pwhash_argon2i_OPSLIMIT_MODERATE", "crypto_pwhash_argon2i_OPSLIMIT_SENSITIVE", "crypto_pwhash_argon2i_PASSWD_MAX", "crypto_pwhash_argon2i_PASSWD_MIN", "crypto_pwhash_argon2i_SALTBYTES", "crypto_pwhash_argon2i_STRBYTES", "crypto_pwhash_argon2id_BYTES_MAX", "crypto_pwhash_argon2id_BYTES_MIN", "crypto_pwhash_argon2id_MEMLIMIT_INTERACTIVE", "crypto_pwhash_argon2id_MEMLIMIT_MAX", "crypto_pwhash_argon2id_MEMLIMIT_MIN", "crypto_pwhash_argon2id_MEMLIMIT_MODERATE", "crypto_pwhash_argon2id_MEMLIMIT_SENSITIVE", "crypto_pwhash_argon2id_OPSLIMIT_INTERACTIVE", "crypto_pwhash_argon2id_OPSLIMIT_MAX", "crypto_pwhash_argon2id_OPSLIMIT_MIN", "crypto_pwhash_argon2id_OPSLIMIT_MODERATE", "crypto_pwhash_argon2id_OPSLIMIT_SENSITIVE", "crypto_pwhash_argon2id_PASSWD_MAX", "crypto_pwhash_argon2id_PASSWD_MIN", "crypto_pwhash_argon2id_SALTBYTES", "crypto_pwhash_argon2id_STRBYTES", "crypto_pwhash_scryptsalsa208sha256_BYTES_MAX", "crypto_pwhash_scryptsalsa208sha256_BYTES_MIN", "crypto_pwhash_scryptsalsa208sha256_MEMLIMIT_INTERACTIVE", "crypto_pwhash_scryptsalsa208sha256_MEMLIMIT_MAX", "crypto_pwhash_scryptsalsa208sha256_MEMLIMIT_MIN", "crypto_pwhash_scryptsalsa208sha256_MEMLIMIT_SENSITIVE", "crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_INTERACTIVE", "crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_MAX", "crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_MIN", "crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_SENSITIVE", "crypto_pwhash_scryptsalsa208sha256_PASSWD_MAX", "crypto_pwhash_scryptsalsa208sha256_PASSWD_MIN", "crypto_pwhash_scryptsalsa208sha256_SALTBYTES", "crypto_pwhash_scryptsalsa208sha256_STRBYTES", "crypto_scalarmult_BYTES", "crypto_scalarmult_SCALARBYTES", "crypto_scalarmult_curve25519_BYTES", "crypto_scalarmult_curve25519_SCALARBYTES", "crypto_scalarmult_ed25519_BYTES", "crypto_scalarmult_ed25519_SCALARBYTES", "crypto_scalarmult_ristretto255_BYTES", "crypto_scalarmult_ristretto255_SCALARBYTES", "crypto_secretbox_KEYBYTES", "crypto_secretbox_MACBYTES", "crypto_secretbox_MESSAGEBYTES_MAX", "crypto_secretbox_NONCEBYTES", "crypto_secretbox_xchacha20poly1305_KEYBYTES", "crypto_secretbox_xchacha20poly1305_MACBYTES", "crypto_secretbox_xchacha20poly1305_MESSAGEBYTES_MAX", "crypto_secretbox_xchacha20poly1305_NONCEBYTES", "crypto_secretbox_xsalsa20poly1305_KEYBYTES", "crypto_secretbox_xsalsa20poly1305_MACBYTES", "crypto_secretbox_xsalsa20poly1305_MESSAGEBYTES_MAX", "crypto_secretbox_xsalsa20poly1305_NONCEBYTES", "crypto_secretstream_xchacha20poly1305_ABYTES", "crypto_secretstream_xchacha20poly1305_HEADERBYTES", "crypto_secretstream_xchacha20poly1305_KEYBYTES", "crypto_secretstream_xchacha20poly1305_MESSAGEBYTES_MAX", "crypto_secretstream_xchacha20poly1305_TAG_FINAL", "crypto_secretstream_xchacha20poly1305_TAG_MESSAGE", "crypto_secretstream_xchacha20poly1305_TAG_PUSH", "crypto_secretstream_xchacha20poly1305_TAG_REKEY", "crypto_shorthash_BYTES", "crypto_shorthash_KEYBYTES", "crypto_shorthash_siphash24_BYTES", "crypto_shorthash_siphash24_KEYBYTES", "crypto_shorthash_siphashx24_BYTES", "crypto_shorthash_siphashx24_KEYBYTES", "crypto_sign_BYTES", "crypto_sign_MESSAGEBYTES_MAX", "crypto_sign_PUBLICKEYBYTES", "crypto_sign_SECRETKEYBYTES", "crypto_sign_SEEDBYTES", "crypto_sign_ed25519_BYTES", "crypto_sign_ed25519_MESSAGEBYTES_MAX", "crypto_sign_ed25519_PUBLICKEYBYTES", "crypto_sign_ed25519_SECRETKEYBYTES", "crypto_sign_ed25519_SEEDBYTES", "crypto_stream_KEYBYTES", "crypto_stream_MESSAGEBYTES_MAX", "crypto_stream_NONCEBYTES", "crypto_stream_chacha20_IETF_KEYBYTES", "crypto_stream_chacha20_IETF_MESSAGEBYTES_MAX", "crypto_stream_chacha20_IETF_NONCEBYTES", "crypto_stream_chacha20_KEYBYTES", "crypto_stream_chacha20_MESSAGEBYTES_MAX", "crypto_stream_chacha20_NONCEBYTES", "crypto_stream_chacha20_ietf_KEYBYTES", "crypto_stream_chacha20_ietf_MESSAGEBYTES_MAX", "crypto_stream_chacha20_ietf_NONCEBYTES", "crypto_stream_salsa2012_KEYBYTES", "crypto_stream_salsa2012_MESSAGEBYTES_MAX", "crypto_stream_salsa2012_NONCEBYTES", "crypto_stream_salsa208_KEYBYTES", "crypto_stream_salsa208_MESSAGEBYTES_MAX", "crypto_stream_salsa208_NONCEBYTES", "crypto_stream_salsa20_KEYBYTES", "crypto_stream_salsa20_MESSAGEBYTES_MAX", "crypto_stream_salsa20_NONCEBYTES", "crypto_stream_xchacha20_KEYBYTES", "crypto_stream_xchacha20_MESSAGEBYTES_MAX", "crypto_stream_xchacha20_NONCEBYTES", "crypto_stream_xsalsa20_KEYBYTES", "crypto_stream_xsalsa20_MESSAGEBYTES_MAX", "crypto_stream_xsalsa20_NONCEBYTES", "crypto_verify_16_BYTES", "crypto_verify_32_BYTES", "crypto_verify_64_BYTES"];
|
|
59487
59114
|
for (_3 = 0; _3 < n3.length; _3++) "function" == typeof (c3 = a["_" + n3[_3].toLowerCase()]) && (r[n3[_3]] = c3());
|
|
59488
59115
|
var s3 = ["SODIUM_VERSION_STRING", "crypto_pwhash_STRPREFIX", "crypto_pwhash_argon2i_STRPREFIX", "crypto_pwhash_argon2id_STRPREFIX", "crypto_pwhash_scryptsalsa208sha256_STRPREFIX"];
|
|
@@ -68426,6 +68053,39 @@ var init_dist = __esm({
|
|
|
68426
68053
|
const s2 = this._requireState();
|
|
68427
68054
|
return s2.groupContext.groupId;
|
|
68428
68055
|
}
|
|
68056
|
+
/**
|
|
68057
|
+
* Proof that this client actually holds the group's keys at its current
|
|
68058
|
+
* epoch. Throws if not initialized.
|
|
68059
|
+
*
|
|
68060
|
+
* RFC 9420 §8.2's `epoch_authenticator`, derived from the epoch secret. Two
|
|
68061
|
+
* properties make it the thing this codebase has been missing:
|
|
68062
|
+
*
|
|
68063
|
+
* * every member at the same epoch computes the SAME value, so it is
|
|
68064
|
+
* comparable across clients and can be checked by a server;
|
|
68065
|
+
* * it cannot be computed without the key schedule, so possessing it is
|
|
68066
|
+
* evidence of membership rather than a claim about it. RFC 9420 names
|
|
68067
|
+
* this as its purpose: "to authenticate the shared group state".
|
|
68068
|
+
*
|
|
68069
|
+
* It is safe to publish. It is a KDF output over the epoch secret, not the
|
|
68070
|
+
* secret, and the RFC intends it to be shown to out-of-band verifiers.
|
|
68071
|
+
*
|
|
68072
|
+
* WHY THIS EXISTS. `mls_groups.member_device_ids` records membership; the
|
|
68073
|
+
* ability to decrypt lives only in one browser's localStorage. Nothing
|
|
68074
|
+
* compared the two, and nothing could — so a device in the roster holding no
|
|
68075
|
+
* keys was indistinguishable from a healthy one, on every signal the server
|
|
68076
|
+
* has. Measured on production 2026-08-26: one owner device carried the keys
|
|
68077
|
+
* for 19 of the 21 owner leaves on the platform, and one 1:1 group had been
|
|
68078
|
+
* unreadable by its owner's browser for two months while every status column
|
|
68079
|
+
* read healthy.
|
|
68080
|
+
*
|
|
68081
|
+
* `epoch` alone cannot do this job: it is a number the client reports about
|
|
68082
|
+
* itself, it collides across groups, and a client that has lost its state
|
|
68083
|
+
* still remembers one.
|
|
68084
|
+
*/
|
|
68085
|
+
get epochAuthenticator() {
|
|
68086
|
+
const s2 = this._requireState();
|
|
68087
|
+
return s2.keySchedule.epochAuthenticator;
|
|
68088
|
+
}
|
|
68429
68089
|
/** The cipher suite name in use. */
|
|
68430
68090
|
get ciphersuiteName() {
|
|
68431
68091
|
return this._ciphersuiteName;
|
|
@@ -68576,11 +68236,84 @@ var init_dist = __esm({
|
|
|
68576
68236
|
return { commit: commitBytes, welcome: welcomeBytes };
|
|
68577
68237
|
}
|
|
68578
68238
|
/**
|
|
68579
|
-
*
|
|
68239
|
+
* Admit N members with TWO commits total, replacing any stale leaf they hold.
|
|
68240
|
+
*
|
|
68241
|
+
* `addMembers` cannot do this alone: MLS rejects an Add for an identity
|
|
68242
|
+
* already in the tree, so a member that lost its local state must be removed
|
|
68243
|
+
* first. Doing that pair PER MEMBER is what the fulfiller did, and it is not
|
|
68244
|
+
* merely slow — it is self-defeating.
|
|
68245
|
+
*
|
|
68246
|
+
* Live 2026-08-28 14:02:21-28Z: the owner sweep re-admitted 7 room members
|
|
68247
|
+
* sequentially, each as its own removeMember + addMembers. Room 007 ran
|
|
68248
|
+
* **epoch 71 -> 85 in seven seconds**, and the Welcome minted for member n
|
|
68249
|
+
* named an epoch that member n+1's commit had already replaced — so six of
|
|
68250
|
+
* seven were stale before they finished joining, and one (`smartcode`) could
|
|
68251
|
+
* not replay forward afterwards at all.
|
|
68252
|
+
*
|
|
68253
|
+
* 🎯 A REPAIR THAT MOVES THE EPOCH ONCE PER MEMBER IS RACING ITSELF.
|
|
68254
|
+
*
|
|
68255
|
+
* ⚠️ **Why two commits and not one.** RFC 9420 §12.3 allows Remove and Add in
|
|
68256
|
+
* a single commit, and ts-mls builds it happily — but with MORE THAN ONE of
|
|
68257
|
+
* each, a REMAINING member fails to process it:
|
|
68258
|
+
*
|
|
68259
|
+
* OpenError at applyUpdatePathSecret (ts-mls/src/createCommit.ts:471)
|
|
68260
|
+
* at updatePrivateKeyPath (processMessages.ts:397)
|
|
68261
|
+
*
|
|
68262
|
+
* One remove + one add in a single commit is fine; 2+2 is not. That is
|
|
68263
|
+
* pinned by a test in `mls-group.test.ts` so this cannot be "optimised" back
|
|
68264
|
+
* into one commit without the failure showing up first. Two commits still
|
|
68265
|
+
* turns 7 members from 14 epochs into 2, and every joiner lands current.
|
|
68580
68266
|
*
|
|
68581
|
-
* @param
|
|
68582
|
-
*
|
|
68267
|
+
* @param keyPackages - Fresh KeyPackages, one per member to admit. Members
|
|
68268
|
+
* already holding a leaf are removed by the first commit; members with no
|
|
68269
|
+
* leaf are plain adds. Duplicate identities keep the first KeyPackage.
|
|
68270
|
+
* @returns Every commit to broadcast IN ORDER, and the Welcome to deliver to
|
|
68271
|
+
* EVERY member in the batch (each finds its own secrets inside it).
|
|
68583
68272
|
*/
|
|
68273
|
+
async reAdmitMembers(keyPackages) {
|
|
68274
|
+
this._requireState();
|
|
68275
|
+
await this._ensureCiphersuite();
|
|
68276
|
+
const seenIdentities = [];
|
|
68277
|
+
const toAdd = [];
|
|
68278
|
+
const leavesToRemove = [];
|
|
68279
|
+
for (const kp of keyPackages) {
|
|
68280
|
+
const identity = keyPackageIdentity(kp);
|
|
68281
|
+
if (identity !== null) {
|
|
68282
|
+
if (seenIdentities.some((id) => bytesEqual(id, identity)))
|
|
68283
|
+
continue;
|
|
68284
|
+
seenIdentities.push(identity);
|
|
68285
|
+
const leaf = this.memberLeafIndex(identity);
|
|
68286
|
+
if (leaf !== null)
|
|
68287
|
+
leavesToRemove.push(leaf);
|
|
68288
|
+
}
|
|
68289
|
+
toAdd.push(kp);
|
|
68290
|
+
}
|
|
68291
|
+
if (toAdd.length === 0) {
|
|
68292
|
+
throw new Error("reAdmitMembers: no members to admit");
|
|
68293
|
+
}
|
|
68294
|
+
const commits = [];
|
|
68295
|
+
if (leavesToRemove.length > 0) {
|
|
68296
|
+
const { commit } = await this.removeMembers(leavesToRemove);
|
|
68297
|
+
commits.push({ commit, epoch: this.epoch });
|
|
68298
|
+
}
|
|
68299
|
+
const added = await this.addMembers(toAdd);
|
|
68300
|
+
commits.push({ commit: added.commit, epoch: this.epoch });
|
|
68301
|
+
return { commits, welcome: added.welcome };
|
|
68302
|
+
}
|
|
68303
|
+
async removeMembers(memberIndices) {
|
|
68304
|
+
const s2 = this._requireState();
|
|
68305
|
+
const cs = await this._ensureCiphersuite();
|
|
68306
|
+
if (memberIndices.length === 0) {
|
|
68307
|
+
throw new Error("removeMembers: no members to remove");
|
|
68308
|
+
}
|
|
68309
|
+
const extraProposals = memberIndices.map((removed) => ({
|
|
68310
|
+
proposalType: "remove",
|
|
68311
|
+
remove: { removed }
|
|
68312
|
+
}));
|
|
68313
|
+
const result = await createCommit({ state: s2, cipherSuite: cs, pskIndex: this._pskIndex }, { extraProposals });
|
|
68314
|
+
this.state = result.newState;
|
|
68315
|
+
return { commit: encodeMlsMessage(result.commit) };
|
|
68316
|
+
}
|
|
68584
68317
|
async removeMember(memberIndex) {
|
|
68585
68318
|
const s2 = this._requireState();
|
|
68586
68319
|
const cs = await this._ensureCiphersuite();
|
|
@@ -68884,7 +68617,7 @@ var init_dist = __esm({
|
|
|
68884
68617
|
"use strict";
|
|
68885
68618
|
init_secure_file();
|
|
68886
68619
|
SYNC_LOCK_STALE_MS = 5 * 60 * 1e3;
|
|
68887
|
-
pendingKpPath = (dataDir, groupId) =>
|
|
68620
|
+
pendingKpPath = (dataDir, groupId) => join6(dataDir, `mls-kp-pending-${groupId.replace(/[^a-zA-Z0-9_-]/g, "_")}.json`);
|
|
68888
68621
|
}
|
|
68889
68622
|
});
|
|
68890
68623
|
init_mls_kp_pool = __esm2({
|
|
@@ -69140,6 +68873,7 @@ var init_dist = __esm({
|
|
|
69140
68873
|
init_channel = __esm2({
|
|
69141
68874
|
async "src/channel.ts"() {
|
|
69142
68875
|
"use strict";
|
|
68876
|
+
init_abstention();
|
|
69143
68877
|
init_mls_commit_classify();
|
|
69144
68878
|
await init_libsodium_wrappers();
|
|
69145
68879
|
await init_dist2();
|
|
@@ -69569,6 +69303,18 @@ var init_dist = __esm({
|
|
|
69569
69303
|
get ownHubAddress() {
|
|
69570
69304
|
return this._persisted?.hubAddress ?? "";
|
|
69571
69305
|
}
|
|
69306
|
+
/** This agent's AgentVault hub_id. "" until enrolment persists it.
|
|
69307
|
+
*
|
|
69308
|
+
* Lives in the credential store, NOT in the channel config — which is where
|
|
69309
|
+
* the memory-recall helper was reading it from. `channel.config.hubId` is
|
|
69310
|
+
* unset for every agent enrolled through the normal flow, so
|
|
69311
|
+
* `channel.config.hubId || ""` produced `/api/v1/agents//memory/search`, a
|
|
69312
|
+
* 404 on every inbound message, swallowed by `if (!res.ok) return ""`.
|
|
69313
|
+
* Memory recall was silently dead while the hub_id sat right here.
|
|
69314
|
+
*/
|
|
69315
|
+
get ownHubId() {
|
|
69316
|
+
return this._persisted?.hubId ?? "";
|
|
69317
|
+
}
|
|
69572
69318
|
/** Public best-effort trigger to (re)resolve this agent's display_name.
|
|
69573
69319
|
* Called lazily from the 1:1 DM path when the name is still unknown, so a
|
|
69574
69320
|
* resolve that failed at connect (or a fresh agent that hadn't registered
|
|
@@ -69957,6 +69703,7 @@ var init_dist = __esm({
|
|
|
69957
69703
|
* Each session gets the same plaintext encrypted independently.
|
|
69958
69704
|
*/
|
|
69959
69705
|
async send(plaintext, options) {
|
|
69706
|
+
if (isAbstention(plaintext)) return;
|
|
69960
69707
|
if (this._state === "error" || this._state === "idle") {
|
|
69961
69708
|
throw new Error("Channel is not ready");
|
|
69962
69709
|
}
|
|
@@ -70285,7 +70032,7 @@ var init_dist = __esm({
|
|
|
70285
70032
|
*/
|
|
70286
70033
|
sendActivitySpan(spanData) {
|
|
70287
70034
|
if (!this._ws || this._ws.readyState !== WebSocket.OPEN) return;
|
|
70288
|
-
const pluginVersion = true ? "0.23.
|
|
70035
|
+
const pluginVersion = true ? "0.23.30" : "0.0.0-dev";
|
|
70289
70036
|
const agentName = this.config.agentName ?? "Agent";
|
|
70290
70037
|
const resource = {
|
|
70291
70038
|
"service.name": "agentvault-agent",
|
|
@@ -70479,6 +70226,7 @@ var init_dist = __esm({
|
|
|
70479
70226
|
* Uses MLS (preferred) or pairwise fan-out as fallback.
|
|
70480
70227
|
*/
|
|
70481
70228
|
async sendToRoom(roomId, plaintext, opts) {
|
|
70229
|
+
if (isAbstention(plaintext)) return;
|
|
70482
70230
|
if (!this._persisted?.rooms?.[roomId]) {
|
|
70483
70231
|
throw new Error(`Room ${roomId} not found`);
|
|
70484
70232
|
}
|
|
@@ -72178,7 +71926,7 @@ var init_dist = __esm({
|
|
|
72178
71926
|
return;
|
|
72179
71927
|
}
|
|
72180
71928
|
const wsUrl = this.config.apiUrl.replace(/^http/, "ws");
|
|
72181
|
-
const url22 = `${wsUrl}/api/v1/ws?token=${encodeURIComponent(this._deviceJwt)}&device_id=${this._deviceId}&client_version=${encodeURIComponent(
|
|
71929
|
+
const url22 = `${wsUrl}/api/v1/ws?token=${encodeURIComponent(this._deviceJwt)}&device_id=${this._deviceId}&client_version=${encodeURIComponent(buildClientVersion(this.config.clientVersion))}`;
|
|
72182
71930
|
const ws = new WebSocket(url22);
|
|
72183
71931
|
this._ws = ws;
|
|
72184
71932
|
ws.on("open", async () => {
|
|
@@ -72222,7 +71970,7 @@ var init_dist = __esm({
|
|
|
72222
71970
|
agentVersion: this.config.agentVersion ?? "0.0.0",
|
|
72223
71971
|
// __AV_VERSION__ is injected by esbuild from package.json at build time.
|
|
72224
71972
|
// Falls back to "0.0.0-dev" in non-bundled contexts (tests).
|
|
72225
|
-
pluginVersion: true ? "0.23.
|
|
71973
|
+
pluginVersion: true ? "0.23.30" : "0.0.0-dev"
|
|
72226
71974
|
});
|
|
72227
71975
|
this._telemetryReporter.startAutoFlush(3e4);
|
|
72228
71976
|
}
|
|
@@ -72546,7 +72294,7 @@ var init_dist = __esm({
|
|
|
72546
72294
|
agentVersion: this.config.agentVersion ?? "0.0.0",
|
|
72547
72295
|
// __AV_VERSION__ is injected by esbuild from package.json at build time.
|
|
72548
72296
|
// Falls back to "0.0.0-dev" in non-bundled contexts (tests).
|
|
72549
|
-
pluginVersion: true ? "0.23.
|
|
72297
|
+
pluginVersion: true ? "0.23.30" : "0.0.0-dev"
|
|
72550
72298
|
});
|
|
72551
72299
|
this._telemetryReporter.startAutoFlush(3e4);
|
|
72552
72300
|
}
|
|
@@ -73443,7 +73191,7 @@ ${messageText}`;
|
|
|
73443
73191
|
}
|
|
73444
73192
|
try {
|
|
73445
73193
|
const configPath = join42(homedir, ".openclaw", "openclaw.json");
|
|
73446
|
-
const raw =
|
|
73194
|
+
const raw = readFileSync4(configPath, "utf-8");
|
|
73447
73195
|
const config2 = JSON.parse(raw);
|
|
73448
73196
|
const agents = config2?.agents?.list;
|
|
73449
73197
|
if (Array.isArray(agents) && agentName) {
|
|
@@ -76410,7 +76158,7 @@ ${messageText}`;
|
|
|
76410
76158
|
channel.on("error", (err) => {
|
|
76411
76159
|
_log?.(formatChannelError(err));
|
|
76412
76160
|
});
|
|
76413
|
-
|
|
76161
|
+
attachLifecycle(channel, {
|
|
76414
76162
|
agentName: account.agentName,
|
|
76415
76163
|
log: (m2) => _log?.(`[AgentVault] ${m2}`),
|
|
76416
76164
|
onTerminal: async () => {
|
|
@@ -76526,6 +76274,13 @@ ${actionsText}`);
|
|
|
76526
76274
|
init_openclaw_compat();
|
|
76527
76275
|
}
|
|
76528
76276
|
});
|
|
76277
|
+
init_room_protocol = __esm2({
|
|
76278
|
+
"src/room-protocol.ts"() {
|
|
76279
|
+
"use strict";
|
|
76280
|
+
MENTION_RE = /@([\w-]+)/gi;
|
|
76281
|
+
BROADCAST_NAMES = /* @__PURE__ */ new Set(["all", "everyone"]);
|
|
76282
|
+
}
|
|
76283
|
+
});
|
|
76529
76284
|
init_llm_response_parser = __esm2({
|
|
76530
76285
|
"src/llm-response-parser.ts"() {
|
|
76531
76286
|
"use strict";
|
|
@@ -76557,6 +76312,7 @@ ${actionsText}`);
|
|
|
76557
76312
|
init_openclaw_entry = __esm2({
|
|
76558
76313
|
"src/openclaw-entry.ts"() {
|
|
76559
76314
|
"use strict";
|
|
76315
|
+
init_room_protocol();
|
|
76560
76316
|
init_account_config();
|
|
76561
76317
|
init_fetch_interceptor();
|
|
76562
76318
|
init_http_handlers();
|
|
@@ -80340,7 +80096,7 @@ ${actionsText}`);
|
|
|
80340
80096
|
cloneDef: () => cloneDef,
|
|
80341
80097
|
createTransparentProxy: () => createTransparentProxy,
|
|
80342
80098
|
defineLazy: () => defineLazy,
|
|
80343
|
-
esc: () =>
|
|
80099
|
+
esc: () => esc,
|
|
80344
80100
|
escapeRegex: () => escapeRegex,
|
|
80345
80101
|
extend: () => extend,
|
|
80346
80102
|
finalizeIssue: () => finalizeIssue,
|
|
@@ -81976,7 +81732,7 @@ ${actionsText}`);
|
|
|
81976
81732
|
const doc = new Doc(["shape", "payload", "ctx"]);
|
|
81977
81733
|
const normalized = _normalized.value;
|
|
81978
81734
|
const parseStr = (key) => {
|
|
81979
|
-
const k2 =
|
|
81735
|
+
const k2 = esc(key);
|
|
81980
81736
|
return `shape[${k2}]._zod.run({ value: input[${k2}], issues: [] }, ctx)`;
|
|
81981
81737
|
};
|
|
81982
81738
|
doc.write(`const input = payload.value;`);
|
|
@@ -81988,7 +81744,7 @@ ${actionsText}`);
|
|
|
81988
81744
|
doc.write(`const newResult = {};`);
|
|
81989
81745
|
for (const key of normalized.keys) {
|
|
81990
81746
|
const id = ids[key];
|
|
81991
|
-
const k2 =
|
|
81747
|
+
const k2 = esc(key);
|
|
81992
81748
|
const schema = shape[key];
|
|
81993
81749
|
const isOptionalOut = schema?._zod?.optout === "optional";
|
|
81994
81750
|
doc.write(`const ${id} = ${parseStr(key)};`);
|
|
@@ -97779,13 +97535,472 @@ data:
|
|
|
97779
97535
|
init_skill_invoker();
|
|
97780
97536
|
await init_skill_telemetry();
|
|
97781
97537
|
await init_policy_enforcer();
|
|
97782
|
-
|
|
97538
|
+
init_room_protocol();
|
|
97539
|
+
VERSION = true ? "0.23.30" : "0.0.0-dev";
|
|
97783
97540
|
}
|
|
97784
97541
|
});
|
|
97785
97542
|
await init_index();
|
|
97786
97543
|
}
|
|
97787
97544
|
});
|
|
97788
97545
|
|
|
97546
|
+
// src/service/launcher.ts
|
|
97547
|
+
import { dirname as dirname2 } from "node:path";
|
|
97548
|
+
function sq(s2) {
|
|
97549
|
+
return `'${s2.replace(/'/g, `'\\''`)}'`;
|
|
97550
|
+
}
|
|
97551
|
+
function candidateExpr(c2) {
|
|
97552
|
+
return c2.includes("$") ? `"${c2}"` : sq(c2);
|
|
97553
|
+
}
|
|
97554
|
+
function renderLauncher(opts) {
|
|
97555
|
+
const candidates = ["node", ...opts.fallbacks ?? FALLBACK_NODES];
|
|
97556
|
+
const lines = [
|
|
97557
|
+
"#!/usr/bin/env bash",
|
|
97558
|
+
"# AgentVault muse-bridge launcher \u2014 regenerated on every `install`. Resolves node at",
|
|
97559
|
+
"# boot so a node upgrade / version-manager switch can't strand the daemon."
|
|
97560
|
+
];
|
|
97561
|
+
if (opts.installPath) lines.push(`export PATH=${sq(opts.installPath)}:"$PATH"`);
|
|
97562
|
+
for (const c2 of candidates) {
|
|
97563
|
+
lines.push(`if n=$(command -v ${candidateExpr(c2)} 2>/dev/null); then exec "$n" ${sq(opts.entrypoint)} "$@"; fi`);
|
|
97564
|
+
}
|
|
97565
|
+
lines.push(
|
|
97566
|
+
`echo "[muse-bridge] node not found on PATH or known locations \u2014 re-run: agentvault-muse-bridge install" >&2`,
|
|
97567
|
+
"exit 0"
|
|
97568
|
+
);
|
|
97569
|
+
return lines.join("\n") + "\n";
|
|
97570
|
+
}
|
|
97571
|
+
function writeLauncher(deps, spec) {
|
|
97572
|
+
deps.mkdir(dirname2(spec.launcherPath));
|
|
97573
|
+
deps.writeFile(spec.launcherPath, spec.launcherScript);
|
|
97574
|
+
deps.chmod(spec.launcherPath, 493);
|
|
97575
|
+
}
|
|
97576
|
+
var FALLBACK_NODES;
|
|
97577
|
+
var init_launcher = __esm({
|
|
97578
|
+
"src/service/launcher.ts"() {
|
|
97579
|
+
"use strict";
|
|
97580
|
+
FALLBACK_NODES = [
|
|
97581
|
+
"/opt/homebrew/bin/node",
|
|
97582
|
+
"/usr/local/bin/node",
|
|
97583
|
+
"/usr/bin/node",
|
|
97584
|
+
"$HOME/.volta/bin/node",
|
|
97585
|
+
"$HOME/.asdf/shims/node",
|
|
97586
|
+
"$HOME/.local/bin/node"
|
|
97587
|
+
];
|
|
97588
|
+
}
|
|
97589
|
+
});
|
|
97590
|
+
|
|
97591
|
+
// src/service/spec.ts
|
|
97592
|
+
import { join as join7 } from "node:path";
|
|
97593
|
+
function buildServiceSpec(cfg, opts) {
|
|
97594
|
+
const env = {
|
|
97595
|
+
AV_AGENT_NAME: cfg.agentName,
|
|
97596
|
+
AV_DATA_DIR: cfg.dataDir,
|
|
97597
|
+
AV_API_URL: cfg.apiUrl,
|
|
97598
|
+
AV_FENCE_HOME: cfg.fenceHome,
|
|
97599
|
+
AV_MUSE_PATH: cfg.musePath
|
|
97600
|
+
};
|
|
97601
|
+
if (cfg.workspaceDir) env.AV_WORKSPACE_DIR = cfg.workspaceDir;
|
|
97602
|
+
const launcherPath = join7(cfg.dataDir, "launch-muse-bridge.sh");
|
|
97603
|
+
return {
|
|
97604
|
+
label: `dev.agentvault.muse-${slugify(cfg.agentName)}`,
|
|
97605
|
+
programArgs: [launcherPath],
|
|
97606
|
+
launcherPath,
|
|
97607
|
+
launcherScript: renderLauncher({ installPath: opts.path, entrypoint: opts.entrypoint }),
|
|
97608
|
+
env,
|
|
97609
|
+
workingDir: cfg.workspaceDir ? cfg.workspaceDir : opts.home,
|
|
97610
|
+
logOut: join7(cfg.dataDir, "logs", "muse-bridge.log"),
|
|
97611
|
+
logErr: join7(cfg.dataDir, "logs", "muse-bridge.error.log"),
|
|
97612
|
+
keepAliveUnlessCleanExit: true,
|
|
97613
|
+
runAtLoad: true
|
|
97614
|
+
};
|
|
97615
|
+
}
|
|
97616
|
+
var init_spec = __esm({
|
|
97617
|
+
"src/service/spec.ts"() {
|
|
97618
|
+
"use strict";
|
|
97619
|
+
init_config();
|
|
97620
|
+
init_launcher();
|
|
97621
|
+
}
|
|
97622
|
+
});
|
|
97623
|
+
|
|
97624
|
+
// src/service/launchd.ts
|
|
97625
|
+
import { dirname as dirname3, join as join8 } from "node:path";
|
|
97626
|
+
function esc2(s2) {
|
|
97627
|
+
return s2.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
97628
|
+
}
|
|
97629
|
+
function renderLaunchdPlist(spec) {
|
|
97630
|
+
const args = spec.programArgs.map((a2) => ` <string>${esc2(a2)}</string>`).join("\n");
|
|
97631
|
+
const envEntries = Object.entries(spec.env).map(([k2, v2]) => ` <key>${esc2(k2)}</key>
|
|
97632
|
+
<string>${esc2(v2)}</string>`).join("\n");
|
|
97633
|
+
const keepAlive = spec.keepAliveUnlessCleanExit ? "<key>KeepAlive</key>\n <dict>\n <key>SuccessfulExit</key>\n <false/>\n </dict>" : "<key>KeepAlive</key>\n <false/>";
|
|
97634
|
+
return `<?xml version="1.0" encoding="UTF-8"?>
|
|
97635
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
97636
|
+
<plist version="1.0">
|
|
97637
|
+
<dict>
|
|
97638
|
+
<key>Label</key>
|
|
97639
|
+
<string>${esc2(spec.label)}</string>
|
|
97640
|
+
<key>ProgramArguments</key>
|
|
97641
|
+
<array>
|
|
97642
|
+
${args}
|
|
97643
|
+
</array>
|
|
97644
|
+
<key>EnvironmentVariables</key>
|
|
97645
|
+
<dict>
|
|
97646
|
+
${envEntries}
|
|
97647
|
+
</dict>
|
|
97648
|
+
<key>WorkingDirectory</key>
|
|
97649
|
+
<string>${esc2(spec.workingDir)}</string>
|
|
97650
|
+
<key>StandardOutPath</key>
|
|
97651
|
+
<string>${esc2(spec.logOut)}</string>
|
|
97652
|
+
<key>StandardErrorPath</key>
|
|
97653
|
+
<string>${esc2(spec.logErr)}</string>
|
|
97654
|
+
${keepAlive}
|
|
97655
|
+
<key>RunAtLoad</key>
|
|
97656
|
+
${spec.runAtLoad ? "<true/>" : "<false/>"}
|
|
97657
|
+
</dict>
|
|
97658
|
+
</plist>
|
|
97659
|
+
`;
|
|
97660
|
+
}
|
|
97661
|
+
function parsePlistEnv(xml) {
|
|
97662
|
+
const out = {};
|
|
97663
|
+
const keyIdx = xml.indexOf("<key>EnvironmentVariables</key>");
|
|
97664
|
+
if (keyIdx < 0) return out;
|
|
97665
|
+
const open = xml.indexOf("<dict>", keyIdx);
|
|
97666
|
+
if (open < 0) return out;
|
|
97667
|
+
let depth = 0;
|
|
97668
|
+
let i2 = open;
|
|
97669
|
+
let close = -1;
|
|
97670
|
+
const tag = /<(\/?)dict>/g;
|
|
97671
|
+
tag.lastIndex = open;
|
|
97672
|
+
let m2;
|
|
97673
|
+
while (m2 = tag.exec(xml)) {
|
|
97674
|
+
depth += m2[1] ? -1 : 1;
|
|
97675
|
+
if (depth === 0) {
|
|
97676
|
+
close = m2.index;
|
|
97677
|
+
break;
|
|
97678
|
+
}
|
|
97679
|
+
i2 = m2.index;
|
|
97680
|
+
}
|
|
97681
|
+
void i2;
|
|
97682
|
+
if (close < 0) return out;
|
|
97683
|
+
const body = xml.slice(open, close);
|
|
97684
|
+
const pair = /<key>([\s\S]*?)<\/key>\s*<string>([\s\S]*?)<\/string>/g;
|
|
97685
|
+
let p2;
|
|
97686
|
+
while (p2 = pair.exec(body)) out[unesc(p2[1])] = unesc(p2[2]);
|
|
97687
|
+
return out;
|
|
97688
|
+
}
|
|
97689
|
+
function unesc(s2) {
|
|
97690
|
+
return s2.replace(/</g, "<").replace(/>/g, ">").replace(/&/g, "&");
|
|
97691
|
+
}
|
|
97692
|
+
var LaunchdBackend;
|
|
97693
|
+
var init_launchd = __esm({
|
|
97694
|
+
"src/service/launchd.ts"() {
|
|
97695
|
+
"use strict";
|
|
97696
|
+
init_launcher();
|
|
97697
|
+
LaunchdBackend = class {
|
|
97698
|
+
constructor(deps) {
|
|
97699
|
+
this.deps = deps;
|
|
97700
|
+
}
|
|
97701
|
+
deps;
|
|
97702
|
+
plistPath(label) {
|
|
97703
|
+
return join8(this.deps.home, "Library", "LaunchAgents", `${label}.plist`);
|
|
97704
|
+
}
|
|
97705
|
+
domain() {
|
|
97706
|
+
return `gui/${this.deps.uid}`;
|
|
97707
|
+
}
|
|
97708
|
+
install(spec) {
|
|
97709
|
+
const path2 = this.plistPath(spec.label);
|
|
97710
|
+
this.deps.mkdir(dirname3(spec.logOut));
|
|
97711
|
+
writeLauncher(this.deps, spec);
|
|
97712
|
+
this.deps.mkdir(dirname3(path2));
|
|
97713
|
+
this.deps.writeFile(path2, renderLaunchdPlist(spec));
|
|
97714
|
+
const svc = `${this.domain()}/${spec.label}`;
|
|
97715
|
+
this.deps.exec("launchctl", ["bootout", svc]);
|
|
97716
|
+
this.waitUntilGone(svc);
|
|
97717
|
+
let r2 = this.deps.exec("launchctl", ["bootstrap", this.domain(), path2]);
|
|
97718
|
+
for (let i2 = 0; i2 < 5 && r2.code !== 0; i2++) {
|
|
97719
|
+
this.deps.exec("sleep", ["0.3"]);
|
|
97720
|
+
r2 = this.deps.exec("launchctl", ["bootstrap", this.domain(), path2]);
|
|
97721
|
+
}
|
|
97722
|
+
this.deps.exec("launchctl", ["kickstart", "-k", svc]);
|
|
97723
|
+
}
|
|
97724
|
+
waitUntilGone(svc) {
|
|
97725
|
+
for (let i2 = 0; i2 < 20; i2++) {
|
|
97726
|
+
if (this.deps.exec("launchctl", ["print", svc]).code !== 0) return;
|
|
97727
|
+
this.deps.exec("sleep", ["0.25"]);
|
|
97728
|
+
}
|
|
97729
|
+
}
|
|
97730
|
+
restart(label) {
|
|
97731
|
+
this.deps.exec("launchctl", ["kickstart", "-k", `${this.domain()}/${label}`]);
|
|
97732
|
+
}
|
|
97733
|
+
uninstall(label) {
|
|
97734
|
+
this.deps.exec("launchctl", ["bootout", `${this.domain()}/${label}`]);
|
|
97735
|
+
const path2 = this.plistPath(label);
|
|
97736
|
+
if (this.deps.exists(path2)) this.deps.rm(path2);
|
|
97737
|
+
}
|
|
97738
|
+
status(label) {
|
|
97739
|
+
const r2 = this.deps.exec("launchctl", ["print", `${this.domain()}/${label}`]);
|
|
97740
|
+
return { loaded: r2.code === 0, detail: r2.stdout };
|
|
97741
|
+
}
|
|
97742
|
+
list(prefix) {
|
|
97743
|
+
const dir = join8(this.deps.home, "Library", "LaunchAgents");
|
|
97744
|
+
const out = [];
|
|
97745
|
+
for (const name of this.deps.readdir(dir)) {
|
|
97746
|
+
if (!name.startsWith(prefix) || !name.endsWith(".plist")) continue;
|
|
97747
|
+
const path2 = join8(dir, name);
|
|
97748
|
+
out.push({
|
|
97749
|
+
label: name.slice(0, -".plist".length),
|
|
97750
|
+
path: path2,
|
|
97751
|
+
env: parsePlistEnv(this.deps.readFile(path2))
|
|
97752
|
+
});
|
|
97753
|
+
}
|
|
97754
|
+
return out.sort((a2, b2) => a2.label.localeCompare(b2.label));
|
|
97755
|
+
}
|
|
97756
|
+
};
|
|
97757
|
+
}
|
|
97758
|
+
});
|
|
97759
|
+
|
|
97760
|
+
// src/service/systemd.ts
|
|
97761
|
+
import { dirname as dirname4, join as join9 } from "node:path";
|
|
97762
|
+
function q2(s2) {
|
|
97763
|
+
const esc3 = s2.replace(/\\/g, "\\\\").replace(/"/g, '\\"').replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/\t/g, "\\t").replace(/%/g, "%%");
|
|
97764
|
+
return `"${esc3}"`;
|
|
97765
|
+
}
|
|
97766
|
+
function renderSystemdUnit(spec) {
|
|
97767
|
+
const exec = spec.programArgs.map(q2).join(" ");
|
|
97768
|
+
const envLines = Object.entries(spec.env).map(([k2, v2]) => `Environment=${q2(`${k2}=${v2}`)}`).join("\n");
|
|
97769
|
+
return `[Unit]
|
|
97770
|
+
Description=AgentVault muse bridge (${spec.label})
|
|
97771
|
+
Wants=network-online.target
|
|
97772
|
+
After=network-online.target
|
|
97773
|
+
|
|
97774
|
+
[Service]
|
|
97775
|
+
ExecStart=${exec}
|
|
97776
|
+
WorkingDirectory=${spec.workingDir}
|
|
97777
|
+
${envLines}
|
|
97778
|
+
Restart=on-failure
|
|
97779
|
+
SuccessExitStatus=0
|
|
97780
|
+
StandardOutput=append:${spec.logOut}
|
|
97781
|
+
StandardError=append:${spec.logErr}
|
|
97782
|
+
|
|
97783
|
+
[Install]
|
|
97784
|
+
WantedBy=default.target
|
|
97785
|
+
`;
|
|
97786
|
+
}
|
|
97787
|
+
function parseUnitEnv(text) {
|
|
97788
|
+
const out = {};
|
|
97789
|
+
for (const line of text.split("\n")) {
|
|
97790
|
+
const m2 = /^Environment="([\s\S]*)"\s*$/.exec(line.trim());
|
|
97791
|
+
if (!m2) continue;
|
|
97792
|
+
const eq = unq(m2[1]);
|
|
97793
|
+
const at = eq.indexOf("=");
|
|
97794
|
+
if (at <= 0) continue;
|
|
97795
|
+
out[eq.slice(0, at)] = eq.slice(at + 1);
|
|
97796
|
+
}
|
|
97797
|
+
return out;
|
|
97798
|
+
}
|
|
97799
|
+
function unq(s2) {
|
|
97800
|
+
return s2.replace(/%%/g, "%").replace(
|
|
97801
|
+
/\\([\s\S])/g,
|
|
97802
|
+
(_2, c2) => c2 === "n" ? "\n" : c2 === "r" ? "\r" : c2 === "t" ? " " : c2
|
|
97803
|
+
);
|
|
97804
|
+
}
|
|
97805
|
+
var SystemdBackend;
|
|
97806
|
+
var init_systemd = __esm({
|
|
97807
|
+
"src/service/systemd.ts"() {
|
|
97808
|
+
"use strict";
|
|
97809
|
+
init_launcher();
|
|
97810
|
+
SystemdBackend = class {
|
|
97811
|
+
constructor(deps) {
|
|
97812
|
+
this.deps = deps;
|
|
97813
|
+
}
|
|
97814
|
+
deps;
|
|
97815
|
+
unitPath(label) {
|
|
97816
|
+
return join9(this.deps.home, ".config", "systemd", "user", `${label}.service`);
|
|
97817
|
+
}
|
|
97818
|
+
install(spec) {
|
|
97819
|
+
const path2 = this.unitPath(spec.label);
|
|
97820
|
+
this.deps.mkdir(dirname4(spec.logOut));
|
|
97821
|
+
writeLauncher(this.deps, spec);
|
|
97822
|
+
this.deps.mkdir(dirname4(path2));
|
|
97823
|
+
this.deps.writeFile(path2, renderSystemdUnit(spec));
|
|
97824
|
+
this.deps.exec("loginctl", ["enable-linger", this.deps.user]);
|
|
97825
|
+
this.deps.exec("systemctl", ["--user", "daemon-reload"]);
|
|
97826
|
+
this.deps.exec("systemctl", ["--user", "enable", `${spec.label}.service`]);
|
|
97827
|
+
this.deps.exec("systemctl", ["--user", "restart", `${spec.label}.service`]);
|
|
97828
|
+
}
|
|
97829
|
+
restart(label) {
|
|
97830
|
+
this.deps.exec("systemctl", ["--user", "restart", `${label}.service`]);
|
|
97831
|
+
}
|
|
97832
|
+
uninstall(label) {
|
|
97833
|
+
this.deps.exec("systemctl", ["--user", "disable", "--now", `${label}.service`]);
|
|
97834
|
+
const path2 = this.unitPath(label);
|
|
97835
|
+
if (this.deps.exists(path2)) this.deps.rm(path2);
|
|
97836
|
+
this.deps.exec("systemctl", ["--user", "daemon-reload"]);
|
|
97837
|
+
}
|
|
97838
|
+
status(label) {
|
|
97839
|
+
const enabled = this.deps.exec("systemctl", ["--user", "is-enabled", `${label}.service`]);
|
|
97840
|
+
const active = this.deps.exec("systemctl", ["--user", "is-active", `${label}.service`]);
|
|
97841
|
+
return { loaded: enabled.code === 0, detail: `${enabled.stdout.trim() || "?"} / ${active.stdout.trim() || "?"}` };
|
|
97842
|
+
}
|
|
97843
|
+
list(prefix) {
|
|
97844
|
+
const dir = join9(this.deps.home, ".config", "systemd", "user");
|
|
97845
|
+
const out = [];
|
|
97846
|
+
for (const name of this.deps.readdir(dir)) {
|
|
97847
|
+
if (!name.startsWith(prefix) || !name.endsWith(".service")) continue;
|
|
97848
|
+
const path2 = join9(dir, name);
|
|
97849
|
+
out.push({
|
|
97850
|
+
label: name.slice(0, -".service".length),
|
|
97851
|
+
path: path2,
|
|
97852
|
+
env: parseUnitEnv(this.deps.readFile(path2))
|
|
97853
|
+
});
|
|
97854
|
+
}
|
|
97855
|
+
return out.sort((a2, b2) => a2.label.localeCompare(b2.label));
|
|
97856
|
+
}
|
|
97857
|
+
};
|
|
97858
|
+
}
|
|
97859
|
+
});
|
|
97860
|
+
|
|
97861
|
+
// src/service/backend.ts
|
|
97862
|
+
import { spawnSync } from "node:child_process";
|
|
97863
|
+
import { mkdirSync as mkdirSync5, writeFileSync as writeFileSync4, rmSync, existsSync as existsSync5, chmodSync as chmodSync4, readdirSync as readdirSync2, readFileSync as readFileSync5 } from "node:fs";
|
|
97864
|
+
import { userInfo } from "node:os";
|
|
97865
|
+
function defaultDeps() {
|
|
97866
|
+
return {
|
|
97867
|
+
home: process.env.HOME ?? "",
|
|
97868
|
+
uid: userInfo().uid,
|
|
97869
|
+
user: userInfo().username,
|
|
97870
|
+
exec: (cmd, args) => {
|
|
97871
|
+
const r2 = spawnSync(cmd, args, { encoding: "utf8" });
|
|
97872
|
+
return { code: r2.status ?? 1, stdout: r2.stdout ?? "" };
|
|
97873
|
+
},
|
|
97874
|
+
writeFile: (p2, d2) => writeFileSync4(p2, d2),
|
|
97875
|
+
mkdir: (p2) => mkdirSync5(p2, { recursive: true }),
|
|
97876
|
+
chmod: (p2, m2) => chmodSync4(p2, m2),
|
|
97877
|
+
rm: (p2) => rmSync(p2, { force: true }),
|
|
97878
|
+
exists: (p2) => existsSync5(p2),
|
|
97879
|
+
readdir: (p2) => {
|
|
97880
|
+
try {
|
|
97881
|
+
return readdirSync2(p2);
|
|
97882
|
+
} catch {
|
|
97883
|
+
return [];
|
|
97884
|
+
}
|
|
97885
|
+
},
|
|
97886
|
+
readFile: (p2) => {
|
|
97887
|
+
try {
|
|
97888
|
+
return readFileSync5(p2, "utf8");
|
|
97889
|
+
} catch {
|
|
97890
|
+
return "";
|
|
97891
|
+
}
|
|
97892
|
+
}
|
|
97893
|
+
};
|
|
97894
|
+
}
|
|
97895
|
+
function selectBackend(platform, deps) {
|
|
97896
|
+
if (platform === "darwin") {
|
|
97897
|
+
return new LaunchdBackend(deps ?? defaultDeps());
|
|
97898
|
+
}
|
|
97899
|
+
if (platform === "linux") {
|
|
97900
|
+
return new SystemdBackend(deps ?? defaultDeps());
|
|
97901
|
+
}
|
|
97902
|
+
throw new Error(`unsupported platform for muse-bridge service install: ${platform}`);
|
|
97903
|
+
}
|
|
97904
|
+
var init_backend = __esm({
|
|
97905
|
+
"src/service/backend.ts"() {
|
|
97906
|
+
"use strict";
|
|
97907
|
+
init_launchd();
|
|
97908
|
+
init_systemd();
|
|
97909
|
+
}
|
|
97910
|
+
});
|
|
97911
|
+
|
|
97912
|
+
// src/service/subcommand.ts
|
|
97913
|
+
var subcommand_exports = {};
|
|
97914
|
+
__export(subcommand_exports, {
|
|
97915
|
+
labelFor: () => labelFor,
|
|
97916
|
+
maybeRunServiceSubcommand: () => maybeRunServiceSubcommand
|
|
97917
|
+
});
|
|
97918
|
+
import { join as join10 } from "node:path";
|
|
97919
|
+
function requireAgentName(env) {
|
|
97920
|
+
const name = env.AV_AGENT_NAME?.trim();
|
|
97921
|
+
if (!name) {
|
|
97922
|
+
throw new Error(
|
|
97923
|
+
"AV_AGENT_NAME is required \u2014 it names WHICH agent's service to act on. Re-run as: AV_AGENT_NAME=<agent-name> agentvault-muse-bridge <subcommand>"
|
|
97924
|
+
);
|
|
97925
|
+
}
|
|
97926
|
+
return name;
|
|
97927
|
+
}
|
|
97928
|
+
function labelFor(env) {
|
|
97929
|
+
return `dev.agentvault.muse-${slugify(requireAgentName(env))}`;
|
|
97930
|
+
}
|
|
97931
|
+
function dataDirFor(env, agentName) {
|
|
97932
|
+
if (env.AV_DATA_DIR) return env.AV_DATA_DIR;
|
|
97933
|
+
return join10(env.HOME ?? "", ".agentvault", "muse-room-bridge", slugify(agentName));
|
|
97934
|
+
}
|
|
97935
|
+
function maybeRunServiceSubcommand(argv, env, deps) {
|
|
97936
|
+
const cmd = argv[2];
|
|
97937
|
+
if (!cmd) return false;
|
|
97938
|
+
if (!SERVICE_CMDS.has(cmd)) {
|
|
97939
|
+
const looksLikeToken = cmd.startsWith("av_tok_");
|
|
97940
|
+
const looksLikeFlag = cmd.startsWith("-");
|
|
97941
|
+
if (!looksLikeToken && !looksLikeFlag) {
|
|
97942
|
+
throw new Error(
|
|
97943
|
+
`unknown subcommand: ${cmd} \u2014 expected one of ${[...SERVICE_CMDS].join(", ")}, an invite token, or no argument at all`
|
|
97944
|
+
);
|
|
97945
|
+
}
|
|
97946
|
+
return false;
|
|
97947
|
+
}
|
|
97948
|
+
const backend = deps?.backend ?? selectBackend(process.platform);
|
|
97949
|
+
const entrypoint = deps?.entrypoint ?? process.argv[1];
|
|
97950
|
+
const log = deps?.log ?? ((m2) => logLine("[muse-bridge] " + m2));
|
|
97951
|
+
try {
|
|
97952
|
+
if (cmd === "install") {
|
|
97953
|
+
const agentName = requireAgentName(env);
|
|
97954
|
+
assertInstallableEntrypoint(entrypoint);
|
|
97955
|
+
const dataDir = dataDirFor(env, agentName);
|
|
97956
|
+
if (!hasPersistedCreds(dataDir)) {
|
|
97957
|
+
throw new Error(
|
|
97958
|
+
"cannot install a supervised service before this agent has enrolled \u2014 run agentvault-muse-bridge <invite-token> once so credentials persist, then: AV_AGENT_NAME=<agent-name> agentvault-muse-bridge install"
|
|
97959
|
+
);
|
|
97960
|
+
}
|
|
97961
|
+
const cfg = loadConfig(env, []);
|
|
97962
|
+
const spec = buildServiceSpec(cfg, {
|
|
97963
|
+
entrypoint,
|
|
97964
|
+
home: env.HOME ?? "",
|
|
97965
|
+
path: env.PATH ?? ""
|
|
97966
|
+
});
|
|
97967
|
+
backend.install(spec);
|
|
97968
|
+
log(`installed service ${spec.label} \u2014 logs: ${spec.logErr}`);
|
|
97969
|
+
log(`check it with: AV_AGENT_NAME=${cfg.agentName} agentvault-muse-bridge status`);
|
|
97970
|
+
} else if (cmd === "uninstall") {
|
|
97971
|
+
const label = labelFor(env);
|
|
97972
|
+
backend.uninstall(label);
|
|
97973
|
+
log(`uninstalled service ${label}`);
|
|
97974
|
+
} else if (cmd === "restart") {
|
|
97975
|
+
const label = labelFor(env);
|
|
97976
|
+
backend.restart(label);
|
|
97977
|
+
log(`restarted service ${label}`);
|
|
97978
|
+
} else if (cmd === "status") {
|
|
97979
|
+
const label = labelFor(env);
|
|
97980
|
+
const st = backend.status(label);
|
|
97981
|
+
log(`${label}: ${st.loaded ? "loaded" : "not loaded"}`);
|
|
97982
|
+
} else if (cmd === "logs") {
|
|
97983
|
+
const label = labelFor(env);
|
|
97984
|
+
log(`logs for ${label} are at <dataDir>/logs/muse-bridge.log (tail -f it)`);
|
|
97985
|
+
}
|
|
97986
|
+
} catch (e) {
|
|
97987
|
+
log(e.message);
|
|
97988
|
+
process.exitCode = 1;
|
|
97989
|
+
}
|
|
97990
|
+
return true;
|
|
97991
|
+
}
|
|
97992
|
+
var SERVICE_CMDS;
|
|
97993
|
+
var init_subcommand = __esm({
|
|
97994
|
+
"src/service/subcommand.ts"() {
|
|
97995
|
+
"use strict";
|
|
97996
|
+
init_config();
|
|
97997
|
+
init_log();
|
|
97998
|
+
init_spec();
|
|
97999
|
+
init_backend();
|
|
98000
|
+
SERVICE_CMDS = /* @__PURE__ */ new Set(["install", "uninstall", "restart", "status", "logs"]);
|
|
98001
|
+
}
|
|
98002
|
+
});
|
|
98003
|
+
|
|
97789
98004
|
// src/index.ts
|
|
97790
98005
|
init_config();
|
|
97791
98006
|
init_log();
|
|
@@ -98516,6 +98731,7 @@ function writeFenceMcpSettings(fenceHome, opts) {
|
|
|
98516
98731
|
}
|
|
98517
98732
|
|
|
98518
98733
|
// src/bridge.ts
|
|
98734
|
+
await init_dist();
|
|
98519
98735
|
var workAllowedFlag = false;
|
|
98520
98736
|
var gatesRemovedFlag = false;
|
|
98521
98737
|
function workAllowed() {
|
|
@@ -98572,7 +98788,7 @@ var ActiveTarget = class {
|
|
|
98572
98788
|
};
|
|
98573
98789
|
}
|
|
98574
98790
|
};
|
|
98575
|
-
function
|
|
98791
|
+
function attachLifecycle2(channel, opts = {}) {
|
|
98576
98792
|
const log = opts.log ?? (() => {
|
|
98577
98793
|
});
|
|
98578
98794
|
const onTerminal = opts.onTerminal ?? ((_reason, o2) => process.exit(o2.restart ? 1 : 0));
|
|
@@ -98596,9 +98812,32 @@ function roomTurnPrefix(roomId, senderName, roomName) {
|
|
|
98596
98812
|
const room = roomName ? `"${roomName}"` : roomId.slice(0, 8);
|
|
98597
98813
|
return `[room ${room} | ${senderName}]`;
|
|
98598
98814
|
}
|
|
98815
|
+
function _makeOwesReply(agentName, channel, log) {
|
|
98816
|
+
let warnedNoIdentity = false;
|
|
98817
|
+
return (e) => {
|
|
98818
|
+
const own = agentName ?? "";
|
|
98819
|
+
const hub = channel.ownDisplayName ?? "";
|
|
98820
|
+
if (!own && !hub && !warnedNoIdentity) {
|
|
98821
|
+
warnedNoIdentity = true;
|
|
98822
|
+
log(
|
|
98823
|
+
"WARNING: this bridge has no agentName and no hub display_name, so it cannot recognise its own @mention (#1107). It will answer @all and any @-addressed message (fail-open), but targeted replies will be unreliable. Set the agent name in the bridge config."
|
|
98824
|
+
);
|
|
98825
|
+
}
|
|
98826
|
+
return owesRoomReply(
|
|
98827
|
+
e.plaintext,
|
|
98828
|
+
own,
|
|
98829
|
+
own,
|
|
98830
|
+
e.senderIsAgent,
|
|
98831
|
+
void 0,
|
|
98832
|
+
hub,
|
|
98833
|
+
Boolean(own || hub)
|
|
98834
|
+
);
|
|
98835
|
+
};
|
|
98836
|
+
}
|
|
98599
98837
|
function wireBridge(channel, session, target, opts = {}) {
|
|
98600
98838
|
const log = opts.log ?? (() => {
|
|
98601
98839
|
});
|
|
98840
|
+
const _owesReply = _makeOwesReply(opts.agentName, channel, log);
|
|
98602
98841
|
channel.on("error", (err) => {
|
|
98603
98842
|
const msg = err instanceof Error ? err.message : String(err);
|
|
98604
98843
|
log(`channel error (non-fatal, not a reconnect trigger): ${msg}`);
|
|
@@ -98645,7 +98884,7 @@ function wireBridge(channel, session, target, opts = {}) {
|
|
|
98645
98884
|
target.snapshotReply(channel, log),
|
|
98646
98885
|
{
|
|
98647
98886
|
autoReplyOnText: false,
|
|
98648
|
-
replyExpected: e
|
|
98887
|
+
replyExpected: _owesReply(e)
|
|
98649
98888
|
}
|
|
98650
98889
|
);
|
|
98651
98890
|
});
|
|
@@ -98663,7 +98902,7 @@ function wireBridge(channel, session, target, opts = {}) {
|
|
|
98663
98902
|
}
|
|
98664
98903
|
|
|
98665
98904
|
// src/version.ts
|
|
98666
|
-
function
|
|
98905
|
+
function buildClientVersion2(version2) {
|
|
98667
98906
|
return `@agentvault/muse-bridge@${version2 ?? "dev"}`;
|
|
98668
98907
|
}
|
|
98669
98908
|
|
|
@@ -98673,7 +98912,7 @@ function mkdir700(path2) {
|
|
|
98673
98912
|
chmodSync5(path2, 448);
|
|
98674
98913
|
}
|
|
98675
98914
|
function packageVersion() {
|
|
98676
|
-
return true ? "0.1.
|
|
98915
|
+
return true ? "0.1.5" : void 0;
|
|
98677
98916
|
}
|
|
98678
98917
|
function helpText(version2) {
|
|
98679
98918
|
return [
|
|
@@ -98719,7 +98958,7 @@ async function main(opts = {}) {
|
|
|
98719
98958
|
}
|
|
98720
98959
|
const info = parseInfoFlags(argv.slice(2));
|
|
98721
98960
|
if (info.showVersion || info.showHelp) {
|
|
98722
|
-
const version2 =
|
|
98961
|
+
const version2 = buildClientVersion2(packageVersion());
|
|
98723
98962
|
if (info.showVersion) printLine(version2);
|
|
98724
98963
|
if (info.showHelp) printLine(helpText(version2));
|
|
98725
98964
|
exit(0);
|
|
@@ -98801,7 +99040,7 @@ async function main(opts = {}) {
|
|
|
98801
99040
|
return;
|
|
98802
99041
|
}
|
|
98803
99042
|
logLine(`[muse-bridge] muse session ${driver.sessionId()} ready`);
|
|
98804
|
-
const clientVersion =
|
|
99043
|
+
const clientVersion = buildClientVersion2(packageVersion());
|
|
98805
99044
|
if (opts.createChannel) {
|
|
98806
99045
|
channel = opts.createChannel({
|
|
98807
99046
|
inviteToken: cfg.inviteToken,
|
|
@@ -98824,9 +99063,12 @@ async function main(opts = {}) {
|
|
|
98824
99063
|
}
|
|
98825
99064
|
const target = new ActiveTarget();
|
|
98826
99065
|
wireBridge(channel, session, target, {
|
|
99066
|
+
// #1107: needed to recognise this agent's own @mention. Without it the
|
|
99067
|
+
// agent can only answer @all.
|
|
99068
|
+
agentName: cfg.agentName,
|
|
98827
99069
|
log: (m2) => logLine("[muse-bridge] " + m2)
|
|
98828
99070
|
});
|
|
98829
|
-
|
|
99071
|
+
attachLifecycle2(channel, {
|
|
98830
99072
|
log: (m2) => logLine("[muse-bridge] " + m2),
|
|
98831
99073
|
onTerminal: (_reason, o2) => void shutdown(o2.restart ? 1 : 0)
|
|
98832
99074
|
});
|