@agentvault/claude-bridge 0.8.36 → 0.8.38
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 +1 -0
- package/dist/bridge.d.ts +8 -2
- package/dist/index.js +491 -114
- package/dist/router.d.ts +2 -0
- package/dist/session.d.ts +26 -1
- package/dist/shutdown.d.ts +73 -0
- package/dist/turn-failure.d.ts +1 -1
- package/dist/worker-queue.d.ts +21 -1
- package/package.json +1 -1
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
|
|
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
|
|
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.
|
|
11759
|
+
const v22 = true ? "0.23.67" : FALLBACK;
|
|
11760
11760
|
return `${PACKAGE}@${v22}`;
|
|
11761
11761
|
}
|
|
11762
11762
|
function buildSha() {
|
|
11763
|
-
const raw = true ? "
|
|
11763
|
+
const raw = true ? "a3de03b" : "";
|
|
11764
11764
|
const cleaned = (raw ?? "").trim();
|
|
11765
11765
|
return !cleaned || cleaned === "unknown" ? null : cleaned;
|
|
11766
11766
|
}
|
|
@@ -13305,6 +13305,51 @@ async function _handleInbound(params) {
|
|
|
13305
13305
|
replyOptions: {}
|
|
13306
13306
|
}), { groupId: metadata.conversationGroupId });
|
|
13307
13307
|
}
|
|
13308
|
+
function asTurnFailureCode(code) {
|
|
13309
|
+
return typeof code === "string" && CODES.has(code) ? code : "model_error";
|
|
13310
|
+
}
|
|
13311
|
+
function clean5(value, max) {
|
|
13312
|
+
if (typeof value !== "string") return "";
|
|
13313
|
+
return value.replace(/@/g, "").replace(/\s+/g, " ").trim().slice(0, max).trim();
|
|
13314
|
+
}
|
|
13315
|
+
function ownerNoticeFor(code, ctx) {
|
|
13316
|
+
const a2 = clean5(ctx?.agentName, 80) || "Your agent";
|
|
13317
|
+
const p2 = clean5(ctx?.provider, 40) || "AI provider";
|
|
13318
|
+
const head = `${a2} couldn't answer this message`;
|
|
13319
|
+
switch (asTurnFailureCode(code)) {
|
|
13320
|
+
case "provider_auth_failed":
|
|
13321
|
+
return `${head}: its ${p2} sign-in expired. Sign in again on the agent's computer.`;
|
|
13322
|
+
case "provider_billing":
|
|
13323
|
+
return `${head}: its ${p2} account is out of credit or has a billing problem.`;
|
|
13324
|
+
case "model_rate_limited":
|
|
13325
|
+
return `${head}: it is being rate-limited by ${p2}. Try again in a few minutes.`;
|
|
13326
|
+
case "model_unavailable":
|
|
13327
|
+
return `${head}: the model it is set to use is no longer available.`;
|
|
13328
|
+
case "provider_unreachable":
|
|
13329
|
+
return `${head}: it can't reach ${p2} right now.`;
|
|
13330
|
+
case "ai_tool_unsupported":
|
|
13331
|
+
return `${head}: its AI tool needs attention on its computer.`;
|
|
13332
|
+
case "plan_limit_reached":
|
|
13333
|
+
return `${head}: it has reached its ${p2} plan's usage limit.`;
|
|
13334
|
+
default:
|
|
13335
|
+
return `${head}.`;
|
|
13336
|
+
}
|
|
13337
|
+
}
|
|
13338
|
+
function reportModelTurnFailure(sink, report) {
|
|
13339
|
+
try {
|
|
13340
|
+
const code = asTurnFailureCode(report.code);
|
|
13341
|
+
const isPlan = code === "plan_limit_reached";
|
|
13342
|
+
reportToolInvoke(sink, {
|
|
13343
|
+
toolName: "model_turn",
|
|
13344
|
+
outcome: "error",
|
|
13345
|
+
errorKind: code,
|
|
13346
|
+
durationMs: report.durationMs,
|
|
13347
|
+
conversation: isPlan ? { kind: "unknown" } : report.conversation,
|
|
13348
|
+
...isPlan && report.limitResetsAt !== void 0 ? { limitResetsAt: report.limitResetsAt } : {}
|
|
13349
|
+
});
|
|
13350
|
+
} catch {
|
|
13351
|
+
}
|
|
13352
|
+
}
|
|
13308
13353
|
function getErrorMap() {
|
|
13309
13354
|
return overrideErrorMap;
|
|
13310
13355
|
}
|
|
@@ -17827,52 +17872,7 @@ function armSseKeepAlive(intervalMs, onTick) {
|
|
|
17827
17872
|
timer.unref?.();
|
|
17828
17873
|
return timer;
|
|
17829
17874
|
}
|
|
17830
|
-
function asTurnFailureCode(code) {
|
|
17831
|
-
return typeof code === "string" && CODES.has(code) ? code : "model_error";
|
|
17832
|
-
}
|
|
17833
|
-
function clean5(value, max) {
|
|
17834
|
-
if (typeof value !== "string") return "";
|
|
17835
|
-
return value.replace(/@/g, "").replace(/\s+/g, " ").trim().slice(0, max).trim();
|
|
17836
|
-
}
|
|
17837
|
-
function ownerNoticeFor(code, ctx) {
|
|
17838
|
-
const a2 = clean5(ctx?.agentName, 80) || "Your agent";
|
|
17839
|
-
const p2 = clean5(ctx?.provider, 40) || "AI provider";
|
|
17840
|
-
const head = `${a2} couldn't answer this message`;
|
|
17841
|
-
switch (asTurnFailureCode(code)) {
|
|
17842
|
-
case "provider_auth_failed":
|
|
17843
|
-
return `${head}: its ${p2} sign-in expired. Sign in again on the agent's computer.`;
|
|
17844
|
-
case "provider_billing":
|
|
17845
|
-
return `${head}: its ${p2} account is out of credit or has a billing problem.`;
|
|
17846
|
-
case "model_rate_limited":
|
|
17847
|
-
return `${head}: it is being rate-limited by ${p2}. Try again in a few minutes.`;
|
|
17848
|
-
case "model_unavailable":
|
|
17849
|
-
return `${head}: the model it is set to use is no longer available.`;
|
|
17850
|
-
case "provider_unreachable":
|
|
17851
|
-
return `${head}: it can't reach ${p2} right now.`;
|
|
17852
|
-
case "ai_tool_unsupported":
|
|
17853
|
-
return `${head}: its AI tool needs attention on its computer.`;
|
|
17854
|
-
case "plan_limit_reached":
|
|
17855
|
-
return `${head}: it has reached its ${p2} plan's usage limit.`;
|
|
17856
|
-
default:
|
|
17857
|
-
return `${head}.`;
|
|
17858
|
-
}
|
|
17859
|
-
}
|
|
17860
|
-
function reportModelTurnFailure(sink, report) {
|
|
17861
|
-
try {
|
|
17862
|
-
const code = asTurnFailureCode(report.code);
|
|
17863
|
-
const isPlan = code === "plan_limit_reached";
|
|
17864
|
-
reportToolInvoke(sink, {
|
|
17865
|
-
toolName: "model_turn",
|
|
17866
|
-
outcome: "error",
|
|
17867
|
-
errorKind: code,
|
|
17868
|
-
durationMs: report.durationMs,
|
|
17869
|
-
conversation: isPlan ? { kind: "unknown" } : report.conversation,
|
|
17870
|
-
...isPlan && report.limitResetsAt !== void 0 ? { limitResetsAt: report.limitResetsAt } : {}
|
|
17871
|
-
});
|
|
17872
|
-
} catch {
|
|
17873
|
-
}
|
|
17874
|
-
}
|
|
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, 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, TURN_FAILURE_CODES, CODES, TurnFailure, NOTICE_RE, init_turn_failure, VERSION, init_index;
|
|
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, 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
17876
|
var init_dist = __esm({
|
|
17877
17877
|
async "../plugin/dist/index.js"() {
|
|
17878
17878
|
"use strict";
|
|
@@ -70202,16 +70202,7 @@ var init_dist = __esm({
|
|
|
70202
70202
|
_seenNonces = /* @__PURE__ */ new Map();
|
|
70203
70203
|
static MAX_NONCES_PER_ROOM = 1e3;
|
|
70204
70204
|
constructor() {
|
|
70205
|
-
|
|
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
|
-
});
|
|
70205
|
+
process.on("exit", () => this.purgeAll());
|
|
70215
70206
|
}
|
|
70216
70207
|
/**
|
|
70217
70208
|
* Check if a nonce has been seen (replay prevention).
|
|
@@ -73372,7 +73363,7 @@ ${text}`,
|
|
|
73372
73363
|
*/
|
|
73373
73364
|
sendActivitySpan(spanData) {
|
|
73374
73365
|
if (!this._ws || this._ws.readyState !== WebSocket2.OPEN) return;
|
|
73375
|
-
const pluginVersion = true ? "0.23.
|
|
73366
|
+
const pluginVersion = true ? "0.23.67" : "0.0.0-dev";
|
|
73376
73367
|
const agentName = this.config.agentName ?? "Agent";
|
|
73377
73368
|
const resource = {
|
|
73378
73369
|
"service.name": "agentvault-agent",
|
|
@@ -75655,7 +75646,7 @@ ${text}`,
|
|
|
75655
75646
|
agentVersion: this.config.agentVersion ?? "0.0.0",
|
|
75656
75647
|
// __AV_VERSION__ is injected by esbuild from package.json at build time.
|
|
75657
75648
|
// Falls back to "0.0.0-dev" in non-bundled contexts (tests).
|
|
75658
|
-
pluginVersion: true ? "0.23.
|
|
75649
|
+
pluginVersion: true ? "0.23.67" : "0.0.0-dev"
|
|
75659
75650
|
});
|
|
75660
75651
|
this._telemetryReporter.startAutoFlush(3e4);
|
|
75661
75652
|
}
|
|
@@ -75993,7 +75984,7 @@ ${text}`,
|
|
|
75993
75984
|
agentVersion: this.config.agentVersion ?? "0.0.0",
|
|
75994
75985
|
// __AV_VERSION__ is injected by esbuild from package.json at build time.
|
|
75995
75986
|
// Falls back to "0.0.0-dev" in non-bundled contexts (tests).
|
|
75996
|
-
pluginVersion: true ? "0.23.
|
|
75987
|
+
pluginVersion: true ? "0.23.67" : "0.0.0-dev"
|
|
75997
75988
|
});
|
|
75998
75989
|
this._telemetryReporter.startAutoFlush(3e4);
|
|
75999
75990
|
}
|
|
@@ -76564,9 +76555,9 @@ ${text}`,
|
|
|
76564
76555
|
...decisionReply ? { decision: decisionReply } : {}
|
|
76565
76556
|
};
|
|
76566
76557
|
this.emit("message", text, metadata);
|
|
76567
|
-
|
|
76568
|
-
|
|
76569
|
-
}
|
|
76558
|
+
Promise.resolve(this.config.onMessage?.(text, metadata)).catch((err) => {
|
|
76559
|
+
console.error("[SecureChannel] onMessage callback error (MLS 1:1):", err);
|
|
76560
|
+
});
|
|
76570
76561
|
} catch (decryptErr) {
|
|
76571
76562
|
if (classifyCommitFailure(data.epoch, mgr?.epoch) === "already-applied") {
|
|
76572
76563
|
console.debug(`[SecureChannel] MLS 1:1 message at epoch ${String(data.epoch)} predates our epoch ${String(mgr?.epoch)} \u2014 cannot decrypt, ignoring`);
|
|
@@ -79965,7 +79956,9 @@ ${baseText}`;
|
|
|
79965
79956
|
console.log(`[SecureChannel] A2A message decrypted for ${a2aChannelId.slice(0, 8)} (epoch=${mlsGroup.epoch}, len=${historyText.length})`);
|
|
79966
79957
|
this.emit("a2a_message", a2aMsg);
|
|
79967
79958
|
if (this.config.onA2AMessage) {
|
|
79968
|
-
this.config.onA2AMessage(a2aMsg)
|
|
79959
|
+
void Promise.resolve(this.config.onA2AMessage(a2aMsg)).catch((err) => {
|
|
79960
|
+
console.error("[SecureChannel] onA2AMessage callback failed:", err instanceof Error ? err.name : "error");
|
|
79961
|
+
});
|
|
79969
79962
|
}
|
|
79970
79963
|
} catch (err) {
|
|
79971
79964
|
if (classifyCommitFailure(data.epoch, mlsGroup?.epoch) === "already-applied") {
|
|
@@ -81849,6 +81842,202 @@ ${actionsText}`);
|
|
|
81849
81842
|
"use strict";
|
|
81850
81843
|
}
|
|
81851
81844
|
});
|
|
81845
|
+
init_turn_failure = __esm2({
|
|
81846
|
+
"src/turn-failure.ts"() {
|
|
81847
|
+
"use strict";
|
|
81848
|
+
init_tool_telemetry();
|
|
81849
|
+
TURN_FAILURE_CODES = [
|
|
81850
|
+
"provider_auth_failed",
|
|
81851
|
+
"provider_billing",
|
|
81852
|
+
"model_rate_limited",
|
|
81853
|
+
"model_unavailable",
|
|
81854
|
+
"provider_unreachable",
|
|
81855
|
+
"ai_tool_unsupported",
|
|
81856
|
+
"plan_limit_reached",
|
|
81857
|
+
"model_error"
|
|
81858
|
+
];
|
|
81859
|
+
CODES = new Set(TURN_FAILURE_CODES);
|
|
81860
|
+
TurnFailure = class extends Error {
|
|
81861
|
+
code;
|
|
81862
|
+
exitCode;
|
|
81863
|
+
constructor(code, opts = {}, message = "Codex turn failed") {
|
|
81864
|
+
super(message);
|
|
81865
|
+
this.name = "TurnFailure";
|
|
81866
|
+
this.code = asTurnFailureCode(code);
|
|
81867
|
+
if (opts.exitCode !== void 0) this.exitCode = opts.exitCode;
|
|
81868
|
+
}
|
|
81869
|
+
};
|
|
81870
|
+
NOTICE_RE = /^[^\n@]{1,120} couldn't answer this message(?:\.|: [^\n]{1,200})$/;
|
|
81871
|
+
}
|
|
81872
|
+
});
|
|
81873
|
+
init_openclaw_turn_failure = __esm2({
|
|
81874
|
+
"src/openclaw-turn-failure.ts"() {
|
|
81875
|
+
"use strict";
|
|
81876
|
+
init_turn_failure();
|
|
81877
|
+
init_tool_telemetry();
|
|
81878
|
+
AUTH_RE = new RegExp(
|
|
81879
|
+
[
|
|
81880
|
+
String.raw`^Couldn't sign in to the AI service\. `,
|
|
81881
|
+
// auth, provider_authentication_error
|
|
81882
|
+
String.raw`^The AI service isn't accepting your login\. `,
|
|
81883
|
+
// auth_permanent
|
|
81884
|
+
String.raw`^Your model provider needs a new login\. `,
|
|
81885
|
+
// OAuth login recovery hint
|
|
81886
|
+
String.raw`^Your AI session expired\. `,
|
|
81887
|
+
// session_expired (a login reason in OpenClaw)
|
|
81888
|
+
String.raw`^Couldn't sign in to [^\n]{1,80}\. Your saved login looks expired or no longer works\.`,
|
|
81889
|
+
String.raw`^[^\n]{1,80} isn't accepting your saved login(?: anymore)?\.`,
|
|
81890
|
+
String.raw`^Model login (?:expired|failed) on the gateway\b`,
|
|
81891
|
+
String.raw`^This AI service isn't set up yet\. Sign in under Models`,
|
|
81892
|
+
// missing API key
|
|
81893
|
+
String.raw`^OpenAI needs a different sign-in for this model\.`
|
|
81894
|
+
].join("|"),
|
|
81895
|
+
"u"
|
|
81896
|
+
);
|
|
81897
|
+
BILLING_RE = new RegExp(
|
|
81898
|
+
[
|
|
81899
|
+
String.raw`^The AI service reported a billing problem\. `,
|
|
81900
|
+
String.raw`^[^\n]{1,160} returned a billing error — check your account`,
|
|
81901
|
+
String.raw`^[^\n]{1,80} rejected the request — looks like a billing issue on the account\.`
|
|
81902
|
+
].join("|"),
|
|
81903
|
+
"u"
|
|
81904
|
+
);
|
|
81905
|
+
RATE_RE = new RegExp(
|
|
81906
|
+
[
|
|
81907
|
+
String.raw`^The AI service needs a short break\. Please try again in (?:a few minutes|~\d{1,5}(?:s| min))\.$`,
|
|
81908
|
+
String.raw`^The AI services are busy\. Please try again in a few minutes\.$`,
|
|
81909
|
+
String.raw`^[^\n]{1,80} is asking us to slow down\. Please wait a moment before trying again\.`,
|
|
81910
|
+
String.raw`^The AI service can't accept more requests right now\. `
|
|
81911
|
+
// quota-429
|
|
81912
|
+
].join("|"),
|
|
81913
|
+
"u"
|
|
81914
|
+
);
|
|
81915
|
+
MODEL_GONE_RE = new RegExp(
|
|
81916
|
+
[
|
|
81917
|
+
String.raw`^This model was not found\. Choose another model`,
|
|
81918
|
+
String.raw`^[^\n]{1,80} can't find the model you're using right now\.`
|
|
81919
|
+
].join("|"),
|
|
81920
|
+
"u"
|
|
81921
|
+
);
|
|
81922
|
+
UNREACHABLE_RE = new RegExp(
|
|
81923
|
+
[
|
|
81924
|
+
String.raw`^The AI service is having trouble\. Please try again in a moment\.$`,
|
|
81925
|
+
String.raw`^The AI service is busy\. Please try again in a moment, or choose another model\.$`,
|
|
81926
|
+
String.raw`^The AI service is temporarily overloaded\. Please try again in a moment\.$`,
|
|
81927
|
+
String.raw`^Selected model is at capacity\. Try a different model, or wait and retry\.$`,
|
|
81928
|
+
String.raw`^[^\n]{1,80} is (?:overloaded|having issues) right now\. Please wait a moment before trying again\.`,
|
|
81929
|
+
String.raw`^[^\n]{1,80} hasn't been responding\. Please wait a moment before trying again\.`,
|
|
81930
|
+
String.raw`^The model provider returned a temporary internal error before replying\. `,
|
|
81931
|
+
String.raw`^I couldn't reach the configured model backend `,
|
|
81932
|
+
String.raw`^Couldn't connect securely to the AI service\. `,
|
|
81933
|
+
String.raw`^LLM request timed out\.$`,
|
|
81934
|
+
String.raw`^The request took too long\. Check the conversation for any completed work before trying again\.$`
|
|
81935
|
+
].join("|"),
|
|
81936
|
+
"u"
|
|
81937
|
+
);
|
|
81938
|
+
}
|
|
81939
|
+
});
|
|
81940
|
+
init_openclaw_shutdown_notice = __esm2({
|
|
81941
|
+
"src/openclaw-shutdown-notice.ts"() {
|
|
81942
|
+
"use strict";
|
|
81943
|
+
init_turn_failure();
|
|
81944
|
+
SHUTDOWN_NOTICE_MS = 4500;
|
|
81945
|
+
KEEP_UNANSWERED_MS = 1e4;
|
|
81946
|
+
OpenClawShutdownNotices = class {
|
|
81947
|
+
constructor(log = (m22) => console.warn(m22), capMs = SHUTDOWN_NOTICE_MS) {
|
|
81948
|
+
this.log = log;
|
|
81949
|
+
this.capMs = capMs;
|
|
81950
|
+
}
|
|
81951
|
+
log;
|
|
81952
|
+
capMs;
|
|
81953
|
+
turns = /* @__PURE__ */ new Set();
|
|
81954
|
+
cap;
|
|
81955
|
+
expired = false;
|
|
81956
|
+
stopped;
|
|
81957
|
+
/** True once the gateway is closing: no new run can finish. */
|
|
81958
|
+
get stopping() {
|
|
81959
|
+
return this.cap !== void 0;
|
|
81960
|
+
}
|
|
81961
|
+
opened(entry) {
|
|
81962
|
+
this.prune();
|
|
81963
|
+
this.turns.add(entry);
|
|
81964
|
+
}
|
|
81965
|
+
/** The turn is over, every retry included. Resolves inside the cap. */
|
|
81966
|
+
async closed(entry) {
|
|
81967
|
+
if (this.stopping) {
|
|
81968
|
+
if (this.turns.delete(entry)) await this.tell(entry, "late=true ");
|
|
81969
|
+
return;
|
|
81970
|
+
}
|
|
81971
|
+
if (entry.turn.delivered || !entry.sink()) this.turns.delete(entry);
|
|
81972
|
+
else entry.endedAt = Date.now();
|
|
81973
|
+
}
|
|
81974
|
+
/** A channel is starting, so this process is not ending: the next stop starts fresh. */
|
|
81975
|
+
resume() {
|
|
81976
|
+
this.cap = void 0;
|
|
81977
|
+
this.expired = false;
|
|
81978
|
+
this.stopped = void 0;
|
|
81979
|
+
}
|
|
81980
|
+
/** `gateway_stop`: tell every owed turn still unanswered. Idempotent, never rejects. */
|
|
81981
|
+
stop() {
|
|
81982
|
+
this.stopped ??= this.run();
|
|
81983
|
+
return this.stopped;
|
|
81984
|
+
}
|
|
81985
|
+
async run() {
|
|
81986
|
+
this.prune();
|
|
81987
|
+
let timer;
|
|
81988
|
+
this.cap = new Promise((resolve42) => {
|
|
81989
|
+
timer = setTimeout(() => {
|
|
81990
|
+
this.expired = true;
|
|
81991
|
+
resolve42("timeout");
|
|
81992
|
+
}, this.capMs);
|
|
81993
|
+
});
|
|
81994
|
+
const turns = [...this.turns];
|
|
81995
|
+
this.turns.clear();
|
|
81996
|
+
await Promise.all(turns.map((entry) => this.tell(entry, "")));
|
|
81997
|
+
if (timer) clearTimeout(timer);
|
|
81998
|
+
}
|
|
81999
|
+
prune() {
|
|
82000
|
+
const cutoff = Date.now() - KEEP_UNANSWERED_MS;
|
|
82001
|
+
for (const entry of this.turns)
|
|
82002
|
+
if (entry.endedAt !== void 0 && entry.endedAt < cutoff) this.turns.delete(entry);
|
|
82003
|
+
}
|
|
82004
|
+
async tell(entry, tag) {
|
|
82005
|
+
const { turn } = entry;
|
|
82006
|
+
const cap = this.cap;
|
|
82007
|
+
if (turn.reported) return;
|
|
82008
|
+
if (turn.delivered) {
|
|
82009
|
+
this.safeLog(`[AgentVault] turn_cancelled reason=shutdown ${tag}notice=none delivered=true`);
|
|
82010
|
+
return;
|
|
82011
|
+
}
|
|
82012
|
+
let outcome = "none";
|
|
82013
|
+
try {
|
|
82014
|
+
const sink = entry.sink();
|
|
82015
|
+
if (sink) {
|
|
82016
|
+
turn.reported = true;
|
|
82017
|
+
outcome = "timeout";
|
|
82018
|
+
if (!this.expired) {
|
|
82019
|
+
const notice = ownerNoticeFor("model_error", { agentName: entry.agentName(), provider: entry.provider() });
|
|
82020
|
+
const sent = Promise.resolve().then(() => sink(notice)).then(
|
|
82021
|
+
(receipt) => receipt?.ok === false ? "failed" : "sent",
|
|
82022
|
+
() => "failed"
|
|
82023
|
+
);
|
|
82024
|
+
outcome = await (cap ? Promise.race([sent, cap]) : sent);
|
|
82025
|
+
}
|
|
82026
|
+
}
|
|
82027
|
+
} catch {
|
|
82028
|
+
outcome = "failed";
|
|
82029
|
+
}
|
|
82030
|
+
this.safeLog(`[AgentVault] turn_cancelled reason=shutdown ${tag}notice=${outcome}`);
|
|
82031
|
+
}
|
|
82032
|
+
safeLog(m22) {
|
|
82033
|
+
try {
|
|
82034
|
+
this.log(m22);
|
|
82035
|
+
} catch {
|
|
82036
|
+
}
|
|
82037
|
+
}
|
|
82038
|
+
};
|
|
82039
|
+
}
|
|
82040
|
+
});
|
|
81852
82041
|
init_openclaw_entry = __esm2({
|
|
81853
82042
|
"src/openclaw-entry.ts"() {
|
|
81854
82043
|
"use strict";
|
|
@@ -81861,7 +82050,11 @@ ${actionsText}`);
|
|
|
81861
82050
|
init_tool_audit();
|
|
81862
82051
|
init_tool_telemetry();
|
|
81863
82052
|
init_harness_compat();
|
|
82053
|
+
init_openclaw_turn_failure();
|
|
82054
|
+
init_turn_failure();
|
|
82055
|
+
init_openclaw_shutdown_notice();
|
|
81864
82056
|
init_types();
|
|
82057
|
+
_shutdownNotices = new OpenClawShutdownNotices();
|
|
81865
82058
|
managedRoutesRequested = false;
|
|
81866
82059
|
}
|
|
81867
82060
|
});
|
|
@@ -102566,34 +102759,6 @@ data:
|
|
|
102566
102759
|
};
|
|
102567
102760
|
}
|
|
102568
102761
|
});
|
|
102569
|
-
init_turn_failure = __esm2({
|
|
102570
|
-
"src/turn-failure.ts"() {
|
|
102571
|
-
"use strict";
|
|
102572
|
-
init_tool_telemetry();
|
|
102573
|
-
TURN_FAILURE_CODES = [
|
|
102574
|
-
"provider_auth_failed",
|
|
102575
|
-
"provider_billing",
|
|
102576
|
-
"model_rate_limited",
|
|
102577
|
-
"model_unavailable",
|
|
102578
|
-
"provider_unreachable",
|
|
102579
|
-
"ai_tool_unsupported",
|
|
102580
|
-
"plan_limit_reached",
|
|
102581
|
-
"model_error"
|
|
102582
|
-
];
|
|
102583
|
-
CODES = new Set(TURN_FAILURE_CODES);
|
|
102584
|
-
TurnFailure = class extends Error {
|
|
102585
|
-
code;
|
|
102586
|
-
exitCode;
|
|
102587
|
-
constructor(code, opts = {}, message = "Codex turn failed") {
|
|
102588
|
-
super(message);
|
|
102589
|
-
this.name = "TurnFailure";
|
|
102590
|
-
this.code = asTurnFailureCode(code);
|
|
102591
|
-
if (opts.exitCode !== void 0) this.exitCode = opts.exitCode;
|
|
102592
|
-
}
|
|
102593
|
-
};
|
|
102594
|
-
NOTICE_RE = /^[^\n@]{1,120} couldn't answer this message(?:\.|: [^\n]{1,200})$/;
|
|
102595
|
-
}
|
|
102596
|
-
});
|
|
102597
102762
|
init_index = __esm2({
|
|
102598
102763
|
async "src/index.ts"() {
|
|
102599
102764
|
await init_channel();
|
|
@@ -102615,7 +102780,7 @@ data:
|
|
|
102615
102780
|
init_room_protocol();
|
|
102616
102781
|
init_tool_telemetry();
|
|
102617
102782
|
init_turn_failure();
|
|
102618
|
-
VERSION = true ? "0.23.
|
|
102783
|
+
VERSION = true ? "0.23.67" : "0.0.0-dev";
|
|
102619
102784
|
}
|
|
102620
102785
|
});
|
|
102621
102786
|
await init_index();
|
|
@@ -145204,6 +145369,7 @@ function newTurn(item) {
|
|
|
145204
145369
|
refused: false,
|
|
145205
145370
|
telemetry: {},
|
|
145206
145371
|
conversation: item?.conversation,
|
|
145372
|
+
hushed: item?.hushed,
|
|
145207
145373
|
connectionRetry: false,
|
|
145208
145374
|
startedAt: Date.now()
|
|
145209
145375
|
};
|
|
@@ -145246,6 +145412,10 @@ var PersistentClaudeSession = class {
|
|
|
145246
145412
|
firstFailure;
|
|
145247
145413
|
/** Review X1: set by abort(); the aborter owns the failure report from then on. */
|
|
145248
145414
|
aborted = false;
|
|
145415
|
+
/** #1583: set by stop(). The session says nothing more, and a late message is told. */
|
|
145416
|
+
stopWindow;
|
|
145417
|
+
/** #1583: replies on their way out, so shutdown does not close the socket under them. */
|
|
145418
|
+
sending = /* @__PURE__ */ new Set();
|
|
145249
145419
|
/**
|
|
145250
145420
|
* Queue an inbound message for the model.
|
|
145251
145421
|
* @param opts.autoReplyOnText — for 1:1 DMs (where the owner always expects a
|
|
@@ -145285,8 +145455,13 @@ ${text}` : text;
|
|
|
145285
145455
|
replyExpected: opts?.replyExpected,
|
|
145286
145456
|
toolEligibleSender: opts?.toolEligibleSender,
|
|
145287
145457
|
armed: opts?.armed,
|
|
145288
|
-
conversation: opts?.conversation
|
|
145458
|
+
conversation: opts?.conversation,
|
|
145459
|
+
hushed: opts?.hushed
|
|
145289
145460
|
};
|
|
145461
|
+
if (this.stopWindow) {
|
|
145462
|
+
this.stopWindow.tell(this.cancelled(newTurn(item)), "late=true ");
|
|
145463
|
+
return;
|
|
145464
|
+
}
|
|
145290
145465
|
if (this.waiting) {
|
|
145291
145466
|
const w2 = this.waiting;
|
|
145292
145467
|
this.waiting = null;
|
|
@@ -145299,6 +145474,10 @@ ${text}` : text;
|
|
|
145299
145474
|
* back to opts.onSay. This is what closes the DM→room leak: the destination is
|
|
145300
145475
|
* the one captured for the message being answered, not a live global target. */
|
|
145301
145476
|
async deliver(text) {
|
|
145477
|
+
if (this.stopWindow) {
|
|
145478
|
+
logLine("[session] say after shutdown began \u2014 DROPPED");
|
|
145479
|
+
return;
|
|
145480
|
+
}
|
|
145302
145481
|
const turn = this.turn();
|
|
145303
145482
|
if (!turn.sayAllowed) {
|
|
145304
145483
|
logLine(
|
|
@@ -145307,14 +145486,48 @@ ${text}` : text;
|
|
|
145307
145486
|
return;
|
|
145308
145487
|
}
|
|
145309
145488
|
turn.said = true;
|
|
145310
|
-
if (turn.reply) await turn.reply(text);
|
|
145489
|
+
if (turn.reply) await this.sent(turn.reply(text));
|
|
145311
145490
|
else if (this.opts.onSay) await this.opts.onSay(text);
|
|
145312
145491
|
}
|
|
145492
|
+
/** Track a reply until it lands, so stop() can wait for it. */
|
|
145493
|
+
sent(reply) {
|
|
145494
|
+
if (reply instanceof Promise) {
|
|
145495
|
+
this.sending.add(reply);
|
|
145496
|
+
const done = () => this.sending.delete(reply);
|
|
145497
|
+
reply.then(done, done);
|
|
145498
|
+
}
|
|
145499
|
+
return reply;
|
|
145500
|
+
}
|
|
145313
145501
|
/** #1508: the turn now producing output — the oldest pulled message not yet
|
|
145314
145502
|
* answered — or, between turns, the one just answered. */
|
|
145315
145503
|
turn() {
|
|
145316
145504
|
return this.turns[0] ?? this.settled;
|
|
145317
145505
|
}
|
|
145506
|
+
cancelled(turn) {
|
|
145507
|
+
return { reply: turn.reply, owed: turn.replyExpected, hushed: turn.hushed };
|
|
145508
|
+
}
|
|
145509
|
+
/**
|
|
145510
|
+
* #1583: our own shutdown. Every unanswered turn goes to the window: the one
|
|
145511
|
+
* running, then each one queued behind it, pulled by the SDK or not. A turn
|
|
145512
|
+
* that reached its `result` was retired already, so its answer is never
|
|
145513
|
+
* followed by a false "couldn't answer". A turn that failed told its chat
|
|
145514
|
+
* itself. From here on no say leaves the device and no failure is reported.
|
|
145515
|
+
* Returns how many turns it handed over.
|
|
145516
|
+
*/
|
|
145517
|
+
stop(window2) {
|
|
145518
|
+
this.stopWindow = window2;
|
|
145519
|
+
const waiting = this.pending.splice(0).map((item) => newTurn(item));
|
|
145520
|
+
const open6 = [...this.turns, ...waiting];
|
|
145521
|
+
this.turns = [];
|
|
145522
|
+
open6.forEach((turn, i2) => window2.tell(this.cancelled(turn), i2 === 0 ? "" : "queued=true "));
|
|
145523
|
+
for (const reply of this.sending) window2.wait(reply);
|
|
145524
|
+
for (const notice of this.notices) window2.wait(notice);
|
|
145525
|
+
return open6.length;
|
|
145526
|
+
}
|
|
145527
|
+
/** #1583: the turn reached its `result` and did not fail. */
|
|
145528
|
+
answered() {
|
|
145529
|
+
return this.settled.sawResult && this.firstFailure === void 0;
|
|
145530
|
+
}
|
|
145318
145531
|
/** Abort the in-flight query() — used by the worker queue on a per-task timeout. */
|
|
145319
145532
|
abort() {
|
|
145320
145533
|
this.aborted = true;
|
|
@@ -145549,7 +145762,7 @@ ${text}` : text;
|
|
|
145549
145762
|
}), { spanRecorded: planLimit });
|
|
145550
145763
|
} else if (turn.replyExpected && !turn.said && turn.text.trim()) {
|
|
145551
145764
|
if (reply) {
|
|
145552
|
-
void reply(turn.text);
|
|
145765
|
+
void this.sent(reply(turn.text));
|
|
145553
145766
|
} else {
|
|
145554
145767
|
logLine(
|
|
145555
145768
|
`[drop-probe] BLOCKED at result: composed ${turn.text.length} chars, reply expected but no reply sink \u2014 reply DROPPED`
|
|
@@ -145652,7 +145865,39 @@ var WorkerQueue = class {
|
|
|
145652
145865
|
q = [];
|
|
145653
145866
|
loop = Promise.resolve();
|
|
145654
145867
|
running = false;
|
|
145868
|
+
/** The worker running now, so a shutdown can stop it. */
|
|
145869
|
+
active;
|
|
145870
|
+
/** #1583: set by stop(). No task runs after it. */
|
|
145871
|
+
window;
|
|
145872
|
+
/** #1583: a failed task's own notice, on its way out. */
|
|
145873
|
+
reporting;
|
|
145874
|
+
/** A cancelled task owes its reply exactly as a failed one does. */
|
|
145875
|
+
cancelled(task) {
|
|
145876
|
+
return { reply: task.reply, owed: task.replyExpected !== false, hushed: task.hushed };
|
|
145877
|
+
}
|
|
145878
|
+
/**
|
|
145879
|
+
* #1583: our own shutdown. The running worker hands its turn to the window
|
|
145880
|
+
* and is torn down, so no tool keeps working; every waiting task is told. The
|
|
145881
|
+
* failure path stands aside from here on: the bare sentence is the turn's
|
|
145882
|
+
* only word, with no span. A worker that already reached its result answered
|
|
145883
|
+
* in full, so nothing follows it.
|
|
145884
|
+
*/
|
|
145885
|
+
stop(window2) {
|
|
145886
|
+
this.window = window2;
|
|
145887
|
+
const session = this.active;
|
|
145888
|
+
if (session) {
|
|
145889
|
+
if (session.stop(window2) === 0 && session.answered())
|
|
145890
|
+
this.deps.log("[bridge] turn_cancelled reason=shutdown notice=none delivered=true");
|
|
145891
|
+
session.abort();
|
|
145892
|
+
}
|
|
145893
|
+
if (this.reporting) window2.wait(this.reporting);
|
|
145894
|
+
for (const entry of this.q.splice(0)) window2.tell(this.cancelled(entry.task), "queued=true ");
|
|
145895
|
+
}
|
|
145655
145896
|
enqueue(task) {
|
|
145897
|
+
if (this.window) {
|
|
145898
|
+
this.window.tell(this.cancelled(task), "late=true ");
|
|
145899
|
+
return;
|
|
145900
|
+
}
|
|
145656
145901
|
this.q.push({
|
|
145657
145902
|
task,
|
|
145658
145903
|
enqueuedAt: Date.now(),
|
|
@@ -145712,12 +145957,14 @@ var WorkerQueue = class {
|
|
|
145712
145957
|
let timedOut = false;
|
|
145713
145958
|
try {
|
|
145714
145959
|
session = this.deps.makeSession(task);
|
|
145960
|
+
this.active = session;
|
|
145715
145961
|
session.push(task.instruction, task.reply, {
|
|
145716
145962
|
autoReplyOnText: task.autoReplyOnText,
|
|
145717
145963
|
replyExpected: task.replyExpected,
|
|
145718
145964
|
toolEligibleSender: task.toolEligibleSender,
|
|
145719
145965
|
armed: task.armed,
|
|
145720
|
-
conversation: task.conversation
|
|
145966
|
+
conversation: task.conversation,
|
|
145967
|
+
hushed: task.hushed
|
|
145721
145968
|
});
|
|
145722
145969
|
const currentSession = session;
|
|
145723
145970
|
const timeout = new Promise((_resolve, reject) => {
|
|
@@ -145732,7 +145979,7 @@ var WorkerQueue = class {
|
|
|
145732
145979
|
const failedCode = this.failureOf(session);
|
|
145733
145980
|
this.emitIncident({
|
|
145734
145981
|
at: new Date(startedAt).toISOString(),
|
|
145735
|
-
outcome: failedCode ? "error" : "ok",
|
|
145982
|
+
outcome: failedCode ? "error" : this.window && !okSnap?.sawResult ? "cancelled" : "ok",
|
|
145736
145983
|
...failedCode ? { code: failedCode } : {},
|
|
145737
145984
|
waitedMs,
|
|
145738
145985
|
ranMs: Date.now() - startedAt,
|
|
@@ -145745,12 +145992,13 @@ var WorkerQueue = class {
|
|
|
145745
145992
|
});
|
|
145746
145993
|
} catch (err) {
|
|
145747
145994
|
const handled = this.failureOf(session);
|
|
145995
|
+
const stopped = this.window !== void 0 && handled === void 0;
|
|
145748
145996
|
const code = handled ?? (timedOut ? "model_error" : classifyClaudeThrow(err));
|
|
145749
145997
|
const snap = this.snapshotOf(session);
|
|
145750
145998
|
this.emitIncident({
|
|
145751
145999
|
at: new Date(startedAt).toISOString(),
|
|
145752
|
-
outcome: timedOut ? "timeout" : "error",
|
|
145753
|
-
code,
|
|
146000
|
+
outcome: stopped ? "cancelled" : timedOut ? "timeout" : "error",
|
|
146001
|
+
...stopped ? {} : { code },
|
|
145754
146002
|
waitedMs,
|
|
145755
146003
|
ranMs: Date.now() - startedAt,
|
|
145756
146004
|
timeoutMs: this.deps.timeoutMs,
|
|
@@ -145761,8 +146009,9 @@ var WorkerQueue = class {
|
|
|
145761
146009
|
...snap ? { session: snap } : {}
|
|
145762
146010
|
});
|
|
145763
146011
|
session?.abort();
|
|
145764
|
-
if (handled === void 0) {
|
|
145765
|
-
|
|
146012
|
+
if (handled === void 0 && !stopped) {
|
|
146013
|
+
this.active = void 0;
|
|
146014
|
+
this.reporting = reportTurnFailed(
|
|
145766
146015
|
this.deps.failure,
|
|
145767
146016
|
{
|
|
145768
146017
|
code,
|
|
@@ -145779,9 +146028,12 @@ var WorkerQueue = class {
|
|
|
145779
146028
|
},
|
|
145780
146029
|
this.deps.log
|
|
145781
146030
|
);
|
|
146031
|
+
await this.reporting;
|
|
146032
|
+
this.reporting = void 0;
|
|
145782
146033
|
}
|
|
145783
146034
|
} finally {
|
|
145784
146035
|
if (timer) clearTimeout(timer);
|
|
146036
|
+
this.active = void 0;
|
|
145785
146037
|
}
|
|
145786
146038
|
}
|
|
145787
146039
|
};
|
|
@@ -145814,7 +146066,8 @@ function makeRouter(deps) {
|
|
|
145814
146066
|
replyExpected: opts?.replyExpected,
|
|
145815
146067
|
toolEligibleSender: opts.toolEligibleSender,
|
|
145816
146068
|
armed: opts.armed,
|
|
145817
|
-
...opts?.conversation ? { conversation: opts.conversation } : {}
|
|
146069
|
+
...opts?.conversation ? { conversation: opts.conversation } : {},
|
|
146070
|
+
...opts?.hushed ? { hushed: opts.hushed } : {}
|
|
145818
146071
|
});
|
|
145819
146072
|
return false;
|
|
145820
146073
|
}
|
|
@@ -146279,8 +146532,19 @@ var ActiveTarget = class {
|
|
|
146279
146532
|
}) {
|
|
146280
146533
|
const t7 = this.target;
|
|
146281
146534
|
const where = !t7 ? "nowhere" : t7.kind === "room" ? `room ${t7.roomId.slice(0, 8)}` : "1:1 owner";
|
|
146282
|
-
return async (text) => {
|
|
146283
|
-
if (!t7) return;
|
|
146535
|
+
return async (text, opts) => {
|
|
146536
|
+
if (!t7) return opts?.notice ? false : void 0;
|
|
146537
|
+
if (opts?.notice) {
|
|
146538
|
+
try {
|
|
146539
|
+
if (t7.kind === "room") await channel.sendToRoom(t7.roomId, text);
|
|
146540
|
+
else await sendDm(channel, t7, text);
|
|
146541
|
+
log(`notice sent to ${where}`);
|
|
146542
|
+
return true;
|
|
146543
|
+
} catch (err) {
|
|
146544
|
+
log(`notice_failed code=${classifyToolError(err)}`);
|
|
146545
|
+
return false;
|
|
146546
|
+
}
|
|
146547
|
+
}
|
|
146284
146548
|
const startedAt = Date.now();
|
|
146285
146549
|
try {
|
|
146286
146550
|
if (t7.kind === "room") await channel.sendToRoom(t7.roomId, text);
|
|
@@ -146464,7 +146728,8 @@ ${FILE_LOCK_NOTE}` : turnText, target.snapshotReply(channel, log), {
|
|
|
146464
146728
|
toolEligibleSender: e7.senderIsAgent === false && e7.senderIsOwner === true && e7.foreignContent === false,
|
|
146465
146729
|
armed: () => arming.isArmed(e7.roomId),
|
|
146466
146730
|
...contextBlock ? { roomContext: contextBlock } : {},
|
|
146467
|
-
conversation: { kind: "room", id: e7.roomId }
|
|
146731
|
+
conversation: { kind: "room", id: e7.roomId },
|
|
146732
|
+
hushed: () => hush.isHushed(e7.roomId)
|
|
146468
146733
|
});
|
|
146469
146734
|
if (delivered !== false) {
|
|
146470
146735
|
if (held.entries.length > 0) {
|
|
@@ -146674,9 +146939,110 @@ function answerInfoFlags(argv, version3, print) {
|
|
|
146674
146939
|
return false;
|
|
146675
146940
|
}
|
|
146676
146941
|
|
|
146942
|
+
// src/shutdown.ts
|
|
146943
|
+
await init_dist();
|
|
146944
|
+
var SHUTDOWN_NOTICE_MS2 = 1e4;
|
|
146945
|
+
var SHUTDOWN_DEADLINE_MS = 15e3;
|
|
146946
|
+
var ShutdownWindow = class {
|
|
146947
|
+
constructor(failure3, log, capMs = SHUTDOWN_NOTICE_MS2) {
|
|
146948
|
+
this.failure = failure3;
|
|
146949
|
+
this.log = log;
|
|
146950
|
+
this.cap = new Promise((resolve5) => {
|
|
146951
|
+
this.timer = setTimeout(() => {
|
|
146952
|
+
this.expired = true;
|
|
146953
|
+
resolve5("timeout");
|
|
146954
|
+
}, capMs);
|
|
146955
|
+
});
|
|
146956
|
+
}
|
|
146957
|
+
failure;
|
|
146958
|
+
log;
|
|
146959
|
+
cap;
|
|
146960
|
+
timer;
|
|
146961
|
+
expired = false;
|
|
146962
|
+
closed = false;
|
|
146963
|
+
pending = [];
|
|
146964
|
+
/** Tell one cancelled turn. `tag` ("queued=true ", "late=true ") goes in the log line. Never throws. */
|
|
146965
|
+
tell(turn, tag = "") {
|
|
146966
|
+
this.pending.push(this.notice(turn, tag));
|
|
146967
|
+
}
|
|
146968
|
+
/** Let a send already under way finish, inside the same cap. Never throws. */
|
|
146969
|
+
wait(p2) {
|
|
146970
|
+
this.pending.push(Promise.race([p2.then(() => {
|
|
146971
|
+
}, () => {
|
|
146972
|
+
}), this.cap.then(() => {
|
|
146973
|
+
})]));
|
|
146974
|
+
}
|
|
146975
|
+
/** Resolves once every notice has settled, inside the cap. Arrivals after this are not told. */
|
|
146976
|
+
async settle() {
|
|
146977
|
+
try {
|
|
146978
|
+
while (this.pending.length) await Promise.all(this.pending.splice(0));
|
|
146979
|
+
} finally {
|
|
146980
|
+
this.closed = true;
|
|
146981
|
+
if (this.timer) clearTimeout(this.timer);
|
|
146982
|
+
}
|
|
146983
|
+
}
|
|
146984
|
+
async notice(turn, tag) {
|
|
146985
|
+
let outcome = "none";
|
|
146986
|
+
try {
|
|
146987
|
+
if (turn.owed && turn.reply && !turn.hushed?.() && !this.closed) {
|
|
146988
|
+
const reply = turn.reply;
|
|
146989
|
+
outcome = "timeout";
|
|
146990
|
+
if (!this.expired) {
|
|
146991
|
+
const text = ownerNoticeFor("model_error", { agentName: this.agentName(), provider: PROVIDER });
|
|
146992
|
+
const sent = Promise.resolve().then(() => reply(text, { notice: true })).then((r7) => r7 === false ? "failed" : "sent", () => "failed");
|
|
146993
|
+
outcome = await Promise.race([sent, this.cap]);
|
|
146994
|
+
}
|
|
146995
|
+
}
|
|
146996
|
+
} catch {
|
|
146997
|
+
outcome = "failed";
|
|
146998
|
+
}
|
|
146999
|
+
this.safeLog(`[bridge] turn_cancelled reason=shutdown ${tag}notice=${outcome}`);
|
|
147000
|
+
}
|
|
147001
|
+
agentName() {
|
|
147002
|
+
try {
|
|
147003
|
+
const name = this.failure?.agentName?.();
|
|
147004
|
+
return typeof name === "string" ? name.trim() : "";
|
|
147005
|
+
} catch {
|
|
147006
|
+
return "";
|
|
147007
|
+
}
|
|
147008
|
+
}
|
|
147009
|
+
safeLog(m6) {
|
|
147010
|
+
try {
|
|
147011
|
+
this.log(m6);
|
|
147012
|
+
} catch {
|
|
147013
|
+
}
|
|
147014
|
+
}
|
|
147015
|
+
};
|
|
147016
|
+
function makeShutdown(deps) {
|
|
147017
|
+
let running;
|
|
147018
|
+
const sequence = async () => {
|
|
147019
|
+
const window2 = new ShutdownWindow(deps.failure, deps.log, deps.noticeMs);
|
|
147020
|
+
for (const lane of [deps.listener, deps.queue]) {
|
|
147021
|
+
try {
|
|
147022
|
+
lane.stop(window2);
|
|
147023
|
+
} catch {
|
|
147024
|
+
deps.log("[bridge] shutdown: could not stop a lane; continuing");
|
|
147025
|
+
}
|
|
147026
|
+
}
|
|
147027
|
+
await window2.settle();
|
|
147028
|
+
try {
|
|
147029
|
+
await deps.channel.stop();
|
|
147030
|
+
} catch {
|
|
147031
|
+
deps.log("[bridge] shutdown: channel stop failed; exiting anyway");
|
|
147032
|
+
}
|
|
147033
|
+
};
|
|
147034
|
+
return {
|
|
147035
|
+
run() {
|
|
147036
|
+
running ??= settleWithin(sequence(), deps.deadlineMs ?? SHUTDOWN_DEADLINE_MS).then(() => deps.exit(0));
|
|
147037
|
+
return running;
|
|
147038
|
+
},
|
|
147039
|
+
started: () => running !== void 0
|
|
147040
|
+
};
|
|
147041
|
+
}
|
|
147042
|
+
|
|
146677
147043
|
// src/index.ts
|
|
146678
147044
|
async function main() {
|
|
146679
|
-
if (answerInfoFlags(process.argv, true ? "0.8.
|
|
147045
|
+
if (answerInfoFlags(process.argv, true ? "0.8.38" : void 0, printLine)) {
|
|
146680
147046
|
process.exit(0);
|
|
146681
147047
|
}
|
|
146682
147048
|
if (process.argv[2] === "recovery" && await (await init_recovery().then(() => recovery_exports)).maybeRunRecoverySubcommand()) {
|
|
@@ -146704,7 +147070,7 @@ async function main() {
|
|
|
146704
147070
|
"[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"
|
|
146705
147071
|
);
|
|
146706
147072
|
}
|
|
146707
|
-
logLine(`[bridge] version: ${true ? "0.8.
|
|
147073
|
+
logLine(`[bridge] version: ${true ? "0.8.38" : "dev"}`);
|
|
146708
147074
|
logLine(`[bridge] data dir: ${cfg.dataDir} (${cfg.dataDirSource})`);
|
|
146709
147075
|
logLine(`[bridge] workspace: ${cfg.workspaceDir} \xB7 permissions: ${cfg.permissionMode} \xB7 enclave dir fenced`);
|
|
146710
147076
|
if (cfg.armRoom) {
|
|
@@ -146736,7 +147102,7 @@ async function main() {
|
|
|
146736
147102
|
// its default would render "@agentvault/agentvault@0.7.x" — the wrong
|
|
146737
147103
|
// package name attached to the bridge's version number, which is worse
|
|
146738
147104
|
// than either alone.
|
|
146739
|
-
clientVersion: `@agentvault/claude-bridge@${true ? "0.8.
|
|
147105
|
+
clientVersion: `@agentvault/claude-bridge@${true ? "0.8.38" : "dev"}`
|
|
146740
147106
|
});
|
|
146741
147107
|
const agentSystemPrompt = cfg.systemPrompt ?? identityPrompt(cfg.agentName);
|
|
146742
147108
|
const deviceJwt = () => {
|
|
@@ -146838,6 +147204,16 @@ async function main() {
|
|
|
146838
147204
|
}
|
|
146839
147205
|
});
|
|
146840
147206
|
const router = makeRouter({ workAllowed, listener, queue: workerQueue });
|
|
147207
|
+
const shutdown = makeShutdown({
|
|
147208
|
+
listener,
|
|
147209
|
+
queue: workerQueue,
|
|
147210
|
+
channel,
|
|
147211
|
+
failure: failure3,
|
|
147212
|
+
log: (m6) => logLine(m6),
|
|
147213
|
+
exit: (code) => process.exit(code)
|
|
147214
|
+
});
|
|
147215
|
+
process.on("SIGTERM", () => void shutdown.run());
|
|
147216
|
+
process.on("SIGINT", () => void shutdown.run());
|
|
146841
147217
|
wireBridge(
|
|
146842
147218
|
channel,
|
|
146843
147219
|
{ push: (t7, reply, opts) => router.push(t7, reply, opts) },
|
|
@@ -146877,14 +147253,15 @@ async function main() {
|
|
|
146877
147253
|
"room_joined",
|
|
146878
147254
|
(e7) => logLine(`[bridge] joined room ${e7.name} (${e7.roomId})`)
|
|
146879
147255
|
);
|
|
146880
|
-
listener.start().catch(
|
|
146881
|
-
(
|
|
147256
|
+
listener.start().catch((err) => {
|
|
147257
|
+
if (shutdown.started()) return;
|
|
147258
|
+
return stopAfterListenerFailure(err, {
|
|
146882
147259
|
session: listener,
|
|
146883
147260
|
flush: () => channel.telemetry?.flush?.(),
|
|
146884
147261
|
log: (m6) => logLine(m6),
|
|
146885
147262
|
exit: (code) => process.exit(code)
|
|
146886
|
-
})
|
|
146887
|
-
);
|
|
147263
|
+
});
|
|
147264
|
+
});
|
|
146888
147265
|
await channel.start();
|
|
146889
147266
|
}
|
|
146890
147267
|
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
|
-
|
|
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
|
package/dist/turn-failure.d.ts
CHANGED
|
@@ -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<
|
|
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
|
package/dist/worker-queue.d.ts
CHANGED
|
@@ -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
|
-
|
|
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.
|
|
3
|
+
"version": "0.8.38",
|
|
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",
|