@openclaw/matrix 2026.11.5-beta.1 → 2026.11.5-beta.2
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,13 +1,13 @@
|
|
|
1
|
-
import { n as __exportAll } from "./runtime-doctor-migrations-
|
|
2
|
-
import { n as getMatrixRuntimeLifecycle } from "./runtime-
|
|
3
|
-
import { c as hasReadyMatrixEnvAuth, d as resolveScopedMatrixEnvConfig, f as MATRIX_CONFIG_STRING_FIELDS, i as requiresExplicitMatrixDefaultAccount, l as resolveGlobalMatrixEnvConfig, p as resolveMatrixAccountStringValues, 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-
|
|
9
|
-
import { n as getMatrixMonitorTaskSignal } from "./task-runner-
|
|
10
|
-
import { c as resolveMatrixLocalTimeoutMs } from "./client-support-
|
|
1
|
+
import { n as __exportAll } from "./runtime-doctor-migrations-hxP-CXX7.mjs";
|
|
2
|
+
import { n as getMatrixRuntimeLifecycle } from "./runtime-1kn1P6io.mjs";
|
|
3
|
+
import { c as hasReadyMatrixEnvAuth, d as resolveScopedMatrixEnvConfig, f as MATRIX_CONFIG_STRING_FIELDS, i as requiresExplicitMatrixDefaultAccount, l as resolveGlobalMatrixEnvConfig, p as resolveMatrixAccountStringValues, s as resolveMatrixDefaultOrOnlyAccountId, u as resolveMatrixEnvAuthReadiness } from "./account-selection-UUPhMBmu.mjs";
|
|
4
|
+
import { t as getMatrixScopedEnvVarNames } from "./env-vars-aEBngJPa.mjs";
|
|
5
|
+
import { o as resolveMatrixBaseConfig, r as listNormalizedMatrixAccountIds, t as findMatrixAccountConfig } from "./account-config-CRsKoMqJ.mjs";
|
|
6
|
+
import { t as resolveMatrixConfigFieldPath } from "./config-paths-CnREYb1Y.mjs";
|
|
7
|
+
import { n as validateMatrixHomeserverUrl, t as resolveValidatedMatrixHomeserverUrl } from "./url-validation-By_2hsXr.mjs";
|
|
8
|
+
import { i as repairCurrentTokenStorageMetaDeviceId } from "./storage-C3N6YZIn.mjs";
|
|
9
|
+
import { n as getMatrixMonitorTaskSignal } from "./task-runner-DY3aKiQa.mjs";
|
|
10
|
+
import { c as resolveMatrixLocalTimeoutMs } from "./client-support-B_Mp4Qk9.mjs";
|
|
11
11
|
import { createLazyRuntimeMethod, createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
12
12
|
import { DEFAULT_ACCOUNT_ID, normalizeAccountId, normalizeOptionalAccountId } from "openclaw/plugin-sdk/account-id";
|
|
13
13
|
import { formatErrorMessage, materializeErrorStack, toErrorObject, toStringifiedError } from "openclaw/plugin-sdk/error-runtime";
|
|
@@ -21,7 +21,7 @@ import { retryAsync } from "openclaw/plugin-sdk/retry-runtime";
|
|
|
21
21
|
import { sleepWithAbort } from "openclaw/plugin-sdk/runtime-env";
|
|
22
22
|
import { createDeferred } from "openclaw/plugin-sdk/extension-shared";
|
|
23
23
|
import { resolveGlobalSingleton } from "openclaw/plugin-sdk/global-singleton";
|
|
24
|
-
|
|
24
|
+
//#region extensions/matrix/src/matrix/client/auth-request.ts
|
|
25
25
|
const MATRIX_AUTH_REQUEST_RETRY_RE = /\b(fetch failed|econnreset|econnrefused|enotfound|etimedout|ehostunreach|enetunreach|eai_again|und_err_|socket hang up|network|headers timeout|body timeout|connect timeout)\b/i;
|
|
26
26
|
async function retryMatrixAuthRequest(label, run, signal) {
|
|
27
27
|
return await retryAsync(run, {
|
|
@@ -35,7 +35,7 @@ async function retryMatrixAuthRequest(label, run, signal) {
|
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
37
|
async function fetchMatrixWhoamiIdentity(params) {
|
|
38
|
-
const { MatrixAuthedHttpClient } = await import("./http-client-
|
|
38
|
+
const { MatrixAuthedHttpClient } = await import("./http-client-B_ohXrBm.mjs").then((n) => n.n);
|
|
39
39
|
params.signal?.throwIfAborted();
|
|
40
40
|
const client = new MatrixAuthedHttpClient({
|
|
41
41
|
homeserver: params.homeserver,
|
|
@@ -60,9 +60,10 @@ async function fetchMatrixWhoamiIdentity(params) {
|
|
|
60
60
|
};
|
|
61
61
|
}, params.signal);
|
|
62
62
|
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
const
|
|
63
|
+
//#endregion
|
|
64
|
+
//#region extensions/matrix/src/matrix/client/config.ts
|
|
65
|
+
const loadMatrixCredentialsReadDeps = createLazyRuntimeModule(() => import("./credentials-read-CM6wXUjL.mjs").then((n) => n.i));
|
|
66
|
+
const loadMatrixCredentialsWriteRuntime = createLazyRuntimeModule(() => import("./credentials-kT20jk_u.mjs"));
|
|
66
67
|
const loadMatrixSecretInputDeps = createLazyRuntimeModule(() => import("openclaw/plugin-sdk/secret-input-runtime"));
|
|
67
68
|
function credentialsMatchBackfillAuthLineage(params) {
|
|
68
69
|
if (!params.stored) return true;
|
|
@@ -319,7 +320,7 @@ async function resolveMatrixAuth(params) {
|
|
|
319
320
|
configured: authInputs.password
|
|
320
321
|
}) ?? resolved.password;
|
|
321
322
|
if (!password) throw new Error("Matrix password is required when no access token is configured (matrix.password)");
|
|
322
|
-
const { MatrixAuthedHttpClient } = await import("./http-client-
|
|
323
|
+
const { MatrixAuthedHttpClient } = await import("./http-client-B_ohXrBm.mjs").then((n) => n.n);
|
|
323
324
|
const loginClient = new MatrixAuthedHttpClient({
|
|
324
325
|
homeserver,
|
|
325
326
|
accessToken: "",
|
|
@@ -409,7 +410,8 @@ async function backfillMatrixAuthDeviceIdAfterStartup(params) {
|
|
|
409
410
|
deviceId
|
|
410
411
|
}, env, params.auth.accountId) === "saved" ? deviceId : void 0;
|
|
411
412
|
}
|
|
412
|
-
|
|
413
|
+
//#endregion
|
|
414
|
+
//#region extensions/matrix/src/matrix/startup-abort.ts
|
|
413
415
|
function createMatrixStartupAbortError() {
|
|
414
416
|
const error = /* @__PURE__ */ new Error("Matrix startup aborted");
|
|
415
417
|
error.name = "AbortError";
|
|
@@ -429,8 +431,9 @@ async function awaitMatrixStartupWithAbort(promise, abortSignal) {
|
|
|
429
431
|
throw toErrorObject(error, "Non-Error rejection");
|
|
430
432
|
}
|
|
431
433
|
}
|
|
432
|
-
|
|
433
|
-
|
|
434
|
+
//#endregion
|
|
435
|
+
//#region extensions/matrix/src/matrix/client/shared.ts
|
|
436
|
+
const loadMatrixCreateClientDeps = createLazyRuntimeModule(() => import("./create-client-Ccf5wyS3.mjs"));
|
|
434
437
|
const MATRIX_RETIREMENT_DRAIN_TIMEOUT_MS = 5e3;
|
|
435
438
|
const sharedClientRegistry = resolveGlobalSingleton(Symbol.for("openclaw.matrix.shared-client-registry"), () => ({
|
|
436
439
|
states: /* @__PURE__ */ new Map(),
|
|
@@ -749,7 +752,8 @@ async function stopSharedClientForAccount(auth) {
|
|
|
749
752
|
if (!state || state.ownerSignal !== getMatrixRuntimeLifecycle()?.signal) return;
|
|
750
753
|
await forceRetireState(state);
|
|
751
754
|
}
|
|
752
|
-
|
|
755
|
+
//#endregion
|
|
756
|
+
//#region extensions/matrix/src/matrix/client.ts
|
|
753
757
|
var client_exports = /* @__PURE__ */ __exportAll({
|
|
754
758
|
acquireSharedMatrixClient: () => acquireSharedMatrixClient,
|
|
755
759
|
backfillMatrixAuthDeviceIdAfterStartup: () => backfillMatrixAuthDeviceIdAfterStartup,
|
|
@@ -764,6 +768,7 @@ var client_exports = /* @__PURE__ */ __exportAll({
|
|
|
764
768
|
stopSharedClientForAccount: () => stopSharedClientForAccount,
|
|
765
769
|
validateMatrixHomeserverUrl: () => validateMatrixHomeserverUrl
|
|
766
770
|
});
|
|
767
|
-
const loadMatrixClientRuntime = createLazyRuntimeModule(() => import("./create-client-
|
|
771
|
+
const loadMatrixClientRuntime = createLazyRuntimeModule(() => import("./create-client-Ccf5wyS3.mjs"));
|
|
768
772
|
const createMatrixClient = createLazyRuntimeMethod(loadMatrixClientRuntime, (runtime) => runtime.createMatrixClient);
|
|
773
|
+
//#endregion
|
|
769
774
|
export { isMatrixStartupAbortError as a, resolveMatrixAuth as c, createMatrixStartupAbortError as i, resolveMatrixAuthContext as l, acquireSharedMatrixClient as n, throwIfMatrixStartupAborted as o, awaitMatrixStartupWithAbort as r, backfillMatrixAuthDeviceIdAfterStartup as s, 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
|
+
//#region extensions/matrix/src/matrix/client-bootstrap.ts
|
|
4
|
+
const loadMatrixSharedClientRuntimeDeps = createLazyRuntimeModule(() => import("./client-D1bsidwU.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();
|
|
@@ -65,4 +65,5 @@ async function withResolvedRuntimeMatrixClient(opts, run) {
|
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
|
+
//#endregion
|
|
68
69
|
export { resolveRuntimeMatrixClientWithReadiness, withResolvedRuntimeMatrixClient };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as formatMatrixErrorReason } from "./errors-
|
|
1
|
+
import { t as formatMatrixErrorReason } from "./errors-Bw4EHwKX.mjs";
|
|
2
2
|
import { raceWithTimeout } from "openclaw/plugin-sdk/time-runtime";
|
|
3
|
-
|
|
3
|
+
//#region extensions/matrix/src/matrix/sdk/client-support.ts
|
|
4
4
|
const MATRIX_STATUS_DIAGNOSTIC_TIMEOUT_MS = 1e4;
|
|
5
5
|
const DEFAULT_MATRIX_LOCAL_TIMEOUT_MS = 6e4;
|
|
6
6
|
function resolveMatrixLocalTimeoutMs(raw) {
|
|
@@ -66,4 +66,5 @@ function createMatrixExplicitBootstrapOptions(params) {
|
|
|
66
66
|
strict: params?.strict !== false
|
|
67
67
|
};
|
|
68
68
|
}
|
|
69
|
+
//#endregion
|
|
69
70
|
export { isMatrixAccessTokenInvalidatedError as a, resolveMatrixLocalTimeoutMs as c, createMatrixExplicitBootstrapOptions as i, unresolvedMatrixDeviceVerificationStatus as l, MATRIX_INITIAL_CRYPTO_BOOTSTRAP_OPTIONS as n, resolveMatrixDiagnostic as o, 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
|
+
//#region 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,4 +15,5 @@ function resolveMatrixConfigFieldPath(cfg, accountId, fieldPath) {
|
|
|
15
15
|
if (!suffix) return resolveMatrixConfigPath(cfg, accountId);
|
|
16
16
|
return `${resolveMatrixConfigPath(cfg, accountId)}.${suffix}`;
|
|
17
17
|
}
|
|
18
|
+
//#endregion
|
|
18
19
|
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-1kn1P6io.mjs";
|
|
2
|
+
import { t as resolveValidatedMatrixHomeserverUrl } from "./url-validation-By_2hsXr.mjs";
|
|
3
|
+
import { n as maybeMigrateLegacyStorage, o as resolveMatrixStoragePaths, s as writeStorageMeta } from "./storage-C3N6YZIn.mjs";
|
|
4
|
+
import "./client-D1bsidwU.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
|
+
//#region 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-DPXiQ3jr.mjs").then((n) => n.t),
|
|
12
|
+
import("./logging-CoaEyRtA.mjs").then((n) => n.n),
|
|
13
|
+
import("./file-sync-store-BpS12yaK.mjs")
|
|
14
14
|
]).then(([sdkModule, loggingModule, syncStoreModule]) => ({
|
|
15
15
|
MatrixClient: sdkModule.MatrixClient,
|
|
16
16
|
SqliteBackedMatrixSyncStore: syncStoreModule.SqliteBackedMatrixSyncStore,
|
|
@@ -68,4 +68,5 @@ async function createMatrixClient(params, preparedStorage) {
|
|
|
68
68
|
stateRuntime: getMatrixRuntime().state
|
|
69
69
|
});
|
|
70
70
|
}
|
|
71
|
+
//#endregion
|
|
71
72
|
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-B3cuUFwZ.mjs";
|
|
2
|
+
import { i as resolveMatrixCredentialsDir, o as resolveMatrixCredentialsPath } from "./storage-paths-B51JM-pC.mjs";
|
|
3
|
+
import { a as loadMatrixCredentials, n as clearMatrixCredentials, r as credentialsMatchConfig, s as openMatrixCredentialsAsyncStore } from "./credentials-read-CM6wXUjL.mjs";
|
|
4
|
+
import { c as updateMatrixKeyedState } from "./retired-state-JGUEBE72.mjs";
|
|
5
5
|
import { normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
|
6
|
-
|
|
6
|
+
//#region 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
|
}
|
|
@@ -40,4 +40,5 @@ async function persistMatrixCredentials(credentials, env, accountId, backfill) {
|
|
|
40
40
|
});
|
|
41
41
|
return result;
|
|
42
42
|
}
|
|
43
|
+
//#endregion
|
|
43
44
|
export { clearMatrixCredentials, credentialsMatchConfig, loadMatrixCredentials, resolveMatrixCredentialsDir, resolveMatrixCredentialsPath, saveBackfilledMatrixDeviceId, saveMatrixCredentials };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { n as __exportAll } from "./runtime-doctor-migrations-
|
|
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 { n as __exportAll } from "./runtime-doctor-migrations-hxP-CXX7.mjs";
|
|
2
|
+
import { r as getOptionalMatrixRuntime } from "./runtime-1kn1P6io.mjs";
|
|
3
|
+
import { i as normalizeMatrixStoredCredentials, r as matrixCredentialsStoreKey, t as MATRIX_CREDENTIALS_NAMESPACE } from "./credentials-state-B3cuUFwZ.mjs";
|
|
4
|
+
import { i as resolveMatrixCredentialsDir, o as resolveMatrixCredentialsPath } from "./storage-paths-B51JM-pC.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
|
+
//#region extensions/matrix/src/matrix/credentials-read.ts
|
|
9
9
|
var credentials_read_exports = /* @__PURE__ */ __exportAll({
|
|
10
10
|
captureMatrixCredentialsEnv: () => captureMatrixCredentialsEnv,
|
|
11
11
|
clearMatrixCredentials: () => clearMatrixCredentials,
|
|
@@ -81,4 +81,5 @@ function credentialsMatchConfig(stored, config) {
|
|
|
81
81
|
}
|
|
82
82
|
return stored.homeserver === config.homeserver && stored.userId === config.userId;
|
|
83
83
|
}
|
|
84
|
+
//#endregion
|
|
84
85
|
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
|
+
//#region 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,4 +23,5 @@ 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
|
|
26
27
|
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
|
+
//#region 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,4 +8,5 @@ function loadMatrixCryptoNodeBindings() {
|
|
|
8
8
|
EncryptedAttachment
|
|
9
9
|
};
|
|
10
10
|
}
|
|
11
|
+
//#endregion
|
|
11
12
|
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-D-W_QQjz.mjs";
|
|
2
|
+
import { r as noop, t as LogService } from "./logger-CuAzdD8Q.mjs";
|
|
3
|
+
import { a as isRepairableSecretStorageAccessError, i as trustMatrixOwnIdentity, n as isMatrixDeviceOwnerVerified, r as isMatrixDeviceVerifiedInCurrentClient } from "./sdk-DPXiQ3jr.mjs";
|
|
4
|
+
import { persistIdbToDisk, resolveDefaultIdbSnapshotPath, restoreIdbFromDisk } from "./idb-persistence-BTOsltD9.mjs";
|
|
5
5
|
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
6
6
|
import { formatErrorMessage, materializeErrorStack, toStringifiedError } from "openclaw/plugin-sdk/error-runtime";
|
|
7
7
|
import { raceWithTimeout } from "openclaw/plugin-sdk/time-runtime";
|
|
@@ -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
|
+
//#region extensions/matrix/src/matrix/sdk/crypto-bootstrap.ts
|
|
20
20
|
const CROSS_SIGNING_PUBLICATION_WAIT_MS = 5e3;
|
|
21
21
|
var MatrixCryptoBootstrapper = class {
|
|
22
22
|
constructor(deps) {
|
|
@@ -224,8 +224,9 @@ var MatrixCryptoBootstrapper = class {
|
|
|
224
224
|
return verified;
|
|
225
225
|
}
|
|
226
226
|
};
|
|
227
|
-
|
|
228
|
-
|
|
227
|
+
//#endregion
|
|
228
|
+
//#region extensions/matrix/src/matrix/sdk/crypto-facade.ts
|
|
229
|
+
const loadMatrixCryptoNodeRuntime = createLazyRuntimeModule(() => import("./crypto-node.runtime-6Aj_ltHQ.mjs"));
|
|
229
230
|
async function loadMatrixCryptoNodeBindings() {
|
|
230
231
|
await ensureMatrixCryptoRuntime();
|
|
231
232
|
return (await loadMatrixCryptoNodeRuntime()).loadMatrixCryptoNodeBindings();
|
|
@@ -294,7 +295,8 @@ function createMatrixCryptoFacade(deps) {
|
|
|
294
295
|
getVerificationSas: withTrackedVerifications(manager.getVerificationSas.bind(manager))
|
|
295
296
|
};
|
|
296
297
|
}
|
|
297
|
-
|
|
298
|
+
//#endregion
|
|
299
|
+
//#region extensions/matrix/src/matrix/sdk/decrypt-bridge.ts
|
|
298
300
|
const MATRIX_DECRYPT_RETRY_BASE_DELAY_MS = 1500;
|
|
299
301
|
const MATRIX_DECRYPT_RETRY_MAX_DELAY_MS = 3e4;
|
|
300
302
|
const MATRIX_DECRYPT_RETRY_MAX_ATTEMPTS = 8;
|
|
@@ -532,7 +534,8 @@ var MatrixDecryptBridge = class {
|
|
|
532
534
|
this.decryptedMessageDedupe.set(`${roomId}|${eventId}`, now);
|
|
533
535
|
}
|
|
534
536
|
};
|
|
535
|
-
|
|
537
|
+
//#endregion
|
|
538
|
+
//#region extensions/matrix/src/matrix/sdk/verification-manager.ts
|
|
536
539
|
const MAX_TRACKED_VERIFICATION_SESSIONS = 256;
|
|
537
540
|
const TERMINAL_SESSION_RETENTION_MS = 864e5;
|
|
538
541
|
const SAS_AUTO_CONFIRM_DELAY_MS = 3e4;
|
|
@@ -857,7 +860,8 @@ var MatrixVerificationManager = class {
|
|
|
857
860
|
return callbacks;
|
|
858
861
|
}
|
|
859
862
|
};
|
|
860
|
-
|
|
863
|
+
//#endregion
|
|
864
|
+
//#region extensions/matrix/src/matrix/sdk/indexeddb-session.ts
|
|
861
865
|
const registry = resolveGlobalSingleton(Symbol.for("openclaw.matrix.sdkIndexedDbSessions"), () => ({ sessions: /* @__PURE__ */ new Map() }));
|
|
862
866
|
const sessions = registry.sessions;
|
|
863
867
|
function retiredError() {
|
|
@@ -962,4 +966,5 @@ function beginMatrixSdkIndexedDbSession(databasePrefix = "matrix-js-sdk") {
|
|
|
962
966
|
return retirement;
|
|
963
967
|
} };
|
|
964
968
|
}
|
|
969
|
+
//#endregion
|
|
965
970
|
export { MatrixCryptoBootstrapper, MatrixDecryptBridge, MatrixVerificationManager, beginMatrixSdkIndexedDbSession, createMatrixCryptoFacade, isMatrixDeviceOwnerVerified, isMatrixDeviceVerifiedInCurrentClient, persistIdbToDisk, resolveDefaultIdbSnapshotPath, restoreIdbFromDisk };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { t as getMatrixRuntime } from "./runtime-
|
|
2
|
-
import { c as updateMatrixKeyedState, d as readMatrixStateChunks, f as writeMatrixStateChunks, l as chunkMatrixStateJson, o as resolveMatrixSqliteStateEnv, u as pruneMatrixStateChunks } from "./retired-state-
|
|
1
|
+
import { t as getMatrixRuntime } from "./runtime-1kn1P6io.mjs";
|
|
2
|
+
import { c as updateMatrixKeyedState, d as readMatrixStateChunks, f as writeMatrixStateChunks, l as chunkMatrixStateJson, o as resolveMatrixSqliteStateEnv, u as pruneMatrixStateChunks } 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";
|
|
6
6
|
import { asSafeIntegerInRange } from "openclaw/plugin-sdk/number-runtime";
|
|
7
7
|
import fs from "node:fs";
|
|
8
8
|
import { sha256Hex } from "openclaw/plugin-sdk/node-crypto-runtime";
|
|
9
|
-
|
|
9
|
+
//#region extensions/matrix/src/matrix/crypto-state-store.ts
|
|
10
10
|
const STATE_KEY = "current";
|
|
11
11
|
const RECOVERY_KEY_NAMESPACE = "recovery-key";
|
|
12
12
|
const LEGACY_CRYPTO_MIGRATION_NAMESPACE = "legacy-crypto-migration";
|
|
@@ -186,4 +186,5 @@ function isIdbSnapshotMeta(value) {
|
|
|
186
186
|
max: IDB_SNAPSHOT_MAX_CHUNKS
|
|
187
187
|
}) !== 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));
|
|
188
188
|
}
|
|
189
|
+
//#endregion
|
|
189
190
|
export { readMatrixIdbSnapshotOwnerGeneration as a, sealMatrixIdbSnapshotOwnerGeneration as c, readMatrixIdbSnapshotJson as i, writeMatrixIdbSnapshotJson as l, MATRIX_RECOVERY_KEY_FILENAME as n, readMatrixRecoveryKeyStateForPathAsync as o, pruneMatrixIdbSnapshotChunks as r, scoreMatrixCryptoStateInStore as s, MATRIX_IDB_SNAPSHOT_FILENAME as t, writeMatrixRecoveryKeyStateForPathAsync as u };
|
package/dist/.setup/{crypto-store-ownership-7lVHeXWL.mjs → crypto-store-ownership-CiQ1l_O7.mjs}
RENAMED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { t as getMatrixRuntime } from "./runtime-
|
|
2
|
-
import { a as readMatrixIdbSnapshotOwnerGeneration, c as sealMatrixIdbSnapshotOwnerGeneration } from "./crypto-state-store-
|
|
1
|
+
import { t as getMatrixRuntime } from "./runtime-1kn1P6io.mjs";
|
|
2
|
+
import { a as readMatrixIdbSnapshotOwnerGeneration, c as sealMatrixIdbSnapshotOwnerGeneration } from "./crypto-state-store-BZLlwkv_.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
|
+
//#region 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,4 +170,5 @@ async function acquireMatrixCryptoStoreOwnership(snapshotPath, options = {}) {
|
|
|
170
170
|
release: () => lock.release()
|
|
171
171
|
};
|
|
172
172
|
}
|
|
173
|
+
//#endregion
|
|
173
174
|
export { withMatrixCryptoStoreRecoveryLock as i, isMatrixCryptoStoreUnsafe as n, sealMatrixCryptoStoreRecovery as r, acquireMatrixCryptoStoreOwnership as t };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { n as __exportAll } from "./runtime-doctor-migrations-
|
|
2
|
-
import { t as getMatrixRuntime } from "./runtime-
|
|
3
|
-
import { i 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 { n as __exportAll } from "./runtime-doctor-migrations-hxP-CXX7.mjs";
|
|
2
|
+
import { t as getMatrixRuntime } from "./runtime-1kn1P6io.mjs";
|
|
3
|
+
import { i as readMatrixIdbSnapshotJson, t as MATRIX_IDB_SNAPSHOT_FILENAME } from "./crypto-state-store-BZLlwkv_.mjs";
|
|
4
|
+
import { t as walkMatrixStateFiles } from "./state-layout-walk-BQMgMykU.mjs";
|
|
5
|
+
import { i as withMatrixCryptoStoreRecoveryLock, n as isMatrixCryptoStoreUnsafe, r as sealMatrixCryptoStoreRecovery } from "./crypto-store-ownership-CiQ1l_O7.mjs";
|
|
6
6
|
import { extractErrorCode } from "openclaw/plugin-sdk/error-runtime";
|
|
7
7
|
import path from "node:path";
|
|
8
8
|
import fs from "node:fs/promises";
|
|
9
9
|
import { FILE_LOCK_TIMEOUT_ERROR_CODE } from "openclaw/plugin-sdk/file-lock";
|
|
10
|
-
|
|
10
|
+
//#region extensions/matrix/src/matrix/crypto-unsafe-state-doctor.ts
|
|
11
11
|
var crypto_unsafe_state_doctor_exports = /* @__PURE__ */ __exportAll({
|
|
12
12
|
listMatrixCryptoUnsafeState: () => listMatrixCryptoUnsafeState,
|
|
13
13
|
recoverMatrixCryptoUnsafeState: () => recoverMatrixCryptoUnsafeState
|
|
@@ -42,7 +42,7 @@ async function recoverMatrixCryptoUnsafeState(params) {
|
|
|
42
42
|
}
|
|
43
43
|
const snapshot = await readMatrixIdbSnapshotJson(params.storageRootDir, getMatrixRuntime().state);
|
|
44
44
|
if (!snapshot) throw new Error("Matrix crypto SQLite snapshot is absent or invalid; refusal remains in place.");
|
|
45
|
-
const { validateMatrixIdbSnapshotJson } = await import("./idb-persistence-
|
|
45
|
+
const { validateMatrixIdbSnapshotJson } = await import("./idb-persistence-BTOsltD9.mjs");
|
|
46
46
|
try {
|
|
47
47
|
await validateMatrixIdbSnapshotJson(snapshot);
|
|
48
48
|
} catch (error) {
|
|
@@ -51,4 +51,5 @@ async function recoverMatrixCryptoUnsafeState(params) {
|
|
|
51
51
|
await sealMatrixCryptoStoreRecovery(snapshotPath, getMatrixRuntime().state);
|
|
52
52
|
});
|
|
53
53
|
}
|
|
54
|
+
//#endregion
|
|
54
55
|
export { listMatrixCryptoUnsafeState as n, recoverMatrixCryptoUnsafeState as r, crypto_unsafe_state_doctor_exports as t };
|
|
@@ -4,7 +4,7 @@ import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import fs from "node:fs";
|
|
6
6
|
import { resolveRuntimeDependencyEntrypointUrl, runCommandWithTimeout } from "openclaw/plugin-sdk/process-runtime";
|
|
7
|
-
|
|
7
|
+
//#region extensions/matrix/src/matrix/deps.ts
|
|
8
8
|
const REQUIRED_MATRIX_PACKAGES = [
|
|
9
9
|
"matrix-js-sdk",
|
|
10
10
|
"@matrix-org/matrix-sdk-crypto-nodejs",
|
|
@@ -117,4 +117,5 @@ async function ensureMatrixSdkInstalled(params) {
|
|
|
117
117
|
if (missing.length === 0) return;
|
|
118
118
|
throw new Error(`Matrix plugin dependencies are missing: ${missing.join(", ")}. Repair this plugin with \`openclaw plugins update matrix\` or run \`openclaw doctor --fix\`.`);
|
|
119
119
|
}
|
|
120
|
+
//#endregion
|
|
120
121
|
export { ensureMatrixSdkInstalled as n, isMatrixSdkAvailable as r, ensureMatrixCryptoRuntime as t };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { n as __exportAll } from "./runtime-doctor-migrations-
|
|
2
|
-
|
|
1
|
+
import { n as __exportAll } from "./runtime-doctor-migrations-hxP-CXX7.mjs";
|
|
2
|
+
//#region extensions/matrix/src/matrix/device-health.ts
|
|
3
3
|
var device_health_exports = /* @__PURE__ */ __exportAll({ listStaleOpenClawMatrixDevices: () => listStaleOpenClawMatrixDevices });
|
|
4
4
|
function listStaleOpenClawMatrixDevices(devices) {
|
|
5
5
|
return devices.filter((device) => !device.current && device.displayName?.startsWith("OpenClaw ") === true);
|
|
6
6
|
}
|
|
7
|
+
//#endregion
|
|
7
8
|
export { listStaleOpenClawMatrixDevices as n, device_health_exports as t };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { n as __exportAll } from "./runtime-doctor-migrations-
|
|
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 { n as __exportAll } from "./runtime-doctor-migrations-hxP-CXX7.mjs";
|
|
2
|
+
import { n as isMatrixQualifiedUserId } from "./target-ids-HhcaKX1n.mjs";
|
|
3
|
+
import { a as MATRIX_REACTION_EVENT_TYPE, i as MATRIX_ANNOTATION_RELATION_TYPE } from "./send-currentness-DGxiiBn9.mjs";
|
|
4
4
|
import { asOptionalRecord, normalizeNullableString, normalizeOptionalString, normalizeTrimmedStringList, normalizeUniqueTrimmedStringList } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
5
5
|
import { enqueueKeyedTask } from "openclaw/plugin-sdk/keyed-async-queue";
|
|
6
|
-
|
|
6
|
+
//#region extensions/matrix/src/matrix/send/types.ts
|
|
7
7
|
const MsgType = {
|
|
8
8
|
Text: "m.text",
|
|
9
9
|
Image: "m.image",
|
|
@@ -32,7 +32,8 @@ 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
|
-
|
|
35
|
+
//#endregion
|
|
36
|
+
//#region extensions/matrix/src/matrix/relations.ts
|
|
36
37
|
function relatedReplyEventId(relation) {
|
|
37
38
|
const reply = asOptionalRecord(relation?.["m.in_reply_to"]);
|
|
38
39
|
return typeof reply?.event_id === "string" ? reply.event_id : void 0;
|
|
@@ -59,7 +60,8 @@ function resolveMatrixThreadRootId(content) {
|
|
|
59
60
|
if (relation?.rel_type !== RelationType.Thread) return;
|
|
60
61
|
return typeof relation.event_id === "string" ? relation.event_id : relatedReplyEventId(relation);
|
|
61
62
|
}
|
|
62
|
-
|
|
63
|
+
//#endregion
|
|
64
|
+
//#region extensions/matrix/src/matrix/direct-room.ts
|
|
63
65
|
var direct_room_exports = /* @__PURE__ */ __exportAll({
|
|
64
66
|
hasDirectMatrixMemberFlag: () => hasDirectMatrixMemberFlag,
|
|
65
67
|
inspectMatrixDirectRoomEvidence: () => inspectMatrixDirectRoomEvidence,
|
|
@@ -115,7 +117,8 @@ async function inspectMatrixDirectRoomEvidence(params) {
|
|
|
115
117
|
async function isStrictDirectRoom(params) {
|
|
116
118
|
return (await inspectMatrixDirectRoomEvidence(params)).strict;
|
|
117
119
|
}
|
|
118
|
-
|
|
120
|
+
//#endregion
|
|
121
|
+
//#region extensions/matrix/src/matrix/direct-management.ts
|
|
119
122
|
var direct_management_exports = /* @__PURE__ */ __exportAll({
|
|
120
123
|
inspectMatrixDirectRooms: () => inspectMatrixDirectRooms,
|
|
121
124
|
persistMatrixDirectRoomMapping: () => persistMatrixDirectRoomMapping,
|
|
@@ -257,4 +260,5 @@ async function repairMatrixDirectRooms(params) {
|
|
|
257
260
|
directContentAfter: mappingWrite.directContentAfter
|
|
258
261
|
};
|
|
259
262
|
}
|
|
263
|
+
//#endregion
|
|
260
264
|
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 { n as __exportAll } from "./runtime-doctor-migrations-
|
|
2
|
-
import { i as normalizeMatrixMessagingTarget, n as isMatrixQualifiedUserId } from "./target-ids-
|
|
3
|
-
import { c as resolveMatrixAuth } from "./client-
|
|
4
|
-
import { t as MatrixAuthedHttpClient } from "./http-client-
|
|
1
|
+
import { n as __exportAll } from "./runtime-doctor-migrations-hxP-CXX7.mjs";
|
|
2
|
+
import { i as normalizeMatrixMessagingTarget, n as isMatrixQualifiedUserId } from "./target-ids-HhcaKX1n.mjs";
|
|
3
|
+
import { c as resolveMatrixAuth } from "./client-D1bsidwU.mjs";
|
|
4
|
+
import { t as MatrixAuthedHttpClient } from "./http-client-B_ohXrBm.mjs";
|
|
5
5
|
import { isRecord, normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
6
|
-
|
|
6
|
+
//#region extensions/matrix/src/directory-live.ts
|
|
7
7
|
var directory_live_exports = /* @__PURE__ */ __exportAll({
|
|
8
8
|
listMatrixDirectoryGroupsLive: () => listMatrixDirectoryGroupsLive,
|
|
9
9
|
listMatrixDirectoryPeersLive: () => listMatrixDirectoryPeersLive
|
|
@@ -114,4 +114,5 @@ async function listMatrixDirectoryGroupsLive(params) {
|
|
|
114
114
|
}
|
|
115
115
|
return results;
|
|
116
116
|
}
|
|
117
|
+
//#endregion
|
|
117
118
|
export { listMatrixDirectoryGroupsLive as n, listMatrixDirectoryPeersLive as r, directory_live_exports as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as runtime_doctor_migrations_exports } from "./runtime-doctor-migrations-
|
|
1
|
+
import { t as runtime_doctor_migrations_exports } from "./runtime-doctor-migrations-hxP-CXX7.mjs";
|
|
2
2
|
import { isRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
3
|
-
|
|
3
|
+
//#region extensions/matrix/src/doctor-contract.ts
|
|
4
4
|
function parseMatrixStreamingMode(value) {
|
|
5
5
|
if (typeof value !== "string") return null;
|
|
6
6
|
const normalized = value.trim().toLowerCase();
|
|
@@ -34,4 +34,5 @@ function normalizeCompatibilityConfig({ cfg }) {
|
|
|
34
34
|
changes
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
|
+
//#endregion
|
|
37
38
|
export { normalizeCompatibilityConfig as n, legacyConfigRules as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { _ as MsgType } from "./direct-management-
|
|
2
|
-
import { a as sendSingleTextMessageMatrix, f as prepareMatrixSingleText, t as editMessageMatrix } from "./send-
|
|
1
|
+
import { _ as MsgType } from "./direct-management-Dp1giZ34.mjs";
|
|
2
|
+
import { a as sendSingleTextMessageMatrix, f as prepareMatrixSingleText, t as editMessageMatrix } from "./send-HHAbKARg.mjs";
|
|
3
3
|
import { createFinalizableDraftLifecycle } from "openclaw/plugin-sdk/channel-outbound";
|
|
4
|
-
|
|
4
|
+
//#region extensions/matrix/src/matrix/draft-stream.ts
|
|
5
5
|
const DEFAULT_THROTTLE_MS = 1e3;
|
|
6
6
|
function createMatrixDraftStream(params) {
|
|
7
7
|
const { roomId, client, cfg, threadId, accountId, log } = params;
|
|
@@ -143,4 +143,5 @@ function createMatrixDraftStream(params) {
|
|
|
143
143
|
mustDeliverFinalNormally: () => sendFailed || finalizeInPlaceBlocked
|
|
144
144
|
};
|
|
145
145
|
}
|
|
146
|
+
//#endregion
|
|
146
147
|
export { createMatrixDraftStream };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { s as resolveMatrixDefaultOrOnlyAccountId } from "./account-selection-
|
|
2
|
-
import { t as resolveMatrixConfigFieldPath } from "./config-paths-
|
|
1
|
+
import { s as resolveMatrixDefaultOrOnlyAccountId } from "./account-selection-UUPhMBmu.mjs";
|
|
2
|
+
import { t as resolveMatrixConfigFieldPath } from "./config-paths-CnREYb1Y.mjs";
|
|
3
3
|
import { normalizeOptionalAccountId } from "openclaw/plugin-sdk/account-id";
|
|
4
|
-
|
|
4
|
+
//#region extensions/matrix/src/matrix/encryption-guidance.ts
|
|
5
5
|
function resolveMatrixEncryptionConfigPath(cfg, accountId) {
|
|
6
6
|
const effectiveAccountId = normalizeOptionalAccountId(accountId) ?? resolveMatrixDefaultOrOnlyAccountId(cfg);
|
|
7
7
|
return resolveMatrixConfigFieldPath(cfg, effectiveAccountId, "encryption");
|
|
@@ -12,4 +12,5 @@ function formatMatrixEncryptionUnavailableError(cfg, accountId) {
|
|
|
12
12
|
function formatMatrixEncryptedEventDisabledWarning(cfg, accountId) {
|
|
13
13
|
return `matrix: encrypted event received without encryption enabled; set ${resolveMatrixEncryptionConfigPath(cfg, accountId)}=true and verify the device to decrypt`;
|
|
14
14
|
}
|
|
15
|
+
//#endregion
|
|
15
16
|
export { formatMatrixEncryptionUnavailableError as n, formatMatrixEncryptedEventDisabledWarning as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { normalizeAccountId, normalizeOptionalAccountId } from "openclaw/plugin-sdk/account-id";
|
|
2
|
-
|
|
2
|
+
//#region extensions/matrix/src/env-vars.ts
|
|
3
3
|
const MATRIX_SCOPED_ENV_SUFFIXES = [
|
|
4
4
|
"HOMESERVER",
|
|
5
5
|
"USER_ID",
|
|
@@ -46,4 +46,5 @@ function listMatrixEnvAccountIds(env = process.env) {
|
|
|
46
46
|
}
|
|
47
47
|
return Array.from(ids).toSorted((a, b) => a.localeCompare(b));
|
|
48
48
|
}
|
|
49
|
+
//#endregion
|
|
49
50
|
export { listMatrixEnvAccountIds as n, resolveMatrixEnvAccountToken as r, getMatrixScopedEnvVarNames as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
2
2
|
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
3
|
-
|
|
3
|
+
//#region extensions/matrix/src/matrix/errors.ts
|
|
4
4
|
function formatMatrixErrorReason(err) {
|
|
5
5
|
return normalizeLowercaseStringOrEmpty(formatErrorMessage(err));
|
|
6
6
|
}
|
|
@@ -10,4 +10,5 @@ function isMatrixNotFoundError(err) {
|
|
|
10
10
|
const message = formatMatrixErrorReason(err);
|
|
11
11
|
return message.includes("m_not_found") || message.includes("[404]") || message.includes("not found");
|
|
12
12
|
}
|
|
13
|
+
//#endregion
|
|
13
14
|
export { isMatrixNotFoundError as n, formatMatrixErrorReason as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
2
2
|
import { safeParseJson, truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
3
|
-
|
|
3
|
+
//#region extensions/matrix/src/matrix/sdk/event-helpers.ts
|
|
4
4
|
const matrixEventProjections = /* @__PURE__ */ new WeakMap();
|
|
5
5
|
function getMatrixEventProjection(event) {
|
|
6
6
|
return matrixEventProjections.get(event);
|
|
@@ -48,4 +48,5 @@ function buildHttpError(statusCode, bodyText) {
|
|
|
48
48
|
}
|
|
49
49
|
return Object.assign(new Error(message), { statusCode });
|
|
50
50
|
}
|
|
51
|
+
//#endregion
|
|
51
52
|
export { parseMxc as i, getMatrixEventProjection as n, matrixEventToRaw as r, buildHttpError as t };
|