@openclaw/matrix 2026.5.12 → 2026.5.14-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 (99) hide show
  1. package/dist/api.js +4 -4
  2. package/dist/{approval-handler.runtime-LpWmoFyw.js → approval-handler.runtime-Q8ZlmQv_.js} +5 -6
  3. package/dist/{approval-ids-DoC2z7tR.js → approval-ids-D6IQvvRE.js} +1 -1
  4. package/dist/{approval-reaction-auth-DbcA1gGd.js → approval-reaction-auth-99PRu7rF.js} +2 -2
  5. package/dist/{channel-B-R2dceO.js → channel-BLKRuTHs.js} +285 -26
  6. package/dist/channel-plugin-api.js +1 -1
  7. package/dist/{channel.runtime-DdtNY_To.js → channel.runtime-9qwvlUwp.js} +8 -8
  8. package/dist/{cli-Cq80go7q.js → cli-BeWdjXLV.js} +15 -17
  9. package/dist/{cli-metadata-OtekEqAD.js → cli-metadata-B2_76YSe.js} +1 -1
  10. package/dist/cli-metadata.js +1 -1
  11. package/dist/{client-DzjShjVN.js → client-D6fFVbNM.js} +2 -2
  12. package/dist/{client-bootstrap-Am_ZEH3x.js → client-bootstrap-DBwUKgC3.js} +3 -3
  13. package/dist/{client-CyxIx4Fv.js → client-oci1tD6-.js} +4 -5
  14. package/dist/{account-config-D2W-V1eQ.js → config-paths-msaDGRh6.js} +20 -2
  15. package/dist/{config-schema-B975BYl0.js → config-schema-BPCzSyjT.js} +102 -4
  16. package/dist/contract-api.js +5 -6
  17. package/dist/{create-client-DpoW106T.js → create-client-BahCtURn.js} +4 -4
  18. package/dist/{credentials-DV6fWXhC.js → credentials-DK0lK9cZ.js} +1 -1
  19. package/dist/{credentials-write.runtime-zniTq-Gr.js → credentials-write.runtime-DhPvBU-C.js} +1 -1
  20. package/dist/{crypto-runtime-DS6R8y_n.js → crypto-runtime-B-SPS5mv.js} +5 -5
  21. package/dist/{deps-CU5W9Ixu.js → deps-LqqGWPWt.js} +10 -14
  22. package/dist/{directory-live-Bn66SRSD.js → directory-live-BCfx1C0G.js} +3 -3
  23. package/dist/{doctor-KjAvjAJu.js → doctor-KuNYX5N3.js} +3 -3
  24. package/dist/doctor-contract-api.js +1 -1
  25. package/dist/{draft-stream-D_FlbmCh.js → draft-stream-BayHVmtO.js} +1 -2
  26. package/dist/{encryption-guidance-BPi3A_m3.js → encryption-guidance-1QoIvd-g.js} +1 -1
  27. package/dist/{http-client-C7AeVJay.js → http-client-DS3UoC_p.js} +1 -1
  28. package/dist/index.js +2 -2
  29. package/dist/{legacy-crypto-inspector-pB252vPO.js → legacy-crypto-inspector-_gWJGVQ_.js} +1 -1
  30. package/dist/{legacy-crypto-restore-Biw-w2ng.js → legacy-crypto-restore-B9eF1gob.js} +1 -1
  31. package/dist/{logging-DZHSPP5N.js → logging-bJ8EEe1G.js} +1 -1
  32. package/dist/{matrix-migration.runtime-DfjNMeoX.js → matrix-migration.runtime-Cf_wX9mk.js} +3 -3
  33. package/dist/{media-text-psyGloYl.js → media-text-4h4YwCGC.js} +1 -1
  34. package/dist/{messages-DQ8xXWiP.js → messages-BKTEUSwJ.js} +5 -5
  35. package/dist/{migration-snapshot.runtime-CKHE3xF9.js → migration-snapshot.runtime-C7yiKWS7.js} +1 -1
  36. package/dist/{monitor-C8cEvvTe.js → monitor-k-b_TmCm.js} +66 -46
  37. package/dist/plugin-entry.handlers.runtime.js +2 -2
  38. package/dist/probe.runtime-zExLz3Ek.js +3 -0
  39. package/dist/{profile-update-DleMeUHj.js → profile-update-BAAflurI.js} +2 -3
  40. package/dist/{reaction-events-CiARZfjk.js → reaction-events-Dimh8FUE.js} +6 -6
  41. package/dist/{resolve-targets-BbzYe9Qi.js → resolve-targets-DPqngj4V.js} +1 -1
  42. package/dist/{resolver.runtime-BWFMWEsg.js → resolver.runtime-C0RDK0VW.js} +1 -1
  43. package/dist/{route-D6rg-iXN.js → route-R-ajT21_.js} +1 -1
  44. package/dist/{runtime-api-DTKcXOhp.js → runtime-api-C-QeChQj.js} +1 -1
  45. package/dist/runtime-api.js +1 -1
  46. package/dist/runtime-heavy-api.js +2 -2
  47. package/dist/{sdk-DXWmb94u.js → sdk-BwfNtBhM.js} +301 -13
  48. package/dist/secret-contract-api.js +1 -1
  49. package/dist/{send-Df-pDuG6.js → send-CdoJ1pZY.js} +323 -6
  50. package/dist/{setup-bootstrap-DXWxzR7A.js → setup-bootstrap-krQU60Az.js} +4 -4
  51. package/dist/setup-core-CgOV8zmh.js +675 -0
  52. package/dist/setup-plugin-api.js +3 -4
  53. package/dist/{setup-surface-DuRQrrpU.js → setup-surface-BgUaEySF.js} +7 -10
  54. package/dist/{config-BR4uLzNs.js → shared-BlXw87Kp.js} +199 -9
  55. package/dist/{logger-CnZRVrux.js → startup-abort-br7BZHJQ.js} +32 -1
  56. package/dist/{startup-verification-Demyp0bP.js → startup-verification-CTfhD7V_.js} +2 -2
  57. package/dist/{storage-tC3ujLiW.js → storage-HI1nL3im.js} +1 -1
  58. package/dist/{subagent-hooks-DQbyqq9V.js → subagent-hooks-api-BgQgDwAS.js} +22 -1
  59. package/dist/subagent-hooks-api.js +1 -22
  60. package/dist/test-api.js +2 -2
  61. package/dist/thread-binding-api.js +1 -1
  62. package/dist/{thread-bindings--P1UYe7t.js → thread-bindings-8AyQOYDT.js} +2 -2
  63. package/dist/{tool-actions.runtime-AFGhzK--.js → tool-actions.runtime-BuCnleVD.js} +9 -9
  64. package/dist/{verification-BbGdzYQl.js → verification-DvC37Z_y.js} +2 -2
  65. package/openclaw.plugin.json +96 -0
  66. package/package.json +6 -6
  67. package/dist/accounts-Bm90Rzvp.js +0 -130
  68. package/dist/allowlist-sTzpCn5d.js +0 -68
  69. package/dist/config-paths-nsVaysCu.js +0 -19
  70. package/dist/config-update-wZX-HLMn.js +0 -143
  71. package/dist/direct-management--Y8ypgLv.js +0 -251
  72. package/dist/direct-room-XkutHjES.js +0 -76
  73. package/dist/exec-approvals-Crnh543m.js +0 -196
  74. package/dist/probe.runtime-NE73hi9o.js +0 -3
  75. package/dist/profile-BlHu0wDX.js +0 -111
  76. package/dist/recovery-key-store-BTJ6jz5v.js +0 -294
  77. package/dist/session-store-metadata-DQXjgNLt.js +0 -77
  78. package/dist/setup-core-B5X7HxAP.js +0 -116
  79. package/dist/setup-dm-policy-Ca3jA4YW.js +0 -195
  80. package/dist/shared-CkbpEI5j.js +0 -195
  81. package/dist/startup-abort-56edvmbM.js +0 -32
  82. /package/dist/{active-client-uhlxdhEy.js → active-client-DUi-lumi.js} +0 -0
  83. /package/dist/{approval-reactions-o2_tuH8D.js → approval-reactions-Cwd1PMCC.js} +0 -0
  84. /package/dist/{async-lock-uQfhfQIY.js → async-lock-SsmtFXtt.js} +0 -0
  85. /package/dist/{backup-health-Cabu_WQC.js → backup-health-3BHbHxyd.js} +0 -0
  86. /package/dist/{config-secret-input.runtime-DiKFehsE.js → config-secret-input.runtime-nbLCnJq7.js} +0 -0
  87. /package/dist/{crypto-node.runtime-pihzdpY7.js → crypto-node.runtime-D9qxgRPa.js} +0 -0
  88. /package/dist/{device-health-UVYpbA_W.js → device-health-Di9MUzFj.js} +0 -0
  89. /package/dist/{doctor-contract-D4-64QuJ.js → doctor-contract-s4gUPmRN.js} +0 -0
  90. /package/dist/{errors-CTcpEDq-.js → errors-BpHgvm2o.js} +0 -0
  91. /package/dist/{exec-approval-resolver-Bza9Dhlm.js → exec-approval-resolver-C8faS0XB.js} +0 -0
  92. /package/dist/{migration-snapshot-backup-DaCHTp8C.js → migration-snapshot-backup-BWTIFXgQ.js} +0 -0
  93. /package/dist/{reaction-common-ejrL19w-.js → reaction-common-B-QgNfEs.js} +0 -0
  94. /package/dist/{runtime-C6X4h_SJ.js → runtime-lwTSy9Yt.js} +0 -0
  95. /package/dist/{secret-contract-DcrJWCQI.js → secret-contract-e4SdhUtT.js} +0 -0
  96. /package/dist/{sync-state-C_beeevA.js → sync-state-Bx0gPaGA.js} +0 -0
  97. /package/dist/{thread-binding-api-Cq_E-E1K.js → thread-binding-api-Bx55B6hm.js} +0 -0
  98. /package/dist/{timeout-abort-signal-CtaIaP1v.js → timeout-abort-signal-sT0wAxVn.js} +0 -0
  99. /package/dist/{url-validation-DiK9j7jz.js → url-validation-CBZBxN3F.js} +0 -0
@@ -1,12 +1,78 @@
1
- import { a as resolveMatrixAccountConfig } from "./account-config-D2W-V1eQ.js";
2
- import { i as resolveMatrixAccount, r as resolveDefaultMatrixAccountId, t as listMatrixAccountIds } from "./accounts-Bm90Rzvp.js";
3
- import { t as normalizeMatrixAllowList } from "./allowlist-sTzpCn5d.js";
1
+ import { c as resolveMatrixAccountConfig } from "./config-paths-msaDGRh6.js";
2
+ import { g as resolveMatrixAccount, h as resolveDefaultMatrixAccountId, p as listMatrixAccountIds } from "./setup-core-CgOV8zmh.js";
4
3
  import { DEFAULT_ACCOUNT_ID as DEFAULT_ACCOUNT_ID$1 } from "openclaw/plugin-sdk/account-id";
4
+ import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
5
5
  import { adaptScopedAccountAccessor, createScopedChannelConfigAdapter } from "openclaw/plugin-sdk/channel-config-helpers";
6
+ import { resolveAllowlistMatchByCandidates } from "openclaw/plugin-sdk/allow-from";
7
+ import { normalizeStringEntries } from "openclaw/plugin-sdk/string-normalization-runtime";
6
8
  import { buildChannelConfigSchema } from "openclaw/plugin-sdk/channel-config-primitives";
7
9
  import { AllowFromListSchema, ContextVisibilityModeSchema, GroupPolicySchema, MarkdownConfigSchema, ToolPolicySchema, buildNestedDmConfigSchema } from "openclaw/plugin-sdk/channel-config-schema";
8
10
  import { buildSecretInputSchema } from "openclaw/plugin-sdk/secret-input";
9
11
  import { z } from "zod";
12
+ //#region extensions/matrix/src/matrix/monitor/allowlist.ts
13
+ function normalizeAllowList(list) {
14
+ return normalizeStringEntries(list);
15
+ }
16
+ function normalizeMatrixUser(raw) {
17
+ const value = (raw ?? "").trim();
18
+ if (!value) return "";
19
+ if (!value.startsWith("@") || !value.includes(":")) return normalizeLowercaseStringOrEmpty(value);
20
+ const withoutAt = value.slice(1);
21
+ const splitIndex = withoutAt.indexOf(":");
22
+ if (splitIndex === -1) return normalizeLowercaseStringOrEmpty(value);
23
+ const localpart = normalizeLowercaseStringOrEmpty(withoutAt.slice(0, splitIndex));
24
+ const server = normalizeLowercaseStringOrEmpty(withoutAt.slice(splitIndex + 1));
25
+ if (!server) return normalizeLowercaseStringOrEmpty(value);
26
+ return `@${localpart}:${server}`;
27
+ }
28
+ function normalizeMatrixUserId(raw) {
29
+ const trimmed = (raw ?? "").trim();
30
+ if (!trimmed) return "";
31
+ const lowered = normalizeLowercaseStringOrEmpty(trimmed);
32
+ if (lowered.startsWith("matrix:")) return normalizeMatrixUser(trimmed.slice(7));
33
+ if (lowered.startsWith("user:")) return normalizeMatrixUser(trimmed.slice(5));
34
+ return normalizeMatrixUser(trimmed);
35
+ }
36
+ function normalizeMatrixAllowListEntry(raw) {
37
+ const trimmed = raw.trim();
38
+ if (!trimmed) return "";
39
+ if (trimmed === "*") return trimmed;
40
+ const lowered = normalizeLowercaseStringOrEmpty(trimmed);
41
+ if (lowered.startsWith("matrix:")) return `matrix:${normalizeMatrixUser(trimmed.slice(7))}`;
42
+ if (lowered.startsWith("user:")) return `user:${normalizeMatrixUser(trimmed.slice(5))}`;
43
+ return normalizeMatrixUser(trimmed);
44
+ }
45
+ function normalizeMatrixAllowList(list) {
46
+ return normalizeAllowList(list).map((entry) => normalizeMatrixAllowListEntry(entry));
47
+ }
48
+ function resolveMatrixAllowListMatch(params) {
49
+ const allowList = params.allowList;
50
+ if (allowList.length === 0) return { allowed: false };
51
+ if (allowList.includes("*")) return {
52
+ allowed: true,
53
+ matchKey: "*",
54
+ matchSource: "wildcard"
55
+ };
56
+ const userId = normalizeMatrixUser(params.userId);
57
+ return resolveAllowlistMatchByCandidates({
58
+ allowList,
59
+ candidates: [
60
+ {
61
+ value: userId,
62
+ source: "id"
63
+ },
64
+ {
65
+ value: userId ? `matrix:${userId}` : "",
66
+ source: "prefixed-id"
67
+ },
68
+ {
69
+ value: userId ? `user:${userId}` : "",
70
+ source: "prefixed-user"
71
+ }
72
+ ]
73
+ });
74
+ }
75
+ //#endregion
10
76
  //#region extensions/matrix/src/config-adapter.ts
11
77
  const matrixConfigAdapter = createScopedChannelConfigAdapter({
12
78
  sectionKey: "matrix",
@@ -36,6 +102,30 @@ const matrixConfigAdapter = createScopedChannelConfigAdapter({
36
102
  //#endregion
37
103
  //#region extensions/matrix/src/config-ui-hints.ts
38
104
  const matrixChannelConfigUiHints = {
105
+ allowBots: {
106
+ label: "Matrix Allow Bot Messages",
107
+ help: "Allow messages from other configured Matrix bot accounts to trigger replies (default: false). Set \"mentions\" to require a visible room mention."
108
+ },
109
+ botLoopProtection: {
110
+ label: "Matrix Bot Loop Protection",
111
+ help: "Sliding-window guard for accepted Matrix configured-bot loops. Default is enabled whenever allowBots lets configured bot messages reach dispatch."
112
+ },
113
+ "botLoopProtection.enabled": {
114
+ label: "Matrix Bot Loop Protection Enabled",
115
+ help: "Enable the bot-pair loop guard. Defaults to true when allowBots is true or \"mentions\", and false when configured bot messages are ignored."
116
+ },
117
+ "botLoopProtection.maxEventsPerWindow": {
118
+ label: "Matrix Bot Loop Events per Window",
119
+ help: "Maximum accepted bot-pair messages within the sliding window before suppression starts. Default: 20."
120
+ },
121
+ "botLoopProtection.windowSeconds": {
122
+ label: "Matrix Bot Loop Window Seconds",
123
+ help: "Sliding window length for counting bot-pair messages. Default: 60."
124
+ },
125
+ "botLoopProtection.cooldownSeconds": {
126
+ label: "Matrix Bot Loop Cooldown Seconds",
127
+ help: "How long to suppress the bot pair after it exceeds the budget. Default: 60."
128
+ },
39
129
  dangerouslyAllowNameMatching: {
40
130
  label: "Matrix Display Name Matching",
41
131
  help: "Compatibility opt-in for resolving Matrix display names and joined room names in allowlists. Prefer full @user:server IDs and room IDs or aliases because names are mutable."
@@ -92,11 +182,18 @@ const matrixExecApprovalsSchema = z.object({
92
182
  "both"
93
183
  ]).optional()
94
184
  }).optional();
185
+ const botLoopProtectionSchema = z.object({
186
+ enabled: z.boolean().optional(),
187
+ maxEventsPerWindow: z.number().int().positive().optional(),
188
+ windowSeconds: z.number().int().positive().optional(),
189
+ cooldownSeconds: z.number().int().positive().optional()
190
+ }).strict().optional();
95
191
  const matrixRoomSchema = z.object({
96
192
  account: z.string().optional(),
97
193
  enabled: z.boolean().optional(),
98
194
  requireMention: z.boolean().optional(),
99
195
  allowBots: z.union([z.boolean(), z.literal("mentions")]).optional(),
196
+ botLoopProtection: botLoopProtectionSchema,
100
197
  tools: ToolPolicySchema,
101
198
  autoReply: z.boolean().optional(),
102
199
  users: AllowFromListSchema,
@@ -139,6 +236,7 @@ const MatrixChannelConfigSchema = buildChannelConfigSchema(z.object({
139
236
  allowlistOnly: z.boolean().optional(),
140
237
  dangerouslyAllowNameMatching: z.boolean().optional(),
141
238
  allowBots: z.union([z.boolean(), z.literal("mentions")]).optional(),
239
+ botLoopProtection: botLoopProtectionSchema,
142
240
  groupPolicy: GroupPolicySchema.optional(),
143
241
  contextVisibility: ContextVisibilityModeSchema.optional(),
144
242
  blockStreaming: z.boolean().optional(),
@@ -202,4 +300,4 @@ const MatrixChannelConfigSchema = buildChannelConfigSchema(z.object({
202
300
  actions: matrixActionSchema
203
301
  }), { uiHints: matrixChannelConfigUiHints });
204
302
  //#endregion
205
- export { DEFAULT_ACCOUNT_ID$1 as n, matrixConfigAdapter as r, MatrixChannelConfigSchema as t };
303
+ export { normalizeMatrixUserId as a, normalizeMatrixAllowList as i, DEFAULT_ACCOUNT_ID$1 as n, resolveMatrixAllowListMatch as o, matrixConfigAdapter as r, MatrixChannelConfigSchema as t };
@@ -1,9 +1,8 @@
1
1
  import { s as resetMatrixThreadBindingsForTests } from "./thread-bindings-shared-DK-d-oYX.js";
2
2
  import { r as setMatrixRuntime } from "./runtime-Dog86njy.js";
3
- import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-D4-64QuJ.js";
4
- import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-DcrJWCQI.js";
5
- import { a as namedAccountPromotionKeys, o as resolveSingleAccountPromotionTarget, s as singleAccountKeysToMove } from "./setup-dm-policy-Ca3jA4YW.js";
6
- import { n as matrixSetupAdapter } from "./setup-core-B5X7HxAP.js";
7
- import { n as matrixOnboardingAdapter } from "./setup-surface-DuRQrrpU.js";
8
- import { t as createMatrixThreadBindingManager } from "./thread-bindings--P1UYe7t.js";
3
+ import { d as resolveSingleAccountPromotionTarget, f as singleAccountKeysToMove, n as matrixSetupAdapter, u as namedAccountPromotionKeys } from "./setup-core-CgOV8zmh.js";
4
+ import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-s4gUPmRN.js";
5
+ import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-e4SdhUtT.js";
6
+ import { n as matrixOnboardingAdapter } from "./setup-surface-BgUaEySF.js";
7
+ import { t as createMatrixThreadBindingManager } from "./thread-bindings-8AyQOYDT.js";
9
8
  export { collectRuntimeConfigAssignments, createMatrixThreadBindingManager, legacyConfigRules, matrixSetupAdapter, matrixOnboardingAdapter as matrixSetupWizard, namedAccountPromotionKeys, normalizeCompatibilityConfig, resetMatrixThreadBindingsForTests, resolveSingleAccountPromotionTarget, secretTargetRegistryEntries, setMatrixRuntime, singleAccountKeysToMove };
@@ -1,7 +1,7 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-DUslC3ob.js";
2
- import { t as resolveValidatedMatrixHomeserverUrl } from "./url-validation-DiK9j7jz.js";
3
- import { a as resolveMatrixStoragePaths, n as maybeMigrateLegacyStorage, o as writeStorageMeta } from "./storage-tC3ujLiW.js";
4
- import "./config-BR4uLzNs.js";
2
+ import { t as resolveValidatedMatrixHomeserverUrl } from "./url-validation-CBZBxN3F.js";
3
+ import { a as resolveMatrixStoragePaths, n as maybeMigrateLegacyStorage, o as writeStorageMeta } from "./storage-HI1nL3im.js";
4
+ import "./shared-BlXw87Kp.js";
5
5
  import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
6
6
  import fs from "node:fs";
7
7
  import { ssrfPolicyFromDangerouslyAllowPrivateNetwork } from "openclaw/plugin-sdk/ssrf-runtime";
@@ -9,7 +9,7 @@ import { ssrfPolicyFromDangerouslyAllowPrivateNetwork } from "openclaw/plugin-sd
9
9
  var create_client_exports = /* @__PURE__ */ __exportAll({ createMatrixClient: () => createMatrixClient });
10
10
  let matrixCreateClientRuntimeDepsPromise;
11
11
  async function loadMatrixCreateClientRuntimeDeps() {
12
- matrixCreateClientRuntimeDepsPromise ??= Promise.all([import("./sdk-DXWmb94u.js").then((n) => n.n), import("./logging-DZHSPP5N.js").then((n) => n.n)]).then(([sdkModule, loggingModule]) => ({
12
+ matrixCreateClientRuntimeDepsPromise ??= Promise.all([import("./sdk-BwfNtBhM.js").then((n) => n.n), import("./logging-bJ8EEe1G.js").then((n) => n.n)]).then(([sdkModule, loggingModule]) => ({
13
13
  MatrixClient: sdkModule.MatrixClient,
14
14
  ensureMatrixSdkLoggingConfigured: loggingModule.ensureMatrixSdkLoggingConfigured
15
15
  }));
@@ -1,5 +1,5 @@
1
1
  import { a as resolveMatrixCredentialsDir, i as loadMatrixCredentials, n as credentialsMatchConfig, o as resolveMatrixCredentialsPath, t as clearMatrixCredentials } from "./credentials-read-cmHgousK.js";
2
- import { t as createAsyncLock } from "./async-lock-uQfhfQIY.js";
2
+ import { t as createAsyncLock } from "./async-lock-SsmtFXtt.js";
3
3
  import { writeJsonFileAtomically } from "openclaw/plugin-sdk/json-store";
4
4
  //#region extensions/matrix/src/matrix/credentials.ts
5
5
  const credentialWriteLocks = /* @__PURE__ */ new Map();
@@ -1,7 +1,7 @@
1
1
  //#region extensions/matrix/src/matrix/credentials-write.runtime.ts
2
2
  let matrixCredentialsRuntimePromise;
3
3
  function loadMatrixCredentialsRuntime() {
4
- matrixCredentialsRuntimePromise ??= import("./credentials-DV6fWXhC.js");
4
+ matrixCredentialsRuntimePromise ??= import("./credentials-DK0lK9cZ.js");
5
5
  return matrixCredentialsRuntimePromise;
6
6
  }
7
7
  async function saveMatrixCredentials(...args) {
@@ -1,7 +1,7 @@
1
- import { t as formatMatrixErrorMessage } from "./errors-CTcpEDq-.js";
2
- import { t as ensureMatrixCryptoRuntime } from "./deps-CU5W9Ixu.js";
3
- import { n as LogService, r as noop } from "./logger-CnZRVrux.js";
4
- import { i as MATRIX_IDB_SNAPSHOT_LOCK_OPTIONS, n as isRepairableSecretStorageAccessError } from "./recovery-key-store-BTJ6jz5v.js";
1
+ import { t as formatMatrixErrorMessage } from "./errors-BpHgvm2o.js";
2
+ import { t as ensureMatrixCryptoRuntime } from "./deps-LqqGWPWt.js";
3
+ import { o as LogService, s as noop } from "./startup-abort-br7BZHJQ.js";
4
+ import { i as MATRIX_IDB_SNAPSHOT_LOCK_OPTIONS, r as isRepairableSecretStorageAccessError } from "./sdk-BwfNtBhM.js";
5
5
  import fs from "node:fs";
6
6
  import path from "node:path";
7
7
  import { MatrixEventEvent } from "matrix-js-sdk/lib/matrix.js";
@@ -290,7 +290,7 @@ var MatrixCryptoBootstrapper = class {
290
290
  //#region extensions/matrix/src/matrix/sdk/crypto-facade.ts
291
291
  let matrixCryptoNodeRuntimePromise = null;
292
292
  async function loadMatrixCryptoNodeRuntime() {
293
- matrixCryptoNodeRuntimePromise ??= import("./crypto-node.runtime-pihzdpY7.js").catch((error) => {
293
+ matrixCryptoNodeRuntimePromise ??= import("./crypto-node.runtime-D9qxgRPa.js").catch((error) => {
294
294
  matrixCryptoNodeRuntimePromise = null;
295
295
  throw error;
296
296
  });
@@ -11,25 +11,21 @@ const REQUIRED_MATRIX_PACKAGES = [
11
11
  ];
12
12
  const MIN_MATRIX_CRYPTO_NATIVE_BINDING_BYTES = 1e6;
13
13
  function resolveMissingMatrixPackages(resolveFn) {
14
- try {
15
- const resolve = resolveFn ?? defaultResolveFn;
16
- return REQUIRED_MATRIX_PACKAGES.filter((pkg) => {
17
- try {
18
- resolve(pkg);
19
- return false;
20
- } catch {
21
- return true;
22
- }
23
- });
24
- } catch {
25
- return [...REQUIRED_MATRIX_PACKAGES];
26
- }
14
+ const resolve = resolveFn ?? defaultResolveFn;
15
+ return REQUIRED_MATRIX_PACKAGES.filter((pkg) => {
16
+ try {
17
+ resolve(pkg);
18
+ return false;
19
+ } catch {
20
+ return true;
21
+ }
22
+ });
27
23
  }
28
24
  function isMatrixSdkAvailable() {
29
25
  return resolveMissingMatrixPackages().length === 0;
30
26
  }
31
27
  function buildMatrixDepsMissingMessage(missing) {
32
- return [`Matrix plugin dependencies are missing: ${missing.length > 0 ? missing.join(", ") : REQUIRED_MATRIX_PACKAGES.join(", ")}.`, "Repair this plugin with `openclaw plugins update matrix` or run `openclaw doctor --fix`."].join(" ");
28
+ return [`Matrix plugin dependencies are missing: ${missing.join(", ")}.`, "Repair this plugin with `openclaw plugins update matrix` or run `openclaw doctor --fix`."].join(" ");
33
29
  }
34
30
  let defaultMatrixCryptoRuntimeEnsurePromise = null;
35
31
  async function runFixedCommandWithTimeout(params) {
@@ -1,8 +1,8 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-DUslC3ob.js";
2
2
  import { n as normalizeMatrixMessagingTarget, t as isMatrixQualifiedUserId } from "./target-ids-80nQ2gql.js";
3
- import { t as MatrixAuthedHttpClient } from "./http-client-C7AeVJay.js";
4
- import { n as resolveMatrixAuth } from "./config-BR4uLzNs.js";
5
- import "./client-CyxIx4Fv.js";
3
+ import { t as MatrixAuthedHttpClient } from "./http-client-DS3UoC_p.js";
4
+ import { l as resolveMatrixAuth } from "./shared-BlXw87Kp.js";
5
+ import "./client-oci1tD6-.js";
6
6
  import { normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
7
7
  //#region extensions/matrix/src/directory-live.ts
8
8
  var directory_live_exports = /* @__PURE__ */ __exportAll({
@@ -1,7 +1,7 @@
1
1
  import { t as isRecord } from "./record-shared-CHWJCTWf.js";
2
- import "./doctor-contract-D4-64QuJ.js";
3
- import { i as autoPrepareLegacyMatrixCrypto, o as autoMigrateLegacyMatrixState, r as resolveMatrixMigrationStatus } from "./matrix-migration.runtime-DfjNMeoX.js";
4
- import { t as maybeCreateMatrixMigrationSnapshot } from "./migration-snapshot-backup-DaCHTp8C.js";
2
+ import "./doctor-contract-s4gUPmRN.js";
3
+ import { i as autoPrepareLegacyMatrixCrypto, o as autoMigrateLegacyMatrixState, r as resolveMatrixMigrationStatus } from "./matrix-migration.runtime-Cf_wX9mk.js";
4
+ import { t as maybeCreateMatrixMigrationSnapshot } from "./migration-snapshot-backup-BWTIFXgQ.js";
5
5
  import { detectPluginInstallPathIssue, formatPluginInstallPathIssue, removePluginFromConfig } from "openclaw/plugin-sdk/runtime-doctor";
6
6
  //#region extensions/matrix/src/doctor.ts
7
7
  function hasConfiguredMatrixChannel(cfg) {
@@ -1,2 +1,2 @@
1
- import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-D4-64QuJ.js";
1
+ import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-s4gUPmRN.js";
2
2
  export { legacyConfigRules, normalizeCompatibilityConfig };
@@ -1,5 +1,4 @@
1
- import { n as editMessageMatrix, r as prepareMatrixSingleText, s as sendSingleTextMessageMatrix } from "./send-Df-pDuG6.js";
2
- import { l as MsgType } from "./direct-management--Y8ypgLv.js";
1
+ import { n as editMessageMatrix, r as prepareMatrixSingleText, s as sendSingleTextMessageMatrix, y as MsgType } from "./send-CdoJ1pZY.js";
3
2
  import { createDraftStreamLoop } from "openclaw/plugin-sdk/channel-lifecycle";
4
3
  //#region extensions/matrix/src/matrix/draft-stream.ts
5
4
  const DEFAULT_THROTTLE_MS = 1e3;
@@ -1,5 +1,5 @@
1
1
  import { a as resolveMatrixDefaultOrOnlyAccountId } from "./account-selection-BWwIruri.js";
2
- import { t as resolveMatrixConfigFieldPath } from "./config-paths-nsVaysCu.js";
2
+ import { t as resolveMatrixConfigFieldPath } from "./config-paths-msaDGRh6.js";
3
3
  import { normalizeOptionalAccountId } from "openclaw/plugin-sdk/account-id";
4
4
  //#region extensions/matrix/src/matrix/encryption-guidance.ts
5
5
  function resolveMatrixEncryptionConfigPath(cfg, accountId) {
@@ -1,4 +1,4 @@
1
- import { t as buildTimeoutAbortSignal } from "./timeout-abort-signal-CtaIaP1v.js";
1
+ import { t as buildTimeoutAbortSignal } from "./timeout-abort-signal-sT0wAxVn.js";
2
2
  import { readResponseWithLimit } from "openclaw/plugin-sdk/response-limit-runtime";
3
3
  import { fetchWithRuntimeDispatcherOrMockedGlobal } from "openclaw/plugin-sdk/runtime-fetch";
4
4
  import { closeDispatcher, createPinnedDispatcher, resolvePinnedHostnameWithPolicy } from "openclaw/plugin-sdk/ssrf-dispatcher";
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { n as registerMatrixCliMetadata } from "./cli-metadata-OtekEqAD.js";
2
- import { registerMatrixSubagentHooks } from "./subagent-hooks-api.js";
1
+ import { n as registerMatrixCliMetadata } from "./cli-metadata-B2_76YSe.js";
2
+ import { t as registerMatrixSubagentHooks } from "./subagent-hooks-api-BgQgDwAS.js";
3
3
  import { defineBundledChannelEntry } from "openclaw/plugin-sdk/channel-entry-contract";
4
4
  //#region extensions/matrix/index.ts
5
5
  let matrixHandlersRuntimePromise = null;
@@ -1,4 +1,4 @@
1
- import { t as ensureMatrixCryptoRuntime } from "./deps-CU5W9Ixu.js";
1
+ import { t as ensureMatrixCryptoRuntime } from "./deps-LqqGWPWt.js";
2
2
  import { createRequire } from "node:module";
3
3
  import fs from "node:fs";
4
4
  import path from "node:path";
@@ -1,5 +1,5 @@
1
1
  import { t as getMatrixRuntime } from "./runtime-Dog86njy.js";
2
- import { a as resolveMatrixStoragePaths } from "./storage-tC3ujLiW.js";
2
+ import { a as resolveMatrixStoragePaths } from "./storage-HI1nL3im.js";
3
3
  import os from "node:os";
4
4
  import path from "node:path";
5
5
  import { readJsonFileWithFallback, writeJsonFileAtomically } from "openclaw/plugin-sdk/json-store";
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-DUslC3ob.js";
2
- import { i as setMatrixConsoleLogging, n as LogService, t as ConsoleLogger } from "./logger-CnZRVrux.js";
2
+ import { a as ConsoleLogger, c as setMatrixConsoleLogging, o as LogService } from "./startup-abort-br7BZHJQ.js";
3
3
  import { logger } from "matrix-js-sdk/lib/logger.js";
4
4
  //#region extensions/matrix/src/matrix/client/logging.ts
5
5
  var logging_exports = /* @__PURE__ */ __exportAll({
@@ -1,8 +1,8 @@
1
1
  import { a as resolveMatrixDefaultOrOnlyAccountId, i as resolveMatrixChannelConfig, n as requiresExplicitMatrixDefaultAccount, o as resolveMatrixAccountStringValues, r as resolveConfiguredMatrixAccountIds, t as findMatrixAccountEntry } from "./account-selection-BWwIruri.js";
2
2
  import { i as resolveScopedMatrixEnvConfig, n as resolveGlobalMatrixEnvConfig } from "./env-auth-BJqGI8M6.js";
3
3
  import { a as resolveMatrixCredentialsPath, n as resolveMatrixAccountStorageRoot, s as resolveMatrixLegacyFlatStoragePaths } from "./storage-paths-BJLdnCjV.js";
4
- import { t as formatMatrixErrorMessage } from "./errors-CTcpEDq-.js";
5
- import "./migration-snapshot-backup-DaCHTp8C.js";
4
+ import { t as formatMatrixErrorMessage } from "./errors-BpHgvm2o.js";
5
+ import "./migration-snapshot-backup-BWTIFXgQ.js";
6
6
  import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/account-id";
7
7
  import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
8
8
  import fs from "node:fs";
@@ -249,7 +249,7 @@ function isMatrixLegacyCryptoInspectorAvailable() {
249
249
  //#region extensions/matrix/src/legacy-crypto.ts
250
250
  const MATRIX_LEGACY_CRYPTO_INSPECTOR_UNAVAILABLE_MESSAGE = "Legacy Matrix encrypted state was detected, but the Matrix crypto inspector is unavailable.";
251
251
  async function loadMatrixLegacyCryptoInspector() {
252
- return (await import("./legacy-crypto-inspector-pB252vPO.js")).inspectLegacyMatrixCryptoStore;
252
+ return (await import("./legacy-crypto-inspector-_gWJGVQ_.js")).inspectLegacyMatrixCryptoStore;
253
253
  }
254
254
  function detectLegacyBotSdkCryptoStore(cryptoRootDir) {
255
255
  try {
@@ -1,4 +1,4 @@
1
- import { f as buildPollResultsSummary, g as isPollStartType, h as isPollEventType, m as formatPollResultsAsText, p as formatPollAsText, v as parsePollStartContent, y as resolvePollReferenceEventId } from "./send-Df-pDuG6.js";
1
+ import { C as formatPollResultsAsText, D as parsePollStartContent, O as resolvePollReferenceEventId, S as formatPollAsText, T as isPollStartType, w as isPollEventType, x as buildPollResultsSummary } from "./send-CdoJ1pZY.js";
2
2
  import path from "node:path";
3
3
  //#region extensions/matrix/src/matrix/poll-summary.ts
4
4
  function resolveMatrixPollRootEventId(event) {
@@ -1,8 +1,8 @@
1
- import { r as isMatrixNotFoundError } from "./errors-CTcpEDq-.js";
2
- import { a as sendMessageMatrix, h as isPollEventType, n as editMessageMatrix } from "./send-Df-pDuG6.js";
3
- import { n as MATRIX_REACTION_EVENT_TYPE } from "./reaction-common-ejrL19w-.js";
4
- import { a as resolveMatrixMessageBody, c as resolveMatrixPollRootEventId, i as resolveMatrixMessageAttachment, o as fetchMatrixPollMessageSummary } from "./media-text-psyGloYl.js";
5
- import { r as withResolvedRoomAction } from "./client-DzjShjVN.js";
1
+ import { r as isMatrixNotFoundError } from "./errors-BpHgvm2o.js";
2
+ import { a as sendMessageMatrix, n as editMessageMatrix, w as isPollEventType } from "./send-CdoJ1pZY.js";
3
+ import { n as MATRIX_REACTION_EVENT_TYPE } from "./reaction-common-B-QgNfEs.js";
4
+ import { a as resolveMatrixMessageBody, c as resolveMatrixPollRootEventId, i as resolveMatrixMessageAttachment, o as fetchMatrixPollMessageSummary } from "./media-text-4h4YwCGC.js";
5
+ import { r as withResolvedRoomAction } from "./client-D6fFVbNM.js";
6
6
  import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
7
7
  //#region extensions/matrix/src/matrix/actions/limits.ts
8
8
  function resolveMatrixActionLimit(raw, fallback) {
@@ -1,2 +1,2 @@
1
- import { t as maybeCreateMatrixMigrationSnapshot } from "./migration-snapshot-backup-DaCHTp8C.js";
1
+ import { t as maybeCreateMatrixMigrationSnapshot } from "./migration-snapshot-backup-BWTIFXgQ.js";
2
2
  export { maybeCreateMatrixMigrationSnapshot };