@openclaw/matrix 2026.10.10-beta.5 → 2026.11.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.
- package/dist/.setup/{account-config-CRsKoMqJ.mjs → account-config-CVM2a28p.mjs} +1 -2
- package/dist/.setup/{account-selection-Bs_jCAaG.mjs → account-selection-BPFpdMIw.mjs} +5 -8
- package/dist/.setup/{approval-handler.runtime-6u08WKWh.mjs → approval-handler.runtime-BvuXpzus.mjs} +8 -9
- package/dist/.setup/{approval-reactions-D2pEUrFS.mjs → approval-reactions-DMDBJos0.mjs} +2 -3
- package/dist/.setup/{backup-health-Dm_YMVFT.mjs → backup-health-BxH69np2.mjs} +1 -2
- package/dist/.setup/{channel-CqkLHNdp.mjs → channel-DYRabwmj.mjs} +30 -43
- package/dist/.setup/{channel.runtime-BfZdvlho.mjs → channel.runtime-C0VWk0Ch.mjs} +8 -10
- package/dist/.setup/{channel.setup-ClA7V_Ba.mjs → channel.setup-Dp7V9AgV.mjs} +7 -11
- package/dist/.setup/{cli-metadata-COWLWR3E.mjs → cli-metadata-DemZndyG.mjs} +3 -5
- package/dist/.setup/{cli-BLgMlO3I.mjs → cli-umlumhB6.mjs} +28 -39
- package/dist/.setup/{client-C4Gibhzl.mjs → client-BIsYqIzM.mjs} +19 -25
- package/dist/.setup/{client-C7pZ6gAl.mjs → client-DL_aELCJ.mjs} +4 -5
- package/dist/.setup/{client-bootstrap-kOIDV4z_.mjs → client-bootstrap-kdsygurH.mjs} +2 -3
- package/dist/.setup/{client-support-D-xHScuo.mjs → client-support-CFofPPPm.mjs} +3 -5
- package/dist/.setup/{config-paths-CnREYb1Y.mjs → config-paths-DBpHxDyc.mjs} +1 -2
- package/dist/.setup/{create-client-BS8UYx6N.mjs → create-client-BFkMM7SP.mjs} +8 -9
- package/dist/.setup/{credentials-CPnJZaZB.mjs → credentials-B3MlOOom.mjs} +5 -6
- package/dist/.setup/{credentials-read-D2ULV55A.mjs → credentials-read-BOuCoy-p.mjs} +5 -6
- package/dist/.setup/{credentials-state-B3cuUFwZ.mjs → credentials-state-jxq29yQw.mjs} +1 -2
- package/dist/.setup/{crypto-node.runtime-6Aj_ltHQ.mjs → crypto-node.runtime-E_hqXGxm.mjs} +1 -2
- package/dist/.setup/{crypto-runtime-D8yY7kjD.mjs → crypto-runtime-s3ogwLRO.mjs} +12 -19
- package/dist/.setup/{crypto-state-store-D4wrCvFs.mjs → crypto-state-store-CM57gchf.mjs} +3 -4
- package/dist/.setup/{crypto-store-ownership-Z_Y5WRKr.mjs → crypto-store-ownership-Bratn-Np.mjs} +3 -4
- package/dist/.setup/{crypto-unsafe-state-doctor-C8szCYmf.mjs → crypto-unsafe-state-doctor-ClzRgr8z.mjs} +7 -8
- package/dist/.setup/{deps-L_1bUAGL.mjs → deps-O7rEnklr.mjs} +1 -2
- package/dist/.setup/{device-health-Be60VF1w.mjs → device-health-CmvwmCHB.mjs} +2 -3
- package/dist/.setup/{direct-management-B3wYhx_M.mjs → direct-management-BOYMqZJQ.mjs} +7 -11
- package/dist/.setup/{directory-live-BpSz-FQB.mjs → directory-live-tItssg9q.mjs} +5 -6
- package/dist/.setup/doctor-contract-GiXgCj7k.mjs +37 -0
- package/dist/.setup/{draft-stream-K6Lu-JEI.mjs → draft-stream-Buru5huX.mjs} +3 -4
- package/dist/.setup/{encryption-guidance-D5_IsDIy.mjs → encryption-guidance-CLloQ6H7.mjs} +3 -4
- package/dist/.setup/{env-vars-aEBngJPa.mjs → env-vars-Bh1iOXJ1.mjs} +1 -2
- package/dist/.setup/{errors-Bw4EHwKX.mjs → errors-CL3YJV8U.mjs} +1 -2
- package/dist/.setup/{event-helpers-CxNgMQqH.mjs → event-helpers-DDUjVVf7.mjs} +1 -2
- package/dist/.setup/{exec-approvals-DtNw0e04.mjs → exec-approvals-CWeSpE6V.mjs} +6 -9
- package/dist/.setup/{file-sync-store-CUH8EAJq.mjs → file-sync-store-D1sEtAap.mjs} +5 -6
- package/dist/.setup/{http-client-ByR4STVQ.mjs → http-client-CxTmU1kT.mjs} +4 -7
- package/dist/.setup/{idb-persistence-BHTYPRe_.mjs → idb-persistence-BF0MZglD.mjs} +6 -7
- package/dist/.setup/{idb-persistence-lock-Bh3ZLIsE.mjs → idb-persistence-lock-CH2K6d_3.mjs} +1 -2
- package/dist/.setup/{inbound-dedupe-C-EBGY0B.mjs → inbound-dedupe-CZnOq0ja.mjs} +2 -3
- package/dist/.setup/{joined-room-encryption-BAD70N5n.mjs → joined-room-encryption-Dl7Sb9FF.mjs} +2 -3
- package/dist/.setup/{logger-CXQnpXCt.mjs → logger-BX5kXvh1.mjs} +2 -3
- package/dist/.setup/{logging-BKV8TYQq.mjs → logging-BWPjyW9s.mjs} +3 -4
- package/dist/.setup/{messages-O6G0-_xr.mjs → messages-Dt51OgyD.mjs} +9 -14
- package/dist/.setup/{monitor-BSEZMFyq.mjs → monitor-BrBbFO8h.mjs} +85 -94
- package/dist/.setup/{onboarding-DQLF7huY.mjs → onboarding-QfFvgZ85.mjs} +10 -11
- package/dist/.setup/{outbound-C0bqZr89.mjs → outbound-B8h2BwR2.mjs} +3 -4
- package/dist/.setup/{profile-update-BbfEg9Fx.mjs → profile-update-DiXtw0NM.mjs} +6 -8
- package/dist/.setup/{reaction-events-51DOeO0I.mjs → reaction-events-xTg2_wZJ.mjs} +8 -9
- package/dist/.setup/{resolve-targets-BJ5sIKeM.mjs → resolve-targets-vlr765on.mjs} +4 -5
- package/dist/.setup/{retired-state-DOCruzWd.mjs → retired-state-vIr2IB90.mjs} +4 -7
- package/dist/.setup/{room-info-DAJKw-I8.mjs → room-info-BSvDbUmt.mjs} +6 -8
- package/dist/.setup/{runtime-1kn1P6io.mjs → runtime-Ck8TjD7L.mjs} +1 -2
- package/dist/.setup/{doctor-contract-CsTNmbMa.mjs → runtime-doctor-migrations-CSvRANPN.mjs} +17 -58
- package/dist/.setup/{runtime-setter-api-i2MOXoT3.mjs → runtime-setter-api-CpwhcBQK.mjs} +1 -1
- package/dist/.setup/{sdk-ByU8So5S.mjs → sdk-BYR5_wri.mjs} +32 -47
- package/dist/.setup/{secret-contract-DxyzKSzf.mjs → secret-contract-AKnr45nw.mjs} +2 -3
- package/dist/.setup/{secret-contract-api-Dukgvike.mjs → secret-contract-api-DMSwMIxd.mjs} +1 -1
- package/dist/.setup/{send-CFx1h7xE.mjs → send-BMe_VcxP.mjs} +24 -40
- package/dist/.setup/{send-currentness-C2rMVVIQ.mjs → send-currentness-CAUVR-f3.mjs} +2 -4
- package/dist/.setup/{setup-bootstrap-DANlsW-o.mjs → setup-bootstrap-Ch6r7Szn.mjs} +4 -5
- package/dist/.setup/{setup-core-EQceJMZZ.mjs → setup-core-CRUekZa3.mjs} +13 -20
- package/dist/.setup/setup-plugin-api-BZPY4Dt2.mjs +2 -0
- package/dist/.setup/{startup-verification-UU8DUvi4.mjs → startup-verification-Cv_NoW_O.mjs} +4 -5
- package/dist/.setup/{state-layout-walk-BQMgMykU.mjs → state-layout-walk-BqCZTHpp.mjs} +2 -3
- package/dist/.setup/{storage-l8V0XsGM.mjs → storage-B94yQdJy.mjs} +17 -12
- package/dist/.setup/{storage-paths-B51JM-pC.mjs → storage-paths-e_Vq6cvw.mjs} +1 -2
- package/dist/.setup/{subagent-hooks-CSY4iwa_.mjs → subagent-hooks-CT-rdJmh.mjs} +2 -3
- package/dist/.setup/{sync-cache-state-Cnm4TCEI.mjs → sync-cache-state-B-FayxeA.mjs} +7 -6
- package/dist/.setup/{target-ids-HhcaKX1n.mjs → target-ids-DltG_ZHJ.mjs} +1 -2
- package/dist/.setup/{thread-binding-api-BvuaKpd0.mjs → thread-binding-api-OtSciHmZ.mjs} +2 -3
- package/dist/.setup/{thread-bindings-C0gv7BEN.mjs → thread-bindings-CB-jqrf4.mjs} +7 -9
- package/dist/.setup/{thread-bindings-shared-CPjUA0Ib.mjs → thread-bindings-shared-FMu_szTm.mjs} +1 -2
- package/dist/.setup/{tool-actions-DGYRJDEV.mjs → tool-actions-DjPJ6tpr.mjs} +18 -23
- package/dist/.setup/{url-validation-CF6pG6eE.mjs → url-validation-C77p4qT9.mjs} +1 -2
- package/dist/.setup/{verification-DUxuApWC.mjs → verification-BqjyjLoq.mjs} +4 -5
- package/dist/.source-module-urls/1cd4d4ff8d44e1c8b830932b44d7cf8a7f3350e09e169910e1d7a85e131b7bea.json +1 -1
- package/dist/api.js +8 -8
- package/dist/auth-presence.js +2 -3
- package/dist/channel-plugin-api.js +1 -1
- package/dist/cli-metadata.js +1 -1
- package/dist/contract-api.js +2 -2
- package/dist/doctor-contract-api.js +51 -23
- package/dist/helper-api.js +3 -3
- package/dist/index.js +3 -4
- package/dist/plugin-entry.handlers.runtime.js +3 -4
- package/dist/runtime-api.js +7 -8
- package/dist/runtime-setter-api.js +1 -1
- package/dist/secret-contract-api.js +1 -1
- package/dist/session-binding-contract-api.js +2 -2
- package/dist/setup-entry.js +4 -5
- package/dist/setup-plugin-api.js +1 -1
- package/dist/subagent-hooks-api.js +2 -3
- package/dist/thread-binding-api.js +1 -1
- package/dist/thread-bindings-runtime.js +1 -1
- package/node_modules/matrix-js-sdk/lib/http-api/utils.js +3 -1
- package/node_modules/matrix-js-sdk/lib/rust-crypto/rust-crypto.js +7 -1
- package/node_modules/matrix-js-sdk/src/http-api/utils.ts +5 -1
- package/node_modules/matrix-js-sdk/src/rust-crypto/rust-crypto.ts +7 -1
- package/package.json +4 -4
- package/dist/.setup/setup-plugin-api-f8mWghxf.mjs +0 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
|
2
2
|
import { hasConfiguredSecretInput } from "openclaw/plugin-sdk/secret-input";
|
|
3
3
|
import { listConfiguredAccountIds, resolveMergedAccountConfig, resolveNormalizedAccountEntry } from "openclaw/plugin-sdk/account-resolution-runtime";
|
|
4
|
-
|
|
4
|
+
// extensions/matrix/src/matrix/account-config.ts
|
|
5
5
|
function resolveMatrixBaseConfig(cfg) {
|
|
6
6
|
return cfg.channels?.matrix ?? {};
|
|
7
7
|
}
|
|
@@ -93,5 +93,4 @@ function resolveMatrixAccountAllowlistConfig(params) {
|
|
|
93
93
|
groupAllowFrom
|
|
94
94
|
};
|
|
95
95
|
}
|
|
96
|
-
//#endregion
|
|
97
96
|
export { resolveMatrixAccountConfig as a, resolveMatrixAccountAllowlistConfig as i, hasExplicitMatrixAccountConfig as n, resolveMatrixBaseConfig as o, listNormalizedMatrixAccountIds as r, findMatrixAccountConfig as t };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as listMatrixEnvAccountIds, t as getMatrixScopedEnvVarNames } from "./env-vars-
|
|
1
|
+
import { n as __exportAll } from "./runtime-doctor-migrations-CSvRANPN.mjs";
|
|
2
|
+
import { n as listMatrixEnvAccountIds, t as getMatrixScopedEnvVarNames } from "./env-vars-Bh1iOXJ1.mjs";
|
|
3
3
|
import { DEFAULT_ACCOUNT_ID, normalizeAccountId, normalizeOptionalAccountId } from "openclaw/plugin-sdk/account-id";
|
|
4
4
|
import { isRecord, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
5
5
|
import { listCombinedAccountIds, listConfiguredAccountIds, resolveListedDefaultAccountId, resolveNormalizedAccountEntry } from "openclaw/plugin-sdk/account-core";
|
|
6
6
|
import { hasConfiguredSecretInput } from "openclaw/plugin-sdk/secret-input";
|
|
7
|
-
|
|
7
|
+
// extensions/matrix/src/auth-precedence.ts
|
|
8
8
|
const MATRIX_DEFAULT_ACCOUNT_AUTH_ONLY_FIELDS = /* @__PURE__ */ new Set([
|
|
9
9
|
"userId",
|
|
10
10
|
"accessToken",
|
|
@@ -28,8 +28,7 @@ function resolveMatrixAccountStringValues(params) {
|
|
|
28
28
|
for (const field of fields) resolved[field] = resolveMatrixStringSourceValue(params.account?.[field]) || resolveMatrixStringSourceValue(params.scopedEnv?.[field]) || (isDefaultAccount || !MATRIX_DEFAULT_ACCOUNT_AUTH_ONLY_FIELDS.has(field) ? resolveMatrixStringSourceValue(params.channel?.[field]) || resolveMatrixStringSourceValue(params.globalEnv?.[field]) : "");
|
|
29
29
|
return resolved;
|
|
30
30
|
}
|
|
31
|
-
|
|
32
|
-
//#region extensions/matrix/src/matrix/client/env-auth.ts
|
|
31
|
+
// extensions/matrix/src/matrix/client/env-auth.ts
|
|
33
32
|
function cleanEnv(value) {
|
|
34
33
|
return normalizeOptionalString(value) ?? "";
|
|
35
34
|
}
|
|
@@ -86,8 +85,7 @@ function resolveMatrixEnvAuthReadiness(accountId, env = process.env) {
|
|
|
86
85
|
missingMessage: `Set Matrix env vars for the default account (for example MATRIX_HOMESERVER + MATRIX_ACCESS_TOKEN, MATRIX_USER_ID + MATRIX_PASSWORD, or ${defaultKeys.homeserver} + ${defaultKeys.accessToken}).`
|
|
87
86
|
};
|
|
88
87
|
}
|
|
89
|
-
|
|
90
|
-
//#region extensions/matrix/src/account-selection.ts
|
|
88
|
+
// extensions/matrix/src/account-selection.ts
|
|
91
89
|
var account_selection_exports = /* @__PURE__ */ __exportAll({
|
|
92
90
|
findMatrixAccountEntry: () => findMatrixAccountEntry,
|
|
93
91
|
hasImplicitMatrixAccountConfig: () => hasImplicitMatrixAccountConfig,
|
|
@@ -190,5 +188,4 @@ function requiresExplicitMatrixDefaultAccount(cfg, env = process.env) {
|
|
|
190
188
|
const configuredDefault = normalizeOptionalAccountId(typeof channel.defaultAccount === "string" ? channel.defaultAccount : void 0);
|
|
191
189
|
return !(configuredDefault && configuredAccountIds.includes(configuredDefault));
|
|
192
190
|
}
|
|
193
|
-
//#endregion
|
|
194
191
|
export { resolveConfiguredMatrixAccountIds as a, hasReadyMatrixEnvAuth as c, resolveScopedMatrixEnvConfig as d, resolveMatrixAccountStringValues as f, requiresExplicitMatrixDefaultAccount as i, resolveGlobalMatrixEnvConfig as l, findMatrixAccountEntry as n, resolveMatrixChannelConfig as o, hasImplicitMatrixAccountConfig as r, resolveMatrixDefaultOrOnlyAccountId as s, account_selection_exports as t, resolveMatrixEnvAuthReadiness as u };
|
package/dist/.setup/{approval-handler.runtime-6u08WKWh.mjs → approval-handler.runtime-BvuXpzus.mjs}
RENAMED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { a as resolveMatrixAccountConfig } from "./account-config-
|
|
2
|
-
import { r as isMatrixAnyApprovalClientEnabled, s as shouldHandleMatrixApprovalRequest } from "./exec-approvals-
|
|
3
|
-
import { s as resolveMatrixTargetIdentity } from "./target-ids-
|
|
4
|
-
import { a as repairMatrixDirectRooms } from "./direct-management-
|
|
5
|
-
import { a as sendSingleTextMessageMatrix, n as reactMatrixMessage, r as sendMessageMatrix } from "./send-
|
|
6
|
-
import { a as unregisterMatrixApprovalReactionTarget, n as listMatrixApprovalReactionBindings, r as registerMatrixApprovalReactionTarget, t as buildMatrixApprovalReactionHint } from "./approval-reactions-
|
|
7
|
-
import { n as editMatrixMessage, t as deleteMatrixMessage } from "./messages-
|
|
1
|
+
import { a as resolveMatrixAccountConfig } from "./account-config-CVM2a28p.mjs";
|
|
2
|
+
import { r as isMatrixAnyApprovalClientEnabled, s as shouldHandleMatrixApprovalRequest } from "./exec-approvals-CWeSpE6V.mjs";
|
|
3
|
+
import { s as resolveMatrixTargetIdentity } from "./target-ids-DltG_ZHJ.mjs";
|
|
4
|
+
import { a as repairMatrixDirectRooms } from "./direct-management-BOYMqZJQ.mjs";
|
|
5
|
+
import { a as sendSingleTextMessageMatrix, n as reactMatrixMessage, r as sendMessageMatrix } from "./send-BMe_VcxP.mjs";
|
|
6
|
+
import { a as unregisterMatrixApprovalReactionTarget, n as listMatrixApprovalReactionBindings, r as registerMatrixApprovalReactionTarget, t as buildMatrixApprovalReactionHint } from "./approval-reactions-DMDBJos0.mjs";
|
|
7
|
+
import { n as editMatrixMessage, t as deleteMatrixMessage } from "./messages-Dt51OgyD.mjs";
|
|
8
8
|
import { listMessageReceiptPlatformIds, resolveMessageReceiptPrimaryId } from "openclaw/plugin-sdk/channel-outbound";
|
|
9
9
|
import { normalizeStringifiedOptionalString, normalizeUniqueStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
10
10
|
import { buildChannelApprovalNativeTargetKey } from "openclaw/plugin-sdk/approval-native-runtime";
|
|
@@ -13,7 +13,7 @@ import { retryAsync } from "openclaw/plugin-sdk/retry-runtime";
|
|
|
13
13
|
import { createChannelApprovalNativeRuntimeAdapterAsync } from "openclaw/plugin-sdk/approval-handler-runtime";
|
|
14
14
|
import { buildExecApprovalPendingReplyPayload, buildPluginApprovalPendingReplyPayload } from "openclaw/plugin-sdk/approval-reply-runtime";
|
|
15
15
|
import { buildApprovalPendingReplyPayload, buildPluginApprovalResolvedReplyPayload, formatChannelApprovalResolvedLabel } from "openclaw/plugin-sdk/approval-runtime";
|
|
16
|
-
|
|
16
|
+
// extensions/matrix/src/approval-handler.runtime.ts
|
|
17
17
|
const MATRIX_APPROVAL_METADATA_KEY = "com.openclaw.approval";
|
|
18
18
|
const MATRIX_APPROVAL_DELIVERY_ATTEMPTS = 3;
|
|
19
19
|
const MATRIX_APPROVAL_DELIVERY_RETRY_DELAY_MS = 250;
|
|
@@ -376,5 +376,4 @@ const matrixApprovalNativeRuntime = createChannelApprovalNativeRuntimeAdapterAsy
|
|
|
376
376
|
}
|
|
377
377
|
}
|
|
378
378
|
});
|
|
379
|
-
//#endregion
|
|
380
379
|
export { matrixApprovalNativeRuntime };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { r as getOptionalMatrixRuntime } from "./runtime-
|
|
1
|
+
import { r as getOptionalMatrixRuntime } from "./runtime-Ck8TjD7L.mjs";
|
|
2
2
|
import { normalizeAccountId, normalizeOptionalAccountId } from "openclaw/plugin-sdk/routing";
|
|
3
3
|
import { createApprovalReactionTargetStore } from "openclaw/plugin-sdk/approval-reaction-runtime";
|
|
4
4
|
import { pruneMapToMaxSize } from "openclaw/plugin-sdk/collection-runtime";
|
|
5
5
|
import { createPluginStateErrorReporter } from "openclaw/plugin-sdk/plugin-state-runtime";
|
|
6
|
-
|
|
6
|
+
// extensions/matrix/src/approval-reactions.ts
|
|
7
7
|
const MATRIX_APPROVAL_REACTION_BINDINGS = [
|
|
8
8
|
{
|
|
9
9
|
decision: "allow-once",
|
|
@@ -178,5 +178,4 @@ async function resolveMatrixApprovalReactionTargetWithPersistence(params) {
|
|
|
178
178
|
reactionKey: params.reactionKey
|
|
179
179
|
});
|
|
180
180
|
}
|
|
181
|
-
//#endregion
|
|
182
181
|
export { unregisterMatrixApprovalReactionTarget as a, resolveMatrixApprovalReactionTargetWithPersistence as i, listMatrixApprovalReactionBindings as n, unregisterMatrixApprovalReactionTargetsForApproval as o, registerMatrixApprovalReactionTarget as r, buildMatrixApprovalReactionHint as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// extensions/matrix/src/matrix/backup-health.ts
|
|
2
2
|
function resolveMatrixRoomKeyBackupIssue(backup) {
|
|
3
3
|
if (!backup.serverVersion) return {
|
|
4
4
|
code: "missing-server-backup",
|
|
@@ -56,5 +56,4 @@ function resolveMatrixRoomKeyBackupReadinessError(backup, opts) {
|
|
|
56
56
|
if (issue.message) return `Matrix room key backup is not usable: ${issue.message}.`;
|
|
57
57
|
return "Matrix room key backup is not usable on this device.";
|
|
58
58
|
}
|
|
59
|
-
//#endregion
|
|
60
59
|
export { resolveMatrixRoomKeyBackupReadinessError as n, resolveMatrixRoomKeyBackupIssue as t };
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { i as requiresExplicitMatrixDefaultAccount, n as findMatrixAccountEntry, r as hasImplicitMatrixAccountConfig } from "./account-selection-
|
|
3
|
-
import { a as resolveMatrixAccountConfig } from "./account-config-
|
|
4
|
-
import { _ as resolveMatrixAccount, g as resolveDefaultMatrixAccountId, m as listMatrixAccountIds, v as resolveMatrixAccountAsync } from "./setup-core-
|
|
5
|
-
import { i as normalizeMatrixUserId, t as matrixPluginBase } from "./channel.setup-
|
|
6
|
-
import { a as isMatrixExecApprovalAuthorizedSender, c as shouldSuppressLocalMatrixExecApprovalPrompt, d as normalizeMatrixApproverId, i as isMatrixApprovalClientEnabled, l as getMatrixApprovalAuthApprovers, n as getMatrixExecApprovalApprovers, o as resolveMatrixExecApprovalTarget, r as isMatrixAnyApprovalClientEnabled, s as shouldHandleMatrixApprovalRequest, t as getMatrixApprovalApprovers, u as matrixApprovalAuth } from "./exec-approvals-
|
|
7
|
-
import { a as normalizeMatrixResolvableTarget, i as normalizeMatrixMessagingTarget, n as isMatrixQualifiedUserId, o as resolveMatrixDirectUserId, r as isMatrixRoomId, s as resolveMatrixTargetIdentity } from "./target-ids-
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { n as
|
|
1
|
+
import { n as __exportAll } from "./runtime-doctor-migrations-CSvRANPN.mjs";
|
|
2
|
+
import { i as requiresExplicitMatrixDefaultAccount, n as findMatrixAccountEntry, r as hasImplicitMatrixAccountConfig } from "./account-selection-BPFpdMIw.mjs";
|
|
3
|
+
import { a as resolveMatrixAccountConfig } from "./account-config-CVM2a28p.mjs";
|
|
4
|
+
import { _ as resolveMatrixAccount, g as resolveDefaultMatrixAccountId, m as listMatrixAccountIds, v as resolveMatrixAccountAsync } from "./setup-core-CRUekZa3.mjs";
|
|
5
|
+
import { i as normalizeMatrixUserId, t as matrixPluginBase } from "./channel.setup-Dp7V9AgV.mjs";
|
|
6
|
+
import { a as isMatrixExecApprovalAuthorizedSender, c as shouldSuppressLocalMatrixExecApprovalPrompt, d as normalizeMatrixApproverId, i as isMatrixApprovalClientEnabled, l as getMatrixApprovalAuthApprovers, n as getMatrixExecApprovalApprovers, o as resolveMatrixExecApprovalTarget, r as isMatrixAnyApprovalClientEnabled, s as shouldHandleMatrixApprovalRequest, t as getMatrixApprovalApprovers, u as matrixApprovalAuth } from "./exec-approvals-CWeSpE6V.mjs";
|
|
7
|
+
import { a as normalizeMatrixResolvableTarget, i as normalizeMatrixMessagingTarget, n as isMatrixQualifiedUserId, o as resolveMatrixDirectUserId, r as isMatrixRoomId, s as resolveMatrixTargetIdentity } from "./target-ids-DltG_ZHJ.mjs";
|
|
8
|
+
import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-GiXgCj7k.mjs";
|
|
9
|
+
import { f as setMatrixThreadBindingMaxAgeBySessionKey, l as setMatrixThreadBindingIdleTimeoutBySessionKey, p as setMatrixThreadBindingMaxAgeBySessionKeyAsync, u as setMatrixThreadBindingIdleTimeoutBySessionKeyAsync } from "./thread-bindings-shared-FMu_szTm.mjs";
|
|
10
|
+
import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-AKnr45nw.mjs";
|
|
11
|
+
import { n as resolveMatrixInboundConversation, t as defaultTopLevelPlacement } from "./thread-binding-api-OtSciHmZ.mjs";
|
|
11
12
|
import { createLazyRuntimeModule, createLazyRuntimeNamedExport } from "openclaw/plugin-sdk/lazy-runtime";
|
|
12
13
|
import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
|
13
14
|
import { adaptScopedAccountAccessor, createScopedDmSecurityResolver } from "openclaw/plugin-sdk/channel-config-helpers";
|
|
@@ -34,7 +35,7 @@ import { resolveConfiguredAcpBindingRecord } from "openclaw/plugin-sdk/acp-bindi
|
|
|
34
35
|
import { inspectConversationBindingAsync } from "openclaw/plugin-sdk/conversation-binding-inspection-runtime";
|
|
35
36
|
import { inspectRuntimeConversationBindingRoute } from "openclaw/plugin-sdk/conversation-binding-runtime";
|
|
36
37
|
import { deliveryContextFromSession, getSessionEntryAsync, resolveStorePath, sessionDeliveryOrigin } from "openclaw/plugin-sdk/session-store-runtime";
|
|
37
|
-
|
|
38
|
+
// extensions/matrix/src/actions.ts
|
|
38
39
|
const MATRIX_PLUGIN_HANDLED_ACTIONS = /* @__PURE__ */ new Set([
|
|
39
40
|
"send",
|
|
40
41
|
"poll-vote",
|
|
@@ -154,20 +155,18 @@ const matrixMessageActions = {
|
|
|
154
155
|
return account.enabled && account.configured && createActionGate(account.config.actions)("messages") ? payload : null;
|
|
155
156
|
},
|
|
156
157
|
handleAction: async (ctx) => {
|
|
157
|
-
const { handleMatrixAction } = await import("./tool-actions-
|
|
158
|
+
const { handleMatrixAction } = await import("./tool-actions-DjPJ6tpr.mjs");
|
|
158
159
|
return await handleMatrixAction(ctx);
|
|
159
160
|
}
|
|
160
161
|
};
|
|
161
|
-
|
|
162
|
-
//#region extensions/matrix/src/approval-reaction-auth.ts
|
|
162
|
+
// extensions/matrix/src/approval-reaction-auth.ts
|
|
163
163
|
var approval_reaction_auth_exports = /* @__PURE__ */ __exportAll({ isMatrixApprovalReactionAuthorizedSender: () => isMatrixApprovalReactionAuthorizedSender });
|
|
164
164
|
function isMatrixApprovalReactionAuthorizedSender(params) {
|
|
165
165
|
const normalizedSenderId = params.senderId ? normalizeMatrixApproverId(params.senderId) : void 0;
|
|
166
166
|
if (!normalizedSenderId) return false;
|
|
167
167
|
return getMatrixApprovalApprovers(params).includes(normalizedSenderId);
|
|
168
168
|
}
|
|
169
|
-
|
|
170
|
-
//#region extensions/matrix/src/approval-native.ts
|
|
169
|
+
// extensions/matrix/src/approval-native.ts
|
|
171
170
|
function normalizeComparableTarget(value) {
|
|
172
171
|
const target = resolveMatrixTargetIdentity(value);
|
|
173
172
|
if (!target) return normalizeLowercaseStringOrEmpty(value);
|
|
@@ -287,7 +286,7 @@ const matrixNativeApprovalCapability = createApproverRestrictedNativeApprovalCap
|
|
|
287
286
|
],
|
|
288
287
|
isConfigured: isMatrixAnyApprovalClientEnabled,
|
|
289
288
|
shouldHandle: shouldHandleMatrixApprovalRequest,
|
|
290
|
-
load: async () => (await import("./approval-handler.runtime-
|
|
289
|
+
load: async () => (await import("./approval-handler.runtime-BvuXpzus.mjs")).matrixApprovalNativeRuntime
|
|
291
290
|
})
|
|
292
291
|
});
|
|
293
292
|
const splitMatrixApprovalCapability = splitChannelApprovalCapability(matrixNativeApprovalCapability);
|
|
@@ -341,8 +340,7 @@ const matrixApprovalCapability = createChannelApprovalCapability({
|
|
|
341
340
|
nativeAsync: matrixBaseNativeApprovalAdapter,
|
|
342
341
|
render: matrixNativeApprovalCapability.render
|
|
343
342
|
});
|
|
344
|
-
|
|
345
|
-
//#region extensions/matrix/src/channel-message-adapter.ts
|
|
343
|
+
// extensions/matrix/src/channel-message-adapter.ts
|
|
346
344
|
function createMatrixMessageAdapter(params) {
|
|
347
345
|
const base = createChannelMessageAdapterFromOutbound({
|
|
348
346
|
id: "matrix",
|
|
@@ -388,8 +386,7 @@ function createMatrixMessageAdapter(params) {
|
|
|
388
386
|
}
|
|
389
387
|
};
|
|
390
388
|
}
|
|
391
|
-
|
|
392
|
-
//#region extensions/matrix/src/matrix/monitor/rooms.ts
|
|
389
|
+
// extensions/matrix/src/matrix/monitor/rooms.ts
|
|
393
390
|
function readLegacyRoomAllowAlias(room) {
|
|
394
391
|
const rawRoom = room;
|
|
395
392
|
return typeof rawRoom?.allow === "boolean" ? rawRoom.allow : void 0;
|
|
@@ -423,8 +420,7 @@ function resolveMatrixRoomConfig(params) {
|
|
|
423
420
|
matchSource: resolved ? matchKey === "*" ? "wildcard" : "direct" : void 0
|
|
424
421
|
};
|
|
425
422
|
}
|
|
426
|
-
|
|
427
|
-
//#region extensions/matrix/src/group-mentions.ts
|
|
423
|
+
// extensions/matrix/src/group-mentions.ts
|
|
428
424
|
function resolveMatrixGroupScope(params) {
|
|
429
425
|
const matrixConfig = resolveMatrixAccountConfig({
|
|
430
426
|
cfg: params.cfg,
|
|
@@ -448,8 +444,7 @@ function resolveMatrixGroupRequireMention(params) {
|
|
|
448
444
|
function resolveMatrixGroupToolPolicy(params) {
|
|
449
445
|
return resolveScopeToolsPolicy(resolveMatrixGroupScope(params));
|
|
450
446
|
}
|
|
451
|
-
|
|
452
|
-
//#region extensions/matrix/src/matrix/monitor/threads.ts
|
|
447
|
+
// extensions/matrix/src/matrix/monitor/threads.ts
|
|
453
448
|
function resolveMatrixThreadSessionKeys(params) {
|
|
454
449
|
return resolveThreadSessionKeys({
|
|
455
450
|
...params,
|
|
@@ -463,8 +458,7 @@ function resolveMatrixThreadRouting(params) {
|
|
|
463
458
|
const inboundThreadId = threadRootId && threadRootId !== messageId ? threadRootId : void 0;
|
|
464
459
|
return { threadId: effectiveThreadReplies === "off" ? void 0 : effectiveThreadReplies === "inbound" ? inboundThreadId : inboundThreadId ?? (messageId || void 0) };
|
|
465
460
|
}
|
|
466
|
-
|
|
467
|
-
//#region extensions/matrix/src/matrix/monitor/route.ts
|
|
461
|
+
// extensions/matrix/src/matrix/monitor/route.ts
|
|
468
462
|
function resolveMatrixDmSessionKey(params) {
|
|
469
463
|
if (params.dmSessionScope !== "per-room") return params.fallbackSessionKey;
|
|
470
464
|
return buildAgentSessionKey({
|
|
@@ -573,8 +567,7 @@ function projectMatrixInboundRoute(params, inspection) {
|
|
|
573
567
|
pluginId: runtimeRoute.pluginId
|
|
574
568
|
};
|
|
575
569
|
}
|
|
576
|
-
|
|
577
|
-
//#region extensions/matrix/src/matrix/conversation-route-owner.ts
|
|
570
|
+
// extensions/matrix/src/matrix/conversation-route-owner.ts
|
|
578
571
|
function prepareMatrixConversationRouteOwner(params) {
|
|
579
572
|
const { cfg, conversation } = params;
|
|
580
573
|
const accountId = normalizeAccountId(params.accountId);
|
|
@@ -619,8 +612,7 @@ async function prepareMatrixConversationRouteOwnersAsync(inputs, inspectBindings
|
|
|
619
612
|
return () => item.resolve(inspect()[position]);
|
|
620
613
|
});
|
|
621
614
|
}
|
|
622
|
-
|
|
623
|
-
//#region extensions/matrix/src/presentation-capabilities.ts
|
|
615
|
+
// extensions/matrix/src/presentation-capabilities.ts
|
|
624
616
|
const matrixPresentationCapabilities = {
|
|
625
617
|
supported: true,
|
|
626
618
|
buttons: true,
|
|
@@ -632,12 +624,10 @@ const matrixPresentationCapabilities = {
|
|
|
632
624
|
supportsEdit: true
|
|
633
625
|
} }
|
|
634
626
|
};
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
const loadMatrixResolver = createLazyRuntimeNamedExport(() => import("./resolve-targets-BJ5sIKeM.mjs").then((n) => n.n), "resolveMatrixTargets");
|
|
627
|
+
// extensions/matrix/src/resolver.ts
|
|
628
|
+
const loadMatrixResolver = createLazyRuntimeNamedExport(() => import("./resolve-targets-vlr765on.mjs").then((n) => n.n), "resolveMatrixTargets");
|
|
638
629
|
const matrixResolverAdapter = { resolveTargets: async (params) => (await loadMatrixResolver())(params) };
|
|
639
|
-
|
|
640
|
-
//#region extensions/matrix/src/matrix/session-store-metadata.ts
|
|
630
|
+
// extensions/matrix/src/matrix/session-store-metadata.ts
|
|
641
631
|
function resolveMatrixRoomTargetId(value) {
|
|
642
632
|
const trimmed = normalizeOptionalString(value);
|
|
643
633
|
if (!trimmed) return;
|
|
@@ -666,8 +656,7 @@ function resolveMatrixStoredSessionMeta(entry) {
|
|
|
666
656
|
...directUserId ? { directUserId } : {}
|
|
667
657
|
};
|
|
668
658
|
}
|
|
669
|
-
|
|
670
|
-
//#region extensions/matrix/src/session-route.ts
|
|
659
|
+
// extensions/matrix/src/session-route.ts
|
|
671
660
|
function resolveEffectiveMatrixAccountId(params) {
|
|
672
661
|
return normalizeAccountId(params.accountId ?? resolveDefaultMatrixAccountId(params.cfg));
|
|
673
662
|
}
|
|
@@ -744,10 +733,9 @@ async function resolveMatrixOutboundSessionRoute(params) {
|
|
|
744
733
|
canRecoverCurrentThread: ({ route }) => route.peer.kind !== "direct" || (params.cfg.session?.dmScope ?? "main") !== "main"
|
|
745
734
|
});
|
|
746
735
|
}
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
const
|
|
750
|
-
const loadMatrixMonitorModule = createLazyRuntimeModule(() => import("./monitor-BSEZMFyq.mjs").catch((error) => {
|
|
736
|
+
// extensions/matrix/src/channel.ts
|
|
737
|
+
const loadMatrixChannelRuntime = createLazyRuntimeNamedExport(() => import("./channel.runtime-C0VWk0Ch.mjs"), "matrixChannelRuntime");
|
|
738
|
+
const loadMatrixMonitorModule = createLazyRuntimeModule(() => import("./monitor-BrBbFO8h.mjs").catch((error) => {
|
|
751
739
|
loadMatrixMonitorModule.clear();
|
|
752
740
|
throw error;
|
|
753
741
|
}));
|
|
@@ -1158,5 +1146,4 @@ const matrixPlugin = createChatChannelPlugin({
|
|
|
1158
1146
|
},
|
|
1159
1147
|
outbound: matrixChannelOutbound
|
|
1160
1148
|
});
|
|
1161
|
-
//#endregion
|
|
1162
1149
|
export { resolveMatrixThreadRouting as a, resolveMatrixInboundRouteAsync as i, resolveMatrixStoredSessionMeta as n, resolveMatrixRoomConfig as o, matrixPresentationCapabilities as r, approval_reaction_auth_exports as s, matrixPlugin as t };
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { S as reconcileMatrixUnknownSend, o as sendTypingMatrix, r as sendMessageMatrix, x as cleanupMatrixDeliveryPlans } from "./send-
|
|
2
|
-
import { u as resolveMatrixAuth } from "./client-
|
|
3
|
-
import { n as listMatrixDirectoryGroupsLive, r as listMatrixDirectoryPeersLive } from "./directory-live-
|
|
4
|
-
import { t as matrixOutbound } from "./outbound-
|
|
5
|
-
import { t as resolveMatrixTargets } from "./resolve-targets-
|
|
1
|
+
import { S as reconcileMatrixUnknownSend, o as sendTypingMatrix, r as sendMessageMatrix, x as cleanupMatrixDeliveryPlans } from "./send-BMe_VcxP.mjs";
|
|
2
|
+
import { u as resolveMatrixAuth } from "./client-BIsYqIzM.mjs";
|
|
3
|
+
import { n as listMatrixDirectoryGroupsLive, r as listMatrixDirectoryPeersLive } from "./directory-live-tItssg9q.mjs";
|
|
4
|
+
import { t as matrixOutbound } from "./outbound-B8h2BwR2.mjs";
|
|
5
|
+
import { t as resolveMatrixTargets } from "./resolve-targets-vlr765on.mjs";
|
|
6
6
|
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
7
7
|
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
8
8
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
9
9
|
import { runChannelProbe } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
10
|
-
|
|
11
|
-
const loadMatrixProbeRuntimeDeps = createLazyRuntimeModule(() => import("./client-
|
|
10
|
+
// extensions/matrix/src/matrix/probe.ts
|
|
11
|
+
const loadMatrixProbeRuntimeDeps = createLazyRuntimeModule(() => import("./client-BIsYqIzM.mjs").then((n) => n.t));
|
|
12
12
|
async function probeMatrix(params) {
|
|
13
13
|
return await runChannelProbe(void 0, async () => {
|
|
14
14
|
const result = {
|
|
@@ -58,8 +58,7 @@ async function probeMatrix(params) {
|
|
|
58
58
|
error: formatErrorMessage(error)
|
|
59
59
|
}));
|
|
60
60
|
}
|
|
61
|
-
|
|
62
|
-
//#region extensions/matrix/src/channel.runtime.ts
|
|
61
|
+
// extensions/matrix/src/channel.runtime.ts
|
|
63
62
|
const matrixChannelRuntime = {
|
|
64
63
|
cleanupMatrixDeliveryPlans,
|
|
65
64
|
listMatrixDirectoryGroupsLive,
|
|
@@ -72,5 +71,4 @@ const matrixChannelRuntime = {
|
|
|
72
71
|
sendMessageMatrix,
|
|
73
72
|
sendTypingMatrix
|
|
74
73
|
};
|
|
75
|
-
//#endregion
|
|
76
74
|
export { matrixChannelRuntime };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as resolveMatrixAccountConfig } from "./account-config-
|
|
2
|
-
import { _ as resolveMatrixAccount, g as resolveDefaultMatrixAccountId, i as matrixSetupContract, m as listMatrixAccountIds, t as createMatrixSetupWizardProxy, v as resolveMatrixAccountAsync } from "./setup-core-
|
|
1
|
+
import { a as resolveMatrixAccountConfig } from "./account-config-CVM2a28p.mjs";
|
|
2
|
+
import { _ as resolveMatrixAccount, g as resolveDefaultMatrixAccountId, i as matrixSetupContract, m as listMatrixAccountIds, t as createMatrixSetupWizardProxy, v as resolveMatrixAccountAsync } from "./setup-core-CRUekZa3.mjs";
|
|
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";
|
|
@@ -9,7 +9,7 @@ import { normalizeStringEntries as normalizeStringEntries$1 } from "openclaw/plu
|
|
|
9
9
|
import { describeAccountSnapshot } from "openclaw/plugin-sdk/account-helpers";
|
|
10
10
|
import { AllowFromListSchema, ChannelBotLoopProtectionSchema, ChannelDeliveryStreamingConfigSchema, ChannelStreamingPreviewSchema, ChannelStreamingProgressSchema, ContextVisibilityModeSchema, GroupPolicySchema, MarkdownConfigSchema, MentionPatternsPolicySchema, buildChannelConfigSchema, buildGroupEntrySchema, buildNestedDmConfigSchema } from "openclaw/plugin-sdk/channel-config-schema";
|
|
11
11
|
import { z } from "zod";
|
|
12
|
-
|
|
12
|
+
// extensions/matrix/src/matrix/monitor/allowlist.ts
|
|
13
13
|
function normalizeMatrixUser(raw) {
|
|
14
14
|
const value = (raw ?? "").trim();
|
|
15
15
|
if (!value) return "";
|
|
@@ -64,8 +64,7 @@ function resolveMatrixAllowListMatch(params) {
|
|
|
64
64
|
candidates
|
|
65
65
|
});
|
|
66
66
|
}
|
|
67
|
-
|
|
68
|
-
//#region extensions/matrix/src/config-adapter.ts
|
|
67
|
+
// extensions/matrix/src/config-adapter.ts
|
|
69
68
|
const matrixConfigAdapter = {
|
|
70
69
|
...createScopedChannelConfigAdapter({
|
|
71
70
|
sectionKey: "matrix",
|
|
@@ -92,8 +91,7 @@ const matrixConfigAdapter = {
|
|
|
92
91
|
}),
|
|
93
92
|
resolveAccountAsync: adaptScopedAccountAccessor(resolveMatrixAccountAsync)
|
|
94
93
|
};
|
|
95
|
-
|
|
96
|
-
//#region extensions/matrix/src/config-ui-hints.ts
|
|
94
|
+
// extensions/matrix/src/config-ui-hints.ts
|
|
97
95
|
const matrixChannelConfigUiHints = {
|
|
98
96
|
requireMentionInBotThreads: {
|
|
99
97
|
label: "Mention in Bot Threads",
|
|
@@ -152,8 +150,7 @@ const matrixChannelConfigUiHints = {
|
|
|
152
150
|
progress: {}
|
|
153
151
|
})
|
|
154
152
|
};
|
|
155
|
-
|
|
156
|
-
//#region extensions/matrix/src/config-schema.ts
|
|
153
|
+
// extensions/matrix/src/config-schema.ts
|
|
157
154
|
const matrixActionSchema = z.object({
|
|
158
155
|
reactions: z.boolean().optional(),
|
|
159
156
|
messages: z.boolean().optional(),
|
|
@@ -315,7 +312,7 @@ const matrixPluginBase = {
|
|
|
315
312
|
order: 70,
|
|
316
313
|
quickstartAllowFrom: true
|
|
317
314
|
},
|
|
318
|
-
setupWizard: createMatrixSetupWizardProxy(async () => ({ matrixSetupWizard: (await import("./onboarding-
|
|
315
|
+
setupWizard: createMatrixSetupWizardProxy(async () => ({ matrixSetupWizard: (await import("./onboarding-QfFvgZ85.mjs").then((n) => n.n)).matrixOnboardingAdapter })),
|
|
319
316
|
setupContract: matrixSetupContract,
|
|
320
317
|
capabilities: {
|
|
321
318
|
chatTypes: [
|
|
@@ -358,5 +355,4 @@ const matrixSetupPlugin = {
|
|
|
358
355
|
})).configured
|
|
359
356
|
}
|
|
360
357
|
};
|
|
361
|
-
//#endregion
|
|
362
358
|
export { resolveMatrixAllowListMatch as a, normalizeMatrixUserId as i, matrixSetupPlugin as n, normalizeMatrixAllowList as r, matrixPluginBase as t };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry";
|
|
2
|
-
|
|
2
|
+
// 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-umlumhB6.mjs");
|
|
6
6
|
registerMatrixCli({ program });
|
|
7
7
|
}, { descriptors: [{
|
|
8
8
|
name: "matrix",
|
|
@@ -10,13 +10,11 @@ function registerMatrixCliMetadata(api) {
|
|
|
10
10
|
hasSubcommands: true
|
|
11
11
|
}] });
|
|
12
12
|
}
|
|
13
|
-
|
|
14
|
-
//#region extensions/matrix/cli-metadata.ts
|
|
13
|
+
// extensions/matrix/cli-metadata.ts
|
|
15
14
|
var cli_metadata_default = definePluginEntry({
|
|
16
15
|
id: "matrix",
|
|
17
16
|
name: "Matrix",
|
|
18
17
|
description: "Matrix channel plugin (matrix-js-sdk)",
|
|
19
18
|
register: registerMatrixCliMetadata
|
|
20
19
|
});
|
|
21
|
-
//#endregion
|
|
22
20
|
export { registerMatrixCliMetadata as n, cli_metadata_default as t };
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { t as getMatrixRuntime } from "./runtime-
|
|
2
|
-
import { a as resolveMatrixAccountConfig, n as hasExplicitMatrixAccountConfig } from "./account-config-
|
|
3
|
-
import { l as sanitizeMatrixPathSegment } from "./storage-paths-
|
|
4
|
-
import { p as updateMatrixAccountConfig, r as matrixSetupAdapter, v as resolveMatrixAccountAsync } from "./setup-core-
|
|
5
|
-
import { n as resolveMatrixConfigPath } from "./config-paths-
|
|
6
|
-
import { d as resolveMatrixAuthContext } from "./client-
|
|
7
|
-
import { n as withResolvedActionClient } from "./client-
|
|
8
|
-
import { t as resolveMatrixRoomKeyBackupIssue } from "./backup-health-
|
|
9
|
-
import { i as setMatrixConsoleLogging } from "./logger-
|
|
10
|
-
import { r as setMatrixSdkLogMode } from "./logging-
|
|
11
|
-
import { n as isOpenClawManagedMatrixDevice, r as summarizeMatrixDeviceHealth } from "./device-health-
|
|
12
|
-
import { n as updateMatrixOwnProfile, t as applyMatrixProfileUpdate } from "./profile-update-
|
|
13
|
-
import { n as listMatrixCryptoUnsafeState, r as recoverMatrixCryptoUnsafeState } from "./crypto-unsafe-state-doctor-
|
|
14
|
-
import { a as confirmMatrixVerificationSas, b as verifyMatrixRecoveryKey, c as getMatrixRoomKeyBackupStatus, d as listMatrixVerifications, f as mismatchMatrixVerificationSas, g as runMatrixSelfVerification, h as restoreMatrixRoomKeyBackup, l as getMatrixVerificationSas, m as resetMatrixRoomKeyBackup, n as bootstrapMatrixVerification, p as requestMatrixVerification, r as cancelMatrixVerification, t as acceptMatrixVerification, u as getMatrixVerificationStatus, v as startMatrixVerification } from "./verification-
|
|
1
|
+
import { t as getMatrixRuntime } from "./runtime-Ck8TjD7L.mjs";
|
|
2
|
+
import { a as resolveMatrixAccountConfig, n as hasExplicitMatrixAccountConfig } from "./account-config-CVM2a28p.mjs";
|
|
3
|
+
import { l as sanitizeMatrixPathSegment } from "./storage-paths-e_Vq6cvw.mjs";
|
|
4
|
+
import { p as updateMatrixAccountConfig, r as matrixSetupAdapter, v as resolveMatrixAccountAsync } from "./setup-core-CRUekZa3.mjs";
|
|
5
|
+
import { n as resolveMatrixConfigPath } from "./config-paths-DBpHxDyc.mjs";
|
|
6
|
+
import { d as resolveMatrixAuthContext } from "./client-BIsYqIzM.mjs";
|
|
7
|
+
import { n as withResolvedActionClient } from "./client-DL_aELCJ.mjs";
|
|
8
|
+
import { t as resolveMatrixRoomKeyBackupIssue } from "./backup-health-BxH69np2.mjs";
|
|
9
|
+
import { i as setMatrixConsoleLogging } from "./logger-BX5kXvh1.mjs";
|
|
10
|
+
import { r as setMatrixSdkLogMode } from "./logging-BWPjyW9s.mjs";
|
|
11
|
+
import { n as isOpenClawManagedMatrixDevice, r as summarizeMatrixDeviceHealth } from "./device-health-CmvwmCHB.mjs";
|
|
12
|
+
import { n as updateMatrixOwnProfile, t as applyMatrixProfileUpdate } from "./profile-update-DiXtw0NM.mjs";
|
|
13
|
+
import { n as listMatrixCryptoUnsafeState, r as recoverMatrixCryptoUnsafeState } from "./crypto-unsafe-state-doctor-ClzRgr8z.mjs";
|
|
14
|
+
import { a as confirmMatrixVerificationSas, b as verifyMatrixRecoveryKey, c as getMatrixRoomKeyBackupStatus, d as listMatrixVerifications, f as mismatchMatrixVerificationSas, g as runMatrixSelfVerification, h as restoreMatrixRoomKeyBackup, l as getMatrixVerificationSas, m as resetMatrixRoomKeyBackup, n as bootstrapMatrixVerification, p as requestMatrixVerification, r as cancelMatrixVerification, t as acceptMatrixVerification, u as getMatrixVerificationStatus, v as startMatrixVerification } from "./verification-BqjyjLoq.mjs";
|
|
15
15
|
import { normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
|
16
16
|
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
17
17
|
import path from "node:path";
|
|
@@ -22,7 +22,7 @@ import { readByteStreamWithLimit } from "openclaw/plugin-sdk/response-limit-runt
|
|
|
22
22
|
import { isDeepStrictEqual } from "node:util";
|
|
23
23
|
import { runWithLocalStateOwner } from "openclaw/plugin-sdk/cli-state-owner";
|
|
24
24
|
import { getRuntimeConfigSnapshot, getRuntimeConfigSourceSnapshot } from "openclaw/plugin-sdk/runtime-config-snapshot";
|
|
25
|
-
|
|
25
|
+
// extensions/matrix/src/cli-shared.ts
|
|
26
26
|
const MATRIX_CLI_RECOVERY_KEY_STDIN_MAX_BYTES = 1048576;
|
|
27
27
|
async function readMatrixCliRecoveryKeyFromStdin() {
|
|
28
28
|
const recoveryKey = (await readByteStreamWithLimit(process.stdin, {
|
|
@@ -329,8 +329,7 @@ function printVerificationStatus(status, verbose = false, accountId) {
|
|
|
329
329
|
}
|
|
330
330
|
printVerificationGuidance(status, accountId);
|
|
331
331
|
}
|
|
332
|
-
|
|
333
|
-
//#region extensions/matrix/src/matrix/actions/devices.ts
|
|
332
|
+
// extensions/matrix/src/matrix/actions/devices.ts
|
|
334
333
|
async function listMatrixOwnDevices(opts = {}) {
|
|
335
334
|
return await withResolvedActionClient(opts, async (client) => await client.listOwnDevices());
|
|
336
335
|
}
|
|
@@ -349,8 +348,7 @@ async function pruneMatrixStaleGatewayDevices(opts = {}) {
|
|
|
349
348
|
};
|
|
350
349
|
});
|
|
351
350
|
}
|
|
352
|
-
|
|
353
|
-
//#region extensions/matrix/src/cli-account.ts
|
|
351
|
+
// extensions/matrix/src/cli-account.ts
|
|
354
352
|
async function addMatrixAccount(params) {
|
|
355
353
|
const initialSyncLimit = parseOptionalInt(params.initialSyncLimit, "--initial-sync-limit", { min: 0 });
|
|
356
354
|
const cfg = getMatrixRuntime().config.current();
|
|
@@ -405,7 +403,7 @@ async function addMatrixAccount(params) {
|
|
|
405
403
|
backupVersion: null
|
|
406
404
|
};
|
|
407
405
|
if (accountConfig.encryption === true) {
|
|
408
|
-
const { maybeBootstrapNewEncryptedMatrixAccount } = await import("./setup-bootstrap-
|
|
406
|
+
const { maybeBootstrapNewEncryptedMatrixAccount } = await import("./setup-bootstrap-Ch6r7Szn.mjs");
|
|
409
407
|
verificationBootstrap = await maybeBootstrapNewEncryptedMatrixAccount({
|
|
410
408
|
previousCfg: cfg,
|
|
411
409
|
cfg: updated,
|
|
@@ -527,8 +525,7 @@ function registerMatrixAccountCommands(root) {
|
|
|
527
525
|
});
|
|
528
526
|
});
|
|
529
527
|
}
|
|
530
|
-
|
|
531
|
-
//#region extensions/matrix/src/cli-devices.ts
|
|
528
|
+
// extensions/matrix/src/cli-devices.ts
|
|
532
529
|
function printMatrixOwnDevices(devices) {
|
|
533
530
|
if (devices.length === 0) {
|
|
534
531
|
console.log("Devices: none");
|
|
@@ -575,8 +572,7 @@ function registerMatrixDeviceCommands(root) {
|
|
|
575
572
|
});
|
|
576
573
|
});
|
|
577
574
|
}
|
|
578
|
-
|
|
579
|
-
//#region extensions/matrix/src/cli-direct.ts
|
|
575
|
+
// extensions/matrix/src/cli-direct.ts
|
|
580
576
|
function printDirectRoomCandidate(room) {
|
|
581
577
|
const members = room.joinedMembers === null ? "unavailable" : room.joinedMembers.map((member) => formatMatrixCliText(member)).join(", ") || "none";
|
|
582
578
|
console.log(`- ${formatMatrixCliText(room.roomId)} [${room.source}] strict=${room.strict ? "yes" : "no"} joined=${members}`);
|
|
@@ -595,7 +591,7 @@ function printDirectRoomInspection(result) {
|
|
|
595
591
|
}
|
|
596
592
|
async function inspectMatrixDirectRoom(params) {
|
|
597
593
|
const cfg = getMatrixRuntime().config.current();
|
|
598
|
-
const [{ withResolvedActionClient }, { inspectMatrixDirectRooms }] = await Promise.all([import("./client-
|
|
594
|
+
const [{ withResolvedActionClient }, { inspectMatrixDirectRooms }] = await Promise.all([import("./client-DL_aELCJ.mjs").then((n) => n.t), import("./direct-management-BOYMqZJQ.mjs").then((n) => n.t)]);
|
|
599
595
|
return await withResolvedActionClient({
|
|
600
596
|
accountId: params.accountId,
|
|
601
597
|
cfg
|
|
@@ -613,7 +609,7 @@ async function repairMatrixDirectRoom(params) {
|
|
|
613
609
|
cfg,
|
|
614
610
|
accountId: params.accountId
|
|
615
611
|
});
|
|
616
|
-
const [{ withStartedActionClient }, { repairMatrixDirectRooms }] = await Promise.all([import("./client-
|
|
612
|
+
const [{ withStartedActionClient }, { repairMatrixDirectRooms }] = await Promise.all([import("./client-DL_aELCJ.mjs").then((n) => n.t), import("./direct-management-BOYMqZJQ.mjs").then((n) => n.t)]);
|
|
617
613
|
return await withStartedActionClient({
|
|
618
614
|
accountId: params.accountId,
|
|
619
615
|
cfg
|
|
@@ -684,8 +680,7 @@ function registerMatrixDirectCommands(root) {
|
|
|
684
680
|
});
|
|
685
681
|
});
|
|
686
682
|
}
|
|
687
|
-
|
|
688
|
-
//#region extensions/matrix/src/cli-doctor.ts
|
|
683
|
+
// extensions/matrix/src/cli-doctor.ts
|
|
689
684
|
function registerMatrixDoctorCommands(root) {
|
|
690
685
|
const accountForRoot = (rootDir, stateDir) => rootDir === path.resolve(stateDir, "matrix") ? "default" : path.basename(path.dirname(path.dirname(rootDir)));
|
|
691
686
|
const doctor = root.command("doctor").description("Inspect and recover Matrix crypto storage refusal");
|
|
@@ -713,8 +708,7 @@ function registerMatrixDoctorCommands(root) {
|
|
|
713
708
|
console.log(`Matrix crypto refusal cleared for account ${account}; restart the Gateway.`);
|
|
714
709
|
});
|
|
715
710
|
}
|
|
716
|
-
|
|
717
|
-
//#region extensions/matrix/src/cli-encryption.ts
|
|
711
|
+
// extensions/matrix/src/cli-encryption.ts
|
|
718
712
|
function isMatrixVerificationSetupComplete(status) {
|
|
719
713
|
return status.encryptionEnabled && status.verified && status.crossSigningVerified && status.signedByOwner && status.serverDeviceKnown === true && resolveMatrixRoomKeyBackupIssue(status.backup).code === "ok";
|
|
720
714
|
}
|
|
@@ -821,8 +815,7 @@ function registerMatrixEncryptionCommands(root) {
|
|
|
821
815
|
});
|
|
822
816
|
});
|
|
823
817
|
}
|
|
824
|
-
|
|
825
|
-
//#region extensions/matrix/src/cli-profile.ts
|
|
818
|
+
// extensions/matrix/src/cli-profile.ts
|
|
826
819
|
function registerMatrixProfileCommands(root) {
|
|
827
820
|
root.command("profile").description("Manage Matrix bot profile").command("set").description("Update Matrix profile display name and/or avatar").option("--account <id>", "Account ID (for multi-account setups)").option("--name <name>", "Profile display name").option("--avatar-url <url>", "Profile avatar URL (mxc:// or http(s) URL)").option("--verbose", "Show detailed diagnostics").option("--json", "Output as JSON").action(async (options) => {
|
|
828
821
|
await runMatrixCliCommand(options, {
|
|
@@ -841,8 +834,7 @@ function registerMatrixProfileCommands(root) {
|
|
|
841
834
|
});
|
|
842
835
|
});
|
|
843
836
|
}
|
|
844
|
-
|
|
845
|
-
//#region extensions/matrix/src/cli-verification-backup.ts
|
|
837
|
+
// extensions/matrix/src/cli-verification-backup.ts
|
|
846
838
|
function registerMatrixVerificationBackupCommands(verify) {
|
|
847
839
|
const backup = verify.command("backup").description("Matrix room-key backup health and restore");
|
|
848
840
|
backup.command("status").description("Show Matrix room-key backup status for this device").option("--account <id>", "Account ID (for multi-account setups)").option("--verbose", "Show detailed diagnostics").option("--json", "Output as JSON").action(async (options) => {
|
|
@@ -1008,8 +1000,7 @@ function registerMatrixVerificationBackupCommands(verify) {
|
|
|
1008
1000
|
});
|
|
1009
1001
|
});
|
|
1010
1002
|
}
|
|
1011
|
-
|
|
1012
|
-
//#region extensions/matrix/src/cli-verification.ts
|
|
1003
|
+
// extensions/matrix/src/cli-verification.ts
|
|
1013
1004
|
function matrixCliVerificationDmLookupOptions(options) {
|
|
1014
1005
|
return {
|
|
1015
1006
|
...options.roomId !== void 0 ? { verificationDmRoomId: options.roomId } : {},
|
|
@@ -1285,8 +1276,7 @@ function registerMatrixVerificationCommands(root) {
|
|
|
1285
1276
|
});
|
|
1286
1277
|
registerMatrixVerificationBackupCommands(verify);
|
|
1287
1278
|
}
|
|
1288
|
-
|
|
1289
|
-
//#region extensions/matrix/src/cli.ts
|
|
1279
|
+
// extensions/matrix/src/cli.ts
|
|
1290
1280
|
function registerMatrixCli(params) {
|
|
1291
1281
|
const root = params.program.command("matrix").description("Matrix channel utilities").addHelpText("after", () => "\nDocs: https://docs.openclaw.ai/channels/matrix\n");
|
|
1292
1282
|
registerMatrixAccountCommands(root);
|
|
@@ -1297,5 +1287,4 @@ function registerMatrixCli(params) {
|
|
|
1297
1287
|
registerMatrixDeviceCommands(root);
|
|
1298
1288
|
registerMatrixDoctorCommands(root);
|
|
1299
1289
|
}
|
|
1300
|
-
//#endregion
|
|
1301
1290
|
export { registerMatrixCli };
|