@openclaw/matrix 2026.10.10 → 2026.10.33

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 (141) hide show
  1. package/dist/.setup/{account-config-CVM2a28p.mjs → account-config-CRsKoMqJ.mjs} +2 -1
  2. package/dist/.setup/{account-selection-Co94mKNj.mjs → account-selection-CWsL5zIU.mjs} +8 -5
  3. package/dist/.setup/{approval-handler.runtime-DtNvJpfB.mjs → approval-handler.runtime-Co2elSYS.mjs} +9 -8
  4. package/dist/.setup/{approval-reactions-DMDBJos0.mjs → approval-reactions-D2pEUrFS.mjs} +3 -2
  5. package/dist/.setup/{backup-health-BxH69np2.mjs → backup-health-Dm_YMVFT.mjs} +2 -1
  6. package/dist/.setup/{channel-CNjJyBS_.mjs → channel-BBvOdxTc.mjs} +44 -29
  7. package/dist/.setup/{channel.runtime-DaGbm27q.mjs → channel.runtime-DyX4mM8d.mjs} +10 -8
  8. package/dist/.setup/{channel.setup-IjRB0ymg.mjs → channel.setup-p6oll48W.mjs} +15 -7
  9. package/dist/.setup/{cli-CuEJNM3c.mjs → cli-C2XKMk1U.mjs} +39 -28
  10. package/dist/.setup/{cli-metadata-rWmD_rzx.mjs → cli-metadata-C60BW1oa.mjs} +5 -3
  11. package/dist/.setup/{client-7eyTX0cu.mjs → client-BEl7PU1_.mjs} +25 -19
  12. package/dist/.setup/{client-CV0MkCZG.mjs → client-Cxv-iMwp.mjs} +5 -4
  13. package/dist/.setup/{client-bootstrap-BjcmTmyR.mjs → client-bootstrap-D1vLveT2.mjs} +3 -2
  14. package/dist/.setup/{client-support-CFofPPPm.mjs → client-support-D-xHScuo.mjs} +5 -3
  15. package/dist/.setup/{config-paths-DBpHxDyc.mjs → config-paths-CnREYb1Y.mjs} +2 -1
  16. package/dist/.setup/{create-client-C4Lnqs2C.mjs → create-client-CrY1E3hg.mjs} +9 -8
  17. package/dist/.setup/{credentials-read-WCQSEvI8.mjs → credentials-read-Dj7Hj87M.mjs} +6 -5
  18. package/dist/.setup/{credentials-state-jxq29yQw.mjs → credentials-state-B3cuUFwZ.mjs} +2 -1
  19. package/dist/.setup/{credentials-B0vpXvcB.mjs → credentials-udso1z0C.mjs} +6 -5
  20. package/dist/.setup/{crypto-node.runtime-E_hqXGxm.mjs → crypto-node.runtime-6Aj_ltHQ.mjs} +2 -1
  21. package/dist/.setup/{crypto-runtime-Crp1is7m.mjs → crypto-runtime-DqX7VD1W.mjs} +19 -12
  22. package/dist/.setup/{crypto-state-store-CM57gchf.mjs → crypto-state-store-DclM-fO5.mjs} +5 -3
  23. package/dist/.setup/{crypto-store-ownership-Bratn-Np.mjs → crypto-store-ownership-Dr-T40Rp.mjs} +4 -3
  24. package/dist/.setup/{crypto-unsafe-state-doctor-Brv4bIyx.mjs → crypto-unsafe-state-doctor-BG9qMu0B.mjs} +8 -7
  25. package/dist/.setup/{deps-O7rEnklr.mjs → deps-L_1bUAGL.mjs} +2 -1
  26. package/dist/.setup/{device-health-DnKAXW1v.mjs → device-health-D6_ECUVe.mjs} +3 -2
  27. package/dist/.setup/{direct-management-DDaWVbQI.mjs → direct-management-ZcjZgYEl.mjs} +11 -7
  28. package/dist/.setup/{directory-live-B-csizuK.mjs → directory-live-_yaRaktv.mjs} +6 -5
  29. package/dist/.setup/doctor-contract-BANpMUbP.mjs +38 -0
  30. package/dist/.setup/{draft-stream-dmhBHufd.mjs → draft-stream-vO_qjwJb.mjs} +4 -3
  31. package/dist/.setup/{encryption-guidance-Cn6-Tlx0.mjs → encryption-guidance-BLUoN4aV.mjs} +4 -3
  32. package/dist/.setup/{env-vars-Bh1iOXJ1.mjs → env-vars-aEBngJPa.mjs} +2 -1
  33. package/dist/.setup/{errors-CL3YJV8U.mjs → errors-Bw4EHwKX.mjs} +2 -1
  34. package/dist/.setup/{event-helpers-DDUjVVf7.mjs → event-helpers-CxNgMQqH.mjs} +2 -1
  35. package/dist/.setup/{exec-approvals-D7vv3AZS.mjs → exec-approvals-BFT-ee9F.mjs} +9 -6
  36. package/dist/.setup/{file-sync-store-q5KCV2Lp.mjs → file-sync-store-BxUPmUoJ.mjs} +6 -5
  37. package/dist/.setup/{http-client-CxTmU1kT.mjs → http-client-ByR4STVQ.mjs} +7 -4
  38. package/dist/.setup/{idb-persistence-BF0MZglD.mjs → idb-persistence-C2TsCHY2.mjs} +7 -6
  39. package/dist/.setup/{idb-persistence-lock-CH2K6d_3.mjs → idb-persistence-lock-Bh3ZLIsE.mjs} +2 -1
  40. package/dist/.setup/{inbound-dedupe-CZnOq0ja.mjs → inbound-dedupe-sW_gaR44.mjs} +3 -2
  41. package/dist/.setup/{joined-room-encryption-Dl7Sb9FF.mjs → joined-room-encryption-DBbLkdvv.mjs} +3 -2
  42. package/dist/.setup/{logger-BX5kXvh1.mjs → logger-CuAzdD8Q.mjs} +5 -4
  43. package/dist/.setup/{logging-BLcaOSRD.mjs → logging-CoaEyRtA.mjs} +22 -15
  44. package/dist/.setup/{messages-BiHM0DM3.mjs → messages-TuEa_BPZ.mjs} +14 -9
  45. package/dist/.setup/{monitor-CPwDgRFY.mjs → monitor-B86Ll4B8.mjs} +166 -77
  46. package/dist/.setup/{onboarding-DiVtpjNu.mjs → onboarding-DOLEjkg2.mjs} +11 -10
  47. package/dist/.setup/{outbound-DwP97VpQ.mjs → outbound-BWsyqwt1.mjs} +4 -3
  48. package/dist/.setup/{profile-update-DnNA9mEa.mjs → profile-update-DiXSVBki.mjs} +8 -6
  49. package/dist/.setup/{reaction-events-ClY9h_FC.mjs → reaction-events-CuUeYcBC.mjs} +9 -8
  50. package/dist/.setup/{resolve-targets-B8PAwHVS.mjs → resolve-targets-Dd70hGcM.mjs} +5 -4
  51. package/dist/.setup/{retired-state-vIr2IB90.mjs → retired-state-C4UnLIg4.mjs} +5 -38
  52. package/dist/.setup/{room-info-T_PR_liR.mjs → room-info-C13IUffQ.mjs} +8 -6
  53. package/dist/.setup/{runtime-Ck8TjD7L.mjs → runtime-1kn1P6io.mjs} +2 -1
  54. package/dist/.setup/{doctor-contract-DybEjJcd.mjs → runtime-doctor-migrations-hxP-CXX7.mjs} +22 -52
  55. package/dist/.setup/runtime-setter-api-DtxDAM-x.mjs +3 -0
  56. package/dist/.setup/{sdk-Cj3ggJHG.mjs → sdk-DNW03GqJ.mjs} +47 -32
  57. package/dist/.setup/{secret-contract-AKnr45nw.mjs → secret-contract-DxyzKSzf.mjs} +3 -2
  58. package/dist/.setup/secret-contract-api-CiuSYjUy.mjs +3 -0
  59. package/dist/.setup/{send-C1qeMQAy.mjs → send-BGgwE5pV.mjs} +40 -24
  60. package/dist/.setup/{send-currentness-CAUVR-f3.mjs → send-currentness-C2rMVVIQ.mjs} +4 -2
  61. package/dist/.setup/{setup-bootstrap-DDhwWvDs.mjs → setup-bootstrap-BCbltIf_.mjs} +5 -4
  62. package/dist/.setup/{setup-core-D2r4BivQ.mjs → setup-core-Di6NtQ_J.mjs} +20 -13
  63. package/dist/.setup/setup-plugin-api-ORC_4yEA.mjs +3 -0
  64. package/dist/.setup/sqlite-state-LByPx4Yp.mjs +37 -0
  65. package/dist/.setup/{startup-verification-B3LEbW33.mjs → startup-verification-8xvGpdtK.mjs} +6 -4
  66. package/dist/.setup/{state-layout-walk-BqCZTHpp.mjs → state-layout-walk-BQMgMykU.mjs} +3 -2
  67. package/dist/.setup/{storage-CxN4jqKI.mjs → storage-CN4dxdtV.mjs} +20 -10
  68. package/dist/.setup/{storage-paths-e_Vq6cvw.mjs → storage-paths-B51JM-pC.mjs} +2 -1
  69. package/dist/.setup/{subagent-hooks-CT-rdJmh.mjs → subagent-hooks-CSY4iwa_.mjs} +3 -2
  70. package/dist/.setup/{sync-cache-state-qYrd2EEh.mjs → sync-cache-state-L1kwjhjj.mjs} +9 -5
  71. package/dist/.setup/{target-ids-DltG_ZHJ.mjs → target-ids-HhcaKX1n.mjs} +2 -1
  72. package/dist/.setup/{thread-binding-api-OtSciHmZ.mjs → thread-binding-api-BvuaKpd0.mjs} +3 -2
  73. package/dist/.setup/{thread-bindings-D2ZR6mEZ.mjs → thread-bindings-pNgPVdof.mjs} +10 -7
  74. package/dist/.setup/{thread-bindings-shared-FMu_szTm.mjs → thread-bindings-shared-CPjUA0Ib.mjs} +2 -1
  75. package/dist/.setup/{tool-actions-CdKa0DC4.mjs → tool-actions-CFC7ZpIt.mjs} +23 -18
  76. package/dist/.setup/{url-validation-C77p4qT9.mjs → url-validation-CF6pG6eE.mjs} +2 -1
  77. package/dist/.setup/{verification-jP3tm-xD.mjs → verification-CuT5ZBDO.mjs} +5 -4
  78. package/dist/api.js +8 -8
  79. package/dist/auth-presence.js +3 -2
  80. package/dist/channel-plugin-api.js +2 -1
  81. package/dist/cli-metadata.js +2 -1
  82. package/dist/contract-api.js +2 -2
  83. package/dist/doctor-contract-api.js +55 -20
  84. package/dist/helper-api.js +3 -3
  85. package/dist/index.js +4 -3
  86. package/dist/plugin-entry.handlers.runtime.js +4 -3
  87. package/dist/runtime-api.js +8 -7
  88. package/dist/runtime-setter-api.js +2 -1
  89. package/dist/secret-contract-api.js +2 -1
  90. package/dist/session-binding-contract-api.js +2 -2
  91. package/dist/setup-entry.js +5 -4
  92. package/dist/setup-plugin-api.js +2 -1
  93. package/dist/subagent-hooks-api.js +3 -2
  94. package/dist/thread-binding-api.js +2 -1
  95. package/dist/thread-bindings-runtime.js +2 -1
  96. package/node_modules/@openclaw/fs-safe/CHANGELOG.md +26 -0
  97. package/node_modules/@openclaw/fs-safe/dist/copy-path-admission.js +2 -2
  98. package/node_modules/@openclaw/fs-safe/dist/native-config.js +14 -3
  99. package/node_modules/@openclaw/fs-safe/dist/output.js +6 -0
  100. package/node_modules/@openclaw/fs-safe/dist/root-directory-list.d.ts +2 -1
  101. package/node_modules/@openclaw/fs-safe/dist/root-directory-list.js +12 -5
  102. package/node_modules/@openclaw/fs-safe/dist/root-path-existing.d.ts +2 -2
  103. package/node_modules/@openclaw/fs-safe/dist/root-path-existing.js +27 -13
  104. package/node_modules/@openclaw/fs-safe/dist/root-path.js +2 -2
  105. package/node_modules/@openclaw/fs-safe/dist/sibling-staged-file.d.ts +3 -0
  106. package/node_modules/@openclaw/fs-safe/dist/sibling-staged-file.js +18 -3
  107. package/node_modules/@openclaw/fs-safe/dist/watch-hints.js +8 -3
  108. package/node_modules/@openclaw/fs-safe/dist/windows-security-helper.exe +0 -0
  109. package/node_modules/@openclaw/fs-safe/docs/config.md +7 -1
  110. package/node_modules/@openclaw/fs-safe/docs/copy.md +10 -0
  111. package/node_modules/@openclaw/fs-safe/docs/migrating-to-0.5.md +6 -4
  112. package/node_modules/@openclaw/fs-safe/docs/native-helper.md +6 -4
  113. package/node_modules/@openclaw/fs-safe/docs/output.md +4 -2
  114. package/node_modules/@openclaw/fs-safe/docs/security-model.md +9 -0
  115. package/node_modules/@openclaw/fs-safe/docs/watch.md +7 -1
  116. package/node_modules/@openclaw/fs-safe/package.json +15 -14
  117. package/node_modules/@openclaw/fs-safe-darwin-arm64/fs-safe-native.node +0 -0
  118. package/node_modules/@openclaw/fs-safe-darwin-arm64/package.json +1 -1
  119. package/node_modules/@openclaw/fs-safe-darwin-x64/fs-safe-native.node +0 -0
  120. package/node_modules/@openclaw/fs-safe-darwin-x64/package.json +1 -1
  121. package/node_modules/@openclaw/fs-safe-freebsd-arm64/fs-safe-native.node +0 -0
  122. package/node_modules/@openclaw/fs-safe-freebsd-arm64/package.json +1 -1
  123. package/node_modules/@openclaw/fs-safe-freebsd-x64/fs-safe-native.node +0 -0
  124. package/node_modules/@openclaw/fs-safe-freebsd-x64/package.json +1 -1
  125. package/node_modules/@openclaw/fs-safe-linux-arm64-gnu/fs-safe-native.node +0 -0
  126. package/node_modules/@openclaw/fs-safe-linux-arm64-gnu/package.json +1 -1
  127. package/node_modules/@openclaw/fs-safe-linux-arm64-musl/fs-safe-native.node +0 -0
  128. package/node_modules/@openclaw/fs-safe-linux-arm64-musl/package.json +1 -1
  129. package/node_modules/@openclaw/fs-safe-linux-x64-gnu/fs-safe-native.node +0 -0
  130. package/node_modules/@openclaw/fs-safe-linux-x64-gnu/package.json +1 -1
  131. package/node_modules/@openclaw/fs-safe-linux-x64-musl/fs-safe-native.node +0 -0
  132. package/node_modules/@openclaw/fs-safe-linux-x64-musl/package.json +1 -1
  133. package/node_modules/@openclaw/fs-safe-win32-arm64-msvc/fs-safe-native.node +0 -0
  134. package/node_modules/@openclaw/fs-safe-win32-arm64-msvc/package.json +1 -1
  135. package/node_modules/@openclaw/fs-safe-win32-x64-msvc/fs-safe-native.node +0 -0
  136. package/node_modules/@openclaw/fs-safe-win32-x64-msvc/package.json +1 -1
  137. package/package.json +5 -5
  138. package/dist/.setup/runtime-setter-api-CpwhcBQK.mjs +0 -2
  139. package/dist/.setup/secret-contract-api-DMSwMIxd.mjs +0 -2
  140. package/dist/.setup/setup-plugin-api-SO1hdrsT.mjs +0 -2
  141. package/dist/.source-module-urls/1cd4d4ff8d44e1c8b830932b44d7cf8a7f3350e09e169910e1d7a85e131b7bea.json +0 -1
@@ -1,11 +1,11 @@
1
- import { i as __exportAll } from "./doctor-contract-DybEjJcd.mjs";
2
- import { n as getMatrixRuntimeLifecycle } from "./runtime-Ck8TjD7L.mjs";
3
- import { c as hasReadyMatrixEnvAuth, d as resolveScopedMatrixEnvConfig, f as resolveMatrixAccountStringValues, i as requiresExplicitMatrixDefaultAccount, l as resolveGlobalMatrixEnvConfig, s as resolveMatrixDefaultOrOnlyAccountId, u as resolveMatrixEnvAuthReadiness } from "./account-selection-Co94mKNj.mjs";
4
- import { t as getMatrixScopedEnvVarNames } from "./env-vars-Bh1iOXJ1.mjs";
5
- import { o as resolveMatrixBaseConfig, r as listNormalizedMatrixAccountIds, t as findMatrixAccountConfig } from "./account-config-CVM2a28p.mjs";
6
- import { t as resolveMatrixConfigFieldPath } from "./config-paths-DBpHxDyc.mjs";
7
- import { n as validateMatrixHomeserverUrl, t as resolveValidatedMatrixHomeserverUrl } from "./url-validation-C77p4qT9.mjs";
8
- import { i as repairCurrentTokenStorageMetaDeviceId } from "./storage-CxN4jqKI.mjs";
1
+ import { n as __exportAll } from "./runtime-doctor-migrations-hxP-CXX7.mjs";
2
+ import { n as getMatrixRuntimeLifecycle } from "./runtime-1kn1P6io.mjs";
3
+ import { c as hasReadyMatrixEnvAuth, d as resolveScopedMatrixEnvConfig, f as resolveMatrixAccountStringValues, i as requiresExplicitMatrixDefaultAccount, l as resolveGlobalMatrixEnvConfig, s as resolveMatrixDefaultOrOnlyAccountId, u as resolveMatrixEnvAuthReadiness } from "./account-selection-CWsL5zIU.mjs";
4
+ import { t as getMatrixScopedEnvVarNames } from "./env-vars-aEBngJPa.mjs";
5
+ import { o as resolveMatrixBaseConfig, r as listNormalizedMatrixAccountIds, t as findMatrixAccountConfig } from "./account-config-CRsKoMqJ.mjs";
6
+ import { t as resolveMatrixConfigFieldPath } from "./config-paths-CnREYb1Y.mjs";
7
+ import { n as validateMatrixHomeserverUrl, t as resolveValidatedMatrixHomeserverUrl } from "./url-validation-CF6pG6eE.mjs";
8
+ import { i as repairCurrentTokenStorageMetaDeviceId } from "./storage-CN4dxdtV.mjs";
9
9
  import { createLazyRuntimeMethod, createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
10
10
  import { DEFAULT_ACCOUNT_ID, normalizeAccountId, normalizeOptionalAccountId } from "openclaw/plugin-sdk/account-id";
11
11
  import { formatErrorMessage, toErrorObject, toStringifiedError } from "openclaw/plugin-sdk/error-runtime";
@@ -20,8 +20,8 @@ import { sleepWithAbort } from "openclaw/plugin-sdk/runtime-env";
20
20
  import { createDeferred } from "openclaw/plugin-sdk/extension-shared";
21
21
  import { resolveGlobalSingleton } from "openclaw/plugin-sdk/global-singleton";
22
22
  import { racePromiseWithAbortSignal, raceWithTimeout } from "openclaw/plugin-sdk/time-runtime";
23
- // extensions/matrix/src/matrix/client/auth-request.ts
24
- const loadMatrixAuthClientDeps = createLazyRuntimeModule(() => Promise.all([import("./sdk-Cj3ggJHG.mjs").then((n) => n.t), import("./logging-BLcaOSRD.mjs").then((n) => n.n)]).then(([sdkModule, loggingModule]) => ({
23
+ //#region extensions/matrix/src/matrix/client/auth-request.ts
24
+ const loadMatrixAuthClientDeps = createLazyRuntimeModule(() => Promise.all([import("./sdk-DNW03GqJ.mjs").then((n) => n.t), import("./logging-CoaEyRtA.mjs").then((n) => n.n)]).then(([sdkModule, loggingModule]) => ({
25
25
  MatrixClient: sdkModule.MatrixClient,
26
26
  ensureMatrixSdkLoggingConfigured: loggingModule.ensureMatrixSdkLoggingConfigured
27
27
  })));
@@ -88,9 +88,10 @@ async function fetchMatrixWhoamiIdentity(params) {
88
88
  if (!outcome.ok) throw outcome.error;
89
89
  return outcome.value;
90
90
  }
91
- // extensions/matrix/src/matrix/client/config.ts
92
- const loadMatrixCredentialsReadDeps = createLazyRuntimeModule(() => import("./credentials-read-WCQSEvI8.mjs").then((n) => n.i));
93
- const loadMatrixCredentialsWriteRuntime = createLazyRuntimeModule(() => import("./credentials-B0vpXvcB.mjs"));
91
+ //#endregion
92
+ //#region extensions/matrix/src/matrix/client/config.ts
93
+ const loadMatrixCredentialsReadDeps = createLazyRuntimeModule(() => import("./credentials-read-Dj7Hj87M.mjs").then((n) => n.i));
94
+ const loadMatrixCredentialsWriteRuntime = createLazyRuntimeModule(() => import("./credentials-udso1z0C.mjs"));
94
95
  const loadMatrixSecretInputDeps = createLazyRuntimeModule(() => import("openclaw/plugin-sdk/secret-input-runtime"));
95
96
  function credentialsMatchBackfillAuthLineage(params) {
96
97
  if (!params.stored) return true;
@@ -462,7 +463,8 @@ async function backfillMatrixAuthDeviceIdAfterStartup(params) {
462
463
  deviceId
463
464
  }, env, params.auth.accountId) === "saved" ? deviceId : void 0;
464
465
  }
465
- // extensions/matrix/src/matrix/monitor/task-runner.ts
466
+ //#endregion
467
+ //#region extensions/matrix/src/matrix/monitor/task-runner.ts
466
468
  const monitorTaskSignal = new AsyncLocalStorage();
467
469
  function getMatrixMonitorTaskSignal() {
468
470
  return monitorTaskSignal.getStore();
@@ -498,7 +500,8 @@ function createMatrixMonitorTaskRunner(params) {
498
500
  waitForIdle
499
501
  };
500
502
  }
501
- // extensions/matrix/src/matrix/startup-abort.ts
503
+ //#endregion
504
+ //#region extensions/matrix/src/matrix/startup-abort.ts
502
505
  function createMatrixStartupAbortError() {
503
506
  const error = /* @__PURE__ */ new Error("Matrix startup aborted");
504
507
  error.name = "AbortError";
@@ -518,8 +521,9 @@ async function awaitMatrixStartupWithAbort(promise, abortSignal) {
518
521
  throw toErrorObject(error, "Non-Error rejection");
519
522
  }
520
523
  }
521
- // extensions/matrix/src/matrix/client/shared.ts
522
- const loadMatrixCreateClientDeps = createLazyRuntimeModule(() => import("./create-client-C4Lnqs2C.mjs"));
524
+ //#endregion
525
+ //#region extensions/matrix/src/matrix/client/shared.ts
526
+ const loadMatrixCreateClientDeps = createLazyRuntimeModule(() => import("./create-client-CrY1E3hg.mjs"));
523
527
  const MATRIX_RETIREMENT_DRAIN_TIMEOUT_MS = 5e3;
524
528
  const sharedClientRegistry = resolveGlobalSingleton(Symbol.for("openclaw.matrix.shared-client-registry"), () => ({
525
529
  states: /* @__PURE__ */ new Map(),
@@ -834,7 +838,8 @@ async function stopSharedClientForAccount(auth) {
834
838
  if (!state || state.ownerSignal !== getMatrixRuntimeLifecycle()?.signal) return;
835
839
  await forceRetireState(state);
836
840
  }
837
- // extensions/matrix/src/matrix/client.ts
841
+ //#endregion
842
+ //#region extensions/matrix/src/matrix/client.ts
838
843
  var client_exports = /* @__PURE__ */ __exportAll({
839
844
  acquireSharedMatrixClient: () => acquireSharedMatrixClient,
840
845
  backfillMatrixAuthDeviceIdAfterStartup: () => backfillMatrixAuthDeviceIdAfterStartup,
@@ -850,6 +855,7 @@ var client_exports = /* @__PURE__ */ __exportAll({
850
855
  stopSharedClientForAccount: () => stopSharedClientForAccount,
851
856
  validateMatrixHomeserverUrl: () => validateMatrixHomeserverUrl
852
857
  });
853
- const loadMatrixClientRuntime = createLazyRuntimeModule(() => import("./create-client-C4Lnqs2C.mjs"));
858
+ const loadMatrixClientRuntime = createLazyRuntimeModule(() => import("./create-client-CrY1E3hg.mjs"));
854
859
  const createMatrixClient = createLazyRuntimeMethod(loadMatrixClientRuntime, (runtime) => runtime.createMatrixClient);
860
+ //#endregion
855
861
  export { isMatrixStartupAbortError as a, getMatrixMonitorTaskSignal as c, resolveMatrixAuthContext as d, createMatrixStartupAbortError as i, backfillMatrixAuthDeviceIdAfterStartup as l, acquireSharedMatrixClient as n, throwIfMatrixStartupAborted as o, awaitMatrixStartupWithAbort as r, createMatrixMonitorTaskRunner as s, client_exports as t, resolveMatrixAuth as u };
@@ -1,13 +1,13 @@
1
- import { i as __exportAll } from "./doctor-contract-DybEjJcd.mjs";
2
- import { C as resolveMatrixRoomId } from "./send-C1qeMQAy.mjs";
1
+ import { n as __exportAll } from "./runtime-doctor-migrations-hxP-CXX7.mjs";
2
+ import { C as resolveMatrixRoomId } from "./send-BGgwE5pV.mjs";
3
3
  import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
4
- // extensions/matrix/src/matrix/actions/client.ts
4
+ //#region extensions/matrix/src/matrix/actions/client.ts
5
5
  var client_exports = /* @__PURE__ */ __exportAll({
6
6
  withResolvedActionClient: () => withResolvedActionClient,
7
7
  withResolvedRoomAction: () => withResolvedRoomAction,
8
8
  withStartedActionClient: () => withStartedActionClient
9
9
  });
10
- const loadMatrixActionClientRuntime = createLazyRuntimeModule(() => import("./client-bootstrap-BjcmTmyR.mjs"));
10
+ const loadMatrixActionClientRuntime = createLazyRuntimeModule(() => import("./client-bootstrap-D1vLveT2.mjs"));
11
11
  async function withResolvedActionClient(opts, run, mode = "persist") {
12
12
  const { withResolvedRuntimeMatrixClient } = await loadMatrixActionClientRuntime();
13
13
  return await withResolvedRuntimeMatrixClient(opts, run, mode);
@@ -23,4 +23,5 @@ async function withResolvedRoomAction(roomId, opts, run) {
23
23
  return await run(client, await resolveMatrixRoomId(client, roomId), abortSignal);
24
24
  });
25
25
  }
26
+ //#endregion
26
27
  export { withStartedActionClient as i, withResolvedActionClient as n, withResolvedRoomAction as r, client_exports as t };
@@ -1,7 +1,7 @@
1
1
  import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
2
2
  import { captureChannelReadAuthority } from "openclaw/plugin-sdk/fetch-runtime";
3
- // extensions/matrix/src/matrix/client-bootstrap.ts
4
- const loadMatrixSharedClientRuntimeDeps = createLazyRuntimeModule(() => import("./client-7eyTX0cu.mjs").then((n) => n.t));
3
+ //#region extensions/matrix/src/matrix/client-bootstrap.ts
4
+ const loadMatrixSharedClientRuntimeDeps = createLazyRuntimeModule(() => import("./client-BEl7PU1_.mjs").then((n) => n.t));
5
5
  async function ensureResolvedClientReadiness(params) {
6
6
  if (params.readiness === "started") {
7
7
  if (params.lease) await params.lease.start();
@@ -70,4 +70,5 @@ async function withResolvedRuntimeMatrixClient(opts, run, stopMode = "persist")
70
70
  }
71
71
  }
72
72
  }
73
+ //#endregion
73
74
  export { resolveRuntimeMatrixClientWithReadiness, withResolvedRuntimeMatrixClient };
@@ -1,6 +1,6 @@
1
- import { t as formatMatrixErrorReason } from "./errors-CL3YJV8U.mjs";
1
+ import { t as formatMatrixErrorReason } from "./errors-Bw4EHwKX.mjs";
2
2
  import { raceWithTimeout } from "openclaw/plugin-sdk/time-runtime";
3
- // extensions/matrix/src/matrix/sync-state.ts
3
+ //#region extensions/matrix/src/matrix/sync-state.ts
4
4
  function isMatrixReadySyncState(state) {
5
5
  return state === "PREPARED" || state === "SYNCING" || state === "CATCHUP";
6
6
  }
@@ -10,7 +10,8 @@ function isMatrixDisconnectedSyncState(state) {
10
10
  function isMatrixTerminalSyncState(state) {
11
11
  return state === "STOPPED";
12
12
  }
13
- // extensions/matrix/src/matrix/sdk/client-support.ts
13
+ //#endregion
14
+ //#region extensions/matrix/src/matrix/sdk/client-support.ts
14
15
  const MATRIX_STATUS_DIAGNOSTIC_TIMEOUT_MS = 1e4;
15
16
  const DEFAULT_MATRIX_LOCAL_TIMEOUT_MS = 6e4;
16
17
  function resolveMatrixLocalTimeoutMs(raw) {
@@ -79,4 +80,5 @@ function createMatrixExplicitBootstrapOptions(params) {
79
80
  strict: params?.strict !== false
80
81
  };
81
82
  }
83
+ //#endregion
82
84
  export { isMatrixAccessTokenInvalidatedError as a, resolveMatrixLocalTimeoutMs as c, isMatrixDisconnectedSyncState as d, isMatrixReadySyncState as f, createMatrixExplicitBootstrapOptions as i, unresolvedMatrixDeviceVerificationStatus as l, MATRIX_INITIAL_CRYPTO_BOOTSTRAP_OPTIONS as n, resolveMatrixDiagnostic as o, isMatrixTerminalSyncState as p, MATRIX_STATUS_DIAGNOSTIC_TIMEOUT_MS as r, resolveMatrixDiagnosticResult as s, MATRIX_AUTOMATIC_REPAIR_BOOTSTRAP_OPTIONS as t, unresolvedMatrixRoomKeyBackupStatus as u };
@@ -1,5 +1,5 @@
1
1
  import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/account-id";
2
- // extensions/matrix/src/matrix/config-paths.ts
2
+ //#region extensions/matrix/src/matrix/config-paths.ts
3
3
  function shouldStoreMatrixAccountAtTopLevel(cfg, accountId) {
4
4
  if (normalizeAccountId(accountId) !== DEFAULT_ACCOUNT_ID) return false;
5
5
  const accounts = cfg.channels?.matrix?.accounts;
@@ -15,4 +15,5 @@ function resolveMatrixConfigFieldPath(cfg, accountId, fieldPath) {
15
15
  if (!suffix) return resolveMatrixConfigPath(cfg, accountId);
16
16
  return `${resolveMatrixConfigPath(cfg, accountId)}.${suffix}`;
17
17
  }
18
+ //#endregion
18
19
  export { resolveMatrixConfigPath as n, shouldStoreMatrixAccountAtTopLevel as r, resolveMatrixConfigFieldPath as t };
@@ -1,16 +1,16 @@
1
- import { t as getMatrixRuntime } from "./runtime-Ck8TjD7L.mjs";
2
- import { t as resolveValidatedMatrixHomeserverUrl } from "./url-validation-C77p4qT9.mjs";
3
- import { n as maybeMigrateLegacyStorage, o as resolveMatrixStoragePaths, s as writeStorageMeta } from "./storage-CxN4jqKI.mjs";
4
- import "./client-7eyTX0cu.mjs";
1
+ import { t as getMatrixRuntime } from "./runtime-1kn1P6io.mjs";
2
+ import { t as resolveValidatedMatrixHomeserverUrl } from "./url-validation-CF6pG6eE.mjs";
3
+ import { n as maybeMigrateLegacyStorage, o as resolveMatrixStoragePaths, s as writeStorageMeta } from "./storage-CN4dxdtV.mjs";
4
+ import "./client-BEl7PU1_.mjs";
5
5
  import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
6
6
  import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
7
7
  import { ssrfPolicyFromDangerouslyAllowPrivateNetwork } from "openclaw/plugin-sdk/ssrf-runtime";
8
8
  import fs from "node:fs";
9
- // extensions/matrix/src/matrix/client/create-client.ts
9
+ //#region extensions/matrix/src/matrix/client/create-client.ts
10
10
  const loadMatrixCreateClientRuntimeDeps = createLazyRuntimeModule(() => Promise.all([
11
- import("./sdk-Cj3ggJHG.mjs").then((n) => n.t),
12
- import("./logging-BLcaOSRD.mjs").then((n) => n.n),
13
- import("./file-sync-store-q5KCV2Lp.mjs")
11
+ import("./sdk-DNW03GqJ.mjs").then((n) => n.t),
12
+ import("./logging-CoaEyRtA.mjs").then((n) => n.n),
13
+ import("./file-sync-store-BxUPmUoJ.mjs")
14
14
  ]).then(([sdkModule, loggingModule, syncStoreModule]) => ({
15
15
  MatrixClient: sdkModule.MatrixClient,
16
16
  SqliteBackedMatrixSyncStore: syncStoreModule.SqliteBackedMatrixSyncStore,
@@ -68,4 +68,5 @@ async function createMatrixClient(params, preparedStorage) {
68
68
  stateRuntime: getMatrixRuntime().state
69
69
  });
70
70
  }
71
+ //#endregion
71
72
  export { createMatrixClient, prepareMatrixClientStorage };
@@ -1,11 +1,11 @@
1
- import { i as __exportAll } from "./doctor-contract-DybEjJcd.mjs";
2
- import { r as getOptionalMatrixRuntime } from "./runtime-Ck8TjD7L.mjs";
3
- import { i as normalizeMatrixStoredCredentials, r as matrixCredentialsStoreKey, t as MATRIX_CREDENTIALS_NAMESPACE } from "./credentials-state-jxq29yQw.mjs";
4
- import { i as resolveMatrixCredentialsDir, o as resolveMatrixCredentialsPath } from "./storage-paths-e_Vq6cvw.mjs";
1
+ import { n as __exportAll } from "./runtime-doctor-migrations-hxP-CXX7.mjs";
2
+ import { r as getOptionalMatrixRuntime } from "./runtime-1kn1P6io.mjs";
3
+ import { i as normalizeMatrixStoredCredentials, r as matrixCredentialsStoreKey, t as MATRIX_CREDENTIALS_NAMESPACE } from "./credentials-state-B3cuUFwZ.mjs";
4
+ import { i as resolveMatrixCredentialsDir, o as resolveMatrixCredentialsPath } from "./storage-paths-B51JM-pC.mjs";
5
5
  import { normalizeAccountId } from "openclaw/plugin-sdk/account-id";
6
6
  import { createPluginStateKeyedStore, createPluginStateSyncKeyedStore } from "openclaw/plugin-sdk/plugin-state-store-runtime";
7
7
  import { resolveStateDir } from "openclaw/plugin-sdk/state-paths";
8
- // extensions/matrix/src/matrix/credentials-read.ts
8
+ //#region extensions/matrix/src/matrix/credentials-read.ts
9
9
  var credentials_read_exports = /* @__PURE__ */ __exportAll({
10
10
  captureMatrixCredentialsEnv: () => captureMatrixCredentialsEnv,
11
11
  clearMatrixCredentials: () => clearMatrixCredentials,
@@ -81,4 +81,5 @@ function credentialsMatchConfig(stored, config) {
81
81
  }
82
82
  return stored.homeserver === config.homeserver && stored.userId === config.userId;
83
83
  }
84
+ //#endregion
84
85
  export { loadMatrixCredentials as a, credentials_read_exports as i, clearMatrixCredentials as n, loadMatrixCredentialsAsync as o, credentialsMatchConfig as r, openMatrixCredentialsAsyncStore as s, captureMatrixCredentialsEnv as t };
@@ -1,5 +1,5 @@
1
1
  import { normalizeAccountId } from "openclaw/plugin-sdk/account-id";
2
- // extensions/matrix/src/matrix/credentials-state.ts
2
+ //#region extensions/matrix/src/matrix/credentials-state.ts
3
3
  const MATRIX_CREDENTIALS_NAMESPACE = "credentials";
4
4
  function matrixCredentialsStoreKey(accountId) {
5
5
  return `account:${normalizeAccountId(accountId)}`;
@@ -23,4 +23,5 @@ function isMatrixCredentialRevocation(value, accountId) {
23
23
  const parsed = value;
24
24
  return parsed.kind === "revoked" && typeof parsed.revokedAt === "string" && parsed.revokedAt.length > 0 && normalizeAccountId(parsed.accountId) === normalizeAccountId(accountId ?? parsed.accountId);
25
25
  }
26
+ //#endregion
26
27
  export { normalizeMatrixStoredCredentials as i, isMatrixCredentialRevocation as n, matrixCredentialsStoreKey as r, MATRIX_CREDENTIALS_NAMESPACE as t };
@@ -1,9 +1,9 @@
1
- import { i as normalizeMatrixStoredCredentials, n as isMatrixCredentialRevocation, r as matrixCredentialsStoreKey } from "./credentials-state-jxq29yQw.mjs";
2
- import { i as resolveMatrixCredentialsDir, o as resolveMatrixCredentialsPath } from "./storage-paths-e_Vq6cvw.mjs";
3
- import { a as loadMatrixCredentials, n as clearMatrixCredentials, r as credentialsMatchConfig, s as openMatrixCredentialsAsyncStore } from "./credentials-read-WCQSEvI8.mjs";
4
- import { c as updateMatrixKeyedState } from "./retired-state-vIr2IB90.mjs";
1
+ import { i as normalizeMatrixStoredCredentials, n as isMatrixCredentialRevocation, r as matrixCredentialsStoreKey } from "./credentials-state-B3cuUFwZ.mjs";
2
+ import { i as resolveMatrixCredentialsDir, o as resolveMatrixCredentialsPath } from "./storage-paths-B51JM-pC.mjs";
3
+ import { a as loadMatrixCredentials, n as clearMatrixCredentials, r as credentialsMatchConfig, s as openMatrixCredentialsAsyncStore } from "./credentials-read-Dj7Hj87M.mjs";
4
+ import { r as updateMatrixKeyedState } from "./sqlite-state-LByPx4Yp.mjs";
5
5
  import { normalizeAccountId } from "openclaw/plugin-sdk/account-id";
6
- // extensions/matrix/src/matrix/credentials.ts
6
+ //#region extensions/matrix/src/matrix/credentials.ts
7
7
  async function saveMatrixCredentials(credentials, env = process.env, accountId) {
8
8
  await persistMatrixCredentials(credentials, env, accountId, false);
9
9
  }
@@ -54,4 +54,5 @@ async function updateMatrixCredentials(env, accountId, update) {
54
54
  const key = matrixCredentialsStoreKey(accountId);
55
55
  await updateMatrixKeyedState(store, key, update);
56
56
  }
57
+ //#endregion
57
58
  export { clearMatrixCredentials, credentialsMatchConfig, loadMatrixCredentials, resolveMatrixCredentialsDir, resolveMatrixCredentialsPath, saveBackfilledMatrixDeviceId, saveMatrixCredentials, touchMatrixCredentials };
@@ -1,5 +1,5 @@
1
1
  import { createRequire } from "node:module";
2
- // extensions/matrix/src/matrix/sdk/crypto-node.runtime.ts
2
+ //#region extensions/matrix/src/matrix/sdk/crypto-node.runtime.ts
3
3
  const require = createRequire(import.meta.url);
4
4
  function loadMatrixCryptoNodeBindings() {
5
5
  const { Attachment, EncryptedAttachment } = require("@matrix-org/matrix-sdk-crypto-nodejs");
@@ -8,4 +8,5 @@ function loadMatrixCryptoNodeBindings() {
8
8
  EncryptedAttachment
9
9
  };
10
10
  }
11
+ //#endregion
11
12
  export { loadMatrixCryptoNodeBindings };
@@ -1,7 +1,7 @@
1
- import { t as ensureMatrixCryptoRuntime } from "./deps-O7rEnklr.mjs";
2
- import { r as noop, t as LogService } from "./logger-BX5kXvh1.mjs";
3
- import { a as isRepairableSecretStorageAccessError, i as trustMatrixOwnIdentity, n as isMatrixDeviceOwnerVerified, r as isMatrixDeviceVerifiedInCurrentClient } from "./sdk-Cj3ggJHG.mjs";
4
- import { persistIdbToDisk, resolveDefaultIdbSnapshotPath, restoreIdbFromDisk } from "./idb-persistence-BF0MZglD.mjs";
1
+ import { t as ensureMatrixCryptoRuntime } from "./deps-L_1bUAGL.mjs";
2
+ import { r as noop, t as LogService } from "./logger-CuAzdD8Q.mjs";
3
+ import { a as isRepairableSecretStorageAccessError, i as trustMatrixOwnIdentity, n as isMatrixDeviceOwnerVerified, r as isMatrixDeviceVerifiedInCurrentClient } from "./sdk-DNW03GqJ.mjs";
4
+ import { persistIdbToDisk, resolveDefaultIdbSnapshotPath, restoreIdbFromDisk } from "./idb-persistence-C2TsCHY2.mjs";
5
5
  import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
6
6
  import { formatErrorMessage, toStringifiedError } from "openclaw/plugin-sdk/error-runtime";
7
7
  import { resolveGlobalSingleton } from "openclaw/plugin-sdk/global-singleton";
@@ -16,7 +16,7 @@ import { CryptoEvent } from "matrix-js-sdk/lib/crypto-api/CryptoEvent.js";
16
16
  import { DecryptionFailureCode } from "matrix-js-sdk/lib/crypto-api/index.js";
17
17
  import { VerificationPhase, VerificationRequestEvent, VerifierEvent } from "matrix-js-sdk/lib/crypto-api/verification.js";
18
18
  import { expectDefined } from "openclaw/plugin-sdk/expect-runtime";
19
- // extensions/matrix/src/matrix/sdk/fake-indexeddb-prune.ts
19
+ //#region extensions/matrix/src/matrix/sdk/fake-indexeddb-prune.ts
20
20
  const MATRIX_CRYPTO_DATABASE_SUFFIXES = ["::matrix-sdk-crypto", "::matrix-sdk-crypto-meta"];
21
21
  const PRUNER_INSTALLED = Symbol.for("openclaw.matrix.fakeIndexedDbTransactionPruner");
22
22
  function isMatrixCryptoDatabase(rawDatabase) {
@@ -53,7 +53,8 @@ function installFakeIndexedDbTransactionPruner() {
53
53
  return transaction;
54
54
  };
55
55
  }
56
- // extensions/matrix/src/matrix/sdk/crypto-bootstrap.ts
56
+ //#endregion
57
+ //#region extensions/matrix/src/matrix/sdk/crypto-bootstrap.ts
57
58
  const CROSS_SIGNING_PUBLICATION_WAIT_MS = 5e3;
58
59
  var MatrixCryptoBootstrapper = class {
59
60
  constructor(deps) {
@@ -266,8 +267,9 @@ var MatrixCryptoBootstrapper = class {
266
267
  return verified;
267
268
  }
268
269
  };
269
- // extensions/matrix/src/matrix/sdk/crypto-facade.ts
270
- const loadMatrixCryptoNodeRuntime = createLazyRuntimeModule(() => import("./crypto-node.runtime-E_hqXGxm.mjs"));
270
+ //#endregion
271
+ //#region extensions/matrix/src/matrix/sdk/crypto-facade.ts
272
+ const loadMatrixCryptoNodeRuntime = createLazyRuntimeModule(() => import("./crypto-node.runtime-6Aj_ltHQ.mjs"));
271
273
  async function loadMatrixCryptoNodeBindings() {
272
274
  await ensureMatrixCryptoRuntime();
273
275
  return (await loadMatrixCryptoNodeRuntime()).loadMatrixCryptoNodeBindings();
@@ -337,7 +339,8 @@ function createMatrixCryptoFacade(deps) {
337
339
  getVerificationSas: withTrackedVerifications(manager.getVerificationSas.bind(manager))
338
340
  };
339
341
  }
340
- // extensions/matrix/src/matrix/sdk/decrypt-bridge.ts
342
+ //#endregion
343
+ //#region extensions/matrix/src/matrix/sdk/decrypt-bridge.ts
341
344
  const MATRIX_DECRYPT_RETRY_BASE_DELAY_MS = 1500;
342
345
  const MATRIX_DECRYPT_RETRY_MAX_DELAY_MS = 3e4;
343
346
  const MATRIX_DECRYPT_RETRY_MAX_ATTEMPTS = 8;
@@ -603,7 +606,8 @@ var MatrixDecryptBridge = class {
603
606
  pruneMapToMaxSize(this.decryptedMessageDedupe, 2048);
604
607
  }
605
608
  };
606
- // extensions/matrix/src/matrix/sdk/verification-manager.ts
609
+ //#endregion
610
+ //#region extensions/matrix/src/matrix/sdk/verification-manager.ts
607
611
  const MAX_TRACKED_VERIFICATION_SESSIONS = 256;
608
612
  const TERMINAL_SESSION_RETENTION_MS = 864e5;
609
613
  const SAS_AUTO_CONFIRM_DELAY_MS = 3e4;
@@ -935,7 +939,8 @@ var MatrixVerificationManager = class {
935
939
  return callbacks;
936
940
  }
937
941
  };
938
- // extensions/matrix/src/matrix/sdk/indexeddb-session.ts
942
+ //#endregion
943
+ //#region extensions/matrix/src/matrix/sdk/indexeddb-session.ts
939
944
  const registry = resolveGlobalSingleton(Symbol.for("openclaw.matrix.sdkIndexedDbSessions"), () => ({ sessions: /* @__PURE__ */ new Map() }));
940
945
  const sessions = registry.sessions;
941
946
  function retiredError() {
@@ -1044,6 +1049,8 @@ function beginMatrixSdkIndexedDbSession(databasePrefix = "matrix-js-sdk") {
1044
1049
  return retirement;
1045
1050
  } };
1046
1051
  }
1047
- // extensions/matrix/src/matrix/sdk/crypto-runtime.ts
1052
+ //#endregion
1053
+ //#region extensions/matrix/src/matrix/sdk/crypto-runtime.ts
1048
1054
  installFakeIndexedDbTransactionPruner();
1055
+ //#endregion
1049
1056
  export { MatrixCryptoBootstrapper, MatrixDecryptBridge, MatrixVerificationManager, beginMatrixSdkIndexedDbSession, createMatrixCryptoFacade, isMatrixDeviceOwnerVerified, isMatrixDeviceVerifiedInCurrentClient, persistIdbToDisk, resolveDefaultIdbSnapshotPath, restoreIdbFromDisk };
@@ -1,11 +1,12 @@
1
- import { t as getMatrixRuntime } from "./runtime-Ck8TjD7L.mjs";
2
- import { c as updateMatrixKeyedState, d as writeMatrixStateChunks, l as chunkMatrixStateJson, o as resolveMatrixSqliteStateEnv, u as readMatrixStateChunks } from "./retired-state-vIr2IB90.mjs";
1
+ import { t as getMatrixRuntime } from "./runtime-1kn1P6io.mjs";
2
+ import { c as writeMatrixStateChunks, o as chunkMatrixStateJson, s as readMatrixStateChunks } from "./retired-state-C4UnLIg4.mjs";
3
+ import { r as updateMatrixKeyedState, t as resolveMatrixSqliteStateEnv } from "./sqlite-state-LByPx4Yp.mjs";
3
4
  import { isRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
4
5
  import { createHash, randomUUID } from "node:crypto";
5
6
  import path from "node:path";
6
7
  import { asSafeIntegerInRange } from "openclaw/plugin-sdk/number-runtime";
7
8
  import fs from "node:fs";
8
- // extensions/matrix/src/matrix/crypto-state-store.ts
9
+ //#region extensions/matrix/src/matrix/crypto-state-store.ts
9
10
  const STATE_KEY = "current";
10
11
  const RECOVERY_KEY_NAMESPACE = "recovery-key";
11
12
  const LEGACY_CRYPTO_MIGRATION_NAMESPACE = "legacy-crypto-migration";
@@ -181,4 +182,5 @@ function isIdbSnapshotMeta(value) {
181
182
  max: IDB_SNAPSHOT_MAX_CHUNKS
182
183
  }) !== void 0 && typeof value.digest === "string" && asSafeIntegerInRange(value.databaseCount, { min: 0 }) !== void 0 && typeof value.persistedAt === "string" && (value.cleanOwnerGeneration === void 0 || typeof value.cleanOwnerGeneration === "string" && /^[a-f0-9]{32}$/.test(value.cleanOwnerGeneration));
183
184
  }
185
+ //#endregion
184
186
  export { readMatrixRecoveryKeyStateForPathAsync as a, writeMatrixIdbSnapshotJson as c, readMatrixIdbSnapshotOwnerGeneration as i, writeMatrixRecoveryKeyStateForPathAsync as l, MATRIX_RECOVERY_KEY_FILENAME as n, scoreMatrixCryptoStateInStore as o, readMatrixIdbSnapshotJson as r, sealMatrixIdbSnapshotOwnerGeneration as s, MATRIX_IDB_SNAPSHOT_FILENAME as t };
@@ -1,12 +1,12 @@
1
- import { t as getMatrixRuntime } from "./runtime-Ck8TjD7L.mjs";
2
- import { i as readMatrixIdbSnapshotOwnerGeneration, s as sealMatrixIdbSnapshotOwnerGeneration } from "./crypto-state-store-CM57gchf.mjs";
1
+ import { t as getMatrixRuntime } from "./runtime-1kn1P6io.mjs";
2
+ import { i as readMatrixIdbSnapshotOwnerGeneration, s as sealMatrixIdbSnapshotOwnerGeneration } from "./crypto-state-store-DclM-fO5.mjs";
3
3
  import { randomUUID } from "node:crypto";
4
4
  import path from "node:path";
5
5
  import { constants } from "node:fs";
6
6
  import fs$1 from "node:fs/promises";
7
7
  import { FILE_LOCK_STALE_ERROR_CODE, FILE_LOCK_TIMEOUT_ERROR_CODE, acquireFileLock } from "openclaw/plugin-sdk/file-lock";
8
8
  import { syncDirectory } from "@openclaw/fs-safe/durability";
9
- // extensions/matrix/src/matrix/sdk/crypto-store-ownership.ts
9
+ //#region extensions/matrix/src/matrix/sdk/crypto-store-ownership.ts
10
10
  const MATRIX_CRYPTO_STORE_OWNER_ACTIVE_ERROR_CODE = "matrix_crypto_store_owner_active";
11
11
  const GUARD_BYTES = 33;
12
12
  var MatrixCryptoStoreOwnerActiveError = class extends Error {
@@ -170,4 +170,5 @@ async function acquireMatrixCryptoStoreOwnership(snapshotPath, options = {}) {
170
170
  release: () => lock.release()
171
171
  };
172
172
  }
173
+ //#endregion
173
174
  export { withMatrixCryptoStoreRecoveryLock as i, isMatrixCryptoStoreUnsafe as n, sealMatrixCryptoStoreRecovery as r, acquireMatrixCryptoStoreOwnership as t };
@@ -1,12 +1,12 @@
1
- import { i as __exportAll } from "./doctor-contract-DybEjJcd.mjs";
2
- import { t as getMatrixRuntime } from "./runtime-Ck8TjD7L.mjs";
3
- import { r as readMatrixIdbSnapshotJson, t as MATRIX_IDB_SNAPSHOT_FILENAME } from "./crypto-state-store-CM57gchf.mjs";
4
- import { t as walkMatrixStateFiles } from "./state-layout-walk-BqCZTHpp.mjs";
5
- import { i as withMatrixCryptoStoreRecoveryLock, n as isMatrixCryptoStoreUnsafe, r as sealMatrixCryptoStoreRecovery } from "./crypto-store-ownership-Bratn-Np.mjs";
1
+ import { n as __exportAll } from "./runtime-doctor-migrations-hxP-CXX7.mjs";
2
+ import { t as getMatrixRuntime } from "./runtime-1kn1P6io.mjs";
3
+ import { r as readMatrixIdbSnapshotJson, t as MATRIX_IDB_SNAPSHOT_FILENAME } from "./crypto-state-store-DclM-fO5.mjs";
4
+ import { t as walkMatrixStateFiles } from "./state-layout-walk-BQMgMykU.mjs";
5
+ import { i as withMatrixCryptoStoreRecoveryLock, n as isMatrixCryptoStoreUnsafe, r as sealMatrixCryptoStoreRecovery } from "./crypto-store-ownership-Dr-T40Rp.mjs";
6
6
  import path from "node:path";
7
7
  import fs from "node:fs/promises";
8
8
  import { FILE_LOCK_TIMEOUT_ERROR_CODE } from "openclaw/plugin-sdk/file-lock";
9
- // extensions/matrix/src/matrix/crypto-unsafe-state-doctor.ts
9
+ //#region extensions/matrix/src/matrix/crypto-unsafe-state-doctor.ts
10
10
  var crypto_unsafe_state_doctor_exports = /* @__PURE__ */ __exportAll({
11
11
  listMatrixCryptoUnsafeState: () => listMatrixCryptoUnsafeState,
12
12
  recoverMatrixCryptoUnsafeState: () => recoverMatrixCryptoUnsafeState
@@ -41,7 +41,7 @@ async function recoverMatrixCryptoUnsafeState(params) {
41
41
  }
42
42
  const snapshot = await readMatrixIdbSnapshotJson(params.storageRootDir, getMatrixRuntime().state);
43
43
  if (!snapshot) throw new Error("Matrix crypto SQLite snapshot is absent or invalid; refusal remains in place.");
44
- const { validateMatrixIdbSnapshotJson } = await import("./idb-persistence-BF0MZglD.mjs");
44
+ const { validateMatrixIdbSnapshotJson } = await import("./idb-persistence-C2TsCHY2.mjs");
45
45
  try {
46
46
  await validateMatrixIdbSnapshotJson(snapshot);
47
47
  } catch (error) {
@@ -50,4 +50,5 @@ async function recoverMatrixCryptoUnsafeState(params) {
50
50
  await sealMatrixCryptoStoreRecovery(snapshotPath, getMatrixRuntime().state);
51
51
  });
52
52
  }
53
+ //#endregion
53
54
  export { listMatrixCryptoUnsafeState as n, recoverMatrixCryptoUnsafeState as r, crypto_unsafe_state_doctor_exports as t };
@@ -3,7 +3,7 @@ import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
3
3
  import path from "node:path";
4
4
  import fs from "node:fs";
5
5
  import { runCommandWithTimeout } from "openclaw/plugin-sdk/process-runtime";
6
- // extensions/matrix/src/matrix/deps.ts
6
+ //#region extensions/matrix/src/matrix/deps.ts
7
7
  const REQUIRED_MATRIX_PACKAGES = [
8
8
  "matrix-js-sdk",
9
9
  "@matrix-org/matrix-sdk-crypto-nodejs",
@@ -116,4 +116,5 @@ async function ensureMatrixSdkInstalled(params) {
116
116
  if (missing.length === 0) return;
117
117
  throw new Error(`Matrix plugin dependencies are missing: ${missing.join(", ")}. Repair this plugin with \`openclaw plugins update matrix\` or run \`openclaw doctor --fix\`.`);
118
118
  }
119
+ //#endregion
119
120
  export { ensureMatrixSdkInstalled as n, isMatrixSdkAvailable as r, ensureMatrixCryptoRuntime as t };
@@ -1,5 +1,5 @@
1
- import { i as __exportAll } from "./doctor-contract-DybEjJcd.mjs";
2
- // extensions/matrix/src/matrix/device-health.ts
1
+ import { n as __exportAll } from "./runtime-doctor-migrations-hxP-CXX7.mjs";
2
+ //#region extensions/matrix/src/matrix/device-health.ts
3
3
  var device_health_exports = /* @__PURE__ */ __exportAll({
4
4
  isOpenClawManagedMatrixDevice: () => isOpenClawManagedMatrixDevice,
5
5
  summarizeMatrixDeviceHealth: () => summarizeMatrixDeviceHealth
@@ -17,4 +17,5 @@ function summarizeMatrixDeviceHealth(devices) {
17
17
  currentOpenClawDevices: openClawDevices.filter((device) => device.current)
18
18
  };
19
19
  }
20
+ //#endregion
20
21
  export { isOpenClawManagedMatrixDevice as n, summarizeMatrixDeviceHealth as r, device_health_exports as t };
@@ -1,9 +1,9 @@
1
- import { i as __exportAll } from "./doctor-contract-DybEjJcd.mjs";
2
- import { n as isMatrixQualifiedUserId } from "./target-ids-DltG_ZHJ.mjs";
3
- import { a as MATRIX_REACTION_EVENT_TYPE, i as MATRIX_ANNOTATION_RELATION_TYPE } from "./send-currentness-CAUVR-f3.mjs";
1
+ import { n as __exportAll } from "./runtime-doctor-migrations-hxP-CXX7.mjs";
2
+ import { n as isMatrixQualifiedUserId } from "./target-ids-HhcaKX1n.mjs";
3
+ import { a as MATRIX_REACTION_EVENT_TYPE, i as MATRIX_ANNOTATION_RELATION_TYPE } from "./send-currentness-C2rMVVIQ.mjs";
4
4
  import { asOptionalRecord, normalizeNullableString, normalizeOptionalString, normalizeTrimmedStringList, normalizeUniqueTrimmedStringList } from "openclaw/plugin-sdk/string-coerce-runtime";
5
5
  import { KeyedAsyncQueue } from "openclaw/plugin-sdk/keyed-async-queue";
6
- // extensions/matrix/src/matrix/send/types.ts
6
+ //#region extensions/matrix/src/matrix/send/types.ts
7
7
  const MsgType = {
8
8
  Text: "m.text",
9
9
  Image: "m.image",
@@ -32,7 +32,8 @@ const MATRIX_OPENCLAW_FINALIZED_PREVIEW_KEY = "com.openclaw.finalized_preview";
32
32
  * @see https://github.com/matrix-org/matrix-spec-proposals/pull/4357
33
33
  */
34
34
  const MSC4357_LIVE_KEY = "org.matrix.msc4357.live";
35
- // extensions/matrix/src/matrix/relations.ts
35
+ //#endregion
36
+ //#region extensions/matrix/src/matrix/relations.ts
36
37
  function relatedReplyEventId(relation) {
37
38
  const reply = asOptionalRecord(relation?.["m.in_reply_to"]);
38
39
  return typeof reply?.event_id === "string" ? reply.event_id : void 0;
@@ -59,7 +60,8 @@ function resolveMatrixThreadRootId(content) {
59
60
  if (relation?.rel_type !== RelationType.Thread) return;
60
61
  return typeof relation.event_id === "string" ? relation.event_id : relatedReplyEventId(relation);
61
62
  }
62
- // extensions/matrix/src/matrix/direct-room.ts
63
+ //#endregion
64
+ //#region extensions/matrix/src/matrix/direct-room.ts
63
65
  var direct_room_exports = /* @__PURE__ */ __exportAll({
64
66
  hasDirectMatrixMemberFlag: () => hasDirectMatrixMemberFlag,
65
67
  inspectMatrixDirectRoomEvidence: () => inspectMatrixDirectRoomEvidence,
@@ -115,7 +117,8 @@ async function inspectMatrixDirectRoomEvidence(params) {
115
117
  async function isStrictDirectRoom(params) {
116
118
  return (await inspectMatrixDirectRoomEvidence(params)).strict;
117
119
  }
118
- // extensions/matrix/src/matrix/direct-management.ts
120
+ //#endregion
121
+ //#region extensions/matrix/src/matrix/direct-management.ts
119
122
  var direct_management_exports = /* @__PURE__ */ __exportAll({
120
123
  inspectMatrixDirectRooms: () => inspectMatrixDirectRooms,
121
124
  persistMatrixDirectRoomMapping: () => persistMatrixDirectRoomMapping,
@@ -263,4 +266,5 @@ async function repairMatrixDirectRooms(params) {
263
266
  directContentAfter: mappingWrite.directContentAfter
264
267
  };
265
268
  }
269
+ //#endregion
266
270
  export { MsgType as _, repairMatrixDirectRooms as a, isStrictDirectMembership as c, buildMatrixMessageRelation as d, resolveMatrixReplyToEventId as f, MSC4357_LIVE_KEY as g, MATRIX_OPENCLAW_FINALIZED_PREVIEW_KEY as h, promoteMatrixDirectRoomCandidate as i, isStrictDirectRoom as l, EventType as m, inspectMatrixDirectRooms as n, direct_room_exports as o, resolveMatrixThreadRootId as p, persistMatrixDirectRoomMapping as r, hasDirectMatrixMemberFlag as s, direct_management_exports as t, readJoinedMatrixMembers as u, RelationType as v };
@@ -1,9 +1,9 @@
1
- import { i as __exportAll } from "./doctor-contract-DybEjJcd.mjs";
2
- import { i as normalizeMatrixMessagingTarget, n as isMatrixQualifiedUserId } from "./target-ids-DltG_ZHJ.mjs";
3
- import { u as resolveMatrixAuth } from "./client-7eyTX0cu.mjs";
4
- import { t as MatrixAuthedHttpClient } from "./http-client-CxTmU1kT.mjs";
1
+ import { n as __exportAll } from "./runtime-doctor-migrations-hxP-CXX7.mjs";
2
+ import { i as normalizeMatrixMessagingTarget, n as isMatrixQualifiedUserId } from "./target-ids-HhcaKX1n.mjs";
3
+ import { u as resolveMatrixAuth } from "./client-BEl7PU1_.mjs";
4
+ import { t as MatrixAuthedHttpClient } from "./http-client-ByR4STVQ.mjs";
5
5
  import { isRecord, normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
6
- // extensions/matrix/src/directory-live.ts
6
+ //#region extensions/matrix/src/directory-live.ts
7
7
  var directory_live_exports = /* @__PURE__ */ __exportAll({
8
8
  listMatrixDirectoryGroupsLive: () => listMatrixDirectoryGroupsLive,
9
9
  listMatrixDirectoryPeersLive: () => listMatrixDirectoryPeersLive
@@ -114,4 +114,5 @@ async function listMatrixDirectoryGroupsLive(params) {
114
114
  }
115
115
  return results;
116
116
  }
117
+ //#endregion
117
118
  export { listMatrixDirectoryGroupsLive as n, listMatrixDirectoryPeersLive as r, directory_live_exports as t };
@@ -0,0 +1,38 @@
1
+ import { t as runtime_doctor_migrations_exports } from "./runtime-doctor-migrations-hxP-CXX7.mjs";
2
+ import { isRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
3
+ //#region extensions/matrix/src/doctor-contract.ts
4
+ function parseMatrixStreamingMode(value) {
5
+ if (typeof value !== "string") return null;
6
+ const normalized = value.trim().toLowerCase();
7
+ return normalized === "partial" || normalized === "quiet" || normalized === "progress" || normalized === "off" ? normalized : null;
8
+ }
9
+ const streamingAliasMigration = (0, runtime_doctor_migrations_exports.defineChannelAliasMigration)({
10
+ channelId: "matrix",
11
+ streaming: {
12
+ defaultMode: "off",
13
+ resolveMode: (entry) => {
14
+ const streaming = isRecord(entry.streaming) ? entry.streaming : null;
15
+ const parsed = parseMatrixStreamingMode(streaming ? streaming.mode : entry.streaming);
16
+ if (parsed) return parsed;
17
+ return entry.streaming === true ? "partial" : "off";
18
+ }
19
+ },
20
+ accountStreamingReplacesRoot: true
21
+ });
22
+ const legacyConfigRules = streamingAliasMigration.legacyConfigRules;
23
+ function normalizeCompatibilityConfig({ cfg }) {
24
+ const changes = [];
25
+ const withoutJunkStreamMode = (0, runtime_doctor_migrations_exports.stripRetiredChannelKeys)({
26
+ cfg,
27
+ channelId: "matrix",
28
+ keys: /* @__PURE__ */ new Set(["streamMode"]),
29
+ scope: "root-and-accounts",
30
+ onRemove: ({ key, pathPrefix }) => changes.push(`Removed ${pathPrefix}.${key} (never read by the Matrix runtime).`)
31
+ }).config;
32
+ return streamingAliasMigration.normalizeChannelConfig({
33
+ cfg: withoutJunkStreamMode,
34
+ changes
35
+ });
36
+ }
37
+ //#endregion
38
+ export { normalizeCompatibilityConfig as n, legacyConfigRules as t };
@@ -1,7 +1,7 @@
1
- import { _ as MsgType } from "./direct-management-DDaWVbQI.mjs";
2
- import { a as sendSingleTextMessageMatrix, f as prepareMatrixSingleText, t as editMessageMatrix } from "./send-C1qeMQAy.mjs";
1
+ import { _ as MsgType } from "./direct-management-ZcjZgYEl.mjs";
2
+ import { a as sendSingleTextMessageMatrix, f as prepareMatrixSingleText, t as editMessageMatrix } from "./send-BGgwE5pV.mjs";
3
3
  import { createFinalizableDraftLifecycle } from "openclaw/plugin-sdk/channel-outbound";
4
- // extensions/matrix/src/matrix/draft-stream.ts
4
+ //#region extensions/matrix/src/matrix/draft-stream.ts
5
5
  const DEFAULT_THROTTLE_MS = 1e3;
6
6
  function createMatrixDraftStream(params) {
7
7
  const { roomId, client, cfg, threadId, accountId, log } = params;
@@ -149,4 +149,5 @@ function createMatrixDraftStream(params) {
149
149
  mustDeliverFinalNormally: () => sendFailed || finalizeInPlaceBlocked
150
150
  };
151
151
  }
152
+ //#endregion
152
153
  export { createMatrixDraftStream };