@openclaw/matrix 2026.6.5-beta.2 → 2026.6.5-beta.5

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,211 +1,18 @@
1
- import { t as isRecord } from "./record-shared-CvzjvHRn.js";
2
1
  import { n as formatMatrixErrorReason, r as isMatrixNotFoundError, t as formatMatrixErrorMessage } from "./errors-C47hvAF8.js";
3
- import { t as claimCurrentTokenStorageState } from "./storage-DSVcH_zM.js";
4
- import { c as createMatrixStartupAbortError, d as ConsoleLogger, f as LogService, p as noop, u as throwIfMatrixStartupAborted } from "./shared-BbT5LdPp.js";
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";
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-Bk7pOHMb.js";
5
6
  import { a as matrixEventToRaw, n as createMatrixGuardedFetch, o as parseMxc, t as MatrixAuthedHttpClient } from "./http-client-nipb5tk1.js";
6
7
  import { n as resolveMatrixRoomKeyBackupReadinessError } from "./backup-health-Dm_YMVFT.js";
7
- import { createMatrixJsSdkClientLogger } from "./logging-Cm8vxO3E.js";
8
- import { t as createAsyncLock } from "./async-lock-BcLS4KOc.js";
8
+ import { createMatrixJsSdkClientLogger } from "./logging-QH-48Gr6.js";
9
9
  import { n as isMatrixReadySyncState, r as isMatrixTerminalSyncState } from "./sync-state-CWbp0QSY.js";
10
- import { n as isRepairableSecretStorageAccessError, r as MATRIX_IDB_PERSIST_INTERVAL_MS, t as MatrixRecoveryKeyStore } from "./recovery-key-store-D6RbiZMM.js";
10
+ import { n as isRepairableSecretStorageAccessError, t as MatrixRecoveryKeyStore } from "./recovery-key-store-TSlOpcEG.js";
11
11
  import { normalizeNullableString, normalizeStringEntries, uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
12
- import { readFileSync } from "node:fs";
13
- import path from "node:path";
14
- import { writeJsonFileAtomically } from "openclaw/plugin-sdk/json-store";
15
- import fs$1 from "node:fs/promises";
16
12
  import { KeyedAsyncQueue } from "openclaw/plugin-sdk/keyed-async-queue";
13
+ import { ClientEvent, Filter, MatrixEventEvent, Preset, createClient } from "matrix-js-sdk/lib/matrix.js";
17
14
  import { EventEmitter } from "node:events";
18
- import { Category, ClientEvent, Filter, MatrixEventEvent, MemoryStore, Preset, SyncAccumulator, createClient } from "matrix-js-sdk/lib/matrix.js";
19
15
  import { VerificationMethod } from "matrix-js-sdk/lib/types.js";
20
- //#region extensions/matrix/src/matrix/client/file-sync-store.ts
21
- const STORE_VERSION = 1;
22
- const PERSIST_DEBOUNCE_MS = 250;
23
- function normalizeRoomsData(value) {
24
- if (!isRecord(value)) return null;
25
- return {
26
- [Category.Join]: isRecord(value[Category.Join]) ? value[Category.Join] : {},
27
- [Category.Invite]: isRecord(value[Category.Invite]) ? value[Category.Invite] : {},
28
- [Category.Leave]: isRecord(value[Category.Leave]) ? value[Category.Leave] : {},
29
- [Category.Knock]: isRecord(value[Category.Knock]) ? value[Category.Knock] : {}
30
- };
31
- }
32
- function toPersistedSyncData(value) {
33
- if (!isRecord(value)) return null;
34
- if (typeof value.nextBatch === "string" && value.nextBatch.trim()) {
35
- const roomsData = normalizeRoomsData(value.roomsData);
36
- if (!Array.isArray(value.accountData) || !roomsData) return null;
37
- return {
38
- nextBatch: value.nextBatch,
39
- accountData: value.accountData,
40
- roomsData
41
- };
42
- }
43
- if (typeof value.next_batch === "string" && value.next_batch.trim()) {
44
- const roomsData = normalizeRoomsData(value.rooms);
45
- if (!roomsData) return null;
46
- return {
47
- nextBatch: value.next_batch,
48
- accountData: isRecord(value.account_data) && Array.isArray(value.account_data.events) ? value.account_data.events : [],
49
- roomsData
50
- };
51
- }
52
- return null;
53
- }
54
- function readPersistedStore(raw) {
55
- try {
56
- const parsed = JSON.parse(raw);
57
- const savedSync = toPersistedSyncData(parsed.savedSync);
58
- if (parsed.version === STORE_VERSION) return {
59
- version: STORE_VERSION,
60
- savedSync,
61
- clientOptions: isRecord(parsed.clientOptions) ? parsed.clientOptions : void 0,
62
- cleanShutdown: parsed.cleanShutdown === true
63
- };
64
- return {
65
- version: STORE_VERSION,
66
- savedSync: toPersistedSyncData(parsed),
67
- cleanShutdown: false
68
- };
69
- } catch {
70
- return null;
71
- }
72
- }
73
- function cloneJson(value) {
74
- return structuredClone(value);
75
- }
76
- function syncDataToSyncResponse(syncData) {
77
- return {
78
- next_batch: syncData.nextBatch,
79
- rooms: syncData.roomsData,
80
- account_data: { events: syncData.accountData }
81
- };
82
- }
83
- var FileBackedMatrixSyncStore = class extends MemoryStore {
84
- constructor(storagePath) {
85
- super();
86
- this.storagePath = storagePath;
87
- this.persistLock = createAsyncLock();
88
- this.accumulator = new SyncAccumulator();
89
- this.savedSync = null;
90
- this.cleanShutdown = false;
91
- this.dirty = false;
92
- this.persistTimer = null;
93
- this.persistPromise = null;
94
- let restoredSavedSync = null;
95
- let restoredClientOptions;
96
- let restoredCleanShutdown = false;
97
- try {
98
- const persisted = readPersistedStore(readFileSync(this.storagePath, "utf8"));
99
- restoredSavedSync = persisted?.savedSync ?? null;
100
- restoredClientOptions = persisted?.clientOptions;
101
- restoredCleanShutdown = persisted?.cleanShutdown === true;
102
- } catch {}
103
- this.savedSync = restoredSavedSync;
104
- this.savedClientOptions = restoredClientOptions;
105
- this.hadSavedSyncOnLoad = restoredSavedSync !== null;
106
- this.hadCleanShutdownOnLoad = this.hadSavedSyncOnLoad && restoredCleanShutdown;
107
- this.cleanShutdown = this.hadCleanShutdownOnLoad;
108
- if (this.savedSync) {
109
- this.accumulator.accumulate(syncDataToSyncResponse(this.savedSync), true);
110
- super.setSyncToken(this.savedSync.nextBatch);
111
- }
112
- if (this.savedClientOptions) super.storeClientOptions(this.savedClientOptions);
113
- }
114
- hasSavedSync() {
115
- return this.hadSavedSyncOnLoad;
116
- }
117
- hasSavedSyncFromCleanShutdown() {
118
- return this.hadCleanShutdownOnLoad;
119
- }
120
- getSavedSync() {
121
- return Promise.resolve(this.savedSync ? cloneJson(this.savedSync) : null);
122
- }
123
- getSavedSyncToken() {
124
- return Promise.resolve(this.savedSync?.nextBatch ?? null);
125
- }
126
- setSyncData(syncData) {
127
- this.accumulator.accumulate(syncData);
128
- this.savedSync = this.accumulator.getJSON();
129
- this.markDirtyAndSchedulePersist();
130
- return Promise.resolve();
131
- }
132
- getClientOptions() {
133
- return Promise.resolve(this.savedClientOptions ? cloneJson(this.savedClientOptions) : void 0);
134
- }
135
- storeClientOptions(options) {
136
- this.savedClientOptions = cloneJson(options);
137
- super.storeClientOptions(options);
138
- this.markDirtyAndSchedulePersist();
139
- return Promise.resolve();
140
- }
141
- save(force = false) {
142
- if (force) return this.flush();
143
- return Promise.resolve();
144
- }
145
- wantsSave() {
146
- return false;
147
- }
148
- async deleteAllData() {
149
- if (this.persistTimer) {
150
- clearTimeout(this.persistTimer);
151
- this.persistTimer = null;
152
- }
153
- this.dirty = false;
154
- await this.persistPromise?.catch(() => void 0);
155
- await super.deleteAllData();
156
- this.savedSync = null;
157
- this.savedClientOptions = void 0;
158
- this.cleanShutdown = false;
159
- await fs$1.rm(this.storagePath, { force: true }).catch(() => void 0);
160
- }
161
- markCleanShutdown() {
162
- this.cleanShutdown = true;
163
- this.dirty = true;
164
- }
165
- async flush() {
166
- if (this.persistTimer) {
167
- clearTimeout(this.persistTimer);
168
- this.persistTimer = null;
169
- }
170
- while (this.dirty || this.persistPromise) {
171
- if (this.dirty && !this.persistPromise) this.persistPromise = this.persist().finally(() => {
172
- this.persistPromise = null;
173
- });
174
- await this.persistPromise;
175
- }
176
- }
177
- markDirtyAndSchedulePersist() {
178
- this.cleanShutdown = false;
179
- this.dirty = true;
180
- if (this.persistTimer) return;
181
- this.persistTimer = setTimeout(() => {
182
- this.persistTimer = null;
183
- this.flush().catch((err) => {
184
- LogService.warn("MatrixFileSyncStore", "Failed to persist Matrix sync store:", err);
185
- });
186
- }, PERSIST_DEBOUNCE_MS);
187
- this.persistTimer.unref?.();
188
- }
189
- async persist() {
190
- this.dirty = false;
191
- const payload = {
192
- version: STORE_VERSION,
193
- savedSync: this.savedSync ? cloneJson(this.savedSync) : null,
194
- cleanShutdown: this.cleanShutdown,
195
- ...this.savedClientOptions ? { clientOptions: cloneJson(this.savedClientOptions) } : {}
196
- };
197
- try {
198
- await this.persistLock(async () => {
199
- await writeJsonFileAtomically(this.storagePath, payload);
200
- claimCurrentTokenStorageState({ rootDir: path.dirname(this.storagePath) });
201
- });
202
- } catch (err) {
203
- this.dirty = true;
204
- throw err;
205
- }
206
- }
207
- };
208
- //#endregion
209
16
  //#region extensions/matrix/src/matrix/sdk.ts
210
17
  const MATRIX_STATUS_DIAGNOSTIC_TIMEOUT_MS = 1e4;
211
18
  const DEFAULT_MATRIX_LOCAL_TIMEOUT_MS = 6e4;
@@ -288,7 +95,7 @@ function createMatrixExplicitBootstrapOptions(params) {
288
95
  let loadedMatrixCryptoRuntime = null;
289
96
  let matrixCryptoRuntimePromise = null;
290
97
  async function loadMatrixCryptoRuntime() {
291
- matrixCryptoRuntimePromise ??= import("./crypto-runtime-DWVNNqa3.js").then((runtime) => {
98
+ matrixCryptoRuntimePromise ??= import("./crypto-runtime-B4WWNpMk.js").then((runtime) => {
292
99
  loadedMatrixCryptoRuntime = runtime;
293
100
  return runtime;
294
101
  });
@@ -331,7 +138,7 @@ var MatrixClient = class {
331
138
  this.syncFilter = opts.syncFilter;
332
139
  this.encryptionEnabled = opts.encryption === true;
333
140
  this.password = opts.password;
334
- this.syncStore = opts.storagePath ? new FileBackedMatrixSyncStore(opts.storagePath) : void 0;
141
+ this.syncStore = opts.storageRootDir ? new SqliteBackedMatrixSyncStore(opts.storageRootDir) : void 0;
335
142
  this.idbSnapshotPath = opts.idbSnapshotPath;
336
143
  this.cryptoDatabasePrefix = opts.cryptoDatabasePrefix;
337
144
  this.selfUserId = opts.userId?.trim() || null;
@@ -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-D5vrHEms.js").then((n) => n.t);
232
+ matrixSendClientRuntimePromise ??= import("./client-bootstrap-Dj2242_Y.js").then((n) => n.t);
233
233
  return await matrixSendClientRuntimePromise;
234
234
  }
235
235
  function resolveMediaMaxBytes(accountId, cfg) {
@@ -1,7 +1,7 @@
1
1
  import { a as hasExplicitMatrixAccountConfig, c as resolveMatrixAccountConfig } from "./config-paths-ZBCMwSos.js";
2
- import "./setup-core-DJosJdWt.js";
2
+ import "./setup-core-CUyFBi5x.js";
3
3
  import { t as formatMatrixErrorMessage } from "./errors-C47hvAF8.js";
4
- import { n as bootstrapMatrixVerification } from "./verification-BiA5IWPK.js";
4
+ import { n as bootstrapMatrixVerification } from "./verification-jZ1KWtb5.js";
5
5
  //#region extensions/matrix/src/setup-bootstrap.ts
6
6
  async function maybeBootstrapNewEncryptedMatrixAccount(params) {
7
7
  const accountConfig = resolveMatrixAccountConfig({
@@ -1,8 +1,8 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
2
- import { a as resolveMatrixDefaultOrOnlyAccountId, o as resolveMatrixAccountStringValues, r as resolveConfiguredMatrixAccountIds } from "./account-selection-DEMtY2cn.js";
2
+ import { a as resolveMatrixDefaultOrOnlyAccountId, r as resolveConfiguredMatrixAccountIds, s as resolveMatrixAccountStringValues } from "./account-selection-Bv_ZuOu4.js";
3
3
  import { c as resolveMatrixAccountConfig, i as findMatrixAccountConfig, l as resolveMatrixBaseConfig, n as resolveMatrixConfigPath$1, r as shouldStoreMatrixAccountAtTopLevel, t as resolveMatrixConfigFieldPath } from "./config-paths-ZBCMwSos.js";
4
4
  import { i as resolveScopedMatrixEnvConfig, n as resolveGlobalMatrixEnvConfig, r as resolveMatrixEnvAuthReadiness } from "./env-auth-DIzOApj0.js";
5
- import { i as loadMatrixCredentials, n as credentialsMatchConfig } from "./credentials-read-DpxFOhx0.js";
5
+ import { i as loadMatrixCredentials, n as credentialsMatchConfig } from "./credentials-read-TzTOQPOM.js";
6
6
  import { normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
7
7
  import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/account-id";
8
8
  import { hasConfiguredSecretInput } from "openclaw/plugin-sdk/secret-input-runtime";
@@ -669,7 +669,7 @@ const matrixSetupAdapter = {
669
669
  input
670
670
  }),
671
671
  afterAccountConfigWritten: async ({ previousCfg, cfg, accountId, runtime }) => {
672
- const { runMatrixSetupBootstrapAfterConfigWrite } = await import("./setup-bootstrap-B4xc58Ww.js");
672
+ const { runMatrixSetupBootstrapAfterConfigWrite } = await import("./setup-bootstrap-C9tUX9Ty.js");
673
673
  await runMatrixSetupBootstrapAfterConfigWrite({
674
674
  previousCfg,
675
675
  cfg,
@@ -1,5 +1,5 @@
1
- import { g as resolveMatrixAccount, n as matrixSetupAdapter, t as createMatrixSetupWizardProxy } from "./setup-core-DJosJdWt.js";
2
- import { r as matrixConfigAdapter, t as MatrixChannelConfigSchema } from "./config-schema-CVJYP50t.js";
1
+ import { g as resolveMatrixAccount, n as matrixSetupAdapter, t as createMatrixSetupWizardProxy } from "./setup-core-CUyFBi5x.js";
2
+ import { r as matrixConfigAdapter, t as MatrixChannelConfigSchema } from "./config-schema-NrB2XGxM.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-CqxGV1WL.js").then((n) => n.t)).matrixSetupWizard })),
16
+ setupWizard: createMatrixSetupWizardProxy(async () => ({ matrixSetupWizard: (await import("./setup-surface-BRlTR6to.js").then((n) => n.t)).matrixSetupWizard })),
17
17
  setup: matrixSetupAdapter,
18
18
  capabilities: {
19
19
  chatTypes: [
@@ -1,8 +1,8 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
2
- import { n as requiresExplicitMatrixDefaultAccount } from "./account-selection-DEMtY2cn.js";
2
+ import { n as requiresExplicitMatrixDefaultAccount } from "./account-selection-Bv_ZuOu4.js";
3
3
  import { c as resolveMatrixAccountConfig, t as resolveMatrixConfigFieldPath } from "./config-paths-ZBCMwSos.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-DJosJdWt.js";
5
+ import { g as resolveMatrixAccount, h as resolveDefaultMatrixAccountId, i as moveSingleMatrixAccountConfigToNamedAccount, l as updateMatrixAccountConfig, p as listMatrixAccountIds, r as resolveMatrixSetupDmAllowFrom } from "./setup-core-CUyFBi5x.js";
6
6
  import { n as validateMatrixHomeserverUrl, r as isPrivateOrLoopbackHost, t as resolveValidatedMatrixHomeserverUrl } from "./url-validation-GRHde6lq.js";
7
7
  import { n as ensureMatrixSdkInstalled, r as isMatrixSdkAvailable } from "./deps-BVWGd2XS.js";
8
8
  import { normalizeLowercaseStringOrEmpty, normalizeOptionalString, normalizeStringifiedOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
@@ -104,7 +104,7 @@ async function promptMatrixAllowFrom(params) {
104
104
  pending.push(part);
105
105
  }
106
106
  if (pending.length > 0) {
107
- const { resolveMatrixTargets } = await import("./resolve-targets-CAwsoBQK.js").then((n) => n.n);
107
+ const { resolveMatrixTargets } = await import("./resolve-targets-0dT0vJZJ.js").then((n) => n.n);
108
108
  const results = await resolveMatrixTargets({
109
109
  cfg,
110
110
  accountId,
@@ -232,7 +232,7 @@ async function configureMatrixAccessPrompts(params) {
232
232
  resolvedIds.push(cleaned);
233
233
  continue;
234
234
  }
235
- const { listMatrixDirectoryGroupsLive } = await import("./directory-live-5uWtLQ41.js").then((n) => n.t);
235
+ const { listMatrixDirectoryGroupsLive } = await import("./directory-live-C7aYHtRU.js").then((n) => n.t);
236
236
  const matches = await listMatrixDirectoryGroupsLive({
237
237
  cfg: next,
238
238
  accountId: params.accountId,
@@ -507,7 +507,7 @@ const matrixOnboardingAdapter = {
507
507
  });
508
508
  },
509
509
  afterConfigWritten: async ({ previousCfg, cfg, accountId, runtime }) => {
510
- const { runMatrixSetupBootstrapAfterConfigWrite } = await import("./setup-bootstrap-B4xc58Ww.js");
510
+ const { runMatrixSetupBootstrapAfterConfigWrite } = await import("./setup-bootstrap-C9tUX9Ty.js");
511
511
  await runMatrixSetupBootstrapAfterConfigWrite({
512
512
  previousCfg,
513
513
  cfg,
@@ -1,11 +1,11 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
2
- import { a as resolveMatrixDefaultOrOnlyAccountId, n as requiresExplicitMatrixDefaultAccount, o as resolveMatrixAccountStringValues } from "./account-selection-DEMtY2cn.js";
2
+ import { a as resolveMatrixDefaultOrOnlyAccountId, n as requiresExplicitMatrixDefaultAccount, s as resolveMatrixAccountStringValues } from "./account-selection-Bv_ZuOu4.js";
3
3
  import { t as getMatrixScopedEnvVarNames } from "./env-vars-KzaYveuy.js";
4
4
  import { i as findMatrixAccountConfig, l as resolveMatrixBaseConfig, o as listNormalizedMatrixAccountIds, t as resolveMatrixConfigFieldPath } from "./config-paths-ZBCMwSos.js";
5
5
  import { i as resolveScopedMatrixEnvConfig, n as resolveGlobalMatrixEnvConfig } from "./env-auth-DIzOApj0.js";
6
- import { t as getMatrixRuntime } from "./runtime-6S3DNFNv.js";
7
6
  import { t as resolveValidatedMatrixHomeserverUrl } from "./url-validation-GRHde6lq.js";
8
- import { i as repairCurrentTokenStorageMetaDeviceId } from "./storage-DSVcH_zM.js";
7
+ import { i as repairCurrentTokenStorageMetaDeviceId } from "./storage-C10h2piS.js";
8
+ import { n as LogService } from "./logger-D0GCSDQq.js";
9
9
  import { DEFAULT_ACCOUNT_ID as DEFAULT_ACCOUNT_ID$1, normalizeAccountId as normalizeAccountId$1, normalizeOptionalAccountId, normalizeOptionalAccountId as normalizeOptionalAccountId$1 } from "openclaw/plugin-sdk/account-id";
10
10
  import { coerceSecretRef, normalizeResolvedSecretInputString } from "openclaw/plugin-sdk/secret-input-runtime";
11
11
  import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
@@ -13,8 +13,6 @@ import { isPrivateNetworkOptInEnabled, ssrfPolicyFromDangerouslyAllowPrivateNetw
13
13
  import { resolveOptionalIntegerOption } from "openclaw/plugin-sdk/number-runtime";
14
14
  import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime";
15
15
  import { retryAsync } from "openclaw/plugin-sdk/retry-runtime";
16
- import { format } from "node:util";
17
- import { redactSensitiveText } from "openclaw/plugin-sdk/logging-core";
18
16
  //#region extensions/matrix/src/matrix/client/config.ts
19
17
  let matrixAuthClientDepsPromise;
20
18
  let matrixCredentialsReadDepsPromise;
@@ -22,21 +20,21 @@ let matrixCredentialsWriteRuntimePromise;
22
20
  let matrixSecretInputDepsPromise;
23
21
  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;
24
22
  async function loadMatrixAuthClientDeps() {
25
- matrixAuthClientDepsPromise ??= Promise.all([import("./sdk-BdCZ5WwA.js"), import("./logging-Cm8vxO3E.js")]).then(([sdkModule, loggingModule]) => ({
23
+ matrixAuthClientDepsPromise ??= Promise.all([import("./sdk-CdMhAFz3.js"), import("./logging-QH-48Gr6.js")]).then(([sdkModule, loggingModule]) => ({
26
24
  MatrixClient: sdkModule.MatrixClient,
27
25
  ensureMatrixSdkLoggingConfigured: loggingModule.ensureMatrixSdkLoggingConfigured
28
26
  }));
29
27
  return await matrixAuthClientDepsPromise;
30
28
  }
31
29
  async function loadMatrixCredentialsReadDeps() {
32
- matrixCredentialsReadDepsPromise ??= import("./credentials-read-DpxFOhx0.js").then((n) => n.r).then((credentialsReadModule) => ({
30
+ matrixCredentialsReadDepsPromise ??= import("./credentials-read-TzTOQPOM.js").then((n) => n.r).then((credentialsReadModule) => ({
33
31
  loadMatrixCredentials: credentialsReadModule.loadMatrixCredentials,
34
32
  credentialsMatchConfig: credentialsReadModule.credentialsMatchConfig
35
33
  }));
36
34
  return await matrixCredentialsReadDepsPromise;
37
35
  }
38
36
  async function loadMatrixCredentialsWriteRuntime() {
39
- matrixCredentialsWriteRuntimePromise ??= import("./credentials-write.runtime-BB5QuM4Z.js");
37
+ matrixCredentialsWriteRuntimePromise ??= import("./credentials-write.runtime-cZhhyGAZ.js");
40
38
  return await matrixCredentialsWriteRuntimePromise;
41
39
  }
42
40
  async function loadMatrixSecretInputDeps() {
@@ -452,80 +450,6 @@ async function backfillMatrixAuthDeviceIdAfterStartup(params) {
452
450
  }, env, params.auth.accountId) === "saved" ? deviceId : void 0;
453
451
  }
454
452
  //#endregion
455
- //#region extensions/matrix/src/matrix/sdk/logger.ts
456
- function noop() {}
457
- let forceConsoleLogging = false;
458
- function setMatrixConsoleLogging(enabled) {
459
- forceConsoleLogging = enabled;
460
- }
461
- function resolveRuntimeLogger(module) {
462
- if (forceConsoleLogging) return null;
463
- try {
464
- return getMatrixRuntime().logging.getChildLogger({ module: `matrix:${module}` });
465
- } catch {
466
- return null;
467
- }
468
- }
469
- function formatMessage(module, messageOrObject) {
470
- if (messageOrObject.length === 0) return `[${module}]`;
471
- return redactSensitiveText(`[${module}] ${format(...messageOrObject)}`);
472
- }
473
- var ConsoleLogger = class {
474
- emit(level, module, ...messageOrObject) {
475
- const runtimeLogger = resolveRuntimeLogger(module);
476
- const message = formatMessage(module, messageOrObject);
477
- if (runtimeLogger) {
478
- if (level === "debug") {
479
- runtimeLogger.debug?.(message);
480
- return;
481
- }
482
- runtimeLogger[level](message);
483
- return;
484
- }
485
- if (level === "debug") {
486
- console.debug(message);
487
- return;
488
- }
489
- console[level](message);
490
- }
491
- trace(module, ...messageOrObject) {
492
- this.emit("debug", module, ...messageOrObject);
493
- }
494
- debug(module, ...messageOrObject) {
495
- this.emit("debug", module, ...messageOrObject);
496
- }
497
- info(module, ...messageOrObject) {
498
- this.emit("info", module, ...messageOrObject);
499
- }
500
- warn(module, ...messageOrObject) {
501
- this.emit("warn", module, ...messageOrObject);
502
- }
503
- error(module, ...messageOrObject) {
504
- this.emit("error", module, ...messageOrObject);
505
- }
506
- };
507
- let activeLogger = new ConsoleLogger();
508
- const LogService = {
509
- setLogger(logger) {
510
- activeLogger = logger;
511
- },
512
- trace(module, ...messageOrObject) {
513
- activeLogger.trace(module, ...messageOrObject);
514
- },
515
- debug(module, ...messageOrObject) {
516
- activeLogger.debug(module, ...messageOrObject);
517
- },
518
- info(module, ...messageOrObject) {
519
- activeLogger.info(module, ...messageOrObject);
520
- },
521
- warn(module, ...messageOrObject) {
522
- activeLogger.warn(module, ...messageOrObject);
523
- },
524
- error(module, ...messageOrObject) {
525
- activeLogger.error(module, ...messageOrObject);
526
- }
527
- };
528
- //#endregion
529
453
  //#region extensions/matrix/src/matrix/startup-abort.ts
530
454
  function createMatrixStartupAbortError() {
531
455
  const error = /* @__PURE__ */ new Error("Matrix startup aborted");
@@ -576,7 +500,7 @@ var shared_exports = /* @__PURE__ */ __exportAll({
576
500
  });
577
501
  let matrixCreateClientDepsPromise;
578
502
  async function loadMatrixCreateClientDeps() {
579
- matrixCreateClientDepsPromise ??= import("./create-client-B90Sb7LG.js").then((n) => n.n).then((runtime) => ({ createMatrixClient: runtime.createMatrixClient }));
503
+ matrixCreateClientDepsPromise ??= import("./create-client-MnSzqELZ.js").then((n) => n.n).then((runtime) => ({ createMatrixClient: runtime.createMatrixClient }));
580
504
  return await matrixCreateClientDepsPromise;
581
505
  }
582
506
  const sharedClientStates = /* @__PURE__ */ new Map();
@@ -753,4 +677,4 @@ async function releaseSharedClientInstance(client, mode = "stop") {
753
677
  return true;
754
678
  }
755
679
  //#endregion
756
- export { resolveMatrixAuthContext as _, shared_exports as a, createMatrixStartupAbortError as c, ConsoleLogger as d, LogService as f, resolveMatrixAuth as g, backfillMatrixAuthDeviceIdAfterStartup as h, resolveSharedMatrixClient as i, isMatrixStartupAbortError as l, setMatrixConsoleLogging as m, releaseSharedClientInstance as n, stopSharedClientForAccount as o, noop as p, removeSharedClientInstance as r, stopSharedClientInstance as s, acquireSharedMatrixClient as t, throwIfMatrixStartupAborted as u, resolveMatrixConfigForAccount as v };
680
+ export { shared_exports as a, createMatrixStartupAbortError as c, backfillMatrixAuthDeviceIdAfterStartup as d, resolveMatrixAuth as f, resolveSharedMatrixClient as i, isMatrixStartupAbortError as l, resolveMatrixConfigForAccount as m, releaseSharedClientInstance as n, stopSharedClientForAccount as o, resolveMatrixAuthContext as p, removeSharedClientInstance as r, stopSharedClientInstance as s, acquireSharedMatrixClient as t, throwIfMatrixStartupAborted as u };
@@ -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
- import { o as resolveMatrixStoragePaths, r as recordCurrentStorageMetaDeviceId } from "./storage-DSVcH_zM.js";
4
- import { n as resolveMatrixSqliteStateEnv } from "./thread-bindings-gLQYbsB9.js";
3
+ import { O as resolveMatrixSqliteStateEnv } from "./crypto-state-store-DK2tcEyP.js";
4
+ import { o as resolveMatrixStoragePaths, r as recordCurrentStorageMetaDeviceId } from "./storage-C10h2piS.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";