@openclaw/matrix 2026.6.8 → 2026.6.9

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 (47) hide show
  1. package/dist/api.js +4 -4
  2. package/dist/{approval-handler.runtime-3Yb4YPqM.js → approval-handler.runtime-DRcJ4T3S.js} +4 -4
  3. package/dist/{approval-ids-CObb3QAE.js → approval-ids-BxDWGGtc.js} +1 -1
  4. package/dist/{approval-reaction-auth-RxMGV7PW.js → approval-reaction-auth-BnjVbO3E.js} +2 -2
  5. package/dist/{channel-B-92QMpA.js → channel-CphxlhZu.js} +9 -9
  6. package/dist/channel-plugin-api.js +1 -1
  7. package/dist/{channel.runtime-D5cUY7H5.js → channel.runtime-BJ1lzNTU.js} +6 -6
  8. package/dist/{cli-DIAzIKLC.js → cli-ixiQFyMd.js} +9 -9
  9. package/dist/{cli-metadata-CdRmBMLA.js → cli-metadata-CDLKjGQJ.js} +1 -1
  10. package/dist/cli-metadata.js +1 -1
  11. package/dist/{client-Btbr03EH.js → client-CNivl1aV.js} +2 -2
  12. package/dist/{client-bootstrap-BmSGhceR.js → client-bootstrap-B9WG3S-N.js} +1 -1
  13. package/dist/{client-2Uik1ank.js → client-jJYrQqEm.js} +2 -2
  14. package/dist/{config-schema-DidVNzlW.js → config-schema-26chdmvB.js} +1 -1
  15. package/dist/contract-api.js +2 -2
  16. package/dist/{create-client-D0OspqzB.js → create-client-CA759SO2.js} +3 -3
  17. package/dist/{directory-live-ClJL6vpb.js → directory-live-DKe-ZwBH.js} +2 -2
  18. package/dist/doctor-contract-api.js +58 -1
  19. package/dist/{draft-stream-D13W24D9.js → draft-stream-DnXbpWN-.js} +1 -1
  20. package/dist/{file-sync-store-Ni-pkFde.js → file-sync-store-ByKRkbHY.js} +1 -1
  21. package/dist/index.js +1 -1
  22. package/dist/{legacy-crypto-restore-Bm6HmeN5.js → legacy-crypto-restore-BSfdJNJn.js} +1 -1
  23. package/dist/{media-text-BlzZ2pJ_.js → media-text-Dzzc1s2K.js} +1 -1
  24. package/dist/{messages-Dj_vS4L5.js → messages-BO9h35QI.js} +3 -3
  25. package/dist/{monitor-CUK5ahuI.js → monitor-uKuCaVCL.js} +32 -23
  26. package/dist/plugin-entry.handlers.runtime.js +1 -1
  27. package/dist/probe.runtime-w7uM0_6-.js +3 -0
  28. package/dist/{profile-update-UiXvxx4j.js → profile-update-KCzyKPsV.js} +2 -2
  29. package/dist/{reaction-events-BubEhymF.js → reaction-events-BEO6rF08.js} +1 -1
  30. package/dist/{resolve-targets-B0bvOsvg.js → resolve-targets-CwHA0nDu.js} +1 -1
  31. package/dist/{resolver.runtime-DZznDL7A.js → resolver.runtime-8XXfvmpi.js} +1 -1
  32. package/dist/{sdk-CRxm68gK.js → sdk-DLlal_yG.js} +2 -2
  33. package/dist/{send-DelsoaW7.js → send-CQoq0bfR.js} +1 -1
  34. package/dist/session-binding-contract-api.js +1 -1
  35. package/dist/{setup-bootstrap-CAPa5pNe.js → setup-bootstrap-CF0GimJg.js} +2 -2
  36. package/dist/{setup-core-DqU2DHs2.js → setup-core-0q_2Acbn.js} +1 -1
  37. package/dist/setup-plugin-api.js +3 -3
  38. package/dist/{setup-surface-DGv1Dck3.js → setup-surface-CZYAUrKQ.js} +4 -4
  39. package/dist/{shared-ChcRGI9k.js → shared-eJVQiO9S.js} +3 -3
  40. package/dist/{startup-verification-BoDITB_u.js → startup-verification-BNry4Mje.js} +1 -1
  41. package/dist/{storage-C10h2piS.js → storage-D3JJ0OzE.js} +52 -26
  42. package/dist/{thread-bindings-DJhG8FYR.js → thread-bindings-BIEaF1Nq.js} +2 -2
  43. package/dist/{tool-actions.runtime-DfCas23A.js → tool-actions.runtime-Ce4n5hC2.js} +6 -6
  44. package/dist/{verification-Conlh2ZF.js → verification-C3Pv2eJF.js} +1 -1
  45. package/npm-shrinkwrap.json +3 -3
  46. package/package.json +4 -4
  47. package/dist/probe.runtime-qpADlVH6.js +0 -3
package/dist/api.js CHANGED
@@ -1,11 +1,11 @@
1
1
  import { a as resolveMatrixDefaultOrOnlyAccountId, i as resolveMatrixChannelConfig, n as requiresExplicitMatrixDefaultAccount, r as resolveConfiguredMatrixAccountIds, t as findMatrixAccountEntry } from "./account-selection-Bv_ZuOu4.js";
2
2
  import { n as listMatrixEnvAccountIds, r as resolveMatrixEnvAccountToken, t as getMatrixScopedEnvVarNames } from "./env-vars-KzaYveuy.js";
3
3
  import { a as resolveMatrixCredentialsPath, c as resolveMatrixLegacyFlatStoreRoot, i as resolveMatrixCredentialsFilename, l as sanitizeMatrixPathSegment, n as resolveMatrixAccountStorageRoot, o as resolveMatrixHomeserverKey, r as resolveMatrixCredentialsDir, s as resolveMatrixLegacyFlatStoragePaths, t as hashMatrixAccessToken } from "./storage-paths-BWo_ZEMC.js";
4
- import { n as matrixSetupAdapter, t as createMatrixSetupWizardProxy } from "./setup-core-DqU2DHs2.js";
5
- import { t as matrixPlugin } from "./channel-B-92QMpA.js";
4
+ import { n as matrixSetupAdapter, t as createMatrixSetupWizardProxy } from "./setup-core-0q_2Acbn.js";
5
+ import { t as matrixPlugin } from "./channel-CphxlhZu.js";
6
6
  import { d as setMatrixThreadBindingIdleTimeoutBySessionKey, n as getMatrixThreadBindingManager, p as setMatrixThreadBindingMaxAgeBySessionKey, s as resetMatrixThreadBindingsForTests } from "./thread-bindings-shared-CKnY4LSd.js";
7
- import { n as matrixOnboardingAdapter } from "./setup-surface-DGv1Dck3.js";
8
- import { t as createMatrixThreadBindingManager } from "./thread-bindings-DJhG8FYR.js";
7
+ import { n as matrixOnboardingAdapter } from "./setup-surface-CZYAUrKQ.js";
8
+ import { t as createMatrixThreadBindingManager } from "./thread-bindings-BIEaF1Nq.js";
9
9
  //#region extensions/matrix/api.ts
10
10
  const matrixSessionBindingAdapterChannels = ["matrix"];
11
11
  //#endregion
@@ -1,9 +1,9 @@
1
- import { g as resolveMatrixAccount } from "./setup-core-DqU2DHs2.js";
2
- import { _ as shouldHandleMatrixApprovalRequest, g as isMatrixAnyApprovalClientEnabled } from "./channel-B-92QMpA.js";
1
+ import { g as resolveMatrixAccount } from "./setup-core-0q_2Acbn.js";
2
+ import { _ as shouldHandleMatrixApprovalRequest, g as isMatrixAnyApprovalClientEnabled } from "./channel-CphxlhZu.js";
3
3
  import { a as resolveMatrixTargetIdentity } from "./target-ids-B-5aQxwn.js";
4
- import { a as sendMessageMatrix, i as reactMatrixMessage, p as repairMatrixDirectRooms, s as sendSingleTextMessageMatrix } from "./send-DelsoaW7.js";
4
+ import { a as sendMessageMatrix, i as reactMatrixMessage, p as repairMatrixDirectRooms, s as sendSingleTextMessageMatrix } from "./send-CQoq0bfR.js";
5
5
  import { a as unregisterMatrixApprovalReactionTarget, n as listMatrixApprovalReactionBindings, r as registerMatrixApprovalReactionTarget, t as buildMatrixApprovalReactionHint } from "./approval-reactions-BRGQgOu2.js";
6
- import { n as editMatrixMessage, t as deleteMatrixMessage } from "./messages-Dj_vS4L5.js";
6
+ import { n as editMatrixMessage, t as deleteMatrixMessage } from "./messages-BO9h35QI.js";
7
7
  import { listMessageReceiptPlatformIds, resolveMessageReceiptPrimaryId } from "openclaw/plugin-sdk/channel-outbound";
8
8
  import { normalizeUniqueStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
9
9
  import { buildChannelApprovalNativeTargetKey } from "openclaw/plugin-sdk/approval-native-runtime";
@@ -1,4 +1,4 @@
1
- import { a as normalizeMatrixUserId } from "./config-schema-DidVNzlW.js";
1
+ import { a as normalizeMatrixUserId } from "./config-schema-26chdmvB.js";
2
2
  //#region extensions/matrix/src/approval-ids.ts
3
3
  function normalizeMatrixApproverId(value) {
4
4
  return normalizeMatrixUserId(String(value)) || void 0;
@@ -1,5 +1,5 @@
1
- import { g as resolveMatrixAccount } from "./setup-core-DqU2DHs2.js";
2
- import { t as normalizeMatrixApproverId } from "./approval-ids-CObb3QAE.js";
1
+ import { g as resolveMatrixAccount } from "./setup-core-0q_2Acbn.js";
2
+ import { t as normalizeMatrixApproverId } from "./approval-ids-BxDWGGtc.js";
3
3
  import { resolveApprovalApprovers } from "openclaw/plugin-sdk/approval-auth-runtime";
4
4
  //#region extensions/matrix/src/approval-reaction-auth.ts
5
5
  function normalizeMatrixExecApproverId(value) {
@@ -1,8 +1,8 @@
1
1
  import { n as requiresExplicitMatrixDefaultAccount } from "./account-selection-Bv_ZuOu4.js";
2
2
  import { a as resolveMatrixAccountConfig } from "./account-config-BZWN9tGS.js";
3
- import { d as resolveSingleAccountPromotionTarget, f as singleAccountKeysToMove, g as resolveMatrixAccount, h as resolveDefaultMatrixAccountId, n as matrixSetupAdapter, p as listMatrixAccountIds, t as createMatrixSetupWizardProxy, u as namedAccountPromotionKeys } from "./setup-core-DqU2DHs2.js";
4
- import { a as normalizeMatrixUserId, n as DEFAULT_ACCOUNT_ID$2, r as matrixConfigAdapter, t as MatrixChannelConfigSchema } from "./config-schema-DidVNzlW.js";
5
- import { t as normalizeMatrixApproverId } from "./approval-ids-CObb3QAE.js";
3
+ import { d as resolveSingleAccountPromotionTarget, f as singleAccountKeysToMove, g as resolveMatrixAccount, h as resolveDefaultMatrixAccountId, n as matrixSetupAdapter, p as listMatrixAccountIds, t as createMatrixSetupWizardProxy, u as namedAccountPromotionKeys } from "./setup-core-0q_2Acbn.js";
4
+ import { a as normalizeMatrixUserId, n as DEFAULT_ACCOUNT_ID$2, r as matrixConfigAdapter, t as MatrixChannelConfigSchema } from "./config-schema-26chdmvB.js";
5
+ import { t as normalizeMatrixApproverId } from "./approval-ids-BxDWGGtc.js";
6
6
  import { a as resolveMatrixTargetIdentity, i as resolveMatrixDirectUserId, n as normalizeMatrixMessagingTarget, r as normalizeMatrixResolvableTarget } from "./target-ids-B-5aQxwn.js";
7
7
  import { t as formatMatrixErrorMessage } from "./errors-C47hvAF8.js";
8
8
  import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-Dq8OZWHF.js";
@@ -129,7 +129,7 @@ const matrixMessageActions = {
129
129
  return extractToolSend(args, "sendMessage");
130
130
  },
131
131
  handleAction: async (ctx) => {
132
- const { handleMatrixAction } = await import("./tool-actions.runtime-DfCas23A.js");
132
+ const { handleMatrixAction } = await import("./tool-actions.runtime-Ce4n5hC2.js");
133
133
  const { action, params, cfg, accountId, mediaLocalRoots } = ctx;
134
134
  const dispatch = async (actionParams) => await handleMatrixAction({
135
135
  ...actionParams,
@@ -594,7 +594,7 @@ const matrixNativeApprovalCapability = createApproverRestrictedNativeApprovalCap
594
594
  accountId,
595
595
  request
596
596
  }),
597
- load: async () => (await import("./approval-handler.runtime-3Yb4YPqM.js")).matrixApprovalNativeRuntime
597
+ load: async () => (await import("./approval-handler.runtime-DRcJ4T3S.js")).matrixApprovalNativeRuntime
598
598
  })
599
599
  });
600
600
  const splitMatrixApprovalCapability = splitChannelApprovalCapability(matrixNativeApprovalCapability);
@@ -756,7 +756,7 @@ function resolveMatrixGroupToolPolicy(params) {
756
756
  }
757
757
  //#endregion
758
758
  //#region extensions/matrix/src/resolver.ts
759
- const loadMatrixChannelRuntime$1 = createLazyRuntimeNamedExport(() => import("./resolver.runtime-DZznDL7A.js"), "matrixResolverRuntime");
759
+ const loadMatrixChannelRuntime$1 = createLazyRuntimeNamedExport(() => import("./resolver.runtime-8XXfvmpi.js"), "matrixResolverRuntime");
760
760
  const matrixResolverAdapter = { resolveTargets: async ({ cfg, accountId, inputs, kind, runtime }) => (await loadMatrixChannelRuntime$1()).resolveMatrixTargets({
761
761
  cfg,
762
762
  accountId,
@@ -945,8 +945,8 @@ async function runMatrixStartupMaintenance(params) {
945
945
  //#endregion
946
946
  //#region extensions/matrix/src/channel.ts
947
947
  let matrixStartupLock = Promise.resolve();
948
- const loadMatrixSetupWizard = createLazyRuntimeNamedExport(() => import("./setup-surface-DGv1Dck3.js").then((n) => n.t), "matrixSetupWizard");
949
- const loadMatrixChannelRuntime = createLazyRuntimeNamedExport(() => import("./channel.runtime-D5cUY7H5.js"), "matrixChannelRuntime");
948
+ const loadMatrixSetupWizard = createLazyRuntimeNamedExport(() => import("./setup-surface-CZYAUrKQ.js").then((n) => n.t), "matrixSetupWizard");
949
+ const loadMatrixChannelRuntime = createLazyRuntimeNamedExport(() => import("./channel.runtime-BJ1lzNTU.js"), "matrixChannelRuntime");
950
950
  let matrixDoctorModulePromise = null;
951
951
  const loadMatrixDoctorModule = async () => {
952
952
  matrixDoctorModulePromise ??= import("./doctor-BwpkOBwr.js");
@@ -1322,7 +1322,7 @@ const matrixPlugin = createChatChannelPlugin({
1322
1322
  await previousLock;
1323
1323
  let monitorMatrixProvider;
1324
1324
  try {
1325
- monitorMatrixProvider = (await import("./monitor-CUK5ahuI.js")).monitorMatrixProvider;
1325
+ monitorMatrixProvider = (await import("./monitor-uKuCaVCL.js")).monitorMatrixProvider;
1326
1326
  } finally {
1327
1327
  releaseLock();
1328
1328
  }
@@ -1,2 +1,2 @@
1
- import { t as matrixPlugin } from "./channel-B-92QMpA.js";
1
+ import { t as matrixPlugin } from "./channel-CphxlhZu.js";
2
2
  export { matrixPlugin };
@@ -1,10 +1,10 @@
1
- import { a as sendMessageMatrix, c as sendTypingMatrix, o as sendPollMatrix } from "./send-DelsoaW7.js";
1
+ import { a as sendMessageMatrix, c as sendTypingMatrix, o as sendPollMatrix } from "./send-CQoq0bfR.js";
2
2
  import { t as isBunRuntime } from "./runtime-BefyhPWv.js";
3
- import { f as resolveMatrixAuth } from "./shared-ChcRGI9k.js";
4
- import "./client-2Uik1ank.js";
5
- import { n as listMatrixDirectoryGroupsLive, r as listMatrixDirectoryPeersLive } from "./directory-live-ClJL6vpb.js";
3
+ import { f as resolveMatrixAuth } from "./shared-eJVQiO9S.js";
4
+ import "./client-jJYrQqEm.js";
5
+ import { n as listMatrixDirectoryGroupsLive, r as listMatrixDirectoryPeersLive } from "./directory-live-DKe-ZwBH.js";
6
6
  import { f as resolveOutboundSendDep, n as chunkTextForOutbound } from "./runtime-api-CsBoesCU.js";
7
- import { t as resolveMatrixTargets } from "./resolve-targets-B0bvOsvg.js";
7
+ import { t as resolveMatrixTargets } from "./resolve-targets-CwHA0nDu.js";
8
8
  import { createReplyToFanout } from "openclaw/plugin-sdk/channel-outbound";
9
9
  import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
10
10
  import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
@@ -13,7 +13,7 @@ import { resolvePayloadMediaUrls } from "openclaw/plugin-sdk/reply-payload";
13
13
  //#region extensions/matrix/src/matrix/probe.ts
14
14
  let matrixProbeRuntimeDepsPromise;
15
15
  async function loadMatrixProbeRuntimeDeps() {
16
- matrixProbeRuntimeDepsPromise ??= import("./probe.runtime-qpADlVH6.js").then((runtimeModule) => ({ createMatrixClient: runtimeModule.createMatrixClient }));
16
+ matrixProbeRuntimeDepsPromise ??= import("./probe.runtime-w7uM0_6-.js").then((runtimeModule) => ({ createMatrixClient: runtimeModule.createMatrixClient }));
17
17
  return await matrixProbeRuntimeDepsPromise;
18
18
  }
19
19
  async function probeMatrix(params) {
@@ -1,14 +1,14 @@
1
1
  import { a as resolveMatrixAccountConfig } from "./account-config-BZWN9tGS.js";
2
2
  import { t as getMatrixRuntime } from "./runtime-6S3DNFNv.js";
3
- import { c as resolveMatrixConfigPath, g as resolveMatrixAccount, l as updateMatrixAccountConfig, n as matrixSetupAdapter } from "./setup-core-DqU2DHs2.js";
3
+ import { c as resolveMatrixConfigPath, g as resolveMatrixAccount, l as updateMatrixAccountConfig, n as matrixSetupAdapter } from "./setup-core-0q_2Acbn.js";
4
4
  import { t as formatMatrixErrorMessage } from "./errors-C47hvAF8.js";
5
- import { n as withResolvedActionClient } from "./client-Btbr03EH.js";
6
- import { p as resolveMatrixAuthContext } from "./shared-ChcRGI9k.js";
7
- import "./client-2Uik1ank.js";
5
+ import { n as withResolvedActionClient } from "./client-CNivl1aV.js";
6
+ import { p as resolveMatrixAuthContext } from "./shared-eJVQiO9S.js";
7
+ import "./client-jJYrQqEm.js";
8
8
  import { i as formatZonedTimestamp } from "./runtime-api-CsBoesCU.js";
9
9
  import { isOpenClawManagedMatrixDevice, summarizeMatrixDeviceHealth } from "./device-health-D4LBxuPq.js";
10
- import { n as updateMatrixOwnProfile, t as applyMatrixProfileUpdate } from "./profile-update-UiXvxx4j.js";
11
- import { a as confirmMatrixVerificationSas, b as verifyMatrixRecoveryKey, c as getMatrixRoomKeyBackupStatus, d as listMatrixVerifications, f as mismatchMatrixVerificationSas, g as runMatrixSelfVerification, h as restoreMatrixRoomKeyBackup, l as getMatrixVerificationSas, m as resetMatrixRoomKeyBackup, n as bootstrapMatrixVerification, p as requestMatrixVerification, r as cancelMatrixVerification, t as acceptMatrixVerification, u as getMatrixVerificationStatus, v as startMatrixVerification } from "./verification-Conlh2ZF.js";
10
+ import { n as updateMatrixOwnProfile, t as applyMatrixProfileUpdate } from "./profile-update-KCzyKPsV.js";
11
+ import { a as confirmMatrixVerificationSas, b as verifyMatrixRecoveryKey, c as getMatrixRoomKeyBackupStatus, d as listMatrixVerifications, f as mismatchMatrixVerificationSas, g as runMatrixSelfVerification, h as restoreMatrixRoomKeyBackup, l as getMatrixVerificationSas, m as resetMatrixRoomKeyBackup, n as bootstrapMatrixVerification, p as requestMatrixVerification, r as cancelMatrixVerification, t as acceptMatrixVerification, u as getMatrixVerificationStatus, v as startMatrixVerification } from "./verification-C3Pv2eJF.js";
12
12
  import { t as resolveMatrixRoomKeyBackupIssue } from "./backup-health-Dm_YMVFT.js";
13
13
  import { setMatrixSdkConsoleLogging, setMatrixSdkLogMode } from "./logging-QH-48Gr6.js";
14
14
  import { normalizeAccountId } from "openclaw/plugin-sdk/account-id";
@@ -38,11 +38,11 @@ let matrixCliExitScheduled = false;
38
38
  let matrixActionClientModulePromise;
39
39
  let matrixDirectManagementModulePromise;
40
40
  function loadMatrixActionClientModule() {
41
- matrixActionClientModulePromise ??= import("./client-Btbr03EH.js").then((n) => n.t);
41
+ matrixActionClientModulePromise ??= import("./client-CNivl1aV.js").then((n) => n.t);
42
42
  return matrixActionClientModulePromise;
43
43
  }
44
44
  function loadMatrixDirectManagementModule() {
45
- matrixDirectManagementModulePromise ??= import("./send-DelsoaW7.js").then((n) => n.d);
45
+ matrixDirectManagementModulePromise ??= import("./send-CQoq0bfR.js").then((n) => n.d);
46
46
  return matrixDirectManagementModulePromise;
47
47
  }
48
48
  function scheduleMatrixCliExit() {
@@ -212,7 +212,7 @@ async function addMatrixAccount(params) {
212
212
  backupVersion: null
213
213
  };
214
214
  if (accountConfig.encryption === true) {
215
- const { maybeBootstrapNewEncryptedMatrixAccount } = await import("./setup-bootstrap-CAPa5pNe.js");
215
+ const { maybeBootstrapNewEncryptedMatrixAccount } = await import("./setup-bootstrap-CF0GimJg.js");
216
216
  verificationBootstrap = await maybeBootstrapNewEncryptedMatrixAccount({
217
217
  previousCfg: cfg,
218
218
  cfg: updated,
@@ -2,7 +2,7 @@ import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry";
2
2
  //#region extensions/matrix/src/cli-metadata.ts
3
3
  function registerMatrixCliMetadata(api) {
4
4
  api.registerCli(async ({ program }) => {
5
- const { registerMatrixCli } = await import("./cli-DIAzIKLC.js");
5
+ const { registerMatrixCli } = await import("./cli-ixiQFyMd.js");
6
6
  registerMatrixCli({ program });
7
7
  }, { descriptors: [{
8
8
  name: "matrix",
@@ -1,2 +1,2 @@
1
- import { n as registerMatrixCliMetadata, t as cli_metadata_default } from "./cli-metadata-CdRmBMLA.js";
1
+ import { n as registerMatrixCliMetadata, t as cli_metadata_default } from "./cli-metadata-CDLKjGQJ.js";
2
2
  export { cli_metadata_default as default, registerMatrixCliMetadata };
@@ -1,6 +1,6 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
2
- import { u as resolveMatrixRoomId } from "./send-DelsoaW7.js";
3
- import { n as withResolvedRuntimeMatrixClient } from "./client-bootstrap-BmSGhceR.js";
2
+ import { u as resolveMatrixRoomId } from "./send-CQoq0bfR.js";
3
+ import { n as withResolvedRuntimeMatrixClient } from "./client-bootstrap-B9WG3S-N.js";
4
4
  //#region extensions/matrix/src/matrix/actions/client.ts
5
5
  var client_exports = /* @__PURE__ */ __exportAll({
6
6
  withResolvedActionClient: () => withResolvedActionClient,
@@ -10,7 +10,7 @@ var client_bootstrap_exports = /* @__PURE__ */ __exportAll({
10
10
  });
11
11
  let matrixSharedClientRuntimeDepsPromise;
12
12
  async function loadMatrixSharedClientRuntimeDeps() {
13
- matrixSharedClientRuntimeDepsPromise ??= Promise.all([import("./client-2Uik1ank.js").then((n) => n.t), import("./shared-ChcRGI9k.js").then((n) => n.a)]).then(([clientModule, sharedModule]) => ({
13
+ matrixSharedClientRuntimeDepsPromise ??= Promise.all([import("./client-jJYrQqEm.js").then((n) => n.t), import("./shared-eJVQiO9S.js").then((n) => n.a)]).then(([clientModule, sharedModule]) => ({
14
14
  acquireSharedMatrixClient: clientModule.acquireSharedMatrixClient,
15
15
  resolveMatrixAuthContext: clientModule.resolveMatrixAuthContext,
16
16
  releaseSharedClientInstance: sharedModule.releaseSharedClientInstance
@@ -3,8 +3,8 @@ import { t as getMatrixScopedEnvVarNames } from "./env-vars-KzaYveuy.js";
3
3
  import { i as resolveScopedMatrixEnvConfig, r as resolveMatrixEnvAuthReadiness, t as hasReadyMatrixEnvAuth } from "./env-auth-DIzOApj0.js";
4
4
  import { n as validateMatrixHomeserverUrl, t as resolveValidatedMatrixHomeserverUrl } from "./url-validation-GRHde6lq.js";
5
5
  import { t as isBunRuntime } from "./runtime-BefyhPWv.js";
6
- import { d as backfillMatrixAuthDeviceIdAfterStartup, f as resolveMatrixAuth, i as resolveSharedMatrixClient, m as resolveMatrixConfigForAccount, n as releaseSharedClientInstance, o as stopSharedClientForAccount, p as resolveMatrixAuthContext, r as removeSharedClientInstance, s as stopSharedClientInstance, t as acquireSharedMatrixClient } from "./shared-ChcRGI9k.js";
7
- import { t as createMatrixClient } from "./create-client-D0OspqzB.js";
6
+ import { d as backfillMatrixAuthDeviceIdAfterStartup, f as resolveMatrixAuth, i as resolveSharedMatrixClient, m as resolveMatrixConfigForAccount, n as releaseSharedClientInstance, o as stopSharedClientForAccount, p as resolveMatrixAuthContext, r as removeSharedClientInstance, s as stopSharedClientInstance, t as acquireSharedMatrixClient } from "./shared-eJVQiO9S.js";
7
+ import { t as createMatrixClient } from "./create-client-CA759SO2.js";
8
8
  //#region extensions/matrix/src/matrix/client.ts
9
9
  var client_exports = /* @__PURE__ */ __exportAll({
10
10
  acquireSharedMatrixClient: () => acquireSharedMatrixClient,
@@ -1,5 +1,5 @@
1
1
  import { a as resolveMatrixAccountConfig } from "./account-config-BZWN9tGS.js";
2
- import { g as resolveMatrixAccount, h as resolveDefaultMatrixAccountId, p as listMatrixAccountIds } from "./setup-core-DqU2DHs2.js";
2
+ import { g as resolveMatrixAccount, h as resolveDefaultMatrixAccountId, p as listMatrixAccountIds } from "./setup-core-0q_2Acbn.js";
3
3
  import { adaptScopedAccountAccessor, createScopedChannelConfigAdapter } from "openclaw/plugin-sdk/channel-config-helpers";
4
4
  import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
5
5
  import { DEFAULT_ACCOUNT_ID as DEFAULT_ACCOUNT_ID$1 } from "openclaw/plugin-sdk/account-id";
@@ -1,3 +1,3 @@
1
- import { d as resolveSingleAccountPromotionTarget, f as singleAccountKeysToMove, n as matrixSetupAdapter, u as namedAccountPromotionKeys } from "./setup-core-DqU2DHs2.js";
2
- import { n as matrixOnboardingAdapter } from "./setup-surface-DGv1Dck3.js";
1
+ import { d as resolveSingleAccountPromotionTarget, f as singleAccountKeysToMove, n as matrixSetupAdapter, u as namedAccountPromotionKeys } from "./setup-core-0q_2Acbn.js";
2
+ import { n as matrixOnboardingAdapter } from "./setup-surface-CZYAUrKQ.js";
3
3
  export { matrixSetupAdapter, matrixOnboardingAdapter as matrixSetupWizard, namedAccountPromotionKeys, resolveSingleAccountPromotionTarget, singleAccountKeysToMove };
@@ -1,7 +1,7 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
2
2
  import { t as resolveValidatedMatrixHomeserverUrl } from "./url-validation-GRHde6lq.js";
3
- import { n as maybeMigrateLegacyStorage, o as resolveMatrixStoragePaths, s as writeStorageMeta } from "./storage-C10h2piS.js";
4
- import "./shared-ChcRGI9k.js";
3
+ import { d as writeStorageMeta, l as resolveMatrixStoragePaths, r as maybeMigrateLegacyStorage } from "./storage-D3JJ0OzE.js";
4
+ import "./shared-eJVQiO9S.js";
5
5
  import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
6
6
  import fs from "node:fs";
7
7
  import { ssrfPolicyFromDangerouslyAllowPrivateNetwork } from "openclaw/plugin-sdk/ssrf-runtime";
@@ -9,7 +9,7 @@ import { ssrfPolicyFromDangerouslyAllowPrivateNetwork } from "openclaw/plugin-sd
9
9
  var create_client_exports = /* @__PURE__ */ __exportAll({ createMatrixClient: () => createMatrixClient });
10
10
  let matrixCreateClientRuntimeDepsPromise;
11
11
  async function loadMatrixCreateClientRuntimeDeps() {
12
- matrixCreateClientRuntimeDepsPromise ??= Promise.all([import("./sdk-CRxm68gK.js"), import("./logging-QH-48Gr6.js")]).then(([sdkModule, loggingModule]) => ({
12
+ matrixCreateClientRuntimeDepsPromise ??= Promise.all([import("./sdk-DLlal_yG.js"), import("./logging-QH-48Gr6.js")]).then(([sdkModule, loggingModule]) => ({
13
13
  MatrixClient: sdkModule.MatrixClient,
14
14
  ensureMatrixSdkLoggingConfigured: loggingModule.ensureMatrixSdkLoggingConfigured
15
15
  }));
@@ -1,7 +1,7 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
2
2
  import { n as normalizeMatrixMessagingTarget, t as isMatrixQualifiedUserId } from "./target-ids-B-5aQxwn.js";
3
- import { f as resolveMatrixAuth } from "./shared-ChcRGI9k.js";
4
- import "./client-2Uik1ank.js";
3
+ import { f as resolveMatrixAuth } from "./shared-eJVQiO9S.js";
4
+ import "./client-jJYrQqEm.js";
5
5
  import { t as MatrixAuthedHttpClient } from "./http-client-nipb5tk1.js";
6
6
  import { normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
7
7
  //#region extensions/matrix/src/directory-live.ts
@@ -1,11 +1,13 @@
1
1
  import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-Dq8OZWHF.js";
2
2
  import { D as writeMatrixRecoveryKeyStateToStore, S as writeMatrixIdbSnapshotJsonToStore, a as hasMatrixLegacyCryptoMigrationStateInStore, d as openMatrixLegacyCryptoMigrationStoreOptions, f as openMatrixRecoveryKeyStoreOptions, h as readLegacyMatrixRecoveryKeyState, i as hasMatrixIdbSnapshotStateInStore, n as MATRIX_LEGACY_CRYPTO_MIGRATION_FILENAME, o as hasMatrixRecoveryKeyStateInStore, p as readLegacyMatrixLegacyCryptoMigrationState, r as MATRIX_RECOVERY_KEY_FILENAME, t as MATRIX_IDB_SNAPSHOT_FILENAME, u as openMatrixIdbSnapshotStoreOptions, w as writeMatrixLegacyCryptoMigrationStateToStore } from "./crypto-state-store-DK2tcEyP.js";
3
- import { a as readLegacyMatrixSyncCacheState, i as openMatrixSyncCacheStoreOptions, o as writeMatrixSyncCacheStateToStore, r as hasMatrixSyncCacheStateInStore } from "./file-sync-store-Ni-pkFde.js";
3
+ import { a as openMatrixStorageMetaStoreOptions, i as normalizeMatrixStorageMetadata, n as hasMatrixStorageMetaStateInStore, u as writeMatrixStorageMetaStateToStore } from "./storage-D3JJ0OzE.js";
4
+ import { a as readLegacyMatrixSyncCacheState, i as openMatrixSyncCacheStoreOptions, o as writeMatrixSyncCacheStateToStore, r as hasMatrixSyncCacheStateInStore } from "./file-sync-store-ByKRkbHY.js";
4
5
  import { r as readLegacyMatrixIdbSnapshotState } from "./idb-persistence-BGY1CJ7J.js";
5
6
  import path from "node:path";
6
7
  import fs from "node:fs/promises";
7
8
  //#region extensions/matrix/doctor-contract-api.ts
8
9
  const MATRIX_SYNC_CACHE_FILENAME = "bot-storage.json";
10
+ const MATRIX_STORAGE_META_FILENAME = "storage-meta.json";
9
11
  async function fileExists(filePath) {
10
12
  try {
11
13
  return (await fs.stat(filePath)).isFile();
@@ -38,6 +40,13 @@ async function collectLegacyMatrixStateRoots(stateDir, filename) {
38
40
  async function collectLegacySyncCacheRoots(stateDir) {
39
41
  return collectLegacyMatrixStateRoots(stateDir, MATRIX_SYNC_CACHE_FILENAME);
40
42
  }
43
+ async function readLegacyMatrixStorageMetadata(storageRootDir) {
44
+ try {
45
+ return normalizeMatrixStorageMetadata(JSON.parse(await fs.readFile(path.join(storageRootDir, MATRIX_STORAGE_META_FILENAME), "utf8")));
46
+ } catch {
47
+ return null;
48
+ }
49
+ }
41
50
  async function archiveLegacySyncCache(params) {
42
51
  const sourcePath = path.join(params.storageRootDir, MATRIX_SYNC_CACHE_FILENAME);
43
52
  const archivedPath = `${sourcePath}.migrated`;
@@ -67,6 +76,54 @@ async function archiveLegacyMatrixStateFile(params) {
67
76
  }
68
77
  }
69
78
  const stateMigrations = [
79
+ {
80
+ id: "matrix-storage-meta-json-to-plugin-state",
81
+ label: "Matrix storage metadata",
82
+ async detectLegacyState(params) {
83
+ const previews = [];
84
+ for (const storageRootDir of await collectLegacyMatrixStateRoots(params.stateDir, MATRIX_STORAGE_META_FILENAME)) {
85
+ if (!await readLegacyMatrixStorageMetadata(storageRootDir)) continue;
86
+ previews.push(`Matrix storage metadata JSON can migrate to SQLite: ${storageRootDir}`);
87
+ }
88
+ return previews.length > 0 ? { preview: previews } : null;
89
+ },
90
+ async migrateLegacyState(params) {
91
+ const changes = [];
92
+ const warnings = [];
93
+ for (const storageRootDir of await collectLegacyMatrixStateRoots(params.stateDir, MATRIX_STORAGE_META_FILENAME)) {
94
+ const payload = await readLegacyMatrixStorageMetadata(storageRootDir);
95
+ if (!payload) continue;
96
+ const store = params.context.openPluginStateKeyedStore(openMatrixStorageMetaStoreOptions(storageRootDir));
97
+ if (await hasMatrixStorageMetaStateInStore({ store })) {
98
+ warnings.push(`Skipped Matrix storage metadata import for ${storageRootDir} because SQLite already has metadata`);
99
+ await archiveLegacyMatrixStateFile({
100
+ storageRootDir,
101
+ filename: MATRIX_STORAGE_META_FILENAME,
102
+ label: "Matrix storage metadata",
103
+ changes,
104
+ warnings
105
+ });
106
+ continue;
107
+ }
108
+ await writeMatrixStorageMetaStateToStore({
109
+ payload,
110
+ store
111
+ });
112
+ changes.push(`Migrated Matrix storage metadata JSON to SQLite for ${storageRootDir}`);
113
+ await archiveLegacyMatrixStateFile({
114
+ storageRootDir,
115
+ filename: MATRIX_STORAGE_META_FILENAME,
116
+ label: "Matrix storage metadata",
117
+ changes,
118
+ warnings
119
+ });
120
+ }
121
+ return {
122
+ changes,
123
+ warnings
124
+ };
125
+ }
126
+ },
70
127
  {
71
128
  id: "matrix-sync-cache-json-to-plugin-state",
72
129
  label: "Matrix sync cache",
@@ -1,4 +1,4 @@
1
- import { n as editMessageMatrix, r as prepareMatrixSingleText, s as sendSingleTextMessageMatrix, y as MsgType } from "./send-DelsoaW7.js";
1
+ import { n as editMessageMatrix, r as prepareMatrixSingleText, s as sendSingleTextMessageMatrix, y as MsgType } from "./send-CQoq0bfR.js";
2
2
  import { createDraftStreamLoop } from "openclaw/plugin-sdk/channel-outbound";
3
3
  //#region extensions/matrix/src/matrix/draft-stream.ts
4
4
  const DEFAULT_THROTTLE_MS = 1e3;
@@ -2,7 +2,7 @@ import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
2
2
  import { o as isRecord } from "./account-selection-Bv_ZuOu4.js";
3
3
  import { t as getMatrixRuntime } from "./runtime-6S3DNFNv.js";
4
4
  import { O as resolveMatrixSqliteStateEnv } from "./crypto-state-store-DK2tcEyP.js";
5
- import { t as claimCurrentTokenStorageState } from "./storage-C10h2piS.js";
5
+ import { t as claimCurrentTokenStorageState } from "./storage-D3JJ0OzE.js";
6
6
  import { t as createAsyncLock } from "./async-lock-BcLS4KOc.js";
7
7
  import { n as LogService } from "./logger-D0GCSDQq.js";
8
8
  import path from "node:path";
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { n as registerMatrixCliMetadata } from "./cli-metadata-CdRmBMLA.js";
1
+ import { n as registerMatrixCliMetadata } from "./cli-metadata-CDLKjGQJ.js";
2
2
  import { registerMatrixSubagentHooks } from "./subagent-hooks-api.js";
3
3
  import { defineBundledChannelEntry } from "openclaw/plugin-sdk/channel-entry-contract";
4
4
  //#region extensions/matrix/index.ts
@@ -1,6 +1,6 @@
1
1
  import { t as getMatrixRuntime } from "./runtime-6S3DNFNv.js";
2
2
  import { C as writeMatrixLegacyCryptoMigrationState, _ as readMatrixLegacyCryptoMigrationState, s as migrateLegacyMatrixLegacyCryptoMigrationFileToStore } from "./crypto-state-store-DK2tcEyP.js";
3
- import { o as resolveMatrixStoragePaths } from "./storage-C10h2piS.js";
3
+ import { l as resolveMatrixStoragePaths } from "./storage-D3JJ0OzE.js";
4
4
  import os from "node:os";
5
5
  import path from "node:path";
6
6
  import fs from "node:fs/promises";
@@ -1,4 +1,4 @@
1
- import { C as formatPollResultsAsText, D as parsePollStartContent, O as resolvePollReferenceEventId, S as formatPollAsText, T as isPollStartType, w as isPollEventType, x as buildPollResultsSummary } from "./send-DelsoaW7.js";
1
+ import { C as formatPollResultsAsText, D as parsePollStartContent, O as resolvePollReferenceEventId, S as formatPollAsText, T as isPollStartType, w as isPollEventType, x as buildPollResultsSummary } from "./send-CQoq0bfR.js";
2
2
  import path from "node:path";
3
3
  //#region extensions/matrix/src/matrix/poll-summary.ts
4
4
  function resolveMatrixPollRootEventId(event) {
@@ -1,8 +1,8 @@
1
1
  import { r as isMatrixNotFoundError } from "./errors-C47hvAF8.js";
2
- import { T as isPollStartType, a as sendMessageMatrix, n as editMessageMatrix, w as isPollEventType } from "./send-DelsoaW7.js";
2
+ import { T as isPollStartType, a as sendMessageMatrix, n as editMessageMatrix, w as isPollEventType } from "./send-CQoq0bfR.js";
3
3
  import { n as MATRIX_REACTION_EVENT_TYPE } from "./reaction-common-DkrQdBSZ.js";
4
- import { a as resolveMatrixMessageAttachment, l as resolveMatrixPollRootEventId, o as resolveMatrixMessageBody, s as fetchMatrixPollMessageSummary } from "./media-text-BlzZ2pJ_.js";
5
- import { r as withResolvedRoomAction } from "./client-Btbr03EH.js";
4
+ import { a as resolveMatrixMessageAttachment, l as resolveMatrixPollRootEventId, o as resolveMatrixMessageBody, s as fetchMatrixPollMessageSummary } from "./media-text-Dzzc1s2K.js";
5
+ import { r as withResolvedRoomAction } from "./client-CNivl1aV.js";
6
6
  import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
7
7
  import { resolveIntegerOption } from "openclaw/plugin-sdk/number-runtime";
8
8
  //#region extensions/matrix/src/matrix/actions/limits.ts
@@ -1,27 +1,27 @@
1
1
  import { a as resolveMatrixAccountConfig, i as resolveMatrixAccountAllowlistConfig } from "./account-config-BZWN9tGS.js";
2
2
  import { t as getMatrixRuntime } from "./runtime-6S3DNFNv.js";
3
- import { m as resolveConfiguredMatrixBotUserIds } from "./setup-core-DqU2DHs2.js";
4
- import { a as buildAllowlistResolutionSummary, c as createTypingCallbacks, d as logInboundDrop, f as logTypingFailure, h as toLocationContext, i as addAllowlistUserEntriesFromConfigEntry, l as formatLocationText, m as summarizeMapping, n as resolveMatrixStoredSessionMeta, o as canonicalizeAllowlistWithResolvedIds, p as patchAllowlistUsersInConfigEntries, r as resolveMatrixRoomConfig, s as createReplyPrefixOptions, u as getAgentScopedMediaLocalRoots } from "./channel-B-92QMpA.js";
5
- import { a as normalizeMatrixUserId, i as normalizeMatrixAllowList, o as resolveMatrixAllowListMatch } from "./config-schema-DidVNzlW.js";
3
+ import { m as resolveConfiguredMatrixBotUserIds } from "./setup-core-0q_2Acbn.js";
4
+ import { a as buildAllowlistResolutionSummary, c as createTypingCallbacks, d as logInboundDrop, f as logTypingFailure, h as toLocationContext, i as addAllowlistUserEntriesFromConfigEntry, l as formatLocationText, m as summarizeMapping, n as resolveMatrixStoredSessionMeta, o as canonicalizeAllowlistWithResolvedIds, p as patchAllowlistUsersInConfigEntries, r as resolveMatrixRoomConfig, s as createReplyPrefixOptions, u as getAgentScopedMediaLocalRoots } from "./channel-CphxlhZu.js";
5
+ import { a as normalizeMatrixUserId, i as normalizeMatrixAllowList, o as resolveMatrixAllowListMatch } from "./config-schema-26chdmvB.js";
6
6
  import { t as isMatrixQualifiedUserId } from "./target-ids-B-5aQxwn.js";
7
7
  import { r as isMatrixNotFoundError, t as formatMatrixErrorMessage } from "./errors-C47hvAF8.js";
8
8
  import { O as resolveMatrixSqliteStateEnv } from "./crypto-state-store-DK2tcEyP.js";
9
- import { a as resolveMatrixStateFilePath } from "./storage-C10h2piS.js";
10
- import { D as parsePollStartContent, S as formatPollAsText, T as isPollStartType, _ as readJoinedMatrixMembers, a as sendMessageMatrix, f as promoteMatrixDirectRoomCandidate, g as isStrictDirectMembership, h as hasDirectMatrixMemberFlag, t as chunkMatrixText, v as MATRIX_OPENCLAW_FINALIZED_PREVIEW_KEY, w as isPollEventType } from "./send-DelsoaW7.js";
11
- import { t as createMatrixThreadBindingManager } from "./thread-bindings-DJhG8FYR.js";
9
+ import { c as resolveMatrixStateFilePath } from "./storage-D3JJ0OzE.js";
10
+ import { D as parsePollStartContent, S as formatPollAsText, T as isPollStartType, _ as readJoinedMatrixMembers, a as sendMessageMatrix, f as promoteMatrixDirectRoomCandidate, g as isStrictDirectMembership, h as hasDirectMatrixMemberFlag, t as chunkMatrixText, v as MATRIX_OPENCLAW_FINALIZED_PREVIEW_KEY, w as isPollEventType } from "./send-CQoq0bfR.js";
11
+ import { t as createMatrixThreadBindingManager } from "./thread-bindings-BIEaF1Nq.js";
12
12
  import { n as LogService } from "./logger-D0GCSDQq.js";
13
- import { a as resolveMatrixMessageAttachment, c as fetchMatrixPollSnapshot, i as isLikelyBareFilename, n as formatMatrixMediaUnavailableText, o as resolveMatrixMessageBody, r as formatMatrixMessageText, t as formatMatrixMediaTooLargeText } from "./media-text-BlzZ2pJ_.js";
13
+ import { a as resolveMatrixMessageAttachment, c as fetchMatrixPollSnapshot, i as isLikelyBareFilename, n as formatMatrixMediaUnavailableText, o as resolveMatrixMessageBody, r as formatMatrixMessageText, t as formatMatrixMediaTooLargeText } from "./media-text-Dzzc1s2K.js";
14
14
  import { n as setActiveMatrixClient } from "./active-client-DXvz2gCo.js";
15
15
  import { t as isBunRuntime } from "./runtime-BefyhPWv.js";
16
- import { d as backfillMatrixAuthDeviceIdAfterStartup, f as resolveMatrixAuth, i as resolveSharedMatrixClient, l as isMatrixStartupAbortError, n as releaseSharedClientInstance, p as resolveMatrixAuthContext, u as throwIfMatrixStartupAborted } from "./shared-ChcRGI9k.js";
17
- import "./client-2Uik1ank.js";
16
+ import { d as backfillMatrixAuthDeviceIdAfterStartup, f as resolveMatrixAuth, i as resolveSharedMatrixClient, l as isMatrixStartupAbortError, n as releaseSharedClientInstance, p as resolveMatrixAuthContext, u as throwIfMatrixStartupAborted } from "./shared-eJVQiO9S.js";
17
+ import "./client-jJYrQqEm.js";
18
18
  import { i as isMatrixMediaSizeLimitError, r as MatrixMediaSizeLimitError } from "./http-client-nipb5tk1.js";
19
19
  import { d as resolveDefaultGroupPolicy, h as warnMissingProviderGroupPolicyFallbackOnce, m as resolveThreadBindingMaxAgeMsForChannel, p as resolveThreadBindingIdleTimeoutMsForChannel, t as GROUP_POLICY_BLOCKED_LABEL, u as resolveAllowlistProviderRuntimeGroupPolicy } from "./runtime-api-CsBoesCU.js";
20
- import { t as resolveMatrixTargets } from "./resolve-targets-B0bvOsvg.js";
20
+ import { t as resolveMatrixTargets } from "./resolve-targets-CwHA0nDu.js";
21
21
  import { t as formatMatrixEncryptedEventDisabledWarning } from "./encryption-guidance-Bg3IRYoX.js";
22
22
  import { n as isMatrixReadySyncState, r as isMatrixTerminalSyncState, t as isMatrixDisconnectedSyncState } from "./sync-state-CWbp0QSY.js";
23
23
  import { a as EventType, i as resolveMatrixThreadRouting, n as resolveMatrixReplyToEventId, o as RelationType, r as resolveMatrixThreadRootId, t as resolveMatrixInboundRoute } from "./route-DY6at4qJ.js";
24
- import { buildChannelProgressDraftLineForEntry, createChannelProgressDraftGate, createPreviewMessageReceipt, defineFinalizableLivePreviewAdapter, deliverWithFinalizableLivePreviewAdapter, formatChannelProgressDraftLine, formatChannelProgressDraftLineForEntry, formatChannelProgressDraftText, isChannelProgressDraftWorkToolName, mergeChannelProgressDraftLine, normalizeChannelProgressDraftLineIdentity, resolveChannelProgressDraftMaxLines, waitUntilAbort } from "openclaw/plugin-sdk/channel-outbound";
24
+ import { buildChannelProgressDraftLineForEntry, createChannelProgressDraftGate, createPreviewMessageReceipt, defineFinalizableLivePreviewAdapter, deliverWithFinalizableLivePreviewAdapter, formatChannelProgressDraftLine, formatChannelProgressDraftText, isChannelProgressDraftWorkToolName, mergeChannelProgressDraftLine, normalizeChannelProgressDraftLineIdentity, resolveChannelProgressDraftMaxLines, waitUntilAbort } from "openclaw/plugin-sdk/channel-outbound";
25
25
  import { normalizeLowercaseStringOrEmpty, normalizeOptionalString, normalizeStringifiedEntries, uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
26
26
  import path from "node:path";
27
27
  import { createHash } from "node:crypto";
@@ -821,7 +821,7 @@ const SAS_NOTICE_RETRY_DELAY_MS = 750;
821
821
  const VERIFICATION_EVENT_STARTUP_GRACE_MS = 3e4;
822
822
  let matrixDirectRoomDepsPromise;
823
823
  async function loadMatrixDirectRoomDeps() {
824
- matrixDirectRoomDepsPromise ??= Promise.all([import("./send-DelsoaW7.js").then((n) => n.d), import("./send-DelsoaW7.js").then((n) => n.m)]).then(([directManagementModule, directRoomModule]) => ({
824
+ matrixDirectRoomDepsPromise ??= Promise.all([import("./send-CQoq0bfR.js").then((n) => n.d), import("./send-CQoq0bfR.js").then((n) => n.m)]).then(([directManagementModule, directRoomModule]) => ({
825
825
  inspectMatrixDirectRooms: directManagementModule.inspectMatrixDirectRooms,
826
826
  isStrictDirectRoom: directRoomModule.isStrictDirectRoom
827
827
  }));
@@ -1572,6 +1572,7 @@ function resolveMatrixMentionPrefixCandidates(params) {
1572
1572
  append(localpart ? `@${localpart}` : null);
1573
1573
  append(params.displayName);
1574
1574
  append(params.displayName ? `@${params.displayName}` : null);
1575
+ append(params.displayName ? `@[${params.displayName}]` : null);
1575
1576
  return candidates;
1576
1577
  }
1577
1578
  function stripMatchedMatrixMentionPrefix(text, pattern) {
@@ -1609,7 +1610,8 @@ function isVisibleMentionLabel(params) {
1609
1610
  localpart ? extractVisibleMentionText(localpart) : null,
1610
1611
  localpart ? extractVisibleMentionText(`@${localpart}`) : null,
1611
1612
  params.displayName ? extractVisibleMentionText(params.displayName) : null,
1612
- params.displayName ? extractVisibleMentionText(`@${params.displayName}`) : null
1613
+ params.displayName ? extractVisibleMentionText(`@${params.displayName}`) : null,
1614
+ params.displayName ? extractVisibleMentionText(`@[${params.displayName}]`) : null
1613
1615
  ].filter((value) => Boolean(value)).includes(cleaned);
1614
1616
  }
1615
1617
  function hasVisibleRoomMention(value) {
@@ -2233,7 +2235,7 @@ let sessionBindingRuntimePromise;
2233
2235
  let matrixReactionEventsPromise;
2234
2236
  let matrixDraftStreamPromise;
2235
2237
  function loadMatrixSendModule() {
2236
- matrixSendModulePromise ??= import("./send-DelsoaW7.js").then((n) => n.l);
2238
+ matrixSendModulePromise ??= import("./send-CQoq0bfR.js").then((n) => n.l);
2237
2239
  return matrixSendModulePromise;
2238
2240
  }
2239
2241
  function loadAcpBindingRuntime() {
@@ -2245,11 +2247,11 @@ function loadSessionBindingRuntime() {
2245
2247
  return sessionBindingRuntimePromise;
2246
2248
  }
2247
2249
  function loadMatrixReactionEvents() {
2248
- matrixReactionEventsPromise ??= import("./reaction-events-BubEhymF.js");
2250
+ matrixReactionEventsPromise ??= import("./reaction-events-BEO6rF08.js");
2249
2251
  return matrixReactionEventsPromise;
2250
2252
  }
2251
2253
  function loadMatrixDraftStream() {
2252
- matrixDraftStreamPromise ??= import("./draft-stream-D13W24D9.js");
2254
+ matrixDraftStreamPromise ??= import("./draft-stream-DnXbpWN-.js");
2253
2255
  return matrixDraftStreamPromise;
2254
2256
  }
2255
2257
  async function matrixTextWouldActivateMentions(client, text) {
@@ -3363,8 +3365,10 @@ function createMatrixRoomMessageHandler(params) {
3363
3365
  ...options,
3364
3366
  onToolStart: async (payload) => {
3365
3367
  const toolName = payload.name?.trim();
3366
- await pushPreviewToolProgress(formatChannelProgressDraftLineForEntry(progressConfigEntry, {
3368
+ await pushPreviewToolProgress(buildChannelProgressDraftLineForEntry(progressConfigEntry, {
3367
3369
  event: "tool",
3370
+ itemId: payload.itemId,
3371
+ toolCallId: payload.toolCallId,
3368
3372
  name: toolName,
3369
3373
  phase: payload.phase,
3370
3374
  args: payload.args
@@ -3374,6 +3378,7 @@ function createMatrixRoomMessageHandler(params) {
3374
3378
  await pushPreviewToolProgress(buildChannelProgressDraftLineForEntry(progressConfigEntry, {
3375
3379
  event: "item",
3376
3380
  itemId: payload.itemId,
3381
+ toolCallId: payload.toolCallId,
3377
3382
  itemKind: payload.kind,
3378
3383
  title: payload.title,
3379
3384
  name: payload.name,
@@ -3407,8 +3412,10 @@ function createMatrixRoomMessageHandler(params) {
3407
3412
  },
3408
3413
  onCommandOutput: async (payload) => {
3409
3414
  if (payload.phase !== "end") return;
3410
- await pushPreviewToolProgress(formatChannelProgressDraftLine({
3415
+ await pushPreviewToolProgress(buildChannelProgressDraftLineForEntry(progressConfigEntry, {
3411
3416
  event: "command-output",
3417
+ itemId: payload.itemId,
3418
+ toolCallId: payload.toolCallId,
3412
3419
  phase: payload.phase,
3413
3420
  title: payload.title,
3414
3421
  name: payload.name,
@@ -3418,8 +3425,10 @@ function createMatrixRoomMessageHandler(params) {
3418
3425
  },
3419
3426
  onPatchSummary: async (payload) => {
3420
3427
  if (payload.phase !== "end") return;
3421
- await pushPreviewToolProgress(formatChannelProgressDraftLine({
3428
+ await pushPreviewToolProgress(buildChannelProgressDraftLineForEntry(progressConfigEntry, {
3422
3429
  event: "patch",
3430
+ itemId: payload.itemId,
3431
+ toolCallId: payload.toolCallId,
3423
3432
  phase: payload.phase,
3424
3433
  title: payload.title,
3425
3434
  name: payload.name,
@@ -4137,11 +4146,11 @@ function createMatrixRoomInfoResolver(client) {
4137
4146
  let matrixStartupMaintenanceDepsPromise;
4138
4147
  async function loadMatrixStartupMaintenanceDeps() {
4139
4148
  matrixStartupMaintenanceDepsPromise ??= Promise.all([
4140
- import("./setup-core-DqU2DHs2.js").then((n) => n.s),
4149
+ import("./setup-core-0q_2Acbn.js").then((n) => n.s),
4141
4150
  import("./device-health-D4LBxuPq.js"),
4142
- import("./setup-core-DqU2DHs2.js").then((n) => n.a),
4143
- import("./legacy-crypto-restore-Bm6HmeN5.js"),
4144
- import("./startup-verification-BoDITB_u.js")
4151
+ import("./setup-core-0q_2Acbn.js").then((n) => n.a),
4152
+ import("./legacy-crypto-restore-BSfdJNJn.js"),
4153
+ import("./startup-verification-BNry4Mje.js")
4145
4154
  ]).then(([configUpdateModule, deviceHealthModule, profileModule, legacyCryptoRestoreModule, startupVerificationModule]) => ({
4146
4155
  updateMatrixAccountConfig: configUpdateModule.updateMatrixAccountConfig,
4147
4156
  summarizeMatrixDeviceHealth: deviceHealthModule.summarizeMatrixDeviceHealth,
@@ -3,7 +3,7 @@ import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runti
3
3
  //#region extensions/matrix/src/plugin-entry.runtime.ts
4
4
  let matrixVerificationRuntimePromise;
5
5
  function loadMatrixVerificationRuntime() {
6
- matrixVerificationRuntimePromise ??= import("./verification-Conlh2ZF.js").then((n) => n.y);
6
+ matrixVerificationRuntimePromise ??= import("./verification-C3Pv2eJF.js").then((n) => n.y);
7
7
  return matrixVerificationRuntimePromise;
8
8
  }
9
9
  function sendError(respond, err) {
@@ -0,0 +1,3 @@
1
+ import { t as createMatrixClient } from "./create-client-CA759SO2.js";
2
+ import "./client-jJYrQqEm.js";
3
+ export { createMatrixClient };
@@ -1,6 +1,6 @@
1
1
  import { t as getMatrixRuntime } from "./runtime-6S3DNFNv.js";
2
- import { c as resolveMatrixConfigPath, l as updateMatrixAccountConfig, o as syncMatrixOwnProfile } from "./setup-core-DqU2DHs2.js";
3
- import { n as withResolvedActionClient } from "./client-Btbr03EH.js";
2
+ import { c as resolveMatrixConfigPath, l as updateMatrixAccountConfig, o as syncMatrixOwnProfile } from "./setup-core-0q_2Acbn.js";
3
+ import { n as withResolvedActionClient } from "./client-CNivl1aV.js";
4
4
  import { normalizeAccountId } from "openclaw/plugin-sdk/account-id";
5
5
  //#region extensions/matrix/src/matrix/actions/profile.ts
6
6
  async function updateMatrixOwnProfile(opts = {}) {
@@ -7,7 +7,7 @@ import { getSessionBindingService } from "openclaw/plugin-sdk/session-binding-ru
7
7
  let approvalReactionAuthPromise;
8
8
  let execApprovalResolverPromise;
9
9
  function loadApprovalReactionAuth() {
10
- approvalReactionAuthPromise ??= import("./approval-reaction-auth-RxMGV7PW.js");
10
+ approvalReactionAuthPromise ??= import("./approval-reaction-auth-BnjVbO3E.js");
11
11
  return approvalReactionAuthPromise;
12
12
  }
13
13
  function loadExecApprovalResolver() {
@@ -1,6 +1,6 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
2
2
  import { n as normalizeMatrixMessagingTarget, t as isMatrixQualifiedUserId } from "./target-ids-B-5aQxwn.js";
3
- import { n as listMatrixDirectoryGroupsLive, r as listMatrixDirectoryPeersLive } from "./directory-live-ClJL6vpb.js";
3
+ import { n as listMatrixDirectoryGroupsLive, r as listMatrixDirectoryPeersLive } from "./directory-live-DKe-ZwBH.js";
4
4
  import { normalizeOptionalLowercaseString } from "openclaw/plugin-sdk/string-coerce-runtime";
5
5
  //#region extensions/matrix/src/resolve-targets.ts
6
6
  var resolve_targets_exports = /* @__PURE__ */ __exportAll({ resolveMatrixTargets: () => resolveMatrixTargets });
@@ -1,4 +1,4 @@
1
- import { t as resolveMatrixTargets } from "./resolve-targets-B0bvOsvg.js";
1
+ import { t as resolveMatrixTargets } from "./resolve-targets-CwHA0nDu.js";
2
2
  //#region extensions/matrix/src/resolver.runtime.ts
3
3
  const matrixResolverRuntime = { resolveMatrixTargets };
4
4
  //#endregion
@@ -1,8 +1,8 @@
1
1
  import { n as formatMatrixErrorReason, r as isMatrixNotFoundError, t as formatMatrixErrorMessage } from "./errors-C47hvAF8.js";
2
2
  import { n as LogService, r as noop, t as ConsoleLogger } from "./logger-D0GCSDQq.js";
3
- import { t as SqliteBackedMatrixSyncStore } from "./file-sync-store-Ni-pkFde.js";
3
+ import { t as SqliteBackedMatrixSyncStore } from "./file-sync-store-ByKRkbHY.js";
4
4
  import { t as MATRIX_IDB_PERSIST_INTERVAL_MS } from "./idb-persistence-lock-DAJ49nZX.js";
5
- import { c as createMatrixStartupAbortError, u as throwIfMatrixStartupAborted } from "./shared-ChcRGI9k.js";
5
+ import { c as createMatrixStartupAbortError, u as throwIfMatrixStartupAborted } from "./shared-eJVQiO9S.js";
6
6
  import { a as matrixEventToRaw, n as createMatrixGuardedFetch, o as parseMxc, t as MatrixAuthedHttpClient } from "./http-client-nipb5tk1.js";
7
7
  import { n as resolveMatrixRoomKeyBackupReadinessError } from "./backup-health-Dm_YMVFT.js";
8
8
  import { createMatrixJsSdkClientLogger } from "./logging-QH-48Gr6.js";
@@ -229,7 +229,7 @@ function buildPollResponseContent(pollEventId, answerIds) {
229
229
  //#region extensions/matrix/src/matrix/send/client.ts
230
230
  let matrixSendClientRuntimePromise = null;
231
231
  async function loadMatrixSendClientRuntime() {
232
- matrixSendClientRuntimePromise ??= import("./client-bootstrap-BmSGhceR.js").then((n) => n.t);
232
+ matrixSendClientRuntimePromise ??= import("./client-bootstrap-B9WG3S-N.js").then((n) => n.t);
233
233
  return await matrixSendClientRuntimePromise;
234
234
  }
235
235
  function resolveMediaMaxBytes(accountId, cfg) {
@@ -1,4 +1,4 @@
1
1
  import { r as setMatrixRuntime } from "./runtime-6S3DNFNv.js";
2
2
  import { s as resetMatrixThreadBindingsForTests } from "./thread-bindings-shared-CKnY4LSd.js";
3
- import { t as createMatrixThreadBindingManager } from "./thread-bindings-DJhG8FYR.js";
3
+ import { t as createMatrixThreadBindingManager } from "./thread-bindings-BIEaF1Nq.js";
4
4
  export { createMatrixThreadBindingManager, resetMatrixThreadBindingsForTests, setMatrixRuntime };
@@ -1,7 +1,7 @@
1
1
  import { a as resolveMatrixAccountConfig, n as hasExplicitMatrixAccountConfig } from "./account-config-BZWN9tGS.js";
2
- import "./setup-core-DqU2DHs2.js";
2
+ import "./setup-core-0q_2Acbn.js";
3
3
  import { t as formatMatrixErrorMessage } from "./errors-C47hvAF8.js";
4
- import { n as bootstrapMatrixVerification } from "./verification-Conlh2ZF.js";
4
+ import { n as bootstrapMatrixVerification } from "./verification-C3Pv2eJF.js";
5
5
  //#region extensions/matrix/src/setup-bootstrap.ts
6
6
  async function maybeBootstrapNewEncryptedMatrixAccount(params) {
7
7
  const accountConfig = resolveMatrixAccountConfig({
@@ -670,7 +670,7 @@ const matrixSetupAdapter = {
670
670
  input
671
671
  }),
672
672
  afterAccountConfigWritten: async ({ previousCfg, cfg, accountId, runtime }) => {
673
- const { runMatrixSetupBootstrapAfterConfigWrite } = await import("./setup-bootstrap-CAPa5pNe.js");
673
+ const { runMatrixSetupBootstrapAfterConfigWrite } = await import("./setup-bootstrap-CF0GimJg.js");
674
674
  await runMatrixSetupBootstrapAfterConfigWrite({
675
675
  previousCfg,
676
676
  cfg,
@@ -1,5 +1,5 @@
1
- import { g as resolveMatrixAccount, n as matrixSetupAdapter, t as createMatrixSetupWizardProxy } from "./setup-core-DqU2DHs2.js";
2
- import { r as matrixConfigAdapter, t as MatrixChannelConfigSchema } from "./config-schema-DidVNzlW.js";
1
+ import { g as resolveMatrixAccount, n as matrixSetupAdapter, t as createMatrixSetupWizardProxy } from "./setup-core-0q_2Acbn.js";
2
+ import { r as matrixConfigAdapter, t as MatrixChannelConfigSchema } from "./config-schema-26chdmvB.js";
3
3
  import { describeAccountSnapshot } from "openclaw/plugin-sdk/account-helpers";
4
4
  const matrixSetupPlugin = {
5
5
  id: "matrix",
@@ -13,7 +13,7 @@ const matrixSetupPlugin = {
13
13
  order: 70,
14
14
  quickstartAllowFrom: true
15
15
  },
16
- setupWizard: createMatrixSetupWizardProxy(async () => ({ matrixSetupWizard: (await import("./setup-surface-DGv1Dck3.js").then((n) => n.t)).matrixSetupWizard })),
16
+ setupWizard: createMatrixSetupWizardProxy(async () => ({ matrixSetupWizard: (await import("./setup-surface-CZYAUrKQ.js").then((n) => n.t)).matrixSetupWizard })),
17
17
  setup: matrixSetupAdapter,
18
18
  capabilities: {
19
19
  chatTypes: [
@@ -2,7 +2,7 @@ import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
2
2
  import { n as requiresExplicitMatrixDefaultAccount } from "./account-selection-Bv_ZuOu4.js";
3
3
  import { a as resolveMatrixAccountConfig } from "./account-config-BZWN9tGS.js";
4
4
  import { r as resolveMatrixEnvAuthReadiness } from "./env-auth-DIzOApj0.js";
5
- import { g as resolveMatrixAccount, h as resolveDefaultMatrixAccountId, i as moveSingleMatrixAccountConfigToNamedAccount, l as updateMatrixAccountConfig, p as listMatrixAccountIds, r as resolveMatrixSetupDmAllowFrom } from "./setup-core-DqU2DHs2.js";
5
+ import { g as resolveMatrixAccount, h as resolveDefaultMatrixAccountId, i as moveSingleMatrixAccountConfigToNamedAccount, l as updateMatrixAccountConfig, p as listMatrixAccountIds, r as resolveMatrixSetupDmAllowFrom } from "./setup-core-0q_2Acbn.js";
6
6
  import { t as resolveMatrixConfigFieldPath } from "./config-paths-CnREYb1Y.js";
7
7
  import { n as validateMatrixHomeserverUrl, r as isPrivateOrLoopbackHost, t as resolveValidatedMatrixHomeserverUrl } from "./url-validation-GRHde6lq.js";
8
8
  import { n as ensureMatrixSdkInstalled, r as isMatrixSdkAvailable } from "./deps-BVWGd2XS.js";
@@ -105,7 +105,7 @@ async function promptMatrixAllowFrom(params) {
105
105
  pending.push(part);
106
106
  }
107
107
  if (pending.length > 0) {
108
- const { resolveMatrixTargets } = await import("./resolve-targets-B0bvOsvg.js").then((n) => n.n);
108
+ const { resolveMatrixTargets } = await import("./resolve-targets-CwHA0nDu.js").then((n) => n.n);
109
109
  const results = await resolveMatrixTargets({
110
110
  cfg,
111
111
  accountId,
@@ -233,7 +233,7 @@ async function configureMatrixAccessPrompts(params) {
233
233
  resolvedIds.push(cleaned);
234
234
  continue;
235
235
  }
236
- const { listMatrixDirectoryGroupsLive } = await import("./directory-live-ClJL6vpb.js").then((n) => n.t);
236
+ const { listMatrixDirectoryGroupsLive } = await import("./directory-live-DKe-ZwBH.js").then((n) => n.t);
237
237
  const matches = await listMatrixDirectoryGroupsLive({
238
238
  cfg: next,
239
239
  accountId: params.accountId,
@@ -508,7 +508,7 @@ const matrixOnboardingAdapter = {
508
508
  });
509
509
  },
510
510
  afterConfigWritten: async ({ previousCfg, cfg, accountId, runtime }) => {
511
- const { runMatrixSetupBootstrapAfterConfigWrite } = await import("./setup-bootstrap-CAPa5pNe.js");
511
+ const { runMatrixSetupBootstrapAfterConfigWrite } = await import("./setup-bootstrap-CF0GimJg.js");
512
512
  await runMatrixSetupBootstrapAfterConfigWrite({
513
513
  previousCfg,
514
514
  cfg,
@@ -5,7 +5,7 @@ import { o as resolveMatrixBaseConfig, r as listNormalizedMatrixAccountIds, t as
5
5
  import { i as resolveScopedMatrixEnvConfig, n as resolveGlobalMatrixEnvConfig } from "./env-auth-DIzOApj0.js";
6
6
  import { t as resolveMatrixConfigFieldPath } from "./config-paths-CnREYb1Y.js";
7
7
  import { t as resolveValidatedMatrixHomeserverUrl } from "./url-validation-GRHde6lq.js";
8
- import { i as repairCurrentTokenStorageMetaDeviceId } from "./storage-C10h2piS.js";
8
+ import { s as repairCurrentTokenStorageMetaDeviceId } from "./storage-D3JJ0OzE.js";
9
9
  import { n as LogService } from "./logger-D0GCSDQq.js";
10
10
  import { DEFAULT_ACCOUNT_ID as DEFAULT_ACCOUNT_ID$1, normalizeAccountId as normalizeAccountId$1, normalizeOptionalAccountId, normalizeOptionalAccountId as normalizeOptionalAccountId$1 } from "openclaw/plugin-sdk/account-id";
11
11
  import { coerceSecretRef, normalizeResolvedSecretInputString } from "openclaw/plugin-sdk/secret-input-runtime";
@@ -21,7 +21,7 @@ let matrixCredentialsWriteRuntimePromise;
21
21
  let matrixSecretInputDepsPromise;
22
22
  const MATRIX_AUTH_REQUEST_RETRY_RE = /\b(fetch failed|econnreset|econnrefused|enotfound|etimedout|ehostunreach|enetunreach|eai_again|und_err_|socket hang up|network|headers timeout|body timeout|connect timeout)\b/i;
23
23
  async function loadMatrixAuthClientDeps() {
24
- matrixAuthClientDepsPromise ??= Promise.all([import("./sdk-CRxm68gK.js"), import("./logging-QH-48Gr6.js")]).then(([sdkModule, loggingModule]) => ({
24
+ matrixAuthClientDepsPromise ??= Promise.all([import("./sdk-DLlal_yG.js"), import("./logging-QH-48Gr6.js")]).then(([sdkModule, loggingModule]) => ({
25
25
  MatrixClient: sdkModule.MatrixClient,
26
26
  ensureMatrixSdkLoggingConfigured: loggingModule.ensureMatrixSdkLoggingConfigured
27
27
  }));
@@ -501,7 +501,7 @@ var shared_exports = /* @__PURE__ */ __exportAll({
501
501
  });
502
502
  let matrixCreateClientDepsPromise;
503
503
  async function loadMatrixCreateClientDeps() {
504
- matrixCreateClientDepsPromise ??= import("./create-client-D0OspqzB.js").then((n) => n.n).then((runtime) => ({ createMatrixClient: runtime.createMatrixClient }));
504
+ matrixCreateClientDepsPromise ??= import("./create-client-CA759SO2.js").then((n) => n.n).then((runtime) => ({ createMatrixClient: runtime.createMatrixClient }));
505
505
  return await matrixCreateClientDepsPromise;
506
506
  }
507
507
  const sharedClientStates = /* @__PURE__ */ new Map();
@@ -1,7 +1,7 @@
1
1
  import { t as getMatrixRuntime } from "./runtime-6S3DNFNv.js";
2
2
  import { t as formatMatrixErrorMessage } from "./errors-C47hvAF8.js";
3
3
  import { O as resolveMatrixSqliteStateEnv } from "./crypto-state-store-DK2tcEyP.js";
4
- import { o as resolveMatrixStoragePaths, r as recordCurrentStorageMetaDeviceId } from "./storage-C10h2piS.js";
4
+ import { l as resolveMatrixStoragePaths, o as recordCurrentStorageMetaDeviceId } from "./storage-D3JJ0OzE.js";
5
5
  import path from "node:path";
6
6
  import { createHash } from "node:crypto";
7
7
  import { timestampMsToIsoString } from "openclaw/plugin-sdk/number-runtime";
@@ -1,16 +1,29 @@
1
- import { a as resolveMatrixDefaultOrOnlyAccountId, n as requiresExplicitMatrixDefaultAccount } from "./account-selection-Bv_ZuOu4.js";
1
+ import { a as resolveMatrixDefaultOrOnlyAccountId, n as requiresExplicitMatrixDefaultAccount, o as isRecord } from "./account-selection-Bv_ZuOu4.js";
2
2
  import { t as getMatrixRuntime } from "./runtime-6S3DNFNv.js";
3
3
  import { n as resolveMatrixAccountStorageRoot, s as resolveMatrixLegacyFlatStoragePaths } from "./storage-paths-BWo_ZEMC.js";
4
- import { b as scoreMatrixCryptoStateInStore, g as readMatrixIdbSnapshotJson, l as migrateLegacyMatrixRecoveryKeyFileToStore, n as MATRIX_LEGACY_CRYPTO_MIGRATION_FILENAME, r as MATRIX_RECOVERY_KEY_FILENAME, s as migrateLegacyMatrixLegacyCryptoMigrationFileToStore, t as MATRIX_IDB_SNAPSHOT_FILENAME, x as writeMatrixIdbSnapshotJson } from "./crypto-state-store-DK2tcEyP.js";
4
+ import { O as resolveMatrixSqliteStateEnv, b as scoreMatrixCryptoStateInStore, g as readMatrixIdbSnapshotJson, l as migrateLegacyMatrixRecoveryKeyFileToStore, n as MATRIX_LEGACY_CRYPTO_MIGRATION_FILENAME, r as MATRIX_RECOVERY_KEY_FILENAME, s as migrateLegacyMatrixLegacyCryptoMigrationFileToStore, t as MATRIX_IDB_SNAPSHOT_FILENAME, x as writeMatrixIdbSnapshotJson } from "./crypto-state-store-DK2tcEyP.js";
5
5
  import { normalizeAccountId } from "openclaw/plugin-sdk/account-id";
6
6
  import fs from "node:fs";
7
7
  import os from "node:os";
8
8
  import path from "node:path";
9
- import { loadJsonFile, saveJsonFile } from "openclaw/plugin-sdk/json-store";
9
+ import { loadJsonFile } from "openclaw/plugin-sdk/json-store";
10
10
  //#region extensions/matrix/src/matrix/client/storage.ts
11
11
  const DEFAULT_ACCOUNT_KEY = "default";
12
12
  const STORAGE_META_FILENAME = "storage-meta.json";
13
13
  const THREAD_BINDINGS_FILENAME = "thread-bindings.json";
14
+ const STORAGE_META_NAMESPACE = "storage-meta";
15
+ const STORAGE_META_STATE_KEY = "current";
16
+ const STORAGE_META_MAX_ENTRIES = 10;
17
+ function openMatrixStorageMetaStoreOptions(storageRootDir) {
18
+ return {
19
+ namespace: STORAGE_META_NAMESPACE,
20
+ maxEntries: STORAGE_META_MAX_ENTRIES,
21
+ env: resolveMatrixSqliteStateEnv({ stateDir: storageRootDir })
22
+ };
23
+ }
24
+ function openStorageMetaStore(rootDir) {
25
+ return getMatrixRuntime().state.openSyncKeyedStore(openMatrixStorageMetaStoreOptions(rootDir));
26
+ }
14
27
  function resolveLegacyStoragePaths(env = process.env) {
15
28
  return resolveMatrixLegacyFlatStoragePaths(getMatrixRuntime().state.resolveStateDir(env, os.homedir));
16
29
  }
@@ -24,14 +37,15 @@ function assertLegacyMigrationAccountSelection(params) {
24
37
  }
25
38
  function scoreStorageRoot(rootDir) {
26
39
  let score = 0;
27
- if (readStoredRootMetadata(rootDir).currentTokenStateClaimed === true) score += 8;
40
+ const metadata = readStoredRootMetadata(rootDir);
41
+ if (Object.keys(metadata).length > 0) score += 1;
42
+ if (metadata.currentTokenStateClaimed === true) score += 8;
28
43
  if (fs.existsSync(path.join(rootDir, "crypto"))) score += 8;
29
44
  if (fs.existsSync(path.join(rootDir, THREAD_BINDINGS_FILENAME))) score += 4;
30
45
  if (fs.existsSync(path.join(rootDir, "legacy-crypto-migration.json"))) score += 3;
31
46
  if (fs.existsSync(path.join(rootDir, "recovery-key.json"))) score += 2;
32
47
  if (fs.existsSync(path.join(rootDir, "crypto-idb-snapshot.json"))) score += 2;
33
48
  score += scoreMatrixCryptoStateInStore(rootDir);
34
- if (fs.existsSync(path.join(rootDir, STORAGE_META_FILENAME))) score += 1;
35
49
  return score;
36
50
  }
37
51
  function resolveStorageRootMtimeMs(rootDir) {
@@ -41,19 +55,30 @@ function resolveStorageRootMtimeMs(rootDir) {
41
55
  return 0;
42
56
  }
43
57
  }
44
- function readStoredRootMetadata(rootDir) {
58
+ function normalizeMatrixStorageMetadata(value) {
59
+ if (!isRecord(value)) return null;
45
60
  const metadata = {};
46
- const parsed = loadJsonFile(path.join(rootDir, STORAGE_META_FILENAME));
47
- if (parsed) {
48
- if (typeof parsed.homeserver === "string" && parsed.homeserver.trim()) metadata.homeserver = parsed.homeserver.trim();
49
- if (typeof parsed.userId === "string" && parsed.userId.trim()) metadata.userId = parsed.userId.trim();
50
- if (typeof parsed.accountId === "string" && parsed.accountId.trim()) metadata.accountId = parsed.accountId.trim();
51
- if (typeof parsed.accessTokenHash === "string" && parsed.accessTokenHash.trim()) metadata.accessTokenHash = parsed.accessTokenHash.trim();
52
- if (typeof parsed.deviceId === "string" && parsed.deviceId.trim()) metadata.deviceId = parsed.deviceId.trim();
53
- if (parsed.currentTokenStateClaimed === true) metadata.currentTokenStateClaimed = true;
54
- if (typeof parsed.createdAt === "string" && parsed.createdAt.trim()) metadata.createdAt = parsed.createdAt.trim();
55
- }
56
- return metadata;
61
+ if (typeof value.homeserver === "string" && value.homeserver.trim()) metadata.homeserver = value.homeserver.trim();
62
+ if (typeof value.userId === "string" && value.userId.trim()) metadata.userId = value.userId.trim();
63
+ if (typeof value.accountId === "string" && value.accountId.trim()) metadata.accountId = value.accountId.trim();
64
+ if (typeof value.accessTokenHash === "string" && value.accessTokenHash.trim()) metadata.accessTokenHash = value.accessTokenHash.trim();
65
+ if (typeof value.deviceId === "string" && value.deviceId.trim()) metadata.deviceId = value.deviceId.trim();
66
+ if (value.currentTokenStateClaimed === true) metadata.currentTokenStateClaimed = true;
67
+ if (typeof value.createdAt === "string" && value.createdAt.trim()) metadata.createdAt = value.createdAt.trim();
68
+ return Object.keys(metadata).length > 0 ? metadata : null;
69
+ }
70
+ async function hasMatrixStorageMetaStateInStore(params) {
71
+ return normalizeMatrixStorageMetadata(await params.store.lookup(STORAGE_META_STATE_KEY)) !== null;
72
+ }
73
+ async function writeMatrixStorageMetaStateToStore(params) {
74
+ await params.store.register(STORAGE_META_STATE_KEY, params.payload);
75
+ }
76
+ function readStoredRootMetadata(rootDir) {
77
+ if (fs.existsSync(path.join(rootDir, "state", "openclaw.sqlite"))) try {
78
+ const stored = normalizeMatrixStorageMetadata(openStorageMetaStore(rootDir).lookup(STORAGE_META_STATE_KEY));
79
+ if (stored) return stored;
80
+ } catch {}
81
+ return normalizeMatrixStorageMetadata(loadJsonFile(path.join(rootDir, STORAGE_META_FILENAME))) ?? {};
57
82
  }
58
83
  function isCompatibleStorageRoot(params) {
59
84
  const metadata = readStoredRootMetadata(params.candidateRootDir);
@@ -139,7 +164,6 @@ function resolveMatrixStoragePaths(params) {
139
164
  rootDir,
140
165
  storagePath: path.join(rootDir, "bot-storage.json"),
141
166
  cryptoPath: path.join(rootDir, "crypto"),
142
- metaPath: path.join(rootDir, STORAGE_META_FILENAME),
143
167
  recoveryKeyPath: path.join(rootDir, MATRIX_RECOVERY_KEY_FILENAME),
144
168
  idbSnapshotPath: path.join(rootDir, MATRIX_IDB_SNAPSHOT_FILENAME),
145
169
  accountKey: canonical.accountKey,
@@ -162,7 +186,7 @@ async function maybeMigrateLegacyStorage(params) {
162
186
  const legacy = resolveLegacyStoragePaths(params.env);
163
187
  const hasFlatLegacyStorageFile = fs.existsSync(legacy.storagePath);
164
188
  const hasAccountScopedLegacyStorageFile = fs.existsSync(params.storagePaths.storagePath);
165
- const syncCache = hasFlatLegacyStorageFile || hasAccountScopedLegacyStorageFile ? await import("./file-sync-store-Ni-pkFde.js").then((n) => n.n) : null;
189
+ const syncCache = hasFlatLegacyStorageFile || hasAccountScopedLegacyStorageFile ? await import("./file-sync-store-ByKRkbHY.js").then((n) => n.n) : null;
166
190
  const hasFlatLegacyStorage = hasFlatLegacyStorageFile && await syncCache?.readLegacyMatrixSyncCacheState(legacy.rootDir) !== null;
167
191
  const hasAccountScopedLegacyStorage = hasAccountScopedLegacyStorageFile && await syncCache?.readLegacyMatrixSyncCacheState(params.storagePaths.rootDir) !== null;
168
192
  const hasLegacyCrypto = fs.existsSync(legacy.cryptoPath);
@@ -269,7 +293,7 @@ async function migrateLegacyIdbSnapshotToSqlite(params) {
269
293
  });
270
294
  }
271
295
  async function migrateLegacySyncCacheToSqlite(params) {
272
- const syncCache = await import("./file-sync-store-Ni-pkFde.js").then((n) => n.n);
296
+ const syncCache = await import("./file-sync-store-ByKRkbHY.js").then((n) => n.n);
273
297
  const persisted = await syncCache.readLegacyMatrixSyncCacheState(params.sourceRootDir);
274
298
  if (!persisted) return;
275
299
  const store = getMatrixRuntime().state.openKeyedStore(syncCache.openMatrixSyncCacheStoreOptions(params.targetRootDir));
@@ -321,9 +345,11 @@ function rollbackLegacyMoves(moved) {
321
345
  }
322
346
  return null;
323
347
  }
324
- function writeStoredRootMetadata(metaPath, payload) {
348
+ function writeStoredRootMetadata(rootDir, payload) {
325
349
  try {
326
- saveJsonFile(metaPath, payload);
350
+ const normalized = normalizeMatrixStorageMetadata(payload);
351
+ if (!normalized) return false;
352
+ openStorageMetaStore(rootDir).register(STORAGE_META_STATE_KEY, normalized);
327
353
  return true;
328
354
  } catch {
329
355
  return false;
@@ -331,7 +357,7 @@ function writeStoredRootMetadata(metaPath, payload) {
331
357
  }
332
358
  function writeStorageMeta(params) {
333
359
  const existing = readStoredRootMetadata(params.storagePaths.rootDir);
334
- return writeStoredRootMetadata(params.storagePaths.metaPath, {
360
+ return writeStoredRootMetadata(params.storagePaths.rootDir, {
335
361
  homeserver: params.homeserver,
336
362
  userId: params.userId,
337
363
  accountId: params.accountId ?? DEFAULT_ACCOUNT_KEY,
@@ -344,7 +370,7 @@ function writeStorageMeta(params) {
344
370
  function claimCurrentTokenStorageState(params) {
345
371
  const metadata = readStoredRootMetadata(params.rootDir);
346
372
  if (!metadata.accessTokenHash?.trim()) return false;
347
- return writeStoredRootMetadata(path.join(params.rootDir, STORAGE_META_FILENAME), {
373
+ return writeStoredRootMetadata(params.rootDir, {
348
374
  homeserver: metadata.homeserver,
349
375
  userId: metadata.userId,
350
376
  accountId: metadata.accountId ?? DEFAULT_ACCOUNT_KEY,
@@ -359,7 +385,7 @@ function recordCurrentStorageMetaDeviceId(params) {
359
385
  if (!deviceId) return false;
360
386
  const metadata = readStoredRootMetadata(params.rootDir);
361
387
  if (!metadata.accessTokenHash?.trim()) return false;
362
- return writeStoredRootMetadata(path.join(params.rootDir, STORAGE_META_FILENAME), {
388
+ return writeStoredRootMetadata(params.rootDir, {
363
389
  homeserver: metadata.homeserver,
364
390
  userId: metadata.userId,
365
391
  accountId: metadata.accountId ?? DEFAULT_ACCOUNT_KEY,
@@ -386,4 +412,4 @@ function repairCurrentTokenStorageMetaDeviceId(params) {
386
412
  });
387
413
  }
388
414
  //#endregion
389
- export { resolveMatrixStateFilePath as a, repairCurrentTokenStorageMetaDeviceId as i, maybeMigrateLegacyStorage as n, resolveMatrixStoragePaths as o, recordCurrentStorageMetaDeviceId as r, writeStorageMeta as s, claimCurrentTokenStorageState as t };
415
+ export { openMatrixStorageMetaStoreOptions as a, resolveMatrixStateFilePath as c, writeStorageMeta as d, normalizeMatrixStorageMetadata as i, resolveMatrixStoragePaths as l, hasMatrixStorageMetaStateInStore as n, recordCurrentStorageMetaDeviceId as o, maybeMigrateLegacyStorage as r, repairCurrentTokenStorageMetaDeviceId as s, claimCurrentTokenStorageState as t, writeMatrixStorageMetaStateToStore as u };
@@ -1,8 +1,8 @@
1
1
  import { t as getMatrixRuntime } from "./runtime-6S3DNFNv.js";
2
2
  import { a as listBindingsForAccount, c as resolveBindingKey, f as setMatrixThreadBindingManagerEntry, h as toSessionBindingRecord, l as resolveEffectiveBindingExpiry, m as toMatrixBindingTargetKind, o as removeBindingRecord, r as getMatrixThreadBindingManagerEntry, t as deleteMatrixThreadBindingManagerEntry, u as setBindingRecord } from "./thread-bindings-shared-CKnY4LSd.js";
3
3
  import { O as resolveMatrixSqliteStateEnv, k as resolveMatrixSqliteStateKey } from "./crypto-state-store-DK2tcEyP.js";
4
- import { a as resolveMatrixStateFilePath, t as claimCurrentTokenStorageState } from "./storage-C10h2piS.js";
5
- import { a as sendMessageMatrix } from "./send-DelsoaW7.js";
4
+ import { c as resolveMatrixStateFilePath, t as claimCurrentTokenStorageState } from "./storage-D3JJ0OzE.js";
5
+ import { a as sendMessageMatrix } from "./send-CQoq0bfR.js";
6
6
  import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
7
7
  import path from "node:path";
8
8
  import { createHash } from "node:crypto";
@@ -1,12 +1,12 @@
1
1
  import { a as resolveMatrixAccountConfig } from "./account-config-BZWN9tGS.js";
2
- import "./setup-core-DqU2DHs2.js";
3
- import { E as parsePollStart, T as isPollStartType, b as buildPollResponseContent, i as reactMatrixMessage, u as resolveMatrixRoomId } from "./send-DelsoaW7.js";
2
+ import "./setup-core-0q_2Acbn.js";
3
+ import { E as parsePollStart, T as isPollStartType, b as buildPollResponseContent, i as reactMatrixMessage, u as resolveMatrixRoomId } from "./send-CQoq0bfR.js";
4
4
  import { i as buildMatrixReactionRelationsPath, o as selectOwnMatrixReactionEventIds, s as summarizeMatrixReactionEvents } from "./reaction-common-DkrQdBSZ.js";
5
- import { n as withResolvedActionClient, r as withResolvedRoomAction } from "./client-Btbr03EH.js";
6
- import { a as fetchEventSummary, c as resolveMatrixActionLimit, i as sendMatrixMessage, n as editMatrixMessage, o as readPinnedEvents, r as readMatrixMessages, s as EventType, t as deleteMatrixMessage } from "./messages-Dj_vS4L5.js";
5
+ import { n as withResolvedActionClient, r as withResolvedRoomAction } from "./client-CNivl1aV.js";
6
+ import { a as fetchEventSummary, c as resolveMatrixActionLimit, i as sendMatrixMessage, n as editMatrixMessage, o as readPinnedEvents, r as readMatrixMessages, s as EventType, t as deleteMatrixMessage } from "./messages-BO9h35QI.js";
7
7
  import { a as jsonResult, c as readStringArrayParam, l as readStringParam, o as readPositiveIntegerParam, r as createActionGate, s as readReactionParams } from "./runtime-api-CsBoesCU.js";
8
- import { t as applyMatrixProfileUpdate } from "./profile-update-UiXvxx4j.js";
9
- import { _ as scanMatrixVerificationQr, a as confirmMatrixVerificationSas, b as verifyMatrixRecoveryKey, c as getMatrixRoomKeyBackupStatus, d as listMatrixVerifications, f as mismatchMatrixVerificationSas, h as restoreMatrixRoomKeyBackup, i as confirmMatrixVerificationReciprocateQr, l as getMatrixVerificationSas, n as bootstrapMatrixVerification, o as generateMatrixVerificationQr, p as requestMatrixVerification, r as cancelMatrixVerification, s as getMatrixEncryptionStatus, t as acceptMatrixVerification, u as getMatrixVerificationStatus, v as startMatrixVerification } from "./verification-Conlh2ZF.js";
8
+ import { t as applyMatrixProfileUpdate } from "./profile-update-KCzyKPsV.js";
9
+ import { _ as scanMatrixVerificationQr, a as confirmMatrixVerificationSas, b as verifyMatrixRecoveryKey, c as getMatrixRoomKeyBackupStatus, d as listMatrixVerifications, f as mismatchMatrixVerificationSas, h as restoreMatrixRoomKeyBackup, i as confirmMatrixVerificationReciprocateQr, l as getMatrixVerificationSas, n as bootstrapMatrixVerification, o as generateMatrixVerificationQr, p as requestMatrixVerification, r as cancelMatrixVerification, s as getMatrixEncryptionStatus, t as acceptMatrixVerification, u as getMatrixVerificationStatus, v as startMatrixVerification } from "./verification-C3Pv2eJF.js";
10
10
  import { normalizeOptionalLowercaseString, uniqueStrings, uniqueValues } from "openclaw/plugin-sdk/string-coerce-runtime";
11
11
  //#region extensions/matrix/src/matrix/actions/polls.ts
12
12
  function normalizeOptionIndexes(indexes) {
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
2
- import { i as withStartedActionClient, n as withResolvedActionClient } from "./client-Btbr03EH.js";
2
+ import { i as withStartedActionClient, n as withResolvedActionClient } from "./client-CNivl1aV.js";
3
3
  import { n as formatMatrixEncryptionUnavailableError } from "./encryption-guidance-Bg3IRYoX.js";
4
4
  import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
5
5
  import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime";
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@openclaw/matrix",
3
- "version": "2026.6.8",
3
+ "version": "2026.6.9",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@openclaw/matrix",
9
- "version": "2026.6.8",
9
+ "version": "2026.6.9",
10
10
  "dependencies": {
11
11
  "@matrix-org/matrix-sdk-crypto-nodejs": "0.6.0",
12
12
  "@matrix-org/matrix-sdk-crypto-wasm": "18.3.0",
@@ -18,7 +18,7 @@
18
18
  "zod": "4.4.3"
19
19
  },
20
20
  "peerDependencies": {
21
- "openclaw": ">=2026.6.8"
21
+ "openclaw": ">=2026.6.9"
22
22
  },
23
23
  "peerDependenciesMeta": {
24
24
  "openclaw": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/matrix",
3
- "version": "2026.6.8",
3
+ "version": "2026.6.9",
4
4
  "description": "OpenClaw Matrix channel plugin for rooms and direct messages.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -18,7 +18,7 @@
18
18
  "zod": "4.4.3"
19
19
  },
20
20
  "peerDependencies": {
21
- "openclaw": ">=2026.6.8"
21
+ "openclaw": ">=2026.6.9"
22
22
  },
23
23
  "peerDependenciesMeta": {
24
24
  "openclaw": {
@@ -84,10 +84,10 @@
84
84
  "allowInvalidConfigRecovery": true
85
85
  },
86
86
  "compat": {
87
- "pluginApi": ">=2026.6.8"
87
+ "pluginApi": ">=2026.6.9"
88
88
  },
89
89
  "build": {
90
- "openclawVersion": "2026.6.8"
90
+ "openclawVersion": "2026.6.9"
91
91
  },
92
92
  "release": {
93
93
  "publishToClawHub": true,
@@ -1,3 +0,0 @@
1
- import { t as createMatrixClient } from "./create-client-D0OspqzB.js";
2
- import "./client-2Uik1ank.js";
3
- export { createMatrixClient };