@openclaw/matrix 2026.8.1 → 2026.8.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 (74) hide show
  1. package/dist/{account-selection-C8nnBTxi.js → account-selection-DA-jfx22.js} +11 -9
  2. package/dist/{accounts-fC57n-Jo.js → accounts-DR1c4xF_.js} +2 -2
  3. package/dist/api.js +5 -5
  4. package/dist/{approval-handler.runtime-BBjFZw1t.js → approval-handler.runtime-xcVrZw9o.js} +5 -5
  5. package/dist/{approval-ids-DTIdXV-m.js → approval-ids-hmvhDNBj.js} +1 -1
  6. package/dist/{approval-reaction-auth-BDONXxnF.js → approval-reaction-auth-DziFGHSk.js} +2 -2
  7. package/dist/{approval-reactions-tXh9KYrW.js → approval-reactions-1fwEhoK9.js} +1 -1
  8. package/dist/{channel-BkEcVUs_.js → channel-D6-ajB_u.js} +51 -53
  9. package/dist/channel-plugin-api.js +1 -1
  10. package/dist/{channel.runtime-CTLSBFsP.js → channel.runtime-BMA0dG2k.js} +16 -12
  11. package/dist/{channel.setup-CSacbORr.js → channel.setup-OIEzCzSs.js} +21 -19
  12. package/dist/{cli-DRVtgrq5.js → cli-B6HF7Hmn.js} +38 -29
  13. package/dist/{cli-metadata-Ddx_y4Os.js → cli-metadata-Mtzu5-AY.js} +1 -1
  14. package/dist/cli-metadata.js +1 -1
  15. package/dist/{client-CZ_JvrO0.js → client-B0yMDho1.js} +2 -2
  16. package/dist/{client-kSi51NKp.js → client-DFsRJEgB.js} +69 -16
  17. package/dist/{client-bootstrap-D8irSL2i.js → client-bootstrap-DjXCKEtg.js} +1 -1
  18. package/dist/{config-update-DC0fWBxc.js → config-update-BnX26jCO.js} +46 -28
  19. package/dist/contract-api.js +2 -2
  20. package/dist/{credentials-BdAaWuiR.js → credentials-DJj2xs3q.js} +4 -8
  21. package/dist/{credentials-read-B37cQknZ.js → credentials-read-mexhw-Ur.js} +7 -5
  22. package/dist/{credentials-write.runtime-nAV2-5uR.js → credentials-write.runtime-DQt-kgJq.js} +1 -1
  23. package/dist/{crypto-runtime-C4WDYxlP.js → crypto-runtime-QvlgyCkj.js} +6 -6
  24. package/dist/{deps-CcVJfvRM.js → deps-mtxF2mHI.js} +1 -1
  25. package/dist/{directory-live-DKr0w35b.js → directory-live-Drh343TW.js} +8 -6
  26. package/dist/{doctor-EWf9CDso.js → doctor-CJE8wO6y.js} +1 -1
  27. package/dist/{doctor-contract-DEt4O4Zt.js → doctor-contract-HyWFZQVG.js} +5 -4
  28. package/dist/doctor-contract-api.js +7 -7
  29. package/dist/{draft-stream-0CEpNrBk.js → draft-stream-DhGHVdO4.js} +1 -1
  30. package/dist/{encryption-guidance-D4ZdAqzM.js → encryption-guidance-BNcZNQZI.js} +3 -2
  31. package/dist/helper-api.js +1 -1
  32. package/dist/{http-client-D8o8b9u6.js → http-client-DOmFvKvB.js} +10 -7
  33. package/dist/{idb-persistence-DfgW720p.js → idb-persistence-D4NGNQxt.js} +2 -2
  34. package/dist/{idb-persistence-lock-DAJ49nZX.js → idb-persistence-lock-B3fZXyF_.js} +1 -1
  35. package/dist/{inbound-dedupe-RvSLqdsz.js → inbound-dedupe-Ch33GU06.js} +1 -1
  36. package/dist/index.js +1 -1
  37. package/dist/{messages-DaGRt-tu.js → messages-DlMQaC02.js} +2 -2
  38. package/dist/{monitor-CLPbPcR9.js → monitor-U2LcVtHt.js} +49 -74
  39. package/dist/plugin-entry.handlers.runtime.js +1 -1
  40. package/dist/probe.runtime-CNo-5_iz.js +2 -0
  41. package/dist/{profile-update-zXVCMg7y.js → profile-update-CsyKA9jI.js} +5 -4
  42. package/dist/{profile-D-Wubo0A.js → profile-vmjsmhh4.js} +1 -1
  43. package/dist/{reaction-events-CjVUiqcY.js → reaction-events-lwNc5I1X.js} +8 -6
  44. package/dist/{resolve-targets-qG6gceps.js → resolve-targets-D3Eakgzs.js} +1 -1
  45. package/dist/{resolver.runtime-zX3TR3TN.js → resolver.runtime-DJQxR35r.js} +1 -1
  46. package/dist/{room-info-yheP1mod.js → room-info-DIU67XLP.js} +3 -3
  47. package/dist/runtime-api.js +2 -2
  48. package/dist/{sdk-TZYyo0XQ.js → sdk-Jl2CgAbJ.js} +518 -23
  49. package/dist/{send-BL_iH5Ox.js → send-DfS5ciUL.js} +13 -9
  50. package/dist/session-binding-contract-api.js +1 -1
  51. package/dist/{setup-bootstrap-D8M7FmcO.js → setup-bootstrap-CWoIWudw.js} +2 -2
  52. package/dist/{setup-core-r6L0nno-.js → setup-core-CZM496H-.js} +7 -6
  53. package/dist/setup-plugin-api.js +1 -1
  54. package/dist/{setup-surface-g174ElFO.js → setup-surface-DSZtOsWK.js} +83 -77
  55. package/dist/{startup-verification-Cs08ca8u.js → startup-verification-1Ney1mmI.js} +2 -2
  56. package/dist/{storage-BsGuHngK.js → storage-BVf4uucD.js} +5 -4
  57. package/dist/{subagent-hooks-CMoZaARG.js → subagent-hooks-DeICLbU5.js} +5 -1
  58. package/dist/subagent-hooks-api.js +1 -1
  59. package/dist/sync-cache-state-d-A_OhbU.js +234 -0
  60. package/dist/{thread-bindings-ERWNousC.js → thread-bindings-2HN2AyLu.js} +2 -2
  61. package/dist/{tool-actions.runtime-DcBCSwY4.js → tool-actions.runtime-CFZZPG5g.js} +225 -163
  62. package/dist/{verification-4vsW_WSn.js → verification-CD7k5vE9.js} +2 -2
  63. package/node_modules/matrix-js-sdk/lib/client.d.ts +2 -1
  64. package/node_modules/matrix-js-sdk/lib/client.js +6 -2
  65. package/node_modules/matrix-js-sdk/lib/sync.js +8 -8
  66. package/node_modules/matrix-js-sdk/src/client.ts +7 -3
  67. package/node_modules/matrix-js-sdk/src/sync.ts +8 -8
  68. package/node_modules/typebox/build/format/email.mjs +1 -1
  69. package/node_modules/typebox/build/format/idna/idn-hostname.mjs +19 -1
  70. package/node_modules/typebox/package.json +1 -1
  71. package/package.json +5 -5
  72. package/dist/file-sync-store-DjskBX2o.js +0 -436
  73. package/dist/probe.runtime-Bxpr1FFy.js +0 -2
  74. package/dist/recovery-key-store-CognuDys.js +0 -276
@@ -1,11 +1,11 @@
1
- import { a as resolveMatrixDefaultOrOnlyAccountId, n as requiresExplicitMatrixDefaultAccount } from "./account-selection-C8nnBTxi.js";
1
+ import { a as resolveMatrixDefaultOrOnlyAccountId, n as requiresExplicitMatrixDefaultAccount } from "./account-selection-DA-jfx22.js";
2
2
  import { i as normalizeMatrixStoredCredentials, n as isMatrixCredentialRevocation, r as matrixCredentialsStoreKey, t as MATRIX_CREDENTIALS_NAMESPACE } from "./credentials-state-B3cuUFwZ.js";
3
3
  import { r as resolveMatrixCredentialsDir } from "./storage-paths-gUmSydsW.js";
4
- import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-DEt4O4Zt.js";
5
- import { C as readLegacyMatrixRecoveryKeyState, O as writeMatrixIdbSnapshotJsonToStore, T as readMatrixIdbSnapshotJsonFromStore, a as openMatrixStorageMetaStoreOptions, b as openMatrixRecoveryKeyStoreOptions, f as MATRIX_IDB_SNAPSHOT_FILENAME, g as hasMatrixRecoveryKeyStateInStore, h as hasMatrixLegacyCryptoMigrationStateInStore, i as normalizeMatrixStorageMetadata, j as writeMatrixRecoveryKeyStateToStore, k as writeMatrixLegacyCryptoMigrationStateToStore, m as MATRIX_RECOVERY_KEY_FILENAME, n as hasMatrixStorageMetaStateInStore, p as MATRIX_LEGACY_CRYPTO_MIGRATION_FILENAME, u as writeMatrixStorageMetaStateToStore, v as openMatrixIdbSnapshotStoreOptions, x as readLegacyMatrixLegacyCryptoMigrationState, y as openMatrixLegacyCryptoMigrationStoreOptions } from "./storage-BsGuHngK.js";
6
- import { a as readLegacyMatrixSyncCacheState, i as openMatrixSyncCacheStoreOptions, o as writeMatrixSyncCacheStateToStore, r as hasMatrixSyncCacheStateInStore } from "./file-sync-store-DjskBX2o.js";
7
- import { n as MATRIX_IDB_SNAPSHOT_LOCK_OPTIONS } from "./idb-persistence-lock-DAJ49nZX.js";
8
- import { r as readLegacyMatrixIdbSnapshotStateUnlocked, t as isValidMatrixIdbSnapshotJson } from "./idb-persistence-DfgW720p.js";
4
+ import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-HyWFZQVG.js";
5
+ import { C as readLegacyMatrixRecoveryKeyState, O as writeMatrixIdbSnapshotJsonToStore, T as readMatrixIdbSnapshotJsonFromStore, a as openMatrixStorageMetaStoreOptions, b as openMatrixRecoveryKeyStoreOptions, f as MATRIX_IDB_SNAPSHOT_FILENAME, g as hasMatrixRecoveryKeyStateInStore, h as hasMatrixLegacyCryptoMigrationStateInStore, i as normalizeMatrixStorageMetadata, j as writeMatrixRecoveryKeyStateToStore, k as writeMatrixLegacyCryptoMigrationStateToStore, m as MATRIX_RECOVERY_KEY_FILENAME, n as hasMatrixStorageMetaStateInStore, p as MATRIX_LEGACY_CRYPTO_MIGRATION_FILENAME, u as writeMatrixStorageMetaStateToStore, v as openMatrixIdbSnapshotStoreOptions, x as readLegacyMatrixLegacyCryptoMigrationState, y as openMatrixLegacyCryptoMigrationStoreOptions } from "./storage-BVf4uucD.js";
6
+ import { a as readLegacyMatrixSyncCacheState, c as writeMatrixSyncCacheStateToStore, i as openMatrixSyncCacheStoreOptions, r as hasMatrixSyncCacheStateInStore } from "./sync-cache-state-d-A_OhbU.js";
7
+ import { n as MATRIX_IDB_SNAPSHOT_LOCK_OPTIONS } from "./idb-persistence-lock-B3fZXyF_.js";
8
+ import { r as readLegacyMatrixIdbSnapshotStateUnlocked, t as isValidMatrixIdbSnapshotJson } from "./idb-persistence-D4NGNQxt.js";
9
9
  import { isRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
10
10
  import { normalizeAccountId } from "openclaw/plugin-sdk/account-id";
11
11
  import { createHash, randomUUID } from "node:crypto";
@@ -317,7 +317,7 @@ async function readLegacyInboundDedupeJsonSource(storageRootDir) {
317
317
  */
318
318
  async function importNewestInboundDedupeMarkers(params) {
319
319
  const { createPersistentDedupeImportEntry } = await import("openclaw/plugin-sdk/persistent-dedupe");
320
- const { buildMatrixInboundDedupeEventKey, MATRIX_INBOUND_DEDUPE_STATE_MAX_ENTRIES, MATRIX_INBOUND_DEDUPE_TTL_MS, resolveMatrixInboundDedupeStateNamespace } = await import("./inbound-dedupe-RvSLqdsz.js");
320
+ const { buildMatrixInboundDedupeEventKey, MATRIX_INBOUND_DEDUPE_STATE_MAX_ENTRIES, MATRIX_INBOUND_DEDUPE_TTL_MS, resolveMatrixInboundDedupeStateNamespace } = await import("./inbound-dedupe-Ch33GU06.js");
321
321
  const now = params.now ?? Date.now();
322
322
  const stateMaxEntries = params.stateMaxEntries ?? MATRIX_INBOUND_DEDUPE_STATE_MAX_ENTRIES;
323
323
  const newestByKey = /* @__PURE__ */ new Map();
@@ -1,4 +1,4 @@
1
- import { T as MsgType, a as sendSingleTextMessageMatrix, c as prepareMatrixSingleText, t as editMessageMatrix } from "./send-BL_iH5Ox.js";
1
+ import { T as MsgType, a as sendSingleTextMessageMatrix, c as prepareMatrixSingleText, t as editMessageMatrix } from "./send-DfS5ciUL.js";
2
2
  import { createFinalizableDraftStreamControlsForState } from "openclaw/plugin-sdk/channel-outbound";
3
3
  //#region extensions/matrix/src/matrix/draft-stream.ts
4
4
  const DEFAULT_THROTTLE_MS = 1e3;
@@ -1,9 +1,10 @@
1
- import { a as resolveMatrixDefaultOrOnlyAccountId } from "./account-selection-C8nnBTxi.js";
1
+ import { a as resolveMatrixDefaultOrOnlyAccountId } from "./account-selection-DA-jfx22.js";
2
2
  import { t as resolveMatrixConfigFieldPath } from "./config-paths-CnREYb1Y.js";
3
3
  import { normalizeOptionalAccountId } from "openclaw/plugin-sdk/account-id";
4
4
  //#region extensions/matrix/src/matrix/encryption-guidance.ts
5
5
  function resolveMatrixEncryptionConfigPath(cfg, accountId) {
6
- return resolveMatrixConfigFieldPath(cfg, normalizeOptionalAccountId(accountId) ?? resolveMatrixDefaultOrOnlyAccountId(cfg), "encryption");
6
+ const effectiveAccountId = normalizeOptionalAccountId(accountId) ?? resolveMatrixDefaultOrOnlyAccountId(cfg);
7
+ return resolveMatrixConfigFieldPath(cfg, effectiveAccountId, "encryption");
7
8
  }
8
9
  function formatMatrixEncryptionUnavailableError(cfg, accountId) {
9
10
  return `Matrix encryption is not available (enable ${resolveMatrixEncryptionConfigPath(cfg, accountId)}=true)`;
@@ -1,4 +1,4 @@
1
- import { a as resolveMatrixDefaultOrOnlyAccountId, i as resolveMatrixChannelConfig, n as requiresExplicitMatrixDefaultAccount, r as resolveConfiguredMatrixAccountIds, t as findMatrixAccountEntry } from "./account-selection-C8nnBTxi.js";
1
+ import { a as resolveMatrixDefaultOrOnlyAccountId, i as resolveMatrixChannelConfig, n as requiresExplicitMatrixDefaultAccount, r as resolveConfiguredMatrixAccountIds, t as findMatrixAccountEntry } from "./account-selection-DA-jfx22.js";
2
2
  import { n as listMatrixEnvAccountIds, r as resolveMatrixEnvAccountToken, t as getMatrixScopedEnvVarNames } from "./env-vars-dGqak9dN.js";
3
3
  import { a as resolveMatrixCredentialsPath, i as resolveMatrixCredentialsFilename, n as resolveMatrixAccountStorageRoot, o as resolveMatrixHomeserverKey, r as resolveMatrixCredentialsDir, s as sanitizeMatrixPathSegment, t as hashMatrixAccessToken } from "./storage-paths-gUmSydsW.js";
4
4
  export { findMatrixAccountEntry, getMatrixScopedEnvVarNames, hashMatrixAccessToken, listMatrixEnvAccountIds, requiresExplicitMatrixDefaultAccount, resolveConfiguredMatrixAccountIds, resolveMatrixAccountStorageRoot, resolveMatrixChannelConfig, resolveMatrixCredentialsDir, resolveMatrixCredentialsFilename, resolveMatrixCredentialsPath, resolveMatrixDefaultOrOnlyAccountId, resolveMatrixEnvAccountToken, resolveMatrixHomeserverKey, sanitizeMatrixPathSegment };
@@ -28,8 +28,8 @@ async function readResponseWithLimit$1(res, maxBytes, opts) {
28
28
  }
29
29
  //#endregion
30
30
  //#region extensions/matrix/src/matrix/sdk/transport.ts
31
- const MATRIX_JSON_RESPONSE_MAX_BYTES = 8 * 1024 * 1024;
32
- const MATRIX_SDK_RESPONSE_MAX_BYTES = 64 * 1024 * 1024;
31
+ const MATRIX_JSON_RESPONSE_MAX_BYTES = 8388608;
32
+ const MATRIX_SDK_RESPONSE_MAX_BYTES = 67108864;
33
33
  function normalizeEndpoint(endpoint) {
34
34
  if (!endpoint) return "/";
35
35
  return endpoint.startsWith("/") ? endpoint : `/${endpoint}`;
@@ -116,7 +116,8 @@ async function fetchWithMatrixGuardedRedirects(params) {
116
116
  for (let redirectCount = 0; redirectCount <= maxRedirects; redirectCount += 1) {
117
117
  let dispatcher;
118
118
  try {
119
- dispatcher = createPinnedDispatcher(await resolvePinnedHostnameWithPolicy(currentUrl.hostname, { policy: params.ssrfPolicy }), params.dispatcherPolicy, params.ssrfPolicy);
119
+ const pinned = await resolvePinnedHostnameWithPolicy(currentUrl.hostname, { policy: params.ssrfPolicy });
120
+ dispatcher = createPinnedDispatcher(pinned, params.dispatcherPolicy, params.ssrfPolicy);
120
121
  const response = await fetchWithMatrixDispatcher({
121
122
  url: currentUrl.toString(),
122
123
  init: {
@@ -216,10 +217,12 @@ async function performMatrixRequest(params) {
216
217
  headers.set("Accept", params.raw ? "*/*" : "application/json");
217
218
  if (params.accessToken) headers.set("Authorization", `Bearer ${params.accessToken}`);
218
219
  let body;
219
- if (params.body !== void 0) if (params.body instanceof Uint8Array || params.body instanceof ArrayBuffer || typeof params.body === "string") body = params.body;
220
- else {
221
- headers.set("Content-Type", "application/json");
222
- body = JSON.stringify(params.body);
220
+ if (params.body !== void 0) {
221
+ if (params.body instanceof Uint8Array || params.body instanceof ArrayBuffer || typeof params.body === "string") body = params.body;
222
+ else {
223
+ headers.set("Content-Type", "application/json");
224
+ body = JSON.stringify(params.body);
225
+ }
223
226
  }
224
227
  const { response, release } = await fetchWithMatrixGuardedRedirects({
225
228
  url: baseUrl.toString(),
@@ -1,6 +1,6 @@
1
- import { D as writeMatrixIdbSnapshotJson, f as MATRIX_IDB_SNAPSHOT_FILENAME, w as readMatrixIdbSnapshotJson } from "./storage-BsGuHngK.js";
1
+ import { D as writeMatrixIdbSnapshotJson, f as MATRIX_IDB_SNAPSHOT_FILENAME, w as readMatrixIdbSnapshotJson } from "./storage-BVf4uucD.js";
2
+ import { n as MATRIX_IDB_SNAPSHOT_LOCK_OPTIONS } from "./idb-persistence-lock-B3fZXyF_.js";
2
3
  import { n as LogService } from "./logger-B_71hN6W.js";
3
- import { n as MATRIX_IDB_SNAPSHOT_LOCK_OPTIONS } from "./idb-persistence-lock-DAJ49nZX.js";
4
4
  import path from "node:path";
5
5
  import { toErrorObject } from "openclaw/plugin-sdk/error-runtime";
6
6
  import fs from "node:fs";
@@ -1,6 +1,6 @@
1
1
  //#region extensions/matrix/src/matrix/sdk/idb-persistence-lock.ts
2
2
  const MATRIX_IDB_PERSIST_INTERVAL_MS = 6e4;
3
- const IDB_SNAPSHOT_LOCK_STALE_MS = 5 * 6e4;
3
+ const IDB_SNAPSHOT_LOCK_STALE_MS = 3e5;
4
4
  const IDB_SNAPSHOT_LOCK_RETRY_BASE = {
5
5
  factor: 2,
6
6
  minTimeout: 50,
@@ -4,7 +4,7 @@ import { createChannelReplayGuard, resolvePersistentDedupePluginStateNamespace }
4
4
  const MATRIX_INBOUND_DEDUPE_PLUGIN_ID = "matrix";
5
5
  const MATRIX_INBOUND_DEDUPE_NAMESPACE_PREFIX = "matrix.inbound-dedupe";
6
6
  const MATRIX_INBOUND_DEDUPE_NAMESPACE = "global";
7
- const MATRIX_INBOUND_DEDUPE_TTL_MS = 720 * 60 * 60 * 1e3;
7
+ const MATRIX_INBOUND_DEDUPE_TTL_MS = 2592e6;
8
8
  const MATRIX_INBOUND_DEDUPE_MEMORY_MAX = 5e3;
9
9
  const MATRIX_INBOUND_DEDUPE_STATE_MAX_ENTRIES = 2e4;
10
10
  function resolveMatrixInboundDedupeAccountId(accountId) {
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { n as registerMatrixCliMetadata } from "./cli-metadata-Ddx_y4Os.js";
1
+ import { n as registerMatrixCliMetadata } from "./cli-metadata-Mtzu5-AY.js";
2
2
  import { registerMatrixSubagentHooks } from "./subagent-hooks-api.js";
3
3
  import { defineBundledChannelEntry } from "openclaw/plugin-sdk/channel-entry-contract";
4
4
  import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
@@ -1,6 +1,6 @@
1
1
  import { n as MATRIX_REACTION_EVENT_TYPE } from "./reaction-common-DkrQdBSZ.js";
2
- import { _ as resolvePollReferenceEventId, d as formatPollAsText, f as formatPollResultsAsText, g as parsePollStartContent, m as isPollStartType, p as isPollEventType, r as sendMessageMatrix, t as editMessageMatrix, u as buildPollResultsSummary } from "./send-BL_iH5Ox.js";
3
- import { r as withResolvedRoomAction } from "./client-CZ_JvrO0.js";
2
+ import { _ as resolvePollReferenceEventId, d as formatPollAsText, f as formatPollResultsAsText, g as parsePollStartContent, m as isPollStartType, p as isPollEventType, r as sendMessageMatrix, t as editMessageMatrix, u as buildPollResultsSummary } from "./send-DfS5ciUL.js";
3
+ import { r as withResolvedRoomAction } from "./client-B0yMDho1.js";
4
4
  import { n as isMatrixNotFoundError } from "./errors-DKVS3_DO.js";
5
5
  import { asNullableObjectRecord, asNullableRecord, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
6
6
  import path from "node:path";
@@ -1,21 +1,21 @@
1
1
  import { a as resolveMatrixAccountConfig, i as resolveMatrixAccountAllowlistConfig } from "./account-config-CRsKoMqJ.js";
2
2
  import { t as getMatrixRuntime } from "./runtime-6S3DNFNv.js";
3
- import { n as resolveConfiguredMatrixBotUserIds } from "./accounts-fC57n-Jo.js";
4
- import { _ as logInboundDrop, a as resolveMatrixThreadRootId, b as summarizeMapping, c as RelationType, d as buildAllowlistResolutionSummary, f as canonicalizeAllowlistWithResolvedIds, g as getAgentScopedMediaLocalRoots, h as formatLocationText, i as resolveMatrixReplyToEventId, l as resolveMatrixRoomConfig, m as createTypingCallbacks, n as resolveMatrixStoredSessionMeta, o as resolveMatrixThreadRouting, p as createReplyPrefixOptions, r as resolveMatrixInboundRoute, s as EventType, u as addAllowlistUserEntriesFromConfigEntry, v as logTypingFailure, x as toLocationContext, y as patchAllowlistUsersInConfigEntries } from "./channel-BkEcVUs_.js";
5
- import { a as normalizeMatrixUserId, i as normalizeMatrixAllowList, o as resolveMatrixAllowListMatch } from "./channel.setup-CSacbORr.js";
3
+ import { n as resolveConfiguredMatrixBotUserIds } from "./accounts-DR1c4xF_.js";
4
+ import { _ as logInboundDrop, a as resolveMatrixThreadRootId, b as summarizeMapping, c as RelationType, d as buildAllowlistResolutionSummary, f as canonicalizeAllowlistWithResolvedIds, g as getAgentScopedMediaLocalRoots, h as formatLocationText, i as resolveMatrixReplyToEventId, l as resolveMatrixRoomConfig, m as createTypingCallbacks, n as resolveMatrixStoredSessionMeta, o as resolveMatrixThreadRouting, p as createReplyPrefixOptions, r as resolveMatrixInboundRoute, s as EventType, u as addAllowlistUserEntriesFromConfigEntry, v as logTypingFailure, x as toLocationContext, y as patchAllowlistUsersInConfigEntries } from "./channel-D6-ajB_u.js";
5
+ import { a as normalizeMatrixUserId, i as normalizeMatrixAllowList, o as resolveMatrixAllowListMatch } from "./channel.setup-OIEzCzSs.js";
6
6
  import { n as isMatrixRoomId, t as isMatrixQualifiedUserId } from "./target-ids-Nwx7cMVE.js";
7
- import { S as promoteMatrixDirectRoomCandidate, d as formatPollAsText, g as parsePollStartContent, m as isPollStartType, p as isPollEventType, r as sendMessageMatrix, w as MATRIX_OPENCLAW_FINALIZED_PREVIEW_KEY } from "./send-BL_iH5Ox.js";
7
+ import { S as promoteMatrixDirectRoomCandidate, d as formatPollAsText, g as parsePollStartContent, m as isPollStartType, p as isPollEventType, r as sendMessageMatrix, w as MATRIX_OPENCLAW_FINALIZED_PREVIEW_KEY } from "./send-DfS5ciUL.js";
8
8
  import { i as isStrictDirectMembership, n as hasDirectMatrixMemberFlag, o as readJoinedMatrixMembers } from "./direct-room-RinHjtqX.js";
9
- import { t as createMatrixThreadBindingManager } from "./thread-bindings-ERWNousC.js";
10
- import { c as formatMatrixMediaTooLargeText, d as isLikelyBareFilename, f as resolveBundledMatrixReplacementContent, l as formatMatrixMediaUnavailableText, m as fetchMatrixPollSnapshot, r as readMatrixMessages, u as formatMatrixMessageText } from "./messages-DaGRt-tu.js";
9
+ import { t as createMatrixThreadBindingManager } from "./thread-bindings-2HN2AyLu.js";
10
+ import { c as formatMatrixMediaTooLargeText, d as isLikelyBareFilename, f as resolveBundledMatrixReplacementContent, l as formatMatrixMediaUnavailableText, m as fetchMatrixPollSnapshot, r as readMatrixMessages, u as formatMatrixMessageText } from "./messages-DlMQaC02.js";
11
11
  import { t as isBunRuntime } from "./runtime-BefyhPWv.js";
12
- import { a as throwIfMatrixStartupAborted, c as resolveMatrixAuth, i as isMatrixStartupAbortError, l as resolveMatrixAuthContext, n as acquireSharedMatrixClient, s as backfillMatrixAuthDeviceIdAfterStartup } from "./client-kSi51NKp.js";
13
- import { i as isMatrixMediaSizeLimitError, r as MatrixMediaSizeLimitError } from "./http-client-D8o8b9u6.js";
14
- import { t as resolveMatrixTargets } from "./resolve-targets-qG6gceps.js";
15
- import { t as formatMatrixEncryptedEventDisabledWarning } from "./encryption-guidance-D4ZdAqzM.js";
16
- import { createMatrixInboundEventDeduper } from "./inbound-dedupe-RvSLqdsz.js";
12
+ import { a as throwIfMatrixStartupAborted, c as backfillMatrixAuthDeviceIdAfterStartup, i as isMatrixStartupAbortError, l as resolveMatrixAuth, n as acquireSharedMatrixClient, o as createMatrixMonitorTaskRunner, u as resolveMatrixAuthContext } from "./client-DFsRJEgB.js";
13
+ import { i as isMatrixMediaSizeLimitError, r as MatrixMediaSizeLimitError } from "./http-client-DOmFvKvB.js";
14
+ import { t as resolveMatrixTargets } from "./resolve-targets-D3Eakgzs.js";
15
+ import { t as formatMatrixEncryptedEventDisabledWarning } from "./encryption-guidance-BNcZNQZI.js";
16
+ import { createMatrixInboundEventDeduper } from "./inbound-dedupe-Ch33GU06.js";
17
17
  import { a as isMatrixAccessTokenInvalidatedError, d as isMatrixDisconnectedSyncState, f as isMatrixReadySyncState, p as isMatrixTerminalSyncState } from "./client-support-DLj4vDeu.js";
18
- import { i as setBoundedMap, r as getMatrixRoomInfo, t as createMatrixRoomInfoResolver } from "./room-info-yheP1mod.js";
18
+ import { i as setBoundedMap, r as getMatrixRoomInfo, t as createMatrixRoomInfoResolver } from "./room-info-DIU67XLP.js";
19
19
  import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
20
20
  import { buildChannelProgressDraftLineForEntry, createChannelProgressDraftCompositor, createMessageReceiptFromOutboundResults, createPreviewMessageReceipt, defineFinalizableLivePreviewAdapter, deliverWithFinalizableLivePreviewAdapter, formatChannelProgressDraftLine, formatChannelProgressDraftText, listMessageReceiptPlatformIds, resolveChannelStreamingBlockEnabled, waitUntilAbort } from "openclaw/plugin-sdk/channel-outbound";
21
21
  import { normalizeLowercaseStringOrEmpty, normalizeNullableString, normalizeOptionalString, normalizeStringifiedEntries, readStringValue, uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
@@ -327,15 +327,16 @@ async function resolveMatrixMonitorLiveUserAllowlist(params) {
327
327
  });
328
328
  }
329
329
  if (pending.length === 0) return effective;
330
+ const resolution = await resolveMatrixMonitorUserEntries({
331
+ cfg: params.cfg,
332
+ accountId: params.accountId,
333
+ entries: pending,
334
+ runtime: params.runtime,
335
+ resolveTargets: params.resolveTargets ?? resolveMatrixTargets
336
+ });
330
337
  const canonicalized = canonicalizeAllowlistWithResolvedIds({
331
338
  existing: pending,
332
- resolvedMap: (await resolveMatrixMonitorUserEntries({
333
- cfg: params.cfg,
334
- accountId: params.accountId,
335
- entries: pending,
336
- runtime: params.runtime,
337
- resolveTargets: params.resolveTargets ?? resolveMatrixTargets
338
- })).resolvedMap,
339
+ resolvedMap: resolution.resolvedMap,
339
340
  entryKey: normalizeMatrixUserId
340
341
  });
341
342
  const resolvedEntries = params.failClosedOnUnresolved ? filterFailClosedMatrixAllowlistEntries(canonicalized) : filterResolvedMatrixAllowlistEntries(canonicalized);
@@ -821,7 +822,7 @@ const matrixVerificationConstants = {
821
822
  const MAX_TRACKED_VERIFICATION_EVENTS = 1024;
822
823
  const SAS_NOTICE_RETRY_DELAY_MS = 750;
823
824
  const VERIFICATION_EVENT_STARTUP_GRACE_MS = 3e4;
824
- const loadMatrixDirectRoomDeps = createLazyRuntimeModule(() => Promise.all([import("./send-BL_iH5Ox.js").then((n) => n.x), import("./direct-room-RinHjtqX.js").then((n) => n.t)]).then(([directManagementModule, directRoomModule]) => ({
825
+ const loadMatrixDirectRoomDeps = createLazyRuntimeModule(() => Promise.all([import("./send-DfS5ciUL.js").then((n) => n.x), import("./direct-room-RinHjtqX.js").then((n) => n.t)]).then(([directManagementModule, directRoomModule]) => ({
825
826
  inspectMatrixDirectRooms: directManagementModule.inspectMatrixDirectRooms,
826
827
  isStrictDirectRoom: directRoomModule.isStrictDirectRoom
827
828
  })));
@@ -931,10 +932,11 @@ async function resolveVerificationSummaryForSignal(client, params) {
931
932
  const byTransactionId = list.find((entry) => candidates.some((candidate) => entry.transactionId === candidate));
932
933
  if (byTransactionId) return byTransactionId;
933
934
  const { inspectMatrixDirectRooms, isStrictDirectRoom } = await loadMatrixDirectRoomDeps();
934
- const activeRoomId = normalizeNullableString((await inspectMatrixDirectRooms({
935
+ const inspection = await inspectMatrixDirectRooms({
935
936
  client,
936
937
  remoteUserId: params.senderId
937
- }).catch(() => null))?.activeRoomId);
938
+ }).catch(() => null);
939
+ const activeRoomId = normalizeNullableString(inspection?.activeRoomId);
938
940
  if (activeRoomId) {
939
941
  if (activeRoomId !== params.roomId) return null;
940
942
  } else if (!await isStrictDirectRoom({
@@ -1014,10 +1016,11 @@ function createMatrixVerificationEventRouter(params) {
1014
1016
  const verificationUserRooms = /* @__PURE__ */ new Map();
1015
1017
  async function resolveActiveDirectRoomId(remoteUserId) {
1016
1018
  const { inspectMatrixDirectRooms } = await loadMatrixDirectRoomDeps();
1017
- return normalizeNullableString((await inspectMatrixDirectRooms({
1019
+ const inspection = await inspectMatrixDirectRooms({
1018
1020
  client: params.client,
1019
1021
  remoteUserId
1020
- }).catch(() => null))?.activeRoomId);
1022
+ }).catch(() => null);
1023
+ return normalizeNullableString(inspection?.activeRoomId);
1021
1024
  }
1022
1025
  function shouldEmitVerificationEventNotice(event) {
1023
1026
  const eventTs = typeof event.origin_server_ts === "number" && Number.isFinite(event.origin_server_ts) ? event.origin_server_ts : null;
@@ -1170,7 +1173,7 @@ function createMatrixVerificationEventRouter(params) {
1170
1173
  }
1171
1174
  //#endregion
1172
1175
  //#region extensions/matrix/src/matrix/monitor/events.ts
1173
- const MATRIX_POST_HEALTHY_SYNC_DECRYPT_FAILURE_WINDOW_MS = 2 * 6e4;
1176
+ const MATRIX_POST_HEALTHY_SYNC_DECRYPT_FAILURE_WINDOW_MS = 12e4;
1174
1177
  const MATRIX_POST_HEALTHY_SYNC_DECRYPT_FAILURE_THRESHOLD = 3;
1175
1178
  const MATRIX_POST_HEALTHY_SYNC_DECRYPT_FAILURE_SAMPLE_LIMIT = 3;
1176
1179
  function formatMatrixPostHealthySyncDecryptionHint(accountId) {
@@ -1580,11 +1583,7 @@ function resolveMatrixSharedDmContextNotice(params) {
1580
1583
  if (currentSession.accountId && currentSession.accountId !== params.accountId) return null;
1581
1584
  if (!currentSession.directUserId) return null;
1582
1585
  if (!currentSession.roomId || currentSession.roomId === params.roomId) return null;
1583
- return [
1584
- "This Matrix DM is sharing a session with another Matrix DM room.",
1585
- "Use /focus here for a one-off isolated thread session when thread bindings are enabled, or set",
1586
- "channels.matrix.dm.sessionScope to per-room to isolate each Matrix DM room."
1587
- ].join(" ");
1586
+ return ["This Matrix DM is sharing a session with another Matrix DM room.", "Set channels.matrix.dm.sessionScope to per-room to isolate each Matrix DM room."].join(" ");
1588
1587
  } catch (err) {
1589
1588
  params.logVerboseMessage(`matrix: failed checking shared DM session notice room=${params.roomId} (${String(err)})`);
1590
1589
  return null;
@@ -1592,10 +1591,13 @@ function resolveMatrixSharedDmContextNotice(params) {
1592
1591
  }
1593
1592
  function resolveMatrixPendingHistoryText(params) {
1594
1593
  if (!params.mediaUrl) return params.mentionPrecheckText;
1594
+ const body = typeof params.content.body === "string" ? params.content.body : void 0;
1595
+ const filename = typeof params.content.filename === "string" ? params.content.filename : void 0;
1596
+ const msgtype = typeof params.content.msgtype === "string" ? params.content.msgtype : void 0;
1595
1597
  return formatMatrixMessageText({
1596
- body: typeof params.content.body === "string" ? params.content.body : void 0,
1597
- filename: typeof params.content.filename === "string" ? params.content.filename : void 0,
1598
- msgtype: typeof params.content.msgtype === "string" ? params.content.msgtype : void 0
1598
+ body,
1599
+ filename,
1600
+ msgtype
1599
1601
  }) ?? params.mentionPrecheckText;
1600
1602
  }
1601
1603
  function resolveMatrixInboundMediaContent(content) {
@@ -1628,7 +1630,7 @@ function resolveMatrixAllowBotsMode(value) {
1628
1630
  return "off";
1629
1631
  }
1630
1632
  function formatMatrixToolProgressMarkdownCode(text) {
1631
- return `\`${(text.length <= MATRIX_TOOL_PROGRESS_MAX_CHARS ? text : `${truncateUtf16Safe(text, MATRIX_TOOL_PROGRESS_MAX_CHARS - 1).trimEnd()}...`).replaceAll("`", "'")}\``;
1633
+ return `\`${(text.length <= MATRIX_TOOL_PROGRESS_MAX_CHARS ? text : `${truncateUtf16Safe(text, 299).trimEnd()}...`).replaceAll("`", "'")}\``;
1632
1634
  }
1633
1635
  //#endregion
1634
1636
  //#region extensions/matrix/src/matrix/monitor/handler-runtime.ts
@@ -1638,11 +1640,11 @@ async function redactMatrixDraftEvent(client, roomId, draftEventId) {
1638
1640
  function buildMatrixFinalizedPreviewContent() {
1639
1641
  return { [MATRIX_OPENCLAW_FINALIZED_PREVIEW_KEY]: true };
1640
1642
  }
1641
- const loadMatrixSendModule = createLazyRuntimeModule(() => import("./send-BL_iH5Ox.js").then((n) => n.s));
1643
+ const loadMatrixSendModule = createLazyRuntimeModule(() => import("./send-DfS5ciUL.js").then((n) => n.s));
1642
1644
  const loadAcpBindingRuntime = createLazyRuntimeModule(() => import("openclaw/plugin-sdk/acp-binding-runtime"));
1643
1645
  const loadSessionBindingRuntime = createLazyRuntimeModule(() => import("openclaw/plugin-sdk/session-binding-runtime"));
1644
- const loadMatrixReactionEvents = createLazyRuntimeModule(() => import("./reaction-events-CjVUiqcY.js"));
1645
- const loadMatrixDraftStream = createLazyRuntimeModule(() => import("./draft-stream-0CEpNrBk.js"));
1646
+ const loadMatrixReactionEvents = createLazyRuntimeModule(() => import("./reaction-events-lwNc5I1X.js"));
1647
+ const loadMatrixDraftStream = createLazyRuntimeModule(() => import("./draft-stream-DhGHVdO4.js"));
1646
1648
  async function matrixTextWouldActivateMentions(client, text) {
1647
1649
  const { resolveMatrixMentionsForBody } = await loadMatrixSendModule();
1648
1650
  const mentions = await resolveMatrixMentionsForBody({
@@ -1671,7 +1673,7 @@ const MAX_CACHED_REPLY_CONTEXTS = 256;
1671
1673
  const MAX_REPLY_BODY_LENGTH = 500;
1672
1674
  function truncateReplyBody(value) {
1673
1675
  if (value.length <= MAX_REPLY_BODY_LENGTH) return value;
1674
- return `${sliceUtf16Safe(value, 0, MAX_REPLY_BODY_LENGTH - 3)}...`;
1676
+ return `${sliceUtf16Safe(value, 0, 497)}...`;
1675
1677
  }
1676
1678
  function summarizeMatrixReplyEvent(event) {
1677
1679
  const body = summarizeMatrixMessageContextEvent(event);
@@ -1724,7 +1726,7 @@ const MAX_TRACKED_THREAD_STARTERS = 256;
1724
1726
  const MAX_THREAD_STARTER_BODY_LENGTH = 500;
1725
1727
  function truncateThreadStarterBody(value) {
1726
1728
  if (value.length <= MAX_THREAD_STARTER_BODY_LENGTH) return value;
1727
- return `${sliceUtf16Safe(value, 0, MAX_THREAD_STARTER_BODY_LENGTH - 3)}...`;
1729
+ return `${sliceUtf16Safe(value, 0, 497)}...`;
1728
1730
  }
1729
1731
  function summarizeMatrixThreadStarterEvent(event) {
1730
1732
  const body = summarizeMatrixMessageContextEvent(event);
@@ -2836,7 +2838,6 @@ async function resolveMatrixIngressContent(config) {
2836
2838
  isDirectMessage,
2837
2839
  dmSessionScope,
2838
2840
  threadId: thread.threadId,
2839
- eventTs: eventTs ?? void 0,
2840
2841
  resolveAgentRoute: core.channel.routing.resolveAgentRoute
2841
2842
  });
2842
2843
  const hasExplicitSessionBinding = _configuredBinding !== null || _runtimeBindingId !== null;
@@ -3062,7 +3063,10 @@ async function resolveMatrixIngressContent(config) {
3062
3063
  }
3063
3064
  if (_runtimeBindingId) {
3064
3065
  const { getSessionBindingService } = await loadSessionBindingRuntime();
3065
- getSessionBindingService().touch(_runtimeBindingId, eventTs ?? void 0);
3066
+ getSessionBindingService().touch(_runtimeBindingId, eventTs ?? void 0, {
3067
+ channel: "matrix",
3068
+ accountId
3069
+ });
3066
3070
  }
3067
3071
  const preparedTrigger = isRoom && historyLimit > 0 ? reservedHistorySlot ? roomHistoryTracker.prepareReservedTrigger(_route.agentId, roomId, historyLimit, reservedHistorySlot, {
3068
3072
  sender: senderName,
@@ -3629,7 +3633,7 @@ function createMatrixReplyDispatcher(config) {
3629
3633
  //#endregion
3630
3634
  //#region extensions/matrix/src/matrix/monitor/handler-state.ts
3631
3635
  const ALLOW_FROM_STORE_CACHE_TTL_MS = 3e4;
3632
- const PAIRING_REPLY_COOLDOWN_MS = 5 * 6e4;
3636
+ const PAIRING_REPLY_COOLDOWN_MS = 3e5;
3633
3637
  const MAX_TRACKED_PAIRING_REPLY_SENDERS = 512;
3634
3638
  function createMatrixHandlerState(config) {
3635
3639
  const { core, accountId, runtime, allowFromResolvedEntries, groupAllowFromResolvedEntries, resolveLiveUserAllowlist } = config;
@@ -4178,10 +4182,10 @@ function shouldPromoteRecentInviteRoom(params) {
4178
4182
  //#endregion
4179
4183
  //#region extensions/matrix/src/matrix/monitor/startup.ts
4180
4184
  const loadMatrixStartupMaintenanceDeps = createLazyRuntimeModule(() => Promise.all([
4181
- import("./config-update-DC0fWBxc.js").then((n) => n.t),
4185
+ import("./config-update-BnX26jCO.js").then((n) => n.t),
4182
4186
  import("./device-health-B4-YXtJR.js").then((n) => n.t),
4183
- import("./profile-D-Wubo0A.js").then((n) => n.n),
4184
- import("./startup-verification-Cs08ca8u.js")
4187
+ import("./profile-vmjsmhh4.js").then((n) => n.n),
4188
+ import("./startup-verification-1Ney1mmI.js")
4185
4189
  ]).then(([configUpdateModule, deviceHealthModule, profileModule, startupVerificationModule]) => ({
4186
4190
  updateMatrixAccountConfig: configUpdateModule.updateMatrixAccountConfig,
4187
4191
  summarizeMatrixDeviceHealth: deviceHealthModule.summarizeMatrixDeviceHealth,
@@ -4403,35 +4407,6 @@ function createMatrixMonitorSyncLifecycle(params) {
4403
4407
  };
4404
4408
  }
4405
4409
  //#endregion
4406
- //#region extensions/matrix/src/matrix/monitor/task-runner.ts
4407
- function createMatrixMonitorTaskRunner(params) {
4408
- const inFlight = /* @__PURE__ */ new Set();
4409
- let closed = false;
4410
- const runDetachedTask = (label, task) => {
4411
- if (closed) return Promise.resolve();
4412
- const trackedTask = Promise.resolve().then(task).catch((error) => {
4413
- const message = String(error);
4414
- params.logVerboseMessage(`matrix: ${label} failed (${message})`);
4415
- params.logger.warn("matrix background task failed", {
4416
- task: label,
4417
- error: message
4418
- });
4419
- }).finally(() => {
4420
- inFlight.delete(trackedTask);
4421
- });
4422
- inFlight.add(trackedTask);
4423
- return trackedTask;
4424
- };
4425
- const waitForIdle = async () => {
4426
- while (inFlight.size > 0) await Promise.allSettled(Array.from(inFlight));
4427
- };
4428
- return {
4429
- close: () => closed = true,
4430
- runDetachedTask,
4431
- waitForIdle
4432
- };
4433
- }
4434
- //#endregion
4435
4410
  //#region extensions/matrix/src/matrix/monitor/index.ts
4436
4411
  function resolveMatrixStreamingMode(streaming) {
4437
4412
  const mode = streaming?.mode;
@@ -2,7 +2,7 @@ import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
2
2
  import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
3
3
  import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
4
4
  //#region extensions/matrix/src/plugin-entry.runtime.ts
5
- const loadMatrixVerificationRuntime = createLazyRuntimeModule(() => import("./verification-4vsW_WSn.js").then((n) => n.y));
5
+ const loadMatrixVerificationRuntime = createLazyRuntimeModule(() => import("./verification-CD7k5vE9.js").then((n) => n.y));
6
6
  function sendError(respond, err) {
7
7
  respond(false, { error: formatErrorMessage(err) });
8
8
  }
@@ -0,0 +1,2 @@
1
+ import { s as createMatrixClient } from "./client-DFsRJEgB.js";
2
+ export { createMatrixClient };
@@ -1,7 +1,7 @@
1
1
  import { t as getMatrixRuntime } from "./runtime-6S3DNFNv.js";
2
- import { n as resolveMatrixConfigPath, r as updateMatrixAccountConfig } from "./config-update-DC0fWBxc.js";
3
- import { r as syncMatrixOwnProfile } from "./profile-D-Wubo0A.js";
4
- import { n as withResolvedActionClient } from "./client-CZ_JvrO0.js";
2
+ import { n as resolveMatrixConfigPath, r as updateMatrixAccountConfig } from "./config-update-BnX26jCO.js";
3
+ import { r as syncMatrixOwnProfile } from "./profile-vmjsmhh4.js";
4
+ import { n as withResolvedActionClient } from "./client-B0yMDho1.js";
5
5
  import { normalizeAccountId } from "openclaw/plugin-sdk/account-id";
6
6
  //#region extensions/matrix/src/matrix/actions/profile.ts
7
7
  async function updateMatrixOwnProfile(opts = {}) {
@@ -10,9 +10,10 @@ async function updateMatrixOwnProfile(opts = {}) {
10
10
  const avatarPath = opts.avatarPath?.trim();
11
11
  const runtime = getMatrixRuntime();
12
12
  return await withResolvedActionClient(opts, async (client) => {
13
+ const userId = await client.getUserId();
13
14
  return await syncMatrixOwnProfile({
14
15
  client,
15
- userId: await client.getUserId(),
16
+ userId,
16
17
  displayName: displayName || void 0,
17
18
  avatarUrl: avatarUrl || void 0,
18
19
  avatarPath: avatarPath || void 0,
@@ -5,7 +5,7 @@ var profile_exports = /* @__PURE__ */ __exportAll({
5
5
  isSupportedMatrixAvatarSource: () => isSupportedMatrixAvatarSource,
6
6
  syncMatrixOwnProfile: () => syncMatrixOwnProfile
7
7
  });
8
- const MATRIX_PROFILE_AVATAR_MAX_BYTES = 10 * 1024 * 1024;
8
+ const MATRIX_PROFILE_AVATAR_MAX_BYTES = 10485760;
9
9
  function isMatrixMxcUri(value) {
10
10
  return normalizeLowercaseStringOrEmpty(normalizeOptionalString(value)).startsWith("mxc://");
11
11
  }
@@ -1,15 +1,15 @@
1
1
  import { a as resolveMatrixAccountConfig } from "./account-config-CRsKoMqJ.js";
2
- import { a as resolveMatrixThreadRootId, o as resolveMatrixThreadRouting, r as resolveMatrixInboundRoute } from "./channel-BkEcVUs_.js";
2
+ import { a as resolveMatrixThreadRootId, o as resolveMatrixThreadRouting, r as resolveMatrixInboundRoute } from "./channel-D6-ajB_u.js";
3
3
  import { a as extractMatrixReactionAnnotation } from "./reaction-common-DkrQdBSZ.js";
4
- import { i as resolveMatrixApprovalReactionTargetWithPersistence, o as unregisterMatrixApprovalReactionTargetsForApproval } from "./approval-reactions-tXh9KYrW.js";
4
+ import { i as resolveMatrixApprovalReactionTargetWithPersistence, o as unregisterMatrixApprovalReactionTargetsForApproval } from "./approval-reactions-1fwEhoK9.js";
5
5
  import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
6
6
  import { isApprovalNotFoundError } from "openclaw/plugin-sdk/error-runtime";
7
7
  import { normalizeAccountId } from "openclaw/plugin-sdk/routing";
8
8
  import { getSessionBindingService } from "openclaw/plugin-sdk/session-binding-runtime";
9
9
  //#region extensions/matrix/src/matrix/monitor/reaction-events.ts
10
- const loadApprovalReactionAuth = createLazyRuntimeModule(() => import("./approval-reaction-auth-BDONXxnF.js"));
10
+ const loadApprovalReactionAuth = createLazyRuntimeModule(() => import("./approval-reaction-auth-DziFGHSk.js"));
11
11
  const loadExecApprovalResolver = createLazyRuntimeModule(() => import("openclaw/plugin-sdk/approval-gateway-runtime"));
12
- const loadMatrixSend = createLazyRuntimeModule(() => import("./send-BL_iH5Ox.js").then((n) => n.s));
12
+ const loadMatrixSend = createLazyRuntimeModule(() => import("./send-DfS5ciUL.js").then((n) => n.s));
13
13
  function buildMatrixApprovalTerminalText(result) {
14
14
  const approval = result.approval;
15
15
  const terminalLabel = approval.status === "allowed" ? approval.decision === "allow-always" ? "Allowed always" : "Allowed once" : approval.status === "denied" ? "Denied" : approval.status === "expired" ? "Expired" : "Cancelled";
@@ -152,10 +152,12 @@ async function handleInboundMatrixReaction(params) {
152
152
  isDirectMessage: params.isDirectMessage,
153
153
  dmSessionScope: accountConfig.dm?.sessionScope ?? "per-user",
154
154
  threadId: thread.threadId,
155
- eventTs: params.event.origin_server_ts,
156
155
  resolveAgentRoute: params.core.channel.routing.resolveAgentRoute
157
156
  });
158
- if (runtimeBindingId) getSessionBindingService().touch(runtimeBindingId, params.event.origin_server_ts);
157
+ if (runtimeBindingId) getSessionBindingService().touch(runtimeBindingId, params.event.origin_server_ts, {
158
+ channel: "matrix",
159
+ accountId: params.accountId
160
+ });
159
161
  const text = `Matrix reaction added: ${reaction.key} by ${params.senderLabel} on msg ${reaction.eventId}`;
160
162
  params.core.system.enqueueSystemEvent(text, {
161
163
  sessionKey: route.sessionKey,
@@ -1,6 +1,6 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
2
2
  import { r as normalizeMatrixMessagingTarget, t as isMatrixQualifiedUserId } from "./target-ids-Nwx7cMVE.js";
3
- import { n as listMatrixDirectoryGroupsLive, r as listMatrixDirectoryPeersLive } from "./directory-live-DKr0w35b.js";
3
+ import { n as listMatrixDirectoryGroupsLive, r as listMatrixDirectoryPeersLive } from "./directory-live-Drh343TW.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-qG6gceps.js";
1
+ import { t as resolveMatrixTargets } from "./resolve-targets-D3Eakgzs.js";
2
2
  //#region extensions/matrix/src/resolver.runtime.ts
3
3
  const matrixResolverRuntime = { resolveMatrixTargets };
4
4
  //#endregion
@@ -1,6 +1,6 @@
1
- import { b as resolveMatrixRoomId } from "./send-BL_iH5Ox.js";
2
- import { s as EventType } from "./messages-DaGRt-tu.js";
3
- import { n as withResolvedActionClient, r as withResolvedRoomAction } from "./client-CZ_JvrO0.js";
1
+ import { b as resolveMatrixRoomId } from "./send-DfS5ciUL.js";
2
+ import { s as EventType } from "./messages-DlMQaC02.js";
3
+ import { n as withResolvedActionClient, r as withResolvedRoomAction } from "./client-B0yMDho1.js";
4
4
  import { n as isMatrixNotFoundError } from "./errors-DKVS3_DO.js";
5
5
  //#region extensions/matrix/src/matrix/monitor/bounded-cache.ts
6
6
  function setBoundedMap(map, key, value, maxEntries) {
@@ -1,9 +1,9 @@
1
- import { a as resolveMatrixDefaultOrOnlyAccountId, i as resolveMatrixChannelConfig, l as resolveMatrixAccountStringValues, n as requiresExplicitMatrixDefaultAccount, r as resolveConfiguredMatrixAccountIds, t as findMatrixAccountEntry } from "./account-selection-C8nnBTxi.js";
1
+ import { a as resolveMatrixDefaultOrOnlyAccountId, i as resolveMatrixChannelConfig, l as resolveMatrixAccountStringValues, n as requiresExplicitMatrixDefaultAccount, r as resolveConfiguredMatrixAccountIds, t as findMatrixAccountEntry } from "./account-selection-DA-jfx22.js";
2
2
  import { n as listMatrixEnvAccountIds, r as resolveMatrixEnvAccountToken, t as getMatrixScopedEnvVarNames } from "./env-vars-dGqak9dN.js";
3
3
  import { r as setMatrixRuntime } from "./runtime-6S3DNFNv.js";
4
4
  import { a as resolveMatrixCredentialsPath, i as resolveMatrixCredentialsFilename, n as resolveMatrixAccountStorageRoot, o as resolveMatrixHomeserverKey, r as resolveMatrixCredentialsDir, s as sanitizeMatrixPathSegment, t as hashMatrixAccessToken } from "./storage-paths-gUmSydsW.js";
5
5
  import { f as setMatrixThreadBindingMaxAgeBySessionKey, u as setMatrixThreadBindingIdleTimeoutBySessionKey } from "./thread-bindings-shared-oNPiyMWY.js";
6
- import { n as ensureMatrixSdkInstalled, r as isMatrixSdkAvailable } from "./deps-CcVJfvRM.js";
6
+ import { n as ensureMatrixSdkInstalled, r as isMatrixSdkAvailable } from "./deps-mtxF2mHI.js";
7
7
  import { chunkTextForOutbound as chunkTextForOutbound$1 } from "openclaw/plugin-sdk/text-chunking";
8
8
  import { assertHttpUrlTargetsPrivateNetwork, closeDispatcher, createPinnedDispatcher, resolvePinnedHostnameWithPolicy, ssrfPolicyFromDangerouslyAllowPrivateNetwork } from "openclaw/plugin-sdk/ssrf-runtime";
9
9
  import { writeJsonFileAtomically } from "openclaw/plugin-sdk/json-store";