@openclaw/matrix 2026.7.2-beta.7 → 2026.8.1-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/dist/{account-selection-kqquRzCf.js → account-selection-CWuhuFn1.js} +7 -8
  2. package/dist/{accounts-DfngqebB.js → accounts-BCzyubQt.js} +3 -3
  3. package/dist/api.js +7 -10
  4. package/dist/{approval-handler.runtime-DSeaIsGa.js → approval-handler.runtime-CJXCUdRg.js} +5 -5
  5. package/dist/{approval-ids-BdJGPAJT.js → approval-ids-7rf7etWE.js} +1 -1
  6. package/dist/{approval-reaction-auth-BjOpELxu.js → approval-reaction-auth-wBwbEDpZ.js} +2 -2
  7. package/dist/{approval-reactions-D-BxBK_L.js → approval-reactions-tXh9KYrW.js} +2 -8
  8. package/dist/auth-presence.js +2 -2
  9. package/dist/{channel-vj788dNZ.js → channel-VSrHgTON.js} +156 -136
  10. package/dist/channel-plugin-api.js +1 -1
  11. package/dist/{channel.runtime-CLoF2S9T.js → channel.runtime-pOOL0uT_.js} +70 -56
  12. package/dist/{config-schema-Djxw3C6b.js → channel.setup-PpxRP9Du.js} +50 -3
  13. package/dist/{cli-DMqfDE-q.js → cli-CkTfKC_c.js} +16 -16
  14. package/dist/{cli-metadata-C7D53SND.js → cli-metadata-B1d1aGM5.js} +1 -1
  15. package/dist/cli-metadata.js +1 -1
  16. package/dist/client-CeGw0G5S.js +784 -0
  17. package/dist/{client-bootstrap-XsIkHNt0.js → client-bootstrap-BFwT_2VT.js} +25 -61
  18. package/dist/{client-6eRENr7k.js → client-sJesKQmp.js} +4 -4
  19. package/dist/client-support-DLj4vDeu.js +93 -0
  20. package/dist/config-update-Bor_Pjsv.js +150 -0
  21. package/dist/contract-api.js +2 -2
  22. package/dist/{credentials-W2EmwRhu.js → credentials-BdAaWuiR.js} +2 -1
  23. package/dist/credentials-read-B37cQknZ.js +51 -0
  24. package/dist/credentials-state-B3cuUFwZ.js +27 -0
  25. package/dist/{credentials-write.runtime-Be9zNSUw.js → credentials-write.runtime-nAV2-5uR.js} +1 -1
  26. package/dist/{crypto-runtime-D9_6J5tZ.js → crypto-runtime-Bnz3zEcS.js} +55 -32
  27. package/dist/direct-room-RinHjtqX.js +71 -0
  28. package/dist/{directory-live-C8dVBiCc.js → directory-live-Bvg2wAnR.js} +1 -2
  29. package/dist/{doctor-CM8ijNpW.js → doctor-EWf9CDso.js} +2 -2
  30. package/dist/{doctor-contract-BMSJkkAE.js → doctor-contract-DEt4O4Zt.js} +2 -3
  31. package/dist/doctor-contract-api.js +202 -90
  32. package/dist/{draft-stream-CtvOXq0Z.js → draft-stream-BRi7PRRS.js} +20 -23
  33. package/dist/{encryption-guidance-CbEFe38F.js → encryption-guidance-DmLY8NiO.js} +1 -1
  34. package/dist/{env-auth-CQsYbz-p.js → env-auth-MVS-Vv41.js} +4 -3
  35. package/dist/{env-vars-B0NxQnPk.js → env-vars-dGqak9dN.js} +1 -1
  36. package/dist/{errors-C47hvAF8.js → errors-DKVS3_DO.js} +2 -5
  37. package/dist/{file-sync-store-DiiFsayX.js → file-sync-store-DjskBX2o.js} +24 -3
  38. package/dist/helper-api.js +2 -2
  39. package/dist/{idb-persistence-B6x7dMsF.js → idb-persistence-BM0P27Zg.js} +3 -2
  40. package/dist/{inbound-dedupe-CaBLblef.js → inbound-dedupe-RvSLqdsz.js} +2 -2
  41. package/dist/index.js +1 -1
  42. package/dist/{logger-D0GCSDQq.js → logger-B_71hN6W.js} +1 -1
  43. package/dist/{logging-DV-p52N0.js → logging-DRjvUOIh.js} +1 -1
  44. package/dist/{media-text-BTwzADS_.js → media-text-JudlYOSc.js} +1 -1
  45. package/dist/{messages-DxQJkhxs.js → messages-BW0s-6Y9.js} +7 -7
  46. package/dist/{monitor-VyWlSLwo.js → monitor-Ddfc-vjX.js} +394 -384
  47. package/dist/plugin-entry.handlers.runtime.js +3 -3
  48. package/dist/probe.runtime-Dr91B_X3.js +2 -0
  49. package/dist/profile-D-Wubo0A.js +108 -0
  50. package/dist/{profile-update-CffmyW_4.js → profile-update-BkgWYDIp.js} +3 -2
  51. package/dist/{reaction-events-B00WSi98.js → reaction-events-nfUbFLdV.js} +9 -6
  52. package/dist/{recovery-key-store-BNnHvXdk.js → recovery-key-store-CognuDys.js} +5 -4
  53. package/dist/{resolve-targets-nm2L48sh.js → resolve-targets-BJAPY4Vb.js} +1 -1
  54. package/dist/{resolver.runtime-DS6uPaEe.js → resolver.runtime-LWJELYq5.js} +1 -1
  55. package/dist/{room-info-CAFZ3Z9J.js → room-info-BXQA7y10.js} +12 -3
  56. package/dist/runtime-api.js +6 -3
  57. package/dist/{sdk-bUytQHx7.js → sdk-DjaQFCHc.js} +229 -120
  58. package/dist/{secret-contract-M3hRmGO-.js → secret-contract-CufozuyJ.js} +1 -1
  59. package/dist/secret-contract-api.js +1 -1
  60. package/dist/{send-BldGYG8g.js → send-ZDLU4JTk.js} +1462 -1196
  61. package/dist/session-binding-contract-api.js +1 -1
  62. package/dist/{setup-bootstrap-Deleiibz.js → setup-bootstrap-BaXkhgJg.js} +4 -4
  63. package/dist/{setup-core-BVfBv2ai.js → setup-core-DQn6b5vi.js} +17 -266
  64. package/dist/setup-plugin-api.js +1 -44
  65. package/dist/{setup-surface-BBq3WeqX.js → setup-surface-DlhJdrNI.js} +9 -11
  66. package/dist/{startup-verification-wm3_i88s.js → startup-verification-Cs08ca8u.js} +3 -3
  67. package/dist/{storage-BvAkgzvT.js → storage-BsGuHngK.js} +3 -3
  68. package/dist/{thread-bindings-DGbl3vDW.js → thread-bindings-CcHZP3w2.js} +7 -4
  69. package/dist/{tool-actions.runtime-uu9blSqO.js → tool-actions.runtime-DmdRL0bN.js} +35 -18
  70. package/dist/{verification-DYMQ1QpI.js → verification-C7ig-bQE.js} +2 -2
  71. package/openclaw.plugin.json +54 -1
  72. package/package.json +4 -4
  73. package/dist/active-client-DXvz2gCo.js +0 -20
  74. package/dist/client-Dbso3-0V.js +0 -30
  75. package/dist/create-client-BmSU-q-D.js +0 -61
  76. package/dist/credentials-read-DVmFCm7X.js +0 -77
  77. package/dist/exec-approval-resolver-BCgqRtZS.js +0 -16
  78. package/dist/preflight-audio.runtime-BZxxQsxY.js +0 -11
  79. package/dist/probe.runtime-BuieqmS3.js +0 -3
  80. package/dist/record-shared-CWWx6fvI.js +0 -2
  81. package/dist/shared-CUMWxcMz.js +0 -673
  82. package/dist/sync-state-CWbp0QSY.js +0 -12
  83. package/dist/{runtime-api-D1xI_cvh.js → runtime-api-BGO16Fu8.js} +3 -3
@@ -1,9 +1,8 @@
1
- import { n as listMatrixEnvAccountIds, t as getMatrixScopedEnvVarNames } from "./env-vars-B0NxQnPk.js";
2
- import { t as isRecord$1 } from "./record-shared-CWWx6fvI.js";
3
- import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
1
+ import { n as listMatrixEnvAccountIds, t as getMatrixScopedEnvVarNames } from "./env-vars-dGqak9dN.js";
2
+ import { isRecord, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
4
3
  import { listCombinedAccountIds, listConfiguredAccountIds, resolveListedDefaultAccountId, resolveNormalizedAccountEntry } from "openclaw/plugin-sdk/account-core";
5
4
  import { DEFAULT_ACCOUNT_ID, normalizeAccountId, normalizeOptionalAccountId } from "openclaw/plugin-sdk/account-id";
6
- import { hasConfiguredSecretInput } from "openclaw/plugin-sdk/secret-input-runtime";
5
+ import { hasConfiguredSecretInput } from "openclaw/plugin-sdk/secret-input";
7
6
  //#region extensions/matrix/src/auth-precedence.ts
8
7
  const MATRIX_DEFAULT_ACCOUNT_AUTH_ONLY_FIELDS = /* @__PURE__ */ new Set([
9
8
  "userId",
@@ -102,20 +101,20 @@ function hasConfiguredDefaultMatrixAccountSource(params) {
102
101
  });
103
102
  }
104
103
  function resolveMatrixChannelConfig(cfg) {
105
- return isRecord$1(cfg.channels?.matrix) ? cfg.channels.matrix : null;
104
+ return isRecord(cfg.channels?.matrix) ? cfg.channels.matrix : null;
106
105
  }
107
106
  function findMatrixAccountEntry(cfg, accountId) {
108
107
  const channel = resolveMatrixChannelConfig(cfg);
109
108
  if (!channel) return null;
110
- const accounts = isRecord$1(channel.accounts) ? channel.accounts : null;
109
+ const accounts = isRecord(channel.accounts) ? channel.accounts : null;
111
110
  if (!accounts) return null;
112
111
  const entry = resolveNormalizedAccountEntry(accounts, accountId, normalizeAccountId);
113
- return isRecord$1(entry) ? entry : null;
112
+ return isRecord(entry) ? entry : null;
114
113
  }
115
114
  function resolveConfiguredMatrixAccountIds(cfg, env = process.env) {
116
115
  const channel = resolveMatrixChannelConfig(cfg);
117
116
  const configuredAccountIds = listConfiguredAccountIds({
118
- accounts: channel && isRecord$1(channel.accounts) ? channel.accounts : void 0,
117
+ accounts: channel && isRecord(channel.accounts) ? channel.accounts : void 0,
119
118
  normalizeAccountId
120
119
  });
121
120
  if (hasConfiguredDefaultMatrixAccountSource({
@@ -1,7 +1,7 @@
1
- import { a as resolveMatrixDefaultOrOnlyAccountId, o as resolveMatrixAccountStringValues, r as resolveConfiguredMatrixAccountIds } from "./account-selection-kqquRzCf.js";
1
+ import { a as resolveMatrixDefaultOrOnlyAccountId, o as resolveMatrixAccountStringValues, r as resolveConfiguredMatrixAccountIds } from "./account-selection-CWuhuFn1.js";
2
2
  import { a as resolveMatrixAccountConfig, o as resolveMatrixBaseConfig, t as findMatrixAccountConfig } from "./account-config-BZWN9tGS.js";
3
- import { i as resolveScopedMatrixEnvConfig, n as resolveGlobalMatrixEnvConfig } from "./env-auth-CQsYbz-p.js";
4
- import { o as loadMatrixCredentials, r as credentialsMatchConfig } from "./credentials-read-DVmFCm7X.js";
3
+ import { r as resolveScopedMatrixEnvConfig, t as resolveGlobalMatrixEnvConfig } from "./env-auth-MVS-Vv41.js";
4
+ import { i as loadMatrixCredentials, n as credentialsMatchConfig } from "./credentials-read-B37cQknZ.js";
5
5
  import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
6
6
  import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/account-id";
7
7
  import { hasConfiguredSecretInput } from "openclaw/plugin-sdk/secret-input-runtime";
package/dist/api.js CHANGED
@@ -1,12 +1,9 @@
1
- import { a as resolveMatrixDefaultOrOnlyAccountId, i as resolveMatrixChannelConfig, n as requiresExplicitMatrixDefaultAccount, r as resolveConfiguredMatrixAccountIds, t as findMatrixAccountEntry } from "./account-selection-kqquRzCf.js";
2
- import { n as listMatrixEnvAccountIds, r as resolveMatrixEnvAccountToken, t as getMatrixScopedEnvVarNames } from "./env-vars-B0NxQnPk.js";
1
+ import { a as resolveMatrixDefaultOrOnlyAccountId, i as resolveMatrixChannelConfig, n as requiresExplicitMatrixDefaultAccount, r as resolveConfiguredMatrixAccountIds, t as findMatrixAccountEntry } from "./account-selection-CWuhuFn1.js";
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-vj788dNZ.js";
4
+ import { t as matrixPlugin } from "./channel-VSrHgTON.js";
5
+ import { n as matrixSetupAdapter, t as createMatrixSetupWizardProxy } from "./setup-core-DQn6b5vi.js";
5
6
  import { d as setMatrixThreadBindingIdleTimeoutBySessionKey, n as getMatrixThreadBindingManager, p as setMatrixThreadBindingMaxAgeBySessionKey, s as resetMatrixThreadBindingsForTests } from "./thread-bindings-shared-CKnY4LSd.js";
6
- import { n as matrixSetupAdapter, t as createMatrixSetupWizardProxy } from "./setup-core-BVfBv2ai.js";
7
- import { n as matrixOnboardingAdapter } from "./setup-surface-BBq3WeqX.js";
8
- import { t as createMatrixThreadBindingManager } from "./thread-bindings-DGbl3vDW.js";
9
- //#region extensions/matrix/api.ts
10
- const matrixSessionBindingAdapterChannels = ["matrix"];
11
- //#endregion
12
- export { createMatrixSetupWizardProxy, createMatrixThreadBindingManager, findMatrixAccountEntry, getMatrixScopedEnvVarNames, getMatrixThreadBindingManager, hashMatrixAccessToken, listMatrixEnvAccountIds, matrixOnboardingAdapter, matrixOnboardingAdapter as matrixSetupWizard, matrixPlugin, matrixSessionBindingAdapterChannels, matrixSetupAdapter, requiresExplicitMatrixDefaultAccount, resetMatrixThreadBindingsForTests, resolveConfiguredMatrixAccountIds, resolveMatrixAccountStorageRoot, resolveMatrixChannelConfig, resolveMatrixCredentialsDir, resolveMatrixCredentialsFilename, resolveMatrixCredentialsPath, resolveMatrixDefaultOrOnlyAccountId, resolveMatrixEnvAccountToken, resolveMatrixHomeserverKey, sanitizeMatrixPathSegment, setMatrixThreadBindingIdleTimeoutBySessionKey, setMatrixThreadBindingMaxAgeBySessionKey };
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 };
@@ -1,9 +1,9 @@
1
- import { i as resolveMatrixAccount } from "./accounts-DfngqebB.js";
2
- import { _ as shouldHandleMatrixApprovalRequest, g as isMatrixAnyApprovalClientEnabled } from "./channel-vj788dNZ.js";
1
+ import { i as resolveMatrixAccount } from "./accounts-BCzyubQt.js";
2
+ import { _ as shouldHandleMatrixApprovalRequest, g as isMatrixAnyApprovalClientEnabled } from "./channel-VSrHgTON.js";
3
3
  import { a as resolveMatrixTargetIdentity } from "./target-ids-B-5aQxwn.js";
4
- import { a as sendSingleTextMessageMatrix, d as repairMatrixDirectRooms, n as reactMatrixMessage, r as sendMessageMatrix } from "./send-BldGYG8g.js";
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-DxQJkhxs.js";
4
+ import { a as sendSingleTextMessageMatrix, n as reactMatrixMessage, r as sendMessageMatrix, w as repairMatrixDirectRooms } from "./send-ZDLU4JTk.js";
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";
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-Djxw3C6b.js";
1
+ import { a as normalizeMatrixUserId } from "./channel.setup-PpxRP9Du.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 { i as resolveMatrixAccount } from "./accounts-DfngqebB.js";
2
- import { t as normalizeMatrixApproverId } from "./approval-ids-BdJGPAJT.js";
1
+ import { i as resolveMatrixAccount } from "./accounts-BCzyubQt.js";
2
+ import { t as normalizeMatrixApproverId } from "./approval-ids-7rf7etWE.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,6 +1,7 @@
1
1
  import { n as getOptionalMatrixRuntime } from "./runtime-6S3DNFNv.js";
2
2
  import { normalizeAccountId, normalizeOptionalAccountId } from "openclaw/plugin-sdk/routing";
3
3
  import { createApprovalReactionTargetStore } from "openclaw/plugin-sdk/approval-reaction-runtime";
4
+ import { createPluginStateErrorReporter } from "openclaw/plugin-sdk/plugin-state-runtime";
4
5
  //#region extensions/matrix/src/approval-reactions.ts
5
6
  const MATRIX_APPROVAL_REACTION_META = {
6
7
  "allow-once": {
@@ -24,14 +25,7 @@ const MATRIX_APPROVAL_REACTION_ORDER = [
24
25
  const PERSISTENT_NAMESPACE = "matrix.approval-reactions";
25
26
  const PERSISTENT_MAX_ENTRIES = 1e3;
26
27
  const DEFAULT_REACTION_TARGET_TTL_MS = 1440 * 60 * 1e3;
27
- function reportPersistentApprovalReactionError(error) {
28
- try {
29
- getOptionalMatrixRuntime()?.logging.getChildLogger({
30
- plugin: "matrix",
31
- feature: "approval-reaction-state"
32
- }).warn("Matrix persistent approval reaction state failed", { error: String(error) });
33
- } catch {}
34
- }
28
+ const reportPersistentApprovalReactionError = createPluginStateErrorReporter(getOptionalMatrixRuntime, "matrix", "approval-reaction-state", "Matrix persistent approval reaction state failed");
35
29
  function readPersistedTarget(target) {
36
30
  const value = target;
37
31
  const accountId = typeof value?.accountId === "string" ? normalizeOptionalAccountId(value.accountId) : void 0;
@@ -1,5 +1,5 @@
1
- import { c as normalizeMatrixStoredCredentials, t as MATRIX_CREDENTIALS_NAMESPACE } from "./credentials-read-DVmFCm7X.js";
2
- import { createPluginStateSyncKeyedStore } from "openclaw/plugin-sdk/runtime-doctor";
1
+ import { i as normalizeMatrixStoredCredentials, t as MATRIX_CREDENTIALS_NAMESPACE } from "./credentials-state-B3cuUFwZ.js";
2
+ import { createPluginStateSyncKeyedStore } from "openclaw/plugin-sdk/plugin-state-store-runtime";
3
3
  //#region extensions/matrix/auth-presence.ts
4
4
  function hasAnyMatrixAuth(params, env = process.env) {
5
5
  const resolvedEnv = params && typeof params === "object" && "cfg" in params ? params.env ?? env : env;
@@ -1,17 +1,14 @@
1
- import { n as requiresExplicitMatrixDefaultAccount } from "./account-selection-kqquRzCf.js";
1
+ import { n as requiresExplicitMatrixDefaultAccount } from "./account-selection-CWuhuFn1.js";
2
2
  import { a as resolveMatrixAccountConfig } from "./account-config-BZWN9tGS.js";
3
- import { i as resolveMatrixAccount, r as resolveDefaultMatrixAccountId, t as listMatrixAccountIds } from "./accounts-DfngqebB.js";
4
- import { a as normalizeMatrixUserId, n as DEFAULT_ACCOUNT_ID$2, r as matrixConfigAdapter, t as MatrixChannelConfigSchema } from "./config-schema-Djxw3C6b.js";
5
- import { t as normalizeMatrixApproverId } from "./approval-ids-BdJGPAJT.js";
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
6
  import { a as resolveMatrixTargetIdentity, i as resolveMatrixDirectUserId, n as normalizeMatrixMessagingTarget, r as normalizeMatrixResolvableTarget, t as isMatrixQualifiedUserId } from "./target-ids-B-5aQxwn.js";
7
- import { t as formatMatrixErrorMessage } from "./errors-C47hvAF8.js";
8
- import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-BMSJkkAE.js";
7
+ import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-DEt4O4Zt.js";
9
8
  import { d as setMatrixThreadBindingIdleTimeoutBySessionKey, p as setMatrixThreadBindingMaxAgeBySessionKey } from "./thread-bindings-shared-CKnY4LSd.js";
10
- import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-M3hRmGO-.js";
11
- import { d as namedAccountPromotionKeys, f as resolveSingleAccountPromotionTarget, n as matrixSetupAdapter, p as singleAccountKeysToMove, r as matrixSetupContract, t as createMatrixSetupWizardProxy } from "./setup-core-BVfBv2ai.js";
9
+ import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-CufozuyJ.js";
12
10
  import { n as resolveMatrixInboundConversation, t as defaultTopLevelPlacement } from "./thread-binding-api-DRbBZlhS.js";
13
11
  import { createLazyRuntimeModule, createLazyRuntimeNamedExport } from "openclaw/plugin-sdk/lazy-runtime";
14
- import { describeAccountSnapshot } from "openclaw/plugin-sdk/account-helpers";
15
12
  import { adaptScopedAccountAccessor, createScopedDmSecurityResolver } from "openclaw/plugin-sdk/channel-config-helpers";
16
13
  import { buildChannelOutboundSessionRoute, buildThreadAwareOutboundSessionRoute, createChatChannelPlugin } from "openclaw/plugin-sdk/channel-core";
17
14
  import { createChannelMessageAdapterFromOutbound, createReplyPrefixOptions, createRuntimeOutboundDelegates, createTypingCallbacks, logTypingFailure } from "openclaw/plugin-sdk/channel-outbound";
@@ -27,13 +24,14 @@ import { Type } from "typebox";
27
24
  import { normalizeAccountId } from "openclaw/plugin-sdk/account-id";
28
25
  import { createApproverRestrictedNativeApprovalCapability, createChannelApprovalCapability, splitChannelApprovalCapability } from "openclaw/plugin-sdk/approval-delivery-runtime";
29
26
  import { createLazyChannelApprovalNativeRuntimeAdapter } from "openclaw/plugin-sdk/approval-handler-adapter-runtime";
30
- import { createChannelNativeOriginTargetResolver, resolveApprovalRequestChannelAccountId, resolveApprovalRequestSessionConversation } from "openclaw/plugin-sdk/approval-native-runtime";
27
+ import { createChannelNativeOriginTargetResolver, doesApprovalRequestSelectChannelAccount, resolveApprovalRequestSessionConversation } from "openclaw/plugin-sdk/approval-native-runtime";
31
28
  import { createChannelApprovalAuth, resolveApprovalApprovers } from "openclaw/plugin-sdk/approval-auth-runtime";
32
29
  import { addAllowlistUserEntriesFromConfigEntry, buildAllowlistResolutionSummary, canonicalizeAllowlistWithResolvedIds, patchAllowlistUsersInConfigEntries, summarizeMapping } from "openclaw/plugin-sdk/allow-from";
33
30
  import { createChannelExecApprovalProfile, getExecApprovalReplyMetadata, isChannelExecApprovalClientEnabledFromConfig, isChannelExecApprovalTargetRecipient, matchesApprovalRequestFilters } from "openclaw/plugin-sdk/approval-client-runtime";
34
- import { normalizeAccountId as normalizeAccountId$1, parseThreadSessionSuffix } from "openclaw/plugin-sdk/routing";
35
31
  import { createPairingPrefixStripper } from "openclaw/plugin-sdk/channel-pairing";
36
32
  import { PAIRING_APPROVED_MESSAGE } from "openclaw/plugin-sdk/channel-status";
33
+ import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
34
+ import { parseThreadSessionSuffix } from "openclaw/plugin-sdk/routing";
37
35
  import { formatLocationText, logInboundDrop, toLocationContext } from "openclaw/plugin-sdk/channel-inbound";
38
36
  import { getAgentScopedMediaLocalRoots } from "openclaw/plugin-sdk/media-local-roots";
39
37
  import { buildChannelKeyCandidates } from "openclaw/plugin-sdk/channel-targets";
@@ -82,7 +80,7 @@ function createMatrixExposedActions(params) {
82
80
  if (params.gate("profile") && params.senderIsOwner === true) actions.add("set-profile");
83
81
  if (params.gate("memberInfo")) actions.add("member-info");
84
82
  if (params.gate("channelInfo")) actions.add("channel-info");
85
- if (params.encryptionEnabled && params.gate("verification")) actions.add("permissions");
83
+ if (params.encryptionEnabled && params.gate("verification") && params.senderIsOwner === true) actions.add("permissions");
86
84
  return actions;
87
85
  }
88
86
  function buildMatrixProfileToolSchema() {
@@ -95,18 +93,21 @@ function buildMatrixProfileToolSchema() {
95
93
  }
96
94
  };
97
95
  }
96
+ function resolveMatrixActionAccount(params) {
97
+ if (!params.accountId && requiresExplicitMatrixDefaultAccount(params.cfg)) return null;
98
+ const account = resolveMatrixAccount({
99
+ cfg: params.cfg,
100
+ accountId: params.accountId ?? resolveDefaultMatrixAccountId(params.cfg)
101
+ });
102
+ return account.enabled && account.configured ? account : null;
103
+ }
98
104
  const matrixMessageActions = {
99
105
  describeMessageTool: ({ cfg, accountId, senderIsOwner }) => {
100
- const resolvedCfg = cfg;
101
- if (!accountId && requiresExplicitMatrixDefaultAccount(resolvedCfg)) return {
102
- actions: [],
103
- capabilities: []
104
- };
105
- const account = resolveMatrixAccount({
106
- cfg: resolvedCfg,
107
- accountId: accountId ?? resolveDefaultMatrixAccountId(resolvedCfg)
106
+ const account = resolveMatrixActionAccount({
107
+ cfg,
108
+ accountId
108
109
  });
109
- if (!account.enabled || !account.configured) return {
110
+ if (!account) return {
110
111
  actions: [],
111
112
  capabilities: []
112
113
  };
@@ -127,13 +128,22 @@ const matrixMessageActions = {
127
128
  extractToolSend: ({ args }) => {
128
129
  return extractToolSend(args, "sendMessage");
129
130
  },
131
+ prepareSendPayload: ({ ctx, payload }) => {
132
+ if (ctx.action !== "send") return null;
133
+ const account = resolveMatrixActionAccount({
134
+ cfg: ctx.cfg,
135
+ accountId: ctx.accountId
136
+ });
137
+ return account && createActionGate(account.config.actions)("messages") ? payload : null;
138
+ },
130
139
  handleAction: async (ctx) => {
131
- const { handleMatrixAction } = await import("./tool-actions.runtime-uu9blSqO.js");
140
+ const { handleMatrixAction } = await import("./tool-actions.runtime-DmdRL0bN.js");
132
141
  const { action, params, cfg, accountId, mediaLocalRoots } = ctx;
133
142
  const dispatch = async (actionParams) => await handleMatrixAction({
134
143
  ...actionParams,
135
144
  ...accountId ? { accountId } : {}
136
145
  }, cfg, {
146
+ ...action === "send" && ctx.mediaAccess ? { mediaAccess: ctx.mediaAccess } : {},
137
147
  mediaLocalRoots,
138
148
  readContext: {
139
149
  accountId,
@@ -150,7 +160,8 @@ const matrixMessageActions = {
150
160
  const mediaUrl = readStringParam(params, "media", { trim: false }) ?? readStringParam(params, "mediaUrl", { trim: false }) ?? readStringParam(params, "filePath", { trim: false }) ?? readStringParam(params, "path", { trim: false });
151
161
  const content = readStringParam(params, "message", {
152
162
  required: !mediaUrl,
153
- allowEmpty: true
163
+ allowEmpty: true,
164
+ trim: false
154
165
  });
155
166
  const replyTo = readStringParam(params, "replyTo");
156
167
  const threadId = readStringParam(params, "threadId");
@@ -204,7 +215,10 @@ const matrixMessageActions = {
204
215
  }
205
216
  if (action === "edit") {
206
217
  const messageId = readStringParam(params, "messageId", { required: true });
207
- const content = readStringParam(params, "message", { required: true });
218
+ const content = readStringParam(params, "message", {
219
+ required: true,
220
+ trim: false
221
+ });
208
222
  return await dispatch({
209
223
  action: "editMessage",
210
224
  roomId: resolveRoomId(),
@@ -248,6 +262,7 @@ const matrixMessageActions = {
248
262
  roomId: resolveRoomId()
249
263
  });
250
264
  if (action === "permissions") {
265
+ if (ctx.senderIsOwner !== true) throw new ToolAuthorizationError("Matrix verification actions require owner access.");
251
266
  const operation = normalizeLowercaseStringOrEmpty(readStringParam(params, "operation") ?? readStringParam(params, "mode") ?? "verification-list");
252
267
  const operationToAction = {
253
268
  "encryption-status": "encryptionStatus",
@@ -307,51 +322,37 @@ function resolveMatrixExecApprovalConfig(params) {
307
322
  enabled: account.enabled && account.configured ? config.enabled : false
308
323
  };
309
324
  }
310
- function countMatrixExecApprovalEligibleAccounts(params) {
311
- return listMatrixAccountIds(params.cfg).filter((accountId) => {
312
- const account = resolveMatrixAccount({
313
- cfg: params.cfg,
314
- accountId
315
- });
316
- if (!account.enabled || !account.configured) return false;
317
- const config = resolveMatrixExecApprovalConfig({
318
- cfg: params.cfg,
319
- accountId
320
- });
321
- const filters = config?.enabled ? {
322
- agentFilter: config.agentFilter,
323
- sessionFilter: config.sessionFilter
324
- } : {
325
- agentFilter: void 0,
326
- sessionFilter: void 0
327
- };
328
- return isChannelExecApprovalClientEnabledFromConfig({
329
- enabled: config?.enabled,
330
- approverCount: getMatrixApprovalApprovers({
331
- cfg: params.cfg,
332
- accountId,
333
- approvalKind: params.approvalKind
334
- }).length
335
- }) && matchesApprovalRequestFilters({
336
- request: params.request.request,
337
- agentFilter: filters.agentFilter,
338
- sessionFilter: filters.sessionFilter
339
- });
340
- }).length;
325
+ function isMatrixExecApprovalAccountEligible(params) {
326
+ const account = resolveMatrixAccount(params);
327
+ if (!account.enabled || !account.configured) return false;
328
+ const config = resolveMatrixExecApprovalConfig(params);
329
+ const filters = config?.enabled ? {
330
+ agentFilter: config.agentFilter,
331
+ sessionFilter: config.sessionFilter
332
+ } : {
333
+ agentFilter: void 0,
334
+ sessionFilter: void 0
335
+ };
336
+ return isChannelExecApprovalClientEnabledFromConfig({
337
+ enabled: config?.enabled,
338
+ approverCount: getMatrixApprovalApprovers(params).length
339
+ }) && matchesApprovalRequestFilters({
340
+ request: params.request.request,
341
+ agentFilter: filters.agentFilter,
342
+ sessionFilter: filters.sessionFilter
343
+ });
341
344
  }
342
345
  function matchesMatrixRequestAccount(params) {
343
- const turnSourceChannel = normalizeLowercaseStringOrEmpty(params.request.request.turnSourceChannel);
344
- const boundAccountId = resolveApprovalRequestChannelAccountId({
345
- cfg: params.cfg,
346
- request: params.request,
347
- channel: "matrix"
346
+ const accountId = params.accountId ?? resolveDefaultMatrixAccountId(params.cfg);
347
+ return doesApprovalRequestSelectChannelAccount({
348
+ ...params,
349
+ channel: "matrix",
350
+ defaultAccountId: resolveDefaultMatrixAccountId(params.cfg),
351
+ eligibleAccountIds: isMatrixExecApprovalAccountEligible({
352
+ ...params,
353
+ accountId
354
+ }) ? [accountId] : []
348
355
  });
349
- if (turnSourceChannel && turnSourceChannel !== "matrix" && !boundAccountId) return countMatrixExecApprovalEligibleAccounts({
350
- cfg: params.cfg,
351
- request: params.request,
352
- approvalKind: params.approvalKind
353
- }) <= 1;
354
- return !boundAccountId || !params.accountId || normalizeAccountId$1(boundAccountId) === normalizeAccountId$1(params.accountId);
355
356
  }
356
357
  function getMatrixExecApprovalApprovers(params) {
357
358
  const account = resolveMatrixAccount(params).config;
@@ -602,7 +603,7 @@ const matrixNativeApprovalCapability = createApproverRestrictedNativeApprovalCap
602
603
  approvalKind,
603
604
  request
604
605
  }),
605
- load: async () => (await import("./approval-handler.runtime-DSeaIsGa.js")).matrixApprovalNativeRuntime
606
+ load: async () => (await import("./approval-handler.runtime-CJXCUdRg.js")).matrixApprovalNativeRuntime
606
607
  })
607
608
  });
608
609
  const splitMatrixApprovalCapability = splitChannelApprovalCapability(matrixNativeApprovalCapability);
@@ -700,7 +701,7 @@ function createMatrixProbeAccount(params) {
700
701
  } catch (err) {
701
702
  return {
702
703
  ok: false,
703
- error: formatMatrixErrorMessage(err),
704
+ error: formatErrorMessage(err),
704
705
  elapsedMs: 0
705
706
  };
706
707
  }
@@ -720,6 +721,53 @@ function createMatrixPairingText(sendMessageMatrix) {
720
721
  };
721
722
  }
722
723
  //#endregion
724
+ //#region extensions/matrix/src/channel-message-adapter.ts
725
+ function createMatrixMessageAdapter(params) {
726
+ const base = createChannelMessageAdapterFromOutbound({
727
+ id: "matrix",
728
+ outbound: params.outbound,
729
+ live: {
730
+ capabilities: {
731
+ draftPreview: true,
732
+ previewFinalization: true,
733
+ progressUpdates: true,
734
+ quietFinalization: true
735
+ },
736
+ finalizer: { capabilities: {
737
+ finalEdit: true,
738
+ normalFallback: true,
739
+ discardPending: true,
740
+ previewReceipt: true
741
+ } }
742
+ }
743
+ });
744
+ return {
745
+ ...base,
746
+ durableFinal: {
747
+ ...base.durableFinal,
748
+ automaticUnknownSendReconciliation: true,
749
+ capabilities: {
750
+ ...base.durableFinal?.capabilities,
751
+ afterCommit: true,
752
+ reconcileUnknownSend: true
753
+ },
754
+ reconcileUnknownSendKinds: {
755
+ text: true,
756
+ media: true
757
+ },
758
+ reconcileUnknownSend: async (ctx) => await (await params.getRuntime()).reconcileMatrixUnknownSend(ctx),
759
+ afterUnknownSendTerminal: async (ctx) => await (await params.getRuntime()).cleanupMatrixDeliveryPlans({ queueId: ctx.queueId })
760
+ },
761
+ send: {
762
+ ...base.send,
763
+ lifecycle: { afterCommit: async (ctx) => {
764
+ if (!ctx.deliveryQueueId) return;
765
+ await (await params.getRuntime()).cleanupMatrixDeliveryPlans({ queueId: ctx.deliveryQueueId });
766
+ } }
767
+ }
768
+ };
769
+ }
770
+ //#endregion
723
771
  //#region extensions/matrix/src/matrix/monitor/rooms.ts
724
772
  function readLegacyRoomAllowAlias(room) {
725
773
  const rawRoom = room;
@@ -781,7 +829,7 @@ function resolveMatrixGroupToolPolicy(params) {
781
829
  }
782
830
  //#endregion
783
831
  //#region extensions/matrix/src/resolver.ts
784
- const loadMatrixChannelRuntime$1 = createLazyRuntimeNamedExport(() => import("./resolver.runtime-DS6uPaEe.js"), "matrixResolverRuntime");
832
+ const loadMatrixChannelRuntime$1 = createLazyRuntimeNamedExport(() => import("./resolver.runtime-LWJELYq5.js"), "matrixResolverRuntime");
785
833
  const matrixResolverAdapter = { resolveTargets: async ({ cfg, accountId, inputs, kind, runtime }) => (await loadMatrixChannelRuntime$1()).resolveMatrixTargets({
786
834
  cfg,
787
835
  accountId,
@@ -896,6 +944,11 @@ function resolveMatrixOutboundSessionRoute(params) {
896
944
  replyToId: params.replyToId,
897
945
  threadId: params.threadId,
898
946
  currentSessionKey: params.currentSessionKey,
947
+ precedence: [
948
+ "threadId",
949
+ "replyToId",
950
+ "currentSession"
951
+ ],
899
952
  normalizeThreadId: (threadId) => threadId,
900
953
  canRecoverCurrentThread: ({ route }) => route.peer.kind !== "direct" || (params.cfg.session?.dmScope ?? "main") !== "main"
901
954
  });
@@ -903,20 +956,8 @@ function resolveMatrixOutboundSessionRoute(params) {
903
956
  //#endregion
904
957
  //#region extensions/matrix/src/channel.ts
905
958
  let matrixStartupLock = Promise.resolve();
906
- const loadMatrixSetupWizard = createLazyRuntimeNamedExport(() => import("./setup-surface-BBq3WeqX.js").then((n) => n.t), "matrixSetupWizard");
907
- const loadMatrixChannelRuntime = createLazyRuntimeNamedExport(() => import("./channel.runtime-CLoF2S9T.js"), "matrixChannelRuntime");
908
- const loadMatrixDoctorModule = createLazyRuntimeModule(() => import("./doctor-CM8ijNpW.js"));
909
- const meta = {
910
- id: "matrix",
911
- label: "Matrix",
912
- selectionLabel: "Matrix (plugin)",
913
- docsPath: "/channels/matrix",
914
- docsLabel: "matrix",
915
- blurb: "open protocol; configure a homeserver + access token.",
916
- order: 70,
917
- markdownCapable: true,
918
- quickstartAllowFrom: true
919
- };
959
+ const loadMatrixChannelRuntime = createLazyRuntimeNamedExport(() => import("./channel.runtime-pOOL0uT_.js"), "matrixChannelRuntime");
960
+ const loadMatrixDoctorModule = createLazyRuntimeModule(() => import("./doctor-EWf9CDso.js"));
920
961
  function buildMatrixTrafficStatusSummary(snapshot) {
921
962
  return {
922
963
  lastInboundAt: snapshot?.lastInboundAt ?? null,
@@ -1052,6 +1093,13 @@ function resolveMatrixDeliveryTarget(params) {
1052
1093
  if (conversationTarget?.kind === "room") return { to: `room:${conversationTarget.id}` };
1053
1094
  return null;
1054
1095
  }
1096
+ function matchesMatrixToolContextRoom(params) {
1097
+ const { toolContext } = params;
1098
+ if (toolContext.currentChannelProvider && toolContext.currentChannelProvider !== "matrix") return false;
1099
+ const currentTarget = toolContext.currentChannelId ? resolveMatrixTargetIdentity(toolContext.currentChannelId) : null;
1100
+ const target = resolveMatrixTargetIdentity(params.target);
1101
+ return currentTarget?.kind === "room" && target?.kind === "room" && currentTarget.id === target.id;
1102
+ }
1055
1103
  const matrixChannelOutbound = {
1056
1104
  deliveryMode: "direct",
1057
1105
  chunker: chunkTextForOutbound,
@@ -1063,7 +1111,9 @@ const matrixChannelOutbound = {
1063
1111
  media: true,
1064
1112
  replyTo: true,
1065
1113
  thread: true,
1066
- messageSendingHooks: true
1114
+ messageSendingHooks: true,
1115
+ afterCommit: true,
1116
+ reconcileUnknownSend: true
1067
1117
  } },
1068
1118
  presentationCapabilities: {
1069
1119
  supported: true,
@@ -1105,52 +1155,21 @@ const matrixChannelOutbound = {
1105
1155
  }
1106
1156
  })
1107
1157
  };
1108
- const matrixMessageAdapter = createChannelMessageAdapterFromOutbound({
1109
- id: "matrix",
1158
+ const matrixMessageAdapter = createMatrixMessageAdapter({
1110
1159
  outbound: matrixChannelOutbound,
1111
- live: {
1112
- capabilities: {
1113
- draftPreview: true,
1114
- previewFinalization: true,
1115
- progressUpdates: true,
1116
- quietFinalization: true
1117
- },
1118
- finalizer: { capabilities: {
1119
- finalEdit: true,
1120
- normalFallback: true,
1121
- discardPending: true,
1122
- previewReceipt: true
1123
- } }
1124
- }
1160
+ getRuntime: loadMatrixChannelRuntime
1125
1161
  });
1126
1162
  const matrixPlugin = createChatChannelPlugin({
1127
1163
  base: {
1128
- id: "matrix",
1129
- meta,
1130
- setupWizard: createMatrixSetupWizardProxy(async () => ({ matrixSetupWizard: await loadMatrixSetupWizard() })),
1164
+ ...matrixPluginBase,
1165
+ meta: {
1166
+ ...matrixPluginBase.meta,
1167
+ markdownCapable: true
1168
+ },
1131
1169
  capabilities: {
1132
- chatTypes: [
1133
- "direct",
1134
- "group",
1135
- "thread"
1136
- ],
1137
- polls: true,
1138
- reactions: true,
1139
- threads: true,
1140
- media: true,
1170
+ ...matrixPluginBase.capabilities,
1141
1171
  tts: { voice: { synthesisTarget: "voice-note" } }
1142
1172
  },
1143
- reload: { configPrefixes: ["channels.matrix"] },
1144
- configSchema: MatrixChannelConfigSchema,
1145
- config: {
1146
- ...matrixConfigAdapter,
1147
- isConfigured: (account) => account.configured,
1148
- describeAccount: (account) => describeAccountSnapshot({
1149
- account,
1150
- configured: account.configured,
1151
- extra: { baseUrl: account.homeserver }
1152
- })
1153
- },
1154
1173
  approvalCapability: matrixApprovalCapability,
1155
1174
  groups: {
1156
1175
  resolveRequireMention: resolveMatrixGroupRequireMention,
@@ -1175,6 +1194,10 @@ const matrixPlugin = createChatChannelPlugin({
1175
1194
  targetPrefixes: ["matrix"],
1176
1195
  targetIdComparison: "case-sensitive",
1177
1196
  normalizeTarget: normalizeMatrixMessagingTarget,
1197
+ inferTargetChatType: ({ to }) => {
1198
+ const target = resolveMatrixTargetIdentity(to);
1199
+ return target ? target.kind === "user" ? "direct" : "channel" : void 0;
1200
+ },
1178
1201
  resolveInboundConversation: ({ to, conversationId, threadId }) => resolveMatrixInboundConversation({
1179
1202
  to,
1180
1203
  conversationId,
@@ -1216,18 +1239,6 @@ const matrixPlugin = createChatChannelPlugin({
1216
1239
  secretTargetRegistryEntries,
1217
1240
  collectRuntimeConfigAssignments
1218
1241
  },
1219
- setup: {
1220
- ...matrixSetupAdapter,
1221
- singleAccountKeysToMove,
1222
- namedAccountPromotionKeys,
1223
- resolveSingleAccountPromotionTarget
1224
- },
1225
- setupContract: {
1226
- ...matrixSetupContract,
1227
- singleAccountKeysToMove,
1228
- namedAccountPromotionKeys,
1229
- resolveSingleAccountPromotionTarget
1230
- },
1231
1242
  bindings: {
1232
1243
  compileConfiguredBinding: ({ conversationId }) => normalizeMatrixAcpConversationId(conversationId),
1233
1244
  matchInboundConversation: ({ compiledBinding, conversationId, parentConversationId }) => matchMatrixAcpConversation({
@@ -1284,7 +1295,7 @@ const matrixPlugin = createChatChannelPlugin({
1284
1295
  await previousLock;
1285
1296
  let monitorMatrixProvider;
1286
1297
  try {
1287
- monitorMatrixProvider = (await import("./monitor-VyWlSLwo.js")).monitorMatrixProvider;
1298
+ monitorMatrixProvider = (await import("./monitor-Ddfc-vjX.js")).monitorMatrixProvider;
1288
1299
  } finally {
1289
1300
  releaseLock();
1290
1301
  }
@@ -1321,6 +1332,15 @@ const matrixPlugin = createChatChannelPlugin({
1321
1332
  },
1322
1333
  pairing: { text: createMatrixPairingText(async (to, message, options) => await (await loadMatrixChannelRuntime()).sendMessageMatrix(to, message, options)) },
1323
1334
  threading: {
1335
+ matchesToolContextTarget: matchesMatrixToolContextRoom,
1336
+ resolveAutoThreadId: ({ to, toolContext }) => {
1337
+ const threadId = normalizeOptionalString(toolContext?.currentThreadTs);
1338
+ if (!threadId || !toolContext) return;
1339
+ return matchesMatrixToolContextRoom({
1340
+ target: to,
1341
+ toolContext
1342
+ }) ? threadId : void 0;
1343
+ },
1324
1344
  resolveReplyToMode: createScopedAccountReplyToModeResolver({
1325
1345
  resolveAccount: adaptScopedAccountAccessor(resolveMatrixAccountConfig),
1326
1346
  resolveReplyToMode: (account) => account.replyToMode
@@ -1,2 +1,2 @@
1
- import { t as matrixPlugin } from "./channel-vj788dNZ.js";
1
+ import { t as matrixPlugin } from "./channel-VSrHgTON.js";
2
2
  export { matrixPlugin };