@openclaw/matrix 2026.9.3 → 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 (42) hide show
  1. package/dist/api.js +4 -4
  2. package/dist/{approval-handler.runtime-tJLn5JFB.js → approval-handler.runtime-6I3IpyeX.js} +3 -3
  3. package/dist/{approval-ids-DJZ9ZTuS.js → approval-ids-C4NdeXNz.js} +1 -1
  4. package/dist/{approval-reaction-auth-Cd0sKHFc.js → approval-reaction-auth-cbltZAUQ.js} +1 -1
  5. package/dist/{channel-BpYiqmx-.js → channel-Cg97H4c1.js} +10 -170
  6. package/dist/channel-plugin-api.js +1 -1
  7. package/dist/{channel.runtime-dfEvRdLQ.js → channel.runtime-Bhpfa1qc.js} +6 -6
  8. package/dist/{channel.setup-oxd8RsIr.js → channel.setup-DmS7m7aT.js} +2 -2
  9. package/dist/{cli-_49Vsqs4.js → cli-CLexRrQw.js} +8 -8
  10. package/dist/{cli-metadata-D19lmKmz.js → cli-metadata-zRyVmUOL.js} +1 -1
  11. package/dist/cli-metadata.js +1 -1
  12. package/dist/{client-BXQCQDfY.js → client-C0nZFCTj.js} +2 -2
  13. package/dist/{client-COLiUdWe.js → client-CPcRv6ab.js} +2 -2
  14. package/dist/{client-bootstrap-CQwf9qrm.js → client-bootstrap-DLN-K8Xb.js} +1 -1
  15. package/dist/contract-api.js +2 -2
  16. package/dist/{crypto-runtime-BvunIYVn.js → crypto-runtime-DiyH4R3D.js} +2 -24
  17. package/dist/{directory-live-DABCxf8j.js → directory-live-B8-GAVcc.js} +1 -1
  18. package/dist/{draft-stream-DSwgyyBi.js → draft-stream--NdEtnZ8.js} +1 -1
  19. package/dist/index.js +1 -1
  20. package/dist/{messages-H4mi9Cap.js → messages-CpZfiQO0.js} +2 -2
  21. package/dist/{monitor-3Fw96uiE.js → monitor-BUek91SW.js} +13 -13
  22. package/dist/{outbound-UPI45TD_.js → outbound-D91JinYa.js} +1 -1
  23. package/dist/plugin-entry.handlers.runtime.js +1 -1
  24. package/dist/probe.runtime-DWdw74_H.js +2 -0
  25. package/dist/{profile-update-DWEg8Ylt.js → profile-update-vnhxwjEt.js} +1 -1
  26. package/dist/{reaction-events-D-iSW0iM.js → reaction-events-2WM2nJe_.js} +4 -4
  27. package/dist/{resolve-targets-BpnALDzR.js → resolve-targets-K8D0HWPX.js} +1 -1
  28. package/dist/{resolver.runtime-B83WkznZ.js → resolver.runtime-C88GwQCx.js} +1 -1
  29. package/dist/{room-info-CjnbX52D.js → room-info-BPVJkXnp.js} +3 -3
  30. package/dist/{sdk-CX9b0N8Q.js → sdk-B4By16Bt.js} +2 -2
  31. package/dist/{send-B9l1lKau.js → send-UWLIQ0bG.js} +17 -49
  32. package/dist/session-binding-contract-api.js +1 -1
  33. package/dist/{setup-bootstrap-CSI1L1lm.js → setup-bootstrap-sVqkwtSY.js} +1 -1
  34. package/dist/{setup-core-DuTlyqRz.js → setup-core-8keb-Yre.js} +12 -27
  35. package/dist/setup-plugin-api.js +1 -1
  36. package/dist/{setup-surface-fZing1WZ.js → setup-surface-bcluelBI.js} +6 -15
  37. package/dist/{thread-bindings-CRyf5on_.js → thread-bindings-Bwv87Gve.js} +1 -1
  38. package/dist/{tool-actions.runtime-D5-hTkDu.js → tool-actions.runtime-Bf98Juk6.js} +292 -253
  39. package/dist/{verification-B_aqtbx-.js → verification-BbG-VC9S.js} +1 -1
  40. package/openclaw.plugin.json +4 -0
  41. package/package.json +4 -4
  42. package/dist/probe.runtime-DdXTrrmo.js +0 -2
@@ -1,6 +1,6 @@
1
1
  import { a as resolveMatrixAccountConfig } from "./account-config-CRsKoMqJ.js";
2
- import { i as resolveMatrixThreadRouting, r as resolveMatrixInboundRoute } from "./channel-BpYiqmx-.js";
3
- import { g as resolveMatrixThreadRootId } from "./send-B9l1lKau.js";
2
+ import { i as resolveMatrixThreadRouting, r as resolveMatrixInboundRoute } from "./channel-Cg97H4c1.js";
3
+ import { g as resolveMatrixThreadRootId } from "./send-UWLIQ0bG.js";
4
4
  import { a as extractMatrixReactionAnnotation } from "./reaction-common-DkrQdBSZ.js";
5
5
  import { i as resolveMatrixApprovalReactionTargetWithPersistence, o as unregisterMatrixApprovalReactionTargetsForApproval } from "./approval-reactions-1fwEhoK9.js";
6
6
  import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
@@ -8,9 +8,9 @@ import { isApprovalNotFoundError } from "openclaw/plugin-sdk/error-runtime";
8
8
  import { normalizeAccountId } from "openclaw/plugin-sdk/routing";
9
9
  import { getSessionBindingService } from "openclaw/plugin-sdk/session-binding-runtime";
10
10
  //#region extensions/matrix/src/matrix/monitor/reaction-events.ts
11
- const loadApprovalReactionAuth = createLazyRuntimeModule(() => import("./approval-reaction-auth-Cd0sKHFc.js"));
11
+ const loadApprovalReactionAuth = createLazyRuntimeModule(() => import("./approval-reaction-auth-cbltZAUQ.js"));
12
12
  const loadExecApprovalResolver = createLazyRuntimeModule(() => import("openclaw/plugin-sdk/approval-gateway-runtime"));
13
- const loadMatrixSend = createLazyRuntimeModule(() => import("./send-B9l1lKau.js").then((n) => n.s));
13
+ const loadMatrixSend = createLazyRuntimeModule(() => import("./send-UWLIQ0bG.js").then((n) => n.s));
14
14
  function buildMatrixApprovalTerminalText(result) {
15
15
  const approval = result.approval;
16
16
  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
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-DABCxf8j.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-BpnALDzR.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,6 +1,6 @@
1
- import { O as resolveMatrixRoomId } from "./send-B9l1lKau.js";
2
- import { s as EventType } from "./messages-H4mi9Cap.js";
3
- import { n as withResolvedActionClient, r as withResolvedRoomAction } from "./client-BXQCQDfY.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
5
  import { filterStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
6
6
  //#region extensions/matrix/src/matrix/monitor/bounded-cache.ts
@@ -6,7 +6,7 @@ import "./reaction-common-DkrQdBSZ.js";
6
6
  import { i as parseMxc, r as matrixEventToRaw } from "./event-helpers-CspuhE9k.js";
7
7
  import { i as openMatrixSyncCacheStoreOptions, l as writeMatrixSyncCacheStateToSyncStore, n as deleteMatrixSyncCacheStateFromSyncStore, o as readPersistedStoreFromSyncStore } from "./sync-cache-state-C-mhj3xb.js";
8
8
  import { n as isMatrixNotFoundError, t as formatMatrixErrorReason } from "./errors-DKVS3_DO.js";
9
- import { a as throwIfMatrixStartupAborted, r as createMatrixStartupAbortError } from "./client-COLiUdWe.js";
9
+ import { a as throwIfMatrixStartupAborted, r as createMatrixStartupAbortError } from "./client-CPcRv6ab.js";
10
10
  import { n as LogService, r as noop, t as ConsoleLogger } from "./logger-B_71hN6W.js";
11
11
  import { n as createMatrixGuardedFetch, t as MatrixAuthedHttpClient } from "./http-client-BfPeF4CE.js";
12
12
  import { n as resolveMatrixRoomKeyBackupReadinessError } from "./backup-health-Dm_YMVFT.js";
@@ -712,7 +712,7 @@ function resolveMessageWireDispatch(resource, init) {
712
712
  };
713
713
  }
714
714
  let loadedMatrixCryptoRuntime = null;
715
- const loadMatrixCryptoRuntime = createLazyRuntimeModule(() => import("./crypto-runtime-BvunIYVn.js").then((runtime) => {
715
+ const loadMatrixCryptoRuntime = createLazyRuntimeModule(() => import("./crypto-runtime-DiyH4R3D.js").then((runtime) => {
716
716
  loadedMatrixCryptoRuntime = runtime;
717
717
  return runtime;
718
718
  }));
@@ -23,7 +23,7 @@ import { isAutoLinkedFileRef } from "openclaw/plugin-sdk/text-autolink-runtime";
23
23
  import { isVoiceMessageCompatibleAudio } from "openclaw/plugin-sdk/media-runtime";
24
24
  import { parseBuffer } from "music-metadata";
25
25
  //#region extensions/matrix/src/matrix/send/client.ts
26
- const loadMatrixSendClientRuntime = createLazyRuntimeModule(() => import("./client-bootstrap-CQwf9qrm.js").then((n) => n.t));
26
+ const loadMatrixSendClientRuntime = createLazyRuntimeModule(() => import("./client-bootstrap-DLN-K8Xb.js").then((n) => n.t));
27
27
  function resolveMediaMaxBytes(accountId, cfg) {
28
28
  if (!cfg) throw new Error("Matrix media limits requires a resolved runtime config. Load and resolve config at the command or gateway boundary, then pass cfg through the runtime path.");
29
29
  const resolvedCfg = requireRuntimeConfig(cfg, "Matrix media limits");
@@ -1108,48 +1108,21 @@ md.renderer.rules.image = (tokens, idx, options, env, self) => {
1108
1108
  md.renderer.rules.html_block = (tokens, idx) => escapeHtml(tokens[idx]?.content ?? "");
1109
1109
  md.renderer.rules.html_inline = (tokens, idx) => escapeHtml(tokens[idx]?.content ?? "");
1110
1110
  md.renderer.rules.text_special = (tokens, idx) => escapeHtml(tokens[idx]?.content ?? "");
1111
+ md.renderer.rules.matrix_escaped_mention = () => "@";
1112
+ md.core.ruler.before("text_join", "matrix_escaped_mentions", (state) => {
1113
+ preserveEscapedMentionTokens(state.tokens);
1114
+ });
1111
1115
  md.renderer.rules.link_open = (tokens, idx, _options, _env, self) => shouldSuppressAutoLink(tokens, idx) ? "" : self.renderToken(tokens, idx, _options);
1112
1116
  md.renderer.rules.link_close = (tokens, idx, _options, _env, self) => {
1113
1117
  const openIdx = idx - 2;
1114
1118
  if (openIdx >= 0 && shouldSuppressAutoLink(tokens, openIdx)) return "";
1115
1119
  return self.renderToken(tokens, idx, _options);
1116
1120
  };
1117
- function maskEscapedMentions(markdown) {
1118
- let masked = "";
1119
- let idx = 0;
1120
- let codeFenceLength = 0;
1121
- let marker;
1122
- const metadataRanges = markdown.includes("\\@") ? findMatrixMarkdownMetadataRanges(markdown) : [];
1123
- while (idx < markdown.length) {
1124
- if (markdown[idx] === "`" && !isMarkdownEscaped(markdown, idx)) {
1125
- let runLength = 1;
1126
- while (markdown[idx + runLength] === "`") runLength += 1;
1127
- if (codeFenceLength === 0) codeFenceLength = runLength;
1128
- else if (runLength === codeFenceLength) codeFenceLength = 0;
1129
- masked += markdown.slice(idx, idx + runLength);
1130
- idx += runLength;
1131
- continue;
1132
- }
1133
- if (codeFenceLength === 0 && markdown[idx] === "\\" && markdown[idx + 1] === "@" && !metadataRanges.some((range) => idx >= range.start && idx < range.end)) {
1134
- marker ??= createMatrixPrivateMarkers(markdown, "Matrix mention formatting exhausted its private marker pool").open;
1135
- masked += marker;
1136
- idx += 2;
1137
- continue;
1138
- }
1139
- masked += markdown[idx] ?? "";
1140
- idx += 1;
1121
+ function preserveEscapedMentionTokens(tokens) {
1122
+ for (const token of tokens) {
1123
+ if (token.type === "text_special" && token.info === "escape" && token.content === "@") token.type = "matrix_escaped_mention";
1124
+ if (token.children) preserveEscapedMentionTokens(token.children);
1141
1125
  }
1142
- return {
1143
- markdown: masked,
1144
- ...marker ? { marker } : {}
1145
- };
1146
- }
1147
- function restoreEscapedMentions(text, marker, inCode = false) {
1148
- return marker ? text.replaceAll(marker, inCode ? "\\@" : "@") : text;
1149
- }
1150
- function restoreEscapedMentionsInBlockTokens(tokens, marker) {
1151
- if (!marker) return;
1152
- for (const token of tokens) if ((token.type === "fence" || token.type === "code_block") && token.content) token.content = restoreEscapedMentions(token.content, marker, true);
1153
1126
  }
1154
1127
  function isMentionStartBoundary(charBefore) {
1155
1128
  return !charBefore || !/[A-Za-z0-9_]/.test(charBefore);
@@ -1292,7 +1265,6 @@ async function resolveMatrixSelfUserId(client) {
1292
1265
  }
1293
1266
  function mutateInlineTokensWithMentions(params) {
1294
1267
  const nextChildren = [];
1295
- const restoreMention = (text) => restoreEscapedMentions(text, params.escapedMentionMarker);
1296
1268
  let roomMentioned = false;
1297
1269
  let insideLinkDepth = 0;
1298
1270
  for (const child of params.children) {
@@ -1307,23 +1279,21 @@ function mutateInlineTokensWithMentions(params) {
1307
1279
  continue;
1308
1280
  }
1309
1281
  if (child.type !== "text" || !child.content) {
1310
- for (const nested of child.children ?? []) nested.content = restoreMention(nested.content);
1311
1282
  nextChildren.push(child);
1312
1283
  continue;
1313
1284
  }
1314
- const visibleContent = restoreMention(child.content);
1315
1285
  if (insideLinkDepth > 0) {
1316
- nextChildren.push(createTextToken(child, visibleContent));
1286
+ nextChildren.push(child);
1317
1287
  continue;
1318
1288
  }
1319
1289
  const matches = collectMentionCandidates(child.content);
1320
1290
  if (matches.length === 0) {
1321
- nextChildren.push(createTextToken(child, visibleContent));
1291
+ nextChildren.push(child);
1322
1292
  continue;
1323
1293
  }
1324
1294
  let cursor = 0;
1325
1295
  for (const match of matches) {
1326
- if (match.start > cursor) nextChildren.push(createTextToken(child, restoreMention(child.content.slice(cursor, match.start))));
1296
+ if (match.start > cursor) nextChildren.push(createTextToken(child, child.content.slice(cursor, match.start)));
1327
1297
  cursor = match.end;
1328
1298
  if (match.kind === "room") {
1329
1299
  roomMentioned = true;
@@ -1345,7 +1315,7 @@ function mutateInlineTokensWithMentions(params) {
1345
1315
  label: match.raw
1346
1316
  }));
1347
1317
  }
1348
- if (cursor < child.content.length) nextChildren.push(createTextToken(child, restoreMention(child.content.slice(cursor))));
1318
+ if (cursor < child.content.length) nextChildren.push(createTextToken(child, child.content.slice(cursor)));
1349
1319
  }
1350
1320
  return {
1351
1321
  children: nextChildren,
@@ -1437,9 +1407,7 @@ function renderMatrixFallbackHtml(markdown) {
1437
1407
  return `<p>${escapeHtml(markdownToMatrixBody(markdown)).replaceAll("\n", "<br>\n")}</p>`;
1438
1408
  }
1439
1409
  async function resolveMarkdownMentionState(params) {
1440
- const { markdown, marker } = maskEscapedMentions(projectMatrixMarkdown(params.markdown));
1441
- const tokens = parseMatrixMarkdown(markdown, params.tableMode);
1442
- restoreEscapedMentionsInBlockTokens(tokens, marker);
1410
+ const tokens = parseMatrixMarkdown(projectMatrixMarkdown(params.markdown), params.tableMode);
1443
1411
  const selfUserId = await resolveMatrixSelfUserId(params.client);
1444
1412
  const userIds = [];
1445
1413
  const seenUserIds = /* @__PURE__ */ new Set();
@@ -1450,8 +1418,7 @@ async function resolveMarkdownMentionState(params) {
1450
1418
  children: token.children,
1451
1419
  userIds,
1452
1420
  seenUserIds,
1453
- selfUserId,
1454
- escapedMentionMarker: marker
1421
+ selfUserId
1455
1422
  });
1456
1423
  token.children = mutated.children;
1457
1424
  roomMentioned ||= mutated.roomMentioned;
@@ -1661,7 +1628,8 @@ const MATRIX_MEDIA_KINDS = {
1661
1628
  "m.video": "video"
1662
1629
  };
1663
1630
  function resolveMatrixMediaKind(msgtype) {
1664
- return MATRIX_MEDIA_KINDS[msgtype ?? ""] ?? null;
1631
+ const key = msgtype ?? "";
1632
+ return Object.hasOwn(MATRIX_MEDIA_KINDS, key) ? MATRIX_MEDIA_KINDS[key] : void 0;
1665
1633
  }
1666
1634
  function resolveMatrixMediaLabel(kind, fallback = "media") {
1667
1635
  return `${kind ?? fallback} attachment`;
@@ -1,3 +1,3 @@
1
1
  import { r as setMatrixRuntime } from "./runtime-6S3DNFNv.js";
2
- import { t as createMatrixThreadBindingManager } from "./thread-bindings-CRyf5on_.js";
2
+ import { t as createMatrixThreadBindingManager } from "./thread-bindings-Bwv87Gve.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-GwSAk9vY.js";
3
- import { n as bootstrapMatrixVerification } from "./verification-B_aqtbx-.js";
3
+ import { n as bootstrapMatrixVerification } from "./verification-BbG-VC9S.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) {
@@ -6,7 +6,7 @@ import { r as updateMatrixAccountConfig } from "./config-update-BnX26jCO.js";
6
6
  import { t as isSupportedMatrixAvatarSource } from "./profile-vmjsmhh4.js";
7
7
  import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
8
8
  import { defineChannelSetupContract } from "openclaw/plugin-sdk/channel-setup";
9
- import { DEFAULT_ACCOUNT_ID, addWildcardAllowFrom, applyAccountNameToChannelSection, normalizeAccountId, normalizeAllowFromEntries, normalizeSecretInputString, prepareScopedSetupConfig } from "openclaw/plugin-sdk/setup";
9
+ import { DEFAULT_ACCOUNT_ID, addWildcardAllowFrom, applyAccountNameToChannelSection, normalizeAccountId, normalizeAllowFromEntries, normalizeSecretInputString, patchTopLevelChannelConfigSection, prepareScopedSetupConfig, setSetupChannelEnabled } from "openclaw/plugin-sdk/setup";
10
10
  import { DEFAULT_ACCOUNT_ID as DEFAULT_ACCOUNT_ID$1, normalizeAccountId as normalizeAccountId$1 } from "openclaw/plugin-sdk/routing";
11
11
  import { createChannelDmPolicy } from "openclaw/plugin-sdk/channel-dm-policy";
12
12
  //#region extensions/matrix/src/setup-contract.ts
@@ -126,21 +126,15 @@ function moveSingleMatrixAccountConfigToNamedAccount(cfg) {
126
126
  const resolvedTargetAccountId = resolveExistingMatrixAccountKey(accounts, resolveSingleAccountPromotionTarget({ channel: base }));
127
127
  const nextAccount = { ...accounts[resolvedTargetAccountId] };
128
128
  for (const key of keysToMove) nextAccount[key] = cloneIfObject(base[key]);
129
- const nextChannel = { ...base };
130
- for (const key of keysToMove) delete nextChannel[key];
131
- return {
132
- ...cfg,
133
- channels: {
134
- ...cfg.channels,
135
- [channel$1]: {
136
- ...nextChannel,
137
- accounts: {
138
- ...accounts,
139
- [resolvedTargetAccountId]: nextAccount
140
- }
141
- }
142
- }
143
- };
129
+ return patchTopLevelChannelConfigSection({
130
+ cfg,
131
+ channel: channel$1,
132
+ clearFields: keysToMove,
133
+ patch: { accounts: {
134
+ ...accounts,
135
+ [resolvedTargetAccountId]: nextAccount
136
+ } }
137
+ });
144
138
  }
145
139
  function validateMatrixSetupInput(params) {
146
140
  const input = params.input;
@@ -271,16 +265,7 @@ function createMatrixSetupWizardProxy(loadWizardModule) {
271
265
  const promptAllowFrom = (await loadWizard()).dmPolicy?.promptAllowFrom;
272
266
  return promptAllowFrom ? await promptAllowFrom(params) : params.cfg;
273
267
  }),
274
- disable: (cfg) => ({
275
- ...cfg,
276
- channels: {
277
- ...cfg.channels,
278
- matrix: {
279
- ...cfg.channels?.matrix,
280
- enabled: false
281
- }
282
- }
283
- })
268
+ disable: (cfg) => setSetupChannelEnabled(cfg, channel, false)
284
269
  };
285
270
  }
286
271
  const matrixSetupAdapter = {
@@ -311,7 +296,7 @@ const matrixSetupAdapter = {
311
296
  input
312
297
  }),
313
298
  afterAccountConfigWritten: async ({ previousCfg, cfg, accountId, runtime }) => {
314
- const { runMatrixSetupBootstrapAfterConfigWrite } = await import("./setup-bootstrap-CSI1L1lm.js");
299
+ const { runMatrixSetupBootstrapAfterConfigWrite } = await import("./setup-bootstrap-sVqkwtSY.js");
315
300
  await runMatrixSetupBootstrapAfterConfigWrite({
316
301
  previousCfg,
317
302
  cfg,
@@ -1,2 +1,2 @@
1
- import { n as matrixSetupPlugin } from "./channel.setup-oxd8RsIr.js";
1
+ import { n as matrixSetupPlugin } from "./channel.setup-DmS7m7aT.js";
2
2
  export { matrixSetupPlugin };
@@ -4,12 +4,12 @@ import { a as resolveMatrixAccountConfig } from "./account-config-CRsKoMqJ.js";
4
4
  import { i as resolveMatrixAccount, r as resolveDefaultMatrixAccountId, t as listMatrixAccountIds } from "./accounts-GwSAk9vY.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-DuTlyqRz.js";
7
+ import { a as moveSingleMatrixAccountConfigToNamedAccount, i as createMatrixSetupDmPolicy } from "./setup-core-8keb-Yre.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";
11
11
  import { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/account-id";
12
- import { formatDocsLink, hasConfiguredSecretInput, mergeAllowFromEntries, normalizeAccountId as normalizeAccountId$1, promptAccountId, promptChannelAccessConfig, splitSetupEntries } from "openclaw/plugin-sdk/setup";
12
+ import { formatDocsLink, hasConfiguredSecretInput, mergeAllowFromEntries, normalizeAccountId as normalizeAccountId$1, promptAccountId, promptChannelAccessConfig, setSetupChannelEnabled, splitSetupEntries } from "openclaw/plugin-sdk/setup";
13
13
  import { isPrivateNetworkOptInEnabled } from "openclaw/plugin-sdk/ssrf-policy";
14
14
  //#region extensions/matrix/src/onboarding.ts
15
15
  const channel = "matrix";
@@ -91,7 +91,7 @@ async function promptMatrixAllowFrom(params) {
91
91
  pending.push(part);
92
92
  }
93
93
  if (pending.length > 0) {
94
- const { resolveMatrixTargets } = await import("./resolve-targets-BpnALDzR.js").then((n) => n.n);
94
+ const { resolveMatrixTargets } = await import("./resolve-targets-K8D0HWPX.js").then((n) => n.n);
95
95
  const results = await resolveMatrixTargets({
96
96
  cfg,
97
97
  accountId,
@@ -211,7 +211,7 @@ async function configureMatrixAccessPrompts(params) {
211
211
  resolvedIds.push(cleaned);
212
212
  continue;
213
213
  }
214
- const { listMatrixDirectoryGroupsLive } = await import("./directory-live-DABCxf8j.js").then((n) => n.t);
214
+ const { listMatrixDirectoryGroupsLive } = await import("./directory-live-B8-GAVcc.js").then((n) => n.t);
215
215
  const matches = await listMatrixDirectoryGroupsLive({
216
216
  cfg: next,
217
217
  accountId: params.accountId,
@@ -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-CSI1L1lm.js");
467
+ const { runMatrixSetupBootstrapAfterConfigWrite } = await import("./setup-bootstrap-sVqkwtSY.js");
468
468
  await runMatrixSetupBootstrapAfterConfigWrite({
469
469
  previousCfg,
470
470
  cfg,
@@ -473,16 +473,7 @@ const matrixOnboardingAdapter = {
473
473
  });
474
474
  },
475
475
  dmPolicy,
476
- disable: (cfg) => ({
477
- ...cfg,
478
- channels: {
479
- ...cfg.channels,
480
- matrix: {
481
- ...cfg.channels?.["matrix"],
482
- enabled: false
483
- }
484
- }
485
- })
476
+ disable: (cfg) => setSetupChannelEnabled(cfg, channel, false)
486
477
  };
487
478
  //#endregion
488
479
  //#region extensions/matrix/src/setup-surface.ts
@@ -2,7 +2,7 @@ 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 { A as resolveMatrixSqliteStateKey, k as resolveMatrixSqliteStateEnv } from "./storage-metadata-DYArLcq1.js";
4
4
  import { a as resolveMatrixStateFilePath, t as claimCurrentTokenStorageState } from "./storage-CV-pfV_2.js";
5
- import { r as sendMessageMatrix } from "./send-B9l1lKau.js";
5
+ import { r as sendMessageMatrix } from "./send-UWLIQ0bG.js";
6
6
  import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
7
7
  import { createHash } from "node:crypto";
8
8
  import path from "node:path";