@openclaw/matrix 2026.5.12 → 2026.5.14-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-LpWmoFyw.js → approval-handler.runtime-Q8ZlmQv_.js} +5 -6
- package/dist/{approval-ids-DoC2z7tR.js → approval-ids-D6IQvvRE.js} +1 -1
- package/dist/{approval-reaction-auth-DbcA1gGd.js → approval-reaction-auth-99PRu7rF.js} +2 -2
- package/dist/{channel-B-R2dceO.js → channel-BLKRuTHs.js} +285 -26
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel.runtime-DdtNY_To.js → channel.runtime-9qwvlUwp.js} +8 -8
- package/dist/{cli-Cq80go7q.js → cli-BeWdjXLV.js} +15 -17
- package/dist/{cli-metadata-OtekEqAD.js → cli-metadata-B2_76YSe.js} +1 -1
- package/dist/cli-metadata.js +1 -1
- package/dist/{client-DzjShjVN.js → client-D6fFVbNM.js} +2 -2
- package/dist/{client-bootstrap-Am_ZEH3x.js → client-bootstrap-DBwUKgC3.js} +3 -3
- package/dist/{client-CyxIx4Fv.js → client-oci1tD6-.js} +4 -5
- package/dist/{account-config-D2W-V1eQ.js → config-paths-msaDGRh6.js} +20 -2
- package/dist/{config-schema-B975BYl0.js → config-schema-BPCzSyjT.js} +102 -4
- package/dist/contract-api.js +5 -6
- package/dist/{create-client-DpoW106T.js → create-client-BahCtURn.js} +4 -4
- package/dist/{credentials-DV6fWXhC.js → credentials-DK0lK9cZ.js} +1 -1
- package/dist/{credentials-write.runtime-zniTq-Gr.js → credentials-write.runtime-DhPvBU-C.js} +1 -1
- package/dist/{crypto-runtime-DS6R8y_n.js → crypto-runtime-B-SPS5mv.js} +5 -5
- package/dist/{deps-CU5W9Ixu.js → deps-LqqGWPWt.js} +10 -14
- package/dist/{directory-live-Bn66SRSD.js → directory-live-BCfx1C0G.js} +3 -3
- package/dist/{doctor-KjAvjAJu.js → doctor-KuNYX5N3.js} +3 -3
- package/dist/doctor-contract-api.js +1 -1
- package/dist/{draft-stream-D_FlbmCh.js → draft-stream-BayHVmtO.js} +1 -2
- package/dist/{encryption-guidance-BPi3A_m3.js → encryption-guidance-1QoIvd-g.js} +1 -1
- package/dist/{http-client-C7AeVJay.js → http-client-DS3UoC_p.js} +1 -1
- package/dist/index.js +2 -2
- package/dist/{legacy-crypto-inspector-pB252vPO.js → legacy-crypto-inspector-_gWJGVQ_.js} +1 -1
- package/dist/{legacy-crypto-restore-Biw-w2ng.js → legacy-crypto-restore-B9eF1gob.js} +1 -1
- package/dist/{logging-DZHSPP5N.js → logging-bJ8EEe1G.js} +1 -1
- package/dist/{matrix-migration.runtime-DfjNMeoX.js → matrix-migration.runtime-Cf_wX9mk.js} +3 -3
- package/dist/{media-text-psyGloYl.js → media-text-4h4YwCGC.js} +1 -1
- package/dist/{messages-DQ8xXWiP.js → messages-BKTEUSwJ.js} +5 -5
- package/dist/{migration-snapshot.runtime-CKHE3xF9.js → migration-snapshot.runtime-C7yiKWS7.js} +1 -1
- package/dist/{monitor-C8cEvvTe.js → monitor-k-b_TmCm.js} +66 -46
- package/dist/plugin-entry.handlers.runtime.js +2 -2
- package/dist/probe.runtime-zExLz3Ek.js +3 -0
- package/dist/{profile-update-DleMeUHj.js → profile-update-BAAflurI.js} +2 -3
- package/dist/{reaction-events-CiARZfjk.js → reaction-events-Dimh8FUE.js} +6 -6
- package/dist/{resolve-targets-BbzYe9Qi.js → resolve-targets-DPqngj4V.js} +1 -1
- package/dist/{resolver.runtime-BWFMWEsg.js → resolver.runtime-C0RDK0VW.js} +1 -1
- package/dist/{route-D6rg-iXN.js → route-R-ajT21_.js} +1 -1
- package/dist/{runtime-api-DTKcXOhp.js → runtime-api-C-QeChQj.js} +1 -1
- package/dist/runtime-api.js +1 -1
- package/dist/runtime-heavy-api.js +2 -2
- package/dist/{sdk-DXWmb94u.js → sdk-BwfNtBhM.js} +301 -13
- package/dist/secret-contract-api.js +1 -1
- package/dist/{send-Df-pDuG6.js → send-CdoJ1pZY.js} +323 -6
- package/dist/{setup-bootstrap-DXWxzR7A.js → setup-bootstrap-krQU60Az.js} +4 -4
- package/dist/setup-core-CgOV8zmh.js +675 -0
- package/dist/setup-plugin-api.js +3 -4
- package/dist/{setup-surface-DuRQrrpU.js → setup-surface-BgUaEySF.js} +7 -10
- package/dist/{config-BR4uLzNs.js → shared-BlXw87Kp.js} +199 -9
- package/dist/{logger-CnZRVrux.js → startup-abort-br7BZHJQ.js} +32 -1
- package/dist/{startup-verification-Demyp0bP.js → startup-verification-CTfhD7V_.js} +2 -2
- package/dist/{storage-tC3ujLiW.js → storage-HI1nL3im.js} +1 -1
- package/dist/{subagent-hooks-DQbyqq9V.js → subagent-hooks-api-BgQgDwAS.js} +22 -1
- package/dist/subagent-hooks-api.js +1 -22
- package/dist/test-api.js +2 -2
- package/dist/thread-binding-api.js +1 -1
- package/dist/{thread-bindings--P1UYe7t.js → thread-bindings-8AyQOYDT.js} +2 -2
- package/dist/{tool-actions.runtime-AFGhzK--.js → tool-actions.runtime-BuCnleVD.js} +9 -9
- package/dist/{verification-BbGdzYQl.js → verification-DvC37Z_y.js} +2 -2
- package/openclaw.plugin.json +96 -0
- package/package.json +6 -6
- package/dist/accounts-Bm90Rzvp.js +0 -130
- package/dist/allowlist-sTzpCn5d.js +0 -68
- package/dist/config-paths-nsVaysCu.js +0 -19
- package/dist/config-update-wZX-HLMn.js +0 -143
- package/dist/direct-management--Y8ypgLv.js +0 -251
- package/dist/direct-room-XkutHjES.js +0 -76
- package/dist/exec-approvals-Crnh543m.js +0 -196
- package/dist/probe.runtime-NE73hi9o.js +0 -3
- package/dist/profile-BlHu0wDX.js +0 -111
- package/dist/recovery-key-store-BTJ6jz5v.js +0 -294
- package/dist/session-store-metadata-DQXjgNLt.js +0 -77
- package/dist/setup-core-B5X7HxAP.js +0 -116
- package/dist/setup-dm-policy-Ca3jA4YW.js +0 -195
- package/dist/shared-CkbpEI5j.js +0 -195
- package/dist/startup-abort-56edvmbM.js +0 -32
- /package/dist/{active-client-uhlxdhEy.js → active-client-DUi-lumi.js} +0 -0
- /package/dist/{approval-reactions-o2_tuH8D.js → approval-reactions-Cwd1PMCC.js} +0 -0
- /package/dist/{async-lock-uQfhfQIY.js → async-lock-SsmtFXtt.js} +0 -0
- /package/dist/{backup-health-Cabu_WQC.js → backup-health-3BHbHxyd.js} +0 -0
- /package/dist/{config-secret-input.runtime-DiKFehsE.js → config-secret-input.runtime-nbLCnJq7.js} +0 -0
- /package/dist/{crypto-node.runtime-pihzdpY7.js → crypto-node.runtime-D9qxgRPa.js} +0 -0
- /package/dist/{device-health-UVYpbA_W.js → device-health-Di9MUzFj.js} +0 -0
- /package/dist/{doctor-contract-D4-64QuJ.js → doctor-contract-s4gUPmRN.js} +0 -0
- /package/dist/{errors-CTcpEDq-.js → errors-BpHgvm2o.js} +0 -0
- /package/dist/{exec-approval-resolver-Bza9Dhlm.js → exec-approval-resolver-C8faS0XB.js} +0 -0
- /package/dist/{migration-snapshot-backup-DaCHTp8C.js → migration-snapshot-backup-BWTIFXgQ.js} +0 -0
- /package/dist/{reaction-common-ejrL19w-.js → reaction-common-B-QgNfEs.js} +0 -0
- /package/dist/{runtime-C6X4h_SJ.js → runtime-lwTSy9Yt.js} +0 -0
- /package/dist/{secret-contract-DcrJWCQI.js → secret-contract-e4SdhUtT.js} +0 -0
- /package/dist/{sync-state-C_beeevA.js → sync-state-Bx0gPaGA.js} +0 -0
- /package/dist/{thread-binding-api-Cq_E-E1K.js → thread-binding-api-Bx55B6hm.js} +0 -0
- /package/dist/{timeout-abort-signal-CtaIaP1v.js → timeout-abort-signal-sT0wAxVn.js} +0 -0
- /package/dist/{url-validation-DiK9j7jz.js → url-validation-CBZBxN3F.js} +0 -0
|
@@ -1,30 +1,26 @@
|
|
|
1
1
|
import { t as isMatrixQualifiedUserId } from "./target-ids-80nQ2gql.js";
|
|
2
|
-
import {
|
|
2
|
+
import { c as resolveMatrixAccountConfig, s as resolveMatrixAccountAllowlistConfig } from "./config-paths-msaDGRh6.js";
|
|
3
3
|
import { t as getMatrixRuntime } from "./runtime-Dog86njy.js";
|
|
4
|
-
import {
|
|
5
|
-
import { n as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { i as resolveMatrixStateFilePath } from "./storage-
|
|
9
|
-
import { a as sendMessageMatrix,
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { n as
|
|
15
|
-
import { i as
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import
|
|
20
|
-
import { t as
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import "./
|
|
24
|
-
import { d as resolveDefaultGroupPolicy, h as warnMissingProviderGroupPolicyFallbackOnce, m as resolveThreadBindingMaxAgeMsForChannel, p as resolveThreadBindingIdleTimeoutMsForChannel, t as GROUP_POLICY_BLOCKED_LABEL, u as resolveAllowlistProviderRuntimeGroupPolicy } from "./runtime-api-DTKcXOhp.js";
|
|
25
|
-
import { t as resolveMatrixTargets } from "./resolve-targets-BbzYe9Qi.js";
|
|
26
|
-
import { t as formatMatrixEncryptedEventDisabledWarning } from "./encryption-guidance-BPi3A_m3.js";
|
|
27
|
-
import { a as EventType, i as resolveMatrixThreadRouting, n as resolveMatrixReplyToEventId, o as RelationType, r as resolveMatrixThreadRootId, t as resolveMatrixInboundRoute } from "./route-D6rg-iXN.js";
|
|
4
|
+
import { m as resolveConfiguredMatrixBotUserIds } from "./setup-core-CgOV8zmh.js";
|
|
5
|
+
import { a as buildAllowlistResolutionSummary, c as createTypingCallbacks, d as logInboundDrop, f as logTypingFailure, h as toLocationContext, i as addAllowlistUserEntriesFromConfigEntry, l as formatLocationText, m as summarizeMapping, n as resolveMatrixStoredSessionMeta, o as canonicalizeAllowlistWithResolvedIds, p as patchAllowlistUsersInConfigEntries, r as resolveMatrixRoomConfig, s as createReplyPrefixOptions, u as getAgentScopedMediaLocalRoots } from "./channel-BLKRuTHs.js";
|
|
6
|
+
import { a as normalizeMatrixUserId, i as normalizeMatrixAllowList, o as resolveMatrixAllowListMatch } from "./config-schema-BPCzSyjT.js";
|
|
7
|
+
import { r as isMatrixNotFoundError, t as formatMatrixErrorMessage } from "./errors-BpHgvm2o.js";
|
|
8
|
+
import { i as resolveMatrixStateFilePath } from "./storage-HI1nL3im.js";
|
|
9
|
+
import { D as parsePollStartContent, S as formatPollAsText, T as isPollStartType, _ as readJoinedMatrixMembers, a as sendMessageMatrix, f as promoteMatrixDirectRoomCandidate, g as isStrictDirectMembership, h as hasDirectMatrixMemberFlag, t as chunkMatrixText, v as MATRIX_OPENCLAW_FINALIZED_PREVIEW_KEY, w as isPollEventType } from "./send-CdoJ1pZY.js";
|
|
10
|
+
import { t as createMatrixThreadBindingManager } from "./thread-bindings-8AyQOYDT.js";
|
|
11
|
+
import { t as createAsyncLock } from "./async-lock-SsmtFXtt.js";
|
|
12
|
+
import { i as throwIfMatrixStartupAborted, o as LogService, r as isMatrixStartupAbortError } from "./startup-abort-br7BZHJQ.js";
|
|
13
|
+
import { i as isMatrixMediaSizeLimitError, r as MatrixMediaSizeLimitError } from "./http-client-DS3UoC_p.js";
|
|
14
|
+
import { n as isMatrixReadySyncState, r as isMatrixTerminalSyncState, t as isMatrixDisconnectedSyncState } from "./sync-state-Bx0gPaGA.js";
|
|
15
|
+
import { a as resolveMatrixMessageBody, i as resolveMatrixMessageAttachment, n as formatMatrixMediaUnavailableText, r as formatMatrixMessageText, s as fetchMatrixPollSnapshot, t as formatMatrixMediaTooLargeText } from "./media-text-4h4YwCGC.js";
|
|
16
|
+
import { n as setActiveMatrixClient } from "./active-client-DUi-lumi.js";
|
|
17
|
+
import { t as isBunRuntime } from "./runtime-lwTSy9Yt.js";
|
|
18
|
+
import { c as backfillMatrixAuthDeviceIdAfterStartup, i as resolveSharedMatrixClient, l as resolveMatrixAuth, n as releaseSharedClientInstance, u as resolveMatrixAuthContext } from "./shared-BlXw87Kp.js";
|
|
19
|
+
import "./client-oci1tD6-.js";
|
|
20
|
+
import { d as resolveDefaultGroupPolicy, h as warnMissingProviderGroupPolicyFallbackOnce, m as resolveThreadBindingMaxAgeMsForChannel, p as resolveThreadBindingIdleTimeoutMsForChannel, t as GROUP_POLICY_BLOCKED_LABEL, u as resolveAllowlistProviderRuntimeGroupPolicy } from "./runtime-api-C-QeChQj.js";
|
|
21
|
+
import { t as resolveMatrixTargets } from "./resolve-targets-DPqngj4V.js";
|
|
22
|
+
import { t as formatMatrixEncryptedEventDisabledWarning } from "./encryption-guidance-1QoIvd-g.js";
|
|
23
|
+
import { a as EventType, i as resolveMatrixThreadRouting, n as resolveMatrixReplyToEventId, o as RelationType, r as resolveMatrixThreadRootId, t as resolveMatrixInboundRoute } from "./route-R-ajT21_.js";
|
|
28
24
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString, normalizeStringifiedOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
29
25
|
import { createPreviewMessageReceipt, defineFinalizableLivePreviewAdapter, deliverWithFinalizableLivePreviewAdapter } from "openclaw/plugin-sdk/channel-message";
|
|
30
26
|
import { CHANNEL_APPROVAL_NATIVE_RUNTIME_CONTEXT_CAPABILITY } from "openclaw/plugin-sdk/approval-handler-adapter-runtime";
|
|
@@ -37,8 +33,9 @@ import { waitUntilAbort } from "openclaw/plugin-sdk/channel-lifecycle";
|
|
|
37
33
|
import { registerChannelRuntimeContext } from "openclaw/plugin-sdk/channel-runtime-context";
|
|
38
34
|
import { isDangerousNameMatchingEnabled } from "openclaw/plugin-sdk/dangerous-name-runtime";
|
|
39
35
|
import { createChannelIngressResolver, defineStableChannelIngressIdentity } from "openclaw/plugin-sdk/channel-ingress-runtime";
|
|
40
|
-
import { createChannelProgressDraftGate, formatChannelProgressDraftLine, formatChannelProgressDraftLineForEntry, formatChannelProgressDraftText, isChannelProgressDraftWorkToolName, resolveChannelProgressDraftMaxLines } from "openclaw/plugin-sdk/channel-streaming";
|
|
36
|
+
import { buildChannelProgressDraftLineForEntry, createChannelProgressDraftGate, formatChannelProgressDraftLine, formatChannelProgressDraftLineForEntry, formatChannelProgressDraftText, isChannelProgressDraftWorkToolName, mergeChannelProgressDraftLine, normalizeChannelProgressDraftLineIdentity, resolveChannelProgressDraftMaxLines } from "openclaw/plugin-sdk/channel-streaming";
|
|
41
37
|
import { evaluateSupplementalContextVisibility, resolveChannelContextVisibilityMode } from "openclaw/plugin-sdk/context-visibility-runtime";
|
|
38
|
+
import { mergePairLoopGuardConfig } from "openclaw/plugin-sdk/pair-loop-guard-runtime";
|
|
42
39
|
import { resolvePinnedMainDmOwnerFromAllowlist } from "openclaw/plugin-sdk/security-runtime";
|
|
43
40
|
import { escapeRegExp } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
44
41
|
import { createConnectedChannelStatusPatch, createTransportActivityStatusPatch } from "openclaw/plugin-sdk/gateway-runtime";
|
|
@@ -799,7 +796,7 @@ const SAS_NOTICE_RETRY_DELAY_MS = 750;
|
|
|
799
796
|
const VERIFICATION_EVENT_STARTUP_GRACE_MS = 3e4;
|
|
800
797
|
let matrixDirectRoomDepsPromise;
|
|
801
798
|
async function loadMatrixDirectRoomDeps() {
|
|
802
|
-
matrixDirectRoomDepsPromise ??= Promise.all([import("./
|
|
799
|
+
matrixDirectRoomDepsPromise ??= Promise.all([import("./send-CdoJ1pZY.js").then((n) => n.d), import("./send-CdoJ1pZY.js").then((n) => n.m)]).then(([directManagementModule, directRoomModule]) => ({
|
|
803
800
|
inspectMatrixDirectRooms: directManagementModule.inspectMatrixDirectRooms,
|
|
804
801
|
isStrictDirectRoom: directRoomModule.isStrictDirectRoom
|
|
805
802
|
}));
|
|
@@ -1387,6 +1384,13 @@ function resolveMatrixAckReactionConfig(params) {
|
|
|
1387
1384
|
}
|
|
1388
1385
|
//#endregion
|
|
1389
1386
|
//#region extensions/matrix/src/matrix/monitor/location.ts
|
|
1387
|
+
function decodeGeoUriParamValue(value) {
|
|
1388
|
+
try {
|
|
1389
|
+
return decodeURIComponent(value);
|
|
1390
|
+
} catch {
|
|
1391
|
+
return value;
|
|
1392
|
+
}
|
|
1393
|
+
}
|
|
1390
1394
|
function parseGeoUri(value) {
|
|
1391
1395
|
const trimmed = value.trim();
|
|
1392
1396
|
if (!trimmed) return null;
|
|
@@ -1407,7 +1411,7 @@ function parseGeoUri(value) {
|
|
|
1407
1411
|
const key = normalizeLowercaseStringOrEmpty(rawKey);
|
|
1408
1412
|
if (!key) continue;
|
|
1409
1413
|
const valuePart = rawValue.trim();
|
|
1410
|
-
params.set(key, valuePart ?
|
|
1414
|
+
params.set(key, valuePart ? decodeGeoUriParamValue(valuePart) : "");
|
|
1411
1415
|
}
|
|
1412
1416
|
const accuracyRaw = params.get("u");
|
|
1413
1417
|
const accuracy = accuracyRaw ? Number.parseFloat(accuracyRaw) : void 0;
|
|
@@ -2001,7 +2005,7 @@ let sessionBindingRuntimePromise;
|
|
|
2001
2005
|
let matrixReactionEventsPromise;
|
|
2002
2006
|
let matrixDraftStreamPromise;
|
|
2003
2007
|
function loadMatrixSendModule() {
|
|
2004
|
-
matrixSendModulePromise ??= import("./send-
|
|
2008
|
+
matrixSendModulePromise ??= import("./send-CdoJ1pZY.js").then((n) => n.l);
|
|
2005
2009
|
return matrixSendModulePromise;
|
|
2006
2010
|
}
|
|
2007
2011
|
function loadAcpBindingRuntime() {
|
|
@@ -2013,11 +2017,11 @@ function loadSessionBindingRuntime() {
|
|
|
2013
2017
|
return sessionBindingRuntimePromise;
|
|
2014
2018
|
}
|
|
2015
2019
|
function loadMatrixReactionEvents() {
|
|
2016
|
-
matrixReactionEventsPromise ??= import("./reaction-events-
|
|
2020
|
+
matrixReactionEventsPromise ??= import("./reaction-events-Dimh8FUE.js");
|
|
2017
2021
|
return matrixReactionEventsPromise;
|
|
2018
2022
|
}
|
|
2019
2023
|
function loadMatrixDraftStream() {
|
|
2020
|
-
matrixDraftStreamPromise ??= import("./draft-stream-
|
|
2024
|
+
matrixDraftStreamPromise ??= import("./draft-stream-BayHVmtO.js");
|
|
2021
2025
|
return matrixDraftStreamPromise;
|
|
2022
2026
|
}
|
|
2023
2027
|
const MAX_TRACKED_PAIRING_REPLY_SENDERS = 512;
|
|
@@ -2122,7 +2126,7 @@ function formatMatrixToolProgressMarkdownCode(text) {
|
|
|
2122
2126
|
return `\`${(text.length <= MATRIX_TOOL_PROGRESS_MAX_CHARS ? text : `${text.slice(0, MATRIX_TOOL_PROGRESS_MAX_CHARS - 1).trimEnd()}...`).replaceAll("`", "'")}\``;
|
|
2123
2127
|
}
|
|
2124
2128
|
function createMatrixRoomMessageHandler(params) {
|
|
2125
|
-
const { client, core, cfg, accountId, runtime, logger, logVerboseMessage, allowFromResolvedEntries = [], groupAllowFromResolvedEntries = [], roomsConfig, accountAllowBots, configuredBotUserIds = /* @__PURE__ */ new Set(), groupPolicy, replyToMode, threadReplies, dmThreadReplies, dmSessionScope, streaming, previewToolProgressEnabled, blockStreamingEnabled, dmEnabled, dmPolicy, textLimit, mediaMaxBytes, historyLimit, startupMs, startupGraceMs, dropPreStartupMessages, inboundDeduper, directTracker, getRoomInfo, getMemberDisplayName, needsRoomAliasesForConfig, resolveLiveUserAllowlist = resolveMatrixMonitorLiveUserAllowlist } = params;
|
|
2129
|
+
const { client, core, cfg, accountId, accountConfig, runtime, logger, logVerboseMessage, allowFromResolvedEntries = [], groupAllowFromResolvedEntries = [], roomsConfig, accountAllowBots, configuredBotUserIds = /* @__PURE__ */ new Set(), groupPolicy, replyToMode, threadReplies, dmThreadReplies, dmSessionScope, streaming, previewToolProgressEnabled, blockStreamingEnabled, dmEnabled, dmPolicy, textLimit, mediaMaxBytes, historyLimit, startupMs, startupGraceMs, dropPreStartupMessages, inboundDeduper, directTracker, getRoomInfo, getMemberDisplayName, needsRoomAliasesForConfig, resolveLiveUserAllowlist = resolveMatrixMonitorLiveUserAllowlist } = params;
|
|
2126
2130
|
const contextVisibilityMode = resolveChannelContextVisibilityMode({
|
|
2127
2131
|
cfg,
|
|
2128
2132
|
channel: "matrix",
|
|
@@ -2311,6 +2315,16 @@ function createMatrixRoomMessageHandler(params) {
|
|
|
2311
2315
|
await commitInboundEventIfClaimed();
|
|
2312
2316
|
return;
|
|
2313
2317
|
}
|
|
2318
|
+
const botLoopProtection = isConfiguredBotSender && senderId !== selfUserId ? {
|
|
2319
|
+
scopeId: accountId,
|
|
2320
|
+
conversationId: roomId,
|
|
2321
|
+
senderId,
|
|
2322
|
+
receiverId: selfUserId,
|
|
2323
|
+
config: mergePairLoopGuardConfig(accountConfig?.botLoopProtection, roomConfig?.botLoopProtection),
|
|
2324
|
+
defaultsConfig: cfg.channels?.defaults?.botLoopProtection,
|
|
2325
|
+
defaultEnabled: true,
|
|
2326
|
+
nowMs: eventTs ?? void 0
|
|
2327
|
+
} : void 0;
|
|
2314
2328
|
if (isRoom && roomConfig && !roomConfigInfo?.allowed) {
|
|
2315
2329
|
logVerboseMessage(`matrix: room disabled room=${roomId} (${roomMatchMeta})`);
|
|
2316
2330
|
await commitInboundEventIfClaimed();
|
|
@@ -2659,6 +2673,7 @@ function createMatrixRoomMessageHandler(params) {
|
|
|
2659
2673
|
triggerSnapshot: preparedTrigger,
|
|
2660
2674
|
threadRootId,
|
|
2661
2675
|
thread,
|
|
2676
|
+
botLoopProtection,
|
|
2662
2677
|
effectiveGroupAllowFrom,
|
|
2663
2678
|
effectiveRoomUsers
|
|
2664
2679
|
};
|
|
@@ -2675,7 +2690,7 @@ function createMatrixRoomMessageHandler(params) {
|
|
|
2675
2690
|
return await continueIngress(prefix);
|
|
2676
2691
|
})();
|
|
2677
2692
|
if (!resolvedIngressResult) return;
|
|
2678
|
-
const { route: _route, hasExplicitSessionBinding, roomConfig, isDirectMessage, isRoom, shouldRequireMention, wasMentioned, shouldBypassMention, canDetectMention, commandAuthorized, inboundHistory, senderName, bodyText, commandBodyText, media, locationPayload, messageId, triggerSnapshot, threadRootId, thread, effectiveGroupAllowFrom, effectiveRoomUsers } = resolvedIngressResult;
|
|
2693
|
+
const { route: _route, hasExplicitSessionBinding, roomConfig, isDirectMessage, isRoom, shouldRequireMention, wasMentioned, shouldBypassMention, canDetectMention, commandAuthorized, inboundHistory, senderName, bodyText, commandBodyText, media, locationPayload, messageId, triggerSnapshot, threadRootId, thread, botLoopProtection, effectiveGroupAllowFrom, effectiveRoomUsers } = resolvedIngressResult;
|
|
2679
2694
|
const replyToEventId = resolveMatrixReplyToEventId(event.content);
|
|
2680
2695
|
const threadTarget = thread.threadId;
|
|
2681
2696
|
const isRoomContextSenderAllowed = (contextSenderId) => {
|
|
@@ -2906,11 +2921,13 @@ function createMatrixRoomMessageHandler(params) {
|
|
|
2906
2921
|
const pushPreviewToolProgress = async (line, options) => {
|
|
2907
2922
|
if (!draftStream) return;
|
|
2908
2923
|
if (options?.toolName !== void 0 && !isChannelProgressDraftWorkToolName(options.toolName)) return;
|
|
2909
|
-
const normalized = line
|
|
2924
|
+
const normalized = normalizeChannelProgressDraftLineIdentity(line);
|
|
2925
|
+
const progressLine = typeof line === "object" && line !== void 0 ? line : normalized;
|
|
2910
2926
|
if (!progressDraftStreaming) {
|
|
2911
2927
|
if (!shouldStreamPreviewToolProgress || previewToolProgressSuppressed || !normalized) return;
|
|
2912
|
-
|
|
2913
|
-
|
|
2928
|
+
const nextLines = mergeChannelProgressDraftLine(previewToolProgressLines, progressLine, { maxLines: resolveChannelProgressDraftMaxLines(progressConfigEntry) });
|
|
2929
|
+
if (nextLines === previewToolProgressLines) return;
|
|
2930
|
+
previewToolProgressLines = nextLines;
|
|
2914
2931
|
draftStream.update(formatChannelProgressDraftText({
|
|
2915
2932
|
entry: progressConfigEntry,
|
|
2916
2933
|
lines: previewToolProgressLines,
|
|
@@ -2920,9 +2937,7 @@ function createMatrixRoomMessageHandler(params) {
|
|
|
2920
2937
|
}));
|
|
2921
2938
|
return;
|
|
2922
2939
|
}
|
|
2923
|
-
if (shouldStreamPreviewToolProgress && !previewToolProgressSuppressed && normalized) {
|
|
2924
|
-
if (previewToolProgressLines.at(-1) !== normalized) previewToolProgressLines = [...previewToolProgressLines, normalized].slice(-resolveChannelProgressDraftMaxLines(progressConfigEntry));
|
|
2925
|
-
}
|
|
2940
|
+
if (shouldStreamPreviewToolProgress && !previewToolProgressSuppressed && normalized) previewToolProgressLines = mergeChannelProgressDraftLine(previewToolProgressLines, progressLine, { maxLines: resolveChannelProgressDraftMaxLines(progressConfigEntry) });
|
|
2926
2941
|
const alreadyStarted = progressDraftGate.hasStarted;
|
|
2927
2942
|
await progressDraftGate.noteWork();
|
|
2928
2943
|
if (alreadyStarted && progressDraftGate.hasStarted) renderProgressDraft();
|
|
@@ -2952,8 +2967,9 @@ function createMatrixRoomMessageHandler(params) {
|
|
|
2952
2967
|
}, payload.detailMode ? { detailMode: payload.detailMode } : void 0), { toolName });
|
|
2953
2968
|
},
|
|
2954
2969
|
onItemEvent: async (payload) => {
|
|
2955
|
-
await pushPreviewToolProgress(
|
|
2970
|
+
await pushPreviewToolProgress(buildChannelProgressDraftLineForEntry(progressConfigEntry, {
|
|
2956
2971
|
event: "item",
|
|
2972
|
+
itemId: payload.itemId,
|
|
2957
2973
|
itemKind: payload.kind,
|
|
2958
2974
|
title: payload.title,
|
|
2959
2975
|
name: payload.name,
|
|
@@ -3257,6 +3273,7 @@ function createMatrixRoomMessageHandler(params) {
|
|
|
3257
3273
|
storePath,
|
|
3258
3274
|
ctxPayload,
|
|
3259
3275
|
recordInboundSession: core.channel.session.recordInboundSession,
|
|
3276
|
+
botLoopProtection,
|
|
3260
3277
|
record: {
|
|
3261
3278
|
updateLastRoute: isDirectMessage ? {
|
|
3262
3279
|
sessionKey: _route.mainSessionKey,
|
|
@@ -3336,7 +3353,10 @@ function createMatrixRoomMessageHandler(params) {
|
|
|
3336
3353
|
})
|
|
3337
3354
|
}
|
|
3338
3355
|
});
|
|
3339
|
-
if (!turnResult.dispatched)
|
|
3356
|
+
if (!turnResult.dispatched) {
|
|
3357
|
+
if (turnResult.admission.kind === "drop" && turnResult.admission.reason === "bot-loop-protection") await commitInboundEventIfClaimed();
|
|
3358
|
+
return;
|
|
3359
|
+
}
|
|
3340
3360
|
const { dispatchResult } = turnResult;
|
|
3341
3361
|
const { queuedFinal, counts } = dispatchResult;
|
|
3342
3362
|
if (finalReplyDeliveryFailed) {
|
|
@@ -3668,11 +3688,11 @@ function createMatrixRoomInfoResolver(client) {
|
|
|
3668
3688
|
let matrixStartupMaintenanceDepsPromise;
|
|
3669
3689
|
async function loadMatrixStartupMaintenanceDeps() {
|
|
3670
3690
|
matrixStartupMaintenanceDepsPromise ??= Promise.all([
|
|
3671
|
-
import("./
|
|
3672
|
-
import("./device-health-
|
|
3673
|
-
import("./
|
|
3674
|
-
import("./legacy-crypto-restore-
|
|
3675
|
-
import("./startup-verification-
|
|
3691
|
+
import("./setup-core-CgOV8zmh.js").then((n) => n.s),
|
|
3692
|
+
import("./device-health-Di9MUzFj.js"),
|
|
3693
|
+
import("./setup-core-CgOV8zmh.js").then((n) => n.a),
|
|
3694
|
+
import("./legacy-crypto-restore-B9eF1gob.js"),
|
|
3695
|
+
import("./startup-verification-CTfhD7V_.js")
|
|
3676
3696
|
]).then(([configUpdateModule, deviceHealthModule, profileModule, legacyCryptoRestoreModule, startupVerificationModule]) => ({
|
|
3677
3697
|
updateMatrixAccountConfig: configUpdateModule.updateMatrixAccountConfig,
|
|
3678
3698
|
summarizeMatrixDeviceHealth: deviceHealthModule.summarizeMatrixDeviceHealth,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { t as formatMatrixErrorMessage } from "./errors-
|
|
1
|
+
import { t as formatMatrixErrorMessage } from "./errors-BpHgvm2o.js";
|
|
2
2
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
3
3
|
//#region extensions/matrix/src/plugin-entry.runtime.ts
|
|
4
4
|
let matrixVerificationRuntimePromise;
|
|
5
5
|
function loadMatrixVerificationRuntime() {
|
|
6
|
-
matrixVerificationRuntimePromise ??= import("./verification-
|
|
6
|
+
matrixVerificationRuntimePromise ??= import("./verification-DvC37Z_y.js").then((n) => n.y);
|
|
7
7
|
return matrixVerificationRuntimePromise;
|
|
8
8
|
}
|
|
9
9
|
function sendError(respond, err) {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { t as getMatrixRuntime } from "./runtime-Dog86njy.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { n as withResolvedActionClient } from "./client-DzjShjVN.js";
|
|
2
|
+
import { c as resolveMatrixConfigPath, l as updateMatrixAccountConfig, o as syncMatrixOwnProfile } from "./setup-core-CgOV8zmh.js";
|
|
3
|
+
import { n as withResolvedActionClient } from "./client-D6fFVbNM.js";
|
|
5
4
|
import { normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
|
6
5
|
//#region extensions/matrix/src/matrix/actions/profile.ts
|
|
7
6
|
async function updateMatrixOwnProfile(opts = {}) {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as extractMatrixReactionAnnotation } from "./reaction-common-
|
|
3
|
-
import { a as unregisterMatrixApprovalReactionTarget, i as resolveMatrixApprovalReactionTargetWithPersistence } from "./approval-reactions-
|
|
4
|
-
import { i as resolveMatrixThreadRouting, r as resolveMatrixThreadRootId, t as resolveMatrixInboundRoute } from "./route-
|
|
1
|
+
import { c as resolveMatrixAccountConfig } from "./config-paths-msaDGRh6.js";
|
|
2
|
+
import { a as extractMatrixReactionAnnotation } from "./reaction-common-B-QgNfEs.js";
|
|
3
|
+
import { a as unregisterMatrixApprovalReactionTarget, i as resolveMatrixApprovalReactionTargetWithPersistence } from "./approval-reactions-Cwd1PMCC.js";
|
|
4
|
+
import { i as resolveMatrixThreadRouting, r as resolveMatrixThreadRootId, t as resolveMatrixInboundRoute } from "./route-R-ajT21_.js";
|
|
5
5
|
import { getSessionBindingService } from "openclaw/plugin-sdk/session-binding-runtime";
|
|
6
6
|
//#region extensions/matrix/src/matrix/monitor/reaction-events.ts
|
|
7
7
|
let approvalReactionAuthPromise;
|
|
8
8
|
let execApprovalResolverPromise;
|
|
9
9
|
function loadApprovalReactionAuth() {
|
|
10
|
-
approvalReactionAuthPromise ??= import("./approval-reaction-auth-
|
|
10
|
+
approvalReactionAuthPromise ??= import("./approval-reaction-auth-99PRu7rF.js");
|
|
11
11
|
return approvalReactionAuthPromise;
|
|
12
12
|
}
|
|
13
13
|
function loadExecApprovalResolver() {
|
|
14
|
-
execApprovalResolverPromise ??= import("./exec-approval-resolver-
|
|
14
|
+
execApprovalResolverPromise ??= import("./exec-approval-resolver-C8faS0XB.js");
|
|
15
15
|
return execApprovalResolverPromise;
|
|
16
16
|
}
|
|
17
17
|
function resolveMatrixReactionNotificationMode(params) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-DUslC3ob.js";
|
|
2
2
|
import { n as normalizeMatrixMessagingTarget, t as isMatrixQualifiedUserId } from "./target-ids-80nQ2gql.js";
|
|
3
|
-
import { n as listMatrixDirectoryGroupsLive, r as listMatrixDirectoryPeersLive } from "./directory-live-
|
|
3
|
+
import { n as listMatrixDirectoryGroupsLive, r as listMatrixDirectoryPeersLive } from "./directory-live-BCfx1C0G.js";
|
|
4
4
|
import { normalizeOptionalLowercaseString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
5
5
|
//#region extensions/matrix/src/resolve-targets.ts
|
|
6
6
|
var resolve_targets_exports = /* @__PURE__ */ __exportAll({ resolveMatrixTargets: () => resolveMatrixTargets });
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as resolveMatrixTargets } from "./resolve-targets-
|
|
1
|
+
import { t as resolveMatrixTargets } from "./resolve-targets-DPqngj4V.js";
|
|
2
2
|
//#region extensions/matrix/src/resolver.runtime.ts
|
|
3
3
|
const matrixResolverRuntime = { resolveMatrixTargets };
|
|
4
4
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as MATRIX_REACTION_EVENT_TYPE } from "./reaction-common-
|
|
1
|
+
import { n as MATRIX_REACTION_EVENT_TYPE } from "./reaction-common-B-QgNfEs.js";
|
|
2
2
|
import { buildAgentSessionKey, deriveLastRoutePolicy, resolveAgentIdFromSessionKey, resolveThreadSessionKeys } from "openclaw/plugin-sdk/routing";
|
|
3
3
|
import { resolveConfiguredAcpBindingRecord } from "openclaw/plugin-sdk/acp-binding-resolve-runtime";
|
|
4
4
|
import { getSessionBindingService } from "openclaw/plugin-sdk/session-binding-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./timeout-abort-signal-
|
|
1
|
+
import "./timeout-abort-signal-sT0wAxVn.js";
|
|
2
2
|
import "openclaw/plugin-sdk/account-id";
|
|
3
3
|
import { resolveThreadBindingIdleTimeoutMsForChannel, resolveThreadBindingMaxAgeMsForChannel } from "openclaw/plugin-sdk/conversation-runtime";
|
|
4
4
|
import "openclaw/plugin-sdk/channel-message";
|
package/dist/runtime-api.js
CHANGED
|
@@ -3,7 +3,7 @@ import { a as resolveMatrixDefaultOrOnlyAccountId, i as resolveMatrixChannelConf
|
|
|
3
3
|
import { n as listMatrixEnvAccountIds, r as resolveMatrixEnvAccountToken, t as getMatrixScopedEnvVarNames } from "./env-vars-C7uQCTKn.js";
|
|
4
4
|
import { r as setMatrixRuntime } from "./runtime-Dog86njy.js";
|
|
5
5
|
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-BJLdnCjV.js";
|
|
6
|
-
import { n as ensureMatrixSdkInstalled, r as isMatrixSdkAvailable } from "./deps-
|
|
6
|
+
import { n as ensureMatrixSdkInstalled, r as isMatrixSdkAvailable } from "./deps-LqqGWPWt.js";
|
|
7
7
|
import { assertHttpUrlTargetsPrivateNetwork, closeDispatcher, createPinnedDispatcher, resolvePinnedHostnameWithPolicy, ssrfPolicyFromAllowPrivateNetwork, ssrfPolicyFromDangerouslyAllowPrivateNetwork } from "openclaw/plugin-sdk/ssrf-runtime";
|
|
8
8
|
import { writeJsonFileAtomically } from "openclaw/plugin-sdk/json-store";
|
|
9
9
|
import { formatZonedTimestamp } from "openclaw/plugin-sdk/time-runtime";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as detectLegacyMatrixCrypto, i as autoPrepareLegacyMatrixCrypto, n as hasPendingMatrixMigration, o as autoMigrateLegacyMatrixState, r as resolveMatrixMigrationStatus, s as detectLegacyMatrixState, t as hasActionableMatrixMigration } from "./matrix-migration.runtime-
|
|
2
|
-
import { t as maybeCreateMatrixMigrationSnapshot } from "./migration-snapshot-backup-
|
|
1
|
+
import { a as detectLegacyMatrixCrypto, i as autoPrepareLegacyMatrixCrypto, n as hasPendingMatrixMigration, o as autoMigrateLegacyMatrixState, r as resolveMatrixMigrationStatus, s as detectLegacyMatrixState, t as hasActionableMatrixMigration } from "./matrix-migration.runtime-Cf_wX9mk.js";
|
|
2
|
+
import { t as maybeCreateMatrixMigrationSnapshot } from "./migration-snapshot-backup-BWTIFXgQ.js";
|
|
3
3
|
export { autoMigrateLegacyMatrixState, autoPrepareLegacyMatrixCrypto, detectLegacyMatrixCrypto, detectLegacyMatrixState, hasActionableMatrixMigration, hasPendingMatrixMigration, maybeCreateMatrixMigrationSnapshot, resolveMatrixMigrationStatus };
|