@openclaw/matrix 2026.9.2 → 2026.9.4

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 (68) hide show
  1. package/dist/{account-selection-DA-jfx22.js → account-selection-Bbtc483D.js} +9 -1
  2. package/dist/{accounts-DR1c4xF_.js → accounts-GwSAk9vY.js} +2 -2
  3. package/dist/api.js +6 -6
  4. package/dist/{approval-handler.runtime-BJCD4dLf.js → approval-handler.runtime-6I3IpyeX.js} +6 -6
  5. package/dist/{approval-ids-Bst7HM_o.js → approval-ids-C4NdeXNz.js} +1 -1
  6. package/dist/{approval-reaction-auth-DhH8QOSe.js → approval-reaction-auth-cbltZAUQ.js} +2 -2
  7. package/dist/{channel-Bs8VLb6q.js → channel-Cg97H4c1.js} +13 -202
  8. package/dist/channel-plugin-api.js +1 -1
  9. package/dist/{channel.runtime-CCJRhdH5.js → channel.runtime-Bhpfa1qc.js} +6 -11
  10. package/dist/{channel.setup-DhmDXwPp.js → channel.setup-DmS7m7aT.js} +3 -3
  11. package/dist/{cli-IvDUuiDH.js → cli-CLexRrQw.js} +9 -9
  12. package/dist/{cli-metadata-BGryAl2e.js → cli-metadata-zRyVmUOL.js} +1 -1
  13. package/dist/cli-metadata.js +1 -1
  14. package/dist/{client-oNOlldJI.js → client-C0nZFCTj.js} +2 -2
  15. package/dist/{client-Dj4mcf-s.js → client-CPcRv6ab.js} +6 -6
  16. package/dist/{client-bootstrap-n1Rqc8Go.js → client-bootstrap-DLN-K8Xb.js} +1 -6
  17. package/dist/contract-api.js +2 -2
  18. package/dist/{credentials-DJj2xs3q.js → credentials-DysXbkv2.js} +2 -2
  19. package/dist/{credentials-read-mexhw-Ur.js → credentials-read-WWpqi88V.js} +1 -1
  20. package/dist/{credentials-write.runtime-DQt-kgJq.js → credentials-write.runtime-D22lPwRO.js} +1 -1
  21. package/dist/{crypto-runtime-m1eplj3b.js → crypto-runtime-DiyH4R3D.js} +3 -25
  22. package/dist/{crypto-snapshot-doctor.runtime-D0v841D_.js → crypto-snapshot-doctor.runtime-DxgUMXUy.js} +2 -2
  23. package/dist/{directory-live-DLUgWBhA.js → directory-live-B8-GAVcc.js} +2 -2
  24. package/dist/doctor-contract-api.js +41 -21
  25. package/dist/{draft-stream-DglwxWzJ.js → draft-stream--NdEtnZ8.js} +16 -5
  26. package/dist/{encryption-guidance-BNcZNQZI.js → encryption-guidance-mDyxJV9U.js} +1 -1
  27. package/dist/{event-helpers-XRfAbOIh.js → event-helpers-CspuhE9k.js} +9 -1
  28. package/dist/helper-api.js +3 -3
  29. package/dist/{http-client-DOmFvKvB.js → http-client-BfPeF4CE.js} +1 -1
  30. package/dist/{idb-persistence-CU7CNLlX.js → idb-persistence-DBdwHSWg.js} +1 -1
  31. package/dist/index.js +1 -1
  32. package/dist/{messages-Czn8lNEh.js → messages-CpZfiQO0.js} +6 -99
  33. package/dist/{monitor-DouG43FJ.js → monitor-BUek91SW.js} +61 -92
  34. package/dist/{outbound-Co_tJyE6.js → outbound-D91JinYa.js} +1 -1
  35. package/dist/plugin-entry.handlers.runtime.js +1 -1
  36. package/dist/probe.runtime-DWdw74_H.js +2 -0
  37. package/dist/{profile-update-CAl8nZNG.js → profile-update-vnhxwjEt.js} +1 -1
  38. package/dist/{reaction-events-C_7G7bvI.js → reaction-events-2WM2nJe_.js} +5 -7
  39. package/dist/{resolve-targets-B64O69Nd.js → resolve-targets-K8D0HWPX.js} +1 -1
  40. package/dist/{resolver.runtime-TRmePJDV.js → resolver.runtime-C88GwQCx.js} +1 -1
  41. package/dist/{room-info-6viLR3NH.js → room-info-BPVJkXnp.js} +7 -4
  42. package/dist/runtime-api.js +2 -2
  43. package/dist/{sdk-C1yfda1L.js → sdk-B4By16Bt.js} +13 -6
  44. package/dist/{send-B5XChnvB.js → send-UWLIQ0bG.js} +211 -135
  45. package/dist/session-binding-contract-api.js +1 -1
  46. package/dist/{setup-bootstrap-S_loyUyM.js → setup-bootstrap-sVqkwtSY.js} +2 -2
  47. package/dist/{setup-core-XkIfQ65J.js → setup-core-8keb-Yre.js} +14 -29
  48. package/dist/setup-plugin-api.js +1 -1
  49. package/dist/{setup-surface-B2yZ8KGc.js → setup-surface-bcluelBI.js} +8 -17
  50. package/dist/{startup-verification-1Ney1mmI.js → startup-verification-BTSf31hS.js} +2 -1
  51. package/dist/storage-CV-pfV_2.js +320 -0
  52. package/dist/{storage-BVf4uucD.js → storage-metadata-DYArLcq1.js} +14 -319
  53. package/dist/{storage-paths-gUmSydsW.js → storage-paths-DVCANXTc.js} +13 -1
  54. package/dist/{sync-cache-state-d-A_OhbU.js → sync-cache-state-C-mhj3xb.js} +9 -3
  55. package/dist/{thread-bindings-BkBnn4te.js → thread-bindings-Bwv87Gve.js} +3 -2
  56. package/dist/{tool-actions.runtime-a5L5xGSP.js → tool-actions.runtime-Bf98Juk6.js} +295 -256
  57. package/dist/types-DzSc7Sqm.js +32 -0
  58. package/dist/{verification-XJtTc5DI.js → verification-BbG-VC9S.js} +2 -2
  59. package/node_modules/@matrix-org/matrix-sdk-crypto-wasm/package.json +1 -1
  60. package/node_modules/@matrix-org/matrix-sdk-crypto-wasm/pkg/matrix_sdk_crypto_wasm.d.ts +69 -4
  61. package/node_modules/@matrix-org/matrix-sdk-crypto-wasm/pkg/matrix_sdk_crypto_wasm_bg.cjs +526 -432
  62. package/node_modules/@matrix-org/matrix-sdk-crypto-wasm/pkg/matrix_sdk_crypto_wasm_bg.js +358 -265
  63. package/node_modules/@matrix-org/matrix-sdk-crypto-wasm/pkg/matrix_sdk_crypto_wasm_bg.wasm +0 -0
  64. package/node_modules/@matrix-org/matrix-sdk-crypto-wasm/pkg/matrix_sdk_crypto_wasm_bg.wasm.d.ts +8 -7
  65. package/openclaw.plugin.json +27 -1
  66. package/package.json +5 -5
  67. package/dist/probe.runtime-B1YPxG9x.js +0 -2
  68. package/dist/runtime-BefyhPWv.js +0 -6
@@ -1,36 +1,37 @@
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
- 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-Bs8VLb6q.js";
5
- import { a as normalizeMatrixUserId, i as normalizeMatrixAllowList, o as resolveMatrixAllowListMatch } from "./channel.setup-DhmDXwPp.js";
3
+ import { n as resolveConfiguredMatrixBotUserIds } from "./accounts-GwSAk9vY.js";
4
+ import { _ as toLocationContext, a as resolveMatrixRoomConfig, c as canonicalizeAllowlistWithResolvedIds, d as formatLocationText, f as getAgentScopedMediaLocalRoots, g as summarizeMapping, h as patchAllowlistUsersInConfigEntries, i as resolveMatrixThreadRouting, l as createReplyPrefixOptions, m as logTypingFailure, n as resolveMatrixStoredSessionMeta, o as addAllowlistUserEntriesFromConfigEntry, p as logInboundDrop, r as resolveMatrixInboundRoute, s as buildAllowlistResolutionSummary, u as createTypingCallbacks } from "./channel-Cg97H4c1.js";
5
+ import { a as normalizeMatrixUserId, i as normalizeMatrixAllowList, o as resolveMatrixAllowListMatch } from "./channel.setup-DmS7m7aT.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-B5XChnvB.js";
7
+ import { A as promoteMatrixDirectRoomCandidate, S as isPollStartType, c as formatMatrixMediaTooLargeText, d as isLikelyBareFilename, g as resolveMatrixThreadRootId, h as resolveMatrixReplyToEventId, l as formatMatrixMediaUnavailableText, p as resolveMatrixReplacementContent, r as sendMessageMatrix, u as formatMatrixMessageText, w as parsePollStartContent, x as isPollEventType, y as formatPollAsText } from "./send-UWLIQ0bG.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-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
- import { t as isBunRuntime } from "./runtime-BefyhPWv.js";
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
- import { i as isMatrixMediaSizeLimitError, r as MatrixMediaSizeLimitError } from "./http-client-DOmFvKvB.js";
14
- import { n as prepareMatrixReplyPayload, r as resolveMatrixExtraContent } from "./outbound-Co_tJyE6.js";
15
- import { t as resolveMatrixTargets } from "./resolve-targets-B64O69Nd.js";
16
- import { t as formatMatrixEncryptedEventDisabledWarning } from "./encryption-guidance-BNcZNQZI.js";
9
+ import { n as MATRIX_REACTION_EVENT_TYPE } from "./reaction-common-DkrQdBSZ.js";
10
+ import { n as MATRIX_OPENCLAW_FINALIZED_PREVIEW_KEY } from "./types-DzSc7Sqm.js";
11
+ import { t as createMatrixThreadBindingManager } from "./thread-bindings-Bwv87Gve.js";
12
+ import { l as fetchMatrixPollSnapshot, r as readMatrixMessages } from "./messages-CpZfiQO0.js";
13
+ import { a as throwIfMatrixStartupAborted, c as backfillMatrixAuthDeviceIdAfterStartup, i as isMatrixStartupAbortError, l as resolveMatrixAuth, n as acquireSharedMatrixClient, o as createMatrixMonitorTaskRunner, u as resolveMatrixAuthContext } from "./client-CPcRv6ab.js";
14
+ import { i as isMatrixMediaSizeLimitError, r as MatrixMediaSizeLimitError } from "./http-client-BfPeF4CE.js";
15
+ import { n as prepareMatrixReplyPayload, r as resolveMatrixExtraContent } from "./outbound-D91JinYa.js";
16
+ import { t as resolveMatrixTargets } from "./resolve-targets-K8D0HWPX.js";
17
+ import { t as formatMatrixEncryptedEventDisabledWarning } from "./encryption-guidance-mDyxJV9U.js";
17
18
  import { createMatrixInboundEventDeduper } from "./inbound-dedupe-Ch33GU06.js";
18
19
  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-6viLR3NH.js";
20
+ import { i as setBoundedMap, r as getMatrixRoomInfo, t as createMatrixRoomInfoResolver } from "./room-info-BPVJkXnp.js";
20
21
  import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
21
- import { createChannelProgressDraftCompositor, createMessageReceiptFromOutboundResults, createPreviewMessageReceipt, defineFinalizableLivePreviewAdapter, deliverWithFinalizableLivePreviewAdapter, formatChannelProgressDraftText, listMessageReceiptPlatformIds, resolveChannelStreamingBlockEnabled, waitUntilAbort } from "openclaw/plugin-sdk/channel-outbound";
22
+ import { createChannelProgressDraftCompositor, createPreviewMessageReceipt, defineFinalizableLivePreviewAdapter, deliverWithFinalizableLivePreviewAdapter, resolveChannelStreamingBlockEnabled, waitUntilAbort } from "openclaw/plugin-sdk/channel-outbound";
22
23
  import { normalizeLowercaseStringOrEmpty, normalizeNullableString, normalizeOptionalString, normalizeStringifiedEntries, readStringValue, uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
23
24
  import { stripReasoningTagsFromText } from "openclaw/plugin-sdk/text-chunking";
24
25
  import { CHANNEL_APPROVAL_NATIVE_RUNTIME_CONTEXT_CAPABILITY } from "openclaw/plugin-sdk/approval-handler-adapter-runtime";
25
26
  import { extractErrorCode, formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
26
27
  import { isFutureDateTimestampMs, parseStrictFiniteNumber, resolveExpiresAtMsFromDurationMs, resolveOptionalIntegerOption } from "openclaw/plugin-sdk/number-runtime";
27
28
  import { resolveAgentRoute, resolveInboundLastRouteSessionKey } from "openclaw/plugin-sdk/routing";
28
- import { createChannelInboundEnvelopeBuilder, createChannelPartialDeliveryError, hasFinalInboundReplyDispatch, isChannelPartialDeliveryError, resolveInboundMentionDecision, resolveInboundReplyDispatchCounts, toInboundMediaFactsWithMetadata } from "openclaw/plugin-sdk/channel-inbound";
29
+ import { createAcceptedChannelDeliveryResult, createChannelInboundEnvelopeBuilder, createChannelPartialDeliveryError, hasFinalInboundReplyDispatch, isChannelPartialDeliveryError, resolveInboundMentionDecision, resolveInboundReplyDispatchCounts, toInboundMediaFactsWithMetadata } from "openclaw/plugin-sdk/channel-inbound";
29
30
  import { getSessionEntry, resolveStorePath } from "openclaw/plugin-sdk/session-store-runtime";
30
31
  import { KeyedAsyncQueue } from "openclaw/plugin-sdk/keyed-async-queue";
32
+ import { escapeRegExp, sliceUtf16Safe, truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
31
33
  import { format } from "node:util";
32
34
  import { resolvePinnedMainDmOwnerFromAllowlist } from "openclaw/plugin-sdk/security-runtime";
33
- import { escapeRegExp, sliceUtf16Safe, truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
34
35
  import { buildTtsSupplementMediaPayload, getReplyPayloadTtsSupplement, resolveSendableOutboundReplyParts } from "openclaw/plugin-sdk/reply-payload";
35
36
  import { registerChannelRuntimeContext } from "openclaw/plugin-sdk/channel-runtime-context";
36
37
  import { GROUP_POLICY_BLOCKED_LABEL, resolveAllowlistProviderRuntimeGroupPolicy, resolveDefaultGroupPolicy, warnMissingProviderGroupPolicyFallbackOnce } from "openclaw/plugin-sdk/runtime-group-policy";
@@ -680,6 +681,19 @@ function createDirectRoomTracker(client, opts = {}) {
680
681
  };
681
682
  }
682
683
  //#endregion
684
+ //#region extensions/matrix/src/matrix/monitor/types.ts
685
+ const EventType = {
686
+ RoomMessage: "m.room.message",
687
+ RoomMessageEncrypted: "m.room.encrypted",
688
+ RoomMember: "m.room.member",
689
+ Location: "m.location",
690
+ Reaction: MATRIX_REACTION_EVENT_TYPE
691
+ };
692
+ const RelationType = {
693
+ Replace: "m.replace",
694
+ Thread: "m.thread"
695
+ };
696
+ //#endregion
683
697
  //#region extensions/matrix/src/matrix/monitor/access-state.ts
684
698
  function normalizeMatrixEntry(raw) {
685
699
  return normalizeMatrixAllowList([raw ?? ""])[0] ?? null;
@@ -823,7 +837,7 @@ const matrixVerificationConstants = {
823
837
  const MAX_TRACKED_VERIFICATION_EVENTS = 1024;
824
838
  const SAS_NOTICE_RETRY_DELAY_MS = 750;
825
839
  const VERIFICATION_EVENT_STARTUP_GRACE_MS = 3e4;
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]) => ({
840
+ const loadMatrixDirectRoomDeps = createLazyRuntimeModule(() => Promise.all([import("./send-UWLIQ0bG.js").then((n) => n.k), import("./direct-room-RinHjtqX.js").then((n) => n.t)]).then(([directManagementModule, directRoomModule]) => ({
827
841
  inspectMatrixDirectRooms: directManagementModule.inspectMatrixDirectRooms,
828
842
  isStrictDirectRoom: directRoomModule.isStrictDirectRoom
829
843
  })));
@@ -1641,11 +1655,11 @@ async function redactMatrixDraftEvent(client, roomId, draftEventId) {
1641
1655
  function buildMatrixFinalizedPreviewContent() {
1642
1656
  return { [MATRIX_OPENCLAW_FINALIZED_PREVIEW_KEY]: true };
1643
1657
  }
1644
- const loadMatrixSendModule = createLazyRuntimeModule(() => import("./send-B5XChnvB.js").then((n) => n.s));
1658
+ const loadMatrixSendModule = createLazyRuntimeModule(() => import("./send-UWLIQ0bG.js").then((n) => n.s));
1645
1659
  const loadAcpBindingRuntime = createLazyRuntimeModule(() => import("openclaw/plugin-sdk/acp-binding-runtime"));
1646
1660
  const loadSessionBindingRuntime = createLazyRuntimeModule(() => import("openclaw/plugin-sdk/session-binding-runtime"));
1647
- const loadMatrixReactionEvents = createLazyRuntimeModule(() => import("./reaction-events-C_7G7bvI.js"));
1648
- const loadMatrixDraftStream = createLazyRuntimeModule(() => import("./draft-stream-DglwxWzJ.js"));
1661
+ const loadMatrixReactionEvents = createLazyRuntimeModule(() => import("./reaction-events-2WM2nJe_.js"));
1662
+ const loadMatrixDraftStream = createLazyRuntimeModule(() => import("./draft-stream--NdEtnZ8.js"));
1649
1663
  async function matrixTextWouldActivateMentions(client, text) {
1650
1664
  const { resolveMatrixMentionsForBody } = await loadMatrixSendModule();
1651
1665
  const mentions = await resolveMatrixMentionsForBody({
@@ -1661,7 +1675,7 @@ function summarizeMatrixMessageContextEvent(event) {
1661
1675
  const pollSummary = parsePollStartContent(event.content);
1662
1676
  if (pollSummary) return formatPollAsText(pollSummary);
1663
1677
  }
1664
- const content = event.unsigned?.redacted_because ? event.content : resolveBundledMatrixReplacementContent(event) ?? event.content;
1678
+ const content = resolveMatrixReplacementContent(event) ?? event.content;
1665
1679
  return formatMatrixMessageText({
1666
1680
  body: readStringValue(content.body),
1667
1681
  filename: readStringValue(content.filename),
@@ -1808,10 +1822,8 @@ async function resolveMatrixInboundContext(config) {
1808
1822
  roomId,
1809
1823
  threadRootId
1810
1824
  }) : void 0;
1811
- let threadContextBlockedByPolicy = false;
1812
1825
  if (threadContext?.senderId && !shouldIncludeRoomContextSender("thread", threadContext.senderId)) {
1813
1826
  logVerboseMessage(`matrix: drop thread root context (mode=${contextVisibilityMode})`);
1814
- threadContextBlockedByPolicy = true;
1815
1827
  threadContext = void 0;
1816
1828
  }
1817
1829
  let replyContext;
@@ -1820,10 +1832,6 @@ async function resolveMatrixInboundContext(config) {
1820
1832
  replyToSender: threadContext.senderLabel,
1821
1833
  replyToSenderId: threadContext.senderId
1822
1834
  };
1823
- else if (replyToEventId && replyToEventId === threadRootId && threadContextBlockedByPolicy) replyContext = await resolveReplyContext({
1824
- roomId,
1825
- eventId: replyToEventId
1826
- });
1827
1835
  else replyContext = replyToEventId ? await resolveReplyContext({
1828
1836
  roomId,
1829
1837
  eventId: replyToEventId
@@ -2008,20 +2016,8 @@ async function createMatrixDraftController(params) {
2008
2016
  const pendingDraftBoundaries = [];
2009
2017
  const latestQueuedDraftBoundaryOffsets = /* @__PURE__ */ new Map();
2010
2018
  let currentDraftReplyToId = draftReplyToId;
2011
- let previewPlan;
2012
- let previewPlanExplanation;
2013
- let previewPlanSuppressed = false;
2014
2019
  const progressConfigEntry = accountConfig ?? cfg.channels?.matrix;
2015
2020
  const progressSeed = `${accountId}:${roomId}`;
2016
- const renderPreviewPlan = () => formatChannelProgressDraftText({
2017
- entry: progressConfigEntry,
2018
- lines: [...progressDraft.getSnapshot().lines],
2019
- seed: progressSeed,
2020
- formatLine: formatMatrixToolProgressMarkdownCode,
2021
- bullet: "-",
2022
- narration: previewPlanExplanation,
2023
- plan: previewPlan
2024
- });
2025
2021
  const progressDraft = createChannelProgressDraftCompositor({
2026
2022
  entry: progressConfigEntry,
2027
2023
  mode: streaming === "quiet" ? "partial" : streaming,
@@ -2029,19 +2025,14 @@ async function createMatrixDraftController(params) {
2029
2025
  seed: progressSeed,
2030
2026
  formatLine: formatMatrixToolProgressMarkdownCode,
2031
2027
  update: async (text, options) => {
2032
- const previewText = !progressDraftStreaming && (previewPlan || previewPlanExplanation) ? renderPreviewPlan() : text.replace(/^• /gmu, "- ");
2028
+ const previewText = text.replace(/^• /gmu, "- ");
2033
2029
  if (!draftStream) return false;
2034
2030
  draftStream.update(previewText);
2035
2031
  if (options?.flush) await draftStream.flush();
2036
2032
  return Boolean(draftStream.eventId());
2037
- }
2033
+ },
2034
+ deleteCurrent: () => draftStream?.deleteCurrentMessage()
2038
2035
  });
2039
- const resetPreviewToolProgress = () => {
2040
- previewPlan = void 0;
2041
- previewPlanExplanation = void 0;
2042
- previewPlanSuppressed = false;
2043
- progressDraft.reset();
2044
- };
2045
2036
  const buildPreviewToolProgressReplyOptions = () => {
2046
2037
  if (!shouldSuppressDefaultToolProgressMessages) return {};
2047
2038
  return {
@@ -2054,13 +2045,7 @@ async function createMatrixDraftController(params) {
2054
2045
  },
2055
2046
  onPlanUpdate: async (payload) => {
2056
2047
  if (payload.phase !== "update") return false;
2057
- if (progressDraftStreaming) return await progressDraft.pushPlanProgress(payload.steps, { explanation: payload.explanation });
2058
- if (!draftStream || previewPlanSuppressed) return false;
2059
- previewPlan = payload.steps?.length ? payload.steps.map((step) => ({ ...step })) : void 0;
2060
- previewPlanExplanation = payload.explanation?.replace(/\s+/g, " ").trim() || void 0;
2061
- const text = renderPreviewPlan();
2062
- if (text) draftStream.update(text);
2063
- return false;
2048
+ return await progressDraft.pushPlanProgress(payload.steps, { explanation: payload.explanation });
2064
2049
  },
2065
2050
  onApprovalEvent: async (payload) => {
2066
2051
  return await progressDraft.pushApprovalEvent(payload);
@@ -2117,7 +2102,6 @@ async function createMatrixDraftController(params) {
2117
2102
  latestQueuedDraftBoundaryOffsets.clear();
2118
2103
  currentDraftReplyToId = draftReplyToId;
2119
2104
  progressDraft.beginNewTurn({ force: true });
2120
- resetPreviewToolProgress();
2121
2105
  };
2122
2106
  return {
2123
2107
  draftStream,
@@ -2126,12 +2110,13 @@ async function createMatrixDraftController(params) {
2126
2110
  queueDraftBlockBoundary,
2127
2111
  advanceDraftBlockBoundary,
2128
2112
  resetDraftBlockOffsets,
2129
- resetPreviewToolProgress,
2113
+ beginAssistantMessage: () => progressDraft.beginAssistantMessage(),
2130
2114
  resetDraftDeliveryState,
2131
2115
  updateDraftFromLatestFullText,
2132
2116
  draftDisposition: () => draftDisposition,
2133
2117
  beginDraftGeneration: () => {
2134
2118
  draftDisposition = "active";
2119
+ progressDraft.resetActivity();
2135
2120
  },
2136
2121
  markDraftConsumed: () => {
2137
2122
  draftDisposition = "consumed";
@@ -2149,12 +2134,7 @@ async function createMatrixDraftController(params) {
2149
2134
  onPartialReply: (text) => {
2150
2135
  if (progressDraftStreaming) return false;
2151
2136
  latestDraftFullText = text;
2152
- if (text.trim()) {
2153
- previewPlanSuppressed = true;
2154
- previewPlan = void 0;
2155
- previewPlanExplanation = void 0;
2156
- progressDraft.suppress();
2157
- }
2137
+ if (text.trim()) progressDraft.resetActivity({ suppressed: true });
2158
2138
  updateDraftFromLatestFullText();
2159
2139
  return false;
2160
2140
  }
@@ -2410,10 +2390,7 @@ async function resolveMatrixIngressAccess(config) {
2410
2390
  const isRoom = !isDirectMessage;
2411
2391
  const { audioPreflightMode, locationPayload, reservedHistorySlot, selfUserId } = paramsLocal;
2412
2392
  const messageId = event.event_id ?? "";
2413
- const threadRootId = resolveMatrixThreadRootId({
2414
- event,
2415
- content
2416
- });
2393
+ const threadRootId = resolveMatrixThreadRootId(content);
2417
2394
  const thread = resolveMatrixThreadRouting({
2418
2395
  isDirectMessage,
2419
2396
  threadReplies,
@@ -3232,22 +3209,14 @@ function mergeMatrixReplyDeliveryResults(results) {
3232
3209
  visibleReplySent: false,
3233
3210
  suppression: { reason: "no_visible_result" }
3234
3211
  };
3235
- const receiptInputs = [];
3236
- for (const result of visibleResults) {
3237
- if (result.receipt) {
3238
- receiptInputs.push({ receipt: result.receipt });
3239
- continue;
3240
- }
3241
- for (const messageId of result.messageIds ?? []) receiptInputs.push({ messageId });
3242
- }
3243
- const receipt = receiptInputs.length > 0 ? createMessageReceiptFromOutboundResults({ results: receiptInputs }) : void 0;
3212
+ const content = joinMatrixVisibleContent(visibleResults.map((result) => result.content));
3213
+ if (visibleResults.some((result) => result.receipt || result.messageIds?.length)) return createAcceptedChannelDeliveryResult({
3214
+ deliveryResults: visibleResults,
3215
+ content
3216
+ });
3244
3217
  return {
3245
- ...receipt ? {
3246
- messageIds: listMessageReceiptPlatformIds(receipt),
3247
- receipt
3248
- } : {},
3249
3218
  visibleReplySent: true,
3250
- content: joinMatrixVisibleContent(visibleResults.map((result) => result.content))
3219
+ content
3251
3220
  };
3252
3221
  }
3253
3222
  function toMatrixPartialDeliveryError(error, settled) {
@@ -3260,13 +3229,10 @@ function toMatrixPartialDeliveryError(error, settled) {
3260
3229
  }
3261
3230
  function createMatrixReplyDeliveryResult(results) {
3262
3231
  if (results.length === 0) return mergeMatrixReplyDeliveryResults([]);
3263
- const receipt = createMessageReceiptFromOutboundResults({ results: results.map((result) => ({ receipt: result.receipt })) });
3264
- return {
3265
- messageIds: listMessageReceiptPlatformIds(receipt),
3266
- receipt,
3267
- visibleReplySent: true,
3232
+ return createAcceptedChannelDeliveryResult({
3233
+ results: results.map((result) => ({ receipt: result.receipt })),
3268
3234
  content: joinMatrixVisibleContent(results.map((result) => result.content))
3269
- };
3235
+ });
3270
3236
  }
3271
3237
  function resolveVisibleMatrixReplyText(text) {
3272
3238
  if (typeof text !== "string") return;
@@ -3304,7 +3270,8 @@ async function deliverMatrixReplies(params) {
3304
3270
  }
3305
3271
  const explicitReplyToId = reply.replyToTag || reply.replyToCurrent ? reply.replyToId?.trim() : void 0;
3306
3272
  const rawText = visibleText ?? "";
3307
- const replyToIdForReply = explicitReplyToId || (params.threadId || params.replyToMode !== "off" && (params.replyToMode === "all" || !hasRepliedRef.value) ? (reply.replyToId ?? params.replyToId)?.trim() : void 0);
3273
+ const replyToIdForReply = explicitReplyToId || (!params.threadId && params.replyToMode !== "off" && (params.replyToMode === "all" || !hasRepliedRef.value) ? (reply.replyToId ?? params.replyToId)?.trim() : void 0);
3274
+ const fallbackReplyToId = params.threadId ? (reply.replyToId ?? params.replyToId)?.trim() : void 0;
3308
3275
  const onDeliveryResult = (result) => {
3309
3276
  acceptedResults.push(result);
3310
3277
  if (replyToIdForReply) hasRepliedRef.value = true;
@@ -3315,6 +3282,7 @@ async function deliverMatrixReplies(params) {
3315
3282
  client: params.client,
3316
3283
  cfg: params.cfg,
3317
3284
  replyToId: replyToIdForReply,
3285
+ fallbackReplyToId,
3318
3286
  threadId: params.threadId,
3319
3287
  accountId: params.accountId,
3320
3288
  extraContent,
@@ -3331,6 +3299,7 @@ async function deliverMatrixReplies(params) {
3331
3299
  mediaUrl,
3332
3300
  mediaLocalRoots: params.mediaLocalRoots,
3333
3301
  replyToId: replyToIdForReply,
3302
+ fallbackReplyToId,
3334
3303
  threadId: params.threadId,
3335
3304
  audioAsVoice: reply.audioAsVoice,
3336
3305
  accountId: params.accountId,
@@ -3428,7 +3397,7 @@ function createMatrixReplyDispatcher(config) {
3428
3397
  mediaLocalRoots
3429
3398
  }));
3430
3399
  }
3431
- const payloadReplyMismatch = !threadTarget && (replyToMode !== "off" || payload.replyToTag || payload.replyToCurrent) && normalizeOptionalString(payload.replyToId) !== draftController.currentReplyToId();
3400
+ const payloadReplyMismatch = (!threadTarget && replyToMode !== "off" || payload.replyToTag || payload.replyToCurrent) && normalizeOptionalString(payload.replyToId) !== draftController.currentReplyToId();
3432
3401
  let mustDeliverFinalNormally = draftStream.mustDeliverFinalNormally();
3433
3402
  if (Boolean(payload.text?.trim()) && !payload.isError && !payloadReplyMismatch && !mustDeliverFinalNormally) {
3434
3403
  await draftStream.stop();
@@ -4104,7 +4073,7 @@ function createMatrixRoomMessageHandler(params) {
4104
4073
  } : void 0,
4105
4074
  onAssistantMessageStart: draftStream ? () => {
4106
4075
  draftController.resetDraftBlockOffsets();
4107
- draftController.resetPreviewToolProgress();
4076
+ draftController.beginAssistantMessage();
4108
4077
  return false;
4109
4078
  } : void 0,
4110
4079
  onQueuedFollowupAdmitted: draftStream ? draftController.resetDraftDeliveryState : void 0,
@@ -4125,7 +4094,8 @@ function createMatrixRoomMessageHandler(params) {
4125
4094
  cfg,
4126
4095
  client,
4127
4096
  accountId: _route.accountId,
4128
- replyToId: threadTarget ?? (replyToMode === "off" ? void 0 : messageId),
4097
+ replyToId: threadTarget || replyToMode === "off" ? void 0 : messageId,
4098
+ fallbackReplyToId: threadTarget,
4129
4099
  threadId: threadTarget,
4130
4100
  deliveryQueueId: `matrix:restart-recovery-tombstone:${_route.accountId}:${roomId}:${eventId}`,
4131
4101
  deliveryPartIndex: 0,
@@ -4194,7 +4164,7 @@ const loadMatrixStartupMaintenanceDeps = createLazyRuntimeModule(() => Promise.a
4194
4164
  import("./config-update-BnX26jCO.js").then((n) => n.t),
4195
4165
  import("./device-health-B4-YXtJR.js").then((n) => n.t),
4196
4166
  import("./profile-vmjsmhh4.js").then((n) => n.n),
4197
- import("./startup-verification-1Ney1mmI.js")
4167
+ import("./startup-verification-BTSf31hS.js")
4198
4168
  ]).then(([configUpdateModule, deviceHealthModule, profileModule, startupVerificationModule]) => ({
4199
4169
  updateMatrixAccountConfig: configUpdateModule.updateMatrixAccountConfig,
4200
4170
  summarizeMatrixDeviceHealth: deviceHealthModule.summarizeMatrixDeviceHealth,
@@ -4433,7 +4403,6 @@ function resolveMatrixPreviewToolProgressEnabled(streaming) {
4433
4403
  const DEFAULT_MEDIA_MAX_MB = 20;
4434
4404
  async function monitorMatrixProvider(opts = {}) {
4435
4405
  if (opts.abortSignal?.aborted) return;
4436
- if (isBunRuntime()) throw new Error("Matrix provider requires Node (bun runtime not supported)");
4437
4406
  const core = getMatrixRuntime();
4438
4407
  let cfg = core.config.current();
4439
4408
  if (cfg.channels?.["matrix"]?.enabled === false) return;
@@ -1,4 +1,4 @@
1
- import { i as sendPollMatrix, r as sendMessageMatrix } from "./send-B5XChnvB.js";
1
+ import { i as sendPollMatrix, r as sendMessageMatrix } from "./send-UWLIQ0bG.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-XJtTc5DI.js").then((n) => n.y));
5
+ const loadMatrixVerificationRuntime = createLazyRuntimeModule(() => import("./verification-BbG-VC9S.js").then((n) => n.y));
6
6
  function sendError(respond, err) {
7
7
  respond(false, { error: formatErrorMessage(err) });
8
8
  }
@@ -0,0 +1,2 @@
1
+ import { s as createMatrixClient } from "./client-CPcRv6ab.js";
2
+ export { createMatrixClient };
@@ -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-oNOlldJI.js";
4
+ import { n as withResolvedActionClient } from "./client-C0nZFCTj.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,6 @@
1
1
  import { a as resolveMatrixAccountConfig } from "./account-config-CRsKoMqJ.js";
2
- import { a as resolveMatrixThreadRootId, o as resolveMatrixThreadRouting, r as resolveMatrixInboundRoute } from "./channel-Bs8VLb6q.js";
2
+ import { i as resolveMatrixThreadRouting, r as resolveMatrixInboundRoute } from "./channel-Cg97H4c1.js";
3
+ import { g as resolveMatrixThreadRootId } from "./send-UWLIQ0bG.js";
3
4
  import { a as extractMatrixReactionAnnotation } from "./reaction-common-DkrQdBSZ.js";
4
5
  import { i as resolveMatrixApprovalReactionTargetWithPersistence, o as unregisterMatrixApprovalReactionTargetsForApproval } from "./approval-reactions-1fwEhoK9.js";
5
6
  import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
@@ -7,9 +8,9 @@ import { isApprovalNotFoundError } from "openclaw/plugin-sdk/error-runtime";
7
8
  import { normalizeAccountId } from "openclaw/plugin-sdk/routing";
8
9
  import { getSessionBindingService } from "openclaw/plugin-sdk/session-binding-runtime";
9
10
  //#region extensions/matrix/src/matrix/monitor/reaction-events.ts
10
- const loadApprovalReactionAuth = createLazyRuntimeModule(() => import("./approval-reaction-auth-DhH8QOSe.js"));
11
+ const loadApprovalReactionAuth = createLazyRuntimeModule(() => import("./approval-reaction-auth-cbltZAUQ.js"));
11
12
  const loadExecApprovalResolver = createLazyRuntimeModule(() => import("openclaw/plugin-sdk/approval-gateway-runtime"));
12
- const loadMatrixSend = createLazyRuntimeModule(() => import("./send-B5XChnvB.js").then((n) => n.s));
13
+ const loadMatrixSend = createLazyRuntimeModule(() => import("./send-UWLIQ0bG.js").then((n) => n.s));
13
14
  function buildMatrixApprovalTerminalText(result) {
14
15
  const approval = result.approval;
15
16
  const terminalLabel = approval.status === "allowed" ? approval.decision === "allow-always" ? "Allowed always" : "Allowed once" : approval.status === "denied" ? "Denied" : approval.status === "expired" ? "Expired" : "Cancelled";
@@ -129,10 +130,7 @@ async function handleInboundMatrixReaction(params) {
129
130
  if (!targetSender) return;
130
131
  if (notificationMode === "own" && targetSender !== params.selfUserId) return;
131
132
  const targetContent = targetEvent && targetEvent.content && typeof targetEvent.content === "object" ? targetEvent.content : void 0;
132
- const threadRootId = targetContent ? resolveMatrixThreadRootId({
133
- event: targetEvent,
134
- content: targetContent
135
- }) : void 0;
133
+ const threadRootId = targetContent ? resolveMatrixThreadRootId(targetContent) : void 0;
136
134
  const accountConfig = resolveMatrixAccountConfig({
137
135
  cfg: params.cfg,
138
136
  accountId: params.accountId
@@ -1,6 +1,6 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
2
2
  import { r as normalizeMatrixMessagingTarget, t as isMatrixQualifiedUserId } from "./target-ids-Nwx7cMVE.js";
3
- import { n as listMatrixDirectoryGroupsLive, r as listMatrixDirectoryPeersLive } from "./directory-live-DLUgWBhA.js";
3
+ import { n as listMatrixDirectoryGroupsLive, r as listMatrixDirectoryPeersLive } from "./directory-live-B8-GAVcc.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-B64O69Nd.js";
1
+ import { t as resolveMatrixTargets } from "./resolve-targets-K8D0HWPX.js";
2
2
  //#region extensions/matrix/src/resolver.runtime.ts
3
3
  const matrixResolverRuntime = { resolveMatrixTargets };
4
4
  //#endregion
@@ -1,7 +1,8 @@
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";
1
+ import { O as resolveMatrixRoomId } from "./send-UWLIQ0bG.js";
2
+ import { s as EventType } from "./messages-CpZfiQO0.js";
3
+ import { n as withResolvedActionClient, r as withResolvedRoomAction } from "./client-C0nZFCTj.js";
4
4
  import { n as isMatrixNotFoundError } from "./errors-DKVS3_DO.js";
5
+ import { filterStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
5
6
  //#region extensions/matrix/src/matrix/monitor/bounded-cache.ts
6
7
  function setBoundedMap(map, key, value, maxEntries) {
7
8
  map.set(key, value);
@@ -34,6 +35,7 @@ async function getMatrixRoomInfo(roomId, opts = {}) {
34
35
  let name = null;
35
36
  let topic = null;
36
37
  let canonicalAlias = null;
38
+ let altAliases = [];
37
39
  let memberCount = null;
38
40
  try {
39
41
  const nameState = await client.getRoomStateEvent(resolvedRoom, "m.room.name", "");
@@ -46,6 +48,7 @@ async function getMatrixRoomInfo(roomId, opts = {}) {
46
48
  try {
47
49
  const aliasState = await client.getRoomStateEvent(resolvedRoom, "m.room.canonical_alias", "");
48
50
  canonicalAlias = typeof aliasState?.alias === "string" ? aliasState.alias : null;
51
+ altAliases = filterStringEntries(aliasState?.alt_aliases);
49
52
  } catch {}
50
53
  try {
51
54
  memberCount = (await client.getJoinedRoomMembers(resolvedRoom)).length;
@@ -55,7 +58,7 @@ async function getMatrixRoomInfo(roomId, opts = {}) {
55
58
  name,
56
59
  topic,
57
60
  canonicalAlias,
58
- altAliases: [],
61
+ altAliases,
59
62
  memberCount
60
63
  };
61
64
  });
@@ -1,7 +1,7 @@
1
- import { a as resolveMatrixDefaultOrOnlyAccountId, i as resolveMatrixChannelConfig, l as resolveMatrixAccountStringValues, n as requiresExplicitMatrixDefaultAccount, r as resolveConfiguredMatrixAccountIds, t as findMatrixAccountEntry } from "./account-selection-DA-jfx22.js";
1
+ import { a as resolveMatrixChannelConfig, i as resolveConfiguredMatrixAccountIds, n as findMatrixAccountEntry, o as resolveMatrixDefaultOrOnlyAccountId, r as requiresExplicitMatrixDefaultAccount, u as resolveMatrixAccountStringValues } from "./account-selection-Bbtc483D.js";
2
2
  import { n as listMatrixEnvAccountIds, r as resolveMatrixEnvAccountToken, t as getMatrixScopedEnvVarNames } from "./env-vars-dGqak9dN.js";
3
3
  import { r as setMatrixRuntime } from "./runtime-6S3DNFNv.js";
4
- import { a as resolveMatrixCredentialsPath, i as resolveMatrixCredentialsFilename, n as resolveMatrixAccountStorageRoot, o as resolveMatrixHomeserverKey, r as resolveMatrixCredentialsDir, s as sanitizeMatrixPathSegment, t as hashMatrixAccessToken } from "./storage-paths-gUmSydsW.js";
4
+ import { a as resolveMatrixCredentialsFilename, i as resolveMatrixCredentialsDir, l as sanitizeMatrixPathSegment, o as resolveMatrixCredentialsPath, r as resolveMatrixAccountStorageRoot, s as resolveMatrixHomeserverKey, t as hashMatrixAccessToken } from "./storage-paths-DVCANXTc.js";
5
5
  import { f as setMatrixThreadBindingMaxAgeBySessionKey, u as setMatrixThreadBindingIdleTimeoutBySessionKey } from "./thread-bindings-shared-oNPiyMWY.js";
6
6
  import { n as ensureMatrixSdkInstalled, r as isMatrixSdkAvailable } from "./deps-mtxF2mHI.js";
7
7
  import { chunkTextForOutbound as chunkTextForOutbound$1 } from "openclaw/plugin-sdk/text-chunking";
@@ -1,13 +1,14 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
2
2
  import { t as getMatrixRuntime } from "./runtime-6S3DNFNv.js";
3
+ import { D as writeMatrixRecoveryKeyStateForPath, S as readMatrixRecoveryKeyStateForPath, f as migrateLegacyMatrixRecoveryKeyFilePathToStore, v as readLegacyMatrixRecoveryKeyFile } from "./storage-metadata-DYArLcq1.js";
4
+ import { t as claimCurrentTokenStorageState } from "./storage-CV-pfV_2.js";
3
5
  import "./reaction-common-DkrQdBSZ.js";
4
- import { A as writeMatrixRecoveryKeyStateForPath, E as readMatrixRecoveryKeyStateForPath, S as readLegacyMatrixRecoveryKeyFile, _ as migrateLegacyMatrixRecoveryKeyFilePathToStore, t as claimCurrentTokenStorageState } from "./storage-BVf4uucD.js";
5
- import { i as openMatrixSyncCacheStoreOptions, l as writeMatrixSyncCacheStateToSyncStore, n as deleteMatrixSyncCacheStateFromSyncStore, o as readPersistedStoreFromSyncStore } from "./sync-cache-state-d-A_OhbU.js";
6
+ import { i as parseMxc, r as matrixEventToRaw } from "./event-helpers-CspuhE9k.js";
7
+ import { i as openMatrixSyncCacheStoreOptions, l as writeMatrixSyncCacheStateToSyncStore, n as deleteMatrixSyncCacheStateFromSyncStore, o as readPersistedStoreFromSyncStore } from "./sync-cache-state-C-mhj3xb.js";
6
8
  import { n as isMatrixNotFoundError, t as formatMatrixErrorReason } from "./errors-DKVS3_DO.js";
7
- import { a as throwIfMatrixStartupAborted, r as createMatrixStartupAbortError } from "./client-Dj4mcf-s.js";
9
+ import { a as throwIfMatrixStartupAborted, r as createMatrixStartupAbortError } from "./client-CPcRv6ab.js";
8
10
  import { n as LogService, r as noop, t as ConsoleLogger } from "./logger-B_71hN6W.js";
9
- import { n as matrixEventToRaw, r as parseMxc } from "./event-helpers-XRfAbOIh.js";
10
- import { n as createMatrixGuardedFetch, t as MatrixAuthedHttpClient } from "./http-client-DOmFvKvB.js";
11
+ import { n as createMatrixGuardedFetch, t as MatrixAuthedHttpClient } from "./http-client-BfPeF4CE.js";
11
12
  import { n as resolveMatrixRoomKeyBackupReadinessError } from "./backup-health-Dm_YMVFT.js";
12
13
  import { t as createMatrixJsSdkClientLogger } from "./logging-DRjvUOIh.js";
13
14
  import { t as MATRIX_IDB_PERSIST_INTERVAL_MS } from "./idb-persistence-lock-B3fZXyF_.js";
@@ -342,6 +343,10 @@ function createNoopMatrixSyncCacheStore() {
342
343
  register: () => {},
343
344
  registerIfAbsent: () => false,
344
345
  lookup: () => void 0,
346
+ lookupMany: (keys) => keys.map(() => ({
347
+ ok: true,
348
+ value: void 0
349
+ })),
345
350
  consume: () => void 0,
346
351
  delete: () => false,
347
352
  entries: () => [],
@@ -707,7 +712,7 @@ function resolveMessageWireDispatch(resource, init) {
707
712
  };
708
713
  }
709
714
  let loadedMatrixCryptoRuntime = null;
710
- const loadMatrixCryptoRuntime = createLazyRuntimeModule(() => import("./crypto-runtime-m1eplj3b.js").then((runtime) => {
715
+ const loadMatrixCryptoRuntime = createLazyRuntimeModule(() => import("./crypto-runtime-DiyH4R3D.js").then((runtime) => {
711
716
  loadedMatrixCryptoRuntime = runtime;
712
717
  return runtime;
713
718
  }));
@@ -1308,6 +1313,8 @@ var MatrixClientCore = class extends MatrixClientBase {
1308
1313
  }
1309
1314
  async getRelations(roomId, eventId, relationType, eventType, opts = {}) {
1310
1315
  const result = await this.client.relations(roomId, eventId, relationType, eventType, opts);
1316
+ const events = result.originalEvent ? [result.originalEvent, ...result.events] : result.events;
1317
+ await Promise.all(events.map((event) => this.client.decryptEventIfNeeded(event)));
1311
1318
  return {
1312
1319
  originalEvent: result.originalEvent ? matrixEventToRaw(result.originalEvent) : null,
1313
1320
  events: result.events.map((event) => matrixEventToRaw(event)),