@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,6 +1,6 @@
|
|
|
1
1
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
2
2
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
3
|
-
|
|
3
|
+
// extensions/matrix/src/matrix/reaction-common.ts
|
|
4
4
|
const MATRIX_ANNOTATION_RELATION_TYPE = "m.annotation";
|
|
5
5
|
const MATRIX_REACTION_EVENT_TYPE = "m.reaction";
|
|
6
6
|
function normalizeMatrixReactionMessageId(messageId) {
|
|
@@ -65,8 +65,7 @@ function selectOwnMatrixReactionEventIds(events, userId, emoji) {
|
|
|
65
65
|
}
|
|
66
66
|
return ids;
|
|
67
67
|
}
|
|
68
|
-
|
|
69
|
-
//#region extensions/matrix/src/matrix/sdk/send-currentness.ts
|
|
68
|
+
// extensions/matrix/src/matrix/sdk/send-currentness.ts
|
|
70
69
|
const sendCurrentness = new AsyncLocalStorage();
|
|
71
70
|
function withMatrixSendCurrentness(client, assertCurrent, run) {
|
|
72
71
|
assertCurrent();
|
|
@@ -83,5 +82,4 @@ function captureMatrixSendCurrentness(client) {
|
|
|
83
82
|
function withoutMatrixSendCurrentness(run) {
|
|
84
83
|
return sendCurrentness.exit(run);
|
|
85
84
|
}
|
|
86
|
-
//#endregion
|
|
87
85
|
export { MATRIX_REACTION_EVENT_TYPE as a, extractMatrixReactionAnnotation as c, MATRIX_ANNOTATION_RELATION_TYPE as i, selectOwnMatrixReactionEventIds as l, withMatrixSendCurrentness as n, buildMatrixReactionContent as o, withoutMatrixSendCurrentness as r, buildMatrixReactionRelationsPath as s, captureMatrixSendCurrentness as t, summarizeMatrixReactionEvents as u };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a as resolveMatrixAccountConfig, n as hasExplicitMatrixAccountConfig } from "./account-config-
|
|
2
|
-
import "./setup-core-
|
|
3
|
-
import { n as bootstrapMatrixVerification } from "./verification-
|
|
1
|
+
import { a as resolveMatrixAccountConfig, n as hasExplicitMatrixAccountConfig } from "./account-config-CVM2a28p.mjs";
|
|
2
|
+
import "./setup-core-CRUekZa3.mjs";
|
|
3
|
+
import { n as bootstrapMatrixVerification } from "./verification-BqjyjLoq.mjs";
|
|
4
4
|
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
5
|
-
|
|
5
|
+
// extensions/matrix/src/setup-bootstrap.ts
|
|
6
6
|
async function maybeBootstrapNewEncryptedMatrixAccount(params) {
|
|
7
7
|
const accountConfig = resolveMatrixAccountConfig({
|
|
8
8
|
cfg: params.cfg,
|
|
@@ -54,5 +54,4 @@ async function runMatrixSetupBootstrapAfterConfigWrite(params) {
|
|
|
54
54
|
}
|
|
55
55
|
params.runtime.error(`Matrix verification bootstrap warning for "${params.accountId}": ${bootstrap.error ?? "unknown bootstrap failure"}`);
|
|
56
56
|
}
|
|
57
|
-
//#endregion
|
|
58
57
|
export { maybeBootstrapNewEncryptedMatrixAccount, runMatrixSetupBootstrapAfterConfigWrite };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as resolveConfiguredMatrixAccountIds, d as resolveScopedMatrixEnvConfig, f as resolveMatrixAccountStringValues, l as resolveGlobalMatrixEnvConfig, s as resolveMatrixDefaultOrOnlyAccountId, u as resolveMatrixEnvAuthReadiness } from "./account-selection-
|
|
3
|
-
import { a as resolveMatrixAccountConfig, o as resolveMatrixBaseConfig, t as findMatrixAccountConfig } from "./account-config-
|
|
4
|
-
import { a as loadMatrixCredentials, o as loadMatrixCredentialsAsync, r as credentialsMatchConfig, t as captureMatrixCredentialsEnv } from "./credentials-read-
|
|
5
|
-
import { n as resolveMatrixConfigPath, r as shouldStoreMatrixAccountAtTopLevel, t as resolveMatrixConfigFieldPath } from "./config-paths-
|
|
1
|
+
import { n as __exportAll } from "./runtime-doctor-migrations-CSvRANPN.mjs";
|
|
2
|
+
import { a as resolveConfiguredMatrixAccountIds, d as resolveScopedMatrixEnvConfig, f as resolveMatrixAccountStringValues, l as resolveGlobalMatrixEnvConfig, s as resolveMatrixDefaultOrOnlyAccountId, u as resolveMatrixEnvAuthReadiness } from "./account-selection-BPFpdMIw.mjs";
|
|
3
|
+
import { a as resolveMatrixAccountConfig, o as resolveMatrixBaseConfig, t as findMatrixAccountConfig } from "./account-config-CVM2a28p.mjs";
|
|
4
|
+
import { a as loadMatrixCredentials, o as loadMatrixCredentialsAsync, r as credentialsMatchConfig, t as captureMatrixCredentialsEnv } from "./credentials-read-BOuCoy-p.mjs";
|
|
5
|
+
import { n as resolveMatrixConfigPath, r as shouldStoreMatrixAccountAtTopLevel, t as resolveMatrixConfigFieldPath } from "./config-paths-DBpHxDyc.mjs";
|
|
6
6
|
import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
|
7
7
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
8
8
|
import { coerceSecretRef, hasConfiguredSecretInput, normalizeSecretInputString } from "openclaw/plugin-sdk/secret-input";
|
|
@@ -11,7 +11,7 @@ import { DEFAULT_ACCOUNT_ID as DEFAULT_ACCOUNT_ID$1, addWildcardAllowFrom, apply
|
|
|
11
11
|
import { resolveOptionalIntegerOption } from "openclaw/plugin-sdk/number-runtime";
|
|
12
12
|
import { DEFAULT_ACCOUNT_ID as DEFAULT_ACCOUNT_ID$2, normalizeAccountId as normalizeAccountId$2 } from "openclaw/plugin-sdk/routing";
|
|
13
13
|
import { createChannelDmPolicy } from "openclaw/plugin-sdk/channel-dm-policy";
|
|
14
|
-
|
|
14
|
+
// extensions/matrix/src/matrix/accounts.ts
|
|
15
15
|
function clean(value) {
|
|
16
16
|
return normalizeOptionalString(value) ?? "";
|
|
17
17
|
}
|
|
@@ -142,8 +142,7 @@ async function resolveMatrixAccountAsync(params) {
|
|
|
142
142
|
configured: isMatrixAccountConfigured(prepared, stored)
|
|
143
143
|
};
|
|
144
144
|
}
|
|
145
|
-
|
|
146
|
-
//#region extensions/matrix/src/matrix/config-update.ts
|
|
145
|
+
// extensions/matrix/src/matrix/config-update.ts
|
|
147
146
|
var config_update_exports = /* @__PURE__ */ __exportAll({
|
|
148
147
|
resolveMatrixConfigFieldPath: () => resolveMatrixConfigFieldPath,
|
|
149
148
|
resolveMatrixConfigPath: () => resolveMatrixConfigPath,
|
|
@@ -237,8 +236,7 @@ function updateMatrixAccountConfig(cfg, accountId, patch) {
|
|
|
237
236
|
}
|
|
238
237
|
};
|
|
239
238
|
}
|
|
240
|
-
|
|
241
|
-
//#region extensions/matrix/src/matrix/profile.ts
|
|
239
|
+
// extensions/matrix/src/matrix/profile.ts
|
|
242
240
|
var profile_exports = /* @__PURE__ */ __exportAll({
|
|
243
241
|
isSupportedMatrixAvatarSource: () => isSupportedMatrixAvatarSource,
|
|
244
242
|
syncMatrixOwnProfile: () => syncMatrixOwnProfile
|
|
@@ -304,8 +302,7 @@ async function syncMatrixOwnProfile(params) {
|
|
|
304
302
|
...avatar
|
|
305
303
|
};
|
|
306
304
|
}
|
|
307
|
-
|
|
308
|
-
//#region extensions/matrix/src/setup-contract.ts
|
|
305
|
+
// extensions/matrix/src/setup-contract.ts
|
|
309
306
|
const matrixSingleAccountKeysToMove = [
|
|
310
307
|
"homeserver",
|
|
311
308
|
"userId",
|
|
@@ -365,8 +362,7 @@ function resolveSingleAccountPromotionTarget(params) {
|
|
|
365
362
|
}
|
|
366
363
|
return DEFAULT_ACCOUNT_ID$2;
|
|
367
364
|
}
|
|
368
|
-
|
|
369
|
-
//#region extensions/matrix/src/setup-config.ts
|
|
365
|
+
// extensions/matrix/src/setup-config.ts
|
|
370
366
|
const channel$1 = "matrix";
|
|
371
367
|
const COMMON_SINGLE_ACCOUNT_KEYS_TO_MOVE = /* @__PURE__ */ new Set([
|
|
372
368
|
"name",
|
|
@@ -477,8 +473,7 @@ function applyMatrixSetupAccountConfig(params) {
|
|
|
477
473
|
initialSyncLimit: input.initialSyncLimit
|
|
478
474
|
});
|
|
479
475
|
}
|
|
480
|
-
|
|
481
|
-
//#region extensions/matrix/src/setup-dm-policy.ts
|
|
476
|
+
// extensions/matrix/src/setup-dm-policy.ts
|
|
482
477
|
function resolveMatrixSetupDmAllowFrom(policy, allowFrom) {
|
|
483
478
|
if (policy === "open") return addWildcardAllowFrom(allowFrom);
|
|
484
479
|
return normalizeAllowFromEntries(allowFrom ?? []).filter((entry) => entry !== "*");
|
|
@@ -519,8 +514,7 @@ function createMatrixSetupDmPolicy(promptAllowFrom) {
|
|
|
519
514
|
promptAllowFrom
|
|
520
515
|
});
|
|
521
516
|
}
|
|
522
|
-
|
|
523
|
-
//#region extensions/matrix/src/setup-core.ts
|
|
517
|
+
// extensions/matrix/src/setup-core.ts
|
|
524
518
|
const channel = "matrix";
|
|
525
519
|
function resolveMatrixSetupAccountId(params) {
|
|
526
520
|
return normalizeAccountId$1(params.accountId?.trim() || params.name?.trim() || DEFAULT_ACCOUNT_ID$1);
|
|
@@ -552,7 +546,7 @@ function createMatrixSetupWizardProxy(loadWizardModule) {
|
|
|
552
546
|
};
|
|
553
547
|
}
|
|
554
548
|
const finishMatrixSetupAfterConfigWrite = async ({ previousCfg, cfg, accountId, runtime }) => {
|
|
555
|
-
const { runMatrixSetupBootstrapAfterConfigWrite } = await import("./setup-bootstrap-
|
|
549
|
+
const { runMatrixSetupBootstrapAfterConfigWrite } = await import("./setup-bootstrap-Ch6r7Szn.mjs");
|
|
556
550
|
await runMatrixSetupBootstrapAfterConfigWrite({
|
|
557
551
|
previousCfg,
|
|
558
552
|
cfg,
|
|
@@ -666,5 +660,4 @@ const matrixSetupContract = defineChannelSetupContract({
|
|
|
666
660
|
},
|
|
667
661
|
legacyAdapter: matrixSetupAdapter
|
|
668
662
|
});
|
|
669
|
-
//#endregion
|
|
670
663
|
export { resolveMatrixAccount as _, createMatrixSetupDmPolicy as a, resolveSingleAccountPromotionTarget as c, syncMatrixOwnProfile as d, config_update_exports as f, resolveDefaultMatrixAccountId as g, resolveConfiguredMatrixBotUserIds as h, matrixSetupContract as i, singleAccountKeysToMove as l, listMatrixAccountIds as m, finishMatrixSetupAfterConfigWrite as n, moveSingleMatrixAccountConfigToNamedAccount as o, updateMatrixAccountConfig as p, matrixSetupAdapter as r, namedAccountPromotionKeys as s, createMatrixSetupWizardProxy as t, profile_exports as u, resolveMatrixAccountAsync as v };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { t as getMatrixRuntime } from "./runtime-
|
|
2
|
-
import { o as resolveMatrixSqliteStateEnv, r as assertMatrixSupportedStateFile } from "./retired-state-
|
|
3
|
-
import { o as resolveMatrixStoragePaths, r as recordCurrentStorageMetaDeviceId } from "./storage-
|
|
1
|
+
import { t as getMatrixRuntime } from "./runtime-Ck8TjD7L.mjs";
|
|
2
|
+
import { o as resolveMatrixSqliteStateEnv, r as assertMatrixSupportedStateFile } from "./retired-state-vIr2IB90.mjs";
|
|
3
|
+
import { o as resolveMatrixStoragePaths, r as recordCurrentStorageMetaDeviceId } from "./storage-B94yQdJy.mjs";
|
|
4
4
|
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
5
5
|
import path from "node:path";
|
|
6
|
-
|
|
6
|
+
// extensions/matrix/src/matrix/monitor/startup-verification.ts
|
|
7
7
|
const STARTUP_VERIFICATION_STATE_FILENAME = "startup-verification.json";
|
|
8
8
|
const STARTUP_VERIFICATION_NAMESPACE = "startup-verification";
|
|
9
9
|
const STARTUP_VERIFICATION_MAX_ENTRIES = 1e3;
|
|
@@ -110,5 +110,4 @@ async function ensureMatrixStartupVerification(params) {
|
|
|
110
110
|
};
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
|
-
//#endregion
|
|
114
113
|
export { ensureMatrixStartupVerification };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { c as resolveMatrixStateLayoutChildDepth } from "./storage-paths-
|
|
1
|
+
import { c as resolveMatrixStateLayoutChildDepth } from "./storage-paths-e_Vq6cvw.mjs";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { hasNodeErrorCode } from "@openclaw/fs-safe/path";
|
|
4
4
|
import { walkDirectory } from "@openclaw/fs-safe/walk";
|
|
5
|
-
|
|
5
|
+
// extensions/matrix/src/matrix/state-layout-walk.ts
|
|
6
6
|
/** Traverse only shipped Matrix layouts; archives and unrelated descendants stay unopened. */
|
|
7
7
|
async function walkMatrixStateFiles(stateDir, includeFile, stateRootDepths = []) {
|
|
8
8
|
const matrixRoot = path.resolve(stateDir, "matrix");
|
|
@@ -23,5 +23,4 @@ async function walkMatrixStateFiles(stateDir, includeFile, stateRootDepths = [])
|
|
|
23
23
|
failedDirs: result.failedDirs.filter((failure) => failure.path !== matrixRoot || !hasNodeErrorCode(failure.error, "ENOENT"))
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
|
-
//#endregion
|
|
27
26
|
export { walkMatrixStateFiles as t };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { t as getMatrixRuntime } from "./runtime-
|
|
2
|
-
import { n as isMatrixActiveTokenRootDirectory, r as resolveMatrixAccountStorageRoot } from "./storage-paths-
|
|
3
|
-
import { c as updateMatrixKeyedState, i as assertMatrixSupportedStateRoot, o as resolveMatrixSqliteStateEnv, r as assertMatrixSupportedStateFile } from "./retired-state-
|
|
4
|
-
import { n as MATRIX_RECOVERY_KEY_FILENAME, o as scoreMatrixCryptoStateInStore, t as MATRIX_IDB_SNAPSHOT_FILENAME } from "./crypto-state-store-
|
|
1
|
+
import { t as getMatrixRuntime } from "./runtime-Ck8TjD7L.mjs";
|
|
2
|
+
import { n as isMatrixActiveTokenRootDirectory, r as resolveMatrixAccountStorageRoot } from "./storage-paths-e_Vq6cvw.mjs";
|
|
3
|
+
import { c as updateMatrixKeyedState, i as assertMatrixSupportedStateRoot, o as resolveMatrixSqliteStateEnv, r as assertMatrixSupportedStateFile } from "./retired-state-vIr2IB90.mjs";
|
|
4
|
+
import { n as MATRIX_RECOVERY_KEY_FILENAME, o as scoreMatrixCryptoStateInStore, t as MATRIX_IDB_SNAPSHOT_FILENAME } from "./crypto-state-store-CM57gchf.mjs";
|
|
5
5
|
import { normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
|
6
6
|
import { isRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
7
7
|
import path from "node:path";
|
|
8
8
|
import fs from "node:fs";
|
|
9
9
|
import os from "node:os";
|
|
10
|
-
|
|
10
|
+
// extensions/matrix/src/matrix/client/storage-metadata.ts
|
|
11
11
|
const STORAGE_META_NAMESPACE = "storage-meta";
|
|
12
12
|
const STORAGE_META_STATE_KEY = "current";
|
|
13
13
|
const STORAGE_META_MAX_ENTRIES = 10;
|
|
@@ -35,8 +35,7 @@ function normalizeMatrixStorageMetadata(value) {
|
|
|
35
35
|
if (value.currentTokenStateClaimed === true) metadata.currentTokenStateClaimed = true;
|
|
36
36
|
return Object.keys(metadata).length > 0 ? metadata : null;
|
|
37
37
|
}
|
|
38
|
-
|
|
39
|
-
//#region extensions/matrix/src/matrix/client/storage.ts
|
|
38
|
+
// extensions/matrix/src/matrix/client/storage.ts
|
|
40
39
|
const DEFAULT_ACCOUNT_KEY = "default";
|
|
41
40
|
const STORAGE_META_FILENAME = "storage-meta.json";
|
|
42
41
|
function openStorageMetaStore(rootDir) {
|
|
@@ -183,14 +182,21 @@ async function maybeMigrateLegacyStorage({ storagePaths }) {
|
|
|
183
182
|
const { rootDir, storagePath } = storagePaths;
|
|
184
183
|
await assertMatrixSupportedStateRoot(rootDir);
|
|
185
184
|
if (!fs.existsSync(storagePath)) return;
|
|
186
|
-
const syncCache = await import("./sync-cache-state-
|
|
187
|
-
|
|
185
|
+
const syncCache = await import("./sync-cache-state-B-FayxeA.mjs").then((n) => n.o);
|
|
186
|
+
const { Utf8InputError } = await import("./runtime-doctor-migrations-CSvRANPN.mjs").then((n) => n.t);
|
|
188
187
|
const logger = getMatrixRuntime().logging.getChildLogger({ module: "matrix-storage" });
|
|
188
|
+
let persisted;
|
|
189
|
+
try {
|
|
190
|
+
persisted = await syncCache.readLegacyMatrixSyncCacheState(rootDir);
|
|
191
|
+
} catch (error) {
|
|
192
|
+
if (!(error instanceof Utf8InputError)) throw error;
|
|
193
|
+
logger.warn?.(`${error.message} Legacy Matrix sync cache left in place: ${storagePath}`);
|
|
194
|
+
return;
|
|
195
|
+
}
|
|
196
|
+
if (!persisted) return;
|
|
189
197
|
fs.mkdirSync(rootDir, { recursive: true });
|
|
190
198
|
let migrated = false;
|
|
191
199
|
try {
|
|
192
|
-
const persisted = await syncCache.readLegacyMatrixSyncCacheState(rootDir);
|
|
193
|
-
if (!persisted) return;
|
|
194
200
|
const store = getMatrixRuntime().state.openKeyedStoreV2(syncCache.openMatrixSyncCacheStoreOptions(rootDir));
|
|
195
201
|
if (!await syncCache.hasMatrixSyncCacheStateInStore({
|
|
196
202
|
storageRootDir: rootDir,
|
|
@@ -276,5 +282,4 @@ async function repairCurrentTokenStorageMetaDeviceId(params) {
|
|
|
276
282
|
deviceId
|
|
277
283
|
});
|
|
278
284
|
}
|
|
279
|
-
//#endregion
|
|
280
285
|
export { resolveMatrixStateFilePath as a, repairCurrentTokenStorageMetaDeviceId as i, maybeMigrateLegacyStorage as n, resolveMatrixStoragePaths as o, recordCurrentStorageMetaDeviceId as r, writeStorageMeta as s, claimCurrentTokenStorageState as t };
|
|
@@ -2,7 +2,7 @@ import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/acco
|
|
|
2
2
|
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
3
3
|
import crypto from "node:crypto";
|
|
4
4
|
import path from "node:path";
|
|
5
|
-
|
|
5
|
+
// extensions/matrix/src/storage-paths.ts
|
|
6
6
|
const MATRIX_TOKEN_HASH_DIRECTORY_PATTERN = /^[a-f0-9]{16}$/u;
|
|
7
7
|
const MATRIX_SERVER_USER_DIRECTORY_PATTERN = /^.+__.+$/u;
|
|
8
8
|
function isMatrixActiveTokenRootDirectory(name) {
|
|
@@ -49,5 +49,4 @@ function resolveMatrixAccountStorageRoot(params) {
|
|
|
49
49
|
tokenHash
|
|
50
50
|
};
|
|
51
51
|
}
|
|
52
|
-
//#endregion
|
|
53
52
|
export { resolveMatrixCredentialsFilename as a, resolveMatrixStateLayoutChildDepth as c, resolveMatrixCredentialsDir as i, sanitizeMatrixPathSegment as l, isMatrixActiveTokenRootDirectory as n, resolveMatrixCredentialsPath as o, resolveMatrixAccountStorageRoot as r, resolveMatrixHomeserverKey as s, hashMatrixAccessToken as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as listBindingsForAccount, i as listAllBindings, n as getMatrixThreadBindingManager, s as resolveBindingKey } from "./thread-bindings-shared-
|
|
1
|
+
import { a as listBindingsForAccount, i as listAllBindings, n as getMatrixThreadBindingManager, s as resolveBindingKey } from "./thread-bindings-shared-FMu_szTm.mjs";
|
|
2
2
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
3
3
|
import { getSessionBindingService } from "openclaw/plugin-sdk/conversation-binding-runtime";
|
|
4
|
-
|
|
4
|
+
// extensions/matrix/src/matrix/subagent-hooks.ts
|
|
5
5
|
async function handleMatrixSubagentEnded(event) {
|
|
6
6
|
const accountId = normalizeOptionalString(event.accountId) || void 0;
|
|
7
7
|
const matching = (accountId ? listBindingsForAccount(accountId) : listAllBindings()).filter((entry) => entry.targetSessionKey === event.targetSessionKey && entry.targetKind === "subagent");
|
|
@@ -49,5 +49,4 @@ function handleMatrixSubagentDeliveryTarget(event) {
|
|
|
49
49
|
...threadId ? { threadId } : {}
|
|
50
50
|
} };
|
|
51
51
|
}
|
|
52
|
-
//#endregion
|
|
53
52
|
export { handleMatrixSubagentDeliveryTarget, handleMatrixSubagentEnded };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { d as writeMatrixStateChunks, l as chunkMatrixStateJson, o as resolveMatrixSqliteStateEnv, u as readMatrixStateChunks } from "./retired-state-
|
|
1
|
+
import { n as __exportAll } from "./runtime-doctor-migrations-CSvRANPN.mjs";
|
|
2
|
+
import { d as writeMatrixStateChunks, l as chunkMatrixStateJson, o as resolveMatrixSqliteStateEnv, u as readMatrixStateChunks } from "./retired-state-vIr2IB90.mjs";
|
|
3
3
|
import { isRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
4
4
|
import { createHash, randomUUID } from "node:crypto";
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
import { asSafeIntegerInRange } from "openclaw/plugin-sdk/number-runtime";
|
|
7
7
|
import fs from "node:fs/promises";
|
|
8
8
|
import { KeyedAsyncQueue } from "openclaw/plugin-sdk/keyed-async-queue";
|
|
9
|
-
|
|
9
|
+
// extensions/matrix/src/matrix/client/sync-cache-state.ts
|
|
10
10
|
var sync_cache_state_exports = /* @__PURE__ */ __exportAll({
|
|
11
11
|
MATRIX_SYNC_CACHE_VERSION: () => 1,
|
|
12
12
|
deleteMatrixSyncCacheStateFromStore: () => deleteMatrixSyncCacheStateFromStore,
|
|
@@ -129,12 +129,14 @@ function buildSyncCacheRows(payload) {
|
|
|
129
129
|
};
|
|
130
130
|
}
|
|
131
131
|
async function readLegacyMatrixSyncCacheState(storageRootDir) {
|
|
132
|
+
const { decodeUtf8Input, Utf8InputError } = await import("./runtime-doctor-migrations-CSvRANPN.mjs").then((n) => n.t);
|
|
132
133
|
try {
|
|
133
|
-
const raw = await fs.readFile(resolveLegacySyncCachePath(storageRootDir), "
|
|
134
|
+
const raw = decodeUtf8Input(await fs.readFile(resolveLegacySyncCachePath(storageRootDir)), "Legacy Matrix sync cache");
|
|
134
135
|
const persisted = normalizeLegacyPersistedStore(JSON.parse(raw));
|
|
135
136
|
if (!persisted?.savedSync && !persisted?.clientOptions) return null;
|
|
136
137
|
return persisted;
|
|
137
|
-
} catch {
|
|
138
|
+
} catch (error) {
|
|
139
|
+
if (error instanceof Utf8InputError) throw error;
|
|
138
140
|
return null;
|
|
139
141
|
}
|
|
140
142
|
}
|
|
@@ -161,5 +163,4 @@ async function deleteMatrixSyncCacheStateFromStore(params) {
|
|
|
161
163
|
await fs.rm(resolveLegacySyncCachePath(storageRootDir), { force: true }).catch(() => void 0);
|
|
162
164
|
});
|
|
163
165
|
}
|
|
164
|
-
//#endregion
|
|
165
166
|
export { readPersistedStoreFromStore as a, readLegacyMatrixSyncCacheState as i, hasMatrixSyncCacheStateInStore as n, sync_cache_state_exports as o, openMatrixSyncCacheStoreOptions as r, writeMatrixSyncCacheStateToStore as s, deleteMatrixSyncCacheStateFromStore as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
2
|
-
|
|
2
|
+
// extensions/matrix/src/matrix/target-ids.ts
|
|
3
3
|
const MATRIX_PREFIX = "matrix:";
|
|
4
4
|
const ROOM_PREFIX = "room:";
|
|
5
5
|
const CHANNEL_PREFIX = "channel:";
|
|
@@ -97,5 +97,4 @@ function resolveMatrixDirectUserId(params) {
|
|
|
97
97
|
const userId = stripKnownPrefixes(params.from ?? "", [MATRIX_PREFIX, USER_PREFIX]);
|
|
98
98
|
return isMatrixQualifiedUserId(userId) ? userId : void 0;
|
|
99
99
|
}
|
|
100
|
-
//#endregion
|
|
101
100
|
export { normalizeMatrixResolvableTarget as a, normalizeMatrixMessagingTarget as i, isMatrixQualifiedUserId as n, resolveMatrixDirectUserId as o, isMatrixRoomId as r, resolveMatrixTargetIdentity as s, isMatrixInviteAutoJoinTarget as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { s as resolveMatrixTargetIdentity } from "./target-ids-
|
|
1
|
+
import { s as resolveMatrixTargetIdentity } from "./target-ids-DltG_ZHJ.mjs";
|
|
2
2
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
3
|
-
|
|
3
|
+
// extensions/matrix/src/thread-binding-api.ts
|
|
4
4
|
const defaultTopLevelPlacement = "child";
|
|
5
5
|
function resolveMatrixInboundConversation(params) {
|
|
6
6
|
const rawTarget = params.to?.trim() || params.conversationId?.trim() || "";
|
|
@@ -13,5 +13,4 @@ function resolveMatrixInboundConversation(params) {
|
|
|
13
13
|
};
|
|
14
14
|
return parentConversationId ? { conversationId: parentConversationId } : null;
|
|
15
15
|
}
|
|
16
|
-
//#endregion
|
|
17
16
|
export { resolveMatrixInboundConversation as n, defaultTopLevelPlacement as t };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as getMatrixRuntime } from "./runtime-
|
|
2
|
-
import { a as listBindingsForAccount, c as setBindingRecord, d as setMatrixThreadBindingManagerEntry, m as toSessionBindingRecord, o as removeBindingRecord, r as getMatrixThreadBindingManagerEntry, s as resolveBindingKey, t as deleteMatrixThreadBindingManagerEntry } from "./thread-bindings-shared-
|
|
3
|
-
import { o as resolveMatrixSqliteStateEnv, r as assertMatrixSupportedStateFile, s as resolveMatrixSqliteStateKey } from "./retired-state-
|
|
4
|
-
import { a as resolveMatrixStateFilePath, t as claimCurrentTokenStorageState } from "./storage-
|
|
5
|
-
import { r as sendMessageMatrix } from "./send-
|
|
1
|
+
import { t as getMatrixRuntime } from "./runtime-Ck8TjD7L.mjs";
|
|
2
|
+
import { a as listBindingsForAccount, c as setBindingRecord, d as setMatrixThreadBindingManagerEntry, m as toSessionBindingRecord, o as removeBindingRecord, r as getMatrixThreadBindingManagerEntry, s as resolveBindingKey, t as deleteMatrixThreadBindingManagerEntry } from "./thread-bindings-shared-FMu_szTm.mjs";
|
|
3
|
+
import { o as resolveMatrixSqliteStateEnv, r as assertMatrixSupportedStateFile, s as resolveMatrixSqliteStateKey } from "./retired-state-vIr2IB90.mjs";
|
|
4
|
+
import { a as resolveMatrixStateFilePath, t as claimCurrentTokenStorageState } from "./storage-B94yQdJy.mjs";
|
|
5
|
+
import { r as sendMessageMatrix } from "./send-BMe_VcxP.mjs";
|
|
6
6
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
7
7
|
import { createHash } from "node:crypto";
|
|
8
8
|
import path from "node:path";
|
|
@@ -11,7 +11,7 @@ import { registerSessionBindingAdapterV2, resolveThreadBindingFarewellText, reso
|
|
|
11
11
|
import { hasSqliteWorkerOutcomeUnknown } from "openclaw/plugin-sdk/sqlite-runtime";
|
|
12
12
|
import { resolveSessionAgentIdStrict } from "openclaw/plugin-sdk/agent-scope-runtime";
|
|
13
13
|
import { resolveAgentIdFromSessionKey } from "openclaw/plugin-sdk/session-key-runtime";
|
|
14
|
-
|
|
14
|
+
// extensions/matrix/src/matrix/thread-bindings-session-adapter.ts
|
|
15
15
|
function sameBindingIncarnation(a, b) {
|
|
16
16
|
return resolveBindingKey(a) === resolveBindingKey(b) && a.boundAt === b.boundAt && a.targetSessionKey === b.targetSessionKey && a.targetKind === b.targetKind;
|
|
17
17
|
}
|
|
@@ -193,8 +193,7 @@ function createMatrixSessionBindingAdapter(params, { manager, defaults, committe
|
|
|
193
193
|
unbindRecords
|
|
194
194
|
};
|
|
195
195
|
}
|
|
196
|
-
|
|
197
|
-
//#region extensions/matrix/src/matrix/thread-bindings.ts
|
|
196
|
+
// extensions/matrix/src/matrix/thread-bindings.ts
|
|
198
197
|
const THREAD_BINDINGS_NAMESPACE = "thread-bindings";
|
|
199
198
|
const THREAD_BINDINGS_MAX_ENTRIES = 1e4;
|
|
200
199
|
const THREAD_BINDINGS_SWEEP_INTERVAL_MS = 6e4;
|
|
@@ -616,5 +615,4 @@ async function createMatrixThreadBindingManager(params) {
|
|
|
616
615
|
});
|
|
617
616
|
return manager;
|
|
618
617
|
}
|
|
619
|
-
//#endregion
|
|
620
618
|
export { createMatrixThreadBindingManager as t };
|
package/dist/.setup/{thread-bindings-shared-CPjUA0Ib.mjs → thread-bindings-shared-FMu_szTm.mjs}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { projectThreadBindingRecord, resolveThreadBindingLifecycle, warnPluginSdkDeprecation } from "openclaw/plugin-sdk/thread-bindings-session-runtime";
|
|
2
|
-
|
|
2
|
+
// extensions/matrix/src/matrix/thread-bindings-shared.ts
|
|
3
3
|
const MANAGERS_BY_ACCOUNT_ID = /* @__PURE__ */ new Map();
|
|
4
4
|
const BINDINGS_BY_ACCOUNT_CONVERSATION = /* @__PURE__ */ new Map();
|
|
5
5
|
function resolveBindingKey(params) {
|
|
@@ -88,5 +88,4 @@ function createMatrixThreadBindingAsyncTimeoutSetter(update) {
|
|
|
88
88
|
}
|
|
89
89
|
const setMatrixThreadBindingIdleTimeoutBySessionKeyAsync = createMatrixThreadBindingAsyncTimeoutSetter((manager, params) => manager.setIdleTimeoutBySessionKeyAsync(params));
|
|
90
90
|
const setMatrixThreadBindingMaxAgeBySessionKeyAsync = createMatrixThreadBindingAsyncTimeoutSetter((manager, params) => manager.setMaxAgeBySessionKeyAsync(params));
|
|
91
|
-
//#endregion
|
|
92
91
|
export { listBindingsForAccount as a, setBindingRecord as c, setMatrixThreadBindingManagerEntry as d, setMatrixThreadBindingMaxAgeBySessionKey as f, listAllBindings as i, setMatrixThreadBindingIdleTimeoutBySessionKey as l, toSessionBindingRecord as m, getMatrixThreadBindingManager as n, removeBindingRecord as o, setMatrixThreadBindingMaxAgeBySessionKeyAsync as p, getMatrixThreadBindingManagerEntry as r, resolveBindingKey as s, deleteMatrixThreadBindingManagerEntry as t, setMatrixThreadBindingIdleTimeoutBySessionKeyAsync as u };
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { a as resolveMatrixAccountConfig, o as resolveMatrixBaseConfig } from "./account-config-
|
|
2
|
-
import { g as resolveDefaultMatrixAccountId } from "./setup-core-
|
|
3
|
-
import { o as resolveMatrixRoomConfig } from "./channel-
|
|
4
|
-
import { a as normalizeMatrixResolvableTarget } from "./target-ids-
|
|
5
|
-
import { l as selectOwnMatrixReactionEventIds, s as buildMatrixReactionRelationsPath, u as summarizeMatrixReactionEvents } from "./send-currentness-
|
|
6
|
-
import { c as isStrictDirectMembership, s as hasDirectMatrixMemberFlag, u as readJoinedMatrixMembers } from "./direct-management-
|
|
7
|
-
import { C as resolveMatrixRoomId, n as reactMatrixMessage, p as buildPollResponseContent, r as sendMessageMatrix, v as isPollStartType, y as parsePollStart } from "./send-
|
|
8
|
-
import { i as parseMxc } from "./event-helpers-
|
|
9
|
-
import { a as fetchEventSummary, c as resolveMatrixActionLimit, i as readMatrixMessages, n as editMatrixMessage, o as readPinnedEvents, r as readMatrixMessage, s as EventType, t as deleteMatrixMessage } from "./messages-
|
|
10
|
-
import { n as withResolvedActionClient, r as withResolvedRoomAction } from "./client-
|
|
11
|
-
import { t as applyMatrixProfileUpdate } from "./profile-update-
|
|
12
|
-
import { _ as scanMatrixVerificationQr, a as confirmMatrixVerificationSas, b as verifyMatrixRecoveryKey, c as getMatrixRoomKeyBackupStatus, d as listMatrixVerifications, f as mismatchMatrixVerificationSas, h as restoreMatrixRoomKeyBackup, i as confirmMatrixVerificationReciprocateQr, l as getMatrixVerificationSas, n as bootstrapMatrixVerification, o as generateMatrixVerificationQr, p as requestMatrixVerification, r as cancelMatrixVerification, s as getMatrixEncryptionStatus, t as acceptMatrixVerification, u as getMatrixVerificationStatus, v as startMatrixVerification } from "./verification-
|
|
13
|
-
import { n as getMatrixMemberInfo, r as getMatrixRoomInfo, t as createMatrixRoomInfoResolver } from "./room-info-
|
|
1
|
+
import { a as resolveMatrixAccountConfig, o as resolveMatrixBaseConfig } from "./account-config-CVM2a28p.mjs";
|
|
2
|
+
import { g as resolveDefaultMatrixAccountId } from "./setup-core-CRUekZa3.mjs";
|
|
3
|
+
import { o as resolveMatrixRoomConfig } from "./channel-DYRabwmj.mjs";
|
|
4
|
+
import { a as normalizeMatrixResolvableTarget } from "./target-ids-DltG_ZHJ.mjs";
|
|
5
|
+
import { l as selectOwnMatrixReactionEventIds, s as buildMatrixReactionRelationsPath, u as summarizeMatrixReactionEvents } from "./send-currentness-CAUVR-f3.mjs";
|
|
6
|
+
import { c as isStrictDirectMembership, s as hasDirectMatrixMemberFlag, u as readJoinedMatrixMembers } from "./direct-management-BOYMqZJQ.mjs";
|
|
7
|
+
import { C as resolveMatrixRoomId, n as reactMatrixMessage, p as buildPollResponseContent, r as sendMessageMatrix, v as isPollStartType, y as parsePollStart } from "./send-BMe_VcxP.mjs";
|
|
8
|
+
import { i as parseMxc } from "./event-helpers-DDUjVVf7.mjs";
|
|
9
|
+
import { a as fetchEventSummary, c as resolveMatrixActionLimit, i as readMatrixMessages, n as editMatrixMessage, o as readPinnedEvents, r as readMatrixMessage, s as EventType, t as deleteMatrixMessage } from "./messages-Dt51OgyD.mjs";
|
|
10
|
+
import { n as withResolvedActionClient, r as withResolvedRoomAction } from "./client-DL_aELCJ.mjs";
|
|
11
|
+
import { t as applyMatrixProfileUpdate } from "./profile-update-DiXtw0NM.mjs";
|
|
12
|
+
import { _ as scanMatrixVerificationQr, a as confirmMatrixVerificationSas, b as verifyMatrixRecoveryKey, c as getMatrixRoomKeyBackupStatus, d as listMatrixVerifications, f as mismatchMatrixVerificationSas, h as restoreMatrixRoomKeyBackup, i as confirmMatrixVerificationReciprocateQr, l as getMatrixVerificationSas, n as bootstrapMatrixVerification, o as generateMatrixVerificationQr, p as requestMatrixVerification, r as cancelMatrixVerification, s as getMatrixEncryptionStatus, t as acceptMatrixVerification, u as getMatrixVerificationStatus, v as startMatrixVerification } from "./verification-BqjyjLoq.mjs";
|
|
13
|
+
import { n as getMatrixMemberInfo, r as getMatrixRoomInfo, t as createMatrixRoomInfoResolver } from "./room-info-BSvDbUmt.mjs";
|
|
14
14
|
import { normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
|
15
15
|
import { isRecord, normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeUniqueTrimmedStringList, uniqueValues } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
16
16
|
import { ToolAuthorizationError, createActionGate, jsonResult, readPositiveIntegerParam, readReactionParams, readStringArrayParam, readStringParam } from "openclaw/plugin-sdk/channel-actions";
|
|
17
17
|
import { timestampMsToIsoString } from "openclaw/plugin-sdk/number-runtime";
|
|
18
18
|
import { captureChannelReadAuthority } from "openclaw/plugin-sdk/fetch-runtime";
|
|
19
19
|
import { resolveAllowlistProviderRuntimeGroupPolicy, resolveDefaultGroupPolicy } from "openclaw/plugin-sdk/runtime-group-policy";
|
|
20
|
-
|
|
20
|
+
// extensions/matrix/src/matrix/actions/pins.ts
|
|
21
21
|
async function updateMatrixPins(roomId, opts, update) {
|
|
22
22
|
return await withResolvedRoomAction(roomId, opts, async (client, resolvedRoom) => {
|
|
23
23
|
const next = update(await readPinnedEvents(client, resolvedRoom));
|
|
@@ -41,8 +41,7 @@ async function listMatrixPins(roomId, opts = {}) {
|
|
|
41
41
|
};
|
|
42
42
|
});
|
|
43
43
|
}
|
|
44
|
-
|
|
45
|
-
//#region extensions/matrix/src/matrix/actions/polls.ts
|
|
44
|
+
// extensions/matrix/src/matrix/actions/polls.ts
|
|
46
45
|
function normalizeOptionIndexes(indexes) {
|
|
47
46
|
const normalized = indexes.map((index) => Math.trunc(index)).filter((index) => Number.isFinite(index) && index > 0);
|
|
48
47
|
return uniqueValues(normalized);
|
|
@@ -91,8 +90,7 @@ async function voteMatrixPoll(roomId, pollId, opts = {}) {
|
|
|
91
90
|
};
|
|
92
91
|
});
|
|
93
92
|
}
|
|
94
|
-
|
|
95
|
-
//#region extensions/matrix/src/matrix/actions/reactions.ts
|
|
93
|
+
// extensions/matrix/src/matrix/actions/reactions.ts
|
|
96
94
|
async function listMatrixEmojis(roomId, opts = {}) {
|
|
97
95
|
return await withResolvedRoomAction(roomId, opts, async (client, resolvedRoom) => {
|
|
98
96
|
const [roomState, personalPack] = await Promise.all([client.doRequest("GET", `/_matrix/client/v3/rooms/${encodeURIComponent(resolvedRoom)}/state`), client.getAccountData("im.ponies.user_emotes")]);
|
|
@@ -152,8 +150,7 @@ async function removeMatrixReactions(roomId, messageId, opts = {}) {
|
|
|
152
150
|
return { removed: toRemove.length };
|
|
153
151
|
});
|
|
154
152
|
}
|
|
155
|
-
|
|
156
|
-
//#region extensions/matrix/src/matrix/read-policy.ts
|
|
153
|
+
// extensions/matrix/src/matrix/read-policy.ts
|
|
157
154
|
function normalizeRoomId(raw) {
|
|
158
155
|
return raw?.trim().replace(/^room:/i, "") ?? "";
|
|
159
156
|
}
|
|
@@ -285,8 +282,7 @@ async function withAuthorizedMatrixReadTarget(params) {
|
|
|
285
282
|
});
|
|
286
283
|
});
|
|
287
284
|
}
|
|
288
|
-
|
|
289
|
-
//#region extensions/matrix/src/tool-actions.ts
|
|
285
|
+
// extensions/matrix/src/tool-actions.ts
|
|
290
286
|
const MATRIX_ACTION_DISABLED_MESSAGES = {
|
|
291
287
|
messages: "Matrix messages are disabled.",
|
|
292
288
|
reactions: "Matrix reactions are disabled.",
|
|
@@ -717,5 +713,4 @@ async function handleMatrixAction(ctx) {
|
|
|
717
713
|
}
|
|
718
714
|
throw new Error(`Action ${action} is not supported for provider matrix.`);
|
|
719
715
|
}
|
|
720
|
-
//#endregion
|
|
721
716
|
export { handleMatrixAction };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { assertHttpUrlTargetsPrivateNetwork, isPrivateOrLoopbackHost } from "openclaw/plugin-sdk/ssrf-runtime";
|
|
2
|
-
|
|
2
|
+
// extensions/matrix/src/matrix/client/url-validation.ts
|
|
3
3
|
const MATRIX_HTTP_HOMESERVER_ERROR = "Matrix homeserver must use https:// unless it targets a private or loopback host";
|
|
4
4
|
function cleanString(value, requiredMessage) {
|
|
5
5
|
const trimmed = typeof value === "string" ? value.trim() : "";
|
|
@@ -32,5 +32,4 @@ async function resolveValidatedMatrixHomeserverUrl(homeserver, opts) {
|
|
|
32
32
|
});
|
|
33
33
|
return normalized;
|
|
34
34
|
}
|
|
35
|
-
//#endregion
|
|
36
35
|
export { validateMatrixHomeserverUrl as n, resolveValidatedMatrixHomeserverUrl as t };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { i as withStartedActionClient, n as withResolvedActionClient } from "./client-
|
|
3
|
-
import { n as formatMatrixEncryptionUnavailableError } from "./encryption-guidance-
|
|
1
|
+
import { n as __exportAll } from "./runtime-doctor-migrations-CSvRANPN.mjs";
|
|
2
|
+
import { i as withStartedActionClient, n as withResolvedActionClient } from "./client-DL_aELCJ.mjs";
|
|
3
|
+
import { n as formatMatrixEncryptionUnavailableError } from "./encryption-guidance-CLloQ6H7.mjs";
|
|
4
4
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
5
5
|
import { setTimeout } from "node:timers/promises";
|
|
6
|
-
|
|
6
|
+
// extensions/matrix/src/matrix/actions/verification.ts
|
|
7
7
|
var verification_exports = /* @__PURE__ */ __exportAll({
|
|
8
8
|
acceptMatrixVerification: () => acceptMatrixVerification,
|
|
9
9
|
bootstrapMatrixVerification: () => bootstrapMatrixVerification,
|
|
@@ -302,5 +302,4 @@ async function bootstrapMatrixVerification(opts = {}) {
|
|
|
302
302
|
forceResetCrossSigning: opts.forceResetCrossSigning === true
|
|
303
303
|
}));
|
|
304
304
|
}
|
|
305
|
-
//#endregion
|
|
306
305
|
export { scanMatrixVerificationQr as _, confirmMatrixVerificationSas as a, verifyMatrixRecoveryKey as b, getMatrixRoomKeyBackupStatus as c, listMatrixVerifications as d, mismatchMatrixVerificationSas as f, runMatrixSelfVerification as g, restoreMatrixRoomKeyBackup as h, confirmMatrixVerificationReciprocateQr as i, getMatrixVerificationSas as l, resetMatrixRoomKeyBackup as m, bootstrapMatrixVerification as n, generateMatrixVerificationQr as o, requestMatrixVerification as p, cancelMatrixVerification as r, getMatrixEncryptionStatus as s, acceptMatrixVerification as t, getMatrixVerificationStatus as u, startMatrixVerification as v, verification_exports as y };
|