@openclaw/matrix 2026.10.10-beta.5 → 2026.11.1

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 (101) hide show
  1. package/dist/.setup/{account-config-CRsKoMqJ.mjs → account-config-CVM2a28p.mjs} +1 -2
  2. package/dist/.setup/{account-selection-Bs_jCAaG.mjs → account-selection-BPFpdMIw.mjs} +5 -8
  3. package/dist/.setup/{approval-handler.runtime-6u08WKWh.mjs → approval-handler.runtime-BvuXpzus.mjs} +8 -9
  4. package/dist/.setup/{approval-reactions-D2pEUrFS.mjs → approval-reactions-DMDBJos0.mjs} +2 -3
  5. package/dist/.setup/{backup-health-Dm_YMVFT.mjs → backup-health-BxH69np2.mjs} +1 -2
  6. package/dist/.setup/{channel-CqkLHNdp.mjs → channel-DYRabwmj.mjs} +30 -43
  7. package/dist/.setup/{channel.runtime-BfZdvlho.mjs → channel.runtime-C0VWk0Ch.mjs} +8 -10
  8. package/dist/.setup/{channel.setup-ClA7V_Ba.mjs → channel.setup-Dp7V9AgV.mjs} +7 -11
  9. package/dist/.setup/{cli-metadata-COWLWR3E.mjs → cli-metadata-DemZndyG.mjs} +3 -5
  10. package/dist/.setup/{cli-BLgMlO3I.mjs → cli-umlumhB6.mjs} +28 -39
  11. package/dist/.setup/{client-C4Gibhzl.mjs → client-BIsYqIzM.mjs} +19 -25
  12. package/dist/.setup/{client-C7pZ6gAl.mjs → client-DL_aELCJ.mjs} +4 -5
  13. package/dist/.setup/{client-bootstrap-kOIDV4z_.mjs → client-bootstrap-kdsygurH.mjs} +2 -3
  14. package/dist/.setup/{client-support-D-xHScuo.mjs → client-support-CFofPPPm.mjs} +3 -5
  15. package/dist/.setup/{config-paths-CnREYb1Y.mjs → config-paths-DBpHxDyc.mjs} +1 -2
  16. package/dist/.setup/{create-client-BS8UYx6N.mjs → create-client-BFkMM7SP.mjs} +8 -9
  17. package/dist/.setup/{credentials-CPnJZaZB.mjs → credentials-B3MlOOom.mjs} +5 -6
  18. package/dist/.setup/{credentials-read-D2ULV55A.mjs → credentials-read-BOuCoy-p.mjs} +5 -6
  19. package/dist/.setup/{credentials-state-B3cuUFwZ.mjs → credentials-state-jxq29yQw.mjs} +1 -2
  20. package/dist/.setup/{crypto-node.runtime-6Aj_ltHQ.mjs → crypto-node.runtime-E_hqXGxm.mjs} +1 -2
  21. package/dist/.setup/{crypto-runtime-D8yY7kjD.mjs → crypto-runtime-s3ogwLRO.mjs} +12 -19
  22. package/dist/.setup/{crypto-state-store-D4wrCvFs.mjs → crypto-state-store-CM57gchf.mjs} +3 -4
  23. package/dist/.setup/{crypto-store-ownership-Z_Y5WRKr.mjs → crypto-store-ownership-Bratn-Np.mjs} +3 -4
  24. package/dist/.setup/{crypto-unsafe-state-doctor-C8szCYmf.mjs → crypto-unsafe-state-doctor-ClzRgr8z.mjs} +7 -8
  25. package/dist/.setup/{deps-L_1bUAGL.mjs → deps-O7rEnklr.mjs} +1 -2
  26. package/dist/.setup/{device-health-Be60VF1w.mjs → device-health-CmvwmCHB.mjs} +2 -3
  27. package/dist/.setup/{direct-management-B3wYhx_M.mjs → direct-management-BOYMqZJQ.mjs} +7 -11
  28. package/dist/.setup/{directory-live-BpSz-FQB.mjs → directory-live-tItssg9q.mjs} +5 -6
  29. package/dist/.setup/doctor-contract-GiXgCj7k.mjs +37 -0
  30. package/dist/.setup/{draft-stream-K6Lu-JEI.mjs → draft-stream-Buru5huX.mjs} +3 -4
  31. package/dist/.setup/{encryption-guidance-D5_IsDIy.mjs → encryption-guidance-CLloQ6H7.mjs} +3 -4
  32. package/dist/.setup/{env-vars-aEBngJPa.mjs → env-vars-Bh1iOXJ1.mjs} +1 -2
  33. package/dist/.setup/{errors-Bw4EHwKX.mjs → errors-CL3YJV8U.mjs} +1 -2
  34. package/dist/.setup/{event-helpers-CxNgMQqH.mjs → event-helpers-DDUjVVf7.mjs} +1 -2
  35. package/dist/.setup/{exec-approvals-DtNw0e04.mjs → exec-approvals-CWeSpE6V.mjs} +6 -9
  36. package/dist/.setup/{file-sync-store-CUH8EAJq.mjs → file-sync-store-D1sEtAap.mjs} +5 -6
  37. package/dist/.setup/{http-client-ByR4STVQ.mjs → http-client-CxTmU1kT.mjs} +4 -7
  38. package/dist/.setup/{idb-persistence-BHTYPRe_.mjs → idb-persistence-BF0MZglD.mjs} +6 -7
  39. package/dist/.setup/{idb-persistence-lock-Bh3ZLIsE.mjs → idb-persistence-lock-CH2K6d_3.mjs} +1 -2
  40. package/dist/.setup/{inbound-dedupe-C-EBGY0B.mjs → inbound-dedupe-CZnOq0ja.mjs} +2 -3
  41. package/dist/.setup/{joined-room-encryption-BAD70N5n.mjs → joined-room-encryption-Dl7Sb9FF.mjs} +2 -3
  42. package/dist/.setup/{logger-CXQnpXCt.mjs → logger-BX5kXvh1.mjs} +2 -3
  43. package/dist/.setup/{logging-BKV8TYQq.mjs → logging-BWPjyW9s.mjs} +3 -4
  44. package/dist/.setup/{messages-O6G0-_xr.mjs → messages-Dt51OgyD.mjs} +9 -14
  45. package/dist/.setup/{monitor-BSEZMFyq.mjs → monitor-BrBbFO8h.mjs} +85 -94
  46. package/dist/.setup/{onboarding-DQLF7huY.mjs → onboarding-QfFvgZ85.mjs} +10 -11
  47. package/dist/.setup/{outbound-C0bqZr89.mjs → outbound-B8h2BwR2.mjs} +3 -4
  48. package/dist/.setup/{profile-update-BbfEg9Fx.mjs → profile-update-DiXtw0NM.mjs} +6 -8
  49. package/dist/.setup/{reaction-events-51DOeO0I.mjs → reaction-events-xTg2_wZJ.mjs} +8 -9
  50. package/dist/.setup/{resolve-targets-BJ5sIKeM.mjs → resolve-targets-vlr765on.mjs} +4 -5
  51. package/dist/.setup/{retired-state-DOCruzWd.mjs → retired-state-vIr2IB90.mjs} +4 -7
  52. package/dist/.setup/{room-info-DAJKw-I8.mjs → room-info-BSvDbUmt.mjs} +6 -8
  53. package/dist/.setup/{runtime-1kn1P6io.mjs → runtime-Ck8TjD7L.mjs} +1 -2
  54. package/dist/.setup/{doctor-contract-CsTNmbMa.mjs → runtime-doctor-migrations-CSvRANPN.mjs} +17 -58
  55. package/dist/.setup/{runtime-setter-api-i2MOXoT3.mjs → runtime-setter-api-CpwhcBQK.mjs} +1 -1
  56. package/dist/.setup/{sdk-ByU8So5S.mjs → sdk-BYR5_wri.mjs} +32 -47
  57. package/dist/.setup/{secret-contract-DxyzKSzf.mjs → secret-contract-AKnr45nw.mjs} +2 -3
  58. package/dist/.setup/{secret-contract-api-Dukgvike.mjs → secret-contract-api-DMSwMIxd.mjs} +1 -1
  59. package/dist/.setup/{send-CFx1h7xE.mjs → send-BMe_VcxP.mjs} +24 -40
  60. package/dist/.setup/{send-currentness-C2rMVVIQ.mjs → send-currentness-CAUVR-f3.mjs} +2 -4
  61. package/dist/.setup/{setup-bootstrap-DANlsW-o.mjs → setup-bootstrap-Ch6r7Szn.mjs} +4 -5
  62. package/dist/.setup/{setup-core-EQceJMZZ.mjs → setup-core-CRUekZa3.mjs} +13 -20
  63. package/dist/.setup/setup-plugin-api-BZPY4Dt2.mjs +2 -0
  64. package/dist/.setup/{startup-verification-UU8DUvi4.mjs → startup-verification-Cv_NoW_O.mjs} +4 -5
  65. package/dist/.setup/{state-layout-walk-BQMgMykU.mjs → state-layout-walk-BqCZTHpp.mjs} +2 -3
  66. package/dist/.setup/{storage-l8V0XsGM.mjs → storage-B94yQdJy.mjs} +17 -12
  67. package/dist/.setup/{storage-paths-B51JM-pC.mjs → storage-paths-e_Vq6cvw.mjs} +1 -2
  68. package/dist/.setup/{subagent-hooks-CSY4iwa_.mjs → subagent-hooks-CT-rdJmh.mjs} +2 -3
  69. package/dist/.setup/{sync-cache-state-Cnm4TCEI.mjs → sync-cache-state-B-FayxeA.mjs} +7 -6
  70. package/dist/.setup/{target-ids-HhcaKX1n.mjs → target-ids-DltG_ZHJ.mjs} +1 -2
  71. package/dist/.setup/{thread-binding-api-BvuaKpd0.mjs → thread-binding-api-OtSciHmZ.mjs} +2 -3
  72. package/dist/.setup/{thread-bindings-C0gv7BEN.mjs → thread-bindings-CB-jqrf4.mjs} +7 -9
  73. package/dist/.setup/{thread-bindings-shared-CPjUA0Ib.mjs → thread-bindings-shared-FMu_szTm.mjs} +1 -2
  74. package/dist/.setup/{tool-actions-DGYRJDEV.mjs → tool-actions-DjPJ6tpr.mjs} +18 -23
  75. package/dist/.setup/{url-validation-CF6pG6eE.mjs → url-validation-C77p4qT9.mjs} +1 -2
  76. package/dist/.setup/{verification-DUxuApWC.mjs → verification-BqjyjLoq.mjs} +4 -5
  77. package/dist/.source-module-urls/1cd4d4ff8d44e1c8b830932b44d7cf8a7f3350e09e169910e1d7a85e131b7bea.json +1 -1
  78. package/dist/api.js +8 -8
  79. package/dist/auth-presence.js +2 -3
  80. package/dist/channel-plugin-api.js +1 -1
  81. package/dist/cli-metadata.js +1 -1
  82. package/dist/contract-api.js +2 -2
  83. package/dist/doctor-contract-api.js +51 -23
  84. package/dist/helper-api.js +3 -3
  85. package/dist/index.js +3 -4
  86. package/dist/plugin-entry.handlers.runtime.js +3 -4
  87. package/dist/runtime-api.js +7 -8
  88. package/dist/runtime-setter-api.js +1 -1
  89. package/dist/secret-contract-api.js +1 -1
  90. package/dist/session-binding-contract-api.js +2 -2
  91. package/dist/setup-entry.js +4 -5
  92. package/dist/setup-plugin-api.js +1 -1
  93. package/dist/subagent-hooks-api.js +2 -3
  94. package/dist/thread-binding-api.js +1 -1
  95. package/dist/thread-bindings-runtime.js +1 -1
  96. package/node_modules/matrix-js-sdk/lib/http-api/utils.js +3 -1
  97. package/node_modules/matrix-js-sdk/lib/rust-crypto/rust-crypto.js +7 -1
  98. package/node_modules/matrix-js-sdk/src/http-api/utils.ts +5 -1
  99. package/node_modules/matrix-js-sdk/src/rust-crypto/rust-crypto.ts +7 -1
  100. package/package.json +4 -4
  101. package/dist/.setup/setup-plugin-api-f8mWghxf.mjs +0 -2
@@ -1,10 +1,10 @@
1
- import { t as getMatrixRuntime } from "./runtime-1kn1P6io.mjs";
1
+ import { t as getMatrixRuntime } from "./runtime-Ck8TjD7L.mjs";
2
2
  import { extractErrorCode } from "openclaw/plugin-sdk/error-runtime";
3
3
  import { isRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
4
4
  import path from "node:path";
5
5
  import os from "node:os";
6
6
  import fs from "node:fs/promises";
7
- //#region extensions/matrix/src/matrix/chunked-state.ts
7
+ // extensions/matrix/src/matrix/chunked-state.ts
8
8
  function chunkMatrixStateJson(value, maxBytes, maxChunks, limitMessage) {
9
9
  const chunks = [];
10
10
  const pushChunk = (chunk) => {
@@ -45,8 +45,7 @@ async function writeMatrixStateChunks(store, rows, chunkKeyPrefix) {
45
45
  await store.register(rows.meta.key, rows.meta.value);
46
46
  for (const row of await store.entries()) if (row.key.startsWith(chunkKeyPrefix) && !nextChunkKeys.has(row.key)) await store.delete(row.key);
47
47
  }
48
- //#endregion
49
- //#region extensions/matrix/src/matrix/sqlite-state.ts
48
+ // extensions/matrix/src/matrix/sqlite-state.ts
50
49
  function resolveStateDirOverride(options) {
51
50
  if (!options) return;
52
51
  return options.stateDir || options.stateRootDir || getMatrixRuntime().state.resolveStateDir(options.env ?? process.env, os.homedir);
@@ -79,8 +78,7 @@ async function updateMatrixKeyedState(store, key, update, onUndefined = "keep")
79
78
  observation = result.current;
80
79
  }
81
80
  }
82
- //#endregion
83
- //#region extensions/matrix/src/matrix/retired-state.ts
81
+ // extensions/matrix/src/matrix/retired-state.ts
84
82
  const RETIRED_MATRIX_STATE_FILENAMES = /* @__PURE__ */ new Set([
85
83
  "thread-bindings.json",
86
84
  "startup-verification.json",
@@ -106,5 +104,4 @@ async function assertMatrixSupportedStateFile(filePath) {
106
104
  }
107
105
  throw new Error(describeRetiredMatrixState(filePath));
108
106
  }
109
- //#endregion
110
107
  export { describeRetiredMatrixState as a, updateMatrixKeyedState as c, writeMatrixStateChunks as d, assertMatrixSupportedStateRoot as i, chunkMatrixStateJson as l, RETIRED_MATRIX_STATE_REMEDIATION as n, resolveMatrixSqliteStateEnv as o, assertMatrixSupportedStateFile as r, resolveMatrixSqliteStateKey as s, RETIRED_MATRIX_STATE_FILENAMES as t, readMatrixStateChunks as u };
@@ -1,9 +1,9 @@
1
- import { w as setBoundedMap } from "./send-CFx1h7xE.mjs";
2
- import { s as EventType } from "./messages-O6G0-_xr.mjs";
3
- import { r as withResolvedRoomAction } from "./client-C7pZ6gAl.mjs";
4
- import { n as isMatrixNotFoundError } from "./errors-Bw4EHwKX.mjs";
1
+ import { w as setBoundedMap } from "./send-BMe_VcxP.mjs";
2
+ import { s as EventType } from "./messages-Dt51OgyD.mjs";
3
+ import { r as withResolvedRoomAction } from "./client-DL_aELCJ.mjs";
4
+ import { n as isMatrixNotFoundError } from "./errors-CL3YJV8U.mjs";
5
5
  import { filterStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
6
- //#region extensions/matrix/src/matrix/actions/room.ts
6
+ // extensions/matrix/src/matrix/actions/room.ts
7
7
  async function getMatrixMemberInfo(userId, opts) {
8
8
  return await withResolvedRoomAction(opts.roomId, opts, async (client, roomId) => {
9
9
  if (!(await client.getJoinedRoomMembers(roomId)).includes(userId)) throw new Error(`User ${userId} is not a member of room ${roomId}`);
@@ -42,8 +42,7 @@ async function getMatrixRoomInfo(roomId, opts = {}) {
42
42
  };
43
43
  });
44
44
  }
45
- //#endregion
46
- //#region extensions/matrix/src/matrix/monitor/room-info.ts
45
+ // extensions/matrix/src/matrix/monitor/room-info.ts
47
46
  const MAX_ROOM_INFO = 1024;
48
47
  const MAX_MEMBER_DISPLAY_NAMES = 4096;
49
48
  function createMatrixRoomInfoResolver(client) {
@@ -113,5 +112,4 @@ function createMatrixRoomInfoResolver(client) {
113
112
  invalidateMemberDisplayName
114
113
  };
115
114
  }
116
- //#endregion
117
115
  export { getMatrixMemberInfo as n, getMatrixRoomInfo as r, createMatrixRoomInfoResolver as t };
@@ -1,5 +1,5 @@
1
1
  import { createPluginRuntimeStore } from "openclaw/plugin-sdk/runtime-store";
2
- //#region extensions/matrix/src/runtime.ts
2
+ // extensions/matrix/src/runtime.ts
3
3
  const { setRuntime: setMatrixRuntime, getRuntime: getMatrixRuntime, tryGetRuntime: getOptionalMatrixRuntime } = createPluginRuntimeStore({
4
4
  pluginId: "matrix",
5
5
  errorMessage: "Matrix runtime not initialized"
@@ -25,5 +25,4 @@ function getMatrixRuntimeLifecycle() {
25
25
  const runtime = getOptionalMatrixRuntime();
26
26
  return runtime ? runtimeLifecycles.tryGetRuntime()?.get(runtime) : void 0;
27
27
  }
28
- //#endregion
29
28
  export { setMatrixRuntimeLifecycle as a, setMatrixRuntime as i, getMatrixRuntimeLifecycle as n, getOptionalMatrixRuntime as r, getMatrixRuntime as t };
@@ -1,6 +1,5 @@
1
1
  import "node:module";
2
- import { isRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
3
- //#region \0rolldown/runtime.js
2
+ // \0rolldown/runtime.js
4
3
  var __defProp = Object.defineProperty;
5
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -25,21 +24,19 @@ var __copyProps = (to, from, except, desc) => {
25
24
  return to;
26
25
  };
27
26
  var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
28
- //#endregion
29
- //#region packages/normalization-core/src/record-coerce.ts
27
+ // packages/normalization-core/src/record-coerce.ts
30
28
  /** Type guard for non-array object records at browser-safe boundaries. */
31
- function isRecord$1(value) {
29
+ function isRecord(value) {
32
30
  return value !== null && typeof value === "object" && !Array.isArray(value);
33
31
  }
34
32
  /** Returns a non-array record or null. */
35
- function asNullableRecord$1(value) {
36
- return isRecord$1(value) ? value : null;
33
+ function asNullableRecord(value) {
34
+ return isRecord(value) ? value : null;
37
35
  }
38
- //#endregion
39
- //#region src/config/channel-config-normalization.ts
36
+ // src/config/channel-config-normalization.ts
40
37
  /** Applies one channel-specific doctor migration to every object-shaped account. */
41
38
  function normalizeChannelAccounts(params) {
42
- const rawAccounts = asNullableRecord$1(params.entry.accounts);
39
+ const rawAccounts = asNullableRecord(params.entry.accounts);
43
40
  if (!rawAccounts) return {
44
41
  entry: params.entry,
45
42
  changed: false
@@ -47,7 +44,7 @@ function normalizeChannelAccounts(params) {
47
44
  let changed = false;
48
45
  const accounts = { ...rawAccounts };
49
46
  for (const [accountId, value] of Object.entries(rawAccounts)) {
50
- const account = asNullableRecord$1(value);
47
+ const account = asNullableRecord(value);
51
48
  if (!account) continue;
52
49
  const normalized = params.normalizeAccount({
53
50
  account,
@@ -75,7 +72,7 @@ function normalizeChannelAccounts(params) {
75
72
  function normalizeChannelConfigEntries(params) {
76
73
  const changes = params.changes ?? [];
77
74
  const channels = params.cfg.channels;
78
- const entry = asNullableRecord$1(channels?.[params.channelId]);
75
+ const entry = asNullableRecord(channels?.[params.channelId]);
79
76
  if (!entry) return {
80
77
  config: params.cfg,
81
78
  changes
@@ -112,15 +109,14 @@ function normalizeChannelConfigEntries(params) {
112
109
  changes
113
110
  };
114
111
  }
115
- //#endregion
116
- //#region src/plugin-sdk/legacy-webhook-listener-migration.ts
112
+ // src/plugin-sdk/legacy-webhook-listener-migration.ts
117
113
  /** Preserve explicitly configured webhook listeners while moving ingress onto Gateway routes. */
118
114
  function createLegacyWebhookListenerDoctorContract(params) {
119
115
  const portKey = params.portKey ?? "webhookPort";
120
116
  const hostKey = params.hostKey === void 0 ? "webhookHost" : params.hostKey;
121
- const source = (entry) => params.webhookKey ? asNullableRecord$1(entry[params.webhookKey]) : entry;
117
+ const source = (entry) => params.webhookKey ? asNullableRecord(entry[params.webhookKey]) : entry;
122
118
  const hasLegacy = (value) => {
123
- const entry = asNullableRecord$1(value);
119
+ const entry = asNullableRecord(value);
124
120
  const listener = entry && source(entry);
125
121
  return Boolean(listener && (Object.hasOwn(listener, portKey) || hostKey && Object.hasOwn(listener, hostKey)));
126
122
  };
@@ -136,14 +132,14 @@ function createLegacyWebhookListenerDoctorContract(params) {
136
132
  path: ["channels", params.channelKey],
137
133
  message: `${prefix} webhook listeners moved to Gateway routes. Run "openclaw doctor --fix" to preserve explicitly configured listener settings as legacyWebhook.`,
138
134
  match: (value) => {
139
- const accounts = asNullableRecord$1(asNullableRecord$1(value)?.accounts);
135
+ const accounts = asNullableRecord(asNullableRecord(value)?.accounts);
140
136
  return hasLegacy(value) || Object.values(accounts ?? {}).some(hasLegacy);
141
137
  }
142
138
  }],
143
139
  normalizeCompatibilityConfig: ({ cfg }) => {
144
- const root = asNullableRecord$1(asNullableRecord$1(cfg.channels)?.[params.channelKey]);
140
+ const root = asNullableRecord(asNullableRecord(cfg.channels)?.[params.channelKey]);
145
141
  const inherited = root && source(root);
146
- const canonicalRoot = asNullableRecord$1(root?.legacyWebhook);
142
+ const canonicalRoot = asNullableRecord(root?.legacyWebhook);
147
143
  return normalizeChannelConfigEntries({
148
144
  cfg,
149
145
  channelId: params.channelKey,
@@ -183,45 +179,8 @@ function createLegacyWebhookListenerDoctorContract(params) {
183
179
  }
184
180
  };
185
181
  }
186
- //#endregion
187
- //#region \0openclaw:bundled-sdk:openclaw/plugin-sdk/runtime-doctor-migrations
182
+ // \0openclaw:bundled-sdk:openclaw/plugin-sdk/runtime-doctor-migrations
188
183
  var runtime_doctor_migrations_exports = /* @__PURE__ */ __exportAll({ createLegacyWebhookListenerDoctorContract: () => createLegacyWebhookListenerDoctorContract });
189
184
  import * as import_openclaw_plugin_sdk_runtime_doctor_migrations from "openclaw/plugin-sdk/runtime-doctor-migrations";
190
185
  __reExport(runtime_doctor_migrations_exports, import_openclaw_plugin_sdk_runtime_doctor_migrations);
191
- //#endregion
192
- //#region extensions/matrix/src/doctor-contract.ts
193
- function parseMatrixStreamingMode(value) {
194
- if (typeof value !== "string") return null;
195
- const normalized = value.trim().toLowerCase();
196
- return normalized === "partial" || normalized === "quiet" || normalized === "progress" || normalized === "off" ? normalized : null;
197
- }
198
- const streamingAliasMigration = (0, runtime_doctor_migrations_exports.defineChannelAliasMigration)({
199
- channelId: "matrix",
200
- streaming: {
201
- defaultMode: "off",
202
- resolveMode: (entry) => {
203
- const streaming = isRecord(entry.streaming) ? entry.streaming : null;
204
- const parsed = parseMatrixStreamingMode(streaming ? streaming.mode : entry.streaming);
205
- if (parsed) return parsed;
206
- return entry.streaming === true ? "partial" : "off";
207
- }
208
- },
209
- accountStreamingReplacesRoot: true
210
- });
211
- const legacyConfigRules = streamingAliasMigration.legacyConfigRules;
212
- function normalizeCompatibilityConfig({ cfg }) {
213
- const changes = [];
214
- const withoutJunkStreamMode = (0, runtime_doctor_migrations_exports.stripRetiredChannelKeys)({
215
- cfg,
216
- channelId: "matrix",
217
- keys: /* @__PURE__ */ new Set(["streamMode"]),
218
- scope: "root-and-accounts",
219
- onRemove: ({ key, pathPrefix }) => changes.push(`Removed ${pathPrefix}.${key} (never read by the Matrix runtime).`)
220
- }).config;
221
- return streamingAliasMigration.normalizeChannelConfig({
222
- cfg: withoutJunkStreamMode,
223
- changes
224
- });
225
- }
226
- //#endregion
227
- export { __exportAll as i, normalizeCompatibilityConfig as n, runtime_doctor_migrations_exports as r, legacyConfigRules as t };
186
+ export { __exportAll as n, runtime_doctor_migrations_exports as t };
@@ -1,2 +1,2 @@
1
- export { i as setMatrixRuntime, a as setMatrixRuntimeLifecycle } from "./runtime-1kn1P6io.mjs";
1
+ export { i as setMatrixRuntime, a as setMatrixRuntimeLifecycle } from "./runtime-Ck8TjD7L.mjs";
2
2
  import "../runtime-setter-api.js";
@@ -1,18 +1,18 @@
1
- import { i as __exportAll } from "./doctor-contract-CsTNmbMa.mjs";
2
- import { t as getMatrixRuntime } from "./runtime-1kn1P6io.mjs";
3
- import { r as assertMatrixSupportedStateFile } from "./retired-state-DOCruzWd.mjs";
4
- import { a as readMatrixRecoveryKeyStateForPathAsync, l as writeMatrixRecoveryKeyStateForPathAsync } from "./crypto-state-store-D4wrCvFs.mjs";
5
- import { n as withMatrixSendCurrentness, r as withoutMatrixSendCurrentness, t as captureMatrixSendCurrentness } from "./send-currentness-C2rMVVIQ.mjs";
6
- import { i as parseMxc, r as matrixEventToRaw } from "./event-helpers-CxNgMQqH.mjs";
7
- import { i as createMatrixStartupAbortError, o as throwIfMatrixStartupAborted, r as awaitMatrixStartupWithAbort } from "./client-C4Gibhzl.mjs";
8
- import { n as isMatrixNotFoundError, t as formatMatrixErrorReason } from "./errors-Bw4EHwKX.mjs";
9
- import { n as createMatrixGuardedFetch, t as MatrixAuthedHttpClient } from "./http-client-ByR4STVQ.mjs";
10
- import { n as resolveMatrixRoomKeyBackupReadinessError } from "./backup-health-Dm_YMVFT.mjs";
11
- import { r as noop, t as LogService } from "./logger-CXQnpXCt.mjs";
12
- import { t as createMatrixJsSdkClientLogger } from "./logging-BKV8TYQq.mjs";
13
- import { t as acquireMatrixCryptoStoreOwnership } from "./crypto-store-ownership-Z_Y5WRKr.mjs";
14
- import { a as isMatrixAccessTokenInvalidatedError, c as resolveMatrixLocalTimeoutMs, f as isMatrixReadySyncState, i as createMatrixExplicitBootstrapOptions, l as unresolvedMatrixDeviceVerificationStatus, n as MATRIX_INITIAL_CRYPTO_BOOTSTRAP_OPTIONS, o as resolveMatrixDiagnostic, p as isMatrixTerminalSyncState, r as MATRIX_STATUS_DIAGNOSTIC_TIMEOUT_MS, s as resolveMatrixDiagnosticResult, t as MATRIX_AUTOMATIC_REPAIR_BOOTSTRAP_OPTIONS, u as unresolvedMatrixRoomKeyBackupStatus } from "./client-support-D-xHScuo.mjs";
15
- import { t as MATRIX_IDB_PERSIST_INTERVAL_MS } from "./idb-persistence-lock-Bh3ZLIsE.mjs";
1
+ import { n as __exportAll } from "./runtime-doctor-migrations-CSvRANPN.mjs";
2
+ import { t as getMatrixRuntime } from "./runtime-Ck8TjD7L.mjs";
3
+ import { r as assertMatrixSupportedStateFile } from "./retired-state-vIr2IB90.mjs";
4
+ import { a as readMatrixRecoveryKeyStateForPathAsync, l as writeMatrixRecoveryKeyStateForPathAsync } from "./crypto-state-store-CM57gchf.mjs";
5
+ import { n as withMatrixSendCurrentness, r as withoutMatrixSendCurrentness, t as captureMatrixSendCurrentness } from "./send-currentness-CAUVR-f3.mjs";
6
+ import { i as parseMxc, r as matrixEventToRaw } from "./event-helpers-DDUjVVf7.mjs";
7
+ import { i as createMatrixStartupAbortError, o as throwIfMatrixStartupAborted, r as awaitMatrixStartupWithAbort } from "./client-BIsYqIzM.mjs";
8
+ import { n as isMatrixNotFoundError, t as formatMatrixErrorReason } from "./errors-CL3YJV8U.mjs";
9
+ import { n as createMatrixGuardedFetch, t as MatrixAuthedHttpClient } from "./http-client-CxTmU1kT.mjs";
10
+ import { n as resolveMatrixRoomKeyBackupReadinessError } from "./backup-health-BxH69np2.mjs";
11
+ import { r as noop, t as LogService } from "./logger-BX5kXvh1.mjs";
12
+ import { t as createMatrixJsSdkClientLogger } from "./logging-BWPjyW9s.mjs";
13
+ import { t as acquireMatrixCryptoStoreOwnership } from "./crypto-store-ownership-Bratn-Np.mjs";
14
+ import { a as isMatrixAccessTokenInvalidatedError, c as resolveMatrixLocalTimeoutMs, f as isMatrixReadySyncState, i as createMatrixExplicitBootstrapOptions, l as unresolvedMatrixDeviceVerificationStatus, n as MATRIX_INITIAL_CRYPTO_BOOTSTRAP_OPTIONS, o as resolveMatrixDiagnostic, p as isMatrixTerminalSyncState, r as MATRIX_STATUS_DIAGNOSTIC_TIMEOUT_MS, s as resolveMatrixDiagnosticResult, t as MATRIX_AUTOMATIC_REPAIR_BOOTSTRAP_OPTIONS, u as unresolvedMatrixRoomKeyBackupStatus } from "./client-support-CFofPPPm.mjs";
15
+ import { t as MATRIX_IDB_PERSIST_INTERVAL_MS } from "./idb-persistence-lock-CH2K6d_3.mjs";
16
16
  import { createRequire } from "node:module";
17
17
  import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
18
18
  import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
@@ -33,7 +33,7 @@ import { createDeferred as createDeferred$1 } from "openclaw/plugin-sdk/concurre
33
33
  import { decodeRecoveryKey } from "matrix-js-sdk/lib/crypto-api/recovery-key.js";
34
34
  import { MatrixScheduler } from "matrix-js-sdk/lib/scheduler.js";
35
35
  import { EventStatus } from "matrix-js-sdk/lib/models/event-status.js";
36
- //#region extensions/matrix/src/matrix/sdk/client-device-info.ts
36
+ // extensions/matrix/src/matrix/sdk/client-device-info.ts
37
37
  async function resolveMatrixCrossSigningPublicationStatus(params) {
38
38
  let response;
39
39
  if (params.userId) try {
@@ -62,8 +62,7 @@ async function listMatrixOwnDevices(client) {
62
62
  current: currentDeviceId !== null && device.device_id === currentDeviceId
63
63
  }));
64
64
  }
65
- //#endregion
66
- //#region extensions/matrix/src/matrix/sdk/client-event-bridge.ts
65
+ // extensions/matrix/src/matrix/sdk/client-event-bridge.ts
67
66
  function registerMatrixClientBridge(params) {
68
67
  let initialSyncComplete = false;
69
68
  const joinTransitions = /* @__PURE__ */ new WeakSet();
@@ -133,8 +132,7 @@ function refreshMatrixDmRoomIds(direct, dmRoomIds) {
133
132
  }
134
133
  return true;
135
134
  }
136
- //#endregion
137
- //#region extensions/matrix/src/matrix/sdk/client-crypto-bootstrap.ts
135
+ // extensions/matrix/src/matrix/sdk/client-crypto-bootstrap.ts
138
136
  async function bootstrapMatrixClientCrypto(params) {
139
137
  const { crypto, bootstrapper, abortSignal } = params;
140
138
  if (!crypto || !bootstrapper) return false;
@@ -152,8 +150,7 @@ async function bootstrapMatrixClientCrypto(params) {
152
150
  }
153
151
  return true;
154
152
  }
155
- //#endregion
156
- //#region extensions/matrix/src/matrix/sdk/client-sync-quiesce.ts
153
+ // extensions/matrix/src/matrix/sdk/client-sync-quiesce.ts
157
154
  const MATRIX_SYNC_QUIESCE_TIMEOUT_MS = 5e3;
158
155
  const MATRIX_JS_SDK_SYNC_VERSION = "42.4.0";
159
156
  const matrixJsSdkPackage = createRequire(import.meta.url)("matrix-js-sdk/package.json");
@@ -221,8 +218,7 @@ async function quiesceMatrixClientSync(params) {
221
218
  }
222
219
  });
223
220
  }
224
- //#endregion
225
- //#region extensions/matrix/src/matrix/sdk/client-sync-ready.ts
221
+ // extensions/matrix/src/matrix/sdk/client-sync-ready.ts
226
222
  async function waitForMatrixInitialSyncReady(params) {
227
223
  const timeoutMs = params.timeoutMs ?? 3e4;
228
224
  if (isMatrixReadySyncState(params.state)) return;
@@ -262,8 +258,7 @@ async function waitForMatrixInitialSyncReady(params) {
262
258
  params.emitter.off("sync.unexpected_error", settle);
263
259
  }
264
260
  }
265
- //#endregion
266
- //#region extensions/matrix/src/matrix/sdk/crypto-store-lifecycle.ts
261
+ // extensions/matrix/src/matrix/sdk/crypto-store-lifecycle.ts
267
262
  async function closeMatrixCryptoStores(closeRecoveryKeys, releaseOwnership, teardownComplete) {
268
263
  const recovery = await Promise.allSettled([closeRecoveryKeys()]);
269
264
  const release = teardownComplete ? await Promise.allSettled([releaseOwnership()]) : [];
@@ -359,8 +354,7 @@ function createMatrixSdkStopGate() {
359
354
  }
360
355
  };
361
356
  }
362
- //#endregion
363
- //#region extensions/matrix/src/matrix/sdk/live-room-readiness.ts
357
+ // extensions/matrix/src/matrix/sdk/live-room-readiness.ts
364
358
  async function withMatrixLiveEncryptedRoom(owner, run, params) {
365
359
  const signal = AbortSignal.any([params.generationSignal, ...params.abortSignal ? [params.abortSignal] : []]);
366
360
  const active = (async () => {
@@ -441,8 +435,7 @@ async function probeMatrixLiveEncryptedRoom(params) {
441
435
  params.signal.removeEventListener("abort", onChange);
442
436
  }
443
437
  }
444
- //#endregion
445
- //#region extensions/matrix/src/matrix/sdk/message-wire-dispatch.ts
438
+ // extensions/matrix/src/matrix/sdk/message-wire-dispatch.ts
446
439
  function resolveMessageWireDispatch(resource, init) {
447
440
  if ((init?.method ?? (resource instanceof Request ? resource.method : "GET")).toUpperCase() !== "PUT") return null;
448
441
  const rawUrl = typeof resource === "string" ? resource : resource instanceof URL ? resource.href : resource.url;
@@ -497,8 +490,7 @@ var MatrixMessageWireDispatchGuards = class {
497
490
  }
498
491
  }
499
492
  };
500
- //#endregion
501
- //#region extensions/matrix/src/matrix/sdk/recovery-key-store.ts
493
+ // extensions/matrix/src/matrix/sdk/recovery-key-store.ts
502
494
  function isRepairableSecretStorageAccessError(err) {
503
495
  const message = formatMatrixErrorReason(err);
504
496
  if (!message) return false;
@@ -775,8 +767,7 @@ var MatrixRecoveryKeyStore = class {
775
767
  }
776
768
  }
777
769
  };
778
- //#endregion
779
- //#region extensions/matrix/src/matrix/sdk/send-scheduler.ts
770
+ // extensions/matrix/src/matrix/sdk/send-scheduler.ts
780
771
  /** Keep SDK FIFO/backoff while settling a caller's pre-request rejection only for its event. */
781
772
  var MatrixSendScheduler = class extends MatrixScheduler {
782
773
  constructor(wasCurrentnessRejected) {
@@ -814,11 +805,10 @@ var MatrixSendScheduler = class extends MatrixScheduler {
814
805
  return this.queue.removeEventFromQueue(event);
815
806
  }
816
807
  };
817
- //#endregion
818
- //#region extensions/matrix/src/matrix/sdk/client-base.ts
808
+ // extensions/matrix/src/matrix/sdk/client-base.ts
819
809
  const MATRIX_ENCRYPTED_STARTUP_TIMEOUT_MS = 6e4;
820
810
  let loadedMatrixCryptoRuntime = null;
821
- const loadMatrixCryptoRuntime = createLazyRuntimeModule(() => import("./crypto-runtime-D8yY7kjD.mjs").then((runtime) => {
811
+ const loadMatrixCryptoRuntime = createLazyRuntimeModule(() => import("./crypto-runtime-s3ogwLRO.mjs").then((runtime) => {
822
812
  loadedMatrixCryptoRuntime = runtime;
823
813
  return runtime;
824
814
  }));
@@ -1048,7 +1038,7 @@ var MatrixClientBase = class {
1048
1038
  checkActive();
1049
1039
  throwIfMatrixStartupAborted(signal);
1050
1040
  if (this.encryptionEnabled && this.cryptoInitialized) {
1051
- const { reconcileJoinedRoomEncryption } = await import("./joined-room-encryption-BAD70N5n.mjs");
1041
+ const { reconcileJoinedRoomEncryption } = await import("./joined-room-encryption-Dl7Sb9FF.mjs");
1052
1042
  checkActive();
1053
1043
  await this.withClientCryptoWork(() => reconcileJoinedRoomEncryption(this.client, signal, checkActive), signal);
1054
1044
  checkActive();
@@ -1260,8 +1250,7 @@ var MatrixClientBase = class {
1260
1250
  }
1261
1251
  }
1262
1252
  };
1263
- //#endregion
1264
- //#region extensions/matrix/src/matrix/sdk/client-core.ts
1253
+ // extensions/matrix/src/matrix/sdk/client-core.ts
1265
1254
  function isUnsupportedAuthenticatedMediaEndpointError(err) {
1266
1255
  const statusCode = err?.statusCode;
1267
1256
  if (statusCode === 404 || statusCode === 405 || statusCode === 501) return true;
@@ -1501,8 +1490,7 @@ var MatrixClientCore = class extends MatrixClientBase {
1501
1490
  });
1502
1491
  }
1503
1492
  };
1504
- //#endregion
1505
- //#region extensions/matrix/src/matrix/sdk/verification-status.ts
1493
+ // extensions/matrix/src/matrix/sdk/verification-status.ts
1506
1494
  function isMatrixDeviceOwnerVerified(status) {
1507
1495
  return status?.crossSigningVerified === true;
1508
1496
  }
@@ -1519,8 +1507,7 @@ async function trustMatrixOwnIdentity(crypto) {
1519
1507
  ownIdentity.free?.();
1520
1508
  }
1521
1509
  }
1522
- //#endregion
1523
- //#region extensions/matrix/src/matrix/sdk/client-verification.ts
1510
+ // extensions/matrix/src/matrix/sdk/client-verification.ts
1524
1511
  var MatrixClientVerification = class extends MatrixClientCore {
1525
1512
  async refreshOwnDeviceKeys() {
1526
1513
  await this.client.getCrypto()?.userHasCrossSigningKeys(await this.getUserId(), true);
@@ -1670,8 +1657,7 @@ var MatrixClientVerification = class extends MatrixClientCore {
1670
1657
  LogService.info("MatrixClientLite", `Room key backup enabled (version ${createdVersion})`);
1671
1658
  }
1672
1659
  };
1673
- //#endregion
1674
- //#region extensions/matrix/src/matrix/sdk.ts
1660
+ // extensions/matrix/src/matrix/sdk.ts
1675
1661
  var sdk_exports = /* @__PURE__ */ __exportAll({ MatrixClient: () => MatrixClient });
1676
1662
  var MatrixClient = class extends MatrixClientVerification {
1677
1663
  async verifyWithRecoveryKey(rawRecoveryKey) {
@@ -1970,5 +1956,4 @@ var MatrixClient = class extends MatrixClientVerification {
1970
1956
  return refreshMatrixDmRoomIds(await this.getAccountData("m.direct"), this.dmRoomIds);
1971
1957
  }
1972
1958
  };
1973
- //#endregion
1974
1959
  export { MatrixClient, isRepairableSecretStorageAccessError as a, trustMatrixOwnIdentity as i, isMatrixDeviceOwnerVerified as n, isMatrixDeviceVerifiedInCurrentClient as r, sdk_exports as t };
@@ -1,7 +1,7 @@
1
- import { t as getMatrixScopedEnvVarNames } from "./env-vars-aEBngJPa.mjs";
1
+ import { t as getMatrixScopedEnvVarNames } from "./env-vars-Bh1iOXJ1.mjs";
2
2
  import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/account-id";
3
3
  import { collectSecretInputAssignment, createChannelSecretContract, hasConfiguredSecretInputValue, hasOwnProperty, normalizeSecretStringValue } from "openclaw/plugin-sdk/channel-secret-basic-runtime";
4
- //#region extensions/matrix/src/secret-contract.ts
4
+ // extensions/matrix/src/secret-contract.ts
5
5
  function accountSecretOwner(accountId) {
6
6
  return {
7
7
  ownerKind: "account",
@@ -86,5 +86,4 @@ const channelSecrets = createChannelSecretContract({
86
86
  }
87
87
  });
88
88
  const { secretTargetRegistryEntries, collectRuntimeConfigAssignments } = channelSecrets;
89
- //#endregion
90
89
  export { collectRuntimeConfigAssignments as n, secretTargetRegistryEntries as r, channelSecrets as t };
@@ -1,2 +1,2 @@
1
- export { t as channelSecrets, n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-DxyzKSzf.mjs";
1
+ export { t as channelSecrets, n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-AKnr45nw.mjs";
2
2
  import "../secret-contract-api.js";
@@ -1,10 +1,10 @@
1
- import { i as __exportAll } from "./doctor-contract-CsTNmbMa.mjs";
2
- import { t as getMatrixRuntime } from "./runtime-1kn1P6io.mjs";
3
- import { a as resolveMatrixAccountConfig } from "./account-config-CRsKoMqJ.mjs";
4
- import { a as normalizeMatrixResolvableTarget, n as isMatrixQualifiedUserId } from "./target-ids-HhcaKX1n.mjs";
5
- import { n as withMatrixSendCurrentness, o as buildMatrixReactionContent, t as captureMatrixSendCurrentness } from "./send-currentness-C2rMVVIQ.mjs";
6
- import { _ as MsgType, d as buildMatrixMessageRelation, f as resolveMatrixReplyToEventId, g as MSC4357_LIVE_KEY, l as isStrictDirectRoom, m as EventType, n as inspectMatrixDirectRooms, p as resolveMatrixThreadRootId, r as persistMatrixDirectRoomMapping, v as RelationType } from "./direct-management-B3wYhx_M.mjs";
7
- import { n as getMatrixEventProjection } from "./event-helpers-CxNgMQqH.mjs";
1
+ import { n as __exportAll } from "./runtime-doctor-migrations-CSvRANPN.mjs";
2
+ import { t as getMatrixRuntime } from "./runtime-Ck8TjD7L.mjs";
3
+ import { a as resolveMatrixAccountConfig } from "./account-config-CVM2a28p.mjs";
4
+ import { a as normalizeMatrixResolvableTarget, n as isMatrixQualifiedUserId } from "./target-ids-DltG_ZHJ.mjs";
5
+ import { n as withMatrixSendCurrentness, o as buildMatrixReactionContent, t as captureMatrixSendCurrentness } from "./send-currentness-CAUVR-f3.mjs";
6
+ import { _ as MsgType, d as buildMatrixMessageRelation, f as resolveMatrixReplyToEventId, g as MSC4357_LIVE_KEY, l as isStrictDirectRoom, m as EventType, n as inspectMatrixDirectRooms, p as resolveMatrixThreadRootId, r as persistMatrixDirectRoomMapping, v as RelationType } from "./direct-management-BOYMqZJQ.mjs";
7
+ import { n as getMatrixEventProjection } from "./event-helpers-DDUjVVf7.mjs";
8
8
  import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
9
9
  import { createMessageReceiptFromOutboundResults } from "openclaw/plugin-sdk/channel-outbound";
10
10
  import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
@@ -22,8 +22,8 @@ import { resolveTextChunkLimit } from "openclaw/plugin-sdk/reply-chunking";
22
22
  import MarkdownIt from "markdown-it";
23
23
  import { isAutoLinkedFileRef } from "openclaw/plugin-sdk/text-autolink-runtime";
24
24
  import { parseBuffer } from "music-metadata";
25
- //#region extensions/matrix/src/matrix/send/client.ts
26
- const loadMatrixSendClientRuntime = createLazyRuntimeModule(() => import("./client-bootstrap-kOIDV4z_.mjs"));
25
+ // extensions/matrix/src/matrix/send/client.ts
26
+ const loadMatrixSendClientRuntime = createLazyRuntimeModule(() => import("./client-bootstrap-kdsygurH.mjs"));
27
27
  function resolveMediaMaxBytes(accountId, cfg) {
28
28
  if (!cfg) throw new Error("Matrix media limits requires a resolved runtime config. Load and resolve config at the command or gateway boundary, then pass cfg through the runtime path.");
29
29
  const mediaMaxMb = resolveMatrixAccountConfig({
@@ -56,8 +56,7 @@ async function withResolvedMatrixClient(opts, run, shutdownBehavior) {
56
56
  const { withResolvedRuntimeMatrixClient } = await loadMatrixSendClientRuntime();
57
57
  return await withResolvedRuntimeMatrixClient(opts, run, shutdownBehavior);
58
58
  }
59
- //#endregion
60
- //#region extensions/matrix/src/matrix/send/receipt.ts
59
+ // extensions/matrix/src/matrix/send/receipt.ts
61
60
  function createMatrixSendReceipt(params) {
62
61
  const firstEvent = params.events[0];
63
62
  const receipt = createMessageReceiptFromOutboundResults({
@@ -82,16 +81,14 @@ function createMatrixSendReceipt(params) {
82
81
  });
83
82
  return receipt;
84
83
  }
85
- //#endregion
86
- //#region extensions/matrix/src/matrix/monitor/bounded-cache.ts
84
+ // extensions/matrix/src/matrix/monitor/bounded-cache.ts
87
85
  function setBoundedMap(map, key, value, maxEntries) {
88
86
  map.set(key, value);
89
87
  if (map.size <= maxEntries) return;
90
88
  const oldest = map.keys().next();
91
89
  if (!oldest.done) map.delete(oldest.value);
92
90
  }
93
- //#endregion
94
- //#region extensions/matrix/src/matrix/send/targets.ts
91
+ // extensions/matrix/src/matrix/send/targets.ts
95
92
  function normalizeTarget(raw) {
96
93
  const trimmed = raw.trim();
97
94
  if (!trimmed) throw new Error("Matrix target is required (room:<id> or #alias)");
@@ -151,8 +148,7 @@ async function resolveMatrixRoomId(client, raw, opts = {}) {
151
148
  }
152
149
  return target;
153
150
  }
154
- //#endregion
155
- //#region extensions/matrix/src/matrix/delivery-plan.ts
151
+ // extensions/matrix/src/matrix/delivery-plan.ts
156
152
  const DELIVERY_PLAN_VERSION = 1;
157
153
  const DELIVERY_PLAN_NAMESPACE = "outbound-delivery-plans";
158
154
  const DELIVERY_PLAN_TTL_MS = 864e5;
@@ -383,8 +379,7 @@ async function cleanupMatrixDeliveryPlans(ctx) {
383
379
  const keys = entries.filter((entry) => entry.key.startsWith(prefix)).map((entry) => entry.key);
384
380
  for (const key of keys) await store.delete(key);
385
381
  }
386
- //#endregion
387
- //#region extensions/matrix/src/matrix/poll-types.ts
382
+ // extensions/matrix/src/matrix/poll-types.ts
388
383
  const M_POLL_START = "m.poll.start";
389
384
  const M_POLL_RESPONSE = "m.poll.response";
390
385
  const M_POLL_END = "m.poll.end";
@@ -561,8 +556,7 @@ function buildPollResponseContent(pollEventId, answerIds) {
561
556
  }
562
557
  };
563
558
  }
564
- //#endregion
565
- //#region extensions/matrix/src/matrix/format-profile.ts
559
+ // extensions/matrix/src/matrix/format-profile.ts
566
560
  function createMatrixPrivateMarkers(markdown, exhaustedMessage) {
567
561
  const used = new Set(Array.from(markdown, (character) => character.charCodeAt(0)));
568
562
  for (const match of markdown.matchAll(/&#(?:x([0-9a-f]+)|(\d+));/giu)) {
@@ -605,8 +599,7 @@ function projectMatrixMarkdown(markdown) {
605
599
  function renderMatrixMarkdownTables(markdown, mode) {
606
600
  return MATRIX_FORMAT_PROFILE.constructs.table === "native" && (mode === "off" || mode === "block") ? markdown : convertMarkdownTables(markdown, mode);
607
601
  }
608
- //#endregion
609
- //#region extensions/matrix/src/matrix/format-table-ranges.ts
602
+ // extensions/matrix/src/matrix/format-table-ranges.ts
610
603
  const tableParser = new MarkdownIt({
611
604
  html: false,
612
605
  linkify: false,
@@ -627,8 +620,7 @@ function matrixTableSourceRangesFromTokens(tokens, lineStarts, sourceLength) {
627
620
  }];
628
621
  });
629
622
  }
630
- //#endregion
631
- //#region extensions/matrix/src/matrix/format-spoiler-ranges.ts
623
+ // extensions/matrix/src/matrix/format-spoiler-ranges.ts
632
624
  const spoilerParser = new MarkdownIt({
633
625
  html: false,
634
626
  linkify: true,
@@ -807,8 +799,7 @@ function analyzeMatrixSpoilers(markdown) {
807
799
  metadataCollision: hasMatrixSpoilerMetadataCollision(source, delimiterOffsets)
808
800
  };
809
801
  }
810
- //#endregion
811
- //#region extensions/matrix/src/matrix/format.ts
802
+ // extensions/matrix/src/matrix/format.ts
812
803
  const MATRIX_STYLE_MARKERS = {
813
804
  underline: {
814
805
  open: "<u>",
@@ -1207,8 +1198,7 @@ async function renderMarkdownToMatrixHtmlWithMentions(params) {
1207
1198
  mentions: state.mentions
1208
1199
  };
1209
1200
  }
1210
- //#endregion
1211
- //#region extensions/matrix/src/matrix/send/chunking.ts
1201
+ // extensions/matrix/src/matrix/send/chunking.ts
1212
1202
  function normalizeMatrixEventLimit(limit) {
1213
1203
  if (!Number.isFinite(limit) || limit <= 0) return limit;
1214
1204
  return Math.max(1, Math.floor(limit));
@@ -1371,8 +1361,7 @@ function chunkMatrixText(text, opts) {
1371
1361
  chunks
1372
1362
  };
1373
1363
  }
1374
- //#endregion
1375
- //#region extensions/matrix/src/matrix/media-text.ts
1364
+ // extensions/matrix/src/matrix/media-text.ts
1376
1365
  const MATRIX_MEDIA_KINDS = {
1377
1366
  "m.audio": "audio",
1378
1367
  "m.file": "file",
@@ -1440,8 +1429,7 @@ function formatMatrixMessageText(params) {
1440
1429
  if (!body) return marker;
1441
1430
  return `${body}\n\n${marker}`;
1442
1431
  }
1443
- //#endregion
1444
- //#region extensions/matrix/src/matrix/send/edit-content.ts
1432
+ // extensions/matrix/src/matrix/send/edit-content.ts
1445
1433
  const MAX_EDIT_RELATION_PAGES = 100;
1446
1434
  const EDIT_RELATION_PAGE_SIZE = 100;
1447
1435
  const EDIT_DECRYPTION_ERROR = "Matrix edit history is not fully decrypted; restore encryption keys before editing.";
@@ -1479,8 +1467,7 @@ async function resolveMatrixEditContent(params) {
1479
1467
  }
1480
1468
  throw new Error("Matrix edit history could not be fully read; send a new message instead.");
1481
1469
  }
1482
- //#endregion
1483
- //#region extensions/matrix/src/matrix/send/formatting.ts
1470
+ // extensions/matrix/src/matrix/send/formatting.ts
1484
1471
  function buildTextContent(body, relation, opts = {}) {
1485
1472
  return {
1486
1473
  msgtype: opts.msgtype ?? MsgType.Text,
@@ -1543,8 +1530,7 @@ function resolveMatrixMsgType(contentType) {
1543
1530
  default: return MsgType.File;
1544
1531
  }
1545
1532
  }
1546
- //#endregion
1547
- //#region extensions/matrix/src/matrix/send/media.ts
1533
+ // extensions/matrix/src/matrix/send/media.ts
1548
1534
  function buildMediaContent(params) {
1549
1535
  const base = {
1550
1536
  msgtype: params.msgtype,
@@ -1660,8 +1646,7 @@ async function uploadMediaWithEncryption(client, roomId, buffer, params) {
1660
1646
  }
1661
1647
  return { url: await client.uploadContent(buffer, params.contentType, params.filename) };
1662
1648
  }
1663
- //#endregion
1664
- //#region extensions/matrix/src/matrix/send.ts
1649
+ // extensions/matrix/src/matrix/send.ts
1665
1650
  var send_exports = /* @__PURE__ */ __exportAll({
1666
1651
  chunkMatrixText: () => chunkMatrixText,
1667
1652
  editMessageMatrix: () => editMessageMatrix,
@@ -2020,5 +2005,4 @@ async function reactMatrixMessage(roomId, messageId, emoji, opts = {}) {
2020
2005
  await resolved.sendEvent(resolvedRoom, EventType.Reaction, reaction);
2021
2006
  });
2022
2007
  }
2023
- //#endregion
2024
2008
  export { resolveMatrixRoomId as C, reconcileMatrixUnknownSend as S, isPollEventType as _, sendSingleTextMessageMatrix as a, resolvePollReferenceEventId as b, formatMatrixMessageText as c, resolveMatrixReplacementContent as d, prepareMatrixSingleText as f, formatPollResultsAsText as g, formatPollAsText as h, sendPollMatrix as i, isLikelyBareFilename as l, buildPollResultsSummary as m, reactMatrixMessage as n, sendTypingMatrix as o, buildPollResponseContent as p, sendMessageMatrix as r, send_exports as s, editMessageMatrix as t, resolveMatrixMessageAttachment as u, isPollStartType as v, setBoundedMap as w, cleanupMatrixDeliveryPlans as x, parsePollStart as y };