@openclaw/matrix 2026.6.5-beta.1 → 2026.6.5-beta.3

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 (65) hide show
  1. package/dist/{account-selection-DEMtY2cn.js → account-selection-Bv_ZuOu4.js} +2 -3
  2. package/dist/api.js +5 -5
  3. package/dist/{approval-handler.runtime-DBUlR5vu.js → approval-handler.runtime-D88ERXxc.js} +4 -4
  4. package/dist/{approval-ids-BWuh0wZT.js → approval-ids-B2J320aL.js} +1 -1
  5. package/dist/{approval-reaction-auth-NgDjrK6V.js → approval-reaction-auth-ryklScll.js} +2 -2
  6. package/dist/{channel-6UUus7Ba.js → channel-DtT1oc4C.js} +13 -13
  7. package/dist/channel-plugin-api.js +1 -1
  8. package/dist/{channel.runtime-CPXd3XKs.js → channel.runtime-CoCkSJV6.js} +6 -6
  9. package/dist/{cli-CM0h-B_j.js → cli-BX7_GgmS.js} +10 -10
  10. package/dist/{cli-metadata-CW6xSM2K.js → cli-metadata-C9_um_Yj.js} +1 -1
  11. package/dist/cli-metadata.js +1 -1
  12. package/dist/{client-CdP9vWOu.js → client-CPfb6TMG.js} +2 -2
  13. package/dist/{client-bootstrap-D5vrHEms.js → client-bootstrap-Dj2242_Y.js} +1 -1
  14. package/dist/{client-DRRL7Zv5.js → client-dLfa0qNk.js} +2 -2
  15. package/dist/{config-schema-CVJYP50t.js → config-schema-NrB2XGxM.js} +1 -1
  16. package/dist/contract-api.js +4 -4
  17. package/dist/{create-client-B90Sb7LG.js → create-client-MnSzqELZ.js} +4 -4
  18. package/dist/{credentials-Bi0pTJDK.js → credentials-G8lNmiME.js} +1 -1
  19. package/dist/{credentials-read-DpxFOhx0.js → credentials-read-TzTOQPOM.js} +1 -1
  20. package/dist/{credentials-write.runtime-BB5QuM4Z.js → credentials-write.runtime-cZhhyGAZ.js} +1 -1
  21. package/dist/{crypto-runtime-DWVNNqa3.js → crypto-runtime-B4WWNpMk.js} +4 -174
  22. package/dist/crypto-state-store-DK2tcEyP.js +352 -0
  23. package/dist/{directory-live-5uWtLQ41.js → directory-live-C7aYHtRU.js} +2 -2
  24. package/dist/{doctor-BKjr6uua.js → doctor-BwpkOBwr.js} +5 -5
  25. package/dist/{doctor-contract-D9oKDvsJ.js → doctor-contract-Dq8OZWHF.js} +1 -1
  26. package/dist/doctor-contract-api.js +265 -2
  27. package/dist/{draft-stream-DZ2X1RHP.js → draft-stream-PqFfvyV9.js} +1 -1
  28. package/dist/{encryption-guidance-aEUzD940.js → encryption-guidance-D_KhjprO.js} +1 -1
  29. package/dist/file-sync-store-Ni-pkFde.js +402 -0
  30. package/dist/helper-api.js +1 -1
  31. package/dist/idb-persistence-BGY1CJ7J.js +229 -0
  32. package/dist/idb-persistence-lock-DAJ49nZX.js +32 -0
  33. package/dist/index.js +1 -1
  34. package/dist/{legacy-crypto-restore-CbVSppMd.js → legacy-crypto-restore-Bm6HmeN5.js} +36 -28
  35. package/dist/logger-D0GCSDQq.js +78 -0
  36. package/dist/{logging-Cm8vxO3E.js → logging-QH-48Gr6.js} +1 -1
  37. package/dist/{matrix-migration.runtime-RzIEp7RP.js → matrix-migration.runtime-dvxE3e5l.js} +24 -25
  38. package/dist/{media-text-DVhXN81h.js → media-text-D0uvrHo1.js} +1 -1
  39. package/dist/{messages-sk1eTx7H.js → messages-C00n-MG_.js} +3 -3
  40. package/dist/{monitor-DXW0sFfU.js → monitor-BWHn9jy2.js} +21 -19
  41. package/dist/plugin-entry.handlers.runtime.js +1 -1
  42. package/dist/probe.runtime-DcSBLSet.js +3 -0
  43. package/dist/{profile-update-rzynJvpi.js → profile-update-CWvjc5i_.js} +2 -2
  44. package/dist/{reaction-events-DRKzlo8q.js → reaction-events-CdkYjlyo.js} +1 -1
  45. package/dist/{recovery-key-store-D6RbiZMM.js → recovery-key-store-TSlOpcEG.js} +22 -53
  46. package/dist/{resolve-targets-CAwsoBQK.js → resolve-targets-0dT0vJZJ.js} +1 -1
  47. package/dist/{resolver.runtime-phS2hwm9.js → resolver.runtime-BD2ZRhKw.js} +1 -1
  48. package/dist/runtime-api.js +1 -1
  49. package/dist/runtime-heavy-api.js +1 -1
  50. package/dist/{sdk-BdCZ5WwA.js → sdk-CdMhAFz3.js} +9 -202
  51. package/dist/{send-DEgWxp1p.js → send-Bus9xhUh.js} +1 -1
  52. package/dist/{setup-bootstrap-B4xc58Ww.js → setup-bootstrap-C9tUX9Ty.js} +2 -2
  53. package/dist/{setup-core-DJosJdWt.js → setup-core-CUyFBi5x.js} +3 -3
  54. package/dist/setup-plugin-api.js +3 -3
  55. package/dist/{setup-surface-CqxGV1WL.js → setup-surface-BRlTR6to.js} +5 -5
  56. package/dist/{shared-BbT5LdPp.js → shared-Bk7pOHMb.js} +8 -84
  57. package/dist/{startup-verification-D1p_LRmg.js → startup-verification-BoDITB_u.js} +2 -2
  58. package/dist/{storage-DSVcH_zM.js → storage-C10h2piS.js} +122 -26
  59. package/dist/{thread-bindings-gLQYbsB9.js → thread-bindings-CnviJ9Ff.js} +4 -23
  60. package/dist/{tool-actions.runtime-o06m9bgN.js → tool-actions.runtime-dStqVKMT.js} +6 -6
  61. package/dist/{verification-BiA5IWPK.js → verification-jZ1KWtb5.js} +2 -2
  62. package/npm-shrinkwrap.json +3 -3
  63. package/package.json +4 -4
  64. package/dist/probe.runtime-BO0mNIe8.js +0 -3
  65. package/dist/record-shared-CvzjvHRn.js +0 -2
@@ -1,14 +1,11 @@
1
1
  import { t as getMatrixRuntime } from "./runtime-6S3DNFNv.js";
2
- import { o as resolveMatrixStoragePaths } from "./storage-DSVcH_zM.js";
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
4
  import os from "node:os";
4
5
  import path from "node:path";
5
- import { readJsonFileWithFallback, writeJsonFileAtomically } from "openclaw/plugin-sdk/json-store";
6
6
  import fs from "node:fs/promises";
7
7
  //#region extensions/matrix/src/matrix/monitor/legacy-crypto-restore.ts
8
- function isMigrationState(value) {
9
- return Boolean(value) && typeof value === "object" && value.version === 1;
10
- }
11
- async function resolvePendingMigrationStatePath(params) {
8
+ async function resolvePendingMigrationStateRoot(params) {
12
9
  const { rootDir } = resolveMatrixStoragePaths({
13
10
  homeserver: params.auth.homeserver,
14
11
  userId: params.auth.userId,
@@ -17,10 +14,12 @@ async function resolvePendingMigrationStatePath(params) {
17
14
  deviceId: params.auth.deviceId,
18
15
  stateDir: params.stateDir
19
16
  });
20
- const directStatePath = path.join(rootDir, "legacy-crypto-migration.json");
21
- const { value: directValue } = await readJsonFileWithFallback(directStatePath, null);
22
- if (isMigrationState(directValue) && directValue.restoreStatus === "pending") return {
23
- statePath: directStatePath,
17
+ try {
18
+ migrateLegacyMatrixLegacyCryptoMigrationFileToStore(rootDir);
19
+ } catch {}
20
+ const directValue = readMatrixLegacyCryptoMigrationState(rootDir);
21
+ if (directValue?.restoreStatus === "pending") return {
22
+ storageRootDir: rootDir,
24
23
  value: directValue
25
24
  };
26
25
  const accountStorageDir = path.dirname(rootDir);
@@ -29,40 +28,46 @@ async function resolvePendingMigrationStatePath(params) {
29
28
  siblingEntries = (await fs.readdir(accountStorageDir, { withFileTypes: true })).filter((entry) => entry.isDirectory()).map((entry) => entry.name).filter((entry) => path.join(accountStorageDir, entry) !== rootDir).toSorted((left, right) => left.localeCompare(right));
30
29
  } catch {
31
30
  return {
32
- statePath: directStatePath,
31
+ storageRootDir: rootDir,
33
32
  value: directValue
34
33
  };
35
34
  }
36
35
  for (const sibling of siblingEntries) {
37
- const siblingStatePath = path.join(accountStorageDir, sibling, "legacy-crypto-migration.json");
38
- const { value } = await readJsonFileWithFallback(siblingStatePath, null);
39
- if (isMigrationState(value) && value.restoreStatus === "pending") return {
40
- statePath: siblingStatePath,
36
+ const siblingRootDir = path.join(accountStorageDir, sibling);
37
+ try {
38
+ migrateLegacyMatrixLegacyCryptoMigrationFileToStore(siblingRootDir);
39
+ } catch {}
40
+ const value = readMatrixLegacyCryptoMigrationState(siblingRootDir);
41
+ if (value?.restoreStatus === "pending") return {
42
+ storageRootDir: siblingRootDir,
41
43
  value
42
44
  };
43
45
  }
44
46
  return {
45
- statePath: directStatePath,
47
+ storageRootDir: rootDir,
46
48
  value: directValue
47
49
  };
48
50
  }
49
51
  async function maybeRestoreLegacyMatrixBackup(params) {
50
52
  const env = params.env ?? process.env;
51
- const { statePath, value } = await resolvePendingMigrationStatePath({
53
+ const { storageRootDir, value } = await resolvePendingMigrationStateRoot({
52
54
  stateDir: params.stateDir ?? getMatrixRuntime().state.resolveStateDir(env, os.homedir),
53
55
  auth: params.auth
54
56
  });
55
- if (!isMigrationState(value) || value.restoreStatus !== "pending") return { kind: "skipped" };
57
+ if (value?.restoreStatus !== "pending") return { kind: "skipped" };
56
58
  const restore = await params.client.restoreRoomKeyBackup();
57
59
  const localOnlyKeys = value.roomKeyCounts && value.roomKeyCounts.total > value.roomKeyCounts.backedUp ? value.roomKeyCounts.total - value.roomKeyCounts.backedUp : 0;
58
60
  if (restore.success) {
59
- await writeJsonFileAtomically(statePath, {
60
- ...value,
61
- restoreStatus: "completed",
62
- restoredAt: restore.restoredAt ?? (/* @__PURE__ */ new Date()).toISOString(),
63
- importedCount: restore.imported,
64
- totalCount: restore.total,
65
- lastError: null
61
+ writeMatrixLegacyCryptoMigrationState({
62
+ storageRootDir,
63
+ state: {
64
+ ...value,
65
+ restoreStatus: "completed",
66
+ restoredAt: restore.restoredAt ?? (/* @__PURE__ */ new Date()).toISOString(),
67
+ importedCount: restore.imported,
68
+ totalCount: restore.total,
69
+ lastError: null
70
+ }
66
71
  });
67
72
  return {
68
73
  kind: "restored",
@@ -71,9 +76,12 @@ async function maybeRestoreLegacyMatrixBackup(params) {
71
76
  localOnlyKeys
72
77
  };
73
78
  }
74
- await writeJsonFileAtomically(statePath, {
75
- ...value,
76
- lastError: restore.error ?? "unknown"
79
+ writeMatrixLegacyCryptoMigrationState({
80
+ storageRootDir,
81
+ state: {
82
+ ...value,
83
+ lastError: restore.error ?? "unknown"
84
+ }
77
85
  });
78
86
  return {
79
87
  kind: "failed",
@@ -0,0 +1,78 @@
1
+ import { t as getMatrixRuntime } from "./runtime-6S3DNFNv.js";
2
+ import { format } from "node:util";
3
+ import { redactSensitiveText } from "openclaw/plugin-sdk/logging-core";
4
+ //#region extensions/matrix/src/matrix/sdk/logger.ts
5
+ function noop() {}
6
+ let forceConsoleLogging = false;
7
+ function setMatrixConsoleLogging(enabled) {
8
+ forceConsoleLogging = enabled;
9
+ }
10
+ function resolveRuntimeLogger(module) {
11
+ if (forceConsoleLogging) return null;
12
+ try {
13
+ return getMatrixRuntime().logging.getChildLogger({ module: `matrix:${module}` });
14
+ } catch {
15
+ return null;
16
+ }
17
+ }
18
+ function formatMessage(module, messageOrObject) {
19
+ if (messageOrObject.length === 0) return `[${module}]`;
20
+ return redactSensitiveText(`[${module}] ${format(...messageOrObject)}`);
21
+ }
22
+ var ConsoleLogger = class {
23
+ emit(level, module, ...messageOrObject) {
24
+ const runtimeLogger = resolveRuntimeLogger(module);
25
+ const message = formatMessage(module, messageOrObject);
26
+ if (runtimeLogger) {
27
+ if (level === "debug") {
28
+ runtimeLogger.debug?.(message);
29
+ return;
30
+ }
31
+ runtimeLogger[level](message);
32
+ return;
33
+ }
34
+ if (level === "debug") {
35
+ console.debug(message);
36
+ return;
37
+ }
38
+ console[level](message);
39
+ }
40
+ trace(module, ...messageOrObject) {
41
+ this.emit("debug", module, ...messageOrObject);
42
+ }
43
+ debug(module, ...messageOrObject) {
44
+ this.emit("debug", module, ...messageOrObject);
45
+ }
46
+ info(module, ...messageOrObject) {
47
+ this.emit("info", module, ...messageOrObject);
48
+ }
49
+ warn(module, ...messageOrObject) {
50
+ this.emit("warn", module, ...messageOrObject);
51
+ }
52
+ error(module, ...messageOrObject) {
53
+ this.emit("error", module, ...messageOrObject);
54
+ }
55
+ };
56
+ let activeLogger = new ConsoleLogger();
57
+ const LogService = {
58
+ setLogger(logger) {
59
+ activeLogger = logger;
60
+ },
61
+ trace(module, ...messageOrObject) {
62
+ activeLogger.trace(module, ...messageOrObject);
63
+ },
64
+ debug(module, ...messageOrObject) {
65
+ activeLogger.debug(module, ...messageOrObject);
66
+ },
67
+ info(module, ...messageOrObject) {
68
+ activeLogger.info(module, ...messageOrObject);
69
+ },
70
+ warn(module, ...messageOrObject) {
71
+ activeLogger.warn(module, ...messageOrObject);
72
+ },
73
+ error(module, ...messageOrObject) {
74
+ activeLogger.error(module, ...messageOrObject);
75
+ }
76
+ };
77
+ //#endregion
78
+ export { setMatrixConsoleLogging as i, LogService as n, noop as r, ConsoleLogger as t };
@@ -1,4 +1,4 @@
1
- import { d as ConsoleLogger, f as LogService, m as setMatrixConsoleLogging } from "./shared-BbT5LdPp.js";
1
+ import { i as setMatrixConsoleLogging, n as LogService, t as ConsoleLogger } from "./logger-D0GCSDQq.js";
2
2
  import { logger } from "matrix-js-sdk/lib/logger.js";
3
3
  //#region extensions/matrix/src/matrix/client/logging.ts
4
4
  let matrixSdkLoggingConfigured = false;
@@ -1,7 +1,8 @@
1
- import { a as resolveMatrixDefaultOrOnlyAccountId, i as resolveMatrixChannelConfig, n as requiresExplicitMatrixDefaultAccount, o as resolveMatrixAccountStringValues, r as resolveConfiguredMatrixAccountIds, t as findMatrixAccountEntry } from "./account-selection-DEMtY2cn.js";
1
+ import { a as resolveMatrixDefaultOrOnlyAccountId, i as resolveMatrixChannelConfig, n as requiresExplicitMatrixDefaultAccount, r as resolveConfiguredMatrixAccountIds, s as resolveMatrixAccountStringValues, t as findMatrixAccountEntry } from "./account-selection-Bv_ZuOu4.js";
2
2
  import { i as resolveScopedMatrixEnvConfig, n as resolveGlobalMatrixEnvConfig } from "./env-auth-DIzOApj0.js";
3
3
  import { a as resolveMatrixCredentialsPath, n as resolveMatrixAccountStorageRoot, s as resolveMatrixLegacyFlatStoragePaths } from "./storage-paths-BWo_ZEMC.js";
4
4
  import { t as formatMatrixErrorMessage } from "./errors-C47hvAF8.js";
5
+ import { C as writeMatrixLegacyCryptoMigrationState, T as writeMatrixRecoveryKeyState, _ as readMatrixLegacyCryptoMigrationState, l as migrateLegacyMatrixRecoveryKeyFileToStore, s as migrateLegacyMatrixLegacyCryptoMigrationFileToStore, v as readMatrixRecoveryKeyState } from "./crypto-state-store-DK2tcEyP.js";
5
6
  import "./migration-snapshot-backup-YcCrSjbE.js";
6
7
  import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
7
8
  import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/account-id";
@@ -9,7 +10,7 @@ import fs from "node:fs";
9
10
  import os from "node:os";
10
11
  import path from "node:path";
11
12
  import { resolveStateDir } from "openclaw/plugin-sdk/state-paths";
12
- import { loadJsonFile, writeJsonFileAtomically } from "openclaw/plugin-sdk/json-store";
13
+ import { loadJsonFile } from "openclaw/plugin-sdk/json-store";
13
14
  import { fileURLToPath } from "node:url";
14
15
  //#region extensions/matrix/src/migration-config.ts
15
16
  function clean(value) {
@@ -347,15 +348,6 @@ function resolveMatrixLegacyCryptoPlans(params) {
347
348
  warnings
348
349
  };
349
350
  }
350
- function loadStoredRecoveryKey(filePath) {
351
- return loadJsonFile(filePath) ?? null;
352
- }
353
- function loadLegacyCryptoMigrationState(filePath) {
354
- return loadJsonFile(filePath) ?? null;
355
- }
356
- async function persistLegacyMigrationState(params) {
357
- await params.writeJsonFileAtomically(params.filePath, params.state);
358
- }
359
351
  function detectLegacyMatrixCrypto(params) {
360
352
  const detection = resolveMatrixLegacyCryptoPlans({
361
353
  cfg: params.cfg,
@@ -385,7 +377,6 @@ async function autoPrepareLegacyMatrixCrypto(params) {
385
377
  const inspectorAvailable = "inspectorAvailable" in detection ? detection.inspectorAvailable : true;
386
378
  const warnings = [...detection.warnings];
387
379
  const changes = [];
388
- const writeJsonFileAtomically$1 = params.deps?.writeJsonFileAtomically ?? writeJsonFileAtomically;
389
380
  if (detection.plans.length === 0) {
390
381
  if (warnings.length > 0) params.log?.warn?.(`matrix: legacy encrypted-state warnings:\n${warnings.map((entry) => `- ${entry}`).join("\n")}`);
391
382
  return {
@@ -421,7 +412,13 @@ async function autoPrepareLegacyMatrixCrypto(params) {
421
412
  warnings
422
413
  };
423
414
  for (const plan of detection.plans) {
424
- if (loadLegacyCryptoMigrationState(plan.statePath)?.version === 1) continue;
415
+ try {
416
+ migrateLegacyMatrixLegacyCryptoMigrationFileToStore(plan.rootDir);
417
+ migrateLegacyMatrixRecoveryKeyFileToStore(plan.rootDir);
418
+ } catch (err) {
419
+ warnings.push(`Failed migrating Matrix crypto sidecar state for account "${plan.accountId}" (${plan.rootDir}): ${String(err)}`);
420
+ }
421
+ if (readMatrixLegacyCryptoMigrationState(plan.rootDir)?.version === 1) continue;
425
422
  if (!plan.deviceId) {
426
423
  warnings.push(`Legacy Matrix encrypted state detected at ${plan.legacyCryptoPath}, but no device ID was found for account "${plan.accountId}". OpenClaw will continue, but old encrypted history cannot be recovered automatically.`);
427
424
  continue;
@@ -440,8 +437,8 @@ async function autoPrepareLegacyMatrixCrypto(params) {
440
437
  }
441
438
  let decryptionKeyImported = false;
442
439
  if (summary.decryptionKeyBase64) {
443
- const existingRecoveryKey = loadStoredRecoveryKey(plan.recoveryKeyPath);
444
- if (existingRecoveryKey?.privateKeyBase64 && existingRecoveryKey.privateKeyBase64 !== summary.decryptionKeyBase64) warnings.push(`Legacy Matrix backup key was found for account "${plan.accountId}", but ${plan.recoveryKeyPath} already contains a different recovery key. Leaving the existing file unchanged.`);
440
+ const existingRecoveryKey = readMatrixRecoveryKeyState(plan.rootDir);
441
+ if (existingRecoveryKey?.privateKeyBase64 && existingRecoveryKey.privateKeyBase64 !== summary.decryptionKeyBase64) warnings.push(`Legacy Matrix backup key was found for account "${plan.accountId}", but Matrix SQLite state already contains a different recovery key. Leaving the existing state unchanged.`);
445
442
  else if (!existingRecoveryKey?.privateKeyBase64) {
446
443
  const payload = {
447
444
  version: 1,
@@ -450,11 +447,14 @@ async function autoPrepareLegacyMatrixCrypto(params) {
450
447
  privateKeyBase64: summary.decryptionKeyBase64
451
448
  };
452
449
  try {
453
- await writeJsonFileAtomically$1(plan.recoveryKeyPath, payload);
454
- changes.push(`Imported Matrix legacy backup key for account "${plan.accountId}": ${plan.recoveryKeyPath}`);
450
+ writeMatrixRecoveryKeyState({
451
+ storageRootDir: plan.rootDir,
452
+ payload
453
+ });
454
+ changes.push(`Imported Matrix legacy backup key for account "${plan.accountId}" into SQLite`);
455
455
  decryptionKeyImported = true;
456
456
  } catch (err) {
457
- warnings.push(`Failed writing Matrix recovery key for account "${plan.accountId}" (${plan.recoveryKeyPath}): ${String(err)}`);
457
+ warnings.push(`Failed writing Matrix recovery key for account "${plan.accountId}" to SQLite: ${String(err)}`);
458
458
  }
459
459
  } else decryptionKeyImported = true;
460
460
  }
@@ -462,7 +462,7 @@ async function autoPrepareLegacyMatrixCrypto(params) {
462
462
  if (localOnlyKeys > 0) warnings.push(`Legacy Matrix encrypted state for account "${plan.accountId}" contains ${localOnlyKeys} room key(s) that were never backed up. Backed-up keys can be restored automatically, but local-only encrypted history may remain unavailable after upgrade.`);
463
463
  if (!summary.decryptionKeyBase64 && (summary.roomKeyCounts?.backedUp ?? 0) > 0) warnings.push(`Legacy Matrix encrypted state for account "${plan.accountId}" has backed-up room keys, but no local backup decryption key was found. Ask the operator to run "openclaw matrix verify backup restore --recovery-key <key>" after upgrade if they have the recovery key.`);
464
464
  if (!summary.decryptionKeyBase64 && (summary.roomKeyCounts?.total ?? 0) > 0) warnings.push(`Legacy Matrix encrypted state for account "${plan.accountId}" cannot be fully converted automatically because the old rust crypto store does not expose all local room keys for export.`);
465
- if (summary.decryptionKeyBase64 && !decryptionKeyImported && !loadStoredRecoveryKey(plan.recoveryKeyPath)) continue;
465
+ if (summary.decryptionKeyBase64 && !decryptionKeyImported && !readMatrixRecoveryKeyState(plan.rootDir)) continue;
466
466
  const state = {
467
467
  version: 1,
468
468
  source: "matrix-bot-sdk-rust",
@@ -476,14 +476,13 @@ async function autoPrepareLegacyMatrixCrypto(params) {
476
476
  lastError: null
477
477
  };
478
478
  try {
479
- await persistLegacyMigrationState({
480
- filePath: plan.statePath,
481
- state,
482
- writeJsonFileAtomically: writeJsonFileAtomically$1
479
+ writeMatrixLegacyCryptoMigrationState({
480
+ storageRootDir: plan.rootDir,
481
+ state
483
482
  });
484
- changes.push(`Prepared Matrix legacy encrypted-state migration for account "${plan.accountId}": ${plan.statePath}`);
483
+ changes.push(`Prepared Matrix legacy encrypted-state migration for account "${plan.accountId}" in SQLite`);
485
484
  } catch (err) {
486
- warnings.push(`Failed writing Matrix legacy encrypted-state migration record for account "${plan.accountId}" (${plan.statePath}): ${String(err)}`);
485
+ warnings.push(`Failed writing Matrix legacy encrypted-state migration record for account "${plan.accountId}" to SQLite: ${String(err)}`);
487
486
  }
488
487
  }
489
488
  if (changes.length > 0) params.log?.info?.(`matrix: prepared encrypted-state upgrade.\n${changes.map((entry) => `- ${entry}`).join("\n")}`);
@@ -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-DEgWxp1p.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-Bus9xhUh.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-DEgWxp1p.js";
2
+ import { T as isPollStartType, a as sendMessageMatrix, n as editMessageMatrix, w as isPollEventType } from "./send-Bus9xhUh.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-DVhXN81h.js";
5
- import { r as withResolvedRoomAction } from "./client-CdP9vWOu.js";
4
+ import { a as resolveMatrixMessageAttachment, l as resolveMatrixPollRootEventId, o as resolveMatrixMessageBody, s as fetchMatrixPollMessageSummary } from "./media-text-D0uvrHo1.js";
5
+ import { r as withResolvedRoomAction } from "./client-CPfb6TMG.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,22 +1,24 @@
1
1
  import { c as resolveMatrixAccountConfig, s as resolveMatrixAccountAllowlistConfig } from "./config-paths-ZBCMwSos.js";
2
2
  import { t as getMatrixRuntime } from "./runtime-6S3DNFNv.js";
3
- import { m as resolveConfiguredMatrixBotUserIds } from "./setup-core-DJosJdWt.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-6UUus7Ba.js";
5
- import { a as normalizeMatrixUserId, i as normalizeMatrixAllowList, o as resolveMatrixAllowListMatch } from "./config-schema-CVJYP50t.js";
3
+ import { m as resolveConfiguredMatrixBotUserIds } from "./setup-core-CUyFBi5x.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-DtT1oc4C.js";
5
+ import { a as normalizeMatrixUserId, i as normalizeMatrixAllowList, o as resolveMatrixAllowListMatch } from "./config-schema-NrB2XGxM.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
- import { a as resolveMatrixStateFilePath } from "./storage-DSVcH_zM.js";
9
- 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-DEgWxp1p.js";
10
- import { n as resolveMatrixSqliteStateEnv, t as createMatrixThreadBindingManager } from "./thread-bindings-gLQYbsB9.js";
11
- 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-DVhXN81h.js";
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-Bus9xhUh.js";
11
+ import { t as createMatrixThreadBindingManager } from "./thread-bindings-CnviJ9Ff.js";
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-D0uvrHo1.js";
12
14
  import { n as setActiveMatrixClient } from "./active-client-DXvz2gCo.js";
13
15
  import { t as isBunRuntime } from "./runtime-BefyhPWv.js";
14
- import { _ as resolveMatrixAuthContext, f as LogService, g as resolveMatrixAuth, h as backfillMatrixAuthDeviceIdAfterStartup, i as resolveSharedMatrixClient, l as isMatrixStartupAbortError, n as releaseSharedClientInstance, u as throwIfMatrixStartupAborted } from "./shared-BbT5LdPp.js";
15
- import "./client-DRRL7Zv5.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-Bk7pOHMb.js";
17
+ import "./client-dLfa0qNk.js";
16
18
  import { i as isMatrixMediaSizeLimitError, r as MatrixMediaSizeLimitError } from "./http-client-nipb5tk1.js";
17
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";
18
- import { t as resolveMatrixTargets } from "./resolve-targets-CAwsoBQK.js";
19
- import { t as formatMatrixEncryptedEventDisabledWarning } from "./encryption-guidance-aEUzD940.js";
20
+ import { t as resolveMatrixTargets } from "./resolve-targets-0dT0vJZJ.js";
21
+ import { t as formatMatrixEncryptedEventDisabledWarning } from "./encryption-guidance-D_KhjprO.js";
20
22
  import { n as isMatrixReadySyncState, r as isMatrixTerminalSyncState, t as isMatrixDisconnectedSyncState } from "./sync-state-CWbp0QSY.js";
21
23
  import { a as EventType, i as resolveMatrixThreadRouting, n as resolveMatrixReplyToEventId, o as RelationType, r as resolveMatrixThreadRootId, t as resolveMatrixInboundRoute } from "./route-DY6at4qJ.js";
22
24
  import { buildChannelProgressDraftLineForEntry, createChannelProgressDraftGate, createPreviewMessageReceipt, defineFinalizableLivePreviewAdapter, deliverWithFinalizableLivePreviewAdapter, formatChannelProgressDraftLine, formatChannelProgressDraftLineForEntry, formatChannelProgressDraftText, isChannelProgressDraftWorkToolName, mergeChannelProgressDraftLine, normalizeChannelProgressDraftLineIdentity, resolveChannelProgressDraftMaxLines, waitUntilAbort } from "openclaw/plugin-sdk/channel-outbound";
@@ -819,7 +821,7 @@ const SAS_NOTICE_RETRY_DELAY_MS = 750;
819
821
  const VERIFICATION_EVENT_STARTUP_GRACE_MS = 3e4;
820
822
  let matrixDirectRoomDepsPromise;
821
823
  async function loadMatrixDirectRoomDeps() {
822
- matrixDirectRoomDepsPromise ??= Promise.all([import("./send-DEgWxp1p.js").then((n) => n.d), import("./send-DEgWxp1p.js").then((n) => n.m)]).then(([directManagementModule, directRoomModule]) => ({
824
+ matrixDirectRoomDepsPromise ??= Promise.all([import("./send-Bus9xhUh.js").then((n) => n.d), import("./send-Bus9xhUh.js").then((n) => n.m)]).then(([directManagementModule, directRoomModule]) => ({
823
825
  inspectMatrixDirectRooms: directManagementModule.inspectMatrixDirectRooms,
824
826
  isStrictDirectRoom: directRoomModule.isStrictDirectRoom
825
827
  }));
@@ -2231,7 +2233,7 @@ let sessionBindingRuntimePromise;
2231
2233
  let matrixReactionEventsPromise;
2232
2234
  let matrixDraftStreamPromise;
2233
2235
  function loadMatrixSendModule() {
2234
- matrixSendModulePromise ??= import("./send-DEgWxp1p.js").then((n) => n.l);
2236
+ matrixSendModulePromise ??= import("./send-Bus9xhUh.js").then((n) => n.l);
2235
2237
  return matrixSendModulePromise;
2236
2238
  }
2237
2239
  function loadAcpBindingRuntime() {
@@ -2243,11 +2245,11 @@ function loadSessionBindingRuntime() {
2243
2245
  return sessionBindingRuntimePromise;
2244
2246
  }
2245
2247
  function loadMatrixReactionEvents() {
2246
- matrixReactionEventsPromise ??= import("./reaction-events-DRKzlo8q.js");
2248
+ matrixReactionEventsPromise ??= import("./reaction-events-CdkYjlyo.js");
2247
2249
  return matrixReactionEventsPromise;
2248
2250
  }
2249
2251
  function loadMatrixDraftStream() {
2250
- matrixDraftStreamPromise ??= import("./draft-stream-DZ2X1RHP.js");
2252
+ matrixDraftStreamPromise ??= import("./draft-stream-PqFfvyV9.js");
2251
2253
  return matrixDraftStreamPromise;
2252
2254
  }
2253
2255
  async function matrixTextWouldActivateMentions(client, text) {
@@ -4135,11 +4137,11 @@ function createMatrixRoomInfoResolver(client) {
4135
4137
  let matrixStartupMaintenanceDepsPromise;
4136
4138
  async function loadMatrixStartupMaintenanceDeps() {
4137
4139
  matrixStartupMaintenanceDepsPromise ??= Promise.all([
4138
- import("./setup-core-DJosJdWt.js").then((n) => n.s),
4140
+ import("./setup-core-CUyFBi5x.js").then((n) => n.s),
4139
4141
  import("./device-health-D4LBxuPq.js"),
4140
- import("./setup-core-DJosJdWt.js").then((n) => n.a),
4141
- import("./legacy-crypto-restore-CbVSppMd.js"),
4142
- import("./startup-verification-D1p_LRmg.js")
4142
+ import("./setup-core-CUyFBi5x.js").then((n) => n.a),
4143
+ import("./legacy-crypto-restore-Bm6HmeN5.js"),
4144
+ import("./startup-verification-BoDITB_u.js")
4143
4145
  ]).then(([configUpdateModule, deviceHealthModule, profileModule, legacyCryptoRestoreModule, startupVerificationModule]) => ({
4144
4146
  updateMatrixAccountConfig: configUpdateModule.updateMatrixAccountConfig,
4145
4147
  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-BiA5IWPK.js").then((n) => n.y);
6
+ matrixVerificationRuntimePromise ??= import("./verification-jZ1KWtb5.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-MnSzqELZ.js";
2
+ import "./client-dLfa0qNk.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-DJosJdWt.js";
3
- import { n as withResolvedActionClient } from "./client-CdP9vWOu.js";
2
+ import { c as resolveMatrixConfigPath, l as updateMatrixAccountConfig, o as syncMatrixOwnProfile } from "./setup-core-CUyFBi5x.js";
3
+ import { n as withResolvedActionClient } from "./client-CPfb6TMG.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-NgDjrK6V.js");
10
+ approvalReactionAuthPromise ??= import("./approval-reaction-auth-ryklScll.js");
11
11
  return approvalReactionAuthPromise;
12
12
  }
13
13
  function loadExecApprovalResolver() {
@@ -1,38 +1,8 @@
1
1
  import { n as formatMatrixErrorReason, t as formatMatrixErrorMessage } from "./errors-C47hvAF8.js";
2
- import { f as LogService } from "./shared-BbT5LdPp.js";
3
- import { loadJsonFile, saveJsonFile } from "openclaw/plugin-sdk/json-store";
2
+ import { E as writeMatrixRecoveryKeyStateForPath, c as migrateLegacyMatrixRecoveryKeyFilePathToStore, m as readLegacyMatrixRecoveryKeyFile, y as readMatrixRecoveryKeyStateForPath } from "./crypto-state-store-DK2tcEyP.js";
3
+ import { n as LogService } from "./logger-D0GCSDQq.js";
4
+ import path from "node:path";
4
5
  import { decodeRecoveryKey } from "matrix-js-sdk/lib/crypto-api/recovery-key.js";
5
- //#region extensions/matrix/src/matrix/sdk/idb-persistence-lock.ts
6
- const MATRIX_IDB_PERSIST_INTERVAL_MS = 6e4;
7
- const IDB_SNAPSHOT_LOCK_STALE_MS = 5 * 6e4;
8
- const IDB_SNAPSHOT_LOCK_RETRY_BASE = {
9
- factor: 2,
10
- minTimeout: 50,
11
- maxTimeout: 5e3,
12
- randomize: true
13
- };
14
- function computeRetryDelayMs(retries, attempt) {
15
- return Math.min(retries.maxTimeout, Math.max(retries.minTimeout, retries.minTimeout * retries.factor ** attempt));
16
- }
17
- function computeMinimumRetryWindowMs(retries) {
18
- let total = 0;
19
- const attempts = Math.max(1, retries.retries + 1);
20
- for (let attempt = 0; attempt < attempts - 1; attempt += 1) total += computeRetryDelayMs(retries, attempt);
21
- return total;
22
- }
23
- function resolveRetriesForMinimumWindowMs(retries, minimumWindowMs) {
24
- const resolved = {
25
- ...retries,
26
- retries: 0
27
- };
28
- while (computeMinimumRetryWindowMs(resolved) < minimumWindowMs) resolved.retries += 1;
29
- return resolved;
30
- }
31
- const MATRIX_IDB_SNAPSHOT_LOCK_OPTIONS = {
32
- retries: resolveRetriesForMinimumWindowMs(IDB_SNAPSHOT_LOCK_RETRY_BASE, MATRIX_IDB_PERSIST_INTERVAL_MS),
33
- stale: IDB_SNAPSHOT_LOCK_STALE_MS
34
- };
35
- //#endregion
36
6
  //#region extensions/matrix/src/matrix/sdk/recovery-key-store.ts
37
7
  function isRepairableSecretStorageAccessError(err) {
38
8
  const message = formatMatrixErrorReason(err);
@@ -43,11 +13,18 @@ function isRepairableSecretStorageAccessError(err) {
43
13
  }
44
14
  var MatrixRecoveryKeyStore = class {
45
15
  constructor(recoveryKeyPath) {
46
- this.recoveryKeyPath = recoveryKeyPath;
47
16
  this.secretStorageKeyCache = /* @__PURE__ */ new Map();
48
17
  this.stagedRecoveryKey = null;
49
18
  this.stagedRecoveryKeyUsed = false;
50
19
  this.stagedCacheKeyIds = /* @__PURE__ */ new Set();
20
+ this.recoveryKeyPath = recoveryKeyPath;
21
+ this.storageRootDir = recoveryKeyPath ? path.dirname(recoveryKeyPath) : void 0;
22
+ if (this.recoveryKeyPath) try {
23
+ migrateLegacyMatrixRecoveryKeyFilePathToStore(this.recoveryKeyPath);
24
+ } catch (err) {
25
+ this.legacyRecoveryKeyPathOnMigrationFailure = this.recoveryKeyPath;
26
+ LogService.warn("MatrixClientLite", "Failed to migrate Matrix recovery key state:", err);
27
+ }
51
28
  }
52
29
  buildCryptoCallbacks() {
53
30
  return {
@@ -221,7 +198,7 @@ var MatrixRecoveryKeyStore = class {
221
198
  createSecretStorageKey: ensureRecoveryKey
222
199
  });
223
200
  }
224
- if (generatedRecoveryKey && this.recoveryKeyPath) LogService.warn("MatrixClientLite", `Generated Matrix recovery key and saved it to ${this.recoveryKeyPath}. Keep this file secure.`);
201
+ if (generatedRecoveryKey && this.storageRootDir) LogService.warn("MatrixClientLite", "Generated Matrix recovery key and saved it to Matrix SQLite state. Keep the displayed recovery key secure.");
225
202
  }
226
203
  clearStagedRecoveryKeyTracking() {
227
204
  this.stagedRecoveryKey = null;
@@ -253,22 +230,11 @@ var MatrixRecoveryKeyStore = class {
253
230
  loadStoredRecoveryKey() {
254
231
  if (!this.recoveryKeyPath) return null;
255
232
  try {
256
- const parsed = loadJsonFile(this.recoveryKeyPath);
257
- if (parsed?.version !== 1 || typeof parsed.createdAt !== "string" || typeof parsed.privateKeyBase64 !== "string" || !parsed.privateKeyBase64.trim()) return null;
258
- return {
259
- version: 1,
260
- createdAt: parsed.createdAt,
261
- keyId: typeof parsed.keyId === "string" ? parsed.keyId : null,
262
- encodedPrivateKey: typeof parsed.encodedPrivateKey === "string" ? parsed.encodedPrivateKey : void 0,
263
- privateKeyBase64: parsed.privateKeyBase64,
264
- keyInfo: parsed.keyInfo && typeof parsed.keyInfo === "object" ? {
265
- passphrase: parsed.keyInfo.passphrase,
266
- name: typeof parsed.keyInfo.name === "string" ? parsed.keyInfo.name : void 0
267
- } : void 0
268
- };
269
- } catch {
270
- return null;
271
- }
233
+ const stored = readMatrixRecoveryKeyStateForPath(this.recoveryKeyPath);
234
+ if (stored) return stored;
235
+ } catch {}
236
+ if (this.legacyRecoveryKeyPathOnMigrationFailure) return readLegacyMatrixRecoveryKeyFile(this.legacyRecoveryKeyPathOnMigrationFailure);
237
+ return null;
272
238
  }
273
239
  saveRecoveryKeyToDisk(params) {
274
240
  if (!this.recoveryKeyPath) return;
@@ -284,11 +250,14 @@ var MatrixRecoveryKeyStore = class {
284
250
  name: params.keyInfo.name
285
251
  } : void 0
286
252
  };
287
- saveJsonFile(this.recoveryKeyPath, payload);
253
+ writeMatrixRecoveryKeyStateForPath({
254
+ recoveryKeyPath: this.recoveryKeyPath,
255
+ payload
256
+ });
288
257
  } catch (err) {
289
258
  LogService.warn("MatrixClientLite", "Failed to persist recovery key:", err);
290
259
  }
291
260
  }
292
261
  };
293
262
  //#endregion
294
- export { MATRIX_IDB_SNAPSHOT_LOCK_OPTIONS as i, isRepairableSecretStorageAccessError as n, MATRIX_IDB_PERSIST_INTERVAL_MS as r, MatrixRecoveryKeyStore as t };
263
+ export { isRepairableSecretStorageAccessError as n, MatrixRecoveryKeyStore as t };
@@ -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-5uWtLQ41.js";
3
+ import { n as listMatrixDirectoryGroupsLive, r as listMatrixDirectoryPeersLive } from "./directory-live-C7aYHtRU.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-CAwsoBQK.js";
1
+ import { t as resolveMatrixTargets } from "./resolve-targets-0dT0vJZJ.js";
2
2
  //#region extensions/matrix/src/resolver.runtime.ts
3
3
  const matrixResolverRuntime = { resolveMatrixTargets };
4
4
  //#endregion
@@ -1,4 +1,4 @@
1
- import { a as resolveMatrixDefaultOrOnlyAccountId, i as resolveMatrixChannelConfig, n as requiresExplicitMatrixDefaultAccount, o as resolveMatrixAccountStringValues, r as resolveConfiguredMatrixAccountIds, t as findMatrixAccountEntry } from "./account-selection-DEMtY2cn.js";
1
+ import { a as resolveMatrixDefaultOrOnlyAccountId, i as resolveMatrixChannelConfig, n as requiresExplicitMatrixDefaultAccount, r as resolveConfiguredMatrixAccountIds, s as resolveMatrixAccountStringValues, 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 { r as setMatrixRuntime } from "./runtime-6S3DNFNv.js";
4
4
  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";
@@ -1,3 +1,3 @@
1
- import { a as detectLegacyMatrixCrypto, i as autoPrepareLegacyMatrixCrypto, n as hasPendingMatrixMigration, o as autoMigrateLegacyMatrixState, r as resolveMatrixMigrationStatus, s as detectLegacyMatrixState, t as hasActionableMatrixMigration } from "./matrix-migration.runtime-RzIEp7RP.js";
1
+ import { a as detectLegacyMatrixCrypto, i as autoPrepareLegacyMatrixCrypto, n as hasPendingMatrixMigration, o as autoMigrateLegacyMatrixState, r as resolveMatrixMigrationStatus, s as detectLegacyMatrixState, t as hasActionableMatrixMigration } from "./matrix-migration.runtime-dvxE3e5l.js";
2
2
  import { t as maybeCreateMatrixMigrationSnapshot } from "./migration-snapshot-backup-YcCrSjbE.js";
3
3
  export { autoMigrateLegacyMatrixState, autoPrepareLegacyMatrixCrypto, detectLegacyMatrixCrypto, detectLegacyMatrixState, hasActionableMatrixMigration, hasPendingMatrixMigration, maybeCreateMatrixMigrationSnapshot, resolveMatrixMigrationStatus };