@agentvault/muse-bridge 0.1.24 → 0.1.26
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 +347 -57
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -11787,11 +11787,11 @@ async function joinWithFirstMatchingKp(welcomeBytes, candidates) {
|
|
|
11787
11787
|
return null;
|
|
11788
11788
|
}
|
|
11789
11789
|
function ownIdentity() {
|
|
11790
|
-
const v2 = true ? "0.23.
|
|
11790
|
+
const v2 = true ? "0.23.51" : FALLBACK;
|
|
11791
11791
|
return `${PACKAGE}@${v2}`;
|
|
11792
11792
|
}
|
|
11793
11793
|
function buildSha() {
|
|
11794
|
-
const raw = true ? "
|
|
11794
|
+
const raw = true ? "753de79" : "";
|
|
11795
11795
|
const cleaned = (raw ?? "").trim();
|
|
11796
11796
|
return !cleaned || cleaned === "unknown" ? null : cleaned;
|
|
11797
11797
|
}
|
|
@@ -12992,14 +12992,27 @@ function migrateHistoryEntries(history) {
|
|
|
12992
12992
|
return { id, ...legacyEntry };
|
|
12993
12993
|
});
|
|
12994
12994
|
}
|
|
12995
|
+
function isTopicId(value) {
|
|
12996
|
+
return typeof value === "string" && TOPIC_ID_RE.test(value);
|
|
12997
|
+
}
|
|
12998
|
+
function migrateDefaultTopics(state) {
|
|
12999
|
+
if (!state.defaultTopicId || !state.groupId) return state;
|
|
13000
|
+
if (state.defaultTopicIds?.[state.groupId]) return state;
|
|
13001
|
+
return {
|
|
13002
|
+
...state,
|
|
13003
|
+
defaultTopicIds: { ...state.defaultTopicIds ?? {}, [state.groupId]: state.defaultTopicId }
|
|
13004
|
+
};
|
|
13005
|
+
}
|
|
12995
13006
|
function migratePersistedState(raw) {
|
|
12996
13007
|
if (raw.sessions && raw.primaryConversationId) {
|
|
12997
13008
|
const history = raw.messageHistory;
|
|
12998
|
-
if (!history?.some((entry) => typeof entry.id !== "string"))
|
|
12999
|
-
|
|
13009
|
+
if (!history?.some((entry) => typeof entry.id !== "string")) {
|
|
13010
|
+
return migrateDefaultTopics(raw);
|
|
13011
|
+
}
|
|
13012
|
+
return migrateDefaultTopics({
|
|
13000
13013
|
...raw,
|
|
13001
13014
|
messageHistory: migrateHistoryEntries(history)
|
|
13002
|
-
};
|
|
13015
|
+
});
|
|
13003
13016
|
}
|
|
13004
13017
|
const legacy = raw;
|
|
13005
13018
|
return {
|
|
@@ -18320,7 +18333,7 @@ function reportSkillInvocation(opts) {
|
|
|
18320
18333
|
spanBuffer.push(span);
|
|
18321
18334
|
return span;
|
|
18322
18335
|
}
|
|
18323
|
-
var __create, __defProp2, __getOwnPropDesc, __getOwnPropNames2, __getProtoOf, __hasOwnProp, __esm2, __commonJS, __export2, __copyProps, __toESM, SENTINEL, WRAPPERS, INSTRUCTION, init_abstention, init_envelope_text, init_mls_commit_classify, MENTION_RE, BROADCAST_NAMES, init_room_protocol, __filename, __dirname, url, path, Module, Module, root, window_, crypto_, randomValuesStandard, crypto2, randomValueNodeJS, _Module, libsodium_sumo_default, init_libsodium_sumo, a, r, t, c, libsodium_wrappers_default, init_libsodium_wrappers, init_keys, init_x3dh, MAX_SKIP, CHAIN_KEY_SEED, MSG_KEY_SEED, HEADER_KEY_SEED, DoubleRatchet, init_ratchet, init_file_crypto, DOMAIN_DID_DOCUMENT, DOMAIN_TRANSFER_INTENT, DOMAIN_TRANSFER_ACCEPT, BASE58_ALPHABET, init_did, BUILTIN_PATTERNS, ScanEngine, init_scan_engine, init_merkle, VC_CONTEXT_V2, AV_CREDENTIAL_CONTEXT, CRYPTOSUITE, BASE58_ALPHABET2, init_vc, init_transport, init_telemetry, TelemetryReporter, init_telemetry_reporter, CROCKFORD, ARGON2_OPSLIMIT, ARGON2_MEMLIMIT, SALT_BYTES, NONCE_BYTES, KEY_BYTES, BACKUP_VERSION, MAX_BACKUP_SIZE, init_backup, atitle, aobject, aopts, isLE, swap8IfBE, swap32IfBE, hasHexBuiltin, hexes, oidNist, init_utils, BSIGMA, init_blake, U32_MASK64, _32n, fromNumH, fromNumL, shrSH, shrSL, rotrSH, rotrSL, rotrBH, rotrBL, rotr32H, rotr32L, add3L, add3H, add4L, add4H, add5L, add5H, init_u64, HashMD, SHA256_IV, SHA384_IV, SHA512_IV, init_md, B2B_IV, BBUF, _BLAKE2, _BLAKE2b, blake2b, init_blake2, CROCKFORD2, SALT_BYTES2, NONCE_BYTES2, KEY_BYTES2, TAG_BYTES, ENVELOPE_OVERHEAD, AAD_PREFIX, UUID_RE, UUID_V4_RE, DIGEST_ID_RE, TIMESTAMP_RE, encoder, decoder, HISTORY_MAGIC, HISTORY_ARCHIVE_VERSION, HISTORY_MAX_ENTRIES, HISTORY_MAX_BLOB_BYTES, HISTORY_KDF_OPSLIMIT, HISTORY_KDF_MEMLIMIT, HistoryEntryTooLargeError, init_history_backup, init_approval, encVoid, init_tlsEncoder, uint8Encoder, encodeUint8, decodeUint8, uint16Encoder, encodeUint16, decodeUint16, uint32Encoder, encodeUint32, decodeUint32, uint64Encoder, encodeUint64, decodeUint64, init_number, init_tlsDecoder, init_enumHelpers, defaultProposalTypes, defaultProposalTypeEncoder, encodeDefaultProposalType, decodeDefaultProposalType, init_defaultProposalType, defaultExtensionTypes, defaultExtensionTypeEncoder, encodeDefaultExtensionType, decodeDefaultExtensionType, init_defaultExtensionType, acceptAll, init_incomingMessageAction, MlsError, ValidationError, CodecError, UsageError, DependencyError, CryptoVerificationError, CryptoError, InternalError, init_mlsError, init_byteArray, varLenDataEncoder, decodeVarLenData, init_variableLength, init_constantTimeCompare, extensionTypeEncoder, encodeExtensionType, decodeExtensionType, extensionEncoder, encodeExtension, decodeExtension, init_extension, credentialTypes, credentialTypeEncoder, encodeCredentialType, decodeCredentialType, init_credentialType, credentialBasicEncoder, encodeCredentialBasic, credentialX509Encoder, encodeCredentialX509, credentialCustomEncoder, encodeCredentialCustom, credentialEncoder, encodeCredential, decodeCredentialBasic, decodeCredentialX509, decodeCredential, init_credential, externalSenderEncoder, encodeExternalSender, decodeExternalSender, init_externalSender, init_hash, init_optional, ciphersuites, ciphersuiteEncoder, encodeCiphersuite, decodeCiphersuite, ciphersuiteValues, init_ciphersuite, init_signature, protocolVersions, protocolVersionEncoder, encodeProtocolVersion, decodeProtocolVersion, init_protocolVersion, capabilitiesEncoder, encodeCapabilities, decodeCapabilities, init_capabilities, leafNodeSources, leafNodeSourceEncoder, encodeLeafNodeSource, decodeLeafNodeSource, init_leafNodeSource, lifetimeEncoder, encodeLifetime, decodeLifetime, defaultLifetime, init_lifetime, leafNodeDataEncoder, encodeLeafNodeData, decodeLeafNodeData, leafNodeInfoKeyPackageEncoder, encodeLeafNodeInfoKeyPackage, leafNodeInfoUpdateOmittedEncoder, encodeLeafNodeInfoUpdateOmitted, leafNodeInfoCommitOmittedEncoder, encodeLeafNodeInfoCommitOmitted, leafNodeInfoOmittedEncoder, encodeLeafNodeInfoOmitted, decodeLeafNodeInfoKeyPackage, decodeLeafNodeInfoUpdateOmitted, decodeLeafNodeInfoCommitOmitted, decodeLeafNodeInfoOmitted, leafNodeInfoUpdateEncoder, encodeLeafNodeInfoUpdate, leafNodeInfoCommitEncoder, encodeLeafNodeInfoCommit, leafNodeInfoEncoder, encodeLeafNodeInfo, decodeLeafNodeInfoUpdate, decodeLeafNodeInfoCommit, decodeLeafNodeInfo, leafNodeTBSEncoder, encodeLeafNodeTBS, leafNodeEncoder, encodeLeafNode, decodeLeafNode, decodeLeafNodeKeyPackage, decodeLeafNodeCommit, decodeLeafNodeUpdate, init_leafNode, keyPackageTBSEncoder, encodeKeyPackageTBS, decodeKeyPackageTBS, keyPackageEncoder, encodeKeyPackage, decodeKeyPackage, init_keyPackage, init_kdf, pskTypes, pskTypeEncoder, encodePskType, decodePskType, resumptionPSKUsages, resumptionPSKUsageEncoder, encodeResumptionPSKUsage, decodeResumptionPSKUsage, encodePskInfoExternal, encodePskInfoResumption, decodePskInfoResumption, pskInfoEncoder, encodePskInfo, decodePskInfo, pskIdEncoder, encodePskId, decodePskId, pskLabelEncoder, encodePskLabel, decodePskLabel, init_presharedkey, addEncoder, encodeAdd, decodeAdd, updateEncoder, encodeUpdate, decodeUpdate, removeEncoder, encodeRemove, decodeRemove, pskEncoder, encodePSK, decodePSK, reinitEncoder, encodeReinit, decodeReinit, externalInitEncoder, encodeExternalInit, decodeExternalInit, groupContextExtensionsEncoder, encodeGroupContextExtensions, decodeGroupContextExtensions, proposalAddEncoder, encodeProposalAdd, proposalUpdateEncoder, encodeProposalUpdate, proposalRemoveEncoder, encodeProposalRemove, proposalPSKEncoder, encodeProposalPSK, proposalReinitEncoder, encodeProposalReinit, proposalExternalInitEncoder, encodeProposalExternalInit, proposalGroupContextExtensionsEncoder, encodeProposalGroupContextExtensions, proposalCustomEncoder, encodeProposalCustom, proposalEncoder, encodeProposal, decodeProposalAdd, decodeProposalUpdate, decodeProposalRemove, decodeProposalPSK, decodeProposalReinit, decodeProposalExternalInit, decodeProposalGroupContextExtensions, decodeProposal, init_proposal, proposalOrRefTypes, proposalOrRefTypeEncoder, encodeProposalOrRefType, decodeProposalOrRefType, proposalOrRefProposalEncoder, encodeProposalOrRefProposal, proposalOrRefProposalRefEncoder, encodeProposalOrRefProposalRef, proposalOrRefEncoder, encodeProposalOrRef, decodeProposalOrRef, init_proposalOrRefType, init_hpke, groupContextEncoder, encodeGroupContext, decodeGroupContext, init_groupContext, nodeTypes, nodeTypeEncoder, encodeNodeType, decodeNodeType, init_nodeType, parentNodeEncoder, encodeParentNode, decodeParentNode, init_parentNode, init_treemath, nodeEncoder, encodeNode, decodeNode, ratchetTreeEncoder, encodeRatchetTree, decodeRatchetTree, init_ratchetTree, leafNodeHashInputEncoder, encodeLeafNodeHashInput, decodeLeafNodeHashInput, parentNodeHashInputEncoder, encodeParentNodeHashInput, decodeParentNodeHashInput, treeHashInputEncoder, encodeTreeHashInput, decodeTreeHashInput, init_treeHash, parentHashInputEncoder, encodeParentHashInput, decodeParentHashInput, init_parentHash, hpkeCiphertextEncoder, encodeHpkeCiphertext, decodeHpkeCiphertext, init_hpkeCiphertext, updatePathNodeEncoder, encodeUpdatePathNode, decodeUpdatePathNode, updatePathEncoder, encodeUpdatePath, decodeUpdatePath, init_updatePath, commitEncoder, encodeCommit, decodeCommit, init_commit, contentTypes, contentTypeEncoder, encodeContentType, decodeContentType, init_contentType, wireformats, wireformatEncoder, encodeWireformat, decodeWireformat, init_wireformat, senderTypes, senderTypeEncoder, encodeSenderType, decodeSenderType, senderEncoder, encodeSender, decodeSender, reuseGuardEncoder, encodeReuseGuard, decodeReuseGuard, senderDataEncoder, encodeSenderData, decodeSenderData, senderDataAADEncoder, encodeSenderDataAAD, decodeSenderDataAAD, init_sender, framedContentApplicationDataEncoder, encodeFramedContentApplicationData, framedContentProposalDataEncoder, encodeFramedContentProposalData, framedContentCommitDataEncoder, encodeFramedContentCommitData, framedContentInfoEncoder, encodeFramedContentInfo, decodeFramedContentApplicationData, decodeFramedContentProposalData, decodeFramedContentCommitData, decodeFramedContentInfo, framedContentEncoder, encodeFramedContent, decodeFramedContent, senderInfoEncoder, encodeSenderInfo, framedContentTBSEncoder, encodeFramedContentTBS, encodeFramedContentAuthDataContent, encodeFramedContentAuthDataCommit, framedContentAuthDataEncoder, encodeFramedContentAuthData, decodeFramedContentAuthDataCommit, init_framedContent, authenticatedContentEncoder, encodeAuthenticatedContent, decodeAuthenticatedContent, authenticatedContentTBMEncoder, encodeAuthenticatedContentTBM, init_authenticatedContent, publicMessageInfoEncoder, encodePublicMessageInfo, publicMessageEncoder, encodePublicMessage, decodePublicMessage, init_publicMessage, init_messageProtectionPublic, init_externalProposal, requiredCapabilitiesEncoder, encodeRequiredCapabilities, decodeRequiredCapabilities, init_requiredCapabilities, defaultAuthenticationService, init_authenticationService, defaultPaddingConfig, init_paddingConfig, defaultKeyPackageEqualityConfig, init_keyPackageEqualityConfig, defaultLifetimeConfig, init_lifetimeConfig, defaultKeyRetentionConfig, init_keyRetentionConfig, groupInfoTBSEncoder, encodeGroupInfoTBS, decodeGroupInfoTBS, groupInfoEncoder, encodeGroupInfo, decodeGroupInfo, init_groupInfo, keyScheduleEncoder, encodeKeySchedule, decodeKeySchedule, init_keySchedule, generationSecretEncoder, decodeGenerationSecret, secretTreeNodeEncoder, decodeSecretTreeNode, secretTreeEncoder, decodeSecretTree, init_secretTree, confirmedTranscriptHashInputEncoder, encodeConfirmedTranscriptHashInput, decodeConfirmedTranscriptHashInput, init_transcriptHash, groupSecretsEncoder, encodeGroupSecrets, decodeGroupSecrets, init_groupSecrets, encryptedGroupSecretsEncoder, encodeEncryptedGroupSecrets, decodeEncryptedGroupSecrets, welcomeEncoder, encodeWelcome, decodeWelcome, init_welcome, init_pathSecrets, privateKeyPathEncoder, decodePrivateKeyPath, init_privateKeyPath, proposalWithSenderEncoder, decodeProposalWithSender, unappliedProposalsEncoder, decodeUnappliedProposals, init_unappliedProposals, emptyPskIndex, init_pskIndex, init_addToMap, defaultClientConfig, init_clientConfig, init_array, stringEncoder, encodeString, decodeString, init_string, activeEncoder, suspendedPendingReinitEncoder, removedFromGroupEncoder, groupActiveStateEncoder, decodeGroupActiveState, init_groupActiveState, epochReceiverDataEncoder, decodeEpochReceiverData, init_epochReceiverData, groupStateEncoder, encodeGroupState, decodeGroupState, groupStateEncoderWithoutTree, encodeGroupStateWithoutTree, emptyProposals, init_clientState, privateMessageEncoder, encodePrivateMessage, decodePrivateMessage, privateContentAADEncoder, encodePrivateContentAAD, decodePrivateContentAAD, init_privateMessage, init_messageProtection, init_createMessage, init_createCommit, init_processMessages, init_makeHashImpl, HpkeError, InvalidParamError, SerializeError, DeserializeError, EncapError, DecapError, ExportError, SealError, OpenError, MessageLimitReachedError, DeriveKeyPairError, NotSupportedError, init_errors, dntGlobals, dntGlobalThis, init_dnt_shims, NativeAlgorithm, init_algorithm, Mode, KemId, KdfId, AeadId, init_identifiers, INPUT_LENGTH_LIMIT, INFO_LENGTH_LIMIT, MINIMUM_PSK_LENGTH, EMPTY, BYTE_TO_BIGINT_256, init_consts, SUITE_ID_HEADER_KEM, init_kemInterface, HPKE_VERSION, HkdfNative, HkdfSha256Native, HkdfSha384Native, HkdfSha512Native, init_hkdf, isCryptoKeyPair, init_misc, LABEL_EAE_PRK, LABEL_SHARED_SECRET, Dhkem, init_dhkem, KEM_USAGES, LABEL_DKP_PRK, LABEL_SK, init_dhkemPrimitives, Bignum, init_bignum, LABEL_CANDIDATE, ORDER_P_256, ORDER_P_384, ORDER_P_521, PKCS8_ALG_ID_P_256, PKCS8_ALG_ID_P_384, PKCS8_ALG_ID_P_521, EC_P_256_PARAMS, EC_P_384_PARAMS, EC_P_521_PARAMS, Ec, init_ec, init_xCryptoKey, init_xCurve, init_hybridkem, AEAD_USAGES, init_aeadEncryptionContext, _endianTestBuffer, _endianTestBytes, isLE2, init_noble, init_hash2, _HMAC, hmac, init_hmac, init_md2, U32_MASK642, _32n2, init_u642, init_sha2, _0n, _1n, _2n, _7n, _256n, _0x71n, SHA3_PI, SHA3_ROTL, _SHA3_IOTA, IOTAS, SHA3_IOTA_H, SHA3_IOTA_L, init_sha3, init_modular, init_curve, init_montgomery, init_mod, AesGcmContext, Aes128Gcm, Aes256Gcm, init_aesGcm, init_exportOnly, init_emitNotSupported, LABEL_SEC, ExporterContextImpl, RecipientExporterContextImpl, SenderExporterContextImpl, init_exporterContext, EncryptionContextImpl, init_encryptionContext, __classPrivateFieldGet, __classPrivateFieldSet, _Mutex_locked, Mutex, init_mutex, __classPrivateFieldGet2, __classPrivateFieldSet2, _RecipientContextImpl_mutex, RecipientContextImpl, init_recipientContext, __classPrivateFieldGet3, __classPrivateFieldSet3, _SenderContextImpl_mutex, SenderContextImpl, init_senderContext, LABEL_BASE_NONCE, LABEL_EXP, LABEL_INFO_HASH, LABEL_KEY, LABEL_PSK_ID_HASH, LABEL_SECRET, SUITE_ID_HEADER_HPKE, CipherSuiteNative, init_cipherSuiteNative, DhkemP256HkdfSha256Native, DhkemP384HkdfSha384Native, DhkemP521HkdfSha512Native, init_dhkemNative, CipherSuite, DhkemP256HkdfSha256, DhkemP384HkdfSha384, DhkemP521HkdfSha512, HkdfSha256, HkdfSha384, HkdfSha512, init_native, ALG_NAME, PKCS8_ALG_ID_X25519, BASE_POINT_X25519, X25519, init_x25519, DhkemX25519HkdfSha256, init_dhkemX25519, PKCS8_ALG_ID_X448, init_x448, init_dhkemX448, init_mod2, init_hpke2, isLE3, wrapCipher, init_utils2, encodeStr, sigma16, sigma32, sigma16_32, sigma32_32, BLOCK_LEN, BLOCK_LEN32, MAX_COUNTER, U32_EMPTY, _XorStreamPRG, createPRG, init_arx, Poly1305, poly1305, init_poly1305, chacha_exports, chacha20orig, chacha20, xchacha20, chacha8, chacha12, ZEROS16, updatePadded, ZEROS32, _poly1305_aead, chacha20poly1305, xchacha20poly1305, rngChacha20, rngChacha8, init_chacha, init_makeAead, init_makeKdfImpl, init_makeDhKem, init_makeHpke, defaultRng, init_rng, crypto3, init_cryptoNode, isLE4, swap32IfBE3, hasHexBuiltin2, hexes2, asciis, Hash, init_utils3, HashMD3, SHA256_IV3, SHA384_IV3, SHA512_IV3, init_md3, U32_MASK643, _32n3, shrSH3, shrSL3, rotrSH3, rotrSL3, rotrBH3, rotrBL3, rotlSH2, rotlSL2, rotlBH2, rotlBL2, add3L3, add3H3, add4L3, add4H3, add5L3, add5H3, init_u643, SHA256_K, SHA256_W, SHA256, K512, SHA512_Kh, SHA512_Kl, SHA512_W_H, SHA512_W_L, SHA512, SHA384, sha2563, sha5122, sha3842, init_sha22, _0n2, _1n2, isPosBig, bitMask, notImplemented, init_utils4, _0n3, _1n3, _2n2, _3n, _4n, _5n, _7n2, _8n, _9n, _16n, isNegativeLE, FIELD_FIELDS, init_modular2, _0n4, _1n4, pointPrecomputes, pointWindowSizes, wNAF, init_curve2, _0n5, _1n5, _2n3, _8n2, PrimeEdwardsPoint, init_edwards, os2ip, _DST_scalar, init_hash_to_curve, _0n6, _1n6, _2n4, init_montgomery2, ed25519_exports, _0n7, _1n7, _2n5, _3n2, _5n2, _8n3, ed25519_CURVE_p, ed25519_CURVE, ED25519_SQRT_M1, Fp, Fn, ed25519Defaults, ed25519, ed25519ctx, ed25519ph, x25519, ELL2_C1, ELL2_C2, ELL2_C3, ELL2_C1_EDWARDS, ed25519_hasher, SQRT_M1, SQRT_AD_MINUS_ONE, INVSQRT_A_MINUS_D, ONE_MINUS_D_SQ, D_MINUS_ONE_SQ, invertSqrt, MAX_255B, bytes255ToNumberLE, _RistrettoPoint, ristretto255, ristretto255_hasher, ED25519_TORSION_SUBGROUP, edwardsToMontgomery, RistrettoPoint, hashToCurve, encodeToCurve, hashToRistretto255, hash_to_ristretto255, init_ed25519, _0n8, _1n8, _2n6, _7n3, _256n2, _0x71n2, SHA3_PI2, SHA3_ROTL2, _SHA3_IOTA2, IOTAS2, SHA3_IOTA_H2, SHA3_IOTA_L2, rotlH, rotlL, Keccak, genShake, shake2562, init_sha32, ed448_exports, ed448_CURVE, E448_CURVE, shake256_114, shake256_64, _1n9, _2n7, _3n3, _4n2, _11n, _22n, _44n, _88n, _223n, Fp2, Fn2, Fp448, Fn448, ED448_DEF, ed448, ed448ph, E448, x448, ELL2_C12, ELL2_J, ed448_hasher, ONE_MINUS_D, ONE_MINUS_TWO_D, SQRT_MINUS_D, INVSQRT_MINUS_D, invertSqrt2, _DecafPoint, decaf448, decaf448_hasher, ED448_TORSION_SUBGROUP, DecafPoint, hashToCurve2, encodeToCurve2, hashToDecaf448, hash_to_decaf448, edwardsToMontgomery2, init_ed448, HMAC, hmac2, init_hmac2, divNearest, DERErr, DER, _0n9, _1n10, _2n8, _3n4, _4n3, init_weierstrass, init_shortw_utils, nist_exports, p256_CURVE, p384_CURVE, p521_CURVE, Fp256, Fp384, Fp521, p256, p256_hasher, p384, p384_hasher, p521, secp256r1, secp384r1, secp521r1, p521_hasher, init_nist, init_makeNobleSignatureImpl, defaultCryptoProvider, init_provider, init_getCiphersuiteImpl, init_resumption, SHA256_K2, SHA256_W2, SHA2_32B, _SHA256, K5122, SHA512_Kh2, SHA512_Kl2, SHA512_W_H2, SHA512_W_L2, SHA2_64B, _SHA512, _SHA384, sha2564, sha5123, sha3843, init_sha23, _HMAC2, hmac3, init_hmac3, init_makeHashImpl2, init_makeNobleSignatureImpl2, BLOCK_SIZE, ZEROS162, ZEROS322, POLY, mul2, swapLE, estimateWindow, GHASH, Polyval, ghash, polyval, init_polyval, BLOCK_SIZE2, BLOCK_SIZE32, EMPTY_BLOCK, POLY2, sbox, rotr32_8, rotl32_8, tableEncoding, xPowers, gcm, _CMAC, cmac, init_aes, init_makeAead2, init_makeKdfImpl2, init_makeDhKem2, init_makeHpke2, init_rng2, nobleCryptoProvider, init_provider2, mlsPublicMessageEncoder, encodeMlsPublicMessage, mlsWelcomeEncoder, encodeMlsWelcome, mlsPrivateMessageEncoder, encodeMlsPrivateMessage, mlsGroupInfoEncoder, encodeMlsGroupInfo, mlsKeyPackageEncoder, encodeMlsKeyPackage, mlsMessageContentEncoder, encodeMlsMessageContent, decodeMlsMessageContent, mlsMessageEncoder, encodeMlsMessage, decodeMlsMessage, init_message, greaseValues, defaultGreaseConfig, init_grease, init_defaultCapabilities, init_src, DEFAULT_CIPHERSUITE, MLSGroupManager, init_mls_group, DOMAIN, NONCE_BYTES3, init_owner_sync, init_mls_delivery_order, init_mls_presend_epoch, dist_exports2, init_dist2, DIR_MODE, FILE_MODE, init_secure_file, SYNC_LOCK_STALE_MS, pendingKpPath, init_mls_state, init_mls_kp_pool, PACKAGE, FALLBACK, MAX_LEN, DISALLOWED, init_client_version, CredentialStore, init_credential_store, init_crypto_helpers, STATE_FILE, LEGACY_STATE_FILE, init_state, ACTIVATION_DOMAIN, UUID_RE2, init_transport2, A2ALogGate, init_a2a_log_gate, init_mls_membership_probe, FIRST_DIRTY_DELAY_MS, RETRY_BASE_DELAYS_MS, MAX_RETRY_DELAY_MS, JITTER_FRACTION, HistoryBackupScheduler, init_history_backup_scheduler, FILE_MODE2, init_history_recovery_file, TENANT_ID_PATTERN, DIR_MODE2, FILE_MODE3, HISTORY_RECOVERY_VERIFY_TIMEOUT_MS, VERIFY_TIMEOUT_MESSAGE, HistoryRecoveryVerificationTimeoutError, init_history_recovery_code, ACTIONS, init_decision_reply, history_backup_client_exports, HISTORY_RESTORE_TIMEOUT_MS, HISTORY_RESTORE_RESPONSE_MAX_BYTES, HISTORY_ENVELOPE_MIN_BYTES, HISTORY_AAD_PREFIX, UUID_RE3, GENERATION_RESPONSE_KEYS, utf8Encoder, utf8Decoder, HistoryBackupClient, init_history_backup_client, openclaw_compat_exports, defaultImporter, HEARTBEAT_CANDIDATES, AGENT_EVENT_CANDIDATES, TRANSCRIPT_CANDIDATES, _heartbeatFn, _agentEventFn, _transcriptFn, init_openclaw_compat, http_handlers_exports, init_http_handlers, mcp_proxy_helpers_exports, init_mcp_proxy_helpers, workspace_handlers_exports, MAX_FILE_SIZE, init_workspace_handlers, ROOM_AGENT_TYPES, CREDENTIAL_MESSAGE_TYPES, CATCHUP_MESSAGE_TYPES, POLL_INTERVAL_MS, RECONNECT_BASE_MS, UUID_RE4, RECONNECT_MAX_MS, PENDING_POLL_INTERVAL_MS, HISTORY_RESTORE_TIMEOUT_MS2, HISTORY_UPLOAD_TIMEOUT_MS, CANONICAL_TIMESTAMP_RE, OUTBOUND_DEDUPE_WINDOW_MS, OUTBOUND_DEDUPE_MAX_SUPPRESS_MS, OUTBOUND_DEDUPE_MAX, OUTBOUND_DEDUPE_TYPES, RETRY_CANDIDATE_TTL_MS, RETRY_CANDIDATE_MAX, ROOM_FULFIL_COOLDOWN_MS, SecureChannel, init_channel, init_types, DEFAULT_API_URL, DEFAULT_HTTP_PORT, init_account_config, init_lifecycle, _ocRuntime, _channels, agentVaultPlugin, init_openclaw_plugin, init_gateway_send, init_llm_response_parser, OPENROUTER_PRICING, init_llm_pricing_openrouter, LEGACY_PRICING, PRICING, init_llm_cost, traceStore, init_fetch_interceptor, init_tool_audit, init_harness_compat, managedRoutesRequested, init_openclaw_entry, util, objectUtil, ZodParsedType, getParsedType, init_util, ZodIssueCode, ZodError, init_ZodError, errorMap, en_default, init_en, overrideErrorMap, init_errors2, makeIssue, ParseStatus, INVALID, DIRTY, OK, isAborted, isDirty, isValid, isAsync, init_parseUtil, init_typeAliases, errorUtil, init_errorUtil, ParseInputLazyPath, handleResult, ZodType, cuidRegex, cuid2Regex, ulidRegex, uuidRegex, nanoidRegex, jwtRegex, durationRegex, emailRegex, _emojiRegex, emojiRegex, ipv4Regex, ipv4CidrRegex, ipv6Regex, ipv6CidrRegex, base64Regex, base64urlRegex, dateRegexSource, dateRegex, ZodString, ZodNumber, ZodBigInt, ZodBoolean, ZodDate, ZodSymbol, ZodUndefined, ZodNull, ZodAny, ZodUnknown, ZodNever, ZodVoid, ZodArray, ZodObject, ZodUnion, getDiscriminator, ZodDiscriminatedUnion, ZodIntersection, ZodTuple, ZodRecord, ZodMap, ZodSet, ZodFunction, ZodLazy, ZodLiteral, ZodEnum, ZodNativeEnum, ZodPromise, ZodEffects, ZodOptional, ZodNullable, ZodDefault, ZodCatch, ZodNaN, ZodBranded, ZodPipeline, ZodReadonly, late, ZodFirstPartyTypeKind, stringType, numberType, nanType, bigIntType, booleanType, dateType, symbolType, undefinedType, nullType, anyType, unknownType, neverType, voidType, arrayType, objectType, strictObjectType, unionType, discriminatedUnionType, intersectionType, tupleType, recordType, mapType, setType, functionType, lazyType, literalType, enumType, nativeEnumType, promiseType, effectsType, optionalType, nullableType, preprocessType, pipelineType, init_types2, init_external, init_v3, util_exports, Cached, EVALUATING, captureStackTrace, allowsEval, getParsedType2, propertyKeyTypes, primitiveTypes, NUMBER_FORMAT_RANGES, BIGINT_FORMAT_RANGES, highSurrogate, Class, installing, broke, breaker, CONSTANT_CATCH, init_util2, _a2, _zodDesc, _E, $ZodAsyncError, $ZodEncodeError, globalConfig, init_core, _messageDesc, _issuesDesc, _installedToString, initializer, $ZodError, $ZodRealError, init_errors3, _parse, parse, _parseAsync, parseAsync, _safeParse, safeParse, _safeParseAsync, safeParseAsync, COMPILE_INVALID, COMPILE_FALLBACK, validate, validateAsync, _encode, _decode, _encodeAsync, _decodeAsync, _safeEncode, _safeDecode, _safeEncodeAsync, _safeDecodeAsync, init_parse, cuid, cuid2, ulid, xid, ksuid, nanoid, duration, guid, uuid, email, _emoji, ipv4, ipv6, cidrv4, cidrv6, base64, base64url, httpProtocol, e164, dateSource, date, anyString, integer, number, boolean, _null, lowercase, uppercase, init_regexes, $ZodCheck, _whenHasLength, numericOriginMap, $ZodCheckLessThan, $ZodCheckGreaterThan, $ZodCheckMultipleOf, $ZodCheckNumberFormat, $ZodCheckMaxLength, $ZodCheckMinLength, $ZodCheckLengthEquals, $ZodCheckStringFormat, $ZodCheckRegex, $ZodCheckLowerCase, $ZodCheckUpperCase, $ZodCheckIncludes, $ZodCheckStartsWith, $ZodCheckEndsWith, $ZodCheckOverwrite, init_checks, Doc, init_doc, version, init_versions, $ZodType, toStandardResult, $ZodString, $ZodStringFormat, $ZodGUID, $ZodUUID, $ZodEmail, URL_BAD_FORMAT, URL_UNPARSEABLE, asciiTabOrNewline, $ZodURL, $ZodEmoji, $ZodNanoID, $ZodCUID, $ZodCUID2, $ZodULID, $ZodXID, $ZodKSUID, $ZodISODateTime, $ZodISODate, $ZodISOTime, $ZodISODuration, $ZodIPv4, ipv6Alphabet, $ZodIPv6, $ZodCIDRv4, $ZodCIDRv6, base64Charset, $ZodBase64, base64urlCharset, $ZodBase64URL, $ZodE164, $ZodJWT, $ZodNumber, $ZodNumberFormat, $ZodBoolean, $ZodNull, $ZodUnknown, $ZodNever, arraySize, $ZodArray, NO_SYMBOL_KEYS, $ZodObject, $ZodObjectJIT, $ZodUnion, $ZodDiscriminatedUnion, $ZodIntersection, $ZodRecord, $ZodEnum, $ZodLiteral, $ZodTransform, $ZodOptional, $ZodExactOptional, $ZodNullable, $ZodDefault, $ZodPrefault, $ZodNonOptional, $ZodCatch, $ZodPipe, $ZodPreprocess, $ZodReadonly, $ZodCustom, init_schemas, $ZodCyclicError, STATE, NO_ISSUES, recursive, NONE, ASSUMED, PROVEN, handoff, open4, memo, init_memoizer, error, init_en2, init_locales, _a3, $ZodRegistry, globalRegistry, init_registries, init_compile, init_api, FOLDABLE_KEYS, UNION_KEYS, createToJSONSchemaMethod, createStandardJSONSchemaMethod, init_to_json_schema, narrowMin, narrowMax, narrowBoth, addDivisor, addPattern, intersectMime, setFormat, minContributor, maxContributor, formatContributor, contributors, formatMap, exactPatterns, exactPattern, stringProcessor, numberProcessor, booleanProcessor, bigintProcessor, symbolProcessor, nullProcessor, undefinedProcessor, voidProcessor, neverProcessor, anyProcessor, unknownProcessor, dateProcessor, enumProcessor, literalProcessor, nanProcessor, templateLiteralProcessor, fileProcessor, successProcessor, customProcessor, functionProcessor, transformProcessor, mapProcessor, setProcessor, arrayProcessor, objectProcessor, unionProcessor, intersectionProcessor, tupleProcessor, pendingRecords, recordProcessor, nullableProcessor, nonoptionalProcessor, UNREPRESENTABLE_DEFAULT, defaultProcessor, prefaultProcessor, catchProcessor, pipeProcessor, readonlyProcessor, promiseProcessor, optionalProcessor, lazyProcessor, allProcessors, init_json_schema_processors, init_json_schema, init_core2, init_parse2, ZodMiniType, ZodMiniObject, init_schemas2, init_checks2, init_iso, init_coerce, init_external2, init_v4_mini, init_zod_compat, init_checks3, _installedErrorProtos, initializer2, ZodRealError, init_errors4, parse2, parseAsync2, safeParse3, safeParseAsync3, encode3, decode2, encodeAsync2, decodeAsync2, safeEncode2, safeDecode2, safeEncodeAsync2, safeDecodeAsync2, init_parse3, ZodType2, _ZodString, ZodString2, ZodStringFormat, ZodISODateTime, ZodISODate, ZodISOTime, ZodISODuration, ZodEmail, ZodGUID, ZodUUID, ZodURL, ZodEmoji, ZodNanoID, ZodCUID, ZodCUID2, ZodULID, ZodXID, ZodKSUID, ZodIPv4, ZodIPv6, ZodCIDRv4, ZodCIDRv6, ZodBase64, ZodBase64URL, ZodE164, ZodJWT, ZodNumber2, ZodNumberFormat, ZodBoolean2, ZodNull2, ZodUnknown2, ZodNever2, ZodArray2, ZodObject2, ZodUnion2, ZodDiscriminatedUnion2, ZodIntersection2, ZodRecord2, ZodEnum2, ZodLiteral2, ZodTransform, ZodOptional2, ZodExactOptional, ZodNullable2, ZodDefault2, ZodPrefault, ZodNonOptional, ZodCatch2, ZodPipe, ZodPreprocess, ZodReadonly2, ZodCustom, init_schemas3, ZodFirstPartyTypeKind2, init_compat, iso_exports2, init_iso2, init_coerce2, init_external3, init_classic, init_v4, LATEST_PROTOCOL_VERSION, DEFAULT_NEGOTIATED_PROTOCOL_VERSION, SUPPORTED_PROTOCOL_VERSIONS, RELATED_TASK_META_KEY, JSONRPC_VERSION, AssertObjectSchema, ProgressTokenSchema, CursorSchema, TaskCreationParamsSchema, TaskMetadataSchema, RelatedTaskMetadataSchema, RequestMetaSchema, BaseRequestParamsSchema, TaskAugmentedRequestParamsSchema, isTaskAugmentedRequestParams, RequestSchema, NotificationsParamsSchema, NotificationSchema, ResultSchema, RequestIdSchema, JSONRPCRequestSchema, isJSONRPCRequest, JSONRPCNotificationSchema, isJSONRPCNotification, JSONRPCResultResponseSchema, isJSONRPCResultResponse, ErrorCode, JSONRPCErrorResponseSchema, isJSONRPCErrorResponse, JSONRPCMessageSchema, JSONRPCResponseSchema, EmptyResultSchema, CancelledNotificationParamsSchema, CancelledNotificationSchema, IconSchema, IconsSchema, BaseMetadataSchema, ImplementationSchema, FormElicitationCapabilitySchema, ElicitationCapabilitySchema, ClientTasksCapabilitySchema, ServerTasksCapabilitySchema, ClientCapabilitiesSchema, InitializeRequestParamsSchema, InitializeRequestSchema, isInitializeRequest, ServerCapabilitiesSchema, InitializeResultSchema, InitializedNotificationSchema, PingRequestSchema, ProgressSchema, ProgressNotificationParamsSchema, ProgressNotificationSchema, PaginatedRequestParamsSchema, PaginatedRequestSchema, PaginatedResultSchema, TaskStatusSchema, TaskSchema, CreateTaskResultSchema, TaskStatusNotificationParamsSchema, TaskStatusNotificationSchema, GetTaskRequestSchema, GetTaskResultSchema, GetTaskPayloadRequestSchema, GetTaskPayloadResultSchema, ListTasksRequestSchema, ListTasksResultSchema, CancelTaskRequestSchema, CancelTaskResultSchema, ResourceContentsSchema, TextResourceContentsSchema, Base64Schema, BlobResourceContentsSchema, RoleSchema, AnnotationsSchema, ResourceSchema, ResourceTemplateSchema, ListResourcesRequestSchema, ListResourcesResultSchema, ListResourceTemplatesRequestSchema, ListResourceTemplatesResultSchema, ResourceRequestParamsSchema, ReadResourceRequestParamsSchema, ReadResourceRequestSchema, ReadResourceResultSchema, ResourceListChangedNotificationSchema, SubscribeRequestParamsSchema, SubscribeRequestSchema, UnsubscribeRequestParamsSchema, UnsubscribeRequestSchema, ResourceUpdatedNotificationParamsSchema, ResourceUpdatedNotificationSchema, PromptArgumentSchema, PromptSchema, ListPromptsRequestSchema, ListPromptsResultSchema, GetPromptRequestParamsSchema, GetPromptRequestSchema, TextContentSchema, ImageContentSchema, AudioContentSchema, ToolUseContentSchema, EmbeddedResourceSchema, ResourceLinkSchema, ContentBlockSchema, PromptMessageSchema, GetPromptResultSchema, PromptListChangedNotificationSchema, ToolAnnotationsSchema, ToolExecutionSchema, ToolSchema, ListToolsRequestSchema, ListToolsResultSchema, CallToolResultSchema, CompatibilityCallToolResultSchema, CallToolRequestParamsSchema, CallToolRequestSchema, ToolListChangedNotificationSchema, ListChangedOptionsBaseSchema, LoggingLevelSchema, SetLevelRequestParamsSchema, SetLevelRequestSchema, LoggingMessageNotificationParamsSchema, LoggingMessageNotificationSchema, ModelHintSchema, ModelPreferencesSchema, ToolChoiceSchema, ToolResultContentSchema, SamplingContentSchema, SamplingMessageContentBlockSchema, SamplingMessageSchema, CreateMessageRequestParamsSchema, CreateMessageRequestSchema, CreateMessageResultSchema, CreateMessageResultWithToolsSchema, BooleanSchemaSchema, StringSchemaSchema, NumberSchemaSchema, UntitledSingleSelectEnumSchemaSchema, TitledSingleSelectEnumSchemaSchema, LegacyTitledEnumSchemaSchema, SingleSelectEnumSchemaSchema, UntitledMultiSelectEnumSchemaSchema, TitledMultiSelectEnumSchemaSchema, MultiSelectEnumSchemaSchema, EnumSchemaSchema, PrimitiveSchemaDefinitionSchema, ElicitRequestFormParamsSchema, ElicitRequestURLParamsSchema, ElicitRequestParamsSchema, ElicitRequestSchema, ElicitationCompleteNotificationParamsSchema, ElicitationCompleteNotificationSchema, ElicitResultSchema, ResourceTemplateReferenceSchema, PromptReferenceSchema, CompleteRequestParamsSchema, CompleteRequestSchema, CompleteResultSchema, RootSchema, ListRootsRequestSchema, ListRootsResultSchema, RootsListChangedNotificationSchema, ClientRequestSchema, ClientNotificationSchema, ClientResultSchema, ServerRequestSchema, ServerNotificationSchema, ServerResultSchema, McpError, UrlElicitationRequiredError, init_types3, init_interfaces, ignoreOverride, defaultOptions, getDefaultOptions, init_Options, getRefs, init_Refs, init_errorMessages, getRelativePath, init_getRelativePath, init_any, init_array2, init_bigint, init_boolean, init_branded, parseCatchDef, init_catch, integerDateParser, init_date, init_default, init_effects, init_enum, isJsonSchema7AllOfType, init_intersection, init_literal, emojiRegex2, zodPatterns, ALPHA_NUMERIC, init_string2, init_record, init_map, init_nativeEnum, init_never, init_null, primitiveMappings, asAnyOf, init_union, init_nullable, init_number2, init_object, parseOptionalDef, init_optional2, parsePipelineDef, init_pipeline, init_promise, init_set, init_tuple, init_undefined, init_unknown, parseReadonlyDef, init_readonly, selectParser, init_selectParser, get$ref, addMeta, init_parseDef, init_parseTypes, zodToJsonSchema, init_zodToJsonSchema, init_esm, init_zod_json_schema_compat, DEFAULT_REQUEST_TIMEOUT_MSEC, Protocol, init_protocol, require_code, require_scope, require_codegen, require_util, require_names, require_errors, require_boolSchema, require_rules, require_applicability, require_dataType, require_defaults, require_code2, require_keyword, require_subschema, require_fast_deep_equal, require_json_schema_traverse, require_resolve, require_validate, require_validation_error, require_ref_error, require_compile, require_data, require_utils, require_schemes, require_fast_uri, require_uri, require_core, require_id, require_ref, require_core2, require_limitNumber, require_multipleOf, require_ucs2length, require_limitLength, require_pattern, require_limitProperties, require_required, require_limitItems, require_equal, require_uniqueItems, require_const, require_enum, require_validation, require_additionalItems, require_items, require_prefixItems, require_items2020, require_contains, require_dependencies, require_propertyNames, require_additionalProperties, require_properties, require_patternProperties, require_not, require_anyOf, require_oneOf, require_allOf, require_if, require_thenElse, require_applicator, require_format, require_format2, require_metadata, require_draft7, require_types, require_discriminator, require_json_schema_draft_07, require_ajv, require_formats, require_limit, require_dist, import_ajv, import_ajv_formats, AjvJsonSchemaValidator, init_ajv_provider, ExperimentalServerTasks, init_server, init_helpers, Server, init_server2, COMPLETABLE_SYMBOL, McpZodTypeKind, init_completable, init_uriTemplate, TOOL_NAME_REGEX, init_toolNameValidation, ExperimentalMcpServerTasks, init_mcp_server, init_zod, McpServer, EMPTY_OBJECT_JSON_SCHEMA, EMPTY_COMPLETION_RESULT, init_mcp, RequestError, toRequestError, GlobalRequest, Request2, newHeadersFromIncoming, wrapBodyStream, newRequestFromIncoming, getRequestCache, requestCache, incomingKey, urlKey, headersKey, abortControllerKey, getAbortController, requestPrototype, newRequest, responseCache, getResponseCache, cacheKey, GlobalResponse, Response2, buildOutgoingHttpHeaders, X_ALREADY_SENT, outgoingEnded, handleRequestError, handleFetchError, handleResponseError, flushHeaders, responseViaCache, isPromise, responseViaResponseObject, getRequestListener, init_dist22, require_content_type, import_content_type, init_mediaType, DEFAULT_MAX_REQUEST_BODY_SIZE, MAX_BATCH_SIZE, init_requestBody, DEFAULT_SSE_KEEP_ALIVE_MS, MAX_TIMER_DELAY_MS, init_sseKeepAlive, WebStandardStreamableHTTPServerTransport, init_webStandardStreamableHttp, StreamableHTTPServerTransport, init_streamableHttp, AgentVaultMcpServer, init_mcp_server2, init_mcp_handlers, init_skill_manifest, init_skill_invoker, spanBuffer, init_skill_telemetry, PolicyEnforcer, init_policy_enforcer, VERSION, init_index;
|
|
18336
|
+
var __create, __defProp2, __getOwnPropDesc, __getOwnPropNames2, __getProtoOf, __hasOwnProp, __esm2, __commonJS, __export2, __copyProps, __toESM, SENTINEL, WRAPPERS, INSTRUCTION, init_abstention, init_envelope_text, init_mls_commit_classify, MENTION_RE, BROADCAST_NAMES, init_room_protocol, __filename, __dirname, url, path, Module, Module, root, window_, crypto_, randomValuesStandard, crypto2, randomValueNodeJS, _Module, libsodium_sumo_default, init_libsodium_sumo, a, r, t, c, libsodium_wrappers_default, init_libsodium_wrappers, init_keys, init_x3dh, MAX_SKIP, CHAIN_KEY_SEED, MSG_KEY_SEED, HEADER_KEY_SEED, DoubleRatchet, init_ratchet, init_file_crypto, DOMAIN_DID_DOCUMENT, DOMAIN_TRANSFER_INTENT, DOMAIN_TRANSFER_ACCEPT, BASE58_ALPHABET, init_did, BUILTIN_PATTERNS, ScanEngine, init_scan_engine, init_merkle, VC_CONTEXT_V2, AV_CREDENTIAL_CONTEXT, CRYPTOSUITE, BASE58_ALPHABET2, init_vc, init_transport, init_telemetry, TelemetryReporter, init_telemetry_reporter, CROCKFORD, ARGON2_OPSLIMIT, ARGON2_MEMLIMIT, SALT_BYTES, NONCE_BYTES, KEY_BYTES, BACKUP_VERSION, MAX_BACKUP_SIZE, init_backup, atitle, aobject, aopts, isLE, swap8IfBE, swap32IfBE, hasHexBuiltin, hexes, oidNist, init_utils, BSIGMA, init_blake, U32_MASK64, _32n, fromNumH, fromNumL, shrSH, shrSL, rotrSH, rotrSL, rotrBH, rotrBL, rotr32H, rotr32L, add3L, add3H, add4L, add4H, add5L, add5H, init_u64, HashMD, SHA256_IV, SHA384_IV, SHA512_IV, init_md, B2B_IV, BBUF, _BLAKE2, _BLAKE2b, blake2b, init_blake2, CROCKFORD2, SALT_BYTES2, NONCE_BYTES2, KEY_BYTES2, TAG_BYTES, ENVELOPE_OVERHEAD, AAD_PREFIX, UUID_RE, UUID_V4_RE, DIGEST_ID_RE, TIMESTAMP_RE, encoder, decoder, HISTORY_MAGIC, HISTORY_ARCHIVE_VERSION, HISTORY_MAX_ENTRIES, HISTORY_MAX_BLOB_BYTES, HISTORY_KDF_OPSLIMIT, HISTORY_KDF_MEMLIMIT, HistoryEntryTooLargeError, init_history_backup, init_approval, encVoid, init_tlsEncoder, uint8Encoder, encodeUint8, decodeUint8, uint16Encoder, encodeUint16, decodeUint16, uint32Encoder, encodeUint32, decodeUint32, uint64Encoder, encodeUint64, decodeUint64, init_number, init_tlsDecoder, init_enumHelpers, defaultProposalTypes, defaultProposalTypeEncoder, encodeDefaultProposalType, decodeDefaultProposalType, init_defaultProposalType, defaultExtensionTypes, defaultExtensionTypeEncoder, encodeDefaultExtensionType, decodeDefaultExtensionType, init_defaultExtensionType, acceptAll, init_incomingMessageAction, MlsError, ValidationError, CodecError, UsageError, DependencyError, CryptoVerificationError, CryptoError, InternalError, init_mlsError, init_byteArray, varLenDataEncoder, decodeVarLenData, init_variableLength, init_constantTimeCompare, extensionTypeEncoder, encodeExtensionType, decodeExtensionType, extensionEncoder, encodeExtension, decodeExtension, init_extension, credentialTypes, credentialTypeEncoder, encodeCredentialType, decodeCredentialType, init_credentialType, credentialBasicEncoder, encodeCredentialBasic, credentialX509Encoder, encodeCredentialX509, credentialCustomEncoder, encodeCredentialCustom, credentialEncoder, encodeCredential, decodeCredentialBasic, decodeCredentialX509, decodeCredential, init_credential, externalSenderEncoder, encodeExternalSender, decodeExternalSender, init_externalSender, init_hash, init_optional, ciphersuites, ciphersuiteEncoder, encodeCiphersuite, decodeCiphersuite, ciphersuiteValues, init_ciphersuite, init_signature, protocolVersions, protocolVersionEncoder, encodeProtocolVersion, decodeProtocolVersion, init_protocolVersion, capabilitiesEncoder, encodeCapabilities, decodeCapabilities, init_capabilities, leafNodeSources, leafNodeSourceEncoder, encodeLeafNodeSource, decodeLeafNodeSource, init_leafNodeSource, lifetimeEncoder, encodeLifetime, decodeLifetime, defaultLifetime, init_lifetime, leafNodeDataEncoder, encodeLeafNodeData, decodeLeafNodeData, leafNodeInfoKeyPackageEncoder, encodeLeafNodeInfoKeyPackage, leafNodeInfoUpdateOmittedEncoder, encodeLeafNodeInfoUpdateOmitted, leafNodeInfoCommitOmittedEncoder, encodeLeafNodeInfoCommitOmitted, leafNodeInfoOmittedEncoder, encodeLeafNodeInfoOmitted, decodeLeafNodeInfoKeyPackage, decodeLeafNodeInfoUpdateOmitted, decodeLeafNodeInfoCommitOmitted, decodeLeafNodeInfoOmitted, leafNodeInfoUpdateEncoder, encodeLeafNodeInfoUpdate, leafNodeInfoCommitEncoder, encodeLeafNodeInfoCommit, leafNodeInfoEncoder, encodeLeafNodeInfo, decodeLeafNodeInfoUpdate, decodeLeafNodeInfoCommit, decodeLeafNodeInfo, leafNodeTBSEncoder, encodeLeafNodeTBS, leafNodeEncoder, encodeLeafNode, decodeLeafNode, decodeLeafNodeKeyPackage, decodeLeafNodeCommit, decodeLeafNodeUpdate, init_leafNode, keyPackageTBSEncoder, encodeKeyPackageTBS, decodeKeyPackageTBS, keyPackageEncoder, encodeKeyPackage, decodeKeyPackage, init_keyPackage, init_kdf, pskTypes, pskTypeEncoder, encodePskType, decodePskType, resumptionPSKUsages, resumptionPSKUsageEncoder, encodeResumptionPSKUsage, decodeResumptionPSKUsage, encodePskInfoExternal, encodePskInfoResumption, decodePskInfoResumption, pskInfoEncoder, encodePskInfo, decodePskInfo, pskIdEncoder, encodePskId, decodePskId, pskLabelEncoder, encodePskLabel, decodePskLabel, init_presharedkey, addEncoder, encodeAdd, decodeAdd, updateEncoder, encodeUpdate, decodeUpdate, removeEncoder, encodeRemove, decodeRemove, pskEncoder, encodePSK, decodePSK, reinitEncoder, encodeReinit, decodeReinit, externalInitEncoder, encodeExternalInit, decodeExternalInit, groupContextExtensionsEncoder, encodeGroupContextExtensions, decodeGroupContextExtensions, proposalAddEncoder, encodeProposalAdd, proposalUpdateEncoder, encodeProposalUpdate, proposalRemoveEncoder, encodeProposalRemove, proposalPSKEncoder, encodeProposalPSK, proposalReinitEncoder, encodeProposalReinit, proposalExternalInitEncoder, encodeProposalExternalInit, proposalGroupContextExtensionsEncoder, encodeProposalGroupContextExtensions, proposalCustomEncoder, encodeProposalCustom, proposalEncoder, encodeProposal, decodeProposalAdd, decodeProposalUpdate, decodeProposalRemove, decodeProposalPSK, decodeProposalReinit, decodeProposalExternalInit, decodeProposalGroupContextExtensions, decodeProposal, init_proposal, proposalOrRefTypes, proposalOrRefTypeEncoder, encodeProposalOrRefType, decodeProposalOrRefType, proposalOrRefProposalEncoder, encodeProposalOrRefProposal, proposalOrRefProposalRefEncoder, encodeProposalOrRefProposalRef, proposalOrRefEncoder, encodeProposalOrRef, decodeProposalOrRef, init_proposalOrRefType, init_hpke, groupContextEncoder, encodeGroupContext, decodeGroupContext, init_groupContext, nodeTypes, nodeTypeEncoder, encodeNodeType, decodeNodeType, init_nodeType, parentNodeEncoder, encodeParentNode, decodeParentNode, init_parentNode, init_treemath, nodeEncoder, encodeNode, decodeNode, ratchetTreeEncoder, encodeRatchetTree, decodeRatchetTree, init_ratchetTree, leafNodeHashInputEncoder, encodeLeafNodeHashInput, decodeLeafNodeHashInput, parentNodeHashInputEncoder, encodeParentNodeHashInput, decodeParentNodeHashInput, treeHashInputEncoder, encodeTreeHashInput, decodeTreeHashInput, init_treeHash, parentHashInputEncoder, encodeParentHashInput, decodeParentHashInput, init_parentHash, hpkeCiphertextEncoder, encodeHpkeCiphertext, decodeHpkeCiphertext, init_hpkeCiphertext, updatePathNodeEncoder, encodeUpdatePathNode, decodeUpdatePathNode, updatePathEncoder, encodeUpdatePath, decodeUpdatePath, init_updatePath, commitEncoder, encodeCommit, decodeCommit, init_commit, contentTypes, contentTypeEncoder, encodeContentType, decodeContentType, init_contentType, wireformats, wireformatEncoder, encodeWireformat, decodeWireformat, init_wireformat, senderTypes, senderTypeEncoder, encodeSenderType, decodeSenderType, senderEncoder, encodeSender, decodeSender, reuseGuardEncoder, encodeReuseGuard, decodeReuseGuard, senderDataEncoder, encodeSenderData, decodeSenderData, senderDataAADEncoder, encodeSenderDataAAD, decodeSenderDataAAD, init_sender, framedContentApplicationDataEncoder, encodeFramedContentApplicationData, framedContentProposalDataEncoder, encodeFramedContentProposalData, framedContentCommitDataEncoder, encodeFramedContentCommitData, framedContentInfoEncoder, encodeFramedContentInfo, decodeFramedContentApplicationData, decodeFramedContentProposalData, decodeFramedContentCommitData, decodeFramedContentInfo, framedContentEncoder, encodeFramedContent, decodeFramedContent, senderInfoEncoder, encodeSenderInfo, framedContentTBSEncoder, encodeFramedContentTBS, encodeFramedContentAuthDataContent, encodeFramedContentAuthDataCommit, framedContentAuthDataEncoder, encodeFramedContentAuthData, decodeFramedContentAuthDataCommit, init_framedContent, authenticatedContentEncoder, encodeAuthenticatedContent, decodeAuthenticatedContent, authenticatedContentTBMEncoder, encodeAuthenticatedContentTBM, init_authenticatedContent, publicMessageInfoEncoder, encodePublicMessageInfo, publicMessageEncoder, encodePublicMessage, decodePublicMessage, init_publicMessage, init_messageProtectionPublic, init_externalProposal, requiredCapabilitiesEncoder, encodeRequiredCapabilities, decodeRequiredCapabilities, init_requiredCapabilities, defaultAuthenticationService, init_authenticationService, defaultPaddingConfig, init_paddingConfig, defaultKeyPackageEqualityConfig, init_keyPackageEqualityConfig, defaultLifetimeConfig, init_lifetimeConfig, defaultKeyRetentionConfig, init_keyRetentionConfig, groupInfoTBSEncoder, encodeGroupInfoTBS, decodeGroupInfoTBS, groupInfoEncoder, encodeGroupInfo, decodeGroupInfo, init_groupInfo, keyScheduleEncoder, encodeKeySchedule, decodeKeySchedule, init_keySchedule, generationSecretEncoder, decodeGenerationSecret, secretTreeNodeEncoder, decodeSecretTreeNode, secretTreeEncoder, decodeSecretTree, init_secretTree, confirmedTranscriptHashInputEncoder, encodeConfirmedTranscriptHashInput, decodeConfirmedTranscriptHashInput, init_transcriptHash, groupSecretsEncoder, encodeGroupSecrets, decodeGroupSecrets, init_groupSecrets, encryptedGroupSecretsEncoder, encodeEncryptedGroupSecrets, decodeEncryptedGroupSecrets, welcomeEncoder, encodeWelcome, decodeWelcome, init_welcome, init_pathSecrets, privateKeyPathEncoder, decodePrivateKeyPath, init_privateKeyPath, proposalWithSenderEncoder, decodeProposalWithSender, unappliedProposalsEncoder, decodeUnappliedProposals, init_unappliedProposals, emptyPskIndex, init_pskIndex, init_addToMap, defaultClientConfig, init_clientConfig, init_array, stringEncoder, encodeString, decodeString, init_string, activeEncoder, suspendedPendingReinitEncoder, removedFromGroupEncoder, groupActiveStateEncoder, decodeGroupActiveState, init_groupActiveState, epochReceiverDataEncoder, decodeEpochReceiverData, init_epochReceiverData, groupStateEncoder, encodeGroupState, decodeGroupState, groupStateEncoderWithoutTree, encodeGroupStateWithoutTree, emptyProposals, init_clientState, privateMessageEncoder, encodePrivateMessage, decodePrivateMessage, privateContentAADEncoder, encodePrivateContentAAD, decodePrivateContentAAD, init_privateMessage, init_messageProtection, init_createMessage, init_createCommit, init_processMessages, init_makeHashImpl, HpkeError, InvalidParamError, SerializeError, DeserializeError, EncapError, DecapError, ExportError, SealError, OpenError, MessageLimitReachedError, DeriveKeyPairError, NotSupportedError, init_errors, dntGlobals, dntGlobalThis, init_dnt_shims, NativeAlgorithm, init_algorithm, Mode, KemId, KdfId, AeadId, init_identifiers, INPUT_LENGTH_LIMIT, INFO_LENGTH_LIMIT, MINIMUM_PSK_LENGTH, EMPTY, BYTE_TO_BIGINT_256, init_consts, SUITE_ID_HEADER_KEM, init_kemInterface, HPKE_VERSION, HkdfNative, HkdfSha256Native, HkdfSha384Native, HkdfSha512Native, init_hkdf, isCryptoKeyPair, init_misc, LABEL_EAE_PRK, LABEL_SHARED_SECRET, Dhkem, init_dhkem, KEM_USAGES, LABEL_DKP_PRK, LABEL_SK, init_dhkemPrimitives, Bignum, init_bignum, LABEL_CANDIDATE, ORDER_P_256, ORDER_P_384, ORDER_P_521, PKCS8_ALG_ID_P_256, PKCS8_ALG_ID_P_384, PKCS8_ALG_ID_P_521, EC_P_256_PARAMS, EC_P_384_PARAMS, EC_P_521_PARAMS, Ec, init_ec, init_xCryptoKey, init_xCurve, init_hybridkem, AEAD_USAGES, init_aeadEncryptionContext, _endianTestBuffer, _endianTestBytes, isLE2, init_noble, init_hash2, _HMAC, hmac, init_hmac, init_md2, U32_MASK642, _32n2, init_u642, init_sha2, _0n, _1n, _2n, _7n, _256n, _0x71n, SHA3_PI, SHA3_ROTL, _SHA3_IOTA, IOTAS, SHA3_IOTA_H, SHA3_IOTA_L, init_sha3, init_modular, init_curve, init_montgomery, init_mod, AesGcmContext, Aes128Gcm, Aes256Gcm, init_aesGcm, init_exportOnly, init_emitNotSupported, LABEL_SEC, ExporterContextImpl, RecipientExporterContextImpl, SenderExporterContextImpl, init_exporterContext, EncryptionContextImpl, init_encryptionContext, __classPrivateFieldGet, __classPrivateFieldSet, _Mutex_locked, Mutex, init_mutex, __classPrivateFieldGet2, __classPrivateFieldSet2, _RecipientContextImpl_mutex, RecipientContextImpl, init_recipientContext, __classPrivateFieldGet3, __classPrivateFieldSet3, _SenderContextImpl_mutex, SenderContextImpl, init_senderContext, LABEL_BASE_NONCE, LABEL_EXP, LABEL_INFO_HASH, LABEL_KEY, LABEL_PSK_ID_HASH, LABEL_SECRET, SUITE_ID_HEADER_HPKE, CipherSuiteNative, init_cipherSuiteNative, DhkemP256HkdfSha256Native, DhkemP384HkdfSha384Native, DhkemP521HkdfSha512Native, init_dhkemNative, CipherSuite, DhkemP256HkdfSha256, DhkemP384HkdfSha384, DhkemP521HkdfSha512, HkdfSha256, HkdfSha384, HkdfSha512, init_native, ALG_NAME, PKCS8_ALG_ID_X25519, BASE_POINT_X25519, X25519, init_x25519, DhkemX25519HkdfSha256, init_dhkemX25519, PKCS8_ALG_ID_X448, init_x448, init_dhkemX448, init_mod2, init_hpke2, isLE3, wrapCipher, init_utils2, encodeStr, sigma16, sigma32, sigma16_32, sigma32_32, BLOCK_LEN, BLOCK_LEN32, MAX_COUNTER, U32_EMPTY, _XorStreamPRG, createPRG, init_arx, Poly1305, poly1305, init_poly1305, chacha_exports, chacha20orig, chacha20, xchacha20, chacha8, chacha12, ZEROS16, updatePadded, ZEROS32, _poly1305_aead, chacha20poly1305, xchacha20poly1305, rngChacha20, rngChacha8, init_chacha, init_makeAead, init_makeKdfImpl, init_makeDhKem, init_makeHpke, defaultRng, init_rng, crypto3, init_cryptoNode, isLE4, swap32IfBE3, hasHexBuiltin2, hexes2, asciis, Hash, init_utils3, HashMD3, SHA256_IV3, SHA384_IV3, SHA512_IV3, init_md3, U32_MASK643, _32n3, shrSH3, shrSL3, rotrSH3, rotrSL3, rotrBH3, rotrBL3, rotlSH2, rotlSL2, rotlBH2, rotlBL2, add3L3, add3H3, add4L3, add4H3, add5L3, add5H3, init_u643, SHA256_K, SHA256_W, SHA256, K512, SHA512_Kh, SHA512_Kl, SHA512_W_H, SHA512_W_L, SHA512, SHA384, sha2563, sha5122, sha3842, init_sha22, _0n2, _1n2, isPosBig, bitMask, notImplemented, init_utils4, _0n3, _1n3, _2n2, _3n, _4n, _5n, _7n2, _8n, _9n, _16n, isNegativeLE, FIELD_FIELDS, init_modular2, _0n4, _1n4, pointPrecomputes, pointWindowSizes, wNAF, init_curve2, _0n5, _1n5, _2n3, _8n2, PrimeEdwardsPoint, init_edwards, os2ip, _DST_scalar, init_hash_to_curve, _0n6, _1n6, _2n4, init_montgomery2, ed25519_exports, _0n7, _1n7, _2n5, _3n2, _5n2, _8n3, ed25519_CURVE_p, ed25519_CURVE, ED25519_SQRT_M1, Fp, Fn, ed25519Defaults, ed25519, ed25519ctx, ed25519ph, x25519, ELL2_C1, ELL2_C2, ELL2_C3, ELL2_C1_EDWARDS, ed25519_hasher, SQRT_M1, SQRT_AD_MINUS_ONE, INVSQRT_A_MINUS_D, ONE_MINUS_D_SQ, D_MINUS_ONE_SQ, invertSqrt, MAX_255B, bytes255ToNumberLE, _RistrettoPoint, ristretto255, ristretto255_hasher, ED25519_TORSION_SUBGROUP, edwardsToMontgomery, RistrettoPoint, hashToCurve, encodeToCurve, hashToRistretto255, hash_to_ristretto255, init_ed25519, _0n8, _1n8, _2n6, _7n3, _256n2, _0x71n2, SHA3_PI2, SHA3_ROTL2, _SHA3_IOTA2, IOTAS2, SHA3_IOTA_H2, SHA3_IOTA_L2, rotlH, rotlL, Keccak, genShake, shake2562, init_sha32, ed448_exports, ed448_CURVE, E448_CURVE, shake256_114, shake256_64, _1n9, _2n7, _3n3, _4n2, _11n, _22n, _44n, _88n, _223n, Fp2, Fn2, Fp448, Fn448, ED448_DEF, ed448, ed448ph, E448, x448, ELL2_C12, ELL2_J, ed448_hasher, ONE_MINUS_D, ONE_MINUS_TWO_D, SQRT_MINUS_D, INVSQRT_MINUS_D, invertSqrt2, _DecafPoint, decaf448, decaf448_hasher, ED448_TORSION_SUBGROUP, DecafPoint, hashToCurve2, encodeToCurve2, hashToDecaf448, hash_to_decaf448, edwardsToMontgomery2, init_ed448, HMAC, hmac2, init_hmac2, divNearest, DERErr, DER, _0n9, _1n10, _2n8, _3n4, _4n3, init_weierstrass, init_shortw_utils, nist_exports, p256_CURVE, p384_CURVE, p521_CURVE, Fp256, Fp384, Fp521, p256, p256_hasher, p384, p384_hasher, p521, secp256r1, secp384r1, secp521r1, p521_hasher, init_nist, init_makeNobleSignatureImpl, defaultCryptoProvider, init_provider, init_getCiphersuiteImpl, init_resumption, SHA256_K2, SHA256_W2, SHA2_32B, _SHA256, K5122, SHA512_Kh2, SHA512_Kl2, SHA512_W_H2, SHA512_W_L2, SHA2_64B, _SHA512, _SHA384, sha2564, sha5123, sha3843, init_sha23, _HMAC2, hmac3, init_hmac3, init_makeHashImpl2, init_makeNobleSignatureImpl2, BLOCK_SIZE, ZEROS162, ZEROS322, POLY, mul2, swapLE, estimateWindow, GHASH, Polyval, ghash, polyval, init_polyval, BLOCK_SIZE2, BLOCK_SIZE32, EMPTY_BLOCK, POLY2, sbox, rotr32_8, rotl32_8, tableEncoding, xPowers, gcm, _CMAC, cmac, init_aes, init_makeAead2, init_makeKdfImpl2, init_makeDhKem2, init_makeHpke2, init_rng2, nobleCryptoProvider, init_provider2, mlsPublicMessageEncoder, encodeMlsPublicMessage, mlsWelcomeEncoder, encodeMlsWelcome, mlsPrivateMessageEncoder, encodeMlsPrivateMessage, mlsGroupInfoEncoder, encodeMlsGroupInfo, mlsKeyPackageEncoder, encodeMlsKeyPackage, mlsMessageContentEncoder, encodeMlsMessageContent, decodeMlsMessageContent, mlsMessageEncoder, encodeMlsMessage, decodeMlsMessage, init_message, greaseValues, defaultGreaseConfig, init_grease, init_defaultCapabilities, init_src, DEFAULT_CIPHERSUITE, MLSGroupManager, init_mls_group, DOMAIN, NONCE_BYTES3, init_owner_sync, init_mls_delivery_order, init_mls_presend_epoch, dist_exports2, init_dist2, DIR_MODE, FILE_MODE, init_secure_file, SYNC_LOCK_STALE_MS, pendingKpPath, init_mls_state, init_mls_kp_pool, PACKAGE, FALLBACK, MAX_LEN, DISALLOWED, init_client_version, CredentialStore, init_credential_store, init_crypto_helpers, STATE_FILE, LEGACY_STATE_FILE, init_state, ACTIVATION_DOMAIN, UUID_RE2, init_transport2, A2ALogGate, init_a2a_log_gate, init_mls_membership_probe, FIRST_DIRTY_DELAY_MS, RETRY_BASE_DELAYS_MS, MAX_RETRY_DELAY_MS, JITTER_FRACTION, HistoryBackupScheduler, init_history_backup_scheduler, FILE_MODE2, init_history_recovery_file, TENANT_ID_PATTERN, DIR_MODE2, FILE_MODE3, HISTORY_RECOVERY_VERIFY_TIMEOUT_MS, VERIFY_TIMEOUT_MESSAGE, HistoryRecoveryVerificationTimeoutError, init_history_recovery_code, ACTIONS, init_decision_reply, history_backup_client_exports, HISTORY_RESTORE_TIMEOUT_MS, HISTORY_RESTORE_RESPONSE_MAX_BYTES, HISTORY_ENVELOPE_MIN_BYTES, HISTORY_AAD_PREFIX, UUID_RE3, GENERATION_RESPONSE_KEYS, utf8Encoder, utf8Decoder, HistoryBackupClient, init_history_backup_client, openclaw_compat_exports, defaultImporter, HEARTBEAT_CANDIDATES, AGENT_EVENT_CANDIDATES, TRANSCRIPT_CANDIDATES, _heartbeatFn, _agentEventFn, _transcriptFn, init_openclaw_compat, http_handlers_exports, init_http_handlers, mcp_proxy_helpers_exports, init_mcp_proxy_helpers, workspace_handlers_exports, MAX_FILE_SIZE, init_workspace_handlers, ROOM_AGENT_TYPES, CREDENTIAL_MESSAGE_TYPES, CATCHUP_MESSAGE_TYPES, POLL_INTERVAL_MS, RECONNECT_BASE_MS, UUID_RE4, RECONNECT_MAX_MS, PENDING_POLL_INTERVAL_MS, HISTORY_RESTORE_TIMEOUT_MS2, HISTORY_UPLOAD_TIMEOUT_MS, CANONICAL_TIMESTAMP_RE, OUTBOUND_DEDUPE_WINDOW_MS, OUTBOUND_DEDUPE_MAX_SUPPRESS_MS, OUTBOUND_DEDUPE_MAX, OUTBOUND_DEDUPE_TYPES, RETRY_CANDIDATE_TTL_MS, RETRY_CANDIDATE_MAX, TOPIC_ID_RE, ROOM_FULFIL_COOLDOWN_MS, SecureChannel, init_channel, init_types, DEFAULT_API_URL, DEFAULT_HTTP_PORT, init_account_config, init_lifecycle, _ocRuntime, _channels, agentVaultPlugin, init_openclaw_plugin, init_gateway_send, init_llm_response_parser, OPENROUTER_PRICING, init_llm_pricing_openrouter, LEGACY_PRICING, PRICING, init_llm_cost, traceStore, init_fetch_interceptor, init_tool_audit, init_harness_compat, managedRoutesRequested, init_openclaw_entry, util, objectUtil, ZodParsedType, getParsedType, init_util, ZodIssueCode, ZodError, init_ZodError, errorMap, en_default, init_en, overrideErrorMap, init_errors2, makeIssue, ParseStatus, INVALID, DIRTY, OK, isAborted, isDirty, isValid, isAsync, init_parseUtil, init_typeAliases, errorUtil, init_errorUtil, ParseInputLazyPath, handleResult, ZodType, cuidRegex, cuid2Regex, ulidRegex, uuidRegex, nanoidRegex, jwtRegex, durationRegex, emailRegex, _emojiRegex, emojiRegex, ipv4Regex, ipv4CidrRegex, ipv6Regex, ipv6CidrRegex, base64Regex, base64urlRegex, dateRegexSource, dateRegex, ZodString, ZodNumber, ZodBigInt, ZodBoolean, ZodDate, ZodSymbol, ZodUndefined, ZodNull, ZodAny, ZodUnknown, ZodNever, ZodVoid, ZodArray, ZodObject, ZodUnion, getDiscriminator, ZodDiscriminatedUnion, ZodIntersection, ZodTuple, ZodRecord, ZodMap, ZodSet, ZodFunction, ZodLazy, ZodLiteral, ZodEnum, ZodNativeEnum, ZodPromise, ZodEffects, ZodOptional, ZodNullable, ZodDefault, ZodCatch, ZodNaN, ZodBranded, ZodPipeline, ZodReadonly, late, ZodFirstPartyTypeKind, stringType, numberType, nanType, bigIntType, booleanType, dateType, symbolType, undefinedType, nullType, anyType, unknownType, neverType, voidType, arrayType, objectType, strictObjectType, unionType, discriminatedUnionType, intersectionType, tupleType, recordType, mapType, setType, functionType, lazyType, literalType, enumType, nativeEnumType, promiseType, effectsType, optionalType, nullableType, preprocessType, pipelineType, init_types2, init_external, init_v3, util_exports, Cached, EVALUATING, captureStackTrace, allowsEval, getParsedType2, propertyKeyTypes, primitiveTypes, NUMBER_FORMAT_RANGES, BIGINT_FORMAT_RANGES, highSurrogate, Class, installing, broke, breaker, CONSTANT_CATCH, init_util2, _a2, _zodDesc, _E, $ZodAsyncError, $ZodEncodeError, globalConfig, init_core, _messageDesc, _issuesDesc, _installedToString, initializer, $ZodError, $ZodRealError, init_errors3, _parse, parse, _parseAsync, parseAsync, _safeParse, safeParse, _safeParseAsync, safeParseAsync, COMPILE_INVALID, COMPILE_FALLBACK, validate, validateAsync, _encode, _decode, _encodeAsync, _decodeAsync, _safeEncode, _safeDecode, _safeEncodeAsync, _safeDecodeAsync, init_parse, cuid, cuid2, ulid, xid, ksuid, nanoid, duration, guid, uuid, email, _emoji, ipv4, ipv6, cidrv4, cidrv6, base64, base64url, httpProtocol, e164, dateSource, date, anyString, integer, number, boolean, _null, lowercase, uppercase, init_regexes, $ZodCheck, _whenHasLength, numericOriginMap, $ZodCheckLessThan, $ZodCheckGreaterThan, $ZodCheckMultipleOf, $ZodCheckNumberFormat, $ZodCheckMaxLength, $ZodCheckMinLength, $ZodCheckLengthEquals, $ZodCheckStringFormat, $ZodCheckRegex, $ZodCheckLowerCase, $ZodCheckUpperCase, $ZodCheckIncludes, $ZodCheckStartsWith, $ZodCheckEndsWith, $ZodCheckOverwrite, init_checks, Doc, init_doc, version, init_versions, $ZodType, toStandardResult, $ZodString, $ZodStringFormat, $ZodGUID, $ZodUUID, $ZodEmail, URL_BAD_FORMAT, URL_UNPARSEABLE, asciiTabOrNewline, $ZodURL, $ZodEmoji, $ZodNanoID, $ZodCUID, $ZodCUID2, $ZodULID, $ZodXID, $ZodKSUID, $ZodISODateTime, $ZodISODate, $ZodISOTime, $ZodISODuration, $ZodIPv4, ipv6Alphabet, $ZodIPv6, $ZodCIDRv4, $ZodCIDRv6, base64Charset, $ZodBase64, base64urlCharset, $ZodBase64URL, $ZodE164, $ZodJWT, $ZodNumber, $ZodNumberFormat, $ZodBoolean, $ZodNull, $ZodUnknown, $ZodNever, arraySize, $ZodArray, NO_SYMBOL_KEYS, $ZodObject, $ZodObjectJIT, $ZodUnion, $ZodDiscriminatedUnion, $ZodIntersection, $ZodRecord, $ZodEnum, $ZodLiteral, $ZodTransform, $ZodOptional, $ZodExactOptional, $ZodNullable, $ZodDefault, $ZodPrefault, $ZodNonOptional, $ZodCatch, $ZodPipe, $ZodPreprocess, $ZodReadonly, $ZodCustom, init_schemas, $ZodCyclicError, STATE, NO_ISSUES, recursive, NONE, ASSUMED, PROVEN, handoff, open4, memo, init_memoizer, error, init_en2, init_locales, _a3, $ZodRegistry, globalRegistry, init_registries, init_compile, init_api, FOLDABLE_KEYS, UNION_KEYS, createToJSONSchemaMethod, createStandardJSONSchemaMethod, init_to_json_schema, narrowMin, narrowMax, narrowBoth, addDivisor, addPattern, intersectMime, setFormat, minContributor, maxContributor, formatContributor, contributors, formatMap, exactPatterns, exactPattern, stringProcessor, numberProcessor, booleanProcessor, bigintProcessor, symbolProcessor, nullProcessor, undefinedProcessor, voidProcessor, neverProcessor, anyProcessor, unknownProcessor, dateProcessor, enumProcessor, literalProcessor, nanProcessor, templateLiteralProcessor, fileProcessor, successProcessor, customProcessor, functionProcessor, transformProcessor, mapProcessor, setProcessor, arrayProcessor, objectProcessor, unionProcessor, intersectionProcessor, tupleProcessor, pendingRecords, recordProcessor, nullableProcessor, nonoptionalProcessor, UNREPRESENTABLE_DEFAULT, defaultProcessor, prefaultProcessor, catchProcessor, pipeProcessor, readonlyProcessor, promiseProcessor, optionalProcessor, lazyProcessor, allProcessors, init_json_schema_processors, init_json_schema, init_core2, init_parse2, ZodMiniType, ZodMiniObject, init_schemas2, init_checks2, init_iso, init_coerce, init_external2, init_v4_mini, init_zod_compat, init_checks3, _installedErrorProtos, initializer2, ZodRealError, init_errors4, parse2, parseAsync2, safeParse3, safeParseAsync3, encode3, decode2, encodeAsync2, decodeAsync2, safeEncode2, safeDecode2, safeEncodeAsync2, safeDecodeAsync2, init_parse3, ZodType2, _ZodString, ZodString2, ZodStringFormat, ZodISODateTime, ZodISODate, ZodISOTime, ZodISODuration, ZodEmail, ZodGUID, ZodUUID, ZodURL, ZodEmoji, ZodNanoID, ZodCUID, ZodCUID2, ZodULID, ZodXID, ZodKSUID, ZodIPv4, ZodIPv6, ZodCIDRv4, ZodCIDRv6, ZodBase64, ZodBase64URL, ZodE164, ZodJWT, ZodNumber2, ZodNumberFormat, ZodBoolean2, ZodNull2, ZodUnknown2, ZodNever2, ZodArray2, ZodObject2, ZodUnion2, ZodDiscriminatedUnion2, ZodIntersection2, ZodRecord2, ZodEnum2, ZodLiteral2, ZodTransform, ZodOptional2, ZodExactOptional, ZodNullable2, ZodDefault2, ZodPrefault, ZodNonOptional, ZodCatch2, ZodPipe, ZodPreprocess, ZodReadonly2, ZodCustom, init_schemas3, ZodFirstPartyTypeKind2, init_compat, iso_exports2, init_iso2, init_coerce2, init_external3, init_classic, init_v4, LATEST_PROTOCOL_VERSION, DEFAULT_NEGOTIATED_PROTOCOL_VERSION, SUPPORTED_PROTOCOL_VERSIONS, RELATED_TASK_META_KEY, JSONRPC_VERSION, AssertObjectSchema, ProgressTokenSchema, CursorSchema, TaskCreationParamsSchema, TaskMetadataSchema, RelatedTaskMetadataSchema, RequestMetaSchema, BaseRequestParamsSchema, TaskAugmentedRequestParamsSchema, isTaskAugmentedRequestParams, RequestSchema, NotificationsParamsSchema, NotificationSchema, ResultSchema, RequestIdSchema, JSONRPCRequestSchema, isJSONRPCRequest, JSONRPCNotificationSchema, isJSONRPCNotification, JSONRPCResultResponseSchema, isJSONRPCResultResponse, ErrorCode, JSONRPCErrorResponseSchema, isJSONRPCErrorResponse, JSONRPCMessageSchema, JSONRPCResponseSchema, EmptyResultSchema, CancelledNotificationParamsSchema, CancelledNotificationSchema, IconSchema, IconsSchema, BaseMetadataSchema, ImplementationSchema, FormElicitationCapabilitySchema, ElicitationCapabilitySchema, ClientTasksCapabilitySchema, ServerTasksCapabilitySchema, ClientCapabilitiesSchema, InitializeRequestParamsSchema, InitializeRequestSchema, isInitializeRequest, ServerCapabilitiesSchema, InitializeResultSchema, InitializedNotificationSchema, PingRequestSchema, ProgressSchema, ProgressNotificationParamsSchema, ProgressNotificationSchema, PaginatedRequestParamsSchema, PaginatedRequestSchema, PaginatedResultSchema, TaskStatusSchema, TaskSchema, CreateTaskResultSchema, TaskStatusNotificationParamsSchema, TaskStatusNotificationSchema, GetTaskRequestSchema, GetTaskResultSchema, GetTaskPayloadRequestSchema, GetTaskPayloadResultSchema, ListTasksRequestSchema, ListTasksResultSchema, CancelTaskRequestSchema, CancelTaskResultSchema, ResourceContentsSchema, TextResourceContentsSchema, Base64Schema, BlobResourceContentsSchema, RoleSchema, AnnotationsSchema, ResourceSchema, ResourceTemplateSchema, ListResourcesRequestSchema, ListResourcesResultSchema, ListResourceTemplatesRequestSchema, ListResourceTemplatesResultSchema, ResourceRequestParamsSchema, ReadResourceRequestParamsSchema, ReadResourceRequestSchema, ReadResourceResultSchema, ResourceListChangedNotificationSchema, SubscribeRequestParamsSchema, SubscribeRequestSchema, UnsubscribeRequestParamsSchema, UnsubscribeRequestSchema, ResourceUpdatedNotificationParamsSchema, ResourceUpdatedNotificationSchema, PromptArgumentSchema, PromptSchema, ListPromptsRequestSchema, ListPromptsResultSchema, GetPromptRequestParamsSchema, GetPromptRequestSchema, TextContentSchema, ImageContentSchema, AudioContentSchema, ToolUseContentSchema, EmbeddedResourceSchema, ResourceLinkSchema, ContentBlockSchema, PromptMessageSchema, GetPromptResultSchema, PromptListChangedNotificationSchema, ToolAnnotationsSchema, ToolExecutionSchema, ToolSchema, ListToolsRequestSchema, ListToolsResultSchema, CallToolResultSchema, CompatibilityCallToolResultSchema, CallToolRequestParamsSchema, CallToolRequestSchema, ToolListChangedNotificationSchema, ListChangedOptionsBaseSchema, LoggingLevelSchema, SetLevelRequestParamsSchema, SetLevelRequestSchema, LoggingMessageNotificationParamsSchema, LoggingMessageNotificationSchema, ModelHintSchema, ModelPreferencesSchema, ToolChoiceSchema, ToolResultContentSchema, SamplingContentSchema, SamplingMessageContentBlockSchema, SamplingMessageSchema, CreateMessageRequestParamsSchema, CreateMessageRequestSchema, CreateMessageResultSchema, CreateMessageResultWithToolsSchema, BooleanSchemaSchema, StringSchemaSchema, NumberSchemaSchema, UntitledSingleSelectEnumSchemaSchema, TitledSingleSelectEnumSchemaSchema, LegacyTitledEnumSchemaSchema, SingleSelectEnumSchemaSchema, UntitledMultiSelectEnumSchemaSchema, TitledMultiSelectEnumSchemaSchema, MultiSelectEnumSchemaSchema, EnumSchemaSchema, PrimitiveSchemaDefinitionSchema, ElicitRequestFormParamsSchema, ElicitRequestURLParamsSchema, ElicitRequestParamsSchema, ElicitRequestSchema, ElicitationCompleteNotificationParamsSchema, ElicitationCompleteNotificationSchema, ElicitResultSchema, ResourceTemplateReferenceSchema, PromptReferenceSchema, CompleteRequestParamsSchema, CompleteRequestSchema, CompleteResultSchema, RootSchema, ListRootsRequestSchema, ListRootsResultSchema, RootsListChangedNotificationSchema, ClientRequestSchema, ClientNotificationSchema, ClientResultSchema, ServerRequestSchema, ServerNotificationSchema, ServerResultSchema, McpError, UrlElicitationRequiredError, init_types3, init_interfaces, ignoreOverride, defaultOptions, getDefaultOptions, init_Options, getRefs, init_Refs, init_errorMessages, getRelativePath, init_getRelativePath, init_any, init_array2, init_bigint, init_boolean, init_branded, parseCatchDef, init_catch, integerDateParser, init_date, init_default, init_effects, init_enum, isJsonSchema7AllOfType, init_intersection, init_literal, emojiRegex2, zodPatterns, ALPHA_NUMERIC, init_string2, init_record, init_map, init_nativeEnum, init_never, init_null, primitiveMappings, asAnyOf, init_union, init_nullable, init_number2, init_object, parseOptionalDef, init_optional2, parsePipelineDef, init_pipeline, init_promise, init_set, init_tuple, init_undefined, init_unknown, parseReadonlyDef, init_readonly, selectParser, init_selectParser, get$ref, addMeta, init_parseDef, init_parseTypes, zodToJsonSchema, init_zodToJsonSchema, init_esm, init_zod_json_schema_compat, DEFAULT_REQUEST_TIMEOUT_MSEC, Protocol, init_protocol, require_code, require_scope, require_codegen, require_util, require_names, require_errors, require_boolSchema, require_rules, require_applicability, require_dataType, require_defaults, require_code2, require_keyword, require_subschema, require_fast_deep_equal, require_json_schema_traverse, require_resolve, require_validate, require_validation_error, require_ref_error, require_compile, require_data, require_utils, require_schemes, require_fast_uri, require_uri, require_core, require_id, require_ref, require_core2, require_limitNumber, require_multipleOf, require_ucs2length, require_limitLength, require_pattern, require_limitProperties, require_required, require_limitItems, require_equal, require_uniqueItems, require_const, require_enum, require_validation, require_additionalItems, require_items, require_prefixItems, require_items2020, require_contains, require_dependencies, require_propertyNames, require_additionalProperties, require_properties, require_patternProperties, require_not, require_anyOf, require_oneOf, require_allOf, require_if, require_thenElse, require_applicator, require_format, require_format2, require_metadata, require_draft7, require_types, require_discriminator, require_json_schema_draft_07, require_ajv, require_formats, require_limit, require_dist, import_ajv, import_ajv_formats, AjvJsonSchemaValidator, init_ajv_provider, ExperimentalServerTasks, init_server, init_helpers, Server, init_server2, COMPLETABLE_SYMBOL, McpZodTypeKind, init_completable, init_uriTemplate, TOOL_NAME_REGEX, init_toolNameValidation, ExperimentalMcpServerTasks, init_mcp_server, init_zod, McpServer, EMPTY_OBJECT_JSON_SCHEMA, EMPTY_COMPLETION_RESULT, init_mcp, RequestError, toRequestError, GlobalRequest, Request2, newHeadersFromIncoming, wrapBodyStream, newRequestFromIncoming, getRequestCache, requestCache, incomingKey, urlKey, headersKey, abortControllerKey, getAbortController, requestPrototype, newRequest, responseCache, getResponseCache, cacheKey, GlobalResponse, Response2, buildOutgoingHttpHeaders, X_ALREADY_SENT, outgoingEnded, handleRequestError, handleFetchError, handleResponseError, flushHeaders, responseViaCache, isPromise, responseViaResponseObject, getRequestListener, init_dist22, require_content_type, import_content_type, init_mediaType, DEFAULT_MAX_REQUEST_BODY_SIZE, MAX_BATCH_SIZE, init_requestBody, DEFAULT_SSE_KEEP_ALIVE_MS, MAX_TIMER_DELAY_MS, init_sseKeepAlive, WebStandardStreamableHTTPServerTransport, init_webStandardStreamableHttp, StreamableHTTPServerTransport, init_streamableHttp, AgentVaultMcpServer, init_mcp_server2, init_mcp_handlers, init_skill_manifest, init_skill_invoker, spanBuffer, init_skill_telemetry, PolicyEnforcer, init_policy_enforcer, VERSION, init_index;
|
|
18324
18337
|
var init_dist = __esm({
|
|
18325
18338
|
async "../plugin/dist/index.js"() {
|
|
18326
18339
|
"use strict";
|
|
@@ -70301,6 +70314,34 @@ var init_dist = __esm({
|
|
|
70301
70314
|
}
|
|
70302
70315
|
return null;
|
|
70303
70316
|
}
|
|
70317
|
+
/**
|
|
70318
|
+
* Every occupied leaf of the ratchet tree, with its basic-credential
|
|
70319
|
+
* identity — READ-ONLY (#470 phase 1).
|
|
70320
|
+
*
|
|
70321
|
+
* Stale-leaf detection compares the tree with the server's eligible set, so
|
|
70322
|
+
* it must see EVERY leaf. `memberLeafIndex` cannot: it stops at the first
|
|
70323
|
+
* match, so a device holding two leaves (the duplicate-add shape observed
|
|
70324
|
+
* live 2026-06-18) would show one. Blank leaves (removed members) are
|
|
70325
|
+
* skipped; duplicates are returned once per leaf. Leaves whose credential is
|
|
70326
|
+
* not `basic` carry no comparable identity and are skipped too — the web
|
|
70327
|
+
* client only ever mints basic credentials.
|
|
70328
|
+
*
|
|
70329
|
+
* Identities are COPIES: a caller mutating one cannot reach the tree.
|
|
70330
|
+
*/
|
|
70331
|
+
leafIdentities() {
|
|
70332
|
+
const tree = this._requireState().ratchetTree;
|
|
70333
|
+
const out = [];
|
|
70334
|
+
for (let nodeIndex = 0; nodeIndex < tree.length; nodeIndex += 2) {
|
|
70335
|
+
const node2 = tree[nodeIndex];
|
|
70336
|
+
if (node2 && node2.nodeType === "leaf") {
|
|
70337
|
+
const cred = node2.leaf.credential;
|
|
70338
|
+
if (cred.credentialType === "basic") {
|
|
70339
|
+
out.push({ leafIndex: nodeIndex / 2, identity: new Uint8Array(cred.identity) });
|
|
70340
|
+
}
|
|
70341
|
+
}
|
|
70342
|
+
}
|
|
70343
|
+
return out;
|
|
70344
|
+
}
|
|
70304
70345
|
// -------------------------------------------------------------------------
|
|
70305
70346
|
// Encrypt / Decrypt
|
|
70306
70347
|
// -------------------------------------------------------------------------
|
|
@@ -71254,6 +71295,7 @@ var init_dist = __esm({
|
|
|
71254
71295
|
OUTBOUND_DEDUPE_TYPES = /* @__PURE__ */ new Set(["text", "status_alert", "artifact", "attachment"]);
|
|
71255
71296
|
RETRY_CANDIDATE_TTL_MS = 6e4;
|
|
71256
71297
|
RETRY_CANDIDATE_MAX = 32;
|
|
71298
|
+
TOPIC_ID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
71257
71299
|
ROOM_FULFIL_COOLDOWN_MS = 6e4;
|
|
71258
71300
|
SecureChannel = class _SecureChannel extends EventEmitter {
|
|
71259
71301
|
constructor(config2) {
|
|
@@ -71307,6 +71349,7 @@ var init_dist = __esm({
|
|
|
71307
71349
|
_trustTier = null;
|
|
71308
71350
|
_trustTokenExpiresAt = null;
|
|
71309
71351
|
_trustTokenInterval = null;
|
|
71352
|
+
_trustTokenUnavailableUntil = 0;
|
|
71310
71353
|
_pendingPollTimer = null;
|
|
71311
71354
|
_syncMessageIds = null;
|
|
71312
71355
|
_deliveryHeartbeat = null;
|
|
@@ -71479,8 +71522,15 @@ ${text}`;
|
|
|
71479
71522
|
_scanEngine = null;
|
|
71480
71523
|
_scanRuleSetVersion = 0;
|
|
71481
71524
|
_telemetryReporter = null;
|
|
71482
|
-
/**
|
|
71483
|
-
|
|
71525
|
+
/**
|
|
71526
|
+
* #1416: topic of the most recent inbound message, PER conversation group —
|
|
71527
|
+
* the fallback for a reply that names no topic. Keyed by `_topicScope()`:
|
|
71528
|
+
* `g:<group>` normally, `c:<conversation>` for a conversation whose group is
|
|
71529
|
+
* not known yet, `*` for a legacy agent that knows no groups at all. It used
|
|
71530
|
+
* to be one value for the whole agent, so a broadcast into person B's group
|
|
71531
|
+
* carried the topic of person A's last message. In memory only, as before.
|
|
71532
|
+
*/
|
|
71533
|
+
_lastIncomingTopics = /* @__PURE__ */ new Map();
|
|
71484
71534
|
/** Room ID from the most recent inbound room message — used as fallback for HTTP /send replies. */
|
|
71485
71535
|
_lastInboundRoomId;
|
|
71486
71536
|
/** Rate-limit: last resync_request timestamp per conversation (5-min cooldown). */
|
|
@@ -71522,6 +71572,7 @@ ${text}`;
|
|
|
71522
71572
|
static SILENCE_TIMEOUT_MS = 9e4;
|
|
71523
71573
|
static POLL_FALLBACK_INTERVAL_MS = 3e4;
|
|
71524
71574
|
// 30s when messages found
|
|
71575
|
+
static TRUST_TOKEN_UNAVAILABLE_BACKOFF_MS = 6 * 60 * 60 * 1e3;
|
|
71525
71576
|
static POLL_FALLBACK_IDLE_MS = 6e4;
|
|
71526
71577
|
// 60s when idle
|
|
71527
71578
|
/**
|
|
@@ -72057,13 +72108,76 @@ ${text}`;
|
|
|
72057
72108
|
}
|
|
72058
72109
|
return `${kind}:${id ?? ""}`;
|
|
72059
72110
|
}
|
|
72111
|
+
/*
|
|
72112
|
+
* #1416 — DM history is partitioned by conversation GROUP.
|
|
72113
|
+
*
|
|
72114
|
+
* Since #1399 every person has their own 1:1 group with the agent, but the
|
|
72115
|
+
* agent kept one DM history pool: a catch-up request or a session_init
|
|
72116
|
+
* replay from person B's group was answered with person A's plaintext too.
|
|
72117
|
+
* A DM entry's context now names its group:
|
|
72118
|
+
*
|
|
72119
|
+
* dm:g:<groupId>:<topicId> — the group is known
|
|
72120
|
+
* dm:c:<convId>:<topicId> — the conversation's group is not known yet
|
|
72121
|
+
* dm:<topicId> — legacy (pre-#1416): the PRIMARY group's
|
|
72122
|
+
*
|
|
72123
|
+
* Every form keeps the `dm:` prefix the archive, the web client and Hermes
|
|
72124
|
+
* test for, and the archive format (`topicId` is a free string) is unchanged.
|
|
72125
|
+
* An agent that knows at most one group selects exactly what it did before.
|
|
72126
|
+
*/
|
|
72127
|
+
/** The DM history context for a message in `gid` (or `convId`'s group). */
|
|
72128
|
+
_dmHistoryContext(topicId, gid, convId) {
|
|
72129
|
+
const g2 = gid ?? (convId ? this._sessionGroupIds.get(convId) : void 0);
|
|
72130
|
+
if (g2) return `dm:g:${g2}:${topicId ?? ""}`;
|
|
72131
|
+
if (convId && this._knownDmGroups().size > 0) return `dm:c:${convId}:${topicId ?? ""}`;
|
|
72132
|
+
const legacyTopic = topicId && /^[gc]:/.test(topicId) ? "" : topicId;
|
|
72133
|
+
return this._historyContext("dm", legacyTopic);
|
|
72134
|
+
}
|
|
72135
|
+
/** Every conversation group this agent knows of. */
|
|
72136
|
+
_knownDmGroups() {
|
|
72137
|
+
const known = new Set(this._sessionGroupIds.values());
|
|
72138
|
+
if (this._persisted?.groupId) known.add(this._persisted.groupId);
|
|
72139
|
+
return known;
|
|
72140
|
+
}
|
|
72141
|
+
/** The group a DM history entry belongs to (see the forms above). */
|
|
72142
|
+
_dmEntryScope(entry, known) {
|
|
72143
|
+
const t2 = entry.topicId ?? "";
|
|
72144
|
+
let scope;
|
|
72145
|
+
if (t2.startsWith("dm:g:")) {
|
|
72146
|
+
scope = t2.slice("dm:g:".length).split(":")[0];
|
|
72147
|
+
} else if (t2.startsWith("dm:c:")) {
|
|
72148
|
+
const conv = t2.slice("dm:c:".length).split(":")[0];
|
|
72149
|
+
scope = this._sessionGroupIds.get(conv) ?? `c:${conv}`;
|
|
72150
|
+
} else {
|
|
72151
|
+
scope = this._persisted?.groupId;
|
|
72152
|
+
}
|
|
72153
|
+
if ((scope === void 0 || scope.startsWith("c:")) && known.size === 1) {
|
|
72154
|
+
return [...known][0];
|
|
72155
|
+
}
|
|
72156
|
+
return scope;
|
|
72157
|
+
}
|
|
72158
|
+
/**
|
|
72159
|
+
* The group a DM history request is answered from, or `null` for "every DM
|
|
72160
|
+
* entry" (an agent that knows no groups at all — the old behaviour). A
|
|
72161
|
+
* request whose group cannot be told fails closed to its own conversation.
|
|
72162
|
+
*/
|
|
72163
|
+
_dmRequestScope(gid, convId, known) {
|
|
72164
|
+
if (known.size === 0) return null;
|
|
72165
|
+
const g2 = gid ?? (convId ? this._sessionGroupIds.get(convId) : void 0);
|
|
72166
|
+
if (g2) return g2;
|
|
72167
|
+
const isPrimaryConv = convId === void 0 || convId === this._primaryConversationId;
|
|
72168
|
+
if (known.size === 1 && isPrimaryConv) return [...known][0];
|
|
72169
|
+
if (convId && convId === this._primaryConversationId && this._persisted?.groupId) {
|
|
72170
|
+
return this._persisted.groupId;
|
|
72171
|
+
}
|
|
72172
|
+
return `c:${convId ?? ""}`;
|
|
72173
|
+
}
|
|
72060
72174
|
/**
|
|
72061
72175
|
* Normalize one accepted application envelope before it enters plaintext
|
|
72062
72176
|
* history. Protocol/control types and empty attachment-only envelopes are
|
|
72063
72177
|
* never archived, and attachment key material can never become the fallback
|
|
72064
72178
|
* text.
|
|
72065
72179
|
*/
|
|
72066
|
-
async _captureHistoryApplication(sender, rawPlaintext, kind, id, transportTimestamp, declaredType = "message") {
|
|
72180
|
+
async _captureHistoryApplication(sender, rawPlaintext, kind, id, transportTimestamp, declaredType = "message", dmScope) {
|
|
72067
72181
|
let messageType = declaredType;
|
|
72068
72182
|
let text = rawPlaintext;
|
|
72069
72183
|
try {
|
|
@@ -72078,14 +72192,14 @@ ${text}`;
|
|
|
72078
72192
|
await this._appendHistory(
|
|
72079
72193
|
sender,
|
|
72080
72194
|
text,
|
|
72081
|
-
this._historyContext(kind, id),
|
|
72195
|
+
kind === "dm" ? this._dmHistoryContext(id, dmScope?.groupId, dmScope?.conversationId) : this._historyContext(kind, id),
|
|
72082
72196
|
transportTimestamp
|
|
72083
72197
|
);
|
|
72084
72198
|
return text;
|
|
72085
72199
|
}
|
|
72086
72200
|
/** Select a context before applying the optional lower bound and final cap. */
|
|
72087
|
-
_historyForCatchup(kind, id, sinceTs) {
|
|
72088
|
-
let filtered = this._selectHistoryContext(kind, id);
|
|
72201
|
+
_historyForCatchup(kind, id, sinceTs, dmScope) {
|
|
72202
|
+
let filtered = this._selectHistoryContext(kind, id, dmScope);
|
|
72089
72203
|
if (sinceTs !== void 0 && sinceTs !== null) {
|
|
72090
72204
|
if (typeof sinceTs !== "string" || !CANONICAL_TIMESTAMP_RE.test(sinceTs) || !Number.isFinite(Date.parse(sinceTs)) || new Date(Date.parse(sinceTs)).toISOString() !== sinceTs) {
|
|
72091
72205
|
throw new Error("Invalid history catch-up timestamp");
|
|
@@ -72095,11 +72209,17 @@ ${text}`;
|
|
|
72095
72209
|
return filtered.sort((a2, b2) => Date.parse(a2.ts) - Date.parse(b2.ts) || a2.id.localeCompare(b2.id)).slice(-100);
|
|
72096
72210
|
}
|
|
72097
72211
|
/** Shared exact routing selector for catch-up and legacy DR replay. */
|
|
72098
|
-
_selectHistoryContext(kind, id) {
|
|
72212
|
+
_selectHistoryContext(kind, id, dmScope) {
|
|
72099
72213
|
const history = this._persisted?.messageHistory ?? [];
|
|
72100
|
-
|
|
72214
|
+
if (kind === "room") {
|
|
72215
|
+
return history.filter((entry) => entry.topicId === this._historyContext("room", id));
|
|
72216
|
+
}
|
|
72217
|
+
const dm = history.filter(
|
|
72101
72218
|
(entry) => entry.topicId?.startsWith("dm:") === true || !entry.topicId?.startsWith("room:") && !entry.topicId?.startsWith("a2a:")
|
|
72102
72219
|
);
|
|
72220
|
+
const known = this._knownDmGroups();
|
|
72221
|
+
const want = this._dmRequestScope(dmScope?.groupId, dmScope?.conversationId, known);
|
|
72222
|
+
return want === null ? dm : dm.filter((entry) => this._dmEntryScope(entry, known) === want);
|
|
72103
72223
|
}
|
|
72104
72224
|
_markHistoryDirty() {
|
|
72105
72225
|
this._historyBackupScheduler.markDirty();
|
|
@@ -72589,7 +72709,9 @@ ${text}`;
|
|
|
72589
72709
|
Promise.resolve().then(() => (init_openclaw_compat(), openclaw_compat_exports)).then(({ requestHeartbeatNow: requestHeartbeatNow2 }) => requestHeartbeatNow2({ reason: "channel-send" })).catch(() => {
|
|
72590
72710
|
});
|
|
72591
72711
|
const targetConvId = options?.conversationId;
|
|
72592
|
-
const
|
|
72712
|
+
const explicitTopicId = options?.topicId;
|
|
72713
|
+
const targeted = targetConvId !== void 0;
|
|
72714
|
+
const frameHistoryContexts = [];
|
|
72593
72715
|
const messageType = options?.messageType ?? "text";
|
|
72594
72716
|
const priority = options?.priority ?? "normal";
|
|
72595
72717
|
const parentSpanId = options?.parentSpanId;
|
|
@@ -72656,11 +72778,12 @@ ${text}`;
|
|
|
72656
72778
|
plaintextBytes
|
|
72657
72779
|
);
|
|
72658
72780
|
await saveMlsState(this.config.dataDir, entry.mlsGroupId, JSON.stringify(mlsGroup.exportState()));
|
|
72781
|
+
const frameTopicId = this._topicForFrame(gid, targetConvId, explicitTopicId, targeted);
|
|
72659
72782
|
const payload = {
|
|
72660
72783
|
group_id: entry.mlsGroupId,
|
|
72661
72784
|
epoch: Number(mlsGroup.epoch),
|
|
72662
72785
|
payload: Buffer.from(cipherBytes).toString("hex"),
|
|
72663
|
-
topic_id:
|
|
72786
|
+
topic_id: frameTopicId,
|
|
72664
72787
|
client_message_id: clientMessageId,
|
|
72665
72788
|
message_type: messageType,
|
|
72666
72789
|
priority,
|
|
@@ -72670,6 +72793,7 @@ ${text}`;
|
|
|
72670
72793
|
if (this._persisted?.hubAddress) payload.hub_address = this._persisted.hubAddress;
|
|
72671
72794
|
if (this._persisted?.hubId) payload.sender_hub_id = this._persisted.hubId;
|
|
72672
72795
|
pendingWsSends.push(JSON.stringify({ event: "message_mls", data: payload }));
|
|
72796
|
+
frameHistoryContexts.push(this._dmHistoryContext(frameTopicId, gid, targetConvId));
|
|
72673
72797
|
addressedMlsGroupIds.push(entry.mlsGroupId);
|
|
72674
72798
|
sentSharedGroupIds.add(gid);
|
|
72675
72799
|
sentCount++;
|
|
@@ -72693,6 +72817,7 @@ ${text}`;
|
|
|
72693
72817
|
continue;
|
|
72694
72818
|
}
|
|
72695
72819
|
try {
|
|
72820
|
+
const topicId = this._topicForFrame(convGroupId, convId, explicitTopicId, targeted);
|
|
72696
72821
|
const mlsGroup = (convGroupId ? this._mlsGroups.get(`1to1-group:${convGroupId}`) : null) ?? this._mlsGroups.get(`conv:${convId}`);
|
|
72697
72822
|
const mlsGroupId = (convGroupId ? this._persisted?.mlsGroups?.[convGroupId]?.mlsGroupId : null) ?? this._persisted?.mlsConversations?.[convId]?.mlsGroupId;
|
|
72698
72823
|
if (convGroupId && mlsGroupId && sentSharedGroupIds.has(convGroupId)) {
|
|
@@ -72734,6 +72859,7 @@ ${text}`;
|
|
|
72734
72859
|
data: payload
|
|
72735
72860
|
})
|
|
72736
72861
|
);
|
|
72862
|
+
frameHistoryContexts.push(this._dmHistoryContext(topicId, convGroupId, convId));
|
|
72737
72863
|
addressedMlsGroupIds.push(mlsGroupId);
|
|
72738
72864
|
if (convGroupId) sentSharedGroupIds.add(convGroupId);
|
|
72739
72865
|
} else if (!options?.bypassMlsHold && this._shouldHoldForMls(convGroupId, mlsGroup, mlsGroupId)) {
|
|
@@ -72753,7 +72879,7 @@ ${text}`;
|
|
|
72753
72879
|
history: {
|
|
72754
72880
|
id: clientMessageId,
|
|
72755
72881
|
text: plaintext,
|
|
72756
|
-
topicId: this.
|
|
72882
|
+
topicId: this._dmHistoryContext(topicId, convGroupId, convId)
|
|
72757
72883
|
}
|
|
72758
72884
|
} : {}
|
|
72759
72885
|
};
|
|
@@ -72782,6 +72908,7 @@ ${text}`;
|
|
|
72782
72908
|
data: payload
|
|
72783
72909
|
})
|
|
72784
72910
|
);
|
|
72911
|
+
frameHistoryContexts.push(this._dmHistoryContext(topicId, convGroupId, convId));
|
|
72785
72912
|
} else {
|
|
72786
72913
|
if (!this._persisted.outboundQueue) {
|
|
72787
72914
|
this._persisted.outboundQueue = [];
|
|
@@ -72813,6 +72940,7 @@ ${text}`;
|
|
|
72813
72940
|
continue;
|
|
72814
72941
|
}
|
|
72815
72942
|
try {
|
|
72943
|
+
const topicId = this._topicForFrame(mlsOnlyConvGroupId, mlsConvId, explicitTopicId, targeted);
|
|
72816
72944
|
const plaintextBytes = new TextEncoder().encode(plaintext);
|
|
72817
72945
|
const mlsOnlyGroupKey = mlsOnlyConvGroupId && this._mlsGroups.has(`1to1-group:${mlsOnlyConvGroupId}`) ? `1to1-group:${mlsOnlyConvGroupId}` : `conv:${mlsConvId}`;
|
|
72818
72946
|
const cipherBytes = await this._encryptWithCatchUp(
|
|
@@ -72838,6 +72966,7 @@ ${text}`;
|
|
|
72838
72966
|
if (this._persisted?.hubAddress) payload.hub_address = this._persisted.hubAddress;
|
|
72839
72967
|
if (this._persisted?.hubId) payload.sender_hub_id = this._persisted.hubId;
|
|
72840
72968
|
pendingWsSends.push(JSON.stringify({ event: "message_mls", data: payload }));
|
|
72969
|
+
frameHistoryContexts.push(this._dmHistoryContext(topicId, mlsOnlyConvGroupId, mlsConvId));
|
|
72841
72970
|
addressedMlsGroupIds.push(resolvedMlsGroupId);
|
|
72842
72971
|
sentCount++;
|
|
72843
72972
|
if (mlsOnlyConvGroupId) sentSharedGroupIds.add(mlsOnlyConvGroupId);
|
|
@@ -72859,11 +72988,15 @@ ${text}`;
|
|
|
72859
72988
|
);
|
|
72860
72989
|
}
|
|
72861
72990
|
let writtenFrames = 0;
|
|
72862
|
-
|
|
72863
|
-
|
|
72991
|
+
let historyContext;
|
|
72992
|
+
for (const [i2, frame] of pendingWsSends.entries()) {
|
|
72993
|
+
if (this._sendApplicationFrame(frame)) {
|
|
72994
|
+
if (writtenFrames === 0) historyContext = frameHistoryContexts[i2];
|
|
72995
|
+
writtenFrames += 1;
|
|
72996
|
+
}
|
|
72864
72997
|
}
|
|
72865
72998
|
if (!options?.isResend && messageType === "text" && writtenFrames > 0) {
|
|
72866
|
-
await this._appendHistory("agent", plaintext, this._historyContext("dm"
|
|
72999
|
+
await this._appendHistory("agent", plaintext, historyContext ?? this._historyContext("dm"), void 0, clientMessageId);
|
|
72867
73000
|
}
|
|
72868
73001
|
if (writtenFrames > 0) {
|
|
72869
73002
|
console.log(
|
|
@@ -72919,7 +73052,7 @@ ${text}`;
|
|
|
72919
73052
|
*/
|
|
72920
73053
|
sendActivitySpan(spanData) {
|
|
72921
73054
|
if (!this._ws || this._ws.readyState !== WebSocket.OPEN) return;
|
|
72922
|
-
const pluginVersion = true ? "0.23.
|
|
73055
|
+
const pluginVersion = true ? "0.23.51" : "0.0.0-dev";
|
|
72923
73056
|
const agentName = this.config.agentName ?? "Agent";
|
|
72924
73057
|
const resource = {
|
|
72925
73058
|
"service.name": "agentvault-agent",
|
|
@@ -73404,6 +73537,16 @@ ${text}`;
|
|
|
73404
73537
|
);
|
|
73405
73538
|
if (mine.length === 0) return false;
|
|
73406
73539
|
const before = this._persisted.groupId;
|
|
73540
|
+
const primaryBefore = this._persisted.primaryConversationId;
|
|
73541
|
+
const knownBefore = this._knownDmGroups();
|
|
73542
|
+
const ownersBefore = /* @__PURE__ */ new Set();
|
|
73543
|
+
if (before) {
|
|
73544
|
+
for (const [convId, gid] of this._sessionGroupIds) {
|
|
73545
|
+
if (gid !== before) continue;
|
|
73546
|
+
const owner = this._sessions.get(convId)?.ownerDeviceId ?? this._persisted.sessions?.[convId]?.ownerDeviceId;
|
|
73547
|
+
if (owner) ownersBefore.add(owner);
|
|
73548
|
+
}
|
|
73549
|
+
}
|
|
73407
73550
|
this._sessionGroupIds = new Map(mine.map((r2) => [r2.id, r2.group_id]));
|
|
73408
73551
|
this._persisted.conversationGroupIds = Object.fromEntries(this._sessionGroupIds);
|
|
73409
73552
|
const joined = mine.find((r2) => this._persisted.mlsGroups?.[r2.group_id]);
|
|
@@ -73415,6 +73558,23 @@ ${text}`;
|
|
|
73415
73558
|
}
|
|
73416
73559
|
this._persisted.groupId = primary.group_id;
|
|
73417
73560
|
this._persisted.primaryConversationId = primary.id;
|
|
73561
|
+
for (const r2 of mine) {
|
|
73562
|
+
if (typeof r2.default_topic_id === "string") this._recordDefaultTopic(r2.group_id, r2.default_topic_id);
|
|
73563
|
+
}
|
|
73564
|
+
const primaryDefault = this._persisted.defaultTopicIds?.[primary.group_id];
|
|
73565
|
+
if (primaryDefault) this._persisted.defaultTopicId = primaryDefault;
|
|
73566
|
+
const primaryOwner = primary.owner_device_id;
|
|
73567
|
+
const samePerson = primary.id === primaryBefore || typeof primaryOwner === "string" && ownersBefore.has(primaryOwner);
|
|
73568
|
+
let retagged = false;
|
|
73569
|
+
if (before && primary.group_id !== before && knownBefore.size === 1 && knownBefore.has(before) && samePerson) {
|
|
73570
|
+
const oldPrefix = `dm:g:${before}:`;
|
|
73571
|
+
for (const entry of this._persisted.messageHistory ?? []) {
|
|
73572
|
+
if (entry.topicId?.startsWith(oldPrefix)) {
|
|
73573
|
+
entry.topicId = `dm:g:${primary.group_id}:${entry.topicId.slice(oldPrefix.length)}`;
|
|
73574
|
+
retagged = true;
|
|
73575
|
+
}
|
|
73576
|
+
}
|
|
73577
|
+
}
|
|
73418
73578
|
const liveGroupIds = new Set(mine.map((r2) => r2.group_id));
|
|
73419
73579
|
if (staleGid && staleMlsGroupId && !liveGroupIds.has(staleGid)) {
|
|
73420
73580
|
try {
|
|
@@ -73429,6 +73589,10 @@ ${text}`;
|
|
|
73429
73589
|
});
|
|
73430
73590
|
}
|
|
73431
73591
|
await this._persistState();
|
|
73592
|
+
if (retagged) {
|
|
73593
|
+
this._markHistoryDirty();
|
|
73594
|
+
await this._saveHistoryState();
|
|
73595
|
+
}
|
|
73432
73596
|
console.log(
|
|
73433
73597
|
`[SecureChannel] Re-resolved conversation groups ${staleMlsGroupId ? `after 'unknown group' ${staleMlsGroupId.slice(0, 8)}` : "on connect (#1034)"}: primary group ${String(before).slice(0, 8)} \u2192 ${this._persisted.groupId.slice(0, 8)} (${mine.length} active conversation(s))`
|
|
73434
73598
|
);
|
|
@@ -73952,6 +74116,7 @@ ${text}`;
|
|
|
73952
74116
|
return this._trustTokenExpiresAt;
|
|
73953
74117
|
}
|
|
73954
74118
|
async refreshTrustToken() {
|
|
74119
|
+
if (Date.now() < this._trustTokenUnavailableUntil) return;
|
|
73955
74120
|
try {
|
|
73956
74121
|
const res = await fetch(`${this.config.apiUrl}/api/v1/gate/token`, {
|
|
73957
74122
|
method: "POST",
|
|
@@ -73965,12 +74130,15 @@ ${text}`;
|
|
|
73965
74130
|
this._trustToken = data.token;
|
|
73966
74131
|
this._trustTier = data.tier;
|
|
73967
74132
|
this._trustTokenExpiresAt = data.expires_at;
|
|
74133
|
+
} else if (res.status === 503 || res.status === 404 || res.status === 403) {
|
|
74134
|
+
this._trustTokenUnavailableUntil = Date.now() + _SecureChannel.TRUST_TOKEN_UNAVAILABLE_BACKOFF_MS;
|
|
73968
74135
|
}
|
|
73969
74136
|
} catch (err) {
|
|
73970
74137
|
console.warn("[AgentVault] Trust token refresh failed:", err);
|
|
73971
74138
|
}
|
|
73972
74139
|
}
|
|
73973
74140
|
startTrustTokenRefresh() {
|
|
74141
|
+
this.stopTrustTokenRefresh();
|
|
73974
74142
|
this.refreshTrustToken();
|
|
73975
74143
|
this._trustTokenInterval = setInterval(
|
|
73976
74144
|
() => this.refreshTrustToken(),
|
|
@@ -74158,15 +74326,105 @@ ${text}`;
|
|
|
74158
74326
|
return this._mcpServer;
|
|
74159
74327
|
}
|
|
74160
74328
|
// --- Topic management ---
|
|
74329
|
+
/*
|
|
74330
|
+
* #1416 — topics are per conversation GROUP.
|
|
74331
|
+
*
|
|
74332
|
+
* Since #1399 every person has their own 1:1 group with the agent, and a
|
|
74333
|
+
* topic belongs to exactly one group (`topics.group_id`). The agent used to
|
|
74334
|
+
* keep ONE default topic (the primary group's) and ONE last-incoming topic,
|
|
74335
|
+
* and stamped both on every frame — so a reply into person B's group could
|
|
74336
|
+
* carry person A's topic, and B's web client (which filters live messages by
|
|
74337
|
+
* the topic it is viewing) dropped it until a reload.
|
|
74338
|
+
*
|
|
74339
|
+
* The rule now: a frame's topic comes from THAT frame's group. A group with
|
|
74340
|
+
* no known topic gets none — the server then files the message under that
|
|
74341
|
+
* conversation's own default topic (`ws.py`, lazily created) — rather than
|
|
74342
|
+
* borrowing another group's.
|
|
74343
|
+
*/
|
|
74344
|
+
/** Scope key for per-group topic state; see `_lastIncomingTopics`. */
|
|
74345
|
+
_topicScope(gid, convId) {
|
|
74346
|
+
if (gid) return `g:${gid}`;
|
|
74347
|
+
if (!this._persisted?.groupId && this._sessionGroupIds.size === 0) return "*";
|
|
74348
|
+
return convId ? `c:${convId}` : void 0;
|
|
74349
|
+
}
|
|
74350
|
+
/** Record the topic of an inbound 1:1 message for its own group (#1416). */
|
|
74351
|
+
_rememberIncomingTopic(convId, gid, topicId) {
|
|
74352
|
+
const scope = this._topicScope(gid ?? (convId ? this._sessionGroupIds.get(convId) : void 0), convId);
|
|
74353
|
+
if (!scope) return;
|
|
74354
|
+
if (topicId && !isTopicId(topicId)) return;
|
|
74355
|
+
if (topicId) this._lastIncomingTopics.set(scope, topicId);
|
|
74356
|
+
else this._lastIncomingTopics.delete(scope);
|
|
74357
|
+
}
|
|
74161
74358
|
/**
|
|
74162
|
-
*
|
|
74163
|
-
*
|
|
74359
|
+
* Record a group's default topic (#1416). The legacy `defaultTopicId` keeps
|
|
74360
|
+
* mirroring the PRIMARY group's entry, for older readers and backups.
|
|
74164
74361
|
*/
|
|
74165
|
-
|
|
74362
|
+
_recordDefaultTopic(gid, topicId) {
|
|
74363
|
+
if (!gid || !topicId || !this._persisted) return;
|
|
74364
|
+
(this._persisted.defaultTopicIds ??= {})[gid] = topicId;
|
|
74365
|
+
if (gid === this._persisted.groupId) this._persisted.defaultTopicId = topicId;
|
|
74366
|
+
}
|
|
74367
|
+
/** The group a topic is known to belong to, if any. */
|
|
74368
|
+
_groupOfTopic(topicId) {
|
|
74369
|
+
const p2 = this._persisted;
|
|
74370
|
+
for (const [gid, tid] of Object.entries(p2?.defaultTopicIds ?? {})) {
|
|
74371
|
+
if (tid === topicId) return gid;
|
|
74372
|
+
}
|
|
74373
|
+
if (p2?.defaultTopicId === topicId && p2.groupId) return p2.groupId;
|
|
74374
|
+
for (const t2 of p2?.topics ?? []) {
|
|
74375
|
+
if (t2.id === topicId) return t2.groupId ?? p2?.groupId;
|
|
74376
|
+
}
|
|
74377
|
+
for (const [scope, tid] of this._lastIncomingTopics) {
|
|
74378
|
+
if (tid === topicId && scope.startsWith("g:")) return scope.slice(2);
|
|
74379
|
+
}
|
|
74380
|
+
return void 0;
|
|
74381
|
+
}
|
|
74382
|
+
/**
|
|
74383
|
+
* The topic one outgoing 1:1 frame carries (#1416), or `undefined` to send
|
|
74384
|
+
* none. `gid` is the frame's conversation group (looked up from `convId`
|
|
74385
|
+
* when not given); `explicit` is the caller's `topicId`; `targeted` is true
|
|
74386
|
+
* when the caller addressed one conversation.
|
|
74387
|
+
*/
|
|
74388
|
+
_topicForFrame(gid, convId, explicit, targeted, useLastIncoming = true) {
|
|
74389
|
+
const p2 = this._persisted;
|
|
74390
|
+
const g2 = gid ?? (convId ? this._sessionGroupIds.get(convId) : void 0);
|
|
74391
|
+
const primaryScope = g2 !== void 0 ? g2 === p2?.groupId : convId === this._primaryConversationId || !p2?.groupId;
|
|
74392
|
+
if (isTopicId(explicit)) {
|
|
74393
|
+
const owner = this._groupOfTopic(explicit);
|
|
74394
|
+
if (owner !== void 0 ? owner === g2 : targeted || primaryScope) return explicit;
|
|
74395
|
+
}
|
|
74396
|
+
const scope = this._topicScope(g2, convId);
|
|
74397
|
+
const last = scope && useLastIncoming ? this._lastIncomingTopics.get(scope) : void 0;
|
|
74398
|
+
if (last) return last;
|
|
74399
|
+
if (g2 && p2?.defaultTopicIds?.[g2]) return p2.defaultTopicIds[g2];
|
|
74400
|
+
if (primaryScope && p2?.defaultTopicId) return p2.defaultTopicId;
|
|
74401
|
+
return void 0;
|
|
74402
|
+
}
|
|
74403
|
+
/**
|
|
74404
|
+
* The conversation group a topic call addresses (#1416): the named
|
|
74405
|
+
* conversation's own group, else the primary group. A named conversation
|
|
74406
|
+
* whose group is unknown is an error — falling back to the primary group
|
|
74407
|
+
* would create/list topics in somebody else's chat.
|
|
74408
|
+
*/
|
|
74409
|
+
_topicGroupFor(conversationId) {
|
|
74410
|
+
if (conversationId) {
|
|
74411
|
+
const gid = this._sessionGroupIds.get(conversationId);
|
|
74412
|
+
if (!gid) throw new Error("Conversation group unknown for topic call");
|
|
74413
|
+
return gid;
|
|
74414
|
+
}
|
|
74166
74415
|
if (!this._persisted?.groupId) {
|
|
74167
74416
|
throw new Error("Channel not initialized or groupId unknown");
|
|
74168
74417
|
}
|
|
74169
|
-
|
|
74418
|
+
return this._persisted.groupId;
|
|
74419
|
+
}
|
|
74420
|
+
/**
|
|
74421
|
+
* Create a new topic within a conversation group — the given conversation's
|
|
74422
|
+
* own group (#1416), or the primary group when none is named.
|
|
74423
|
+
* Requires the channel to be initialized with a groupId (from activation).
|
|
74424
|
+
*/
|
|
74425
|
+
async createTopic(name, options) {
|
|
74426
|
+
const groupId = this._topicGroupFor(options?.conversationId);
|
|
74427
|
+
if (!this._deviceJwt || !this._persisted) {
|
|
74170
74428
|
throw new Error("Channel not authenticated");
|
|
74171
74429
|
}
|
|
74172
74430
|
const res = await fetch(`${this.config.apiUrl}/api/v1/topics`, {
|
|
@@ -74176,7 +74434,7 @@ ${text}`;
|
|
|
74176
74434
|
Authorization: `Bearer ${this._deviceJwt}`
|
|
74177
74435
|
},
|
|
74178
74436
|
body: JSON.stringify({
|
|
74179
|
-
group_id:
|
|
74437
|
+
group_id: groupId,
|
|
74180
74438
|
name,
|
|
74181
74439
|
creator_device_id: this._persisted.deviceId
|
|
74182
74440
|
})
|
|
@@ -74190,23 +74448,23 @@ ${text}`;
|
|
|
74190
74448
|
if (!this._persisted.topics) {
|
|
74191
74449
|
this._persisted.topics = [];
|
|
74192
74450
|
}
|
|
74193
|
-
this._persisted.topics.push(topic);
|
|
74451
|
+
this._persisted.topics.push({ ...topic, groupId });
|
|
74452
|
+
if (topic.isDefault) this._recordDefaultTopic(groupId, topic.id);
|
|
74194
74453
|
await this._persistState();
|
|
74195
74454
|
return topic;
|
|
74196
74455
|
}
|
|
74197
74456
|
/**
|
|
74198
|
-
* List all topics in the conversation
|
|
74457
|
+
* List all topics in a conversation group — the given conversation's own
|
|
74458
|
+
* group (#1416), or the primary group when none is named.
|
|
74199
74459
|
* Requires the channel to be initialized with a groupId (from activation).
|
|
74200
74460
|
*/
|
|
74201
|
-
async listTopics() {
|
|
74202
|
-
|
|
74203
|
-
|
|
74204
|
-
}
|
|
74205
|
-
if (!this._deviceJwt) {
|
|
74461
|
+
async listTopics(options) {
|
|
74462
|
+
const groupId = this._topicGroupFor(options?.conversationId);
|
|
74463
|
+
if (!this._deviceJwt || !this._persisted) {
|
|
74206
74464
|
throw new Error("Channel not authenticated");
|
|
74207
74465
|
}
|
|
74208
74466
|
const res = await fetch(
|
|
74209
|
-
`${this.config.apiUrl}/api/v1/topics?group_id=${encodeURIComponent(
|
|
74467
|
+
`${this.config.apiUrl}/api/v1/topics?group_id=${encodeURIComponent(groupId)}`,
|
|
74210
74468
|
{
|
|
74211
74469
|
headers: {
|
|
74212
74470
|
Authorization: `Bearer ${this._deviceJwt}`
|
|
@@ -74219,7 +74477,13 @@ ${text}`;
|
|
|
74219
74477
|
}
|
|
74220
74478
|
const resp = await res.json();
|
|
74221
74479
|
const topics = resp.map((t2) => ({ id: t2.id, name: t2.name, isDefault: t2.is_default }));
|
|
74222
|
-
this._persisted.
|
|
74480
|
+
const primaryGid = this._persisted.groupId;
|
|
74481
|
+
this._persisted.topics = [
|
|
74482
|
+
...(this._persisted.topics ?? []).filter((t2) => (t2.groupId ?? primaryGid) !== groupId),
|
|
74483
|
+
...topics.map((t2) => ({ ...t2, groupId }))
|
|
74484
|
+
];
|
|
74485
|
+
const def = topics.find((t2) => t2.isDefault);
|
|
74486
|
+
if (def) this._recordDefaultTopic(groupId, def.id);
|
|
74223
74487
|
await this._persistState();
|
|
74224
74488
|
return topics;
|
|
74225
74489
|
}
|
|
@@ -74803,6 +75067,9 @@ ${text}`;
|
|
|
74803
75067
|
this._persisted.defaultTopicId = primary.default_topic_id;
|
|
74804
75068
|
}
|
|
74805
75069
|
}
|
|
75070
|
+
for (const conv of conversations) {
|
|
75071
|
+
this._recordDefaultTopic(conv.group_id, conv.default_topic_id);
|
|
75072
|
+
}
|
|
74806
75073
|
this._sessionGroupIds = /* @__PURE__ */ new Map();
|
|
74807
75074
|
for (const conv of conversations) {
|
|
74808
75075
|
if (conv.group_id) {
|
|
@@ -74915,7 +75182,7 @@ ${text}`;
|
|
|
74915
75182
|
agentVersion: this.config.agentVersion ?? "0.0.0",
|
|
74916
75183
|
// __AV_VERSION__ is injected by esbuild from package.json at build time.
|
|
74917
75184
|
// Falls back to "0.0.0-dev" in non-bundled contexts (tests).
|
|
74918
|
-
pluginVersion: true ? "0.23.
|
|
75185
|
+
pluginVersion: true ? "0.23.51" : "0.0.0-dev"
|
|
74919
75186
|
});
|
|
74920
75187
|
this._telemetryReporter.startAutoFlush(3e4);
|
|
74921
75188
|
}
|
|
@@ -75243,7 +75510,7 @@ ${text}`;
|
|
|
75243
75510
|
agentVersion: this.config.agentVersion ?? "0.0.0",
|
|
75244
75511
|
// __AV_VERSION__ is injected by esbuild from package.json at build time.
|
|
75245
75512
|
// Falls back to "0.0.0-dev" in non-bundled contexts (tests).
|
|
75246
|
-
pluginVersion: true ? "0.23.
|
|
75513
|
+
pluginVersion: true ? "0.23.51" : "0.0.0-dev"
|
|
75247
75514
|
});
|
|
75248
75515
|
this._telemetryReporter.startAutoFlush(3e4);
|
|
75249
75516
|
}
|
|
@@ -75706,11 +75973,15 @@ ${text}`;
|
|
|
75706
75973
|
if (decisionReply) messageType = "decision_response";
|
|
75707
75974
|
} catch {
|
|
75708
75975
|
}
|
|
75976
|
+
const dmGroupId = convGroupId ?? (mgrKey?.startsWith("1to1-group:") ? mgrKey.slice("1to1-group:".length) : void 0);
|
|
75709
75977
|
if (messageType === "history_catchup_request") {
|
|
75710
75978
|
try {
|
|
75711
75979
|
const request = JSON.parse(plaintext);
|
|
75712
75980
|
if (typeof request.requesting_device_id !== "string") return;
|
|
75713
|
-
const filtered = this._historyForCatchup("dm", void 0, request.since_ts
|
|
75981
|
+
const filtered = this._historyForCatchup("dm", void 0, request.since_ts, {
|
|
75982
|
+
groupId: dmGroupId,
|
|
75983
|
+
conversationId: convId
|
|
75984
|
+
});
|
|
75714
75985
|
const responsePayload = JSON.stringify({
|
|
75715
75986
|
type: "history_catchup_response",
|
|
75716
75987
|
target_device_id: request.requesting_device_id,
|
|
@@ -75765,6 +76036,9 @@ ${text}`;
|
|
|
75765
76036
|
console.log(`[SecureChannel] Session ${convId.slice(0, 8)} activated via MLS message`);
|
|
75766
76037
|
}
|
|
75767
76038
|
}
|
|
76039
|
+
if (topicId) {
|
|
76040
|
+
this._rememberIncomingTopic(convId, dmGroupId, topicId);
|
|
76041
|
+
}
|
|
75768
76042
|
if (mlsAttachment) {
|
|
75769
76043
|
text = await this._augmentWithAttachment(mlsAttachment, text);
|
|
75770
76044
|
}
|
|
@@ -75774,7 +76048,8 @@ ${text}`;
|
|
|
75774
76048
|
"dm",
|
|
75775
76049
|
topicId,
|
|
75776
76050
|
data.created_at,
|
|
75777
|
-
messageType
|
|
76051
|
+
messageType,
|
|
76052
|
+
{ groupId: dmGroupId, conversationId: convId }
|
|
75778
76053
|
);
|
|
75779
76054
|
const metadata = {
|
|
75780
76055
|
messageId: data.message_id ?? `mls_${Date.now()}`,
|
|
@@ -75959,7 +76234,7 @@ ${text}`;
|
|
|
75959
76234
|
}
|
|
75960
76235
|
if (messageType === "message" || messageType === "decision_response" && decisionReply) {
|
|
75961
76236
|
const topicId = msgData.topic_id;
|
|
75962
|
-
this.
|
|
76237
|
+
this._rememberIncomingTopic(convId, void 0, topicId);
|
|
75963
76238
|
let attachData;
|
|
75964
76239
|
if (attachmentInfo) {
|
|
75965
76240
|
try {
|
|
@@ -75987,7 +76262,8 @@ ${text}`;
|
|
|
75987
76262
|
"dm",
|
|
75988
76263
|
topicId,
|
|
75989
76264
|
msgData.created_at,
|
|
75990
|
-
messageType
|
|
76265
|
+
messageType,
|
|
76266
|
+
{ conversationId: convId }
|
|
75991
76267
|
);
|
|
75992
76268
|
let emitText = messageText;
|
|
75993
76269
|
if (attachData) {
|
|
@@ -76180,18 +76456,19 @@ ${baseText}`;
|
|
|
76180
76456
|
if (this._state !== "ready" || this._sessions.size === 0 || !this._ws) {
|
|
76181
76457
|
throw new Error("Channel is not ready");
|
|
76182
76458
|
}
|
|
76183
|
-
const topicId = options?.topicId ?? this._persisted?.defaultTopicId;
|
|
76184
76459
|
const attachMeta = await this._uploadAttachment(filePath, this._primaryConversationId);
|
|
76185
|
-
const envelope = JSON.stringify({
|
|
76186
|
-
type: "message",
|
|
76187
|
-
text: plaintext,
|
|
76188
|
-
topicId,
|
|
76189
|
-
attachment: attachMeta
|
|
76190
|
-
});
|
|
76191
76460
|
const messageGroupId = randomUUID4();
|
|
76192
76461
|
const pendingWsSends = [];
|
|
76462
|
+
const frameHistoryContexts = [];
|
|
76193
76463
|
for (const [convId, session] of this._sessions) {
|
|
76194
76464
|
if (!session.activated) continue;
|
|
76465
|
+
const topicId = this._topicForFrame(void 0, convId, options?.topicId, false, false);
|
|
76466
|
+
const envelope = JSON.stringify({
|
|
76467
|
+
type: "message",
|
|
76468
|
+
text: plaintext,
|
|
76469
|
+
topicId,
|
|
76470
|
+
attachment: attachMeta
|
|
76471
|
+
});
|
|
76195
76472
|
const encrypted = session.ratchet.encrypt(envelope);
|
|
76196
76473
|
const transport = encryptedMessageToTransport(encrypted);
|
|
76197
76474
|
pendingWsSends.push(
|
|
@@ -76206,14 +76483,19 @@ ${baseText}`;
|
|
|
76206
76483
|
}
|
|
76207
76484
|
})
|
|
76208
76485
|
);
|
|
76486
|
+
frameHistoryContexts.push(this._dmHistoryContext(topicId, void 0, convId));
|
|
76209
76487
|
}
|
|
76210
76488
|
await this._persistState();
|
|
76211
76489
|
let deliveredFrames = 0;
|
|
76212
|
-
|
|
76213
|
-
|
|
76490
|
+
let historyContext;
|
|
76491
|
+
for (const [i2, frame] of pendingWsSends.entries()) {
|
|
76492
|
+
if (this._sendApplicationFrame(frame)) {
|
|
76493
|
+
if (deliveredFrames === 0) historyContext = frameHistoryContexts[i2];
|
|
76494
|
+
deliveredFrames += 1;
|
|
76495
|
+
}
|
|
76214
76496
|
}
|
|
76215
76497
|
if (deliveredFrames > 0) {
|
|
76216
|
-
await this._appendHistory("agent", plaintext, this._historyContext("dm"
|
|
76498
|
+
await this._appendHistory("agent", plaintext, historyContext ?? this._historyContext("dm"), void 0, messageGroupId);
|
|
76217
76499
|
}
|
|
76218
76500
|
}
|
|
76219
76501
|
/**
|
|
@@ -76238,9 +76520,13 @@ ${baseText}`;
|
|
|
76238
76520
|
topicId
|
|
76239
76521
|
});
|
|
76240
76522
|
const pendingWsSends = [];
|
|
76523
|
+
const sourceGid = this._sessionGroupIds.get(sourceConvId);
|
|
76524
|
+
const knowsGroups = this._sessionGroupIds.size > 0;
|
|
76241
76525
|
for (const [siblingConvId, siblingSession] of this._sessions) {
|
|
76242
76526
|
if (siblingConvId === sourceConvId) continue;
|
|
76243
76527
|
if (!siblingSession.activated) continue;
|
|
76528
|
+
const siblingGid = this._sessionGroupIds.get(siblingConvId);
|
|
76529
|
+
if (knowsGroups && !(sourceGid && siblingGid && siblingGid === sourceGid)) continue;
|
|
76244
76530
|
if (roomConvIds.has(siblingConvId)) continue;
|
|
76245
76531
|
const syncEncrypted = siblingSession.ratchet.encrypt(syncPayload);
|
|
76246
76532
|
const syncTransport = encryptedMessageToTransport(syncEncrypted);
|
|
@@ -76321,7 +76607,7 @@ ${baseText}`;
|
|
|
76321
76607
|
async _replayHistoryToSession(convId) {
|
|
76322
76608
|
const session = this._sessions.get(convId);
|
|
76323
76609
|
if (!session || !session.activated || !this._ws) return;
|
|
76324
|
-
const history = this._selectHistoryContext("dm");
|
|
76610
|
+
const history = this._selectHistoryContext("dm", void 0, { conversationId: convId });
|
|
76325
76611
|
if (history.length === 0) {
|
|
76326
76612
|
console.log(`[SecureChannel] No history to replay for ${convId.slice(0, 8)}...`);
|
|
76327
76613
|
return;
|
|
@@ -76395,6 +76681,10 @@ ${baseText}`;
|
|
|
76395
76681
|
if (event.owner_hub_id) {
|
|
76396
76682
|
this._persisted.ownerHubId = event.owner_hub_id;
|
|
76397
76683
|
}
|
|
76684
|
+
if (event.group_id && !this._sessionGroupIds.has(event.conversation_id)) {
|
|
76685
|
+
this._sessionGroupIds.set(event.conversation_id, event.group_id);
|
|
76686
|
+
this._persisted.conversationGroupIds = Object.fromEntries(this._sessionGroupIds);
|
|
76687
|
+
}
|
|
76398
76688
|
await this._persistState();
|
|
76399
76689
|
console.log(
|
|
76400
76690
|
`[SecureChannel] Session initialized for device ${event.owner_device_id.slice(0, 8)}... (conv ${event.conversation_id.slice(0, 8)}...)`
|
|
@@ -78693,7 +78983,7 @@ ${baseText}`;
|
|
|
78693
78983
|
}
|
|
78694
78984
|
if (messageType === "message" || messageType === "decision_response" && decisionReply) {
|
|
78695
78985
|
const topicId = msg.topic_id;
|
|
78696
|
-
await this._appendHistory("owner", messageText, this.
|
|
78986
|
+
await this._appendHistory("owner", messageText, this._dmHistoryContext(topicId, void 0, msg.conversation_id), msg.created_at, msg.message_id);
|
|
78697
78987
|
const metadata = {
|
|
78698
78988
|
messageId: msg.message_id,
|
|
78699
78989
|
conversationId: msg.conversation_id,
|
|
@@ -79299,7 +79589,7 @@ ${baseText}`;
|
|
|
79299
79589
|
}
|
|
79300
79590
|
if (messageType === "message" || messageType === "decision_response" && decisionReply) {
|
|
79301
79591
|
const topicId = msg.topic_id;
|
|
79302
|
-
await this._appendHistory("owner", messageText, this.
|
|
79592
|
+
await this._appendHistory("owner", messageText, this._dmHistoryContext(topicId, void 0, msg.conversation_id), msg.created_at, msg.id);
|
|
79303
79593
|
const metadata = {
|
|
79304
79594
|
messageId: msg.id,
|
|
79305
79595
|
conversationId: msg.conversation_id,
|
|
@@ -79619,7 +79909,7 @@ ${baseText}`;
|
|
|
79619
79909
|
}
|
|
79620
79910
|
if (messageType === "message" || messageType === "decision_response" && decisionReply) {
|
|
79621
79911
|
const topicId = msg.topic_id;
|
|
79622
|
-
await this._appendHistory("owner", messageText, this.
|
|
79912
|
+
await this._appendHistory("owner", messageText, this._dmHistoryContext(topicId, void 0, msg.conversation_id), msg.created_at, msg.id);
|
|
79623
79913
|
const metadata = {
|
|
79624
79914
|
messageId: msg.id,
|
|
79625
79915
|
conversationId: msg.conversation_id,
|
|
@@ -101399,7 +101689,7 @@ data:
|
|
|
101399
101689
|
await init_skill_telemetry();
|
|
101400
101690
|
await init_policy_enforcer();
|
|
101401
101691
|
init_room_protocol();
|
|
101402
|
-
VERSION = true ? "0.23.
|
|
101692
|
+
VERSION = true ? "0.23.51" : "0.0.0-dev";
|
|
101403
101693
|
}
|
|
101404
101694
|
});
|
|
101405
101695
|
await init_index();
|
|
@@ -103344,7 +103634,7 @@ function mkdir700(path2) {
|
|
|
103344
103634
|
chmodSync5(path2, 448);
|
|
103345
103635
|
}
|
|
103346
103636
|
function packageVersion() {
|
|
103347
|
-
return true ? "0.1.
|
|
103637
|
+
return true ? "0.1.26" : void 0;
|
|
103348
103638
|
}
|
|
103349
103639
|
function helpText(version2) {
|
|
103350
103640
|
return [
|
package/package.json
CHANGED