@openclaw/matrix 2026.7.2-beta.2 → 2026.7.2-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/dist/{account-selection-Bz00QTmQ.js → account-selection-kqquRzCf.js} +5 -5
  2. package/dist/api.js +6 -6
  3. package/dist/{approval-handler.runtime-BQZdg_dJ.js → approval-handler.runtime-BEa98wwG.js} +4 -4
  4. package/dist/{approval-ids-De4IhOSN.js → approval-ids-Dfn7oQAm.js} +1 -1
  5. package/dist/{approval-reaction-auth-BLJKPLku.js → approval-reaction-auth-kXkCJBGi.js} +2 -2
  6. package/dist/auth-presence.js +13 -21
  7. package/dist/{channel-B1woOUgk.js → channel-j331Xd7b.js} +13 -13
  8. package/dist/channel-plugin-api.js +1 -1
  9. package/dist/{channel.runtime-BvJm9z0w.js → channel.runtime-BIwlVfQw.js} +15 -16
  10. package/dist/{cli-CLWOkMvw.js → cli-0EcKfqFw.js} +18 -11
  11. package/dist/{cli-metadata-9Naf7in0.js → cli-metadata-Xq1Xb15R.js} +1 -1
  12. package/dist/cli-metadata.js +1 -1
  13. package/dist/{client-BUai6s29.js → client-BtG4quUl.js} +2 -2
  14. package/dist/{client-CPuYbNL8.js → client-CA0PULls.js} +2 -2
  15. package/dist/{client-bootstrap-CNVF73sF.js → client-bootstrap-Dk5EAn3n.js} +1 -1
  16. package/dist/{config-schema-BTSatSY3.js → config-schema-B5GRV8wL.js} +1 -1
  17. package/dist/contract-api.js +2 -2
  18. package/dist/{create-client-85ttAWDP.js → create-client-WQExaby_.js} +4 -4
  19. package/dist/credentials-W2EmwRhu.js +65 -0
  20. package/dist/credentials-read-DVmFCm7X.js +77 -0
  21. package/dist/{credentials-write.runtime-BDtpqvj0.js → credentials-write.runtime-Be9zNSUw.js} +1 -1
  22. package/dist/{crypto-runtime-DoEB5RpM.js → crypto-runtime-CAff-n15.js} +3 -3
  23. package/dist/{directory-live-0TyS9xep.js → directory-live-DiC-0XBC.js} +3 -3
  24. package/dist/{doctor-BGTs609f.js → doctor-DwUVm5Lw.js} +1 -1
  25. package/dist/{doctor-contract-D2qTLe-C.js → doctor-contract-BA2Y6Crx.js} +1 -1
  26. package/dist/doctor-contract-api.js +116 -10
  27. package/dist/{draft-stream-GOdPZMBm.js → draft-stream-CTLKtJJ0.js} +1 -1
  28. package/dist/{encryption-guidance-BFfgq7c7.js → encryption-guidance-CbEFe38F.js} +1 -1
  29. package/dist/{file-sync-store-CUE9WwD2.js → file-sync-store-CPkgnSXp.js} +21 -4
  30. package/dist/helper-api.js +2 -2
  31. package/dist/{idb-persistence-BiHEEzD7.js → idb-persistence-Dyy6ipgU.js} +2 -2
  32. package/dist/index.js +1 -1
  33. package/dist/{media-text-DPCtdFjk.js → media-text-BMXEXb1j.js} +1 -1
  34. package/dist/{messages-DCRbGLMh.js → messages-3UBHfZrN.js} +3 -3
  35. package/dist/{monitor-C5EOF9et.js → monitor-BtUIds8T.js} +87 -89
  36. package/dist/plugin-entry.handlers.runtime.js +1 -1
  37. package/dist/probe.runtime-sBV-Govx.js +3 -0
  38. package/dist/{profile-update-DompcDyu.js → profile-update-Bh2XtJwN.js} +2 -2
  39. package/dist/{reaction-events-QUgxkQKQ.js → reaction-events-BwAKtUyQ.js} +2 -2
  40. package/dist/record-shared-CWWx6fvI.js +2 -0
  41. package/dist/{recovery-key-store-B2RglalK.js → recovery-key-store-CW6eePfp.js} +1 -1
  42. package/dist/{resolve-targets-Cx1VVArA.js → resolve-targets-DVoj-YxB.js} +1 -1
  43. package/dist/{resolver.runtime-PPrv3ZHu.js → resolver.runtime-CC0VVsAt.js} +1 -1
  44. package/dist/runtime-api.js +3 -3
  45. package/dist/{sdk-1TXuSiXZ.js → sdk-CIDZXWpZ.js} +5 -5
  46. package/dist/{secret-contract-OZoQf0kI.js → secret-contract-M3hRmGO-.js} +21 -5
  47. package/dist/secret-contract-api.js +1 -1
  48. package/dist/{send-yre1krm8.js → send-BJbrdmNm.js} +3 -2
  49. package/dist/session-binding-contract-api.js +1 -1
  50. package/dist/{setup-bootstrap-DXVRCd4G.js → setup-bootstrap-DGPOOdz-.js} +2 -2
  51. package/dist/{setup-core-CYQRY2oG.js → setup-core-XCdAx1nY.js} +3 -3
  52. package/dist/setup-plugin-api.js +3 -3
  53. package/dist/{setup-surface-BjvRQzK6.js → setup-surface-CzUiTe_k.js} +6 -6
  54. package/dist/{shared-BfW4lxGu.js → shared-DquM1oz6.js} +6 -6
  55. package/dist/{startup-verification-DSiyDKM5.js → startup-verification-CA00kebL.js} +2 -2
  56. package/dist/{storage-DD-EnNJE.js → storage-CzHxeF5E.js} +8 -8
  57. package/dist/{thread-bindings-U5ZroBeZ.js → thread-bindings-Cw194yEn.js} +3 -3
  58. package/dist/{tool-actions.runtime-BlfTr9b0.js → tool-actions.runtime-C0jgWYhX.js} +7 -7
  59. package/dist/{verification-CGnI9k1O.js → verification-DjxyWTNP.js} +2 -2
  60. package/npm-shrinkwrap.json +3 -3
  61. package/package.json +4 -4
  62. package/dist/async-lock-BcLS4KOc.js +0 -19
  63. package/dist/credentials-CncWUieb.js +0 -56
  64. package/dist/credentials-read-CwNJrmwu.js +0 -112
  65. package/dist/probe.runtime-BBvciVfo.js +0 -3
  66. package/dist/record-shared-CvzjvHRn.js +0 -2
  67. package/dist/{deps-DDbghaZH.js → deps-CcVJfvRM.js} +1 -1
  68. package/dist/{http-client-Jw5_bwQo.js → http-client-BmrgOZTL.js} +1 -1
  69. package/dist/{storage-paths-B4_I9iqO.js → storage-paths-gUmSydsW.js} +1 -1
@@ -6,9 +6,9 @@ import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
6
6
  import { normalizeAccountId } from "openclaw/plugin-sdk/routing";
7
7
  import { getSessionBindingService } from "openclaw/plugin-sdk/session-binding-runtime";
8
8
  //#region extensions/matrix/src/matrix/monitor/reaction-events.ts
9
- const loadApprovalReactionAuth = createLazyRuntimeModule(() => import("./approval-reaction-auth-BLJKPLku.js"));
9
+ const loadApprovalReactionAuth = createLazyRuntimeModule(() => import("./approval-reaction-auth-kXkCJBGi.js"));
10
10
  const loadExecApprovalResolver = createLazyRuntimeModule(() => import("./exec-approval-resolver-BCgqRtZS.js"));
11
- const loadMatrixSend = createLazyRuntimeModule(() => import("./send-yre1krm8.js").then((n) => n.l));
11
+ const loadMatrixSend = createLazyRuntimeModule(() => import("./send-BJbrdmNm.js").then((n) => n.l));
12
12
  function buildMatrixApprovalTerminalText(result) {
13
13
  const approval = result.approval;
14
14
  const terminalLabel = approval.status === "allowed" ? approval.decision === "allow-always" ? "Allowed always" : "Allowed once" : approval.status === "denied" ? "Denied" : approval.status === "expired" ? "Expired" : "Cancelled";
@@ -0,0 +1,2 @@
1
+ import { isRecord as isRecord$1 } from "openclaw/plugin-sdk/string-coerce-runtime";
2
+ export { isRecord$1 as t };
@@ -1,5 +1,5 @@
1
1
  import { n as formatMatrixErrorReason, t as formatMatrixErrorMessage } from "./errors-C47hvAF8.js";
2
- import { A as writeMatrixRecoveryKeyStateForPath, C as readLegacyMatrixRecoveryKeyFile, E as readMatrixRecoveryKeyStateForPath, v as migrateLegacyMatrixRecoveryKeyFilePathToStore } from "./storage-DD-EnNJE.js";
2
+ import { A as writeMatrixRecoveryKeyStateForPath, C as readLegacyMatrixRecoveryKeyFile, E as readMatrixRecoveryKeyStateForPath, v as migrateLegacyMatrixRecoveryKeyFilePathToStore } from "./storage-CzHxeF5E.js";
3
3
  import { n as LogService } from "./logger-D0GCSDQq.js";
4
4
  import path from "node:path";
5
5
  import { decodeRecoveryKey } from "matrix-js-sdk/lib/crypto-api/recovery-key.js";
@@ -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-0TyS9xep.js";
3
+ import { n as listMatrixDirectoryGroupsLive, r as listMatrixDirectoryPeersLive } from "./directory-live-DiC-0XBC.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-Cx1VVArA.js";
1
+ import { t as resolveMatrixTargets } from "./resolve-targets-DVoj-YxB.js";
2
2
  //#region extensions/matrix/src/resolver.runtime.ts
3
3
  const matrixResolverRuntime = { resolveMatrixTargets };
4
4
  //#endregion
@@ -1,9 +1,9 @@
1
- import { a as resolveMatrixDefaultOrOnlyAccountId, i as resolveMatrixChannelConfig, n as requiresExplicitMatrixDefaultAccount, o as resolveMatrixAccountStringValues, r as resolveConfiguredMatrixAccountIds, t as findMatrixAccountEntry } from "./account-selection-Bz00QTmQ.js";
1
+ import { a as resolveMatrixDefaultOrOnlyAccountId, i as resolveMatrixChannelConfig, n as requiresExplicitMatrixDefaultAccount, o as resolveMatrixAccountStringValues, r as resolveConfiguredMatrixAccountIds, t as findMatrixAccountEntry } from "./account-selection-kqquRzCf.js";
2
2
  import { n as listMatrixEnvAccountIds, r as resolveMatrixEnvAccountToken, t as getMatrixScopedEnvVarNames } from "./env-vars-B0NxQnPk.js";
3
3
  import { r as setMatrixRuntime } from "./runtime-6S3DNFNv.js";
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-B4_I9iqO.js";
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 { d as setMatrixThreadBindingIdleTimeoutBySessionKey, p as setMatrixThreadBindingMaxAgeBySessionKey } from "./thread-bindings-shared-CKnY4LSd.js";
6
- import { n as ensureMatrixSdkInstalled, r as isMatrixSdkAvailable } from "./deps-DDbghaZH.js";
6
+ import { n as ensureMatrixSdkInstalled, r as isMatrixSdkAvailable } from "./deps-CcVJfvRM.js";
7
7
  import { assertHttpUrlTargetsPrivateNetwork, closeDispatcher, createPinnedDispatcher, resolvePinnedHostnameWithPolicy, 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,13 +1,13 @@
1
1
  import { n as formatMatrixErrorReason, r as isMatrixNotFoundError, t as formatMatrixErrorMessage } from "./errors-C47hvAF8.js";
2
+ import { t as SqliteBackedMatrixSyncStore } from "./file-sync-store-CPkgnSXp.js";
2
3
  import { n as LogService, r as noop, t as ConsoleLogger } from "./logger-D0GCSDQq.js";
3
- import { t as SqliteBackedMatrixSyncStore } from "./file-sync-store-CUE9WwD2.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-BfW4lxGu.js";
6
- import { a as matrixEventToRaw, n as createMatrixGuardedFetch, o as parseMxc, t as MatrixAuthedHttpClient } from "./http-client-Jw5_bwQo.js";
5
+ import { c as createMatrixStartupAbortError, u as throwIfMatrixStartupAborted } from "./shared-DquM1oz6.js";
6
+ import { a as matrixEventToRaw, n as createMatrixGuardedFetch, o as parseMxc, t as MatrixAuthedHttpClient } from "./http-client-BmrgOZTL.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
- import { n as isRepairableSecretStorageAccessError, t as MatrixRecoveryKeyStore } from "./recovery-key-store-B2RglalK.js";
10
+ import { n as isRepairableSecretStorageAccessError, t as MatrixRecoveryKeyStore } from "./recovery-key-store-CW6eePfp.js";
11
11
  import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
12
12
  import { normalizeNullableString, normalizeStringEntries, uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
13
13
  import { KeyedAsyncQueue } from "openclaw/plugin-sdk/keyed-async-queue";
@@ -94,7 +94,7 @@ function createMatrixExplicitBootstrapOptions(params) {
94
94
  };
95
95
  }
96
96
  let loadedMatrixCryptoRuntime = null;
97
- const loadMatrixCryptoRuntime = createLazyRuntimeModule(() => import("./crypto-runtime-DoEB5RpM.js").then((runtime) => {
97
+ const loadMatrixCryptoRuntime = createLazyRuntimeModule(() => import("./crypto-runtime-CAff-n15.js").then((runtime) => {
98
98
  loadedMatrixCryptoRuntime = runtime;
99
99
  return runtime;
100
100
  }));
@@ -2,6 +2,14 @@ import { t as getMatrixScopedEnvVarNames } from "./env-vars-B0NxQnPk.js";
2
2
  import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/account-id";
3
3
  import { collectSecretInputAssignment, createChannelSecretTargetRegistryEntries, getChannelSurface, hasConfiguredSecretInputValue, hasOwnProperty, normalizeSecretStringValue } from "openclaw/plugin-sdk/channel-secret-basic-runtime";
4
4
  //#region extensions/matrix/src/secret-contract.ts
5
+ function accountSecretOwner(accountId) {
6
+ return {
7
+ ownerKind: "account",
8
+ ownerId: `matrix:${normalizeAccountId(accountId)}`,
9
+ requiredForGateway: false,
10
+ disposition: "isolate"
11
+ };
12
+ }
5
13
  const secretTargetRegistryEntries = createChannelSecretTargetRegistryEntries({
6
14
  channelKey: "matrix",
7
15
  account: ["accessToken", "password"],
@@ -13,7 +21,11 @@ function collectRuntimeConfigAssignments(params) {
13
21
  const { channel: matrix, surface } = resolved;
14
22
  const envAccessTokenConfigured = normalizeSecretStringValue(params.context.env.MATRIX_ACCESS_TOKEN).length > 0;
15
23
  const defaultScopedAccessTokenConfigured = normalizeSecretStringValue(params.context.env[getMatrixScopedEnvVarNames("default").accessToken]).length > 0;
16
- const defaultAccountAccessTokenConfigured = surface.accounts.some(({ accountId, account }) => normalizeAccountId(accountId) === DEFAULT_ACCOUNT_ID && hasConfiguredSecretInputValue(account.accessToken, params.defaults));
24
+ const defaultScopedPasswordConfigured = normalizeSecretStringValue(params.context.env[getMatrixScopedEnvVarNames("default").password]).length > 0;
25
+ const defaultAccount = surface.hasExplicitAccounts ? surface.accounts.find(({ accountId }) => normalizeAccountId(accountId) === DEFAULT_ACCOUNT_ID) : void 0;
26
+ const defaultAccountEnabled = surface.channelEnabled && (defaultAccount?.enabled ?? true);
27
+ const defaultAccountAccessTokenConfigured = hasConfiguredSecretInputValue(defaultAccount?.account.accessToken, params.defaults);
28
+ const defaultAccountPasswordConfigured = hasConfiguredSecretInputValue(defaultAccount?.account.password, params.defaults);
17
29
  const baseAccessTokenConfigured = hasConfiguredSecretInputValue(matrix.accessToken, params.defaults);
18
30
  collectSecretInputAssignment({
19
31
  value: matrix.accessToken,
@@ -21,8 +33,9 @@ function collectRuntimeConfigAssignments(params) {
21
33
  expected: "string",
22
34
  defaults: params.defaults,
23
35
  context: params.context,
24
- active: surface.channelEnabled,
25
- inactiveReason: "Matrix channel is disabled.",
36
+ active: defaultAccountEnabled && !defaultAccountAccessTokenConfigured && !defaultScopedAccessTokenConfigured,
37
+ inactiveReason: "Matrix channel or default account is disabled, or default-account access-token auth overrides the top-level accessToken.",
38
+ owner: accountSecretOwner(DEFAULT_ACCOUNT_ID),
26
39
  apply: (value) => {
27
40
  matrix.accessToken = value;
28
41
  }
@@ -33,8 +46,9 @@ function collectRuntimeConfigAssignments(params) {
33
46
  expected: "string",
34
47
  defaults: params.defaults,
35
48
  context: params.context,
36
- active: surface.channelEnabled && !(baseAccessTokenConfigured || envAccessTokenConfigured || defaultScopedAccessTokenConfigured || defaultAccountAccessTokenConfigured),
37
- inactiveReason: "Matrix channel is disabled or access-token auth is configured for the default Matrix account.",
49
+ active: defaultAccountEnabled && !(baseAccessTokenConfigured || envAccessTokenConfigured || defaultScopedAccessTokenConfigured || defaultAccountAccessTokenConfigured || defaultAccountPasswordConfigured || defaultScopedPasswordConfigured),
50
+ inactiveReason: "Matrix channel or default account is disabled, or higher-precedence default-account auth is configured.",
51
+ owner: accountSecretOwner(DEFAULT_ACCOUNT_ID),
38
52
  apply: (value) => {
39
53
  matrix.password = value;
40
54
  }
@@ -49,6 +63,7 @@ function collectRuntimeConfigAssignments(params) {
49
63
  context: params.context,
50
64
  active: enabled,
51
65
  inactiveReason: "Matrix account is disabled.",
66
+ owner: accountSecretOwner(accountId),
52
67
  apply: (value) => {
53
68
  account.accessToken = value;
54
69
  }
@@ -65,6 +80,7 @@ function collectRuntimeConfigAssignments(params) {
65
80
  context: params.context,
66
81
  active: enabled && !(accountAccessTokenConfigured || scopedEnvAccessTokenConfigured || inheritedDefaultAccountAccessTokenConfigured),
67
82
  inactiveReason: "Matrix account is disabled or this account has an accessToken configured.",
83
+ owner: accountSecretOwner(accountId),
68
84
  apply: (value) => {
69
85
  account.password = value;
70
86
  }
@@ -1,2 +1,2 @@
1
- import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries, t as channelSecrets } from "./secret-contract-OZoQf0kI.js";
1
+ import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries, t as channelSecrets } from "./secret-contract-M3hRmGO-.js";
2
2
  export { channelSecrets, collectRuntimeConfigAssignments, secretTargetRegistryEntries };
@@ -9,6 +9,7 @@ import { normalizeLowercaseStringOrEmpty, normalizeOptionalString, normalizeOpti
9
9
  import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime";
10
10
  import { loadOutboundMediaFromUrl } from "openclaw/plugin-sdk/outbound-media";
11
11
  import { normalizePollInput } from "openclaw/plugin-sdk/poll-runtime";
12
+ import { isVoiceMessageCompatibleAudio } from "openclaw/plugin-sdk/media-runtime";
12
13
  import MarkdownIt from "markdown-it";
13
14
  import { isAutoLinkedFileRef } from "openclaw/plugin-sdk/text-autolink-runtime";
14
15
  import { parseBuffer } from "music-metadata";
@@ -228,7 +229,7 @@ function buildPollResponseContent(pollEventId, answerIds) {
228
229
  }
229
230
  //#endregion
230
231
  //#region extensions/matrix/src/matrix/send/client.ts
231
- const loadMatrixSendClientRuntime = createLazyRuntimeModule(() => import("./client-bootstrap-CNVF73sF.js").then((n) => n.t));
232
+ const loadMatrixSendClientRuntime = createLazyRuntimeModule(() => import("./client-bootstrap-Dk5EAn3n.js").then((n) => n.t));
232
233
  function resolveMediaMaxBytes(accountId, cfg) {
233
234
  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.");
234
235
  const matrixCfg = resolveMatrixAccountConfig({
@@ -670,7 +671,7 @@ function resolveMatrixVoiceDecision(opts) {
670
671
  return { useVoice: false };
671
672
  }
672
673
  function isMatrixVoiceCompatibleAudio(opts) {
673
- return getCore$2().media.isVoiceCompatibleAudio({
674
+ return isVoiceMessageCompatibleAudio({
674
675
  contentType: opts.contentType,
675
676
  fileName: opts.fileName
676
677
  });
@@ -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-U5ZroBeZ.js";
3
+ import { t as createMatrixThreadBindingManager } from "./thread-bindings-Cw194yEn.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-CYQRY2oG.js";
2
+ import "./setup-core-XCdAx1nY.js";
3
3
  import { t as formatMatrixErrorMessage } from "./errors-C47hvAF8.js";
4
- import { n as bootstrapMatrixVerification } from "./verification-CGnI9k1O.js";
4
+ import { n as bootstrapMatrixVerification } from "./verification-DjxyWTNP.js";
5
5
  //#region extensions/matrix/src/setup-bootstrap.ts
6
6
  async function maybeBootstrapNewEncryptedMatrixAccount(params) {
7
7
  const accountConfig = resolveMatrixAccountConfig({
@@ -1,8 +1,8 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
2
- import { a as resolveMatrixDefaultOrOnlyAccountId, o as resolveMatrixAccountStringValues, r as resolveConfiguredMatrixAccountIds } from "./account-selection-Bz00QTmQ.js";
2
+ import { a as resolveMatrixDefaultOrOnlyAccountId, o as resolveMatrixAccountStringValues, r as resolveConfiguredMatrixAccountIds } from "./account-selection-kqquRzCf.js";
3
3
  import { a as resolveMatrixAccountConfig, o as resolveMatrixBaseConfig, t as findMatrixAccountConfig } from "./account-config-BZWN9tGS.js";
4
4
  import { i as resolveScopedMatrixEnvConfig, n as resolveGlobalMatrixEnvConfig, r as resolveMatrixEnvAuthReadiness } from "./env-auth-CQsYbz-p.js";
5
- import { i as loadMatrixCredentials, n as credentialsMatchConfig } from "./credentials-read-CwNJrmwu.js";
5
+ import { o as loadMatrixCredentials, r as credentialsMatchConfig } from "./credentials-read-DVmFCm7X.js";
6
6
  import { n as resolveMatrixConfigPath$1, r as shouldStoreMatrixAccountAtTopLevel, t as resolveMatrixConfigFieldPath } from "./config-paths-CnREYb1Y.js";
7
7
  import { normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
8
8
  import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/account-id";
@@ -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-DXVRCd4G.js");
672
+ const { runMatrixSetupBootstrapAfterConfigWrite } = await import("./setup-bootstrap-DGPOOdz-.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-CYQRY2oG.js";
2
- import { r as matrixConfigAdapter, t as MatrixChannelConfigSchema } from "./config-schema-BTSatSY3.js";
1
+ import { g as resolveMatrixAccount, n as matrixSetupAdapter, t as createMatrixSetupWizardProxy } from "./setup-core-XCdAx1nY.js";
2
+ import { r as matrixConfigAdapter, t as MatrixChannelConfigSchema } from "./config-schema-B5GRV8wL.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-BjvRQzK6.js").then((n) => n.t)).matrixSetupWizard })),
16
+ setupWizard: createMatrixSetupWizardProxy(async () => ({ matrixSetupWizard: (await import("./setup-surface-CzUiTe_k.js").then((n) => n.t)).matrixSetupWizard })),
17
17
  setup: matrixSetupAdapter,
18
18
  capabilities: {
19
19
  chatTypes: [
@@ -1,11 +1,11 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
2
- import { n as requiresExplicitMatrixDefaultAccount } from "./account-selection-Bz00QTmQ.js";
2
+ import { n as requiresExplicitMatrixDefaultAccount } from "./account-selection-kqquRzCf.js";
3
3
  import { a as resolveMatrixAccountConfig } from "./account-config-BZWN9tGS.js";
4
4
  import { r as resolveMatrixEnvAuthReadiness } from "./env-auth-CQsYbz-p.js";
5
- import { g as resolveMatrixAccount, h as resolveDefaultMatrixAccountId, i as moveSingleMatrixAccountConfigToNamedAccount, l as updateMatrixAccountConfig, p as listMatrixAccountIds, r as resolveMatrixSetupDmAllowFrom } from "./setup-core-CYQRY2oG.js";
5
+ import { g as resolveMatrixAccount, h as resolveDefaultMatrixAccountId, i as moveSingleMatrixAccountConfigToNamedAccount, l as updateMatrixAccountConfig, p as listMatrixAccountIds, r as resolveMatrixSetupDmAllowFrom } from "./setup-core-XCdAx1nY.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-DDbghaZH.js";
8
+ import { n as ensureMatrixSdkInstalled, r as isMatrixSdkAvailable } from "./deps-CcVJfvRM.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-Cx1VVArA.js").then((n) => n.n);
108
+ const { resolveMatrixTargets } = await import("./resolve-targets-DVoj-YxB.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-0TyS9xep.js").then((n) => n.t);
236
+ const { listMatrixDirectoryGroupsLive } = await import("./directory-live-DiC-0XBC.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-DXVRCd4G.js");
511
+ const { runMatrixSetupBootstrapAfterConfigWrite } = await import("./setup-bootstrap-DGPOOdz-.js");
512
512
  await runMatrixSetupBootstrapAfterConfigWrite({
513
513
  previousCfg,
514
514
  cfg,
@@ -1,11 +1,11 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
2
- import { a as resolveMatrixDefaultOrOnlyAccountId, n as requiresExplicitMatrixDefaultAccount, o as resolveMatrixAccountStringValues } from "./account-selection-Bz00QTmQ.js";
2
+ import { a as resolveMatrixDefaultOrOnlyAccountId, n as requiresExplicitMatrixDefaultAccount, o as resolveMatrixAccountStringValues } from "./account-selection-kqquRzCf.js";
3
3
  import { t as getMatrixScopedEnvVarNames } from "./env-vars-B0NxQnPk.js";
4
4
  import { o as resolveMatrixBaseConfig, r as listNormalizedMatrixAccountIds, t as findMatrixAccountConfig } from "./account-config-BZWN9tGS.js";
5
5
  import { i as resolveScopedMatrixEnvConfig, n as resolveGlobalMatrixEnvConfig } from "./env-auth-CQsYbz-p.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-DD-EnNJE.js";
8
+ import { s as repairCurrentTokenStorageMetaDeviceId } from "./storage-CzHxeF5E.js";
9
9
  import { n as LogService } from "./logger-D0GCSDQq.js";
10
10
  import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
11
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";
@@ -16,7 +16,7 @@ import { resolveOptionalIntegerOption } from "openclaw/plugin-sdk/number-runtime
16
16
  import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime";
17
17
  import { retryAsync } from "openclaw/plugin-sdk/retry-runtime";
18
18
  //#region extensions/matrix/src/matrix/client/config.ts
19
- const loadDefaultMatrixAuthClientDeps = createLazyRuntimeModule(() => Promise.all([import("./sdk-1TXuSiXZ.js"), import("./logging-QH-48Gr6.js")]).then(([sdkModule, loggingModule]) => ({
19
+ const loadDefaultMatrixAuthClientDeps = createLazyRuntimeModule(() => Promise.all([import("./sdk-CIDZXWpZ.js"), import("./logging-QH-48Gr6.js")]).then(([sdkModule, loggingModule]) => ({
20
20
  MatrixClient: sdkModule.MatrixClient,
21
21
  ensureMatrixSdkLoggingConfigured: loggingModule.ensureMatrixSdkLoggingConfigured
22
22
  })));
@@ -24,11 +24,11 @@ const MATRIX_AUTH_REQUEST_RETRY_RE = /\b(fetch failed|econnreset|econnrefused|en
24
24
  async function loadMatrixAuthClientDeps() {
25
25
  return await loadDefaultMatrixAuthClientDeps();
26
26
  }
27
- const loadMatrixCredentialsReadDeps = createLazyRuntimeModule(() => import("./credentials-read-CwNJrmwu.js").then((n) => n.r).then((credentialsReadModule) => ({
27
+ const loadMatrixCredentialsReadDeps = createLazyRuntimeModule(() => import("./credentials-read-DVmFCm7X.js").then((n) => n.i).then((credentialsReadModule) => ({
28
28
  loadMatrixCredentials: credentialsReadModule.loadMatrixCredentials,
29
29
  credentialsMatchConfig: credentialsReadModule.credentialsMatchConfig
30
30
  })));
31
- const loadMatrixCredentialsWriteRuntime = createLazyRuntimeModule(() => import("./credentials-write.runtime-BDtpqvj0.js"));
31
+ const loadMatrixCredentialsWriteRuntime = createLazyRuntimeModule(() => import("./credentials-write.runtime-Be9zNSUw.js"));
32
32
  const loadMatrixSecretInputDeps = createLazyRuntimeModule(() => import("./config-secret-input.runtime-CwsP3--c.js").then((runtime) => ({ resolveConfiguredSecretInputString: runtime.resolveConfiguredSecretInputString })));
33
33
  function shouldRetryMatrixAuthRequest(err) {
34
34
  return MATRIX_AUTH_REQUEST_RETRY_RE.test(formatErrorMessage(err));
@@ -492,7 +492,7 @@ var shared_exports = /* @__PURE__ */ __exportAll({
492
492
  stopSharedClientForAccount: () => stopSharedClientForAccount,
493
493
  stopSharedClientInstance: () => stopSharedClientInstance
494
494
  });
495
- const loadMatrixCreateClientDeps = createLazyRuntimeModule(() => import("./create-client-85ttAWDP.js").then((n) => n.n).then((runtime) => ({ createMatrixClient: runtime.createMatrixClient })));
495
+ const loadMatrixCreateClientDeps = createLazyRuntimeModule(() => import("./create-client-WQExaby_.js").then((n) => n.n).then((runtime) => ({ createMatrixClient: runtime.createMatrixClient })));
496
496
  const sharedClientStates = /* @__PURE__ */ new Map();
497
497
  const sharedClientPromises = /* @__PURE__ */ new Map();
498
498
  function serializeDispatcherPolicyKey(auth) {
@@ -1,8 +1,8 @@
1
1
  import { t as getMatrixRuntime } from "./runtime-6S3DNFNv.js";
2
2
  import { t as formatMatrixErrorMessage } from "./errors-C47hvAF8.js";
3
- import { M as resolveMatrixSqliteStateEnv, l as resolveMatrixStoragePaths, o as recordCurrentStorageMetaDeviceId } from "./storage-DD-EnNJE.js";
4
- import path from "node:path";
3
+ import { M as resolveMatrixSqliteStateEnv, l as resolveMatrixStoragePaths, o as recordCurrentStorageMetaDeviceId } from "./storage-CzHxeF5E.js";
5
4
  import { createHash } from "node:crypto";
5
+ import path from "node:path";
6
6
  import { timestampMsToIsoString } from "openclaw/plugin-sdk/number-runtime";
7
7
  import fs from "node:fs/promises";
8
8
  import { readJsonFileWithFallback } from "openclaw/plugin-sdk/json-store";
@@ -1,12 +1,12 @@
1
- import { t as isRecord } from "./record-shared-CvzjvHRn.js";
1
+ import { t as isRecord } from "./record-shared-CWWx6fvI.js";
2
2
  import { t as getMatrixRuntime } from "./runtime-6S3DNFNv.js";
3
- import { n as resolveMatrixAccountStorageRoot } from "./storage-paths-B4_I9iqO.js";
3
+ import { n as resolveMatrixAccountStorageRoot } from "./storage-paths-gUmSydsW.js";
4
4
  import { normalizeAccountId } from "openclaw/plugin-sdk/account-id";
5
- import fs from "node:fs";
6
- import os from "node:os";
7
- import path from "node:path";
8
5
  import { createHash, randomUUID } from "node:crypto";
6
+ import path from "node:path";
7
+ import fs from "node:fs";
9
8
  import { loadJsonFile } from "openclaw/plugin-sdk/json-store";
9
+ import os from "node:os";
10
10
  //#region extensions/matrix/src/matrix/sqlite-state.ts
11
11
  function resolveStateDirOverride(options) {
12
12
  if (!options) return;
@@ -526,7 +526,7 @@ function resolveMatrixStateFilePath(params) {
526
526
  }
527
527
  async function maybeMigrateLegacyStorage(params) {
528
528
  const hasAccountScopedLegacyStorageFile = fs.existsSync(params.storagePaths.storagePath);
529
- const syncCache = hasAccountScopedLegacyStorageFile ? await import("./file-sync-store-CUE9WwD2.js").then((n) => n.n) : null;
529
+ const syncCache = hasAccountScopedLegacyStorageFile ? await import("./file-sync-store-CPkgnSXp.js").then((n) => n.n) : null;
530
530
  const hasAccountScopedLegacyStorage = hasAccountScopedLegacyStorageFile && await syncCache?.readLegacyMatrixSyncCacheState(params.storagePaths.rootDir) !== null;
531
531
  const hasAccountScopedRecoveryKey = fs.existsSync(params.storagePaths.recoveryKeyPath);
532
532
  const hasAccountScopedIdbSnapshot = fs.existsSync(params.storagePaths.idbSnapshotPath);
@@ -587,7 +587,7 @@ async function migrateLegacyIdbSnapshotToSqlite(params) {
587
587
  });
588
588
  return;
589
589
  }
590
- const { readLegacyMatrixIdbSnapshotState } = await import("./idb-persistence-BiHEEzD7.js").then((n) => n.t);
590
+ const { readLegacyMatrixIdbSnapshotState } = await import("./idb-persistence-Dyy6ipgU.js").then((n) => n.t);
591
591
  const snapshot = await readLegacyMatrixIdbSnapshotState(params.storageRootDir);
592
592
  if (!snapshot) return;
593
593
  writeMatrixIdbSnapshotJson({
@@ -606,7 +606,7 @@ async function migrateLegacyIdbSnapshotToSqlite(params) {
606
606
  });
607
607
  }
608
608
  async function migrateLegacySyncCacheToSqlite(params) {
609
- const syncCache = await import("./file-sync-store-CUE9WwD2.js").then((n) => n.n);
609
+ const syncCache = await import("./file-sync-store-CPkgnSXp.js").then((n) => n.n);
610
610
  const persisted = await syncCache.readLegacyMatrixSyncCacheState(params.sourceRootDir);
611
611
  if (!persisted) return;
612
612
  const store = getMatrixRuntime().state.openKeyedStore(syncCache.openMatrixSyncCacheStoreOptions(params.targetRootDir));
@@ -1,10 +1,10 @@
1
1
  import { t as getMatrixRuntime } from "./runtime-6S3DNFNv.js";
2
2
  import { a as listBindingsForAccount, c as resolveBindingKey, f as setMatrixThreadBindingManagerEntry, h as toSessionBindingRecord, l as resolveEffectiveBindingExpiry, m as toMatrixBindingTargetKind, o as removeBindingRecord, r as getMatrixThreadBindingManagerEntry, t as deleteMatrixThreadBindingManagerEntry, u as setBindingRecord } from "./thread-bindings-shared-CKnY4LSd.js";
3
- import { M as resolveMatrixSqliteStateEnv, N as resolveMatrixSqliteStateKey, c as resolveMatrixStateFilePath, t as claimCurrentTokenStorageState } from "./storage-DD-EnNJE.js";
4
- import { a as sendMessageMatrix } from "./send-yre1krm8.js";
3
+ import { M as resolveMatrixSqliteStateEnv, N as resolveMatrixSqliteStateKey, c as resolveMatrixStateFilePath, t as claimCurrentTokenStorageState } from "./storage-CzHxeF5E.js";
4
+ import { a as sendMessageMatrix } from "./send-BJbrdmNm.js";
5
5
  import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
6
- import path from "node:path";
7
6
  import { createHash } from "node:crypto";
7
+ import path from "node:path";
8
8
  import { registerSessionBindingAdapter, resolveThreadBindingFarewellText, unregisterSessionBindingAdapter } from "openclaw/plugin-sdk/thread-bindings-session-runtime";
9
9
  import fs from "node:fs/promises";
10
10
  import { readJsonFileWithFallback } from "openclaw/plugin-sdk/json-store";
@@ -1,14 +1,14 @@
1
1
  import { a as resolveMatrixAccountConfig, o as resolveMatrixBaseConfig } from "./account-config-BZWN9tGS.js";
2
- import { g as resolveMatrixAccount } from "./setup-core-CYQRY2oG.js";
3
- import { r as resolveMatrixRoomConfig } from "./channel-B1woOUgk.js";
2
+ import { g as resolveMatrixAccount } from "./setup-core-XCdAx1nY.js";
3
+ import { r as resolveMatrixRoomConfig } from "./channel-j331Xd7b.js";
4
4
  import { r as normalizeMatrixResolvableTarget } from "./target-ids-B-5aQxwn.js";
5
- import { E as parsePollStart, T as isPollStartType, _ as readJoinedMatrixMembers, b as buildPollResponseContent, g as isStrictDirectMembership, h as hasDirectMatrixMemberFlag, i as reactMatrixMessage, u as resolveMatrixRoomId } from "./send-yre1krm8.js";
5
+ import { E as parsePollStart, T as isPollStartType, _ as readJoinedMatrixMembers, b as buildPollResponseContent, g as isStrictDirectMembership, h as hasDirectMatrixMemberFlag, i as reactMatrixMessage, u as resolveMatrixRoomId } from "./send-BJbrdmNm.js";
6
6
  import { i as buildMatrixReactionRelationsPath, o as selectOwnMatrixReactionEventIds, s as summarizeMatrixReactionEvents } from "./reaction-common-DkrQdBSZ.js";
7
- import { n as withResolvedActionClient, r as withResolvedRoomAction } from "./client-BUai6s29.js";
8
- import { a as fetchEventSummary, c as resolveMatrixActionLimit, i as sendMatrixMessage, n as editMatrixMessage, o as readPinnedEvents, r as readMatrixMessages, s as EventType, t as deleteMatrixMessage } from "./messages-DCRbGLMh.js";
7
+ import { n as withResolvedActionClient, r as withResolvedRoomAction } from "./client-BtG4quUl.js";
8
+ import { a as fetchEventSummary, c as resolveMatrixActionLimit, i as sendMatrixMessage, n as editMatrixMessage, o as readPinnedEvents, r as readMatrixMessages, s as EventType, t as deleteMatrixMessage } from "./messages-3UBHfZrN.js";
9
9
  import { c as readReactionParams, d as resolveAllowlistProviderRuntimeGroupPolicy, f as resolveDefaultGroupPolicy, i as createActionGate, l as readStringArrayParam, n as ToolAuthorizationError, o as jsonResult, s as readPositiveIntegerParam, u as readStringParam } from "./runtime-api-D1xI_cvh.js";
10
- import { t as applyMatrixProfileUpdate } from "./profile-update-DompcDyu.js";
11
- import { _ as scanMatrixVerificationQr, a as confirmMatrixVerificationSas, b as verifyMatrixRecoveryKey, c as getMatrixRoomKeyBackupStatus, d as listMatrixVerifications, f as mismatchMatrixVerificationSas, h as restoreMatrixRoomKeyBackup, i as confirmMatrixVerificationReciprocateQr, l as getMatrixVerificationSas, n as bootstrapMatrixVerification, o as generateMatrixVerificationQr, p as requestMatrixVerification, r as cancelMatrixVerification, s as getMatrixEncryptionStatus, t as acceptMatrixVerification, u as getMatrixVerificationStatus, v as startMatrixVerification } from "./verification-CGnI9k1O.js";
10
+ import { t as applyMatrixProfileUpdate } from "./profile-update-Bh2XtJwN.js";
11
+ import { _ as scanMatrixVerificationQr, a as confirmMatrixVerificationSas, b as verifyMatrixRecoveryKey, c as getMatrixRoomKeyBackupStatus, d as listMatrixVerifications, f as mismatchMatrixVerificationSas, h as restoreMatrixRoomKeyBackup, i as confirmMatrixVerificationReciprocateQr, l as getMatrixVerificationSas, n as bootstrapMatrixVerification, o as generateMatrixVerificationQr, p as requestMatrixVerification, r as cancelMatrixVerification, s as getMatrixEncryptionStatus, t as acceptMatrixVerification, u as getMatrixVerificationStatus, v as startMatrixVerification } from "./verification-DjxyWTNP.js";
12
12
  import { t as createMatrixRoomInfoResolver } from "./room-info-B6vKD5DF.js";
13
13
  import { normalizeOptionalLowercaseString, uniqueStrings, uniqueValues } from "openclaw/plugin-sdk/string-coerce-runtime";
14
14
  import { normalizeAccountId } from "openclaw/plugin-sdk/account-id";
@@ -1,6 +1,6 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
2
- import { i as withStartedActionClient, n as withResolvedActionClient } from "./client-BUai6s29.js";
3
- import { n as formatMatrixEncryptionUnavailableError } from "./encryption-guidance-BFfgq7c7.js";
2
+ import { i as withStartedActionClient, n as withResolvedActionClient } from "./client-BtG4quUl.js";
3
+ import { n as formatMatrixEncryptionUnavailableError } from "./encryption-guidance-CbEFe38F.js";
4
4
  import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
5
5
  import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime";
6
6
  import { setTimeout } from "node:timers/promises";
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@openclaw/matrix",
3
- "version": "2026.7.2-beta.2",
3
+ "version": "2026.7.2-beta.3",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@openclaw/matrix",
9
- "version": "2026.7.2-beta.2",
9
+ "version": "2026.7.2-beta.3",
10
10
  "dependencies": {
11
11
  "@matrix-org/matrix-sdk-crypto-nodejs": "0.6.1",
12
12
  "@matrix-org/matrix-sdk-crypto-wasm": "18.3.1",
@@ -18,7 +18,7 @@
18
18
  "zod": "4.4.3"
19
19
  },
20
20
  "peerDependencies": {
21
- "openclaw": ">=2026.7.2-beta.2"
21
+ "openclaw": ">=2026.7.2-beta.3"
22
22
  },
23
23
  "peerDependenciesMeta": {
24
24
  "openclaw": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/matrix",
3
- "version": "2026.7.2-beta.2",
3
+ "version": "2026.7.2-beta.3",
4
4
  "description": "OpenClaw Matrix channel plugin for rooms and direct messages.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -18,7 +18,7 @@
18
18
  "zod": "4.4.3"
19
19
  },
20
20
  "peerDependencies": {
21
- "openclaw": ">=2026.7.2-beta.2"
21
+ "openclaw": ">=2026.7.2-beta.3"
22
22
  },
23
23
  "peerDependenciesMeta": {
24
24
  "openclaw": {
@@ -84,10 +84,10 @@
84
84
  "allowInvalidConfigRecovery": true
85
85
  },
86
86
  "compat": {
87
- "pluginApi": ">=2026.7.2-beta.2"
87
+ "pluginApi": ">=2026.7.2-beta.3"
88
88
  },
89
89
  "build": {
90
- "openclawVersion": "2026.7.2-beta.2"
90
+ "openclawVersion": "2026.7.2-beta.3"
91
91
  },
92
92
  "release": {
93
93
  "publishToClawHub": true,
@@ -1,19 +0,0 @@
1
- //#region extensions/matrix/src/matrix/async-lock.ts
2
- function createAsyncLock() {
3
- let lock = Promise.resolve();
4
- return async function withLock(fn) {
5
- const previous = lock;
6
- let release;
7
- lock = new Promise((resolve) => {
8
- release = resolve;
9
- });
10
- await previous;
11
- try {
12
- return await fn();
13
- } finally {
14
- release?.();
15
- }
16
- };
17
- }
18
- //#endregion
19
- export { createAsyncLock as t };
@@ -1,56 +0,0 @@
1
- import { a as resolveMatrixCredentialsDir, i as loadMatrixCredentials, n as credentialsMatchConfig, o as resolveMatrixCredentialsPath, t as clearMatrixCredentials } from "./credentials-read-CwNJrmwu.js";
2
- import { t as createAsyncLock } from "./async-lock-BcLS4KOc.js";
3
- import { writeJsonFileAtomically } from "openclaw/plugin-sdk/json-store";
4
- //#region extensions/matrix/src/matrix/credentials.ts
5
- const credentialWriteLocks = /* @__PURE__ */ new Map();
6
- function withCredentialWriteLock(credPath, fn) {
7
- let withLock = credentialWriteLocks.get(credPath);
8
- if (!withLock) {
9
- withLock = createAsyncLock();
10
- credentialWriteLocks.set(credPath, withLock);
11
- }
12
- return withLock(fn);
13
- }
14
- async function writeMatrixCredentialsUnlocked(params) {
15
- const now = (/* @__PURE__ */ new Date()).toISOString();
16
- const toSave = {
17
- ...params.credentials,
18
- createdAt: params.existing?.createdAt ?? now,
19
- lastUsedAt: now
20
- };
21
- await writeJsonFileAtomically(params.credPath, toSave);
22
- }
23
- async function saveMatrixCredentials(credentials, env = process.env, accountId) {
24
- const credPath = resolveMatrixCredentialsPath(env, accountId);
25
- await withCredentialWriteLock(credPath, async () => {
26
- await writeMatrixCredentialsUnlocked({
27
- credPath,
28
- credentials,
29
- existing: loadMatrixCredentials(env, accountId)
30
- });
31
- });
32
- }
33
- async function saveBackfilledMatrixDeviceId(credentials, env = process.env, accountId) {
34
- const credPath = resolveMatrixCredentialsPath(env, accountId);
35
- return await withCredentialWriteLock(credPath, async () => {
36
- const existing = loadMatrixCredentials(env, accountId);
37
- if (existing && (existing.homeserver !== credentials.homeserver || existing.userId !== credentials.userId || existing.accessToken !== credentials.accessToken)) return "skipped";
38
- await writeMatrixCredentialsUnlocked({
39
- credPath,
40
- credentials,
41
- existing
42
- });
43
- return "saved";
44
- });
45
- }
46
- async function touchMatrixCredentials(env = process.env, accountId) {
47
- const credPath = resolveMatrixCredentialsPath(env, accountId);
48
- await withCredentialWriteLock(credPath, async () => {
49
- const existing = loadMatrixCredentials(env, accountId);
50
- if (!existing) return;
51
- existing.lastUsedAt = (/* @__PURE__ */ new Date()).toISOString();
52
- await writeJsonFileAtomically(credPath, existing);
53
- });
54
- }
55
- //#endregion
56
- export { clearMatrixCredentials, credentialsMatchConfig, loadMatrixCredentials, resolveMatrixCredentialsDir, resolveMatrixCredentialsPath, saveBackfilledMatrixDeviceId, saveMatrixCredentials, touchMatrixCredentials };