@openclaw/matrix 2026.11.7 → 2026.11.9
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-UUPhMBmu.mjs → account-selection-Cow3TMFO.mjs} +5 -8
- package/dist/.setup/{approval-handler.runtime-LBvkygUK.mjs → approval-handler.runtime-eLiImxA4.mjs} +8 -9
- package/dist/.setup/{approval-reactions-BazmsDbe.mjs → approval-reactions-Bz_8XB01.mjs} +2 -3
- package/dist/.setup/{backup-health-Dm_YMVFT.mjs → backup-health-BxH69np2.mjs} +1 -2
- package/dist/.setup/{channel-CHryi9FS.mjs → channel-D4Ro9xGw.mjs} +27 -38
- package/dist/.setup/{channel.runtime-DluXWaGb.mjs → channel.runtime-BJs5y1VF.mjs} +10 -12
- package/dist/.setup/{channel.setup-BDbs0FLq.mjs → channel.setup-DbtdaDqc.mjs} +9 -7
- package/dist/.setup/{cli-C7Jmy2x4.mjs → cli-_ZHQruAA.mjs} +23 -31
- package/dist/.setup/{cli-doctor-BVstkgJE.mjs → cli-doctor-CoRX0erj.mjs} +3 -4
- package/dist/.setup/{cli-metadata-B0GHIn05.mjs → cli-metadata-BmSJWjxf.mjs} +3 -5
- package/dist/.setup/{client-Bk_tBqNp.mjs → client-BPMbgtzn.mjs} +21 -26
- package/dist/.setup/{client-mFRVrUt3.mjs → client-DVAwx3tH.mjs} +4 -5
- package/dist/.setup/{client-bootstrap-Bhhri97J.mjs → client-bootstrap-C02A2wi6.mjs} +2 -3
- package/dist/.setup/{client-support-B_Mp4Qk9.mjs → client-support-CqXAOZp3.mjs} +2 -3
- package/dist/.setup/{config-paths-CnREYb1Y.mjs → config-paths-DBpHxDyc.mjs} +1 -2
- package/dist/.setup/{create-client-CzUtZgYF.mjs → create-client-B36cEJY6.mjs} +8 -9
- package/dist/.setup/{credentials-kT20jk_u.mjs → credentials-CGgWuhFV.mjs} +5 -6
- package/dist/.setup/{credentials-read-CM6wXUjL.mjs → credentials-read-rPqEpuxv.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-BI9Pc344.mjs → crypto-runtime-Db6nQPh-.mjs} +10 -15
- package/dist/.setup/{crypto-state-store-BZLlwkv_.mjs → crypto-state-store-CzAmeC_Z.mjs} +4 -4
- package/dist/.setup/{crypto-store-ownership-CiQ1l_O7.mjs → crypto-store-ownership-DPO9WcVz.mjs} +3 -4
- package/dist/.setup/{crypto-unsafe-state-doctor-CmF1X1dZ.mjs → crypto-unsafe-state-doctor-D3WLE-t4.mjs} +6 -7
- package/dist/.setup/{deps-D-W_QQjz.mjs → deps-CVPT2Ros.mjs} +1 -2
- package/dist/.setup/{device-health-Ck2YpEVN.mjs → device-health-D7n-lPeb.mjs} +2 -3
- package/dist/.setup/{direct-management-Dp1giZ34.mjs → direct-management-D59C1WO-.mjs} +7 -11
- package/dist/.setup/{directory-live-DmkH9hcp.mjs → directory-live-Bok1h40u.mjs} +5 -6
- package/dist/.setup/{doctor-contract-BANpMUbP.mjs → doctor-contract-GiXgCj7k.mjs} +2 -3
- package/dist/.setup/{draft-stream-bVedfEB3.mjs → draft-stream-BbTgTBUa.mjs} +3 -4
- package/dist/.setup/{encryption-guidance-Br3Lv9Hm.mjs → encryption-guidance-DfbEaKct.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-BeYF9-3o.mjs → exec-approvals-DHPrWdH5.mjs} +6 -9
- package/dist/.setup/{file-sync-store-BpS12yaK.mjs → file-sync-store-fkSjB162.mjs} +5 -6
- package/dist/.setup/{http-client-B_ohXrBm.mjs → http-client-CqnKFKUH.mjs} +5 -8
- package/dist/.setup/{idb-persistence-BTOsltD9.mjs → idb-persistence-DeGUs--C.mjs} +6 -7
- package/dist/.setup/{idb-persistence-lock-Bh3ZLIsE.mjs → idb-persistence-lock-CH2K6d_3.mjs} +1 -2
- package/dist/.setup/{joined-room-encryption-C0gHa2DG.mjs → joined-room-encryption-9sJK1kM-.mjs} +2 -3
- package/dist/.setup/{logger-CuAzdD8Q.mjs → logger-B9TwnY6C.mjs} +2 -3
- package/dist/.setup/{logging-CoaEyRtA.mjs → logging-Bnsn7s4r.mjs} +3 -4
- package/dist/.setup/{messages-BqVczVlt.mjs → messages-DJnlpqat.mjs} +9 -14
- package/dist/.setup/{monitor-BsSo3tCv.mjs → monitor-DUq2MOB8.mjs} +60 -90
- package/dist/.setup/{onboarding-CoMpgTiK.mjs → onboarding-B-eNKDM4.mjs} +10 -11
- package/dist/.setup/{outbound-ntm0KOfK.mjs → outbound-C2GWN9M_.mjs} +3 -4
- package/dist/.setup/{profile-update-gC436enW.mjs → profile-update-DpGQpxMi.mjs} +7 -9
- package/dist/.setup/{reaction-events-DTThoaJQ.mjs → reaction-events-CDTXMh8-.mjs} +8 -9
- package/dist/.setup/{resolve-targets-CWW9zTYp.mjs → resolve-targets-ZIJ6qkiK.mjs} +4 -5
- package/dist/.setup/{retired-state-JGUEBE72.mjs → retired-state-BsxdpJNk.mjs} +3 -41
- package/dist/.setup/{room-info-CM3MKoh4.mjs → room-info-BZjtLeSm.mjs} +6 -8
- package/dist/.setup/{runtime-1kn1P6io.mjs → runtime-Ck8TjD7L.mjs} +1 -2
- package/dist/.setup/{runtime-doctor-migrations-hxP-CXX7.mjs → runtime-doctor-migrations-CSvRANPN.mjs} +5 -10
- package/dist/.setup/{runtime-setter-api-i2MOXoT3.mjs → runtime-setter-api-CpwhcBQK.mjs} +1 -1
- package/dist/.setup/{sdk-ByFgA6Il.mjs → sdk-Dq4fmgje.mjs} +32 -46
- 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-DFB7JGg2.mjs → send-DNqlA143.mjs} +25 -41
- package/dist/.setup/{send-currentness-DGxiiBn9.mjs → send-currentness-D1x6YP9O.mjs} +2 -4
- package/dist/.setup/{setup-bootstrap-razh2kSp.mjs → setup-bootstrap-BMqnuJ8B.mjs} +4 -5
- package/dist/.setup/{setup-core-BVbxltMM.mjs → setup-core-C56b-HVD.mjs} +13 -20
- package/dist/.setup/setup-plugin-api-Bje8sp8k.mjs +2 -0
- package/dist/.setup/sqlite-state-D6Zpz1q1.mjs +36 -0
- package/dist/.setup/{startup-verification-UkaoSldm.mjs → startup-verification-DfOuAruK.mjs} +5 -5
- package/dist/.setup/{state-layout-walk-BQMgMykU.mjs → state-layout-walk-BqCZTHpp.mjs} +2 -3
- package/dist/.setup/{storage-C3N6YZIn.mjs → storage-CCarF_gm.mjs} +9 -10
- package/dist/.setup/{storage-paths-B51JM-pC.mjs → storage-paths-e_Vq6cvw.mjs} +1 -2
- package/dist/.setup/{subagent-hooks-CfGAysJi.mjs → subagent-hooks-D-lCcLGQ.mjs} +2 -3
- package/dist/.setup/{sync-cache-state-BKVaKRzQ.mjs → sync-cache-state-BMvqW4Ii.mjs} +5 -5
- package/dist/.setup/{sync-state-CWbp0QSY.mjs → sync-state-Cu1nagBV.mjs} +1 -2
- package/dist/.setup/{target-ids-HhcaKX1n.mjs → target-ids-DltG_ZHJ.mjs} +1 -2
- package/dist/.setup/{task-runner-DY3aKiQa.mjs → task-runner-CYyGHdNW.mjs} +1 -2
- package/dist/.setup/{thread-binding-api-BvuaKpd0.mjs → thread-binding-api-OtSciHmZ.mjs} +2 -3
- package/dist/.setup/{thread-bindings-D5VJEDZV.mjs → thread-bindings-RsHN1U_f.mjs} +8 -9
- package/dist/.setup/{thread-bindings-shared-QmZOfX9Q.mjs → thread-bindings-shared-CBlJu3Wz.mjs} +1 -2
- package/dist/.setup/{tool-actions-DexlmVDf.mjs → tool-actions-Dyw4wFJ7.mjs} +19 -24
- package/dist/.setup/{url-validation-By_2hsXr.mjs → url-validation-DesoKUns.mjs} +1 -2
- package/dist/.setup/{verification-B122bsH2.mjs → verification-BKSXL6rb.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 +15 -17
- 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/package.json +4 -4
- package/dist/.setup/setup-plugin-api-CQKySg7F.mjs +0 -2
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { t as getMatrixRuntime } from "./runtime-
|
|
2
|
-
import { a as resolveMatrixAccountConfig, i as resolveMatrixAccountAllowlistConfig } from "./account-config-
|
|
3
|
-
import { h as resolveConfiguredMatrixBotUserIds } from "./setup-core-
|
|
4
|
-
import { a as resolveMatrixInboundRouteAsync, i as resolveMatrixRoomConfig, n as resolveMatrixStoredSessionMeta, o as resolveMatrixThreadRouting } from "./channel-
|
|
5
|
-
import { a as resolveMatrixAllowListMatch, i as normalizeMatrixUserId, r as normalizeMatrixAllowList } from "./channel.setup-
|
|
6
|
-
import { n as isMatrixQualifiedUserId, r as isMatrixRoomId, t as isMatrixInviteAutoJoinTarget } from "./target-ids-
|
|
7
|
-
import { a as MATRIX_REACTION_EVENT_TYPE, n as withMatrixSendCurrentness } from "./send-currentness-
|
|
8
|
-
import { c as isStrictDirectMembership, f as resolveMatrixReplyToEventId, h as MATRIX_OPENCLAW_FINALIZED_PREVIEW_KEY, i as promoteMatrixDirectRoomCandidate, p as resolveMatrixThreadRootId, s as hasDirectMatrixMemberFlag, u as readJoinedMatrixMembers, v as RelationType } from "./direct-management-
|
|
9
|
-
import { n as getMatrixMonitorTaskSignal, t as createMatrixMonitorTaskRunner } from "./task-runner-
|
|
10
|
-
import { T as setBoundedMap, b as parsePollStart, c as formatMatrixMessageText, d as resolveMatrixReplacementContent, g as formatPollAsText, l as isLikelyBareFilename, r as sendMessageMatrix, u as resolveMatrixMessageAttachment, v as isPollEventType, y as isPollStartType } from "./send-
|
|
11
|
-
import { n as getMatrixEventProjection } from "./event-helpers-
|
|
12
|
-
import { t as createMatrixThreadBindingManager } from "./thread-bindings-
|
|
13
|
-
import { a as isMatrixAccessTokenInvalidatedError } from "./client-support-
|
|
14
|
-
import { a as isMatrixStartupAbortError, c as resolveMatrixAuth, l as resolveMatrixAuthContext, n as acquireSharedMatrixClient, o as throwIfMatrixStartupAborted, s as backfillMatrixAuthDeviceIdAfterStartup } from "./client-
|
|
15
|
-
import { i as readMatrixMessages, l as fetchMatrixPollSnapshot } from "./messages-
|
|
16
|
-
import { a as isMatrixMediaSizeLimitError, i as MatrixMediaSizeLimitError } from "./http-client-
|
|
17
|
-
import { n as prepareMatrixReplyPayload, r as resolveMatrixExtraContent } from "./outbound-
|
|
18
|
-
import { t as resolveMatrixTargets } from "./resolve-targets-
|
|
19
|
-
import { n as emitMatrixLog } from "./logger-
|
|
20
|
-
import { t as formatMatrixEncryptedEventDisabledWarning } from "./encryption-guidance-
|
|
21
|
-
import { n as isMatrixReadySyncState, r as isMatrixTerminalSyncState, t as isMatrixDisconnectedSyncState } from "./sync-state-
|
|
22
|
-
import { r as getMatrixRoomInfo, t as createMatrixRoomInfoResolver } from "./room-info-
|
|
1
|
+
import { t as getMatrixRuntime } from "./runtime-Ck8TjD7L.mjs";
|
|
2
|
+
import { a as resolveMatrixAccountConfig, i as resolveMatrixAccountAllowlistConfig } from "./account-config-CVM2a28p.mjs";
|
|
3
|
+
import { h as resolveConfiguredMatrixBotUserIds } from "./setup-core-C56b-HVD.mjs";
|
|
4
|
+
import { a as resolveMatrixInboundRouteAsync, i as resolveMatrixRoomConfig, n as resolveMatrixStoredSessionMeta, o as resolveMatrixThreadRouting } from "./channel-D4Ro9xGw.mjs";
|
|
5
|
+
import { a as resolveMatrixAllowListMatch, i as normalizeMatrixUserId, r as normalizeMatrixAllowList } from "./channel.setup-DbtdaDqc.mjs";
|
|
6
|
+
import { n as isMatrixQualifiedUserId, r as isMatrixRoomId, t as isMatrixInviteAutoJoinTarget } from "./target-ids-DltG_ZHJ.mjs";
|
|
7
|
+
import { a as MATRIX_REACTION_EVENT_TYPE, n as withMatrixSendCurrentness } from "./send-currentness-D1x6YP9O.mjs";
|
|
8
|
+
import { c as isStrictDirectMembership, f as resolveMatrixReplyToEventId, h as MATRIX_OPENCLAW_FINALIZED_PREVIEW_KEY, i as promoteMatrixDirectRoomCandidate, p as resolveMatrixThreadRootId, s as hasDirectMatrixMemberFlag, u as readJoinedMatrixMembers, v as RelationType } from "./direct-management-D59C1WO-.mjs";
|
|
9
|
+
import { n as getMatrixMonitorTaskSignal, t as createMatrixMonitorTaskRunner } from "./task-runner-CYyGHdNW.mjs";
|
|
10
|
+
import { T as setBoundedMap, b as parsePollStart, c as formatMatrixMessageText, d as resolveMatrixReplacementContent, g as formatPollAsText, l as isLikelyBareFilename, r as sendMessageMatrix, u as resolveMatrixMessageAttachment, v as isPollEventType, y as isPollStartType } from "./send-DNqlA143.mjs";
|
|
11
|
+
import { n as getMatrixEventProjection } from "./event-helpers-DDUjVVf7.mjs";
|
|
12
|
+
import { t as createMatrixThreadBindingManager } from "./thread-bindings-RsHN1U_f.mjs";
|
|
13
|
+
import { a as isMatrixAccessTokenInvalidatedError } from "./client-support-CqXAOZp3.mjs";
|
|
14
|
+
import { a as isMatrixStartupAbortError, c as resolveMatrixAuth, l as resolveMatrixAuthContext, n as acquireSharedMatrixClient, o as throwIfMatrixStartupAborted, s as backfillMatrixAuthDeviceIdAfterStartup } from "./client-BPMbgtzn.mjs";
|
|
15
|
+
import { i as readMatrixMessages, l as fetchMatrixPollSnapshot } from "./messages-DJnlpqat.mjs";
|
|
16
|
+
import { a as isMatrixMediaSizeLimitError, i as MatrixMediaSizeLimitError } from "./http-client-CqnKFKUH.mjs";
|
|
17
|
+
import { n as prepareMatrixReplyPayload, r as resolveMatrixExtraContent } from "./outbound-C2GWN9M_.mjs";
|
|
18
|
+
import { t as resolveMatrixTargets } from "./resolve-targets-ZIJ6qkiK.mjs";
|
|
19
|
+
import { n as emitMatrixLog } from "./logger-B9TwnY6C.mjs";
|
|
20
|
+
import { t as formatMatrixEncryptedEventDisabledWarning } from "./encryption-guidance-DfbEaKct.mjs";
|
|
21
|
+
import { n as isMatrixReadySyncState, r as isMatrixTerminalSyncState, t as isMatrixDisconnectedSyncState } from "./sync-state-Cu1nagBV.mjs";
|
|
22
|
+
import { r as getMatrixRoomInfo, t as createMatrixRoomInfoResolver } from "./room-info-BZjtLeSm.mjs";
|
|
23
23
|
import { channelBlockedPatch, channelReadyPatch, channelStoppedPatch, createTransportActivityStatusPatch } from "openclaw/plugin-sdk/gateway-runtime";
|
|
24
24
|
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
25
25
|
import { createChannelDeliveryAccumulator, createChannelIngressError, createChannelIngressMonitor, createChannelProgressDraftCompositor, createLivePreviewLifecycle, createPreviewMessageReceipt, createReplyPrefixOptions, createTypingCallbacks, logTypingFailure, resolveChannelStreamingBlockEnabled, waitUntilAbort } from "openclaw/plugin-sdk/channel-outbound";
|
|
@@ -55,7 +55,7 @@ import { createChannelPreflightAudio, formatAudioTranscriptForAgent } from "open
|
|
|
55
55
|
import { mergePairLoopGuardConfig } from "openclaw/plugin-sdk/pair-loop-guard-runtime";
|
|
56
56
|
import { buildInboundHistoryFromEntries } from "openclaw/plugin-sdk/reply-history";
|
|
57
57
|
import { decodeHtmlEntities } from "openclaw/plugin-sdk/html-entity-runtime";
|
|
58
|
-
|
|
58
|
+
// extensions/matrix/src/matrix/monitor/auto-join.ts
|
|
59
59
|
function registerMatrixAutoJoin(params) {
|
|
60
60
|
const { client, accountConfig, runtime } = params;
|
|
61
61
|
const core = getMatrixRuntime();
|
|
@@ -119,8 +119,7 @@ function registerMatrixAutoJoin(params) {
|
|
|
119
119
|
client.off("room.invite", onInvite);
|
|
120
120
|
};
|
|
121
121
|
}
|
|
122
|
-
|
|
123
|
-
//#region extensions/matrix/src/matrix/monitor/config.ts
|
|
122
|
+
// extensions/matrix/src/matrix/monitor/config.ts
|
|
124
123
|
function normalizeMatrixUserLookupEntry(raw) {
|
|
125
124
|
return raw.replace(/^matrix:/i, "").replace(/^user:/i, "").trim();
|
|
126
125
|
}
|
|
@@ -398,8 +397,7 @@ async function resolveMatrixMonitorConfig(params) {
|
|
|
398
397
|
roomsConfig
|
|
399
398
|
};
|
|
400
399
|
}
|
|
401
|
-
|
|
402
|
-
//#region extensions/matrix/src/matrix/monitor/direct.ts
|
|
400
|
+
// extensions/matrix/src/matrix/monitor/direct.ts
|
|
403
401
|
const DM_CACHE_TTL_MS = 3e4;
|
|
404
402
|
const RECENT_INVITE_TTL_MS = 3e4;
|
|
405
403
|
const MAX_DM_ROOMS = 1024;
|
|
@@ -584,8 +582,7 @@ function createDirectRoomTracker(client, opts = {}) {
|
|
|
584
582
|
}
|
|
585
583
|
};
|
|
586
584
|
}
|
|
587
|
-
|
|
588
|
-
//#region extensions/matrix/src/matrix/monitor/types.ts
|
|
585
|
+
// extensions/matrix/src/matrix/monitor/types.ts
|
|
589
586
|
const EventType = {
|
|
590
587
|
RoomMessage: "m.room.message",
|
|
591
588
|
RoomMessageEncrypted: "m.room.encrypted",
|
|
@@ -594,8 +591,7 @@ const EventType = {
|
|
|
594
591
|
Location: "m.location",
|
|
595
592
|
Reaction: MATRIX_REACTION_EVENT_TYPE
|
|
596
593
|
};
|
|
597
|
-
|
|
598
|
-
//#region extensions/matrix/src/matrix/monitor/access-state.ts
|
|
594
|
+
// extensions/matrix/src/matrix/monitor/access-state.ts
|
|
599
595
|
function normalizeMatrixEntry(raw) {
|
|
600
596
|
return normalizeMatrixAllowList([raw ?? ""])[0] ?? null;
|
|
601
597
|
}
|
|
@@ -701,8 +697,7 @@ async function resolveMatrixMonitorCommandAccess(state, params) {
|
|
|
701
697
|
}
|
|
702
698
|
})).commandAccess;
|
|
703
699
|
}
|
|
704
|
-
|
|
705
|
-
//#region extensions/matrix/src/matrix/monitor/verification-utils.ts
|
|
700
|
+
// extensions/matrix/src/matrix/monitor/verification-utils.ts
|
|
706
701
|
const VERIFICATION_EVENT_PREFIX = "m.key.verification.";
|
|
707
702
|
const VERIFICATION_REQUEST_MSGTYPE = "m.key.verification.request";
|
|
708
703
|
const VERIFICATION_NOTICE_PREFIXES = [
|
|
@@ -730,12 +725,11 @@ const matrixVerificationConstants = {
|
|
|
730
725
|
eventPrefix: VERIFICATION_EVENT_PREFIX,
|
|
731
726
|
requestMsgtype: VERIFICATION_REQUEST_MSGTYPE
|
|
732
727
|
};
|
|
733
|
-
|
|
734
|
-
//#region extensions/matrix/src/matrix/monitor/verification-events.ts
|
|
728
|
+
// extensions/matrix/src/matrix/monitor/verification-events.ts
|
|
735
729
|
const MAX_TRACKED_VERIFICATION_EVENTS = 1024;
|
|
736
730
|
const SAS_NOTICE_RETRY_DELAY_MS = 750;
|
|
737
731
|
const VERIFICATION_EVENT_STARTUP_GRACE_MS = 3e4;
|
|
738
|
-
const loadMatrixDirectRoomDeps = createLazyRuntimeModule(() => Promise.all([import("./direct-management-
|
|
732
|
+
const loadMatrixDirectRoomDeps = createLazyRuntimeModule(() => Promise.all([import("./direct-management-D59C1WO-.mjs").then((n) => n.t), import("./direct-management-D59C1WO-.mjs").then((n) => n.o)]).then(([directManagementModule, directRoomModule]) => ({
|
|
739
733
|
inspectMatrixDirectRooms: directManagementModule.inspectMatrixDirectRooms,
|
|
740
734
|
isStrictDirectRoom: directRoomModule.isStrictDirectRoom
|
|
741
735
|
})));
|
|
@@ -1020,8 +1014,7 @@ function createMatrixVerificationEventRouter(params) {
|
|
|
1020
1014
|
routeVerificationSummary
|
|
1021
1015
|
};
|
|
1022
1016
|
}
|
|
1023
|
-
|
|
1024
|
-
//#region extensions/matrix/src/matrix/monitor/events.ts
|
|
1017
|
+
// extensions/matrix/src/matrix/monitor/events.ts
|
|
1025
1018
|
const MATRIX_POST_HEALTHY_SYNC_DECRYPT_FAILURE_WINDOW_MS = 12e4;
|
|
1026
1019
|
const MATRIX_POST_HEALTHY_SYNC_DECRYPT_FAILURE_THRESHOLD = 3;
|
|
1027
1020
|
const MATRIX_POST_HEALTHY_SYNC_DECRYPT_FAILURE_SAMPLE_LIMIT = 3;
|
|
@@ -1295,8 +1288,7 @@ function registerMatrixMonitorEvents(params) {
|
|
|
1295
1288
|
client.off("room.event", onRoomEvent);
|
|
1296
1289
|
};
|
|
1297
1290
|
}
|
|
1298
|
-
|
|
1299
|
-
//#region extensions/matrix/src/matrix/monitor/event-context.ts
|
|
1291
|
+
// extensions/matrix/src/matrix/monitor/event-context.ts
|
|
1300
1292
|
function summarizeMatrixMessageContextEvent(event) {
|
|
1301
1293
|
if (isPollStartType(event.type)) {
|
|
1302
1294
|
const pollSummary = parsePollStart(event.content);
|
|
@@ -1360,8 +1352,7 @@ function createMatrixEventContextResolver(params) {
|
|
|
1360
1352
|
return context;
|
|
1361
1353
|
};
|
|
1362
1354
|
}
|
|
1363
|
-
|
|
1364
|
-
//#region extensions/matrix/src/matrix/monitor/ack-config.ts
|
|
1355
|
+
// extensions/matrix/src/matrix/monitor/ack-config.ts
|
|
1365
1356
|
function resolveMatrixAckReactionConfig(params) {
|
|
1366
1357
|
const matrixConfig = params.cfg.channels?.matrix;
|
|
1367
1358
|
const accountConfig = resolveMatrixAccountConfig({
|
|
@@ -1376,8 +1367,7 @@ function resolveMatrixAckReactionConfig(params) {
|
|
|
1376
1367
|
ackReactionScope: accountConfig.ackReactionScope ?? matrixConfig?.ackReactionScope ?? params.cfg.messages?.ackReactionScope ?? "group-mentions"
|
|
1377
1368
|
};
|
|
1378
1369
|
}
|
|
1379
|
-
|
|
1380
|
-
//#region extensions/matrix/src/matrix/monitor/preflight-audio.ts
|
|
1370
|
+
// extensions/matrix/src/matrix/monitor/preflight-audio.ts
|
|
1381
1371
|
function isMatrixAudioContent(params) {
|
|
1382
1372
|
if (params.msgtype === "m.audio") return true;
|
|
1383
1373
|
if (params.msgtype === "m.file" && typeof params.mimetype === "string") return params.mimetype.toLowerCase().startsWith("audio/");
|
|
@@ -1387,8 +1377,7 @@ const matrixPreflightAudio = createChannelPreflightAudio({
|
|
|
1387
1377
|
channel: "matrix",
|
|
1388
1378
|
isAudio: isMatrixAudioContent
|
|
1389
1379
|
});
|
|
1390
|
-
|
|
1391
|
-
//#region extensions/matrix/src/matrix/monitor/handler-helpers.ts
|
|
1380
|
+
// extensions/matrix/src/matrix/monitor/handler-helpers.ts
|
|
1392
1381
|
const MATRIX_TOOL_PROGRESS_MAX_CHARS = 300;
|
|
1393
1382
|
const MAX_TRACKED_SHARED_DM_CONTEXT_NOTICES = 512;
|
|
1394
1383
|
function resolveMatrixCurrentContent(content) {
|
|
@@ -1487,13 +1476,12 @@ function resolveMatrixAllowBotsMode(value) {
|
|
|
1487
1476
|
function formatMatrixToolProgressMarkdownCode(text) {
|
|
1488
1477
|
return `\`${(text.length <= MATRIX_TOOL_PROGRESS_MAX_CHARS ? text : `${truncateUtf16Safe(text, 299).trimEnd()}...`).replaceAll("`", "'")}\``;
|
|
1489
1478
|
}
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
const loadMatrixSendModule = createLazyRuntimeModule(() => import("./send-DFB7JGg2.mjs").then((n) => n.s));
|
|
1479
|
+
// extensions/matrix/src/matrix/monitor/handler-runtime.ts
|
|
1480
|
+
const loadMatrixSendModule = createLazyRuntimeModule(() => import("./send-DNqlA143.mjs").then((n) => n.s));
|
|
1493
1481
|
const loadAcpBindingRuntime = createLazyRuntimeModule(() => import("openclaw/plugin-sdk/acp-binding-runtime"));
|
|
1494
1482
|
const loadSessionBindingRuntime = createLazyRuntimeModule(() => import("openclaw/plugin-sdk/session-binding-runtime"));
|
|
1495
|
-
const loadMatrixReactionEvents = createLazyRuntimeModule(() => import("./reaction-events-
|
|
1496
|
-
const loadMatrixDraftStream = createLazyRuntimeModule(() => import("./draft-stream-
|
|
1483
|
+
const loadMatrixReactionEvents = createLazyRuntimeModule(() => import("./reaction-events-CDTXMh8-.mjs"));
|
|
1484
|
+
const loadMatrixDraftStream = createLazyRuntimeModule(() => import("./draft-stream-BbTgTBUa.mjs"));
|
|
1497
1485
|
async function matrixTextWouldActivateMentions(client, text) {
|
|
1498
1486
|
const { resolveMatrixMentionsForBody } = await loadMatrixSendModule();
|
|
1499
1487
|
const mentions = await resolveMatrixMentionsForBody({
|
|
@@ -1502,8 +1490,7 @@ async function matrixTextWouldActivateMentions(client, text) {
|
|
|
1502
1490
|
});
|
|
1503
1491
|
return mentions.room === true || (mentions.user_ids?.length ?? 0) > 0;
|
|
1504
1492
|
}
|
|
1505
|
-
|
|
1506
|
-
//#region extensions/matrix/src/matrix/monitor/handler-context.ts
|
|
1493
|
+
// extensions/matrix/src/matrix/monitor/handler-context.ts
|
|
1507
1494
|
async function resolveMatrixInboundContext(config) {
|
|
1508
1495
|
const { handler, ingress, roomId, event, eventTs, resolveThreadContext, resolveReplyContext, senderId, sharedDmContextNoticeRooms } = config;
|
|
1509
1496
|
const { client, core, accountId, runtime, logVerboseMessage, groupPolicy, getRoomInfo, historyLimit, dmSessionScope } = handler;
|
|
@@ -1703,8 +1690,7 @@ async function resolveMatrixInboundContext(config) {
|
|
|
1703
1690
|
sharedDmContextNotice
|
|
1704
1691
|
};
|
|
1705
1692
|
}
|
|
1706
|
-
|
|
1707
|
-
//#region extensions/matrix/src/matrix/monitor/handler-draft-controller.ts
|
|
1693
|
+
// extensions/matrix/src/matrix/monitor/handler-draft-controller.ts
|
|
1708
1694
|
async function createMatrixDraftController(params) {
|
|
1709
1695
|
const { streaming, previewToolProgressEnabled, replyToMode, messageId, threadTarget, accountConfig, cfg, accountId, roomId, client, logVerboseMessage } = params;
|
|
1710
1696
|
const draftStreamingEnabled = streaming !== "off";
|
|
@@ -1832,8 +1818,7 @@ async function createMatrixDraftController(params) {
|
|
|
1832
1818
|
}
|
|
1833
1819
|
};
|
|
1834
1820
|
}
|
|
1835
|
-
|
|
1836
|
-
//#region extensions/matrix/src/matrix/monitor/room-history.ts
|
|
1821
|
+
// extensions/matrix/src/matrix/monitor/room-history.ts
|
|
1837
1822
|
/** Maximum entries retained per room (hard cap to bound memory). */
|
|
1838
1823
|
const DEFAULT_MAX_QUEUE_SIZE = 200;
|
|
1839
1824
|
/** Maximum number of rooms to retain queues for (FIFO eviction beyond this). */
|
|
@@ -2025,8 +2010,7 @@ function createRoomHistoryTracker(maxQueueSize = DEFAULT_MAX_QUEUE_SIZE, maxRoom
|
|
|
2025
2010
|
}
|
|
2026
2011
|
};
|
|
2027
2012
|
}
|
|
2028
|
-
|
|
2029
|
-
//#region extensions/matrix/src/matrix/monitor/handler-ingress-access.ts
|
|
2013
|
+
// extensions/matrix/src/matrix/monitor/handler-ingress-access.ts
|
|
2030
2014
|
async function resolveMatrixIngressAccess(config) {
|
|
2031
2015
|
const { handler, params: paramsLocal, roomId, event, eventTs, senderId, isReactionEvent, readStoreAllowFrom, shouldSendPairingReply, resolveLiveAccountAllowlists, roomHistoryTracker } = config;
|
|
2032
2016
|
const { core, cfg, accountId, accountConfig, client, logVerboseMessage, groupPolicy, dmEnabled, dmPolicy, dmThreadReplies, threadReplies, roomsConfig, accountAllowBots, configuredBotUserIds, needsRoomAliasesForConfig, getRoomInfo, getMemberDisplayName } = handler;
|
|
@@ -2227,8 +2211,7 @@ async function resolveMatrixIngressAccess(config) {
|
|
|
2227
2211
|
effectiveRoomUsers
|
|
2228
2212
|
};
|
|
2229
2213
|
}
|
|
2230
|
-
|
|
2231
|
-
//#region src/channels/mention-gating.ts
|
|
2214
|
+
// src/channels/mention-gating.ts
|
|
2232
2215
|
function resolveBotThreadMentionPolicy(params) {
|
|
2233
2216
|
if (!params.isBotOwnedThread || params.requireMentionInBotThreads === void 0) return {
|
|
2234
2217
|
requireMention: params.requireMention,
|
|
@@ -2239,8 +2222,7 @@ function resolveBotThreadMentionPolicy(params) {
|
|
|
2239
2222
|
implicitMentionKinds: params.requireMentionInBotThreads ? params.implicitMentionKinds?.filter((kind) => kind === "native") : params.implicitMentionKinds
|
|
2240
2223
|
};
|
|
2241
2224
|
}
|
|
2242
|
-
|
|
2243
|
-
//#region extensions/matrix/src/matrix/monitor/media.ts
|
|
2225
|
+
// extensions/matrix/src/matrix/monitor/media.ts
|
|
2244
2226
|
const MATRIX_MEDIA_DOWNLOAD_IDLE_TIMEOUT_MS = 3e4;
|
|
2245
2227
|
async function downloadMatrixMedia(params) {
|
|
2246
2228
|
if (typeof params.sizeBytes === "number" && params.sizeBytes > params.maxBytes) throw new MatrixMediaSizeLimitError();
|
|
@@ -2266,8 +2248,7 @@ async function downloadMatrixMedia(params) {
|
|
|
2266
2248
|
placeholder: "[matrix media]"
|
|
2267
2249
|
};
|
|
2268
2250
|
}
|
|
2269
|
-
|
|
2270
|
-
//#region extensions/matrix/src/matrix/monitor/mentions.ts
|
|
2251
|
+
// extensions/matrix/src/matrix/monitor/mentions.ts
|
|
2271
2252
|
const MATRIX_HTML_ENTITY_RE = /&(?:#x?[0-9a-f]+|amp|apos|gt|lt|nbsp|quot);/gi;
|
|
2272
2253
|
function decodeVisibleHtmlEntities(value) {
|
|
2273
2254
|
return value.replace(MATRIX_HTML_ENTITY_RE, (entity) => {
|
|
@@ -2434,8 +2415,7 @@ function resolveMentions(params) {
|
|
|
2434
2415
|
hasExplicitMention: explicitMention
|
|
2435
2416
|
};
|
|
2436
2417
|
}
|
|
2437
|
-
|
|
2438
|
-
//#region extensions/matrix/src/matrix/monitor/handler-ingress-content.ts
|
|
2418
|
+
// extensions/matrix/src/matrix/monitor/handler-ingress-content.ts
|
|
2439
2419
|
async function resolveMatrixIngressContent(config) {
|
|
2440
2420
|
const { handler, params: paramsLocal, access, roomId, event, eventType, isPollEvent, eventTs, senderId, roomHistoryTracker, resolveThreadContext } = config;
|
|
2441
2421
|
const { client, core, accountId, accountConfig, logger, logVerboseMessage, historyLimit, mediaMaxBytes, dmSessionScope, getMemberDisplayName } = handler;
|
|
@@ -2744,8 +2724,7 @@ async function resolveMatrixIngressContent(config) {
|
|
|
2744
2724
|
threadContext
|
|
2745
2725
|
};
|
|
2746
2726
|
}
|
|
2747
|
-
|
|
2748
|
-
//#region extensions/matrix/src/matrix/monitor/handler-reply-dispatcher.ts
|
|
2727
|
+
// extensions/matrix/src/matrix/monitor/handler-reply-dispatcher.ts
|
|
2749
2728
|
function mergeMatrixReplyDeliveryResults(results) {
|
|
2750
2729
|
const single = results.length === 1 ? results[0] : void 0;
|
|
2751
2730
|
if (single?.visibleReplySent) return single;
|
|
@@ -2953,8 +2932,7 @@ function createMatrixReplyDispatcher(config) {
|
|
|
2953
2932
|
nonFinalReplyDeliveryFailed: () => nonFinalReplyDeliveryFailed
|
|
2954
2933
|
};
|
|
2955
2934
|
}
|
|
2956
|
-
|
|
2957
|
-
//#region extensions/matrix/src/matrix/monitor/handler-state.ts
|
|
2935
|
+
// extensions/matrix/src/matrix/monitor/handler-state.ts
|
|
2958
2936
|
const ALLOW_FROM_STORE_CACHE_TTL_MS = 3e4;
|
|
2959
2937
|
const PAIRING_REPLY_COOLDOWN_MS = 3e5;
|
|
2960
2938
|
const MAX_TRACKED_PAIRING_REPLY_SENDERS = 512;
|
|
@@ -3040,8 +3018,7 @@ function createMatrixHandlerState(config) {
|
|
|
3040
3018
|
shouldSendPairingReply
|
|
3041
3019
|
};
|
|
3042
3020
|
}
|
|
3043
|
-
|
|
3044
|
-
//#region extensions/matrix/src/matrix/monitor/location.ts
|
|
3021
|
+
// extensions/matrix/src/matrix/monitor/location.ts
|
|
3045
3022
|
function decodeGeoUriParamValue(value) {
|
|
3046
3023
|
try {
|
|
3047
3024
|
return decodeURIComponent(value);
|
|
@@ -3088,8 +3065,7 @@ function resolveMatrixLocation(params) {
|
|
|
3088
3065
|
context: toLocationContext(location)
|
|
3089
3066
|
};
|
|
3090
3067
|
}
|
|
3091
|
-
|
|
3092
|
-
//#region extensions/matrix/src/matrix/monitor/handler.ts
|
|
3068
|
+
// extensions/matrix/src/matrix/monitor/handler.ts
|
|
3093
3069
|
const SESSION_RESTART_RECOVERY_TOMBSTONE_ERROR_CODE = "SESSION_RESTART_RECOVERY_TOMBSTONE";
|
|
3094
3070
|
const RESTART_RECOVERY_TOMBSTONE_NOTICE = "This session ended during gateway restart recovery and cannot accept more messages. Send /new or /reset to start a replacement session.";
|
|
3095
3071
|
function createMatrixRoomMessageHandler(params) {
|
|
@@ -3429,8 +3405,7 @@ function createMatrixRoomMessageHandler(params) {
|
|
|
3429
3405
|
}
|
|
3430
3406
|
};
|
|
3431
3407
|
}
|
|
3432
|
-
|
|
3433
|
-
//#region extensions/matrix/src/matrix/monitor/ingress.ts
|
|
3408
|
+
// extensions/matrix/src/matrix/monitor/ingress.ts
|
|
3434
3409
|
const MatrixIngressPayloadError = createChannelIngressError("MatrixIngressPayloadError");
|
|
3435
3410
|
function inspectMatrixIngressEvent(raw) {
|
|
3436
3411
|
if (!raw || typeof raw.roomId !== "string" || !raw.roomId.trim() || !raw.event || typeof raw.event.event_id !== "string" || !raw.event.event_id.trim()) throw new MatrixIngressPayloadError("Matrix ingress event is missing its room or event ID");
|
|
@@ -3561,8 +3536,7 @@ function createMatrixIngressMonitor(params) {
|
|
|
3561
3536
|
waitForIdle: monitor.waitForIdle
|
|
3562
3537
|
};
|
|
3563
3538
|
}
|
|
3564
|
-
|
|
3565
|
-
//#region extensions/matrix/src/matrix/monitor/recent-invite.ts
|
|
3539
|
+
// extensions/matrix/src/matrix/monitor/recent-invite.ts
|
|
3566
3540
|
function shouldPromoteRecentInviteRoom(params) {
|
|
3567
3541
|
if (!params.roomInfo.nameResolved || !params.roomInfo.aliasesResolved) return false;
|
|
3568
3542
|
const roomAliases = [params.roomInfo.canonicalAlias ?? "", ...params.roomInfo.altAliases].filter(Boolean);
|
|
@@ -3573,13 +3547,12 @@ function shouldPromoteRecentInviteRoom(params) {
|
|
|
3573
3547
|
aliases: roomAliases
|
|
3574
3548
|
}).matchSource === void 0;
|
|
3575
3549
|
}
|
|
3576
|
-
|
|
3577
|
-
//#region extensions/matrix/src/matrix/monitor/startup.ts
|
|
3550
|
+
// extensions/matrix/src/matrix/monitor/startup.ts
|
|
3578
3551
|
const loadMatrixStartupMaintenanceDeps = createLazyRuntimeModule(() => Promise.all([
|
|
3579
|
-
import("./setup-core-
|
|
3580
|
-
import("./device-health-
|
|
3581
|
-
import("./setup-core-
|
|
3582
|
-
import("./startup-verification-
|
|
3552
|
+
import("./setup-core-C56b-HVD.mjs").then((n) => n.f),
|
|
3553
|
+
import("./device-health-D7n-lPeb.mjs").then((n) => n.t),
|
|
3554
|
+
import("./setup-core-C56b-HVD.mjs").then((n) => n.u),
|
|
3555
|
+
import("./startup-verification-DfOuAruK.mjs")
|
|
3583
3556
|
]).then(([configUpdateModule, deviceHealthModule, profileModule, startupVerificationModule]) => ({
|
|
3584
3557
|
updateMatrixAccountConfig: configUpdateModule.updateMatrixAccountConfig,
|
|
3585
3558
|
listStaleOpenClawMatrixDevices: deviceHealthModule.listStaleOpenClawMatrixDevices,
|
|
@@ -3641,8 +3614,7 @@ async function runMatrixStartupMaintenance(params) {
|
|
|
3641
3614
|
params.logger.debug?.("Failed to resolve matrix verification status (non-fatal)", { error: String(err) });
|
|
3642
3615
|
}
|
|
3643
3616
|
}
|
|
3644
|
-
|
|
3645
|
-
//#region extensions/matrix/src/matrix/monitor/status.ts
|
|
3617
|
+
// extensions/matrix/src/matrix/monitor/status.ts
|
|
3646
3618
|
function formatSyncError(error) {
|
|
3647
3619
|
if (!error) return null;
|
|
3648
3620
|
if (error instanceof Error) return error.message || error.name || "unknown";
|
|
@@ -3759,8 +3731,7 @@ function createMatrixMonitorStatusController(params) {
|
|
|
3759
3731
|
}
|
|
3760
3732
|
};
|
|
3761
3733
|
}
|
|
3762
|
-
|
|
3763
|
-
//#region extensions/matrix/src/matrix/monitor/index.ts
|
|
3734
|
+
// extensions/matrix/src/matrix/monitor/index.ts
|
|
3764
3735
|
function resolveMatrixStreamingMode(streaming) {
|
|
3765
3736
|
const mode = streaming?.mode;
|
|
3766
3737
|
if (mode === "partial" || mode === "quiet" || mode === "progress") return mode;
|
|
@@ -4200,5 +4171,4 @@ async function monitorMatrixProvider(opts = {}) {
|
|
|
4200
4171
|
throw err;
|
|
4201
4172
|
}
|
|
4202
4173
|
}
|
|
4203
|
-
//#endregion
|
|
4204
4174
|
export { monitorMatrixProvider };
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { n as __exportAll } from "./runtime-doctor-migrations-
|
|
2
|
-
import { i as requiresExplicitMatrixDefaultAccount, u as resolveMatrixEnvAuthReadiness } from "./account-selection-
|
|
3
|
-
import { a as resolveMatrixAccountConfig } from "./account-config-
|
|
4
|
-
import { a as createMatrixSetupDmPolicy, g as resolveDefaultMatrixAccountId, m as listMatrixAccountIds, n as finishMatrixSetupAfterConfigWrite, o as moveSingleMatrixAccountConfigToNamedAccount, p as updateMatrixAccountConfig, v as resolveMatrixAccountAsync } from "./setup-core-
|
|
5
|
-
import { r as isMatrixRoomId, t as isMatrixInviteAutoJoinTarget } from "./target-ids-
|
|
6
|
-
import { n as validateMatrixHomeserverUrl, t as resolveValidatedMatrixHomeserverUrl } from "./url-validation-
|
|
7
|
-
import { n as ensureMatrixSdkInstalled, r as isMatrixSdkAvailable } from "./deps-
|
|
1
|
+
import { n as __exportAll } from "./runtime-doctor-migrations-CSvRANPN.mjs";
|
|
2
|
+
import { i as requiresExplicitMatrixDefaultAccount, u as resolveMatrixEnvAuthReadiness } from "./account-selection-Cow3TMFO.mjs";
|
|
3
|
+
import { a as resolveMatrixAccountConfig } from "./account-config-CVM2a28p.mjs";
|
|
4
|
+
import { a as createMatrixSetupDmPolicy, g as resolveDefaultMatrixAccountId, m as listMatrixAccountIds, n as finishMatrixSetupAfterConfigWrite, o as moveSingleMatrixAccountConfigToNamedAccount, p as updateMatrixAccountConfig, v as resolveMatrixAccountAsync } from "./setup-core-C56b-HVD.mjs";
|
|
5
|
+
import { r as isMatrixRoomId, t as isMatrixInviteAutoJoinTarget } from "./target-ids-DltG_ZHJ.mjs";
|
|
6
|
+
import { n as validateMatrixHomeserverUrl, t as resolveValidatedMatrixHomeserverUrl } from "./url-validation-DesoKUns.mjs";
|
|
7
|
+
import { n as ensureMatrixSdkInstalled, r as isMatrixSdkAvailable } from "./deps-CVPT2Ros.mjs";
|
|
8
8
|
import { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/account-id";
|
|
9
9
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString, normalizeStringifiedOptionalString, normalizeUniqueStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
10
10
|
import { formatDocsLink, hasConfiguredSecretInput, mergeAllowFromEntries, normalizeAccountId as normalizeAccountId$1, promptAccountId, promptChannelAccessConfig, setSetupChannelEnabled, splitSetupEntries } from "openclaw/plugin-sdk/setup";
|
|
11
11
|
import { isPrivateOrLoopbackHost } from "openclaw/plugin-sdk/ssrf-runtime";
|
|
12
|
-
|
|
12
|
+
// extensions/matrix/src/onboarding.ts
|
|
13
13
|
var onboarding_exports = /* @__PURE__ */ __exportAll({ matrixOnboardingAdapter: () => matrixOnboardingAdapter });
|
|
14
14
|
const channel = "matrix";
|
|
15
15
|
const matrixInviteAutoJoinOptions = [
|
|
@@ -87,7 +87,7 @@ async function promptMatrixAllowFrom(params) {
|
|
|
87
87
|
pending.push(part);
|
|
88
88
|
}
|
|
89
89
|
if (pending.length > 0) {
|
|
90
|
-
const { resolveMatrixTargets } = await import("./resolve-targets-
|
|
90
|
+
const { resolveMatrixTargets } = await import("./resolve-targets-ZIJ6qkiK.mjs").then((n) => n.n);
|
|
91
91
|
const results = await resolveMatrixTargets({
|
|
92
92
|
cfg,
|
|
93
93
|
accountId,
|
|
@@ -192,7 +192,7 @@ async function runMatrixConfigure(params) {
|
|
|
192
192
|
resolvedIds.push(cleaned);
|
|
193
193
|
continue;
|
|
194
194
|
}
|
|
195
|
-
const { listMatrixDirectoryGroupsLive } = await import("./directory-live-
|
|
195
|
+
const { listMatrixDirectoryGroupsLive } = await import("./directory-live-Bok1h40u.mjs").then((n) => n.t);
|
|
196
196
|
const matches = await listMatrixDirectoryGroupsLive({
|
|
197
197
|
cfg: accessCfg,
|
|
198
198
|
accountId: selectedAccountId,
|
|
@@ -442,5 +442,4 @@ const matrixOnboardingAdapter = {
|
|
|
442
442
|
dmPolicy,
|
|
443
443
|
disable: (cfg) => setSetupChannelEnabled(cfg, channel, false)
|
|
444
444
|
};
|
|
445
|
-
//#endregion
|
|
446
445
|
export { onboarding_exports as n, matrixOnboardingAdapter as t };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { r as matrixPresentationCapabilities } from "./channel-
|
|
2
|
-
import { i as sendPollMatrix, r as sendMessageMatrix } from "./send-
|
|
1
|
+
import { r as matrixPresentationCapabilities } from "./channel-D4Ro9xGw.mjs";
|
|
2
|
+
import { i as sendPollMatrix, r as sendMessageMatrix } from "./send-DNqlA143.mjs";
|
|
3
3
|
import { createMessageReceiptFromOutboundResults, createReplyToFanout, resolveOutboundSendDep } from "openclaw/plugin-sdk/channel-outbound";
|
|
4
4
|
import { asOptionalRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
5
5
|
import { chunkTextForOutbound } from "openclaw/plugin-sdk/text-chunking";
|
|
6
6
|
import { attachChannelToResult } from "openclaw/plugin-sdk/channel-send-result";
|
|
7
7
|
import { renderMessagePresentationFallbackText, renderPresentationForDelivery } from "openclaw/plugin-sdk/interactive-runtime";
|
|
8
8
|
import { resolveSendableOutboundReplyParts, sendPayloadMediaSequence } from "openclaw/plugin-sdk/reply-payload";
|
|
9
|
-
|
|
9
|
+
// extensions/matrix/src/outbound.ts
|
|
10
10
|
const MATRIX_OPENCLAW_PRESENTATION_KEY = "com.openclaw.presentation";
|
|
11
11
|
const MATRIX_OPENCLAW_PRESENTATION_TYPE = "message.presentation";
|
|
12
12
|
const MATRIX_EMPTY_PRESENTATION_FALLBACK_TEXT = "---";
|
|
@@ -181,5 +181,4 @@ const matrixOutbound = {
|
|
|
181
181
|
};
|
|
182
182
|
}
|
|
183
183
|
};
|
|
184
|
-
//#endregion
|
|
185
184
|
export { prepareMatrixReplyPayload as n, resolveMatrixExtraContent as r, matrixOutbound as t };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { t as getMatrixRuntime } from "./runtime-
|
|
2
|
-
import { d as syncMatrixOwnProfile, p as updateMatrixAccountConfig } from "./setup-core-
|
|
3
|
-
import { n as resolveMatrixConfigPath } from "./config-paths-
|
|
4
|
-
import { l as resolveMatrixAuthContext } from "./client-
|
|
5
|
-
import { n as withResolvedActionClient } from "./client-
|
|
1
|
+
import { t as getMatrixRuntime } from "./runtime-Ck8TjD7L.mjs";
|
|
2
|
+
import { d as syncMatrixOwnProfile, p as updateMatrixAccountConfig } from "./setup-core-C56b-HVD.mjs";
|
|
3
|
+
import { n as resolveMatrixConfigPath } from "./config-paths-DBpHxDyc.mjs";
|
|
4
|
+
import { l as resolveMatrixAuthContext } from "./client-BPMbgtzn.mjs";
|
|
5
|
+
import { n as withResolvedActionClient } from "./client-DVAwx3tH.mjs";
|
|
6
6
|
import { buildOutboundMediaLoadOptions } from "openclaw/plugin-sdk/media-runtime";
|
|
7
7
|
import { resolveOutboundMediaAccessForConfig } from "openclaw/plugin-sdk/outbound-media";
|
|
8
|
-
|
|
8
|
+
// extensions/matrix/src/matrix/actions/profile.ts
|
|
9
9
|
async function updateMatrixOwnProfile(opts = {}) {
|
|
10
10
|
const runtime = getMatrixRuntime();
|
|
11
11
|
return await withResolvedActionClient(opts, async (client) => {
|
|
@@ -27,8 +27,7 @@ async function updateMatrixOwnProfile(opts = {}) {
|
|
|
27
27
|
});
|
|
28
28
|
});
|
|
29
29
|
}
|
|
30
|
-
|
|
31
|
-
//#region extensions/matrix/src/profile-update.ts
|
|
30
|
+
// extensions/matrix/src/profile-update.ts
|
|
32
31
|
async function applyMatrixProfileUpdate(params) {
|
|
33
32
|
const runtime = getMatrixRuntime();
|
|
34
33
|
const persistedCfg = runtime.config.current();
|
|
@@ -66,5 +65,4 @@ async function applyMatrixProfileUpdate(params) {
|
|
|
66
65
|
configPath: resolveMatrixConfigPath(updated, accountId)
|
|
67
66
|
};
|
|
68
67
|
}
|
|
69
|
-
//#endregion
|
|
70
68
|
export { updateMatrixOwnProfile as n, applyMatrixProfileUpdate as t };
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { a as resolveMatrixAccountConfig } from "./account-config-
|
|
2
|
-
import { a as resolveMatrixInboundRouteAsync, o as resolveMatrixThreadRouting } from "./channel-
|
|
3
|
-
import { c as extractMatrixReactionAnnotation } from "./send-currentness-
|
|
4
|
-
import { p as resolveMatrixThreadRootId } from "./direct-management-
|
|
5
|
-
import { i as resolveMatrixApprovalReactionTargetWithPersistence, o as unregisterMatrixApprovalReactionTargetsForApproval } from "./approval-reactions-
|
|
1
|
+
import { a as resolveMatrixAccountConfig } from "./account-config-CVM2a28p.mjs";
|
|
2
|
+
import { a as resolveMatrixInboundRouteAsync, o as resolveMatrixThreadRouting } from "./channel-D4Ro9xGw.mjs";
|
|
3
|
+
import { c as extractMatrixReactionAnnotation } from "./send-currentness-D1x6YP9O.mjs";
|
|
4
|
+
import { p as resolveMatrixThreadRootId } from "./direct-management-D59C1WO-.mjs";
|
|
5
|
+
import { i as resolveMatrixApprovalReactionTargetWithPersistence, o as unregisterMatrixApprovalReactionTargetsForApproval } from "./approval-reactions-Bz_8XB01.mjs";
|
|
6
6
|
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
7
7
|
import { isApprovalNotFoundError } from "openclaw/plugin-sdk/error-runtime";
|
|
8
8
|
import { normalizeAccountId } from "openclaw/plugin-sdk/routing";
|
|
9
9
|
import { getSessionBindingService } from "openclaw/plugin-sdk/session-binding-runtime";
|
|
10
|
-
|
|
11
|
-
const loadApprovalReactionAuth = createLazyRuntimeModule(() => import("./channel-
|
|
10
|
+
// extensions/matrix/src/matrix/monitor/reaction-events.ts
|
|
11
|
+
const loadApprovalReactionAuth = createLazyRuntimeModule(() => import("./channel-D4Ro9xGw.mjs").then((n) => n.s));
|
|
12
12
|
const loadExecApprovalResolver = createLazyRuntimeModule(() => import("openclaw/plugin-sdk/approval-gateway-runtime"));
|
|
13
|
-
const loadMatrixSend = createLazyRuntimeModule(() => import("./send-
|
|
13
|
+
const loadMatrixSend = createLazyRuntimeModule(() => import("./send-DNqlA143.mjs").then((n) => n.s));
|
|
14
14
|
function buildMatrixApprovalTerminalText(result) {
|
|
15
15
|
const approval = result.approval;
|
|
16
16
|
const terminalLabel = approval.status === "allowed" ? approval.decision === "allow-always" ? "Allowed always" : "Allowed once" : approval.status === "denied" ? "Denied" : approval.status === "expired" ? "Expired" : "Cancelled";
|
|
@@ -139,5 +139,4 @@ async function handleInboundMatrixReaction(params) {
|
|
|
139
139
|
});
|
|
140
140
|
params.logVerboseMessage(`matrix: reaction event enqueued room=${params.roomId} target=${reaction.eventId} sender=${params.senderId} emoji=${reaction.key}`);
|
|
141
141
|
}
|
|
142
|
-
//#endregion
|
|
143
142
|
export { handleInboundMatrixReaction };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { n as __exportAll } from "./runtime-doctor-migrations-
|
|
2
|
-
import { i as normalizeMatrixMessagingTarget, n as isMatrixQualifiedUserId } from "./target-ids-
|
|
3
|
-
import { n as listMatrixDirectoryGroupsLive, r as listMatrixDirectoryPeersLive } from "./directory-live-
|
|
1
|
+
import { n as __exportAll } from "./runtime-doctor-migrations-CSvRANPN.mjs";
|
|
2
|
+
import { i as normalizeMatrixMessagingTarget, n as isMatrixQualifiedUserId } from "./target-ids-DltG_ZHJ.mjs";
|
|
3
|
+
import { n as listMatrixDirectoryGroupsLive, r as listMatrixDirectoryPeersLive } from "./directory-live-Bok1h40u.mjs";
|
|
4
4
|
import { normalizeOptionalLowercaseString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
5
|
-
|
|
5
|
+
// extensions/matrix/src/resolve-targets.ts
|
|
6
6
|
var resolve_targets_exports = /* @__PURE__ */ __exportAll({ resolveMatrixTargets: () => resolveMatrixTargets });
|
|
7
7
|
function findExactDirectoryMatches(matches, query) {
|
|
8
8
|
const normalized = normalizeOptionalLowercaseString(query);
|
|
@@ -77,5 +77,4 @@ async function resolveMatrixTargets(params) {
|
|
|
77
77
|
}
|
|
78
78
|
return results;
|
|
79
79
|
}
|
|
80
|
-
//#endregion
|
|
81
80
|
export { resolve_targets_exports as n, resolveMatrixTargets as t };
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import { t as getMatrixRuntime } from "./runtime-1kn1P6io.mjs";
|
|
2
1
|
import { extractErrorCode } from "openclaw/plugin-sdk/error-runtime";
|
|
3
2
|
import { isRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
4
3
|
import path from "node:path";
|
|
5
|
-
import os from "node:os";
|
|
6
4
|
import fs from "node:fs/promises";
|
|
7
|
-
|
|
5
|
+
// extensions/matrix/src/matrix/chunked-state.ts
|
|
8
6
|
function chunkMatrixStateJson(value, maxBytes, maxChunks, limitMessage) {
|
|
9
7
|
const chunks = [];
|
|
10
8
|
const pushChunk = (chunk) => {
|
|
@@ -48,42 +46,7 @@ async function pruneMatrixStateChunks(store, retainedKeys, chunkKeyPrefix) {
|
|
|
48
46
|
const nextChunkKeys = new Set(retainedKeys);
|
|
49
47
|
for (const row of await store.entries()) if (row.key.startsWith(chunkKeyPrefix) && !nextChunkKeys.has(row.key)) await store.delete(row.key);
|
|
50
48
|
}
|
|
51
|
-
|
|
52
|
-
//#region extensions/matrix/src/matrix/sqlite-state.ts
|
|
53
|
-
function resolveStateDirOverride(options) {
|
|
54
|
-
if (!options) return;
|
|
55
|
-
return options.stateDir || getMatrixRuntime().state.resolveStateDir(options.env ?? process.env, os.homedir);
|
|
56
|
-
}
|
|
57
|
-
function resolveMatrixSqliteStateKey(options) {
|
|
58
|
-
return resolveStateDirOverride(options) ?? "";
|
|
59
|
-
}
|
|
60
|
-
function resolveMatrixSqliteStateEnv(options) {
|
|
61
|
-
const stateDir = resolveStateDirOverride(options);
|
|
62
|
-
if (!stateDir) return options?.env;
|
|
63
|
-
return {
|
|
64
|
-
...options?.env ?? process.env,
|
|
65
|
-
OPENCLAW_STATE_DIR: stateDir
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
async function updateMatrixKeyedState(store, key, update, onUndefined = "keep") {
|
|
69
|
-
let observation = await store.observe(key);
|
|
70
|
-
for (;;) {
|
|
71
|
-
const value = update(observation.value);
|
|
72
|
-
if (value === void 0 && onUndefined === "skip") return false;
|
|
73
|
-
const result = await store.compareAndApply(key, observation.comparison, value === void 0 ? {
|
|
74
|
-
operation: "update",
|
|
75
|
-
action: "keep"
|
|
76
|
-
} : {
|
|
77
|
-
operation: "update",
|
|
78
|
-
action: "set",
|
|
79
|
-
value
|
|
80
|
-
});
|
|
81
|
-
if (result.status !== "conflict") return true;
|
|
82
|
-
observation = result.current;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
//#endregion
|
|
86
|
-
//#region extensions/matrix/src/matrix/retired-state.ts
|
|
49
|
+
// extensions/matrix/src/matrix/retired-state.ts
|
|
87
50
|
const RETIRED_MATRIX_STATE_FILENAMES = /* @__PURE__ */ new Set([
|
|
88
51
|
"thread-bindings.json",
|
|
89
52
|
"startup-verification.json",
|
|
@@ -109,5 +72,4 @@ async function assertMatrixSupportedStateFile(filePath) {
|
|
|
109
72
|
}
|
|
110
73
|
throw new Error(describeRetiredMatrixState(filePath));
|
|
111
74
|
}
|
|
112
|
-
|
|
113
|
-
export { describeRetiredMatrixState as a, updateMatrixKeyedState as c, readMatrixStateChunks as d, writeMatrixStateChunks as f, assertMatrixSupportedStateRoot as i, chunkMatrixStateJson as l, RETIRED_MATRIX_STATE_REMEDIATION as n, resolveMatrixSqliteStateEnv as o, assertMatrixSupportedStateFile as r, resolveMatrixSqliteStateKey as s, RETIRED_MATRIX_STATE_FILENAMES as t, pruneMatrixStateChunks as u };
|
|
75
|
+
export { describeRetiredMatrixState as a, readMatrixStateChunks as c, assertMatrixSupportedStateRoot as i, writeMatrixStateChunks as l, RETIRED_MATRIX_STATE_REMEDIATION as n, chunkMatrixStateJson as o, assertMatrixSupportedStateFile as r, pruneMatrixStateChunks as s, RETIRED_MATRIX_STATE_FILENAMES as t };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { T as setBoundedMap } from "./send-
|
|
2
|
-
import { n as isMatrixNotFoundError } from "./errors-
|
|
3
|
-
import { s as EventType } from "./messages-
|
|
4
|
-
import { r as withResolvedRoomAction } from "./client-
|
|
1
|
+
import { T as setBoundedMap } from "./send-DNqlA143.mjs";
|
|
2
|
+
import { n as isMatrixNotFoundError } from "./errors-CL3YJV8U.mjs";
|
|
3
|
+
import { s as EventType } from "./messages-DJnlpqat.mjs";
|
|
4
|
+
import { r as withResolvedRoomAction } from "./client-DVAwx3tH.mjs";
|
|
5
5
|
import { filterStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
6
|
-
|
|
6
|
+
// extensions/matrix/src/matrix/actions/room.ts
|
|
7
7
|
async function getMatrixMemberInfo(userId, opts) {
|
|
8
8
|
return await withResolvedRoomAction(opts.roomId, opts, async (client, roomId) => {
|
|
9
9
|
if (!(await client.getJoinedRoomMembers(roomId)).includes(userId)) throw new Error(`User ${userId} is not a member of room ${roomId}`);
|
|
@@ -42,8 +42,7 @@ async function getMatrixRoomInfo(roomId, opts = {}) {
|
|
|
42
42
|
};
|
|
43
43
|
});
|
|
44
44
|
}
|
|
45
|
-
|
|
46
|
-
//#region extensions/matrix/src/matrix/monitor/room-info.ts
|
|
45
|
+
// extensions/matrix/src/matrix/monitor/room-info.ts
|
|
47
46
|
const MAX_ROOM_INFO = 1024;
|
|
48
47
|
const MAX_MEMBER_DISPLAY_NAMES = 4096;
|
|
49
48
|
function createMatrixRoomInfoResolver(client) {
|
|
@@ -126,5 +125,4 @@ function createMatrixRoomInfoResolver(client) {
|
|
|
126
125
|
invalidateRoomName
|
|
127
126
|
};
|
|
128
127
|
}
|
|
129
|
-
//#endregion
|
|
130
128
|
export { getMatrixMemberInfo as n, getMatrixRoomInfo as r, createMatrixRoomInfoResolver as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createPluginRuntimeStore } from "openclaw/plugin-sdk/runtime-store";
|
|
2
|
-
|
|
2
|
+
// extensions/matrix/src/runtime.ts
|
|
3
3
|
const { setRuntime: setMatrixRuntime, getRuntime: getMatrixRuntime, tryGetRuntime: getOptionalMatrixRuntime } = createPluginRuntimeStore({
|
|
4
4
|
pluginId: "matrix",
|
|
5
5
|
errorMessage: "Matrix runtime not initialized"
|
|
@@ -25,5 +25,4 @@ function getMatrixRuntimeLifecycle() {
|
|
|
25
25
|
const runtime = getOptionalMatrixRuntime();
|
|
26
26
|
return runtime ? runtimeLifecycles.tryGetRuntime()?.get(runtime) : void 0;
|
|
27
27
|
}
|
|
28
|
-
//#endregion
|
|
29
28
|
export { setMatrixRuntimeLifecycle as a, setMatrixRuntime as i, getMatrixRuntimeLifecycle as n, getOptionalMatrixRuntime as r, getMatrixRuntime as t };
|