@openclaw/matrix 2026.9.1 → 2026.9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/dist/api.js +4 -4
  2. package/dist/{approval-handler.runtime-B_6ytY5I.js → approval-handler.runtime-BJCD4dLf.js} +3 -3
  3. package/dist/{approval-ids-CfHtZ9d1.js → approval-ids-Bst7HM_o.js} +1 -1
  4. package/dist/{approval-reaction-auth-BpDvJqfy.js → approval-reaction-auth-DhH8QOSe.js} +1 -1
  5. package/dist/{channel-b-jES-oi.js → channel-Bs8VLb6q.js} +6 -6
  6. package/dist/channel-plugin-api.js +1 -1
  7. package/dist/{channel.runtime-BkqjwEDU.js → channel.runtime-CCJRhdH5.js} +2 -2
  8. package/dist/{channel.setup-BY42QaL7.js → channel.setup-DhmDXwPp.js} +6 -3
  9. package/dist/{cli-CtYeU7ol.js → cli-IvDUuiDH.js} +147 -113
  10. package/dist/{cli-metadata-B7MQjR5S.js → cli-metadata-BGryAl2e.js} +1 -1
  11. package/dist/cli-metadata.js +1 -1
  12. package/dist/{client-D2utPQ1E.js → client-oNOlldJI.js} +1 -1
  13. package/dist/contract-api.js +2 -2
  14. package/dist/doctor-contract-api.js +2 -2
  15. package/dist/{draft-stream-DPYdv4fE.js → draft-stream-DglwxWzJ.js} +1 -1
  16. package/dist/index.js +1 -1
  17. package/dist/{messages-C1U3b1oN.js → messages-Czn8lNEh.js} +2 -2
  18. package/dist/{monitor-SNnu-0bp.js → monitor-DouG43FJ.js} +35 -38
  19. package/dist/{outbound-CeCEtF_q.js → outbound-Co_tJyE6.js} +1 -1
  20. package/dist/plugin-entry.handlers.runtime.js +1 -1
  21. package/dist/{profile-update-Cd1p8ABr.js → profile-update-CAl8nZNG.js} +1 -1
  22. package/dist/{reaction-events-DveJRUaX.js → reaction-events-C_7G7bvI.js} +3 -3
  23. package/dist/{room-info-DVkKDscD.js → room-info-6viLR3NH.js} +3 -3
  24. package/dist/{send-DG7Bnj7_.js → send-B5XChnvB.js} +5 -9
  25. package/dist/session-binding-contract-api.js +1 -1
  26. package/dist/{setup-bootstrap-Co985F63.js → setup-bootstrap-S_loyUyM.js} +1 -1
  27. package/dist/{setup-core-CEF6exLW.js → setup-core-XkIfQ65J.js} +1 -1
  28. package/dist/setup-plugin-api.js +1 -1
  29. package/dist/{setup-surface-BSlj1vnL.js → setup-surface-B2yZ8KGc.js} +2 -2
  30. package/dist/{thread-bindings-DgxQEB99.js → thread-bindings-BkBnn4te.js} +1 -1
  31. package/dist/{tool-actions.runtime-vbkQgU7D.js → tool-actions.runtime-a5L5xGSP.js} +7 -7
  32. package/dist/{verification-D-iOebn4.js → verification-XJtTc5DI.js} +1 -1
  33. package/node_modules/markdown-it/dist/browser/markdown-it.esm.min.mjs +216 -183
  34. package/node_modules/markdown-it/dist/browser/markdown-it.esm.min.mjs.map +1 -1
  35. package/node_modules/markdown-it/dist/browser/markdown-it.umd.min.js +7 -7
  36. package/node_modules/markdown-it/dist/browser/markdown-it.umd.min.js.map +1 -1
  37. package/node_modules/markdown-it/dist/markdown-it.cjs.js +98 -106
  38. package/node_modules/markdown-it/dist/markdown-it.cjs.js.map +1 -1
  39. package/node_modules/markdown-it/dist/markdown-it.d.mts +42 -71
  40. package/node_modules/markdown-it/dist/markdown-it.mjs +98 -106
  41. package/node_modules/markdown-it/dist/markdown-it.mjs.map +1 -1
  42. package/node_modules/markdown-it/package.json +1 -2
  43. package/node_modules/typebox/build/format/json_pointer.d.mts +2 -2
  44. package/node_modules/typebox/build/format/json_pointer.mjs +2 -2
  45. package/node_modules/typebox/build/format/json_pointer_uri_fragment.d.mts +2 -2
  46. package/node_modules/typebox/build/format/json_pointer_uri_fragment.mjs +2 -2
  47. package/node_modules/typebox/build/format/relative_json_pointer.d.mts +2 -2
  48. package/node_modules/typebox/build/format/relative_json_pointer.mjs +2 -2
  49. package/node_modules/typebox/build/system/memory/assign.mjs +2 -1
  50. package/node_modules/typebox/build/system/memory/create.mjs +3 -4
  51. package/node_modules/typebox/build/system/memory/discard.mjs +2 -2
  52. package/node_modules/typebox/build/system/memory/freeze.d.mts +4 -0
  53. package/node_modules/typebox/build/system/memory/freeze.mjs +6 -0
  54. package/node_modules/typebox/build/system/memory/update.mjs +3 -2
  55. package/node_modules/typebox/package.json +1 -1
  56. package/openclaw.plugin.json +1 -2
  57. package/package.json +6 -6
@@ -1,24 +1,24 @@
1
1
  import { a as resolveMatrixAccountConfig, i as resolveMatrixAccountAllowlistConfig } from "./account-config-CRsKoMqJ.js";
2
2
  import { t as getMatrixRuntime } from "./runtime-6S3DNFNv.js";
3
3
  import { n as resolveConfiguredMatrixBotUserIds } from "./accounts-DR1c4xF_.js";
4
- import { _ as logInboundDrop, a as resolveMatrixThreadRootId, b as summarizeMapping, c as RelationType, d as buildAllowlistResolutionSummary, f as canonicalizeAllowlistWithResolvedIds, g as getAgentScopedMediaLocalRoots, h as formatLocationText, i as resolveMatrixReplyToEventId, l as resolveMatrixRoomConfig, m as createTypingCallbacks, n as resolveMatrixStoredSessionMeta, o as resolveMatrixThreadRouting, p as createReplyPrefixOptions, r as resolveMatrixInboundRoute, s as EventType, u as addAllowlistUserEntriesFromConfigEntry, v as logTypingFailure, x as toLocationContext, y as patchAllowlistUsersInConfigEntries } from "./channel-b-jES-oi.js";
5
- import { a as normalizeMatrixUserId, i as normalizeMatrixAllowList, o as resolveMatrixAllowListMatch } from "./channel.setup-BY42QaL7.js";
4
+ import { _ as logInboundDrop, a as resolveMatrixThreadRootId, b as summarizeMapping, c as RelationType, d as buildAllowlistResolutionSummary, f as canonicalizeAllowlistWithResolvedIds, g as getAgentScopedMediaLocalRoots, h as formatLocationText, i as resolveMatrixReplyToEventId, l as resolveMatrixRoomConfig, m as createTypingCallbacks, n as resolveMatrixStoredSessionMeta, o as resolveMatrixThreadRouting, p as createReplyPrefixOptions, r as resolveMatrixInboundRoute, s as EventType, u as addAllowlistUserEntriesFromConfigEntry, v as logTypingFailure, x as toLocationContext, y as patchAllowlistUsersInConfigEntries } from "./channel-Bs8VLb6q.js";
5
+ import { a as normalizeMatrixUserId, i as normalizeMatrixAllowList, o as resolveMatrixAllowListMatch } from "./channel.setup-DhmDXwPp.js";
6
6
  import { n as isMatrixRoomId, t as isMatrixQualifiedUserId } from "./target-ids-Nwx7cMVE.js";
7
- import { S as promoteMatrixDirectRoomCandidate, d as formatPollAsText, g as parsePollStartContent, m as isPollStartType, p as isPollEventType, r as sendMessageMatrix, w as MATRIX_OPENCLAW_FINALIZED_PREVIEW_KEY } from "./send-DG7Bnj7_.js";
7
+ import { S as promoteMatrixDirectRoomCandidate, d as formatPollAsText, g as parsePollStartContent, m as isPollStartType, p as isPollEventType, r as sendMessageMatrix, w as MATRIX_OPENCLAW_FINALIZED_PREVIEW_KEY } from "./send-B5XChnvB.js";
8
8
  import { i as isStrictDirectMembership, n as hasDirectMatrixMemberFlag, o as readJoinedMatrixMembers } from "./direct-room-RinHjtqX.js";
9
- import { t as createMatrixThreadBindingManager } from "./thread-bindings-DgxQEB99.js";
10
- import { c as formatMatrixMediaTooLargeText, d as isLikelyBareFilename, f as resolveBundledMatrixReplacementContent, l as formatMatrixMediaUnavailableText, m as fetchMatrixPollSnapshot, r as readMatrixMessages, u as formatMatrixMessageText } from "./messages-C1U3b1oN.js";
9
+ import { t as createMatrixThreadBindingManager } from "./thread-bindings-BkBnn4te.js";
10
+ import { c as formatMatrixMediaTooLargeText, d as isLikelyBareFilename, f as resolveBundledMatrixReplacementContent, l as formatMatrixMediaUnavailableText, m as fetchMatrixPollSnapshot, r as readMatrixMessages, u as formatMatrixMessageText } from "./messages-Czn8lNEh.js";
11
11
  import { t as isBunRuntime } from "./runtime-BefyhPWv.js";
12
12
  import { a as throwIfMatrixStartupAborted, c as backfillMatrixAuthDeviceIdAfterStartup, i as isMatrixStartupAbortError, l as resolveMatrixAuth, n as acquireSharedMatrixClient, o as createMatrixMonitorTaskRunner, u as resolveMatrixAuthContext } from "./client-Dj4mcf-s.js";
13
13
  import { i as isMatrixMediaSizeLimitError, r as MatrixMediaSizeLimitError } from "./http-client-DOmFvKvB.js";
14
- import { n as prepareMatrixReplyPayload, r as resolveMatrixExtraContent } from "./outbound-CeCEtF_q.js";
14
+ import { n as prepareMatrixReplyPayload, r as resolveMatrixExtraContent } from "./outbound-Co_tJyE6.js";
15
15
  import { t as resolveMatrixTargets } from "./resolve-targets-B64O69Nd.js";
16
16
  import { t as formatMatrixEncryptedEventDisabledWarning } from "./encryption-guidance-BNcZNQZI.js";
17
17
  import { createMatrixInboundEventDeduper } from "./inbound-dedupe-Ch33GU06.js";
18
18
  import { a as isMatrixAccessTokenInvalidatedError, d as isMatrixDisconnectedSyncState, f as isMatrixReadySyncState, p as isMatrixTerminalSyncState } from "./client-support-DLj4vDeu.js";
19
- import { i as setBoundedMap, r as getMatrixRoomInfo, t as createMatrixRoomInfoResolver } from "./room-info-DVkKDscD.js";
19
+ import { i as setBoundedMap, r as getMatrixRoomInfo, t as createMatrixRoomInfoResolver } from "./room-info-6viLR3NH.js";
20
20
  import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
21
- import { buildChannelProgressDraftLineForEntry, createChannelProgressDraftCompositor, createMessageReceiptFromOutboundResults, createPreviewMessageReceipt, defineFinalizableLivePreviewAdapter, deliverWithFinalizableLivePreviewAdapter, formatChannelProgressDraftLine, formatChannelProgressDraftText, listMessageReceiptPlatformIds, resolveChannelStreamingBlockEnabled, waitUntilAbort } from "openclaw/plugin-sdk/channel-outbound";
21
+ import { createChannelProgressDraftCompositor, createMessageReceiptFromOutboundResults, createPreviewMessageReceipt, defineFinalizableLivePreviewAdapter, deliverWithFinalizableLivePreviewAdapter, formatChannelProgressDraftText, listMessageReceiptPlatformIds, resolveChannelStreamingBlockEnabled, waitUntilAbort } from "openclaw/plugin-sdk/channel-outbound";
22
22
  import { normalizeLowercaseStringOrEmpty, normalizeNullableString, normalizeOptionalString, normalizeStringifiedEntries, readStringValue, uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
23
23
  import { stripReasoningTagsFromText } from "openclaw/plugin-sdk/text-chunking";
24
24
  import { CHANNEL_APPROVAL_NATIVE_RUNTIME_CONTEXT_CAPABILITY } from "openclaw/plugin-sdk/approval-handler-adapter-runtime";
@@ -823,7 +823,7 @@ const matrixVerificationConstants = {
823
823
  const MAX_TRACKED_VERIFICATION_EVENTS = 1024;
824
824
  const SAS_NOTICE_RETRY_DELAY_MS = 750;
825
825
  const VERIFICATION_EVENT_STARTUP_GRACE_MS = 3e4;
826
- const loadMatrixDirectRoomDeps = createLazyRuntimeModule(() => Promise.all([import("./send-DG7Bnj7_.js").then((n) => n.x), import("./direct-room-RinHjtqX.js").then((n) => n.t)]).then(([directManagementModule, directRoomModule]) => ({
826
+ const loadMatrixDirectRoomDeps = createLazyRuntimeModule(() => Promise.all([import("./send-B5XChnvB.js").then((n) => n.x), import("./direct-room-RinHjtqX.js").then((n) => n.t)]).then(([directManagementModule, directRoomModule]) => ({
827
827
  inspectMatrixDirectRooms: directManagementModule.inspectMatrixDirectRooms,
828
828
  isStrictDirectRoom: directRoomModule.isStrictDirectRoom
829
829
  })));
@@ -1641,11 +1641,11 @@ async function redactMatrixDraftEvent(client, roomId, draftEventId) {
1641
1641
  function buildMatrixFinalizedPreviewContent() {
1642
1642
  return { [MATRIX_OPENCLAW_FINALIZED_PREVIEW_KEY]: true };
1643
1643
  }
1644
- const loadMatrixSendModule = createLazyRuntimeModule(() => import("./send-DG7Bnj7_.js").then((n) => n.s));
1644
+ const loadMatrixSendModule = createLazyRuntimeModule(() => import("./send-B5XChnvB.js").then((n) => n.s));
1645
1645
  const loadAcpBindingRuntime = createLazyRuntimeModule(() => import("openclaw/plugin-sdk/acp-binding-runtime"));
1646
1646
  const loadSessionBindingRuntime = createLazyRuntimeModule(() => import("openclaw/plugin-sdk/session-binding-runtime"));
1647
- const loadMatrixReactionEvents = createLazyRuntimeModule(() => import("./reaction-events-DveJRUaX.js"));
1648
- const loadMatrixDraftStream = createLazyRuntimeModule(() => import("./draft-stream-DPYdv4fE.js"));
1647
+ const loadMatrixReactionEvents = createLazyRuntimeModule(() => import("./reaction-events-C_7G7bvI.js"));
1648
+ const loadMatrixDraftStream = createLazyRuntimeModule(() => import("./draft-stream-DglwxWzJ.js"));
1649
1649
  async function matrixTextWouldActivateMentions(client, text) {
1650
1650
  const { resolveMatrixMentionsForBody } = await loadMatrixSendModule();
1651
1651
  const mentions = await resolveMatrixMentionsForBody({
@@ -2001,8 +2001,7 @@ async function createMatrixDraftController(params) {
2001
2001
  accountId,
2002
2002
  log: logVerboseMessage
2003
2003
  })) : void 0;
2004
- const shouldStreamPreviewToolProgress = Boolean(draftStream) && previewToolProgressEnabled;
2005
- const shouldSuppressDefaultToolProgressMessages = Boolean(draftStream) && (shouldStreamPreviewToolProgress || params.streaming === "progress");
2004
+ const shouldSuppressDefaultToolProgressMessages = Boolean(draftStream) && (Boolean(draftStream) && previewToolProgressEnabled || params.streaming === "progress");
2006
2005
  let currentDraftMessageGeneration = 0;
2007
2006
  let currentDraftBlockOffset = 0;
2008
2007
  let latestDraftFullText = "";
@@ -2029,7 +2028,6 @@ async function createMatrixDraftController(params) {
2029
2028
  active: Boolean(draftStream),
2030
2029
  seed: progressSeed,
2031
2030
  formatLine: formatMatrixToolProgressMarkdownCode,
2032
- buildProgressEventLine: (input, options) => input.event === "approval" ? formatChannelProgressDraftLine(input, options) : buildChannelProgressDraftLineForEntry(progressConfigEntry, input, options),
2033
2031
  update: async (text, options) => {
2034
2032
  const previewText = !progressDraftStreaming && (previewPlan || previewPlanExplanation) ? renderPreviewPlan() : text.replace(/^• /gmu, "- ");
2035
2033
  if (!draftStream) return false;
@@ -2046,10 +2044,8 @@ async function createMatrixDraftController(params) {
2046
2044
  };
2047
2045
  const buildPreviewToolProgressReplyOptions = () => {
2048
2046
  if (!shouldSuppressDefaultToolProgressMessages) return {};
2049
- const options = { suppressDefaultToolProgressMessages: true };
2050
- if (!shouldStreamPreviewToolProgress) return options;
2051
2047
  return {
2052
- ...options,
2048
+ suppressDefaultToolProgressMessages: true,
2053
2049
  onToolStart: async (payload) => {
2054
2050
  return await progressDraft.pushToolEvent(payload);
2055
2051
  },
@@ -2494,7 +2490,7 @@ async function resolveMatrixIngressAccess(config) {
2494
2490
  };
2495
2491
  const storeAllowFrom = isDirectMessage && dmPolicy !== "allowlist" && dmPolicy !== "open" ? await readStoreAllowFrom() : [];
2496
2492
  const roomUsers = roomConfig?.users ?? [];
2497
- const { liveDmAllowFrom, liveGroupAllowFrom } = await resolveLiveAccountAllowlists();
2493
+ const { liveCfg, liveDmAllowFrom, liveGroupAllowFrom } = await resolveLiveAccountAllowlists();
2498
2494
  const accessState = await resolveMatrixMonitorAccessState({
2499
2495
  allowFrom: liveDmAllowFrom,
2500
2496
  storeAllowFrom,
@@ -2583,6 +2579,8 @@ async function resolveMatrixIngressAccess(config) {
2583
2579
  return;
2584
2580
  }
2585
2581
  return {
2582
+ cfg: liveCfg,
2583
+ liveDmAllowFrom,
2586
2584
  content,
2587
2585
  messageId,
2588
2586
  audioPreflightMode,
@@ -2797,8 +2795,8 @@ function resolveMentions(params) {
2797
2795
  //#region extensions/matrix/src/matrix/monitor/handler-ingress-content.ts
2798
2796
  async function resolveMatrixIngressContent(config) {
2799
2797
  const { handler, params: paramsLocal, access, roomId, event, eventType, isPollEvent, eventTs, senderId, roomHistoryTracker, commitInboundEventIfClaimed } = config;
2800
- const { client, core, cfg, accountId, accountConfig, logger, logVerboseMessage, historyLimit, mediaMaxBytes, dmSessionScope, getMemberDisplayName } = handler;
2801
- const { content: accessContent, messageId, audioPreflightMode, isDirectMessage, isRoom, locationPayload, reservedHistorySlot, threadRootId, thread, historyThreadId, discardReservedHistorySlot, markReservedHistorySlotConsumed, commitInboundEventIfClaimedAndDiscardReserved, roomConfig, allowBotsMode, isConfiguredBotSender, selfUserId, botLoopProtection, roomMatchMeta, getSenderName, accessState, effectiveGroupAllowFrom, effectiveRoomUsers } = access;
2798
+ const { client, core, accountId, accountConfig, logger, logVerboseMessage, historyLimit, mediaMaxBytes, dmSessionScope, getMemberDisplayName } = handler;
2799
+ const { cfg, liveDmAllowFrom, content: accessContent, messageId, audioPreflightMode, isDirectMessage, isRoom, locationPayload, reservedHistorySlot, threadRootId, thread, historyThreadId, discardReservedHistorySlot, markReservedHistorySlotConsumed, commitInboundEventIfClaimedAndDiscardReserved, roomConfig, allowBotsMode, isConfiguredBotSender, selfUserId, botLoopProtection, roomMatchMeta, getSenderName, accessState, effectiveGroupAllowFrom, effectiveRoomUsers } = access;
2802
2800
  const { messageIngress, resolveMessageIngress } = accessState;
2803
2801
  let content = accessContent;
2804
2802
  let pollSnapshotPromise = null;
@@ -3082,6 +3080,8 @@ async function resolveMatrixIngressContent(config) {
3082
3080
  }, historyThreadId) : void 0;
3083
3081
  if (reservedHistorySlot && preparedTrigger) markReservedHistorySlotConsumed();
3084
3082
  return {
3083
+ cfg,
3084
+ liveDmAllowFrom,
3085
3085
  messageIngress,
3086
3086
  resolveMessageIngress,
3087
3087
  route: _route,
@@ -3749,7 +3749,7 @@ function createMatrixHandlerState(config) {
3749
3749
  const SESSION_RESTART_RECOVERY_TOMBSTONE_ERROR_CODE = "SESSION_RESTART_RECOVERY_TOMBSTONE";
3750
3750
  const RESTART_RECOVERY_TOMBSTONE_NOTICE = "This session ended during gateway restart recovery and cannot accept more messages. Send /new or /reset to start a replacement session.";
3751
3751
  function createMatrixRoomMessageHandler(params) {
3752
- const { client, core, cfg, accountId, runtime, logger, logVerboseMessage, allowFromResolvedEntries = [], groupAllowFromResolvedEntries = [], configuredBotUserIds = /* @__PURE__ */ new Set(), groupPolicy, replyToMode, dmSessionScope, streaming, previewToolProgressEnabled, blockStreamingEnabled, historyLimit, startupMs, startupGraceMs, dropPreStartupMessages, inboundDeduper, directTracker, getRoomInfo, getMemberDisplayName, resolveLiveUserAllowlist = resolveMatrixMonitorLiveUserAllowlist, resolveStorePath: resolveStorePathImpl = resolveStorePath, createChannelInboundEnvelopeBuilder: createChannelInboundEnvelopeBuilderImpl = createChannelInboundEnvelopeBuilder, finalizeInboundContext, resolveHumanDelayConfig: resolveHumanDelayConfigImpl = resolveHumanDelayConfig } = params;
3752
+ const { client, core, cfg: startupConfig, accountId, runtime, logger, logVerboseMessage, allowFromResolvedEntries = [], groupAllowFromResolvedEntries = [], configuredBotUserIds = /* @__PURE__ */ new Set(), groupPolicy, replyToMode, dmSessionScope, streaming, previewToolProgressEnabled, blockStreamingEnabled, historyLimit, startupMs, startupGraceMs, dropPreStartupMessages, inboundDeduper, directTracker, getRoomInfo, getMemberDisplayName, resolveLiveUserAllowlist = resolveMatrixMonitorLiveUserAllowlist, resolveStorePath: resolveStorePathImpl = resolveStorePath, createChannelInboundEnvelopeBuilder: createChannelInboundEnvelopeBuilderImpl = createChannelInboundEnvelopeBuilder, finalizeInboundContext, resolveHumanDelayConfig: resolveHumanDelayConfigImpl = resolveHumanDelayConfig } = params;
3753
3753
  const handlerConfig = {
3754
3754
  ...params,
3755
3755
  allowFromResolvedEntries,
@@ -3760,11 +3760,6 @@ function createMatrixRoomMessageHandler(params) {
3760
3760
  createChannelInboundEnvelopeBuilder: createChannelInboundEnvelopeBuilderImpl,
3761
3761
  resolveHumanDelayConfig: resolveHumanDelayConfigImpl
3762
3762
  };
3763
- const contextVisibilityMode = resolveChannelContextVisibilityMode({
3764
- cfg,
3765
- channel: "matrix",
3766
- accountId
3767
- });
3768
3763
  const handlerState = createMatrixHandlerState({
3769
3764
  core,
3770
3765
  accountId,
@@ -3870,7 +3865,7 @@ function createMatrixRoomMessageHandler(params) {
3870
3865
  ...prefix,
3871
3866
  audioPreflightMode: shouldDeferMatrixAudioPreflightForRoomIngress({
3872
3867
  content: prefix.content,
3873
- cfg
3868
+ cfg: startupConfig
3874
3869
  }) ? "defer" : "run"
3875
3870
  });
3876
3871
  return result && "deferredPrefix" in result ? { deferredPrefix: result.deferredPrefix } : { ingressResult: result };
@@ -3882,7 +3877,12 @@ function createMatrixRoomMessageHandler(params) {
3882
3877
  })();
3883
3878
  if (!resolvedIngressResult) return;
3884
3879
  if ("deferredPrefix" in resolvedIngressResult) return;
3885
- const { route: _route, hasExplicitSessionBinding, roomConfig, isDirectMessage, isRoom, shouldRequireMention, wasMentioned, effectiveWasMentioned, shouldBypassMention, canDetectMention, commandAuthorized, inboundHistory, senderName, bodyText, commandBodyText, media, preflightAudioTranscript, locationPayload, messageId, triggerSnapshot, threadRootId, thread, botLoopProtection, effectiveGroupAllowFrom, effectiveRoomUsers, resolveMessageIngress } = resolvedIngressResult;
3880
+ const { cfg, liveDmAllowFrom, route: _route, hasExplicitSessionBinding, roomConfig, isDirectMessage, isRoom, shouldRequireMention, wasMentioned, effectiveWasMentioned, shouldBypassMention, canDetectMention, commandAuthorized, inboundHistory, senderName, bodyText, commandBodyText, media, preflightAudioTranscript, locationPayload, messageId, triggerSnapshot, threadRootId, thread, botLoopProtection, effectiveGroupAllowFrom, effectiveRoomUsers, resolveMessageIngress } = resolvedIngressResult;
3881
+ const contextVisibilityMode = resolveChannelContextVisibilityMode({
3882
+ cfg,
3883
+ channel: "matrix",
3884
+ accountId
3885
+ });
3886
3886
  const inboundContext = await resolveMatrixInboundContext({
3887
3887
  resolveMessageIngress,
3888
3888
  client,
@@ -4003,14 +4003,11 @@ function createMatrixRoomMessageHandler(params) {
4003
4003
  logVerboseMessage
4004
4004
  });
4005
4005
  const { deliverReply, onReplyError, turnDispatcherOptions } = replyDispatcher;
4006
- const pinnedMainDmOwner = isDirectMessage ? await (async () => {
4007
- const { liveCfg, liveDmAllowFrom } = await handlerState.resolveLiveAccountAllowlists();
4008
- return resolvePinnedMainDmOwnerFromAllowlist({
4009
- dmScope: liveCfg.session?.dmScope,
4010
- allowFrom: liveDmAllowFrom,
4011
- normalizeEntry: normalizeMatrixUserId
4012
- });
4013
- })() : null;
4006
+ const pinnedMainDmOwner = isDirectMessage ? resolvePinnedMainDmOwnerFromAllowlist({
4007
+ dmScope: cfg.session?.dmScope,
4008
+ allowFrom: liveDmAllowFrom,
4009
+ normalizeEntry: normalizeMatrixUserId
4010
+ }) : null;
4014
4011
  const inboundLastRouteSessionKey = resolveInboundLastRouteSessionKey({
4015
4012
  route: _route,
4016
4013
  sessionKey: _route.sessionKey
@@ -4427,7 +4424,7 @@ function resolveMatrixStreamingMode(streaming) {
4427
4424
  }
4428
4425
  function resolveMatrixPreviewToolProgress(streaming) {
4429
4426
  if (!streaming) return true;
4430
- if (resolveMatrixStreamingMode(streaming) === "progress") return streaming.progress?.toolProgress ?? streaming.preview?.toolProgress ?? true;
4427
+ if (resolveMatrixStreamingMode(streaming) === "progress") return streaming.progress?.toolProgress ?? streaming.preview?.toolProgress ?? false;
4431
4428
  return streaming.preview?.toolProgress ?? true;
4432
4429
  }
4433
4430
  function resolveMatrixPreviewToolProgressEnabled(streaming) {
@@ -1,4 +1,4 @@
1
- import { i as sendPollMatrix, r as sendMessageMatrix } from "./send-DG7Bnj7_.js";
1
+ import { i as sendPollMatrix, r as sendMessageMatrix } from "./send-B5XChnvB.js";
2
2
  import { createMessageReceiptFromOutboundResults, createReplyToFanout, resolveOutboundSendDep } from "openclaw/plugin-sdk/channel-outbound";
3
3
  import { asOptionalRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
4
4
  import { chunkTextForOutbound } from "openclaw/plugin-sdk/text-chunking";
@@ -2,7 +2,7 @@ import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
2
2
  import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
3
3
  import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
4
4
  //#region extensions/matrix/src/plugin-entry.runtime.ts
5
- const loadMatrixVerificationRuntime = createLazyRuntimeModule(() => import("./verification-D-iOebn4.js").then((n) => n.y));
5
+ const loadMatrixVerificationRuntime = createLazyRuntimeModule(() => import("./verification-XJtTc5DI.js").then((n) => n.y));
6
6
  function sendError(respond, err) {
7
7
  respond(false, { error: formatErrorMessage(err) });
8
8
  }
@@ -1,7 +1,7 @@
1
1
  import { t as getMatrixRuntime } from "./runtime-6S3DNFNv.js";
2
2
  import { n as resolveMatrixConfigPath, r as updateMatrixAccountConfig } from "./config-update-BnX26jCO.js";
3
3
  import { r as syncMatrixOwnProfile } from "./profile-vmjsmhh4.js";
4
- import { n as withResolvedActionClient } from "./client-D2utPQ1E.js";
4
+ import { n as withResolvedActionClient } from "./client-oNOlldJI.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,5 +1,5 @@
1
1
  import { a as resolveMatrixAccountConfig } from "./account-config-CRsKoMqJ.js";
2
- import { a as resolveMatrixThreadRootId, o as resolveMatrixThreadRouting, r as resolveMatrixInboundRoute } from "./channel-b-jES-oi.js";
2
+ import { a as resolveMatrixThreadRootId, o as resolveMatrixThreadRouting, r as resolveMatrixInboundRoute } from "./channel-Bs8VLb6q.js";
3
3
  import { a as extractMatrixReactionAnnotation } from "./reaction-common-DkrQdBSZ.js";
4
4
  import { i as resolveMatrixApprovalReactionTargetWithPersistence, o as unregisterMatrixApprovalReactionTargetsForApproval } from "./approval-reactions-1fwEhoK9.js";
5
5
  import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
@@ -7,9 +7,9 @@ import { isApprovalNotFoundError } from "openclaw/plugin-sdk/error-runtime";
7
7
  import { normalizeAccountId } from "openclaw/plugin-sdk/routing";
8
8
  import { getSessionBindingService } from "openclaw/plugin-sdk/session-binding-runtime";
9
9
  //#region extensions/matrix/src/matrix/monitor/reaction-events.ts
10
- const loadApprovalReactionAuth = createLazyRuntimeModule(() => import("./approval-reaction-auth-BpDvJqfy.js"));
10
+ const loadApprovalReactionAuth = createLazyRuntimeModule(() => import("./approval-reaction-auth-DhH8QOSe.js"));
11
11
  const loadExecApprovalResolver = createLazyRuntimeModule(() => import("openclaw/plugin-sdk/approval-gateway-runtime"));
12
- const loadMatrixSend = createLazyRuntimeModule(() => import("./send-DG7Bnj7_.js").then((n) => n.s));
12
+ const loadMatrixSend = createLazyRuntimeModule(() => import("./send-B5XChnvB.js").then((n) => n.s));
13
13
  function buildMatrixApprovalTerminalText(result) {
14
14
  const approval = result.approval;
15
15
  const terminalLabel = approval.status === "allowed" ? approval.decision === "allow-always" ? "Allowed always" : "Allowed once" : approval.status === "denied" ? "Denied" : approval.status === "expired" ? "Expired" : "Cancelled";
@@ -1,6 +1,6 @@
1
- import { b as resolveMatrixRoomId } from "./send-DG7Bnj7_.js";
2
- import { s as EventType } from "./messages-C1U3b1oN.js";
3
- import { n as withResolvedActionClient, r as withResolvedRoomAction } from "./client-D2utPQ1E.js";
1
+ import { b as resolveMatrixRoomId } from "./send-B5XChnvB.js";
2
+ import { s as EventType } from "./messages-Czn8lNEh.js";
3
+ import { n as withResolvedActionClient, r as withResolvedRoomAction } from "./client-oNOlldJI.js";
4
4
  import { n as isMatrixNotFoundError } from "./errors-DKVS3_DO.js";
5
5
  //#region extensions/matrix/src/matrix/monitor/bounded-cache.ts
6
6
  function setBoundedMap(map, key, value, maxEntries) {
@@ -1362,18 +1362,15 @@ function compactLooseListTokens(tokens) {
1362
1362
  if (token.type === "list_item_open") {
1363
1363
  listItemStack.push({
1364
1364
  level: token.level,
1365
- immediateParagraphOpenIndexes: [],
1366
- immediateParagraphCloseIndexes: []
1365
+ paragraphIndex: void 0
1367
1366
  });
1368
1367
  continue;
1369
1368
  }
1370
1369
  if (token.type === "list_item_close") {
1371
1370
  const item = listItemStack.pop();
1372
- if (item && item.immediateParagraphOpenIndexes.length === 1 && item.immediateParagraphCloseIndexes.length === 1) {
1373
- const openIndex = item.immediateParagraphOpenIndexes[0];
1374
- const closeIndex = item.immediateParagraphCloseIndexes[0];
1375
- const openToken = openIndex === void 0 ? void 0 : tokens[openIndex];
1376
- const closeToken = closeIndex === void 0 ? void 0 : tokens[closeIndex];
1371
+ if (typeof item?.paragraphIndex === "number") {
1372
+ const openToken = tokens[item.paragraphIndex];
1373
+ const closeToken = tokens[item.paragraphIndex + 2];
1377
1374
  if (openToken && closeToken) {
1378
1375
  openToken.hidden = true;
1379
1376
  closeToken.hidden = true;
@@ -1383,8 +1380,7 @@ function compactLooseListTokens(tokens) {
1383
1380
  }
1384
1381
  const currentItem = listItemStack.at(-1);
1385
1382
  if (!currentItem || token.level !== currentItem.level + 1) continue;
1386
- if (token.type === "paragraph_open") currentItem.immediateParagraphOpenIndexes.push(index);
1387
- else if (token.type === "paragraph_close") currentItem.immediateParagraphCloseIndexes.push(index);
1383
+ if (token.type === "paragraph_open") currentItem.paragraphIndex = currentItem.paragraphIndex === void 0 ? index : null;
1388
1384
  }
1389
1385
  }
1390
1386
  function markdownToMatrixHtml(markdown, options = {}) {
@@ -1,3 +1,3 @@
1
1
  import { r as setMatrixRuntime } from "./runtime-6S3DNFNv.js";
2
- import { t as createMatrixThreadBindingManager } from "./thread-bindings-DgxQEB99.js";
2
+ import { t as createMatrixThreadBindingManager } from "./thread-bindings-BkBnn4te.js";
3
3
  export { createMatrixThreadBindingManager, setMatrixRuntime };
@@ -1,6 +1,6 @@
1
1
  import { a as resolveMatrixAccountConfig, n as hasExplicitMatrixAccountConfig } from "./account-config-CRsKoMqJ.js";
2
2
  import "./accounts-DR1c4xF_.js";
3
- import { n as bootstrapMatrixVerification } from "./verification-D-iOebn4.js";
3
+ import { n as bootstrapMatrixVerification } from "./verification-XJtTc5DI.js";
4
4
  import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
5
5
  //#region extensions/matrix/src/setup-bootstrap.ts
6
6
  async function maybeBootstrapNewEncryptedMatrixAccount(params) {
@@ -311,7 +311,7 @@ const matrixSetupAdapter = {
311
311
  input
312
312
  }),
313
313
  afterAccountConfigWritten: async ({ previousCfg, cfg, accountId, runtime }) => {
314
- const { runMatrixSetupBootstrapAfterConfigWrite } = await import("./setup-bootstrap-Co985F63.js");
314
+ const { runMatrixSetupBootstrapAfterConfigWrite } = await import("./setup-bootstrap-S_loyUyM.js");
315
315
  await runMatrixSetupBootstrapAfterConfigWrite({
316
316
  previousCfg,
317
317
  cfg,
@@ -1,2 +1,2 @@
1
- import { n as matrixSetupPlugin } from "./channel.setup-BY42QaL7.js";
1
+ import { n as matrixSetupPlugin } from "./channel.setup-DhmDXwPp.js";
2
2
  export { matrixSetupPlugin };
@@ -4,7 +4,7 @@ import { a as resolveMatrixAccountConfig } from "./account-config-CRsKoMqJ.js";
4
4
  import { i as resolveMatrixAccount, r as resolveDefaultMatrixAccountId, t as listMatrixAccountIds } from "./accounts-DR1c4xF_.js";
5
5
  import { n as isMatrixRoomId } from "./target-ids-Nwx7cMVE.js";
6
6
  import { r as updateMatrixAccountConfig } from "./config-update-BnX26jCO.js";
7
- import { a as moveSingleMatrixAccountConfigToNamedAccount, i as createMatrixSetupDmPolicy } from "./setup-core-CEF6exLW.js";
7
+ import { a as moveSingleMatrixAccountConfigToNamedAccount, i as createMatrixSetupDmPolicy } from "./setup-core-XkIfQ65J.js";
8
8
  import { n as validateMatrixHomeserverUrl, r as isPrivateOrLoopbackHost, t as resolveValidatedMatrixHomeserverUrl } from "./url-validation-GRHde6lq.js";
9
9
  import { n as ensureMatrixSdkInstalled, r as isMatrixSdkAvailable } from "./deps-mtxF2mHI.js";
10
10
  import { normalizeLowercaseStringOrEmpty, normalizeOptionalString, normalizeStringifiedOptionalString, normalizeUniqueStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
@@ -464,7 +464,7 @@ const matrixOnboardingAdapter = {
464
464
  });
465
465
  },
466
466
  afterConfigWritten: async ({ previousCfg, cfg, accountId, runtime }) => {
467
- const { runMatrixSetupBootstrapAfterConfigWrite } = await import("./setup-bootstrap-Co985F63.js");
467
+ const { runMatrixSetupBootstrapAfterConfigWrite } = await import("./setup-bootstrap-S_loyUyM.js");
468
468
  await runMatrixSetupBootstrapAfterConfigWrite({
469
469
  previousCfg,
470
470
  cfg,
@@ -1,7 +1,7 @@
1
1
  import { t as getMatrixRuntime } from "./runtime-6S3DNFNv.js";
2
2
  import { a as listBindingsForAccount, c as resolveEffectiveBindingExpiry, d as setMatrixThreadBindingManagerEntry, l as setBindingRecord, m as toSessionBindingRecord, o as removeBindingRecord, p as toMatrixBindingTargetKind, r as getMatrixThreadBindingManagerEntry, s as resolveBindingKey, t as deleteMatrixThreadBindingManagerEntry } from "./thread-bindings-shared-oNPiyMWY.js";
3
3
  import { M as resolveMatrixSqliteStateEnv, N as resolveMatrixSqliteStateKey, c as resolveMatrixStateFilePath, t as claimCurrentTokenStorageState } from "./storage-BVf4uucD.js";
4
- import { r as sendMessageMatrix } from "./send-DG7Bnj7_.js";
4
+ import { r as sendMessageMatrix } from "./send-B5XChnvB.js";
5
5
  import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
6
6
  import { createHash } from "node:crypto";
7
7
  import path from "node:path";
@@ -1,16 +1,16 @@
1
1
  import { a as resolveMatrixAccountConfig, o as resolveMatrixBaseConfig } from "./account-config-CRsKoMqJ.js";
2
2
  import { i as resolveMatrixAccount } from "./accounts-DR1c4xF_.js";
3
- import { l as resolveMatrixRoomConfig } from "./channel-b-jES-oi.js";
3
+ import { l as resolveMatrixRoomConfig } from "./channel-Bs8VLb6q.js";
4
4
  import { i as normalizeMatrixResolvableTarget } from "./target-ids-Nwx7cMVE.js";
5
5
  import { i as buildMatrixReactionRelationsPath, o as selectOwnMatrixReactionEventIds, s as summarizeMatrixReactionEvents } from "./reaction-common-DkrQdBSZ.js";
6
- import { b as resolveMatrixRoomId, h as parsePollStart, l as buildPollResponseContent, m as isPollStartType, n as reactMatrixMessage } from "./send-DG7Bnj7_.js";
6
+ import { b as resolveMatrixRoomId, h as parsePollStart, l as buildPollResponseContent, m as isPollStartType, n as reactMatrixMessage } from "./send-B5XChnvB.js";
7
7
  import { i as isStrictDirectMembership, n as hasDirectMatrixMemberFlag, o as readJoinedMatrixMembers } from "./direct-room-RinHjtqX.js";
8
- import { a as fetchEventSummary, i as sendMatrixMessage, n as editMatrixMessage, o as readPinnedEvents, p as resolveMatrixActionLimit, r as readMatrixMessages, s as EventType, t as deleteMatrixMessage } from "./messages-C1U3b1oN.js";
9
- import { n as withResolvedActionClient, r as withResolvedRoomAction } from "./client-D2utPQ1E.js";
8
+ import { a as fetchEventSummary, i as sendMatrixMessage, n as editMatrixMessage, o as readPinnedEvents, p as resolveMatrixActionLimit, r as readMatrixMessages, s as EventType, t as deleteMatrixMessage } from "./messages-Czn8lNEh.js";
9
+ import { n as withResolvedActionClient, r as withResolvedRoomAction } from "./client-oNOlldJI.js";
10
10
  import { r as parseMxc } from "./event-helpers-XRfAbOIh.js";
11
- import { t as applyMatrixProfileUpdate } from "./profile-update-Cd1p8ABr.js";
12
- 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-D-iOebn4.js";
13
- import { n as getMatrixMemberInfo, r as getMatrixRoomInfo, t as createMatrixRoomInfoResolver } from "./room-info-DVkKDscD.js";
11
+ import { t as applyMatrixProfileUpdate } from "./profile-update-CAl8nZNG.js";
12
+ 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-XJtTc5DI.js";
13
+ import { n as getMatrixMemberInfo, r as getMatrixRoomInfo, t as createMatrixRoomInfoResolver } from "./room-info-6viLR3NH.js";
14
14
  import { isRecord, normalizeOptionalLowercaseString, uniqueStrings, uniqueValues } from "openclaw/plugin-sdk/string-coerce-runtime";
15
15
  import { ToolAuthorizationError, createActionGate, jsonResult, readPositiveIntegerParam, readReactionParams, readStringArrayParam, readStringParam } from "openclaw/plugin-sdk/channel-actions";
16
16
  import { normalizeAccountId } from "openclaw/plugin-sdk/account-id";
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
2
- import { i as withStartedActionClient, n as withResolvedActionClient } from "./client-D2utPQ1E.js";
2
+ import { i as withStartedActionClient, n as withResolvedActionClient } from "./client-oNOlldJI.js";
3
3
  import { n as formatMatrixEncryptionUnavailableError } from "./encryption-guidance-BNcZNQZI.js";
4
4
  import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
5
5
  import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime";