@agentvault/muse-bridge 0.1.2 → 0.1.3
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/README.md +8 -3
- package/dist/fence-auth.d.ts +19 -2
- package/dist/index.js +146 -46
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -9,9 +9,14 @@ direct messages and rooms.
|
|
|
9
9
|
|
|
10
10
|
## Prerequisite
|
|
11
11
|
|
|
12
|
-
Install Muse Code and
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
Install Muse Code and set `META_API_KEY` (it always wins). `muse login` is
|
|
13
|
+
fine on the host, but Muse 1.0.1 stores that login in the macOS Keychain.
|
|
14
|
+
The bridge **does not** copy a keychain-only host `auth.json` into the fence
|
|
15
|
+
— that makes the child `SecItemAdd` and can pop “Keychain Not Found.”
|
|
16
|
+
|
|
17
|
+
A file `providers.meta.api_key` is harvested once into
|
|
18
|
+
`<dataDir>/meta-api-key.json` (mode `0600`) and forwarded as `META_API_KEY`.
|
|
19
|
+
It is never written to launchd/systemd.
|
|
15
20
|
|
|
16
21
|
## First enroll
|
|
17
22
|
|
package/dist/fence-auth.d.ts
CHANGED
|
@@ -1,10 +1,27 @@
|
|
|
1
|
-
export type SeedResult = "seeded" | "already-present" | "no-host-credential";
|
|
1
|
+
export type SeedResult = "seeded" | "already-present" | "no-host-credential" | "host-credential-keychain-only";
|
|
2
|
+
/** File-backed Meta key in the fence. Undefined for missing, garbage, or keychain-only. */
|
|
3
|
+
export declare function readFenceMetaApiKey(fenceHome: string): string | undefined;
|
|
4
|
+
export type HarvestResult = "harvested" | "already-sidecar" | "none";
|
|
5
|
+
/** Bridge-private key file. Not under fence HOME, so Muse 1.0.1 will not migrate it. */
|
|
6
|
+
export declare function sidecarMetaApiKeyPath(dataDir: string): string;
|
|
7
|
+
export declare function readSidecarMetaApiKey(dataDir: string): string | undefined;
|
|
8
|
+
/**
|
|
9
|
+
* Muse 1.0.1 SecItemAdd-migrates a fence file api_key even when META_API_KEY is
|
|
10
|
+
* set (live: file+env hung; env-only rejected the key in 0.3s with no dialog).
|
|
11
|
+
* Keep the key in dataDir and take it out of the child's XDG auth.json.
|
|
12
|
+
*/
|
|
13
|
+
export declare function harvestFenceApiKeyToSidecar(opts: {
|
|
14
|
+
dataDir: string;
|
|
15
|
+
fenceHome: string;
|
|
16
|
+
log?: (m: string) => void;
|
|
17
|
+
}): HarvestResult;
|
|
2
18
|
/**
|
|
3
19
|
* Copy the host's Muse credential into the agent's fence, ONCE.
|
|
4
20
|
*
|
|
5
21
|
* Copies auth.json alone — never host settings.json, skills, or trust.json.
|
|
6
22
|
* Never overwrite an existing fence credential (a fenced child refreshes its
|
|
7
|
-
* own token in place)
|
|
23
|
+
* own token in place), except a keychain-only pointer: that is not a usable
|
|
24
|
+
* file key and would make the child SecItemAdd. Never log file contents.
|
|
8
25
|
*/
|
|
9
26
|
export declare function seedFenceCredential(opts: {
|
|
10
27
|
fenceHome: string;
|
package/dist/index.js
CHANGED
|
@@ -9,20 +9,132 @@ var __export = (target, all) => {
|
|
|
9
9
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
10
|
};
|
|
11
11
|
|
|
12
|
+
// src/fence-auth.ts
|
|
13
|
+
import {
|
|
14
|
+
copyFileSync,
|
|
15
|
+
chmodSync,
|
|
16
|
+
existsSync,
|
|
17
|
+
mkdirSync,
|
|
18
|
+
readFileSync,
|
|
19
|
+
unlinkSync,
|
|
20
|
+
writeFileSync
|
|
21
|
+
} from "node:fs";
|
|
22
|
+
import { join } from "node:path";
|
|
23
|
+
function parseAuthJson(path2) {
|
|
24
|
+
try {
|
|
25
|
+
if (!existsSync(path2)) return void 0;
|
|
26
|
+
return JSON.parse(readFileSync(path2, "utf8"));
|
|
27
|
+
} catch {
|
|
28
|
+
return void 0;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
function metaApiKeyFromAuth(parsed) {
|
|
32
|
+
if (!parsed || typeof parsed !== "object") return void 0;
|
|
33
|
+
const providers = parsed.providers;
|
|
34
|
+
if (!providers || typeof providers !== "object") return void 0;
|
|
35
|
+
const meta3 = providers.meta;
|
|
36
|
+
if (!meta3 || typeof meta3 !== "object") return void 0;
|
|
37
|
+
const key = meta3.api_key;
|
|
38
|
+
if (typeof key !== "string") return void 0;
|
|
39
|
+
const trimmed = key.trim();
|
|
40
|
+
return trimmed.length > 0 ? trimmed : void 0;
|
|
41
|
+
}
|
|
42
|
+
function isKeychainOnlyAuth(parsed) {
|
|
43
|
+
if (!parsed || typeof parsed !== "object") return false;
|
|
44
|
+
const providers = parsed.providers;
|
|
45
|
+
if (!providers || typeof providers !== "object") return false;
|
|
46
|
+
const meta3 = providers.meta;
|
|
47
|
+
if (!meta3 || typeof meta3 !== "object") return false;
|
|
48
|
+
return meta3.storage === "keychain" && !metaApiKeyFromAuth(parsed);
|
|
49
|
+
}
|
|
50
|
+
function readFenceMetaApiKey(fenceHome) {
|
|
51
|
+
return metaApiKeyFromAuth(parseAuthJson(join(fenceHome, ".config", "muse", "auth.json")));
|
|
52
|
+
}
|
|
53
|
+
function sidecarMetaApiKeyPath(dataDir) {
|
|
54
|
+
return join(dataDir, "meta-api-key.json");
|
|
55
|
+
}
|
|
56
|
+
function apiKeyFromSidecar(parsed) {
|
|
57
|
+
if (!parsed || typeof parsed !== "object") return void 0;
|
|
58
|
+
const key = parsed.api_key;
|
|
59
|
+
if (typeof key !== "string") return void 0;
|
|
60
|
+
const trimmed = key.trim();
|
|
61
|
+
return trimmed.length > 0 ? trimmed : void 0;
|
|
62
|
+
}
|
|
63
|
+
function readSidecarMetaApiKey(dataDir) {
|
|
64
|
+
return apiKeyFromSidecar(parseAuthJson(sidecarMetaApiKeyPath(dataDir)));
|
|
65
|
+
}
|
|
66
|
+
function harvestFenceApiKeyToSidecar(opts) {
|
|
67
|
+
const log = opts.log ?? (() => {
|
|
68
|
+
});
|
|
69
|
+
const fenceAuth = join(opts.fenceHome, ".config", "muse", "auth.json");
|
|
70
|
+
const fenceKey = readFenceMetaApiKey(opts.fenceHome);
|
|
71
|
+
const sidecar = sidecarMetaApiKeyPath(opts.dataDir);
|
|
72
|
+
const hadSidecar = !!readSidecarMetaApiKey(opts.dataDir);
|
|
73
|
+
if (fenceKey && !hadSidecar) {
|
|
74
|
+
mkdirSync(opts.dataDir, { recursive: true, mode: 448 });
|
|
75
|
+
writeFileSync(sidecar, JSON.stringify({ api_key: fenceKey }) + "\n", { encoding: "utf8" });
|
|
76
|
+
chmodSync(sidecar, 384);
|
|
77
|
+
log("[muse-bridge] moved fence Meta key out of auth.json so Muse will not hit the Keychain");
|
|
78
|
+
}
|
|
79
|
+
if (fenceKey && existsSync(fenceAuth)) {
|
|
80
|
+
unlinkSync(fenceAuth);
|
|
81
|
+
}
|
|
82
|
+
if (fenceKey && !hadSidecar) return "harvested";
|
|
83
|
+
if (hadSidecar) return "already-sidecar";
|
|
84
|
+
return "none";
|
|
85
|
+
}
|
|
86
|
+
function seedFenceCredential(opts) {
|
|
87
|
+
const log = opts.log ?? (() => {
|
|
88
|
+
});
|
|
89
|
+
const fenceAuth = join(opts.fenceHome, ".config", "muse", "auth.json");
|
|
90
|
+
if (existsSync(fenceAuth)) {
|
|
91
|
+
if (isKeychainOnlyAuth(parseAuthJson(fenceAuth))) {
|
|
92
|
+
unlinkSync(fenceAuth);
|
|
93
|
+
log(
|
|
94
|
+
"[muse-bridge] fence credential is keychain-only; removing it so the child does not hit the Keychain"
|
|
95
|
+
);
|
|
96
|
+
} else {
|
|
97
|
+
log("[muse-bridge] fence credential already present; leaving it untouched");
|
|
98
|
+
return "already-present";
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
const hostAuth = join(opts.hostHome, ".config", "muse", "auth.json");
|
|
102
|
+
if (!existsSync(hostAuth)) {
|
|
103
|
+
log("[muse-bridge] no host credential to seed (run `muse login`, or set META_API_KEY)");
|
|
104
|
+
return "no-host-credential";
|
|
105
|
+
}
|
|
106
|
+
if (isKeychainOnlyAuth(parseAuthJson(hostAuth))) {
|
|
107
|
+
log(
|
|
108
|
+
"[muse-bridge] host muse login is keychain-only; not copying it into the fence. Set META_API_KEY."
|
|
109
|
+
);
|
|
110
|
+
return "host-credential-keychain-only";
|
|
111
|
+
}
|
|
112
|
+
mkdirSync(join(opts.fenceHome, ".config", "muse"), { recursive: true });
|
|
113
|
+
copyFileSync(hostAuth, fenceAuth);
|
|
114
|
+
chmodSync(fenceAuth, 384);
|
|
115
|
+
log("[muse-bridge] seeded fence credential from the host muse login");
|
|
116
|
+
return "seeded";
|
|
117
|
+
}
|
|
118
|
+
var init_fence_auth = __esm({
|
|
119
|
+
"src/fence-auth.ts"() {
|
|
120
|
+
"use strict";
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
|
|
12
124
|
// src/config.ts
|
|
13
|
-
import { existsSync, readFileSync, mkdirSync, chmodSync } from "node:fs";
|
|
14
|
-
import { join, resolve, sep, dirname } from "node:path";
|
|
125
|
+
import { existsSync as existsSync2, readFileSync as readFileSync2, mkdirSync as mkdirSync2, chmodSync as chmodSync2 } from "node:fs";
|
|
126
|
+
import { join as join2, resolve, sep, dirname } from "node:path";
|
|
15
127
|
import { tmpdir } from "node:os";
|
|
16
128
|
function hasRecoverableBackup(dataDir) {
|
|
17
129
|
try {
|
|
18
|
-
const parsed = JSON.parse(
|
|
130
|
+
const parsed = JSON.parse(readFileSync2(join2(dataDir, BACKUP_FILE), "utf-8"));
|
|
19
131
|
return !!(parsed && parsed.deviceId && parsed.deviceJwt && parsed.sessions && Object.keys(parsed.sessions).length > 0);
|
|
20
132
|
} catch {
|
|
21
133
|
return false;
|
|
22
134
|
}
|
|
23
135
|
}
|
|
24
136
|
function hasPersistedCreds(dataDir) {
|
|
25
|
-
if (CRED_FILES.some((f2) =>
|
|
137
|
+
if (CRED_FILES.some((f2) => existsSync2(join2(dataDir, f2)))) return true;
|
|
26
138
|
return hasRecoverableBackup(dataDir);
|
|
27
139
|
}
|
|
28
140
|
function slugify(name) {
|
|
@@ -54,8 +166,8 @@ function loadConfig(env, argv = []) {
|
|
|
54
166
|
}
|
|
55
167
|
const slug = slugify(agentName);
|
|
56
168
|
const hostHome = env.HOME ?? "";
|
|
57
|
-
const dataDir = env.AV_DATA_DIR ||
|
|
58
|
-
const workspaceDir = env.AV_WORKSPACE_DIR ||
|
|
169
|
+
const dataDir = env.AV_DATA_DIR || join2(hostHome, ".agentvault", "muse-room-bridge", slug);
|
|
170
|
+
const workspaceDir = env.AV_WORKSPACE_DIR || join2(dirname(dataDir), "workspaces", slug);
|
|
59
171
|
const wsReal = resolve(workspaceDir);
|
|
60
172
|
const ddReal = resolve(dataDir);
|
|
61
173
|
if (wsReal === ddReal || wsReal.startsWith(ddReal + sep) || ddReal.startsWith(wsReal + sep)) {
|
|
@@ -64,8 +176,8 @@ function loadConfig(env, argv = []) {
|
|
|
64
176
|
);
|
|
65
177
|
}
|
|
66
178
|
try {
|
|
67
|
-
|
|
68
|
-
|
|
179
|
+
mkdirSync2(workspaceDir, { recursive: true, mode: 448 });
|
|
180
|
+
chmodSync2(workspaceDir, 448);
|
|
69
181
|
} catch (e) {
|
|
70
182
|
throw new Error(
|
|
71
183
|
`Failed to create/secure the agent workspace at ${workspaceDir} (override with AV_WORKSPACE_DIR): ${e.message}`
|
|
@@ -83,14 +195,15 @@ function loadConfig(env, argv = []) {
|
|
|
83
195
|
"invite token required: pass it as the first argument or set AV_INVITE_TOKEN (or start from a data dir with existing credentials to reconnect)"
|
|
84
196
|
);
|
|
85
197
|
}
|
|
198
|
+
const fenceHome = env.AV_FENCE_HOME || join2(dataDir, "fence");
|
|
86
199
|
return {
|
|
87
200
|
inviteToken,
|
|
88
201
|
dataDir,
|
|
89
202
|
agentName,
|
|
90
203
|
workspaceDir,
|
|
91
204
|
musePath: env.AV_MUSE_PATH || "muse",
|
|
92
|
-
fenceHome
|
|
93
|
-
apiKey: env.META_API_KEY || void 0,
|
|
205
|
+
fenceHome,
|
|
206
|
+
apiKey: env.META_API_KEY || readSidecarMetaApiKey(dataDir) || readFenceMetaApiKey(fenceHome) || void 0,
|
|
94
207
|
hostHome,
|
|
95
208
|
apiUrl: env.AV_API_URL ?? "https://api.agentvault.chat"
|
|
96
209
|
};
|
|
@@ -99,6 +212,7 @@ var CRED_FILES, BACKUP_FILE, VERSION_FLAGS, HELP_FLAGS, KNOWN_FLAGS;
|
|
|
99
212
|
var init_config = __esm({
|
|
100
213
|
"src/config.ts"() {
|
|
101
214
|
"use strict";
|
|
215
|
+
init_fence_auth();
|
|
102
216
|
CRED_FILES = ["agentvault.json", "secure-channel.json"];
|
|
103
217
|
BACKUP_FILE = "agentvault.json.bak";
|
|
104
218
|
VERSION_FLAGS = ["--version", "-v"];
|
|
@@ -442,7 +556,7 @@ var init_systemd = __esm({
|
|
|
442
556
|
|
|
443
557
|
// src/service/backend.ts
|
|
444
558
|
import { spawnSync } from "node:child_process";
|
|
445
|
-
import { mkdirSync as mkdirSync5, writeFileSync as
|
|
559
|
+
import { mkdirSync as mkdirSync5, writeFileSync as writeFileSync4, rmSync, existsSync as existsSync4, chmodSync as chmodSync4, readdirSync, readFileSync as readFileSync4 } from "node:fs";
|
|
446
560
|
import { userInfo } from "node:os";
|
|
447
561
|
function defaultDeps() {
|
|
448
562
|
return {
|
|
@@ -453,7 +567,7 @@ function defaultDeps() {
|
|
|
453
567
|
const r2 = spawnSync(cmd, args, { encoding: "utf8" });
|
|
454
568
|
return { code: r2.status ?? 1, stdout: r2.stdout ?? "" };
|
|
455
569
|
},
|
|
456
|
-
writeFile: (p2, d2) =>
|
|
570
|
+
writeFile: (p2, d2) => writeFileSync4(p2, d2),
|
|
457
571
|
mkdir: (p2) => mkdirSync5(p2, { recursive: true }),
|
|
458
572
|
chmod: (p2, m2) => chmodSync4(p2, m2),
|
|
459
573
|
rm: (p2) => rmSync(p2, { force: true }),
|
|
@@ -467,7 +581,7 @@ function defaultDeps() {
|
|
|
467
581
|
},
|
|
468
582
|
readFile: (p2) => {
|
|
469
583
|
try {
|
|
470
|
-
return
|
|
584
|
+
return readFileSync4(p2, "utf8");
|
|
471
585
|
} catch {
|
|
472
586
|
return "";
|
|
473
587
|
}
|
|
@@ -583,7 +697,7 @@ var init_subcommand = __esm({
|
|
|
583
697
|
}
|
|
584
698
|
});
|
|
585
699
|
|
|
586
|
-
//
|
|
700
|
+
// ../../../../packages/plugin/dist/index.js
|
|
587
701
|
var dist_exports = {};
|
|
588
702
|
__export(dist_exports, {
|
|
589
703
|
AgentVaultMcpServer: () => AgentVaultMcpServer,
|
|
@@ -636,7 +750,7 @@ import { randomUUID as randomUUID3 } from "node:crypto";
|
|
|
636
750
|
import { EventEmitter } from "node:events";
|
|
637
751
|
import { createServer as createServer2 } from "node:http";
|
|
638
752
|
import { randomUUID as randomUUID22, createHash } from "node:crypto";
|
|
639
|
-
import { readFileSync as
|
|
753
|
+
import { readFileSync as readFileSync5 } from "node:fs";
|
|
640
754
|
import { homedir as osHomedir } from "node:os";
|
|
641
755
|
import { writeFile as writeFile3, mkdir as mkdir3 } from "node:fs/promises";
|
|
642
756
|
import { join as join42 } from "node:path";
|
|
@@ -17325,7 +17439,7 @@ function reportSkillInvocation(opts) {
|
|
|
17325
17439
|
}
|
|
17326
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;
|
|
17327
17441
|
var init_dist = __esm({
|
|
17328
|
-
async "
|
|
17442
|
+
async "../../../../packages/plugin/dist/index.js"() {
|
|
17329
17443
|
"use strict";
|
|
17330
17444
|
__create = Object.create;
|
|
17331
17445
|
__defProp2 = Object.defineProperty;
|
|
@@ -73329,7 +73443,7 @@ ${messageText}`;
|
|
|
73329
73443
|
}
|
|
73330
73444
|
try {
|
|
73331
73445
|
const configPath = join42(homedir, ".openclaw", "openclaw.json");
|
|
73332
|
-
const raw =
|
|
73446
|
+
const raw = readFileSync5(configPath, "utf-8");
|
|
73333
73447
|
const config2 = JSON.parse(raw);
|
|
73334
73448
|
const agents = config2?.agents?.list;
|
|
73335
73449
|
if (Array.isArray(agents) && agentName) {
|
|
@@ -97675,31 +97789,9 @@ data:
|
|
|
97675
97789
|
// src/index.ts
|
|
97676
97790
|
init_config();
|
|
97677
97791
|
init_log();
|
|
97792
|
+
init_fence_auth();
|
|
97678
97793
|
import { chmodSync as chmodSync5, mkdirSync as mkdirSync6 } from "node:fs";
|
|
97679
97794
|
|
|
97680
|
-
// src/fence-auth.ts
|
|
97681
|
-
import { copyFileSync, chmodSync as chmodSync2, existsSync as existsSync2, mkdirSync as mkdirSync2 } from "node:fs";
|
|
97682
|
-
import { join as join2 } from "node:path";
|
|
97683
|
-
function seedFenceCredential(opts) {
|
|
97684
|
-
const log = opts.log ?? (() => {
|
|
97685
|
-
});
|
|
97686
|
-
const fenceAuth = join2(opts.fenceHome, ".config", "muse", "auth.json");
|
|
97687
|
-
if (existsSync2(fenceAuth)) {
|
|
97688
|
-
log("[muse-bridge] fence credential already present; leaving it untouched");
|
|
97689
|
-
return "already-present";
|
|
97690
|
-
}
|
|
97691
|
-
const hostAuth = join2(opts.hostHome, ".config", "muse", "auth.json");
|
|
97692
|
-
if (!existsSync2(hostAuth)) {
|
|
97693
|
-
log("[muse-bridge] no host credential to seed (run `muse login`, or set META_API_KEY)");
|
|
97694
|
-
return "no-host-credential";
|
|
97695
|
-
}
|
|
97696
|
-
mkdirSync2(join2(opts.fenceHome, ".config", "muse"), { recursive: true });
|
|
97697
|
-
copyFileSync(hostAuth, fenceAuth);
|
|
97698
|
-
chmodSync2(fenceAuth, 384);
|
|
97699
|
-
log("[muse-bridge] seeded fence credential from the host muse login");
|
|
97700
|
-
return "seeded";
|
|
97701
|
-
}
|
|
97702
|
-
|
|
97703
97795
|
// src/muse-session.ts
|
|
97704
97796
|
var MuseSession = class {
|
|
97705
97797
|
constructor(driver, opts = {}) {
|
|
@@ -97812,7 +97904,7 @@ ${item.text}` : item.text;
|
|
|
97812
97904
|
// src/muse-driver.ts
|
|
97813
97905
|
import { spawn } from "node:child_process";
|
|
97814
97906
|
import { randomUUID } from "node:crypto";
|
|
97815
|
-
import { existsSync as existsSync3, mkdirSync as mkdirSync3, readFileSync as
|
|
97907
|
+
import { existsSync as existsSync3, mkdirSync as mkdirSync3, readFileSync as readFileSync3, writeFileSync as writeFileSync2 } from "node:fs";
|
|
97816
97908
|
import { join as join4 } from "node:path";
|
|
97817
97909
|
|
|
97818
97910
|
// src/muse-spawn.ts
|
|
@@ -97881,14 +97973,14 @@ var MuseDriver = class {
|
|
|
97881
97973
|
mkdirSync3(this.opts.dataDir, { recursive: true });
|
|
97882
97974
|
const file2 = join4(this.opts.dataDir, SESSION_FILE);
|
|
97883
97975
|
if (existsSync3(file2)) {
|
|
97884
|
-
const existing =
|
|
97976
|
+
const existing = readFileSync3(file2, "utf8").trim();
|
|
97885
97977
|
if (existing) {
|
|
97886
97978
|
this.persistedId = existing;
|
|
97887
97979
|
return existing;
|
|
97888
97980
|
}
|
|
97889
97981
|
}
|
|
97890
97982
|
this.persistedId = randomUUID();
|
|
97891
|
-
|
|
97983
|
+
writeFileSync2(file2, this.persistedId + "\n", { encoding: "utf8" });
|
|
97892
97984
|
return this.persistedId;
|
|
97893
97985
|
}
|
|
97894
97986
|
sessionId() {
|
|
@@ -98402,7 +98494,7 @@ data: ${JSON.stringify(out)}
|
|
|
98402
98494
|
}
|
|
98403
98495
|
|
|
98404
98496
|
// src/settings-mcp.ts
|
|
98405
|
-
import { mkdirSync as mkdirSync4, writeFileSync as
|
|
98497
|
+
import { mkdirSync as mkdirSync4, writeFileSync as writeFileSync3, chmodSync as chmodSync3 } from "node:fs";
|
|
98406
98498
|
import { join as join5 } from "node:path";
|
|
98407
98499
|
function writeFenceMcpSettings(fenceHome, opts) {
|
|
98408
98500
|
const dir = join5(fenceHome, ".config", "muse");
|
|
@@ -98419,7 +98511,7 @@ function writeFenceMcpSettings(fenceHome, opts) {
|
|
|
98419
98511
|
}
|
|
98420
98512
|
}
|
|
98421
98513
|
};
|
|
98422
|
-
|
|
98514
|
+
writeFileSync3(dest, JSON.stringify(body, null, 2) + "\n", { mode: 384 });
|
|
98423
98515
|
chmodSync3(dest, 384);
|
|
98424
98516
|
}
|
|
98425
98517
|
|
|
@@ -98581,7 +98673,7 @@ function mkdir700(path2) {
|
|
|
98581
98673
|
chmodSync5(path2, 448);
|
|
98582
98674
|
}
|
|
98583
98675
|
function packageVersion() {
|
|
98584
|
-
return true ? "0.1.
|
|
98676
|
+
return true ? "0.1.3" : void 0;
|
|
98585
98677
|
}
|
|
98586
98678
|
function helpText(version2) {
|
|
98587
98679
|
return [
|
|
@@ -98642,6 +98734,14 @@ async function main(opts = {}) {
|
|
|
98642
98734
|
hostHome: cfg.hostHome,
|
|
98643
98735
|
log: (m2) => logLine(m2)
|
|
98644
98736
|
});
|
|
98737
|
+
harvestFenceApiKeyToSidecar({
|
|
98738
|
+
dataDir: cfg.dataDir,
|
|
98739
|
+
fenceHome: cfg.fenceHome,
|
|
98740
|
+
log: (m2) => logLine(m2)
|
|
98741
|
+
});
|
|
98742
|
+
if (!cfg.apiKey) {
|
|
98743
|
+
cfg.apiKey = readSidecarMetaApiKey(cfg.dataDir) || readFenceMetaApiKey(cfg.fenceHome) || void 0;
|
|
98744
|
+
}
|
|
98645
98745
|
let shuttingDown = false;
|
|
98646
98746
|
let exiting = false;
|
|
98647
98747
|
let driver;
|
package/package.json
CHANGED