@openclaw/matrix 2026.11.5-beta.1 → 2026.11.5-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.setup/{account-config-CVM2a28p.mjs → account-config-CRsKoMqJ.mjs} +2 -1
- package/dist/.setup/{account-selection-Cow3TMFO.mjs → account-selection-UUPhMBmu.mjs} +8 -5
- package/dist/.setup/{approval-handler.runtime-_0gqiVgR.mjs → approval-handler.runtime-Ca12_7Qa.mjs} +9 -8
- package/dist/.setup/{approval-reactions-Bz_8XB01.mjs → approval-reactions-BazmsDbe.mjs} +3 -2
- package/dist/.setup/{backup-health-BxH69np2.mjs → backup-health-Dm_YMVFT.mjs} +2 -1
- package/dist/.setup/{channel-ByHcZU28.mjs → channel-CX7k81dL.mjs} +38 -27
- package/dist/.setup/{channel.runtime-sNicWjmD.mjs → channel.runtime-K_hHX-9W.mjs} +12 -10
- package/dist/.setup/{channel.setup-Bmba21y9.mjs → channel.setup-B00zzOOL.mjs} +7 -5
- package/dist/.setup/{cli-B26pps0Q.mjs → cli-dz9hd2dR.mjs} +34 -25
- package/dist/.setup/{cli-metadata-CKGwVfmT.mjs → cli-metadata-CwUhA9CY.mjs} +5 -3
- package/dist/.setup/{client-N8TEwtmk.mjs → client-CFPYqaYK.mjs} +5 -4
- package/dist/.setup/{client-Bqu801rH.mjs → client-D1bsidwU.mjs} +26 -21
- package/dist/.setup/{client-bootstrap-k6Zm1M8Y.mjs → client-bootstrap-CTT0VF6v.mjs} +3 -2
- package/dist/.setup/{client-support-CqXAOZp3.mjs → client-support-B_Mp4Qk9.mjs} +3 -2
- package/dist/.setup/{config-paths-DBpHxDyc.mjs → config-paths-CnREYb1Y.mjs} +2 -1
- package/dist/.setup/{create-client-DaGljdrk.mjs → create-client-Ccf5wyS3.mjs} +9 -8
- package/dist/.setup/{credentials-DVmY0miU.mjs → credentials-kT20jk_u.mjs} +6 -5
- package/dist/.setup/{credentials-read-rPqEpuxv.mjs → credentials-read-CM6wXUjL.mjs} +6 -5
- package/dist/.setup/{credentials-state-jxq29yQw.mjs → credentials-state-B3cuUFwZ.mjs} +2 -1
- package/dist/.setup/{crypto-node.runtime-E_hqXGxm.mjs → crypto-node.runtime-6Aj_ltHQ.mjs} +2 -1
- package/dist/.setup/{crypto-runtime-KQupbxSM.mjs → crypto-runtime-DZNytKX5.mjs} +15 -10
- package/dist/.setup/{crypto-state-store-p1mdYTWH.mjs → crypto-state-store-BZLlwkv_.mjs} +4 -3
- package/dist/.setup/{crypto-store-ownership-7lVHeXWL.mjs → crypto-store-ownership-CiQ1l_O7.mjs} +4 -3
- package/dist/.setup/{crypto-unsafe-state-doctor-CG2nJk8P.mjs → crypto-unsafe-state-doctor-Dh1dtuSz.mjs} +8 -7
- package/dist/.setup/{deps-CVPT2Ros.mjs → deps-D-W_QQjz.mjs} +2 -1
- package/dist/.setup/{device-health-D7n-lPeb.mjs → device-health-Ck2YpEVN.mjs} +3 -2
- package/dist/.setup/{direct-management-D59C1WO-.mjs → direct-management-Dp1giZ34.mjs} +11 -7
- package/dist/.setup/{directory-live-YixmpyLW.mjs → directory-live-ufzRheWx.mjs} +6 -5
- package/dist/.setup/{doctor-contract-GiXgCj7k.mjs → doctor-contract-BANpMUbP.mjs} +3 -2
- package/dist/.setup/{draft-stream-C09OtoJZ.mjs → draft-stream-BPjjKSoI.mjs} +4 -3
- package/dist/.setup/{encryption-guidance-DfbEaKct.mjs → encryption-guidance-Br3Lv9Hm.mjs} +4 -3
- package/dist/.setup/{env-vars-Bh1iOXJ1.mjs → env-vars-aEBngJPa.mjs} +2 -1
- package/dist/.setup/{errors-CL3YJV8U.mjs → errors-Bw4EHwKX.mjs} +2 -1
- package/dist/.setup/{event-helpers-DDUjVVf7.mjs → event-helpers-CxNgMQqH.mjs} +2 -1
- package/dist/.setup/{exec-approvals-C3rCm0Sn.mjs → exec-approvals-BwEOyI1-.mjs} +9 -6
- package/dist/.setup/{file-sync-store-NW6eDuai.mjs → file-sync-store-BpS12yaK.mjs} +36 -6
- package/dist/.setup/{http-client-CqnKFKUH.mjs → http-client-B_ohXrBm.mjs} +8 -5
- package/dist/.setup/{idb-persistence-CmoPtwDD.mjs → idb-persistence-BTOsltD9.mjs} +7 -6
- package/dist/.setup/{idb-persistence-lock-CH2K6d_3.mjs → idb-persistence-lock-Bh3ZLIsE.mjs} +2 -1
- package/dist/.setup/{joined-room-encryption-9sJK1kM-.mjs → joined-room-encryption-C0gHa2DG.mjs} +3 -2
- package/dist/.setup/{logger-B9TwnY6C.mjs → logger-CuAzdD8Q.mjs} +3 -2
- package/dist/.setup/{logging-Bnsn7s4r.mjs → logging-CoaEyRtA.mjs} +4 -3
- package/dist/.setup/{messages-BjzsVgS6.mjs → messages-DpJ9naJa.mjs} +14 -9
- package/dist/.setup/{monitor-D4vhbNUM.mjs → monitor-Rzl3naSn.mjs} +157 -63
- package/dist/.setup/{onboarding-DKmt3jpW.mjs → onboarding-BK-V2ZLT.mjs} +11 -10
- package/dist/.setup/{outbound-wsXTF0z_.mjs → outbound-DMMVmZjV.mjs} +4 -3
- package/dist/.setup/{profile-update-DX060MnL.mjs → profile-update-RLsY-gu6.mjs} +9 -7
- package/dist/.setup/{reaction-events-BMsatzs4.mjs → reaction-events-UA_g6jEX.mjs} +9 -8
- package/dist/.setup/{resolve-targets-Yz_3aN_2.mjs → resolve-targets-DYW8ULZS.mjs} +5 -4
- package/dist/.setup/{retired-state-Bs3Gqkge.mjs → retired-state-JGUEBE72.mjs} +7 -4
- package/dist/.setup/{room-info-OGKjk422.mjs → room-info-Dhc4efkA.mjs} +8 -6
- package/dist/.setup/{runtime-Ck8TjD7L.mjs → runtime-1kn1P6io.mjs} +2 -1
- package/dist/.setup/{runtime-doctor-migrations-CSvRANPN.mjs → runtime-doctor-migrations-hxP-CXX7.mjs} +10 -5
- package/dist/.setup/{runtime-setter-api-CpwhcBQK.mjs → runtime-setter-api-i2MOXoT3.mjs} +1 -1
- package/dist/.setup/{sdk-BXcIyN-I.mjs → sdk-DPXiQ3jr.mjs} +46 -32
- package/dist/.setup/{secret-contract-AKnr45nw.mjs → secret-contract-DxyzKSzf.mjs} +3 -2
- package/dist/.setup/{secret-contract-api-DMSwMIxd.mjs → secret-contract-api-Dukgvike.mjs} +1 -1
- package/dist/.setup/{send-CWjH-l-T.mjs → send-HHAbKARg.mjs} +41 -25
- package/dist/.setup/{send-currentness-D1x6YP9O.mjs → send-currentness-DGxiiBn9.mjs} +4 -2
- package/dist/.setup/{setup-bootstrap-yKeGh4Iy.mjs → setup-bootstrap-DaT2j28V.mjs} +5 -4
- package/dist/.setup/{setup-core-BaKffgBi.mjs → setup-core-DcqQbLZv.mjs} +20 -13
- package/dist/.setup/setup-plugin-api-Cg4TelGZ.mjs +2 -0
- package/dist/.setup/{startup-verification-C-lhD0gk.mjs → startup-verification-UkaoSldm.mjs} +5 -4
- package/dist/.setup/{state-layout-walk-BqCZTHpp.mjs → state-layout-walk-BQMgMykU.mjs} +3 -2
- package/dist/.setup/{storage-BLLN9jYG.mjs → storage-C3N6YZIn.mjs} +10 -8
- package/dist/.setup/{storage-paths-e_Vq6cvw.mjs → storage-paths-B51JM-pC.mjs} +2 -1
- package/dist/.setup/{subagent-hooks-D-lCcLGQ.mjs → subagent-hooks-CfGAysJi.mjs} +3 -2
- package/dist/.setup/{sync-cache-state-B4hJFIPw.mjs → sync-cache-state-BKVaKRzQ.mjs} +5 -4
- package/dist/.setup/{sync-state-Cu1nagBV.mjs → sync-state-CWbp0QSY.mjs} +2 -1
- package/dist/.setup/{target-ids-DltG_ZHJ.mjs → target-ids-HhcaKX1n.mjs} +2 -1
- package/dist/.setup/{task-runner-CYyGHdNW.mjs → task-runner-DY3aKiQa.mjs} +2 -1
- package/dist/.setup/{thread-binding-api-OtSciHmZ.mjs → thread-binding-api-BvuaKpd0.mjs} +3 -2
- package/dist/.setup/{thread-bindings-BA2xESjV.mjs → thread-bindings-891JsKXF.mjs} +9 -7
- package/dist/.setup/{thread-bindings-shared-CBlJu3Wz.mjs → thread-bindings-shared-QmZOfX9Q.mjs} +2 -1
- package/dist/.setup/{tool-actions-CRuiVbqj.mjs → tool-actions-yFZH_7mC.mjs} +24 -19
- package/dist/.setup/{url-validation-DesoKUns.mjs → url-validation-By_2hsXr.mjs} +2 -1
- package/dist/.setup/{verification-C5x4Hy5Y.mjs → verification-CcZIVL8P.mjs} +5 -4
- package/dist/.source-module-urls/1cd4d4ff8d44e1c8b830932b44d7cf8a7f3350e09e169910e1d7a85e131b7bea.json +1 -1
- package/dist/api.js +8 -8
- package/dist/auth-presence.js +3 -2
- 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 +16 -13
- package/dist/helper-api.js +3 -3
- package/dist/index.js +4 -3
- package/dist/plugin-entry.handlers.runtime.js +4 -3
- package/dist/runtime-api.js +8 -7
- 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 +5 -4
- package/dist/setup-plugin-api.js +1 -1
- package/dist/subagent-hooks-api.js +3 -2
- 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-B_t4waBw.mjs +0 -2
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { n as __exportAll } from "./runtime-doctor-migrations-
|
|
2
|
-
import { a as resolveConfiguredMatrixAccountIds, d as resolveScopedMatrixEnvConfig, l as resolveGlobalMatrixEnvConfig, p as resolveMatrixAccountStringValues, 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-hxP-CXX7.mjs";
|
|
2
|
+
import { a as resolveConfiguredMatrixAccountIds, d as resolveScopedMatrixEnvConfig, l as resolveGlobalMatrixEnvConfig, p as resolveMatrixAccountStringValues, s as resolveMatrixDefaultOrOnlyAccountId, u as resolveMatrixEnvAuthReadiness } from "./account-selection-UUPhMBmu.mjs";
|
|
3
|
+
import { a as resolveMatrixAccountConfig, o as resolveMatrixBaseConfig, t as findMatrixAccountConfig } from "./account-config-CRsKoMqJ.mjs";
|
|
4
|
+
import { a as loadMatrixCredentials, o as loadMatrixCredentialsAsync, r as credentialsMatchConfig, t as captureMatrixCredentialsEnv } from "./credentials-read-CM6wXUjL.mjs";
|
|
5
|
+
import { n as resolveMatrixConfigPath, r as shouldStoreMatrixAccountAtTopLevel, t as resolveMatrixConfigFieldPath } from "./config-paths-CnREYb1Y.mjs";
|
|
6
6
|
import { createLazyRuntimeNamedExport } from "openclaw/plugin-sdk/lazy-runtime";
|
|
7
7
|
import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
|
8
8
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
@@ -12,7 +12,7 @@ import { DEFAULT_ACCOUNT_ID as DEFAULT_ACCOUNT_ID$1, addWildcardAllowFrom, apply
|
|
|
12
12
|
import { resolveOptionalIntegerOption } from "openclaw/plugin-sdk/number-runtime";
|
|
13
13
|
import { DEFAULT_ACCOUNT_ID as DEFAULT_ACCOUNT_ID$2, normalizeAccountId as normalizeAccountId$2 } from "openclaw/plugin-sdk/routing";
|
|
14
14
|
import { createChannelDmPolicy } from "openclaw/plugin-sdk/channel-dm-policy";
|
|
15
|
-
|
|
15
|
+
//#region extensions/matrix/src/matrix/accounts.ts
|
|
16
16
|
function clean(value) {
|
|
17
17
|
return normalizeOptionalString(value) ?? "";
|
|
18
18
|
}
|
|
@@ -143,7 +143,8 @@ async function resolveMatrixAccountAsync(params) {
|
|
|
143
143
|
configured: isMatrixAccountConfigured(prepared, stored)
|
|
144
144
|
};
|
|
145
145
|
}
|
|
146
|
-
|
|
146
|
+
//#endregion
|
|
147
|
+
//#region extensions/matrix/src/matrix/config-update.ts
|
|
147
148
|
var config_update_exports = /* @__PURE__ */ __exportAll({
|
|
148
149
|
resolveMatrixConfigFieldPath: () => resolveMatrixConfigFieldPath,
|
|
149
150
|
resolveMatrixConfigPath: () => resolveMatrixConfigPath,
|
|
@@ -227,7 +228,8 @@ function updateMatrixAccountConfig(cfg, accountId, patch) {
|
|
|
227
228
|
}
|
|
228
229
|
};
|
|
229
230
|
}
|
|
230
|
-
|
|
231
|
+
//#endregion
|
|
232
|
+
//#region extensions/matrix/src/matrix/profile.ts
|
|
231
233
|
var profile_exports = /* @__PURE__ */ __exportAll({
|
|
232
234
|
isSupportedMatrixAvatarSource: () => isSupportedMatrixAvatarSource,
|
|
233
235
|
syncMatrixOwnProfile: () => syncMatrixOwnProfile
|
|
@@ -291,7 +293,8 @@ async function syncMatrixOwnProfile(params) {
|
|
|
291
293
|
...avatar
|
|
292
294
|
};
|
|
293
295
|
}
|
|
294
|
-
|
|
296
|
+
//#endregion
|
|
297
|
+
//#region extensions/matrix/src/setup-contract.ts
|
|
295
298
|
const matrixAuthBootstrapKeys = [
|
|
296
299
|
"homeserver",
|
|
297
300
|
"userId",
|
|
@@ -343,7 +346,8 @@ function resolveSingleAccountPromotionTarget(params) {
|
|
|
343
346
|
}
|
|
344
347
|
return DEFAULT_ACCOUNT_ID$2;
|
|
345
348
|
}
|
|
346
|
-
|
|
349
|
+
//#endregion
|
|
350
|
+
//#region extensions/matrix/src/setup-config.ts
|
|
347
351
|
const channel$1 = "matrix";
|
|
348
352
|
const COMMON_SINGLE_ACCOUNT_KEYS_TO_MOVE = /* @__PURE__ */ new Set([
|
|
349
353
|
"name",
|
|
@@ -454,7 +458,8 @@ function applyMatrixSetupAccountConfig(params) {
|
|
|
454
458
|
initialSyncLimit: input.initialSyncLimit
|
|
455
459
|
});
|
|
456
460
|
}
|
|
457
|
-
|
|
461
|
+
//#endregion
|
|
462
|
+
//#region extensions/matrix/src/setup-dm-policy.ts
|
|
458
463
|
function resolveMatrixSetupDmAllowFrom(policy, allowFrom) {
|
|
459
464
|
if (policy === "open") return addWildcardAllowFrom(allowFrom);
|
|
460
465
|
return normalizeAllowFromEntries(allowFrom ?? []).filter((entry) => entry !== "*");
|
|
@@ -495,7 +500,8 @@ function createMatrixSetupDmPolicy(promptAllowFrom) {
|
|
|
495
500
|
promptAllowFrom
|
|
496
501
|
});
|
|
497
502
|
}
|
|
498
|
-
|
|
503
|
+
//#endregion
|
|
504
|
+
//#region extensions/matrix/src/setup-core.ts
|
|
499
505
|
const channel = "matrix";
|
|
500
506
|
function resolveMatrixSetupAccountId(params) {
|
|
501
507
|
return normalizeAccountId$1(params.accountId?.trim() || params.name?.trim() || DEFAULT_ACCOUNT_ID$1);
|
|
@@ -523,7 +529,7 @@ function createMatrixSetupWizardProxy(loadWizardModule) {
|
|
|
523
529
|
};
|
|
524
530
|
}
|
|
525
531
|
const finishMatrixSetupAfterConfigWrite = async ({ previousCfg, cfg, accountId, runtime }) => {
|
|
526
|
-
const { runMatrixSetupBootstrapAfterConfigWrite } = await import("./setup-bootstrap-
|
|
532
|
+
const { runMatrixSetupBootstrapAfterConfigWrite } = await import("./setup-bootstrap-DaT2j28V.mjs");
|
|
527
533
|
await runMatrixSetupBootstrapAfterConfigWrite({
|
|
528
534
|
previousCfg,
|
|
529
535
|
cfg,
|
|
@@ -637,4 +643,5 @@ const matrixSetupContract = defineChannelSetupContract({
|
|
|
637
643
|
},
|
|
638
644
|
legacyAdapter: matrixSetupAdapter
|
|
639
645
|
});
|
|
646
|
+
//#endregion
|
|
640
647
|
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,10 +1,10 @@
|
|
|
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-1kn1P6io.mjs";
|
|
2
|
+
import { o as resolveMatrixSqliteStateEnv, r as assertMatrixSupportedStateFile } from "./retired-state-JGUEBE72.mjs";
|
|
3
|
+
import { o as resolveMatrixStoragePaths, r as recordCurrentStorageMetaDeviceId } from "./storage-C3N6YZIn.mjs";
|
|
4
4
|
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
import { resolveDateTimestampMs } from "openclaw/plugin-sdk/number-runtime";
|
|
7
|
-
|
|
7
|
+
//#region extensions/matrix/src/matrix/monitor/startup-verification.ts
|
|
8
8
|
const STARTUP_VERIFICATION_STATE_FILENAME = "startup-verification.json";
|
|
9
9
|
const STARTUP_VERIFICATION_NAMESPACE = "startup-verification";
|
|
10
10
|
const STARTUP_VERIFICATION_MAX_ENTRIES = 1e3;
|
|
@@ -97,4 +97,5 @@ async function ensureMatrixStartupVerification(params) {
|
|
|
97
97
|
};
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
|
+
//#endregion
|
|
100
101
|
export { ensureMatrixStartupVerification };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { c as resolveMatrixStateLayoutChildDepth } from "./storage-paths-
|
|
1
|
+
import { c as resolveMatrixStateLayoutChildDepth } from "./storage-paths-B51JM-pC.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
|
+
//#region 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,4 +23,5 @@ 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
|
|
26
27
|
export { walkMatrixStateFiles as t };
|
|
@@ -1,14 +1,14 @@
|
|
|
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, s as scoreMatrixCryptoStateInStore, t as MATRIX_IDB_SNAPSHOT_FILENAME } from "./crypto-state-store-
|
|
1
|
+
import { t as getMatrixRuntime } from "./runtime-1kn1P6io.mjs";
|
|
2
|
+
import { n as isMatrixActiveTokenRootDirectory, r as resolveMatrixAccountStorageRoot } from "./storage-paths-B51JM-pC.mjs";
|
|
3
|
+
import { c as updateMatrixKeyedState, i as assertMatrixSupportedStateRoot, o as resolveMatrixSqliteStateEnv, r as assertMatrixSupportedStateFile } from "./retired-state-JGUEBE72.mjs";
|
|
4
|
+
import { n as MATRIX_RECOVERY_KEY_FILENAME, s as scoreMatrixCryptoStateInStore, t as MATRIX_IDB_SNAPSHOT_FILENAME } from "./crypto-state-store-BZLlwkv_.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
|
import { readDirectoryEntriesSync } from "openclaw/plugin-sdk/path-existence-runtime";
|
|
11
|
-
|
|
11
|
+
//#region extensions/matrix/src/matrix/client/storage-metadata.ts
|
|
12
12
|
const STORAGE_META_NAMESPACE = "storage-meta";
|
|
13
13
|
const STORAGE_META_STATE_KEY = "current";
|
|
14
14
|
const STORAGE_META_MAX_ENTRIES = 10;
|
|
@@ -36,7 +36,8 @@ function normalizeMatrixStorageMetadata(value) {
|
|
|
36
36
|
if (value.currentTokenStateClaimed === true) metadata.currentTokenStateClaimed = true;
|
|
37
37
|
return Object.keys(metadata).length > 0 ? metadata : null;
|
|
38
38
|
}
|
|
39
|
-
|
|
39
|
+
//#endregion
|
|
40
|
+
//#region extensions/matrix/src/matrix/client/storage.ts
|
|
40
41
|
const DEFAULT_ACCOUNT_KEY = "default";
|
|
41
42
|
const STORAGE_META_FILENAME = "storage-meta.json";
|
|
42
43
|
function openStorageMetaStore(rootDir) {
|
|
@@ -174,8 +175,8 @@ async function maybeMigrateLegacyStorage({ storagePaths }) {
|
|
|
174
175
|
const { rootDir, storagePath } = storagePaths;
|
|
175
176
|
await assertMatrixSupportedStateRoot(rootDir);
|
|
176
177
|
if (!fs.existsSync(storagePath)) return;
|
|
177
|
-
const syncCache = await import("./sync-cache-state-
|
|
178
|
-
const { Utf8InputError } = await import("./runtime-doctor-migrations-
|
|
178
|
+
const syncCache = await import("./sync-cache-state-BKVaKRzQ.mjs").then((n) => n.o);
|
|
179
|
+
const { Utf8InputError } = await import("./runtime-doctor-migrations-hxP-CXX7.mjs").then((n) => n.t);
|
|
179
180
|
const logger = getMatrixRuntime().logging.getChildLogger({ module: "matrix-storage" });
|
|
180
181
|
let persisted;
|
|
181
182
|
try {
|
|
@@ -271,4 +272,5 @@ async function repairCurrentTokenStorageMetaDeviceId(params) {
|
|
|
271
272
|
deviceId
|
|
272
273
|
});
|
|
273
274
|
}
|
|
275
|
+
//#endregion
|
|
274
276
|
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
|
+
//#region 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,4 +49,5 @@ function resolveMatrixAccountStorageRoot(params) {
|
|
|
49
49
|
tokenHash
|
|
50
50
|
};
|
|
51
51
|
}
|
|
52
|
+
//#endregion
|
|
52
53
|
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-QmZOfX9Q.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
|
+
//#region 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,4 +49,5 @@ function handleMatrixSubagentDeliveryTarget(event) {
|
|
|
49
49
|
...threadId ? { threadId } : {}
|
|
50
50
|
} };
|
|
51
51
|
}
|
|
52
|
+
//#endregion
|
|
52
53
|
export { handleMatrixSubagentDeliveryTarget, handleMatrixSubagentEnded };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as __exportAll } from "./runtime-doctor-migrations-
|
|
2
|
-
import { d as readMatrixStateChunks, f as writeMatrixStateChunks, l as chunkMatrixStateJson, o as resolveMatrixSqliteStateEnv } from "./retired-state-
|
|
1
|
+
import { n as __exportAll } from "./runtime-doctor-migrations-hxP-CXX7.mjs";
|
|
2
|
+
import { d as readMatrixStateChunks, f as writeMatrixStateChunks, l as chunkMatrixStateJson, o as resolveMatrixSqliteStateEnv } from "./retired-state-JGUEBE72.mjs";
|
|
3
3
|
import { isRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
4
4
|
import { randomUUID } from "node:crypto";
|
|
5
5
|
import path from "node:path";
|
|
@@ -7,7 +7,7 @@ import { asSafeIntegerInRange } from "openclaw/plugin-sdk/number-runtime";
|
|
|
7
7
|
import { sha256Hex } from "openclaw/plugin-sdk/node-crypto-runtime";
|
|
8
8
|
import fs from "node:fs/promises";
|
|
9
9
|
import { KeyedAsyncQueue } from "openclaw/plugin-sdk/keyed-async-queue";
|
|
10
|
-
|
|
10
|
+
//#region extensions/matrix/src/matrix/client/sync-cache-state.ts
|
|
11
11
|
var sync_cache_state_exports = /* @__PURE__ */ __exportAll({
|
|
12
12
|
MATRIX_SYNC_CACHE_VERSION: () => 1,
|
|
13
13
|
deleteMatrixSyncCacheStateFromStore: () => deleteMatrixSyncCacheStateFromStore,
|
|
@@ -127,7 +127,7 @@ function buildSyncCacheRows(payload) {
|
|
|
127
127
|
};
|
|
128
128
|
}
|
|
129
129
|
async function readLegacyMatrixSyncCacheState(storageRootDir) {
|
|
130
|
-
const { decodeUtf8Input, Utf8InputError } = await import("./runtime-doctor-migrations-
|
|
130
|
+
const { decodeUtf8Input, Utf8InputError } = await import("./runtime-doctor-migrations-hxP-CXX7.mjs").then((n) => n.t);
|
|
131
131
|
try {
|
|
132
132
|
const raw = decodeUtf8Input(await fs.readFile(resolveLegacySyncCachePath(storageRootDir)), "Legacy Matrix sync cache");
|
|
133
133
|
const persisted = normalizeLegacyPersistedStore(JSON.parse(raw));
|
|
@@ -161,4 +161,5 @@ async function deleteMatrixSyncCacheStateFromStore(params) {
|
|
|
161
161
|
await fs.rm(resolveLegacySyncCachePath(storageRootDir), { force: true }).catch(() => void 0);
|
|
162
162
|
});
|
|
163
163
|
}
|
|
164
|
+
//#endregion
|
|
164
165
|
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,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
//#region extensions/matrix/src/matrix/sync-state.ts
|
|
2
2
|
function isMatrixReadySyncState(state) {
|
|
3
3
|
return state === "PREPARED" || state === "SYNCING" || state === "CATCHUP";
|
|
4
4
|
}
|
|
@@ -8,4 +8,5 @@ function isMatrixDisconnectedSyncState(state) {
|
|
|
8
8
|
function isMatrixTerminalSyncState(state) {
|
|
9
9
|
return state === "STOPPED";
|
|
10
10
|
}
|
|
11
|
+
//#endregion
|
|
11
12
|
export { isMatrixReadySyncState as n, isMatrixTerminalSyncState as r, isMatrixDisconnectedSyncState as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
2
|
-
|
|
2
|
+
//#region 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,4 +97,5 @@ 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
|
|
100
101
|
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
1
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
2
2
|
import { raceWithTimeout } from "openclaw/plugin-sdk/time-runtime";
|
|
3
|
-
|
|
3
|
+
//#region extensions/matrix/src/matrix/monitor/task-runner.ts
|
|
4
4
|
const monitorTaskSignal = new AsyncLocalStorage();
|
|
5
5
|
const MATRIX_MONITOR_IDLE_TIMEOUT_MS = 3e4;
|
|
6
6
|
function getMatrixMonitorTaskSignal() {
|
|
@@ -48,4 +48,5 @@ function createMatrixMonitorTaskRunner(params) {
|
|
|
48
48
|
waitForIdle
|
|
49
49
|
};
|
|
50
50
|
}
|
|
51
|
+
//#endregion
|
|
51
52
|
export { getMatrixMonitorTaskSignal as n, createMatrixMonitorTaskRunner as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { s as resolveMatrixTargetIdentity } from "./target-ids-
|
|
1
|
+
import { s as resolveMatrixTargetIdentity } from "./target-ids-HhcaKX1n.mjs";
|
|
2
2
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
3
|
-
|
|
3
|
+
//#region 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,4 +13,5 @@ function resolveMatrixInboundConversation(params) {
|
|
|
13
13
|
};
|
|
14
14
|
return parentConversationId ? { conversationId: parentConversationId } : null;
|
|
15
15
|
}
|
|
16
|
+
//#endregion
|
|
16
17
|
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-1kn1P6io.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-QmZOfX9Q.mjs";
|
|
3
|
+
import { o as resolveMatrixSqliteStateEnv, r as assertMatrixSupportedStateFile, s as resolveMatrixSqliteStateKey } from "./retired-state-JGUEBE72.mjs";
|
|
4
|
+
import { a as resolveMatrixStateFilePath, t as claimCurrentTokenStorageState } from "./storage-C3N6YZIn.mjs";
|
|
5
|
+
import { r as sendMessageMatrix } from "./send-HHAbKARg.mjs";
|
|
6
6
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
7
7
|
import path from "node:path";
|
|
8
8
|
import { resolveOptionalIntegerOption } from "openclaw/plugin-sdk/number-runtime";
|
|
@@ -11,7 +11,7 @@ import { sha256Hex } from "openclaw/plugin-sdk/node-crypto-runtime";
|
|
|
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
|
+
//#region 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
|
}
|
|
@@ -185,7 +185,8 @@ function createMatrixSessionBindingAdapter(params, { manager, defaults, committe
|
|
|
185
185
|
unbindRecords
|
|
186
186
|
};
|
|
187
187
|
}
|
|
188
|
-
|
|
188
|
+
//#endregion
|
|
189
|
+
//#region extensions/matrix/src/matrix/thread-bindings.ts
|
|
189
190
|
const THREAD_BINDINGS_NAMESPACE = "thread-bindings";
|
|
190
191
|
const THREAD_BINDINGS_MAX_ENTRIES = 1e4;
|
|
191
192
|
const THREAD_BINDINGS_SWEEP_INTERVAL_MS = 6e4;
|
|
@@ -600,4 +601,5 @@ async function createMatrixThreadBindingManager(params) {
|
|
|
600
601
|
});
|
|
601
602
|
return manager;
|
|
602
603
|
}
|
|
604
|
+
//#endregion
|
|
603
605
|
export { createMatrixThreadBindingManager as t };
|
package/dist/.setup/{thread-bindings-shared-CBlJu3Wz.mjs → thread-bindings-shared-QmZOfX9Q.mjs}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { projectThreadBindingRecord, resolveThreadBindingLifecycle, warnPluginSdkDeprecation } from "openclaw/plugin-sdk/thread-bindings-session-runtime";
|
|
2
|
-
|
|
2
|
+
//#region 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,4 +88,5 @@ 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
|
|
91
92
|
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,24 +1,24 @@
|
|
|
1
|
-
import { a as resolveMatrixAccountConfig, o as resolveMatrixBaseConfig } from "./account-config-
|
|
2
|
-
import { g as resolveDefaultMatrixAccountId } from "./setup-core-
|
|
3
|
-
import { i 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 { l as resolveMatrixAuthContext } from "./client-
|
|
10
|
-
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-
|
|
11
|
-
import { n as withResolvedActionClient, r as withResolvedRoomAction } from "./client-
|
|
12
|
-
import { t as applyMatrixProfileUpdate } from "./profile-update-
|
|
13
|
-
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-
|
|
14
|
-
import { n as getMatrixMemberInfo, r as getMatrixRoomInfo, t as createMatrixRoomInfoResolver } from "./room-info-
|
|
1
|
+
import { a as resolveMatrixAccountConfig, o as resolveMatrixBaseConfig } from "./account-config-CRsKoMqJ.mjs";
|
|
2
|
+
import { g as resolveDefaultMatrixAccountId } from "./setup-core-DcqQbLZv.mjs";
|
|
3
|
+
import { i as resolveMatrixRoomConfig } from "./channel-CX7k81dL.mjs";
|
|
4
|
+
import { a as normalizeMatrixResolvableTarget } from "./target-ids-HhcaKX1n.mjs";
|
|
5
|
+
import { l as selectOwnMatrixReactionEventIds, s as buildMatrixReactionRelationsPath, u as summarizeMatrixReactionEvents } from "./send-currentness-DGxiiBn9.mjs";
|
|
6
|
+
import { c as isStrictDirectMembership, s as hasDirectMatrixMemberFlag, u as readJoinedMatrixMembers } from "./direct-management-Dp1giZ34.mjs";
|
|
7
|
+
import { C as resolveMatrixRoomId, n as reactMatrixMessage, p as buildPollResponseContent, r as sendMessageMatrix, v as isPollStartType, y as parsePollStart } from "./send-HHAbKARg.mjs";
|
|
8
|
+
import { i as parseMxc } from "./event-helpers-CxNgMQqH.mjs";
|
|
9
|
+
import { l as resolveMatrixAuthContext } from "./client-D1bsidwU.mjs";
|
|
10
|
+
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-DpJ9naJa.mjs";
|
|
11
|
+
import { n as withResolvedActionClient, r as withResolvedRoomAction } from "./client-CFPYqaYK.mjs";
|
|
12
|
+
import { t as applyMatrixProfileUpdate } from "./profile-update-RLsY-gu6.mjs";
|
|
13
|
+
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-CcZIVL8P.mjs";
|
|
14
|
+
import { n as getMatrixMemberInfo, r as getMatrixRoomInfo, t as createMatrixRoomInfoResolver } from "./room-info-Dhc4efkA.mjs";
|
|
15
15
|
import { normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
|
16
16
|
import { isRecord, normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeUniqueTrimmedStringList, uniqueValues } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
17
17
|
import { ToolAuthorizationError, createActionGate, jsonResult, readPositiveIntegerParam, readReactionParams, readStringArrayParam, readStringParam } from "openclaw/plugin-sdk/channel-actions";
|
|
18
18
|
import { timestampMsToIsoString } from "openclaw/plugin-sdk/number-runtime";
|
|
19
19
|
import { captureChannelReadAuthority } from "openclaw/plugin-sdk/fetch-runtime";
|
|
20
20
|
import { resolveAllowlistProviderRuntimeGroupPolicy, resolveDefaultGroupPolicy } from "openclaw/plugin-sdk/runtime-group-policy";
|
|
21
|
-
|
|
21
|
+
//#region extensions/matrix/src/matrix/actions/pins.ts
|
|
22
22
|
async function updateMatrixPins(roomId, opts, update) {
|
|
23
23
|
return await withResolvedRoomAction(roomId, opts, async (client, resolvedRoom) => {
|
|
24
24
|
const next = update(await readPinnedEvents(client, resolvedRoom));
|
|
@@ -42,7 +42,8 @@ async function listMatrixPins(roomId, opts = {}) {
|
|
|
42
42
|
};
|
|
43
43
|
});
|
|
44
44
|
}
|
|
45
|
-
|
|
45
|
+
//#endregion
|
|
46
|
+
//#region extensions/matrix/src/matrix/actions/polls.ts
|
|
46
47
|
function normalizeOptionIndexes(indexes) {
|
|
47
48
|
const normalized = indexes.map((index) => Math.trunc(index)).filter((index) => Number.isFinite(index) && index > 0);
|
|
48
49
|
return uniqueValues(normalized);
|
|
@@ -84,7 +85,8 @@ async function voteMatrixPoll(roomId, pollId, opts = {}) {
|
|
|
84
85
|
};
|
|
85
86
|
});
|
|
86
87
|
}
|
|
87
|
-
|
|
88
|
+
//#endregion
|
|
89
|
+
//#region extensions/matrix/src/matrix/actions/reactions.ts
|
|
88
90
|
async function listMatrixEmojis(roomId, opts = {}) {
|
|
89
91
|
return await withResolvedRoomAction(roomId, opts, async (client, resolvedRoom) => {
|
|
90
92
|
const [roomState, personalPack] = await Promise.all([client.doRequest("GET", `/_matrix/client/v3/rooms/${encodeURIComponent(resolvedRoom)}/state`), client.getAccountData("im.ponies.user_emotes")]);
|
|
@@ -144,7 +146,8 @@ async function removeMatrixReactions(roomId, messageId, opts = {}) {
|
|
|
144
146
|
return { removed: toRemove.length };
|
|
145
147
|
});
|
|
146
148
|
}
|
|
147
|
-
|
|
149
|
+
//#endregion
|
|
150
|
+
//#region extensions/matrix/src/matrix/read-policy.ts
|
|
148
151
|
function normalizeRoomId(raw) {
|
|
149
152
|
return raw?.trim().replace(/^room:/i, "") ?? "";
|
|
150
153
|
}
|
|
@@ -270,7 +273,8 @@ async function withAuthorizedMatrixReadTarget(params) {
|
|
|
270
273
|
});
|
|
271
274
|
});
|
|
272
275
|
}
|
|
273
|
-
|
|
276
|
+
//#endregion
|
|
277
|
+
//#region extensions/matrix/src/tool-actions.ts
|
|
274
278
|
const MATRIX_ACTION_DISABLED_MESSAGES = {
|
|
275
279
|
messages: "Matrix messages are disabled.",
|
|
276
280
|
reactions: "Matrix reactions are disabled.",
|
|
@@ -705,4 +709,5 @@ async function handleMatrixAction(ctx) {
|
|
|
705
709
|
}
|
|
706
710
|
throw new Error(`Action ${action} is not supported for provider matrix.`);
|
|
707
711
|
}
|
|
712
|
+
//#endregion
|
|
708
713
|
export { handleMatrixAction };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { assertHttpUrlTargetsPrivateNetwork, isPrivateOrLoopbackHost } from "openclaw/plugin-sdk/ssrf-runtime";
|
|
2
|
-
|
|
2
|
+
//#region 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() : "";
|
|
@@ -31,4 +31,5 @@ async function resolveValidatedMatrixHomeserverUrl(homeserver, opts) {
|
|
|
31
31
|
});
|
|
32
32
|
return normalized;
|
|
33
33
|
}
|
|
34
|
+
//#endregion
|
|
34
35
|
export { validateMatrixHomeserverUrl as n, resolveValidatedMatrixHomeserverUrl as t };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { n as __exportAll } from "./runtime-doctor-migrations-
|
|
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-hxP-CXX7.mjs";
|
|
2
|
+
import { i as withStartedActionClient, n as withResolvedActionClient } from "./client-CFPYqaYK.mjs";
|
|
3
|
+
import { n as formatMatrixEncryptionUnavailableError } from "./encryption-guidance-Br3Lv9Hm.mjs";
|
|
4
4
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
5
5
|
import { setTimeout } from "node:timers/promises";
|
|
6
|
-
|
|
6
|
+
//#region extensions/matrix/src/matrix/actions/verification.ts
|
|
7
7
|
var verification_exports = /* @__PURE__ */ __exportAll({
|
|
8
8
|
acceptMatrixVerification: () => acceptMatrixVerification,
|
|
9
9
|
bootstrapMatrixVerification: () => bootstrapMatrixVerification,
|
|
@@ -302,4 +302,5 @@ async function bootstrapMatrixVerification(opts = {}) {
|
|
|
302
302
|
forceResetCrossSigning: opts.forceResetCrossSigning === true
|
|
303
303
|
}));
|
|
304
304
|
}
|
|
305
|
+
//#endregion
|
|
305
306
|
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 };
|