@openclaw/matrix 2026.10.10-beta.5 → 2026.10.10
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-Co94mKNj.mjs} +5 -8
- package/dist/.setup/{approval-handler.runtime-6u08WKWh.mjs → approval-handler.runtime-DtNvJpfB.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-CNjJyBS_.mjs} +29 -43
- package/dist/.setup/{channel.runtime-BfZdvlho.mjs → channel.runtime-DaGbm27q.mjs} +8 -10
- package/dist/.setup/{channel.setup-ClA7V_Ba.mjs → channel.setup-IjRB0ymg.mjs} +7 -11
- package/dist/.setup/{cli-BLgMlO3I.mjs → cli-CuEJNM3c.mjs} +28 -39
- package/dist/.setup/{cli-metadata-COWLWR3E.mjs → cli-metadata-rWmD_rzx.mjs} +3 -5
- package/dist/.setup/{client-C4Gibhzl.mjs → client-7eyTX0cu.mjs} +19 -25
- package/dist/.setup/{client-C7pZ6gAl.mjs → client-CV0MkCZG.mjs} +4 -5
- package/dist/.setup/{client-bootstrap-kOIDV4z_.mjs → client-bootstrap-BjcmTmyR.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-C4Lnqs2C.mjs} +8 -9
- package/dist/.setup/{credentials-CPnJZaZB.mjs → credentials-B0vpXvcB.mjs} +5 -6
- package/dist/.setup/{credentials-read-D2ULV55A.mjs → credentials-read-WCQSEvI8.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-Crp1is7m.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-Brv4bIyx.mjs} +7 -8
- package/dist/.setup/{deps-L_1bUAGL.mjs → deps-O7rEnklr.mjs} +1 -2
- package/dist/.setup/{device-health-Be60VF1w.mjs → device-health-DnKAXW1v.mjs} +2 -3
- package/dist/.setup/{direct-management-B3wYhx_M.mjs → direct-management-DDaWVbQI.mjs} +7 -11
- package/dist/.setup/{directory-live-BpSz-FQB.mjs → directory-live-B-csizuK.mjs} +5 -6
- package/dist/.setup/{doctor-contract-CsTNmbMa.mjs → doctor-contract-DybEjJcd.mjs} +6 -12
- package/dist/.setup/{draft-stream-K6Lu-JEI.mjs → draft-stream-dmhBHufd.mjs} +3 -4
- package/dist/.setup/{encryption-guidance-D5_IsDIy.mjs → encryption-guidance-Cn6-Tlx0.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-D7vv3AZS.mjs} +6 -9
- package/dist/.setup/{file-sync-store-CUH8EAJq.mjs → file-sync-store-q5KCV2Lp.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-BLcaOSRD.mjs} +3 -4
- package/dist/.setup/{messages-O6G0-_xr.mjs → messages-BiHM0DM3.mjs} +9 -14
- package/dist/.setup/{monitor-BSEZMFyq.mjs → monitor-CPwDgRFY.mjs} +85 -94
- package/dist/.setup/{onboarding-DQLF7huY.mjs → onboarding-DiVtpjNu.mjs} +10 -11
- package/dist/.setup/{outbound-C0bqZr89.mjs → outbound-DwP97VpQ.mjs} +3 -4
- package/dist/.setup/{profile-update-BbfEg9Fx.mjs → profile-update-DnNA9mEa.mjs} +6 -8
- package/dist/.setup/{reaction-events-51DOeO0I.mjs → reaction-events-ClY9h_FC.mjs} +8 -9
- package/dist/.setup/{resolve-targets-BJ5sIKeM.mjs → resolve-targets-B8PAwHVS.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-T_PR_liR.mjs} +6 -8
- package/dist/.setup/{runtime-1kn1P6io.mjs → runtime-Ck8TjD7L.mjs} +1 -2
- package/dist/.setup/{runtime-setter-api-i2MOXoT3.mjs → runtime-setter-api-CpwhcBQK.mjs} +1 -1
- package/dist/.setup/{sdk-ByU8So5S.mjs → sdk-Cj3ggJHG.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-C1qeMQAy.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-DDhwWvDs.mjs} +4 -5
- package/dist/.setup/{setup-core-EQceJMZZ.mjs → setup-core-D2r4BivQ.mjs} +13 -20
- package/dist/.setup/setup-plugin-api-SO1hdrsT.mjs +2 -0
- package/dist/.setup/{startup-verification-UU8DUvi4.mjs → startup-verification-B3LEbW33.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-CxN4jqKI.mjs} +7 -9
- 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-qYrd2EEh.mjs} +3 -4
- 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-D2ZR6mEZ.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-CdKa0DC4.mjs} +18 -23
- package/dist/.setup/{url-validation-CF6pG6eE.mjs → url-validation-C77p4qT9.mjs} +1 -2
- package/dist/.setup/{verification-DUxuApWC.mjs → verification-jP3tm-xD.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 +13 -16
- 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,11 +1,11 @@
|
|
|
1
|
-
import { i as __exportAll } from "./doctor-contract-
|
|
2
|
-
import { n as getMatrixRuntimeLifecycle } from "./runtime-
|
|
3
|
-
import { c as hasReadyMatrixEnvAuth, d as resolveScopedMatrixEnvConfig, f as resolveMatrixAccountStringValues, i as requiresExplicitMatrixDefaultAccount, l as resolveGlobalMatrixEnvConfig, s as resolveMatrixDefaultOrOnlyAccountId, u as resolveMatrixEnvAuthReadiness } from "./account-selection-
|
|
4
|
-
import { t as getMatrixScopedEnvVarNames } from "./env-vars-
|
|
5
|
-
import { o as resolveMatrixBaseConfig, r as listNormalizedMatrixAccountIds, t as findMatrixAccountConfig } from "./account-config-
|
|
6
|
-
import { t as resolveMatrixConfigFieldPath } from "./config-paths-
|
|
7
|
-
import { n as validateMatrixHomeserverUrl, t as resolveValidatedMatrixHomeserverUrl } from "./url-validation-
|
|
8
|
-
import { i as repairCurrentTokenStorageMetaDeviceId } from "./storage-
|
|
1
|
+
import { i as __exportAll } from "./doctor-contract-DybEjJcd.mjs";
|
|
2
|
+
import { n as getMatrixRuntimeLifecycle } from "./runtime-Ck8TjD7L.mjs";
|
|
3
|
+
import { c as hasReadyMatrixEnvAuth, d as resolveScopedMatrixEnvConfig, f as resolveMatrixAccountStringValues, i as requiresExplicitMatrixDefaultAccount, l as resolveGlobalMatrixEnvConfig, s as resolveMatrixDefaultOrOnlyAccountId, u as resolveMatrixEnvAuthReadiness } from "./account-selection-Co94mKNj.mjs";
|
|
4
|
+
import { t as getMatrixScopedEnvVarNames } from "./env-vars-Bh1iOXJ1.mjs";
|
|
5
|
+
import { o as resolveMatrixBaseConfig, r as listNormalizedMatrixAccountIds, t as findMatrixAccountConfig } from "./account-config-CVM2a28p.mjs";
|
|
6
|
+
import { t as resolveMatrixConfigFieldPath } from "./config-paths-DBpHxDyc.mjs";
|
|
7
|
+
import { n as validateMatrixHomeserverUrl, t as resolveValidatedMatrixHomeserverUrl } from "./url-validation-C77p4qT9.mjs";
|
|
8
|
+
import { i as repairCurrentTokenStorageMetaDeviceId } from "./storage-CxN4jqKI.mjs";
|
|
9
9
|
import { createLazyRuntimeMethod, createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
10
10
|
import { DEFAULT_ACCOUNT_ID, normalizeAccountId, normalizeOptionalAccountId } from "openclaw/plugin-sdk/account-id";
|
|
11
11
|
import { formatErrorMessage, toErrorObject, toStringifiedError } from "openclaw/plugin-sdk/error-runtime";
|
|
@@ -20,8 +20,8 @@ import { sleepWithAbort } from "openclaw/plugin-sdk/runtime-env";
|
|
|
20
20
|
import { createDeferred } from "openclaw/plugin-sdk/extension-shared";
|
|
21
21
|
import { resolveGlobalSingleton } from "openclaw/plugin-sdk/global-singleton";
|
|
22
22
|
import { racePromiseWithAbortSignal, raceWithTimeout } from "openclaw/plugin-sdk/time-runtime";
|
|
23
|
-
|
|
24
|
-
const loadMatrixAuthClientDeps = createLazyRuntimeModule(() => Promise.all([import("./sdk-
|
|
23
|
+
// extensions/matrix/src/matrix/client/auth-request.ts
|
|
24
|
+
const loadMatrixAuthClientDeps = createLazyRuntimeModule(() => Promise.all([import("./sdk-Cj3ggJHG.mjs").then((n) => n.t), import("./logging-BLcaOSRD.mjs").then((n) => n.n)]).then(([sdkModule, loggingModule]) => ({
|
|
25
25
|
MatrixClient: sdkModule.MatrixClient,
|
|
26
26
|
ensureMatrixSdkLoggingConfigured: loggingModule.ensureMatrixSdkLoggingConfigured
|
|
27
27
|
})));
|
|
@@ -88,10 +88,9 @@ async function fetchMatrixWhoamiIdentity(params) {
|
|
|
88
88
|
if (!outcome.ok) throw outcome.error;
|
|
89
89
|
return outcome.value;
|
|
90
90
|
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
const
|
|
94
|
-
const loadMatrixCredentialsWriteRuntime = createLazyRuntimeModule(() => import("./credentials-CPnJZaZB.mjs"));
|
|
91
|
+
// extensions/matrix/src/matrix/client/config.ts
|
|
92
|
+
const loadMatrixCredentialsReadDeps = createLazyRuntimeModule(() => import("./credentials-read-WCQSEvI8.mjs").then((n) => n.i));
|
|
93
|
+
const loadMatrixCredentialsWriteRuntime = createLazyRuntimeModule(() => import("./credentials-B0vpXvcB.mjs"));
|
|
95
94
|
const loadMatrixSecretInputDeps = createLazyRuntimeModule(() => import("openclaw/plugin-sdk/secret-input-runtime"));
|
|
96
95
|
function credentialsMatchBackfillAuthLineage(params) {
|
|
97
96
|
if (!params.stored) return true;
|
|
@@ -463,8 +462,7 @@ async function backfillMatrixAuthDeviceIdAfterStartup(params) {
|
|
|
463
462
|
deviceId
|
|
464
463
|
}, env, params.auth.accountId) === "saved" ? deviceId : void 0;
|
|
465
464
|
}
|
|
466
|
-
|
|
467
|
-
//#region extensions/matrix/src/matrix/monitor/task-runner.ts
|
|
465
|
+
// extensions/matrix/src/matrix/monitor/task-runner.ts
|
|
468
466
|
const monitorTaskSignal = new AsyncLocalStorage();
|
|
469
467
|
function getMatrixMonitorTaskSignal() {
|
|
470
468
|
return monitorTaskSignal.getStore();
|
|
@@ -500,8 +498,7 @@ function createMatrixMonitorTaskRunner(params) {
|
|
|
500
498
|
waitForIdle
|
|
501
499
|
};
|
|
502
500
|
}
|
|
503
|
-
|
|
504
|
-
//#region extensions/matrix/src/matrix/startup-abort.ts
|
|
501
|
+
// extensions/matrix/src/matrix/startup-abort.ts
|
|
505
502
|
function createMatrixStartupAbortError() {
|
|
506
503
|
const error = /* @__PURE__ */ new Error("Matrix startup aborted");
|
|
507
504
|
error.name = "AbortError";
|
|
@@ -521,9 +518,8 @@ async function awaitMatrixStartupWithAbort(promise, abortSignal) {
|
|
|
521
518
|
throw toErrorObject(error, "Non-Error rejection");
|
|
522
519
|
}
|
|
523
520
|
}
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
const loadMatrixCreateClientDeps = createLazyRuntimeModule(() => import("./create-client-BS8UYx6N.mjs"));
|
|
521
|
+
// extensions/matrix/src/matrix/client/shared.ts
|
|
522
|
+
const loadMatrixCreateClientDeps = createLazyRuntimeModule(() => import("./create-client-C4Lnqs2C.mjs"));
|
|
527
523
|
const MATRIX_RETIREMENT_DRAIN_TIMEOUT_MS = 5e3;
|
|
528
524
|
const sharedClientRegistry = resolveGlobalSingleton(Symbol.for("openclaw.matrix.shared-client-registry"), () => ({
|
|
529
525
|
states: /* @__PURE__ */ new Map(),
|
|
@@ -838,8 +834,7 @@ async function stopSharedClientForAccount(auth) {
|
|
|
838
834
|
if (!state || state.ownerSignal !== getMatrixRuntimeLifecycle()?.signal) return;
|
|
839
835
|
await forceRetireState(state);
|
|
840
836
|
}
|
|
841
|
-
|
|
842
|
-
//#region extensions/matrix/src/matrix/client.ts
|
|
837
|
+
// extensions/matrix/src/matrix/client.ts
|
|
843
838
|
var client_exports = /* @__PURE__ */ __exportAll({
|
|
844
839
|
acquireSharedMatrixClient: () => acquireSharedMatrixClient,
|
|
845
840
|
backfillMatrixAuthDeviceIdAfterStartup: () => backfillMatrixAuthDeviceIdAfterStartup,
|
|
@@ -855,7 +850,6 @@ var client_exports = /* @__PURE__ */ __exportAll({
|
|
|
855
850
|
stopSharedClientForAccount: () => stopSharedClientForAccount,
|
|
856
851
|
validateMatrixHomeserverUrl: () => validateMatrixHomeserverUrl
|
|
857
852
|
});
|
|
858
|
-
const loadMatrixClientRuntime = createLazyRuntimeModule(() => import("./create-client-
|
|
853
|
+
const loadMatrixClientRuntime = createLazyRuntimeModule(() => import("./create-client-C4Lnqs2C.mjs"));
|
|
859
854
|
const createMatrixClient = createLazyRuntimeMethod(loadMatrixClientRuntime, (runtime) => runtime.createMatrixClient);
|
|
860
|
-
//#endregion
|
|
861
855
|
export { isMatrixStartupAbortError as a, getMatrixMonitorTaskSignal as c, resolveMatrixAuthContext as d, createMatrixStartupAbortError as i, backfillMatrixAuthDeviceIdAfterStartup as l, acquireSharedMatrixClient as n, throwIfMatrixStartupAborted as o, awaitMatrixStartupWithAbort as r, createMatrixMonitorTaskRunner as s, client_exports as t, resolveMatrixAuth as u };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { i as __exportAll } from "./doctor-contract-
|
|
2
|
-
import { C as resolveMatrixRoomId } from "./send-
|
|
1
|
+
import { i as __exportAll } from "./doctor-contract-DybEjJcd.mjs";
|
|
2
|
+
import { C as resolveMatrixRoomId } from "./send-C1qeMQAy.mjs";
|
|
3
3
|
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
4
|
-
|
|
4
|
+
// extensions/matrix/src/matrix/actions/client.ts
|
|
5
5
|
var client_exports = /* @__PURE__ */ __exportAll({
|
|
6
6
|
withResolvedActionClient: () => withResolvedActionClient,
|
|
7
7
|
withResolvedRoomAction: () => withResolvedRoomAction,
|
|
8
8
|
withStartedActionClient: () => withStartedActionClient
|
|
9
9
|
});
|
|
10
|
-
const loadMatrixActionClientRuntime = createLazyRuntimeModule(() => import("./client-bootstrap-
|
|
10
|
+
const loadMatrixActionClientRuntime = createLazyRuntimeModule(() => import("./client-bootstrap-BjcmTmyR.mjs"));
|
|
11
11
|
async function withResolvedActionClient(opts, run, mode = "persist") {
|
|
12
12
|
const { withResolvedRuntimeMatrixClient } = await loadMatrixActionClientRuntime();
|
|
13
13
|
return await withResolvedRuntimeMatrixClient(opts, run, mode);
|
|
@@ -23,5 +23,4 @@ async function withResolvedRoomAction(roomId, opts, run) {
|
|
|
23
23
|
return await run(client, await resolveMatrixRoomId(client, roomId), abortSignal);
|
|
24
24
|
});
|
|
25
25
|
}
|
|
26
|
-
//#endregion
|
|
27
26
|
export { withStartedActionClient as i, withResolvedActionClient as n, withResolvedRoomAction as r, client_exports as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
2
2
|
import { captureChannelReadAuthority } from "openclaw/plugin-sdk/fetch-runtime";
|
|
3
|
-
|
|
4
|
-
const loadMatrixSharedClientRuntimeDeps = createLazyRuntimeModule(() => import("./client-
|
|
3
|
+
// extensions/matrix/src/matrix/client-bootstrap.ts
|
|
4
|
+
const loadMatrixSharedClientRuntimeDeps = createLazyRuntimeModule(() => import("./client-7eyTX0cu.mjs").then((n) => n.t));
|
|
5
5
|
async function ensureResolvedClientReadiness(params) {
|
|
6
6
|
if (params.readiness === "started") {
|
|
7
7
|
if (params.lease) await params.lease.start();
|
|
@@ -70,5 +70,4 @@ async function withResolvedRuntimeMatrixClient(opts, run, stopMode = "persist")
|
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
|
-
//#endregion
|
|
74
73
|
export { resolveRuntimeMatrixClientWithReadiness, withResolvedRuntimeMatrixClient };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as formatMatrixErrorReason } from "./errors-
|
|
1
|
+
import { t as formatMatrixErrorReason } from "./errors-CL3YJV8U.mjs";
|
|
2
2
|
import { raceWithTimeout } from "openclaw/plugin-sdk/time-runtime";
|
|
3
|
-
|
|
3
|
+
// extensions/matrix/src/matrix/sync-state.ts
|
|
4
4
|
function isMatrixReadySyncState(state) {
|
|
5
5
|
return state === "PREPARED" || state === "SYNCING" || state === "CATCHUP";
|
|
6
6
|
}
|
|
@@ -10,8 +10,7 @@ function isMatrixDisconnectedSyncState(state) {
|
|
|
10
10
|
function isMatrixTerminalSyncState(state) {
|
|
11
11
|
return state === "STOPPED";
|
|
12
12
|
}
|
|
13
|
-
|
|
14
|
-
//#region extensions/matrix/src/matrix/sdk/client-support.ts
|
|
13
|
+
// extensions/matrix/src/matrix/sdk/client-support.ts
|
|
15
14
|
const MATRIX_STATUS_DIAGNOSTIC_TIMEOUT_MS = 1e4;
|
|
16
15
|
const DEFAULT_MATRIX_LOCAL_TIMEOUT_MS = 6e4;
|
|
17
16
|
function resolveMatrixLocalTimeoutMs(raw) {
|
|
@@ -80,5 +79,4 @@ function createMatrixExplicitBootstrapOptions(params) {
|
|
|
80
79
|
strict: params?.strict !== false
|
|
81
80
|
};
|
|
82
81
|
}
|
|
83
|
-
//#endregion
|
|
84
82
|
export { isMatrixAccessTokenInvalidatedError as a, resolveMatrixLocalTimeoutMs as c, isMatrixDisconnectedSyncState as d, isMatrixReadySyncState as f, createMatrixExplicitBootstrapOptions as i, unresolvedMatrixDeviceVerificationStatus as l, MATRIX_INITIAL_CRYPTO_BOOTSTRAP_OPTIONS as n, resolveMatrixDiagnostic as o, isMatrixTerminalSyncState as p, MATRIX_STATUS_DIAGNOSTIC_TIMEOUT_MS as r, resolveMatrixDiagnosticResult as s, MATRIX_AUTOMATIC_REPAIR_BOOTSTRAP_OPTIONS as t, unresolvedMatrixRoomKeyBackupStatus as u };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
|
2
|
-
|
|
2
|
+
// extensions/matrix/src/matrix/config-paths.ts
|
|
3
3
|
function shouldStoreMatrixAccountAtTopLevel(cfg, accountId) {
|
|
4
4
|
if (normalizeAccountId(accountId) !== DEFAULT_ACCOUNT_ID) return false;
|
|
5
5
|
const accounts = cfg.channels?.matrix?.accounts;
|
|
@@ -15,5 +15,4 @@ function resolveMatrixConfigFieldPath(cfg, accountId, fieldPath) {
|
|
|
15
15
|
if (!suffix) return resolveMatrixConfigPath(cfg, accountId);
|
|
16
16
|
return `${resolveMatrixConfigPath(cfg, accountId)}.${suffix}`;
|
|
17
17
|
}
|
|
18
|
-
//#endregion
|
|
19
18
|
export { resolveMatrixConfigPath as n, shouldStoreMatrixAccountAtTopLevel as r, resolveMatrixConfigFieldPath as t };
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { t as getMatrixRuntime } from "./runtime-
|
|
2
|
-
import { t as resolveValidatedMatrixHomeserverUrl } from "./url-validation-
|
|
3
|
-
import { n as maybeMigrateLegacyStorage, o as resolveMatrixStoragePaths, s as writeStorageMeta } from "./storage-
|
|
4
|
-
import "./client-
|
|
1
|
+
import { t as getMatrixRuntime } from "./runtime-Ck8TjD7L.mjs";
|
|
2
|
+
import { t as resolveValidatedMatrixHomeserverUrl } from "./url-validation-C77p4qT9.mjs";
|
|
3
|
+
import { n as maybeMigrateLegacyStorage, o as resolveMatrixStoragePaths, s as writeStorageMeta } from "./storage-CxN4jqKI.mjs";
|
|
4
|
+
import "./client-7eyTX0cu.mjs";
|
|
5
5
|
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
6
6
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
7
7
|
import { ssrfPolicyFromDangerouslyAllowPrivateNetwork } from "openclaw/plugin-sdk/ssrf-runtime";
|
|
8
8
|
import fs from "node:fs";
|
|
9
|
-
|
|
9
|
+
// extensions/matrix/src/matrix/client/create-client.ts
|
|
10
10
|
const loadMatrixCreateClientRuntimeDeps = createLazyRuntimeModule(() => Promise.all([
|
|
11
|
-
import("./sdk-
|
|
12
|
-
import("./logging-
|
|
13
|
-
import("./file-sync-store-
|
|
11
|
+
import("./sdk-Cj3ggJHG.mjs").then((n) => n.t),
|
|
12
|
+
import("./logging-BLcaOSRD.mjs").then((n) => n.n),
|
|
13
|
+
import("./file-sync-store-q5KCV2Lp.mjs")
|
|
14
14
|
]).then(([sdkModule, loggingModule, syncStoreModule]) => ({
|
|
15
15
|
MatrixClient: sdkModule.MatrixClient,
|
|
16
16
|
SqliteBackedMatrixSyncStore: syncStoreModule.SqliteBackedMatrixSyncStore,
|
|
@@ -68,5 +68,4 @@ async function createMatrixClient(params, preparedStorage) {
|
|
|
68
68
|
stateRuntime: getMatrixRuntime().state
|
|
69
69
|
});
|
|
70
70
|
}
|
|
71
|
-
//#endregion
|
|
72
71
|
export { createMatrixClient, prepareMatrixClientStorage };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { i as normalizeMatrixStoredCredentials, n as isMatrixCredentialRevocation, r as matrixCredentialsStoreKey } from "./credentials-state-
|
|
2
|
-
import { i as resolveMatrixCredentialsDir, o as resolveMatrixCredentialsPath } from "./storage-paths-
|
|
3
|
-
import { a as loadMatrixCredentials, n as clearMatrixCredentials, r as credentialsMatchConfig, s as openMatrixCredentialsAsyncStore } from "./credentials-read-
|
|
4
|
-
import { c as updateMatrixKeyedState } from "./retired-state-
|
|
1
|
+
import { i as normalizeMatrixStoredCredentials, n as isMatrixCredentialRevocation, r as matrixCredentialsStoreKey } from "./credentials-state-jxq29yQw.mjs";
|
|
2
|
+
import { i as resolveMatrixCredentialsDir, o as resolveMatrixCredentialsPath } from "./storage-paths-e_Vq6cvw.mjs";
|
|
3
|
+
import { a as loadMatrixCredentials, n as clearMatrixCredentials, r as credentialsMatchConfig, s as openMatrixCredentialsAsyncStore } from "./credentials-read-WCQSEvI8.mjs";
|
|
4
|
+
import { c as updateMatrixKeyedState } from "./retired-state-vIr2IB90.mjs";
|
|
5
5
|
import { normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
|
6
|
-
|
|
6
|
+
// extensions/matrix/src/matrix/credentials.ts
|
|
7
7
|
async function saveMatrixCredentials(credentials, env = process.env, accountId) {
|
|
8
8
|
await persistMatrixCredentials(credentials, env, accountId, false);
|
|
9
9
|
}
|
|
@@ -54,5 +54,4 @@ async function updateMatrixCredentials(env, accountId, update) {
|
|
|
54
54
|
const key = matrixCredentialsStoreKey(accountId);
|
|
55
55
|
await updateMatrixKeyedState(store, key, update);
|
|
56
56
|
}
|
|
57
|
-
//#endregion
|
|
58
57
|
export { clearMatrixCredentials, credentialsMatchConfig, loadMatrixCredentials, resolveMatrixCredentialsDir, resolveMatrixCredentialsPath, saveBackfilledMatrixDeviceId, saveMatrixCredentials, touchMatrixCredentials };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { i as __exportAll } from "./doctor-contract-
|
|
2
|
-
import { r as getOptionalMatrixRuntime } from "./runtime-
|
|
3
|
-
import { i as normalizeMatrixStoredCredentials, r as matrixCredentialsStoreKey, t as MATRIX_CREDENTIALS_NAMESPACE } from "./credentials-state-
|
|
4
|
-
import { i as resolveMatrixCredentialsDir, o as resolveMatrixCredentialsPath } from "./storage-paths-
|
|
1
|
+
import { i as __exportAll } from "./doctor-contract-DybEjJcd.mjs";
|
|
2
|
+
import { r as getOptionalMatrixRuntime } from "./runtime-Ck8TjD7L.mjs";
|
|
3
|
+
import { i as normalizeMatrixStoredCredentials, r as matrixCredentialsStoreKey, t as MATRIX_CREDENTIALS_NAMESPACE } from "./credentials-state-jxq29yQw.mjs";
|
|
4
|
+
import { i as resolveMatrixCredentialsDir, o as resolveMatrixCredentialsPath } from "./storage-paths-e_Vq6cvw.mjs";
|
|
5
5
|
import { normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
|
6
6
|
import { createPluginStateKeyedStore, createPluginStateSyncKeyedStore } from "openclaw/plugin-sdk/plugin-state-store-runtime";
|
|
7
7
|
import { resolveStateDir } from "openclaw/plugin-sdk/state-paths";
|
|
8
|
-
|
|
8
|
+
// extensions/matrix/src/matrix/credentials-read.ts
|
|
9
9
|
var credentials_read_exports = /* @__PURE__ */ __exportAll({
|
|
10
10
|
captureMatrixCredentialsEnv: () => captureMatrixCredentialsEnv,
|
|
11
11
|
clearMatrixCredentials: () => clearMatrixCredentials,
|
|
@@ -81,5 +81,4 @@ function credentialsMatchConfig(stored, config) {
|
|
|
81
81
|
}
|
|
82
82
|
return stored.homeserver === config.homeserver && stored.userId === config.userId;
|
|
83
83
|
}
|
|
84
|
-
//#endregion
|
|
85
84
|
export { loadMatrixCredentials as a, credentials_read_exports as i, clearMatrixCredentials as n, loadMatrixCredentialsAsync as o, credentialsMatchConfig as r, openMatrixCredentialsAsyncStore as s, captureMatrixCredentialsEnv as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
|
2
|
-
|
|
2
|
+
// extensions/matrix/src/matrix/credentials-state.ts
|
|
3
3
|
const MATRIX_CREDENTIALS_NAMESPACE = "credentials";
|
|
4
4
|
function matrixCredentialsStoreKey(accountId) {
|
|
5
5
|
return `account:${normalizeAccountId(accountId)}`;
|
|
@@ -23,5 +23,4 @@ function isMatrixCredentialRevocation(value, accountId) {
|
|
|
23
23
|
const parsed = value;
|
|
24
24
|
return parsed.kind === "revoked" && typeof parsed.revokedAt === "string" && parsed.revokedAt.length > 0 && normalizeAccountId(parsed.accountId) === normalizeAccountId(accountId ?? parsed.accountId);
|
|
25
25
|
}
|
|
26
|
-
//#endregion
|
|
27
26
|
export { normalizeMatrixStoredCredentials as i, isMatrixCredentialRevocation as n, matrixCredentialsStoreKey as r, MATRIX_CREDENTIALS_NAMESPACE as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire } from "node:module";
|
|
2
|
-
|
|
2
|
+
// extensions/matrix/src/matrix/sdk/crypto-node.runtime.ts
|
|
3
3
|
const require = createRequire(import.meta.url);
|
|
4
4
|
function loadMatrixCryptoNodeBindings() {
|
|
5
5
|
const { Attachment, EncryptedAttachment } = require("@matrix-org/matrix-sdk-crypto-nodejs");
|
|
@@ -8,5 +8,4 @@ function loadMatrixCryptoNodeBindings() {
|
|
|
8
8
|
EncryptedAttachment
|
|
9
9
|
};
|
|
10
10
|
}
|
|
11
|
-
//#endregion
|
|
12
11
|
export { loadMatrixCryptoNodeBindings };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as ensureMatrixCryptoRuntime } from "./deps-
|
|
2
|
-
import { r as noop, t as LogService } from "./logger-
|
|
3
|
-
import { a as isRepairableSecretStorageAccessError, i as trustMatrixOwnIdentity, n as isMatrixDeviceOwnerVerified, r as isMatrixDeviceVerifiedInCurrentClient } from "./sdk-
|
|
4
|
-
import { persistIdbToDisk, resolveDefaultIdbSnapshotPath, restoreIdbFromDisk } from "./idb-persistence-
|
|
1
|
+
import { t as ensureMatrixCryptoRuntime } from "./deps-O7rEnklr.mjs";
|
|
2
|
+
import { r as noop, t as LogService } from "./logger-BX5kXvh1.mjs";
|
|
3
|
+
import { a as isRepairableSecretStorageAccessError, i as trustMatrixOwnIdentity, n as isMatrixDeviceOwnerVerified, r as isMatrixDeviceVerifiedInCurrentClient } from "./sdk-Cj3ggJHG.mjs";
|
|
4
|
+
import { persistIdbToDisk, resolveDefaultIdbSnapshotPath, restoreIdbFromDisk } from "./idb-persistence-BF0MZglD.mjs";
|
|
5
5
|
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
6
6
|
import { formatErrorMessage, toStringifiedError } from "openclaw/plugin-sdk/error-runtime";
|
|
7
7
|
import { resolveGlobalSingleton } from "openclaw/plugin-sdk/global-singleton";
|
|
@@ -16,7 +16,7 @@ import { CryptoEvent } from "matrix-js-sdk/lib/crypto-api/CryptoEvent.js";
|
|
|
16
16
|
import { DecryptionFailureCode } from "matrix-js-sdk/lib/crypto-api/index.js";
|
|
17
17
|
import { VerificationPhase, VerificationRequestEvent, VerifierEvent } from "matrix-js-sdk/lib/crypto-api/verification.js";
|
|
18
18
|
import { expectDefined } from "openclaw/plugin-sdk/expect-runtime";
|
|
19
|
-
|
|
19
|
+
// extensions/matrix/src/matrix/sdk/fake-indexeddb-prune.ts
|
|
20
20
|
const MATRIX_CRYPTO_DATABASE_SUFFIXES = ["::matrix-sdk-crypto", "::matrix-sdk-crypto-meta"];
|
|
21
21
|
const PRUNER_INSTALLED = Symbol.for("openclaw.matrix.fakeIndexedDbTransactionPruner");
|
|
22
22
|
function isMatrixCryptoDatabase(rawDatabase) {
|
|
@@ -53,8 +53,7 @@ function installFakeIndexedDbTransactionPruner() {
|
|
|
53
53
|
return transaction;
|
|
54
54
|
};
|
|
55
55
|
}
|
|
56
|
-
|
|
57
|
-
//#region extensions/matrix/src/matrix/sdk/crypto-bootstrap.ts
|
|
56
|
+
// extensions/matrix/src/matrix/sdk/crypto-bootstrap.ts
|
|
58
57
|
const CROSS_SIGNING_PUBLICATION_WAIT_MS = 5e3;
|
|
59
58
|
var MatrixCryptoBootstrapper = class {
|
|
60
59
|
constructor(deps) {
|
|
@@ -267,9 +266,8 @@ var MatrixCryptoBootstrapper = class {
|
|
|
267
266
|
return verified;
|
|
268
267
|
}
|
|
269
268
|
};
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
const loadMatrixCryptoNodeRuntime = createLazyRuntimeModule(() => import("./crypto-node.runtime-6Aj_ltHQ.mjs"));
|
|
269
|
+
// extensions/matrix/src/matrix/sdk/crypto-facade.ts
|
|
270
|
+
const loadMatrixCryptoNodeRuntime = createLazyRuntimeModule(() => import("./crypto-node.runtime-E_hqXGxm.mjs"));
|
|
273
271
|
async function loadMatrixCryptoNodeBindings() {
|
|
274
272
|
await ensureMatrixCryptoRuntime();
|
|
275
273
|
return (await loadMatrixCryptoNodeRuntime()).loadMatrixCryptoNodeBindings();
|
|
@@ -339,8 +337,7 @@ function createMatrixCryptoFacade(deps) {
|
|
|
339
337
|
getVerificationSas: withTrackedVerifications(manager.getVerificationSas.bind(manager))
|
|
340
338
|
};
|
|
341
339
|
}
|
|
342
|
-
|
|
343
|
-
//#region extensions/matrix/src/matrix/sdk/decrypt-bridge.ts
|
|
340
|
+
// extensions/matrix/src/matrix/sdk/decrypt-bridge.ts
|
|
344
341
|
const MATRIX_DECRYPT_RETRY_BASE_DELAY_MS = 1500;
|
|
345
342
|
const MATRIX_DECRYPT_RETRY_MAX_DELAY_MS = 3e4;
|
|
346
343
|
const MATRIX_DECRYPT_RETRY_MAX_ATTEMPTS = 8;
|
|
@@ -606,8 +603,7 @@ var MatrixDecryptBridge = class {
|
|
|
606
603
|
pruneMapToMaxSize(this.decryptedMessageDedupe, 2048);
|
|
607
604
|
}
|
|
608
605
|
};
|
|
609
|
-
|
|
610
|
-
//#region extensions/matrix/src/matrix/sdk/verification-manager.ts
|
|
606
|
+
// extensions/matrix/src/matrix/sdk/verification-manager.ts
|
|
611
607
|
const MAX_TRACKED_VERIFICATION_SESSIONS = 256;
|
|
612
608
|
const TERMINAL_SESSION_RETENTION_MS = 864e5;
|
|
613
609
|
const SAS_AUTO_CONFIRM_DELAY_MS = 3e4;
|
|
@@ -939,8 +935,7 @@ var MatrixVerificationManager = class {
|
|
|
939
935
|
return callbacks;
|
|
940
936
|
}
|
|
941
937
|
};
|
|
942
|
-
|
|
943
|
-
//#region extensions/matrix/src/matrix/sdk/indexeddb-session.ts
|
|
938
|
+
// extensions/matrix/src/matrix/sdk/indexeddb-session.ts
|
|
944
939
|
const registry = resolveGlobalSingleton(Symbol.for("openclaw.matrix.sdkIndexedDbSessions"), () => ({ sessions: /* @__PURE__ */ new Map() }));
|
|
945
940
|
const sessions = registry.sessions;
|
|
946
941
|
function retiredError() {
|
|
@@ -1049,8 +1044,6 @@ function beginMatrixSdkIndexedDbSession(databasePrefix = "matrix-js-sdk") {
|
|
|
1049
1044
|
return retirement;
|
|
1050
1045
|
} };
|
|
1051
1046
|
}
|
|
1052
|
-
|
|
1053
|
-
//#region extensions/matrix/src/matrix/sdk/crypto-runtime.ts
|
|
1047
|
+
// extensions/matrix/src/matrix/sdk/crypto-runtime.ts
|
|
1054
1048
|
installFakeIndexedDbTransactionPruner();
|
|
1055
|
-
//#endregion
|
|
1056
1049
|
export { MatrixCryptoBootstrapper, MatrixDecryptBridge, MatrixVerificationManager, beginMatrixSdkIndexedDbSession, createMatrixCryptoFacade, isMatrixDeviceOwnerVerified, isMatrixDeviceVerifiedInCurrentClient, persistIdbToDisk, resolveDefaultIdbSnapshotPath, restoreIdbFromDisk };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { t as getMatrixRuntime } from "./runtime-
|
|
2
|
-
import { c as updateMatrixKeyedState, d as writeMatrixStateChunks, l as chunkMatrixStateJson, o as resolveMatrixSqliteStateEnv, u as readMatrixStateChunks } from "./retired-state-
|
|
1
|
+
import { t as getMatrixRuntime } from "./runtime-Ck8TjD7L.mjs";
|
|
2
|
+
import { c as updateMatrixKeyedState, 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";
|
|
8
|
-
|
|
8
|
+
// extensions/matrix/src/matrix/crypto-state-store.ts
|
|
9
9
|
const STATE_KEY = "current";
|
|
10
10
|
const RECOVERY_KEY_NAMESPACE = "recovery-key";
|
|
11
11
|
const LEGACY_CRYPTO_MIGRATION_NAMESPACE = "legacy-crypto-migration";
|
|
@@ -181,5 +181,4 @@ function isIdbSnapshotMeta(value) {
|
|
|
181
181
|
max: IDB_SNAPSHOT_MAX_CHUNKS
|
|
182
182
|
}) !== void 0 && typeof value.digest === "string" && asSafeIntegerInRange(value.databaseCount, { min: 0 }) !== void 0 && typeof value.persistedAt === "string" && (value.cleanOwnerGeneration === void 0 || typeof value.cleanOwnerGeneration === "string" && /^[a-f0-9]{32}$/.test(value.cleanOwnerGeneration));
|
|
183
183
|
}
|
|
184
|
-
//#endregion
|
|
185
184
|
export { readMatrixRecoveryKeyStateForPathAsync as a, writeMatrixIdbSnapshotJson as c, readMatrixIdbSnapshotOwnerGeneration as i, writeMatrixRecoveryKeyStateForPathAsync as l, MATRIX_RECOVERY_KEY_FILENAME as n, scoreMatrixCryptoStateInStore as o, readMatrixIdbSnapshotJson as r, sealMatrixIdbSnapshotOwnerGeneration as s, MATRIX_IDB_SNAPSHOT_FILENAME as t };
|
package/dist/.setup/{crypto-store-ownership-Z_Y5WRKr.mjs → crypto-store-ownership-Bratn-Np.mjs}
RENAMED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { t as getMatrixRuntime } from "./runtime-
|
|
2
|
-
import { i as readMatrixIdbSnapshotOwnerGeneration, s as sealMatrixIdbSnapshotOwnerGeneration } from "./crypto-state-store-
|
|
1
|
+
import { t as getMatrixRuntime } from "./runtime-Ck8TjD7L.mjs";
|
|
2
|
+
import { i as readMatrixIdbSnapshotOwnerGeneration, s as sealMatrixIdbSnapshotOwnerGeneration } from "./crypto-state-store-CM57gchf.mjs";
|
|
3
3
|
import { randomUUID } from "node:crypto";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import { constants } from "node:fs";
|
|
6
6
|
import fs$1 from "node:fs/promises";
|
|
7
7
|
import { FILE_LOCK_STALE_ERROR_CODE, FILE_LOCK_TIMEOUT_ERROR_CODE, acquireFileLock } from "openclaw/plugin-sdk/file-lock";
|
|
8
8
|
import { syncDirectory } from "@openclaw/fs-safe/durability";
|
|
9
|
-
|
|
9
|
+
// extensions/matrix/src/matrix/sdk/crypto-store-ownership.ts
|
|
10
10
|
const MATRIX_CRYPTO_STORE_OWNER_ACTIVE_ERROR_CODE = "matrix_crypto_store_owner_active";
|
|
11
11
|
const GUARD_BYTES = 33;
|
|
12
12
|
var MatrixCryptoStoreOwnerActiveError = class extends Error {
|
|
@@ -170,5 +170,4 @@ async function acquireMatrixCryptoStoreOwnership(snapshotPath, options = {}) {
|
|
|
170
170
|
release: () => lock.release()
|
|
171
171
|
};
|
|
172
172
|
}
|
|
173
|
-
//#endregion
|
|
174
173
|
export { withMatrixCryptoStoreRecoveryLock as i, isMatrixCryptoStoreUnsafe as n, sealMatrixCryptoStoreRecovery as r, acquireMatrixCryptoStoreOwnership as t };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { i as __exportAll } from "./doctor-contract-
|
|
2
|
-
import { t as getMatrixRuntime } from "./runtime-
|
|
3
|
-
import { r as readMatrixIdbSnapshotJson, t as MATRIX_IDB_SNAPSHOT_FILENAME } from "./crypto-state-store-
|
|
4
|
-
import { t as walkMatrixStateFiles } from "./state-layout-walk-
|
|
5
|
-
import { i as withMatrixCryptoStoreRecoveryLock, n as isMatrixCryptoStoreUnsafe, r as sealMatrixCryptoStoreRecovery } from "./crypto-store-ownership-
|
|
1
|
+
import { i as __exportAll } from "./doctor-contract-DybEjJcd.mjs";
|
|
2
|
+
import { t as getMatrixRuntime } from "./runtime-Ck8TjD7L.mjs";
|
|
3
|
+
import { r as readMatrixIdbSnapshotJson, t as MATRIX_IDB_SNAPSHOT_FILENAME } from "./crypto-state-store-CM57gchf.mjs";
|
|
4
|
+
import { t as walkMatrixStateFiles } from "./state-layout-walk-BqCZTHpp.mjs";
|
|
5
|
+
import { i as withMatrixCryptoStoreRecoveryLock, n as isMatrixCryptoStoreUnsafe, r as sealMatrixCryptoStoreRecovery } from "./crypto-store-ownership-Bratn-Np.mjs";
|
|
6
6
|
import path from "node:path";
|
|
7
7
|
import fs from "node:fs/promises";
|
|
8
8
|
import { FILE_LOCK_TIMEOUT_ERROR_CODE } from "openclaw/plugin-sdk/file-lock";
|
|
9
|
-
|
|
9
|
+
// extensions/matrix/src/matrix/crypto-unsafe-state-doctor.ts
|
|
10
10
|
var crypto_unsafe_state_doctor_exports = /* @__PURE__ */ __exportAll({
|
|
11
11
|
listMatrixCryptoUnsafeState: () => listMatrixCryptoUnsafeState,
|
|
12
12
|
recoverMatrixCryptoUnsafeState: () => recoverMatrixCryptoUnsafeState
|
|
@@ -41,7 +41,7 @@ async function recoverMatrixCryptoUnsafeState(params) {
|
|
|
41
41
|
}
|
|
42
42
|
const snapshot = await readMatrixIdbSnapshotJson(params.storageRootDir, getMatrixRuntime().state);
|
|
43
43
|
if (!snapshot) throw new Error("Matrix crypto SQLite snapshot is absent or invalid; refusal remains in place.");
|
|
44
|
-
const { validateMatrixIdbSnapshotJson } = await import("./idb-persistence-
|
|
44
|
+
const { validateMatrixIdbSnapshotJson } = await import("./idb-persistence-BF0MZglD.mjs");
|
|
45
45
|
try {
|
|
46
46
|
await validateMatrixIdbSnapshotJson(snapshot);
|
|
47
47
|
} catch (error) {
|
|
@@ -50,5 +50,4 @@ async function recoverMatrixCryptoUnsafeState(params) {
|
|
|
50
50
|
await sealMatrixCryptoStoreRecovery(snapshotPath, getMatrixRuntime().state);
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
|
-
//#endregion
|
|
54
53
|
export { listMatrixCryptoUnsafeState as n, recoverMatrixCryptoUnsafeState as r, crypto_unsafe_state_doctor_exports as t };
|
|
@@ -3,7 +3,7 @@ import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import fs from "node:fs";
|
|
5
5
|
import { runCommandWithTimeout } from "openclaw/plugin-sdk/process-runtime";
|
|
6
|
-
|
|
6
|
+
// extensions/matrix/src/matrix/deps.ts
|
|
7
7
|
const REQUIRED_MATRIX_PACKAGES = [
|
|
8
8
|
"matrix-js-sdk",
|
|
9
9
|
"@matrix-org/matrix-sdk-crypto-nodejs",
|
|
@@ -116,5 +116,4 @@ async function ensureMatrixSdkInstalled(params) {
|
|
|
116
116
|
if (missing.length === 0) return;
|
|
117
117
|
throw new Error(`Matrix plugin dependencies are missing: ${missing.join(", ")}. Repair this plugin with \`openclaw plugins update matrix\` or run \`openclaw doctor --fix\`.`);
|
|
118
118
|
}
|
|
119
|
-
//#endregion
|
|
120
119
|
export { ensureMatrixSdkInstalled as n, isMatrixSdkAvailable as r, ensureMatrixCryptoRuntime as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as __exportAll } from "./doctor-contract-
|
|
2
|
-
|
|
1
|
+
import { i as __exportAll } from "./doctor-contract-DybEjJcd.mjs";
|
|
2
|
+
// extensions/matrix/src/matrix/device-health.ts
|
|
3
3
|
var device_health_exports = /* @__PURE__ */ __exportAll({
|
|
4
4
|
isOpenClawManagedMatrixDevice: () => isOpenClawManagedMatrixDevice,
|
|
5
5
|
summarizeMatrixDeviceHealth: () => summarizeMatrixDeviceHealth
|
|
@@ -17,5 +17,4 @@ function summarizeMatrixDeviceHealth(devices) {
|
|
|
17
17
|
currentOpenClawDevices: openClawDevices.filter((device) => device.current)
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
|
-
//#endregion
|
|
21
20
|
export { isOpenClawManagedMatrixDevice as n, summarizeMatrixDeviceHealth as r, device_health_exports as t };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { i as __exportAll } from "./doctor-contract-
|
|
2
|
-
import { n as isMatrixQualifiedUserId } from "./target-ids-
|
|
3
|
-
import { a as MATRIX_REACTION_EVENT_TYPE, i as MATRIX_ANNOTATION_RELATION_TYPE } from "./send-currentness-
|
|
1
|
+
import { i as __exportAll } from "./doctor-contract-DybEjJcd.mjs";
|
|
2
|
+
import { n as isMatrixQualifiedUserId } from "./target-ids-DltG_ZHJ.mjs";
|
|
3
|
+
import { a as MATRIX_REACTION_EVENT_TYPE, i as MATRIX_ANNOTATION_RELATION_TYPE } from "./send-currentness-CAUVR-f3.mjs";
|
|
4
4
|
import { asOptionalRecord, normalizeNullableString, normalizeOptionalString, normalizeTrimmedStringList, normalizeUniqueTrimmedStringList } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
5
5
|
import { KeyedAsyncQueue } from "openclaw/plugin-sdk/keyed-async-queue";
|
|
6
|
-
|
|
6
|
+
// extensions/matrix/src/matrix/send/types.ts
|
|
7
7
|
const MsgType = {
|
|
8
8
|
Text: "m.text",
|
|
9
9
|
Image: "m.image",
|
|
@@ -32,8 +32,7 @@ const MATRIX_OPENCLAW_FINALIZED_PREVIEW_KEY = "com.openclaw.finalized_preview";
|
|
|
32
32
|
* @see https://github.com/matrix-org/matrix-spec-proposals/pull/4357
|
|
33
33
|
*/
|
|
34
34
|
const MSC4357_LIVE_KEY = "org.matrix.msc4357.live";
|
|
35
|
-
|
|
36
|
-
//#region extensions/matrix/src/matrix/relations.ts
|
|
35
|
+
// extensions/matrix/src/matrix/relations.ts
|
|
37
36
|
function relatedReplyEventId(relation) {
|
|
38
37
|
const reply = asOptionalRecord(relation?.["m.in_reply_to"]);
|
|
39
38
|
return typeof reply?.event_id === "string" ? reply.event_id : void 0;
|
|
@@ -60,8 +59,7 @@ function resolveMatrixThreadRootId(content) {
|
|
|
60
59
|
if (relation?.rel_type !== RelationType.Thread) return;
|
|
61
60
|
return typeof relation.event_id === "string" ? relation.event_id : relatedReplyEventId(relation);
|
|
62
61
|
}
|
|
63
|
-
|
|
64
|
-
//#region extensions/matrix/src/matrix/direct-room.ts
|
|
62
|
+
// extensions/matrix/src/matrix/direct-room.ts
|
|
65
63
|
var direct_room_exports = /* @__PURE__ */ __exportAll({
|
|
66
64
|
hasDirectMatrixMemberFlag: () => hasDirectMatrixMemberFlag,
|
|
67
65
|
inspectMatrixDirectRoomEvidence: () => inspectMatrixDirectRoomEvidence,
|
|
@@ -117,8 +115,7 @@ async function inspectMatrixDirectRoomEvidence(params) {
|
|
|
117
115
|
async function isStrictDirectRoom(params) {
|
|
118
116
|
return (await inspectMatrixDirectRoomEvidence(params)).strict;
|
|
119
117
|
}
|
|
120
|
-
|
|
121
|
-
//#region extensions/matrix/src/matrix/direct-management.ts
|
|
118
|
+
// extensions/matrix/src/matrix/direct-management.ts
|
|
122
119
|
var direct_management_exports = /* @__PURE__ */ __exportAll({
|
|
123
120
|
inspectMatrixDirectRooms: () => inspectMatrixDirectRooms,
|
|
124
121
|
persistMatrixDirectRoomMapping: () => persistMatrixDirectRoomMapping,
|
|
@@ -266,5 +263,4 @@ async function repairMatrixDirectRooms(params) {
|
|
|
266
263
|
directContentAfter: mappingWrite.directContentAfter
|
|
267
264
|
};
|
|
268
265
|
}
|
|
269
|
-
//#endregion
|
|
270
266
|
export { MsgType as _, repairMatrixDirectRooms as a, isStrictDirectMembership as c, buildMatrixMessageRelation as d, resolveMatrixReplyToEventId as f, MSC4357_LIVE_KEY as g, MATRIX_OPENCLAW_FINALIZED_PREVIEW_KEY as h, promoteMatrixDirectRoomCandidate as i, isStrictDirectRoom as l, EventType as m, inspectMatrixDirectRooms as n, direct_room_exports as o, resolveMatrixThreadRootId as p, persistMatrixDirectRoomMapping as r, hasDirectMatrixMemberFlag as s, direct_management_exports as t, readJoinedMatrixMembers as u, RelationType as v };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { i as __exportAll } from "./doctor-contract-
|
|
2
|
-
import { i as normalizeMatrixMessagingTarget, n as isMatrixQualifiedUserId } from "./target-ids-
|
|
3
|
-
import { u as resolveMatrixAuth } from "./client-
|
|
4
|
-
import { t as MatrixAuthedHttpClient } from "./http-client-
|
|
1
|
+
import { i as __exportAll } from "./doctor-contract-DybEjJcd.mjs";
|
|
2
|
+
import { i as normalizeMatrixMessagingTarget, n as isMatrixQualifiedUserId } from "./target-ids-DltG_ZHJ.mjs";
|
|
3
|
+
import { u as resolveMatrixAuth } from "./client-7eyTX0cu.mjs";
|
|
4
|
+
import { t as MatrixAuthedHttpClient } from "./http-client-CxTmU1kT.mjs";
|
|
5
5
|
import { isRecord, normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
6
|
-
|
|
6
|
+
// extensions/matrix/src/directory-live.ts
|
|
7
7
|
var directory_live_exports = /* @__PURE__ */ __exportAll({
|
|
8
8
|
listMatrixDirectoryGroupsLive: () => listMatrixDirectoryGroupsLive,
|
|
9
9
|
listMatrixDirectoryPeersLive: () => listMatrixDirectoryPeersLive
|
|
@@ -114,5 +114,4 @@ async function listMatrixDirectoryGroupsLive(params) {
|
|
|
114
114
|
}
|
|
115
115
|
return results;
|
|
116
116
|
}
|
|
117
|
-
//#endregion
|
|
118
117
|
export { listMatrixDirectoryGroupsLive as n, listMatrixDirectoryPeersLive as r, directory_live_exports as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "node:module";
|
|
2
2
|
import { isRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
3
|
-
|
|
3
|
+
// \0rolldown/runtime.js
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
5
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
@@ -25,8 +25,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
25
25
|
return to;
|
|
26
26
|
};
|
|
27
27
|
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
28
|
-
|
|
29
|
-
//#region packages/normalization-core/src/record-coerce.ts
|
|
28
|
+
// packages/normalization-core/src/record-coerce.ts
|
|
30
29
|
/** Type guard for non-array object records at browser-safe boundaries. */
|
|
31
30
|
function isRecord$1(value) {
|
|
32
31
|
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
@@ -35,8 +34,7 @@ function isRecord$1(value) {
|
|
|
35
34
|
function asNullableRecord$1(value) {
|
|
36
35
|
return isRecord$1(value) ? value : null;
|
|
37
36
|
}
|
|
38
|
-
|
|
39
|
-
//#region src/config/channel-config-normalization.ts
|
|
37
|
+
// src/config/channel-config-normalization.ts
|
|
40
38
|
/** Applies one channel-specific doctor migration to every object-shaped account. */
|
|
41
39
|
function normalizeChannelAccounts(params) {
|
|
42
40
|
const rawAccounts = asNullableRecord$1(params.entry.accounts);
|
|
@@ -112,8 +110,7 @@ function normalizeChannelConfigEntries(params) {
|
|
|
112
110
|
changes
|
|
113
111
|
};
|
|
114
112
|
}
|
|
115
|
-
|
|
116
|
-
//#region src/plugin-sdk/legacy-webhook-listener-migration.ts
|
|
113
|
+
// src/plugin-sdk/legacy-webhook-listener-migration.ts
|
|
117
114
|
/** Preserve explicitly configured webhook listeners while moving ingress onto Gateway routes. */
|
|
118
115
|
function createLegacyWebhookListenerDoctorContract(params) {
|
|
119
116
|
const portKey = params.portKey ?? "webhookPort";
|
|
@@ -183,13 +180,11 @@ function createLegacyWebhookListenerDoctorContract(params) {
|
|
|
183
180
|
}
|
|
184
181
|
};
|
|
185
182
|
}
|
|
186
|
-
|
|
187
|
-
//#region \0openclaw:bundled-sdk:openclaw/plugin-sdk/runtime-doctor-migrations
|
|
183
|
+
// \0openclaw:bundled-sdk:openclaw/plugin-sdk/runtime-doctor-migrations
|
|
188
184
|
var runtime_doctor_migrations_exports = /* @__PURE__ */ __exportAll({ createLegacyWebhookListenerDoctorContract: () => createLegacyWebhookListenerDoctorContract });
|
|
189
185
|
import * as import_openclaw_plugin_sdk_runtime_doctor_migrations from "openclaw/plugin-sdk/runtime-doctor-migrations";
|
|
190
186
|
__reExport(runtime_doctor_migrations_exports, import_openclaw_plugin_sdk_runtime_doctor_migrations);
|
|
191
|
-
|
|
192
|
-
//#region extensions/matrix/src/doctor-contract.ts
|
|
187
|
+
// extensions/matrix/src/doctor-contract.ts
|
|
193
188
|
function parseMatrixStreamingMode(value) {
|
|
194
189
|
if (typeof value !== "string") return null;
|
|
195
190
|
const normalized = value.trim().toLowerCase();
|
|
@@ -223,5 +218,4 @@ function normalizeCompatibilityConfig({ cfg }) {
|
|
|
223
218
|
changes
|
|
224
219
|
});
|
|
225
220
|
}
|
|
226
|
-
//#endregion
|
|
227
221
|
export { __exportAll as i, normalizeCompatibilityConfig as n, runtime_doctor_migrations_exports as r, legacyConfigRules as t };
|