@openclaw/matrix 2026.11.1 → 2026.11.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.setup/{account-config-CVM2a28p.mjs → account-config-CRsKoMqJ.mjs} +2 -1
- package/dist/.setup/{account-selection-BPFpdMIw.mjs → account-selection-CWsL5zIU.mjs} +8 -5
- package/dist/.setup/{approval-handler.runtime-BvuXpzus.mjs → approval-handler.runtime-Co2elSYS.mjs} +9 -8
- package/dist/.setup/{approval-reactions-DMDBJos0.mjs → approval-reactions-D2pEUrFS.mjs} +3 -2
- package/dist/.setup/{backup-health-BxH69np2.mjs → backup-health-Dm_YMVFT.mjs} +2 -1
- package/dist/.setup/{channel-DYRabwmj.mjs → channel-BBvOdxTc.mjs} +44 -30
- package/dist/.setup/{channel.runtime-C0VWk0Ch.mjs → channel.runtime-DyX4mM8d.mjs} +10 -8
- package/dist/.setup/{channel.setup-Dp7V9AgV.mjs → channel.setup-p6oll48W.mjs} +15 -7
- package/dist/.setup/{cli-umlumhB6.mjs → cli-C2XKMk1U.mjs} +39 -28
- package/dist/.setup/{cli-metadata-DemZndyG.mjs → cli-metadata-C60BW1oa.mjs} +5 -3
- package/dist/.setup/{client-BIsYqIzM.mjs → client-BEl7PU1_.mjs} +25 -19
- package/dist/.setup/{client-DL_aELCJ.mjs → client-Cxv-iMwp.mjs} +5 -4
- package/dist/.setup/{client-bootstrap-kdsygurH.mjs → client-bootstrap-D1vLveT2.mjs} +3 -2
- package/dist/.setup/{client-support-CFofPPPm.mjs → client-support-D-xHScuo.mjs} +5 -3
- package/dist/.setup/{config-paths-DBpHxDyc.mjs → config-paths-CnREYb1Y.mjs} +2 -1
- package/dist/.setup/{create-client-BFkMM7SP.mjs → create-client-CrY1E3hg.mjs} +9 -8
- package/dist/.setup/{credentials-read-BOuCoy-p.mjs → credentials-read-Dj7Hj87M.mjs} +6 -5
- package/dist/.setup/{credentials-state-jxq29yQw.mjs → credentials-state-B3cuUFwZ.mjs} +2 -1
- package/dist/.setup/{credentials-B3MlOOom.mjs → credentials-udso1z0C.mjs} +6 -5
- package/dist/.setup/{crypto-node.runtime-E_hqXGxm.mjs → crypto-node.runtime-6Aj_ltHQ.mjs} +2 -1
- package/dist/.setup/{crypto-runtime-s3ogwLRO.mjs → crypto-runtime-DqX7VD1W.mjs} +19 -12
- package/dist/.setup/{crypto-state-store-CM57gchf.mjs → crypto-state-store-DclM-fO5.mjs} +5 -3
- package/dist/.setup/{crypto-store-ownership-Bratn-Np.mjs → crypto-store-ownership-Dr-T40Rp.mjs} +4 -3
- package/dist/.setup/{crypto-unsafe-state-doctor-ClzRgr8z.mjs → crypto-unsafe-state-doctor-BG9qMu0B.mjs} +8 -7
- package/dist/.setup/{deps-O7rEnklr.mjs → deps-L_1bUAGL.mjs} +2 -1
- package/dist/.setup/{device-health-CmvwmCHB.mjs → device-health-D6_ECUVe.mjs} +3 -2
- package/dist/.setup/{direct-management-BOYMqZJQ.mjs → direct-management-ZcjZgYEl.mjs} +11 -7
- package/dist/.setup/{directory-live-tItssg9q.mjs → directory-live-_yaRaktv.mjs} +6 -5
- package/dist/.setup/{doctor-contract-GiXgCj7k.mjs → doctor-contract-BANpMUbP.mjs} +3 -2
- package/dist/.setup/{draft-stream-Buru5huX.mjs → draft-stream-vO_qjwJb.mjs} +4 -3
- package/dist/.setup/{encryption-guidance-CLloQ6H7.mjs → encryption-guidance-BLUoN4aV.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-CWeSpE6V.mjs → exec-approvals-BFT-ee9F.mjs} +9 -6
- package/dist/.setup/{file-sync-store-D1sEtAap.mjs → file-sync-store-BxUPmUoJ.mjs} +6 -5
- package/dist/.setup/{http-client-CxTmU1kT.mjs → http-client-ByR4STVQ.mjs} +7 -4
- package/dist/.setup/{idb-persistence-BF0MZglD.mjs → idb-persistence-C2TsCHY2.mjs} +7 -6
- package/dist/.setup/{idb-persistence-lock-CH2K6d_3.mjs → idb-persistence-lock-Bh3ZLIsE.mjs} +2 -1
- package/dist/.setup/{inbound-dedupe-CZnOq0ja.mjs → inbound-dedupe-sW_gaR44.mjs} +3 -2
- package/dist/.setup/{joined-room-encryption-Dl7Sb9FF.mjs → joined-room-encryption-DBbLkdvv.mjs} +3 -2
- package/dist/.setup/{logger-BX5kXvh1.mjs → logger-CuAzdD8Q.mjs} +5 -4
- package/dist/.setup/{logging-BWPjyW9s.mjs → logging-CoaEyRtA.mjs} +22 -15
- package/dist/.setup/{messages-Dt51OgyD.mjs → messages-TuEa_BPZ.mjs} +14 -9
- package/dist/.setup/{monitor-BrBbFO8h.mjs → monitor-B86Ll4B8.mjs} +166 -77
- package/dist/.setup/{onboarding-QfFvgZ85.mjs → onboarding-DOLEjkg2.mjs} +11 -10
- package/dist/.setup/{outbound-B8h2BwR2.mjs → outbound-BWsyqwt1.mjs} +4 -3
- package/dist/.setup/{profile-update-DiXtw0NM.mjs → profile-update-DiXSVBki.mjs} +8 -6
- package/dist/.setup/{reaction-events-xTg2_wZJ.mjs → reaction-events-CuUeYcBC.mjs} +9 -8
- package/dist/.setup/{resolve-targets-vlr765on.mjs → resolve-targets-Dd70hGcM.mjs} +5 -4
- package/dist/.setup/{retired-state-vIr2IB90.mjs → retired-state-C4UnLIg4.mjs} +5 -38
- package/dist/.setup/{room-info-BSvDbUmt.mjs → room-info-C13IUffQ.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-DtxDAM-x.mjs +3 -0
- package/dist/.setup/{sdk-BYR5_wri.mjs → sdk-DNW03GqJ.mjs} +47 -32
- package/dist/.setup/{secret-contract-AKnr45nw.mjs → secret-contract-DxyzKSzf.mjs} +3 -2
- package/dist/.setup/secret-contract-api-CiuSYjUy.mjs +3 -0
- package/dist/.setup/{send-BMe_VcxP.mjs → send-BGgwE5pV.mjs} +40 -24
- package/dist/.setup/{send-currentness-CAUVR-f3.mjs → send-currentness-C2rMVVIQ.mjs} +4 -2
- package/dist/.setup/{setup-bootstrap-Ch6r7Szn.mjs → setup-bootstrap-BCbltIf_.mjs} +5 -4
- package/dist/.setup/{setup-core-CRUekZa3.mjs → setup-core-Di6NtQ_J.mjs} +20 -13
- package/dist/.setup/setup-plugin-api-ORC_4yEA.mjs +3 -0
- package/dist/.setup/sqlite-state-LByPx4Yp.mjs +37 -0
- package/dist/.setup/{startup-verification-Cv_NoW_O.mjs → startup-verification-8xvGpdtK.mjs} +6 -4
- package/dist/.setup/{state-layout-walk-BqCZTHpp.mjs → state-layout-walk-BQMgMykU.mjs} +3 -2
- package/dist/.setup/{storage-B94yQdJy.mjs → storage-CN4dxdtV.mjs} +11 -8
- package/dist/.setup/{storage-paths-e_Vq6cvw.mjs → storage-paths-B51JM-pC.mjs} +2 -1
- package/dist/.setup/{subagent-hooks-CT-rdJmh.mjs → subagent-hooks-CSY4iwa_.mjs} +3 -2
- package/dist/.setup/{sync-cache-state-B-FayxeA.mjs → sync-cache-state-L1kwjhjj.mjs} +6 -4
- package/dist/.setup/{target-ids-DltG_ZHJ.mjs → target-ids-HhcaKX1n.mjs} +2 -1
- package/dist/.setup/{thread-binding-api-OtSciHmZ.mjs → thread-binding-api-BvuaKpd0.mjs} +3 -2
- package/dist/.setup/{thread-bindings-CB-jqrf4.mjs → thread-bindings-pNgPVdof.mjs} +10 -7
- package/dist/.setup/{thread-bindings-shared-FMu_szTm.mjs → thread-bindings-shared-CPjUA0Ib.mjs} +2 -1
- package/dist/.setup/{tool-actions-DjPJ6tpr.mjs → tool-actions-CFC7ZpIt.mjs} +23 -18
- package/dist/.setup/{url-validation-C77p4qT9.mjs → url-validation-CF6pG6eE.mjs} +2 -1
- package/dist/.setup/{verification-BqjyjLoq.mjs → verification-CuT5ZBDO.mjs} +5 -4
- package/dist/api.js +8 -8
- package/dist/auth-presence.js +3 -2
- package/dist/channel-plugin-api.js +2 -1
- package/dist/cli-metadata.js +2 -1
- package/dist/contract-api.js +2 -2
- package/dist/doctor-contract-api.js +18 -14
- 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 +2 -1
- package/dist/secret-contract-api.js +2 -1
- package/dist/session-binding-contract-api.js +2 -2
- package/dist/setup-entry.js +5 -4
- package/dist/setup-plugin-api.js +2 -1
- package/dist/subagent-hooks-api.js +3 -2
- package/dist/thread-binding-api.js +2 -1
- package/dist/thread-bindings-runtime.js +2 -1
- package/package.json +4 -4
- package/dist/.setup/runtime-setter-api-CpwhcBQK.mjs +0 -2
- package/dist/.setup/secret-contract-api-DMSwMIxd.mjs +0 -2
- package/dist/.setup/setup-plugin-api-BZPY4Dt2.mjs +0 -2
- package/dist/.source-module-urls/1cd4d4ff8d44e1c8b830932b44d7cf8a7f3350e09e169910e1d7a85e131b7bea.json +0 -1
|
@@ -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 };
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { a as resolveMatrixAccountConfig } from "./account-config-
|
|
2
|
-
import { g as resolveDefaultMatrixAccountId, v as resolveMatrixAccountAsync } from "./setup-core-
|
|
3
|
-
import { i as normalizeMatrixUserId } from "./channel.setup-
|
|
1
|
+
import { a as resolveMatrixAccountConfig } from "./account-config-CRsKoMqJ.mjs";
|
|
2
|
+
import { g as resolveDefaultMatrixAccountId, v as resolveMatrixAccountAsync } from "./setup-core-Di6NtQ_J.mjs";
|
|
3
|
+
import { i as normalizeMatrixUserId } from "./channel.setup-p6oll48W.mjs";
|
|
4
4
|
import { doesApprovalRequestSelectChannelAccountAsync } from "openclaw/plugin-sdk/approval-native-runtime";
|
|
5
5
|
import { createChannelApprovalAuth, resolveApprovalApprovers } from "openclaw/plugin-sdk/approval-auth-runtime";
|
|
6
6
|
import { createChannelExecApprovalProfileAsync, getExecApprovalReplyMetadata, isChannelExecApprovalClientEnabledFromConfig, isChannelExecApprovalTargetRecipient, matchesApprovalRequestFilters } from "openclaw/plugin-sdk/approval-client-runtime";
|
|
7
|
-
|
|
7
|
+
//#region extensions/matrix/src/approval-ids.ts
|
|
8
8
|
function normalizeMatrixApproverId(value) {
|
|
9
9
|
return normalizeMatrixUserId(String(value)) || void 0;
|
|
10
10
|
}
|
|
11
|
-
|
|
11
|
+
//#endregion
|
|
12
|
+
//#region extensions/matrix/src/approval-auth.ts
|
|
12
13
|
const matrixApproval = createChannelApprovalAuth({
|
|
13
14
|
channelLabel: "Matrix",
|
|
14
15
|
resolveInputs: ({ cfg, accountId }) => {
|
|
@@ -21,7 +22,8 @@ const matrixApproval = createChannelApprovalAuth({
|
|
|
21
22
|
});
|
|
22
23
|
const getMatrixApprovalAuthApprovers = matrixApproval.resolveApprovers;
|
|
23
24
|
const matrixApprovalAuth = matrixApproval.approvalAuth;
|
|
24
|
-
|
|
25
|
+
//#endregion
|
|
26
|
+
//#region extensions/matrix/src/exec-approvals.ts
|
|
25
27
|
function normalizeMatrixExecApproverId(value) {
|
|
26
28
|
const normalized = normalizeMatrixApproverId(value);
|
|
27
29
|
return normalized === "*" ? void 0 : normalized;
|
|
@@ -151,4 +153,5 @@ async function shouldSuppressLocalMatrixExecApprovalPrompt(params) {
|
|
|
151
153
|
request
|
|
152
154
|
});
|
|
153
155
|
}
|
|
156
|
+
//#endregion
|
|
154
157
|
export { isMatrixExecApprovalAuthorizedSender as a, shouldSuppressLocalMatrixExecApprovalPrompt as c, normalizeMatrixApproverId as d, isMatrixApprovalClientEnabled as i, getMatrixApprovalAuthApprovers as l, getMatrixExecApprovalApprovers as n, resolveMatrixExecApprovalTarget as o, isMatrixAnyApprovalClientEnabled as r, shouldHandleMatrixApprovalRequest as s, getMatrixApprovalApprovers as t, matrixApprovalAuth as u };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { t as getMatrixRuntime } from "./runtime-
|
|
2
|
-
import { t as claimCurrentTokenStorageState } from "./storage-
|
|
3
|
-
import { a as readPersistedStoreFromStore, r as openMatrixSyncCacheStoreOptions, s as writeMatrixSyncCacheStateToStore, t as deleteMatrixSyncCacheStateFromStore } from "./sync-cache-state-
|
|
4
|
-
import { t as LogService } from "./logger-
|
|
1
|
+
import { t as getMatrixRuntime } from "./runtime-1kn1P6io.mjs";
|
|
2
|
+
import { t as claimCurrentTokenStorageState } from "./storage-CN4dxdtV.mjs";
|
|
3
|
+
import { a as readPersistedStoreFromStore, r as openMatrixSyncCacheStoreOptions, s as writeMatrixSyncCacheStateToStore, t as deleteMatrixSyncCacheStateFromStore } from "./sync-cache-state-L1kwjhjj.mjs";
|
|
4
|
+
import { t as LogService } from "./logger-CuAzdD8Q.mjs";
|
|
5
5
|
import { MemoryStore, SyncAccumulator } from "matrix-js-sdk/lib/matrix.js";
|
|
6
6
|
import { createAsyncLock } from "openclaw/plugin-sdk/async-lock-runtime";
|
|
7
|
-
|
|
7
|
+
//#region extensions/matrix/src/matrix/client/file-sync-store.ts
|
|
8
8
|
const PERSIST_DEBOUNCE_MS = 250;
|
|
9
9
|
function syncDataToSyncResponse(syncData) {
|
|
10
10
|
return {
|
|
@@ -180,4 +180,5 @@ var SqliteBackedMatrixSyncStore = class SqliteBackedMatrixSyncStore extends Memo
|
|
|
180
180
|
throw new Error("Matrix sync cache SQLite store is unavailable; cannot persist sync state", { cause: this.storeUnavailableError });
|
|
181
181
|
}
|
|
182
182
|
};
|
|
183
|
+
//#endregion
|
|
183
184
|
export { SqliteBackedMatrixSyncStore };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as buildHttpError } from "./event-helpers-
|
|
1
|
+
import { t as buildHttpError } from "./event-helpers-CxNgMQqH.mjs";
|
|
2
2
|
import { PlatformMessageNotDispatchedError } from "openclaw/plugin-sdk/error-runtime";
|
|
3
3
|
import { parseMediaContentLength } from "openclaw/plugin-sdk/media-runtime";
|
|
4
4
|
import { buildTimeoutAbortSignal } from "openclaw/plugin-sdk/extension-shared";
|
|
@@ -6,7 +6,7 @@ import { captureChannelReadAuthority, captureEffectAuthority } from "openclaw/pl
|
|
|
6
6
|
import { readResponseWithLimit } from "openclaw/plugin-sdk/response-limit-runtime";
|
|
7
7
|
import { fetchWithRuntimeDispatcherOrMockedGlobal } from "openclaw/plugin-sdk/runtime-fetch";
|
|
8
8
|
import { closeDispatcher, createPinnedDispatcher, resolvePinnedHostnameWithPolicy } from "openclaw/plugin-sdk/ssrf-dispatcher";
|
|
9
|
-
|
|
9
|
+
//#region extensions/matrix/src/matrix/media-errors.ts
|
|
10
10
|
const MATRIX_MEDIA_SIZE_LIMIT_ERROR_MESSAGE = "Matrix media exceeds configured size limit";
|
|
11
11
|
var MatrixMediaSizeLimitError = class extends Error {
|
|
12
12
|
constructor(message = MATRIX_MEDIA_SIZE_LIMIT_ERROR_MESSAGE, options) {
|
|
@@ -20,7 +20,8 @@ function isMatrixMediaSizeLimitError(err) {
|
|
|
20
20
|
if (!(err instanceof Error) || err.cause === void 0) return false;
|
|
21
21
|
return isMatrixMediaSizeLimitError(err.cause);
|
|
22
22
|
}
|
|
23
|
-
|
|
23
|
+
//#endregion
|
|
24
|
+
//#region extensions/matrix/src/matrix/sdk/transport.ts
|
|
24
25
|
var MatrixSdkAuthorityError = class extends Error {
|
|
25
26
|
constructor(cause) {
|
|
26
27
|
super(cause instanceof Error ? cause.message : "Matrix request authority expired", { cause });
|
|
@@ -295,7 +296,8 @@ async function performMatrixRequest(params) {
|
|
|
295
296
|
buffer
|
|
296
297
|
}));
|
|
297
298
|
}
|
|
298
|
-
|
|
299
|
+
//#endregion
|
|
300
|
+
//#region extensions/matrix/src/matrix/sdk/http-client.ts
|
|
299
301
|
var MatrixAuthedHttpClient = class {
|
|
300
302
|
constructor(params) {
|
|
301
303
|
this.params = { ...params };
|
|
@@ -331,4 +333,5 @@ var MatrixAuthedHttpClient = class {
|
|
|
331
333
|
return buffer;
|
|
332
334
|
}
|
|
333
335
|
};
|
|
336
|
+
//#endregion
|
|
334
337
|
export { isMatrixMediaSizeLimitError as i, createMatrixGuardedFetch as n, MatrixMediaSizeLimitError as r, MatrixAuthedHttpClient as t };
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { t as getMatrixRuntime } from "./runtime-
|
|
2
|
-
import { n as RETIRED_MATRIX_STATE_REMEDIATION } from "./retired-state-
|
|
3
|
-
import { c as writeMatrixIdbSnapshotJson, r as readMatrixIdbSnapshotJson } from "./crypto-state-store-
|
|
4
|
-
import { t as LogService } from "./logger-
|
|
5
|
-
import { n as MATRIX_IDB_SNAPSHOT_LOCK_OPTIONS } from "./idb-persistence-lock-
|
|
1
|
+
import { t as getMatrixRuntime } from "./runtime-1kn1P6io.mjs";
|
|
2
|
+
import { n as RETIRED_MATRIX_STATE_REMEDIATION } from "./retired-state-C4UnLIg4.mjs";
|
|
3
|
+
import { c as writeMatrixIdbSnapshotJson, r as readMatrixIdbSnapshotJson } from "./crypto-state-store-DclM-fO5.mjs";
|
|
4
|
+
import { t as LogService } from "./logger-CuAzdD8Q.mjs";
|
|
5
|
+
import { n as MATRIX_IDB_SNAPSHOT_LOCK_OPTIONS } from "./idb-persistence-lock-Bh3ZLIsE.mjs";
|
|
6
6
|
import { toErrorObject } from "openclaw/plugin-sdk/error-runtime";
|
|
7
7
|
import { asOptionalObjectRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
8
8
|
import path from "node:path";
|
|
9
9
|
import fs from "node:fs";
|
|
10
10
|
import { withFileLock } from "openclaw/plugin-sdk/file-lock";
|
|
11
11
|
import { IDBFactory, indexedDB } from "fake-indexeddb";
|
|
12
|
-
|
|
12
|
+
//#region extensions/matrix/src/matrix/sdk/idb-persistence.ts
|
|
13
13
|
const LEGACY_SNAPSHOT_DIAGNOSTIC = {
|
|
14
14
|
code: "matrix-idb-snapshot-requires-doctor",
|
|
15
15
|
message: "Matrix IndexedDB snapshot exists outside the current SQLite state",
|
|
@@ -229,4 +229,5 @@ function throwLegacySnapshotMigrationRequired() {
|
|
|
229
229
|
LogService.warn("IdbPersistence", LEGACY_SNAPSHOT_DIAGNOSTIC);
|
|
230
230
|
throw new MatrixIdbSnapshotMigrationRequiredError();
|
|
231
231
|
}
|
|
232
|
+
//#endregion
|
|
232
233
|
export { persistIdbToDisk, resolveDefaultIdbSnapshotPath, restoreIdbFromDisk, validateMatrixIdbSnapshotJson };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
//#region extensions/matrix/src/matrix/sdk/idb-persistence-lock.ts
|
|
2
2
|
const MATRIX_IDB_PERSIST_INTERVAL_MS = 6e4;
|
|
3
3
|
const MATRIX_IDB_SNAPSHOT_LOCK_OPTIONS = {
|
|
4
4
|
retries: {
|
|
@@ -10,4 +10,5 @@ const MATRIX_IDB_SNAPSHOT_LOCK_OPTIONS = {
|
|
|
10
10
|
},
|
|
11
11
|
stale: 3e5
|
|
12
12
|
};
|
|
13
|
+
//#endregion
|
|
13
14
|
export { MATRIX_IDB_SNAPSHOT_LOCK_OPTIONS as n, MATRIX_IDB_PERSIST_INTERVAL_MS as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as LogService } from "./logger-
|
|
1
|
+
import { t as LogService } from "./logger-CuAzdD8Q.mjs";
|
|
2
2
|
import { createChannelReplayGuard, resolvePersistentDedupePluginStateNamespace } from "openclaw/plugin-sdk/persistent-dedupe";
|
|
3
|
-
|
|
3
|
+
//#region extensions/matrix/src/matrix/monitor/inbound-dedupe.ts
|
|
4
4
|
const MATRIX_INBOUND_DEDUPE_PLUGIN_ID = "matrix";
|
|
5
5
|
const MATRIX_INBOUND_DEDUPE_NAMESPACE_PREFIX = "matrix.inbound-dedupe";
|
|
6
6
|
const MATRIX_INBOUND_DEDUPE_NAMESPACE = "global";
|
|
@@ -44,4 +44,5 @@ function createMatrixInboundEventDeduper(params) {
|
|
|
44
44
|
namespace: () => MATRIX_INBOUND_DEDUPE_NAMESPACE
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
|
+
//#endregion
|
|
47
48
|
export { MATRIX_INBOUND_DEDUPE_STATE_MAX_ENTRIES, MATRIX_INBOUND_DEDUPE_TTL_MS, buildMatrixInboundDedupeEventKey, createMatrixInboundEventDeduper, resolveMatrixInboundDedupeStateNamespace };
|
package/dist/.setup/{joined-room-encryption-Dl7Sb9FF.mjs → joined-room-encryption-DBbLkdvv.mjs}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as LogService } from "./logger-
|
|
1
|
+
import { t as LogService } from "./logger-CuAzdD8Q.mjs";
|
|
2
2
|
import { EventType, MatrixError, MatrixEvent } from "matrix-js-sdk/lib/matrix.js";
|
|
3
3
|
import { ConnectionError, HTTPError, Method } from "matrix-js-sdk/lib/http-api/index.js";
|
|
4
4
|
import { RustCrypto } from "matrix-js-sdk/lib/rust-crypto/rust-crypto.js";
|
|
5
|
-
|
|
5
|
+
//#region extensions/matrix/src/matrix/sdk/joined-room-encryption.ts
|
|
6
6
|
const ROOM_CONCURRENCY = 4;
|
|
7
7
|
async function reconcileJoinedRoomEncryption(client, signal, assertCurrent) {
|
|
8
8
|
const crypto = client.getCrypto();
|
|
@@ -63,4 +63,5 @@ async function reconcileJoinedRoomEncryption(client, signal, assertCurrent) {
|
|
|
63
63
|
checkActive();
|
|
64
64
|
for (const result of results) if (result.status === "rejected") throw result.reason;
|
|
65
65
|
}
|
|
66
|
+
//#endregion
|
|
66
67
|
export { reconcileJoinedRoomEncryption };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as getMatrixRuntime } from "./runtime-
|
|
1
|
+
import { t as getMatrixRuntime } from "./runtime-1kn1P6io.mjs";
|
|
2
2
|
import { format } from "node:util";
|
|
3
3
|
import { redactSensitiveText } from "openclaw/plugin-sdk/security-runtime";
|
|
4
|
-
|
|
4
|
+
//#region extensions/matrix/src/matrix/sdk/logger.ts
|
|
5
5
|
function noop() {}
|
|
6
6
|
let forceConsoleLogging = false;
|
|
7
7
|
let serviceQuiet = false;
|
|
@@ -21,7 +21,7 @@ function resolveRuntimeLogger(module) {
|
|
|
21
21
|
}
|
|
22
22
|
function formatMessage(module, messageOrObject) {
|
|
23
23
|
if (messageOrObject.length === 0) return `[${module}]`;
|
|
24
|
-
return
|
|
24
|
+
return `[${module}] ${format(...messageOrObject)}`;
|
|
25
25
|
}
|
|
26
26
|
function emitMatrixLog(level, module, messageOrObject) {
|
|
27
27
|
const runtimeLogger = resolveRuntimeLogger(module);
|
|
@@ -29,7 +29,7 @@ function emitMatrixLog(level, module, messageOrObject) {
|
|
|
29
29
|
if (runtimeLogger) {
|
|
30
30
|
if (level === "debug") runtimeLogger.debug?.(message);
|
|
31
31
|
else runtimeLogger[level](message);
|
|
32
|
-
} else console[level](message);
|
|
32
|
+
} else console[level](redactSensitiveText(message));
|
|
33
33
|
}
|
|
34
34
|
function emitServiceLog(level, module, ...messageOrObject) {
|
|
35
35
|
if (serviceQuiet) return;
|
|
@@ -40,4 +40,5 @@ const LogService = {
|
|
|
40
40
|
info: emitServiceLog.bind(null, "info"),
|
|
41
41
|
warn: emitServiceLog.bind(null, "warn")
|
|
42
42
|
};
|
|
43
|
+
//#endregion
|
|
43
44
|
export { setMatrixLogServiceQuiet as a, setMatrixConsoleLogging as i, emitMatrixLog as n, noop as r, LogService as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { n as __exportAll } from "./runtime-doctor-migrations-
|
|
2
|
-
import { a as setMatrixLogServiceQuiet, n as emitMatrixLog } from "./logger-
|
|
1
|
+
import { n as __exportAll } from "./runtime-doctor-migrations-hxP-CXX7.mjs";
|
|
2
|
+
import { a as setMatrixLogServiceQuiet, n as emitMatrixLog } from "./logger-CuAzdD8Q.mjs";
|
|
3
3
|
import { logger } from "matrix-js-sdk/lib/logger.js";
|
|
4
|
-
|
|
4
|
+
//#region extensions/matrix/src/matrix/client/logging.ts
|
|
5
5
|
var logging_exports = /* @__PURE__ */ __exportAll({
|
|
6
6
|
createMatrixJsSdkClientLogger: () => createMatrixJsSdkClientLogger,
|
|
7
7
|
ensureMatrixSdkLoggingConfigured: () => ensureMatrixSdkLoggingConfigured,
|
|
@@ -27,20 +27,26 @@ function setMatrixSdkLogMode(mode) {
|
|
|
27
27
|
applyMatrixSdkLogger();
|
|
28
28
|
}
|
|
29
29
|
function applyMatrixSdkLogger() {
|
|
30
|
-
|
|
30
|
+
configureMatrixJsSdkRootLogger();
|
|
31
31
|
setMatrixLogServiceQuiet(matrixSdkLogMode === "quiet");
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function configureMatrixJsSdkRootLogger() {
|
|
34
34
|
const logger$1 = logger;
|
|
35
|
-
matrixJsSdkRootLoggerSnapshot
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
35
|
+
if (!matrixJsSdkRootLoggerSnapshot) {
|
|
36
|
+
const methodFactory = logger$1.methodFactory;
|
|
37
|
+
matrixJsSdkRootLoggerSnapshot = {
|
|
38
|
+
level: logger$1.getLevel?.(),
|
|
39
|
+
methodFactory(methodName, logLevel, loggerName) {
|
|
40
|
+
const log = methodFactory.call(this, methodName, logLevel, loggerName);
|
|
41
|
+
return function(...args) {
|
|
42
|
+
if (matrixSdkLogMode === "quiet") return;
|
|
43
|
+
const label = args[0];
|
|
44
|
+
if (methodName === "info" && typeof label === "string" && label.startsWith("Storing user profile ")) return;
|
|
45
|
+
if (methodName === "trace" && (label === "membership event with membership undefined (forwardLooking: true)!" || label === "membership event with membership undefined (forwardLooking: false)!")) log.call(this, "membership event with membership undefined");
|
|
46
|
+
else log.apply(this, args);
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
};
|
|
44
50
|
}
|
|
45
51
|
logger$1.methodFactory = matrixJsSdkRootLoggerSnapshot.methodFactory;
|
|
46
52
|
const previousLevel = matrixJsSdkRootLoggerSnapshot.level;
|
|
@@ -50,7 +56,7 @@ function setMatrixJsSdkRootLoggerLevel(level) {
|
|
|
50
56
|
function createMatrixJsSdkClientLogger(prefix = "matrix") {
|
|
51
57
|
const log = (method, ...messageOrObject) => {
|
|
52
58
|
if (matrixSdkLogMode === "quiet") return;
|
|
53
|
-
emitMatrixLog(method, prefix, messageOrObject);
|
|
59
|
+
emitMatrixLog(method, prefix, messageOrObject[0] === "Cancelling verification request with params:" ? ["Cancelling verification request"] : messageOrObject);
|
|
54
60
|
};
|
|
55
61
|
return {
|
|
56
62
|
trace: (...messageOrObject) => log("debug", ...messageOrObject),
|
|
@@ -67,4 +73,5 @@ function createMatrixJsSdkClientLogger(prefix = "matrix") {
|
|
|
67
73
|
}
|
|
68
74
|
};
|
|
69
75
|
}
|
|
76
|
+
//#endregion
|
|
70
77
|
export { logging_exports as n, setMatrixSdkLogMode as r, createMatrixJsSdkClientLogger as t };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { a as MATRIX_REACTION_EVENT_TYPE } from "./send-currentness-
|
|
2
|
-
import { _ as isPollEventType, b as resolvePollReferenceEventId, d as resolveMatrixReplacementContent, g as formatPollResultsAsText, m as buildPollResultsSummary, t as editMessageMatrix, u as resolveMatrixMessageAttachment, v as isPollStartType, y as parsePollStart } from "./send-
|
|
3
|
-
import { r as withResolvedRoomAction } from "./client-
|
|
4
|
-
import { n as isMatrixNotFoundError } from "./errors-
|
|
1
|
+
import { a as MATRIX_REACTION_EVENT_TYPE } from "./send-currentness-C2rMVVIQ.mjs";
|
|
2
|
+
import { _ as isPollEventType, b as resolvePollReferenceEventId, d as resolveMatrixReplacementContent, g as formatPollResultsAsText, m as buildPollResultsSummary, t as editMessageMatrix, u as resolveMatrixMessageAttachment, v as isPollStartType, y as parsePollStart } from "./send-BGgwE5pV.mjs";
|
|
3
|
+
import { r as withResolvedRoomAction } from "./client-Cxv-iMwp.mjs";
|
|
4
|
+
import { n as isMatrixNotFoundError } from "./errors-Bw4EHwKX.mjs";
|
|
5
5
|
import { asNullableObjectRecord, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
6
|
-
|
|
6
|
+
//#region extensions/matrix/src/matrix/poll-summary.ts
|
|
7
7
|
function resolveMatrixPollRootEventId(event) {
|
|
8
8
|
if (isPollStartType(event.type)) {
|
|
9
9
|
const eventId = event.event_id?.trim();
|
|
@@ -57,18 +57,21 @@ async function fetchMatrixPollMessageSummary(client, roomId, event) {
|
|
|
57
57
|
timestamp: snapshot.triggerEvent.origin_server_ts || snapshot.rootEvent.origin_server_ts
|
|
58
58
|
};
|
|
59
59
|
}
|
|
60
|
-
|
|
60
|
+
//#endregion
|
|
61
|
+
//#region extensions/matrix/src/matrix/actions/limits.ts
|
|
61
62
|
function resolveMatrixActionLimit(raw, fallback) {
|
|
62
63
|
return Math.max(1, Math.floor(raw !== void 0 && Number.isFinite(raw) ? raw : fallback));
|
|
63
64
|
}
|
|
64
|
-
|
|
65
|
+
//#endregion
|
|
66
|
+
//#region extensions/matrix/src/matrix/actions/types.ts
|
|
65
67
|
const EventType = {
|
|
66
68
|
RoomMessage: "m.room.message",
|
|
67
69
|
RoomPinnedEvents: "m.room.pinned_events",
|
|
68
70
|
RoomTopic: "m.room.topic",
|
|
69
71
|
Reaction: MATRIX_REACTION_EVENT_TYPE
|
|
70
72
|
};
|
|
71
|
-
|
|
73
|
+
//#endregion
|
|
74
|
+
//#region extensions/matrix/src/matrix/actions/summary.ts
|
|
72
75
|
function parseMatrixRawEvent(value) {
|
|
73
76
|
const event = asNullableObjectRecord(value);
|
|
74
77
|
const content = asNullableObjectRecord(event?.content);
|
|
@@ -140,7 +143,8 @@ async function fetchEventSummary(client, roomId, eventId) {
|
|
|
140
143
|
return null;
|
|
141
144
|
}
|
|
142
145
|
}
|
|
143
|
-
|
|
146
|
+
//#endregion
|
|
147
|
+
//#region extensions/matrix/src/matrix/actions/messages.ts
|
|
144
148
|
const MATRIX_THREAD_RELATIONS_START_CURSOR_PREFIX = "openclaw.matrix.thread-relations-start:";
|
|
145
149
|
function resolveMatrixReplacementTarget(event) {
|
|
146
150
|
const relation = event.content["m.relates_to"];
|
|
@@ -286,4 +290,5 @@ async function isMatrixPollRootThreaded(params) {
|
|
|
286
290
|
const hydratedRoot = (await params.client.hydrateEvents(params.resolvedRoom, [rootEvent]))[0];
|
|
287
291
|
return hydratedRoot ? isMatrixThreadEvent(hydratedRoot) : false;
|
|
288
292
|
}
|
|
293
|
+
//#endregion
|
|
289
294
|
export { fetchEventSummary as a, resolveMatrixActionLimit as c, readMatrixMessages as i, fetchMatrixPollSnapshot as l, editMatrixMessage as n, readPinnedEvents as o, readMatrixMessage as r, EventType as s, deleteMatrixMessage as t };
|