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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/dist/api.js +7 -7
  2. package/dist/{approval-handler.runtime-Cso-m9Q7.js → approval-handler.runtime-nfyxbtVZ.js} +5 -5
  3. package/dist/{approval-ids-IrHynnHK.js → approval-ids-vw7teE3M.js} +1 -1
  4. package/dist/{approval-reaction-auth-D0nZ_4ik.js → approval-reaction-auth-kAazIsvu.js} +2 -2
  5. package/dist/auth-presence.js +1 -1
  6. package/dist/{channel-D7FK_lEY.js → channel-DwJf74NH.js} +23 -18
  7. package/dist/channel-plugin-api.js +1 -1
  8. package/dist/{channel.runtime-CBrW2dLp.js → channel.runtime-6ITv13UJ.js} +8 -8
  9. package/dist/{cli-C1xFg7Q-.js → cli-BXd9cN_x.js} +14 -13
  10. package/dist/{cli-metadata-zz9Cmwcs.js → cli-metadata-CkMUnkMl.js} +1 -1
  11. package/dist/cli-metadata.js +1 -1
  12. package/dist/{client-BIBY50VG.js → client-CpSI5BON.js} +2 -2
  13. package/dist/{client-bootstrap-Chmkqhy7.js → client-bootstrap-DOlQb7Jx.js} +1 -1
  14. package/dist/{client-BMoZSA2L.js → client-spaouc7I.js} +2 -2
  15. package/dist/{config-schema-wK02TzmZ.js → config-schema-Bx-Pb1Kw.js} +3 -3
  16. package/dist/contract-api.js +4 -4
  17. package/dist/{create-client-B1a3Am-I.js → create-client-B4CPKa5P.js} +3 -3
  18. package/dist/{credentials-CDjQjIds.js → credentials-Bi0pTJDK.js} +1 -1
  19. package/dist/{credentials-read-DySnJlLx.js → credentials-read-DpxFOhx0.js} +2 -2
  20. package/dist/{credentials-write.runtime-Ca2MN99y.js → credentials-write.runtime-BB5QuM4Z.js} +1 -1
  21. package/dist/{crypto-runtime-oweQ3RiB.js → crypto-runtime-3hgwY-d6.js} +7 -6
  22. package/dist/{directory-live-M-3KeudM.js → directory-live-DgjzYeC_.js} +2 -2
  23. package/dist/{doctor-CENc9ks0.js → doctor-D3wfD2UP.js} +17 -3
  24. package/dist/{draft-stream-r49dgIZc.js → draft-stream-DQN43iqS.js} +1 -1
  25. package/dist/{encryption-guidance-CU-OAPMg.js → encryption-guidance-aEUzD940.js} +1 -1
  26. package/dist/helper-api.js +2 -2
  27. package/dist/index.js +2 -2
  28. package/dist/{legacy-crypto-restore-BgW3I87R.js → legacy-crypto-restore--9Wu5rsx.js} +1 -1
  29. package/dist/{logging-yEwXx4Hm.js → logging-C7wjdKK5.js} +1 -1
  30. package/dist/{matrix-migration.runtime-CZOep_JX.js → matrix-migration.runtime-RzIEp7RP.js} +3 -3
  31. package/dist/{media-text-C4IBQI5B.js → media-text-C8b9cJiE.js} +1 -1
  32. package/dist/{messages-CMx2qIs1.js → messages-DyU_49Ws.js} +3 -3
  33. package/dist/{monitor-COOR-Ksj.js → monitor-C-w1IkPI.js} +133 -104
  34. package/dist/plugin-entry.handlers.runtime.js +1 -1
  35. package/dist/probe.runtime-BegszwhP.js +3 -0
  36. package/dist/{profile-update-Cl7wAFCq.js → profile-update-DON3UoVK.js} +2 -2
  37. package/dist/{reaction-events-D3jtYqTp.js → reaction-events-Cf-zAwa6.js} +1 -1
  38. package/dist/{recovery-key-store-DfQ_9s6u.js → recovery-key-store-BRnvY8XS.js} +1 -1
  39. package/dist/{resolve-targets-D-K3tTPe.js → resolve-targets-CLuzv_Jl.js} +1 -1
  40. package/dist/{resolver.runtime-BRG9o8iL.js → resolver.runtime-VywXDAZv.js} +1 -1
  41. package/dist/runtime-api.js +3 -3
  42. package/dist/runtime-heavy-api.js +1 -1
  43. package/dist/{sdk-ymjYByhr.js → sdk-C2iC7PJZ.js} +6 -6
  44. package/dist/{send-peVVVL75.js → send-CAmsWgZ2.js} +3 -3
  45. package/dist/{setup-bootstrap-CiX7Pd07.js → setup-bootstrap-5ki8dOiM.js} +2 -2
  46. package/dist/{setup-core-DOhHYRrZ.js → setup-core-X-qaIzVT.js} +4 -4
  47. package/dist/setup-plugin-api.js +3 -3
  48. package/dist/{setup-surface-CrUp7oeN.js → setup-surface-D6gS45Pz.js} +6 -6
  49. package/dist/{shared-CmsjJY4i.js → shared-DjJds8e0.js} +6 -6
  50. package/dist/startup-verification-DdSXlCLn.js +233 -0
  51. package/dist/{storage-onzulLbU.js → storage-Ds-2Iur5.js} +18 -6
  52. package/dist/subagent-hooks-api.js +18 -2
  53. package/dist/{subagent-hooks-api-bedE4GYl.js → subagent-hooks-dkPAF6Et.js} +3 -30
  54. package/dist/{thread-bindings-DAg6grT8.js → thread-bindings-yt8HTZo0.js} +141 -39
  55. package/dist/{tool-actions.runtime-DwbLBrRr.js → tool-actions.runtime-DOh3pfFu.js} +7 -7
  56. package/dist/{verification-BM7g0BeT.js → verification-BkvujZrn.js} +2 -2
  57. package/npm-shrinkwrap.json +3 -3
  58. package/package.json +4 -4
  59. package/dist/probe.runtime-DgSABMiF.js +0 -3
  60. package/dist/startup-verification-BmTEngvU.js +0 -132
  61. package/dist/{account-selection-C3arLOhC.js → account-selection-DEMtY2cn.js} +1 -1
  62. package/dist/{runtime-api-CsF7Kokd.js → runtime-api-CsBoesCU.js} +2 -2
  63. package/dist/{storage-paths-BV2Z7bns.js → storage-paths-BWo_ZEMC.js} +1 -1
@@ -1,12 +1,12 @@
1
1
  import { c as resolveMatrixAccountConfig } from "./config-paths-ZBCMwSos.js";
2
- import "./setup-core-DOhHYRrZ.js";
3
- import { E as parsePollStart, T as isPollStartType, b as buildPollResponseContent, i as reactMatrixMessage, u as resolveMatrixRoomId } from "./send-peVVVL75.js";
2
+ import "./setup-core-X-qaIzVT.js";
3
+ import { E as parsePollStart, T as isPollStartType, b as buildPollResponseContent, i as reactMatrixMessage, u as resolveMatrixRoomId } from "./send-CAmsWgZ2.js";
4
4
  import { i as buildMatrixReactionRelationsPath, o as selectOwnMatrixReactionEventIds, s as summarizeMatrixReactionEvents } from "./reaction-common-DkrQdBSZ.js";
5
- import { n as withResolvedActionClient, r as withResolvedRoomAction } from "./client-BIBY50VG.js";
6
- 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-CMx2qIs1.js";
7
- import { a as jsonResult, c as readStringArrayParam, l as readStringParam, o as readPositiveIntegerParam, r as createActionGate, s as readReactionParams } from "./runtime-api-CsF7Kokd.js";
8
- import { t as applyMatrixProfileUpdate } from "./profile-update-Cl7wAFCq.js";
9
- 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-BM7g0BeT.js";
5
+ import { n as withResolvedActionClient, r as withResolvedRoomAction } from "./client-CpSI5BON.js";
6
+ 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-DyU_49Ws.js";
7
+ import { a as jsonResult, c as readStringArrayParam, l as readStringParam, o as readPositiveIntegerParam, r as createActionGate, s as readReactionParams } from "./runtime-api-CsBoesCU.js";
8
+ import { t as applyMatrixProfileUpdate } from "./profile-update-DON3UoVK.js";
9
+ 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-BkvujZrn.js";
10
10
  import { normalizeOptionalLowercaseString, uniqueStrings, uniqueValues } from "openclaw/plugin-sdk/string-coerce-runtime";
11
11
  //#region extensions/matrix/src/matrix/actions/polls.ts
12
12
  function normalizeOptionIndexes(indexes) {
@@ -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-BIBY50VG.js";
3
- import { n as formatMatrixEncryptionUnavailableError } from "./encryption-guidance-CU-OAPMg.js";
2
+ import { i as withStartedActionClient, n as withResolvedActionClient } from "./client-CpSI5BON.js";
3
+ import { n as formatMatrixEncryptionUnavailableError } from "./encryption-guidance-aEUzD940.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.5.28-beta.4",
3
+ "version": "2026.5.30-beta.1",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@openclaw/matrix",
9
- "version": "2026.5.28-beta.4",
9
+ "version": "2026.5.30-beta.1",
10
10
  "dependencies": {
11
11
  "@matrix-org/matrix-sdk-crypto-nodejs": "0.4.0",
12
12
  "@matrix-org/matrix-sdk-crypto-wasm": "18.3.0",
@@ -18,7 +18,7 @@
18
18
  "zod": "4.4.3"
19
19
  },
20
20
  "peerDependencies": {
21
- "openclaw": ">=2026.5.28-beta.4"
21
+ "openclaw": ">=2026.5.30-beta.1"
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.5.28-beta.4",
3
+ "version": "2026.5.30-beta.1",
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.5.28-beta.4"
21
+ "openclaw": ">=2026.5.30-beta.1"
22
22
  },
23
23
  "peerDependenciesMeta": {
24
24
  "openclaw": {
@@ -84,10 +84,10 @@
84
84
  "allowInvalidConfigRecovery": true
85
85
  },
86
86
  "compat": {
87
- "pluginApi": ">=2026.5.28-beta.4"
87
+ "pluginApi": ">=2026.5.30-beta.1"
88
88
  },
89
89
  "build": {
90
- "openclawVersion": "2026.5.28-beta.4"
90
+ "openclawVersion": "2026.5.30-beta.1"
91
91
  },
92
92
  "release": {
93
93
  "publishToClawHub": true,
@@ -1,3 +0,0 @@
1
- import { t as createMatrixClient } from "./create-client-B1a3Am-I.js";
2
- import "./client-BMoZSA2L.js";
3
- export { createMatrixClient };
@@ -1,132 +0,0 @@
1
- import { t as formatMatrixErrorMessage } from "./errors-C47hvAF8.js";
2
- import { a as resolveMatrixStoragePaths } from "./storage-onzulLbU.js";
3
- import path from "node:path";
4
- import { readJsonFileWithFallback, writeJsonFileAtomically } from "openclaw/plugin-sdk/json-store";
5
- import fs from "node:fs/promises";
6
- //#region extensions/matrix/src/matrix/monitor/startup-verification.ts
7
- const STARTUP_VERIFICATION_STATE_FILENAME = "startup-verification.json";
8
- const DEFAULT_STARTUP_VERIFICATION_MODE = "if-unverified";
9
- const DEFAULT_STARTUP_VERIFICATION_COOLDOWN_HOURS = 24;
10
- const DEFAULT_STARTUP_VERIFICATION_FAILURE_COOLDOWN_MS = 3600 * 1e3;
11
- function normalizeCooldownHours(value) {
12
- if (typeof value !== "number" || !Number.isFinite(value)) return DEFAULT_STARTUP_VERIFICATION_COOLDOWN_HOURS;
13
- return Math.max(0, value);
14
- }
15
- function resolveStartupVerificationStatePath(params) {
16
- const storagePaths = resolveMatrixStoragePaths({
17
- homeserver: params.auth.homeserver,
18
- userId: params.auth.userId,
19
- accessToken: params.auth.accessToken,
20
- accountId: params.auth.accountId,
21
- deviceId: params.auth.deviceId,
22
- env: params.env
23
- });
24
- return path.join(storagePaths.rootDir, STARTUP_VERIFICATION_STATE_FILENAME);
25
- }
26
- async function readStartupVerificationState(filePath) {
27
- const { value } = await readJsonFileWithFallback(filePath, null);
28
- return value && typeof value === "object" ? value : null;
29
- }
30
- async function clearStartupVerificationState(filePath) {
31
- await fs.rm(filePath, { force: true }).catch(() => {});
32
- }
33
- function resolveStateCooldownMs(state, cooldownMs) {
34
- if (state?.outcome === "failed") return Math.min(cooldownMs, DEFAULT_STARTUP_VERIFICATION_FAILURE_COOLDOWN_MS);
35
- return cooldownMs;
36
- }
37
- function resolveRetryAfterMs(params) {
38
- const attemptedAtMs = Date.parse(params.attemptedAt ?? "");
39
- if (!Number.isFinite(attemptedAtMs)) return;
40
- const remaining = attemptedAtMs + params.cooldownMs - params.nowMs;
41
- return remaining > 0 ? remaining : void 0;
42
- }
43
- function shouldHonorCooldown(params) {
44
- if (!params.state || params.stateCooldownMs <= 0) return false;
45
- if (params.state.userId && params.verification.userId && params.state.userId !== params.verification.userId) return false;
46
- if (params.state.deviceId && params.verification.deviceId && params.state.deviceId !== params.verification.deviceId) return false;
47
- return resolveRetryAfterMs({
48
- attemptedAt: params.state.attemptedAt,
49
- cooldownMs: params.stateCooldownMs,
50
- nowMs: params.nowMs
51
- }) !== void 0;
52
- }
53
- function hasPendingSelfVerification(verifications) {
54
- return verifications.some((entry) => entry.isSelfVerification && !entry.completed && entry.pending);
55
- }
56
- async function ensureMatrixStartupVerification(params) {
57
- if (params.auth.encryption !== true || !params.client.crypto) return { kind: "unsupported" };
58
- const verification = await params.client.getOwnDeviceVerificationStatus();
59
- const statePath = params.stateFilePath ?? resolveStartupVerificationStatePath({
60
- auth: params.auth,
61
- env: params.env
62
- });
63
- if (verification.verified) {
64
- await clearStartupVerificationState(statePath);
65
- return {
66
- kind: "verified",
67
- verification
68
- };
69
- }
70
- if ((params.accountConfig.startupVerification ?? DEFAULT_STARTUP_VERIFICATION_MODE) === "off") {
71
- await clearStartupVerificationState(statePath);
72
- return {
73
- kind: "disabled",
74
- verification
75
- };
76
- }
77
- if (hasPendingSelfVerification(await params.client.crypto.listVerifications().catch(() => []))) return {
78
- kind: "pending",
79
- verification
80
- };
81
- const cooldownMs = normalizeCooldownHours(params.accountConfig.startupVerificationCooldownHours) * 60 * 60 * 1e3;
82
- const nowMs = params.nowMs ?? Date.now();
83
- const state = await readStartupVerificationState(statePath);
84
- const stateCooldownMs = resolveStateCooldownMs(state, cooldownMs);
85
- if (shouldHonorCooldown({
86
- state,
87
- verification,
88
- stateCooldownMs,
89
- nowMs
90
- })) return {
91
- kind: "cooldown",
92
- verification,
93
- retryAfterMs: resolveRetryAfterMs({
94
- attemptedAt: state?.attemptedAt,
95
- cooldownMs: stateCooldownMs,
96
- nowMs
97
- })
98
- };
99
- try {
100
- const request = await params.client.crypto.requestVerification({ ownUser: true });
101
- await writeJsonFileAtomically(statePath, {
102
- userId: verification.userId,
103
- deviceId: verification.deviceId,
104
- attemptedAt: new Date(nowMs).toISOString(),
105
- outcome: "requested",
106
- requestId: request.id,
107
- transactionId: request.transactionId
108
- });
109
- return {
110
- kind: "requested",
111
- verification,
112
- requestId: request.id,
113
- transactionId: request.transactionId ?? void 0
114
- };
115
- } catch (err) {
116
- const error = formatMatrixErrorMessage(err);
117
- await writeJsonFileAtomically(statePath, {
118
- userId: verification.userId,
119
- deviceId: verification.deviceId,
120
- attemptedAt: new Date(nowMs).toISOString(),
121
- outcome: "failed",
122
- error
123
- }).catch(() => {});
124
- return {
125
- kind: "request-failed",
126
- verification,
127
- error
128
- };
129
- }
130
- }
131
- //#endregion
132
- export { ensureMatrixStartupVerification };
@@ -1,8 +1,8 @@
1
1
  import { n as listMatrixEnvAccountIds, t as getMatrixScopedEnvVarNames } from "./env-vars-KzaYveuy.js";
2
2
  import { t as isRecord } from "./record-shared-CvzjvHRn.js";
3
- import { DEFAULT_ACCOUNT_ID, normalizeAccountId, normalizeOptionalAccountId } from "openclaw/plugin-sdk/account-id";
4
3
  import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
5
4
  import { listCombinedAccountIds, listConfiguredAccountIds, resolveListedDefaultAccountId, resolveNormalizedAccountEntry } from "openclaw/plugin-sdk/account-core";
5
+ import { DEFAULT_ACCOUNT_ID, normalizeAccountId, normalizeOptionalAccountId } from "openclaw/plugin-sdk/account-id";
6
6
  import { hasConfiguredSecretInput } from "openclaw/plugin-sdk/secret-input-runtime";
7
7
  //#region extensions/matrix/src/auth-precedence.ts
8
8
  const MATRIX_DEFAULT_ACCOUNT_AUTH_ONLY_FIELDS = new Set([
@@ -1,9 +1,9 @@
1
1
  import "./timeout-abort-signal-DMrgRFIy.js";
2
- import "openclaw/plugin-sdk/account-id";
3
- import { resolveThreadBindingIdleTimeoutMsForChannel, resolveThreadBindingMaxAgeMsForChannel } from "openclaw/plugin-sdk/conversation-runtime";
4
2
  import { resolveOutboundSendDep } from "openclaw/plugin-sdk/channel-outbound";
3
+ import { resolveThreadBindingIdleTimeoutMsForChannel, resolveThreadBindingMaxAgeMsForChannel } from "openclaw/plugin-sdk/conversation-runtime";
5
4
  import { chunkTextForOutbound as chunkTextForOutbound$1 } from "openclaw/plugin-sdk/text-chunking";
6
5
  import { createActionGate as createActionGate$1, jsonResult, readPositiveIntegerParam as readPositiveIntegerParam$1, readReactionParams, readStringArrayParam, readStringParam as readStringParam$1 } from "openclaw/plugin-sdk/channel-actions";
6
+ import "openclaw/plugin-sdk/account-id";
7
7
  import "openclaw/plugin-sdk/routing";
8
8
  import "openclaw/plugin-sdk/channel-status";
9
9
  import "openclaw/plugin-sdk/channel-config-primitives";
@@ -1,5 +1,5 @@
1
- import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/account-id";
2
1
  import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
2
+ import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/account-id";
3
3
  import path from "node:path";
4
4
  import crypto from "node:crypto";
5
5
  //#region extensions/matrix/src/storage-paths.ts