@openclaw/matrix 2026.5.12 → 2026.5.14-beta.1

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.
Files changed (54) hide show
  1. package/dist/{account-config-D2W-V1eQ.js → account-config-LVxGiX7e.js} +2 -1
  2. package/dist/{accounts-Bm90Rzvp.js → accounts--0L_EuMK.js} +1 -1
  3. package/dist/api.js +4 -4
  4. package/dist/{approval-handler.runtime-LpWmoFyw.js → approval-handler.runtime-DcgDdi8L.js} +4 -4
  5. package/dist/{approval-reaction-auth-DbcA1gGd.js → approval-reaction-auth-BY5VFY-q.js} +1 -1
  6. package/dist/{channel-B-R2dceO.js → channel-eRrwLDE9.js} +15 -15
  7. package/dist/channel-plugin-api.js +1 -1
  8. package/dist/{channel.runtime-DdtNY_To.js → channel.runtime-CsQesLGI.js} +6 -6
  9. package/dist/{cli-Cq80go7q.js → cli-DAMPUa3J.js} +11 -11
  10. package/dist/{cli-metadata-OtekEqAD.js → cli-metadata-Bt5SrlLo.js} +1 -1
  11. package/dist/cli-metadata.js +1 -1
  12. package/dist/{client-CyxIx4Fv.js → client-DBDvsx0D.js} +3 -3
  13. package/dist/{client-DzjShjVN.js → client-DrmLRQnw.js} +2 -2
  14. package/dist/{client-bootstrap-Am_ZEH3x.js → client-bootstrap-Ba68NvZB.js} +1 -1
  15. package/dist/{config-schema-B975BYl0.js → config-schema-DOKrNEs_.js} +34 -2
  16. package/dist/{config-update-wZX-HLMn.js → config-update-BBkpLB9o.js} +1 -1
  17. package/dist/{config-BR4uLzNs.js → config-xD5Y8nFT.js} +2 -2
  18. package/dist/contract-api.js +4 -4
  19. package/dist/{create-client-DpoW106T.js → create-client-ChlpNpAA.js} +2 -2
  20. package/dist/{crypto-runtime-DS6R8y_n.js → crypto-runtime-BevaUxax.js} +1 -1
  21. package/dist/{deps-CU5W9Ixu.js → deps-DR0MIYrW.js} +10 -14
  22. package/dist/{directory-live-Bn66SRSD.js → directory-live-Btsr0yok.js} +2 -2
  23. package/dist/{doctor-KjAvjAJu.js → doctor-qL-bgDwE.js} +1 -1
  24. package/dist/{draft-stream-D_FlbmCh.js → draft-stream-B-hyLmMw.js} +1 -1
  25. package/dist/{exec-approvals-Crnh543m.js → exec-approvals-to3d_jMv.js} +1 -1
  26. package/dist/index.js +1 -1
  27. package/dist/{legacy-crypto-inspector-pB252vPO.js → legacy-crypto-inspector-C4VpBdDV.js} +1 -1
  28. package/dist/{matrix-migration.runtime-DfjNMeoX.js → matrix-migration.runtime-CDasos7a.js} +1 -1
  29. package/dist/{media-text-psyGloYl.js → media-text-BLL8-Dr3.js} +1 -1
  30. package/dist/{messages-DQ8xXWiP.js → messages-BJi_jdEA.js} +3 -3
  31. package/dist/{monitor-C8cEvvTe.js → monitor-COvHRaUQ.js} +49 -25
  32. package/dist/plugin-entry.handlers.runtime.js +1 -1
  33. package/dist/probe.runtime-sh9piX22.js +3 -0
  34. package/dist/{profile-update-DleMeUHj.js → profile-update-DK5rfmA-.js} +2 -2
  35. package/dist/{reaction-events-CiARZfjk.js → reaction-events-Cfvkp-A-.js} +2 -2
  36. package/dist/{resolve-targets-BbzYe9Qi.js → resolve-targets-ZSM4KKln.js} +1 -1
  37. package/dist/{resolver.runtime-BWFMWEsg.js → resolver.runtime-m_D8JSm3.js} +1 -1
  38. package/dist/runtime-api.js +1 -1
  39. package/dist/runtime-heavy-api.js +1 -1
  40. package/dist/{sdk-DXWmb94u.js → sdk-BLBGvKEe.js} +1 -1
  41. package/dist/{send-Df-pDuG6.js → send-D651usmb.js} +2 -2
  42. package/dist/{setup-bootstrap-DXWxzR7A.js → setup-bootstrap-DT2Gj9hX.js} +3 -3
  43. package/dist/{setup-core-B5X7HxAP.js → setup-core-C-uKN68n.js} +5 -5
  44. package/dist/{setup-dm-policy-Ca3jA4YW.js → setup-dm-policy-0_kFUfW4.js} +1 -1
  45. package/dist/setup-plugin-api.js +4 -4
  46. package/dist/{setup-surface-DuRQrrpU.js → setup-surface-KzA9__US.js} +8 -8
  47. package/dist/{shared-CkbpEI5j.js → shared-DarXfhzC.js} +2 -2
  48. package/dist/test-api.js +2 -2
  49. package/dist/{thread-bindings--P1UYe7t.js → thread-bindings-DHUszTA0.js} +1 -1
  50. package/dist/{tool-actions.runtime-AFGhzK--.js → tool-actions.runtime-Bn8bvkQN.js} +7 -7
  51. package/dist/{verification-BbGdzYQl.js → verification-BJT2k9TI.js} +1 -1
  52. package/openclaw.plugin.json +96 -0
  53. package/package.json +4 -4
  54. package/dist/probe.runtime-NE73hi9o.js +0 -3
@@ -1,28 +1,28 @@
1
1
  import { t as isMatrixQualifiedUserId } from "./target-ids-80nQ2gql.js";
2
- import { a as resolveMatrixAccountConfig, i as resolveMatrixAccountAllowlistConfig } from "./account-config-D2W-V1eQ.js";
2
+ import { a as resolveMatrixAccountConfig, i as resolveMatrixAccountAllowlistConfig } from "./account-config-LVxGiX7e.js";
3
3
  import { t as getMatrixRuntime } from "./runtime-Dog86njy.js";
4
- import { n as resolveConfiguredMatrixBotUserIds } from "./accounts-Bm90Rzvp.js";
4
+ import { n as resolveConfiguredMatrixBotUserIds } from "./accounts--0L_EuMK.js";
5
5
  import { n as normalizeMatrixUserId, r as resolveMatrixAllowListMatch, t as normalizeMatrixAllowList } from "./allowlist-sTzpCn5d.js";
6
6
  import { r as isMatrixNotFoundError, t as formatMatrixErrorMessage } from "./errors-CTcpEDq-.js";
7
7
  import { a as canonicalizeAllowlistWithResolvedIds, c as formatLocationText, d as logTypingFailure, f as patchAllowlistUsersInConfigEntries, i as buildAllowlistResolutionSummary, l as getAgentScopedMediaLocalRoots, m as toLocationContext, n as resolveMatrixRoomConfig, o as createReplyPrefixOptions, p as summarizeMapping, r as addAllowlistUserEntriesFromConfigEntry, s as createTypingCallbacks, t as resolveMatrixStoredSessionMeta, u as logInboundDrop } from "./session-store-metadata-DQXjgNLt.js";
8
8
  import { i as resolveMatrixStateFilePath } from "./storage-tC3ujLiW.js";
9
- import { a as sendMessageMatrix, g as isPollStartType, h as isPollEventType, p as formatPollAsText, t as chunkMatrixText, v as parsePollStartContent } from "./send-Df-pDuG6.js";
9
+ import { a as sendMessageMatrix, g as isPollStartType, h as isPollEventType, p as formatPollAsText, t as chunkMatrixText, v as parsePollStartContent } from "./send-D651usmb.js";
10
10
  import { i as promoteMatrixDirectRoomCandidate, s as MATRIX_OPENCLAW_FINALIZED_PREVIEW_KEY } from "./direct-management--Y8ypgLv.js";
11
11
  import { i as isStrictDirectMembership, n as hasDirectMatrixMemberFlag, o as readJoinedMatrixMembers } from "./direct-room-XkutHjES.js";
12
- import { t as createMatrixThreadBindingManager } from "./thread-bindings--P1UYe7t.js";
12
+ import { t as createMatrixThreadBindingManager } from "./thread-bindings-DHUszTA0.js";
13
13
  import { t as createAsyncLock } from "./async-lock-uQfhfQIY.js";
14
14
  import { n as LogService } from "./logger-CnZRVrux.js";
15
15
  import { i as isMatrixMediaSizeLimitError, r as MatrixMediaSizeLimitError } from "./http-client-C7AeVJay.js";
16
16
  import { i as throwIfMatrixStartupAborted, r as isMatrixStartupAbortError } from "./startup-abort-56edvmbM.js";
17
17
  import { n as isMatrixReadySyncState, r as isMatrixTerminalSyncState, t as isMatrixDisconnectedSyncState } from "./sync-state-C_beeevA.js";
18
- import { a as resolveMatrixMessageBody, i as resolveMatrixMessageAttachment, n as formatMatrixMediaUnavailableText, r as formatMatrixMessageText, s as fetchMatrixPollSnapshot, t as formatMatrixMediaTooLargeText } from "./media-text-psyGloYl.js";
18
+ import { a as resolveMatrixMessageBody, i as resolveMatrixMessageAttachment, n as formatMatrixMediaUnavailableText, r as formatMatrixMessageText, s as fetchMatrixPollSnapshot, t as formatMatrixMediaTooLargeText } from "./media-text-BLL8-Dr3.js";
19
19
  import { n as setActiveMatrixClient } from "./active-client-uhlxdhEy.js";
20
20
  import { t as isBunRuntime } from "./runtime-C6X4h_SJ.js";
21
- import { n as resolveMatrixAuth, r as resolveMatrixAuthContext, t as backfillMatrixAuthDeviceIdAfterStartup } from "./config-BR4uLzNs.js";
22
- import { i as resolveSharedMatrixClient, n as releaseSharedClientInstance } from "./shared-CkbpEI5j.js";
23
- import "./client-CyxIx4Fv.js";
21
+ import { n as resolveMatrixAuth, r as resolveMatrixAuthContext, t as backfillMatrixAuthDeviceIdAfterStartup } from "./config-xD5Y8nFT.js";
22
+ import { i as resolveSharedMatrixClient, n as releaseSharedClientInstance } from "./shared-DarXfhzC.js";
23
+ import "./client-DBDvsx0D.js";
24
24
  import { d as resolveDefaultGroupPolicy, h as warnMissingProviderGroupPolicyFallbackOnce, m as resolveThreadBindingMaxAgeMsForChannel, p as resolveThreadBindingIdleTimeoutMsForChannel, t as GROUP_POLICY_BLOCKED_LABEL, u as resolveAllowlistProviderRuntimeGroupPolicy } from "./runtime-api-DTKcXOhp.js";
25
- import { t as resolveMatrixTargets } from "./resolve-targets-BbzYe9Qi.js";
25
+ import { t as resolveMatrixTargets } from "./resolve-targets-ZSM4KKln.js";
26
26
  import { t as formatMatrixEncryptedEventDisabledWarning } from "./encryption-guidance-BPi3A_m3.js";
27
27
  import { a as EventType, i as resolveMatrixThreadRouting, n as resolveMatrixReplyToEventId, o as RelationType, r as resolveMatrixThreadRootId, t as resolveMatrixInboundRoute } from "./route-D6rg-iXN.js";
28
28
  import { normalizeLowercaseStringOrEmpty, normalizeOptionalString, normalizeStringifiedOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
@@ -37,8 +37,9 @@ import { waitUntilAbort } from "openclaw/plugin-sdk/channel-lifecycle";
37
37
  import { registerChannelRuntimeContext } from "openclaw/plugin-sdk/channel-runtime-context";
38
38
  import { isDangerousNameMatchingEnabled } from "openclaw/plugin-sdk/dangerous-name-runtime";
39
39
  import { createChannelIngressResolver, defineStableChannelIngressIdentity } from "openclaw/plugin-sdk/channel-ingress-runtime";
40
- import { createChannelProgressDraftGate, formatChannelProgressDraftLine, formatChannelProgressDraftLineForEntry, formatChannelProgressDraftText, isChannelProgressDraftWorkToolName, resolveChannelProgressDraftMaxLines } from "openclaw/plugin-sdk/channel-streaming";
40
+ import { buildChannelProgressDraftLineForEntry, createChannelProgressDraftGate, formatChannelProgressDraftLine, formatChannelProgressDraftLineForEntry, formatChannelProgressDraftText, isChannelProgressDraftWorkToolName, mergeChannelProgressDraftLine, normalizeChannelProgressDraftLineIdentity, resolveChannelProgressDraftMaxLines } from "openclaw/plugin-sdk/channel-streaming";
41
41
  import { evaluateSupplementalContextVisibility, resolveChannelContextVisibilityMode } from "openclaw/plugin-sdk/context-visibility-runtime";
42
+ import { mergePairLoopGuardConfig } from "openclaw/plugin-sdk/pair-loop-guard-runtime";
42
43
  import { resolvePinnedMainDmOwnerFromAllowlist } from "openclaw/plugin-sdk/security-runtime";
43
44
  import { escapeRegExp } from "openclaw/plugin-sdk/text-utility-runtime";
44
45
  import { createConnectedChannelStatusPatch, createTransportActivityStatusPatch } from "openclaw/plugin-sdk/gateway-runtime";
@@ -1387,6 +1388,13 @@ function resolveMatrixAckReactionConfig(params) {
1387
1388
  }
1388
1389
  //#endregion
1389
1390
  //#region extensions/matrix/src/matrix/monitor/location.ts
1391
+ function decodeGeoUriParamValue(value) {
1392
+ try {
1393
+ return decodeURIComponent(value);
1394
+ } catch {
1395
+ return value;
1396
+ }
1397
+ }
1390
1398
  function parseGeoUri(value) {
1391
1399
  const trimmed = value.trim();
1392
1400
  if (!trimmed) return null;
@@ -1407,7 +1415,7 @@ function parseGeoUri(value) {
1407
1415
  const key = normalizeLowercaseStringOrEmpty(rawKey);
1408
1416
  if (!key) continue;
1409
1417
  const valuePart = rawValue.trim();
1410
- params.set(key, valuePart ? decodeURIComponent(valuePart) : "");
1418
+ params.set(key, valuePart ? decodeGeoUriParamValue(valuePart) : "");
1411
1419
  }
1412
1420
  const accuracyRaw = params.get("u");
1413
1421
  const accuracy = accuracyRaw ? Number.parseFloat(accuracyRaw) : void 0;
@@ -2001,7 +2009,7 @@ let sessionBindingRuntimePromise;
2001
2009
  let matrixReactionEventsPromise;
2002
2010
  let matrixDraftStreamPromise;
2003
2011
  function loadMatrixSendModule() {
2004
- matrixSendModulePromise ??= import("./send-Df-pDuG6.js").then((n) => n.l);
2012
+ matrixSendModulePromise ??= import("./send-D651usmb.js").then((n) => n.l);
2005
2013
  return matrixSendModulePromise;
2006
2014
  }
2007
2015
  function loadAcpBindingRuntime() {
@@ -2013,11 +2021,11 @@ function loadSessionBindingRuntime() {
2013
2021
  return sessionBindingRuntimePromise;
2014
2022
  }
2015
2023
  function loadMatrixReactionEvents() {
2016
- matrixReactionEventsPromise ??= import("./reaction-events-CiARZfjk.js");
2024
+ matrixReactionEventsPromise ??= import("./reaction-events-Cfvkp-A-.js");
2017
2025
  return matrixReactionEventsPromise;
2018
2026
  }
2019
2027
  function loadMatrixDraftStream() {
2020
- matrixDraftStreamPromise ??= import("./draft-stream-D_FlbmCh.js");
2028
+ matrixDraftStreamPromise ??= import("./draft-stream-B-hyLmMw.js");
2021
2029
  return matrixDraftStreamPromise;
2022
2030
  }
2023
2031
  const MAX_TRACKED_PAIRING_REPLY_SENDERS = 512;
@@ -2122,7 +2130,7 @@ function formatMatrixToolProgressMarkdownCode(text) {
2122
2130
  return `\`${(text.length <= MATRIX_TOOL_PROGRESS_MAX_CHARS ? text : `${text.slice(0, MATRIX_TOOL_PROGRESS_MAX_CHARS - 1).trimEnd()}...`).replaceAll("`", "'")}\``;
2123
2131
  }
2124
2132
  function createMatrixRoomMessageHandler(params) {
2125
- const { client, core, cfg, accountId, runtime, logger, logVerboseMessage, allowFromResolvedEntries = [], groupAllowFromResolvedEntries = [], roomsConfig, accountAllowBots, configuredBotUserIds = /* @__PURE__ */ new Set(), groupPolicy, replyToMode, threadReplies, dmThreadReplies, dmSessionScope, streaming, previewToolProgressEnabled, blockStreamingEnabled, dmEnabled, dmPolicy, textLimit, mediaMaxBytes, historyLimit, startupMs, startupGraceMs, dropPreStartupMessages, inboundDeduper, directTracker, getRoomInfo, getMemberDisplayName, needsRoomAliasesForConfig, resolveLiveUserAllowlist = resolveMatrixMonitorLiveUserAllowlist } = params;
2133
+ const { client, core, cfg, accountId, accountConfig, runtime, logger, logVerboseMessage, allowFromResolvedEntries = [], groupAllowFromResolvedEntries = [], roomsConfig, accountAllowBots, configuredBotUserIds = /* @__PURE__ */ new Set(), groupPolicy, replyToMode, threadReplies, dmThreadReplies, dmSessionScope, streaming, previewToolProgressEnabled, blockStreamingEnabled, dmEnabled, dmPolicy, textLimit, mediaMaxBytes, historyLimit, startupMs, startupGraceMs, dropPreStartupMessages, inboundDeduper, directTracker, getRoomInfo, getMemberDisplayName, needsRoomAliasesForConfig, resolveLiveUserAllowlist = resolveMatrixMonitorLiveUserAllowlist } = params;
2126
2134
  const contextVisibilityMode = resolveChannelContextVisibilityMode({
2127
2135
  cfg,
2128
2136
  channel: "matrix",
@@ -2311,6 +2319,16 @@ function createMatrixRoomMessageHandler(params) {
2311
2319
  await commitInboundEventIfClaimed();
2312
2320
  return;
2313
2321
  }
2322
+ const botLoopProtection = isConfiguredBotSender && senderId !== selfUserId ? {
2323
+ scopeId: accountId,
2324
+ conversationId: roomId,
2325
+ senderId,
2326
+ receiverId: selfUserId,
2327
+ config: mergePairLoopGuardConfig(accountConfig?.botLoopProtection, roomConfig?.botLoopProtection),
2328
+ defaultsConfig: cfg.channels?.defaults?.botLoopProtection,
2329
+ defaultEnabled: true,
2330
+ nowMs: eventTs ?? void 0
2331
+ } : void 0;
2314
2332
  if (isRoom && roomConfig && !roomConfigInfo?.allowed) {
2315
2333
  logVerboseMessage(`matrix: room disabled room=${roomId} (${roomMatchMeta})`);
2316
2334
  await commitInboundEventIfClaimed();
@@ -2659,6 +2677,7 @@ function createMatrixRoomMessageHandler(params) {
2659
2677
  triggerSnapshot: preparedTrigger,
2660
2678
  threadRootId,
2661
2679
  thread,
2680
+ botLoopProtection,
2662
2681
  effectiveGroupAllowFrom,
2663
2682
  effectiveRoomUsers
2664
2683
  };
@@ -2675,7 +2694,7 @@ function createMatrixRoomMessageHandler(params) {
2675
2694
  return await continueIngress(prefix);
2676
2695
  })();
2677
2696
  if (!resolvedIngressResult) return;
2678
- const { route: _route, hasExplicitSessionBinding, roomConfig, isDirectMessage, isRoom, shouldRequireMention, wasMentioned, shouldBypassMention, canDetectMention, commandAuthorized, inboundHistory, senderName, bodyText, commandBodyText, media, locationPayload, messageId, triggerSnapshot, threadRootId, thread, effectiveGroupAllowFrom, effectiveRoomUsers } = resolvedIngressResult;
2697
+ const { route: _route, hasExplicitSessionBinding, roomConfig, isDirectMessage, isRoom, shouldRequireMention, wasMentioned, shouldBypassMention, canDetectMention, commandAuthorized, inboundHistory, senderName, bodyText, commandBodyText, media, locationPayload, messageId, triggerSnapshot, threadRootId, thread, botLoopProtection, effectiveGroupAllowFrom, effectiveRoomUsers } = resolvedIngressResult;
2679
2698
  const replyToEventId = resolveMatrixReplyToEventId(event.content);
2680
2699
  const threadTarget = thread.threadId;
2681
2700
  const isRoomContextSenderAllowed = (contextSenderId) => {
@@ -2906,11 +2925,13 @@ function createMatrixRoomMessageHandler(params) {
2906
2925
  const pushPreviewToolProgress = async (line, options) => {
2907
2926
  if (!draftStream) return;
2908
2927
  if (options?.toolName !== void 0 && !isChannelProgressDraftWorkToolName(options.toolName)) return;
2909
- const normalized = line?.replace(/\s+/g, " ").trim();
2928
+ const normalized = normalizeChannelProgressDraftLineIdentity(line);
2929
+ const progressLine = typeof line === "object" && line !== void 0 ? line : normalized;
2910
2930
  if (!progressDraftStreaming) {
2911
2931
  if (!shouldStreamPreviewToolProgress || previewToolProgressSuppressed || !normalized) return;
2912
- if (previewToolProgressLines.at(-1) === normalized) return;
2913
- previewToolProgressLines = [...previewToolProgressLines, normalized].slice(-resolveChannelProgressDraftMaxLines(progressConfigEntry));
2932
+ const nextLines = mergeChannelProgressDraftLine(previewToolProgressLines, progressLine, { maxLines: resolveChannelProgressDraftMaxLines(progressConfigEntry) });
2933
+ if (nextLines === previewToolProgressLines) return;
2934
+ previewToolProgressLines = nextLines;
2914
2935
  draftStream.update(formatChannelProgressDraftText({
2915
2936
  entry: progressConfigEntry,
2916
2937
  lines: previewToolProgressLines,
@@ -2920,9 +2941,7 @@ function createMatrixRoomMessageHandler(params) {
2920
2941
  }));
2921
2942
  return;
2922
2943
  }
2923
- if (shouldStreamPreviewToolProgress && !previewToolProgressSuppressed && normalized) {
2924
- if (previewToolProgressLines.at(-1) !== normalized) previewToolProgressLines = [...previewToolProgressLines, normalized].slice(-resolveChannelProgressDraftMaxLines(progressConfigEntry));
2925
- }
2944
+ if (shouldStreamPreviewToolProgress && !previewToolProgressSuppressed && normalized) previewToolProgressLines = mergeChannelProgressDraftLine(previewToolProgressLines, progressLine, { maxLines: resolveChannelProgressDraftMaxLines(progressConfigEntry) });
2926
2945
  const alreadyStarted = progressDraftGate.hasStarted;
2927
2946
  await progressDraftGate.noteWork();
2928
2947
  if (alreadyStarted && progressDraftGate.hasStarted) renderProgressDraft();
@@ -2952,8 +2971,9 @@ function createMatrixRoomMessageHandler(params) {
2952
2971
  }, payload.detailMode ? { detailMode: payload.detailMode } : void 0), { toolName });
2953
2972
  },
2954
2973
  onItemEvent: async (payload) => {
2955
- await pushPreviewToolProgress(formatChannelProgressDraftLineForEntry(progressConfigEntry, {
2974
+ await pushPreviewToolProgress(buildChannelProgressDraftLineForEntry(progressConfigEntry, {
2956
2975
  event: "item",
2976
+ itemId: payload.itemId,
2957
2977
  itemKind: payload.kind,
2958
2978
  title: payload.title,
2959
2979
  name: payload.name,
@@ -3257,6 +3277,7 @@ function createMatrixRoomMessageHandler(params) {
3257
3277
  storePath,
3258
3278
  ctxPayload,
3259
3279
  recordInboundSession: core.channel.session.recordInboundSession,
3280
+ botLoopProtection,
3260
3281
  record: {
3261
3282
  updateLastRoute: isDirectMessage ? {
3262
3283
  sessionKey: _route.mainSessionKey,
@@ -3336,7 +3357,10 @@ function createMatrixRoomMessageHandler(params) {
3336
3357
  })
3337
3358
  }
3338
3359
  });
3339
- if (!turnResult.dispatched) return;
3360
+ if (!turnResult.dispatched) {
3361
+ if (turnResult.admission.kind === "drop" && turnResult.admission.reason === "bot-loop-protection") await commitInboundEventIfClaimed();
3362
+ return;
3363
+ }
3340
3364
  const { dispatchResult } = turnResult;
3341
3365
  const { queuedFinal, counts } = dispatchResult;
3342
3366
  if (finalReplyDeliveryFailed) {
@@ -3668,7 +3692,7 @@ function createMatrixRoomInfoResolver(client) {
3668
3692
  let matrixStartupMaintenanceDepsPromise;
3669
3693
  async function loadMatrixStartupMaintenanceDeps() {
3670
3694
  matrixStartupMaintenanceDepsPromise ??= Promise.all([
3671
- import("./config-update-wZX-HLMn.js").then((n) => n.t),
3695
+ import("./config-update-BBkpLB9o.js").then((n) => n.t),
3672
3696
  import("./device-health-UVYpbA_W.js"),
3673
3697
  import("./profile-BlHu0wDX.js").then((n) => n.n),
3674
3698
  import("./legacy-crypto-restore-Biw-w2ng.js"),
@@ -3,7 +3,7 @@ import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runti
3
3
  //#region extensions/matrix/src/plugin-entry.runtime.ts
4
4
  let matrixVerificationRuntimePromise;
5
5
  function loadMatrixVerificationRuntime() {
6
- matrixVerificationRuntimePromise ??= import("./verification-BbGdzYQl.js").then((n) => n.y);
6
+ matrixVerificationRuntimePromise ??= import("./verification-BJT2k9TI.js").then((n) => n.y);
7
7
  return matrixVerificationRuntimePromise;
8
8
  }
9
9
  function sendError(respond, err) {
@@ -0,0 +1,3 @@
1
+ import { t as createMatrixClient } from "./create-client-ChlpNpAA.js";
2
+ import "./client-DBDvsx0D.js";
3
+ export { createMatrixClient };
@@ -1,7 +1,7 @@
1
1
  import { t as getMatrixRuntime } from "./runtime-Dog86njy.js";
2
- import { n as resolveMatrixConfigPath, r as updateMatrixAccountConfig } from "./config-update-wZX-HLMn.js";
2
+ import { n as resolveMatrixConfigPath, r as updateMatrixAccountConfig } from "./config-update-BBkpLB9o.js";
3
3
  import { r as syncMatrixOwnProfile } from "./profile-BlHu0wDX.js";
4
- import { n as withResolvedActionClient } from "./client-DzjShjVN.js";
4
+ import { n as withResolvedActionClient } from "./client-DrmLRQnw.js";
5
5
  import { normalizeAccountId } from "openclaw/plugin-sdk/account-id";
6
6
  //#region extensions/matrix/src/matrix/actions/profile.ts
7
7
  async function updateMatrixOwnProfile(opts = {}) {
@@ -1,4 +1,4 @@
1
- import { a as resolveMatrixAccountConfig } from "./account-config-D2W-V1eQ.js";
1
+ import { a as resolveMatrixAccountConfig } from "./account-config-LVxGiX7e.js";
2
2
  import { a as extractMatrixReactionAnnotation } from "./reaction-common-ejrL19w-.js";
3
3
  import { a as unregisterMatrixApprovalReactionTarget, i as resolveMatrixApprovalReactionTargetWithPersistence } from "./approval-reactions-o2_tuH8D.js";
4
4
  import { i as resolveMatrixThreadRouting, r as resolveMatrixThreadRootId, t as resolveMatrixInboundRoute } from "./route-D6rg-iXN.js";
@@ -7,7 +7,7 @@ import { getSessionBindingService } from "openclaw/plugin-sdk/session-binding-ru
7
7
  let approvalReactionAuthPromise;
8
8
  let execApprovalResolverPromise;
9
9
  function loadApprovalReactionAuth() {
10
- approvalReactionAuthPromise ??= import("./approval-reaction-auth-DbcA1gGd.js");
10
+ approvalReactionAuthPromise ??= import("./approval-reaction-auth-BY5VFY-q.js");
11
11
  return approvalReactionAuthPromise;
12
12
  }
13
13
  function loadExecApprovalResolver() {
@@ -1,6 +1,6 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-DUslC3ob.js";
2
2
  import { n as normalizeMatrixMessagingTarget, t as isMatrixQualifiedUserId } from "./target-ids-80nQ2gql.js";
3
- import { n as listMatrixDirectoryGroupsLive, r as listMatrixDirectoryPeersLive } from "./directory-live-Bn66SRSD.js";
3
+ import { n as listMatrixDirectoryGroupsLive, r as listMatrixDirectoryPeersLive } from "./directory-live-Btsr0yok.js";
4
4
  import { normalizeOptionalLowercaseString } from "openclaw/plugin-sdk/string-coerce-runtime";
5
5
  //#region extensions/matrix/src/resolve-targets.ts
6
6
  var resolve_targets_exports = /* @__PURE__ */ __exportAll({ resolveMatrixTargets: () => resolveMatrixTargets });
@@ -1,4 +1,4 @@
1
- import { t as resolveMatrixTargets } from "./resolve-targets-BbzYe9Qi.js";
1
+ import { t as resolveMatrixTargets } from "./resolve-targets-ZSM4KKln.js";
2
2
  //#region extensions/matrix/src/resolver.runtime.ts
3
3
  const matrixResolverRuntime = { resolveMatrixTargets };
4
4
  //#endregion
@@ -3,7 +3,7 @@ import { a as resolveMatrixDefaultOrOnlyAccountId, i as resolveMatrixChannelConf
3
3
  import { n as listMatrixEnvAccountIds, r as resolveMatrixEnvAccountToken, t as getMatrixScopedEnvVarNames } from "./env-vars-C7uQCTKn.js";
4
4
  import { r as setMatrixRuntime } from "./runtime-Dog86njy.js";
5
5
  import { a as resolveMatrixCredentialsPath, c as resolveMatrixLegacyFlatStoreRoot, i as resolveMatrixCredentialsFilename, l as sanitizeMatrixPathSegment, n as resolveMatrixAccountStorageRoot, o as resolveMatrixHomeserverKey, r as resolveMatrixCredentialsDir, s as resolveMatrixLegacyFlatStoragePaths, t as hashMatrixAccessToken } from "./storage-paths-BJLdnCjV.js";
6
- import { n as ensureMatrixSdkInstalled, r as isMatrixSdkAvailable } from "./deps-CU5W9Ixu.js";
6
+ import { n as ensureMatrixSdkInstalled, r as isMatrixSdkAvailable } from "./deps-DR0MIYrW.js";
7
7
  import { assertHttpUrlTargetsPrivateNetwork, closeDispatcher, createPinnedDispatcher, resolvePinnedHostnameWithPolicy, ssrfPolicyFromAllowPrivateNetwork, ssrfPolicyFromDangerouslyAllowPrivateNetwork } from "openclaw/plugin-sdk/ssrf-runtime";
8
8
  import { writeJsonFileAtomically } from "openclaw/plugin-sdk/json-store";
9
9
  import { formatZonedTimestamp } from "openclaw/plugin-sdk/time-runtime";
@@ -1,3 +1,3 @@
1
- import { a as detectLegacyMatrixCrypto, i as autoPrepareLegacyMatrixCrypto, n as hasPendingMatrixMigration, o as autoMigrateLegacyMatrixState, r as resolveMatrixMigrationStatus, s as detectLegacyMatrixState, t as hasActionableMatrixMigration } from "./matrix-migration.runtime-DfjNMeoX.js";
1
+ import { a as detectLegacyMatrixCrypto, i as autoPrepareLegacyMatrixCrypto, n as hasPendingMatrixMigration, o as autoMigrateLegacyMatrixState, r as resolveMatrixMigrationStatus, s as detectLegacyMatrixState, t as hasActionableMatrixMigration } from "./matrix-migration.runtime-CDasos7a.js";
2
2
  import { t as maybeCreateMatrixMigrationSnapshot } from "./migration-snapshot-backup-DaCHTp8C.js";
3
3
  export { autoMigrateLegacyMatrixState, autoPrepareLegacyMatrixCrypto, detectLegacyMatrixCrypto, detectLegacyMatrixState, hasActionableMatrixMigration, hasPendingMatrixMigration, maybeCreateMatrixMigrationSnapshot, resolveMatrixMigrationStatus };
@@ -290,7 +290,7 @@ function createMatrixExplicitBootstrapOptions(params) {
290
290
  let loadedMatrixCryptoRuntime = null;
291
291
  let matrixCryptoRuntimePromise = null;
292
292
  async function loadMatrixCryptoRuntime() {
293
- matrixCryptoRuntimePromise ??= import("./crypto-runtime-DS6R8y_n.js").then((runtime) => {
293
+ matrixCryptoRuntimePromise ??= import("./crypto-runtime-BevaUxax.js").then((runtime) => {
294
294
  loadedMatrixCryptoRuntime = runtime;
295
295
  return runtime;
296
296
  });
@@ -1,6 +1,6 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-DUslC3ob.js";
2
2
  import { r as normalizeMatrixResolvableTarget, t as isMatrixQualifiedUserId } from "./target-ids-80nQ2gql.js";
3
- import { a as resolveMatrixAccountConfig } from "./account-config-D2W-V1eQ.js";
3
+ import { a as resolveMatrixAccountConfig } from "./account-config-LVxGiX7e.js";
4
4
  import { t as getMatrixRuntime } from "./runtime-Dog86njy.js";
5
5
  import { r as buildMatrixReactionContent } from "./reaction-common-ejrL19w-.js";
6
6
  import { c as MSC4357_LIVE_KEY, l as MsgType, n as inspectMatrixDirectRooms, o as EventType, r as persistMatrixDirectRoomMapping, u as RelationType } from "./direct-management--Y8ypgLv.js";
@@ -230,7 +230,7 @@ function buildPollResponseContent(pollEventId, answerIds) {
230
230
  //#region extensions/matrix/src/matrix/send/client.ts
231
231
  let matrixSendClientRuntimePromise = null;
232
232
  async function loadMatrixSendClientRuntime() {
233
- matrixSendClientRuntimePromise ??= import("./client-bootstrap-Am_ZEH3x.js").then((n) => n.t);
233
+ matrixSendClientRuntimePromise ??= import("./client-bootstrap-Ba68NvZB.js").then((n) => n.t);
234
234
  return await matrixSendClientRuntimePromise;
235
235
  }
236
236
  function resolveMediaMaxBytes(accountId, cfg) {
@@ -1,7 +1,7 @@
1
- import { a as resolveMatrixAccountConfig, n as hasExplicitMatrixAccountConfig } from "./account-config-D2W-V1eQ.js";
2
- import "./accounts-Bm90Rzvp.js";
1
+ import { a as resolveMatrixAccountConfig, n as hasExplicitMatrixAccountConfig } from "./account-config-LVxGiX7e.js";
2
+ import "./accounts--0L_EuMK.js";
3
3
  import { t as formatMatrixErrorMessage } from "./errors-CTcpEDq-.js";
4
- import { n as bootstrapMatrixVerification } from "./verification-BbGdzYQl.js";
4
+ import { n as bootstrapMatrixVerification } from "./verification-BJT2k9TI.js";
5
5
  //#region extensions/matrix/src/setup-bootstrap.ts
6
6
  async function maybeBootstrapNewEncryptedMatrixAccount(params) {
7
7
  const accountConfig = resolveMatrixAccountConfig({
@@ -1,8 +1,8 @@
1
- import { a as resolveMatrixAccountConfig } from "./account-config-D2W-V1eQ.js";
2
- import { r as resolveDefaultMatrixAccountId } from "./accounts-Bm90Rzvp.js";
3
- import { i as validateMatrixSetupInput, n as applyMatrixSetupAccountConfig, t as resolveMatrixSetupDmAllowFrom } from "./setup-dm-policy-Ca3jA4YW.js";
1
+ import { a as resolveMatrixAccountConfig } from "./account-config-LVxGiX7e.js";
2
+ import { r as resolveDefaultMatrixAccountId } from "./accounts--0L_EuMK.js";
3
+ import { i as validateMatrixSetupInput, n as applyMatrixSetupAccountConfig, t as resolveMatrixSetupDmAllowFrom } from "./setup-dm-policy-0_kFUfW4.js";
4
4
  import { t as resolveMatrixConfigFieldPath } from "./config-paths-nsVaysCu.js";
5
- import { r as updateMatrixAccountConfig } from "./config-update-wZX-HLMn.js";
5
+ import { r as updateMatrixAccountConfig } from "./config-update-BBkpLB9o.js";
6
6
  import { DEFAULT_ACCOUNT_ID, normalizeAccountId, prepareScopedSetupConfig } from "openclaw/plugin-sdk/setup";
7
7
  //#region extensions/matrix/src/setup-core.ts
8
8
  const channel = "matrix";
@@ -103,7 +103,7 @@ const matrixSetupAdapter = {
103
103
  input
104
104
  }),
105
105
  afterAccountConfigWritten: async ({ previousCfg, cfg, accountId, runtime }) => {
106
- const { runMatrixSetupBootstrapAfterConfigWrite } = await import("./setup-bootstrap-DXWxzR7A.js");
106
+ const { runMatrixSetupBootstrapAfterConfigWrite } = await import("./setup-bootstrap-DT2Gj9hX.js");
107
107
  await runMatrixSetupBootstrapAfterConfigWrite({
108
108
  previousCfg,
109
109
  cfg,
@@ -1,5 +1,5 @@
1
1
  import { r as resolveMatrixEnvAuthReadiness } from "./env-auth-BJqGI8M6.js";
2
- import { r as updateMatrixAccountConfig } from "./config-update-wZX-HLMn.js";
2
+ import { r as updateMatrixAccountConfig } from "./config-update-BBkpLB9o.js";
3
3
  import { t as isSupportedMatrixAvatarSource } from "./profile-BlHu0wDX.js";
4
4
  import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
5
5
  import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/routing";
@@ -1,6 +1,6 @@
1
- import { i as resolveMatrixAccount } from "./accounts-Bm90Rzvp.js";
2
- import { r as matrixConfigAdapter, t as MatrixChannelConfigSchema } from "./config-schema-B975BYl0.js";
3
- import { n as matrixSetupAdapter, t as createMatrixSetupWizardProxy } from "./setup-core-B5X7HxAP.js";
1
+ import { i as resolveMatrixAccount } from "./accounts--0L_EuMK.js";
2
+ import { r as matrixConfigAdapter, t as MatrixChannelConfigSchema } from "./config-schema-DOKrNEs_.js";
3
+ import { n as matrixSetupAdapter, t as createMatrixSetupWizardProxy } from "./setup-core-C-uKN68n.js";
4
4
  import { describeAccountSnapshot } from "openclaw/plugin-sdk/account-helpers";
5
5
  const matrixSetupPlugin = {
6
6
  id: "matrix",
@@ -14,7 +14,7 @@ const matrixSetupPlugin = {
14
14
  order: 70,
15
15
  quickstartAllowFrom: true
16
16
  },
17
- setupWizard: createMatrixSetupWizardProxy(async () => ({ matrixSetupWizard: (await import("./setup-surface-DuRQrrpU.js").then((n) => n.t)).matrixSetupWizard })),
17
+ setupWizard: createMatrixSetupWizardProxy(async () => ({ matrixSetupWizard: (await import("./setup-surface-KzA9__US.js").then((n) => n.t)).matrixSetupWizard })),
18
18
  setup: matrixSetupAdapter,
19
19
  capabilities: {
20
20
  chatTypes: [
@@ -1,13 +1,13 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-DUslC3ob.js";
2
2
  import { n as requiresExplicitMatrixDefaultAccount } from "./account-selection-BWwIruri.js";
3
- import { a as resolveMatrixAccountConfig } from "./account-config-D2W-V1eQ.js";
3
+ import { a as resolveMatrixAccountConfig } from "./account-config-LVxGiX7e.js";
4
4
  import { r as resolveMatrixEnvAuthReadiness } from "./env-auth-BJqGI8M6.js";
5
- import { i as resolveMatrixAccount, r as resolveDefaultMatrixAccountId, t as listMatrixAccountIds } from "./accounts-Bm90Rzvp.js";
6
- import { r as moveSingleMatrixAccountConfigToNamedAccount, t as resolveMatrixSetupDmAllowFrom } from "./setup-dm-policy-Ca3jA4YW.js";
5
+ import { i as resolveMatrixAccount, r as resolveDefaultMatrixAccountId, t as listMatrixAccountIds } from "./accounts--0L_EuMK.js";
6
+ import { r as moveSingleMatrixAccountConfigToNamedAccount, t as resolveMatrixSetupDmAllowFrom } from "./setup-dm-policy-0_kFUfW4.js";
7
7
  import { t as resolveMatrixConfigFieldPath } from "./config-paths-nsVaysCu.js";
8
- import { r as updateMatrixAccountConfig } from "./config-update-wZX-HLMn.js";
8
+ import { r as updateMatrixAccountConfig } from "./config-update-BBkpLB9o.js";
9
9
  import { n as validateMatrixHomeserverUrl, r as isPrivateOrLoopbackHost, t as resolveValidatedMatrixHomeserverUrl } from "./url-validation-DiK9j7jz.js";
10
- import { n as ensureMatrixSdkInstalled, r as isMatrixSdkAvailable } from "./deps-CU5W9Ixu.js";
10
+ import { n as ensureMatrixSdkInstalled, r as isMatrixSdkAvailable } from "./deps-DR0MIYrW.js";
11
11
  import { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/account-id";
12
12
  import { normalizeLowercaseStringOrEmpty, normalizeOptionalString, normalizeStringifiedOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
13
13
  import { formatDocsLink, hasConfiguredSecretInput, mergeAllowFromEntries, normalizeAccountId as normalizeAccountId$1, promptAccountId, promptChannelAccessConfig, splitSetupEntries } from "openclaw/plugin-sdk/setup";
@@ -107,7 +107,7 @@ async function promptMatrixAllowFrom(params) {
107
107
  pending.push(part);
108
108
  }
109
109
  if (pending.length > 0) {
110
- const { resolveMatrixTargets } = await import("./resolve-targets-BbzYe9Qi.js").then((n) => n.n);
110
+ const { resolveMatrixTargets } = await import("./resolve-targets-ZSM4KKln.js").then((n) => n.n);
111
111
  const results = await resolveMatrixTargets({
112
112
  cfg,
113
113
  accountId,
@@ -235,7 +235,7 @@ async function configureMatrixAccessPrompts(params) {
235
235
  resolvedIds.push(cleaned);
236
236
  continue;
237
237
  }
238
- const { listMatrixDirectoryGroupsLive } = await import("./directory-live-Bn66SRSD.js").then((n) => n.t);
238
+ const { listMatrixDirectoryGroupsLive } = await import("./directory-live-Btsr0yok.js").then((n) => n.t);
239
239
  const matches = await listMatrixDirectoryGroupsLive({
240
240
  cfg: next,
241
241
  accountId: params.accountId,
@@ -510,7 +510,7 @@ const matrixOnboardingAdapter = {
510
510
  });
511
511
  },
512
512
  afterConfigWritten: async ({ previousCfg, cfg, accountId, runtime }) => {
513
- const { runMatrixSetupBootstrapAfterConfigWrite } = await import("./setup-bootstrap-DXWxzR7A.js");
513
+ const { runMatrixSetupBootstrapAfterConfigWrite } = await import("./setup-bootstrap-DT2Gj9hX.js");
514
514
  await runMatrixSetupBootstrapAfterConfigWrite({
515
515
  previousCfg,
516
516
  cfg,
@@ -1,7 +1,7 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-DUslC3ob.js";
2
2
  import { n as LogService } from "./logger-CnZRVrux.js";
3
3
  import { t as awaitMatrixStartupWithAbort } from "./startup-abort-56edvmbM.js";
4
- import { n as resolveMatrixAuth, r as resolveMatrixAuthContext } from "./config-BR4uLzNs.js";
4
+ import { n as resolveMatrixAuth, r as resolveMatrixAuthContext } from "./config-xD5Y8nFT.js";
5
5
  import { normalizeOptionalAccountId } from "openclaw/plugin-sdk/account-id";
6
6
  //#region extensions/matrix/src/matrix/client/shared.ts
7
7
  var shared_exports = /* @__PURE__ */ __exportAll({
@@ -15,7 +15,7 @@ var shared_exports = /* @__PURE__ */ __exportAll({
15
15
  });
16
16
  let matrixCreateClientDepsPromise;
17
17
  async function loadMatrixCreateClientDeps() {
18
- matrixCreateClientDepsPromise ??= import("./create-client-DpoW106T.js").then((n) => n.n).then((runtime) => ({ createMatrixClient: runtime.createMatrixClient }));
18
+ matrixCreateClientDepsPromise ??= import("./create-client-ChlpNpAA.js").then((n) => n.n).then((runtime) => ({ createMatrixClient: runtime.createMatrixClient }));
19
19
  return await matrixCreateClientDepsPromise;
20
20
  }
21
21
  const sharedClientStates = /* @__PURE__ */ new Map();
package/dist/test-api.js CHANGED
@@ -1,4 +1,4 @@
1
1
  import { r as setMatrixRuntime } from "./runtime-Dog86njy.js";
2
- import { t as matrixPlugin } from "./channel-B-R2dceO.js";
3
- import { t as MatrixClient } from "./sdk-DXWmb94u.js";
2
+ import { t as matrixPlugin } from "./channel-eRrwLDE9.js";
3
+ import { t as MatrixClient } from "./sdk-BLBGvKEe.js";
4
4
  export { MatrixClient, matrixPlugin, setMatrixRuntime };
@@ -1,6 +1,6 @@
1
1
  import { a as listBindingsForAccount, c as resolveBindingKey, f as setMatrixThreadBindingManagerEntry, h as toSessionBindingRecord, l as resolveEffectiveBindingExpiry, m as toMatrixBindingTargetKind, o as removeBindingRecord, r as getMatrixThreadBindingManagerEntry, t as deleteMatrixThreadBindingManagerEntry, u as setBindingRecord } from "./thread-bindings-shared-DK-d-oYX.js";
2
2
  import { i as resolveMatrixStateFilePath, t as claimCurrentTokenStorageState } from "./storage-tC3ujLiW.js";
3
- import { a as sendMessageMatrix } from "./send-Df-pDuG6.js";
3
+ import { a as sendMessageMatrix } from "./send-D651usmb.js";
4
4
  import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
5
5
  import { registerSessionBindingAdapter, resolveThreadBindingFarewellText, unregisterSessionBindingAdapter } from "openclaw/plugin-sdk/thread-bindings-session-runtime";
6
6
  import path from "node:path";
@@ -1,12 +1,12 @@
1
- import { a as resolveMatrixAccountConfig } from "./account-config-D2W-V1eQ.js";
2
- import "./accounts-Bm90Rzvp.js";
3
- import { _ as parsePollStart, d as buildPollResponseContent, g as isPollStartType, i as reactMatrixMessage, u as resolveMatrixRoomId } from "./send-Df-pDuG6.js";
1
+ import { a as resolveMatrixAccountConfig } from "./account-config-LVxGiX7e.js";
2
+ import "./accounts--0L_EuMK.js";
3
+ import { _ as parsePollStart, d as buildPollResponseContent, g as isPollStartType, i as reactMatrixMessage, u as resolveMatrixRoomId } from "./send-D651usmb.js";
4
4
  import { i as buildMatrixReactionRelationsPath, o as selectOwnMatrixReactionEventIds, s as summarizeMatrixReactionEvents } from "./reaction-common-ejrL19w-.js";
5
- import { n as withResolvedActionClient, r as withResolvedRoomAction } from "./client-DzjShjVN.js";
6
- import { a as fetchEventSummary, c as resolveMatrixActionLimit, i as sendMatrixMessage, n as editMatrixMessage, o as readPinnedEvents, r as readMatrixMessages, s as EventType, t as deleteMatrixMessage } from "./messages-DQ8xXWiP.js";
5
+ import { n as withResolvedActionClient, r as withResolvedRoomAction } from "./client-DrmLRQnw.js";
6
+ import { a as fetchEventSummary, c as resolveMatrixActionLimit, i as sendMatrixMessage, n as editMatrixMessage, o as readPinnedEvents, r as readMatrixMessages, s as EventType, t as deleteMatrixMessage } from "./messages-BJi_jdEA.js";
7
7
  import { a as jsonResult, c as readStringArrayParam, l as readStringParam, o as readNumberParam, r as createActionGate, s as readReactionParams } from "./runtime-api-DTKcXOhp.js";
8
- import { t as applyMatrixProfileUpdate } from "./profile-update-DleMeUHj.js";
9
- import { _ as scanMatrixVerificationQr, a as confirmMatrixVerificationSas, b as verifyMatrixRecoveryKey, c as getMatrixRoomKeyBackupStatus, d as listMatrixVerifications, f as mismatchMatrixVerificationSas, h as restoreMatrixRoomKeyBackup, i as confirmMatrixVerificationReciprocateQr, l as getMatrixVerificationSas, n as bootstrapMatrixVerification, o as generateMatrixVerificationQr, p as requestMatrixVerification, r as cancelMatrixVerification, s as getMatrixEncryptionStatus, t as acceptMatrixVerification, u as getMatrixVerificationStatus, v as startMatrixVerification } from "./verification-BbGdzYQl.js";
8
+ import { t as applyMatrixProfileUpdate } from "./profile-update-DK5rfmA-.js";
9
+ import { _ as scanMatrixVerificationQr, a as confirmMatrixVerificationSas, b as verifyMatrixRecoveryKey, c as getMatrixRoomKeyBackupStatus, d as listMatrixVerifications, f as mismatchMatrixVerificationSas, h as restoreMatrixRoomKeyBackup, i as confirmMatrixVerificationReciprocateQr, l as getMatrixVerificationSas, n as bootstrapMatrixVerification, o as generateMatrixVerificationQr, p as requestMatrixVerification, r as cancelMatrixVerification, s as getMatrixEncryptionStatus, t as acceptMatrixVerification, u as getMatrixVerificationStatus, v as startMatrixVerification } from "./verification-BJT2k9TI.js";
10
10
  import { normalizeOptionalLowercaseString } from "openclaw/plugin-sdk/string-coerce-runtime";
11
11
  //#region extensions/matrix/src/matrix/actions/polls.ts
12
12
  function normalizeOptionIndexes(indexes) {
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-DUslC3ob.js";
2
- import { i as withStartedActionClient, n as withResolvedActionClient } from "./client-DzjShjVN.js";
2
+ import { i as withStartedActionClient, n as withResolvedActionClient } from "./client-DrmLRQnw.js";
3
3
  import { n as formatMatrixEncryptionUnavailableError } from "./encryption-guidance-BPi3A_m3.js";
4
4
  import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
5
5
  import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime";
@@ -276,6 +276,30 @@
276
276
  }
277
277
  ]
278
278
  },
279
+ "botLoopProtection": {
280
+ "type": "object",
281
+ "properties": {
282
+ "enabled": {
283
+ "type": "boolean"
284
+ },
285
+ "maxEventsPerWindow": {
286
+ "type": "integer",
287
+ "exclusiveMinimum": 0,
288
+ "maximum": 9007199254740991
289
+ },
290
+ "windowSeconds": {
291
+ "type": "integer",
292
+ "exclusiveMinimum": 0,
293
+ "maximum": 9007199254740991
294
+ },
295
+ "cooldownSeconds": {
296
+ "type": "integer",
297
+ "exclusiveMinimum": 0,
298
+ "maximum": 9007199254740991
299
+ }
300
+ },
301
+ "additionalProperties": false
302
+ },
279
303
  "groupPolicy": {
280
304
  "type": "string",
281
305
  "enum": [
@@ -616,6 +640,30 @@
616
640
  }
617
641
  ]
618
642
  },
643
+ "botLoopProtection": {
644
+ "type": "object",
645
+ "properties": {
646
+ "enabled": {
647
+ "type": "boolean"
648
+ },
649
+ "maxEventsPerWindow": {
650
+ "type": "integer",
651
+ "exclusiveMinimum": 0,
652
+ "maximum": 9007199254740991
653
+ },
654
+ "windowSeconds": {
655
+ "type": "integer",
656
+ "exclusiveMinimum": 0,
657
+ "maximum": 9007199254740991
658
+ },
659
+ "cooldownSeconds": {
660
+ "type": "integer",
661
+ "exclusiveMinimum": 0,
662
+ "maximum": 9007199254740991
663
+ }
664
+ },
665
+ "additionalProperties": false
666
+ },
619
667
  "tools": {
620
668
  "type": "object",
621
669
  "properties": {
@@ -695,6 +743,30 @@
695
743
  }
696
744
  ]
697
745
  },
746
+ "botLoopProtection": {
747
+ "type": "object",
748
+ "properties": {
749
+ "enabled": {
750
+ "type": "boolean"
751
+ },
752
+ "maxEventsPerWindow": {
753
+ "type": "integer",
754
+ "exclusiveMinimum": 0,
755
+ "maximum": 9007199254740991
756
+ },
757
+ "windowSeconds": {
758
+ "type": "integer",
759
+ "exclusiveMinimum": 0,
760
+ "maximum": 9007199254740991
761
+ },
762
+ "cooldownSeconds": {
763
+ "type": "integer",
764
+ "exclusiveMinimum": 0,
765
+ "maximum": 9007199254740991
766
+ }
767
+ },
768
+ "additionalProperties": false
769
+ },
698
770
  "tools": {
699
771
  "type": "object",
700
772
  "properties": {
@@ -781,6 +853,30 @@
781
853
  "label": "Matrix",
782
854
  "description": "open protocol; install the plugin to enable.",
783
855
  "uiHints": {
856
+ "allowBots": {
857
+ "label": "Matrix Allow Bot Messages",
858
+ "help": "Allow messages from other configured Matrix bot accounts to trigger replies (default: false). Set \"mentions\" to require a visible room mention."
859
+ },
860
+ "botLoopProtection": {
861
+ "label": "Matrix Bot Loop Protection",
862
+ "help": "Sliding-window guard for accepted Matrix configured-bot loops. Default is enabled whenever allowBots lets configured bot messages reach dispatch."
863
+ },
864
+ "botLoopProtection.enabled": {
865
+ "label": "Matrix Bot Loop Protection Enabled",
866
+ "help": "Enable the bot-pair loop guard. Defaults to true when allowBots is true or \"mentions\", and false when configured bot messages are ignored."
867
+ },
868
+ "botLoopProtection.maxEventsPerWindow": {
869
+ "label": "Matrix Bot Loop Events per Window",
870
+ "help": "Maximum accepted bot-pair messages within the sliding window before suppression starts. Default: 20."
871
+ },
872
+ "botLoopProtection.windowSeconds": {
873
+ "label": "Matrix Bot Loop Window Seconds",
874
+ "help": "Sliding window length for counting bot-pair messages. Default: 60."
875
+ },
876
+ "botLoopProtection.cooldownSeconds": {
877
+ "label": "Matrix Bot Loop Cooldown Seconds",
878
+ "help": "How long to suppress the bot pair after it exceeds the budget. Default: 60."
879
+ },
784
880
  "dangerouslyAllowNameMatching": {
785
881
  "label": "Matrix Display Name Matching",
786
882
  "help": "Compatibility opt-in for resolving Matrix display names and joined room names in allowlists. Prefer full @user:server IDs and room IDs or aliases because names are mutable."