@openclaw/matrix 2026.8.1-beta.2 → 2026.8.1-beta.3

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 (51) hide show
  1. package/dist/api.js +6 -6
  2. package/dist/{approval-handler.runtime-CJXCUdRg.js → approval-handler.runtime-CSvueU9P.js} +5 -4
  3. package/dist/{approval-ids-7rf7etWE.js → approval-ids-CEcf-EiM.js} +1 -1
  4. package/dist/{approval-reaction-auth-wBwbEDpZ.js → approval-reaction-auth-CziKXatm.js} +1 -1
  5. package/dist/{channel-VSrHgTON.js → channel-CzQw5OZN.js} +228 -20
  6. package/dist/channel-plugin-api.js +1 -1
  7. package/dist/{channel.runtime-pOOL0uT_.js → channel.runtime-I9pBRQb3.js} +24 -14
  8. package/dist/{channel.setup-PpxRP9Du.js → channel.setup-aNaa3Uyn.js} +3 -9
  9. package/dist/{cli-CkTfKC_c.js → cli-iR6QJ5U0.js} +8 -8
  10. package/dist/{cli-metadata-B1d1aGM5.js → cli-metadata-BmUYWjuM.js} +1 -1
  11. package/dist/cli-metadata.js +1 -1
  12. package/dist/{client-CeGw0G5S.js → client-BBQdBG7t.js} +34 -19
  13. package/dist/{client-sJesKQmp.js → client-D8XghqmX.js} +2 -2
  14. package/dist/{client-bootstrap-BFwT_2VT.js → client-bootstrap-Co3RlItb.js} +1 -1
  15. package/dist/contract-api.js +2 -2
  16. package/dist/{directory-live-Bvg2wAnR.js → directory-live-DLQzel12.js} +2 -2
  17. package/dist/doctor-contract-api.js +7 -1
  18. package/dist/{draft-stream-BRi7PRRS.js → draft-stream-DQ7QNC-l.js} +1 -1
  19. package/dist/index.js +1 -1
  20. package/dist/{media-text-JudlYOSc.js → media-text-Dh-DpTc3.js} +4 -1
  21. package/dist/{messages-BW0s-6Y9.js → messages-DEqg7HVy.js} +27 -7
  22. package/dist/{monitor-Ddfc-vjX.js → monitor-FNrfkuWL.js} +33 -35
  23. package/dist/plugin-entry.handlers.runtime.js +1 -1
  24. package/dist/probe.runtime-NIJZYqc2.js +2 -0
  25. package/dist/{profile-update-BkgWYDIp.js → profile-update-BQlE5s2J.js} +1 -1
  26. package/dist/{reaction-events-nfUbFLdV.js → reaction-events-BKOLlnCo.js} +3 -3
  27. package/dist/{resolve-targets-BJAPY4Vb.js → resolve-targets-e7AI0P75.js} +2 -2
  28. package/dist/{resolver.runtime-LWJELYq5.js → resolver.runtime-V8u0pHEb.js} +1 -1
  29. package/dist/runtime-api.js +1 -1
  30. package/dist/{sdk-DjaQFCHc.js → sdk-NxK3vzMa.js} +17 -3
  31. package/dist/{send-ZDLU4JTk.js → send-ClHgDZLT.js} +11 -10
  32. package/dist/session-binding-contract-api.js +2 -3
  33. package/dist/{setup-bootstrap-BaXkhgJg.js → setup-bootstrap-BGPjbA5N.js} +1 -1
  34. package/dist/{setup-core-DQn6b5vi.js → setup-core-DigrLebY.js} +1 -1
  35. package/dist/setup-plugin-api.js +1 -1
  36. package/dist/{setup-surface-DlhJdrNI.js → setup-surface-Dtn8sAWs.js} +10 -9
  37. package/dist/subagent-hooks-CMoZaARG.js +48 -0
  38. package/dist/subagent-hooks-api.js +1 -1
  39. package/dist/{target-ids-B-5aQxwn.js → target-ids-Nwx7cMVE.js} +11 -1
  40. package/dist/{thread-binding-api-DRbBZlhS.js → thread-binding-api-CzkeLZCU.js} +1 -1
  41. package/dist/thread-binding-api.js +1 -1
  42. package/dist/{thread-bindings-CcHZP3w2.js → thread-bindings-BYEGfw3h.js} +11 -7
  43. package/dist/thread-bindings-runtime.js +1 -1
  44. package/dist/{thread-bindings-shared-CKnY4LSd.js → thread-bindings-shared-oNPiyMWY.js} +1 -6
  45. package/dist/{tool-actions.runtime-DmdRL0bN.js → tool-actions.runtime-ck6IJyP0.js} +8 -8
  46. package/dist/{verification-C7ig-bQE.js → verification-CabtBTtB.js} +1 -1
  47. package/openclaw.plugin.json +7 -0
  48. package/package.json +4 -4
  49. package/dist/probe.runtime-Dr91B_X3.js +0 -2
  50. package/dist/route-DY6at4qJ.js +0 -161
  51. package/dist/subagent-hooks-dkPAF6Et.js +0 -143
package/dist/api.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import { a as resolveMatrixDefaultOrOnlyAccountId, i as resolveMatrixChannelConfig, n as requiresExplicitMatrixDefaultAccount, r as resolveConfiguredMatrixAccountIds, t as findMatrixAccountEntry } from "./account-selection-CWuhuFn1.js";
2
2
  import { n as listMatrixEnvAccountIds, r as resolveMatrixEnvAccountToken, t as getMatrixScopedEnvVarNames } from "./env-vars-dGqak9dN.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 { t as matrixPlugin } from "./channel-VSrHgTON.js";
5
- import { n as matrixSetupAdapter, t as createMatrixSetupWizardProxy } from "./setup-core-DQn6b5vi.js";
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-DlhJdrNI.js";
8
- import { t as createMatrixThreadBindingManager } from "./thread-bindings-CcHZP3w2.js";
9
- export { createMatrixSetupWizardProxy, createMatrixThreadBindingManager, findMatrixAccountEntry, getMatrixScopedEnvVarNames, getMatrixThreadBindingManager, hashMatrixAccessToken, listMatrixEnvAccountIds, matrixOnboardingAdapter, matrixOnboardingAdapter as matrixSetupWizard, matrixPlugin, matrixSetupAdapter, requiresExplicitMatrixDefaultAccount, resetMatrixThreadBindingsForTests, resolveConfiguredMatrixAccountIds, resolveMatrixAccountStorageRoot, resolveMatrixChannelConfig, resolveMatrixCredentialsDir, resolveMatrixCredentialsFilename, resolveMatrixCredentialsPath, resolveMatrixDefaultOrOnlyAccountId, resolveMatrixEnvAccountToken, resolveMatrixHomeserverKey, sanitizeMatrixPathSegment, setMatrixThreadBindingIdleTimeoutBySessionKey, setMatrixThreadBindingMaxAgeBySessionKey };
4
+ import { t as matrixPlugin } from "./channel-CzQw5OZN.js";
5
+ import { n as matrixSetupAdapter, t as createMatrixSetupWizardProxy } from "./setup-core-DigrLebY.js";
6
+ import { f as setMatrixThreadBindingMaxAgeBySessionKey, n as getMatrixThreadBindingManager, u as setMatrixThreadBindingIdleTimeoutBySessionKey } from "./thread-bindings-shared-oNPiyMWY.js";
7
+ import { n as matrixOnboardingAdapter } from "./setup-surface-Dtn8sAWs.js";
8
+ import { t as createMatrixThreadBindingManager } from "./thread-bindings-BYEGfw3h.js";
9
+ export { createMatrixSetupWizardProxy, createMatrixThreadBindingManager, findMatrixAccountEntry, getMatrixScopedEnvVarNames, getMatrixThreadBindingManager, hashMatrixAccessToken, listMatrixEnvAccountIds, matrixOnboardingAdapter, matrixOnboardingAdapter as matrixSetupWizard, matrixPlugin, matrixSetupAdapter, requiresExplicitMatrixDefaultAccount, resolveConfiguredMatrixAccountIds, resolveMatrixAccountStorageRoot, resolveMatrixChannelConfig, resolveMatrixCredentialsDir, resolveMatrixCredentialsFilename, resolveMatrixCredentialsPath, resolveMatrixDefaultOrOnlyAccountId, resolveMatrixEnvAccountToken, resolveMatrixHomeserverKey, sanitizeMatrixPathSegment, setMatrixThreadBindingIdleTimeoutBySessionKey, setMatrixThreadBindingMaxAgeBySessionKey };
@@ -1,9 +1,9 @@
1
1
  import { i as resolveMatrixAccount } from "./accounts-BCzyubQt.js";
2
- import { _ as shouldHandleMatrixApprovalRequest, g as isMatrixAnyApprovalClientEnabled } from "./channel-VSrHgTON.js";
3
- import { a as resolveMatrixTargetIdentity } from "./target-ids-B-5aQxwn.js";
4
- import { a as sendSingleTextMessageMatrix, n as reactMatrixMessage, r as sendMessageMatrix, w as repairMatrixDirectRooms } from "./send-ZDLU4JTk.js";
2
+ import { C as shouldHandleMatrixApprovalRequest, S as isMatrixAnyApprovalClientEnabled } from "./channel-CzQw5OZN.js";
3
+ import { o as resolveMatrixTargetIdentity } from "./target-ids-Nwx7cMVE.js";
4
+ import { a as sendSingleTextMessageMatrix, n as reactMatrixMessage, r as sendMessageMatrix, w as repairMatrixDirectRooms } from "./send-ClHgDZLT.js";
5
5
  import { a as unregisterMatrixApprovalReactionTarget, n as listMatrixApprovalReactionBindings, r as registerMatrixApprovalReactionTarget, t as buildMatrixApprovalReactionHint } from "./approval-reactions-tXh9KYrW.js";
6
- import { n as editMatrixMessage, t as deleteMatrixMessage } from "./messages-BW0s-6Y9.js";
6
+ import { n as editMatrixMessage, t as deleteMatrixMessage } from "./messages-DEqg7HVy.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";
@@ -128,6 +128,7 @@ function buildPendingApprovalContent(params) {
128
128
  const allowedDecisions = params.view.actions.map((action) => action.decision);
129
129
  const payload = params.view.approvalKind === "plugin" ? buildPluginApprovalPendingReplyPayload({
130
130
  request: {
131
+ approvalKind: "plugin",
131
132
  id: params.view.approvalId,
132
133
  request: {
133
134
  title: params.view.title,
@@ -1,4 +1,4 @@
1
- import { a as normalizeMatrixUserId } from "./channel.setup-PpxRP9Du.js";
1
+ import { a as normalizeMatrixUserId } from "./channel.setup-aNaa3Uyn.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
1
  import { i as resolveMatrixAccount } from "./accounts-BCzyubQt.js";
2
- import { t as normalizeMatrixApproverId } from "./approval-ids-7rf7etWE.js";
2
+ import { t as normalizeMatrixApproverId } from "./approval-ids-CEcf-EiM.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,18 +1,19 @@
1
1
  import { n as requiresExplicitMatrixDefaultAccount } from "./account-selection-CWuhuFn1.js";
2
2
  import { a as resolveMatrixAccountConfig } from "./account-config-BZWN9tGS.js";
3
3
  import { i as resolveMatrixAccount, r as resolveDefaultMatrixAccountId, t as listMatrixAccountIds } from "./accounts-BCzyubQt.js";
4
- import { a as normalizeMatrixUserId, r as DEFAULT_ACCOUNT_ID$2, t as matrixPluginBase } from "./channel.setup-PpxRP9Du.js";
5
- import { t as normalizeMatrixApproverId } from "./approval-ids-7rf7etWE.js";
6
- import { a as resolveMatrixTargetIdentity, i as resolveMatrixDirectUserId, n as normalizeMatrixMessagingTarget, r as normalizeMatrixResolvableTarget, t as isMatrixQualifiedUserId } from "./target-ids-B-5aQxwn.js";
4
+ import { a as normalizeMatrixUserId, r as DEFAULT_ACCOUNT_ID$2, t as matrixPluginBase } from "./channel.setup-aNaa3Uyn.js";
5
+ import { t as normalizeMatrixApproverId } from "./approval-ids-CEcf-EiM.js";
6
+ import { a as resolveMatrixDirectUserId, i as normalizeMatrixResolvableTarget, n as isMatrixRoomId, o as resolveMatrixTargetIdentity, r as normalizeMatrixMessagingTarget, t as isMatrixQualifiedUserId } from "./target-ids-Nwx7cMVE.js";
7
7
  import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-DEt4O4Zt.js";
8
- import { d as setMatrixThreadBindingIdleTimeoutBySessionKey, p as setMatrixThreadBindingMaxAgeBySessionKey } from "./thread-bindings-shared-CKnY4LSd.js";
8
+ import { n as MATRIX_REACTION_EVENT_TYPE } from "./reaction-common-DkrQdBSZ.js";
9
+ import { f as setMatrixThreadBindingMaxAgeBySessionKey, u as setMatrixThreadBindingIdleTimeoutBySessionKey } from "./thread-bindings-shared-oNPiyMWY.js";
9
10
  import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-CufozuyJ.js";
10
- import { n as resolveMatrixInboundConversation, t as defaultTopLevelPlacement } from "./thread-binding-api-DRbBZlhS.js";
11
+ import { n as resolveMatrixInboundConversation, t as defaultTopLevelPlacement } from "./thread-binding-api-CzkeLZCU.js";
11
12
  import { createLazyRuntimeModule, createLazyRuntimeNamedExport } from "openclaw/plugin-sdk/lazy-runtime";
12
13
  import { adaptScopedAccountAccessor, createScopedDmSecurityResolver } from "openclaw/plugin-sdk/channel-config-helpers";
13
14
  import { buildChannelOutboundSessionRoute, buildThreadAwareOutboundSessionRoute, createChatChannelPlugin } from "openclaw/plugin-sdk/channel-core";
14
15
  import { createChannelMessageAdapterFromOutbound, createReplyPrefixOptions, createRuntimeOutboundDelegates, createTypingCallbacks, logTypingFailure } from "openclaw/plugin-sdk/channel-outbound";
15
- import { createAllowlistProviderOpenWarningCollector, projectAccountConfigWarningCollector, resolveScopeRequireMention, resolveScopeToolsPolicy } from "openclaw/plugin-sdk/channel-policy";
16
+ import { createAllowlistProviderOpenWarningCollector, createConditionalWarningCollector, resolveScopeRequireMention, resolveScopeToolsPolicy } from "openclaw/plugin-sdk/channel-policy";
16
17
  import { createScopedAccountReplyToModeResolver } from "openclaw/plugin-sdk/conversation-runtime";
17
18
  import { createChannelDirectoryAdapter, createResolvedDirectoryEntriesLister, createRuntimeDirectoryLiveAdapter } from "openclaw/plugin-sdk/directory-runtime";
18
19
  import { buildProbeChannelStatusSummary, collectStatusIssuesFromLastError, createComputedAccountStatusAdapter, createDefaultChannelRuntimeState } from "openclaw/plugin-sdk/status-helpers";
@@ -31,10 +32,12 @@ import { createChannelExecApprovalProfile, getExecApprovalReplyMetadata, isChann
31
32
  import { createPairingPrefixStripper } from "openclaw/plugin-sdk/channel-pairing";
32
33
  import { PAIRING_APPROVED_MESSAGE } from "openclaw/plugin-sdk/channel-status";
33
34
  import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
34
- import { parseThreadSessionSuffix } from "openclaw/plugin-sdk/routing";
35
+ import { buildAgentSessionKey, deriveLastRoutePolicy, parseAgentSessionKey, parseThreadSessionSuffix, resolveAgentIdFromSessionKey, resolveAgentRoute, resolveThreadSessionKeys } from "openclaw/plugin-sdk/routing";
35
36
  import { formatLocationText, logInboundDrop, toLocationContext } from "openclaw/plugin-sdk/channel-inbound";
36
37
  import { getAgentScopedMediaLocalRoots } from "openclaw/plugin-sdk/media-local-roots";
37
38
  import { buildChannelKeyCandidates } from "openclaw/plugin-sdk/channel-targets";
39
+ import { resolveConfiguredAcpBindingRecord } from "openclaw/plugin-sdk/acp-binding-resolve-runtime";
40
+ import { inspectSessionBindingByConversation } from "openclaw/plugin-sdk/session-binding-runtime";
38
41
  import { deliveryContextFromSession, getSessionEntry, resolveStorePath, sessionDeliveryOrigin } from "openclaw/plugin-sdk/session-store-runtime";
39
42
  //#region extensions/matrix/src/actions.ts
40
43
  const MATRIX_PLUGIN_HANDLED_ACTIONS = /* @__PURE__ */ new Set([
@@ -102,6 +105,7 @@ function resolveMatrixActionAccount(params) {
102
105
  return account.enabled && account.configured ? account : null;
103
106
  }
104
107
  const matrixMessageActions = {
108
+ providerOwnedReadGates: true,
105
109
  describeMessageTool: ({ cfg, accountId, senderIsOwner }) => {
106
110
  const account = resolveMatrixActionAccount({
107
111
  cfg,
@@ -137,7 +141,7 @@ const matrixMessageActions = {
137
141
  return account && createActionGate(account.config.actions)("messages") ? payload : null;
138
142
  },
139
143
  handleAction: async (ctx) => {
140
- const { handleMatrixAction } = await import("./tool-actions.runtime-DmdRL0bN.js");
144
+ const { handleMatrixAction } = await import("./tool-actions.runtime-ck6IJyP0.js");
141
145
  const { action, params, cfg, accountId, mediaLocalRoots } = ctx;
142
146
  const dispatch = async (actionParams) => await handleMatrixAction({
143
147
  ...actionParams,
@@ -428,6 +432,7 @@ function shouldHandleMatrixApprovalRequest(params) {
428
432
  }
429
433
  function buildFilterCheckRequest(params) {
430
434
  if (params.metadata.approvalKind === "plugin") return {
435
+ approvalKind: "plugin",
431
436
  id: params.metadata.approvalId,
432
437
  request: {
433
438
  title: "Plugin Approval Required",
@@ -439,6 +444,7 @@ function buildFilterCheckRequest(params) {
439
444
  expiresAtMs: 0
440
445
  };
441
446
  return {
447
+ approvalKind: "exec",
442
448
  id: params.metadata.approvalId,
443
449
  request: {
444
450
  command: "",
@@ -603,7 +609,7 @@ const matrixNativeApprovalCapability = createApproverRestrictedNativeApprovalCap
603
609
  approvalKind,
604
610
  request
605
611
  }),
606
- load: async () => (await import("./approval-handler.runtime-CJXCUdRg.js")).matrixApprovalNativeRuntime
612
+ load: async () => (await import("./approval-handler.runtime-CSvueU9P.js")).matrixApprovalNativeRuntime
607
613
  })
608
614
  });
609
615
  const splitMatrixApprovalCapability = splitChannelApprovalCapability(matrixNativeApprovalCapability);
@@ -828,8 +834,195 @@ function resolveMatrixGroupToolPolicy(params) {
828
834
  return resolveScopeToolsPolicy(resolveMatrixGroupScope(params));
829
835
  }
830
836
  //#endregion
837
+ //#region extensions/matrix/src/matrix/monitor/types.ts
838
+ const EventType = {
839
+ RoomMessage: "m.room.message",
840
+ RoomMessageEncrypted: "m.room.encrypted",
841
+ RoomMember: "m.room.member",
842
+ Location: "m.location",
843
+ Reaction: MATRIX_REACTION_EVENT_TYPE
844
+ };
845
+ const RelationType = {
846
+ Replace: "m.replace",
847
+ Thread: "m.thread"
848
+ };
849
+ //#endregion
850
+ //#region extensions/matrix/src/matrix/monitor/threads.ts
851
+ function resolveMatrixThreadSessionKeys(params) {
852
+ return resolveThreadSessionKeys({
853
+ ...params,
854
+ normalizeThreadId: (threadId) => threadId
855
+ });
856
+ }
857
+ function resolveMatrixRelatedReplyToEventId(relates) {
858
+ if (!relates || typeof relates !== "object") return;
859
+ if ("m.in_reply_to" in relates && typeof relates["m.in_reply_to"] === "object" && relates["m.in_reply_to"] && "event_id" in relates["m.in_reply_to"] && typeof relates["m.in_reply_to"].event_id === "string") return relates["m.in_reply_to"].event_id;
860
+ }
861
+ function resolveMatrixThreadRouting(params) {
862
+ const effectiveThreadReplies = params.isDirectMessage && params.dmThreadReplies !== void 0 ? params.dmThreadReplies : params.threadReplies;
863
+ const messageId = params.messageId.trim();
864
+ const threadRootId = params.threadRootId?.trim();
865
+ const inboundThreadId = threadRootId && threadRootId !== messageId ? threadRootId : void 0;
866
+ return { threadId: effectiveThreadReplies === "off" ? void 0 : effectiveThreadReplies === "inbound" ? inboundThreadId : inboundThreadId ?? (messageId || void 0) };
867
+ }
868
+ function resolveMatrixThreadRootId(params) {
869
+ const relates = params.content["m.relates_to"];
870
+ if (!relates || typeof relates !== "object") return;
871
+ if ("rel_type" in relates && relates.rel_type === RelationType.Thread) {
872
+ if ("event_id" in relates && typeof relates.event_id === "string") return relates.event_id;
873
+ return resolveMatrixRelatedReplyToEventId(relates);
874
+ }
875
+ }
876
+ function resolveMatrixReplyToEventId(content) {
877
+ return resolveMatrixRelatedReplyToEventId(content["m.relates_to"]);
878
+ }
879
+ //#endregion
880
+ //#region extensions/matrix/src/matrix/monitor/route.ts
881
+ function resolveMatrixDmSessionKey(params) {
882
+ if (params.dmSessionScope !== "per-room") return params.fallbackSessionKey;
883
+ return buildAgentSessionKey({
884
+ agentId: params.agentId,
885
+ channel: "matrix",
886
+ accountId: params.accountId,
887
+ peer: {
888
+ kind: "channel",
889
+ id: params.roomId
890
+ }
891
+ });
892
+ }
893
+ function shouldApplyMatrixPerRoomDmSessionScope(params) {
894
+ return params.isDirectMessage && !params.configuredSessionKey;
895
+ }
896
+ function resolveMatrixInboundRoute(params) {
897
+ const baseRoute = params.resolveAgentRoute({
898
+ cfg: params.cfg,
899
+ channel: "matrix",
900
+ accountId: params.accountId,
901
+ peer: {
902
+ kind: params.isDirectMessage ? "direct" : "channel",
903
+ id: params.isDirectMessage ? params.senderId : params.roomId
904
+ },
905
+ parentPeer: params.isDirectMessage ? {
906
+ kind: "channel",
907
+ id: params.roomId
908
+ } : void 0
909
+ });
910
+ const bindingConversationId = params.threadId ?? params.roomId;
911
+ const bindingParentConversationId = params.threadId ? params.roomId : void 0;
912
+ const bindingInspection = inspectSessionBindingByConversation({
913
+ channel: "matrix",
914
+ accountId: params.accountId,
915
+ conversationId: bindingConversationId,
916
+ parentConversationId: bindingParentConversationId
917
+ });
918
+ const runtimeBinding = bindingInspection.status === "available" ? bindingInspection.binding : null;
919
+ const boundSessionKey = runtimeBinding?.targetSessionKey?.trim();
920
+ if (runtimeBinding && boundSessionKey) return {
921
+ route: {
922
+ ...baseRoute,
923
+ sessionKey: boundSessionKey,
924
+ agentId: resolveAgentIdFromSessionKey(boundSessionKey) || baseRoute.agentId,
925
+ lastRoutePolicy: deriveLastRoutePolicy({
926
+ sessionKey: boundSessionKey,
927
+ mainSessionKey: baseRoute.mainSessionKey
928
+ }),
929
+ matchedBy: "binding.channel"
930
+ },
931
+ configuredBinding: null,
932
+ bindingOwnerAvailable: true,
933
+ runtimeBindingId: runtimeBinding.bindingId
934
+ };
935
+ const configuredBinding = runtimeBinding == null ? resolveConfiguredAcpBindingRecord({
936
+ cfg: params.cfg,
937
+ channel: "matrix",
938
+ accountId: params.accountId,
939
+ conversationId: bindingConversationId,
940
+ parentConversationId: bindingParentConversationId
941
+ }) : null;
942
+ const configuredSessionKey = configuredBinding?.record.targetSessionKey?.trim();
943
+ const effectiveRoute = configuredBinding && configuredSessionKey ? {
944
+ ...baseRoute,
945
+ sessionKey: configuredSessionKey,
946
+ agentId: resolveAgentIdFromSessionKey(configuredSessionKey) || configuredBinding.spec.agentId || baseRoute.agentId,
947
+ lastRoutePolicy: deriveLastRoutePolicy({
948
+ sessionKey: configuredSessionKey,
949
+ mainSessionKey: baseRoute.mainSessionKey
950
+ }),
951
+ matchedBy: "binding.channel"
952
+ } : baseRoute;
953
+ const dmSessionKey = shouldApplyMatrixPerRoomDmSessionScope({
954
+ isDirectMessage: params.isDirectMessage,
955
+ configuredSessionKey
956
+ }) ? resolveMatrixDmSessionKey({
957
+ accountId: params.accountId,
958
+ agentId: effectiveRoute.agentId,
959
+ roomId: params.roomId,
960
+ dmSessionScope: params.dmSessionScope,
961
+ fallbackSessionKey: effectiveRoute.sessionKey
962
+ }) : effectiveRoute.sessionKey;
963
+ const routeWithDmScope = dmSessionKey === effectiveRoute.sessionKey ? effectiveRoute : {
964
+ ...effectiveRoute,
965
+ sessionKey: dmSessionKey,
966
+ lastRoutePolicy: "session"
967
+ };
968
+ if (!configuredBinding && !configuredSessionKey && params.threadId) {
969
+ const threadKeys = resolveMatrixThreadSessionKeys({
970
+ baseSessionKey: routeWithDmScope.sessionKey,
971
+ threadId: params.threadId,
972
+ parentSessionKey: routeWithDmScope.sessionKey
973
+ });
974
+ return {
975
+ route: {
976
+ ...routeWithDmScope,
977
+ sessionKey: threadKeys.sessionKey,
978
+ mainSessionKey: threadKeys.parentSessionKey ?? routeWithDmScope.sessionKey,
979
+ lastRoutePolicy: deriveLastRoutePolicy({
980
+ sessionKey: threadKeys.sessionKey,
981
+ mainSessionKey: threadKeys.parentSessionKey ?? routeWithDmScope.sessionKey
982
+ })
983
+ },
984
+ configuredBinding,
985
+ bindingOwnerAvailable: bindingInspection.status === "available",
986
+ runtimeBindingId: runtimeBinding?.bindingId ?? null
987
+ };
988
+ }
989
+ return {
990
+ route: routeWithDmScope,
991
+ configuredBinding,
992
+ bindingOwnerAvailable: bindingInspection.status === "available",
993
+ runtimeBindingId: runtimeBinding?.bindingId ?? null
994
+ };
995
+ }
996
+ //#endregion
997
+ //#region extensions/matrix/src/matrix/conversation-route-owner.ts
998
+ function resolveMatrixConversationRouteOwner(params) {
999
+ const { cfg, accountId, conversation } = params;
1000
+ const roomId = conversation.nativeChannelId?.trim() || (conversation.kind === "direct" ? "" : conversation.peerId.trim());
1001
+ if (!roomId) return null;
1002
+ const isDirectMessage = conversation.kind === "direct";
1003
+ const result = resolveMatrixInboundRoute({
1004
+ cfg,
1005
+ accountId,
1006
+ roomId,
1007
+ senderId: conversation.peerId,
1008
+ isDirectMessage,
1009
+ dmSessionScope: resolveMatrixAccount({
1010
+ cfg,
1011
+ accountId
1012
+ }).config.dm?.sessionScope,
1013
+ threadId: conversation.threadId,
1014
+ resolveAgentRoute
1015
+ });
1016
+ if (!result.bindingOwnerAvailable) return { kind: "unavailable" };
1017
+ if (result.runtimeBindingId && !parseAgentSessionKey(result.route.sessionKey)?.agentId) return null;
1018
+ return {
1019
+ kind: "agent",
1020
+ agentId: result.route.agentId
1021
+ };
1022
+ }
1023
+ //#endregion
831
1024
  //#region extensions/matrix/src/resolver.ts
832
- const loadMatrixChannelRuntime$1 = createLazyRuntimeNamedExport(() => import("./resolver.runtime-LWJELYq5.js"), "matrixResolverRuntime");
1025
+ const loadMatrixChannelRuntime$1 = createLazyRuntimeNamedExport(() => import("./resolver.runtime-V8u0pHEb.js"), "matrixResolverRuntime");
833
1026
  const matrixResolverAdapter = { resolveTargets: async ({ cfg, accountId, inputs, kind, runtime }) => (await loadMatrixChannelRuntime$1()).resolveMatrixTargets({
834
1027
  cfg,
835
1028
  accountId,
@@ -935,7 +1128,7 @@ function resolveMatrixOutboundSessionRoute(params) {
935
1128
  agentId: params.agentId,
936
1129
  channel: "matrix",
937
1130
  accountId: effectiveAccountId,
938
- recipientSessionExact: target.kind === "room" ? dmSessionScope === "per-room" && target.id.startsWith("!") && target.id.includes(":") : dmSessionScope === "per-user" ? isMatrixQualifiedUserId(target.id) : roomScopedDmId !== void 0,
1131
+ recipientSessionExact: target.kind === "room" ? dmSessionScope === "per-room" && isMatrixRoomId(target.id) : dmSessionScope === "per-user" ? isMatrixQualifiedUserId(target.id) : roomScopedDmId !== void 0,
939
1132
  peer,
940
1133
  chatType,
941
1134
  from,
@@ -956,7 +1149,7 @@ function resolveMatrixOutboundSessionRoute(params) {
956
1149
  //#endregion
957
1150
  //#region extensions/matrix/src/channel.ts
958
1151
  let matrixStartupLock = Promise.resolve();
959
- const loadMatrixChannelRuntime = createLazyRuntimeNamedExport(() => import("./channel.runtime-pOOL0uT_.js"), "matrixChannelRuntime");
1152
+ const loadMatrixChannelRuntime = createLazyRuntimeNamedExport(() => import("./channel.runtime-I9pBRQb3.js"), "matrixChannelRuntime");
960
1153
  const loadMatrixDoctorModule = createLazyRuntimeModule(() => import("./doctor-EWf9CDso.js"));
961
1154
  function buildMatrixTrafficStatusSummary(snapshot) {
962
1155
  return {
@@ -1020,7 +1213,7 @@ const resolveMatrixDmPolicy = createScopedDmSecurityResolver({
1020
1213
  allowFromPathSuffix: "dm.",
1021
1214
  normalizeEntry: (raw) => normalizeMatrixUserId(raw)
1022
1215
  });
1023
- const collectMatrixSecurityWarnings = createAllowlistProviderOpenWarningCollector({
1216
+ const collectMatrixGroupPolicyWarnings = createAllowlistProviderOpenWarningCollector({
1024
1217
  providerConfigPresent: (cfg) => cfg.channels?.matrix !== void 0,
1025
1218
  resolveGroupPolicy: (account) => account.config.groupPolicy,
1026
1219
  buildOpenWarning: {
@@ -1032,18 +1225,28 @@ const collectMatrixSecurityWarnings = createAllowlistProviderOpenWarningCollecto
1032
1225
  function resolveMatrixAccountConfigPath(accountId, field) {
1033
1226
  return accountId === DEFAULT_ACCOUNT_ID$2 ? `channels.matrix.${field}` : `channels.matrix.accounts.${accountId}.${field}`;
1034
1227
  }
1035
- function collectMatrixSecurityWarningsForAccount(params) {
1036
- const warnings = collectMatrixSecurityWarnings(params);
1228
+ function collectMatrixGroupPolicyWarningsForAccount(params) {
1229
+ const warnings = collectMatrixGroupPolicyWarnings(params);
1037
1230
  if (params.account.accountId !== DEFAULT_ACCOUNT_ID$2) {
1038
1231
  const groupPolicyPath = resolveMatrixAccountConfigPath(params.account.accountId, "groupPolicy");
1039
1232
  const groupsPath = resolveMatrixAccountConfigPath(params.account.accountId, "groups");
1040
1233
  const groupAllowFromPath = resolveMatrixAccountConfigPath(params.account.accountId, "groupAllowFrom");
1041
1234
  return warnings.map((warning) => warning.replace("channels.matrix.groupPolicy", groupPolicyPath).replace("channels.matrix.groups", groupsPath).replace("channels.matrix.groupAllowFrom", groupAllowFromPath));
1042
1235
  }
1043
- if (params.account.config.autoJoin !== "always") return warnings;
1236
+ return warnings;
1237
+ }
1238
+ const collectMatrixOpenGroupFindings = createConditionalWarningCollector.findings({
1239
+ collectWarnings: collectMatrixGroupPolicyWarningsForAccount,
1240
+ checkId: "channels.matrix.groups.open",
1241
+ severity: "critical",
1242
+ title: "Matrix security warning"
1243
+ });
1244
+ function collectMatrixSecurityWarningsForAccount(params) {
1245
+ const findings = collectMatrixOpenGroupFindings(params);
1246
+ if (params.account.accountId !== DEFAULT_ACCOUNT_ID$2 || params.account.config.autoJoin !== "always") return findings;
1044
1247
  const autoJoinPath = resolveMatrixAccountConfigPath(params.account.accountId, "autoJoin");
1045
1248
  const autoJoinAllowlistPath = resolveMatrixAccountConfigPath(params.account.accountId, "autoJoinAllowlist");
1046
- return [...warnings, `- Matrix invites: autoJoin="always" joins any invited room before message policy applies. Set ${autoJoinPath}="allowlist" + ${autoJoinAllowlistPath} (or ${autoJoinPath}="off") to restrict joins.`];
1249
+ return [...findings, `- Matrix invites: autoJoin="always" joins any invited room before message policy applies. Set ${autoJoinPath}="allowlist" + ${autoJoinAllowlistPath} (or ${autoJoinPath}="off") to restrict joins.`];
1047
1250
  }
1048
1251
  function normalizeMatrixAcpConversationId(conversationId) {
1049
1252
  const target = resolveMatrixTargetIdentity(conversationId);
@@ -1177,6 +1380,7 @@ const matrixPlugin = createChatChannelPlugin({
1177
1380
  },
1178
1381
  conversationBindings: {
1179
1382
  supportsCurrentConversationBinding: true,
1383
+ bindingStore: "adapter",
1180
1384
  defaultTopLevelPlacement,
1181
1385
  setIdleTimeoutBySessionKey: ({ targetSessionKey, accountId, idleTimeoutMs }) => setMatrixThreadBindingIdleTimeoutBySessionKey({
1182
1386
  targetSessionKey,
@@ -1208,6 +1412,7 @@ const matrixPlugin = createChatChannelPlugin({
1208
1412
  parentConversationId
1209
1413
  }),
1210
1414
  resolveOutboundSessionRoute: (params) => resolveMatrixOutboundSessionRoute(params),
1415
+ resolveConversationRouteOwner: resolveMatrixConversationRouteOwner,
1211
1416
  targetResolver: {
1212
1417
  looksLikeId: (raw) => {
1213
1418
  const trimmed = raw.trim();
@@ -1295,7 +1500,7 @@ const matrixPlugin = createChatChannelPlugin({
1295
1500
  await previousLock;
1296
1501
  let monitorMatrixProvider;
1297
1502
  try {
1298
- monitorMatrixProvider = (await import("./monitor-Ddfc-vjX.js")).monitorMatrixProvider;
1503
+ monitorMatrixProvider = (await import("./monitor-FNrfkuWL.js")).monitorMatrixProvider;
1299
1504
  } finally {
1300
1505
  releaseLock();
1301
1506
  }
@@ -1328,7 +1533,10 @@ const matrixPlugin = createChatChannelPlugin({
1328
1533
  },
1329
1534
  security: {
1330
1535
  resolveDmPolicy: resolveMatrixDmPolicy,
1331
- collectWarnings: projectAccountConfigWarningCollector((cfg) => cfg, collectMatrixSecurityWarningsForAccount)
1536
+ collectWarnings: ({ account, cfg }) => collectMatrixSecurityWarningsForAccount({
1537
+ account,
1538
+ cfg
1539
+ })
1332
1540
  },
1333
1541
  pairing: { text: createMatrixPairingText(async (to, message, options) => await (await loadMatrixChannelRuntime()).sendMessageMatrix(to, message, options)) },
1334
1542
  threading: {
@@ -1362,4 +1570,4 @@ const matrixPlugin = createChatChannelPlugin({
1362
1570
  outbound: matrixChannelOutbound
1363
1571
  });
1364
1572
  //#endregion
1365
- export { shouldHandleMatrixApprovalRequest as _, buildAllowlistResolutionSummary as a, createTypingCallbacks as c, logInboundDrop as d, logTypingFailure as f, isMatrixAnyApprovalClientEnabled as g, toLocationContext as h, addAllowlistUserEntriesFromConfigEntry as i, formatLocationText as l, summarizeMapping as m, resolveMatrixStoredSessionMeta as n, canonicalizeAllowlistWithResolvedIds as o, patchAllowlistUsersInConfigEntries as p, resolveMatrixRoomConfig as r, createReplyPrefixOptions as s, matrixPlugin as t, getAgentScopedMediaLocalRoots as u };
1573
+ export { shouldHandleMatrixApprovalRequest as C, isMatrixAnyApprovalClientEnabled as S, logInboundDrop as _, resolveMatrixThreadRootId as a, summarizeMapping as b, RelationType as c, buildAllowlistResolutionSummary as d, canonicalizeAllowlistWithResolvedIds as f, getAgentScopedMediaLocalRoots as g, formatLocationText as h, resolveMatrixReplyToEventId as i, resolveMatrixRoomConfig as l, createTypingCallbacks as m, resolveMatrixStoredSessionMeta as n, resolveMatrixThreadRouting as o, createReplyPrefixOptions as p, resolveMatrixInboundRoute as r, EventType as s, matrixPlugin as t, addAllowlistUserEntriesFromConfigEntry as u, logTypingFailure as v, toLocationContext as x, patchAllowlistUsersInConfigEntries as y };
@@ -1,2 +1,2 @@
1
- import { t as matrixPlugin } from "./channel-VSrHgTON.js";
1
+ import { t as matrixPlugin } from "./channel-CzQw5OZN.js";
2
2
  export { matrixPlugin };
@@ -1,9 +1,9 @@
1
- import { b as reconcileMatrixUnknownSend, i as sendPollMatrix, o as sendTypingMatrix, r as sendMessageMatrix, y as cleanupMatrixDeliveryPlans } from "./send-ZDLU4JTk.js";
1
+ import { b as reconcileMatrixUnknownSend, i as sendPollMatrix, o as sendTypingMatrix, r as sendMessageMatrix, y as cleanupMatrixDeliveryPlans } from "./send-ClHgDZLT.js";
2
2
  import { t as isBunRuntime } from "./runtime-BefyhPWv.js";
3
- import { c as resolveMatrixAuth } from "./client-CeGw0G5S.js";
4
- import { n as listMatrixDirectoryGroupsLive, r as listMatrixDirectoryPeersLive } from "./directory-live-Bvg2wAnR.js";
3
+ import { c as resolveMatrixAuth } from "./client-BBQdBG7t.js";
4
+ import { n as listMatrixDirectoryGroupsLive, r as listMatrixDirectoryPeersLive } from "./directory-live-DLQzel12.js";
5
5
  import { p as resolveOutboundSendDep, r as chunkTextForOutbound } from "./runtime-api-BGO16Fu8.js";
6
- import { t as resolveMatrixTargets } from "./resolve-targets-BJAPY4Vb.js";
6
+ import { t as resolveMatrixTargets } from "./resolve-targets-e7AI0P75.js";
7
7
  import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
8
8
  import { createMessageReceiptFromOutboundResults, createReplyToFanout } from "openclaw/plugin-sdk/channel-outbound";
9
9
  import { asOptionalRecord, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
@@ -13,7 +13,7 @@ import { attachChannelToResult } from "openclaw/plugin-sdk/channel-send-result";
13
13
  import { renderMessagePresentationFallbackText } from "openclaw/plugin-sdk/interactive-runtime";
14
14
  import { resolveSendableOutboundReplyParts, sendPayloadMediaSequence } from "openclaw/plugin-sdk/reply-payload";
15
15
  //#region extensions/matrix/src/matrix/probe.ts
16
- const loadMatrixProbeRuntimeDeps = createLazyRuntimeModule(() => import("./probe.runtime-Dr91B_X3.js").then((runtimeModule) => ({ createMatrixClient: runtimeModule.createMatrixClient })));
16
+ const loadMatrixProbeRuntimeDeps = createLazyRuntimeModule(() => import("./probe.runtime-NIJZYqc2.js").then((runtimeModule) => ({ createMatrixClient: runtimeModule.createMatrixClient })));
17
17
  async function probeMatrix(params) {
18
18
  return await runChannelProbe(void 0, async () => {
19
19
  const result = {
@@ -67,6 +67,16 @@ async function probeMatrix(params) {
67
67
  const MATRIX_OPENCLAW_PRESENTATION_KEY = "com.openclaw.presentation";
68
68
  const MATRIX_OPENCLAW_PRESENTATION_TYPE = "message.presentation";
69
69
  const MATRIX_EMPTY_PRESENTATION_FALLBACK_TEXT = "---";
70
+ function toMatrixOutboundResult(result) {
71
+ const { roomId, ...delivery } = result;
72
+ return {
73
+ ...delivery,
74
+ target: {
75
+ kind: "room",
76
+ id: roomId
77
+ }
78
+ };
79
+ }
70
80
  function resolveMatrixChannelData(payload) {
71
81
  const raw = asOptionalRecord(payload.channelData)?.matrix;
72
82
  return asOptionalRecord(raw) ?? {};
@@ -113,7 +123,7 @@ function resolveMatrixExtraContent(payload) {
113
123
  }
114
124
  function resolveMatrixDeliveryProgress(onDeliveryResult) {
115
125
  return onDeliveryResult ? async (result) => {
116
- await onDeliveryResult(attachChannelToResult("matrix", result));
126
+ await onDeliveryResult(attachChannelToResult("matrix", toMatrixOutboundResult(result)));
117
127
  } : void 0;
118
128
  }
119
129
  //#endregion
@@ -184,15 +194,15 @@ const matrixChannelRuntime = {
184
194
  ...part,
185
195
  index
186
196
  }));
187
- return attachChannelToResult("matrix", {
197
+ return attachChannelToResult("matrix", toMatrixOutboundResult({
188
198
  ...lastResult,
189
199
  primaryMessageId: receipt.primaryPlatformMessageId,
190
200
  receipt,
191
201
  content: sentResults.map((result) => result.content).join("\n")
192
- });
202
+ }));
193
203
  }
194
204
  }
195
- return attachChannelToResult("matrix", await send(to, payloadText, {
205
+ return attachChannelToResult("matrix", toMatrixOutboundResult(await send(to, payloadText, {
196
206
  cfg,
197
207
  mediaAccess,
198
208
  mediaLocalRoots,
@@ -207,10 +217,10 @@ const matrixChannelRuntime = {
207
217
  onPlatformSendDispatch,
208
218
  extraContent: resolveMatrixExtraContent(payload),
209
219
  onDeliveryResult: resolveMatrixDeliveryProgress(onDeliveryResult)
210
- }));
220
+ })));
211
221
  },
212
222
  sendText: async ({ cfg, to, text, deps, replyToId, threadId, accountId, audioAsVoice, deliveryQueueId, deliveryPartIndex, deliveryPartCount, onPlatformSendDispatch, onDeliveryResult }) => {
213
- return attachChannelToResult("matrix", await (resolveOutboundSendDep(deps, "matrix") ?? sendMessageMatrix)(to, text, {
223
+ return attachChannelToResult("matrix", toMatrixOutboundResult(await (resolveOutboundSendDep(deps, "matrix") ?? sendMessageMatrix)(to, text, {
214
224
  cfg,
215
225
  replyToId: replyToId ?? void 0,
216
226
  threadId: threadId !== void 0 && threadId !== null ? String(threadId) : void 0,
@@ -221,10 +231,10 @@ const matrixChannelRuntime = {
221
231
  ...deliveryQueueId !== void 0 ? { deliveryPartCount } : {},
222
232
  onPlatformSendDispatch,
223
233
  onDeliveryResult: resolveMatrixDeliveryProgress(onDeliveryResult)
224
- }));
234
+ })));
225
235
  },
226
236
  sendMedia: async ({ cfg, to, text, mediaUrl, mediaLocalRoots, mediaReadFile, mediaAccess, deps, replyToId, threadId, accountId, audioAsVoice, deliveryQueueId, deliveryPartIndex, deliveryPartCount, onPlatformSendDispatch, onDeliveryResult }) => {
227
- return attachChannelToResult("matrix", await (resolveOutboundSendDep(deps, "matrix") ?? sendMessageMatrix)(to, text, {
237
+ return attachChannelToResult("matrix", toMatrixOutboundResult(await (resolveOutboundSendDep(deps, "matrix") ?? sendMessageMatrix)(to, text, {
228
238
  cfg,
229
239
  mediaUrl,
230
240
  mediaLocalRoots,
@@ -239,7 +249,7 @@ const matrixChannelRuntime = {
239
249
  ...deliveryQueueId !== void 0 ? { deliveryPartCount } : {},
240
250
  onPlatformSendDispatch,
241
251
  onDeliveryResult: resolveMatrixDeliveryProgress(onDeliveryResult)
242
- }));
252
+ })));
243
253
  },
244
254
  sendPoll: async ({ cfg, to, poll, threadId, accountId }) => {
245
255
  const result = await sendPollMatrix(to, poll, {
@@ -1,6 +1,6 @@
1
1
  import { a as resolveMatrixAccountConfig } from "./account-config-BZWN9tGS.js";
2
2
  import { i as resolveMatrixAccount, r as resolveDefaultMatrixAccountId, t as listMatrixAccountIds } from "./accounts-BCzyubQt.js";
3
- import { r as matrixSetupContract, t as createMatrixSetupWizardProxy } from "./setup-core-DQn6b5vi.js";
3
+ import { r as matrixSetupContract, t as createMatrixSetupWizardProxy } from "./setup-core-DigrLebY.js";
4
4
  import { adaptScopedAccountAccessor, createScopedChannelConfigAdapter } from "openclaw/plugin-sdk/channel-config-helpers";
5
5
  import { createChannelConfigUiHints } from "openclaw/plugin-sdk/channel-core";
6
6
  import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
@@ -19,13 +19,7 @@ function normalizeMatrixUser(raw) {
19
19
  const value = (raw ?? "").trim();
20
20
  if (!value) return "";
21
21
  if (!value.startsWith("@") || !value.includes(":")) return normalizeLowercaseStringOrEmpty(value);
22
- const withoutAt = value.slice(1);
23
- const splitIndex = withoutAt.indexOf(":");
24
- if (splitIndex === -1) return normalizeLowercaseStringOrEmpty(value);
25
- const localpart = normalizeLowercaseStringOrEmpty(withoutAt.slice(0, splitIndex));
26
- const server = normalizeLowercaseStringOrEmpty(withoutAt.slice(splitIndex + 1));
27
- if (!server) return normalizeLowercaseStringOrEmpty(value);
28
- return `@${localpart}:${server}`;
22
+ return value;
29
23
  }
30
24
  function normalizeMatrixUserId(raw) {
31
25
  const trimmed = (raw ?? "").trim();
@@ -313,7 +307,7 @@ const matrixPluginBase = {
313
307
  order: 70,
314
308
  quickstartAllowFrom: true
315
309
  },
316
- setupWizard: createMatrixSetupWizardProxy(async () => ({ matrixSetupWizard: (await import("./setup-surface-DlhJdrNI.js").then((n) => n.t)).matrixSetupWizard })),
310
+ setupWizard: createMatrixSetupWizardProxy(async () => ({ matrixSetupWizard: (await import("./setup-surface-Dtn8sAWs.js").then((n) => n.t)).matrixSetupWizard })),
317
311
  setupContract: matrixSetupContract,
318
312
  capabilities: {
319
313
  chatTypes: [
@@ -2,15 +2,15 @@ import { a as resolveMatrixAccountConfig } from "./account-config-BZWN9tGS.js";
2
2
  import { t as getMatrixRuntime } from "./runtime-6S3DNFNv.js";
3
3
  import { i as resolveMatrixAccount } from "./accounts-BCzyubQt.js";
4
4
  import { n as resolveMatrixConfigPath, r as updateMatrixAccountConfig } from "./config-update-Bor_Pjsv.js";
5
- import { n as matrixSetupAdapter } from "./setup-core-DQn6b5vi.js";
6
- import { n as withResolvedActionClient } from "./client-sJesKQmp.js";
7
- import { l as resolveMatrixAuthContext } from "./client-CeGw0G5S.js";
5
+ import { n as matrixSetupAdapter } from "./setup-core-DigrLebY.js";
6
+ import { n as withResolvedActionClient } from "./client-D8XghqmX.js";
7
+ import { l as resolveMatrixAuthContext } from "./client-BBQdBG7t.js";
8
8
  import { a as formatZonedTimestamp } from "./runtime-api-BGO16Fu8.js";
9
9
  import { t as resolveMatrixRoomKeyBackupIssue } from "./backup-health-Dm_YMVFT.js";
10
10
  import { i as setMatrixSdkLogMode, r as setMatrixSdkConsoleLogging } from "./logging-DRjvUOIh.js";
11
11
  import { n as isOpenClawManagedMatrixDevice, r as summarizeMatrixDeviceHealth } from "./device-health-B4-YXtJR.js";
12
- import { n as updateMatrixOwnProfile, t as applyMatrixProfileUpdate } from "./profile-update-BkgWYDIp.js";
13
- import { a as confirmMatrixVerificationSas, b as verifyMatrixRecoveryKey, c as getMatrixRoomKeyBackupStatus, d as listMatrixVerifications, f as mismatchMatrixVerificationSas, g as runMatrixSelfVerification, h as restoreMatrixRoomKeyBackup, l as getMatrixVerificationSas, m as resetMatrixRoomKeyBackup, n as bootstrapMatrixVerification, p as requestMatrixVerification, r as cancelMatrixVerification, t as acceptMatrixVerification, u as getMatrixVerificationStatus, v as startMatrixVerification } from "./verification-C7ig-bQE.js";
12
+ import { n as updateMatrixOwnProfile, t as applyMatrixProfileUpdate } from "./profile-update-BQlE5s2J.js";
13
+ import { a as confirmMatrixVerificationSas, b as verifyMatrixRecoveryKey, c as getMatrixRoomKeyBackupStatus, d as listMatrixVerifications, f as mismatchMatrixVerificationSas, g as runMatrixSelfVerification, h as restoreMatrixRoomKeyBackup, l as getMatrixVerificationSas, m as resetMatrixRoomKeyBackup, n as bootstrapMatrixVerification, p as requestMatrixVerification, r as cancelMatrixVerification, t as acceptMatrixVerification, u as getMatrixVerificationStatus, v as startMatrixVerification } from "./verification-CabtBTtB.js";
14
14
  import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
15
15
  import { normalizeAccountId } from "openclaw/plugin-sdk/account-id";
16
16
  import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
@@ -412,7 +412,7 @@ async function addMatrixAccount(params) {
412
412
  backupVersion: null
413
413
  };
414
414
  if (accountConfig.encryption === true) {
415
- const { maybeBootstrapNewEncryptedMatrixAccount } = await import("./setup-bootstrap-BaXkhgJg.js");
415
+ const { maybeBootstrapNewEncryptedMatrixAccount } = await import("./setup-bootstrap-BGPjbA5N.js");
416
416
  verificationBootstrap = await maybeBootstrapNewEncryptedMatrixAccount({
417
417
  previousCfg: cfg,
418
418
  cfg: updated,
@@ -595,8 +595,8 @@ function registerMatrixDeviceCommands(root) {
595
595
  }
596
596
  //#endregion
597
597
  //#region extensions/matrix/src/cli-direct.ts
598
- const loadMatrixActionClientModule = createLazyRuntimeModule(() => import("./client-sJesKQmp.js").then((n) => n.t));
599
- const loadMatrixDirectManagementModule = createLazyRuntimeModule(() => import("./send-ZDLU4JTk.js").then((n) => n.S));
598
+ const loadMatrixActionClientModule = createLazyRuntimeModule(() => import("./client-D8XghqmX.js").then((n) => n.t));
599
+ const loadMatrixDirectManagementModule = createLazyRuntimeModule(() => import("./send-ClHgDZLT.js").then((n) => n.S));
600
600
  function printDirectRoomCandidate(room) {
601
601
  const members = room.joinedMembers === null ? "unavailable" : room.joinedMembers.map((member) => formatMatrixCliText(member)).join(", ") || "none";
602
602
  console.log(`- ${formatMatrixCliText(room.roomId)} [${room.source}] strict=${room.strict ? "yes" : "no"} joined=${members}`);
@@ -2,7 +2,7 @@ import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry";
2
2
  //#region extensions/matrix/src/cli-metadata.ts
3
3
  function registerMatrixCliMetadata(api) {
4
4
  api.registerCli(async ({ program }) => {
5
- const { registerMatrixCli } = await import("./cli-CkTfKC_c.js");
5
+ const { registerMatrixCli } = await import("./cli-iR6QJ5U0.js");
6
6
  registerMatrixCli({ program });
7
7
  }, { descriptors: [{
8
8
  name: "matrix",
@@ -1,2 +1,2 @@
1
- import { n as registerMatrixCliMetadata, t as cli_metadata_default } from "./cli-metadata-B1d1aGM5.js";
1
+ import { n as registerMatrixCliMetadata, t as cli_metadata_default } from "./cli-metadata-BmUYWjuM.js";
2
2
  export { cli_metadata_default as default, registerMatrixCliMetadata };