@openclaw/matrix 2026.7.2-beta.4 → 2026.7.2-beta.5
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 +1 -1
- package/dist/api.js +4 -4
- package/dist/{approval-handler.runtime-AsawryfP.js → approval-handler.runtime-D1ibJgSk.js} +4 -4
- package/dist/{approval-ids-XAMP8vN9.js → approval-ids-2OQj32-K.js} +1 -1
- package/dist/{approval-reaction-auth-DButmM13.js → approval-reaction-auth-CCAWWkbu.js} +2 -2
- package/dist/{channel-MBtrY36B.js → channel-Cmi248PA.js} +28 -32
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel.runtime-Bi4Dgy2P.js → channel.runtime-BaPXFRgT.js} +34 -40
- package/dist/{cli-CcPuMyCk.js → cli-0CNHkps5.js} +863 -843
- package/dist/{cli-metadata-DAhDhbYX.js → cli-metadata-DnXxNCoj.js} +1 -1
- package/dist/cli-metadata.js +1 -1
- package/dist/{client-Dg8dk8NW.js → client-BFRg0kd4.js} +2 -2
- package/dist/{client-BwX6rURh.js → client-CitERujx.js} +2 -2
- package/dist/{client-bootstrap-ZAaO9fZ-.js → client-bootstrap-CkAnkzB6.js} +1 -1
- package/dist/{config-schema-CggnuwnJ.js → config-schema-BShrVROw.js} +16 -2
- package/dist/contract-api.js +2 -2
- package/dist/{create-client-Und1YmJ2.js → create-client-f-CkRllE.js} +3 -3
- package/dist/{crypto-runtime-_j7TpS7k.js → crypto-runtime-D9_6J5tZ.js} +2 -2
- package/dist/{device-health-D4LBxuPq.js → device-health-B4-YXtJR.js} +6 -1
- package/dist/{directory-live-B6fbX6jf.js → directory-live-YRgYDx2w.js} +3 -3
- package/dist/{doctor-C0LPJGTz.js → doctor-CM8ijNpW.js} +1 -1
- package/dist/{doctor-contract-CWVdlRQR.js → doctor-contract-BMSJkkAE.js} +21 -37
- package/dist/doctor-contract-api.js +4 -4
- package/dist/{draft-stream-BfibauH1.js → draft-stream-CIjafRr0.js} +1 -1
- package/dist/{file-sync-store-DUEWCEjb.js → file-sync-store-DiiFsayX.js} +1 -1
- package/dist/{http-client-DOyTG9l2.js → http-client-CycYxU9-.js} +1 -1
- package/dist/{idb-persistence-C6zQfW2w.js → idb-persistence-B6x7dMsF.js} +5 -11
- package/dist/index.js +1 -1
- package/dist/{logging-QH-48Gr6.js → logging-DV-p52N0.js} +8 -1
- package/dist/{media-text-Cv1VIHXW.js → media-text-DlQC_k_K.js} +1 -1
- package/dist/{messages-ClTgfFl6.js → messages-Bf_s--M9.js} +3 -3
- package/dist/{monitor-2BjKS9RV.js → monitor-s--XqoxF.js} +2037 -1803
- package/dist/plugin-entry.handlers.runtime.js +1 -1
- package/dist/probe.runtime-BJOvCHnZ.js +3 -0
- package/dist/{profile-update-C2My3TML.js → profile-update-z3aM46KS.js} +2 -2
- package/dist/{reaction-events-Cj6thhmc.js → reaction-events-DrK9Zua7.js} +2 -2
- package/dist/{recovery-key-store-0O8ARdT_.js → recovery-key-store-BNnHvXdk.js} +1 -1
- package/dist/{resolve-targets-Dn11HT76.js → resolve-targets-nNMcrV3W.js} +1 -1
- package/dist/{resolver.runtime-Zguh0hH9.js → resolver.runtime-BvaFlVLg.js} +1 -1
- package/dist/{room-info-B6vKD5DF.js → room-info-CAFZ3Z9J.js} +13 -12
- package/dist/{sdk-DiRXiRRf.js → sdk-UzPd8tst.js} +227 -181
- package/dist/{send-CZCmDQu8.js → send-C9Ssx-iV.js} +623 -108
- package/dist/session-binding-contract-api.js +1 -1
- package/dist/{setup-bootstrap-C9w01xQK.js → setup-bootstrap-BBGpPKgy.js} +2 -2
- package/dist/{setup-core-D6gyoyeg.js → setup-core-a542Ernq.js} +29 -27
- package/dist/setup-plugin-api.js +3 -3
- package/dist/{setup-surface-DZIEWtQC.js → setup-surface-BJrCI6KT.js} +32 -30
- package/dist/{shared-C7Vm9RxI.js → shared-CUH5otj8.js} +5 -12
- package/dist/{startup-verification-D1nscMh8.js → startup-verification-wm3_i88s.js} +1 -1
- package/dist/{storage-BrkTJZov.js → storage-BvAkgzvT.js} +20 -20
- package/dist/{thread-bindings-BcYBELC7.js → thread-bindings-D3RfVgAF.js} +4 -3
- package/dist/{tool-actions.runtime-Dbco_Vwn.js → tool-actions.runtime-Dh5ow2EK.js} +8 -8
- package/dist/{verification-DhMBWxOJ.js → verification-ZdAXdmuh.js} +1 -1
- package/package.json +4 -5
- package/dist/probe.runtime-BWkgfbiE.js +0 -3
- package/npm-shrinkwrap.json +0 -557
|
@@ -2,7 +2,7 @@ import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry";
|
|
|
2
2
|
//#region extensions/matrix/src/cli-metadata.ts
|
|
3
3
|
function registerMatrixCliMetadata(api) {
|
|
4
4
|
api.registerCli(async ({ program }) => {
|
|
5
|
-
const { registerMatrixCli } = await import("./cli-
|
|
5
|
+
const { registerMatrixCli } = await import("./cli-0CNHkps5.js");
|
|
6
6
|
registerMatrixCli({ program });
|
|
7
7
|
}, { descriptors: [{
|
|
8
8
|
name: "matrix",
|
package/dist/cli-metadata.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as registerMatrixCliMetadata, t as cli_metadata_default } from "./cli-metadata-
|
|
1
|
+
import { n as registerMatrixCliMetadata, t as cli_metadata_default } from "./cli-metadata-DnXxNCoj.js";
|
|
2
2
|
export { cli_metadata_default as default, registerMatrixCliMetadata };
|
|
@@ -3,8 +3,8 @@ import { t as getMatrixScopedEnvVarNames } from "./env-vars-B0NxQnPk.js";
|
|
|
3
3
|
import { i as resolveScopedMatrixEnvConfig, r as resolveMatrixEnvAuthReadiness, t as hasReadyMatrixEnvAuth } from "./env-auth-CQsYbz-p.js";
|
|
4
4
|
import { n as validateMatrixHomeserverUrl, t as resolveValidatedMatrixHomeserverUrl } from "./url-validation-GRHde6lq.js";
|
|
5
5
|
import { t as isBunRuntime } from "./runtime-BefyhPWv.js";
|
|
6
|
-
import { d as backfillMatrixAuthDeviceIdAfterStartup, f as resolveMatrixAuth, i as resolveSharedMatrixClient, m as resolveMatrixConfigForAccount, n as releaseSharedClientInstance, o as stopSharedClientForAccount, p as resolveMatrixAuthContext, r as removeSharedClientInstance, s as stopSharedClientInstance, t as acquireSharedMatrixClient } from "./shared-
|
|
7
|
-
import { t as createMatrixClient } from "./create-client-
|
|
6
|
+
import { d as backfillMatrixAuthDeviceIdAfterStartup, f as resolveMatrixAuth, i as resolveSharedMatrixClient, m as resolveMatrixConfigForAccount, n as releaseSharedClientInstance, o as stopSharedClientForAccount, p as resolveMatrixAuthContext, r as removeSharedClientInstance, s as stopSharedClientInstance, t as acquireSharedMatrixClient } from "./shared-CUH5otj8.js";
|
|
7
|
+
import { t as createMatrixClient } from "./create-client-f-CkRllE.js";
|
|
8
8
|
//#region extensions/matrix/src/matrix/client.ts
|
|
9
9
|
var client_exports = /* @__PURE__ */ __exportAll({
|
|
10
10
|
acquireSharedMatrixClient: () => acquireSharedMatrixClient,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
|
|
2
|
-
import {
|
|
3
|
-
import { n as withResolvedRuntimeMatrixClient } from "./client-bootstrap-
|
|
2
|
+
import { c as resolveMatrixRoomId } from "./send-C9Ssx-iV.js";
|
|
3
|
+
import { n as withResolvedRuntimeMatrixClient } from "./client-bootstrap-CkAnkzB6.js";
|
|
4
4
|
//#region extensions/matrix/src/matrix/actions/client.ts
|
|
5
5
|
var client_exports = /* @__PURE__ */ __exportAll({
|
|
6
6
|
withResolvedActionClient: () => withResolvedActionClient,
|
|
@@ -8,7 +8,7 @@ var client_bootstrap_exports = /* @__PURE__ */ __exportAll({
|
|
|
8
8
|
resolveRuntimeMatrixClientWithReadiness: () => resolveRuntimeMatrixClientWithReadiness,
|
|
9
9
|
withResolvedRuntimeMatrixClient: () => withResolvedRuntimeMatrixClient
|
|
10
10
|
});
|
|
11
|
-
const loadMatrixSharedClientRuntimeDeps = createLazyRuntimeModule(() => Promise.all([import("./client-
|
|
11
|
+
const loadMatrixSharedClientRuntimeDeps = createLazyRuntimeModule(() => Promise.all([import("./client-BFRg0kd4.js").then((n) => n.t), import("./shared-CUH5otj8.js").then((n) => n.a)]).then(([clientModule, sharedModule]) => ({
|
|
12
12
|
acquireSharedMatrixClient: clientModule.acquireSharedMatrixClient,
|
|
13
13
|
resolveMatrixAuthContext: clientModule.resolveMatrixAuthContext,
|
|
14
14
|
releaseSharedClientInstance: sharedModule.releaseSharedClientInstance
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as resolveMatrixAccountConfig } from "./account-config-BZWN9tGS.js";
|
|
2
|
-
import { _ as resolveMatrixAccount, g as resolveDefaultMatrixAccountId, m as listMatrixAccountIds } from "./setup-core-
|
|
2
|
+
import { _ as resolveMatrixAccount, g as resolveDefaultMatrixAccountId, m as listMatrixAccountIds } from "./setup-core-a542Ernq.js";
|
|
3
3
|
import { adaptScopedAccountAccessor, createScopedChannelConfigAdapter } from "openclaw/plugin-sdk/channel-config-helpers";
|
|
4
4
|
import { createChannelConfigUiHints } from "openclaw/plugin-sdk/channel-core";
|
|
5
5
|
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
@@ -211,11 +211,25 @@ const matrixStreamingSchema = z.object({
|
|
|
211
211
|
}).strict().optional(),
|
|
212
212
|
preview: z.object({ toolProgress: z.boolean().optional() }).strict().optional()
|
|
213
213
|
}).strict();
|
|
214
|
+
const retiredMatrixAccountStreamingKeys = [
|
|
215
|
+
"streamMode",
|
|
216
|
+
"chunkMode",
|
|
217
|
+
"blockStreaming",
|
|
218
|
+
"blockStreamingCoalesce",
|
|
219
|
+
"draftChunk"
|
|
220
|
+
];
|
|
221
|
+
function hasCanonicalMatrixAccountStreaming(account) {
|
|
222
|
+
if (typeof account !== "object" || account === null || Array.isArray(account)) return true;
|
|
223
|
+
if (retiredMatrixAccountStreamingKeys.some((key) => Object.hasOwn(account, key))) return false;
|
|
224
|
+
if (!Object.hasOwn(account, "streaming")) return true;
|
|
225
|
+
const streaming = account.streaming;
|
|
226
|
+
return typeof streaming === "object" && streaming !== null && !Array.isArray(streaming);
|
|
227
|
+
}
|
|
214
228
|
const MatrixChannelConfigSchema = buildChannelConfigSchema(z.object({
|
|
215
229
|
name: z.string().optional(),
|
|
216
230
|
enabled: z.boolean().optional(),
|
|
217
231
|
defaultAccount: z.string().optional(),
|
|
218
|
-
accounts: z.record(z.string(), z.unknown()).optional(),
|
|
232
|
+
accounts: z.record(z.string(), z.unknown().refine(hasCanonicalMatrixAccountStreaming, { message: "flat or scalar streaming values are no longer supported; use streaming.* and run \"openclaw doctor --fix\"" })).optional(),
|
|
219
233
|
markdown: MarkdownConfigSchema,
|
|
220
234
|
homeserver: z.string().optional(),
|
|
221
235
|
network: matrixNetworkSchema,
|
package/dist/contract-api.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { d as namedAccountPromotionKeys, f as resolveSingleAccountPromotionTarget, n as matrixSetupAdapter, p as singleAccountKeysToMove } from "./setup-core-
|
|
2
|
-
import { n as matrixOnboardingAdapter } from "./setup-surface-
|
|
1
|
+
import { d as namedAccountPromotionKeys, f as resolveSingleAccountPromotionTarget, n as matrixSetupAdapter, p as singleAccountKeysToMove } from "./setup-core-a542Ernq.js";
|
|
2
|
+
import { n as matrixOnboardingAdapter } from "./setup-surface-BJrCI6KT.js";
|
|
3
3
|
export { matrixSetupAdapter, matrixOnboardingAdapter as matrixSetupWizard, namedAccountPromotionKeys, resolveSingleAccountPromotionTarget, singleAccountKeysToMove };
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
|
|
2
2
|
import { t as resolveValidatedMatrixHomeserverUrl } from "./url-validation-GRHde6lq.js";
|
|
3
|
-
import { d as writeStorageMeta, l as resolveMatrixStoragePaths, r as maybeMigrateLegacyStorage } from "./storage-
|
|
4
|
-
import "./shared-
|
|
3
|
+
import { d as writeStorageMeta, l as resolveMatrixStoragePaths, r as maybeMigrateLegacyStorage } from "./storage-BvAkgzvT.js";
|
|
4
|
+
import "./shared-CUH5otj8.js";
|
|
5
5
|
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
6
6
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
7
7
|
import { ssrfPolicyFromDangerouslyAllowPrivateNetwork } from "openclaw/plugin-sdk/ssrf-runtime";
|
|
8
8
|
import fs from "node:fs";
|
|
9
9
|
//#region extensions/matrix/src/matrix/client/create-client.ts
|
|
10
10
|
var create_client_exports = /* @__PURE__ */ __exportAll({ createMatrixClient: () => createMatrixClient });
|
|
11
|
-
const loadMatrixCreateClientRuntimeDeps = createLazyRuntimeModule(() => Promise.all([import("./sdk-
|
|
11
|
+
const loadMatrixCreateClientRuntimeDeps = createLazyRuntimeModule(() => Promise.all([import("./sdk-UzPd8tst.js"), import("./logging-DV-p52N0.js").then((n) => n.n)]).then(([sdkModule, loggingModule]) => ({
|
|
12
12
|
MatrixClient: sdkModule.MatrixClient,
|
|
13
13
|
ensureMatrixSdkLoggingConfigured: loggingModule.ensureMatrixSdkLoggingConfigured
|
|
14
14
|
})));
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as formatMatrixErrorMessage } from "./errors-C47hvAF8.js";
|
|
2
2
|
import { t as ensureMatrixCryptoRuntime } from "./deps-CcVJfvRM.js";
|
|
3
3
|
import { n as LogService, r as noop } from "./logger-D0GCSDQq.js";
|
|
4
|
-
import { i as restoreIdbFromDisk, n as persistIdbToDisk } from "./idb-persistence-
|
|
5
|
-
import { n as isRepairableSecretStorageAccessError } from "./recovery-key-store-
|
|
4
|
+
import { i as restoreIdbFromDisk, n as persistIdbToDisk } from "./idb-persistence-B6x7dMsF.js";
|
|
5
|
+
import { n as isRepairableSecretStorageAccessError } from "./recovery-key-store-BNnHvXdk.js";
|
|
6
6
|
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
7
7
|
import { resolveDateTimestampMs, resolveTimestampMsToIsoString } from "openclaw/plugin-sdk/number-runtime";
|
|
8
8
|
import { MatrixEventEvent } from "matrix-js-sdk/lib/matrix.js";
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
|
|
1
2
|
//#region extensions/matrix/src/matrix/device-health.ts
|
|
3
|
+
var device_health_exports = /* @__PURE__ */ __exportAll({
|
|
4
|
+
isOpenClawManagedMatrixDevice: () => isOpenClawManagedMatrixDevice,
|
|
5
|
+
summarizeMatrixDeviceHealth: () => summarizeMatrixDeviceHealth
|
|
6
|
+
});
|
|
2
7
|
const OPENCLAW_DEVICE_NAME_PREFIX = "OpenClaw ";
|
|
3
8
|
function isOpenClawManagedMatrixDevice(displayName) {
|
|
4
9
|
return displayName?.startsWith(OPENCLAW_DEVICE_NAME_PREFIX) === true;
|
|
@@ -13,4 +18,4 @@ function summarizeMatrixDeviceHealth(devices) {
|
|
|
13
18
|
};
|
|
14
19
|
}
|
|
15
20
|
//#endregion
|
|
16
|
-
export { isOpenClawManagedMatrixDevice, summarizeMatrixDeviceHealth };
|
|
21
|
+
export { isOpenClawManagedMatrixDevice as n, summarizeMatrixDeviceHealth as r, device_health_exports as t };
|
|
@@ -1,8 +1,8 @@
|
|
|
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 { f as resolveMatrixAuth } from "./shared-
|
|
4
|
-
import "./client-
|
|
5
|
-
import { t as MatrixAuthedHttpClient } from "./http-client-
|
|
3
|
+
import { f as resolveMatrixAuth } from "./shared-CUH5otj8.js";
|
|
4
|
+
import "./client-BFRg0kd4.js";
|
|
5
|
+
import { t as MatrixAuthedHttpClient } from "./http-client-CycYxU9-.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,4 +1,4 @@
|
|
|
1
|
-
import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-
|
|
1
|
+
import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-BMSJkkAE.js";
|
|
2
2
|
import { detectPluginInstallPathIssue, formatPluginInstallPathIssue, removePluginFromConfig } from "openclaw/plugin-sdk/runtime-doctor";
|
|
3
3
|
//#region extensions/matrix/src/doctor.ts
|
|
4
4
|
async function collectMatrixInstallPathWarnings(cfg) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as isRecord } from "./record-shared-CWWx6fvI.js";
|
|
2
|
-
import { defineChannelAliasMigration, hasLegacyAccountStreamingAliases, normalizeChannelConfigEntries, stripRetiredChannelKeys } from "openclaw/plugin-sdk/runtime-doctor";
|
|
2
|
+
import { defineChannelAliasMigration, defineKeyMoveMigration, hasLegacyAccountStreamingAliases, normalizeChannelConfigEntries, stripRetiredChannelKeys } from "openclaw/plugin-sdk/runtime-doctor";
|
|
3
3
|
import { hasLegacyFlatAllowPrivateNetworkAlias, migrateLegacyFlatAllowPrivateNetworkAlias } from "openclaw/plugin-sdk/ssrf-runtime";
|
|
4
4
|
//#region extensions/matrix/src/doctor-contract.ts
|
|
5
5
|
function parseMatrixStreamingMode(value) {
|
|
@@ -20,14 +20,16 @@ const streamingAliasMigration = defineChannelAliasMigration({
|
|
|
20
20
|
},
|
|
21
21
|
accountStreamingReplacesRoot: true
|
|
22
22
|
});
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
23
|
+
const roomAllowMigration = defineKeyMoveMigration({
|
|
24
|
+
scope: ["*"],
|
|
25
|
+
from: ["allow"],
|
|
26
|
+
to: ["enabled"],
|
|
27
|
+
sourceOwn: false,
|
|
28
|
+
match: (value) => typeof value === "boolean",
|
|
29
|
+
targetIsSet: (value) => typeof value === "boolean",
|
|
30
|
+
movedMessage: ({ sourcePath, targetPath, mappedValue }) => `Moved ${sourcePath} → ${targetPath} (${String(mappedValue)}).`,
|
|
31
|
+
existingMessage: ({ sourcePath, targetPath, targetValue }) => `Moved ${sourcePath} → ${targetPath} (${String(targetValue)}).`
|
|
32
|
+
});
|
|
31
33
|
function hasLegacyTrustedDmPolicy(value) {
|
|
32
34
|
const root = isRecord(value) ? value : null;
|
|
33
35
|
if (!root) return false;
|
|
@@ -55,24 +57,6 @@ function migrateLegacyTrustedDmPolicy(params) {
|
|
|
55
57
|
changed: true
|
|
56
58
|
};
|
|
57
59
|
}
|
|
58
|
-
function normalizeMatrixRoomAllowAliases(params) {
|
|
59
|
-
let changed = false;
|
|
60
|
-
const nextRooms = { ...params.rooms };
|
|
61
|
-
for (const [roomId, roomValue] of Object.entries(params.rooms)) {
|
|
62
|
-
const room = isRecord(roomValue) ? roomValue : null;
|
|
63
|
-
if (!room || typeof room.allow !== "boolean") continue;
|
|
64
|
-
const nextRoom = { ...room };
|
|
65
|
-
if (typeof nextRoom.enabled !== "boolean") nextRoom.enabled = room.allow;
|
|
66
|
-
delete nextRoom.allow;
|
|
67
|
-
nextRooms[roomId] = nextRoom;
|
|
68
|
-
changed = true;
|
|
69
|
-
params.changes.push(`Moved ${params.pathPrefix}.${roomId}.allow → ${params.pathPrefix}.${roomId}.enabled (${String(nextRoom.enabled)}).`);
|
|
70
|
-
}
|
|
71
|
-
return {
|
|
72
|
-
rooms: nextRooms,
|
|
73
|
-
changed
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
60
|
const legacyConfigRules = [
|
|
77
61
|
...streamingAliasMigration.legacyConfigRules,
|
|
78
62
|
{
|
|
@@ -96,7 +80,7 @@ const legacyConfigRules = [
|
|
|
96
80
|
"groups"
|
|
97
81
|
],
|
|
98
82
|
message: "channels.matrix.groups.<room>.allow is legacy; use channels.matrix.groups.<room>.enabled instead. Run \"openclaw doctor --fix\".",
|
|
99
|
-
match:
|
|
83
|
+
match: roomAllowMigration.hasLegacy
|
|
100
84
|
},
|
|
101
85
|
{
|
|
102
86
|
path: [
|
|
@@ -105,7 +89,7 @@ const legacyConfigRules = [
|
|
|
105
89
|
"rooms"
|
|
106
90
|
],
|
|
107
91
|
message: "channels.matrix.rooms.<room>.allow is legacy; use channels.matrix.rooms.<room>.enabled instead. Run \"openclaw doctor --fix\".",
|
|
108
|
-
match:
|
|
92
|
+
match: roomAllowMigration.hasLegacy
|
|
109
93
|
},
|
|
110
94
|
{
|
|
111
95
|
path: [
|
|
@@ -116,7 +100,7 @@ const legacyConfigRules = [
|
|
|
116
100
|
message: "channels.matrix.accounts.<id>.{groups,rooms}.<room>.allow is legacy; use channels.matrix.accounts.<id>.{groups,rooms}.<room>.enabled instead. Run \"openclaw doctor --fix\".",
|
|
117
101
|
match: (value) => hasLegacyAccountStreamingAliases(value, (account) => {
|
|
118
102
|
if (!isRecord(account)) return false;
|
|
119
|
-
return
|
|
103
|
+
return roomAllowMigration.hasLegacy(account.groups) || roomAllowMigration.hasLegacy(account.rooms);
|
|
120
104
|
})
|
|
121
105
|
},
|
|
122
106
|
{
|
|
@@ -142,16 +126,16 @@ function normalizeMatrixEntry(params) {
|
|
|
142
126
|
});
|
|
143
127
|
let entry = dmPolicy.entry;
|
|
144
128
|
let changed = network.changed || dmPolicy.changed;
|
|
145
|
-
for (const
|
|
146
|
-
const
|
|
147
|
-
if (!
|
|
148
|
-
const normalized =
|
|
149
|
-
|
|
150
|
-
pathPrefix: `${params.pathPrefix}.${
|
|
129
|
+
for (const section of ["groups", "rooms"]) {
|
|
130
|
+
const roomMap = isRecord(entry[section]) ? entry[section] : null;
|
|
131
|
+
if (!roomMap) continue;
|
|
132
|
+
const normalized = roomAllowMigration.normalize({
|
|
133
|
+
entry: roomMap,
|
|
134
|
+
pathPrefix: `${params.pathPrefix}.${section}`,
|
|
151
135
|
changes: params.changes
|
|
152
136
|
});
|
|
153
137
|
if (normalized.changed) {
|
|
154
|
-
entry = Object.assign({}, entry, { [
|
|
138
|
+
entry = Object.assign({}, entry, { [section]: normalized.entry });
|
|
155
139
|
changed = true;
|
|
156
140
|
}
|
|
157
141
|
}
|
|
@@ -2,11 +2,11 @@ import { a as resolveMatrixDefaultOrOnlyAccountId, n as requiresExplicitMatrixDe
|
|
|
2
2
|
import { t as isRecord$1 } from "./record-shared-CWWx6fvI.js";
|
|
3
3
|
import { r as resolveMatrixCredentialsDir } from "./storage-paths-gUmSydsW.js";
|
|
4
4
|
import { a as isMatrixCredentialRevocation, c as normalizeMatrixStoredCredentials, s as matrixCredentialsStoreKey, t as MATRIX_CREDENTIALS_NAMESPACE } from "./credentials-read-DVmFCm7X.js";
|
|
5
|
-
import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-
|
|
6
|
-
import { C as readLegacyMatrixRecoveryKeyState, O as writeMatrixIdbSnapshotJsonToStore, T as readMatrixIdbSnapshotJsonFromStore, a as openMatrixStorageMetaStoreOptions, b as openMatrixRecoveryKeyStoreOptions, f as MATRIX_IDB_SNAPSHOT_FILENAME, g as hasMatrixRecoveryKeyStateInStore, h as hasMatrixLegacyCryptoMigrationStateInStore, i as normalizeMatrixStorageMetadata, j as writeMatrixRecoveryKeyStateToStore, k as writeMatrixLegacyCryptoMigrationStateToStore, m as MATRIX_RECOVERY_KEY_FILENAME, n as hasMatrixStorageMetaStateInStore, p as MATRIX_LEGACY_CRYPTO_MIGRATION_FILENAME, u as writeMatrixStorageMetaStateToStore, v as openMatrixIdbSnapshotStoreOptions, x as readLegacyMatrixLegacyCryptoMigrationState, y as openMatrixLegacyCryptoMigrationStoreOptions } from "./storage-
|
|
7
|
-
import { a as readLegacyMatrixSyncCacheState, i as openMatrixSyncCacheStoreOptions, o as writeMatrixSyncCacheStateToStore, r as hasMatrixSyncCacheStateInStore } from "./file-sync-store-
|
|
5
|
+
import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-BMSJkkAE.js";
|
|
6
|
+
import { C as readLegacyMatrixRecoveryKeyState, O as writeMatrixIdbSnapshotJsonToStore, T as readMatrixIdbSnapshotJsonFromStore, a as openMatrixStorageMetaStoreOptions, b as openMatrixRecoveryKeyStoreOptions, f as MATRIX_IDB_SNAPSHOT_FILENAME, g as hasMatrixRecoveryKeyStateInStore, h as hasMatrixLegacyCryptoMigrationStateInStore, i as normalizeMatrixStorageMetadata, j as writeMatrixRecoveryKeyStateToStore, k as writeMatrixLegacyCryptoMigrationStateToStore, m as MATRIX_RECOVERY_KEY_FILENAME, n as hasMatrixStorageMetaStateInStore, p as MATRIX_LEGACY_CRYPTO_MIGRATION_FILENAME, u as writeMatrixStorageMetaStateToStore, v as openMatrixIdbSnapshotStoreOptions, x as readLegacyMatrixLegacyCryptoMigrationState, y as openMatrixLegacyCryptoMigrationStoreOptions } from "./storage-BvAkgzvT.js";
|
|
7
|
+
import { a as readLegacyMatrixSyncCacheState, i as openMatrixSyncCacheStoreOptions, o as writeMatrixSyncCacheStateToStore, r as hasMatrixSyncCacheStateInStore } from "./file-sync-store-DiiFsayX.js";
|
|
8
8
|
import { n as MATRIX_IDB_SNAPSHOT_LOCK_OPTIONS } from "./idb-persistence-lock-DAJ49nZX.js";
|
|
9
|
-
import { r as readLegacyMatrixIdbSnapshotStateUnlocked, t as isValidMatrixIdbSnapshotJson } from "./idb-persistence-
|
|
9
|
+
import { r as readLegacyMatrixIdbSnapshotStateUnlocked, t as isValidMatrixIdbSnapshotJson } from "./idb-persistence-B6x7dMsF.js";
|
|
10
10
|
import { a as resolveMatrixInboundDedupeStateNamespace, n as MATRIX_INBOUND_DEDUPE_TTL_MS, r as buildMatrixInboundDedupeEventKey } from "./inbound-dedupe-CaBLblef.js";
|
|
11
11
|
import { isRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
12
12
|
import { normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { _ as MsgType, a as sendSingleTextMessageMatrix, t as editMessageMatrix, y as prepareMatrixSingleText } from "./send-C9Ssx-iV.js";
|
|
2
2
|
import { createDraftStreamLoop } from "openclaw/plugin-sdk/channel-outbound";
|
|
3
3
|
//#region extensions/matrix/src/matrix/draft-stream.ts
|
|
4
4
|
const DEFAULT_THROTTLE_MS = 1e3;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
|
|
2
2
|
import { t as isRecord } from "./record-shared-CWWx6fvI.js";
|
|
3
3
|
import { t as getMatrixRuntime } from "./runtime-6S3DNFNv.js";
|
|
4
|
-
import { M as resolveMatrixSqliteStateEnv, t as claimCurrentTokenStorageState } from "./storage-
|
|
4
|
+
import { M as resolveMatrixSqliteStateEnv, t as claimCurrentTokenStorageState } from "./storage-BvAkgzvT.js";
|
|
5
5
|
import { n as LogService } from "./logger-D0GCSDQq.js";
|
|
6
6
|
import { createHash, randomUUID } from "node:crypto";
|
|
7
7
|
import path from "node:path";
|
|
@@ -254,7 +254,7 @@ function createMatrixGuardedFetch(params) {
|
|
|
254
254
|
async function performMatrixRequest(params) {
|
|
255
255
|
const isAbsoluteEndpoint = params.endpoint.startsWith("http://") || params.endpoint.startsWith("https://");
|
|
256
256
|
if (isAbsoluteEndpoint && params.allowAbsoluteEndpoint !== true) throw new Error(`Absolute Matrix endpoint is blocked by default: ${params.endpoint}. Set allowAbsoluteEndpoint=true to opt in.`);
|
|
257
|
-
const baseUrl = isAbsoluteEndpoint ? new URL(params.endpoint) : new URL(
|
|
257
|
+
const baseUrl = isAbsoluteEndpoint ? new URL(params.endpoint) : new URL(`${params.homeserver.replace(/\/+$/u, "")}${normalizeEndpoint(params.endpoint)}`);
|
|
258
258
|
applyQuery(baseUrl, params.qs);
|
|
259
259
|
const headers = new Headers();
|
|
260
260
|
headers.set("Accept", params.raw ? "*/*" : "application/json");
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { D as writeMatrixIdbSnapshotJson, f as MATRIX_IDB_SNAPSHOT_FILENAME, w as readMatrixIdbSnapshotJson } from "./storage-
|
|
1
|
+
import { D as writeMatrixIdbSnapshotJson, f as MATRIX_IDB_SNAPSHOT_FILENAME, w as readMatrixIdbSnapshotJson } from "./storage-BvAkgzvT.js";
|
|
2
2
|
import { n as LogService } from "./logger-D0GCSDQq.js";
|
|
3
3
|
import { n as MATRIX_IDB_SNAPSHOT_LOCK_OPTIONS } from "./idb-persistence-lock-DAJ49nZX.js";
|
|
4
4
|
import path from "node:path";
|
|
5
|
+
import { toErrorObject } from "openclaw/plugin-sdk/error-runtime";
|
|
5
6
|
import fs from "node:fs";
|
|
6
7
|
import { withFileLock } from "openclaw/plugin-sdk/file-lock";
|
|
7
8
|
import { indexedDB } from "fake-indexeddb";
|
|
@@ -55,7 +56,7 @@ function isValidMatrixIdbSnapshotJson(data) {
|
|
|
55
56
|
function idbReq(req) {
|
|
56
57
|
return new Promise((resolve, reject) => {
|
|
57
58
|
req.addEventListener("success", () => resolve(req.result), { once: true });
|
|
58
|
-
req.addEventListener("error", () => reject(
|
|
59
|
+
req.addEventListener("error", () => reject(toErrorObject(req.error, "Non-Error rejection")), { once: true });
|
|
59
60
|
});
|
|
60
61
|
}
|
|
61
62
|
async function dumpIndexedDatabases(databasePrefix) {
|
|
@@ -69,7 +70,7 @@ async function dumpIndexedDatabases(databasePrefix) {
|
|
|
69
70
|
const db = await new Promise((resolve, reject) => {
|
|
70
71
|
const r = idb.open(name, version);
|
|
71
72
|
r.addEventListener("success", () => resolve(r.result), { once: true });
|
|
72
|
-
r.addEventListener("error", () => reject(
|
|
73
|
+
r.addEventListener("error", () => reject(toErrorObject(r.error, "Non-Error rejection")), { once: true });
|
|
73
74
|
});
|
|
74
75
|
const stores = [];
|
|
75
76
|
for (const storeName of db.objectStoreNames) {
|
|
@@ -141,7 +142,7 @@ async function restoreIndexedDatabases(snapshot) {
|
|
|
141
142
|
resolve();
|
|
142
143
|
})().catch(reject);
|
|
143
144
|
}, { once: true });
|
|
144
|
-
r.addEventListener("error", () => reject(
|
|
145
|
+
r.addEventListener("error", () => reject(toErrorObject(r.error, "Non-Error rejection")), { once: true });
|
|
145
146
|
});
|
|
146
147
|
}
|
|
147
148
|
function resolveDefaultIdbSnapshotPath() {
|
|
@@ -227,12 +228,5 @@ function throwLegacySnapshotMigrationRequired() {
|
|
|
227
228
|
LogService.warn("IdbPersistence", LEGACY_SNAPSHOT_DIAGNOSTIC);
|
|
228
229
|
throw new MatrixIdbSnapshotMigrationRequiredError();
|
|
229
230
|
}
|
|
230
|
-
function toLintErrorObject(value, fallbackMessage) {
|
|
231
|
-
if (value instanceof Error) return value;
|
|
232
|
-
if (typeof value === "string") return new Error(value);
|
|
233
|
-
const error = new Error(fallbackMessage, { cause: value });
|
|
234
|
-
if (typeof value === "object" && value !== null || typeof value === "function") Object.assign(error, value);
|
|
235
|
-
return error;
|
|
236
|
-
}
|
|
237
231
|
//#endregion
|
|
238
232
|
export { restoreIdbFromDisk as i, persistIdbToDisk as n, readLegacyMatrixIdbSnapshotStateUnlocked as r, isValidMatrixIdbSnapshotJson as t };
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as registerMatrixCliMetadata } from "./cli-metadata-
|
|
1
|
+
import { n as registerMatrixCliMetadata } from "./cli-metadata-DnXxNCoj.js";
|
|
2
2
|
import { registerMatrixSubagentHooks } from "./subagent-hooks-api.js";
|
|
3
3
|
import { defineBundledChannelEntry } from "openclaw/plugin-sdk/channel-entry-contract";
|
|
4
4
|
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
@@ -1,6 +1,13 @@
|
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
|
|
1
2
|
import { i as setMatrixConsoleLogging, n as LogService, t as ConsoleLogger } from "./logger-D0GCSDQq.js";
|
|
2
3
|
import { logger } from "matrix-js-sdk/lib/logger.js";
|
|
3
4
|
//#region extensions/matrix/src/matrix/client/logging.ts
|
|
5
|
+
var logging_exports = /* @__PURE__ */ __exportAll({
|
|
6
|
+
createMatrixJsSdkClientLogger: () => createMatrixJsSdkClientLogger,
|
|
7
|
+
ensureMatrixSdkLoggingConfigured: () => ensureMatrixSdkLoggingConfigured,
|
|
8
|
+
setMatrixSdkConsoleLogging: () => setMatrixSdkConsoleLogging,
|
|
9
|
+
setMatrixSdkLogMode: () => setMatrixSdkLogMode
|
|
10
|
+
});
|
|
4
11
|
let matrixSdkLoggingConfigured = false;
|
|
5
12
|
let matrixSdkLogMode = "default";
|
|
6
13
|
const matrixSdkBaseLogger = new ConsoleLogger();
|
|
@@ -89,4 +96,4 @@ function createMatrixJsSdkLoggerInstance(prefix) {
|
|
|
89
96
|
};
|
|
90
97
|
}
|
|
91
98
|
//#endregion
|
|
92
|
-
export {
|
|
99
|
+
export { setMatrixSdkLogMode as i, logging_exports as n, setMatrixSdkConsoleLogging as r, createMatrixJsSdkClientLogger as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
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-
|
|
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-C9Ssx-iV.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
1
|
import { r as isMatrixNotFoundError } from "./errors-C47hvAF8.js";
|
|
2
|
-
import { T as isPollStartType,
|
|
2
|
+
import { T as isPollStartType, r as sendMessageMatrix, t as editMessageMatrix, w as isPollEventType } from "./send-C9Ssx-iV.js";
|
|
3
3
|
import { n as MATRIX_REACTION_EVENT_TYPE } from "./reaction-common-DkrQdBSZ.js";
|
|
4
|
-
import { a as resolveMatrixMessageAttachment, l as resolveMatrixPollRootEventId, o as resolveMatrixMessageBody, s as fetchMatrixPollMessageSummary } from "./media-text-
|
|
5
|
-
import { r as withResolvedRoomAction } from "./client-
|
|
4
|
+
import { a as resolveMatrixMessageAttachment, l as resolveMatrixPollRootEventId, o as resolveMatrixMessageBody, s as fetchMatrixPollMessageSummary } from "./media-text-DlQC_k_K.js";
|
|
5
|
+
import { r as withResolvedRoomAction } from "./client-CitERujx.js";
|
|
6
6
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
7
7
|
import { resolveIntegerOption } from "openclaw/plugin-sdk/number-runtime";
|
|
8
8
|
//#region extensions/matrix/src/matrix/actions/limits.ts
|