@openclaw/matrix 2026.7.2-beta.3 → 2026.7.2-beta.5

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 (77) hide show
  1. package/README.md +1 -1
  2. package/dist/api.js +4 -4
  3. package/dist/{approval-handler.runtime-BEa98wwG.js → approval-handler.runtime-D1ibJgSk.js} +4 -4
  4. package/dist/{approval-ids-Dfn7oQAm.js → approval-ids-2OQj32-K.js} +1 -1
  5. package/dist/{approval-reaction-auth-kXkCJBGi.js → approval-reaction-auth-CCAWWkbu.js} +2 -2
  6. package/dist/{channel-j331Xd7b.js → channel-Cmi248PA.js} +34 -32
  7. package/dist/channel-plugin-api.js +1 -1
  8. package/dist/{channel.runtime-BIwlVfQw.js → channel.runtime-BaPXFRgT.js} +34 -40
  9. package/dist/{cli-0EcKfqFw.js → cli-0CNHkps5.js} +868 -852
  10. package/dist/{cli-metadata-Xq1Xb15R.js → cli-metadata-DnXxNCoj.js} +1 -1
  11. package/dist/cli-metadata.js +1 -1
  12. package/dist/{client-CA0PULls.js → client-BFRg0kd4.js} +2 -2
  13. package/dist/{client-BtG4quUl.js → client-CitERujx.js} +2 -2
  14. package/dist/{client-bootstrap-Dk5EAn3n.js → client-bootstrap-CkAnkzB6.js} +1 -1
  15. package/dist/{config-schema-B5GRV8wL.js → config-schema-BShrVROw.js} +19 -6
  16. package/dist/contract-api.js +2 -2
  17. package/dist/{create-client-WQExaby_.js → create-client-f-CkRllE.js} +3 -3
  18. package/dist/{crypto-runtime-CAff-n15.js → crypto-runtime-D9_6J5tZ.js} +2 -2
  19. package/dist/{device-health-D4LBxuPq.js → device-health-B4-YXtJR.js} +6 -1
  20. package/dist/{directory-live-DiC-0XBC.js → directory-live-YRgYDx2w.js} +3 -3
  21. package/dist/{doctor-DwUVm5Lw.js → doctor-CM8ijNpW.js} +1 -1
  22. package/dist/doctor-contract-BMSJkkAE.js +167 -0
  23. package/dist/doctor-contract-api.js +112 -71
  24. package/dist/{draft-stream-CTLKtJJ0.js → draft-stream-CIjafRr0.js} +1 -1
  25. package/dist/{file-sync-store-CPkgnSXp.js → file-sync-store-DiiFsayX.js} +1 -1
  26. package/dist/{http-client-BmrgOZTL.js → http-client-CycYxU9-.js} +2 -2
  27. package/dist/{idb-persistence-Dyy6ipgU.js → idb-persistence-B6x7dMsF.js} +75 -72
  28. package/dist/index.js +1 -1
  29. package/dist/{logging-QH-48Gr6.js → logging-DV-p52N0.js} +8 -1
  30. package/dist/{media-text-BMXEXb1j.js → media-text-DlQC_k_K.js} +1 -1
  31. package/dist/{messages-3UBHfZrN.js → messages-Bf_s--M9.js} +3 -3
  32. package/dist/{monitor-BtUIds8T.js → monitor-s--XqoxF.js} +2041 -1804
  33. package/dist/plugin-entry.handlers.runtime.js +1 -1
  34. package/dist/probe.runtime-BJOvCHnZ.js +3 -0
  35. package/dist/{profile-update-Bh2XtJwN.js → profile-update-z3aM46KS.js} +2 -2
  36. package/dist/{reaction-events-BwAKtUyQ.js → reaction-events-DrK9Zua7.js} +2 -2
  37. package/dist/{recovery-key-store-CW6eePfp.js → recovery-key-store-BNnHvXdk.js} +1 -1
  38. package/dist/{resolve-targets-DVoj-YxB.js → resolve-targets-nNMcrV3W.js} +1 -1
  39. package/dist/{resolver.runtime-CC0VVsAt.js → resolver.runtime-BvaFlVLg.js} +1 -1
  40. package/dist/{room-info-B6vKD5DF.js → room-info-CAFZ3Z9J.js} +13 -12
  41. package/dist/{sdk-CIDZXWpZ.js → sdk-UzPd8tst.js} +227 -181
  42. package/dist/{send-BJbrdmNm.js → send-C9Ssx-iV.js} +624 -109
  43. package/dist/session-binding-contract-api.js +1 -1
  44. package/dist/{setup-bootstrap-DGPOOdz-.js → setup-bootstrap-BBGpPKgy.js} +2 -2
  45. package/dist/{setup-core-XCdAx1nY.js → setup-core-a542Ernq.js} +135 -45
  46. package/dist/setup-plugin-api.js +4 -3
  47. package/dist/{setup-surface-CzUiTe_k.js → setup-surface-BJrCI6KT.js} +34 -30
  48. package/dist/{shared-DquM1oz6.js → shared-CUH5otj8.js} +5 -12
  49. package/dist/{startup-verification-CA00kebL.js → startup-verification-wm3_i88s.js} +1 -1
  50. package/dist/{storage-CzHxeF5E.js → storage-BvAkgzvT.js} +24 -57
  51. package/dist/{thread-bindings-Cw194yEn.js → thread-bindings-D3RfVgAF.js} +4 -3
  52. package/dist/{tool-actions.runtime-C0jgWYhX.js → tool-actions.runtime-Dh5ow2EK.js} +8 -8
  53. package/dist/{verification-DjxyWTNP.js → verification-ZdAXdmuh.js} +1 -1
  54. package/node_modules/music-metadata/lib/common/Util.d.ts +1 -1
  55. package/node_modules/music-metadata/lib/common/Util.js +7 -1
  56. package/node_modules/music-metadata/lib/id3v2/FrameHeader.js +23 -3
  57. package/node_modules/music-metadata/lib/id3v2/FrameParser.js +2 -2
  58. package/node_modules/music-metadata/lib/id3v2/ID3v2Token.js +1 -1
  59. package/node_modules/music-metadata/lib/mp4/AtomToken.js +38 -13
  60. package/node_modules/music-metadata/lib/mpeg/MpegParser.js +1 -1
  61. package/node_modules/music-metadata/package.json +6 -6
  62. package/node_modules/typebox/build/compile/validator.d.mts +1 -4
  63. package/node_modules/typebox/build/guard/guard.d.mts +1 -1
  64. package/node_modules/typebox/build/guard/guard.mjs +5 -2
  65. package/node_modules/typebox/build/guard/string.mjs +16 -4
  66. package/node_modules/typebox/build/schema/engine/_functions.mjs +34 -15
  67. package/node_modules/typebox/build/type/action/readonly_object.d.mts +5 -0
  68. package/node_modules/typebox/build/type/action/readonly_object.mjs +8 -0
  69. package/node_modules/typebox/build/typebox.d.mts +1 -1
  70. package/node_modules/typebox/build/typebox.mjs +1 -1
  71. package/node_modules/typebox/package.json +1 -1
  72. package/node_modules/typebox/readme.md +29 -32
  73. package/openclaw.plugin.json +7 -20
  74. package/package.json +111 -29
  75. package/dist/doctor-contract-BA2Y6Crx.js +0 -312
  76. package/dist/probe.runtime-sBV-Govx.js +0 -3
  77. package/npm-shrinkwrap.json +0 -557
package/README.md CHANGED
@@ -5,7 +5,7 @@ Official OpenClaw channel plugin for Matrix rooms and direct messages.
5
5
  Install from OpenClaw:
6
6
 
7
7
  ```bash
8
- openclaw plugin add @openclaw/matrix
8
+ openclaw plugins install @openclaw/matrix
9
9
  ```
10
10
 
11
11
  Configure the Matrix homeserver and bot credentials in OpenClaw. The plugin lets agents join configured rooms, receive messages, and reply through Matrix.
package/dist/api.js CHANGED
@@ -1,11 +1,11 @@
1
1
  import { a as resolveMatrixDefaultOrOnlyAccountId, i as resolveMatrixChannelConfig, n as requiresExplicitMatrixDefaultAccount, r as resolveConfiguredMatrixAccountIds, t as findMatrixAccountEntry } from "./account-selection-kqquRzCf.js";
2
2
  import { n as listMatrixEnvAccountIds, r as resolveMatrixEnvAccountToken, t as getMatrixScopedEnvVarNames } from "./env-vars-B0NxQnPk.js";
3
3
  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 { n as matrixSetupAdapter, t as createMatrixSetupWizardProxy } from "./setup-core-XCdAx1nY.js";
5
- import { t as matrixPlugin } from "./channel-j331Xd7b.js";
4
+ import { n as matrixSetupAdapter, t as createMatrixSetupWizardProxy } from "./setup-core-a542Ernq.js";
5
+ import { t as matrixPlugin } from "./channel-Cmi248PA.js";
6
6
  import { d as setMatrixThreadBindingIdleTimeoutBySessionKey, n as getMatrixThreadBindingManager, p as setMatrixThreadBindingMaxAgeBySessionKey, s as resetMatrixThreadBindingsForTests } from "./thread-bindings-shared-CKnY4LSd.js";
7
- import { n as matrixOnboardingAdapter } from "./setup-surface-CzUiTe_k.js";
8
- import { t as createMatrixThreadBindingManager } from "./thread-bindings-Cw194yEn.js";
7
+ import { n as matrixOnboardingAdapter } from "./setup-surface-BJrCI6KT.js";
8
+ import { t as createMatrixThreadBindingManager } from "./thread-bindings-D3RfVgAF.js";
9
9
  //#region extensions/matrix/api.ts
10
10
  const matrixSessionBindingAdapterChannels = ["matrix"];
11
11
  //#endregion
@@ -1,9 +1,9 @@
1
- import { g as resolveMatrixAccount } from "./setup-core-XCdAx1nY.js";
2
- import { _ as shouldHandleMatrixApprovalRequest, g as isMatrixAnyApprovalClientEnabled } from "./channel-j331Xd7b.js";
1
+ import { _ as resolveMatrixAccount } from "./setup-core-a542Ernq.js";
2
+ import { _ as shouldHandleMatrixApprovalRequest, g as isMatrixAnyApprovalClientEnabled } from "./channel-Cmi248PA.js";
3
3
  import { a as resolveMatrixTargetIdentity } from "./target-ids-B-5aQxwn.js";
4
- import { a as sendMessageMatrix, i as reactMatrixMessage, p as repairMatrixDirectRooms, s as sendSingleTextMessageMatrix } from "./send-BJbrdmNm.js";
4
+ import { a as sendSingleTextMessageMatrix, d as repairMatrixDirectRooms, n as reactMatrixMessage, r as sendMessageMatrix } from "./send-C9Ssx-iV.js";
5
5
  import { a as unregisterMatrixApprovalReactionTarget, n as listMatrixApprovalReactionBindings, r as registerMatrixApprovalReactionTarget, t as buildMatrixApprovalReactionHint } from "./approval-reactions-D-BxBK_L.js";
6
- import { n as editMatrixMessage, t as deleteMatrixMessage } from "./messages-3UBHfZrN.js";
6
+ import { n as editMatrixMessage, t as deleteMatrixMessage } from "./messages-Bf_s--M9.js";
7
7
  import { listMessageReceiptPlatformIds, resolveMessageReceiptPrimaryId } from "openclaw/plugin-sdk/channel-outbound";
8
8
  import { normalizeUniqueStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
9
9
  import { buildChannelApprovalNativeTargetKey } from "openclaw/plugin-sdk/approval-native-runtime";
@@ -1,4 +1,4 @@
1
- import { a as normalizeMatrixUserId } from "./config-schema-B5GRV8wL.js";
1
+ import { a as normalizeMatrixUserId } from "./config-schema-BShrVROw.js";
2
2
  //#region extensions/matrix/src/approval-ids.ts
3
3
  function normalizeMatrixApproverId(value) {
4
4
  return normalizeMatrixUserId(String(value)) || void 0;
@@ -1,5 +1,5 @@
1
- import { g as resolveMatrixAccount } from "./setup-core-XCdAx1nY.js";
2
- import { t as normalizeMatrixApproverId } from "./approval-ids-Dfn7oQAm.js";
1
+ import { _ as resolveMatrixAccount } from "./setup-core-a542Ernq.js";
2
+ import { t as normalizeMatrixApproverId } from "./approval-ids-2OQj32-K.js";
3
3
  import { resolveApprovalApprovers } from "openclaw/plugin-sdk/approval-auth-runtime";
4
4
  //#region extensions/matrix/src/approval-reaction-auth.ts
5
5
  function normalizeMatrixExecApproverId(value) {
@@ -1,11 +1,11 @@
1
1
  import { n as requiresExplicitMatrixDefaultAccount } from "./account-selection-kqquRzCf.js";
2
2
  import { a as resolveMatrixAccountConfig } from "./account-config-BZWN9tGS.js";
3
- import { d as resolveSingleAccountPromotionTarget, f as singleAccountKeysToMove, g as resolveMatrixAccount, h as resolveDefaultMatrixAccountId, n as matrixSetupAdapter, p as listMatrixAccountIds, t as createMatrixSetupWizardProxy, u as namedAccountPromotionKeys } from "./setup-core-XCdAx1nY.js";
4
- import { a as normalizeMatrixUserId, n as DEFAULT_ACCOUNT_ID$2, r as matrixConfigAdapter, t as MatrixChannelConfigSchema } from "./config-schema-B5GRV8wL.js";
5
- import { t as normalizeMatrixApproverId } from "./approval-ids-Dfn7oQAm.js";
3
+ import { _ as resolveMatrixAccount, d as namedAccountPromotionKeys, f as resolveSingleAccountPromotionTarget, g as resolveDefaultMatrixAccountId, m as listMatrixAccountIds, n as matrixSetupAdapter, p as singleAccountKeysToMove, r as matrixSetupContract, t as createMatrixSetupWizardProxy } from "./setup-core-a542Ernq.js";
4
+ import { a as normalizeMatrixUserId, n as DEFAULT_ACCOUNT_ID$2, r as matrixConfigAdapter, t as MatrixChannelConfigSchema } from "./config-schema-BShrVROw.js";
5
+ import { t as normalizeMatrixApproverId } from "./approval-ids-2OQj32-K.js";
6
6
  import { a as resolveMatrixTargetIdentity, i as resolveMatrixDirectUserId, n as normalizeMatrixMessagingTarget, r as normalizeMatrixResolvableTarget, t as isMatrixQualifiedUserId } from "./target-ids-B-5aQxwn.js";
7
7
  import { t as formatMatrixErrorMessage } from "./errors-C47hvAF8.js";
8
- import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-BA2Y6Crx.js";
8
+ import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-BMSJkkAE.js";
9
9
  import { d as setMatrixThreadBindingIdleTimeoutBySessionKey, p as setMatrixThreadBindingMaxAgeBySessionKey } from "./thread-bindings-shared-CKnY4LSd.js";
10
10
  import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-M3hRmGO-.js";
11
11
  import { n as resolveMatrixInboundConversation, t as defaultTopLevelPlacement } from "./thread-binding-api-DRbBZlhS.js";
@@ -34,9 +34,9 @@ import { normalizeAccountId as normalizeAccountId$1, parseThreadSessionSuffix }
34
34
  import { createPairingPrefixStripper } from "openclaw/plugin-sdk/channel-pairing";
35
35
  import { PAIRING_APPROVED_MESSAGE } from "openclaw/plugin-sdk/channel-status";
36
36
  import { formatLocationText, logInboundDrop, toLocationContext } from "openclaw/plugin-sdk/channel-inbound";
37
- import { getAgentScopedMediaLocalRoots } from "openclaw/plugin-sdk/agent-media-payload";
37
+ import { getAgentScopedMediaLocalRoots } from "openclaw/plugin-sdk/media-local-roots";
38
38
  import { buildChannelKeyCandidates } from "openclaw/plugin-sdk/channel-targets";
39
- import { getSessionEntry, resolveStorePath } from "openclaw/plugin-sdk/session-store-runtime";
39
+ import { deliveryContextFromSession, getSessionEntry, resolveStorePath, sessionDeliveryOrigin } from "openclaw/plugin-sdk/session-store-runtime";
40
40
  //#region extensions/matrix/src/actions.ts
41
41
  const MATRIX_PLUGIN_HANDLED_ACTIONS = /* @__PURE__ */ new Set([
42
42
  "send",
@@ -127,7 +127,7 @@ const matrixMessageActions = {
127
127
  return extractToolSend(args, "sendMessage");
128
128
  },
129
129
  handleAction: async (ctx) => {
130
- const { handleMatrixAction } = await import("./tool-actions.runtime-C0jgWYhX.js");
130
+ const { handleMatrixAction } = await import("./tool-actions.runtime-Dh5ow2EK.js");
131
131
  const { action, params, cfg, accountId, mediaLocalRoots } = ctx;
132
132
  const dispatch = async (actionParams) => await handleMatrixAction({
133
133
  ...actionParams,
@@ -601,7 +601,7 @@ const matrixNativeApprovalCapability = createApproverRestrictedNativeApprovalCap
601
601
  approvalKind,
602
602
  request
603
603
  }),
604
- load: async () => (await import("./approval-handler.runtime-BEa98wwG.js")).matrixApprovalNativeRuntime
604
+ load: async () => (await import("./approval-handler.runtime-D1ibJgSk.js")).matrixApprovalNativeRuntime
605
605
  })
606
606
  });
607
607
  const splitMatrixApprovalCapability = splitChannelApprovalCapability(matrixNativeApprovalCapability);
@@ -780,7 +780,7 @@ function resolveMatrixGroupToolPolicy(params) {
780
780
  }
781
781
  //#endregion
782
782
  //#region extensions/matrix/src/resolver.ts
783
- const loadMatrixChannelRuntime$1 = createLazyRuntimeNamedExport(() => import("./resolver.runtime-CC0VVsAt.js"), "matrixResolverRuntime");
783
+ const loadMatrixChannelRuntime$1 = createLazyRuntimeNamedExport(() => import("./resolver.runtime-BvaFlVLg.js"), "matrixResolverRuntime");
784
784
  const matrixResolverAdapter = { resolveTargets: async ({ cfg, accountId, inputs, kind, runtime }) => (await loadMatrixChannelRuntime$1()).resolveMatrixTargets({
785
785
  cfg,
786
786
  accountId,
@@ -790,38 +790,34 @@ const matrixResolverAdapter = { resolveTargets: async ({ cfg, accountId, inputs,
790
790
  }) };
791
791
  //#endregion
792
792
  //#region extensions/matrix/src/matrix/session-store-metadata.ts
793
- function trimMaybeString(value) {
794
- if (typeof value !== "string") return;
795
- const trimmed = value.trim();
796
- return trimmed.length > 0 ? trimmed : void 0;
797
- }
798
793
  function resolveMatrixRoomTargetId(value) {
799
- const trimmed = trimMaybeString(value);
794
+ const trimmed = normalizeOptionalString(value);
800
795
  if (!trimmed) return;
801
796
  const target = resolveMatrixTargetIdentity(trimmed);
802
797
  return target?.kind === "room" && target.id.startsWith("!") ? target.id : void 0;
803
798
  }
804
799
  function resolveMatrixSessionAccountId(value) {
805
- const trimmed = trimMaybeString(value);
800
+ const trimmed = normalizeOptionalString(value);
806
801
  return trimmed ? normalizeAccountId(trimmed) : void 0;
807
802
  }
808
803
  function resolveMatrixStoredRoomId(params) {
809
- return resolveMatrixRoomTargetId(params.deliveryTo) ?? resolveMatrixRoomTargetId(params.lastTo) ?? resolveMatrixRoomTargetId(params.originNativeChannelId) ?? resolveMatrixRoomTargetId(params.originTo);
804
+ return resolveMatrixRoomTargetId(params.deliveryTo) ?? resolveMatrixRoomTargetId(params.originNativeChannelId) ?? resolveMatrixRoomTargetId(params.originTo);
810
805
  }
811
806
  function resolveMatrixStoredSessionMeta(entry) {
812
807
  if (!entry) return null;
813
- const channel = trimMaybeString(entry.deliveryContext?.channel) ?? trimMaybeString(entry.lastChannel) ?? trimMaybeString(entry.origin?.provider);
814
- const accountId = resolveMatrixSessionAccountId(entry.deliveryContext?.accountId ?? entry.lastAccountId ?? entry.origin?.accountId) ?? void 0;
808
+ const deliveryContext = deliveryContextFromSession(entry);
809
+ const origin = sessionDeliveryOrigin(entry);
810
+ const channel = normalizeOptionalString(deliveryContext?.channel) ?? normalizeOptionalString(origin?.provider);
811
+ const accountId = resolveMatrixSessionAccountId(deliveryContext?.accountId ?? origin?.accountId) ?? void 0;
815
812
  const roomId = resolveMatrixStoredRoomId({
816
- deliveryTo: entry.deliveryContext?.to,
817
- lastTo: entry.lastTo,
818
- originNativeChannelId: entry.origin?.nativeChannelId,
819
- originTo: entry.origin?.to
813
+ deliveryTo: deliveryContext?.to,
814
+ originNativeChannelId: origin?.nativeChannelId,
815
+ originTo: origin?.to
820
816
  });
821
- const chatType = trimMaybeString(entry.origin?.chatType) ?? trimMaybeString(entry.chatType) ?? void 0;
822
- const directUserId = chatType === "direct" ? trimMaybeString(entry.origin?.nativeDirectUserId) ?? resolveMatrixDirectUserId({
823
- from: trimMaybeString(entry.origin?.from),
824
- to: (roomId ? `room:${roomId}` : void 0) ?? trimMaybeString(entry.deliveryContext?.to) ?? trimMaybeString(entry.lastTo) ?? trimMaybeString(entry.origin?.to),
817
+ const chatType = normalizeOptionalString(origin?.chatType) ?? normalizeOptionalString(entry.chatType);
818
+ const directUserId = chatType === "direct" ? normalizeOptionalString(origin?.nativeDirectUserId) ?? resolveMatrixDirectUserId({
819
+ from: normalizeOptionalString(origin?.from),
820
+ to: (roomId ? `room:${roomId}` : void 0) ?? normalizeOptionalString(deliveryContext?.to) ?? normalizeOptionalString(origin?.to),
825
821
  chatType
826
822
  }) : void 0;
827
823
  if (!channel && !accountId && !roomId && !directUserId) return null;
@@ -906,9 +902,9 @@ function resolveMatrixOutboundSessionRoute(params) {
906
902
  //#endregion
907
903
  //#region extensions/matrix/src/channel.ts
908
904
  let matrixStartupLock = Promise.resolve();
909
- const loadMatrixSetupWizard = createLazyRuntimeNamedExport(() => import("./setup-surface-CzUiTe_k.js").then((n) => n.t), "matrixSetupWizard");
910
- const loadMatrixChannelRuntime = createLazyRuntimeNamedExport(() => import("./channel.runtime-BIwlVfQw.js"), "matrixChannelRuntime");
911
- const loadMatrixDoctorModule = createLazyRuntimeModule(() => import("./doctor-DwUVm5Lw.js"));
905
+ const loadMatrixSetupWizard = createLazyRuntimeNamedExport(() => import("./setup-surface-BJrCI6KT.js").then((n) => n.t), "matrixSetupWizard");
906
+ const loadMatrixChannelRuntime = createLazyRuntimeNamedExport(() => import("./channel.runtime-BaPXFRgT.js"), "matrixChannelRuntime");
907
+ const loadMatrixDoctorModule = createLazyRuntimeModule(() => import("./doctor-CM8ijNpW.js"));
912
908
  const meta = {
913
909
  id: "matrix",
914
910
  label: "Matrix",
@@ -1174,7 +1170,7 @@ const matrixPlugin = createChatChannelPlugin({
1174
1170
  }).map(projectMatrixConversationBinding)
1175
1171
  },
1176
1172
  messaging: {
1177
- defaultMarkdownTableMode: "bullets",
1173
+ defaultMarkdownTableMode: "block",
1178
1174
  targetPrefixes: ["matrix"],
1179
1175
  targetIdComparison: "case-sensitive",
1180
1176
  normalizeTarget: normalizeMatrixMessagingTarget,
@@ -1225,6 +1221,12 @@ const matrixPlugin = createChatChannelPlugin({
1225
1221
  namedAccountPromotionKeys,
1226
1222
  resolveSingleAccountPromotionTarget
1227
1223
  },
1224
+ setupContract: {
1225
+ ...matrixSetupContract,
1226
+ singleAccountKeysToMove,
1227
+ namedAccountPromotionKeys,
1228
+ resolveSingleAccountPromotionTarget
1229
+ },
1228
1230
  bindings: {
1229
1231
  compileConfiguredBinding: ({ conversationId }) => normalizeMatrixAcpConversationId(conversationId),
1230
1232
  matchInboundConversation: ({ compiledBinding, conversationId, parentConversationId }) => matchMatrixAcpConversation({
@@ -1281,7 +1283,7 @@ const matrixPlugin = createChatChannelPlugin({
1281
1283
  await previousLock;
1282
1284
  let monitorMatrixProvider;
1283
1285
  try {
1284
- monitorMatrixProvider = (await import("./monitor-BtUIds8T.js")).monitorMatrixProvider;
1286
+ monitorMatrixProvider = (await import("./monitor-s--XqoxF.js")).monitorMatrixProvider;
1285
1287
  } finally {
1286
1288
  releaseLock();
1287
1289
  }
@@ -1,2 +1,2 @@
1
- import { t as matrixPlugin } from "./channel-j331Xd7b.js";
1
+ import { t as matrixPlugin } from "./channel-Cmi248PA.js";
2
2
  export { matrixPlugin };
@@ -1,45 +1,41 @@
1
- import { a as sendMessageMatrix, c as sendTypingMatrix, o as sendPollMatrix } from "./send-BJbrdmNm.js";
1
+ import { i as sendPollMatrix, o as sendTypingMatrix, r as sendMessageMatrix } from "./send-C9Ssx-iV.js";
2
2
  import { t as isBunRuntime } from "./runtime-BefyhPWv.js";
3
- import { f as resolveMatrixAuth } from "./shared-DquM1oz6.js";
4
- import "./client-CA0PULls.js";
5
- import { n as listMatrixDirectoryGroupsLive, r as listMatrixDirectoryPeersLive } from "./directory-live-DiC-0XBC.js";
3
+ import { f as resolveMatrixAuth } from "./shared-CUH5otj8.js";
4
+ import "./client-BFRg0kd4.js";
5
+ import { n as listMatrixDirectoryGroupsLive, r as listMatrixDirectoryPeersLive } from "./directory-live-YRgYDx2w.js";
6
6
  import { p as resolveOutboundSendDep, r as chunkTextForOutbound } from "./runtime-api-D1xI_cvh.js";
7
- import { t as resolveMatrixTargets } from "./resolve-targets-DVoj-YxB.js";
7
+ import { t as resolveMatrixTargets } from "./resolve-targets-nNMcrV3W.js";
8
8
  import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
9
9
  import { createReplyToFanout } from "openclaw/plugin-sdk/channel-outbound";
10
10
  import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
11
11
  import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
12
+ import { runChannelProbe } from "openclaw/plugin-sdk/text-utility-runtime";
12
13
  import { renderMessagePresentationFallbackText } from "openclaw/plugin-sdk/interactive-runtime";
13
14
  import { resolvePayloadMediaUrls, sendPayloadMediaSequence } from "openclaw/plugin-sdk/reply-payload";
14
15
  //#region extensions/matrix/src/matrix/probe.ts
15
- const loadMatrixProbeRuntimeDeps = createLazyRuntimeModule(() => import("./probe.runtime-sBV-Govx.js").then((runtimeModule) => ({ createMatrixClient: runtimeModule.createMatrixClient })));
16
+ const loadMatrixProbeRuntimeDeps = createLazyRuntimeModule(() => import("./probe.runtime-BJOvCHnZ.js").then((runtimeModule) => ({ createMatrixClient: runtimeModule.createMatrixClient })));
16
17
  async function probeMatrix(params) {
17
- const started = Date.now();
18
- const result = {
19
- ok: false,
20
- status: null,
21
- error: null,
22
- elapsedMs: 0
23
- };
24
- if (isBunRuntime()) return {
25
- ...result,
26
- error: "Matrix probe requires Node (bun runtime not supported)",
27
- elapsedMs: Date.now() - started
28
- };
29
- if (!params.homeserver?.trim()) return {
30
- ...result,
31
- error: "missing homeserver",
32
- elapsedMs: Date.now() - started
33
- };
34
- if (!params.accessToken?.trim()) return {
35
- ...result,
36
- error: "missing access token",
37
- elapsedMs: Date.now() - started
38
- };
39
- try {
18
+ return await runChannelProbe(void 0, async () => {
19
+ const result = {
20
+ ok: false,
21
+ status: null,
22
+ error: null
23
+ };
24
+ if (isBunRuntime()) return {
25
+ ...result,
26
+ error: "Matrix probe requires Node (bun runtime not supported)"
27
+ };
28
+ if (!params.homeserver?.trim()) return {
29
+ ...result,
30
+ error: "missing homeserver"
31
+ };
32
+ if (!params.accessToken?.trim()) return {
33
+ ...result,
34
+ error: "missing access token"
35
+ };
40
36
  const { createMatrixClient } = await loadMatrixProbeRuntimeDeps();
41
37
  const inputUserId = normalizeOptionalString(params.userId);
42
- const userId = await (await createMatrixClient({
38
+ const client = await createMatrixClient({
43
39
  homeserver: params.homeserver,
44
40
  userId: inputUserId,
45
41
  accessToken: params.accessToken,
@@ -50,19 +46,17 @@ async function probeMatrix(params) {
50
46
  allowPrivateNetwork: params.allowPrivateNetwork,
51
47
  ssrfPolicy: params.ssrfPolicy,
52
48
  dispatcherPolicy: params.dispatcherPolicy
53
- })).getUserId();
54
- result.ok = true;
55
- result.userId = userId ?? null;
56
- result.elapsedMs = Date.now() - started;
57
- return result;
58
- } catch (err) {
49
+ });
59
50
  return {
60
51
  ...result,
61
- status: typeof err === "object" && err && "statusCode" in err ? Number(err.statusCode) : result.status,
62
- error: formatErrorMessage(err),
63
- elapsedMs: Date.now() - started
52
+ ok: true,
53
+ userId: await client.getUserId() ?? null
64
54
  };
65
- }
55
+ }, (error) => ({
56
+ ok: false,
57
+ status: typeof error === "object" && error && "statusCode" in error ? Number(error.statusCode) : null,
58
+ error: formatErrorMessage(error)
59
+ }));
66
60
  }
67
61
  //#endregion
68
62
  //#region extensions/matrix/src/outbound.ts