@openclaw/matrix 2026.5.28-beta.4 → 2026.5.30-beta.1

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 (63) hide show
  1. package/dist/api.js +7 -7
  2. package/dist/{approval-handler.runtime-Cso-m9Q7.js → approval-handler.runtime-nfyxbtVZ.js} +5 -5
  3. package/dist/{approval-ids-IrHynnHK.js → approval-ids-vw7teE3M.js} +1 -1
  4. package/dist/{approval-reaction-auth-D0nZ_4ik.js → approval-reaction-auth-kAazIsvu.js} +2 -2
  5. package/dist/auth-presence.js +1 -1
  6. package/dist/{channel-D7FK_lEY.js → channel-DwJf74NH.js} +23 -18
  7. package/dist/channel-plugin-api.js +1 -1
  8. package/dist/{channel.runtime-CBrW2dLp.js → channel.runtime-6ITv13UJ.js} +8 -8
  9. package/dist/{cli-C1xFg7Q-.js → cli-BXd9cN_x.js} +14 -13
  10. package/dist/{cli-metadata-zz9Cmwcs.js → cli-metadata-CkMUnkMl.js} +1 -1
  11. package/dist/cli-metadata.js +1 -1
  12. package/dist/{client-BIBY50VG.js → client-CpSI5BON.js} +2 -2
  13. package/dist/{client-bootstrap-Chmkqhy7.js → client-bootstrap-DOlQb7Jx.js} +1 -1
  14. package/dist/{client-BMoZSA2L.js → client-spaouc7I.js} +2 -2
  15. package/dist/{config-schema-wK02TzmZ.js → config-schema-Bx-Pb1Kw.js} +3 -3
  16. package/dist/contract-api.js +4 -4
  17. package/dist/{create-client-B1a3Am-I.js → create-client-B4CPKa5P.js} +3 -3
  18. package/dist/{credentials-CDjQjIds.js → credentials-Bi0pTJDK.js} +1 -1
  19. package/dist/{credentials-read-DySnJlLx.js → credentials-read-DpxFOhx0.js} +2 -2
  20. package/dist/{credentials-write.runtime-Ca2MN99y.js → credentials-write.runtime-BB5QuM4Z.js} +1 -1
  21. package/dist/{crypto-runtime-oweQ3RiB.js → crypto-runtime-3hgwY-d6.js} +7 -6
  22. package/dist/{directory-live-M-3KeudM.js → directory-live-DgjzYeC_.js} +2 -2
  23. package/dist/{doctor-CENc9ks0.js → doctor-D3wfD2UP.js} +17 -3
  24. package/dist/{draft-stream-r49dgIZc.js → draft-stream-DQN43iqS.js} +1 -1
  25. package/dist/{encryption-guidance-CU-OAPMg.js → encryption-guidance-aEUzD940.js} +1 -1
  26. package/dist/helper-api.js +2 -2
  27. package/dist/index.js +2 -2
  28. package/dist/{legacy-crypto-restore-BgW3I87R.js → legacy-crypto-restore--9Wu5rsx.js} +1 -1
  29. package/dist/{logging-yEwXx4Hm.js → logging-C7wjdKK5.js} +1 -1
  30. package/dist/{matrix-migration.runtime-CZOep_JX.js → matrix-migration.runtime-RzIEp7RP.js} +3 -3
  31. package/dist/{media-text-C4IBQI5B.js → media-text-C8b9cJiE.js} +1 -1
  32. package/dist/{messages-CMx2qIs1.js → messages-DyU_49Ws.js} +3 -3
  33. package/dist/{monitor-COOR-Ksj.js → monitor-C-w1IkPI.js} +133 -104
  34. package/dist/plugin-entry.handlers.runtime.js +1 -1
  35. package/dist/probe.runtime-BegszwhP.js +3 -0
  36. package/dist/{profile-update-Cl7wAFCq.js → profile-update-DON3UoVK.js} +2 -2
  37. package/dist/{reaction-events-D3jtYqTp.js → reaction-events-Cf-zAwa6.js} +1 -1
  38. package/dist/{recovery-key-store-DfQ_9s6u.js → recovery-key-store-BRnvY8XS.js} +1 -1
  39. package/dist/{resolve-targets-D-K3tTPe.js → resolve-targets-CLuzv_Jl.js} +1 -1
  40. package/dist/{resolver.runtime-BRG9o8iL.js → resolver.runtime-VywXDAZv.js} +1 -1
  41. package/dist/runtime-api.js +3 -3
  42. package/dist/runtime-heavy-api.js +1 -1
  43. package/dist/{sdk-ymjYByhr.js → sdk-C2iC7PJZ.js} +6 -6
  44. package/dist/{send-peVVVL75.js → send-CAmsWgZ2.js} +3 -3
  45. package/dist/{setup-bootstrap-CiX7Pd07.js → setup-bootstrap-5ki8dOiM.js} +2 -2
  46. package/dist/{setup-core-DOhHYRrZ.js → setup-core-X-qaIzVT.js} +4 -4
  47. package/dist/setup-plugin-api.js +3 -3
  48. package/dist/{setup-surface-CrUp7oeN.js → setup-surface-D6gS45Pz.js} +6 -6
  49. package/dist/{shared-CmsjJY4i.js → shared-DjJds8e0.js} +6 -6
  50. package/dist/startup-verification-DdSXlCLn.js +233 -0
  51. package/dist/{storage-onzulLbU.js → storage-Ds-2Iur5.js} +18 -6
  52. package/dist/subagent-hooks-api.js +18 -2
  53. package/dist/{subagent-hooks-api-bedE4GYl.js → subagent-hooks-dkPAF6Et.js} +3 -30
  54. package/dist/{thread-bindings-DAg6grT8.js → thread-bindings-yt8HTZo0.js} +141 -39
  55. package/dist/{tool-actions.runtime-DwbLBrRr.js → tool-actions.runtime-DOh3pfFu.js} +7 -7
  56. package/dist/{verification-BM7g0BeT.js → verification-BkvujZrn.js} +2 -2
  57. package/npm-shrinkwrap.json +3 -3
  58. package/package.json +4 -4
  59. package/dist/probe.runtime-DgSABMiF.js +0 -3
  60. package/dist/startup-verification-BmTEngvU.js +0 -132
  61. package/dist/{account-selection-C3arLOhC.js → account-selection-DEMtY2cn.js} +1 -1
  62. package/dist/{runtime-api-CsF7Kokd.js → runtime-api-CsBoesCU.js} +2 -2
  63. package/dist/{storage-paths-BV2Z7bns.js → storage-paths-BWo_ZEMC.js} +1 -1
@@ -1,33 +1,35 @@
1
- import { t as isMatrixQualifiedUserId } from "./target-ids-B-5aQxwn.js";
2
1
  import { c as resolveMatrixAccountConfig, s as resolveMatrixAccountAllowlistConfig } from "./config-paths-ZBCMwSos.js";
3
2
  import { t as getMatrixRuntime } from "./runtime-6S3DNFNv.js";
4
- import { m as resolveConfiguredMatrixBotUserIds } from "./setup-core-DOhHYRrZ.js";
5
- 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-D7FK_lEY.js";
6
- import { a as normalizeMatrixUserId, i as normalizeMatrixAllowList, o as resolveMatrixAllowListMatch } from "./config-schema-wK02TzmZ.js";
3
+ import { m as resolveConfiguredMatrixBotUserIds } from "./setup-core-X-qaIzVT.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-DwJf74NH.js";
5
+ import { a as normalizeMatrixUserId, i as normalizeMatrixAllowList, o as resolveMatrixAllowListMatch } from "./config-schema-Bx-Pb1Kw.js";
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 { i as resolveMatrixStateFilePath } from "./storage-onzulLbU.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-peVVVL75.js";
10
- import { t as createMatrixThreadBindingManager } from "./thread-bindings-DAg6grT8.js";
11
- import { a as resolveMatrixMessageBody, i as resolveMatrixMessageAttachment, n as formatMatrixMediaUnavailableText, r as formatMatrixMessageText, s as fetchMatrixPollSnapshot, t as formatMatrixMediaTooLargeText } from "./media-text-C4IBQI5B.js";
8
+ import { a as resolveMatrixStateFilePath } from "./storage-Ds-2Iur5.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-CAmsWgZ2.js";
10
+ import { n as resolveMatrixSqliteStateEnv, t as createMatrixThreadBindingManager } from "./thread-bindings-yt8HTZo0.js";
11
+ import { a as resolveMatrixMessageBody, i as resolveMatrixMessageAttachment, n as formatMatrixMediaUnavailableText, r as formatMatrixMessageText, s as fetchMatrixPollSnapshot, t as formatMatrixMediaTooLargeText } from "./media-text-C8b9cJiE.js";
12
12
  import { n as setActiveMatrixClient } from "./active-client-DXvz2gCo.js";
13
13
  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-CmsjJY4i.js";
15
- import "./client-BMoZSA2L.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-DjJds8e0.js";
15
+ import "./client-spaouc7I.js";
16
16
  import { i as isMatrixMediaSizeLimitError, r as MatrixMediaSizeLimitError } from "./http-client-KTzUzlpv.js";
17
- 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-CsF7Kokd.js";
18
- import { t as resolveMatrixTargets } from "./resolve-targets-D-K3tTPe.js";
19
- import { t as formatMatrixEncryptedEventDisabledWarning } from "./encryption-guidance-CU-OAPMg.js";
20
- import { t as createAsyncLock } from "./async-lock-BcLS4KOc.js";
17
+ 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-CLuzv_Jl.js";
19
+ import { t as formatMatrixEncryptedEventDisabledWarning } from "./encryption-guidance-aEUzD940.js";
21
20
  import { n as isMatrixReadySyncState, r as isMatrixTerminalSyncState, t as isMatrixDisconnectedSyncState } from "./sync-state-CWbp0QSY.js";
22
21
  import { a as EventType, i as resolveMatrixThreadRouting, n as resolveMatrixReplyToEventId, o as RelationType, r as resolveMatrixThreadRootId, t as resolveMatrixInboundRoute } from "./route-DY6at4qJ.js";
23
- import { normalizeLowercaseStringOrEmpty, normalizeOptionalString, normalizeStringifiedEntries, uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
24
22
  import { buildChannelProgressDraftLineForEntry, createChannelProgressDraftGate, createPreviewMessageReceipt, defineFinalizableLivePreviewAdapter, deliverWithFinalizableLivePreviewAdapter, formatChannelProgressDraftLine, formatChannelProgressDraftLineForEntry, formatChannelProgressDraftText, isChannelProgressDraftWorkToolName, mergeChannelProgressDraftLine, normalizeChannelProgressDraftLineIdentity, resolveChannelProgressDraftMaxLines, waitUntilAbort } from "openclaw/plugin-sdk/channel-outbound";
23
+ import { normalizeLowercaseStringOrEmpty, normalizeOptionalString, normalizeStringifiedEntries, uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
24
+ import path from "node:path";
25
+ import { createHash } from "node:crypto";
25
26
  import { CHANNEL_APPROVAL_NATIVE_RUNTIME_CONTEXT_CAPABILITY } from "openclaw/plugin-sdk/approval-handler-adapter-runtime";
26
27
  import { resolveInboundLastRouteSessionKey } from "openclaw/plugin-sdk/routing";
27
28
  import { buildChannelInboundEventContext, hasFinalInboundReplyDispatch, toInboundMediaFacts } from "openclaw/plugin-sdk/channel-inbound";
28
29
  import { loadSessionStore, resolveSessionStoreEntry } from "openclaw/plugin-sdk/session-store-runtime";
29
- import { parseStrictFiniteNumber, resolveOptionalIntegerOption } from "openclaw/plugin-sdk/number-runtime";
30
- import { readJsonFileWithFallback, writeJsonFileAtomically } from "openclaw/plugin-sdk/json-store";
30
+ import { isFutureDateTimestampMs, parseStrictFiniteNumber, resolveExpiresAtMsFromDurationMs, resolveOptionalIntegerOption } from "openclaw/plugin-sdk/number-runtime";
31
+ import { readJsonFileWithFallback } from "openclaw/plugin-sdk/json-store";
32
+ import fs from "node:fs/promises";
31
33
  import { format } from "node:util";
32
34
  import { buildTtsSupplementMediaPayload, getReplyPayloadTtsSupplement } from "openclaw/plugin-sdk/reply-payload";
33
35
  import { resolveAckReaction } from "openclaw/plugin-sdk/channel-feedback";
@@ -809,7 +811,7 @@ const SAS_NOTICE_RETRY_DELAY_MS = 750;
809
811
  const VERIFICATION_EVENT_STARTUP_GRACE_MS = 3e4;
810
812
  let matrixDirectRoomDepsPromise;
811
813
  async function loadMatrixDirectRoomDeps() {
812
- matrixDirectRoomDepsPromise ??= Promise.all([import("./send-peVVVL75.js").then((n) => n.d), import("./send-peVVVL75.js").then((n) => n.m)]).then(([directManagementModule, directRoomModule]) => ({
814
+ matrixDirectRoomDepsPromise ??= Promise.all([import("./send-CAmsWgZ2.js").then((n) => n.d), import("./send-CAmsWgZ2.js").then((n) => n.m)]).then(([directManagementModule, directRoomModule]) => ({
813
815
  inspectMatrixDirectRooms: directManagementModule.inspectMatrixDirectRooms,
814
816
  isStrictDirectRoom: directRoomModule.isStrictDirectRoom
815
817
  }));
@@ -2017,7 +2019,7 @@ let sessionBindingRuntimePromise;
2017
2019
  let matrixReactionEventsPromise;
2018
2020
  let matrixDraftStreamPromise;
2019
2021
  function loadMatrixSendModule() {
2020
- matrixSendModulePromise ??= import("./send-peVVVL75.js").then((n) => n.l);
2022
+ matrixSendModulePromise ??= import("./send-CAmsWgZ2.js").then((n) => n.l);
2021
2023
  return matrixSendModulePromise;
2022
2024
  }
2023
2025
  function loadAcpBindingRuntime() {
@@ -2029,11 +2031,11 @@ function loadSessionBindingRuntime() {
2029
2031
  return sessionBindingRuntimePromise;
2030
2032
  }
2031
2033
  function loadMatrixReactionEvents() {
2032
- matrixReactionEventsPromise ??= import("./reaction-events-D3jtYqTp.js");
2034
+ matrixReactionEventsPromise ??= import("./reaction-events-Cf-zAwa6.js");
2033
2035
  return matrixReactionEventsPromise;
2034
2036
  }
2035
2037
  function loadMatrixDraftStream() {
2036
- matrixDraftStreamPromise ??= import("./draft-stream-r49dgIZc.js");
2038
+ matrixDraftStreamPromise ??= import("./draft-stream-DQN43iqS.js");
2037
2039
  return matrixDraftStreamPromise;
2038
2040
  }
2039
2041
  async function matrixTextWouldActivateMentions(client, text) {
@@ -2197,15 +2199,17 @@ function createMatrixRoomMessageHandler(params) {
2197
2199
  const sharedDmContextNoticeRooms = /* @__PURE__ */ new Set();
2198
2200
  const readStoreAllowFrom = async () => {
2199
2201
  const now = Date.now();
2200
- if (cachedStoreAllowFrom && now < cachedStoreAllowFrom.expiresAtMs) return cachedStoreAllowFrom.value;
2202
+ if (cachedStoreAllowFrom && isFutureDateTimestampMs(cachedStoreAllowFrom.expiresAtMs, { nowMs: now })) return cachedStoreAllowFrom.value;
2203
+ cachedStoreAllowFrom = null;
2201
2204
  const value = await core.channel.pairing.readAllowFromStore({
2202
2205
  channel: "matrix",
2203
2206
  env: process.env,
2204
2207
  accountId
2205
2208
  }).catch(() => []);
2206
- cachedStoreAllowFrom = {
2209
+ const expiresAtMs = resolveExpiresAtMsFromDurationMs(ALLOW_FROM_STORE_CACHE_TTL_MS, { nowMs: now });
2210
+ cachedStoreAllowFrom = expiresAtMs === void 0 ? null : {
2207
2211
  value,
2208
- expiresAtMs: now + ALLOW_FROM_STORE_CACHE_TTL_MS
2212
+ expiresAtMs
2209
2213
  };
2210
2214
  return value;
2211
2215
  };
@@ -3476,17 +3480,20 @@ function createMatrixRoomMessageHandler(params) {
3476
3480
  //#endregion
3477
3481
  //#region extensions/matrix/src/matrix/monitor/inbound-dedupe.ts
3478
3482
  const INBOUND_DEDUPE_FILENAME = "inbound-dedupe.json";
3483
+ const INBOUND_DEDUPE_NAMESPACE = "inbound-dedupe";
3484
+ const INBOUND_DEDUPE_MIGRATIONS_NAMESPACE = "inbound-dedupe-migrations";
3479
3485
  const STORE_VERSION = 1;
3480
3486
  const DEFAULT_MAX_ENTRIES = 2e4;
3481
3487
  const DEFAULT_TTL_MS = 720 * 60 * 60 * 1e3;
3482
- const PERSIST_DEBOUNCE_MS = 250;
3483
3488
  function normalizeEventPart(value) {
3484
3489
  return value.trim();
3485
3490
  }
3486
3491
  function buildEventKey(params) {
3492
+ const accountId = normalizeEventPart(params.auth.accountId) || "default";
3487
3493
  const roomId = normalizeEventPart(params.roomId);
3488
3494
  const eventId = normalizeEventPart(params.eventId);
3489
- return roomId && eventId ? `${roomId}|${eventId}` : "";
3495
+ if (!roomId || !eventId) return "";
3496
+ return `${accountId}:${createHash("sha256").update(accountId).update("\0").update(roomId).update("\0").update(eventId).digest("hex")}`;
3490
3497
  }
3491
3498
  function resolveInboundDedupeStatePath(params) {
3492
3499
  return resolveMatrixStateFilePath({
@@ -3512,25 +3519,48 @@ function pruneSeenEvents(params) {
3512
3519
  return;
3513
3520
  }
3514
3521
  while (seen.size > max) {
3515
- const oldestKey = seen.keys().next().value;
3522
+ const oldestKey = [...seen.entries()].toSorted((a, b) => a[1] - b[1] || a[0].localeCompare(b[0]))[0]?.[0];
3516
3523
  if (typeof oldestKey !== "string") break;
3517
3524
  seen.delete(oldestKey);
3518
3525
  }
3519
3526
  }
3520
- function toStoredState(params) {
3521
- pruneSeenEvents(params);
3522
- return {
3523
- version: STORE_VERSION,
3524
- entries: Array.from(params.seen.entries()).map(([key, ts]) => ({
3525
- key,
3526
- ts
3527
- }))
3528
- };
3527
+ function createInboundDedupeStore(params) {
3528
+ return getMatrixRuntime().state.openKeyedStore({
3529
+ namespace: INBOUND_DEDUPE_NAMESPACE,
3530
+ maxEntries: DEFAULT_MAX_ENTRIES,
3531
+ env: resolveMatrixSqliteStateEnv(params)
3532
+ });
3533
+ }
3534
+ function createInboundDedupeMigrationStore(params) {
3535
+ return getMatrixRuntime().state.openKeyedStore({
3536
+ namespace: INBOUND_DEDUPE_MIGRATIONS_NAMESPACE,
3537
+ maxEntries: 1e3,
3538
+ env: resolveMatrixSqliteStateEnv(params)
3539
+ });
3540
+ }
3541
+ function buildLegacyImportKey(params) {
3542
+ const accountId = normalizeEventPart(params.auth.accountId) || "default";
3543
+ return `${accountId}:${createHash("sha256").update(accountId).update("\0").update(params.storagePath).digest("hex")}`;
3529
3544
  }
3530
- async function readStoredState(storagePath) {
3545
+ async function loadLegacyEntries(storagePath) {
3531
3546
  const { value } = await readJsonFileWithFallback(storagePath, null);
3532
- if (value?.version !== STORE_VERSION || !Array.isArray(value.entries)) return null;
3533
- return value;
3547
+ if (value?.version !== STORE_VERSION || !Array.isArray(value.entries)) return [];
3548
+ const entries = [];
3549
+ for (const entry of value.entries) {
3550
+ if (!entry || typeof entry.key !== "string") continue;
3551
+ const separatorIndex = entry.key.indexOf("|");
3552
+ if (separatorIndex <= 0) continue;
3553
+ const roomId = entry.key.slice(0, separatorIndex).trim();
3554
+ const eventId = entry.key.slice(separatorIndex + 1).trim();
3555
+ const ts = normalizeTimestamp(entry.ts);
3556
+ if (!roomId || !eventId || ts === null) continue;
3557
+ entries.push({
3558
+ roomId,
3559
+ eventId,
3560
+ ts
3561
+ });
3562
+ }
3563
+ return entries;
3534
3564
  }
3535
3565
  async function createMatrixInboundEventDeduper(params) {
3536
3566
  const nowMs = params.nowMs ?? (() => Date.now());
@@ -3541,17 +3571,57 @@ async function createMatrixInboundEventDeduper(params) {
3541
3571
  env: params.env,
3542
3572
  stateDir: params.stateDir
3543
3573
  });
3574
+ const stateDir = params.stateDir ?? path.dirname(storagePath);
3575
+ const store = createInboundDedupeStore({
3576
+ env: params.env,
3577
+ stateDir
3578
+ });
3579
+ const migrationStore = createInboundDedupeMigrationStore({
3580
+ env: params.env,
3581
+ stateDir
3582
+ });
3544
3583
  const seen = /* @__PURE__ */ new Map();
3545
3584
  const pending = /* @__PURE__ */ new Set();
3546
- const persistLock = createAsyncLock();
3547
3585
  try {
3548
- const stored = await readStoredState(storagePath);
3549
- for (const entry of stored?.entries ?? []) {
3550
- if (!entry || typeof entry.key !== "string") continue;
3551
- const key = entry.key.trim();
3552
- const ts = normalizeTimestamp(entry.ts);
3553
- if (!key || ts === null) continue;
3554
- seen.set(key, ts);
3586
+ for (const entry of await store.entries()) {
3587
+ const value = entry.value;
3588
+ const roomId = typeof value?.roomId === "string" ? value.roomId.trim() : "";
3589
+ const eventId = typeof value?.eventId === "string" ? value.eventId.trim() : "";
3590
+ const ts = normalizeTimestamp(value?.ts);
3591
+ const expectedKey = buildEventKey({
3592
+ auth: params.auth,
3593
+ roomId,
3594
+ eventId
3595
+ });
3596
+ if (expectedKey && expectedKey === entry.key && ts !== null) seen.set(entry.key, ts);
3597
+ }
3598
+ const legacyImportKey = buildLegacyImportKey({
3599
+ auth: params.auth,
3600
+ storagePath
3601
+ });
3602
+ if (!await migrationStore.lookup(legacyImportKey)) {
3603
+ const legacyEntries = await loadLegacyEntries(storagePath);
3604
+ let migratedLegacyEntries = 0;
3605
+ for (const entry of legacyEntries) {
3606
+ const key = buildEventKey({
3607
+ auth: params.auth,
3608
+ roomId: entry.roomId,
3609
+ eventId: entry.eventId
3610
+ });
3611
+ if (!key) continue;
3612
+ if (seen.has(key)) {
3613
+ migratedLegacyEntries += 1;
3614
+ continue;
3615
+ }
3616
+ seen.set(key, entry.ts);
3617
+ await store.register(key, entry, ttlMs > 0 ? { ttlMs } : void 0).then(() => {
3618
+ migratedLegacyEntries += 1;
3619
+ }).catch(() => {});
3620
+ }
3621
+ if (legacyEntries.length > 0 && migratedLegacyEntries === legacyEntries.length) {
3622
+ await migrationStore.register(legacyImportKey, { importedAt: nowMs() });
3623
+ await fs.rm(storagePath, { force: true }).catch(() => {});
3624
+ }
3555
3625
  }
3556
3626
  pruneSeenEvents({
3557
3627
  seen,
@@ -3562,53 +3632,10 @@ async function createMatrixInboundEventDeduper(params) {
3562
3632
  } catch (err) {
3563
3633
  LogService.warn("MatrixInboundDedupe", "Failed loading Matrix inbound dedupe store:", err);
3564
3634
  }
3565
- let dirty = false;
3566
- let persistTimer = null;
3567
- let persistPromise = null;
3568
- const persist = async () => {
3569
- dirty = false;
3570
- const payload = toStoredState({
3571
- seen,
3572
- ttlMs,
3573
- maxEntries,
3574
- nowMs: nowMs()
3575
- });
3576
- try {
3577
- await persistLock(async () => {
3578
- await writeJsonFileAtomically(storagePath, payload);
3579
- });
3580
- } catch (err) {
3581
- dirty = true;
3582
- throw err;
3583
- }
3584
- };
3585
- const flush = async () => {
3586
- if (persistTimer) {
3587
- clearTimeout(persistTimer);
3588
- persistTimer = null;
3589
- }
3590
- for (;;) {
3591
- if (!dirty && !persistPromise) break;
3592
- if (dirty && !persistPromise) persistPromise = persist().finally(() => {
3593
- persistPromise = null;
3594
- });
3595
- await persistPromise;
3596
- }
3597
- };
3598
- const schedulePersist = () => {
3599
- dirty = true;
3600
- if (persistTimer) return;
3601
- persistTimer = setTimeout(() => {
3602
- persistTimer = null;
3603
- flush().catch((err) => {
3604
- LogService.warn("MatrixInboundDedupe", "Failed persisting Matrix inbound dedupe store:", err);
3605
- });
3606
- }, PERSIST_DEBOUNCE_MS);
3607
- persistTimer.unref?.();
3608
- };
3609
3635
  return {
3610
3636
  claimEvent: ({ roomId, eventId }) => {
3611
3637
  const key = buildEventKey({
3638
+ auth: params.auth,
3612
3639
  roomId,
3613
3640
  eventId
3614
3641
  });
@@ -3625,6 +3652,7 @@ async function createMatrixInboundEventDeduper(params) {
3625
3652
  },
3626
3653
  commitEvent: async ({ roomId, eventId }) => {
3627
3654
  const key = buildEventKey({
3655
+ auth: params.auth,
3628
3656
  roomId,
3629
3657
  eventId
3630
3658
  });
@@ -3639,24 +3667,25 @@ async function createMatrixInboundEventDeduper(params) {
3639
3667
  maxEntries,
3640
3668
  nowMs: nowMs()
3641
3669
  });
3642
- schedulePersist();
3670
+ await store.register(key, {
3671
+ roomId: normalizeEventPart(roomId),
3672
+ eventId: normalizeEventPart(eventId),
3673
+ ts
3674
+ }, ttlMs > 0 ? { ttlMs } : void 0).catch((err) => {
3675
+ LogService.warn("MatrixInboundDedupe", "Failed persisting Matrix inbound dedupe entry:", err);
3676
+ });
3643
3677
  },
3644
3678
  releaseEvent: ({ roomId, eventId }) => {
3645
3679
  const key = buildEventKey({
3680
+ auth: params.auth,
3646
3681
  roomId,
3647
3682
  eventId
3648
3683
  });
3649
3684
  if (!key) return;
3650
3685
  pending.delete(key);
3651
3686
  },
3652
- flush,
3653
- stop: async () => {
3654
- try {
3655
- await flush();
3656
- } catch (err) {
3657
- LogService.warn("MatrixInboundDedupe", "Failed to flush Matrix inbound dedupe store during stop():", err);
3658
- }
3659
- }
3687
+ flush: async () => {},
3688
+ stop: async () => {}
3660
3689
  };
3661
3690
  }
3662
3691
  //#endregion
@@ -3759,11 +3788,11 @@ function createMatrixRoomInfoResolver(client) {
3759
3788
  let matrixStartupMaintenanceDepsPromise;
3760
3789
  async function loadMatrixStartupMaintenanceDeps() {
3761
3790
  matrixStartupMaintenanceDepsPromise ??= Promise.all([
3762
- import("./setup-core-DOhHYRrZ.js").then((n) => n.s),
3791
+ import("./setup-core-X-qaIzVT.js").then((n) => n.s),
3763
3792
  import("./device-health-D4LBxuPq.js"),
3764
- import("./setup-core-DOhHYRrZ.js").then((n) => n.a),
3765
- import("./legacy-crypto-restore-BgW3I87R.js"),
3766
- import("./startup-verification-BmTEngvU.js")
3793
+ import("./setup-core-X-qaIzVT.js").then((n) => n.a),
3794
+ import("./legacy-crypto-restore--9Wu5rsx.js"),
3795
+ import("./startup-verification-DdSXlCLn.js")
3767
3796
  ]).then(([configUpdateModule, deviceHealthModule, profileModule, legacyCryptoRestoreModule, startupVerificationModule]) => ({
3768
3797
  updateMatrixAccountConfig: configUpdateModule.updateMatrixAccountConfig,
3769
3798
  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-BM7g0BeT.js").then((n) => n.y);
6
+ matrixVerificationRuntimePromise ??= import("./verification-BkvujZrn.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-B4CPKa5P.js";
2
+ import "./client-spaouc7I.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-DOhHYRrZ.js";
3
- import { n as withResolvedActionClient } from "./client-BIBY50VG.js";
2
+ import { c as resolveMatrixConfigPath, l as updateMatrixAccountConfig, o as syncMatrixOwnProfile } from "./setup-core-X-qaIzVT.js";
3
+ import { n as withResolvedActionClient } from "./client-CpSI5BON.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-D0nZ_4ik.js");
10
+ approvalReactionAuthPromise ??= import("./approval-reaction-auth-kAazIsvu.js");
11
11
  return approvalReactionAuthPromise;
12
12
  }
13
13
  function loadExecApprovalResolver() {
@@ -1,5 +1,5 @@
1
1
  import { n as formatMatrixErrorReason, t as formatMatrixErrorMessage } from "./errors-C47hvAF8.js";
2
- import { f as LogService } from "./shared-CmsjJY4i.js";
2
+ import { f as LogService } from "./shared-DjJds8e0.js";
3
3
  import { loadJsonFile, saveJsonFile } from "openclaw/plugin-sdk/json-store";
4
4
  import { decodeRecoveryKey } from "matrix-js-sdk/lib/crypto-api/recovery-key.js";
5
5
  //#region extensions/matrix/src/matrix/sdk/idb-persistence-lock.ts
@@ -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-M-3KeudM.js";
3
+ import { n as listMatrixDirectoryGroupsLive, r as listMatrixDirectoryPeersLive } from "./directory-live-DgjzYeC_.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-D-K3tTPe.js";
1
+ import { t as resolveMatrixTargets } from "./resolve-targets-CLuzv_Jl.js";
2
2
  //#region extensions/matrix/src/resolver.runtime.ts
3
3
  const matrixResolverRuntime = { resolveMatrixTargets };
4
4
  //#endregion
@@ -1,8 +1,8 @@
1
- import { d as setMatrixThreadBindingIdleTimeoutBySessionKey, p as setMatrixThreadBindingMaxAgeBySessionKey } from "./thread-bindings-shared-CKnY4LSd.js";
2
- import { a as resolveMatrixDefaultOrOnlyAccountId, i as resolveMatrixChannelConfig, n as requiresExplicitMatrixDefaultAccount, o as resolveMatrixAccountStringValues, r as resolveConfiguredMatrixAccountIds, t as findMatrixAccountEntry } from "./account-selection-C3arLOhC.js";
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";
3
2
  import { n as listMatrixEnvAccountIds, r as resolveMatrixEnvAccountToken, t as getMatrixScopedEnvVarNames } from "./env-vars-KzaYveuy.js";
4
3
  import { r as setMatrixRuntime } from "./runtime-6S3DNFNv.js";
5
- 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-BV2Z7bns.js";
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
+ import { d as setMatrixThreadBindingIdleTimeoutBySessionKey, p as setMatrixThreadBindingMaxAgeBySessionKey } from "./thread-bindings-shared-CKnY4LSd.js";
6
6
  import { n as ensureMatrixSdkInstalled, r as isMatrixSdkAvailable } from "./deps-BVWGd2XS.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";
@@ -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-CZOep_JX.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-RzIEp7RP.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,19 +1,19 @@
1
1
  import { t as isRecord } from "./record-shared-CvzjvHRn.js";
2
2
  import { n as formatMatrixErrorReason, r as isMatrixNotFoundError, t as formatMatrixErrorMessage } from "./errors-C47hvAF8.js";
3
- import { t as claimCurrentTokenStorageState } from "./storage-onzulLbU.js";
4
- import { c as createMatrixStartupAbortError, d as ConsoleLogger, f as LogService, p as noop, u as throwIfMatrixStartupAborted } from "./shared-CmsjJY4i.js";
3
+ import { t as claimCurrentTokenStorageState } from "./storage-Ds-2Iur5.js";
4
+ import { c as createMatrixStartupAbortError, d as ConsoleLogger, f as LogService, p as noop, u as throwIfMatrixStartupAborted } from "./shared-DjJds8e0.js";
5
5
  import { a as matrixEventToRaw, n as createMatrixGuardedFetch, o as parseMxc, t as MatrixAuthedHttpClient } from "./http-client-KTzUzlpv.js";
6
6
  import { n as resolveMatrixRoomKeyBackupReadinessError } from "./backup-health-Dm_YMVFT.js";
7
- import { createMatrixJsSdkClientLogger } from "./logging-yEwXx4Hm.js";
7
+ import { createMatrixJsSdkClientLogger } from "./logging-C7wjdKK5.js";
8
8
  import { t as createAsyncLock } from "./async-lock-BcLS4KOc.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-DfQ_9s6u.js";
10
+ import { n as isRepairableSecretStorageAccessError, r as MATRIX_IDB_PERSIST_INTERVAL_MS, t as MatrixRecoveryKeyStore } from "./recovery-key-store-BRnvY8XS.js";
11
11
  import { normalizeNullableString, normalizeStringEntries, uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
12
12
  import { readFileSync } from "node:fs";
13
13
  import path from "node:path";
14
14
  import { writeJsonFileAtomically } from "openclaw/plugin-sdk/json-store";
15
- import { KeyedAsyncQueue } from "openclaw/plugin-sdk/keyed-async-queue";
16
15
  import fs$1 from "node:fs/promises";
16
+ import { KeyedAsyncQueue } from "openclaw/plugin-sdk/keyed-async-queue";
17
17
  import { EventEmitter } from "node:events";
18
18
  import { Category, ClientEvent, Filter, MatrixEventEvent, MemoryStore, Preset, SyncAccumulator, createClient } from "matrix-js-sdk/lib/matrix.js";
19
19
  import { VerificationMethod } from "matrix-js-sdk/lib/types.js";
@@ -288,7 +288,7 @@ function createMatrixExplicitBootstrapOptions(params) {
288
288
  let loadedMatrixCryptoRuntime = null;
289
289
  let matrixCryptoRuntimePromise = null;
290
290
  async function loadMatrixCryptoRuntime() {
291
- matrixCryptoRuntimePromise ??= import("./crypto-runtime-oweQ3RiB.js").then((runtime) => {
291
+ matrixCryptoRuntimePromise ??= import("./crypto-runtime-3hgwY-d6.js").then((runtime) => {
292
292
  loadedMatrixCryptoRuntime = runtime;
293
293
  return runtime;
294
294
  });
@@ -1,10 +1,10 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
2
- import { r as normalizeMatrixResolvableTarget, t as isMatrixQualifiedUserId } from "./target-ids-B-5aQxwn.js";
3
2
  import { c as resolveMatrixAccountConfig } from "./config-paths-ZBCMwSos.js";
4
3
  import { t as getMatrixRuntime } from "./runtime-6S3DNFNv.js";
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 { normalizeLowercaseStringOrEmpty, normalizeOptionalString, normalizeOptionalStringifiedId } from "openclaw/plugin-sdk/string-coerce-runtime";
7
6
  import { createMessageReceiptFromOutboundResults } from "openclaw/plugin-sdk/channel-outbound";
7
+ import { normalizeLowercaseStringOrEmpty, normalizeOptionalString, normalizeOptionalStringifiedId } from "openclaw/plugin-sdk/string-coerce-runtime";
8
8
  import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime";
9
9
  import { loadOutboundMediaFromUrl } from "openclaw/plugin-sdk/outbound-media";
10
10
  import { normalizePollInput } from "openclaw/plugin-sdk/poll-runtime";
@@ -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-Chmkqhy7.js").then((n) => n.t);
232
+ matrixSendClientRuntimePromise ??= import("./client-bootstrap-DOlQb7Jx.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-DOhHYRrZ.js";
2
+ import "./setup-core-X-qaIzVT.js";
3
3
  import { t as formatMatrixErrorMessage } from "./errors-C47hvAF8.js";
4
- import { n as bootstrapMatrixVerification } from "./verification-BM7g0BeT.js";
4
+ import { n as bootstrapMatrixVerification } from "./verification-BkvujZrn.js";
5
5
  //#region extensions/matrix/src/setup-bootstrap.ts
6
6
  async function maybeBootstrapNewEncryptedMatrixAccount(params) {
7
7
  const accountConfig = resolveMatrixAccountConfig({
@@ -1,10 +1,10 @@
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-C3arLOhC.js";
2
+ import { a as resolveMatrixDefaultOrOnlyAccountId, o as resolveMatrixAccountStringValues, r as resolveConfiguredMatrixAccountIds } from "./account-selection-DEMtY2cn.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-DySnJlLx.js";
6
- import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/account-id";
5
+ import { i as loadMatrixCredentials, n as credentialsMatchConfig } from "./credentials-read-DpxFOhx0.js";
7
6
  import { normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
7
+ import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/account-id";
8
8
  import { hasConfiguredSecretInput } from "openclaw/plugin-sdk/secret-input-runtime";
9
9
  import { DEFAULT_ACCOUNT_ID as DEFAULT_ACCOUNT_ID$1, normalizeAccountId as normalizeAccountId$1 } from "openclaw/plugin-sdk/routing";
10
10
  import { DEFAULT_ACCOUNT_ID as DEFAULT_ACCOUNT_ID$2, addWildcardAllowFrom, applyAccountNameToChannelSection, normalizeAccountId as normalizeAccountId$2, normalizeAllowFromEntries, normalizeSecretInputString, prepareScopedSetupConfig } from "openclaw/plugin-sdk/setup";
@@ -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-CiX7Pd07.js");
672
+ const { runMatrixSetupBootstrapAfterConfigWrite } = await import("./setup-bootstrap-5ki8dOiM.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-DOhHYRrZ.js";
2
- import { r as matrixConfigAdapter, t as MatrixChannelConfigSchema } from "./config-schema-wK02TzmZ.js";
1
+ import { g as resolveMatrixAccount, n as matrixSetupAdapter, t as createMatrixSetupWizardProxy } from "./setup-core-X-qaIzVT.js";
2
+ import { r as matrixConfigAdapter, t as MatrixChannelConfigSchema } from "./config-schema-Bx-Pb1Kw.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-CrUp7oeN.js").then((n) => n.t)).matrixSetupWizard })),
16
+ setupWizard: createMatrixSetupWizardProxy(async () => ({ matrixSetupWizard: (await import("./setup-surface-D6gS45Pz.js").then((n) => n.t)).matrixSetupWizard })),
17
17
  setup: matrixSetupAdapter,
18
18
  capabilities: {
19
19
  chatTypes: [
@@ -1,12 +1,12 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
2
- import { n as requiresExplicitMatrixDefaultAccount } from "./account-selection-C3arLOhC.js";
2
+ import { n as requiresExplicitMatrixDefaultAccount } from "./account-selection-DEMtY2cn.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-DOhHYRrZ.js";
5
+ import { g as resolveMatrixAccount, h as resolveDefaultMatrixAccountId, i as moveSingleMatrixAccountConfigToNamedAccount, l as updateMatrixAccountConfig, p as listMatrixAccountIds, r as resolveMatrixSetupDmAllowFrom } from "./setup-core-X-qaIzVT.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
- import { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/account-id";
9
8
  import { normalizeLowercaseStringOrEmpty, normalizeOptionalString, normalizeStringifiedOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
9
+ import { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/account-id";
10
10
  import { formatDocsLink, hasConfiguredSecretInput, mergeAllowFromEntries, normalizeAccountId as normalizeAccountId$1, promptAccountId, promptChannelAccessConfig, splitSetupEntries } from "openclaw/plugin-sdk/setup";
11
11
  import { isPrivateNetworkOptInEnabled } from "openclaw/plugin-sdk/ssrf-policy";
12
12
  //#region extensions/matrix/src/onboarding.ts
@@ -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-D-K3tTPe.js").then((n) => n.n);
107
+ const { resolveMatrixTargets } = await import("./resolve-targets-CLuzv_Jl.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-M-3KeudM.js").then((n) => n.t);
235
+ const { listMatrixDirectoryGroupsLive } = await import("./directory-live-DgjzYeC_.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-CiX7Pd07.js");
510
+ const { runMatrixSetupBootstrapAfterConfigWrite } = await import("./setup-bootstrap-5ki8dOiM.js");
511
511
  await runMatrixSetupBootstrapAfterConfigWrite({
512
512
  previousCfg,
513
513
  cfg,