@agentvault/claude-bridge 0.8.37 → 0.8.39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -75,6 +75,7 @@ The bridge log (`agentvault-claude-bridge logs`) writes one line per event:
75
75
  | `turn_failed code=<code> exit=<n or none>` | Claude Code did not produce a reply. The code is the cause the bridge assigned. `exit` is the Claude Code exit status, or `none` when there is none to report. A turn that ran out of time also says `reason=timeout`. |
76
76
  | `notice_failed code=<code>` | The turn failed, and the failure notice could not be delivered either. The failure is still recorded under Health. |
77
77
  | `fatal: listener stopped code=<code> exit=<n or none>` | The always-on Claude session stopped. The bridge first tells any chat still waiting for an answer, then exits so its service restarts it. |
78
+ | `turn_cancelled reason=shutdown notice=<sent, failed, timeout or none>` | The bridge was stopped or restarted (for example during an update) while this message was being answered or waiting its turn. Nothing replays it, so when the message owed a reply the chat gets the plain sentence "Loopita couldn't answer this message." It never names a cause. `queued=true` marks a message that was still waiting, and `late=true` one that arrived while the bridge was stopping. `none` means the message did not owe a reply. `notice=none delivered=true` means the answer had already finished, so nothing more is posted. The bridge waits at most 10 seconds for these sentences, so a stuck send cannot hold up the restart. Nothing is recorded under Health, because the model did not fail. |
78
79
 
79
80
  The local `logs/worker-incidents.jsonl` file records the same code for each failed tool turn. The log and that file hold only codes and exit numbers. They never hold message text or provider error text.
80
81
 
package/dist/bridge.d.ts CHANGED
@@ -136,7 +136,9 @@ export interface RoomSession {
136
136
  * context (the router's tool-capable worker lane), so the caller keeps it for
137
137
  * the next turn that does. Anything else (`void`, `true`, …) means it was
138
138
  * delivered. */
139
- push(text: string, reply?: (text: string) => Promise<void>, opts?: {
139
+ push(text: string, reply?: (text: string, opts?: {
140
+ notice?: boolean;
141
+ }) => Promise<void | boolean>, opts?: {
140
142
  autoReplyOnText?: boolean;
141
143
  replyExpected?: boolean;
142
144
  toolEligibleSender?: boolean;
@@ -145,6 +147,8 @@ export interface RoomSession {
145
147
  /** #1560: the conversation this message came from. A failed turn's span
146
148
  * names it, and only a "direct" one gets a notice that names the cause. */
147
149
  conversation?: ToolConversation;
150
+ /** #1583: true once this room is hushed. A shutdown notice stays out of it. */
151
+ hushed?: () => boolean;
148
152
  }): unknown;
149
153
  }
150
154
  /** Where a reply should go: a room (sendToRoom) or a 1:1 DM (send). */
@@ -199,7 +203,9 @@ export declare class ActiveTarget {
199
203
  * these per inbound (at push time) and hands it to the session, so a room message
200
204
  * arriving mid-compose can never redirect a private 1:1 reply into the room.
201
205
  */
202
- snapshotReply(channel: ReplyChannel, log?: (msg: string) => void): (text: string) => Promise<void>;
206
+ snapshotReply(channel: ReplyChannel, log?: (msg: string) => void): (text: string, opts?: {
207
+ notice?: boolean;
208
+ }) => Promise<void | boolean>;
203
209
  }
204
210
  export interface LifecycleChannel {
205
211
  on(ev: "auth_failed", cb: (e: {
package/dist/index.js CHANGED
@@ -11756,11 +11756,11 @@ async function joinWithFirstMatchingKp(welcomeBytes, candidates) {
11756
11756
  return null;
11757
11757
  }
11758
11758
  function ownIdentity() {
11759
- const v22 = true ? "0.23.66" : FALLBACK;
11759
+ const v22 = true ? "0.23.68" : FALLBACK;
11760
11760
  return `${PACKAGE}@${v22}`;
11761
11761
  }
11762
11762
  function buildSha() {
11763
- const raw = true ? "f354058" : "";
11763
+ const raw = true ? "c758a00" : "";
11764
11764
  const cleaned = (raw ?? "").trim();
11765
11765
  return !cleaned || cleaned === "unknown" ? null : cleaned;
11766
11766
  }
@@ -12321,6 +12321,19 @@ function decisionReplyFromEnvelope(parsed) {
12321
12321
  if (typeof d22.reason === "string") reply.reason = d22.reason;
12322
12322
  return reply;
12323
12323
  }
12324
+ function parseDeliverySync(raw) {
12325
+ if (typeof raw !== "object" || raw === null) return null;
12326
+ const { quiet_pull_seconds: quiet, welcome_group_ids: groups } = raw;
12327
+ if (!Array.isArray(groups) || !groups.every((g22) => typeof g22 === "string")) return null;
12328
+ if (quiet !== null && (typeof quiet !== "number" || !Number.isFinite(quiet))) return null;
12329
+ return {
12330
+ quietPullMs: quiet === null ? null : Math.min(Math.max(quiet * 1e3, DELIVERY_PULL_MS), MAX_QUIET_PULL_MS),
12331
+ welcomeGroupIds: new Set(groups.map((g22) => g22.toLowerCase()))
12332
+ };
12333
+ }
12334
+ function wantsWelcomeRead(targets, groupId) {
12335
+ return targets === null || targets.has(groupId.toLowerCase());
12336
+ }
12324
12337
  async function readBoundedRestoreJson(response, signal, checkpoint) {
12325
12338
  const contentLength = response.headers?.get("content-length");
12326
12339
  if (contentLength && /^\d+$/.test(contentLength)) {
@@ -17872,7 +17885,7 @@ function armSseKeepAlive(intervalMs, onTick) {
17872
17885
  timer.unref?.();
17873
17886
  return timer;
17874
17887
  }
17875
- var __create, __defProp2, __getOwnPropDesc, __getOwnPropNames2, __getProtoOf, __hasOwnProp, __esm2, __commonJS, __export2, __copyProps, __toESM, SENTINEL, WRAPPERS, INSTRUCTION, init_abstention, AMBIGUOUS_OWNER_ERROR, init_owner_routing, init_envelope_text, init_mls_commit_classify, MENTION_RE, BROADCAST_NAMES, PRIVATE_ROOM_TURN_NOTE, GENERIC_AGENT_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_exports, init_dist2, DIR_MODE, FILE_MODE, init_secure_file, SYNC_LOCK_STALE_MS, pendingKpPath, DECRYPTED_IDS_FILE, init_mls_state, init_mls_kp_pool, PACKAGE, FALLBACK, MAX_LEN, DISALLOWED, init_client_version, CredentialStore, init_credential_store, init_crypto_helpers, STATE_FILE, LEGACY_STATE_FILE, init_state, ACTIVATION_DOMAIN, UUID_RE2, init_transport2, A2ALogGate, init_a2a_log_gate, NOT_A_MEMBER_DETAIL, init_mls_membership_probe, FIRST_DIRTY_DELAY_MS, RETRY_BASE_DELAYS_MS, MAX_RETRY_DELAY_MS, JITTER_FRACTION, HistoryBackupScheduler, init_history_backup_scheduler, FILE_MODE2, init_history_recovery_file, TENANT_ID_PATTERN, DIR_MODE2, FILE_MODE3, HISTORY_RECOVERY_VERIFY_TIMEOUT_MS, VERIFY_TIMEOUT_MESSAGE, HistoryRecoveryVerificationTimeoutError, init_history_recovery_code, ACTIONS, init_decision_reply, KP_BACKOFF_INITIAL_MS, KP_BACKOFF_MAX_MS, KP_RACE_RETRY_MS, KP_RACE_RETRY_LIMIT, consoleLogger, short, WelcomeKeyPackageBackoff, init_welcome_kp_backoff, history_backup_client_exports, HISTORY_RESTORE_TIMEOUT_MS, HISTORY_RESTORE_RESPONSE_MAX_BYTES, HISTORY_ENVELOPE_MIN_BYTES, HISTORY_AAD_PREFIX, UUID_RE3, GENERATION_RESPONSE_KEYS, utf8Encoder, utf8Decoder, HistoryBackupClient, init_history_backup_client, openclaw_compat_exports, defaultImporter, HEARTBEAT_CANDIDATES, _heartbeatFn, init_openclaw_compat, TOOL_INVOKE_SPAN_NAME, UNCLASSIFIED_ERROR, KNOWN_TOOL_ERROR_CODES, KNOWN_CODES, CLASS_NAME_RE, TOOL_NAME_RE, ERROR_TEXT_CODES, _conversation, init_tool_telemetry, http_handlers_exports, init_http_handlers, mcp_proxy_helpers_exports, init_mcp_proxy_helpers, workspace_handlers_exports, MAX_FILE_SIZE, init_workspace_handlers, ROOM_AGENT_TYPES, CREDENTIAL_MESSAGE_TYPES, CATCHUP_MESSAGE_TYPES, POLL_INTERVAL_MS, RECONNECT_BASE_MS, UUID_RE4, RECONNECT_MAX_MS, PENDING_POLL_INTERVAL_MS, HISTORY_RESTORE_TIMEOUT_MS2, ROOM_ROSTER_REFRESH_TIMEOUT_MS, HISTORY_UPLOAD_TIMEOUT_MS, CANONICAL_TIMESTAMP_RE, OUTBOUND_DEDUPE_WINDOW_MS, OUTBOUND_DEDUPE_MAX_SUPPRESS_MS, OUTBOUND_DEDUPE_MAX, OUTBOUND_DEDUPE_TYPES, RETRY_CANDIDATE_TTL_MS, RETRY_CANDIDATE_MAX, _turnConversation, PERSON_INVOLVED_WINDOW_MS, ATTESTED_INBOUND_MAX, UNMAPPED_RECONCILE_COOLDOWN_MS, TOPIC_ID_RE, ROOM_FULFIL_COOLDOWN_MS, SecureChannel, init_channel, init_types, DEFAULT_API_URL, DEFAULT_HTTP_PORT, init_account_config, init_lifecycle, _ocRuntime, _channels, agentVaultPlugin, init_openclaw_plugin, init_gateway_send, init_llm_response_parser, OPENROUTER_PRICING, init_llm_pricing_openrouter, LEGACY_PRICING, PRICING, init_llm_cost, traceStore, init_fetch_interceptor, init_tool_audit, init_harness_compat, TURN_FAILURE_CODES, CODES, TurnFailure, NOTICE_RE, init_turn_failure, AUTH_RE, BILLING_RE, RATE_RE, MODEL_GONE_RE, UNREACHABLE_RE, init_openclaw_turn_failure, 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;
17888
+ var __create, __defProp2, __getOwnPropDesc, __getOwnPropNames2, __getProtoOf, __hasOwnProp, __esm2, __commonJS, __export2, __copyProps, __toESM, SENTINEL, WRAPPERS, INSTRUCTION, init_abstention, AMBIGUOUS_OWNER_ERROR, init_owner_routing, init_envelope_text, init_mls_commit_classify, MENTION_RE, BROADCAST_NAMES, PRIVATE_ROOM_TURN_NOTE, GENERIC_AGENT_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_exports, init_dist2, DIR_MODE, FILE_MODE, init_secure_file, SYNC_LOCK_STALE_MS, pendingKpPath, DECRYPTED_IDS_FILE, init_mls_state, init_mls_kp_pool, PACKAGE, FALLBACK, MAX_LEN, DISALLOWED, init_client_version, CredentialStore, init_credential_store, init_crypto_helpers, STATE_FILE, LEGACY_STATE_FILE, init_state, ACTIVATION_DOMAIN, UUID_RE2, init_transport2, A2ALogGate, init_a2a_log_gate, NOT_A_MEMBER_DETAIL, init_mls_membership_probe, FIRST_DIRTY_DELAY_MS, RETRY_BASE_DELAYS_MS, MAX_RETRY_DELAY_MS, JITTER_FRACTION, HistoryBackupScheduler, init_history_backup_scheduler, FILE_MODE2, init_history_recovery_file, TENANT_ID_PATTERN, DIR_MODE2, FILE_MODE3, HISTORY_RECOVERY_VERIFY_TIMEOUT_MS, VERIFY_TIMEOUT_MESSAGE, HistoryRecoveryVerificationTimeoutError, init_history_recovery_code, ACTIONS, init_decision_reply, KP_BACKOFF_INITIAL_MS, KP_BACKOFF_MAX_MS, KP_RACE_RETRY_MS, KP_RACE_RETRY_LIMIT, consoleLogger, short, WelcomeKeyPackageBackoff, init_welcome_kp_backoff, DELIVERY_PULL_MS, DELIVERY_TICK_MS, FULL_WELCOME_SWEEP_MS, MAX_QUIET_PULL_MS, A2A_QUIET_RECONCILE_MS, A2A_QUIET_JITTER_MS, DeliveryCadence, A2aReconcileCadence, init_delivery_cadence, 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, _heartbeatFn, init_openclaw_compat, TOOL_INVOKE_SPAN_NAME, UNCLASSIFIED_ERROR, KNOWN_TOOL_ERROR_CODES, KNOWN_CODES, CLASS_NAME_RE, TOOL_NAME_RE, ERROR_TEXT_CODES, _conversation, init_tool_telemetry, http_handlers_exports, init_http_handlers, mcp_proxy_helpers_exports, init_mcp_proxy_helpers, workspace_handlers_exports, MAX_FILE_SIZE, init_workspace_handlers, ROOM_AGENT_TYPES, CREDENTIAL_MESSAGE_TYPES, CATCHUP_MESSAGE_TYPES, POLL_INTERVAL_MS, RECONNECT_BASE_MS, UUID_RE4, RECONNECT_MAX_MS, PENDING_POLL_INTERVAL_MS, PENDING_POLL_SILENCE_MS, HISTORY_RESTORE_TIMEOUT_MS2, ROOM_ROSTER_REFRESH_TIMEOUT_MS, HISTORY_UPLOAD_TIMEOUT_MS, CANONICAL_TIMESTAMP_RE, OUTBOUND_DEDUPE_WINDOW_MS, OUTBOUND_DEDUPE_MAX_SUPPRESS_MS, OUTBOUND_DEDUPE_MAX, OUTBOUND_DEDUPE_TYPES, RETRY_CANDIDATE_TTL_MS, RETRY_CANDIDATE_MAX, _turnConversation, PERSON_INVOLVED_WINDOW_MS, ATTESTED_INBOUND_MAX, UNMAPPED_RECONCILE_COOLDOWN_MS, TOPIC_ID_RE, ROOM_FULFIL_COOLDOWN_MS, SecureChannel, init_channel, init_types, DEFAULT_API_URL, DEFAULT_HTTP_PORT, init_account_config, init_lifecycle, _ocRuntime, _channels, agentVaultPlugin, init_openclaw_plugin, init_gateway_send, init_llm_response_parser, OPENROUTER_PRICING, init_llm_pricing_openrouter, LEGACY_PRICING, PRICING, init_llm_cost, traceStore, init_fetch_interceptor, init_tool_audit, init_harness_compat, TURN_FAILURE_CODES, CODES, TurnFailure, NOTICE_RE, init_turn_failure, AUTH_RE, BILLING_RE, RATE_RE, MODEL_GONE_RE, UNREACHABLE_RE, init_openclaw_turn_failure, SHUTDOWN_NOTICE_MS, KEEP_UNANSWERED_MS, OpenClawShutdownNotices, init_openclaw_shutdown_notice, _shutdownNotices, 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;
17876
17889
  var init_dist = __esm({
17877
17890
  async "../plugin/dist/index.js"() {
17878
17891
  "use strict";
@@ -70202,16 +70215,7 @@ var init_dist = __esm({
70202
70215
  _seenNonces = /* @__PURE__ */ new Map();
70203
70216
  static MAX_NONCES_PER_ROOM = 1e3;
70204
70217
  constructor() {
70205
- const purge = () => this.purgeAll();
70206
- process.on("exit", purge);
70207
- process.on("SIGINT", () => {
70208
- purge();
70209
- process.exit(0);
70210
- });
70211
- process.on("SIGTERM", () => {
70212
- purge();
70213
- process.exit(0);
70214
- });
70218
+ process.on("exit", () => this.purgeAll());
70215
70219
  }
70216
70220
  /**
70217
70221
  * Check if a nonce has been seen (replay prevention).
@@ -70579,6 +70583,64 @@ var init_dist = __esm({
70579
70583
  };
70580
70584
  }
70581
70585
  });
70586
+ init_delivery_cadence = __esm2({
70587
+ "src/delivery-cadence.ts"() {
70588
+ "use strict";
70589
+ DELIVERY_PULL_MS = 3e4;
70590
+ DELIVERY_TICK_MS = 5e3;
70591
+ FULL_WELCOME_SWEEP_MS = 6e5;
70592
+ MAX_QUIET_PULL_MS = 3e5;
70593
+ A2A_QUIET_RECONCILE_MS = 6e5;
70594
+ A2A_QUIET_JITTER_MS = 6e4;
70595
+ DeliveryCadence = class {
70596
+ _nextPullAt = 0;
70597
+ _nextFullSweepAt = 0;
70598
+ _fullSweepRequested = false;
70599
+ /** A new connection may have missed anything: pull now, read every group. */
70600
+ reset() {
70601
+ this._nextPullAt = 0;
70602
+ this._nextFullSweepAt = 0;
70603
+ }
70604
+ pullDue(now) {
70605
+ return now >= this._nextPullAt || this._nextPullAt - now > MAX_QUIET_PULL_MS;
70606
+ }
70607
+ pullStarted(now) {
70608
+ this._nextPullAt = now + DELIVERY_PULL_MS;
70609
+ }
70610
+ /** Call after a pull that returned no rows. */
70611
+ pullWasQuiet(now, sync) {
70612
+ if (sync?.quietPullMs != null) this._nextPullAt = now + sync.quietPullMs;
70613
+ }
70614
+ /** A wake named a request, so read every group on the next pull, as before. */
70615
+ requestFullSweep() {
70616
+ this._fullSweepRequested = true;
70617
+ }
70618
+ /** The groups this pull should read. null means all of them. */
70619
+ welcomeTargets(now, sync) {
70620
+ if (sync === null) return null;
70621
+ if (this._fullSweepRequested || now >= this._nextFullSweepAt) {
70622
+ this._fullSweepRequested = false;
70623
+ this._nextFullSweepAt = now + FULL_WELCOME_SWEEP_MS;
70624
+ return null;
70625
+ }
70626
+ return sync.welcomeGroupIds;
70627
+ }
70628
+ };
70629
+ A2aReconcileCadence = class {
70630
+ _nextAt = 0;
70631
+ due(now) {
70632
+ return now >= this._nextAt;
70633
+ }
70634
+ listed(now, channelCount, random = Math.random) {
70635
+ this._nextAt = channelCount > 0 ? 0 : now + A2A_QUIET_RECONCILE_MS + Math.floor(random() * A2A_QUIET_JITTER_MS);
70636
+ }
70637
+ /** A channel event arrived: reconcile at the next tick. */
70638
+ wake() {
70639
+ this._nextAt = 0;
70640
+ }
70641
+ };
70642
+ }
70643
+ });
70582
70644
  history_backup_client_exports = {};
70583
70645
  __export2(history_backup_client_exports, {
70584
70646
  HISTORY_RESTORE_RESPONSE_MAX_BYTES: () => HISTORY_RESTORE_RESPONSE_MAX_BYTES,
@@ -70971,6 +71033,7 @@ var init_dist = __esm({
70971
71033
  await init_history_recovery_code();
70972
71034
  init_decision_reply();
70973
71035
  init_welcome_kp_backoff();
71036
+ init_delivery_cadence();
70974
71037
  ROOM_AGENT_TYPES = /* @__PURE__ */ new Set([
70975
71038
  "message",
70976
71039
  "text",
@@ -70992,6 +71055,7 @@ var init_dist = __esm({
70992
71055
  UUID_RE4 = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
70993
71056
  RECONNECT_MAX_MS = 3e4;
70994
71057
  PENDING_POLL_INTERVAL_MS = 15e3;
71058
+ PENDING_POLL_SILENCE_MS = 18e4;
70995
71059
  HISTORY_RESTORE_TIMEOUT_MS2 = 1e4;
70996
71060
  ROOM_ROSTER_REFRESH_TIMEOUT_MS = 1e4;
70997
71061
  HISTORY_UPLOAD_TIMEOUT_MS = 1e4;
@@ -71064,6 +71128,8 @@ var init_dist = __esm({
71064
71128
  _pendingPollTimer = null;
71065
71129
  _syncMessageIds = null;
71066
71130
  _deliveryHeartbeat = null;
71131
+ _deliveryCadence = new DeliveryCadence();
71132
+ _a2aCadence = new A2aReconcileCadence();
71067
71133
  /**
71068
71134
  * How often to re-check the KeyPackage pool against the server (#826).
71069
71135
  *
@@ -73372,7 +73438,7 @@ ${text}`,
73372
73438
  */
73373
73439
  sendActivitySpan(spanData) {
73374
73440
  if (!this._ws || this._ws.readyState !== WebSocket2.OPEN) return;
73375
- const pluginVersion = true ? "0.23.66" : "0.0.0-dev";
73441
+ const pluginVersion = true ? "0.23.68" : "0.0.0-dev";
73376
73442
  const agentName = this.config.agentName ?? "Agent";
73377
73443
  const resource = {
73378
73444
  "service.name": "agentvault-agent",
@@ -75170,7 +75236,7 @@ ${text}`,
75170
75236
  throw new Error(`A2A channel ${channelId.slice(0, 8)} has no initialized MLS group`);
75171
75237
  }
75172
75238
  /**
75173
- * Start the periodic A2A reconcile timer (30s), mirroring `_deliveryHeartbeat`.
75239
+ * Start the periodic A2A reconcile timer, mirroring `_deliveryHeartbeat`.
75174
75240
  *
75175
75241
  * A2A join-triggers (`a2a_channel_approved` etc.) are delivered best-effort by
75176
75242
  * the backend's local-only `send_to_device`; if this agent is briefly
@@ -75178,10 +75244,14 @@ ${text}`,
75178
75244
  * channel hangs until the next connect. Re-running `listA2AChannels()` on a
75179
75245
  * timer re-fires the idempotent member sync-fallback (publish KeyPackage +
75180
75246
  * request Welcome) so the channel self-heals while staying connected.
75247
+ *
75248
+ * It ticks every 30 s, and an agent the server lists in no channel asks far
75249
+ * less often: see `A2aReconcileCadence`.
75181
75250
  */
75182
75251
  _startA2aReconcileTimer() {
75183
75252
  if (this._a2aReconcileTimer) clearInterval(this._a2aReconcileTimer);
75184
75253
  this._a2aReconcileTimer = setInterval(() => {
75254
+ if (!this._a2aCadence.due(Date.now())) return;
75185
75255
  this.listA2AChannels().catch(() => {
75186
75256
  });
75187
75257
  }, 3e4);
@@ -75207,6 +75277,7 @@ ${text}`,
75207
75277
  throw new Error(`List A2A channels failed (${res.status}): ${detail}`);
75208
75278
  }
75209
75279
  const resp = await res.json();
75280
+ this._a2aCadence.listed(Date.now(), resp.length);
75210
75281
  const channels = resp.map((ch2) => ({
75211
75282
  channelId: ch2.channel_id || ch2.id,
75212
75283
  creator_hub_id: ch2.creator_hub_id || "",
@@ -75655,7 +75726,7 @@ ${text}`,
75655
75726
  agentVersion: this.config.agentVersion ?? "0.0.0",
75656
75727
  // __AV_VERSION__ is injected by esbuild from package.json at build time.
75657
75728
  // Falls back to "0.0.0-dev" in non-bundled contexts (tests).
75658
- pluginVersion: true ? "0.23.66" : "0.0.0-dev"
75729
+ pluginVersion: true ? "0.23.68" : "0.0.0-dev"
75659
75730
  });
75660
75731
  this._telemetryReporter.startAutoFlush(3e4);
75661
75732
  }
@@ -75667,14 +75738,7 @@ ${text}`,
75667
75738
  await this._ensureKpPoolPublished();
75668
75739
  this._startKpReplenishTimer();
75669
75740
  this._startKeyProofTimer();
75670
- this._pullDeliveryQueue().catch((err) => {
75671
- console.warn("[SecureChannel] Initial delivery pull failed:", err);
75672
- });
75673
- if (this._deliveryHeartbeat) clearInterval(this._deliveryHeartbeat);
75674
- this._deliveryHeartbeat = setInterval(() => {
75675
- this._pullDeliveryQueue().catch(() => {
75676
- });
75677
- }, 3e4);
75741
+ this._beginDeliveryPulls();
75678
75742
  this._startA2aReconcileTimer();
75679
75743
  for (const [convId, entry] of Object.entries(this._persisted?.mlsConversations ?? {})) {
75680
75744
  if (entry.mlsGroupId) {
@@ -75869,6 +75933,7 @@ ${text}`,
75869
75933
  }
75870
75934
  if (data.event === "mls_welcome_requested") {
75871
75935
  console.log(`[SecureChannel] mls_welcome_requested for group ${(data.data?.group_id || "").slice(0, 8)} \u2014 pulling deliveries`);
75936
+ this._deliveryCadence.requestFullSweep();
75872
75937
  this._pullDeliveryQueue().catch((err) => {
75873
75938
  console.warn("[SecureChannel] Delivery pull on welcome request failed:", err);
75874
75939
  });
@@ -75993,7 +76058,7 @@ ${text}`,
75993
76058
  agentVersion: this.config.agentVersion ?? "0.0.0",
75994
76059
  // __AV_VERSION__ is injected by esbuild from package.json at build time.
75995
76060
  // Falls back to "0.0.0-dev" in non-bundled contexts (tests).
75996
- pluginVersion: true ? "0.23.66" : "0.0.0-dev"
76061
+ pluginVersion: true ? "0.23.68" : "0.0.0-dev"
75997
76062
  });
75998
76063
  this._telemetryReporter.startAutoFlush(3e4);
75999
76064
  }
@@ -76064,6 +76129,7 @@ ${text}`,
76064
76129
  this.emit("hub_identity_removed", data.data);
76065
76130
  }
76066
76131
  if (data.event === "a2a_channel_approved") {
76132
+ this._a2aCadence.wake();
76067
76133
  const channelData = data.data || data;
76068
76134
  const channelId = channelData.channel_id;
76069
76135
  const convId = channelData.conversation_id;
@@ -76140,6 +76206,7 @@ ${text}`,
76140
76206
  this.emit("a2a_channel_revoked", channelData);
76141
76207
  }
76142
76208
  if (data.event === "a2a_channel_invited") {
76209
+ this._a2aCadence.wake();
76143
76210
  const channelData = data.data || data;
76144
76211
  const channelId = channelData.channel_id;
76145
76212
  const convId = channelData.conversation_id;
@@ -79215,9 +79282,31 @@ ${baseText}`;
79215
79282
  await this._persistState();
79216
79283
  await this._applyBufferedMlsCommits(groupId, mgr);
79217
79284
  }
79285
+ /** A new connection may have missed any signal, so it starts from fresh. */
79286
+ _beginDeliveryPulls() {
79287
+ this._deliveryCadence.reset();
79288
+ this._pullDeliveryQueue().catch((err) => {
79289
+ console.warn("[SecureChannel] Initial delivery pull failed:", err);
79290
+ });
79291
+ this._startDeliveryHeartbeat();
79292
+ }
79293
+ /**
79294
+ * Keep pulling while the socket is up. The tick costs nothing: it only asks
79295
+ * `_deliveryCadence` whether a pull is due, which is every 30 s until the
79296
+ * server says this device may rest. A signal that never arrives is recovered
79297
+ * here, within one rest.
79298
+ */
79299
+ _startDeliveryHeartbeat() {
79300
+ if (this._deliveryHeartbeat) clearInterval(this._deliveryHeartbeat);
79301
+ this._deliveryHeartbeat = setInterval(() => {
79302
+ if (!this._deliveryCadence.pullDue(Date.now())) return;
79303
+ this._pullDeliveryQueue().catch(() => {
79304
+ });
79305
+ }, DELIVERY_TICK_MS);
79306
+ }
79218
79307
  /**
79219
79308
  * Pull pending MLS messages from the delivery queue and process them.
79220
- * Called on WS connect, on mls_delivery ping, and every 30s heartbeat.
79309
+ * Called on WS connect, on mls_delivery ping, and by the delivery heartbeat.
79221
79310
  */
79222
79311
  async _pullDeliveryQueue() {
79223
79312
  if (!this._deviceId || !this._deviceJwt) return;
@@ -79226,6 +79315,7 @@ ${baseText}`;
79226
79315
  return;
79227
79316
  }
79228
79317
  this._deliveryPulling = true;
79318
+ this._deliveryCadence.pullStarted(Date.now());
79229
79319
  try {
79230
79320
  const res = await fetch(
79231
79321
  `${this.config.apiUrl}/api/v1/mls/delivery?device_id=${this._deviceId}`,
@@ -79235,7 +79325,9 @@ ${baseText}`;
79235
79325
  console.warn(`[SecureChannel] Delivery pull failed: ${res.status}`);
79236
79326
  return;
79237
79327
  }
79238
- let { messages } = await res.json();
79328
+ const pulled = await res.json();
79329
+ let { messages } = pulled;
79330
+ const sync = parseDeliverySync(pulled.sync);
79239
79331
  const hasMessages = messages && messages.length > 0;
79240
79332
  if (hasMessages) {
79241
79333
  messages = orderDeliveryBatch(messages);
@@ -79356,11 +79448,13 @@ ${baseText}`;
79356
79448
  }
79357
79449
  }
79358
79450
  }
79451
+ const welcomeTargets = this._deliveryCadence.welcomeTargets(Date.now(), sync);
79359
79452
  for (const [roomId, mlsGroup] of this._mlsGroups) {
79360
79453
  if (!mlsGroup?.isInitialized) continue;
79361
79454
  if (roomId.includes(":")) continue;
79362
79455
  const roomState = this._persisted?.rooms?.[roomId];
79363
79456
  if (!roomState?.mlsGroupId) continue;
79457
+ if (!wantsWelcomeRead(welcomeTargets, roomState.mlsGroupId)) continue;
79364
79458
  try {
79365
79459
  const roomLabel2 = `room ${roomId.slice(0, 8)}`;
79366
79460
  const pendingRes = await fetch(
@@ -79461,6 +79555,7 @@ ${baseText}`;
79461
79555
  if (!entry.mlsGroupId) continue;
79462
79556
  const mlsGroup = this._mlsGroups.get(`1to1-group:${gid}`);
79463
79557
  if (!mlsGroup?.isInitialized) continue;
79558
+ if (!wantsWelcomeRead(welcomeTargets, entry.mlsGroupId)) continue;
79464
79559
  try {
79465
79560
  const sharedLabel = `shared group ${gid.slice(0, 8)}`;
79466
79561
  const pendingRes = await fetch(
@@ -79557,6 +79652,7 @@ ${baseText}`;
79557
79652
  if (!convEntry.mlsGroupId) continue;
79558
79653
  const mlsGroup = this._mlsGroups.get(`conv:${convId}`);
79559
79654
  if (!mlsGroup?.isInitialized) continue;
79655
+ if (!wantsWelcomeRead(welcomeTargets, convEntry.mlsGroupId)) continue;
79560
79656
  try {
79561
79657
  const convLabel = `conv ${convId.slice(0, 8)}`;
79562
79658
  const pendingRes = await fetch(
@@ -79699,6 +79795,7 @@ ${baseText}`;
79699
79795
  } catch {
79700
79796
  }
79701
79797
  }
79798
+ if (!hasMessages) this._deliveryCadence.pullWasQuiet(Date.now(), sync);
79702
79799
  } catch (err) {
79703
79800
  console.warn("[SecureChannel] Delivery pull error:", err);
79704
79801
  } finally {
@@ -80588,6 +80685,7 @@ ${baseText}`;
80588
80685
  }
80589
80686
  async _checkPendingMessages() {
80590
80687
  if (this._state === "connecting" || !this._deviceId || !this._deviceJwt) return;
80688
+ if (this._state === "ready" && Date.now() - this._lastServerMessage <= PENDING_POLL_SILENCE_MS) return;
80591
80689
  try {
80592
80690
  const url22 = `${this.config.apiUrl}/api/v1/devices/${this._deviceId}/pending`;
80593
80691
  const resp = await fetch(url22, {
@@ -80607,7 +80705,7 @@ ${baseText}`;
80607
80705
  }
80608
80706
  } else if (data.pending > 0 && this._state === "ready") {
80609
80707
  const silence = Date.now() - this._lastServerMessage;
80610
- if (silence > 18e4) {
80708
+ if (silence > PENDING_POLL_SILENCE_MS) {
80611
80709
  console.log(
80612
80710
  `[SecureChannel] Poll: ${data.pending} pending + ${Math.round(silence / 1e3)}s silence \u2014 forcing reconnect`
80613
80711
  );
@@ -81946,6 +82044,107 @@ ${actionsText}`);
81946
82044
  );
81947
82045
  }
81948
82046
  });
82047
+ init_openclaw_shutdown_notice = __esm2({
82048
+ "src/openclaw-shutdown-notice.ts"() {
82049
+ "use strict";
82050
+ init_turn_failure();
82051
+ SHUTDOWN_NOTICE_MS = 4500;
82052
+ KEEP_UNANSWERED_MS = 1e4;
82053
+ OpenClawShutdownNotices = class {
82054
+ constructor(log = (m22) => console.warn(m22), capMs = SHUTDOWN_NOTICE_MS) {
82055
+ this.log = log;
82056
+ this.capMs = capMs;
82057
+ }
82058
+ log;
82059
+ capMs;
82060
+ turns = /* @__PURE__ */ new Set();
82061
+ cap;
82062
+ expired = false;
82063
+ stopped;
82064
+ /** True once the gateway is closing: no new run can finish. */
82065
+ get stopping() {
82066
+ return this.cap !== void 0;
82067
+ }
82068
+ opened(entry) {
82069
+ this.prune();
82070
+ this.turns.add(entry);
82071
+ }
82072
+ /** The turn is over, every retry included. Resolves inside the cap. */
82073
+ async closed(entry) {
82074
+ if (this.stopping) {
82075
+ if (this.turns.delete(entry)) await this.tell(entry, "late=true ");
82076
+ return;
82077
+ }
82078
+ if (entry.turn.delivered || !entry.sink()) this.turns.delete(entry);
82079
+ else entry.endedAt = Date.now();
82080
+ }
82081
+ /** A channel is starting, so this process is not ending: the next stop starts fresh. */
82082
+ resume() {
82083
+ this.cap = void 0;
82084
+ this.expired = false;
82085
+ this.stopped = void 0;
82086
+ }
82087
+ /** `gateway_stop`: tell every owed turn still unanswered. Idempotent, never rejects. */
82088
+ stop() {
82089
+ this.stopped ??= this.run();
82090
+ return this.stopped;
82091
+ }
82092
+ async run() {
82093
+ this.prune();
82094
+ let timer;
82095
+ this.cap = new Promise((resolve42) => {
82096
+ timer = setTimeout(() => {
82097
+ this.expired = true;
82098
+ resolve42("timeout");
82099
+ }, this.capMs);
82100
+ });
82101
+ const turns = [...this.turns];
82102
+ this.turns.clear();
82103
+ await Promise.all(turns.map((entry) => this.tell(entry, "")));
82104
+ if (timer) clearTimeout(timer);
82105
+ }
82106
+ prune() {
82107
+ const cutoff = Date.now() - KEEP_UNANSWERED_MS;
82108
+ for (const entry of this.turns)
82109
+ if (entry.endedAt !== void 0 && entry.endedAt < cutoff) this.turns.delete(entry);
82110
+ }
82111
+ async tell(entry, tag) {
82112
+ const { turn } = entry;
82113
+ const cap = this.cap;
82114
+ if (turn.reported) return;
82115
+ if (turn.delivered) {
82116
+ this.safeLog(`[AgentVault] turn_cancelled reason=shutdown ${tag}notice=none delivered=true`);
82117
+ return;
82118
+ }
82119
+ let outcome = "none";
82120
+ try {
82121
+ const sink = entry.sink();
82122
+ if (sink) {
82123
+ turn.reported = true;
82124
+ outcome = "timeout";
82125
+ if (!this.expired) {
82126
+ const notice = ownerNoticeFor("model_error", { agentName: entry.agentName(), provider: entry.provider() });
82127
+ const sent = Promise.resolve().then(() => sink(notice)).then(
82128
+ (receipt) => receipt?.ok === false ? "failed" : "sent",
82129
+ () => "failed"
82130
+ );
82131
+ outcome = await (cap ? Promise.race([sent, cap]) : sent);
82132
+ }
82133
+ }
82134
+ } catch {
82135
+ outcome = "failed";
82136
+ }
82137
+ this.safeLog(`[AgentVault] turn_cancelled reason=shutdown ${tag}notice=${outcome}`);
82138
+ }
82139
+ safeLog(m22) {
82140
+ try {
82141
+ this.log(m22);
82142
+ } catch {
82143
+ }
82144
+ }
82145
+ };
82146
+ }
82147
+ });
81949
82148
  init_openclaw_entry = __esm2({
81950
82149
  "src/openclaw-entry.ts"() {
81951
82150
  "use strict";
@@ -81959,7 +82158,10 @@ ${actionsText}`);
81959
82158
  init_tool_telemetry();
81960
82159
  init_harness_compat();
81961
82160
  init_openclaw_turn_failure();
82161
+ init_turn_failure();
82162
+ init_openclaw_shutdown_notice();
81962
82163
  init_types();
82164
+ _shutdownNotices = new OpenClawShutdownNotices();
81963
82165
  managedRoutesRequested = false;
81964
82166
  }
81965
82167
  });
@@ -102685,7 +102887,7 @@ data:
102685
102887
  init_room_protocol();
102686
102888
  init_tool_telemetry();
102687
102889
  init_turn_failure();
102688
- VERSION = true ? "0.23.66" : "0.0.0-dev";
102890
+ VERSION = true ? "0.23.68" : "0.0.0-dev";
102689
102891
  }
102690
102892
  });
102691
102893
  await init_index();
@@ -145274,6 +145476,7 @@ function newTurn(item) {
145274
145476
  refused: false,
145275
145477
  telemetry: {},
145276
145478
  conversation: item?.conversation,
145479
+ hushed: item?.hushed,
145277
145480
  connectionRetry: false,
145278
145481
  startedAt: Date.now()
145279
145482
  };
@@ -145316,6 +145519,10 @@ var PersistentClaudeSession = class {
145316
145519
  firstFailure;
145317
145520
  /** Review X1: set by abort(); the aborter owns the failure report from then on. */
145318
145521
  aborted = false;
145522
+ /** #1583: set by stop(). The session says nothing more, and a late message is told. */
145523
+ stopWindow;
145524
+ /** #1583: replies on their way out, so shutdown does not close the socket under them. */
145525
+ sending = /* @__PURE__ */ new Set();
145319
145526
  /**
145320
145527
  * Queue an inbound message for the model.
145321
145528
  * @param opts.autoReplyOnText — for 1:1 DMs (where the owner always expects a
@@ -145355,8 +145562,13 @@ ${text}` : text;
145355
145562
  replyExpected: opts?.replyExpected,
145356
145563
  toolEligibleSender: opts?.toolEligibleSender,
145357
145564
  armed: opts?.armed,
145358
- conversation: opts?.conversation
145565
+ conversation: opts?.conversation,
145566
+ hushed: opts?.hushed
145359
145567
  };
145568
+ if (this.stopWindow) {
145569
+ this.stopWindow.tell(this.cancelled(newTurn(item)), "late=true ");
145570
+ return;
145571
+ }
145360
145572
  if (this.waiting) {
145361
145573
  const w2 = this.waiting;
145362
145574
  this.waiting = null;
@@ -145369,6 +145581,10 @@ ${text}` : text;
145369
145581
  * back to opts.onSay. This is what closes the DM→room leak: the destination is
145370
145582
  * the one captured for the message being answered, not a live global target. */
145371
145583
  async deliver(text) {
145584
+ if (this.stopWindow) {
145585
+ logLine("[session] say after shutdown began \u2014 DROPPED");
145586
+ return;
145587
+ }
145372
145588
  const turn = this.turn();
145373
145589
  if (!turn.sayAllowed) {
145374
145590
  logLine(
@@ -145377,14 +145593,48 @@ ${text}` : text;
145377
145593
  return;
145378
145594
  }
145379
145595
  turn.said = true;
145380
- if (turn.reply) await turn.reply(text);
145596
+ if (turn.reply) await this.sent(turn.reply(text));
145381
145597
  else if (this.opts.onSay) await this.opts.onSay(text);
145382
145598
  }
145599
+ /** Track a reply until it lands, so stop() can wait for it. */
145600
+ sent(reply) {
145601
+ if (reply instanceof Promise) {
145602
+ this.sending.add(reply);
145603
+ const done = () => this.sending.delete(reply);
145604
+ reply.then(done, done);
145605
+ }
145606
+ return reply;
145607
+ }
145383
145608
  /** #1508: the turn now producing output — the oldest pulled message not yet
145384
145609
  * answered — or, between turns, the one just answered. */
145385
145610
  turn() {
145386
145611
  return this.turns[0] ?? this.settled;
145387
145612
  }
145613
+ cancelled(turn) {
145614
+ return { reply: turn.reply, owed: turn.replyExpected, hushed: turn.hushed };
145615
+ }
145616
+ /**
145617
+ * #1583: our own shutdown. Every unanswered turn goes to the window: the one
145618
+ * running, then each one queued behind it, pulled by the SDK or not. A turn
145619
+ * that reached its `result` was retired already, so its answer is never
145620
+ * followed by a false "couldn't answer". A turn that failed told its chat
145621
+ * itself. From here on no say leaves the device and no failure is reported.
145622
+ * Returns how many turns it handed over.
145623
+ */
145624
+ stop(window2) {
145625
+ this.stopWindow = window2;
145626
+ const waiting = this.pending.splice(0).map((item) => newTurn(item));
145627
+ const open6 = [...this.turns, ...waiting];
145628
+ this.turns = [];
145629
+ open6.forEach((turn, i2) => window2.tell(this.cancelled(turn), i2 === 0 ? "" : "queued=true "));
145630
+ for (const reply of this.sending) window2.wait(reply);
145631
+ for (const notice of this.notices) window2.wait(notice);
145632
+ return open6.length;
145633
+ }
145634
+ /** #1583: the turn reached its `result` and did not fail. */
145635
+ answered() {
145636
+ return this.settled.sawResult && this.firstFailure === void 0;
145637
+ }
145388
145638
  /** Abort the in-flight query() — used by the worker queue on a per-task timeout. */
145389
145639
  abort() {
145390
145640
  this.aborted = true;
@@ -145619,7 +145869,7 @@ ${text}` : text;
145619
145869
  }), { spanRecorded: planLimit });
145620
145870
  } else if (turn.replyExpected && !turn.said && turn.text.trim()) {
145621
145871
  if (reply) {
145622
- void reply(turn.text);
145872
+ void this.sent(reply(turn.text));
145623
145873
  } else {
145624
145874
  logLine(
145625
145875
  `[drop-probe] BLOCKED at result: composed ${turn.text.length} chars, reply expected but no reply sink \u2014 reply DROPPED`
@@ -145722,7 +145972,39 @@ var WorkerQueue = class {
145722
145972
  q = [];
145723
145973
  loop = Promise.resolve();
145724
145974
  running = false;
145975
+ /** The worker running now, so a shutdown can stop it. */
145976
+ active;
145977
+ /** #1583: set by stop(). No task runs after it. */
145978
+ window;
145979
+ /** #1583: a failed task's own notice, on its way out. */
145980
+ reporting;
145981
+ /** A cancelled task owes its reply exactly as a failed one does. */
145982
+ cancelled(task) {
145983
+ return { reply: task.reply, owed: task.replyExpected !== false, hushed: task.hushed };
145984
+ }
145985
+ /**
145986
+ * #1583: our own shutdown. The running worker hands its turn to the window
145987
+ * and is torn down, so no tool keeps working; every waiting task is told. The
145988
+ * failure path stands aside from here on: the bare sentence is the turn's
145989
+ * only word, with no span. A worker that already reached its result answered
145990
+ * in full, so nothing follows it.
145991
+ */
145992
+ stop(window2) {
145993
+ this.window = window2;
145994
+ const session = this.active;
145995
+ if (session) {
145996
+ if (session.stop(window2) === 0 && session.answered())
145997
+ this.deps.log("[bridge] turn_cancelled reason=shutdown notice=none delivered=true");
145998
+ session.abort();
145999
+ }
146000
+ if (this.reporting) window2.wait(this.reporting);
146001
+ for (const entry of this.q.splice(0)) window2.tell(this.cancelled(entry.task), "queued=true ");
146002
+ }
145725
146003
  enqueue(task) {
146004
+ if (this.window) {
146005
+ this.window.tell(this.cancelled(task), "late=true ");
146006
+ return;
146007
+ }
145726
146008
  this.q.push({
145727
146009
  task,
145728
146010
  enqueuedAt: Date.now(),
@@ -145782,12 +146064,14 @@ var WorkerQueue = class {
145782
146064
  let timedOut = false;
145783
146065
  try {
145784
146066
  session = this.deps.makeSession(task);
146067
+ this.active = session;
145785
146068
  session.push(task.instruction, task.reply, {
145786
146069
  autoReplyOnText: task.autoReplyOnText,
145787
146070
  replyExpected: task.replyExpected,
145788
146071
  toolEligibleSender: task.toolEligibleSender,
145789
146072
  armed: task.armed,
145790
- conversation: task.conversation
146073
+ conversation: task.conversation,
146074
+ hushed: task.hushed
145791
146075
  });
145792
146076
  const currentSession = session;
145793
146077
  const timeout = new Promise((_resolve, reject) => {
@@ -145802,7 +146086,7 @@ var WorkerQueue = class {
145802
146086
  const failedCode = this.failureOf(session);
145803
146087
  this.emitIncident({
145804
146088
  at: new Date(startedAt).toISOString(),
145805
- outcome: failedCode ? "error" : "ok",
146089
+ outcome: failedCode ? "error" : this.window && !okSnap?.sawResult ? "cancelled" : "ok",
145806
146090
  ...failedCode ? { code: failedCode } : {},
145807
146091
  waitedMs,
145808
146092
  ranMs: Date.now() - startedAt,
@@ -145815,12 +146099,13 @@ var WorkerQueue = class {
145815
146099
  });
145816
146100
  } catch (err) {
145817
146101
  const handled = this.failureOf(session);
146102
+ const stopped = this.window !== void 0 && handled === void 0;
145818
146103
  const code = handled ?? (timedOut ? "model_error" : classifyClaudeThrow(err));
145819
146104
  const snap = this.snapshotOf(session);
145820
146105
  this.emitIncident({
145821
146106
  at: new Date(startedAt).toISOString(),
145822
- outcome: timedOut ? "timeout" : "error",
145823
- code,
146107
+ outcome: stopped ? "cancelled" : timedOut ? "timeout" : "error",
146108
+ ...stopped ? {} : { code },
145824
146109
  waitedMs,
145825
146110
  ranMs: Date.now() - startedAt,
145826
146111
  timeoutMs: this.deps.timeoutMs,
@@ -145831,8 +146116,9 @@ var WorkerQueue = class {
145831
146116
  ...snap ? { session: snap } : {}
145832
146117
  });
145833
146118
  session?.abort();
145834
- if (handled === void 0) {
145835
- await reportTurnFailed(
146119
+ if (handled === void 0 && !stopped) {
146120
+ this.active = void 0;
146121
+ this.reporting = reportTurnFailed(
145836
146122
  this.deps.failure,
145837
146123
  {
145838
146124
  code,
@@ -145849,9 +146135,12 @@ var WorkerQueue = class {
145849
146135
  },
145850
146136
  this.deps.log
145851
146137
  );
146138
+ await this.reporting;
146139
+ this.reporting = void 0;
145852
146140
  }
145853
146141
  } finally {
145854
146142
  if (timer) clearTimeout(timer);
146143
+ this.active = void 0;
145855
146144
  }
145856
146145
  }
145857
146146
  };
@@ -145884,7 +146173,8 @@ function makeRouter(deps) {
145884
146173
  replyExpected: opts?.replyExpected,
145885
146174
  toolEligibleSender: opts.toolEligibleSender,
145886
146175
  armed: opts.armed,
145887
- ...opts?.conversation ? { conversation: opts.conversation } : {}
146176
+ ...opts?.conversation ? { conversation: opts.conversation } : {},
146177
+ ...opts?.hushed ? { hushed: opts.hushed } : {}
145888
146178
  });
145889
146179
  return false;
145890
146180
  }
@@ -146349,8 +146639,19 @@ var ActiveTarget = class {
146349
146639
  }) {
146350
146640
  const t7 = this.target;
146351
146641
  const where = !t7 ? "nowhere" : t7.kind === "room" ? `room ${t7.roomId.slice(0, 8)}` : "1:1 owner";
146352
- return async (text) => {
146353
- if (!t7) return;
146642
+ return async (text, opts) => {
146643
+ if (!t7) return opts?.notice ? false : void 0;
146644
+ if (opts?.notice) {
146645
+ try {
146646
+ if (t7.kind === "room") await channel.sendToRoom(t7.roomId, text);
146647
+ else await sendDm(channel, t7, text);
146648
+ log(`notice sent to ${where}`);
146649
+ return true;
146650
+ } catch (err) {
146651
+ log(`notice_failed code=${classifyToolError(err)}`);
146652
+ return false;
146653
+ }
146654
+ }
146354
146655
  const startedAt = Date.now();
146355
146656
  try {
146356
146657
  if (t7.kind === "room") await channel.sendToRoom(t7.roomId, text);
@@ -146534,7 +146835,8 @@ ${FILE_LOCK_NOTE}` : turnText, target.snapshotReply(channel, log), {
146534
146835
  toolEligibleSender: e7.senderIsAgent === false && e7.senderIsOwner === true && e7.foreignContent === false,
146535
146836
  armed: () => arming.isArmed(e7.roomId),
146536
146837
  ...contextBlock ? { roomContext: contextBlock } : {},
146537
- conversation: { kind: "room", id: e7.roomId }
146838
+ conversation: { kind: "room", id: e7.roomId },
146839
+ hushed: () => hush.isHushed(e7.roomId)
146538
146840
  });
146539
146841
  if (delivered !== false) {
146540
146842
  if (held.entries.length > 0) {
@@ -146744,9 +147046,110 @@ function answerInfoFlags(argv, version3, print) {
146744
147046
  return false;
146745
147047
  }
146746
147048
 
147049
+ // src/shutdown.ts
147050
+ await init_dist();
147051
+ var SHUTDOWN_NOTICE_MS2 = 1e4;
147052
+ var SHUTDOWN_DEADLINE_MS = 15e3;
147053
+ var ShutdownWindow = class {
147054
+ constructor(failure3, log, capMs = SHUTDOWN_NOTICE_MS2) {
147055
+ this.failure = failure3;
147056
+ this.log = log;
147057
+ this.cap = new Promise((resolve5) => {
147058
+ this.timer = setTimeout(() => {
147059
+ this.expired = true;
147060
+ resolve5("timeout");
147061
+ }, capMs);
147062
+ });
147063
+ }
147064
+ failure;
147065
+ log;
147066
+ cap;
147067
+ timer;
147068
+ expired = false;
147069
+ closed = false;
147070
+ pending = [];
147071
+ /** Tell one cancelled turn. `tag` ("queued=true ", "late=true ") goes in the log line. Never throws. */
147072
+ tell(turn, tag = "") {
147073
+ this.pending.push(this.notice(turn, tag));
147074
+ }
147075
+ /** Let a send already under way finish, inside the same cap. Never throws. */
147076
+ wait(p2) {
147077
+ this.pending.push(Promise.race([p2.then(() => {
147078
+ }, () => {
147079
+ }), this.cap.then(() => {
147080
+ })]));
147081
+ }
147082
+ /** Resolves once every notice has settled, inside the cap. Arrivals after this are not told. */
147083
+ async settle() {
147084
+ try {
147085
+ while (this.pending.length) await Promise.all(this.pending.splice(0));
147086
+ } finally {
147087
+ this.closed = true;
147088
+ if (this.timer) clearTimeout(this.timer);
147089
+ }
147090
+ }
147091
+ async notice(turn, tag) {
147092
+ let outcome = "none";
147093
+ try {
147094
+ if (turn.owed && turn.reply && !turn.hushed?.() && !this.closed) {
147095
+ const reply = turn.reply;
147096
+ outcome = "timeout";
147097
+ if (!this.expired) {
147098
+ const text = ownerNoticeFor("model_error", { agentName: this.agentName(), provider: PROVIDER });
147099
+ const sent = Promise.resolve().then(() => reply(text, { notice: true })).then((r7) => r7 === false ? "failed" : "sent", () => "failed");
147100
+ outcome = await Promise.race([sent, this.cap]);
147101
+ }
147102
+ }
147103
+ } catch {
147104
+ outcome = "failed";
147105
+ }
147106
+ this.safeLog(`[bridge] turn_cancelled reason=shutdown ${tag}notice=${outcome}`);
147107
+ }
147108
+ agentName() {
147109
+ try {
147110
+ const name = this.failure?.agentName?.();
147111
+ return typeof name === "string" ? name.trim() : "";
147112
+ } catch {
147113
+ return "";
147114
+ }
147115
+ }
147116
+ safeLog(m6) {
147117
+ try {
147118
+ this.log(m6);
147119
+ } catch {
147120
+ }
147121
+ }
147122
+ };
147123
+ function makeShutdown(deps) {
147124
+ let running;
147125
+ const sequence = async () => {
147126
+ const window2 = new ShutdownWindow(deps.failure, deps.log, deps.noticeMs);
147127
+ for (const lane of [deps.listener, deps.queue]) {
147128
+ try {
147129
+ lane.stop(window2);
147130
+ } catch {
147131
+ deps.log("[bridge] shutdown: could not stop a lane; continuing");
147132
+ }
147133
+ }
147134
+ await window2.settle();
147135
+ try {
147136
+ await deps.channel.stop();
147137
+ } catch {
147138
+ deps.log("[bridge] shutdown: channel stop failed; exiting anyway");
147139
+ }
147140
+ };
147141
+ return {
147142
+ run() {
147143
+ running ??= settleWithin(sequence(), deps.deadlineMs ?? SHUTDOWN_DEADLINE_MS).then(() => deps.exit(0));
147144
+ return running;
147145
+ },
147146
+ started: () => running !== void 0
147147
+ };
147148
+ }
147149
+
146747
147150
  // src/index.ts
146748
147151
  async function main() {
146749
- if (answerInfoFlags(process.argv, true ? "0.8.37" : void 0, printLine)) {
147152
+ if (answerInfoFlags(process.argv, true ? "0.8.39" : void 0, printLine)) {
146750
147153
  process.exit(0);
146751
147154
  }
146752
147155
  if (process.argv[2] === "recovery" && await (await init_recovery().then(() => recovery_exports)).maybeRunRecoverySubcommand()) {
@@ -146774,7 +147177,7 @@ async function main() {
146774
147177
  "[bridge] warning: passing the invite token on the command line is visible to other local users via 'ps'. Prefer: AV_INVITE_TOKEN=\u2026 npx @agentvault/claude-bridge"
146775
147178
  );
146776
147179
  }
146777
- logLine(`[bridge] version: ${true ? "0.8.37" : "dev"}`);
147180
+ logLine(`[bridge] version: ${true ? "0.8.39" : "dev"}`);
146778
147181
  logLine(`[bridge] data dir: ${cfg.dataDir} (${cfg.dataDirSource})`);
146779
147182
  logLine(`[bridge] workspace: ${cfg.workspaceDir} \xB7 permissions: ${cfg.permissionMode} \xB7 enclave dir fenced`);
146780
147183
  if (cfg.armRoom) {
@@ -146806,7 +147209,7 @@ async function main() {
146806
147209
  // its default would render "@agentvault/agentvault@0.7.x" — the wrong
146807
147210
  // package name attached to the bridge's version number, which is worse
146808
147211
  // than either alone.
146809
- clientVersion: `@agentvault/claude-bridge@${true ? "0.8.37" : "dev"}`
147212
+ clientVersion: `@agentvault/claude-bridge@${true ? "0.8.39" : "dev"}`
146810
147213
  });
146811
147214
  const agentSystemPrompt = cfg.systemPrompt ?? identityPrompt(cfg.agentName);
146812
147215
  const deviceJwt = () => {
@@ -146908,6 +147311,16 @@ async function main() {
146908
147311
  }
146909
147312
  });
146910
147313
  const router = makeRouter({ workAllowed, listener, queue: workerQueue });
147314
+ const shutdown = makeShutdown({
147315
+ listener,
147316
+ queue: workerQueue,
147317
+ channel,
147318
+ failure: failure3,
147319
+ log: (m6) => logLine(m6),
147320
+ exit: (code) => process.exit(code)
147321
+ });
147322
+ process.on("SIGTERM", () => void shutdown.run());
147323
+ process.on("SIGINT", () => void shutdown.run());
146911
147324
  wireBridge(
146912
147325
  channel,
146913
147326
  { push: (t7, reply, opts) => router.push(t7, reply, opts) },
@@ -146947,14 +147360,15 @@ async function main() {
146947
147360
  "room_joined",
146948
147361
  (e7) => logLine(`[bridge] joined room ${e7.name} (${e7.roomId})`)
146949
147362
  );
146950
- listener.start().catch(
146951
- (err) => stopAfterListenerFailure(err, {
147363
+ listener.start().catch((err) => {
147364
+ if (shutdown.started()) return;
147365
+ return stopAfterListenerFailure(err, {
146952
147366
  session: listener,
146953
147367
  flush: () => channel.telemetry?.flush?.(),
146954
147368
  log: (m6) => logLine(m6),
146955
147369
  exit: (code) => process.exit(code)
146956
- })
146957
- );
147370
+ });
147371
+ });
146958
147372
  await channel.start();
146959
147373
  }
146960
147374
  main().catch((err) => {
package/dist/router.d.ts CHANGED
@@ -12,6 +12,8 @@ export interface PushLike {
12
12
  roomContext?: string;
13
13
  /** #1560: the conversation this message came from. */
14
14
  conversation?: ToolConversation;
15
+ /** #1583: true once this room is hushed. */
16
+ hushed?: () => boolean;
15
17
  }): unknown;
16
18
  }
17
19
  export interface RouterDeps {
package/dist/session.d.ts CHANGED
@@ -2,6 +2,7 @@ import { z } from "zod";
2
2
  import { type LlmUsage } from "./usage-report.js";
3
3
  import type { ToolConversation, TurnFailureCode } from "@agentvault/agentvault";
4
4
  import { type FailureDeps } from "./turn-failure.js";
5
+ import type { ShutdownWindow } from "./shutdown.js";
5
6
  /**
6
7
  * The one tool the room session exposes: `room_say`. Speaking to the room is an
7
8
  * explicit choice — Claude calls this only when it has something to add, and
@@ -50,7 +51,11 @@ export type QueryFn = (args: {
50
51
  type: string;
51
52
  [k: string]: unknown;
52
53
  }>;
53
- export type ReplySink = (text: string) => void | Promise<void>;
54
+ /** `{ notice: true }` marks a #1583 shutdown notice, whose sink answers `false`
55
+ * when the send failed. Everything else is a reply and the result is ignored. */
56
+ export type ReplySink = (text: string, opts?: {
57
+ notice?: boolean;
58
+ }) => void | Promise<unknown>;
54
59
  export interface SessionOpts {
55
60
  /** Fallback reply sink when a message carries no per-message reply (e.g. a
56
61
  * proactive say). Per-message replies passed to push() take precedence. */
@@ -160,6 +165,10 @@ export declare class PersistentClaudeSession {
160
165
  private firstFailure?;
161
166
  /** Review X1: set by abort(); the aborter owns the failure report from then on. */
162
167
  private aborted;
168
+ /** #1583: set by stop(). The session says nothing more, and a late message is told. */
169
+ private stopWindow?;
170
+ /** #1583: replies on their way out, so shutdown does not close the socket under them. */
171
+ private sending;
163
172
  constructor(opts: SessionOpts);
164
173
  /**
165
174
  * Queue an inbound message for the model.
@@ -184,14 +193,30 @@ export declare class PersistentClaudeSession {
184
193
  roomContext?: string;
185
194
  /** #1560: the conversation this message came from (span + notice wording). */
186
195
  conversation?: ToolConversation;
196
+ /** #1583: true once this message's room is hushed. */
197
+ hushed?: () => boolean;
187
198
  }): void;
188
199
  /** Route a say-tool message to the reply bound to the in-flight message, falling
189
200
  * back to opts.onSay. This is what closes the DM→room leak: the destination is
190
201
  * the one captured for the message being answered, not a live global target. */
191
202
  deliver(text: string): Promise<void>;
203
+ /** Track a reply until it lands, so stop() can wait for it. */
204
+ private sent;
192
205
  /** #1508: the turn now producing output — the oldest pulled message not yet
193
206
  * answered — or, between turns, the one just answered. */
194
207
  private turn;
208
+ private cancelled;
209
+ /**
210
+ * #1583: our own shutdown. Every unanswered turn goes to the window: the one
211
+ * running, then each one queued behind it, pulled by the SDK or not. A turn
212
+ * that reached its `result` was retired already, so its answer is never
213
+ * followed by a false "couldn't answer". A turn that failed told its chat
214
+ * itself. From here on no say leaves the device and no failure is reported.
215
+ * Returns how many turns it handed over.
216
+ */
217
+ stop(window: ShutdownWindow): number;
218
+ /** #1583: the turn reached its `result` and did not fail. */
219
+ answered(): boolean;
195
220
  /** Abort the in-flight query() — used by the worker queue on a per-task timeout. */
196
221
  abort(): void;
197
222
  /**
@@ -0,0 +1,73 @@
1
+ import { type FailureDeps } from "./turn-failure.js";
2
+ /** How long the notices may take, all of them together. */
3
+ export declare const SHUTDOWN_NOTICE_MS = 10000;
4
+ /** The bound on the whole shutdown, channel.stop() included. Under launchd's 20 s. */
5
+ export declare const SHUTDOWN_DEADLINE_MS = 15000;
6
+ /** A notice sink. `false` means the send failed; anything else means it went. */
7
+ export type NoticeSink = (text: string, opts?: {
8
+ notice?: boolean;
9
+ }) => void | Promise<unknown>;
10
+ /** One turn that will now never be answered. */
11
+ export interface CancelledTurn {
12
+ reply?: NoticeSink;
13
+ /** The #1560 rule, as this turn's lane reads it. */
14
+ owed: boolean;
15
+ /** #392: true once the owner has hushed this turn's room. */
16
+ hushed?: () => boolean;
17
+ }
18
+ /**
19
+ * The stretch between our stop starting and the channel closing. The socket is
20
+ * still up, and still ACKing, so a message that lands here is told too: it is
21
+ * decrypted and ACKed already, and nothing will redeliver it.
22
+ */
23
+ export declare class ShutdownWindow {
24
+ private readonly failure;
25
+ private readonly log;
26
+ private readonly cap;
27
+ private timer;
28
+ private expired;
29
+ private closed;
30
+ private pending;
31
+ constructor(failure: FailureDeps | undefined, log: (m: string) => void, capMs?: number);
32
+ /** Tell one cancelled turn. `tag` ("queued=true ", "late=true ") goes in the log line. Never throws. */
33
+ tell(turn: CancelledTurn, tag?: string): void;
34
+ /** Let a send already under way finish, inside the same cap. Never throws. */
35
+ wait(p: Promise<unknown>): void;
36
+ /** Resolves once every notice has settled, inside the cap. Arrivals after this are not told. */
37
+ settle(): Promise<void>;
38
+ private notice;
39
+ private agentName;
40
+ private safeLog;
41
+ }
42
+ export interface ShutdownDeps {
43
+ /** Each lane hands its open turns to the window and stops producing output. */
44
+ listener: {
45
+ stop(window: ShutdownWindow): unknown;
46
+ };
47
+ queue: {
48
+ stop(window: ShutdownWindow): void;
49
+ };
50
+ channel: {
51
+ stop(): Promise<unknown>;
52
+ };
53
+ failure?: FailureDeps;
54
+ log: (m: string) => void;
55
+ /** Exit 0, as this process always has on SIGTERM. */
56
+ exit: (code: number) => void;
57
+ noticeMs?: number;
58
+ deadlineMs?: number;
59
+ }
60
+ /**
61
+ * Our own stop. The lanes first, so the notices go out while the socket is
62
+ * open; the channel only after them, so it can still flush ACKs and telemetry.
63
+ * `run` is idempotent and always reaches `exit` within `deadlineMs`, however
64
+ * stuck a send or channel.stop() is.
65
+ *
66
+ * `started()` lets the listener's fatal path stand aside: a query() that dies
67
+ * because we are stopping is not a failure to report (no second notice).
68
+ */
69
+ export declare function makeShutdown(deps: ShutdownDeps): {
70
+ run(): Promise<void>;
71
+ started(): boolean;
72
+ };
73
+ //# sourceMappingURL=shutdown.d.ts.map
@@ -83,7 +83,7 @@ export interface FailedTurn {
83
83
  /** The span is already recorded (#1467's plan-limit span). Exactly one per turn. */
84
84
  spanRecorded?: boolean;
85
85
  /** Where this turn's reply goes. */
86
- reply?: (text: string) => void | Promise<void>;
86
+ reply?: (text: string) => void | Promise<unknown>;
87
87
  /** Did this turn owe a reply? A room turn nobody addressed stays silent (#1107). */
88
88
  owed: boolean;
89
89
  /** The agent already said something this turn (re-review N1): the notice is
@@ -1,6 +1,7 @@
1
1
  import type { ToolConversation, TurnFailureCode } from "@agentvault/agentvault";
2
2
  import type { PersistentClaudeSession, ReplySink } from "./session.js";
3
3
  import { type FailureDeps } from "./turn-failure.js";
4
+ import type { ShutdownWindow } from "./shutdown.js";
4
5
  /** One tool-eligible turn to run in an isolated ephemeral worker. */
5
6
  export type WorkerTask = {
6
7
  /** The single instruction that seeds the worker's conversation. */
@@ -19,6 +20,8 @@ export type WorkerTask = {
19
20
  armed?: () => boolean;
20
21
  /** #1560: the conversation this task answers (span + notice wording). */
21
22
  conversation?: ToolConversation;
23
+ /** #1583: true once this task's room is hushed. */
24
+ hushed?: () => boolean;
22
25
  };
23
26
  /**
24
27
  * Forensic record of EVERY task the queue runs — clean or not.
@@ -39,7 +42,8 @@ export type WorkerTask = {
39
42
  export type WorkerIncident = {
40
43
  /** ISO timestamp — the bridge's own logs are unstamped, so this is the anchor. */
41
44
  at: string;
42
- outcome: "ok" | "timeout" | "error";
45
+ /** #1583: `cancelled` is our own shutdown ending the turn. It carries no `code`. */
46
+ outcome: "ok" | "timeout" | "error" | "cancelled";
43
47
  /**
44
48
  * #1560: the failure's code. Absent on a clean turn — its presence is what
45
49
  * marks a real incident. Replaces the old `error` (the raw error message),
@@ -137,7 +141,23 @@ export declare class WorkerQueue {
137
141
  private q;
138
142
  private loop;
139
143
  private running;
144
+ /** The worker running now, so a shutdown can stop it. */
145
+ private active?;
146
+ /** #1583: set by stop(). No task runs after it. */
147
+ private window?;
148
+ /** #1583: a failed task's own notice, on its way out. */
149
+ private reporting?;
140
150
  constructor(deps: WorkerQueueDeps);
151
+ /** A cancelled task owes its reply exactly as a failed one does. */
152
+ private cancelled;
153
+ /**
154
+ * #1583: our own shutdown. The running worker hands its turn to the window
155
+ * and is torn down, so no tool keeps working; every waiting task is told. The
156
+ * failure path stands aside from here on: the bare sentence is the turn's
157
+ * only word, with no span. A worker that already reached its result answered
158
+ * in full, so nothing follows it.
159
+ */
160
+ stop(window: ShutdownWindow): void;
141
161
  enqueue(task: WorkerTask): void;
142
162
  /** Resolves when the queue has processed everything enqueued so far. */
143
163
  whenDrained(): Promise<void>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentvault/claude-bridge",
3
- "version": "0.8.37",
3
+ "version": "0.8.39",
4
4
  "type": "module",
5
5
  "description": "AgentVault Claude Bridge — daemon for bridging a Claude agent into secure E2E-encrypted AgentVault 1:1 direct messages and rooms.",
6
6
  "main": "dist/index.js",