@agentvault/muse-bridge 0.1.0 → 0.1.2
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/index.js +573 -275
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -260,6 +260,7 @@ function parsePlistEnv(xml) {
|
|
|
260
260
|
}
|
|
261
261
|
i2 = m2.index;
|
|
262
262
|
}
|
|
263
|
+
void i2;
|
|
263
264
|
if (close < 0) return out;
|
|
264
265
|
const body = xml.slice(open, close);
|
|
265
266
|
const pair = /<key>([\s\S]*?)<\/key>\s*<string>([\s\S]*?)<\/string>/g;
|
|
@@ -279,6 +280,7 @@ var init_launchd = __esm({
|
|
|
279
280
|
constructor(deps) {
|
|
280
281
|
this.deps = deps;
|
|
281
282
|
}
|
|
283
|
+
deps;
|
|
282
284
|
plistPath(label) {
|
|
283
285
|
return join7(this.deps.home, "Library", "LaunchAgents", `${label}.plist`);
|
|
284
286
|
}
|
|
@@ -391,6 +393,7 @@ var init_systemd = __esm({
|
|
|
391
393
|
constructor(deps) {
|
|
392
394
|
this.deps = deps;
|
|
393
395
|
}
|
|
396
|
+
deps;
|
|
394
397
|
unitPath(label) {
|
|
395
398
|
return join8(this.deps.home, ".config", "systemd", "user", `${label}.service`);
|
|
396
399
|
}
|
|
@@ -580,7 +583,7 @@ var init_subcommand = __esm({
|
|
|
580
583
|
}
|
|
581
584
|
});
|
|
582
585
|
|
|
583
|
-
//
|
|
586
|
+
// ../plugin/dist/index.js
|
|
584
587
|
var dist_exports = {};
|
|
585
588
|
__export(dist_exports, {
|
|
586
589
|
AgentVaultMcpServer: () => AgentVaultMcpServer,
|
|
@@ -11615,6 +11618,18 @@ function orderDeliveryBatch(messages) {
|
|
|
11615
11618
|
return createdAtOf(a2) - createdAtOf(b2);
|
|
11616
11619
|
});
|
|
11617
11620
|
}
|
|
11621
|
+
function noteObservedEpoch(current, seen) {
|
|
11622
|
+
const n2 = Number(seen);
|
|
11623
|
+
if (!Number.isInteger(n2) || n2 < 0)
|
|
11624
|
+
return current;
|
|
11625
|
+
return n2 > current ? n2 : current;
|
|
11626
|
+
}
|
|
11627
|
+
function needsPreSendResync(localEpoch, observedEpoch) {
|
|
11628
|
+
if (!Number.isInteger(localEpoch) || !Number.isInteger(observedEpoch)) {
|
|
11629
|
+
return false;
|
|
11630
|
+
}
|
|
11631
|
+
return observedEpoch > localEpoch;
|
|
11632
|
+
}
|
|
11618
11633
|
async function ensureSecureDir(dir) {
|
|
11619
11634
|
await mkdir(dir, { recursive: true, mode: DIR_MODE });
|
|
11620
11635
|
try {
|
|
@@ -11780,7 +11795,7 @@ async function joinWithFirstMatchingKp(welcomeBytes, candidates) {
|
|
|
11780
11795
|
return null;
|
|
11781
11796
|
}
|
|
11782
11797
|
function ownIdentity() {
|
|
11783
|
-
const v2 = true ? "0.23.
|
|
11798
|
+
const v2 = true ? "0.23.27" : FALLBACK;
|
|
11784
11799
|
return `${PACKAGE}@${v2}`;
|
|
11785
11800
|
}
|
|
11786
11801
|
function buildClientVersion2(override) {
|
|
@@ -14754,7 +14769,7 @@ function _stringbool(Classes, _params) {
|
|
|
14754
14769
|
type: "pipe",
|
|
14755
14770
|
in: stringSchema,
|
|
14756
14771
|
out: booleanSchema,
|
|
14757
|
-
transform: (input, payload) => {
|
|
14772
|
+
transform: ((input, payload) => {
|
|
14758
14773
|
let data = input;
|
|
14759
14774
|
if (params.case !== "sensitive")
|
|
14760
14775
|
data = data.toLowerCase();
|
|
@@ -14773,14 +14788,14 @@ function _stringbool(Classes, _params) {
|
|
|
14773
14788
|
});
|
|
14774
14789
|
return {};
|
|
14775
14790
|
}
|
|
14776
|
-
},
|
|
14777
|
-
reverseTransform: (input, _payload) => {
|
|
14791
|
+
}),
|
|
14792
|
+
reverseTransform: ((input, _payload) => {
|
|
14778
14793
|
if (input === true) {
|
|
14779
14794
|
return truthyArray[0] || "true";
|
|
14780
14795
|
} else {
|
|
14781
14796
|
return falsyArray[0] || "false";
|
|
14782
14797
|
}
|
|
14783
|
-
},
|
|
14798
|
+
}),
|
|
14784
14799
|
error: params.error
|
|
14785
14800
|
});
|
|
14786
14801
|
return codec2;
|
|
@@ -15794,11 +15809,13 @@ function assertCompleteRequestPrompt(request) {
|
|
|
15794
15809
|
if (request.params.ref.type !== "ref/prompt") {
|
|
15795
15810
|
throw new TypeError(`Expected CompleteRequestPrompt, but got ${request.params.ref.type}`);
|
|
15796
15811
|
}
|
|
15812
|
+
void request;
|
|
15797
15813
|
}
|
|
15798
15814
|
function assertCompleteRequestResourceTemplate(request) {
|
|
15799
15815
|
if (request.params.ref.type !== "ref/resource") {
|
|
15800
15816
|
throw new TypeError(`Expected CompleteRequestResourceTemplate, but got ${request.params.ref.type}`);
|
|
15801
15817
|
}
|
|
15818
|
+
void request;
|
|
15802
15819
|
}
|
|
15803
15820
|
function isTerminal(status) {
|
|
15804
15821
|
return status === "completed" || status === "failed" || status === "cancelled";
|
|
@@ -17306,9 +17323,9 @@ function reportSkillInvocation(opts) {
|
|
|
17306
17323
|
spanBuffer.push(span);
|
|
17307
17324
|
return span;
|
|
17308
17325
|
}
|
|
17309
|
-
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, 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;
|
|
17326
|
+
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;
|
|
17310
17327
|
var init_dist = __esm({
|
|
17311
|
-
async "
|
|
17328
|
+
async "../plugin/dist/index.js"() {
|
|
17312
17329
|
"use strict";
|
|
17313
17330
|
__create = Object.create;
|
|
17314
17331
|
__defProp2 = Object.defineProperty;
|
|
@@ -17423,7 +17440,7 @@ var init_dist = __esm({
|
|
|
17423
17440
|
}
|
|
17424
17441
|
}
|
|
17425
17442
|
_Module = Module;
|
|
17426
|
-
Module.ready = new Promise(function(
|
|
17443
|
+
Module.ready = new Promise(function(resolve3, reject) {
|
|
17427
17444
|
var Module2 = _Module;
|
|
17428
17445
|
Module2.onAbort = reject;
|
|
17429
17446
|
Module2.print = function(what) {
|
|
@@ -17435,7 +17452,7 @@ var init_dist = __esm({
|
|
|
17435
17452
|
Module2.onRuntimeInitialized = function() {
|
|
17436
17453
|
try {
|
|
17437
17454
|
Module2._crypto_secretbox_keybytes();
|
|
17438
|
-
|
|
17455
|
+
resolve3();
|
|
17439
17456
|
} catch (err2) {
|
|
17440
17457
|
reject(err2);
|
|
17441
17458
|
}
|
|
@@ -17546,7 +17563,7 @@ var init_dist = __esm({
|
|
|
17546
17563
|
}, Module: function(binary) {
|
|
17547
17564
|
}, Instance: function(module2, info) {
|
|
17548
17565
|
this.exports = // EMSCRIPTEN_START_ASM
|
|
17549
|
-
function instantiate(ea2) {
|
|
17566
|
+
(function instantiate(ea2) {
|
|
17550
17567
|
var a2;
|
|
17551
17568
|
var b2 = new Uint8Array(123);
|
|
17552
17569
|
for (var c2 = 25; c2 >= 0; --c2) {
|
|
@@ -57341,7 +57358,7 @@ var init_dist = __esm({
|
|
|
57341
57358
|
} } }), f: yi, g: ma2, h: Ba2, i: ma2, j: ka2, k: Le2, l: Je2, m: zg, n: yg, o: xg, p: wg, q: ka2, r: Ba2, s: ka2, t: ka2, u: Le2, v: ra2, w: vg, x: ug, y: tg, z: sg, A: Ba2, B: rg, C: qg, D: pg, E: ng, F: mg, G: lg, H: kg, I: jg, J: ka2, K: Ce2, L: Ba2, M: ma2, N: Ta2, O: ra2, P: ka2, Q: Oa2, R: Ba2, S: ma2, T: Ta2, U: ra2, V: ig, W: hg, X: gg, Y: fg, Z: ka2, _: Ma2, $: Ba2, aa: ma2, ba: Ta2, ca: ra2, da: ka2, ea: ka2, fa: Kg, ga: wd, ha: vd, ia: ra2, ja: ka2, ka: ka2, la: Cb, ma: ra2, na: Xa2, oa: eg, pa: qb, qa: dg, ra: cg, sa: ua2, ta: ka2, ua: Dc, va: ra2, wa: Va2, xa: ud, ya: Ya2, za: bg, Aa: ag, Ba: ka2, Ca: ka2, Da: Dc, Ea: ra2, Fa: ze2, Ga: ud, Ha: Ng, Ia: wd, Ja: vd, Ka: ka2, La: ka2, Ma: ka2, Na: ka2, Oa: Ma2, Pa: ka2, Qa: ma2, Ra: ma2, Sa: Ta2, Ta: dh2, Ua: ch, Va: bh, Wa: ah, Xa: Lb, Ya: Kb, Za: td, _a: sd, $a: rd, ab: $f, bb: _f, cb: Zf, db: qd, eb: Yf, fb: pd, gb: Xf, hb: Wf, ib: Uf, jb: Md, kb: tc, lb: nb, mb, nb: Lb, ob: Kb, pb: td, qb: sd, rb: ka2, sb: ka2, tb: ka2, ub: ka2, vb: Ma2, wb: ka2, xb: ma2, yb: ma2, zb: Ta2, Ab: Aa2, Bb: ka2, Cb: ma2, Db: ka2, Eb: ma2, Fb: Sa2, Gb: ka2, Hb: ma2, Ib: ka2, Jb: ma2, Kb: vb, Lb: ua2, Mb: ma2, Nb: ka2, Ob: ma2, Pb: ub, Qb: ua2, Rb: ma2, Sb: ka2, Tb: ma2, Ub: tb, Vb: ua2, Wb: ma2, Xb: ka2, Yb: ma2, Zb: ma2, _b: ua2, $b: ka2, ac: ma2, bc: ua2, cc: ka2, dc: Nd, ec: pe2, fc: od, gc: fh, hc: nd, ic: eh, jc: ra2, kc: ma2, lc: ua2, mc: ka2, nc: ma2, oc: ua2, pc: ka2, qc: ma2, rc: ma2, sc: pe2, tc: ra2, uc: od, vc: Tf, wc: Ja2, xc: xh, yc: nd, zc: Ia2, Ac: ua2, Bc: md, Cc: Lg, Dc: ka2, Ec: Ag, Fc: Ub, Gc: Sf, Hc: Ua2, Ic: Rf, Jc: ua2, Kc: Cb, Lc: Za2, Mc: ic, Nc: Ca2, Oc: md, Pc: ma2, Qc: ua2, Rc: Oa2, Sc: ka2, Tc: ld, Uc: Nd, Vc: ma2, Wc: ua2, Xc: Oa2, Yc: ka2, Zc: ld, _c: ra2, $c: Gh, ad: Fh, bd: Eh, cd: Dh, dd: ra2, ed: Ch, fd: ka2, gd: Ba2, hd: Bh, id: Cb, jd: ze2, kd: hi, ld: gi, md: fi, nd: ei, od: di, pd: ua2, qd: Ba2, rd: ci, sd: Dc, td: Gg, ud: nb, vd: Fg, wd: Eg, xd: ka2, yd: ka2, zd: ka2, Ad: ka2, Bd: Dg, Cd: Rc, Dd: ma2, Ed: ka2, Fd: kd, Gd: jd, Hd: Sg, Id: id, Jd: Rg, Kd: Qg, Ld: ra2, Md: kd, Nd: jd, Od: Ga2, Pd: id, Qd: Fa2, Rd: ma2, Sd: ka2, Td: Rc, Ud: ra2, Vd: Db, Wd: ma2, Xd: wa2, Yd: Ba2, Zd: wa2, _d: ma2, $d: yc, ae: wh, be: Vb, ce: wa2, de: xc, ee: wc, fe: vc, ge: me2, he: vh, ie: uh, je: Oa2, ke: th, le: Pf, me: Of, ne: Nf, oe: Mf, pe: Lf, qe: fb, re: ma2, se: wa2, te: Ba2, ue: wa2, ve: ma2, we: yc, xe: fe2, ye: Db, ze: wa2, Ae: xc, Be: wc, Ce: fb, De: ee2, Ee: Vb, Fe: de2, Ge: vc, He: uc, Ie: Kf, Je: hd, Ke: Jf, Le: Db, Me: fb, Ne: fb, Oe: ma2, Pe: wa2, Qe: Ba2, Re: wa2, Se: ma2, Te: yc, Ue: fe2, Ve: Db, We: wa2, Xe: xc, Ye: wc, Ze: fb, _e: ee2, $e: Vb, af: de2, bf: vc, cf: uc, df: Hf, ef: hd, ff: Gf, gf: Ff, hf: Ef, jf: sh, kf: Jg, lf: Ig, mf: Hg, nf: ka2, of: ka2, pf: Ea2, qf: wb, rf: ka2, sf: ka2, tf: ka2, uf: Ma2, vf: ka2, wf: ma2, xf: ma2, yf: Ta2, zf: Mg, Af: Lb, Bf: Kb, Cf: ra2, Df: rd, Ef: Df, Ff: qd, Gf: pd, Hf: Lb, If: Kb, Jf: ka2, Kf: Ma2, Lf: ka2, Mf: ma2, Nf: ma2, Of: Ta2, Pf: ra2, Qf: ra2, Rf: Mh, Sf: Lh, Tf: Kh, Uf: Cf, Vf: Bf, Wf: Jh, Xf: Ih, Yf: Ma2, Zf: ka2, _f: Hh, $f: Ba2, ag: Db, bg: fb, cg: Vb, dg: Oa2, eg: ma2, fg: Tg, gg: gd, hg: Je2, ig: Oa2, jg: ma2, kg: gd, lg: Cb, mg: ua2, ng: ka2, og: ka2, pg: ua2, qg: Wd, rg: lh, sg: kh, tg: jh, ug: fd, vg: ed, wg: dd, xg: cd, yg: ih, zg: ic, Ag: hh, Bg: gh, Cg: Cb, Dg: ua2, Eg: ka2, Fg: ka2, Gg: ua2, Hg: Wd, Ig: nh, Jg: mh, Kg: Vd, Lg: ic, Mg: Ud, Ng: Td, Og: Yd, Pg: Xd, Qg: ph, Rg: oh, Sg: cd, Tg: ed, Ug: dd, Vg: fd, Wg: ka2, Xg: Oa2, Yg: wa2, Zg: ka2, _g: Ce2, $g: wa2, ah: zf, bh: yf, ch: xf, dh: wf, eh: vf, fh: uf, gh: ra2, hh: ra2, ih: ka2, jh: Ma2, kh: wa2, lh: qh, mh: bd, nh: ad, oh: ra2, ph: ka2, qh: Oa2, rh: wa2, sh: tf, th: sf, uh: rf, vh: ra2, wh: bd, xh: qf, yh: ad, zh: ka2, Ah: Ma2, Bh: wa2, Ch: ra2, Dh: ma2, Eh: ka2, Fh: ua2, Gh: db, Hh: kb, Ih: xd, Jh: oi, Kh: ni, Lh: Ae2, Mh: mi, Nh: za2, Oh: li, Ph: ka2, Qh: ki, Rh: pf, Sh: Ah, Th: zh, Uh: yh, Vh: Bc, Wh: Ac, Xh: ti, Yh: ji, Zh: ii, _h: Cg, $h: Bg, ai: fb, bi: Ba2, ci: tc, di: nb, ei: rh, fi: $c, gi: of, hi: nf, ii: mf, ji: _c, ki: lf, li: Yc, mi: kf, ni: ka2, oi: ka2, pi: ka2, qi: ka2, ri: Ma2, si: ma2, ti: Ta2, ui: jf, vi: hf, wi: Md, xi: bi, yi: ai, zi: $h, Ai: _h, Bi: Zh, Ci: ye2, Di: xe2, Ei: we2, Fi: ve2, Gi: ue2, Hi: te2, Ii: se2, Ji: re2, Ki: ka2, Li: ua2, Mi: ka2, Ni: ua2, Oi: ka2, Pi: Yh, Qi: Xh, Ri: Wh, Si: Vh, Ti: Uh, Ui: Th, Vi: Sh, Wi: Rh, Xi: Qh, Yi: Ph, Zi: Oh, _i: re2, $i: Nh, aj: ka2, bj: ua2, cj: ua2, dj: ka2, ej: gf, fj: ma2, gj: wa2, hj: Ba2, ij: wa2, jj: ka2, kj: $g, lj: _g, mj: Zg, nj: wa2, oj: Ed, pj: wa2, qj: Yg, rj: Ed, sj: me2, tj: uc, uj: ff, vj: ef, wj: df, xj: cf, yj: Xg, zj: Wg, Aj: Vg, Bj: Ug, Cj: ka2, Dj: ka2, Ej: Pg, Fj: Og, Gj: ka2, Hj: ka2, Ij: $c, Jj: bf, Kj: _c, Lj: Yc, Mj: ka2, Nj: Ma2, Oj: ma2, Pj: Ta2, Qj: ma2, Rj: ma2, Sj: af, Tj: $e2, Uj: _e2, Vj: ka2, Wj: Oa2, Xj: wa2, Yj: ra2, Zj: Ze2, _j: Ye2, $j: ka2, ak: Oa2, bk: wa2, ck: ra2, dk: ka2, ek: Ma2, fk: wa2, gk: Xe2, hk: We2, ik: Ve2, jk: ra2, kk: Da2, lk: ta2 };
|
|
57342
57359
|
}
|
|
57343
57360
|
return da2(ea2);
|
|
57344
|
-
}(info);
|
|
57361
|
+
})(info);
|
|
57345
57362
|
}, instantiate: function(binary, info) {
|
|
57346
57363
|
return { then: function(ok) {
|
|
57347
57364
|
var module2 = new WebAssembly2.Module(binary);
|
|
@@ -59523,6 +59540,11 @@ var init_dist = __esm({
|
|
|
59523
59540
|
return { header: header2, headerSignature, ciphertext, nonce };
|
|
59524
59541
|
}
|
|
59525
59542
|
decrypt(message) {
|
|
59543
|
+
if (this.state.peerIdentityPublicKey) {
|
|
59544
|
+
if (!verifyHeaderSignature(message.header, message.headerSignature, this.state.peerIdentityPublicKey)) {
|
|
59545
|
+
throw new Error("Header signature verification failed");
|
|
59546
|
+
}
|
|
59547
|
+
}
|
|
59526
59548
|
const isV2 = message.envelopeVersion === "2.0.0" && message.encryptedHeader != null && message.headerNonce != null;
|
|
59527
59549
|
const skippedResult = this.trySkippedKeys(message, isV2);
|
|
59528
59550
|
if (skippedResult !== null) {
|
|
@@ -59536,14 +59558,14 @@ var init_dist = __esm({
|
|
|
59536
59558
|
if (message.header.messageNumber === 0) {
|
|
59537
59559
|
try {
|
|
59538
59560
|
const { messageKey: testKey, headerKey: testHeaderKey, nextChainKey: nextChainKey2 } = kdfChainKey(this.state.rootKey);
|
|
59539
|
-
let
|
|
59561
|
+
let ad;
|
|
59540
59562
|
if (isV2) {
|
|
59541
59563
|
libsodium_wrappers_default.crypto_aead_xchacha20poly1305_ietf_decrypt(null, message.encryptedHeader, null, message.headerNonce, testHeaderKey);
|
|
59542
|
-
|
|
59564
|
+
ad = message.encryptedHeader;
|
|
59543
59565
|
} else {
|
|
59544
|
-
|
|
59566
|
+
ad = serializeHeader(message.header);
|
|
59545
59567
|
}
|
|
59546
|
-
const ptBytes = libsodium_wrappers_default.crypto_aead_xchacha20poly1305_ietf_decrypt(null, message.ciphertext,
|
|
59568
|
+
const ptBytes = libsodium_wrappers_default.crypto_aead_xchacha20poly1305_ietf_decrypt(null, message.ciphertext, ad, message.nonce, testKey);
|
|
59547
59569
|
this.state.dhReceivingPublicKey = message.header.dhPublicKey;
|
|
59548
59570
|
this.state.receivingChain = {
|
|
59549
59571
|
chainKey: nextChainKey2,
|
|
@@ -59563,13 +59585,7 @@ var init_dist = __esm({
|
|
|
59563
59585
|
this.skipMessages(this.state.receivingChain, message.header.messageNumber, message.header.dhPublicKey, isV2);
|
|
59564
59586
|
const chain = this.state.receivingChain;
|
|
59565
59587
|
const { nextChainKey, messageKey, headerKey } = kdfChainKey(chain.chainKey);
|
|
59566
|
-
|
|
59567
|
-
chain.messageNumber++;
|
|
59568
|
-
if (this.state.peerIdentityPublicKey) {
|
|
59569
|
-
if (!verifyHeaderSignature(message.header, message.headerSignature, this.state.peerIdentityPublicKey)) {
|
|
59570
|
-
throw new Error("Header signature verification failed");
|
|
59571
|
-
}
|
|
59572
|
-
}
|
|
59588
|
+
let plaintextBytes;
|
|
59573
59589
|
if (isV2) {
|
|
59574
59590
|
try {
|
|
59575
59591
|
libsodium_wrappers_default.crypto_aead_xchacha20poly1305_ietf_decrypt(null, message.encryptedHeader, null, message.headerNonce, headerKey);
|
|
@@ -59577,19 +59593,21 @@ var init_dist = __esm({
|
|
|
59577
59593
|
throw new Error("V2 header decryption failed");
|
|
59578
59594
|
}
|
|
59579
59595
|
try {
|
|
59580
|
-
|
|
59581
|
-
return libsodium_wrappers_default.to_string(plaintextBytes);
|
|
59596
|
+
plaintextBytes = libsodium_wrappers_default.crypto_aead_xchacha20poly1305_ietf_decrypt(null, message.ciphertext, message.encryptedHeader, message.nonce, messageKey);
|
|
59582
59597
|
} catch {
|
|
59583
59598
|
throw new Error("V2 decryption failed: ciphertext tampered or wrong key");
|
|
59584
59599
|
}
|
|
59600
|
+
} else {
|
|
59601
|
+
const ad = serializeHeader(message.header);
|
|
59602
|
+
try {
|
|
59603
|
+
plaintextBytes = libsodium_wrappers_default.crypto_aead_xchacha20poly1305_ietf_decrypt(null, message.ciphertext, ad, message.nonce, messageKey);
|
|
59604
|
+
} catch {
|
|
59605
|
+
throw new Error("Decryption failed: ciphertext tampered or wrong key");
|
|
59606
|
+
}
|
|
59585
59607
|
}
|
|
59586
|
-
|
|
59587
|
-
|
|
59588
|
-
|
|
59589
|
-
return libsodium_wrappers_default.to_string(plaintextBytes);
|
|
59590
|
-
} catch {
|
|
59591
|
-
throw new Error("Decryption failed: ciphertext tampered or wrong key");
|
|
59592
|
-
}
|
|
59608
|
+
chain.chainKey = nextChainKey;
|
|
59609
|
+
chain.messageNumber++;
|
|
59610
|
+
return libsodium_wrappers_default.to_string(plaintextBytes);
|
|
59593
59611
|
}
|
|
59594
59612
|
dhRatchetReceive(theirDhPublic) {
|
|
59595
59613
|
this.state.previousSendingChainLength = this.state.sendingChain?.messageNumber ?? 0;
|
|
@@ -63990,8 +64008,8 @@ var init_dist = __esm({
|
|
|
63990
64008
|
}
|
|
63991
64009
|
async lock() {
|
|
63992
64010
|
let releaseLock;
|
|
63993
|
-
const nextLock = new Promise((
|
|
63994
|
-
releaseLock =
|
|
64011
|
+
const nextLock = new Promise((resolve3) => {
|
|
64012
|
+
releaseLock = resolve3;
|
|
63995
64013
|
});
|
|
63996
64014
|
const previousLock = __classPrivateFieldGet(this, _Mutex_locked, "f");
|
|
63997
64015
|
__classPrivateFieldSet(this, _Mutex_locked, nextLock, "f");
|
|
@@ -68621,6 +68639,11 @@ var init_dist = __esm({
|
|
|
68621
68639
|
"use strict";
|
|
68622
68640
|
}
|
|
68623
68641
|
});
|
|
68642
|
+
init_mls_presend_epoch = __esm2({
|
|
68643
|
+
"../crypto/dist/mls-presend-epoch.js"() {
|
|
68644
|
+
"use strict";
|
|
68645
|
+
}
|
|
68646
|
+
});
|
|
68624
68647
|
dist_exports2 = {};
|
|
68625
68648
|
__export2(dist_exports2, {
|
|
68626
68649
|
AV_CREDENTIAL_CONTEXT: () => AV_CREDENTIAL_CONTEXT,
|
|
@@ -68690,7 +68713,9 @@ var init_dist = __esm({
|
|
|
68690
68713
|
hexTransportToEncryptedMessage: () => hexTransportToEncryptedMessage,
|
|
68691
68714
|
issueCredential: () => issueCredential,
|
|
68692
68715
|
multibaseToPublicKey: () => multibaseToPublicKey,
|
|
68716
|
+
needsPreSendResync: () => needsPreSendResync,
|
|
68693
68717
|
normalizeBackupCode: () => normalizeBackupCode,
|
|
68718
|
+
noteObservedEpoch: () => noteObservedEpoch,
|
|
68694
68719
|
orderDeliveryBatch: () => orderDeliveryBatch,
|
|
68695
68720
|
parseTraceparent: () => parseTraceparent,
|
|
68696
68721
|
performX3DH: () => performX3DH,
|
|
@@ -68730,6 +68755,7 @@ var init_dist = __esm({
|
|
|
68730
68755
|
init_mls_group();
|
|
68731
68756
|
await init_owner_sync();
|
|
68732
68757
|
init_mls_delivery_order();
|
|
68758
|
+
init_mls_presend_epoch();
|
|
68733
68759
|
}
|
|
68734
68760
|
});
|
|
68735
68761
|
init_secure_file = __esm2({
|
|
@@ -69004,6 +69030,7 @@ var init_dist = __esm({
|
|
|
69004
69030
|
await init_libsodium_wrappers();
|
|
69005
69031
|
await init_dist2();
|
|
69006
69032
|
await init_dist2();
|
|
69033
|
+
init_mls_presend_epoch();
|
|
69007
69034
|
init_mls_state();
|
|
69008
69035
|
await init_mls_kp_pool();
|
|
69009
69036
|
init_client_version();
|
|
@@ -69117,6 +69144,17 @@ var init_dist = __esm({
|
|
|
69117
69144
|
* self-heal rather than be logged and dropped. */
|
|
69118
69145
|
_mlsCommitFailCounts = /* @__PURE__ */ new Map();
|
|
69119
69146
|
static MAX_MLS_DECRYPT_FAILS = 3;
|
|
69147
|
+
/**
|
|
69148
|
+
* #1084: consecutive resyncs that found NOTHING to apply, per group.
|
|
69149
|
+
*
|
|
69150
|
+
* "No new commits" means the server holds no commit past our epoch — we are
|
|
69151
|
+
* NOT BEHIND. Treating that as corruption and re-keying is what drove the
|
|
69152
|
+
* epoch churn (see `_resyncOnDivergence`). But a state that is genuinely
|
|
69153
|
+
* broken while its epoch counter happens to match must still recover, so the
|
|
69154
|
+
* suppression is bounded rather than absolute.
|
|
69155
|
+
*/
|
|
69156
|
+
_resyncNoOpStrikes = /* @__PURE__ */ new Map();
|
|
69157
|
+
static MAX_RESYNC_NOOPS = 3;
|
|
69120
69158
|
/** Cached MLS KeyPackage bundle for this device (regenerated on each connect). */
|
|
69121
69159
|
_mlsKeyPackage = null;
|
|
69122
69160
|
/** Pending KeyPackage bundle from request-Welcome flow (used by _handleMlsWelcome). */
|
|
@@ -69154,6 +69192,13 @@ var init_dist = __esm({
|
|
|
69154
69192
|
_kpPoolFilling = false;
|
|
69155
69193
|
/** Buffer for MLS commits received before Welcome (keyed by groupId, sorted by epoch). */
|
|
69156
69194
|
_pendingMlsCommits = /* @__PURE__ */ new Map();
|
|
69195
|
+
/**
|
|
69196
|
+
* #1013: the highest group epoch any inbound frame has reported, per MLS
|
|
69197
|
+
* group id. Every inbound frame carries the epoch the group was at when it
|
|
69198
|
+
* was produced, so each is a LOWER BOUND on the group's current epoch — the
|
|
69199
|
+
* hint is monotonic and only ever rises.
|
|
69200
|
+
*/
|
|
69201
|
+
_observedGroupEpochs = /* @__PURE__ */ new Map();
|
|
69157
69202
|
/** In-memory credential store for renter-provided credentials (never persisted). */
|
|
69158
69203
|
_credentialStore = new CredentialStore();
|
|
69159
69204
|
/** Rooms whose roster has been refreshed from the backend at least once in
|
|
@@ -69869,7 +69914,13 @@ var init_dist = __esm({
|
|
|
69869
69914
|
}
|
|
69870
69915
|
try {
|
|
69871
69916
|
const plaintextBytes = new TextEncoder().encode(plaintext);
|
|
69872
|
-
const cipherBytes = await
|
|
69917
|
+
const cipherBytes = await this._encryptWithCatchUp(
|
|
69918
|
+
mlsGroup,
|
|
69919
|
+
`1to1-group:${gid}`,
|
|
69920
|
+
entry.mlsGroupId,
|
|
69921
|
+
`1:1 group ${gid.slice(0, 8)}`,
|
|
69922
|
+
plaintextBytes
|
|
69923
|
+
);
|
|
69873
69924
|
await saveMlsState(this.config.dataDir, entry.mlsGroupId, JSON.stringify(mlsGroup.exportState()));
|
|
69874
69925
|
const payload = {
|
|
69875
69926
|
group_id: entry.mlsGroupId,
|
|
@@ -69916,7 +69967,14 @@ var init_dist = __esm({
|
|
|
69916
69967
|
}
|
|
69917
69968
|
if (mlsGroup?.isInitialized && mlsGroupId && Number(mlsGroup.epoch) > 0 && this._state === "ready" && this._ws) {
|
|
69918
69969
|
const plaintextBytes = new TextEncoder().encode(plaintext);
|
|
69919
|
-
const
|
|
69970
|
+
const sessionGroupKey = convGroupId && this._mlsGroups.has(`1to1-group:${convGroupId}`) ? `1to1-group:${convGroupId}` : `conv:${convId}`;
|
|
69971
|
+
const cipherBytes = await this._encryptWithCatchUp(
|
|
69972
|
+
mlsGroup,
|
|
69973
|
+
sessionGroupKey,
|
|
69974
|
+
mlsGroupId,
|
|
69975
|
+
`conversation ${convId.slice(0, 8)}`,
|
|
69976
|
+
plaintextBytes
|
|
69977
|
+
);
|
|
69920
69978
|
await saveMlsState(this.config.dataDir, mlsGroupId, JSON.stringify(mlsGroup.exportState()));
|
|
69921
69979
|
const payload = {
|
|
69922
69980
|
conversation_id: convId,
|
|
@@ -70011,7 +70069,14 @@ var init_dist = __esm({
|
|
|
70011
70069
|
}
|
|
70012
70070
|
try {
|
|
70013
70071
|
const plaintextBytes = new TextEncoder().encode(plaintext);
|
|
70014
|
-
const
|
|
70072
|
+
const mlsOnlyGroupKey = mlsOnlyConvGroupId && this._mlsGroups.has(`1to1-group:${mlsOnlyConvGroupId}`) ? `1to1-group:${mlsOnlyConvGroupId}` : `conv:${mlsConvId}`;
|
|
70073
|
+
const cipherBytes = await this._encryptWithCatchUp(
|
|
70074
|
+
mlsGroup,
|
|
70075
|
+
mlsOnlyGroupKey,
|
|
70076
|
+
resolvedMlsGroupId,
|
|
70077
|
+
`conversation ${mlsConvId.slice(0, 8)}`,
|
|
70078
|
+
plaintextBytes
|
|
70079
|
+
);
|
|
70015
70080
|
await saveMlsState(this.config.dataDir, resolvedMlsGroupId, JSON.stringify(mlsGroup.exportState()));
|
|
70016
70081
|
const payload = {
|
|
70017
70082
|
conversation_id: mlsConvId,
|
|
@@ -70106,7 +70171,7 @@ var init_dist = __esm({
|
|
|
70106
70171
|
*/
|
|
70107
70172
|
sendActivitySpan(spanData) {
|
|
70108
70173
|
if (!this._ws || this._ws.readyState !== WebSocket.OPEN) return;
|
|
70109
|
-
const pluginVersion = true ? "0.23.
|
|
70174
|
+
const pluginVersion = true ? "0.23.27" : "0.0.0-dev";
|
|
70110
70175
|
const agentName = this.config.agentName ?? "Agent";
|
|
70111
70176
|
const resource = {
|
|
70112
70177
|
"service.name": "agentvault-agent",
|
|
@@ -70191,7 +70256,7 @@ var init_dist = __esm({
|
|
|
70191
70256
|
* Optional timeout rejects with an Error.
|
|
70192
70257
|
*/
|
|
70193
70258
|
waitForDecision(decisionId, timeoutMs) {
|
|
70194
|
-
return new Promise((
|
|
70259
|
+
return new Promise((resolve3, reject) => {
|
|
70195
70260
|
let timer = null;
|
|
70196
70261
|
const handler = (plaintext, metadata) => {
|
|
70197
70262
|
if (metadata.messageType !== "decision_response") return;
|
|
@@ -70200,7 +70265,7 @@ var init_dist = __esm({
|
|
|
70200
70265
|
if (parsed.decision?.decision_id === decisionId) {
|
|
70201
70266
|
if (timer) clearTimeout(timer);
|
|
70202
70267
|
this.removeListener("message", handler);
|
|
70203
|
-
|
|
70268
|
+
resolve3({
|
|
70204
70269
|
decision_id: parsed.decision.decision_id,
|
|
70205
70270
|
selected_option_id: parsed.decision.selected_option_id,
|
|
70206
70271
|
resolved_at: parsed.decision.resolved_at,
|
|
@@ -70316,7 +70381,13 @@ var init_dist = __esm({
|
|
|
70316
70381
|
if (mlsGroup?.isInitialized) {
|
|
70317
70382
|
try {
|
|
70318
70383
|
const plaintextBytes = new TextEncoder().encode(plaintext);
|
|
70319
|
-
const ciphertext = await
|
|
70384
|
+
const ciphertext = await this._encryptWithCatchUp(
|
|
70385
|
+
mlsGroup,
|
|
70386
|
+
roomId,
|
|
70387
|
+
room.mlsGroupId,
|
|
70388
|
+
`room ${roomId.slice(0, 8)}`,
|
|
70389
|
+
plaintextBytes
|
|
70390
|
+
);
|
|
70320
70391
|
await saveMlsState(this.config.dataDir, room.mlsGroupId, JSON.stringify(mlsGroup.exportState()));
|
|
70321
70392
|
if (this._state === "ready" && this._ws) {
|
|
70322
70393
|
this._ws.send(JSON.stringify({
|
|
@@ -71501,7 +71572,13 @@ var init_dist = __esm({
|
|
|
71501
71572
|
const mlsGroup = this._mlsGroups.get(`a2a:${channelEntry.channelId}`);
|
|
71502
71573
|
if (mlsGroup?.isInitialized) {
|
|
71503
71574
|
const plaintextBytes = new TextEncoder().encode(text);
|
|
71504
|
-
const ciphertext = await
|
|
71575
|
+
const ciphertext = await this._encryptWithCatchUp(
|
|
71576
|
+
mlsGroup,
|
|
71577
|
+
`a2a:${channelEntry.channelId}`,
|
|
71578
|
+
channelEntry.mlsGroupId,
|
|
71579
|
+
`A2A ${channelEntry.channelId.slice(0, 8)}`,
|
|
71580
|
+
plaintextBytes
|
|
71581
|
+
);
|
|
71505
71582
|
await saveMlsState(
|
|
71506
71583
|
this.config.dataDir,
|
|
71507
71584
|
channelEntry.mlsGroupId,
|
|
@@ -71549,7 +71626,13 @@ var init_dist = __esm({
|
|
|
71549
71626
|
const mlsGroup = this._mlsGroups.get(`a2a:${channelId}`);
|
|
71550
71627
|
if (mlsGroup?.isInitialized) {
|
|
71551
71628
|
const plaintextBytes = new TextEncoder().encode(text);
|
|
71552
|
-
const ciphertext = await
|
|
71629
|
+
const ciphertext = await this._encryptWithCatchUp(
|
|
71630
|
+
mlsGroup,
|
|
71631
|
+
`a2a:${channelId}`,
|
|
71632
|
+
entry.mlsGroupId,
|
|
71633
|
+
`A2A ${channelId.slice(0, 8)}`,
|
|
71634
|
+
plaintextBytes
|
|
71635
|
+
);
|
|
71553
71636
|
await saveMlsState(this.config.dataDir, entry.mlsGroupId, JSON.stringify(mlsGroup.exportState()));
|
|
71554
71637
|
this._ws.send(JSON.stringify({
|
|
71555
71638
|
event: "a2a_message_mls",
|
|
@@ -72025,7 +72108,7 @@ var init_dist = __esm({
|
|
|
72025
72108
|
agentVersion: this.config.agentVersion ?? "0.0.0",
|
|
72026
72109
|
// __AV_VERSION__ is injected by esbuild from package.json at build time.
|
|
72027
72110
|
// Falls back to "0.0.0-dev" in non-bundled contexts (tests).
|
|
72028
|
-
pluginVersion: true ? "0.23.
|
|
72111
|
+
pluginVersion: true ? "0.23.27" : "0.0.0-dev"
|
|
72029
72112
|
});
|
|
72030
72113
|
this._telemetryReporter.startAutoFlush(3e4);
|
|
72031
72114
|
}
|
|
@@ -72349,7 +72432,7 @@ var init_dist = __esm({
|
|
|
72349
72432
|
agentVersion: this.config.agentVersion ?? "0.0.0",
|
|
72350
72433
|
// __AV_VERSION__ is injected by esbuild from package.json at build time.
|
|
72351
72434
|
// Falls back to "0.0.0-dev" in non-bundled contexts (tests).
|
|
72352
|
-
pluginVersion: true ? "0.23.
|
|
72435
|
+
pluginVersion: true ? "0.23.27" : "0.0.0-dev"
|
|
72353
72436
|
});
|
|
72354
72437
|
this._telemetryReporter.startAutoFlush(3e4);
|
|
72355
72438
|
}
|
|
@@ -72715,6 +72798,7 @@ var init_dist = __esm({
|
|
|
72715
72798
|
const convGroupId = data.conversation_group_id;
|
|
72716
72799
|
const groupId = data.group_id;
|
|
72717
72800
|
const senderDeviceId = data.sender_device_id;
|
|
72801
|
+
this._noteGroupEpoch(groupId, data.epoch);
|
|
72718
72802
|
if (senderDeviceId === this._deviceId) return;
|
|
72719
72803
|
let mgr;
|
|
72720
72804
|
let mgrKey;
|
|
@@ -72792,9 +72876,15 @@ var init_dist = __esm({
|
|
|
72792
72876
|
})),
|
|
72793
72877
|
no_history: filtered.length === 0
|
|
72794
72878
|
});
|
|
72795
|
-
if (mgr && mlsGroupId) {
|
|
72879
|
+
if (mgr && mgrKey && mlsGroupId) {
|
|
72796
72880
|
const responseBytes = new TextEncoder().encode(responsePayload);
|
|
72797
|
-
const cipher = await
|
|
72881
|
+
const cipher = await this._encryptWithCatchUp(
|
|
72882
|
+
mgr,
|
|
72883
|
+
mgrKey,
|
|
72884
|
+
mlsGroupId,
|
|
72885
|
+
`history catch-up ${mlsGroupId.slice(0, 8)}`,
|
|
72886
|
+
responseBytes
|
|
72887
|
+
);
|
|
72798
72888
|
await saveMlsState(this.config.dataDir, mlsGroupId, JSON.stringify(mgr.exportState()));
|
|
72799
72889
|
if (this._ws) {
|
|
72800
72890
|
this._ws.send(JSON.stringify({
|
|
@@ -73537,9 +73627,36 @@ ${messageText}`;
|
|
|
73537
73627
|
// ---------------------------------------------------------------------------
|
|
73538
73628
|
// MLS room message handlers
|
|
73539
73629
|
// ---------------------------------------------------------------------------
|
|
73630
|
+
/**
|
|
73631
|
+
* #1014: hand a room-framed frame to the handler that owns its group family.
|
|
73632
|
+
*
|
|
73633
|
+
* Returns true when the frame was routed. Routing means "give it to the right
|
|
73634
|
+
* handler" — NOT "decrypt it as a room message". Decrypting under the wrong
|
|
73635
|
+
* group is how MLS state gets corrupted, so an unplaceable group is left for
|
|
73636
|
+
* the caller to self-heal rather than guessed at.
|
|
73637
|
+
*/
|
|
73638
|
+
async _routeNonRoomGroupMessage(data, groupId) {
|
|
73639
|
+
const target = this._resolveGroupFamily(groupId);
|
|
73640
|
+
if (!target || target.family === "room") return false;
|
|
73641
|
+
console.log(
|
|
73642
|
+
`[SecureChannel] Room-framed message belongs to ${target.label} \u2014 routing to the handler that owns it (#1014)`
|
|
73643
|
+
);
|
|
73644
|
+
switch (target.family) {
|
|
73645
|
+
case "shared1to1":
|
|
73646
|
+
await this._handleMessageMLS({ ...data, conversation_group_id: target.id });
|
|
73647
|
+
return true;
|
|
73648
|
+
case "conversation":
|
|
73649
|
+
await this._handleMessageMLS({ ...data, conversation_id: target.id });
|
|
73650
|
+
return true;
|
|
73651
|
+
case "a2a":
|
|
73652
|
+
await this._handleA2AMessageMLS({ ...data, a2a_channel_id: target.id });
|
|
73653
|
+
return true;
|
|
73654
|
+
}
|
|
73655
|
+
}
|
|
73540
73656
|
async _handleRoomMessageMLS(data) {
|
|
73541
73657
|
const groupId = data.group_id;
|
|
73542
73658
|
const senderDeviceId = data.sender_device_id;
|
|
73659
|
+
this._noteGroupEpoch(groupId, data.epoch);
|
|
73543
73660
|
if (senderDeviceId === this._deviceId) return;
|
|
73544
73661
|
let roomId;
|
|
73545
73662
|
for (const [rid, room] of Object.entries(this._persisted?.rooms ?? {})) {
|
|
@@ -73553,7 +73670,9 @@ ${messageText}`;
|
|
|
73553
73670
|
roomId = data.room_id;
|
|
73554
73671
|
console.log(`[SecureChannel] Room ${roomId.slice(0, 8)} matched by room_id (group_id ${groupId?.slice(0, 8)} mismatch)`);
|
|
73555
73672
|
} else {
|
|
73673
|
+
if (await this._routeNonRoomGroupMessage(data, groupId)) return;
|
|
73556
73674
|
console.warn(`[SecureChannel] No room found for MLS group ${groupId?.slice(0, 8)}`);
|
|
73675
|
+
if (groupId) void this._requestWelcomeSelfHeal(groupId);
|
|
73557
73676
|
return;
|
|
73558
73677
|
}
|
|
73559
73678
|
}
|
|
@@ -73741,63 +73860,63 @@ ${messageText}`;
|
|
|
73741
73860
|
console.warn(`[SecureChannel] Failed to send history catchup response:`, sendErr);
|
|
73742
73861
|
}
|
|
73743
73862
|
}
|
|
73863
|
+
/**
|
|
73864
|
+
* Apply an inbound MLS commit to whichever group it addresses.
|
|
73865
|
+
*
|
|
73866
|
+
* Returns TRUE when the commit was applied, buffered, or handed to the
|
|
73867
|
+
* failure ladder — i.e. when this agent has taken responsibility for it and
|
|
73868
|
+
* the delivery-queue row may safely be acked. Returns FALSE when the commit
|
|
73869
|
+
* names a group we hold no state for at all, so the caller must NACK and let
|
|
73870
|
+
* the row survive.
|
|
73871
|
+
*
|
|
73872
|
+
* #1012: this used to loop `rooms` then `a2aChannels` and then END. A shared
|
|
73873
|
+
* 1:1 commit (`mlsGroups`) and a legacy per-conversation commit
|
|
73874
|
+
* (`mlsConversations`) matched neither. The call fell off the bottom with no
|
|
73875
|
+
* log, no buffer and no error — and because it did not THROW,
|
|
73876
|
+
* `_pullDeliveryQueue` acked the row and the server deleted it. An MLS commit
|
|
73877
|
+
* cannot be regenerated, so the agent stayed at epoch N while the group moved
|
|
73878
|
+
* to N+1 and every later send() encrypted at an epoch nobody could decrypt.
|
|
73879
|
+
*
|
|
73880
|
+
* The families are enumerated in ONE list resolved by ONE loop, because two
|
|
73881
|
+
* hand-copied loops are exactly how the 1:1 path fell two families behind.
|
|
73882
|
+
*/
|
|
73744
73883
|
async _handleMlsCommit(data) {
|
|
73745
73884
|
const groupId = data.group_id;
|
|
73746
73885
|
const epoch = typeof data.epoch === "number" ? data.epoch : 0;
|
|
73747
|
-
|
|
73748
|
-
|
|
73749
|
-
|
|
73750
|
-
|
|
73751
|
-
|
|
73752
|
-
|
|
73753
|
-
|
|
73754
|
-
|
|
73755
|
-
|
|
73756
|
-
this._mlsCommitFailCounts.delete(roomId);
|
|
73757
|
-
} catch (err) {
|
|
73758
|
-
await this._onCommitFailure(
|
|
73759
|
-
roomId,
|
|
73760
|
-
groupId,
|
|
73761
|
-
err,
|
|
73762
|
-
`room ${roomId.slice(0, 8)}`,
|
|
73763
|
-
data.epoch,
|
|
73764
|
-
mlsGroup.epoch
|
|
73765
|
-
);
|
|
73766
|
-
}
|
|
73767
|
-
} else {
|
|
73768
|
-
this._bufferMlsCommit(groupId, epoch, data);
|
|
73769
|
-
console.log(`[SecureChannel] Buffered MLS commit for room ${roomId.slice(0, 8)} (epoch=${epoch}, group not initialized)`);
|
|
73770
|
-
}
|
|
73771
|
-
return;
|
|
73886
|
+
this._noteGroupEpoch(groupId, data.epoch);
|
|
73887
|
+
const target = this._resolveGroupFamily(groupId);
|
|
73888
|
+
if (target) {
|
|
73889
|
+
const { managerKey: groupKey, label } = target;
|
|
73890
|
+
const mlsGroup = this._mlsGroups.get(groupKey);
|
|
73891
|
+
if (!mlsGroup?.isInitialized) {
|
|
73892
|
+
this._bufferMlsCommit(groupId, epoch, data);
|
|
73893
|
+
console.log(`[SecureChannel] Buffered MLS commit for ${label} (epoch=${epoch}, group not initialized)`);
|
|
73894
|
+
return true;
|
|
73772
73895
|
}
|
|
73773
|
-
|
|
73774
|
-
|
|
73775
|
-
|
|
73776
|
-
|
|
73777
|
-
|
|
73778
|
-
|
|
73779
|
-
|
|
73780
|
-
|
|
73781
|
-
|
|
73782
|
-
|
|
73783
|
-
|
|
73784
|
-
|
|
73785
|
-
|
|
73786
|
-
|
|
73787
|
-
|
|
73788
|
-
err,
|
|
73789
|
-
`A2A ${chId.slice(0, 8)}`,
|
|
73790
|
-
data.epoch,
|
|
73791
|
-
mlsGroup.epoch
|
|
73792
|
-
);
|
|
73793
|
-
}
|
|
73794
|
-
} else {
|
|
73795
|
-
this._bufferMlsCommit(groupId, epoch, data);
|
|
73796
|
-
console.log(`[SecureChannel] Buffered MLS commit for A2A ${chId.slice(0, 8)} (epoch=${epoch}, group not initialized)`);
|
|
73797
|
-
}
|
|
73798
|
-
return;
|
|
73896
|
+
try {
|
|
73897
|
+
const commitBytes = new Uint8Array(Buffer.from(data.payload, "hex"));
|
|
73898
|
+
await mlsGroup.processCommit(commitBytes);
|
|
73899
|
+
await saveMlsState(this.config.dataDir, groupId, JSON.stringify(mlsGroup.exportState()));
|
|
73900
|
+
console.log(`[SecureChannel] MLS commit processed for ${label} (epoch=${mlsGroup.epoch})`);
|
|
73901
|
+
this._mlsCommitFailCounts.delete(groupKey);
|
|
73902
|
+
} catch (err) {
|
|
73903
|
+
await this._onCommitFailure(
|
|
73904
|
+
groupKey,
|
|
73905
|
+
groupId,
|
|
73906
|
+
err,
|
|
73907
|
+
label,
|
|
73908
|
+
data.epoch,
|
|
73909
|
+
mlsGroup.epoch
|
|
73910
|
+
);
|
|
73799
73911
|
}
|
|
73912
|
+
return true;
|
|
73800
73913
|
}
|
|
73914
|
+
this._bufferMlsCommit(groupId, epoch, data);
|
|
73915
|
+
console.warn(
|
|
73916
|
+
`[SecureChannel] MLS commit for UNKNOWN group ${String(groupId).slice(0, 8)} (epoch=${epoch}) \u2014 buffered, requesting a Welcome, NOT acked`
|
|
73917
|
+
);
|
|
73918
|
+
if (groupId) void this._requestWelcomeSelfHeal(groupId);
|
|
73919
|
+
return false;
|
|
73801
73920
|
}
|
|
73802
73921
|
/** Buffer an MLS commit for replay after Welcome join. Max 50 per group. */
|
|
73803
73922
|
_bufferMlsCommit(groupId, epoch, data) {
|
|
@@ -73987,6 +74106,229 @@ ${messageText}`;
|
|
|
73987
74106
|
* `1to1-group:<gid>`, `a2a:<channelId>`, …) — also the decrypt-fail-count key.
|
|
73988
74107
|
* @param groupId the server-side MLS group id used in the /sync URL.
|
|
73989
74108
|
*/
|
|
74109
|
+
/**
|
|
74110
|
+
* #1015 — the ONLY place this package fulfils a Welcome request.
|
|
74111
|
+
*
|
|
74112
|
+
* Add the members, transmit, and record `fulfilled` **only for the targets
|
|
74113
|
+
* whose frames actually went out**. Every one of the five sites that used to
|
|
74114
|
+
* do this by hand followed the same sequence and had the same three holes:
|
|
74115
|
+
* `this._ws` null (both sends skipped by an `if`), a CLOSING socket (`send`
|
|
74116
|
+
* returns without throwing), and a fulfil POST wrapped in `.catch(() => {})`.
|
|
74117
|
+
*
|
|
74118
|
+
* A fulfilled request is never re-requested. So a Welcome that evaporated
|
|
74119
|
+
* left the requester locked out, the fulfiller at epoch N+1, everyone else at
|
|
74120
|
+
* N, and the bridging commit untransmitted and impossible to regenerate — a
|
|
74121
|
+
* permanently wedged group in which every signal read success.
|
|
74122
|
+
*
|
|
74123
|
+
* Returns the number of requests actually fulfilled.
|
|
74124
|
+
*/
|
|
74125
|
+
async _fulfilWelcomeRequests(opts) {
|
|
74126
|
+
const { mlsGroup, mlsGroupId, label, welcomeFields, targets } = opts;
|
|
74127
|
+
if (targets.length === 0) return 0;
|
|
74128
|
+
if (!this._wsIsOpen()) {
|
|
74129
|
+
console.warn(
|
|
74130
|
+
`[SecureChannel] ${label}: socket is not OPEN \u2014 NOT advancing the group; ${targets.length} request(s) stay pending for the next pull`
|
|
74131
|
+
);
|
|
74132
|
+
return 0;
|
|
74133
|
+
}
|
|
74134
|
+
const snapshot = mlsGroup.exportState();
|
|
74135
|
+
const { commit, welcome } = await mlsGroup.addMembers(targets.map((t2) => t2.keyPackage));
|
|
74136
|
+
const commitSent = await this._sendFrameConfirmed(
|
|
74137
|
+
{
|
|
74138
|
+
event: "mls_commit",
|
|
74139
|
+
data: {
|
|
74140
|
+
group_id: mlsGroupId,
|
|
74141
|
+
epoch: Number(mlsGroup.epoch),
|
|
74142
|
+
payload: Buffer.from(commit).toString("hex")
|
|
74143
|
+
}
|
|
74144
|
+
},
|
|
74145
|
+
`${label} commit`
|
|
74146
|
+
);
|
|
74147
|
+
if (!commitSent) {
|
|
74148
|
+
mlsGroup.importState(snapshot);
|
|
74149
|
+
console.warn(
|
|
74150
|
+
`[SecureChannel] ${label}: commit was NOT written \u2014 rolled back to epoch ${Number(mlsGroup.epoch)}, nothing fulfilled, requests stay pending`
|
|
74151
|
+
);
|
|
74152
|
+
return 0;
|
|
74153
|
+
}
|
|
74154
|
+
await saveMlsState(this.config.dataDir, mlsGroupId, JSON.stringify(mlsGroup.exportState()));
|
|
74155
|
+
if (!welcome) {
|
|
74156
|
+
console.warn(
|
|
74157
|
+
`[SecureChannel] ${label}: addMembers produced NO Welcome \u2014 ${targets.length} request(s) left pending rather than marked fulfilled`
|
|
74158
|
+
);
|
|
74159
|
+
return 0;
|
|
74160
|
+
}
|
|
74161
|
+
let fulfilled = 0;
|
|
74162
|
+
for (const t2 of targets) {
|
|
74163
|
+
const sent = await this._sendFrameConfirmed(
|
|
74164
|
+
{
|
|
74165
|
+
event: "mls_welcome",
|
|
74166
|
+
data: {
|
|
74167
|
+
target_device_id: t2.deviceId,
|
|
74168
|
+
group_id: mlsGroupId,
|
|
74169
|
+
...welcomeFields,
|
|
74170
|
+
payload: Buffer.from(welcome).toString("hex")
|
|
74171
|
+
}
|
|
74172
|
+
},
|
|
74173
|
+
`${label} welcome\u2192${t2.deviceId.slice(0, 8)}`
|
|
74174
|
+
);
|
|
74175
|
+
if (!sent) {
|
|
74176
|
+
console.warn(
|
|
74177
|
+
`[SecureChannel] ${label}: Welcome for ${t2.deviceId.slice(0, 8)} was NOT written \u2014 leaving the request PENDING so the next pull retries it`
|
|
74178
|
+
);
|
|
74179
|
+
continue;
|
|
74180
|
+
}
|
|
74181
|
+
if (await this._postFulfilWelcome(mlsGroupId, t2.requestId, `${label} ${t2.deviceId.slice(0, 8)}`)) {
|
|
74182
|
+
fulfilled++;
|
|
74183
|
+
}
|
|
74184
|
+
}
|
|
74185
|
+
return fulfilled;
|
|
74186
|
+
}
|
|
74187
|
+
/**
|
|
74188
|
+
* Resolve an MLS group id to the family that owns it.
|
|
74189
|
+
*
|
|
74190
|
+
* There are four: rooms, A2A channels, shared 1:1 groups, and the legacy
|
|
74191
|
+
* per-conversation groups. They all store the MLS group id under
|
|
74192
|
+
* `mlsGroupId`; they differ only in the key their live `MLSGroupManager` sits
|
|
74193
|
+
* under in `_mlsGroups`.
|
|
74194
|
+
*
|
|
74195
|
+
* ONE resolver, because hand-copying this enumeration is what produced
|
|
74196
|
+
* #1012 (`_handleMlsCommit` handled two families of four), #1014 (a
|
|
74197
|
+
* room-framed 1:1 replay matched nothing) and #1016 (a rejoin dropped only
|
|
74198
|
+
* the room manager). Three bugs, one missing abstraction.
|
|
74199
|
+
*/
|
|
74200
|
+
_resolveGroupFamily(mlsGroupId) {
|
|
74201
|
+
if (!mlsGroupId) return null;
|
|
74202
|
+
const families = [
|
|
74203
|
+
{ family: "room", entries: this._persisted?.rooms, managerKey: (id) => id, label: "room" },
|
|
74204
|
+
{ family: "a2a", entries: this._persisted?.a2aChannels, managerKey: (id) => `a2a:${id}`, label: "A2A" },
|
|
74205
|
+
{ family: "shared1to1", entries: this._persisted?.mlsGroups, managerKey: (id) => `1to1-group:${id}`, label: "1:1 group" },
|
|
74206
|
+
{ family: "conversation", entries: this._persisted?.mlsConversations, managerKey: (id) => `conv:${id}`, label: "conversation" }
|
|
74207
|
+
];
|
|
74208
|
+
for (const f2 of families) {
|
|
74209
|
+
for (const [id, entry] of Object.entries(f2.entries ?? {})) {
|
|
74210
|
+
if (entry?.mlsGroupId !== mlsGroupId) continue;
|
|
74211
|
+
return {
|
|
74212
|
+
family: f2.family,
|
|
74213
|
+
id,
|
|
74214
|
+
managerKey: f2.managerKey(id),
|
|
74215
|
+
label: `${f2.label} ${id.slice(0, 8)}`
|
|
74216
|
+
};
|
|
74217
|
+
}
|
|
74218
|
+
}
|
|
74219
|
+
return null;
|
|
74220
|
+
}
|
|
74221
|
+
/** #1015: is the socket in a state that can actually take a write? */
|
|
74222
|
+
_wsIsOpen() {
|
|
74223
|
+
return this._ws?.readyState === 1;
|
|
74224
|
+
}
|
|
74225
|
+
/**
|
|
74226
|
+
* #1015: write one frame and report whether the socket took it.
|
|
74227
|
+
*
|
|
74228
|
+
* `ws.send()` on a CLOSING or CLOSED socket returns WITHOUT throwing — the
|
|
74229
|
+
* error surfaces only through the callback, and every fulfilment site passed
|
|
74230
|
+
* none. So a Welcome could be "sent" into a dead socket and the requester
|
|
74231
|
+
* still marked `fulfilled`, which it never re-requests.
|
|
74232
|
+
*/
|
|
74233
|
+
_sendFrameConfirmed(frame, label) {
|
|
74234
|
+
const ws = this._ws;
|
|
74235
|
+
if (!ws || ws.readyState !== 1) {
|
|
74236
|
+
console.warn(
|
|
74237
|
+
`[SecureChannel] ${label}: socket is not OPEN (readyState=${ws?.readyState ?? "null"}) \u2014 frame NOT written`
|
|
74238
|
+
);
|
|
74239
|
+
return Promise.resolve(false);
|
|
74240
|
+
}
|
|
74241
|
+
return new Promise((resolve3) => {
|
|
74242
|
+
try {
|
|
74243
|
+
ws.send(JSON.stringify(frame), (err) => {
|
|
74244
|
+
if (err) {
|
|
74245
|
+
console.error(`[SecureChannel] ${label}: socket refused the frame:`, err);
|
|
74246
|
+
resolve3(false);
|
|
74247
|
+
} else {
|
|
74248
|
+
resolve3(true);
|
|
74249
|
+
}
|
|
74250
|
+
});
|
|
74251
|
+
} catch (err) {
|
|
74252
|
+
console.error(`[SecureChannel] ${label}: send threw:`, err);
|
|
74253
|
+
resolve3(false);
|
|
74254
|
+
}
|
|
74255
|
+
});
|
|
74256
|
+
}
|
|
74257
|
+
/**
|
|
74258
|
+
* #1015: record a Welcome as fulfilled — and say so when it fails.
|
|
74259
|
+
*
|
|
74260
|
+
* The batched shared-1:1 site posted this with `.catch(() => {})`, so an HTTP
|
|
74261
|
+
* failure here was invisible on top of the sends being invisible.
|
|
74262
|
+
*/
|
|
74263
|
+
async _postFulfilWelcome(mlsGroupId, requestId, label) {
|
|
74264
|
+
try {
|
|
74265
|
+
const res = await fetch(
|
|
74266
|
+
`${this.config.apiUrl}/api/v1/mls/groups/${mlsGroupId}/fulfill-welcome`,
|
|
74267
|
+
{
|
|
74268
|
+
method: "POST",
|
|
74269
|
+
headers: { Authorization: `Bearer ${this._deviceJwt}`, "Content-Type": "application/json" },
|
|
74270
|
+
body: JSON.stringify({ request_id: requestId })
|
|
74271
|
+
}
|
|
74272
|
+
);
|
|
74273
|
+
if (!res.ok) {
|
|
74274
|
+
console.warn(`[SecureChannel] ${label}: fulfill-welcome returned ${res.status}`);
|
|
74275
|
+
return false;
|
|
74276
|
+
}
|
|
74277
|
+
return true;
|
|
74278
|
+
} catch (err) {
|
|
74279
|
+
console.warn(`[SecureChannel] ${label}: fulfill-welcome failed:`, err);
|
|
74280
|
+
return false;
|
|
74281
|
+
}
|
|
74282
|
+
}
|
|
74283
|
+
/**
|
|
74284
|
+
* #1013: fold an epoch seen on an inbound frame into the running hint.
|
|
74285
|
+
*
|
|
74286
|
+
* Anything unusable (missing, non-numeric, negative, fractional) is ignored
|
|
74287
|
+
* rather than defaulted. A defaulted epoch here would be a guess, and a guess
|
|
74288
|
+
* that reads LOW silently disables the check it exists to drive.
|
|
74289
|
+
*/
|
|
74290
|
+
_noteGroupEpoch(mlsGroupId, epoch) {
|
|
74291
|
+
if (typeof mlsGroupId !== "string" || !mlsGroupId) return;
|
|
74292
|
+
const current = this._observedGroupEpochs.get(mlsGroupId) ?? 0;
|
|
74293
|
+
const next = noteObservedEpoch(current, epoch);
|
|
74294
|
+
if (next > current) this._observedGroupEpochs.set(mlsGroupId, next);
|
|
74295
|
+
}
|
|
74296
|
+
/**
|
|
74297
|
+
* #1013 — the ONLY place this package encrypts an MLS application message.
|
|
74298
|
+
*
|
|
74299
|
+
* Catch up first when the group is known to have moved past us, then encrypt.
|
|
74300
|
+
* Hermes has done this since #440 and the browser since #996; the plugin —
|
|
74301
|
+
* the implementation that actually ships to customers — did not, so an agent
|
|
74302
|
+
* that missed one commit encrypted every later message at an epoch nobody
|
|
74303
|
+
* could read, while the server stored and relayed it and every signal read
|
|
74304
|
+
* 200.
|
|
74305
|
+
*
|
|
74306
|
+
* Funnelling every sender through one method is the point. A guard applied at
|
|
74307
|
+
* seven call sites decays to a guard applied at six: that is exactly how
|
|
74308
|
+
* `_handleMlsCommit` ended up handling two group families out of four (#1012).
|
|
74309
|
+
*
|
|
74310
|
+
* Best-effort by design. A catch-up that cannot replay — or that throws — must
|
|
74311
|
+
* NOT block the send; we fall through and encrypt at the local epoch, which is
|
|
74312
|
+
* precisely today's behaviour, so the worst case is no regression.
|
|
74313
|
+
*/
|
|
74314
|
+
async _encryptWithCatchUp(mlsGroup, groupKey, mlsGroupId, label, plaintextBytes) {
|
|
74315
|
+
const observed = this._observedGroupEpochs.get(mlsGroupId);
|
|
74316
|
+
if (observed !== void 0 && needsPreSendResync(Number(mlsGroup.epoch), observed)) {
|
|
74317
|
+
console.warn(
|
|
74318
|
+
`[SecureChannel] ${label}: local epoch ${Number(mlsGroup.epoch)} is behind the observed group epoch ${observed} \u2014 catching up before encrypt (#1013)`
|
|
74319
|
+
);
|
|
74320
|
+
try {
|
|
74321
|
+
if (!await this._resyncOnDivergence(groupKey, mlsGroupId)) {
|
|
74322
|
+
console.warn(
|
|
74323
|
+
`[SecureChannel] ${label}: catch-up could not replay \u2014 sending at epoch ${Number(mlsGroup.epoch)}. Peers past this epoch will not read it.`
|
|
74324
|
+
);
|
|
74325
|
+
}
|
|
74326
|
+
} catch (err) {
|
|
74327
|
+
console.warn(`[SecureChannel] ${label}: catch-up failed:`, err);
|
|
74328
|
+
}
|
|
74329
|
+
}
|
|
74330
|
+
return await mlsGroup.encrypt(plaintextBytes);
|
|
74331
|
+
}
|
|
73990
74332
|
async _resyncOnDivergence(groupKey, groupId) {
|
|
73991
74333
|
const mgr = this._mlsGroups.get(groupKey);
|
|
73992
74334
|
if (!mgr?.isInitialized) return false;
|
|
@@ -74013,11 +74355,24 @@ ${messageText}`;
|
|
|
74013
74355
|
applied++;
|
|
74014
74356
|
}
|
|
74015
74357
|
if (applied === 0) {
|
|
74016
|
-
|
|
74358
|
+
const strikes = (this._resyncNoOpStrikes.get(groupKey) ?? 0) + 1;
|
|
74359
|
+
this._resyncNoOpStrikes.set(groupKey, strikes);
|
|
74360
|
+
if (strikes < _SecureChannel.MAX_RESYNC_NOOPS) {
|
|
74361
|
+
this._mlsDecryptFailCounts.delete(groupKey);
|
|
74362
|
+
console.log(
|
|
74363
|
+
`[SecureChannel] Resync for ${groupId.slice(0, 8)}: already current at epoch=${mgr.epoch} (strike ${strikes}/${_SecureChannel.MAX_RESYNC_NOOPS}) \u2014 NOT re-keying (#1084)`
|
|
74364
|
+
);
|
|
74365
|
+
return true;
|
|
74366
|
+
}
|
|
74367
|
+
this._resyncNoOpStrikes.delete(groupKey);
|
|
74368
|
+
console.warn(
|
|
74369
|
+
`[SecureChannel] Resync for ${groupId.slice(0, 8)}: still failing at epoch=${mgr.epoch} after ${_SecureChannel.MAX_RESYNC_NOOPS} no-op resyncs \u2014 escalating to re-key`
|
|
74370
|
+
);
|
|
74017
74371
|
return false;
|
|
74018
74372
|
}
|
|
74019
74373
|
await saveMlsState(this.config.dataDir, groupId, JSON.stringify(mgr.exportState()));
|
|
74020
74374
|
this._mlsDecryptFailCounts.delete(groupKey);
|
|
74375
|
+
this._resyncNoOpStrikes.delete(groupKey);
|
|
74021
74376
|
console.log(
|
|
74022
74377
|
`[SecureChannel] Resync-on-divergence: applied ${applied} missed commit(s) for ${groupId.slice(0, 8)}, now epoch=${mgr.epoch}`
|
|
74023
74378
|
);
|
|
@@ -74404,6 +74759,7 @@ ${messageText}`;
|
|
|
74404
74759
|
const ackedIds = [];
|
|
74405
74760
|
const nackedIds = [];
|
|
74406
74761
|
for (const msg of messages) {
|
|
74762
|
+
let handled = true;
|
|
74407
74763
|
try {
|
|
74408
74764
|
if (msg.sender_device_id === this._deviceId) {
|
|
74409
74765
|
ackedIds.push(msg.queue_id);
|
|
@@ -74420,7 +74776,7 @@ ${messageText}`;
|
|
|
74420
74776
|
a2a_channel_id: msg.a2a_channel_id
|
|
74421
74777
|
});
|
|
74422
74778
|
} else if (msg.message_type === "commit") {
|
|
74423
|
-
await this._handleMlsCommit({
|
|
74779
|
+
handled = await this._handleMlsCommit({
|
|
74424
74780
|
group_id: msg.group_id,
|
|
74425
74781
|
sender_device_id: msg.sender_device_id,
|
|
74426
74782
|
epoch: msg.epoch,
|
|
@@ -74458,9 +74814,18 @@ ${messageText}`;
|
|
|
74458
74814
|
conversation_group_id: msg.conversation_group_id,
|
|
74459
74815
|
created_at: msg.created_at
|
|
74460
74816
|
});
|
|
74817
|
+
} else {
|
|
74818
|
+
handled = false;
|
|
74819
|
+
console.warn(
|
|
74820
|
+
`[SecureChannel] Delivery application row ${String(msg.message_id).slice(0, 8)} names no room, A2A channel or conversation \u2014 NOT acked`
|
|
74821
|
+
);
|
|
74461
74822
|
}
|
|
74462
74823
|
}
|
|
74463
|
-
|
|
74824
|
+
if (handled) {
|
|
74825
|
+
ackedIds.push(msg.queue_id);
|
|
74826
|
+
} else {
|
|
74827
|
+
nackedIds.push(msg.queue_id);
|
|
74828
|
+
}
|
|
74464
74829
|
} catch (err) {
|
|
74465
74830
|
console.warn(`[SecureChannel] Delivery ${msg.message_type} processing failed:`, err);
|
|
74466
74831
|
nackedIds.push(msg.queue_id);
|
|
@@ -74529,38 +74894,20 @@ ${messageText}`;
|
|
|
74529
74894
|
if (!kpHex) continue;
|
|
74530
74895
|
const kpBytes = new Uint8Array(Buffer.from(kpHex, "hex"));
|
|
74531
74896
|
const memberKp = MLSGroupManager.deserializeKeyPackage(kpBytes);
|
|
74532
|
-
const
|
|
74533
|
-
|
|
74534
|
-
|
|
74535
|
-
|
|
74536
|
-
|
|
74537
|
-
|
|
74538
|
-
|
|
74539
|
-
|
|
74540
|
-
|
|
74541
|
-
}
|
|
74542
|
-
}
|
|
74543
|
-
if (
|
|
74544
|
-
|
|
74545
|
-
event: "mls_welcome",
|
|
74546
|
-
data: {
|
|
74547
|
-
target_device_id: req.requesting_device_id,
|
|
74548
|
-
group_id: roomState.mlsGroupId,
|
|
74549
|
-
room_id: roomId,
|
|
74550
|
-
payload: Buffer.from(welcome).toString("hex")
|
|
74551
|
-
}
|
|
74552
|
-
}));
|
|
74897
|
+
const done = await this._fulfilWelcomeRequests({
|
|
74898
|
+
mlsGroup,
|
|
74899
|
+
mlsGroupId: roomState.mlsGroupId,
|
|
74900
|
+
label: `room ${roomId.slice(0, 8)}`,
|
|
74901
|
+
welcomeFields: { room_id: roomId },
|
|
74902
|
+
targets: [{
|
|
74903
|
+
requestId: req.id,
|
|
74904
|
+
deviceId: req.requesting_device_id,
|
|
74905
|
+
keyPackage: memberKp
|
|
74906
|
+
}]
|
|
74907
|
+
});
|
|
74908
|
+
if (done > 0) {
|
|
74909
|
+
console.log(`[SecureChannel] Fulfilled Welcome for ${req.requesting_device_id.slice(0, 8)} in room ${roomId.slice(0, 8)}`);
|
|
74553
74910
|
}
|
|
74554
|
-
await fetch(
|
|
74555
|
-
`${this.config.apiUrl}/api/v1/mls/groups/${roomState.mlsGroupId}/fulfill-welcome`,
|
|
74556
|
-
{
|
|
74557
|
-
method: "POST",
|
|
74558
|
-
headers: { Authorization: `Bearer ${this._deviceJwt}`, "Content-Type": "application/json" },
|
|
74559
|
-
body: JSON.stringify({ request_id: req.id })
|
|
74560
|
-
}
|
|
74561
|
-
);
|
|
74562
|
-
await saveMlsState(this.config.dataDir, roomState.mlsGroupId, JSON.stringify(mlsGroup.exportState()));
|
|
74563
|
-
console.log(`[SecureChannel] Fulfilled Welcome for ${req.requesting_device_id.slice(0, 8)} in room ${roomId.slice(0, 8)}`);
|
|
74564
74911
|
} catch (fulfillErr) {
|
|
74565
74912
|
console.warn(`[SecureChannel] Welcome fulfill failed for ${req.requesting_device_id.slice(0, 8)}:`, fulfillErr);
|
|
74566
74913
|
}
|
|
@@ -74599,65 +74946,38 @@ ${messageText}`;
|
|
|
74599
74946
|
validReqs.push({ req, kp: MLSGroupManager.deserializeKeyPackage(kpBytes) });
|
|
74600
74947
|
}
|
|
74601
74948
|
if (validReqs.length === 0) continue;
|
|
74949
|
+
const sharedTargets = validReqs.map((v2) => ({
|
|
74950
|
+
requestId: v2.req.id,
|
|
74951
|
+
deviceId: v2.req.requesting_device_id,
|
|
74952
|
+
keyPackage: v2.kp
|
|
74953
|
+
}));
|
|
74602
74954
|
try {
|
|
74603
|
-
const
|
|
74604
|
-
|
|
74605
|
-
|
|
74606
|
-
|
|
74607
|
-
|
|
74608
|
-
|
|
74609
|
-
|
|
74610
|
-
|
|
74611
|
-
|
|
74612
|
-
}));
|
|
74613
|
-
}
|
|
74614
|
-
if (welcome && this._ws) {
|
|
74615
|
-
for (const { req } of validReqs) {
|
|
74616
|
-
this._ws.send(JSON.stringify({
|
|
74617
|
-
event: "mls_welcome",
|
|
74618
|
-
data: {
|
|
74619
|
-
target_device_id: req.requesting_device_id,
|
|
74620
|
-
group_id: entry.mlsGroupId,
|
|
74621
|
-
conversation_group_id: gid,
|
|
74622
|
-
payload: Buffer.from(welcome).toString("hex")
|
|
74623
|
-
}
|
|
74624
|
-
}));
|
|
74625
|
-
}
|
|
74626
|
-
}
|
|
74627
|
-
for (const { req } of validReqs) {
|
|
74628
|
-
await fetch(
|
|
74629
|
-
`${this.config.apiUrl}/api/v1/mls/groups/${entry.mlsGroupId}/fulfill-welcome`,
|
|
74630
|
-
{
|
|
74631
|
-
method: "POST",
|
|
74632
|
-
headers: { Authorization: `Bearer ${this._deviceJwt}`, "Content-Type": "application/json" },
|
|
74633
|
-
body: JSON.stringify({ request_id: req.id })
|
|
74634
|
-
}
|
|
74635
|
-
).catch(() => {
|
|
74636
|
-
});
|
|
74955
|
+
const done = await this._fulfilWelcomeRequests({
|
|
74956
|
+
mlsGroup,
|
|
74957
|
+
mlsGroupId: entry.mlsGroupId,
|
|
74958
|
+
label: `shared group ${gid.slice(0, 8)}`,
|
|
74959
|
+
welcomeFields: { conversation_group_id: gid },
|
|
74960
|
+
targets: sharedTargets
|
|
74961
|
+
});
|
|
74962
|
+
if (done > 0) {
|
|
74963
|
+
console.log(`[SecureChannel] Batched Welcome for ${done}/${validReqs.length} devices in shared group ${gid.slice(0, 8)} (epoch=${mlsGroup.epoch})`);
|
|
74637
74964
|
}
|
|
74638
|
-
await saveMlsState(this.config.dataDir, entry.mlsGroupId, JSON.stringify(mlsGroup.exportState()));
|
|
74639
|
-
console.log(`[SecureChannel] Batched Welcome for ${validReqs.length} devices in shared group ${gid.slice(0, 8)} (epoch=${mlsGroup.epoch})`);
|
|
74640
74965
|
} catch (batchErr) {
|
|
74641
74966
|
console.warn(`[SecureChannel] Batched Welcome failed for shared group ${gid.slice(0, 8)}, falling back to individual:`, batchErr);
|
|
74642
|
-
for (const
|
|
74967
|
+
for (const target of sharedTargets) {
|
|
74643
74968
|
try {
|
|
74644
|
-
const
|
|
74645
|
-
|
|
74646
|
-
|
|
74647
|
-
|
|
74648
|
-
|
|
74649
|
-
|
|
74650
|
-
}
|
|
74651
|
-
await fetch(`${this.config.apiUrl}/api/v1/mls/groups/${entry.mlsGroupId}/fulfill-welcome`, {
|
|
74652
|
-
method: "POST",
|
|
74653
|
-
headers: { Authorization: `Bearer ${this._deviceJwt}`, "Content-Type": "application/json" },
|
|
74654
|
-
body: JSON.stringify({ request_id: req.id })
|
|
74655
|
-
}).catch(() => {
|
|
74969
|
+
const done = await this._fulfilWelcomeRequests({
|
|
74970
|
+
mlsGroup,
|
|
74971
|
+
mlsGroupId: entry.mlsGroupId,
|
|
74972
|
+
label: `shared group ${gid.slice(0, 8)}`,
|
|
74973
|
+
welcomeFields: { conversation_group_id: gid },
|
|
74974
|
+
targets: [target]
|
|
74656
74975
|
});
|
|
74657
|
-
|
|
74658
|
-
|
|
74976
|
+
if (done > 0) {
|
|
74977
|
+
console.log(`[SecureChannel] Individual Welcome for ${target.deviceId.slice(0, 8)} in shared group ${gid.slice(0, 8)}`);
|
|
74978
|
+
}
|
|
74659
74979
|
} catch (indivErr) {
|
|
74660
|
-
console.warn(`[SecureChannel] Individual Welcome failed for ${
|
|
74980
|
+
console.warn(`[SecureChannel] Individual Welcome failed for ${target.deviceId.slice(0, 8)}:`, indivErr);
|
|
74661
74981
|
}
|
|
74662
74982
|
}
|
|
74663
74983
|
}
|
|
@@ -74689,38 +75009,20 @@ ${messageText}`;
|
|
|
74689
75009
|
if (!kpHex) continue;
|
|
74690
75010
|
const kpBytes = new Uint8Array(Buffer.from(kpHex, "hex"));
|
|
74691
75011
|
const memberKp = MLSGroupManager.deserializeKeyPackage(kpBytes);
|
|
74692
|
-
const
|
|
74693
|
-
|
|
74694
|
-
|
|
74695
|
-
|
|
74696
|
-
|
|
74697
|
-
|
|
74698
|
-
|
|
74699
|
-
|
|
74700
|
-
|
|
74701
|
-
}
|
|
74702
|
-
}
|
|
74703
|
-
if (
|
|
74704
|
-
|
|
74705
|
-
event: "mls_welcome",
|
|
74706
|
-
data: {
|
|
74707
|
-
target_device_id: req.requesting_device_id,
|
|
74708
|
-
group_id: convEntry.mlsGroupId,
|
|
74709
|
-
conversation_id: convId,
|
|
74710
|
-
payload: Buffer.from(welcome).toString("hex")
|
|
74711
|
-
}
|
|
74712
|
-
}));
|
|
75012
|
+
const done = await this._fulfilWelcomeRequests({
|
|
75013
|
+
mlsGroup,
|
|
75014
|
+
mlsGroupId: convEntry.mlsGroupId,
|
|
75015
|
+
label: `conv ${convId.slice(0, 8)}`,
|
|
75016
|
+
welcomeFields: { conversation_id: convId },
|
|
75017
|
+
targets: [{
|
|
75018
|
+
requestId: req.id,
|
|
75019
|
+
deviceId: req.requesting_device_id,
|
|
75020
|
+
keyPackage: memberKp
|
|
75021
|
+
}]
|
|
75022
|
+
});
|
|
75023
|
+
if (done > 0) {
|
|
75024
|
+
console.log(`[SecureChannel] Fulfilled Welcome for ${req.requesting_device_id.slice(0, 8)} in conv ${convId.slice(0, 8)}`);
|
|
74713
75025
|
}
|
|
74714
|
-
await fetch(
|
|
74715
|
-
`${this.config.apiUrl}/api/v1/mls/groups/${convEntry.mlsGroupId}/fulfill-welcome`,
|
|
74716
|
-
{
|
|
74717
|
-
method: "POST",
|
|
74718
|
-
headers: { Authorization: `Bearer ${this._deviceJwt}`, "Content-Type": "application/json" },
|
|
74719
|
-
body: JSON.stringify({ request_id: req.id })
|
|
74720
|
-
}
|
|
74721
|
-
);
|
|
74722
|
-
await saveMlsState(this.config.dataDir, convEntry.mlsGroupId, JSON.stringify(mlsGroup.exportState()));
|
|
74723
|
-
console.log(`[SecureChannel] Fulfilled Welcome for ${req.requesting_device_id.slice(0, 8)} in conv ${convId.slice(0, 8)}`);
|
|
74724
75026
|
} catch (fulfillErr) {
|
|
74725
75027
|
console.warn(`[SecureChannel] Conv Welcome fulfill failed for ${req.requesting_device_id.slice(0, 8)}:`, fulfillErr);
|
|
74726
75028
|
}
|
|
@@ -74901,12 +75203,13 @@ ${messageText}`;
|
|
|
74901
75203
|
} catch (distErr) {
|
|
74902
75204
|
console.warn(`[SecureChannel] A2A distribute network error:`, distErr);
|
|
74903
75205
|
}
|
|
74904
|
-
if (!distributed && this.
|
|
74905
|
-
|
|
75206
|
+
if (!distributed && this._wsIsOpen()) {
|
|
75207
|
+
const a2aLabel = `A2A ${chId.slice(0, 8)}`;
|
|
75208
|
+
const commitSent = await this._sendFrameConfirmed({
|
|
74906
75209
|
event: "mls_commit",
|
|
74907
75210
|
data: { group_id: chState.mlsGroupId, epoch: Number(mlsGroup.epoch), payload: commitHex }
|
|
74908
|
-
})
|
|
74909
|
-
this.
|
|
75211
|
+
}, `${a2aLabel} commit`);
|
|
75212
|
+
const welcomeSent = commitSent && await this._sendFrameConfirmed({
|
|
74910
75213
|
event: "mls_welcome",
|
|
74911
75214
|
data: {
|
|
74912
75215
|
target_device_id: req.requesting_device_id,
|
|
@@ -74914,7 +75217,11 @@ ${messageText}`;
|
|
|
74914
75217
|
a2a_channel_id: chId,
|
|
74915
75218
|
payload: welcomeHex
|
|
74916
75219
|
}
|
|
74917
|
-
})
|
|
75220
|
+
}, `${a2aLabel} welcome`);
|
|
75221
|
+
if (!welcomeSent) {
|
|
75222
|
+
console.warn(`[SecureChannel] ${a2aLabel}: Welcome frames were NOT written \u2014 leaving the request pending`);
|
|
75223
|
+
continue;
|
|
75224
|
+
}
|
|
74918
75225
|
try {
|
|
74919
75226
|
await fetch(
|
|
74920
75227
|
`${this.config.apiUrl}/api/v1/mls/groups/${chState.mlsGroupId}/distribute`,
|
|
@@ -74937,16 +75244,15 @@ ${messageText}`;
|
|
|
74937
75244
|
console.warn(`[SecureChannel] Cannot deliver Welcome \u2014 HTTP distribute and WS both unavailable`);
|
|
74938
75245
|
continue;
|
|
74939
75246
|
}
|
|
74940
|
-
await
|
|
74941
|
-
|
|
74942
|
-
|
|
74943
|
-
|
|
74944
|
-
headers: { Authorization: `Bearer ${this._deviceJwt}`, "Content-Type": "application/json" },
|
|
74945
|
-
body: JSON.stringify({ request_id: req.id })
|
|
74946
|
-
}
|
|
75247
|
+
const a2aFulfilled = await this._postFulfilWelcome(
|
|
75248
|
+
chState.mlsGroupId,
|
|
75249
|
+
req.id,
|
|
75250
|
+
`A2A ${chId.slice(0, 8)}`
|
|
74947
75251
|
);
|
|
74948
75252
|
await saveMlsState(this.config.dataDir, chState.mlsGroupId, JSON.stringify(mlsGroup.exportState()));
|
|
74949
|
-
|
|
75253
|
+
if (a2aFulfilled) {
|
|
75254
|
+
console.log(`[SecureChannel] Fulfilled A2A Welcome for ${req.requesting_device_id.slice(0, 8)} in channel ${chId.slice(0, 8)}`);
|
|
75255
|
+
}
|
|
74950
75256
|
} catch (fulfillErr) {
|
|
74951
75257
|
console.log(`[SecureChannel] A2A Welcome fulfill failed: ${fulfillErr instanceof Error ? fulfillErr.message : String(fulfillErr)}`);
|
|
74952
75258
|
}
|
|
@@ -75120,12 +75426,12 @@ ${messageText}`;
|
|
|
75120
75426
|
console.log(`[SecureChannel] MLS sync: re-join needed for group ${groupId?.slice(0, 8)}`);
|
|
75121
75427
|
if (groupId) {
|
|
75122
75428
|
await deleteMlsState(this.config.dataDir, groupId);
|
|
75123
|
-
|
|
75124
|
-
|
|
75125
|
-
|
|
75126
|
-
|
|
75127
|
-
}
|
|
75429
|
+
const target = this._resolveGroupFamily(groupId);
|
|
75430
|
+
if (target) {
|
|
75431
|
+
this._mlsGroups.delete(target.managerKey);
|
|
75432
|
+
console.log(`[SecureChannel] MLS sync rejoin: dropped local state for ${target.label}`);
|
|
75128
75433
|
}
|
|
75434
|
+
void this._requestWelcomeSelfHeal(groupId);
|
|
75129
75435
|
}
|
|
75130
75436
|
} else if (action === "replay_complete") {
|
|
75131
75437
|
console.log(`[SecureChannel] MLS sync complete for group ${groupId?.slice(0, 8)} (${data.count} messages replayed)`);
|
|
@@ -75137,6 +75443,7 @@ ${messageText}`;
|
|
|
75137
75443
|
*/
|
|
75138
75444
|
async _handleA2AMessageMLS(data) {
|
|
75139
75445
|
const groupId = data.group_id;
|
|
75446
|
+
this._noteGroupEpoch(groupId, data.epoch);
|
|
75140
75447
|
const channelId = data.channel_id ?? data.a2a_channel_id;
|
|
75141
75448
|
let a2aChannelId = channelId;
|
|
75142
75449
|
if (!a2aChannelId) {
|
|
@@ -83557,10 +83864,10 @@ ${actionsText}`);
|
|
|
83557
83864
|
inst.with = inst.check;
|
|
83558
83865
|
inst.clone = (_def, params) => clone(inst, _def, params);
|
|
83559
83866
|
inst.brand = () => inst;
|
|
83560
|
-
inst.register = (reg, meta3) => {
|
|
83867
|
+
inst.register = ((reg, meta3) => {
|
|
83561
83868
|
reg.add(inst, meta3);
|
|
83562
83869
|
return inst;
|
|
83563
|
-
};
|
|
83870
|
+
});
|
|
83564
83871
|
inst.apply = (fn) => fn(inst);
|
|
83565
83872
|
});
|
|
83566
83873
|
ZodMiniObject = /* @__PURE__ */ $constructor("ZodMiniObject", (inst, def) => {
|
|
@@ -83947,10 +84254,10 @@ ${actionsText}`);
|
|
|
83947
84254
|
inst.with = inst.check;
|
|
83948
84255
|
inst.clone = (def2, params) => clone(inst, def2, params);
|
|
83949
84256
|
inst.brand = () => inst;
|
|
83950
|
-
inst.register = (reg, meta3) => {
|
|
84257
|
+
inst.register = ((reg, meta3) => {
|
|
83951
84258
|
reg.add(inst, meta3);
|
|
83952
84259
|
return inst;
|
|
83953
|
-
};
|
|
84260
|
+
});
|
|
83954
84261
|
inst.parse = (data, params) => parse2(inst, data, params, { callee: inst.parse });
|
|
83955
84262
|
inst.safeParse = (data, params) => safeParse3(inst, data, params);
|
|
83956
84263
|
inst.parseAsync = async (data, params) => parseAsync2(inst, data, params, { callee: inst.parseAsync });
|
|
@@ -87277,7 +87584,7 @@ ${actionsText}`);
|
|
|
87277
87584
|
return;
|
|
87278
87585
|
}
|
|
87279
87586
|
const pollInterval = task2.pollInterval ?? this._options?.defaultTaskPollInterval ?? 1e3;
|
|
87280
|
-
await new Promise((
|
|
87587
|
+
await new Promise((resolve3) => setTimeout(resolve3, pollInterval));
|
|
87281
87588
|
options?.signal?.throwIfAborted();
|
|
87282
87589
|
}
|
|
87283
87590
|
} catch (error2) {
|
|
@@ -87294,7 +87601,7 @@ ${actionsText}`);
|
|
|
87294
87601
|
*/
|
|
87295
87602
|
request(request, resultSchema, options) {
|
|
87296
87603
|
const { relatedRequestId, resumptionToken, onresumptiontoken, task, relatedTask } = options ?? {};
|
|
87297
|
-
return new Promise((
|
|
87604
|
+
return new Promise((resolve3, reject) => {
|
|
87298
87605
|
const earlyReject = (error2) => {
|
|
87299
87606
|
reject(error2);
|
|
87300
87607
|
};
|
|
@@ -87372,7 +87679,7 @@ ${actionsText}`);
|
|
|
87372
87679
|
if (!parseResult.success) {
|
|
87373
87680
|
reject(parseResult.error);
|
|
87374
87681
|
} else {
|
|
87375
|
-
|
|
87682
|
+
resolve3(parseResult.data);
|
|
87376
87683
|
}
|
|
87377
87684
|
} catch (error2) {
|
|
87378
87685
|
reject(error2);
|
|
@@ -87633,12 +87940,12 @@ ${actionsText}`);
|
|
|
87633
87940
|
}
|
|
87634
87941
|
} catch {
|
|
87635
87942
|
}
|
|
87636
|
-
return new Promise((
|
|
87943
|
+
return new Promise((resolve3, reject) => {
|
|
87637
87944
|
if (signal.aborted) {
|
|
87638
87945
|
reject(new McpError(ErrorCode.InvalidRequest, "Request cancelled"));
|
|
87639
87946
|
return;
|
|
87640
87947
|
}
|
|
87641
|
-
const timeoutId = setTimeout(
|
|
87948
|
+
const timeoutId = setTimeout(resolve3, interval);
|
|
87642
87949
|
signal.addEventListener("abort", () => {
|
|
87643
87950
|
clearTimeout(timeoutId);
|
|
87644
87951
|
reject(new McpError(ErrorCode.InvalidRequest, "Request cancelled"));
|
|
@@ -90623,7 +90930,7 @@ ${actionsText}`);
|
|
|
90623
90930
|
const schOrFunc = root3.refs[ref];
|
|
90624
90931
|
if (schOrFunc)
|
|
90625
90932
|
return schOrFunc;
|
|
90626
|
-
let _sch =
|
|
90933
|
+
let _sch = resolve3.call(this, root3, ref);
|
|
90627
90934
|
if (_sch === void 0) {
|
|
90628
90935
|
const schema = (_a3 = root3.localRefs) === null || _a3 === void 0 ? void 0 : _a3[ref];
|
|
90629
90936
|
const { schemaId } = this.opts;
|
|
@@ -90650,7 +90957,7 @@ ${actionsText}`);
|
|
|
90650
90957
|
function sameSchemaEnv(s1, s2) {
|
|
90651
90958
|
return s1.schema === s2.schema && s1.root === s2.root && s1.baseId === s2.baseId;
|
|
90652
90959
|
}
|
|
90653
|
-
function
|
|
90960
|
+
function resolve3(root3, ref) {
|
|
90654
90961
|
let sch;
|
|
90655
90962
|
while (typeof (sch = this.refs[ref]) == "string")
|
|
90656
90963
|
ref = sch;
|
|
@@ -91217,7 +91524,7 @@ ${actionsText}`);
|
|
|
91217
91524
|
}
|
|
91218
91525
|
return uri;
|
|
91219
91526
|
}
|
|
91220
|
-
function
|
|
91527
|
+
function resolve3(baseURI, relativeURI, options) {
|
|
91221
91528
|
const schemelessOptions = options ? Object.assign({ scheme: "null" }, options) : { scheme: "null" };
|
|
91222
91529
|
const resolved = resolveComponent(parse3(baseURI, schemelessOptions), parse3(relativeURI, schemelessOptions), schemelessOptions, true);
|
|
91223
91530
|
schemelessOptions.skipEscape = true;
|
|
@@ -91444,7 +91751,7 @@ ${actionsText}`);
|
|
|
91444
91751
|
var fastUri = {
|
|
91445
91752
|
SCHEMES,
|
|
91446
91753
|
normalize,
|
|
91447
|
-
resolve:
|
|
91754
|
+
resolve: resolve3,
|
|
91448
91755
|
resolveComponent,
|
|
91449
91756
|
equal,
|
|
91450
91757
|
serialize,
|
|
@@ -95281,7 +95588,7 @@ ${actionsText}`);
|
|
|
95281
95588
|
let task = createTaskResult.task;
|
|
95282
95589
|
const pollInterval = task.pollInterval ?? 5e3;
|
|
95283
95590
|
while (task.status !== "completed" && task.status !== "failed" && task.status !== "cancelled") {
|
|
95284
|
-
await new Promise((
|
|
95591
|
+
await new Promise((resolve3) => setTimeout(resolve3, pollInterval));
|
|
95285
95592
|
const updatedTask = await extra.taskStore.getTask(taskId);
|
|
95286
95593
|
if (!updatedTask) {
|
|
95287
95594
|
throw new McpError(ErrorCode.InternalError, `Task ${taskId} not found during polling`);
|
|
@@ -96145,7 +96452,7 @@ ${actionsText}`);
|
|
|
96145
96452
|
});
|
|
96146
96453
|
if (!chunk) {
|
|
96147
96454
|
if (i2 === 1) {
|
|
96148
|
-
await new Promise((
|
|
96455
|
+
await new Promise((resolve3) => setTimeout(resolve3));
|
|
96149
96456
|
maxReadCount = 3;
|
|
96150
96457
|
continue;
|
|
96151
96458
|
}
|
|
@@ -96644,9 +96951,9 @@ data:
|
|
|
96644
96951
|
const initRequest = messages.find((m2) => isInitializeRequest(m2));
|
|
96645
96952
|
const clientProtocolVersion = initRequest ? initRequest.params.protocolVersion : req.headers.get("mcp-protocol-version") ?? DEFAULT_NEGOTIATED_PROTOCOL_VERSION;
|
|
96646
96953
|
if (this._enableJsonResponse) {
|
|
96647
|
-
return new Promise((
|
|
96954
|
+
return new Promise((resolve3) => {
|
|
96648
96955
|
this._streamMapping.set(streamId, {
|
|
96649
|
-
resolveJson:
|
|
96956
|
+
resolveJson: resolve3,
|
|
96650
96957
|
cleanup: () => {
|
|
96651
96958
|
this._streamMapping.delete(streamId);
|
|
96652
96959
|
}
|
|
@@ -97358,7 +97665,7 @@ data:
|
|
|
97358
97665
|
init_skill_invoker();
|
|
97359
97666
|
await init_skill_telemetry();
|
|
97360
97667
|
await init_policy_enforcer();
|
|
97361
|
-
VERSION = true ? "0.23.
|
|
97668
|
+
VERSION = true ? "0.23.27" : "0.0.0-dev";
|
|
97362
97669
|
}
|
|
97363
97670
|
});
|
|
97364
97671
|
await init_index();
|
|
@@ -97369,8 +97676,6 @@ data:
|
|
|
97369
97676
|
init_config();
|
|
97370
97677
|
init_log();
|
|
97371
97678
|
import { chmodSync as chmodSync5, mkdirSync as mkdirSync6 } from "node:fs";
|
|
97372
|
-
import { resolve as resolve3 } from "node:path";
|
|
97373
|
-
import { pathToFileURL } from "node:url";
|
|
97374
97679
|
|
|
97375
97680
|
// src/fence-auth.ts
|
|
97376
97681
|
import { copyFileSync, chmodSync as chmodSync2, existsSync as existsSync2, mkdirSync as mkdirSync2 } from "node:fs";
|
|
@@ -97401,6 +97706,8 @@ var MuseSession = class {
|
|
|
97401
97706
|
this.driver = driver;
|
|
97402
97707
|
this.opts = opts;
|
|
97403
97708
|
}
|
|
97709
|
+
driver;
|
|
97710
|
+
opts;
|
|
97404
97711
|
queue = [];
|
|
97405
97712
|
running = false;
|
|
97406
97713
|
current = null;
|
|
@@ -97562,6 +97869,7 @@ var MuseDriver = class {
|
|
|
97562
97869
|
this.spawnFn = opts.spawnFn ?? defaultSpawn;
|
|
97563
97870
|
this.turnTimeoutMs = opts.turnTimeoutMs ?? DEFAULT_TURN_TIMEOUT_MS;
|
|
97564
97871
|
}
|
|
97872
|
+
opts;
|
|
97565
97873
|
spawnFn;
|
|
97566
97874
|
turnTimeoutMs;
|
|
97567
97875
|
persistedId = null;
|
|
@@ -97648,7 +97956,7 @@ var MuseDriver = class {
|
|
|
97648
97956
|
}
|
|
97649
97957
|
}
|
|
97650
97958
|
execJsonl(spawn2) {
|
|
97651
|
-
return new Promise((
|
|
97959
|
+
return new Promise((resolve3, reject) => {
|
|
97652
97960
|
let reaped = false;
|
|
97653
97961
|
let timedOut = false;
|
|
97654
97962
|
let buf = "";
|
|
@@ -97672,7 +97980,7 @@ var MuseDriver = class {
|
|
|
97672
97980
|
}
|
|
97673
97981
|
const spoke = this.current?.spoke ?? false;
|
|
97674
97982
|
if (terminal?.ok === true) {
|
|
97675
|
-
|
|
97983
|
+
resolve3({ text: terminal.text, spoke });
|
|
97676
97984
|
return;
|
|
97677
97985
|
}
|
|
97678
97986
|
if (terminal?.ok === false) {
|
|
@@ -97775,7 +98083,7 @@ function onData(stream, fn) {
|
|
|
97775
98083
|
stream?.on("data", fn);
|
|
97776
98084
|
}
|
|
97777
98085
|
function collectOutput(child) {
|
|
97778
|
-
return new Promise((
|
|
98086
|
+
return new Promise((resolve3, reject) => {
|
|
97779
98087
|
let stdout = "";
|
|
97780
98088
|
let stderr = "";
|
|
97781
98089
|
let settled = false;
|
|
@@ -97794,18 +98102,18 @@ function collectOutput(child) {
|
|
|
97794
98102
|
finish(() => reject(err instanceof Error ? err : new Error(String(err))));
|
|
97795
98103
|
});
|
|
97796
98104
|
child.on("exit", () => {
|
|
97797
|
-
finish(() =>
|
|
98105
|
+
finish(() => resolve3(stdout + stderr));
|
|
97798
98106
|
});
|
|
97799
98107
|
});
|
|
97800
98108
|
}
|
|
97801
98109
|
function waitForExit(child, ms) {
|
|
97802
|
-
return new Promise((
|
|
98110
|
+
return new Promise((resolve3) => {
|
|
97803
98111
|
let done = false;
|
|
97804
98112
|
const finish = (value) => {
|
|
97805
98113
|
if (done) return;
|
|
97806
98114
|
done = true;
|
|
97807
98115
|
clearTimeout(timer);
|
|
97808
|
-
|
|
98116
|
+
resolve3(value);
|
|
97809
98117
|
};
|
|
97810
98118
|
const timer = setTimeout(() => finish(false), ms);
|
|
97811
98119
|
child.on("exit", () => finish(true));
|
|
@@ -98073,9 +98381,9 @@ data: ${JSON.stringify(out)}
|
|
|
98073
98381
|
res.writeHead(200, { "content-type": "application/json", ...extra }).end(JSON.stringify(out));
|
|
98074
98382
|
});
|
|
98075
98383
|
}
|
|
98076
|
-
await new Promise((
|
|
98384
|
+
await new Promise((resolve3, reject) => {
|
|
98077
98385
|
server.once("error", reject);
|
|
98078
|
-
server.listen(0, "127.0.0.1", () =>
|
|
98386
|
+
server.listen(0, "127.0.0.1", () => resolve3());
|
|
98079
98387
|
});
|
|
98080
98388
|
const addr = server.address();
|
|
98081
98389
|
if (!addr || typeof addr === "string") throw new Error("room MCP server failed to bind");
|
|
@@ -98086,8 +98394,8 @@ data: ${JSON.stringify(out)}
|
|
|
98086
98394
|
token,
|
|
98087
98395
|
seenMethods: () => [...seen],
|
|
98088
98396
|
seenHttp: () => traces.map((t2) => ({ ...t2 })),
|
|
98089
|
-
close: () => new Promise((
|
|
98090
|
-
server.close(() =>
|
|
98397
|
+
close: () => new Promise((resolve3) => {
|
|
98398
|
+
server.close(() => resolve3());
|
|
98091
98399
|
server.closeAllConnections?.();
|
|
98092
98400
|
})
|
|
98093
98401
|
};
|
|
@@ -98273,7 +98581,7 @@ function mkdir700(path2) {
|
|
|
98273
98581
|
chmodSync5(path2, 448);
|
|
98274
98582
|
}
|
|
98275
98583
|
function packageVersion() {
|
|
98276
|
-
return true ? "0.1.
|
|
98584
|
+
return true ? "0.1.2" : void 0;
|
|
98277
98585
|
}
|
|
98278
98586
|
function helpText(version2) {
|
|
98279
98587
|
return [
|
|
@@ -98432,17 +98740,7 @@ async function main(opts = {}) {
|
|
|
98432
98740
|
shuttingDown: () => shuttingDown
|
|
98433
98741
|
};
|
|
98434
98742
|
}
|
|
98435
|
-
|
|
98436
|
-
if (process.env.VITEST) return false;
|
|
98437
|
-
const entry = process.argv[1];
|
|
98438
|
-
if (!entry) return false;
|
|
98439
|
-
try {
|
|
98440
|
-
return import.meta.url === pathToFileURL(resolve3(entry)).href;
|
|
98441
|
-
} catch {
|
|
98442
|
-
return false;
|
|
98443
|
-
}
|
|
98444
|
-
}
|
|
98445
|
-
if (launchedAsCli()) {
|
|
98743
|
+
if (!process.env.VITEST) {
|
|
98446
98744
|
main().catch((err) => {
|
|
98447
98745
|
logLine("[muse-bridge] fatal:", err);
|
|
98448
98746
|
process.exit(1);
|