@openclaw/matrix 2026.6.33 → 2026.6.35
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-Zq8FeqLy.js → approval-handler.runtime-BjBtbrdi.js} +4 -4
- package/dist/{approval-ids-gM2AFaP-.js → approval-ids-D_MGByp6.js} +1 -1
- package/dist/{approval-reaction-auth--lKUos8v.js → approval-reaction-auth-DTQnRx4G.js} +2 -2
- package/dist/{channel-QIfssnwm.js → channel-R4ZIKMwT.js} +16 -13
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel.runtime-DkbZfBYE.js → channel.runtime-HNV3MjVm.js} +6 -6
- package/dist/{cli-ZiO7g1vT.js → cli-Dpi-JiMX.js} +9 -9
- package/dist/{cli-metadata-Cn_UFU3u.js → cli-metadata-CQ0Fu1Zr.js} +1 -1
- package/dist/cli-metadata.js +1 -1
- package/dist/{client-COdtuzoa.js → client-BtISa2BM.js} +2 -2
- package/dist/{client-bootstrap-DoOOMP52.js → client-bootstrap-Cp6Nwuoi.js} +1 -1
- package/dist/{client-DnNqVfCX.js → client-rYWNQvAN.js} +2 -2
- package/dist/{config-schema-o1UmRtMF.js → config-schema-BcOo_2Py.js} +1 -1
- package/dist/contract-api.js +2 -2
- package/dist/{create-client-DWe5jGGk.js → create-client-Cy0BcHFg.js} +2 -2
- package/dist/{crypto-runtime-DaHFPR8x.js → crypto-runtime-e0bRP6dB.js} +55 -10
- package/dist/{deps-BVWGd2XS.js → deps-DoQ5mpwP.js} +20 -2
- package/dist/{directory-live-D4ibL3X0.js → directory-live-CJzQ5za7.js} +2 -2
- package/dist/{doctor-BwpkOBwr.js → doctor-wP-H47UF.js} +1 -1
- package/dist/{draft-stream-aZa1gWNI.js → draft-stream-C4X8Txw_.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/{legacy-crypto-inspector-tJOj25VL.js → legacy-crypto-inspector-Dl4lMAei.js} +1 -1
- package/dist/{matrix-migration.runtime-dvxE3e5l.js → matrix-migration.runtime-BQ69V3CR.js} +1 -1
- package/dist/{media-text-DS2lvlA2.js → media-text-BkdnLpBE.js} +1 -1
- package/dist/{messages-CMTiMecS.js → messages-BFuuCO_k.js} +4 -3
- package/dist/{monitor-DAHAvlEh.js → monitor-BIXV9yRC.js} +21 -18
- package/dist/plugin-entry.handlers.runtime.js +1 -1
- package/dist/probe.runtime-HSFW4DUU.js +3 -0
- package/dist/{profile-update-DUh6sAqK.js → profile-update-sMwJwi8I.js} +2 -2
- package/dist/{reaction-events-CABcpM-q.js → reaction-events-C690uBKS.js} +1 -1
- package/dist/{resolve-targets-Byrcsv59.js → resolve-targets-CwHoq7hn.js} +1 -1
- package/dist/{resolver.runtime-Blu9khLB.js → resolver.runtime-C_uuPsry.js} +1 -1
- package/dist/runtime-api.js +1 -1
- package/dist/runtime-heavy-api.js +1 -1
- package/dist/{sdk-CpYofZkF.js → sdk-DaHsa7DR.js} +2 -2
- package/dist/{send-eoayPB_l.js → send-BMwJ5LY2.js} +1 -1
- package/dist/session-binding-contract-api.js +1 -1
- package/dist/{setup-bootstrap-DRzRwu9E.js → setup-bootstrap-D8DQwEcO.js} +2 -2
- package/dist/{setup-core-Ub_idsu1.js → setup-core-CVo-64kh.js} +1 -1
- package/dist/setup-plugin-api.js +3 -3
- package/dist/{setup-surface-CXenmuMm.js → setup-surface-Du6-iuN4.js} +5 -5
- package/dist/{shared-CSN0TWWD.js → shared-QI0RpVnw.js} +2 -2
- package/dist/{thread-bindings-DuoPRata.js → thread-bindings-d512FOPe.js} +1 -1
- package/dist/{tool-actions.runtime-BwP9E9M0.js → tool-actions.runtime-CuxC5hpa.js} +7 -6
- package/dist/{verification-BN8M6A73.js → verification-DBPeo1wO.js} +1 -1
- package/node_modules/linkify-it/README.md +3 -4
- package/node_modules/linkify-it/build/index.cjs.js +44 -41
- package/node_modules/linkify-it/index.mjs +10 -11
- package/node_modules/linkify-it/lib/re.mjs +34 -30
- package/node_modules/linkify-it/package.json +10 -15
- package/node_modules/markdown-it/dist/index.cjs.js +3652 -5378
- package/node_modules/markdown-it/dist/index.cjs.js.map +1 -0
- package/node_modules/markdown-it/dist/markdown-it.js +1399 -4479
- package/node_modules/markdown-it/dist/markdown-it.js.map +1 -0
- package/node_modules/markdown-it/dist/markdown-it.min.js +3 -2
- package/node_modules/markdown-it/dist/markdown-it.min.js.map +1 -0
- package/node_modules/markdown-it/lib/common/html_re.mjs +9 -9
- package/node_modules/markdown-it/lib/common/utils.mjs +2 -11
- package/node_modules/markdown-it/lib/parser_block.mjs +9 -9
- package/node_modules/markdown-it/lib/parser_core.mjs +7 -7
- package/node_modules/markdown-it/lib/parser_inline.mjs +16 -16
- package/node_modules/markdown-it/lib/renderer.mjs +2 -2
- package/node_modules/markdown-it/lib/rules_block/blockquote.mjs +6 -6
- package/node_modules/markdown-it/lib/rules_block/code.mjs +2 -2
- package/node_modules/markdown-it/lib/rules_block/fence.mjs +4 -4
- package/node_modules/markdown-it/lib/rules_block/heading.mjs +7 -7
- package/node_modules/markdown-it/lib/rules_block/hr.mjs +2 -2
- package/node_modules/markdown-it/lib/rules_block/html_block.mjs +6 -6
- package/node_modules/markdown-it/lib/rules_block/lheading.mjs +8 -8
- package/node_modules/markdown-it/lib/rules_block/list.mjs +6 -6
- package/node_modules/markdown-it/lib/rules_block/paragraph.mjs +5 -5
- package/node_modules/markdown-it/lib/rules_block/reference.mjs +1 -1
- package/node_modules/markdown-it/lib/rules_block/state_block.mjs +6 -6
- package/node_modules/markdown-it/lib/rules_block/table.mjs +4 -4
- package/node_modules/markdown-it/lib/rules_core/block.mjs +3 -3
- package/node_modules/markdown-it/lib/rules_core/linkify.mjs +15 -15
- package/node_modules/markdown-it/lib/rules_core/normalize.mjs +2 -2
- package/node_modules/markdown-it/lib/rules_inline/autolink.mjs +17 -17
- package/node_modules/markdown-it/lib/rules_inline/balance_pairs.mjs +2 -2
- package/node_modules/markdown-it/lib/rules_inline/emphasis.mjs +8 -8
- package/node_modules/markdown-it/lib/rules_inline/entity.mjs +7 -7
- package/node_modules/markdown-it/lib/rules_inline/escape.mjs +15 -1
- package/node_modules/markdown-it/lib/rules_inline/html_inline.mjs +1 -1
- package/node_modules/markdown-it/lib/rules_inline/link.mjs +1 -1
- package/node_modules/markdown-it/lib/rules_inline/state_inline.mjs +2 -2
- package/node_modules/markdown-it/lib/rules_inline/strikethrough.mjs +10 -10
- package/node_modules/markdown-it/lib/token.mjs +12 -12
- package/node_modules/markdown-it/package.json +25 -34
- package/npm-shrinkwrap.json +12 -12
- package/package.json +5 -5
- 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-CVo-64kh.js";
|
|
5
|
+
import { t as matrixPlugin } from "./channel-R4ZIKMwT.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-Du6-iuN4.js";
|
|
8
|
+
import { t as createMatrixThreadBindingManager } from "./thread-bindings-d512FOPe.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-CVo-64kh.js";
|
|
2
|
+
import { _ as shouldHandleMatrixApprovalRequest, g as isMatrixAnyApprovalClientEnabled } from "./channel-R4ZIKMwT.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-BMwJ5LY2.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-BFuuCO_k.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-BcOo_2Py.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-CVo-64kh.js";
|
|
2
|
+
import { t as normalizeMatrixApproverId } from "./approval-ids-D_MGByp6.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,14 +1,14 @@
|
|
|
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-CVo-64kh.js";
|
|
4
|
+
import { a as normalizeMatrixUserId, n as DEFAULT_ACCOUNT_ID$2, r as matrixConfigAdapter, t as MatrixChannelConfigSchema } from "./config-schema-BcOo_2Py.js";
|
|
5
|
+
import { t as normalizeMatrixApproverId } from "./approval-ids-D_MGByp6.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-BQ69V3CR.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
14
|
import { describeAccountSnapshot } from "openclaw/plugin-sdk/account-helpers";
|
|
@@ -129,12 +129,15 @@ const matrixMessageActions = {
|
|
|
129
129
|
return extractToolSend(args, "sendMessage");
|
|
130
130
|
},
|
|
131
131
|
handleAction: async (ctx) => {
|
|
132
|
-
const { handleMatrixAction } = await import("./tool-actions.runtime-
|
|
133
|
-
const { action, params, cfg, accountId, mediaLocalRoots } = ctx;
|
|
132
|
+
const { handleMatrixAction } = await import("./tool-actions.runtime-CuxC5hpa.js");
|
|
133
|
+
const { action, params, cfg, accountId, mediaAccess, mediaLocalRoots } = ctx;
|
|
134
134
|
const dispatch = async (actionParams) => await handleMatrixAction({
|
|
135
135
|
...actionParams,
|
|
136
136
|
...accountId ? { accountId } : {}
|
|
137
|
-
}, cfg, {
|
|
137
|
+
}, cfg, {
|
|
138
|
+
...mediaAccess ? { mediaAccess } : {},
|
|
139
|
+
mediaLocalRoots
|
|
140
|
+
});
|
|
138
141
|
const resolveRoomId = () => readStringParam(params, "roomId") ?? readStringParam(params, "channelId") ?? readStringParam(params, "to", { required: true });
|
|
139
142
|
if (action === "send") {
|
|
140
143
|
const to = readStringParam(params, "to", { required: true });
|
|
@@ -594,7 +597,7 @@ const matrixNativeApprovalCapability = createApproverRestrictedNativeApprovalCap
|
|
|
594
597
|
accountId,
|
|
595
598
|
request
|
|
596
599
|
}),
|
|
597
|
-
load: async () => (await import("./approval-handler.runtime-
|
|
600
|
+
load: async () => (await import("./approval-handler.runtime-BjBtbrdi.js")).matrixApprovalNativeRuntime
|
|
598
601
|
})
|
|
599
602
|
});
|
|
600
603
|
const splitMatrixApprovalCapability = splitChannelApprovalCapability(matrixNativeApprovalCapability);
|
|
@@ -756,7 +759,7 @@ function resolveMatrixGroupToolPolicy(params) {
|
|
|
756
759
|
}
|
|
757
760
|
//#endregion
|
|
758
761
|
//#region extensions/matrix/src/resolver.ts
|
|
759
|
-
const loadMatrixChannelRuntime$1 = createLazyRuntimeNamedExport(() => import("./resolver.runtime-
|
|
762
|
+
const loadMatrixChannelRuntime$1 = createLazyRuntimeNamedExport(() => import("./resolver.runtime-C_uuPsry.js"), "matrixResolverRuntime");
|
|
760
763
|
const matrixResolverAdapter = { resolveTargets: async ({ cfg, accountId, inputs, kind, runtime }) => (await loadMatrixChannelRuntime$1()).resolveMatrixTargets({
|
|
761
764
|
cfg,
|
|
762
765
|
accountId,
|
|
@@ -945,11 +948,11 @@ async function runMatrixStartupMaintenance(params) {
|
|
|
945
948
|
//#endregion
|
|
946
949
|
//#region extensions/matrix/src/channel.ts
|
|
947
950
|
let matrixStartupLock = Promise.resolve();
|
|
948
|
-
const loadMatrixSetupWizard = createLazyRuntimeNamedExport(() => import("./setup-surface-
|
|
949
|
-
const loadMatrixChannelRuntime = createLazyRuntimeNamedExport(() => import("./channel.runtime-
|
|
951
|
+
const loadMatrixSetupWizard = createLazyRuntimeNamedExport(() => import("./setup-surface-Du6-iuN4.js").then((n) => n.t), "matrixSetupWizard");
|
|
952
|
+
const loadMatrixChannelRuntime = createLazyRuntimeNamedExport(() => import("./channel.runtime-HNV3MjVm.js"), "matrixChannelRuntime");
|
|
950
953
|
let matrixDoctorModulePromise = null;
|
|
951
954
|
const loadMatrixDoctorModule = async () => {
|
|
952
|
-
matrixDoctorModulePromise ??= import("./doctor-
|
|
955
|
+
matrixDoctorModulePromise ??= import("./doctor-wP-H47UF.js");
|
|
953
956
|
return await matrixDoctorModulePromise;
|
|
954
957
|
};
|
|
955
958
|
const meta = {
|
|
@@ -1323,7 +1326,7 @@ const matrixPlugin = createChatChannelPlugin({
|
|
|
1323
1326
|
await previousLock;
|
|
1324
1327
|
let monitorMatrixProvider;
|
|
1325
1328
|
try {
|
|
1326
|
-
monitorMatrixProvider = (await import("./monitor-
|
|
1329
|
+
monitorMatrixProvider = (await import("./monitor-BIXV9yRC.js")).monitorMatrixProvider;
|
|
1327
1330
|
} finally {
|
|
1328
1331
|
releaseLock();
|
|
1329
1332
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as matrixPlugin } from "./channel-
|
|
1
|
+
import { t as matrixPlugin } from "./channel-R4ZIKMwT.js";
|
|
2
2
|
export { matrixPlugin };
|
|
@@ -1,10 +1,10 @@
|
|
|
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-BMwJ5LY2.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-QI0RpVnw.js";
|
|
4
|
+
import "./client-BtISa2BM.js";
|
|
5
|
+
import { n as listMatrixDirectoryGroupsLive, r as listMatrixDirectoryPeersLive } from "./directory-live-CJzQ5za7.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-CwHoq7hn.js";
|
|
8
8
|
import { createReplyToFanout } from "openclaw/plugin-sdk/channel-outbound";
|
|
9
9
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
10
10
|
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
@@ -13,7 +13,7 @@ import { resolvePayloadMediaUrls } from "openclaw/plugin-sdk/reply-payload";
|
|
|
13
13
|
//#region extensions/matrix/src/matrix/probe.ts
|
|
14
14
|
let matrixProbeRuntimeDepsPromise;
|
|
15
15
|
async function loadMatrixProbeRuntimeDeps() {
|
|
16
|
-
matrixProbeRuntimeDepsPromise ??= import("./probe.runtime-
|
|
16
|
+
matrixProbeRuntimeDepsPromise ??= import("./probe.runtime-HSFW4DUU.js").then((runtimeModule) => ({ createMatrixClient: runtimeModule.createMatrixClient }));
|
|
17
17
|
return await matrixProbeRuntimeDepsPromise;
|
|
18
18
|
}
|
|
19
19
|
async function probeMatrix(params) {
|
|
@@ -1,14 +1,14 @@
|
|
|
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-CVo-64kh.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-rYWNQvAN.js";
|
|
6
|
+
import { p as resolveMatrixAuthContext } from "./shared-QI0RpVnw.js";
|
|
7
|
+
import "./client-BtISa2BM.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-sMwJwi8I.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-DBPeo1wO.js";
|
|
12
12
|
import { t as resolveMatrixRoomKeyBackupIssue } from "./backup-health-Dm_YMVFT.js";
|
|
13
13
|
import { setMatrixSdkConsoleLogging, setMatrixSdkLogMode } from "./logging-QH-48Gr6.js";
|
|
14
14
|
import { normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
|
@@ -38,11 +38,11 @@ let matrixCliExitScheduled = false;
|
|
|
38
38
|
let matrixActionClientModulePromise;
|
|
39
39
|
let matrixDirectManagementModulePromise;
|
|
40
40
|
function loadMatrixActionClientModule() {
|
|
41
|
-
matrixActionClientModulePromise ??= import("./client-
|
|
41
|
+
matrixActionClientModulePromise ??= import("./client-rYWNQvAN.js").then((n) => n.t);
|
|
42
42
|
return matrixActionClientModulePromise;
|
|
43
43
|
}
|
|
44
44
|
function loadMatrixDirectManagementModule() {
|
|
45
|
-
matrixDirectManagementModulePromise ??= import("./send-
|
|
45
|
+
matrixDirectManagementModulePromise ??= import("./send-BMwJ5LY2.js").then((n) => n.d);
|
|
46
46
|
return matrixDirectManagementModulePromise;
|
|
47
47
|
}
|
|
48
48
|
function scheduleMatrixCliExit() {
|
|
@@ -212,7 +212,7 @@ async function addMatrixAccount(params) {
|
|
|
212
212
|
backupVersion: null
|
|
213
213
|
};
|
|
214
214
|
if (accountConfig.encryption === true) {
|
|
215
|
-
const { maybeBootstrapNewEncryptedMatrixAccount } = await import("./setup-bootstrap-
|
|
215
|
+
const { maybeBootstrapNewEncryptedMatrixAccount } = await import("./setup-bootstrap-D8DQwEcO.js");
|
|
216
216
|
verificationBootstrap = await maybeBootstrapNewEncryptedMatrixAccount({
|
|
217
217
|
previousCfg: cfg,
|
|
218
218
|
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-Dpi-JiMX.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-CQ0Fu1Zr.js";
|
|
2
2
|
export { cli_metadata_default as default, registerMatrixCliMetadata };
|
|
@@ -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-QI0RpVnw.js";
|
|
7
|
+
import { t as createMatrixClient } from "./create-client-Cy0BcHFg.js";
|
|
8
8
|
//#region extensions/matrix/src/matrix/client.ts
|
|
9
9
|
var client_exports = /* @__PURE__ */ __exportAll({
|
|
10
10
|
acquireSharedMatrixClient: () => acquireSharedMatrixClient,
|
|
@@ -10,7 +10,7 @@ var client_bootstrap_exports = /* @__PURE__ */ __exportAll({
|
|
|
10
10
|
});
|
|
11
11
|
let matrixSharedClientRuntimeDepsPromise;
|
|
12
12
|
async function loadMatrixSharedClientRuntimeDeps() {
|
|
13
|
-
matrixSharedClientRuntimeDepsPromise ??= Promise.all([import("./client-
|
|
13
|
+
matrixSharedClientRuntimeDepsPromise ??= Promise.all([import("./client-BtISa2BM.js").then((n) => n.t), import("./shared-QI0RpVnw.js").then((n) => n.a)]).then(([clientModule, sharedModule]) => ({
|
|
14
14
|
acquireSharedMatrixClient: clientModule.acquireSharedMatrixClient,
|
|
15
15
|
resolveMatrixAuthContext: clientModule.resolveMatrixAuthContext,
|
|
16
16
|
releaseSharedClientInstance: sharedModule.releaseSharedClientInstance
|
|
@@ -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-BMwJ5LY2.js";
|
|
3
|
+
import { n as withResolvedRuntimeMatrixClient } from "./client-bootstrap-Cp6Nwuoi.js";
|
|
4
4
|
//#region extensions/matrix/src/matrix/actions/client.ts
|
|
5
5
|
var client_exports = /* @__PURE__ */ __exportAll({
|
|
6
6
|
withResolvedActionClient: () => withResolvedActionClient,
|
|
@@ -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-CVo-64kh.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-CVo-64kh.js";
|
|
2
|
+
import { n as matrixOnboardingAdapter } from "./setup-surface-Du6-iuN4.js";
|
|
3
3
|
export { matrixSetupAdapter, matrixOnboardingAdapter as matrixSetupWizard, namedAccountPromotionKeys, resolveSingleAccountPromotionTarget, singleAccountKeysToMove };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
|
|
2
2
|
import { t as resolveValidatedMatrixHomeserverUrl } from "./url-validation-GRHde6lq.js";
|
|
3
3
|
import { d as writeStorageMeta, l as resolveMatrixStoragePaths, r as maybeMigrateLegacyStorage } from "./storage-BSLHjdgS.js";
|
|
4
|
-
import "./shared-
|
|
4
|
+
import "./shared-QI0RpVnw.js";
|
|
5
5
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
6
6
|
import fs from "node:fs";
|
|
7
7
|
import { ssrfPolicyFromDangerouslyAllowPrivateNetwork } from "openclaw/plugin-sdk/ssrf-runtime";
|
|
@@ -9,7 +9,7 @@ import { ssrfPolicyFromDangerouslyAllowPrivateNetwork } from "openclaw/plugin-sd
|
|
|
9
9
|
var create_client_exports = /* @__PURE__ */ __exportAll({ createMatrixClient: () => createMatrixClient });
|
|
10
10
|
let matrixCreateClientRuntimeDepsPromise;
|
|
11
11
|
async function loadMatrixCreateClientRuntimeDeps() {
|
|
12
|
-
matrixCreateClientRuntimeDepsPromise ??= Promise.all([import("./sdk-
|
|
12
|
+
matrixCreateClientRuntimeDepsPromise ??= Promise.all([import("./sdk-DaHsa7DR.js"), import("./logging-QH-48Gr6.js")]).then(([sdkModule, loggingModule]) => ({
|
|
13
13
|
MatrixClient: sdkModule.MatrixClient,
|
|
14
14
|
ensureMatrixSdkLoggingConfigured: loggingModule.ensureMatrixSdkLoggingConfigured
|
|
15
15
|
}));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as formatMatrixErrorMessage } from "./errors-C47hvAF8.js";
|
|
2
|
-
import { t as ensureMatrixCryptoRuntime } from "./deps-
|
|
2
|
+
import { t as ensureMatrixCryptoRuntime } from "./deps-DoQ5mpwP.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";
|
|
@@ -462,6 +462,8 @@ function createMatrixCryptoFacade(deps) {
|
|
|
462
462
|
const MATRIX_DECRYPT_RETRY_BASE_DELAY_MS = 1500;
|
|
463
463
|
const MATRIX_DECRYPT_RETRY_MAX_DELAY_MS = 3e4;
|
|
464
464
|
const MATRIX_DECRYPT_RETRY_MAX_ATTEMPTS = 8;
|
|
465
|
+
const MATRIX_DECRYPT_EXHAUSTED_RETRY_TTL_MS = 60 * 6e4;
|
|
466
|
+
const MATRIX_DECRYPT_EXHAUSTED_RETRY_MAX_ENTRIES = 512;
|
|
465
467
|
function resolveDecryptRetryKey(roomId, eventId) {
|
|
466
468
|
if (!roomId || !eventId) return null;
|
|
467
469
|
return `${roomId}|${eventId}`;
|
|
@@ -486,10 +488,11 @@ var MatrixDecryptBridge = class {
|
|
|
486
488
|
this.decryptedMessageDedupe = /* @__PURE__ */ new Map();
|
|
487
489
|
this.decryptRetries = /* @__PURE__ */ new Map();
|
|
488
490
|
this.failedDecryptionsNotified = /* @__PURE__ */ new Set();
|
|
489
|
-
this.exhaustedDecryptRetries = /* @__PURE__ */ new
|
|
491
|
+
this.exhaustedDecryptRetries = /* @__PURE__ */ new Map();
|
|
490
492
|
this.activeRetryRuns = 0;
|
|
491
493
|
this.retryIdleResolvers = /* @__PURE__ */ new Set();
|
|
492
494
|
this.cryptoRetrySignalsBound = false;
|
|
495
|
+
this.stopped = false;
|
|
493
496
|
}
|
|
494
497
|
shouldEmitUnencryptedMessage(roomId, eventId) {
|
|
495
498
|
if (!eventId) return true;
|
|
@@ -499,6 +502,7 @@ var MatrixDecryptBridge = class {
|
|
|
499
502
|
return false;
|
|
500
503
|
}
|
|
501
504
|
attachEncryptedEvent(event, roomId) {
|
|
505
|
+
if (this.stopped) return;
|
|
502
506
|
if (this.trackedEncryptedEvents.has(event)) return;
|
|
503
507
|
this.trackedEncryptedEvents.add(event);
|
|
504
508
|
event.on(MatrixEventEvent.Decrypted, (decryptedEvent, err) => {
|
|
@@ -518,7 +522,21 @@ var MatrixDecryptBridge = class {
|
|
|
518
522
|
});
|
|
519
523
|
}
|
|
520
524
|
}
|
|
521
|
-
retryPendingNow(reason) {
|
|
525
|
+
retryPendingNow(reason, options) {
|
|
526
|
+
if (this.stopped) return;
|
|
527
|
+
if (options?.includeExhausted) {
|
|
528
|
+
this.pruneExhaustedDecryptRetries(Date.now());
|
|
529
|
+
for (const [retryKey, state] of this.exhaustedDecryptRetries) {
|
|
530
|
+
if (this.decryptRetries.has(retryKey)) continue;
|
|
531
|
+
this.exhaustedDecryptRetries.delete(retryKey);
|
|
532
|
+
this.decryptRetries.set(retryKey, {
|
|
533
|
+
...state,
|
|
534
|
+
attempts: 0,
|
|
535
|
+
inFlight: false,
|
|
536
|
+
timer: null
|
|
537
|
+
});
|
|
538
|
+
}
|
|
539
|
+
}
|
|
522
540
|
const pending = Array.from(this.decryptRetries.entries());
|
|
523
541
|
if (pending.length === 0) return;
|
|
524
542
|
LogService.debug("MatrixClientLite", `Retrying pending decryptions due to ${reason}`);
|
|
@@ -534,14 +552,14 @@ var MatrixDecryptBridge = class {
|
|
|
534
552
|
bindCryptoRetrySignals(crypto) {
|
|
535
553
|
if (!crypto || this.cryptoRetrySignalsBound) return;
|
|
536
554
|
this.cryptoRetrySignalsBound = true;
|
|
537
|
-
const trigger = (reason) => {
|
|
538
|
-
this.retryPendingNow(reason);
|
|
555
|
+
const trigger = (reason, options) => {
|
|
556
|
+
this.retryPendingNow(reason, options);
|
|
539
557
|
};
|
|
540
558
|
crypto.on(CryptoEvent.KeyBackupDecryptionKeyCached, () => {
|
|
541
|
-
trigger("crypto.keyBackupDecryptionKeyCached");
|
|
559
|
+
trigger("crypto.keyBackupDecryptionKeyCached", { includeExhausted: true });
|
|
542
560
|
});
|
|
543
561
|
crypto.on(CryptoEvent.RehydrationCompleted, () => {
|
|
544
|
-
trigger("dehydration.RehydrationCompleted");
|
|
562
|
+
trigger("dehydration.RehydrationCompleted", { includeExhausted: true });
|
|
545
563
|
});
|
|
546
564
|
crypto.on(CryptoEvent.DevicesUpdated, () => {
|
|
547
565
|
trigger("crypto.devicesUpdated");
|
|
@@ -551,7 +569,9 @@ var MatrixDecryptBridge = class {
|
|
|
551
569
|
});
|
|
552
570
|
}
|
|
553
571
|
stop() {
|
|
572
|
+
this.stopped = true;
|
|
554
573
|
for (const retryKey of this.decryptRetries.keys()) this.clearDecryptRetry(retryKey);
|
|
574
|
+
this.exhaustedDecryptRetries.clear();
|
|
555
575
|
}
|
|
556
576
|
async drainPendingDecryptions(reason) {
|
|
557
577
|
for (let attempts = 0; attempts < MATRIX_DECRYPT_RETRY_MAX_ATTEMPTS; attempts += 1) {
|
|
@@ -562,6 +582,7 @@ var MatrixDecryptBridge = class {
|
|
|
562
582
|
}
|
|
563
583
|
}
|
|
564
584
|
handleEncryptedEventDecrypted(params) {
|
|
585
|
+
if (this.stopped) return;
|
|
565
586
|
const decryptedRoomId = params.decryptedEvent.getRoomId() || params.roomId;
|
|
566
587
|
const decryptedRaw = this.deps.toRaw(params.decryptedEvent);
|
|
567
588
|
const retryEventId = decryptedRaw.event_id || params.encryptedEvent.getId() || "";
|
|
@@ -599,6 +620,7 @@ var MatrixDecryptBridge = class {
|
|
|
599
620
|
this.deps.emitFailedDecryption(roomId, event, error);
|
|
600
621
|
}
|
|
601
622
|
scheduleDecryptRetry(params) {
|
|
623
|
+
if (this.stopped) return;
|
|
602
624
|
const retryKey = resolveDecryptRetryKey(params.roomId, params.eventId);
|
|
603
625
|
if (!retryKey) return;
|
|
604
626
|
const existing = this.decryptRetries.get(retryKey);
|
|
@@ -609,7 +631,17 @@ var MatrixDecryptBridge = class {
|
|
|
609
631
|
const retry = this.decryptRetries.get(retryKey);
|
|
610
632
|
if (retry?.timer) clearTimeout(retry.timer);
|
|
611
633
|
this.decryptRetries.delete(retryKey);
|
|
612
|
-
|
|
634
|
+
const exhaustedAt = Date.now();
|
|
635
|
+
this.exhaustedDecryptRetries.set(retryKey, {
|
|
636
|
+
event: params.event,
|
|
637
|
+
roomId: params.roomId,
|
|
638
|
+
eventId: params.eventId,
|
|
639
|
+
attempts: attempts - 1,
|
|
640
|
+
inFlight: false,
|
|
641
|
+
timer: null,
|
|
642
|
+
exhaustedAt
|
|
643
|
+
});
|
|
644
|
+
this.pruneExhaustedDecryptRetries(exhaustedAt);
|
|
613
645
|
LogService.debug("MatrixClientLite", `Giving up decryption retry for ${params.eventId} in ${params.roomId} after ${attempts - 1} attempts`);
|
|
614
646
|
return;
|
|
615
647
|
}
|
|
@@ -633,20 +665,25 @@ var MatrixDecryptBridge = class {
|
|
|
633
665
|
state.inFlight = true;
|
|
634
666
|
state.timer = null;
|
|
635
667
|
this.activeRetryRuns += 1;
|
|
636
|
-
|
|
668
|
+
const retryEvent = state.event;
|
|
669
|
+
const retryCrypto = this.deps.client.getCrypto?.();
|
|
670
|
+
const canAttemptDecryption = retryCrypto !== void 0 && retryCrypto !== null && typeof retryEvent.attemptDecryption === "function";
|
|
671
|
+
if (!(canAttemptDecryption || typeof this.deps.client.decryptEventIfNeeded === "function")) {
|
|
637
672
|
this.clearDecryptRetry(retryKey);
|
|
638
673
|
this.activeRetryRuns = Math.max(0, this.activeRetryRuns - 1);
|
|
639
674
|
this.resolveRetryIdleIfNeeded();
|
|
640
675
|
return;
|
|
641
676
|
}
|
|
642
677
|
try {
|
|
643
|
-
await
|
|
678
|
+
if (canAttemptDecryption) await retryEvent.attemptDecryption?.(retryCrypto, { isRetry: true });
|
|
679
|
+
else await this.deps.client.decryptEventIfNeeded?.(state.event, { isRetry: true });
|
|
644
680
|
} catch {} finally {
|
|
645
681
|
state.inFlight = false;
|
|
646
682
|
this.activeRetryRuns = Math.max(0, this.activeRetryRuns - 1);
|
|
647
683
|
this.resolveRetryIdleIfNeeded();
|
|
648
684
|
}
|
|
649
685
|
if (this.decryptRetries.get(retryKey) !== state) return;
|
|
686
|
+
if (this.stopped) return;
|
|
650
687
|
if (isDecryptionFailure(state.event)) {
|
|
651
688
|
if (!shouldRetryDecryptionFailure(state.event)) {
|
|
652
689
|
this.clearDecryptRetry(retryKey);
|
|
@@ -668,6 +705,14 @@ var MatrixDecryptBridge = class {
|
|
|
668
705
|
this.exhaustedDecryptRetries.delete(retryKey);
|
|
669
706
|
this.failedDecryptionsNotified.delete(retryKey);
|
|
670
707
|
}
|
|
708
|
+
pruneExhaustedDecryptRetries(now) {
|
|
709
|
+
for (const [retryKey, state] of this.exhaustedDecryptRetries) if (now - state.exhaustedAt > MATRIX_DECRYPT_EXHAUSTED_RETRY_TTL_MS) this.exhaustedDecryptRetries.delete(retryKey);
|
|
710
|
+
while (this.exhaustedDecryptRetries.size > MATRIX_DECRYPT_EXHAUSTED_RETRY_MAX_ENTRIES) {
|
|
711
|
+
const oldest = this.exhaustedDecryptRetries.keys().next().value;
|
|
712
|
+
if (oldest === void 0) break;
|
|
713
|
+
this.exhaustedDecryptRetries.delete(oldest);
|
|
714
|
+
}
|
|
715
|
+
}
|
|
671
716
|
rememberDecryptedMessage(roomId, eventId) {
|
|
672
717
|
if (!eventId) return;
|
|
673
718
|
const now = Date.now();
|
|
@@ -11,6 +11,7 @@ const REQUIRED_MATRIX_PACKAGES = [
|
|
|
11
11
|
];
|
|
12
12
|
const MIN_MATRIX_CRYPTO_NATIVE_BINDING_BYTES = 1e6;
|
|
13
13
|
const MATRIX_COMMAND_OUTPUT_TAIL_BYTES = 64 * 1024;
|
|
14
|
+
const MATRIX_STREAM_ERROR_KILL_GRACE_MS = 1e3;
|
|
14
15
|
function resolveMissingMatrixPackages(resolveFn) {
|
|
15
16
|
const resolve = resolveFn ?? defaultResolveFn;
|
|
16
17
|
return REQUIRED_MATRIX_PACKAGES.filter((pkg) => {
|
|
@@ -65,6 +66,8 @@ async function runFixedCommandWithTimeout(params) {
|
|
|
65
66
|
let stderr = "";
|
|
66
67
|
let settled = false;
|
|
67
68
|
let timer = null;
|
|
69
|
+
let streamKillTimer = null;
|
|
70
|
+
let streamErrorMessage = null;
|
|
68
71
|
const killChildOnExit = () => {
|
|
69
72
|
if (!settled && proc.exitCode === null) proc.kill("SIGTERM");
|
|
70
73
|
};
|
|
@@ -72,6 +75,7 @@ async function runFixedCommandWithTimeout(params) {
|
|
|
72
75
|
if (settled) return;
|
|
73
76
|
settled = true;
|
|
74
77
|
if (timer) clearTimeout(timer);
|
|
78
|
+
if (streamKillTimer) clearTimeout(streamKillTimer);
|
|
75
79
|
process.off("exit", killChildOnExit);
|
|
76
80
|
resolve(result);
|
|
77
81
|
};
|
|
@@ -82,8 +86,20 @@ async function runFixedCommandWithTimeout(params) {
|
|
|
82
86
|
proc.stderr?.on("data", (chunk) => {
|
|
83
87
|
stderr = appendBoundedOutputTail(stderr, chunk);
|
|
84
88
|
});
|
|
89
|
+
const failReadableStream = (streamName) => (error) => {
|
|
90
|
+
if (settled || streamErrorMessage) return;
|
|
91
|
+
streamErrorMessage = `${streamName} stream failed: ${formatErrorMessage(error)}`;
|
|
92
|
+
if (proc.exitCode === null) proc.kill("SIGTERM");
|
|
93
|
+
streamKillTimer = setTimeout(() => {
|
|
94
|
+
if (!settled && proc.exitCode === null) proc.kill("SIGKILL");
|
|
95
|
+
}, MATRIX_STREAM_ERROR_KILL_GRACE_MS);
|
|
96
|
+
streamKillTimer.unref?.();
|
|
97
|
+
};
|
|
98
|
+
proc.stdout?.on("error", failReadableStream("stdout"));
|
|
99
|
+
proc.stderr?.on("error", failReadableStream("stderr"));
|
|
85
100
|
timer = setTimeout(() => {
|
|
86
101
|
proc.kill("SIGKILL");
|
|
102
|
+
if (streamErrorMessage) return;
|
|
87
103
|
finalize({
|
|
88
104
|
code: 124,
|
|
89
105
|
stdout,
|
|
@@ -91,6 +107,7 @@ async function runFixedCommandWithTimeout(params) {
|
|
|
91
107
|
});
|
|
92
108
|
}, params.timeoutMs);
|
|
93
109
|
proc.on("error", (err) => {
|
|
110
|
+
if (streamErrorMessage) return;
|
|
94
111
|
finalize({
|
|
95
112
|
code: 1,
|
|
96
113
|
stdout,
|
|
@@ -98,10 +115,11 @@ async function runFixedCommandWithTimeout(params) {
|
|
|
98
115
|
});
|
|
99
116
|
});
|
|
100
117
|
proc.on("close", (code) => {
|
|
118
|
+
const streamErrorStderr = streamErrorMessage ? stderr ? appendBoundedOutputTail(stderr, `\n${streamErrorMessage}`) : streamErrorMessage : stderr;
|
|
101
119
|
finalize({
|
|
102
|
-
code: code ?? 1,
|
|
120
|
+
code: streamErrorMessage ? 1 : code ?? 1,
|
|
103
121
|
stdout,
|
|
104
|
-
stderr
|
|
122
|
+
stderr: streamErrorStderr
|
|
105
123
|
});
|
|
106
124
|
});
|
|
107
125
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
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-
|
|
3
|
+
import { f as resolveMatrixAuth } from "./shared-QI0RpVnw.js";
|
|
4
|
+
import "./client-BtISa2BM.js";
|
|
5
5
|
import { t as MatrixAuthedHttpClient } from "./http-client-BBfH0FfA.js";
|
|
6
6
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
7
7
|
//#region extensions/matrix/src/directory-live.ts
|
|
@@ -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-BQ69V3CR.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,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-BMwJ5LY2.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;
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as registerMatrixCliMetadata } from "./cli-metadata-
|
|
1
|
+
import { n as registerMatrixCliMetadata } from "./cli-metadata-CQ0Fu1Zr.js";
|
|
2
2
|
import { registerMatrixSubagentHooks } from "./subagent-hooks-api.js";
|
|
3
3
|
import { defineBundledChannelEntry } from "openclaw/plugin-sdk/channel-entry-contract";
|
|
4
4
|
//#region extensions/matrix/index.ts
|
|
@@ -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-Dl4lMAei.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-BMwJ5LY2.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-BMwJ5LY2.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-BkdnLpBE.js";
|
|
5
|
+
import { r as withResolvedRoomAction } from "./client-rYWNQvAN.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
|
|
@@ -79,6 +79,7 @@ async function sendMatrixMessage(to, content, opts = {}) {
|
|
|
79
79
|
return await sendMessageMatrix(to, content, {
|
|
80
80
|
cfg: opts.cfg,
|
|
81
81
|
mediaUrl: opts.mediaUrl,
|
|
82
|
+
mediaAccess: opts.mediaAccess,
|
|
82
83
|
mediaLocalRoots: opts.mediaLocalRoots,
|
|
83
84
|
replyToId: opts.replyToId,
|
|
84
85
|
threadId: opts.threadId,
|