@openclaw/matrix 2026.6.11 → 2026.7.1-beta.2

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 (57) hide show
  1. package/dist/api.js +4 -4
  2. package/dist/{approval-handler.runtime-CK5HedmU.js → approval-handler.runtime-DzpLXVdc.js} +4 -4
  3. package/dist/{approval-ids-gM2AFaP-.js → approval-ids-R834n6m3.js} +1 -1
  4. package/dist/{approval-reaction-auth--lKUos8v.js → approval-reaction-auth-eAqCXUFG.js} +2 -2
  5. package/dist/{channel-Y_HGdzpZ.js → channel-KcNo9qtl.js} +18 -22
  6. package/dist/channel-plugin-api.js +1 -1
  7. package/dist/{channel.runtime-DkbZfBYE.js → channel.runtime-DtsGVgZj.js} +7 -10
  8. package/dist/{cli-ZiO7g1vT.js → cli-Clvpw_8I.js} +10 -17
  9. package/dist/{cli-metadata-Cn_UFU3u.js → cli-metadata-D3N0Avnt.js} +1 -1
  10. package/dist/cli-metadata.js +1 -1
  11. package/dist/{client-DnNqVfCX.js → client-BQz5GcYr.js} +2 -2
  12. package/dist/{client-COdtuzoa.js → client-D-5GVz_D.js} +2 -2
  13. package/dist/{client-bootstrap-DoOOMP52.js → client-bootstrap-CBJciU5u.js} +6 -9
  14. package/dist/{config-schema-o1UmRtMF.js → config-schema-Dn-fHID8.js} +1 -1
  15. package/dist/contract-api.js +2 -2
  16. package/dist/{create-client-DWe5jGGk.js → create-client-DhGid8FE.js} +7 -10
  17. package/dist/{credentials-write.runtime-cZhhyGAZ.js → credentials-write.runtime-5PDPPG9f.js} +2 -5
  18. package/dist/{crypto-runtime-DaHFPR8x.js → crypto-runtime-B7kyrTL0.js} +9 -7
  19. package/dist/{deps-BVWGd2XS.js → deps-D3bkh48_.js} +3 -3
  20. package/dist/{directory-live-D4ibL3X0.js → directory-live-Ctu4whZK.js} +3 -3
  21. package/dist/{doctor-BwpkOBwr.js → doctor-BRSDNU5C.js} +1 -1
  22. package/dist/doctor-contract-api.js +2 -2
  23. package/dist/{draft-stream-aZa1gWNI.js → draft-stream-j71tSUu-.js} +1 -1
  24. package/dist/{file-sync-store-1GY-yvy-.js → file-sync-store-BWLVB01Y.js} +1 -1
  25. package/dist/{http-client-BBfH0FfA.js → http-client-nSmFiVgk.js} +11 -6
  26. package/dist/index.js +3 -6
  27. package/dist/{legacy-crypto-inspector-tJOj25VL.js → legacy-crypto-inspector-D_8iylBq.js} +1 -1
  28. package/dist/{legacy-crypto-restore-DenIM7bT.js → legacy-crypto-restore-B0gcIEkE.js} +1 -1
  29. package/dist/{matrix-migration.runtime-dvxE3e5l.js → matrix-migration.runtime-Ctlb_rZl.js} +1 -1
  30. package/dist/{media-text-DS2lvlA2.js → media-text-XO4VaezT.js} +1 -1
  31. package/dist/{messages-CMTiMecS.js → messages-nQLGGa1r.js} +3 -3
  32. package/dist/{monitor-BpvP2_nj.js → monitor-k3Sko8qt.js} +50 -77
  33. package/dist/plugin-entry.handlers.runtime.js +2 -5
  34. package/dist/probe.runtime-BED7DXis.js +3 -0
  35. package/dist/{profile-update-DUh6sAqK.js → profile-update-DIOAhezh.js} +2 -2
  36. package/dist/{reaction-events-CABcpM-q.js → reaction-events-BDsbR82F.js} +3 -10
  37. package/dist/{resolve-targets-Byrcsv59.js → resolve-targets-BbrinjHd.js} +1 -1
  38. package/dist/{resolver.runtime-Blu9khLB.js → resolver.runtime-B3N7k_6-.js} +1 -1
  39. package/dist/runtime-api.js +1 -1
  40. package/dist/runtime-heavy-api.js +1 -1
  41. package/dist/{sdk-CpYofZkF.js → sdk-eyqOqjmn.js} +9 -12
  42. package/dist/{send-eoayPB_l.js → send-D0hpevF-.js} +2 -5
  43. package/dist/session-binding-contract-api.js +1 -1
  44. package/dist/{setup-bootstrap-DRzRwu9E.js → setup-bootstrap-Ihb_DM2a.js} +2 -2
  45. package/dist/{setup-core-Ub_idsu1.js → setup-core-D2BQs8w1.js} +1 -1
  46. package/dist/setup-plugin-api.js +3 -3
  47. package/dist/{setup-surface-CXenmuMm.js → setup-surface-1qf1LZIP.js} +5 -5
  48. package/dist/{shared-CSN0TWWD.js → shared-BGcaBMK3.js} +15 -31
  49. package/dist/{startup-verification-Bl_QJ2BQ.js → startup-verification-Bd31KqLv.js} +1 -1
  50. package/dist/{storage-BSLHjdgS.js → storage-t5S-5c_5.js} +27 -12
  51. package/dist/subagent-hooks-api.js +2 -5
  52. package/dist/{thread-bindings-DuoPRata.js → thread-bindings-BnuBS0VH.js} +2 -2
  53. package/dist/{tool-actions.runtime-BwP9E9M0.js → tool-actions.runtime-BeUveYxV.js} +6 -6
  54. package/dist/{verification-BN8M6A73.js → verification-CNw2K4uT.js} +1 -1
  55. package/npm-shrinkwrap.json +3 -3
  56. package/package.json +4 -4
  57. package/dist/probe.runtime-DKRqRegP.js +0 -3
@@ -1,26 +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-Ub_idsu1.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-Y_HGdzpZ.js";
5
- import { a as normalizeMatrixUserId, i as normalizeMatrixAllowList, o as resolveMatrixAllowListMatch } from "./config-schema-o1UmRtMF.js";
3
+ import { m as resolveConfiguredMatrixBotUserIds } from "./setup-core-D2BQs8w1.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-KcNo9qtl.js";
5
+ import { a as normalizeMatrixUserId, i as normalizeMatrixAllowList, o as resolveMatrixAllowListMatch } from "./config-schema-Dn-fHID8.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 { c as resolveMatrixStateFilePath } from "./storage-BSLHjdgS.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-eoayPB_l.js";
11
- import { t as createMatrixThreadBindingManager } from "./thread-bindings-DuoPRata.js";
9
+ import { c as resolveMatrixStateFilePath } from "./storage-t5S-5c_5.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-D0hpevF-.js";
11
+ import { t as createMatrixThreadBindingManager } from "./thread-bindings-BnuBS0VH.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-DS2lvlA2.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-XO4VaezT.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-CSN0TWWD.js";
17
- import "./client-COdtuzoa.js";
18
- import { i as isMatrixMediaSizeLimitError, r as MatrixMediaSizeLimitError } from "./http-client-BBfH0FfA.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-BGcaBMK3.js";
17
+ import "./client-D-5GVz_D.js";
18
+ import { i as isMatrixMediaSizeLimitError, r as MatrixMediaSizeLimitError } from "./http-client-nSmFiVgk.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-Byrcsv59.js";
20
+ import { t as resolveMatrixTargets } from "./resolve-targets-BbrinjHd.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 { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
24
25
  import { buildChannelProgressDraftLineForEntry, createChannelProgressDraftGate, createPreviewMessageReceipt, defineFinalizableLivePreviewAdapter, deliverWithFinalizableLivePreviewAdapter, formatChannelProgressDraftLine, formatChannelProgressDraftText, isChannelProgressDraftWorkToolName, mergeChannelProgressDraftLine, normalizeChannelProgressDraftLineIdentity, resolveChannelProgressDraftMaxLines, waitUntilAbort } from "openclaw/plugin-sdk/channel-outbound";
25
26
  import { normalizeLowercaseStringOrEmpty, normalizeOptionalString, normalizeStringifiedEntries, uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
26
27
  import path from "node:path";
@@ -28,7 +29,7 @@ import { createHash } from "node:crypto";
28
29
  import { CHANNEL_APPROVAL_NATIVE_RUNTIME_CONTEXT_CAPABILITY } from "openclaw/plugin-sdk/approval-handler-adapter-runtime";
29
30
  import { resolveInboundLastRouteSessionKey } from "openclaw/plugin-sdk/routing";
30
31
  import { buildChannelInboundEventContext, hasFinalInboundReplyDispatch, toInboundMediaFacts } from "openclaw/plugin-sdk/channel-inbound";
31
- import { loadSessionStore, resolveSessionStoreEntry } from "openclaw/plugin-sdk/session-store-runtime";
32
+ import { getSessionEntry } from "openclaw/plugin-sdk/session-store-runtime";
32
33
  import { isFutureDateTimestampMs, parseStrictFiniteNumber, resolveExpiresAtMsFromDurationMs, resolveOptionalIntegerOption } from "openclaw/plugin-sdk/number-runtime";
33
34
  import { readJsonFileWithFallback } from "openclaw/plugin-sdk/json-store";
34
35
  import fs from "node:fs/promises";
@@ -42,7 +43,7 @@ import { evaluateSupplementalContextVisibility, resolveChannelContextVisibilityM
42
43
  import { mergePairLoopGuardConfig } from "openclaw/plugin-sdk/pair-loop-guard-runtime";
43
44
  import { buildInboundHistoryFromEntries } from "openclaw/plugin-sdk/reply-history";
44
45
  import { resolvePinnedMainDmOwnerFromAllowlist } from "openclaw/plugin-sdk/security-runtime";
45
- import { escapeRegExp } from "openclaw/plugin-sdk/text-utility-runtime";
46
+ import { escapeRegExp, sliceUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
46
47
  import { logVerbose } from "openclaw/plugin-sdk/runtime-env";
47
48
  import { createConnectedChannelStatusPatch, createTransportActivityStatusPatch } from "openclaw/plugin-sdk/gateway-runtime";
48
49
  //#region extensions/matrix/src/matrix/monitor/auto-join.ts
@@ -819,14 +820,10 @@ const matrixVerificationConstants = {
819
820
  const MAX_TRACKED_VERIFICATION_EVENTS = 1024;
820
821
  const SAS_NOTICE_RETRY_DELAY_MS = 750;
821
822
  const VERIFICATION_EVENT_STARTUP_GRACE_MS = 3e4;
822
- let matrixDirectRoomDepsPromise;
823
- async function loadMatrixDirectRoomDeps() {
824
- matrixDirectRoomDepsPromise ??= Promise.all([import("./send-eoayPB_l.js").then((n) => n.d), import("./send-eoayPB_l.js").then((n) => n.m)]).then(([directManagementModule, directRoomModule]) => ({
825
- inspectMatrixDirectRooms: directManagementModule.inspectMatrixDirectRooms,
826
- isStrictDirectRoom: directRoomModule.isStrictDirectRoom
827
- }));
828
- return await matrixDirectRoomDepsPromise;
829
- }
823
+ const loadMatrixDirectRoomDeps = createLazyRuntimeModule(() => Promise.all([import("./send-D0hpevF-.js").then((n) => n.d), import("./send-D0hpevF-.js").then((n) => n.m)]).then(([directManagementModule, directRoomModule]) => ({
824
+ inspectMatrixDirectRooms: directManagementModule.inspectMatrixDirectRooms,
825
+ isStrictDirectRoom: directRoomModule.isStrictDirectRoom
826
+ })));
830
827
  function trimMaybeString(input) {
831
828
  if (typeof input !== "string") return null;
832
829
  const trimmed = input.trim();
@@ -1668,11 +1665,7 @@ function resolveMentions(params) {
1668
1665
  //#endregion
1669
1666
  //#region extensions/matrix/src/matrix/monitor/preflight-audio.ts
1670
1667
  const MATRIX_DEFAULT_ECHO_TRANSCRIPT_FORMAT = "📝 \"{transcript}\"";
1671
- let matrixPreflightAudioRuntimePromise;
1672
- function loadMatrixPreflightAudioRuntime() {
1673
- matrixPreflightAudioRuntimePromise ??= import("./preflight-audio.runtime-BZxxQsxY.js");
1674
- return matrixPreflightAudioRuntimePromise;
1675
- }
1668
+ const loadMatrixPreflightAudioRuntime = createLazyRuntimeModule(() => import("./preflight-audio.runtime-BZxxQsxY.js"));
1676
1669
  function formatMatrixAudioTranscript(transcript) {
1677
1670
  return `[Audio transcript (machine-generated, untrusted)]: ${JSON.stringify(transcript)}`;
1678
1671
  }
@@ -1870,7 +1863,7 @@ const MAX_CACHED_REPLY_CONTEXTS = 256;
1870
1863
  const MAX_REPLY_BODY_LENGTH = 500;
1871
1864
  function truncateReplyBody(value) {
1872
1865
  if (value.length <= MAX_REPLY_BODY_LENGTH) return value;
1873
- return `${value.slice(0, MAX_REPLY_BODY_LENGTH - 3)}...`;
1866
+ return `${sliceUtf16Safe(value, 0, MAX_REPLY_BODY_LENGTH - 3)}...`;
1874
1867
  }
1875
1868
  function summarizeMatrixReplyEvent(event) {
1876
1869
  const body = summarizeMatrixMessageContextEvent(event);
@@ -2170,7 +2163,7 @@ const MAX_TRACKED_THREAD_STARTERS = 256;
2170
2163
  const MAX_THREAD_STARTER_BODY_LENGTH = 500;
2171
2164
  function truncateThreadStarterBody(value) {
2172
2165
  if (value.length <= MAX_THREAD_STARTER_BODY_LENGTH) return value;
2173
- return `${value.slice(0, MAX_THREAD_STARTER_BODY_LENGTH - 3)}...`;
2166
+ return `${sliceUtf16Safe(value, 0, MAX_THREAD_STARTER_BODY_LENGTH - 3)}...`;
2174
2167
  }
2175
2168
  function summarizeMatrixThreadStarterEvent(event) {
2176
2169
  const body = summarizeMatrixMessageContextEvent(event);
@@ -2229,31 +2222,11 @@ function createMatrixThreadContextResolver(params) {
2229
2222
  const ALLOW_FROM_STORE_CACHE_TTL_MS = 3e4;
2230
2223
  const PAIRING_REPLY_COOLDOWN_MS = 5 * 6e4;
2231
2224
  const MATRIX_TOOL_PROGRESS_MAX_CHARS = 300;
2232
- let matrixSendModulePromise;
2233
- let acpBindingRuntimePromise;
2234
- let sessionBindingRuntimePromise;
2235
- let matrixReactionEventsPromise;
2236
- let matrixDraftStreamPromise;
2237
- function loadMatrixSendModule() {
2238
- matrixSendModulePromise ??= import("./send-eoayPB_l.js").then((n) => n.l);
2239
- return matrixSendModulePromise;
2240
- }
2241
- function loadAcpBindingRuntime() {
2242
- acpBindingRuntimePromise ??= import("openclaw/plugin-sdk/acp-binding-runtime");
2243
- return acpBindingRuntimePromise;
2244
- }
2245
- function loadSessionBindingRuntime() {
2246
- sessionBindingRuntimePromise ??= import("openclaw/plugin-sdk/session-binding-runtime");
2247
- return sessionBindingRuntimePromise;
2248
- }
2249
- function loadMatrixReactionEvents() {
2250
- matrixReactionEventsPromise ??= import("./reaction-events-CABcpM-q.js");
2251
- return matrixReactionEventsPromise;
2252
- }
2253
- function loadMatrixDraftStream() {
2254
- matrixDraftStreamPromise ??= import("./draft-stream-aZa1gWNI.js");
2255
- return matrixDraftStreamPromise;
2256
- }
2225
+ const loadMatrixSendModule = createLazyRuntimeModule(() => import("./send-D0hpevF-.js").then((n) => n.l));
2226
+ const loadAcpBindingRuntime = createLazyRuntimeModule(() => import("openclaw/plugin-sdk/acp-binding-runtime"));
2227
+ const loadSessionBindingRuntime = createLazyRuntimeModule(() => import("openclaw/plugin-sdk/session-binding-runtime"));
2228
+ const loadMatrixReactionEvents = createLazyRuntimeModule(() => import("./reaction-events-BDsbR82F.js"));
2229
+ const loadMatrixDraftStream = createLazyRuntimeModule(() => import("./draft-stream-j71tSUu-.js"));
2257
2230
  async function matrixTextWouldActivateMentions(client, text) {
2258
2231
  const { resolveMatrixMentionsForBody } = await loadMatrixSendModule();
2259
2232
  const mentions = await resolveMatrixMentionsForBody({
@@ -2317,10 +2290,10 @@ function resolveMatrixSharedDmContextNotice(params) {
2317
2290
  if ((params.dmSessionScope ?? "per-user") === "per-room") return null;
2318
2291
  if (params.sentRooms.has(params.roomId)) return null;
2319
2292
  try {
2320
- const currentSession = resolveMatrixStoredSessionMeta(resolveSessionStoreEntry({
2321
- store: loadSessionStore(params.storePath),
2293
+ const currentSession = resolveMatrixStoredSessionMeta(getSessionEntry({
2294
+ storePath: params.storePath,
2322
2295
  sessionKey: params.sessionKey
2323
- }).existing);
2296
+ }));
2324
2297
  if (!currentSession) return null;
2325
2298
  if (currentSession.channel && currentSession.channel !== "matrix") return null;
2326
2299
  if (currentSession.accountId && currentSession.accountId !== params.accountId) return null;
@@ -3199,7 +3172,8 @@ function createMatrixRoomMessageHandler(params) {
3199
3172
  access: {
3200
3173
  ...isRoom ? { mentions: {
3201
3174
  canDetectMention: true,
3202
- wasMentioned
3175
+ wasMentioned,
3176
+ requireMention: shouldRequireMention
3203
3177
  } } : {},
3204
3178
  commands: { authorized: commandAuthorized }
3205
3179
  },
@@ -3882,12 +3856,15 @@ function pruneSeenEvents(params) {
3882
3856
  seen.delete(oldestKey);
3883
3857
  }
3884
3858
  }
3885
- function createInboundDedupeStore(params) {
3886
- return getMatrixRuntime().state.openKeyedStore({
3859
+ function openMatrixInboundDedupeStoreOptions(params) {
3860
+ return {
3887
3861
  namespace: INBOUND_DEDUPE_NAMESPACE,
3888
3862
  maxEntries: DEFAULT_MAX_ENTRIES,
3889
3863
  env: resolveMatrixSqliteStateEnv(params)
3890
- });
3864
+ };
3865
+ }
3866
+ function createInboundDedupeStore(params) {
3867
+ return getMatrixRuntime().state.openKeyedStore(openMatrixInboundDedupeStoreOptions(params));
3891
3868
  }
3892
3869
  function createInboundDedupeMigrationStore(params) {
3893
3870
  return getMatrixRuntime().state.openKeyedStore({
@@ -4143,23 +4120,19 @@ function createMatrixRoomInfoResolver(client) {
4143
4120
  }
4144
4121
  //#endregion
4145
4122
  //#region extensions/matrix/src/matrix/monitor/startup.ts
4146
- let matrixStartupMaintenanceDepsPromise;
4147
- async function loadMatrixStartupMaintenanceDeps() {
4148
- matrixStartupMaintenanceDepsPromise ??= Promise.all([
4149
- import("./setup-core-Ub_idsu1.js").then((n) => n.s),
4150
- import("./device-health-D4LBxuPq.js"),
4151
- import("./setup-core-Ub_idsu1.js").then((n) => n.a),
4152
- import("./legacy-crypto-restore-DenIM7bT.js"),
4153
- import("./startup-verification-Bl_QJ2BQ.js")
4154
- ]).then(([configUpdateModule, deviceHealthModule, profileModule, legacyCryptoRestoreModule, startupVerificationModule]) => ({
4155
- updateMatrixAccountConfig: configUpdateModule.updateMatrixAccountConfig,
4156
- summarizeMatrixDeviceHealth: deviceHealthModule.summarizeMatrixDeviceHealth,
4157
- syncMatrixOwnProfile: profileModule.syncMatrixOwnProfile,
4158
- maybeRestoreLegacyMatrixBackup: legacyCryptoRestoreModule.maybeRestoreLegacyMatrixBackup,
4159
- ensureMatrixStartupVerification: startupVerificationModule.ensureMatrixStartupVerification
4160
- }));
4161
- return await matrixStartupMaintenanceDepsPromise;
4162
- }
4123
+ const loadMatrixStartupMaintenanceDeps = createLazyRuntimeModule(() => Promise.all([
4124
+ import("./setup-core-D2BQs8w1.js").then((n) => n.s),
4125
+ import("./device-health-D4LBxuPq.js"),
4126
+ import("./setup-core-D2BQs8w1.js").then((n) => n.a),
4127
+ import("./legacy-crypto-restore-B0gcIEkE.js"),
4128
+ import("./startup-verification-Bd31KqLv.js")
4129
+ ]).then(([configUpdateModule, deviceHealthModule, profileModule, legacyCryptoRestoreModule, startupVerificationModule]) => ({
4130
+ updateMatrixAccountConfig: configUpdateModule.updateMatrixAccountConfig,
4131
+ summarizeMatrixDeviceHealth: deviceHealthModule.summarizeMatrixDeviceHealth,
4132
+ syncMatrixOwnProfile: profileModule.syncMatrixOwnProfile,
4133
+ maybeRestoreLegacyMatrixBackup: legacyCryptoRestoreModule.maybeRestoreLegacyMatrixBackup,
4134
+ ensureMatrixStartupVerification: startupVerificationModule.ensureMatrixStartupVerification
4135
+ })));
4163
4136
  async function runMatrixStartupMaintenance(params, deps) {
4164
4137
  const runtimeDeps = deps ?? await loadMatrixStartupMaintenanceDeps();
4165
4138
  throwIfMatrixStartupAborted(params.abortSignal);
@@ -1,11 +1,8 @@
1
1
  import { t as formatMatrixErrorMessage } from "./errors-C47hvAF8.js";
2
+ import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
2
3
  import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
3
4
  //#region extensions/matrix/src/plugin-entry.runtime.ts
4
- let matrixVerificationRuntimePromise;
5
- function loadMatrixVerificationRuntime() {
6
- matrixVerificationRuntimePromise ??= import("./verification-BN8M6A73.js").then((n) => n.y);
7
- return matrixVerificationRuntimePromise;
8
- }
5
+ const loadMatrixVerificationRuntime = createLazyRuntimeModule(() => import("./verification-CNw2K4uT.js").then((n) => n.y));
9
6
  function sendError(respond, err) {
10
7
  respond(false, { error: formatMatrixErrorMessage(err) });
11
8
  }
@@ -0,0 +1,3 @@
1
+ import { t as createMatrixClient } from "./create-client-DhGid8FE.js";
2
+ import "./client-D-5GVz_D.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-Ub_idsu1.js";
3
- import { n as withResolvedActionClient } from "./client-DnNqVfCX.js";
2
+ import { c as resolveMatrixConfigPath, l as updateMatrixAccountConfig, o as syncMatrixOwnProfile } from "./setup-core-D2BQs8w1.js";
3
+ import { n as withResolvedActionClient } from "./client-BQz5GcYr.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 = {}) {
@@ -2,18 +2,11 @@ import { a as resolveMatrixAccountConfig } from "./account-config-BZWN9tGS.js";
2
2
  import { a as extractMatrixReactionAnnotation } from "./reaction-common-DkrQdBSZ.js";
3
3
  import { a as unregisterMatrixApprovalReactionTarget, i as resolveMatrixApprovalReactionTargetWithPersistence } from "./approval-reactions-BRGQgOu2.js";
4
4
  import { i as resolveMatrixThreadRouting, r as resolveMatrixThreadRootId, t as resolveMatrixInboundRoute } from "./route-DY6at4qJ.js";
5
+ import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
5
6
  import { getSessionBindingService } from "openclaw/plugin-sdk/session-binding-runtime";
6
7
  //#region extensions/matrix/src/matrix/monitor/reaction-events.ts
7
- let approvalReactionAuthPromise;
8
- let execApprovalResolverPromise;
9
- function loadApprovalReactionAuth() {
10
- approvalReactionAuthPromise ??= import("./approval-reaction-auth--lKUos8v.js");
11
- return approvalReactionAuthPromise;
12
- }
13
- function loadExecApprovalResolver() {
14
- execApprovalResolverPromise ??= import("./exec-approval-resolver-f9j6staN.js");
15
- return execApprovalResolverPromise;
16
- }
8
+ const loadApprovalReactionAuth = createLazyRuntimeModule(() => import("./approval-reaction-auth-eAqCXUFG.js"));
9
+ const loadExecApprovalResolver = createLazyRuntimeModule(() => import("./exec-approval-resolver-f9j6staN.js"));
17
10
  function resolveMatrixReactionNotificationMode(params) {
18
11
  const matrixConfig = params.cfg.channels?.matrix;
19
12
  return resolveMatrixAccountConfig({
@@ -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-D4ibL3X0.js";
3
+ import { n as listMatrixDirectoryGroupsLive, r as listMatrixDirectoryPeersLive } from "./directory-live-Ctu4whZK.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-Byrcsv59.js";
1
+ import { t as resolveMatrixTargets } from "./resolve-targets-BbrinjHd.js";
2
2
  //#region extensions/matrix/src/resolver.runtime.ts
3
3
  const matrixResolverRuntime = { resolveMatrixTargets };
4
4
  //#endregion
@@ -3,7 +3,7 @@ import { n as listMatrixEnvAccountIds, r as resolveMatrixEnvAccountToken, t as g
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";
5
5
  import { d as setMatrixThreadBindingIdleTimeoutBySessionKey, p as setMatrixThreadBindingMaxAgeBySessionKey } from "./thread-bindings-shared-CKnY4LSd.js";
6
- import { n as ensureMatrixSdkInstalled, r as isMatrixSdkAvailable } from "./deps-BVWGd2XS.js";
6
+ import { n as ensureMatrixSdkInstalled, r as isMatrixSdkAvailable } from "./deps-D3bkh48_.js";
7
7
  import { assertHttpUrlTargetsPrivateNetwork, closeDispatcher, createPinnedDispatcher, resolvePinnedHostnameWithPolicy, ssrfPolicyFromAllowPrivateNetwork, ssrfPolicyFromDangerouslyAllowPrivateNetwork } from "openclaw/plugin-sdk/ssrf-runtime";
8
8
  import { writeJsonFileAtomically } from "openclaw/plugin-sdk/json-store";
9
9
  import { formatZonedTimestamp } from "openclaw/plugin-sdk/time-runtime";
@@ -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-dvxE3e5l.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-Ctlb_rZl.js";
2
2
  import { t as maybeCreateMatrixMigrationSnapshot } from "./migration-snapshot-backup-YcCrSjbE.js";
3
3
  export { autoMigrateLegacyMatrixState, autoPrepareLegacyMatrixCrypto, detectLegacyMatrixCrypto, detectLegacyMatrixState, hasActionableMatrixMigration, hasPendingMatrixMigration, maybeCreateMatrixMigrationSnapshot, resolveMatrixMigrationStatus };
@@ -1,13 +1,14 @@
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-1GY-yvy-.js";
3
+ import { t as SqliteBackedMatrixSyncStore } from "./file-sync-store-BWLVB01Y.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-CSN0TWWD.js";
6
- import { a as matrixEventToRaw, n as createMatrixGuardedFetch, o as parseMxc, t as MatrixAuthedHttpClient } from "./http-client-BBfH0FfA.js";
5
+ import { c as createMatrixStartupAbortError, u as throwIfMatrixStartupAborted } from "./shared-BGcaBMK3.js";
6
+ import { a as matrixEventToRaw, n as createMatrixGuardedFetch, o as parseMxc, t as MatrixAuthedHttpClient } from "./http-client-nSmFiVgk.js";
7
7
  import { n as resolveMatrixRoomKeyBackupReadinessError } from "./backup-health-Dm_YMVFT.js";
8
8
  import { createMatrixJsSdkClientLogger } from "./logging-QH-48Gr6.js";
9
9
  import { n as isMatrixReadySyncState, r as isMatrixTerminalSyncState } from "./sync-state-CWbp0QSY.js";
10
10
  import { n as isRepairableSecretStorageAccessError, t as MatrixRecoveryKeyStore } from "./recovery-key-store-BGk8c_gf.js";
11
+ import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
11
12
  import { normalizeNullableString, normalizeStringEntries, uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
12
13
  import { KeyedAsyncQueue } from "openclaw/plugin-sdk/keyed-async-queue";
13
14
  import { ClientEvent, Filter, MatrixEventEvent, Preset, createClient } from "matrix-js-sdk/lib/matrix.js";
@@ -93,14 +94,10 @@ function createMatrixExplicitBootstrapOptions(params) {
93
94
  };
94
95
  }
95
96
  let loadedMatrixCryptoRuntime = null;
96
- let matrixCryptoRuntimePromise = null;
97
- async function loadMatrixCryptoRuntime() {
98
- matrixCryptoRuntimePromise ??= import("./crypto-runtime-DaHFPR8x.js").then((runtime) => {
99
- loadedMatrixCryptoRuntime = runtime;
100
- return runtime;
101
- });
102
- return await matrixCryptoRuntimePromise;
103
- }
97
+ const loadMatrixCryptoRuntime = createLazyRuntimeModule(() => import("./crypto-runtime-B7kyrTL0.js").then((runtime) => {
98
+ loadedMatrixCryptoRuntime = runtime;
99
+ return runtime;
100
+ }));
104
101
  const normalizeOptionalString$1 = normalizeNullableString;
105
102
  function isUnsupportedAuthenticatedMediaEndpointError(err) {
106
103
  const statusCode = err?.statusCode;
@@ -221,7 +218,7 @@ var MatrixClient = class {
221
218
  verificationManager: this.verificationManager,
222
219
  recoveryKeyStore: this.recoveryKeyStore,
223
220
  getRoomStateEvent: (roomId, eventType, stateKey = "") => this.getRoomStateEvent(roomId, eventType, stateKey),
224
- downloadContent: (mxcUrl) => this.downloadContent(mxcUrl)
221
+ downloadContent: (mxcUrl, opts) => this.downloadContent(mxcUrl, opts)
225
222
  });
226
223
  if (!this.verificationSummaryListenerBound) {
227
224
  this.verificationSummaryListenerBound = true;
@@ -3,6 +3,7 @@ import { a as resolveMatrixAccountConfig } from "./account-config-BZWN9tGS.js";
3
3
  import { t as getMatrixRuntime } from "./runtime-6S3DNFNv.js";
4
4
  import { r as normalizeMatrixResolvableTarget, t as isMatrixQualifiedUserId } from "./target-ids-B-5aQxwn.js";
5
5
  import { n as MATRIX_REACTION_EVENT_TYPE, r as buildMatrixReactionContent, t as MATRIX_ANNOTATION_RELATION_TYPE } from "./reaction-common-DkrQdBSZ.js";
6
+ import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
6
7
  import { createMessageReceiptFromOutboundResults } from "openclaw/plugin-sdk/channel-outbound";
7
8
  import { normalizeLowercaseStringOrEmpty, normalizeOptionalString, normalizeOptionalStringifiedId } from "openclaw/plugin-sdk/string-coerce-runtime";
8
9
  import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime";
@@ -227,11 +228,7 @@ function buildPollResponseContent(pollEventId, answerIds) {
227
228
  }
228
229
  //#endregion
229
230
  //#region extensions/matrix/src/matrix/send/client.ts
230
- let matrixSendClientRuntimePromise = null;
231
- async function loadMatrixSendClientRuntime() {
232
- matrixSendClientRuntimePromise ??= import("./client-bootstrap-DoOOMP52.js").then((n) => n.t);
233
- return await matrixSendClientRuntimePromise;
234
- }
231
+ const loadMatrixSendClientRuntime = createLazyRuntimeModule(() => import("./client-bootstrap-CBJciU5u.js").then((n) => n.t));
235
232
  function resolveMediaMaxBytes(accountId, cfg) {
236
233
  if (!cfg) throw new Error("Matrix media limits requires a resolved runtime config. Load and resolve config at the command or gateway boundary, then pass cfg through the runtime path.");
237
234
  const matrixCfg = resolveMatrixAccountConfig({
@@ -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-DuoPRata.js";
3
+ import { t as createMatrixThreadBindingManager } from "./thread-bindings-BnuBS0VH.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-Ub_idsu1.js";
2
+ import "./setup-core-D2BQs8w1.js";
3
3
  import { t as formatMatrixErrorMessage } from "./errors-C47hvAF8.js";
4
- import { n as bootstrapMatrixVerification } from "./verification-BN8M6A73.js";
4
+ import { n as bootstrapMatrixVerification } from "./verification-CNw2K4uT.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-DRzRwu9E.js");
673
+ const { runMatrixSetupBootstrapAfterConfigWrite } = await import("./setup-bootstrap-Ihb_DM2a.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-Ub_idsu1.js";
2
- import { r as matrixConfigAdapter, t as MatrixChannelConfigSchema } from "./config-schema-o1UmRtMF.js";
1
+ import { g as resolveMatrixAccount, n as matrixSetupAdapter, t as createMatrixSetupWizardProxy } from "./setup-core-D2BQs8w1.js";
2
+ import { r as matrixConfigAdapter, t as MatrixChannelConfigSchema } from "./config-schema-Dn-fHID8.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-CXenmuMm.js").then((n) => n.t)).matrixSetupWizard })),
16
+ setupWizard: createMatrixSetupWizardProxy(async () => ({ matrixSetupWizard: (await import("./setup-surface-1qf1LZIP.js").then((n) => n.t)).matrixSetupWizard })),
17
17
  setup: matrixSetupAdapter,
18
18
  capabilities: {
19
19
  chatTypes: [
@@ -2,10 +2,10 @@ 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-Ub_idsu1.js";
5
+ import { g as resolveMatrixAccount, h as resolveDefaultMatrixAccountId, i as moveSingleMatrixAccountConfigToNamedAccount, l as updateMatrixAccountConfig, p as listMatrixAccountIds, r as resolveMatrixSetupDmAllowFrom } from "./setup-core-D2BQs8w1.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
- import { n as ensureMatrixSdkInstalled, r as isMatrixSdkAvailable } from "./deps-BVWGd2XS.js";
8
+ import { n as ensureMatrixSdkInstalled, r as isMatrixSdkAvailable } from "./deps-D3bkh48_.js";
9
9
  import { normalizeLowercaseStringOrEmpty, normalizeOptionalString, normalizeStringifiedOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
10
10
  import { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/account-id";
11
11
  import { formatDocsLink, hasConfiguredSecretInput, mergeAllowFromEntries, normalizeAccountId as normalizeAccountId$1, promptAccountId, promptChannelAccessConfig, splitSetupEntries } from "openclaw/plugin-sdk/setup";
@@ -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-Byrcsv59.js").then((n) => n.n);
108
+ const { resolveMatrixTargets } = await import("./resolve-targets-BbrinjHd.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-D4ibL3X0.js").then((n) => n.t);
236
+ const { listMatrixDirectoryGroupsLive } = await import("./directory-live-Ctu4whZK.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-DRzRwu9E.js");
511
+ const { runMatrixSetupBootstrapAfterConfigWrite } = await import("./setup-bootstrap-Ihb_DM2a.js");
512
512
  await runMatrixSetupBootstrapAfterConfigWrite({
513
513
  previousCfg,
514
514
  cfg,
@@ -5,8 +5,9 @@ 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 { s as repairCurrentTokenStorageMetaDeviceId } from "./storage-BSLHjdgS.js";
8
+ import { s as repairCurrentTokenStorageMetaDeviceId } from "./storage-t5S-5c_5.js";
9
9
  import { n as LogService } from "./logger-D0GCSDQq.js";
10
+ import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
10
11
  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
12
  import { coerceSecretRef, normalizeResolvedSecretInputString } from "openclaw/plugin-sdk/secret-input-runtime";
12
13
  import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
@@ -15,33 +16,20 @@ import { resolveOptionalIntegerOption } from "openclaw/plugin-sdk/number-runtime
15
16
  import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime";
16
17
  import { retryAsync } from "openclaw/plugin-sdk/retry-runtime";
17
18
  //#region extensions/matrix/src/matrix/client/config.ts
18
- let matrixAuthClientDepsPromise;
19
- let matrixCredentialsReadDepsPromise;
20
- let matrixCredentialsWriteRuntimePromise;
21
- let matrixSecretInputDepsPromise;
19
+ const loadDefaultMatrixAuthClientDeps = createLazyRuntimeModule(() => Promise.all([import("./sdk-eyqOqjmn.js"), import("./logging-QH-48Gr6.js")]).then(([sdkModule, loggingModule]) => ({
20
+ MatrixClient: sdkModule.MatrixClient,
21
+ ensureMatrixSdkLoggingConfigured: loggingModule.ensureMatrixSdkLoggingConfigured
22
+ })));
22
23
  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
24
  async function loadMatrixAuthClientDeps() {
24
- matrixAuthClientDepsPromise ??= Promise.all([import("./sdk-CpYofZkF.js"), import("./logging-QH-48Gr6.js")]).then(([sdkModule, loggingModule]) => ({
25
- MatrixClient: sdkModule.MatrixClient,
26
- ensureMatrixSdkLoggingConfigured: loggingModule.ensureMatrixSdkLoggingConfigured
27
- }));
28
- return await matrixAuthClientDepsPromise;
29
- }
30
- async function loadMatrixCredentialsReadDeps() {
31
- matrixCredentialsReadDepsPromise ??= import("./credentials-read-TzTOQPOM.js").then((n) => n.r).then((credentialsReadModule) => ({
32
- loadMatrixCredentials: credentialsReadModule.loadMatrixCredentials,
33
- credentialsMatchConfig: credentialsReadModule.credentialsMatchConfig
34
- }));
35
- return await matrixCredentialsReadDepsPromise;
36
- }
37
- async function loadMatrixCredentialsWriteRuntime() {
38
- matrixCredentialsWriteRuntimePromise ??= import("./credentials-write.runtime-cZhhyGAZ.js");
39
- return await matrixCredentialsWriteRuntimePromise;
40
- }
41
- async function loadMatrixSecretInputDeps() {
42
- matrixSecretInputDepsPromise ??= import("./config-secret-input.runtime-CwsP3--c.js").then((runtime) => ({ resolveConfiguredSecretInputString: runtime.resolveConfiguredSecretInputString }));
43
- return await matrixSecretInputDepsPromise;
44
- }
25
+ return await loadDefaultMatrixAuthClientDeps();
26
+ }
27
+ const loadMatrixCredentialsReadDeps = createLazyRuntimeModule(() => import("./credentials-read-TzTOQPOM.js").then((n) => n.r).then((credentialsReadModule) => ({
28
+ loadMatrixCredentials: credentialsReadModule.loadMatrixCredentials,
29
+ credentialsMatchConfig: credentialsReadModule.credentialsMatchConfig
30
+ })));
31
+ const loadMatrixCredentialsWriteRuntime = createLazyRuntimeModule(() => import("./credentials-write.runtime-5PDPPG9f.js"));
32
+ const loadMatrixSecretInputDeps = createLazyRuntimeModule(() => import("./config-secret-input.runtime-CwsP3--c.js").then((runtime) => ({ resolveConfiguredSecretInputString: runtime.resolveConfiguredSecretInputString })));
45
33
  function shouldRetryMatrixAuthRequest(err) {
46
34
  return MATRIX_AUTH_REQUEST_RETRY_RE.test(formatErrorMessage(err));
47
35
  }
@@ -499,11 +487,7 @@ var shared_exports = /* @__PURE__ */ __exportAll({
499
487
  stopSharedClientForAccount: () => stopSharedClientForAccount,
500
488
  stopSharedClientInstance: () => stopSharedClientInstance
501
489
  });
502
- let matrixCreateClientDepsPromise;
503
- async function loadMatrixCreateClientDeps() {
504
- matrixCreateClientDepsPromise ??= import("./create-client-DWe5jGGk.js").then((n) => n.n).then((runtime) => ({ createMatrixClient: runtime.createMatrixClient }));
505
- return await matrixCreateClientDepsPromise;
506
- }
490
+ const loadMatrixCreateClientDeps = createLazyRuntimeModule(() => import("./create-client-DhGid8FE.js").then((n) => n.n).then((runtime) => ({ createMatrixClient: runtime.createMatrixClient })));
507
491
  const sharedClientStates = /* @__PURE__ */ new Map();
508
492
  const sharedClientPromises = /* @__PURE__ */ new Map();
509
493
  function serializeDispatcherPolicyKey(auth) {
@@ -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 { l as resolveMatrixStoragePaths, o as recordCurrentStorageMetaDeviceId } from "./storage-BSLHjdgS.js";
4
+ import { l as resolveMatrixStoragePaths, o as recordCurrentStorageMetaDeviceId } from "./storage-t5S-5c_5.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";