@openclaw/matrix 2026.5.12 → 2026.5.14-beta.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.
- package/dist/api.js +4 -4
- package/dist/{approval-handler.runtime-LpWmoFyw.js → approval-handler.runtime-Q8ZlmQv_.js} +5 -6
- package/dist/{approval-ids-DoC2z7tR.js → approval-ids-D6IQvvRE.js} +1 -1
- package/dist/{approval-reaction-auth-DbcA1gGd.js → approval-reaction-auth-99PRu7rF.js} +2 -2
- package/dist/{channel-B-R2dceO.js → channel-BLKRuTHs.js} +285 -26
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel.runtime-DdtNY_To.js → channel.runtime-9qwvlUwp.js} +8 -8
- package/dist/{cli-Cq80go7q.js → cli-BeWdjXLV.js} +15 -17
- package/dist/{cli-metadata-OtekEqAD.js → cli-metadata-B2_76YSe.js} +1 -1
- package/dist/cli-metadata.js +1 -1
- package/dist/{client-DzjShjVN.js → client-D6fFVbNM.js} +2 -2
- package/dist/{client-bootstrap-Am_ZEH3x.js → client-bootstrap-DBwUKgC3.js} +3 -3
- package/dist/{client-CyxIx4Fv.js → client-oci1tD6-.js} +4 -5
- package/dist/{account-config-D2W-V1eQ.js → config-paths-msaDGRh6.js} +20 -2
- package/dist/{config-schema-B975BYl0.js → config-schema-BPCzSyjT.js} +102 -4
- package/dist/contract-api.js +5 -6
- package/dist/{create-client-DpoW106T.js → create-client-BahCtURn.js} +4 -4
- package/dist/{credentials-DV6fWXhC.js → credentials-DK0lK9cZ.js} +1 -1
- package/dist/{credentials-write.runtime-zniTq-Gr.js → credentials-write.runtime-DhPvBU-C.js} +1 -1
- package/dist/{crypto-runtime-DS6R8y_n.js → crypto-runtime-B-SPS5mv.js} +5 -5
- package/dist/{deps-CU5W9Ixu.js → deps-LqqGWPWt.js} +10 -14
- package/dist/{directory-live-Bn66SRSD.js → directory-live-BCfx1C0G.js} +3 -3
- package/dist/{doctor-KjAvjAJu.js → doctor-KuNYX5N3.js} +3 -3
- package/dist/doctor-contract-api.js +1 -1
- package/dist/{draft-stream-D_FlbmCh.js → draft-stream-BayHVmtO.js} +1 -2
- package/dist/{encryption-guidance-BPi3A_m3.js → encryption-guidance-1QoIvd-g.js} +1 -1
- package/dist/{http-client-C7AeVJay.js → http-client-DS3UoC_p.js} +1 -1
- package/dist/index.js +2 -2
- package/dist/{legacy-crypto-inspector-pB252vPO.js → legacy-crypto-inspector-_gWJGVQ_.js} +1 -1
- package/dist/{legacy-crypto-restore-Biw-w2ng.js → legacy-crypto-restore-B9eF1gob.js} +1 -1
- package/dist/{logging-DZHSPP5N.js → logging-bJ8EEe1G.js} +1 -1
- package/dist/{matrix-migration.runtime-DfjNMeoX.js → matrix-migration.runtime-Cf_wX9mk.js} +3 -3
- package/dist/{media-text-psyGloYl.js → media-text-4h4YwCGC.js} +1 -1
- package/dist/{messages-DQ8xXWiP.js → messages-BKTEUSwJ.js} +5 -5
- package/dist/{migration-snapshot.runtime-CKHE3xF9.js → migration-snapshot.runtime-C7yiKWS7.js} +1 -1
- package/dist/{monitor-C8cEvvTe.js → monitor-k-b_TmCm.js} +66 -46
- package/dist/plugin-entry.handlers.runtime.js +2 -2
- package/dist/probe.runtime-zExLz3Ek.js +3 -0
- package/dist/{profile-update-DleMeUHj.js → profile-update-BAAflurI.js} +2 -3
- package/dist/{reaction-events-CiARZfjk.js → reaction-events-Dimh8FUE.js} +6 -6
- package/dist/{resolve-targets-BbzYe9Qi.js → resolve-targets-DPqngj4V.js} +1 -1
- package/dist/{resolver.runtime-BWFMWEsg.js → resolver.runtime-C0RDK0VW.js} +1 -1
- package/dist/{route-D6rg-iXN.js → route-R-ajT21_.js} +1 -1
- package/dist/{runtime-api-DTKcXOhp.js → runtime-api-C-QeChQj.js} +1 -1
- package/dist/runtime-api.js +1 -1
- package/dist/runtime-heavy-api.js +2 -2
- package/dist/{sdk-DXWmb94u.js → sdk-BwfNtBhM.js} +301 -13
- package/dist/secret-contract-api.js +1 -1
- package/dist/{send-Df-pDuG6.js → send-CdoJ1pZY.js} +323 -6
- package/dist/{setup-bootstrap-DXWxzR7A.js → setup-bootstrap-krQU60Az.js} +4 -4
- package/dist/setup-core-CgOV8zmh.js +675 -0
- package/dist/setup-plugin-api.js +3 -4
- package/dist/{setup-surface-DuRQrrpU.js → setup-surface-BgUaEySF.js} +7 -10
- package/dist/{config-BR4uLzNs.js → shared-BlXw87Kp.js} +199 -9
- package/dist/{logger-CnZRVrux.js → startup-abort-br7BZHJQ.js} +32 -1
- package/dist/{startup-verification-Demyp0bP.js → startup-verification-CTfhD7V_.js} +2 -2
- package/dist/{storage-tC3ujLiW.js → storage-HI1nL3im.js} +1 -1
- package/dist/{subagent-hooks-DQbyqq9V.js → subagent-hooks-api-BgQgDwAS.js} +22 -1
- package/dist/subagent-hooks-api.js +1 -22
- package/dist/test-api.js +2 -2
- package/dist/thread-binding-api.js +1 -1
- package/dist/{thread-bindings--P1UYe7t.js → thread-bindings-8AyQOYDT.js} +2 -2
- package/dist/{tool-actions.runtime-AFGhzK--.js → tool-actions.runtime-BuCnleVD.js} +9 -9
- package/dist/{verification-BbGdzYQl.js → verification-DvC37Z_y.js} +2 -2
- package/openclaw.plugin.json +96 -0
- package/package.json +6 -6
- package/dist/accounts-Bm90Rzvp.js +0 -130
- package/dist/allowlist-sTzpCn5d.js +0 -68
- package/dist/config-paths-nsVaysCu.js +0 -19
- package/dist/config-update-wZX-HLMn.js +0 -143
- package/dist/direct-management--Y8ypgLv.js +0 -251
- package/dist/direct-room-XkutHjES.js +0 -76
- package/dist/exec-approvals-Crnh543m.js +0 -196
- package/dist/probe.runtime-NE73hi9o.js +0 -3
- package/dist/profile-BlHu0wDX.js +0 -111
- package/dist/recovery-key-store-BTJ6jz5v.js +0 -294
- package/dist/session-store-metadata-DQXjgNLt.js +0 -77
- package/dist/setup-core-B5X7HxAP.js +0 -116
- package/dist/setup-dm-policy-Ca3jA4YW.js +0 -195
- package/dist/shared-CkbpEI5j.js +0 -195
- package/dist/startup-abort-56edvmbM.js +0 -32
- /package/dist/{active-client-uhlxdhEy.js → active-client-DUi-lumi.js} +0 -0
- /package/dist/{approval-reactions-o2_tuH8D.js → approval-reactions-Cwd1PMCC.js} +0 -0
- /package/dist/{async-lock-uQfhfQIY.js → async-lock-SsmtFXtt.js} +0 -0
- /package/dist/{backup-health-Cabu_WQC.js → backup-health-3BHbHxyd.js} +0 -0
- /package/dist/{config-secret-input.runtime-DiKFehsE.js → config-secret-input.runtime-nbLCnJq7.js} +0 -0
- /package/dist/{crypto-node.runtime-pihzdpY7.js → crypto-node.runtime-D9qxgRPa.js} +0 -0
- /package/dist/{device-health-UVYpbA_W.js → device-health-Di9MUzFj.js} +0 -0
- /package/dist/{doctor-contract-D4-64QuJ.js → doctor-contract-s4gUPmRN.js} +0 -0
- /package/dist/{errors-CTcpEDq-.js → errors-BpHgvm2o.js} +0 -0
- /package/dist/{exec-approval-resolver-Bza9Dhlm.js → exec-approval-resolver-C8faS0XB.js} +0 -0
- /package/dist/{migration-snapshot-backup-DaCHTp8C.js → migration-snapshot-backup-BWTIFXgQ.js} +0 -0
- /package/dist/{reaction-common-ejrL19w-.js → reaction-common-B-QgNfEs.js} +0 -0
- /package/dist/{runtime-C6X4h_SJ.js → runtime-lwTSy9Yt.js} +0 -0
- /package/dist/{secret-contract-DcrJWCQI.js → secret-contract-e4SdhUtT.js} +0 -0
- /package/dist/{sync-state-C_beeevA.js → sync-state-Bx0gPaGA.js} +0 -0
- /package/dist/{thread-binding-api-Cq_E-E1K.js → thread-binding-api-Bx55B6hm.js} +0 -0
- /package/dist/{timeout-abort-signal-CtaIaP1v.js → timeout-abort-signal-sT0wAxVn.js} +0 -0
- /package/dist/{url-validation-DiK9j7jz.js → url-validation-CBZBxN3F.js} +0 -0
|
@@ -1,12 +1,78 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { t as normalizeMatrixAllowList } from "./allowlist-sTzpCn5d.js";
|
|
1
|
+
import { c as resolveMatrixAccountConfig } from "./config-paths-msaDGRh6.js";
|
|
2
|
+
import { g as resolveMatrixAccount, h as resolveDefaultMatrixAccountId, p as listMatrixAccountIds } from "./setup-core-CgOV8zmh.js";
|
|
4
3
|
import { DEFAULT_ACCOUNT_ID as DEFAULT_ACCOUNT_ID$1 } from "openclaw/plugin-sdk/account-id";
|
|
4
|
+
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
5
5
|
import { adaptScopedAccountAccessor, createScopedChannelConfigAdapter } from "openclaw/plugin-sdk/channel-config-helpers";
|
|
6
|
+
import { resolveAllowlistMatchByCandidates } from "openclaw/plugin-sdk/allow-from";
|
|
7
|
+
import { normalizeStringEntries } from "openclaw/plugin-sdk/string-normalization-runtime";
|
|
6
8
|
import { buildChannelConfigSchema } from "openclaw/plugin-sdk/channel-config-primitives";
|
|
7
9
|
import { AllowFromListSchema, ContextVisibilityModeSchema, GroupPolicySchema, MarkdownConfigSchema, ToolPolicySchema, buildNestedDmConfigSchema } from "openclaw/plugin-sdk/channel-config-schema";
|
|
8
10
|
import { buildSecretInputSchema } from "openclaw/plugin-sdk/secret-input";
|
|
9
11
|
import { z } from "zod";
|
|
12
|
+
//#region extensions/matrix/src/matrix/monitor/allowlist.ts
|
|
13
|
+
function normalizeAllowList(list) {
|
|
14
|
+
return normalizeStringEntries(list);
|
|
15
|
+
}
|
|
16
|
+
function normalizeMatrixUser(raw) {
|
|
17
|
+
const value = (raw ?? "").trim();
|
|
18
|
+
if (!value) return "";
|
|
19
|
+
if (!value.startsWith("@") || !value.includes(":")) return normalizeLowercaseStringOrEmpty(value);
|
|
20
|
+
const withoutAt = value.slice(1);
|
|
21
|
+
const splitIndex = withoutAt.indexOf(":");
|
|
22
|
+
if (splitIndex === -1) return normalizeLowercaseStringOrEmpty(value);
|
|
23
|
+
const localpart = normalizeLowercaseStringOrEmpty(withoutAt.slice(0, splitIndex));
|
|
24
|
+
const server = normalizeLowercaseStringOrEmpty(withoutAt.slice(splitIndex + 1));
|
|
25
|
+
if (!server) return normalizeLowercaseStringOrEmpty(value);
|
|
26
|
+
return `@${localpart}:${server}`;
|
|
27
|
+
}
|
|
28
|
+
function normalizeMatrixUserId(raw) {
|
|
29
|
+
const trimmed = (raw ?? "").trim();
|
|
30
|
+
if (!trimmed) return "";
|
|
31
|
+
const lowered = normalizeLowercaseStringOrEmpty(trimmed);
|
|
32
|
+
if (lowered.startsWith("matrix:")) return normalizeMatrixUser(trimmed.slice(7));
|
|
33
|
+
if (lowered.startsWith("user:")) return normalizeMatrixUser(trimmed.slice(5));
|
|
34
|
+
return normalizeMatrixUser(trimmed);
|
|
35
|
+
}
|
|
36
|
+
function normalizeMatrixAllowListEntry(raw) {
|
|
37
|
+
const trimmed = raw.trim();
|
|
38
|
+
if (!trimmed) return "";
|
|
39
|
+
if (trimmed === "*") return trimmed;
|
|
40
|
+
const lowered = normalizeLowercaseStringOrEmpty(trimmed);
|
|
41
|
+
if (lowered.startsWith("matrix:")) return `matrix:${normalizeMatrixUser(trimmed.slice(7))}`;
|
|
42
|
+
if (lowered.startsWith("user:")) return `user:${normalizeMatrixUser(trimmed.slice(5))}`;
|
|
43
|
+
return normalizeMatrixUser(trimmed);
|
|
44
|
+
}
|
|
45
|
+
function normalizeMatrixAllowList(list) {
|
|
46
|
+
return normalizeAllowList(list).map((entry) => normalizeMatrixAllowListEntry(entry));
|
|
47
|
+
}
|
|
48
|
+
function resolveMatrixAllowListMatch(params) {
|
|
49
|
+
const allowList = params.allowList;
|
|
50
|
+
if (allowList.length === 0) return { allowed: false };
|
|
51
|
+
if (allowList.includes("*")) return {
|
|
52
|
+
allowed: true,
|
|
53
|
+
matchKey: "*",
|
|
54
|
+
matchSource: "wildcard"
|
|
55
|
+
};
|
|
56
|
+
const userId = normalizeMatrixUser(params.userId);
|
|
57
|
+
return resolveAllowlistMatchByCandidates({
|
|
58
|
+
allowList,
|
|
59
|
+
candidates: [
|
|
60
|
+
{
|
|
61
|
+
value: userId,
|
|
62
|
+
source: "id"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
value: userId ? `matrix:${userId}` : "",
|
|
66
|
+
source: "prefixed-id"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
value: userId ? `user:${userId}` : "",
|
|
70
|
+
source: "prefixed-user"
|
|
71
|
+
}
|
|
72
|
+
]
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
//#endregion
|
|
10
76
|
//#region extensions/matrix/src/config-adapter.ts
|
|
11
77
|
const matrixConfigAdapter = createScopedChannelConfigAdapter({
|
|
12
78
|
sectionKey: "matrix",
|
|
@@ -36,6 +102,30 @@ const matrixConfigAdapter = createScopedChannelConfigAdapter({
|
|
|
36
102
|
//#endregion
|
|
37
103
|
//#region extensions/matrix/src/config-ui-hints.ts
|
|
38
104
|
const matrixChannelConfigUiHints = {
|
|
105
|
+
allowBots: {
|
|
106
|
+
label: "Matrix Allow Bot Messages",
|
|
107
|
+
help: "Allow messages from other configured Matrix bot accounts to trigger replies (default: false). Set \"mentions\" to require a visible room mention."
|
|
108
|
+
},
|
|
109
|
+
botLoopProtection: {
|
|
110
|
+
label: "Matrix Bot Loop Protection",
|
|
111
|
+
help: "Sliding-window guard for accepted Matrix configured-bot loops. Default is enabled whenever allowBots lets configured bot messages reach dispatch."
|
|
112
|
+
},
|
|
113
|
+
"botLoopProtection.enabled": {
|
|
114
|
+
label: "Matrix Bot Loop Protection Enabled",
|
|
115
|
+
help: "Enable the bot-pair loop guard. Defaults to true when allowBots is true or \"mentions\", and false when configured bot messages are ignored."
|
|
116
|
+
},
|
|
117
|
+
"botLoopProtection.maxEventsPerWindow": {
|
|
118
|
+
label: "Matrix Bot Loop Events per Window",
|
|
119
|
+
help: "Maximum accepted bot-pair messages within the sliding window before suppression starts. Default: 20."
|
|
120
|
+
},
|
|
121
|
+
"botLoopProtection.windowSeconds": {
|
|
122
|
+
label: "Matrix Bot Loop Window Seconds",
|
|
123
|
+
help: "Sliding window length for counting bot-pair messages. Default: 60."
|
|
124
|
+
},
|
|
125
|
+
"botLoopProtection.cooldownSeconds": {
|
|
126
|
+
label: "Matrix Bot Loop Cooldown Seconds",
|
|
127
|
+
help: "How long to suppress the bot pair after it exceeds the budget. Default: 60."
|
|
128
|
+
},
|
|
39
129
|
dangerouslyAllowNameMatching: {
|
|
40
130
|
label: "Matrix Display Name Matching",
|
|
41
131
|
help: "Compatibility opt-in for resolving Matrix display names and joined room names in allowlists. Prefer full @user:server IDs and room IDs or aliases because names are mutable."
|
|
@@ -92,11 +182,18 @@ const matrixExecApprovalsSchema = z.object({
|
|
|
92
182
|
"both"
|
|
93
183
|
]).optional()
|
|
94
184
|
}).optional();
|
|
185
|
+
const botLoopProtectionSchema = z.object({
|
|
186
|
+
enabled: z.boolean().optional(),
|
|
187
|
+
maxEventsPerWindow: z.number().int().positive().optional(),
|
|
188
|
+
windowSeconds: z.number().int().positive().optional(),
|
|
189
|
+
cooldownSeconds: z.number().int().positive().optional()
|
|
190
|
+
}).strict().optional();
|
|
95
191
|
const matrixRoomSchema = z.object({
|
|
96
192
|
account: z.string().optional(),
|
|
97
193
|
enabled: z.boolean().optional(),
|
|
98
194
|
requireMention: z.boolean().optional(),
|
|
99
195
|
allowBots: z.union([z.boolean(), z.literal("mentions")]).optional(),
|
|
196
|
+
botLoopProtection: botLoopProtectionSchema,
|
|
100
197
|
tools: ToolPolicySchema,
|
|
101
198
|
autoReply: z.boolean().optional(),
|
|
102
199
|
users: AllowFromListSchema,
|
|
@@ -139,6 +236,7 @@ const MatrixChannelConfigSchema = buildChannelConfigSchema(z.object({
|
|
|
139
236
|
allowlistOnly: z.boolean().optional(),
|
|
140
237
|
dangerouslyAllowNameMatching: z.boolean().optional(),
|
|
141
238
|
allowBots: z.union([z.boolean(), z.literal("mentions")]).optional(),
|
|
239
|
+
botLoopProtection: botLoopProtectionSchema,
|
|
142
240
|
groupPolicy: GroupPolicySchema.optional(),
|
|
143
241
|
contextVisibility: ContextVisibilityModeSchema.optional(),
|
|
144
242
|
blockStreaming: z.boolean().optional(),
|
|
@@ -202,4 +300,4 @@ const MatrixChannelConfigSchema = buildChannelConfigSchema(z.object({
|
|
|
202
300
|
actions: matrixActionSchema
|
|
203
301
|
}), { uiHints: matrixChannelConfigUiHints });
|
|
204
302
|
//#endregion
|
|
205
|
-
export { DEFAULT_ACCOUNT_ID$1 as n, matrixConfigAdapter as r, MatrixChannelConfigSchema as t };
|
|
303
|
+
export { normalizeMatrixUserId as a, normalizeMatrixAllowList as i, DEFAULT_ACCOUNT_ID$1 as n, resolveMatrixAllowListMatch as o, matrixConfigAdapter as r, MatrixChannelConfigSchema as t };
|
package/dist/contract-api.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { s as resetMatrixThreadBindingsForTests } from "./thread-bindings-shared-DK-d-oYX.js";
|
|
2
2
|
import { r as setMatrixRuntime } from "./runtime-Dog86njy.js";
|
|
3
|
-
import { n as
|
|
4
|
-
import { n as
|
|
5
|
-
import {
|
|
6
|
-
import { n as
|
|
7
|
-
import {
|
|
8
|
-
import { t as createMatrixThreadBindingManager } from "./thread-bindings--P1UYe7t.js";
|
|
3
|
+
import { d as resolveSingleAccountPromotionTarget, f as singleAccountKeysToMove, n as matrixSetupAdapter, u as namedAccountPromotionKeys } from "./setup-core-CgOV8zmh.js";
|
|
4
|
+
import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-s4gUPmRN.js";
|
|
5
|
+
import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-e4SdhUtT.js";
|
|
6
|
+
import { n as matrixOnboardingAdapter } from "./setup-surface-BgUaEySF.js";
|
|
7
|
+
import { t as createMatrixThreadBindingManager } from "./thread-bindings-8AyQOYDT.js";
|
|
9
8
|
export { collectRuntimeConfigAssignments, createMatrixThreadBindingManager, legacyConfigRules, matrixSetupAdapter, matrixOnboardingAdapter as matrixSetupWizard, namedAccountPromotionKeys, normalizeCompatibilityConfig, resetMatrixThreadBindingsForTests, resolveSingleAccountPromotionTarget, secretTargetRegistryEntries, setMatrixRuntime, singleAccountKeysToMove };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-DUslC3ob.js";
|
|
2
|
-
import { t as resolveValidatedMatrixHomeserverUrl } from "./url-validation-
|
|
3
|
-
import { a as resolveMatrixStoragePaths, n as maybeMigrateLegacyStorage, o as writeStorageMeta } from "./storage-
|
|
4
|
-
import "./
|
|
2
|
+
import { t as resolveValidatedMatrixHomeserverUrl } from "./url-validation-CBZBxN3F.js";
|
|
3
|
+
import { a as resolveMatrixStoragePaths, n as maybeMigrateLegacyStorage, o as writeStorageMeta } from "./storage-HI1nL3im.js";
|
|
4
|
+
import "./shared-BlXw87Kp.js";
|
|
5
5
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
6
6
|
import fs from "node:fs";
|
|
7
7
|
import { ssrfPolicyFromDangerouslyAllowPrivateNetwork } from "openclaw/plugin-sdk/ssrf-runtime";
|
|
@@ -9,7 +9,7 @@ import { ssrfPolicyFromDangerouslyAllowPrivateNetwork } from "openclaw/plugin-sd
|
|
|
9
9
|
var create_client_exports = /* @__PURE__ */ __exportAll({ createMatrixClient: () => createMatrixClient });
|
|
10
10
|
let matrixCreateClientRuntimeDepsPromise;
|
|
11
11
|
async function loadMatrixCreateClientRuntimeDeps() {
|
|
12
|
-
matrixCreateClientRuntimeDepsPromise ??= Promise.all([import("./sdk-
|
|
12
|
+
matrixCreateClientRuntimeDepsPromise ??= Promise.all([import("./sdk-BwfNtBhM.js").then((n) => n.n), import("./logging-bJ8EEe1G.js").then((n) => n.n)]).then(([sdkModule, loggingModule]) => ({
|
|
13
13
|
MatrixClient: sdkModule.MatrixClient,
|
|
14
14
|
ensureMatrixSdkLoggingConfigured: loggingModule.ensureMatrixSdkLoggingConfigured
|
|
15
15
|
}));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as resolveMatrixCredentialsDir, i as loadMatrixCredentials, n as credentialsMatchConfig, o as resolveMatrixCredentialsPath, t as clearMatrixCredentials } from "./credentials-read-cmHgousK.js";
|
|
2
|
-
import { t as createAsyncLock } from "./async-lock-
|
|
2
|
+
import { t as createAsyncLock } from "./async-lock-SsmtFXtt.js";
|
|
3
3
|
import { writeJsonFileAtomically } from "openclaw/plugin-sdk/json-store";
|
|
4
4
|
//#region extensions/matrix/src/matrix/credentials.ts
|
|
5
5
|
const credentialWriteLocks = /* @__PURE__ */ new Map();
|
package/dist/{credentials-write.runtime-zniTq-Gr.js → credentials-write.runtime-DhPvBU-C.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
//#region extensions/matrix/src/matrix/credentials-write.runtime.ts
|
|
2
2
|
let matrixCredentialsRuntimePromise;
|
|
3
3
|
function loadMatrixCredentialsRuntime() {
|
|
4
|
-
matrixCredentialsRuntimePromise ??= import("./credentials-
|
|
4
|
+
matrixCredentialsRuntimePromise ??= import("./credentials-DK0lK9cZ.js");
|
|
5
5
|
return matrixCredentialsRuntimePromise;
|
|
6
6
|
}
|
|
7
7
|
async function saveMatrixCredentials(...args) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as formatMatrixErrorMessage } from "./errors-
|
|
2
|
-
import { t as ensureMatrixCryptoRuntime } from "./deps-
|
|
3
|
-
import {
|
|
4
|
-
import { i as MATRIX_IDB_SNAPSHOT_LOCK_OPTIONS,
|
|
1
|
+
import { t as formatMatrixErrorMessage } from "./errors-BpHgvm2o.js";
|
|
2
|
+
import { t as ensureMatrixCryptoRuntime } from "./deps-LqqGWPWt.js";
|
|
3
|
+
import { o as LogService, s as noop } from "./startup-abort-br7BZHJQ.js";
|
|
4
|
+
import { i as MATRIX_IDB_SNAPSHOT_LOCK_OPTIONS, r as isRepairableSecretStorageAccessError } from "./sdk-BwfNtBhM.js";
|
|
5
5
|
import fs from "node:fs";
|
|
6
6
|
import path from "node:path";
|
|
7
7
|
import { MatrixEventEvent } from "matrix-js-sdk/lib/matrix.js";
|
|
@@ -290,7 +290,7 @@ var MatrixCryptoBootstrapper = class {
|
|
|
290
290
|
//#region extensions/matrix/src/matrix/sdk/crypto-facade.ts
|
|
291
291
|
let matrixCryptoNodeRuntimePromise = null;
|
|
292
292
|
async function loadMatrixCryptoNodeRuntime() {
|
|
293
|
-
matrixCryptoNodeRuntimePromise ??= import("./crypto-node.runtime-
|
|
293
|
+
matrixCryptoNodeRuntimePromise ??= import("./crypto-node.runtime-D9qxgRPa.js").catch((error) => {
|
|
294
294
|
matrixCryptoNodeRuntimePromise = null;
|
|
295
295
|
throw error;
|
|
296
296
|
});
|
|
@@ -11,25 +11,21 @@ const REQUIRED_MATRIX_PACKAGES = [
|
|
|
11
11
|
];
|
|
12
12
|
const MIN_MATRIX_CRYPTO_NATIVE_BINDING_BYTES = 1e6;
|
|
13
13
|
function resolveMissingMatrixPackages(resolveFn) {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
});
|
|
24
|
-
} catch {
|
|
25
|
-
return [...REQUIRED_MATRIX_PACKAGES];
|
|
26
|
-
}
|
|
14
|
+
const resolve = resolveFn ?? defaultResolveFn;
|
|
15
|
+
return REQUIRED_MATRIX_PACKAGES.filter((pkg) => {
|
|
16
|
+
try {
|
|
17
|
+
resolve(pkg);
|
|
18
|
+
return false;
|
|
19
|
+
} catch {
|
|
20
|
+
return true;
|
|
21
|
+
}
|
|
22
|
+
});
|
|
27
23
|
}
|
|
28
24
|
function isMatrixSdkAvailable() {
|
|
29
25
|
return resolveMissingMatrixPackages().length === 0;
|
|
30
26
|
}
|
|
31
27
|
function buildMatrixDepsMissingMessage(missing) {
|
|
32
|
-
return [`Matrix plugin dependencies are missing: ${missing.
|
|
28
|
+
return [`Matrix plugin dependencies are missing: ${missing.join(", ")}.`, "Repair this plugin with `openclaw plugins update matrix` or run `openclaw doctor --fix`."].join(" ");
|
|
33
29
|
}
|
|
34
30
|
let defaultMatrixCryptoRuntimeEnsurePromise = null;
|
|
35
31
|
async function runFixedCommandWithTimeout(params) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-DUslC3ob.js";
|
|
2
2
|
import { n as normalizeMatrixMessagingTarget, t as isMatrixQualifiedUserId } from "./target-ids-80nQ2gql.js";
|
|
3
|
-
import { t as MatrixAuthedHttpClient } from "./http-client-
|
|
4
|
-
import {
|
|
5
|
-
import "./client-
|
|
3
|
+
import { t as MatrixAuthedHttpClient } from "./http-client-DS3UoC_p.js";
|
|
4
|
+
import { l as resolveMatrixAuth } from "./shared-BlXw87Kp.js";
|
|
5
|
+
import "./client-oci1tD6-.js";
|
|
6
6
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
7
7
|
//#region extensions/matrix/src/directory-live.ts
|
|
8
8
|
var directory_live_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as isRecord } from "./record-shared-CHWJCTWf.js";
|
|
2
|
-
import "./doctor-contract-
|
|
3
|
-
import { i as autoPrepareLegacyMatrixCrypto, o as autoMigrateLegacyMatrixState, r as resolveMatrixMigrationStatus } from "./matrix-migration.runtime-
|
|
4
|
-
import { t as maybeCreateMatrixMigrationSnapshot } from "./migration-snapshot-backup-
|
|
2
|
+
import "./doctor-contract-s4gUPmRN.js";
|
|
3
|
+
import { i as autoPrepareLegacyMatrixCrypto, o as autoMigrateLegacyMatrixState, r as resolveMatrixMigrationStatus } from "./matrix-migration.runtime-Cf_wX9mk.js";
|
|
4
|
+
import { t as maybeCreateMatrixMigrationSnapshot } from "./migration-snapshot-backup-BWTIFXgQ.js";
|
|
5
5
|
import { detectPluginInstallPathIssue, formatPluginInstallPathIssue, removePluginFromConfig } from "openclaw/plugin-sdk/runtime-doctor";
|
|
6
6
|
//#region extensions/matrix/src/doctor.ts
|
|
7
7
|
function hasConfiguredMatrixChannel(cfg) {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-
|
|
1
|
+
import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-s4gUPmRN.js";
|
|
2
2
|
export { legacyConfigRules, normalizeCompatibilityConfig };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { n as editMessageMatrix, r as prepareMatrixSingleText, s as sendSingleTextMessageMatrix } from "./send-
|
|
2
|
-
import { l as MsgType } from "./direct-management--Y8ypgLv.js";
|
|
1
|
+
import { n as editMessageMatrix, r as prepareMatrixSingleText, s as sendSingleTextMessageMatrix, y as MsgType } from "./send-CdoJ1pZY.js";
|
|
3
2
|
import { createDraftStreamLoop } from "openclaw/plugin-sdk/channel-lifecycle";
|
|
4
3
|
//#region extensions/matrix/src/matrix/draft-stream.ts
|
|
5
4
|
const DEFAULT_THROTTLE_MS = 1e3;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as resolveMatrixDefaultOrOnlyAccountId } from "./account-selection-BWwIruri.js";
|
|
2
|
-
import { t as resolveMatrixConfigFieldPath } from "./config-paths-
|
|
2
|
+
import { t as resolveMatrixConfigFieldPath } from "./config-paths-msaDGRh6.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) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as buildTimeoutAbortSignal } from "./timeout-abort-signal-
|
|
1
|
+
import { t as buildTimeoutAbortSignal } from "./timeout-abort-signal-sT0wAxVn.js";
|
|
2
2
|
import { readResponseWithLimit } from "openclaw/plugin-sdk/response-limit-runtime";
|
|
3
3
|
import { fetchWithRuntimeDispatcherOrMockedGlobal } from "openclaw/plugin-sdk/runtime-fetch";
|
|
4
4
|
import { closeDispatcher, createPinnedDispatcher, resolvePinnedHostnameWithPolicy } from "openclaw/plugin-sdk/ssrf-dispatcher";
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as registerMatrixCliMetadata } from "./cli-metadata-
|
|
2
|
-
import { registerMatrixSubagentHooks } from "./subagent-hooks-api.js";
|
|
1
|
+
import { n as registerMatrixCliMetadata } from "./cli-metadata-B2_76YSe.js";
|
|
2
|
+
import { t as registerMatrixSubagentHooks } from "./subagent-hooks-api-BgQgDwAS.js";
|
|
3
3
|
import { defineBundledChannelEntry } from "openclaw/plugin-sdk/channel-entry-contract";
|
|
4
4
|
//#region extensions/matrix/index.ts
|
|
5
5
|
let matrixHandlersRuntimePromise = null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as getMatrixRuntime } from "./runtime-Dog86njy.js";
|
|
2
|
-
import { a as resolveMatrixStoragePaths } from "./storage-
|
|
2
|
+
import { a as resolveMatrixStoragePaths } from "./storage-HI1nL3im.js";
|
|
3
3
|
import os from "node:os";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import { readJsonFileWithFallback, writeJsonFileAtomically } from "openclaw/plugin-sdk/json-store";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-DUslC3ob.js";
|
|
2
|
-
import {
|
|
2
|
+
import { a as ConsoleLogger, c as setMatrixConsoleLogging, o as LogService } from "./startup-abort-br7BZHJQ.js";
|
|
3
3
|
import { logger } from "matrix-js-sdk/lib/logger.js";
|
|
4
4
|
//#region extensions/matrix/src/matrix/client/logging.ts
|
|
5
5
|
var logging_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { a as resolveMatrixDefaultOrOnlyAccountId, i as resolveMatrixChannelConfig, n as requiresExplicitMatrixDefaultAccount, o as resolveMatrixAccountStringValues, r as resolveConfiguredMatrixAccountIds, t as findMatrixAccountEntry } from "./account-selection-BWwIruri.js";
|
|
2
2
|
import { i as resolveScopedMatrixEnvConfig, n as resolveGlobalMatrixEnvConfig } from "./env-auth-BJqGI8M6.js";
|
|
3
3
|
import { a as resolveMatrixCredentialsPath, n as resolveMatrixAccountStorageRoot, s as resolveMatrixLegacyFlatStoragePaths } from "./storage-paths-BJLdnCjV.js";
|
|
4
|
-
import { t as formatMatrixErrorMessage } from "./errors-
|
|
5
|
-
import "./migration-snapshot-backup-
|
|
4
|
+
import { t as formatMatrixErrorMessage } from "./errors-BpHgvm2o.js";
|
|
5
|
+
import "./migration-snapshot-backup-BWTIFXgQ.js";
|
|
6
6
|
import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
|
7
7
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
8
8
|
import fs from "node:fs";
|
|
@@ -249,7 +249,7 @@ function isMatrixLegacyCryptoInspectorAvailable() {
|
|
|
249
249
|
//#region extensions/matrix/src/legacy-crypto.ts
|
|
250
250
|
const MATRIX_LEGACY_CRYPTO_INSPECTOR_UNAVAILABLE_MESSAGE = "Legacy Matrix encrypted state was detected, but the Matrix crypto inspector is unavailable.";
|
|
251
251
|
async function loadMatrixLegacyCryptoInspector() {
|
|
252
|
-
return (await import("./legacy-crypto-inspector-
|
|
252
|
+
return (await import("./legacy-crypto-inspector-_gWJGVQ_.js")).inspectLegacyMatrixCryptoStore;
|
|
253
253
|
}
|
|
254
254
|
function detectLegacyBotSdkCryptoStore(cryptoRootDir) {
|
|
255
255
|
try {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { C as formatPollResultsAsText, D as parsePollStartContent, O as resolvePollReferenceEventId, S as formatPollAsText, T as isPollStartType, w as isPollEventType, x as buildPollResultsSummary } from "./send-CdoJ1pZY.js";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
//#region extensions/matrix/src/matrix/poll-summary.ts
|
|
4
4
|
function resolveMatrixPollRootEventId(event) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { r as isMatrixNotFoundError } from "./errors-
|
|
2
|
-
import { a as sendMessageMatrix,
|
|
3
|
-
import { n as MATRIX_REACTION_EVENT_TYPE } from "./reaction-common-
|
|
4
|
-
import { a as resolveMatrixMessageBody, c as resolveMatrixPollRootEventId, i as resolveMatrixMessageAttachment, o as fetchMatrixPollMessageSummary } from "./media-text-
|
|
5
|
-
import { r as withResolvedRoomAction } from "./client-
|
|
1
|
+
import { r as isMatrixNotFoundError } from "./errors-BpHgvm2o.js";
|
|
2
|
+
import { a as sendMessageMatrix, n as editMessageMatrix, w as isPollEventType } from "./send-CdoJ1pZY.js";
|
|
3
|
+
import { n as MATRIX_REACTION_EVENT_TYPE } from "./reaction-common-B-QgNfEs.js";
|
|
4
|
+
import { a as resolveMatrixMessageBody, c as resolveMatrixPollRootEventId, i as resolveMatrixMessageAttachment, o as fetchMatrixPollMessageSummary } from "./media-text-4h4YwCGC.js";
|
|
5
|
+
import { r as withResolvedRoomAction } from "./client-D6fFVbNM.js";
|
|
6
6
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
7
7
|
//#region extensions/matrix/src/matrix/actions/limits.ts
|
|
8
8
|
function resolveMatrixActionLimit(raw, fallback) {
|
package/dist/{migration-snapshot.runtime-CKHE3xF9.js → migration-snapshot.runtime-C7yiKWS7.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as maybeCreateMatrixMigrationSnapshot } from "./migration-snapshot-backup-
|
|
1
|
+
import { t as maybeCreateMatrixMigrationSnapshot } from "./migration-snapshot-backup-BWTIFXgQ.js";
|
|
2
2
|
export { maybeCreateMatrixMigrationSnapshot };
|