@openclaw/matrix 2026.5.31-beta.1 → 2026.5.31-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.
- package/README.md +11 -0
- package/dist/api.js +1 -1
- package/dist/{approval-handler.runtime-Dzh_2MS1.js → approval-handler.runtime-SX-BFhX_.js} +1 -1
- package/dist/{channel-BwpVY2Ne.js → channel--XqVgFZK.js} +4 -4
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{monitor-gDaABWfA.js → monitor-BMksz3hx.js} +26 -26
- package/npm-shrinkwrap.json +3 -3
- package/package.json +6 -5
package/README.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# OpenClaw Matrix
|
|
2
|
+
|
|
3
|
+
Official OpenClaw channel plugin for Matrix rooms and direct messages.
|
|
4
|
+
|
|
5
|
+
Install from OpenClaw:
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
openclaw plugin add @openclaw/matrix
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Configure the Matrix homeserver and bot credentials in OpenClaw. The plugin lets agents join configured rooms, receive messages, and reply through Matrix.
|
package/dist/api.js
CHANGED
|
@@ -2,7 +2,7 @@ import { a as resolveMatrixDefaultOrOnlyAccountId, i as resolveMatrixChannelConf
|
|
|
2
2
|
import { n as listMatrixEnvAccountIds, r as resolveMatrixEnvAccountToken, t as getMatrixScopedEnvVarNames } from "./env-vars-KzaYveuy.js";
|
|
3
3
|
import { a as resolveMatrixCredentialsPath, c as resolveMatrixLegacyFlatStoreRoot, i as resolveMatrixCredentialsFilename, l as sanitizeMatrixPathSegment, n as resolveMatrixAccountStorageRoot, o as resolveMatrixHomeserverKey, r as resolveMatrixCredentialsDir, s as resolveMatrixLegacyFlatStoragePaths, t as hashMatrixAccessToken } from "./storage-paths-BWo_ZEMC.js";
|
|
4
4
|
import { n as matrixSetupAdapter, t as createMatrixSetupWizardProxy } from "./setup-core-DRg3cgB8.js";
|
|
5
|
-
import { t as matrixPlugin } from "./channel
|
|
5
|
+
import { t as matrixPlugin } from "./channel--XqVgFZK.js";
|
|
6
6
|
import { d as setMatrixThreadBindingIdleTimeoutBySessionKey, n as getMatrixThreadBindingManager, p as setMatrixThreadBindingMaxAgeBySessionKey, s as resetMatrixThreadBindingsForTests } from "./thread-bindings-shared-CKnY4LSd.js";
|
|
7
7
|
import { n as matrixOnboardingAdapter } from "./setup-surface-soZQLgfu.js";
|
|
8
8
|
import { t as createMatrixThreadBindingManager } from "./thread-bindings-DehFUArg.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { g as resolveMatrixAccount } from "./setup-core-DRg3cgB8.js";
|
|
2
|
-
import { _ as shouldHandleMatrixApprovalRequest, g as isMatrixAnyApprovalClientEnabled } from "./channel
|
|
2
|
+
import { _ as shouldHandleMatrixApprovalRequest, g as isMatrixAnyApprovalClientEnabled } from "./channel--XqVgFZK.js";
|
|
3
3
|
import { a as resolveMatrixTargetIdentity } from "./target-ids-B-5aQxwn.js";
|
|
4
4
|
import { a as sendMessageMatrix, i as reactMatrixMessage, p as repairMatrixDirectRooms, s as sendSingleTextMessageMatrix } from "./send-DHj1E9ji.js";
|
|
5
5
|
import { a as unregisterMatrixApprovalReactionTarget, n as listMatrixApprovalReactionBindings, r as registerMatrixApprovalReactionTarget, t as buildMatrixApprovalReactionHint } from "./approval-reactions-BRGQgOu2.js";
|
|
@@ -593,7 +593,7 @@ const matrixNativeApprovalCapability = createApproverRestrictedNativeApprovalCap
|
|
|
593
593
|
accountId,
|
|
594
594
|
request
|
|
595
595
|
}),
|
|
596
|
-
load: async () => (await import("./approval-handler.runtime-
|
|
596
|
+
load: async () => (await import("./approval-handler.runtime-SX-BFhX_.js")).matrixApprovalNativeRuntime
|
|
597
597
|
})
|
|
598
598
|
});
|
|
599
599
|
const splitMatrixApprovalCapability = splitChannelApprovalCapability(matrixNativeApprovalCapability);
|
|
@@ -1284,8 +1284,8 @@ const matrixPlugin = createChatChannelPlugin({
|
|
|
1284
1284
|
collectStatusIssues: (accounts) => collectStatusIssuesFromLastError("matrix", accounts),
|
|
1285
1285
|
buildChannelSummary: ({ snapshot }) => buildProbeChannelStatusSummary(snapshot, { baseUrl: snapshot.baseUrl ?? null }),
|
|
1286
1286
|
probeAccount: async ({ account, timeoutMs, cfg }) => await createMatrixProbeAccount({
|
|
1287
|
-
resolveMatrixAuth: async ({ cfg, accountId }) => (await loadMatrixChannelRuntime()).resolveMatrixAuth({
|
|
1288
|
-
cfg,
|
|
1287
|
+
resolveMatrixAuth: async ({ cfg: cfgLocal, accountId }) => (await loadMatrixChannelRuntime()).resolveMatrixAuth({
|
|
1288
|
+
cfg: cfgLocal,
|
|
1289
1289
|
accountId
|
|
1290
1290
|
}),
|
|
1291
1291
|
probeMatrix: async (params) => await (await loadMatrixChannelRuntime()).probeMatrix(params)
|
|
@@ -1321,7 +1321,7 @@ const matrixPlugin = createChatChannelPlugin({
|
|
|
1321
1321
|
await previousLock;
|
|
1322
1322
|
let monitorMatrixProvider;
|
|
1323
1323
|
try {
|
|
1324
|
-
monitorMatrixProvider = (await import("./monitor-
|
|
1324
|
+
monitorMatrixProvider = (await import("./monitor-BMksz3hx.js")).monitorMatrixProvider;
|
|
1325
1325
|
} finally {
|
|
1326
1326
|
releaseLock();
|
|
1327
1327
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as matrixPlugin } from "./channel
|
|
1
|
+
import { t as matrixPlugin } from "./channel--XqVgFZK.js";
|
|
2
2
|
export { matrixPlugin };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { c as resolveMatrixAccountConfig, s as resolveMatrixAccountAllowlistConfig } from "./config-paths-ZBCMwSos.js";
|
|
2
2
|
import { t as getMatrixRuntime } from "./runtime-6S3DNFNv.js";
|
|
3
3
|
import { m as resolveConfiguredMatrixBotUserIds } from "./setup-core-DRg3cgB8.js";
|
|
4
|
-
import { a as buildAllowlistResolutionSummary, c as createTypingCallbacks, d as logInboundDrop, f as logTypingFailure, h as toLocationContext, i as addAllowlistUserEntriesFromConfigEntry, l as formatLocationText, m as summarizeMapping, n as resolveMatrixStoredSessionMeta, o as canonicalizeAllowlistWithResolvedIds, p as patchAllowlistUsersInConfigEntries, r as resolveMatrixRoomConfig, s as createReplyPrefixOptions, u as getAgentScopedMediaLocalRoots } from "./channel
|
|
4
|
+
import { a as buildAllowlistResolutionSummary, c as createTypingCallbacks, d as logInboundDrop, f as logTypingFailure, h as toLocationContext, i as addAllowlistUserEntriesFromConfigEntry, l as formatLocationText, m as summarizeMapping, n as resolveMatrixStoredSessionMeta, o as canonicalizeAllowlistWithResolvedIds, p as patchAllowlistUsersInConfigEntries, r as resolveMatrixRoomConfig, s as createReplyPrefixOptions, u as getAgentScopedMediaLocalRoots } from "./channel--XqVgFZK.js";
|
|
5
5
|
import { a as normalizeMatrixUserId, i as normalizeMatrixAllowList, o as resolveMatrixAllowListMatch } from "./config-schema-DfjBrYch.js";
|
|
6
6
|
import { t as isMatrixQualifiedUserId } from "./target-ids-B-5aQxwn.js";
|
|
7
7
|
import { r as isMatrixNotFoundError, t as formatMatrixErrorMessage } from "./errors-C47hvAF8.js";
|
|
@@ -2157,30 +2157,30 @@ function createMatrixRoomMessageHandler(params) {
|
|
|
2157
2157
|
let cachedStoreAllowFrom = null;
|
|
2158
2158
|
let liveDmAllowlistCache = null;
|
|
2159
2159
|
let liveGroupAllowlistCache = null;
|
|
2160
|
-
const resolveCachedLiveAllowlist = async (
|
|
2161
|
-
const
|
|
2162
|
-
cfg:
|
|
2160
|
+
const resolveCachedLiveAllowlist = async (paramsValue) => {
|
|
2161
|
+
const accountConfigLocal = resolveMatrixAccountConfig({
|
|
2162
|
+
cfg: paramsValue.cfg,
|
|
2163
2163
|
accountId
|
|
2164
2164
|
});
|
|
2165
2165
|
const signature = JSON.stringify({
|
|
2166
|
-
entries: (
|
|
2167
|
-
failClosedOnUnresolved:
|
|
2168
|
-
dangerouslyAllowNameMatching: isDangerousNameMatchingEnabled(
|
|
2166
|
+
entries: (paramsValue.entries ?? []).map((entry) => String(entry).trim()),
|
|
2167
|
+
failClosedOnUnresolved: paramsValue.failClosedOnUnresolved === true,
|
|
2168
|
+
dangerouslyAllowNameMatching: isDangerousNameMatchingEnabled(accountConfigLocal)
|
|
2169
2169
|
});
|
|
2170
|
-
if (
|
|
2170
|
+
if (paramsValue.cache?.signature === signature) return paramsValue.cache.entries;
|
|
2171
2171
|
const entries = await resolveLiveUserAllowlist({
|
|
2172
|
-
cfg:
|
|
2172
|
+
cfg: paramsValue.cfg,
|
|
2173
2173
|
accountId,
|
|
2174
|
-
entries:
|
|
2175
|
-
failClosedOnUnresolved:
|
|
2176
|
-
startupResolvedEntries:
|
|
2174
|
+
entries: paramsValue.entries,
|
|
2175
|
+
failClosedOnUnresolved: paramsValue.failClosedOnUnresolved,
|
|
2176
|
+
startupResolvedEntries: paramsValue.startupResolvedEntries,
|
|
2177
2177
|
runtime
|
|
2178
2178
|
});
|
|
2179
2179
|
const next = {
|
|
2180
2180
|
signature,
|
|
2181
2181
|
entries
|
|
2182
2182
|
};
|
|
2183
|
-
|
|
2183
|
+
paramsValue.updateCache(next);
|
|
2184
2184
|
return entries;
|
|
2185
2185
|
};
|
|
2186
2186
|
const pairingReplySentAtMsBySender = /* @__PURE__ */ new Map();
|
|
@@ -2314,11 +2314,11 @@ function createMatrixRoomMessageHandler(params) {
|
|
|
2314
2314
|
selfUserId
|
|
2315
2315
|
};
|
|
2316
2316
|
};
|
|
2317
|
-
const continueIngress = async (
|
|
2318
|
-
let content =
|
|
2319
|
-
const isDirectMessage =
|
|
2317
|
+
const continueIngress = async (paramsLocal) => {
|
|
2318
|
+
let content = paramsLocal.content;
|
|
2319
|
+
const isDirectMessage = paramsLocal.isDirectMessage;
|
|
2320
2320
|
const isRoom = !isDirectMessage;
|
|
2321
|
-
const { locationPayload, selfUserId } =
|
|
2321
|
+
const { locationPayload, selfUserId } = paramsLocal;
|
|
2322
2322
|
if (isRoom && groupPolicy === "disabled") {
|
|
2323
2323
|
await commitInboundEventIfClaimed();
|
|
2324
2324
|
return;
|
|
@@ -3003,8 +3003,8 @@ function createMatrixRoomMessageHandler(params) {
|
|
|
3003
3003
|
}
|
|
3004
3004
|
if (shouldStreamPreviewToolProgress && !previewToolProgressSuppressed && normalized) previewToolProgressLines = mergeChannelProgressDraftLine(previewToolProgressLines, progressLine, { maxLines: resolveChannelProgressDraftMaxLines(progressConfigEntry) });
|
|
3005
3005
|
const alreadyStarted = progressDraftGate.hasStarted;
|
|
3006
|
-
await progressDraftGate.noteWork();
|
|
3007
|
-
if (alreadyStarted && progressDraftGate.hasStarted) renderProgressDraft();
|
|
3006
|
+
const progressActive = await progressDraftGate.noteWork();
|
|
3007
|
+
if ((alreadyStarted || progressActive) && progressDraftGate.hasStarted) renderProgressDraft();
|
|
3008
3008
|
};
|
|
3009
3009
|
const suppressPreviewToolProgressForAnswerText = (text) => {
|
|
3010
3010
|
if (!text?.trim()) return;
|
|
@@ -3916,9 +3916,9 @@ function createMatrixMonitorStatusController(params) {
|
|
|
3916
3916
|
status.healthState = "healthy";
|
|
3917
3917
|
emit();
|
|
3918
3918
|
};
|
|
3919
|
-
const noteDisconnected = (
|
|
3920
|
-
const at =
|
|
3921
|
-
const error = formatSyncError(
|
|
3919
|
+
const noteDisconnected = (paramsLocal) => {
|
|
3920
|
+
const at = paramsLocal.at ?? Date.now();
|
|
3921
|
+
const error = formatSyncError(paramsLocal.error);
|
|
3922
3922
|
status.connected = false;
|
|
3923
3923
|
status.lastEventAt = at;
|
|
3924
3924
|
status.lastDisconnect = {
|
|
@@ -3926,7 +3926,7 @@ function createMatrixMonitorStatusController(params) {
|
|
|
3926
3926
|
...error ? { error } : {}
|
|
3927
3927
|
};
|
|
3928
3928
|
status.lastError = error;
|
|
3929
|
-
status.healthState =
|
|
3929
|
+
status.healthState = paramsLocal.state.toLowerCase();
|
|
3930
3930
|
emit();
|
|
3931
3931
|
};
|
|
3932
3932
|
emit();
|
|
@@ -3985,9 +3985,9 @@ function createMatrixMonitorSyncLifecycle(params) {
|
|
|
3985
3985
|
};
|
|
3986
3986
|
const onSyncState = (state, _prevState, error) => {
|
|
3987
3987
|
if (isMatrixTerminalSyncState(state) && !params.isStopping?.()) {
|
|
3988
|
-
const
|
|
3989
|
-
params.statusController.noteUnexpectedError(
|
|
3990
|
-
settleFatal(
|
|
3988
|
+
const fatalErrorLocal = formatSyncLifecycleError(state, error);
|
|
3989
|
+
params.statusController.noteUnexpectedError(fatalErrorLocal);
|
|
3990
|
+
settleFatal(fatalErrorLocal);
|
|
3991
3991
|
return;
|
|
3992
3992
|
}
|
|
3993
3993
|
if (fatalError) return;
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/matrix",
|
|
3
|
-
"version": "2026.5.31-beta.
|
|
3
|
+
"version": "2026.5.31-beta.3",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@openclaw/matrix",
|
|
9
|
-
"version": "2026.5.31-beta.
|
|
9
|
+
"version": "2026.5.31-beta.3",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@matrix-org/matrix-sdk-crypto-nodejs": "0.6.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.31-beta.
|
|
21
|
+
"openclaw": ">=2026.5.31-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.5.31-beta.
|
|
3
|
+
"version": "2026.5.31-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.5.31-beta.
|
|
21
|
+
"openclaw": ">=2026.5.31-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.5.31-beta.
|
|
87
|
+
"pluginApi": ">=2026.5.31-beta.3"
|
|
88
88
|
},
|
|
89
89
|
"build": {
|
|
90
|
-
"openclawVersion": "2026.5.31-beta.
|
|
90
|
+
"openclawVersion": "2026.5.31-beta.3"
|
|
91
91
|
},
|
|
92
92
|
"release": {
|
|
93
93
|
"publishToClawHub": true,
|
|
@@ -101,7 +101,8 @@
|
|
|
101
101
|
"files": [
|
|
102
102
|
"dist/**",
|
|
103
103
|
"openclaw.plugin.json",
|
|
104
|
-
"npm-shrinkwrap.json"
|
|
104
|
+
"npm-shrinkwrap.json",
|
|
105
|
+
"README.md"
|
|
105
106
|
],
|
|
106
107
|
"bundledDependencies": [
|
|
107
108
|
"@matrix-org/matrix-sdk-crypto-nodejs",
|