@openclaw/matrix 2026.6.11 → 2026.7.1-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/api.js +4 -4
- package/dist/{approval-handler.runtime-CK5HedmU.js → approval-handler.runtime-DzpLXVdc.js} +4 -4
- package/dist/{approval-ids-gM2AFaP-.js → approval-ids-R834n6m3.js} +1 -1
- package/dist/{approval-reaction-auth--lKUos8v.js → approval-reaction-auth-eAqCXUFG.js} +2 -2
- package/dist/{channel-Y_HGdzpZ.js → channel-KcNo9qtl.js} +18 -22
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel.runtime-DkbZfBYE.js → channel.runtime-DtsGVgZj.js} +7 -10
- package/dist/{cli-ZiO7g1vT.js → cli-Clvpw_8I.js} +10 -17
- package/dist/{cli-metadata-Cn_UFU3u.js → cli-metadata-D3N0Avnt.js} +1 -1
- package/dist/cli-metadata.js +1 -1
- package/dist/{client-DnNqVfCX.js → client-BQz5GcYr.js} +2 -2
- package/dist/{client-COdtuzoa.js → client-D-5GVz_D.js} +2 -2
- package/dist/{client-bootstrap-DoOOMP52.js → client-bootstrap-CBJciU5u.js} +6 -9
- package/dist/{config-schema-o1UmRtMF.js → config-schema-Dn-fHID8.js} +1 -1
- package/dist/contract-api.js +2 -2
- package/dist/{create-client-DWe5jGGk.js → create-client-DhGid8FE.js} +7 -10
- package/dist/{credentials-write.runtime-cZhhyGAZ.js → credentials-write.runtime-5PDPPG9f.js} +2 -5
- package/dist/{crypto-runtime-DaHFPR8x.js → crypto-runtime-B7kyrTL0.js} +9 -7
- package/dist/{deps-BVWGd2XS.js → deps-D3bkh48_.js} +3 -3
- package/dist/{directory-live-D4ibL3X0.js → directory-live-Ctu4whZK.js} +3 -3
- package/dist/{doctor-BwpkOBwr.js → doctor-BRSDNU5C.js} +1 -1
- package/dist/doctor-contract-api.js +2 -2
- package/dist/{draft-stream-aZa1gWNI.js → draft-stream-j71tSUu-.js} +1 -1
- package/dist/{file-sync-store-1GY-yvy-.js → file-sync-store-BWLVB01Y.js} +1 -1
- package/dist/{http-client-BBfH0FfA.js → http-client-nSmFiVgk.js} +11 -6
- package/dist/index.js +3 -6
- package/dist/{legacy-crypto-inspector-tJOj25VL.js → legacy-crypto-inspector-D_8iylBq.js} +1 -1
- package/dist/{legacy-crypto-restore-DenIM7bT.js → legacy-crypto-restore-B0gcIEkE.js} +1 -1
- package/dist/{matrix-migration.runtime-dvxE3e5l.js → matrix-migration.runtime-Ctlb_rZl.js} +1 -1
- package/dist/{media-text-DS2lvlA2.js → media-text-XO4VaezT.js} +1 -1
- package/dist/{messages-CMTiMecS.js → messages-nQLGGa1r.js} +3 -3
- package/dist/{monitor-BpvP2_nj.js → monitor-k3Sko8qt.js} +50 -77
- package/dist/plugin-entry.handlers.runtime.js +2 -5
- package/dist/probe.runtime-BED7DXis.js +3 -0
- package/dist/{profile-update-DUh6sAqK.js → profile-update-DIOAhezh.js} +2 -2
- package/dist/{reaction-events-CABcpM-q.js → reaction-events-BDsbR82F.js} +3 -10
- package/dist/{resolve-targets-Byrcsv59.js → resolve-targets-BbrinjHd.js} +1 -1
- package/dist/{resolver.runtime-Blu9khLB.js → resolver.runtime-B3N7k_6-.js} +1 -1
- package/dist/runtime-api.js +1 -1
- package/dist/runtime-heavy-api.js +1 -1
- package/dist/{sdk-CpYofZkF.js → sdk-eyqOqjmn.js} +9 -12
- package/dist/{send-eoayPB_l.js → send-D0hpevF-.js} +2 -5
- package/dist/session-binding-contract-api.js +1 -1
- package/dist/{setup-bootstrap-DRzRwu9E.js → setup-bootstrap-Ihb_DM2a.js} +2 -2
- package/dist/{setup-core-Ub_idsu1.js → setup-core-D2BQs8w1.js} +1 -1
- package/dist/setup-plugin-api.js +3 -3
- package/dist/{setup-surface-CXenmuMm.js → setup-surface-1qf1LZIP.js} +5 -5
- package/dist/{shared-CSN0TWWD.js → shared-BGcaBMK3.js} +15 -31
- package/dist/{startup-verification-Bl_QJ2BQ.js → startup-verification-Bd31KqLv.js} +1 -1
- package/dist/{storage-BSLHjdgS.js → storage-t5S-5c_5.js} +27 -12
- package/dist/subagent-hooks-api.js +2 -5
- package/dist/{thread-bindings-DuoPRata.js → thread-bindings-BnuBS0VH.js} +2 -2
- package/dist/{tool-actions.runtime-BwP9E9M0.js → tool-actions.runtime-BeUveYxV.js} +6 -6
- package/dist/{verification-BN8M6A73.js → verification-CNw2K4uT.js} +1 -1
- package/npm-shrinkwrap.json +3 -3
- package/package.json +4 -4
- package/dist/probe.runtime-DKRqRegP.js +0 -3
package/dist/api.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { a as resolveMatrixDefaultOrOnlyAccountId, i as resolveMatrixChannelConfig, n as requiresExplicitMatrixDefaultAccount, r as resolveConfiguredMatrixAccountIds, t as findMatrixAccountEntry } from "./account-selection-Bv_ZuOu4.js";
|
|
2
2
|
import { n as listMatrixEnvAccountIds, r as resolveMatrixEnvAccountToken, t as getMatrixScopedEnvVarNames } from "./env-vars-KzaYveuy.js";
|
|
3
3
|
import { a as resolveMatrixCredentialsPath, c as resolveMatrixLegacyFlatStoreRoot, i as resolveMatrixCredentialsFilename, l as sanitizeMatrixPathSegment, n as resolveMatrixAccountStorageRoot, o as resolveMatrixHomeserverKey, r as resolveMatrixCredentialsDir, s as resolveMatrixLegacyFlatStoragePaths, t as hashMatrixAccessToken } from "./storage-paths-BWo_ZEMC.js";
|
|
4
|
-
import { n as matrixSetupAdapter, t as createMatrixSetupWizardProxy } from "./setup-core-
|
|
5
|
-
import { t as matrixPlugin } from "./channel-
|
|
4
|
+
import { n as matrixSetupAdapter, t as createMatrixSetupWizardProxy } from "./setup-core-D2BQs8w1.js";
|
|
5
|
+
import { t as matrixPlugin } from "./channel-KcNo9qtl.js";
|
|
6
6
|
import { d as setMatrixThreadBindingIdleTimeoutBySessionKey, n as getMatrixThreadBindingManager, p as setMatrixThreadBindingMaxAgeBySessionKey, s as resetMatrixThreadBindingsForTests } from "./thread-bindings-shared-CKnY4LSd.js";
|
|
7
|
-
import { n as matrixOnboardingAdapter } from "./setup-surface-
|
|
8
|
-
import { t as createMatrixThreadBindingManager } from "./thread-bindings-
|
|
7
|
+
import { n as matrixOnboardingAdapter } from "./setup-surface-1qf1LZIP.js";
|
|
8
|
+
import { t as createMatrixThreadBindingManager } from "./thread-bindings-BnuBS0VH.js";
|
|
9
9
|
//#region extensions/matrix/api.ts
|
|
10
10
|
const matrixSessionBindingAdapterChannels = ["matrix"];
|
|
11
11
|
//#endregion
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { g as resolveMatrixAccount } from "./setup-core-
|
|
2
|
-
import { _ as shouldHandleMatrixApprovalRequest, g as isMatrixAnyApprovalClientEnabled } from "./channel-
|
|
1
|
+
import { g as resolveMatrixAccount } from "./setup-core-D2BQs8w1.js";
|
|
2
|
+
import { _ as shouldHandleMatrixApprovalRequest, g as isMatrixAnyApprovalClientEnabled } from "./channel-KcNo9qtl.js";
|
|
3
3
|
import { a as resolveMatrixTargetIdentity } from "./target-ids-B-5aQxwn.js";
|
|
4
|
-
import { a as sendMessageMatrix, i as reactMatrixMessage, p as repairMatrixDirectRooms, s as sendSingleTextMessageMatrix } from "./send-
|
|
4
|
+
import { a as sendMessageMatrix, i as reactMatrixMessage, p as repairMatrixDirectRooms, s as sendSingleTextMessageMatrix } from "./send-D0hpevF-.js";
|
|
5
5
|
import { a as unregisterMatrixApprovalReactionTarget, n as listMatrixApprovalReactionBindings, r as registerMatrixApprovalReactionTarget, t as buildMatrixApprovalReactionHint } from "./approval-reactions-BRGQgOu2.js";
|
|
6
|
-
import { n as editMatrixMessage, t as deleteMatrixMessage } from "./messages-
|
|
6
|
+
import { n as editMatrixMessage, t as deleteMatrixMessage } from "./messages-nQLGGa1r.js";
|
|
7
7
|
import { listMessageReceiptPlatformIds, resolveMessageReceiptPrimaryId } from "openclaw/plugin-sdk/channel-outbound";
|
|
8
8
|
import { normalizeUniqueStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
9
9
|
import { buildChannelApprovalNativeTargetKey } from "openclaw/plugin-sdk/approval-native-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as normalizeMatrixUserId } from "./config-schema-
|
|
1
|
+
import { a as normalizeMatrixUserId } from "./config-schema-Dn-fHID8.js";
|
|
2
2
|
//#region extensions/matrix/src/approval-ids.ts
|
|
3
3
|
function normalizeMatrixApproverId(value) {
|
|
4
4
|
return normalizeMatrixUserId(String(value)) || void 0;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { g as resolveMatrixAccount } from "./setup-core-
|
|
2
|
-
import { t as normalizeMatrixApproverId } from "./approval-ids-
|
|
1
|
+
import { g as resolveMatrixAccount } from "./setup-core-D2BQs8w1.js";
|
|
2
|
+
import { t as normalizeMatrixApproverId } from "./approval-ids-R834n6m3.js";
|
|
3
3
|
import { resolveApprovalApprovers } from "openclaw/plugin-sdk/approval-auth-runtime";
|
|
4
4
|
//#region extensions/matrix/src/approval-reaction-auth.ts
|
|
5
5
|
function normalizeMatrixExecApproverId(value) {
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { n as requiresExplicitMatrixDefaultAccount } from "./account-selection-Bv_ZuOu4.js";
|
|
2
2
|
import { a as resolveMatrixAccountConfig } from "./account-config-BZWN9tGS.js";
|
|
3
|
-
import { d as resolveSingleAccountPromotionTarget, f as singleAccountKeysToMove, g as resolveMatrixAccount, h as resolveDefaultMatrixAccountId, n as matrixSetupAdapter, p as listMatrixAccountIds, t as createMatrixSetupWizardProxy, u as namedAccountPromotionKeys } from "./setup-core-
|
|
4
|
-
import { a as normalizeMatrixUserId, n as DEFAULT_ACCOUNT_ID$2, r as matrixConfigAdapter, t as MatrixChannelConfigSchema } from "./config-schema-
|
|
5
|
-
import { t as normalizeMatrixApproverId } from "./approval-ids-
|
|
3
|
+
import { d as resolveSingleAccountPromotionTarget, f as singleAccountKeysToMove, g as resolveMatrixAccount, h as resolveDefaultMatrixAccountId, n as matrixSetupAdapter, p as listMatrixAccountIds, t as createMatrixSetupWizardProxy, u as namedAccountPromotionKeys } from "./setup-core-D2BQs8w1.js";
|
|
4
|
+
import { a as normalizeMatrixUserId, n as DEFAULT_ACCOUNT_ID$2, r as matrixConfigAdapter, t as MatrixChannelConfigSchema } from "./config-schema-Dn-fHID8.js";
|
|
5
|
+
import { t as normalizeMatrixApproverId } from "./approval-ids-R834n6m3.js";
|
|
6
6
|
import { a as resolveMatrixTargetIdentity, i as resolveMatrixDirectUserId, n as normalizeMatrixMessagingTarget, r as normalizeMatrixResolvableTarget } from "./target-ids-B-5aQxwn.js";
|
|
7
7
|
import { t as formatMatrixErrorMessage } from "./errors-C47hvAF8.js";
|
|
8
8
|
import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-Dq8OZWHF.js";
|
|
9
9
|
import { d as setMatrixThreadBindingIdleTimeoutBySessionKey, p as setMatrixThreadBindingMaxAgeBySessionKey } from "./thread-bindings-shared-CKnY4LSd.js";
|
|
10
10
|
import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-DTgQyQxc.js";
|
|
11
|
-
import { i as autoPrepareLegacyMatrixCrypto, o as autoMigrateLegacyMatrixState, r as resolveMatrixMigrationStatus } from "./matrix-migration.runtime-
|
|
11
|
+
import { i as autoPrepareLegacyMatrixCrypto, o as autoMigrateLegacyMatrixState, r as resolveMatrixMigrationStatus } from "./matrix-migration.runtime-Ctlb_rZl.js";
|
|
12
12
|
import { t as maybeCreateMatrixMigrationSnapshot } from "./migration-snapshot-backup-YcCrSjbE.js";
|
|
13
13
|
import { n as resolveMatrixInboundConversation } from "./thread-binding-api-DRbBZlhS.js";
|
|
14
|
+
import { createLazyRuntimeModule, createLazyRuntimeNamedExport } from "openclaw/plugin-sdk/lazy-runtime";
|
|
14
15
|
import { describeAccountSnapshot } from "openclaw/plugin-sdk/account-helpers";
|
|
15
16
|
import { adaptScopedAccountAccessor, createScopedDmSecurityResolver } from "openclaw/plugin-sdk/channel-config-helpers";
|
|
16
17
|
import { buildChannelOutboundSessionRoute, buildThreadAwareOutboundSessionRoute, createChatChannelPlugin } from "openclaw/plugin-sdk/channel-core";
|
|
@@ -18,10 +19,9 @@ import { createChannelMessageAdapterFromOutbound, createReplyPrefixOptions, crea
|
|
|
18
19
|
import { createAllowlistProviderOpenWarningCollector, projectAccountConfigWarningCollector } from "openclaw/plugin-sdk/channel-policy";
|
|
19
20
|
import { createScopedAccountReplyToModeResolver } from "openclaw/plugin-sdk/conversation-runtime";
|
|
20
21
|
import { createChannelDirectoryAdapter, createResolvedDirectoryEntriesLister, createRuntimeDirectoryLiveAdapter } from "openclaw/plugin-sdk/directory-runtime";
|
|
21
|
-
import { createLazyRuntimeNamedExport } from "openclaw/plugin-sdk/lazy-runtime";
|
|
22
22
|
import { buildProbeChannelStatusSummary, collectStatusIssuesFromLastError, createComputedAccountStatusAdapter, createDefaultChannelRuntimeState } from "openclaw/plugin-sdk/status-helpers";
|
|
23
23
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString, normalizeOptionalStringifiedId } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
24
|
-
import { chunkTextForOutbound } from "openclaw/plugin-sdk/text-chunking";
|
|
24
|
+
import { chunkTextForOutbound, sanitizeAssistantVisibleText } from "openclaw/plugin-sdk/text-chunking";
|
|
25
25
|
import { ToolAuthorizationError, createActionGate, readPositiveIntegerParam, readStringParam } from "openclaw/plugin-sdk/channel-actions";
|
|
26
26
|
import { extractToolSend } from "openclaw/plugin-sdk/tool-send";
|
|
27
27
|
import { Type } from "typebox";
|
|
@@ -38,7 +38,7 @@ import { PAIRING_APPROVED_MESSAGE } from "openclaw/plugin-sdk/channel-status";
|
|
|
38
38
|
import { formatLocationText, logInboundDrop, toLocationContext } from "openclaw/plugin-sdk/channel-inbound";
|
|
39
39
|
import { getAgentScopedMediaLocalRoots } from "openclaw/plugin-sdk/agent-media-payload";
|
|
40
40
|
import { buildChannelKeyCandidates, resolveChannelEntryMatch } from "openclaw/plugin-sdk/channel-targets";
|
|
41
|
-
import {
|
|
41
|
+
import { getSessionEntry, resolveStorePath } from "openclaw/plugin-sdk/session-store-runtime";
|
|
42
42
|
//#region extensions/matrix/src/actions.ts
|
|
43
43
|
const MATRIX_PLUGIN_HANDLED_ACTIONS = new Set([
|
|
44
44
|
"send",
|
|
@@ -129,7 +129,7 @@ const matrixMessageActions = {
|
|
|
129
129
|
return extractToolSend(args, "sendMessage");
|
|
130
130
|
},
|
|
131
131
|
handleAction: async (ctx) => {
|
|
132
|
-
const { handleMatrixAction } = await import("./tool-actions.runtime-
|
|
132
|
+
const { handleMatrixAction } = await import("./tool-actions.runtime-BeUveYxV.js");
|
|
133
133
|
const { action, params, cfg, accountId, mediaLocalRoots } = ctx;
|
|
134
134
|
const dispatch = async (actionParams) => await handleMatrixAction({
|
|
135
135
|
...actionParams,
|
|
@@ -594,7 +594,7 @@ const matrixNativeApprovalCapability = createApproverRestrictedNativeApprovalCap
|
|
|
594
594
|
accountId,
|
|
595
595
|
request
|
|
596
596
|
}),
|
|
597
|
-
load: async () => (await import("./approval-handler.runtime-
|
|
597
|
+
load: async () => (await import("./approval-handler.runtime-DzpLXVdc.js")).matrixApprovalNativeRuntime
|
|
598
598
|
})
|
|
599
599
|
});
|
|
600
600
|
const splitMatrixApprovalCapability = splitChannelApprovalCapability(matrixNativeApprovalCapability);
|
|
@@ -756,7 +756,7 @@ function resolveMatrixGroupToolPolicy(params) {
|
|
|
756
756
|
}
|
|
757
757
|
//#endregion
|
|
758
758
|
//#region extensions/matrix/src/resolver.ts
|
|
759
|
-
const loadMatrixChannelRuntime$1 = createLazyRuntimeNamedExport(() => import("./resolver.runtime-
|
|
759
|
+
const loadMatrixChannelRuntime$1 = createLazyRuntimeNamedExport(() => import("./resolver.runtime-B3N7k_6-.js"), "matrixResolverRuntime");
|
|
760
760
|
const matrixResolverAdapter = { resolveTargets: async ({ cfg, accountId, inputs, kind, runtime }) => (await loadMatrixChannelRuntime$1()).resolveMatrixTargets({
|
|
761
761
|
cfg,
|
|
762
762
|
accountId,
|
|
@@ -823,11 +823,10 @@ function resolveMatrixCurrentDmRoomId(params) {
|
|
|
823
823
|
const sessionKey = parseThreadSessionSuffix(params.currentSessionKey).baseSessionKey ?? params.currentSessionKey?.trim();
|
|
824
824
|
if (!sessionKey) return;
|
|
825
825
|
try {
|
|
826
|
-
const
|
|
827
|
-
|
|
826
|
+
const currentSession = resolveMatrixStoredSessionMeta(getSessionEntry({
|
|
827
|
+
storePath: resolveStorePath(params.cfg.session?.store, { agentId: params.agentId }),
|
|
828
828
|
sessionKey
|
|
829
|
-
})
|
|
830
|
-
const currentSession = resolveMatrixStoredSessionMeta(existing);
|
|
829
|
+
}));
|
|
831
830
|
if (!currentSession) return;
|
|
832
831
|
if (currentSession.accountId && currentSession.accountId !== params.accountId) return;
|
|
833
832
|
if (!currentSession.directUserId || currentSession.directUserId !== params.targetUserId) return;
|
|
@@ -945,13 +944,9 @@ async function runMatrixStartupMaintenance(params) {
|
|
|
945
944
|
//#endregion
|
|
946
945
|
//#region extensions/matrix/src/channel.ts
|
|
947
946
|
let matrixStartupLock = Promise.resolve();
|
|
948
|
-
const loadMatrixSetupWizard = createLazyRuntimeNamedExport(() => import("./setup-surface-
|
|
949
|
-
const loadMatrixChannelRuntime = createLazyRuntimeNamedExport(() => import("./channel.runtime-
|
|
950
|
-
|
|
951
|
-
const loadMatrixDoctorModule = async () => {
|
|
952
|
-
matrixDoctorModulePromise ??= import("./doctor-BwpkOBwr.js");
|
|
953
|
-
return await matrixDoctorModulePromise;
|
|
954
|
-
};
|
|
947
|
+
const loadMatrixSetupWizard = createLazyRuntimeNamedExport(() => import("./setup-surface-1qf1LZIP.js").then((n) => n.t), "matrixSetupWizard");
|
|
948
|
+
const loadMatrixChannelRuntime = createLazyRuntimeNamedExport(() => import("./channel.runtime-DtsGVgZj.js"), "matrixChannelRuntime");
|
|
949
|
+
const loadMatrixDoctorModule = createLazyRuntimeModule(() => import("./doctor-BRSDNU5C.js"));
|
|
955
950
|
const meta = {
|
|
956
951
|
id: "matrix",
|
|
957
952
|
label: "Matrix",
|
|
@@ -1103,6 +1098,7 @@ const matrixChannelOutbound = {
|
|
|
1103
1098
|
chunker: chunkTextForOutbound,
|
|
1104
1099
|
chunkerMode: "markdown",
|
|
1105
1100
|
textChunkLimit: 4e3,
|
|
1101
|
+
sanitizeText: ({ text }) => sanitizeAssistantVisibleText(text),
|
|
1106
1102
|
deliveryCapabilities: { durableFinal: {
|
|
1107
1103
|
text: true,
|
|
1108
1104
|
media: true,
|
|
@@ -1322,7 +1318,7 @@ const matrixPlugin = createChatChannelPlugin({
|
|
|
1322
1318
|
await previousLock;
|
|
1323
1319
|
let monitorMatrixProvider;
|
|
1324
1320
|
try {
|
|
1325
|
-
monitorMatrixProvider = (await import("./monitor-
|
|
1321
|
+
monitorMatrixProvider = (await import("./monitor-k3Sko8qt.js")).monitorMatrixProvider;
|
|
1326
1322
|
} finally {
|
|
1327
1323
|
releaseLock();
|
|
1328
1324
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as matrixPlugin } from "./channel-
|
|
1
|
+
import { t as matrixPlugin } from "./channel-KcNo9qtl.js";
|
|
2
2
|
export { matrixPlugin };
|
|
@@ -1,21 +1,18 @@
|
|
|
1
|
-
import { a as sendMessageMatrix, c as sendTypingMatrix, o as sendPollMatrix } from "./send-
|
|
1
|
+
import { a as sendMessageMatrix, c as sendTypingMatrix, o as sendPollMatrix } from "./send-D0hpevF-.js";
|
|
2
2
|
import { t as isBunRuntime } from "./runtime-BefyhPWv.js";
|
|
3
|
-
import { f as resolveMatrixAuth } from "./shared-
|
|
4
|
-
import "./client-
|
|
5
|
-
import { n as listMatrixDirectoryGroupsLive, r as listMatrixDirectoryPeersLive } from "./directory-live-
|
|
3
|
+
import { f as resolveMatrixAuth } from "./shared-BGcaBMK3.js";
|
|
4
|
+
import "./client-D-5GVz_D.js";
|
|
5
|
+
import { n as listMatrixDirectoryGroupsLive, r as listMatrixDirectoryPeersLive } from "./directory-live-Ctu4whZK.js";
|
|
6
6
|
import { f as resolveOutboundSendDep, n as chunkTextForOutbound } from "./runtime-api-CsBoesCU.js";
|
|
7
|
-
import { t as resolveMatrixTargets } from "./resolve-targets-
|
|
7
|
+
import { t as resolveMatrixTargets } from "./resolve-targets-BbrinjHd.js";
|
|
8
|
+
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
8
9
|
import { createReplyToFanout } from "openclaw/plugin-sdk/channel-outbound";
|
|
9
10
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
10
11
|
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
11
12
|
import { renderMessagePresentationFallbackText } from "openclaw/plugin-sdk/interactive-runtime";
|
|
12
13
|
import { resolvePayloadMediaUrls } from "openclaw/plugin-sdk/reply-payload";
|
|
13
14
|
//#region extensions/matrix/src/matrix/probe.ts
|
|
14
|
-
|
|
15
|
-
async function loadMatrixProbeRuntimeDeps() {
|
|
16
|
-
matrixProbeRuntimeDepsPromise ??= import("./probe.runtime-DKRqRegP.js").then((runtimeModule) => ({ createMatrixClient: runtimeModule.createMatrixClient }));
|
|
17
|
-
return await matrixProbeRuntimeDepsPromise;
|
|
18
|
-
}
|
|
15
|
+
const loadMatrixProbeRuntimeDeps = createLazyRuntimeModule(() => import("./probe.runtime-BED7DXis.js").then((runtimeModule) => ({ createMatrixClient: runtimeModule.createMatrixClient })));
|
|
19
16
|
async function probeMatrix(params) {
|
|
20
17
|
const started = Date.now();
|
|
21
18
|
const result = {
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { a as resolveMatrixAccountConfig } from "./account-config-BZWN9tGS.js";
|
|
2
2
|
import { t as getMatrixRuntime } from "./runtime-6S3DNFNv.js";
|
|
3
|
-
import { c as resolveMatrixConfigPath, g as resolveMatrixAccount, l as updateMatrixAccountConfig, n as matrixSetupAdapter } from "./setup-core-
|
|
3
|
+
import { c as resolveMatrixConfigPath, g as resolveMatrixAccount, l as updateMatrixAccountConfig, n as matrixSetupAdapter } from "./setup-core-D2BQs8w1.js";
|
|
4
4
|
import { t as formatMatrixErrorMessage } from "./errors-C47hvAF8.js";
|
|
5
|
-
import { n as withResolvedActionClient } from "./client-
|
|
6
|
-
import { p as resolveMatrixAuthContext } from "./shared-
|
|
7
|
-
import "./client-
|
|
5
|
+
import { n as withResolvedActionClient } from "./client-BQz5GcYr.js";
|
|
6
|
+
import { p as resolveMatrixAuthContext } from "./shared-BGcaBMK3.js";
|
|
7
|
+
import "./client-D-5GVz_D.js";
|
|
8
8
|
import { i as formatZonedTimestamp } from "./runtime-api-CsBoesCU.js";
|
|
9
9
|
import { isOpenClawManagedMatrixDevice, summarizeMatrixDeviceHealth } from "./device-health-D4LBxuPq.js";
|
|
10
|
-
import { n as updateMatrixOwnProfile, t as applyMatrixProfileUpdate } from "./profile-update-
|
|
11
|
-
import { a as confirmMatrixVerificationSas, b as verifyMatrixRecoveryKey, c as getMatrixRoomKeyBackupStatus, d as listMatrixVerifications, f as mismatchMatrixVerificationSas, g as runMatrixSelfVerification, h as restoreMatrixRoomKeyBackup, l as getMatrixVerificationSas, m as resetMatrixRoomKeyBackup, n as bootstrapMatrixVerification, p as requestMatrixVerification, r as cancelMatrixVerification, t as acceptMatrixVerification, u as getMatrixVerificationStatus, v as startMatrixVerification } from "./verification-
|
|
10
|
+
import { n as updateMatrixOwnProfile, t as applyMatrixProfileUpdate } from "./profile-update-DIOAhezh.js";
|
|
11
|
+
import { a as confirmMatrixVerificationSas, b as verifyMatrixRecoveryKey, c as getMatrixRoomKeyBackupStatus, d as listMatrixVerifications, f as mismatchMatrixVerificationSas, g as runMatrixSelfVerification, h as restoreMatrixRoomKeyBackup, l as getMatrixVerificationSas, m as resetMatrixRoomKeyBackup, n as bootstrapMatrixVerification, p as requestMatrixVerification, r as cancelMatrixVerification, t as acceptMatrixVerification, u as getMatrixVerificationStatus, v as startMatrixVerification } from "./verification-CNw2K4uT.js";
|
|
12
12
|
import { t as resolveMatrixRoomKeyBackupIssue } from "./backup-health-Dm_YMVFT.js";
|
|
13
13
|
import { setMatrixSdkConsoleLogging, setMatrixSdkLogMode } from "./logging-QH-48Gr6.js";
|
|
14
|
+
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
14
15
|
import { normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
|
15
16
|
import { parseStrictInteger, timestampMsToIsoString } from "openclaw/plugin-sdk/number-runtime";
|
|
16
17
|
//#region extensions/matrix/src/matrix/actions/devices.ts
|
|
@@ -35,16 +36,8 @@ async function pruneMatrixStaleGatewayDevices(opts = {}) {
|
|
|
35
36
|
//#endregion
|
|
36
37
|
//#region extensions/matrix/src/cli.ts
|
|
37
38
|
let matrixCliExitScheduled = false;
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
function loadMatrixActionClientModule() {
|
|
41
|
-
matrixActionClientModulePromise ??= import("./client-DnNqVfCX.js").then((n) => n.t);
|
|
42
|
-
return matrixActionClientModulePromise;
|
|
43
|
-
}
|
|
44
|
-
function loadMatrixDirectManagementModule() {
|
|
45
|
-
matrixDirectManagementModulePromise ??= import("./send-eoayPB_l.js").then((n) => n.d);
|
|
46
|
-
return matrixDirectManagementModulePromise;
|
|
47
|
-
}
|
|
39
|
+
const loadMatrixActionClientModule = createLazyRuntimeModule(() => import("./client-BQz5GcYr.js").then((n) => n.t));
|
|
40
|
+
const loadMatrixDirectManagementModule = createLazyRuntimeModule(() => import("./send-D0hpevF-.js").then((n) => n.d));
|
|
48
41
|
function scheduleMatrixCliExit() {
|
|
49
42
|
if (matrixCliExitScheduled || process.env.VITEST) return;
|
|
50
43
|
matrixCliExitScheduled = true;
|
|
@@ -212,7 +205,7 @@ async function addMatrixAccount(params) {
|
|
|
212
205
|
backupVersion: null
|
|
213
206
|
};
|
|
214
207
|
if (accountConfig.encryption === true) {
|
|
215
|
-
const { maybeBootstrapNewEncryptedMatrixAccount } = await import("./setup-bootstrap-
|
|
208
|
+
const { maybeBootstrapNewEncryptedMatrixAccount } = await import("./setup-bootstrap-Ihb_DM2a.js");
|
|
216
209
|
verificationBootstrap = await maybeBootstrapNewEncryptedMatrixAccount({
|
|
217
210
|
previousCfg: cfg,
|
|
218
211
|
cfg: updated,
|
|
@@ -2,7 +2,7 @@ import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry";
|
|
|
2
2
|
//#region extensions/matrix/src/cli-metadata.ts
|
|
3
3
|
function registerMatrixCliMetadata(api) {
|
|
4
4
|
api.registerCli(async ({ program }) => {
|
|
5
|
-
const { registerMatrixCli } = await import("./cli-
|
|
5
|
+
const { registerMatrixCli } = await import("./cli-Clvpw_8I.js");
|
|
6
6
|
registerMatrixCli({ program });
|
|
7
7
|
}, { descriptors: [{
|
|
8
8
|
name: "matrix",
|
package/dist/cli-metadata.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as registerMatrixCliMetadata, t as cli_metadata_default } from "./cli-metadata-
|
|
1
|
+
import { n as registerMatrixCliMetadata, t as cli_metadata_default } from "./cli-metadata-D3N0Avnt.js";
|
|
2
2
|
export { cli_metadata_default as default, registerMatrixCliMetadata };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
|
|
2
|
-
import { u as resolveMatrixRoomId } from "./send-
|
|
3
|
-
import { n as withResolvedRuntimeMatrixClient } from "./client-bootstrap-
|
|
2
|
+
import { u as resolveMatrixRoomId } from "./send-D0hpevF-.js";
|
|
3
|
+
import { n as withResolvedRuntimeMatrixClient } from "./client-bootstrap-CBJciU5u.js";
|
|
4
4
|
//#region extensions/matrix/src/matrix/actions/client.ts
|
|
5
5
|
var client_exports = /* @__PURE__ */ __exportAll({
|
|
6
6
|
withResolvedActionClient: () => withResolvedActionClient,
|
|
@@ -3,8 +3,8 @@ import { t as getMatrixScopedEnvVarNames } from "./env-vars-KzaYveuy.js";
|
|
|
3
3
|
import { i as resolveScopedMatrixEnvConfig, r as resolveMatrixEnvAuthReadiness, t as hasReadyMatrixEnvAuth } from "./env-auth-DIzOApj0.js";
|
|
4
4
|
import { n as validateMatrixHomeserverUrl, t as resolveValidatedMatrixHomeserverUrl } from "./url-validation-GRHde6lq.js";
|
|
5
5
|
import { t as isBunRuntime } from "./runtime-BefyhPWv.js";
|
|
6
|
-
import { d as backfillMatrixAuthDeviceIdAfterStartup, f as resolveMatrixAuth, i as resolveSharedMatrixClient, m as resolveMatrixConfigForAccount, n as releaseSharedClientInstance, o as stopSharedClientForAccount, p as resolveMatrixAuthContext, r as removeSharedClientInstance, s as stopSharedClientInstance, t as acquireSharedMatrixClient } from "./shared-
|
|
7
|
-
import { t as createMatrixClient } from "./create-client-
|
|
6
|
+
import { d as backfillMatrixAuthDeviceIdAfterStartup, f as resolveMatrixAuth, i as resolveSharedMatrixClient, m as resolveMatrixConfigForAccount, n as releaseSharedClientInstance, o as stopSharedClientForAccount, p as resolveMatrixAuthContext, r as removeSharedClientInstance, s as stopSharedClientInstance, t as acquireSharedMatrixClient } from "./shared-BGcaBMK3.js";
|
|
7
|
+
import { t as createMatrixClient } from "./create-client-DhGid8FE.js";
|
|
8
8
|
//#region extensions/matrix/src/matrix/client.ts
|
|
9
9
|
var client_exports = /* @__PURE__ */ __exportAll({
|
|
10
10
|
acquireSharedMatrixClient: () => acquireSharedMatrixClient,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
|
|
2
2
|
import { t as getActiveMatrixClient } from "./active-client-DXvz2gCo.js";
|
|
3
3
|
import { t as isBunRuntime } from "./runtime-BefyhPWv.js";
|
|
4
|
+
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
4
5
|
import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime";
|
|
5
6
|
//#region extensions/matrix/src/matrix/client-bootstrap.ts
|
|
6
7
|
var client_bootstrap_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -8,15 +9,11 @@ var client_bootstrap_exports = /* @__PURE__ */ __exportAll({
|
|
|
8
9
|
stopResolvedRuntimeMatrixClient: () => stopResolvedRuntimeMatrixClient,
|
|
9
10
|
withResolvedRuntimeMatrixClient: () => withResolvedRuntimeMatrixClient
|
|
10
11
|
});
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
releaseSharedClientInstance: sharedModule.releaseSharedClientInstance
|
|
17
|
-
}));
|
|
18
|
-
return await matrixSharedClientRuntimeDepsPromise;
|
|
19
|
-
}
|
|
12
|
+
const loadMatrixSharedClientRuntimeDeps = createLazyRuntimeModule(() => Promise.all([import("./client-D-5GVz_D.js").then((n) => n.t), import("./shared-BGcaBMK3.js").then((n) => n.a)]).then(([clientModule, sharedModule]) => ({
|
|
13
|
+
acquireSharedMatrixClient: clientModule.acquireSharedMatrixClient,
|
|
14
|
+
resolveMatrixAuthContext: clientModule.resolveMatrixAuthContext,
|
|
15
|
+
releaseSharedClientInstance: sharedModule.releaseSharedClientInstance
|
|
16
|
+
})));
|
|
20
17
|
async function ensureResolvedClientReadiness(params) {
|
|
21
18
|
if (params.readiness === "started") {
|
|
22
19
|
await params.client.start();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as resolveMatrixAccountConfig } from "./account-config-BZWN9tGS.js";
|
|
2
|
-
import { g as resolveMatrixAccount, h as resolveDefaultMatrixAccountId, p as listMatrixAccountIds } from "./setup-core-
|
|
2
|
+
import { g as resolveMatrixAccount, h as resolveDefaultMatrixAccountId, p as listMatrixAccountIds } from "./setup-core-D2BQs8w1.js";
|
|
3
3
|
import { adaptScopedAccountAccessor, createScopedChannelConfigAdapter } from "openclaw/plugin-sdk/channel-config-helpers";
|
|
4
4
|
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
5
5
|
import { DEFAULT_ACCOUNT_ID as DEFAULT_ACCOUNT_ID$1 } from "openclaw/plugin-sdk/account-id";
|
package/dist/contract-api.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { d as resolveSingleAccountPromotionTarget, f as singleAccountKeysToMove, n as matrixSetupAdapter, u as namedAccountPromotionKeys } from "./setup-core-
|
|
2
|
-
import { n as matrixOnboardingAdapter } from "./setup-surface-
|
|
1
|
+
import { d as resolveSingleAccountPromotionTarget, f as singleAccountKeysToMove, n as matrixSetupAdapter, u as namedAccountPromotionKeys } from "./setup-core-D2BQs8w1.js";
|
|
2
|
+
import { n as matrixOnboardingAdapter } from "./setup-surface-1qf1LZIP.js";
|
|
3
3
|
export { matrixSetupAdapter, matrixOnboardingAdapter as matrixSetupWizard, namedAccountPromotionKeys, resolveSingleAccountPromotionTarget, singleAccountKeysToMove };
|
|
@@ -1,20 +1,17 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
|
|
2
2
|
import { t as resolveValidatedMatrixHomeserverUrl } from "./url-validation-GRHde6lq.js";
|
|
3
|
-
import { d as writeStorageMeta, l as resolveMatrixStoragePaths, r as maybeMigrateLegacyStorage } from "./storage-
|
|
4
|
-
import "./shared-
|
|
3
|
+
import { d as writeStorageMeta, l as resolveMatrixStoragePaths, r as maybeMigrateLegacyStorage } from "./storage-t5S-5c_5.js";
|
|
4
|
+
import "./shared-BGcaBMK3.js";
|
|
5
|
+
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
5
6
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
6
7
|
import fs from "node:fs";
|
|
7
8
|
import { ssrfPolicyFromDangerouslyAllowPrivateNetwork } from "openclaw/plugin-sdk/ssrf-runtime";
|
|
8
9
|
//#region extensions/matrix/src/matrix/client/create-client.ts
|
|
9
10
|
var create_client_exports = /* @__PURE__ */ __exportAll({ createMatrixClient: () => createMatrixClient });
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
ensureMatrixSdkLoggingConfigured: loggingModule.ensureMatrixSdkLoggingConfigured
|
|
15
|
-
}));
|
|
16
|
-
return await matrixCreateClientRuntimeDepsPromise;
|
|
17
|
-
}
|
|
11
|
+
const loadMatrixCreateClientRuntimeDeps = createLazyRuntimeModule(() => Promise.all([import("./sdk-eyqOqjmn.js"), import("./logging-QH-48Gr6.js")]).then(([sdkModule, loggingModule]) => ({
|
|
12
|
+
MatrixClient: sdkModule.MatrixClient,
|
|
13
|
+
ensureMatrixSdkLoggingConfigured: loggingModule.ensureMatrixSdkLoggingConfigured
|
|
14
|
+
})));
|
|
18
15
|
async function createMatrixClient(params) {
|
|
19
16
|
const { MatrixClient, ensureMatrixSdkLoggingConfigured } = await loadMatrixCreateClientRuntimeDeps();
|
|
20
17
|
ensureMatrixSdkLoggingConfigured();
|
package/dist/{credentials-write.runtime-cZhhyGAZ.js → credentials-write.runtime-5PDPPG9f.js}
RENAMED
|
@@ -1,9 +1,6 @@
|
|
|
1
|
+
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
1
2
|
//#region extensions/matrix/src/matrix/credentials-write.runtime.ts
|
|
2
|
-
|
|
3
|
-
function loadMatrixCredentialsRuntime() {
|
|
4
|
-
matrixCredentialsRuntimePromise ??= import("./credentials-G8lNmiME.js");
|
|
5
|
-
return matrixCredentialsRuntimePromise;
|
|
6
|
-
}
|
|
3
|
+
const loadMatrixCredentialsRuntime = createLazyRuntimeModule(() => import("./credentials-G8lNmiME.js"));
|
|
7
4
|
async function saveMatrixCredentials(...args) {
|
|
8
5
|
return (await loadMatrixCredentialsRuntime()).saveMatrixCredentials(...args);
|
|
9
6
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { t as formatMatrixErrorMessage } from "./errors-C47hvAF8.js";
|
|
2
|
-
import { t as ensureMatrixCryptoRuntime } from "./deps-
|
|
2
|
+
import { t as ensureMatrixCryptoRuntime } from "./deps-D3bkh48_.js";
|
|
3
3
|
import { n as LogService, r as noop } from "./logger-D0GCSDQq.js";
|
|
4
4
|
import { i as restoreIdbFromDisk, n as persistIdbToDisk } from "./idb-persistence-BGY1CJ7J.js";
|
|
5
5
|
import { n as isRepairableSecretStorageAccessError } from "./recovery-key-store-BGk8c_gf.js";
|
|
6
|
+
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
6
7
|
import { resolveDateTimestampMs, resolveTimestampMsToIsoString } from "openclaw/plugin-sdk/number-runtime";
|
|
7
8
|
import { MatrixEventEvent } from "matrix-js-sdk/lib/matrix.js";
|
|
8
9
|
import { setTimeout as setTimeout$1 } from "node:timers/promises";
|
|
@@ -337,13 +338,14 @@ var MatrixCryptoBootstrapper = class {
|
|
|
337
338
|
};
|
|
338
339
|
//#endregion
|
|
339
340
|
//#region extensions/matrix/src/matrix/sdk/crypto-facade.ts
|
|
340
|
-
|
|
341
|
+
const matrixCryptoNodeRuntimeLoader = createLazyRuntimeModule(() => import("./crypto-node.runtime-6Aj_ltHQ.js"));
|
|
341
342
|
async function loadMatrixCryptoNodeRuntime() {
|
|
342
|
-
|
|
343
|
-
|
|
343
|
+
try {
|
|
344
|
+
return await matrixCryptoNodeRuntimeLoader();
|
|
345
|
+
} catch (error) {
|
|
346
|
+
matrixCryptoNodeRuntimeLoader.clear();
|
|
344
347
|
throw error;
|
|
345
|
-
}
|
|
346
|
-
return await matrixCryptoNodeRuntimePromise;
|
|
348
|
+
}
|
|
347
349
|
}
|
|
348
350
|
async function loadMatrixCryptoNodeBindings() {
|
|
349
351
|
await ensureMatrixCryptoRuntime();
|
|
@@ -389,8 +391,8 @@ function createMatrixCryptoFacade(deps) {
|
|
|
389
391
|
};
|
|
390
392
|
},
|
|
391
393
|
decryptMedia: async (file, opts) => {
|
|
392
|
-
const { Attachment, EncryptedAttachment } = await loadMatrixCryptoNodeBindings();
|
|
393
394
|
const encrypted = await deps.downloadContent(file.url, opts);
|
|
395
|
+
const { Attachment, EncryptedAttachment } = await loadMatrixCryptoNodeBindings();
|
|
394
396
|
const metadata = {
|
|
395
397
|
url: file.url,
|
|
396
398
|
key: file.key,
|
|
@@ -158,7 +158,7 @@ function removeIncompleteMatrixCryptoNativeBinding(params) {
|
|
|
158
158
|
}
|
|
159
159
|
}
|
|
160
160
|
async function ensureMatrixCryptoRuntime(params = {}) {
|
|
161
|
-
const usesDefaultRuntime = !params.requireFn && !params.
|
|
161
|
+
const usesDefaultRuntime = !params.requireFn && !params.resolveFn;
|
|
162
162
|
if (usesDefaultRuntime && defaultMatrixCryptoRuntimeEnsurePromise) {
|
|
163
163
|
await defaultMatrixCryptoRuntimeEnsurePromise;
|
|
164
164
|
return;
|
|
@@ -190,8 +190,8 @@ async function ensureMatrixCryptoRuntimeOnce(params) {
|
|
|
190
190
|
}
|
|
191
191
|
const scriptPath = resolveFn("@matrix-org/matrix-sdk-crypto-nodejs/download-lib.js");
|
|
192
192
|
params.log?.("matrix: bootstrapping native crypto runtime");
|
|
193
|
-
const result = await
|
|
194
|
-
argv: [
|
|
193
|
+
const result = await runFixedCommandWithTimeout({
|
|
194
|
+
argv: [process.execPath, scriptPath],
|
|
195
195
|
cwd: path.dirname(scriptPath),
|
|
196
196
|
timeoutMs: 3e5,
|
|
197
197
|
env: { COREPACK_ENABLE_DOWNLOAD_PROMPT: "0" }
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
|
|
2
2
|
import { n as normalizeMatrixMessagingTarget, t as isMatrixQualifiedUserId } from "./target-ids-B-5aQxwn.js";
|
|
3
|
-
import { f as resolveMatrixAuth } from "./shared-
|
|
4
|
-
import "./client-
|
|
5
|
-
import { t as MatrixAuthedHttpClient } from "./http-client-
|
|
3
|
+
import { f as resolveMatrixAuth } from "./shared-BGcaBMK3.js";
|
|
4
|
+
import "./client-D-5GVz_D.js";
|
|
5
|
+
import { t as MatrixAuthedHttpClient } from "./http-client-nSmFiVgk.js";
|
|
6
6
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
7
7
|
//#region extensions/matrix/src/directory-live.ts
|
|
8
8
|
var directory_live_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { o as isRecord } from "./account-selection-Bv_ZuOu4.js";
|
|
2
2
|
import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-Dq8OZWHF.js";
|
|
3
|
-
import { i as autoPrepareLegacyMatrixCrypto, o as autoMigrateLegacyMatrixState, r as resolveMatrixMigrationStatus } from "./matrix-migration.runtime-
|
|
3
|
+
import { i as autoPrepareLegacyMatrixCrypto, o as autoMigrateLegacyMatrixState, r as resolveMatrixMigrationStatus } from "./matrix-migration.runtime-Ctlb_rZl.js";
|
|
4
4
|
import { t as maybeCreateMatrixMigrationSnapshot } from "./migration-snapshot-backup-YcCrSjbE.js";
|
|
5
5
|
import { detectPluginInstallPathIssue, formatPluginInstallPathIssue, removePluginFromConfig } from "openclaw/plugin-sdk/runtime-doctor";
|
|
6
6
|
//#region extensions/matrix/src/doctor.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-Dq8OZWHF.js";
|
|
2
2
|
import { D as writeMatrixRecoveryKeyStateToStore, S as writeMatrixIdbSnapshotJsonToStore, a as hasMatrixLegacyCryptoMigrationStateInStore, d as openMatrixLegacyCryptoMigrationStoreOptions, f as openMatrixRecoveryKeyStoreOptions, h as readLegacyMatrixRecoveryKeyState, i as hasMatrixIdbSnapshotStateInStore, n as MATRIX_LEGACY_CRYPTO_MIGRATION_FILENAME, o as hasMatrixRecoveryKeyStateInStore, p as readLegacyMatrixLegacyCryptoMigrationState, r as MATRIX_RECOVERY_KEY_FILENAME, t as MATRIX_IDB_SNAPSHOT_FILENAME, u as openMatrixIdbSnapshotStoreOptions, w as writeMatrixLegacyCryptoMigrationStateToStore } from "./crypto-state-store-DK2tcEyP.js";
|
|
3
|
-
import { a as openMatrixStorageMetaStoreOptions, i as normalizeMatrixStorageMetadata, n as hasMatrixStorageMetaStateInStore, u as writeMatrixStorageMetaStateToStore } from "./storage-
|
|
4
|
-
import { a as readLegacyMatrixSyncCacheState, i as openMatrixSyncCacheStoreOptions, o as writeMatrixSyncCacheStateToStore, r as hasMatrixSyncCacheStateInStore } from "./file-sync-store-
|
|
3
|
+
import { a as openMatrixStorageMetaStoreOptions, i as normalizeMatrixStorageMetadata, n as hasMatrixStorageMetaStateInStore, u as writeMatrixStorageMetaStateToStore } from "./storage-t5S-5c_5.js";
|
|
4
|
+
import { a as readLegacyMatrixSyncCacheState, i as openMatrixSyncCacheStoreOptions, o as writeMatrixSyncCacheStateToStore, r as hasMatrixSyncCacheStateInStore } from "./file-sync-store-BWLVB01Y.js";
|
|
5
5
|
import { r as readLegacyMatrixIdbSnapshotState } from "./idb-persistence-BGY1CJ7J.js";
|
|
6
6
|
import path from "node:path";
|
|
7
7
|
import fs from "node:fs/promises";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as editMessageMatrix, r as prepareMatrixSingleText, s as sendSingleTextMessageMatrix, y as MsgType } from "./send-
|
|
1
|
+
import { n as editMessageMatrix, r as prepareMatrixSingleText, s as sendSingleTextMessageMatrix, y as MsgType } from "./send-D0hpevF-.js";
|
|
2
2
|
import { createDraftStreamLoop } from "openclaw/plugin-sdk/channel-outbound";
|
|
3
3
|
//#region extensions/matrix/src/matrix/draft-stream.ts
|
|
4
4
|
const DEFAULT_THROTTLE_MS = 1e3;
|
|
@@ -2,7 +2,7 @@ import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
|
|
|
2
2
|
import { o as isRecord } from "./account-selection-Bv_ZuOu4.js";
|
|
3
3
|
import { t as getMatrixRuntime } from "./runtime-6S3DNFNv.js";
|
|
4
4
|
import { O as resolveMatrixSqliteStateEnv } from "./crypto-state-store-DK2tcEyP.js";
|
|
5
|
-
import { t as claimCurrentTokenStorageState } from "./storage-
|
|
5
|
+
import { t as claimCurrentTokenStorageState } from "./storage-t5S-5c_5.js";
|
|
6
6
|
import { t as createAsyncLock } from "./async-lock-BcLS4KOc.js";
|
|
7
7
|
import { n as LogService } from "./logger-D0GCSDQq.js";
|
|
8
8
|
import path from "node:path";
|
|
@@ -294,15 +294,16 @@ async function performMatrixRequest(params) {
|
|
|
294
294
|
});
|
|
295
295
|
try {
|
|
296
296
|
if (params.raw) {
|
|
297
|
-
|
|
297
|
+
const rawMaxBytes = params.maxBytes ?? MATRIX_SDK_RESPONSE_MAX_BYTES;
|
|
298
|
+
await enforceDeclaredResponseSize({
|
|
298
299
|
response,
|
|
299
|
-
maxBytes:
|
|
300
|
-
createError: (length) => new MatrixMediaSizeLimitError(`Matrix media exceeds configured size limit (${length} bytes > ${
|
|
300
|
+
maxBytes: rawMaxBytes,
|
|
301
|
+
createError: (length) => new MatrixMediaSizeLimitError(`Matrix media exceeds configured size limit (${length} bytes > ${rawMaxBytes} bytes)`)
|
|
301
302
|
});
|
|
302
|
-
const bytes =
|
|
303
|
+
const bytes = await readResponseWithLimit$1(response, rawMaxBytes, {
|
|
303
304
|
onOverflow: ({ maxBytes, size }) => new MatrixMediaSizeLimitError(`Matrix media exceeds configured size limit (${size} bytes > ${maxBytes} bytes)`),
|
|
304
305
|
chunkTimeoutMs: params.readIdleTimeoutMs
|
|
305
|
-
})
|
|
306
|
+
});
|
|
306
307
|
return {
|
|
307
308
|
response,
|
|
308
309
|
text: bytes.toString("utf8"),
|
|
@@ -354,7 +355,11 @@ var MatrixAuthedHttpClient = class {
|
|
|
354
355
|
if (!response.ok) throw buildHttpError(response.status, text);
|
|
355
356
|
if ((response.headers.get("content-type") ?? "").includes("application/json")) {
|
|
356
357
|
if (!text.trim()) return {};
|
|
357
|
-
|
|
358
|
+
try {
|
|
359
|
+
return JSON.parse(text);
|
|
360
|
+
} catch {
|
|
361
|
+
throw Object.assign(/* @__PURE__ */ new Error("Matrix homeserver returned malformed JSON"), { statusCode: response.status });
|
|
362
|
+
}
|
|
358
363
|
}
|
|
359
364
|
return text;
|
|
360
365
|
}
|
package/dist/index.js
CHANGED
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
import { n as registerMatrixCliMetadata } from "./cli-metadata-
|
|
1
|
+
import { n as registerMatrixCliMetadata } from "./cli-metadata-D3N0Avnt.js";
|
|
2
2
|
import { registerMatrixSubagentHooks } from "./subagent-hooks-api.js";
|
|
3
3
|
import { defineBundledChannelEntry } from "openclaw/plugin-sdk/channel-entry-contract";
|
|
4
|
+
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
4
5
|
//#region extensions/matrix/index.ts
|
|
5
|
-
|
|
6
|
-
function loadMatrixHandlersRuntimeModule() {
|
|
7
|
-
matrixHandlersRuntimePromise ??= import("./plugin-entry.handlers.runtime.js");
|
|
8
|
-
return matrixHandlersRuntimePromise;
|
|
9
|
-
}
|
|
6
|
+
const loadMatrixHandlersRuntimeModule = createLazyRuntimeModule(() => import("./plugin-entry.handlers.runtime.js"));
|
|
10
7
|
function registerMatrixFullRuntime(api) {
|
|
11
8
|
api.registerGatewayMethod("matrix.verify.recoveryKey", async (ctx) => {
|
|
12
9
|
const { handleVerifyRecoveryKey } = await loadMatrixHandlersRuntimeModule();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as getMatrixRuntime } from "./runtime-6S3DNFNv.js";
|
|
2
2
|
import { C as writeMatrixLegacyCryptoMigrationState, _ as readMatrixLegacyCryptoMigrationState, s as migrateLegacyMatrixLegacyCryptoMigrationFileToStore } from "./crypto-state-store-DK2tcEyP.js";
|
|
3
|
-
import { l as resolveMatrixStoragePaths } from "./storage-
|
|
3
|
+
import { l as resolveMatrixStoragePaths } from "./storage-t5S-5c_5.js";
|
|
4
4
|
import os from "node:os";
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
import fs from "node:fs/promises";
|
|
@@ -250,7 +250,7 @@ function isMatrixLegacyCryptoInspectorAvailable() {
|
|
|
250
250
|
//#region extensions/matrix/src/legacy-crypto.ts
|
|
251
251
|
const MATRIX_LEGACY_CRYPTO_INSPECTOR_UNAVAILABLE_MESSAGE = "Legacy Matrix encrypted state was detected, but the Matrix crypto inspector is unavailable.";
|
|
252
252
|
async function loadMatrixLegacyCryptoInspector() {
|
|
253
|
-
return (await import("./legacy-crypto-inspector-
|
|
253
|
+
return (await import("./legacy-crypto-inspector-D_8iylBq.js")).inspectLegacyMatrixCryptoStore;
|
|
254
254
|
}
|
|
255
255
|
function detectLegacyBotSdkCryptoStore(cryptoRootDir) {
|
|
256
256
|
try {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as formatPollResultsAsText, D as parsePollStartContent, O as resolvePollReferenceEventId, S as formatPollAsText, T as isPollStartType, w as isPollEventType, x as buildPollResultsSummary } from "./send-
|
|
1
|
+
import { C as formatPollResultsAsText, D as parsePollStartContent, O as resolvePollReferenceEventId, S as formatPollAsText, T as isPollStartType, w as isPollEventType, x as buildPollResultsSummary } from "./send-D0hpevF-.js";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
//#region extensions/matrix/src/matrix/poll-summary.ts
|
|
4
4
|
function resolveMatrixPollRootEventId(event) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { r as isMatrixNotFoundError } from "./errors-C47hvAF8.js";
|
|
2
|
-
import { T as isPollStartType, a as sendMessageMatrix, n as editMessageMatrix, w as isPollEventType } from "./send-
|
|
2
|
+
import { T as isPollStartType, a as sendMessageMatrix, n as editMessageMatrix, w as isPollEventType } from "./send-D0hpevF-.js";
|
|
3
3
|
import { n as MATRIX_REACTION_EVENT_TYPE } from "./reaction-common-DkrQdBSZ.js";
|
|
4
|
-
import { a as resolveMatrixMessageAttachment, l as resolveMatrixPollRootEventId, o as resolveMatrixMessageBody, s as fetchMatrixPollMessageSummary } from "./media-text-
|
|
5
|
-
import { r as withResolvedRoomAction } from "./client-
|
|
4
|
+
import { a as resolveMatrixMessageAttachment, l as resolveMatrixPollRootEventId, o as resolveMatrixMessageBody, s as fetchMatrixPollMessageSummary } from "./media-text-XO4VaezT.js";
|
|
5
|
+
import { r as withResolvedRoomAction } from "./client-BQz5GcYr.js";
|
|
6
6
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
7
7
|
import { resolveIntegerOption } from "openclaw/plugin-sdk/number-runtime";
|
|
8
8
|
//#region extensions/matrix/src/matrix/actions/limits.ts
|