@openclaw/matrix 2026.8.1 → 2026.8.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/{account-selection-C8nnBTxi.js → account-selection-DA-jfx22.js} +11 -9
- package/dist/{accounts-fC57n-Jo.js → accounts-DR1c4xF_.js} +2 -2
- package/dist/api.js +5 -5
- package/dist/{approval-handler.runtime-BBjFZw1t.js → approval-handler.runtime-xcVrZw9o.js} +5 -5
- package/dist/{approval-ids-DTIdXV-m.js → approval-ids-hmvhDNBj.js} +1 -1
- package/dist/{approval-reaction-auth-BDONXxnF.js → approval-reaction-auth-DziFGHSk.js} +2 -2
- package/dist/{approval-reactions-tXh9KYrW.js → approval-reactions-1fwEhoK9.js} +1 -1
- package/dist/{channel-BkEcVUs_.js → channel-D6-ajB_u.js} +51 -53
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel.runtime-CTLSBFsP.js → channel.runtime-BMA0dG2k.js} +16 -12
- package/dist/{channel.setup-CSacbORr.js → channel.setup-OIEzCzSs.js} +21 -19
- package/dist/{cli-DRVtgrq5.js → cli-B6HF7Hmn.js} +38 -29
- package/dist/{cli-metadata-Ddx_y4Os.js → cli-metadata-Mtzu5-AY.js} +1 -1
- package/dist/cli-metadata.js +1 -1
- package/dist/{client-CZ_JvrO0.js → client-B0yMDho1.js} +2 -2
- package/dist/{client-kSi51NKp.js → client-DFsRJEgB.js} +69 -16
- package/dist/{client-bootstrap-D8irSL2i.js → client-bootstrap-DjXCKEtg.js} +1 -1
- package/dist/{config-update-DC0fWBxc.js → config-update-BnX26jCO.js} +46 -28
- package/dist/contract-api.js +2 -2
- package/dist/{credentials-BdAaWuiR.js → credentials-DJj2xs3q.js} +4 -8
- package/dist/{credentials-read-B37cQknZ.js → credentials-read-mexhw-Ur.js} +7 -5
- package/dist/{credentials-write.runtime-nAV2-5uR.js → credentials-write.runtime-DQt-kgJq.js} +1 -1
- package/dist/{crypto-runtime-C4WDYxlP.js → crypto-runtime-QvlgyCkj.js} +6 -6
- package/dist/{deps-CcVJfvRM.js → deps-mtxF2mHI.js} +1 -1
- package/dist/{directory-live-DKr0w35b.js → directory-live-Drh343TW.js} +8 -6
- package/dist/{doctor-EWf9CDso.js → doctor-CJE8wO6y.js} +1 -1
- package/dist/{doctor-contract-DEt4O4Zt.js → doctor-contract-HyWFZQVG.js} +5 -4
- package/dist/doctor-contract-api.js +7 -7
- package/dist/{draft-stream-0CEpNrBk.js → draft-stream-DhGHVdO4.js} +1 -1
- package/dist/{encryption-guidance-D4ZdAqzM.js → encryption-guidance-BNcZNQZI.js} +3 -2
- package/dist/helper-api.js +1 -1
- package/dist/{http-client-D8o8b9u6.js → http-client-DOmFvKvB.js} +10 -7
- package/dist/{idb-persistence-DfgW720p.js → idb-persistence-D4NGNQxt.js} +2 -2
- package/dist/{idb-persistence-lock-DAJ49nZX.js → idb-persistence-lock-B3fZXyF_.js} +1 -1
- package/dist/{inbound-dedupe-RvSLqdsz.js → inbound-dedupe-Ch33GU06.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/{messages-DaGRt-tu.js → messages-DlMQaC02.js} +2 -2
- package/dist/{monitor-CLPbPcR9.js → monitor-U2LcVtHt.js} +49 -74
- package/dist/plugin-entry.handlers.runtime.js +1 -1
- package/dist/probe.runtime-CNo-5_iz.js +2 -0
- package/dist/{profile-update-zXVCMg7y.js → profile-update-CsyKA9jI.js} +5 -4
- package/dist/{profile-D-Wubo0A.js → profile-vmjsmhh4.js} +1 -1
- package/dist/{reaction-events-CjVUiqcY.js → reaction-events-lwNc5I1X.js} +8 -6
- package/dist/{resolve-targets-qG6gceps.js → resolve-targets-D3Eakgzs.js} +1 -1
- package/dist/{resolver.runtime-zX3TR3TN.js → resolver.runtime-DJQxR35r.js} +1 -1
- package/dist/{room-info-yheP1mod.js → room-info-DIU67XLP.js} +3 -3
- package/dist/runtime-api.js +2 -2
- package/dist/{sdk-TZYyo0XQ.js → sdk-Jl2CgAbJ.js} +518 -23
- package/dist/{send-BL_iH5Ox.js → send-DfS5ciUL.js} +13 -9
- package/dist/session-binding-contract-api.js +1 -1
- package/dist/{setup-bootstrap-D8M7FmcO.js → setup-bootstrap-CWoIWudw.js} +2 -2
- package/dist/{setup-core-r6L0nno-.js → setup-core-CZM496H-.js} +7 -6
- package/dist/setup-plugin-api.js +1 -1
- package/dist/{setup-surface-g174ElFO.js → setup-surface-DSZtOsWK.js} +83 -77
- package/dist/{startup-verification-Cs08ca8u.js → startup-verification-1Ney1mmI.js} +2 -2
- package/dist/{storage-BsGuHngK.js → storage-BVf4uucD.js} +5 -4
- package/dist/{subagent-hooks-CMoZaARG.js → subagent-hooks-DeICLbU5.js} +5 -1
- package/dist/subagent-hooks-api.js +1 -1
- package/dist/sync-cache-state-d-A_OhbU.js +234 -0
- package/dist/{thread-bindings-ERWNousC.js → thread-bindings-2HN2AyLu.js} +2 -2
- package/dist/{tool-actions.runtime-DcBCSwY4.js → tool-actions.runtime-CFZZPG5g.js} +225 -163
- package/dist/{verification-4vsW_WSn.js → verification-CD7k5vE9.js} +2 -2
- package/node_modules/matrix-js-sdk/lib/client.d.ts +2 -1
- package/node_modules/matrix-js-sdk/lib/client.js +6 -2
- package/node_modules/matrix-js-sdk/lib/sync.js +8 -8
- package/node_modules/matrix-js-sdk/src/client.ts +7 -3
- package/node_modules/matrix-js-sdk/src/sync.ts +8 -8
- package/node_modules/typebox/build/format/email.mjs +1 -1
- package/node_modules/typebox/build/format/idna/idn-hostname.mjs +19 -1
- package/node_modules/typebox/package.json +1 -1
- package/package.json +5 -5
- package/dist/file-sync-store-DjskBX2o.js +0 -436
- package/dist/probe.runtime-Bxpr1FFy.js +0 -2
- package/dist/recovery-key-store-CognuDys.js +0 -276
|
@@ -157,16 +157,17 @@ function resolveConfiguredMatrixAccountIds(cfg, env = process.env) {
|
|
|
157
157
|
channel,
|
|
158
158
|
env
|
|
159
159
|
})) configuredAccountIds.push(DEFAULT_ACCOUNT_ID);
|
|
160
|
+
const readyEnvAccountIds = listMatrixEnvAccountIds(env).filter((accountId) => normalizeAccountId(accountId) === DEFAULT_ACCOUNT_ID ? hasConfiguredDefaultMatrixAccountSource({
|
|
161
|
+
channel,
|
|
162
|
+
env
|
|
163
|
+
}) : hasUsableEffectiveMatrixAccountSource({
|
|
164
|
+
channel,
|
|
165
|
+
accountId,
|
|
166
|
+
env
|
|
167
|
+
}));
|
|
160
168
|
return listCombinedAccountIds({
|
|
161
169
|
configuredAccountIds,
|
|
162
|
-
additionalAccountIds:
|
|
163
|
-
channel,
|
|
164
|
-
env
|
|
165
|
-
}) : hasUsableEffectiveMatrixAccountSource({
|
|
166
|
-
channel,
|
|
167
|
-
accountId,
|
|
168
|
-
env
|
|
169
|
-
})),
|
|
170
|
+
additionalAccountIds: readyEnvAccountIds,
|
|
170
171
|
fallbackAccountIdWhenEmpty: channel ? DEFAULT_ACCOUNT_ID : void 0
|
|
171
172
|
});
|
|
172
173
|
}
|
|
@@ -174,8 +175,9 @@ function resolveMatrixDefaultOrOnlyAccountId(cfg, env = process.env) {
|
|
|
174
175
|
const channel = resolveMatrixChannelConfig(cfg);
|
|
175
176
|
if (!channel) return DEFAULT_ACCOUNT_ID;
|
|
176
177
|
const configuredDefault = normalizeOptionalAccountId(typeof channel.defaultAccount === "string" ? channel.defaultAccount : void 0);
|
|
178
|
+
const configuredAccountIds = resolveConfiguredMatrixAccountIds(cfg, env);
|
|
177
179
|
return resolveListedDefaultAccountId({
|
|
178
|
-
accountIds:
|
|
180
|
+
accountIds: configuredAccountIds,
|
|
179
181
|
configuredDefaultAccountId: configuredDefault,
|
|
180
182
|
ambiguousFallbackAccountId: DEFAULT_ACCOUNT_ID
|
|
181
183
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as resolveMatrixDefaultOrOnlyAccountId, c as resolveScopedMatrixEnvConfig, l as resolveMatrixAccountStringValues, o as resolveGlobalMatrixEnvConfig, r as resolveConfiguredMatrixAccountIds } from "./account-selection-
|
|
1
|
+
import { a as resolveMatrixDefaultOrOnlyAccountId, c as resolveScopedMatrixEnvConfig, l as resolveMatrixAccountStringValues, o as resolveGlobalMatrixEnvConfig, r as resolveConfiguredMatrixAccountIds } from "./account-selection-DA-jfx22.js";
|
|
2
2
|
import { a as resolveMatrixAccountConfig, o as resolveMatrixBaseConfig, t as findMatrixAccountConfig } from "./account-config-CRsKoMqJ.js";
|
|
3
|
-
import { i as loadMatrixCredentials, n as credentialsMatchConfig } from "./credentials-read-
|
|
3
|
+
import { i as loadMatrixCredentials, n as credentialsMatchConfig } from "./credentials-read-mexhw-Ur.js";
|
|
4
4
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
5
5
|
import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
|
6
6
|
import { hasConfiguredSecretInput } from "openclaw/plugin-sdk/secret-input";
|
package/dist/api.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { a as resolveMatrixDefaultOrOnlyAccountId, i as resolveMatrixChannelConfig, n as requiresExplicitMatrixDefaultAccount, r as resolveConfiguredMatrixAccountIds, t as findMatrixAccountEntry } from "./account-selection-
|
|
1
|
+
import { a as resolveMatrixDefaultOrOnlyAccountId, i as resolveMatrixChannelConfig, n as requiresExplicitMatrixDefaultAccount, r as resolveConfiguredMatrixAccountIds, t as findMatrixAccountEntry } from "./account-selection-DA-jfx22.js";
|
|
2
2
|
import { n as listMatrixEnvAccountIds, r as resolveMatrixEnvAccountToken, t as getMatrixScopedEnvVarNames } from "./env-vars-dGqak9dN.js";
|
|
3
3
|
import { a as resolveMatrixCredentialsPath, i as resolveMatrixCredentialsFilename, n as resolveMatrixAccountStorageRoot, o as resolveMatrixHomeserverKey, r as resolveMatrixCredentialsDir, s as sanitizeMatrixPathSegment, t as hashMatrixAccessToken } from "./storage-paths-gUmSydsW.js";
|
|
4
|
-
import { t as matrixPlugin } from "./channel-
|
|
5
|
-
import { n as matrixSetupAdapter, t as createMatrixSetupWizardProxy } from "./setup-core-
|
|
4
|
+
import { t as matrixPlugin } from "./channel-D6-ajB_u.js";
|
|
5
|
+
import { n as matrixSetupAdapter, t as createMatrixSetupWizardProxy } from "./setup-core-CZM496H-.js";
|
|
6
6
|
import { f as setMatrixThreadBindingMaxAgeBySessionKey, n as getMatrixThreadBindingManager, u as setMatrixThreadBindingIdleTimeoutBySessionKey } from "./thread-bindings-shared-oNPiyMWY.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-DSZtOsWK.js";
|
|
8
|
+
import { t as createMatrixThreadBindingManager } from "./thread-bindings-2HN2AyLu.js";
|
|
9
9
|
export { createMatrixSetupWizardProxy, createMatrixThreadBindingManager, findMatrixAccountEntry, getMatrixScopedEnvVarNames, getMatrixThreadBindingManager, hashMatrixAccessToken, listMatrixEnvAccountIds, matrixOnboardingAdapter, matrixOnboardingAdapter as matrixSetupWizard, matrixPlugin, matrixSetupAdapter, requiresExplicitMatrixDefaultAccount, resolveConfiguredMatrixAccountIds, resolveMatrixAccountStorageRoot, resolveMatrixChannelConfig, resolveMatrixCredentialsDir, resolveMatrixCredentialsFilename, resolveMatrixCredentialsPath, resolveMatrixDefaultOrOnlyAccountId, resolveMatrixEnvAccountToken, resolveMatrixHomeserverKey, sanitizeMatrixPathSegment, setMatrixThreadBindingIdleTimeoutBySessionKey, setMatrixThreadBindingMaxAgeBySessionKey };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { i as resolveMatrixAccount } from "./accounts-
|
|
2
|
-
import { C as shouldHandleMatrixApprovalRequest, S as isMatrixAnyApprovalClientEnabled } from "./channel-
|
|
1
|
+
import { i as resolveMatrixAccount } from "./accounts-DR1c4xF_.js";
|
|
2
|
+
import { C as shouldHandleMatrixApprovalRequest, S as isMatrixAnyApprovalClientEnabled } from "./channel-D6-ajB_u.js";
|
|
3
3
|
import { o as resolveMatrixTargetIdentity } from "./target-ids-Nwx7cMVE.js";
|
|
4
|
-
import { C as repairMatrixDirectRooms, a as sendSingleTextMessageMatrix, n as reactMatrixMessage, r as sendMessageMatrix } from "./send-
|
|
5
|
-
import { a as unregisterMatrixApprovalReactionTarget, n as listMatrixApprovalReactionBindings, r as registerMatrixApprovalReactionTarget, t as buildMatrixApprovalReactionHint } from "./approval-reactions-
|
|
6
|
-
import { n as editMatrixMessage, t as deleteMatrixMessage } from "./messages-
|
|
4
|
+
import { C as repairMatrixDirectRooms, a as sendSingleTextMessageMatrix, n as reactMatrixMessage, r as sendMessageMatrix } from "./send-DfS5ciUL.js";
|
|
5
|
+
import { a as unregisterMatrixApprovalReactionTarget, n as listMatrixApprovalReactionBindings, r as registerMatrixApprovalReactionTarget, t as buildMatrixApprovalReactionHint } from "./approval-reactions-1fwEhoK9.js";
|
|
6
|
+
import { n as editMatrixMessage, t as deleteMatrixMessage } from "./messages-DlMQaC02.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 "./channel.setup-
|
|
1
|
+
import { a as normalizeMatrixUserId } from "./channel.setup-OIEzCzSs.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 { i as resolveMatrixAccount } from "./accounts-
|
|
2
|
-
import { t as normalizeMatrixApproverId } from "./approval-ids-
|
|
1
|
+
import { i as resolveMatrixAccount } from "./accounts-DR1c4xF_.js";
|
|
2
|
+
import { t as normalizeMatrixApproverId } from "./approval-ids-hmvhDNBj.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) {
|
|
@@ -24,7 +24,7 @@ const MATRIX_APPROVAL_REACTION_ORDER = [
|
|
|
24
24
|
];
|
|
25
25
|
const PERSISTENT_NAMESPACE = "matrix.approval-reactions";
|
|
26
26
|
const PERSISTENT_MAX_ENTRIES = 1e3;
|
|
27
|
-
const DEFAULT_REACTION_TARGET_TTL_MS =
|
|
27
|
+
const DEFAULT_REACTION_TARGET_TTL_MS = 864e5;
|
|
28
28
|
const reportPersistentApprovalReactionError = createPluginStateErrorReporter(getOptionalMatrixRuntime, "matrix", "approval-reaction-state", "Matrix persistent approval reaction state failed");
|
|
29
29
|
function readPersistedTarget(target) {
|
|
30
30
|
const value = target;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { n as requiresExplicitMatrixDefaultAccount } from "./account-selection-
|
|
1
|
+
import { n as requiresExplicitMatrixDefaultAccount } from "./account-selection-DA-jfx22.js";
|
|
2
2
|
import { a as resolveMatrixAccountConfig } from "./account-config-CRsKoMqJ.js";
|
|
3
|
-
import { i as resolveMatrixAccount, r as resolveDefaultMatrixAccountId, t as listMatrixAccountIds } from "./accounts-
|
|
4
|
-
import { a as normalizeMatrixUserId, r as DEFAULT_ACCOUNT_ID$2, t as matrixPluginBase } from "./channel.setup-
|
|
5
|
-
import { t as normalizeMatrixApproverId } from "./approval-ids-
|
|
3
|
+
import { i as resolveMatrixAccount, r as resolveDefaultMatrixAccountId, t as listMatrixAccountIds } from "./accounts-DR1c4xF_.js";
|
|
4
|
+
import { a as normalizeMatrixUserId, r as DEFAULT_ACCOUNT_ID$2, t as matrixPluginBase } from "./channel.setup-OIEzCzSs.js";
|
|
5
|
+
import { t as normalizeMatrixApproverId } from "./approval-ids-hmvhDNBj.js";
|
|
6
6
|
import { a as resolveMatrixDirectUserId, i as normalizeMatrixResolvableTarget, n as isMatrixRoomId, o as resolveMatrixTargetIdentity, r as normalizeMatrixMessagingTarget, t as isMatrixQualifiedUserId } from "./target-ids-Nwx7cMVE.js";
|
|
7
|
-
import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-
|
|
7
|
+
import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-HyWFZQVG.js";
|
|
8
8
|
import { n as MATRIX_REACTION_EVENT_TYPE } from "./reaction-common-DkrQdBSZ.js";
|
|
9
9
|
import { f as setMatrixThreadBindingMaxAgeBySessionKey, u as setMatrixThreadBindingIdleTimeoutBySessionKey } from "./thread-bindings-shared-oNPiyMWY.js";
|
|
10
10
|
import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-CufozuyJ.js";
|
|
@@ -32,12 +32,12 @@ import { createChannelExecApprovalProfile, getExecApprovalReplyMetadata, isChann
|
|
|
32
32
|
import { createPairingPrefixStripper } from "openclaw/plugin-sdk/channel-pairing";
|
|
33
33
|
import { PAIRING_APPROVED_MESSAGE } from "openclaw/plugin-sdk/channel-status";
|
|
34
34
|
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
35
|
-
import { buildAgentSessionKey, deriveLastRoutePolicy,
|
|
35
|
+
import { buildAgentSessionKey, deriveLastRoutePolicy, parseThreadSessionSuffix, resolveAgentIdFromSessionKey, resolveAgentRoute, resolveThreadSessionKeys } from "openclaw/plugin-sdk/routing";
|
|
36
36
|
import { formatLocationText, logInboundDrop, toLocationContext } from "openclaw/plugin-sdk/channel-inbound";
|
|
37
37
|
import { getAgentScopedMediaLocalRoots } from "openclaw/plugin-sdk/media-local-roots";
|
|
38
38
|
import { buildChannelKeyCandidates } from "openclaw/plugin-sdk/channel-targets";
|
|
39
39
|
import { resolveConfiguredAcpBindingRecord } from "openclaw/plugin-sdk/acp-binding-resolve-runtime";
|
|
40
|
-
import {
|
|
40
|
+
import { resolveRuntimeConversationBindingRoute } from "openclaw/plugin-sdk/conversation-binding-runtime";
|
|
41
41
|
import { deliveryContextFromSession, getSessionEntry, resolveStorePath, sessionDeliveryOrigin } from "openclaw/plugin-sdk/session-store-runtime";
|
|
42
42
|
//#region extensions/matrix/src/actions.ts
|
|
43
43
|
const MATRIX_PLUGIN_HANDLED_ACTIONS = /* @__PURE__ */ new Set([
|
|
@@ -149,7 +149,7 @@ const matrixMessageActions = {
|
|
|
149
149
|
return account && createActionGate(account.config.actions)("messages") ? payload : null;
|
|
150
150
|
},
|
|
151
151
|
handleAction: async (ctx) => {
|
|
152
|
-
const { handleMatrixAction } = await import("./tool-actions.runtime-
|
|
152
|
+
const { handleMatrixAction } = await import("./tool-actions.runtime-CFZZPG5g.js");
|
|
153
153
|
const { action, params, cfg, accountId, mediaLocalRoots } = ctx;
|
|
154
154
|
const dispatch = async (actionParams) => await handleMatrixAction({
|
|
155
155
|
...actionParams,
|
|
@@ -413,8 +413,9 @@ const isMatrixExecApprovalAuthorizedSender = matrixExecApprovalProfile.isAuthori
|
|
|
413
413
|
const resolveMatrixExecApprovalTarget = matrixExecApprovalProfile.resolveTarget;
|
|
414
414
|
function isMatrixApprovalClientEnabled(params) {
|
|
415
415
|
if (params.approvalKind === "exec") return isMatrixExecApprovalClientEnabled(params);
|
|
416
|
+
const config = resolveMatrixExecApprovalConfig(params);
|
|
416
417
|
return isChannelExecApprovalClientEnabledFromConfig({
|
|
417
|
-
enabled:
|
|
418
|
+
enabled: config?.enabled,
|
|
418
419
|
approverCount: getMatrixApprovalApprovers(params).length
|
|
419
420
|
});
|
|
420
421
|
}
|
|
@@ -626,7 +627,7 @@ const matrixNativeApprovalCapability = createApproverRestrictedNativeApprovalCap
|
|
|
626
627
|
approvalKind,
|
|
627
628
|
request
|
|
628
629
|
}),
|
|
629
|
-
load: async () => (await import("./approval-handler.runtime-
|
|
630
|
+
load: async () => (await import("./approval-handler.runtime-xcVrZw9o.js")).matrixApprovalNativeRuntime
|
|
630
631
|
})
|
|
631
632
|
});
|
|
632
633
|
const splitMatrixApprovalCapability = splitChannelApprovalCapability(matrixNativeApprovalCapability);
|
|
@@ -907,9 +908,6 @@ function resolveMatrixDmSessionKey(params) {
|
|
|
907
908
|
}
|
|
908
909
|
});
|
|
909
910
|
}
|
|
910
|
-
function shouldApplyMatrixPerRoomDmSessionScope(params) {
|
|
911
|
-
return params.isDirectMessage && !params.configuredSessionKey;
|
|
912
|
-
}
|
|
913
911
|
function resolveMatrixInboundRoute(params) {
|
|
914
912
|
const baseRoute = params.resolveAgentRoute({
|
|
915
913
|
cfg: params.cfg,
|
|
@@ -926,25 +924,20 @@ function resolveMatrixInboundRoute(params) {
|
|
|
926
924
|
});
|
|
927
925
|
const bindingConversationId = params.threadId ?? params.roomId;
|
|
928
926
|
const bindingParentConversationId = params.threadId ? params.roomId : void 0;
|
|
929
|
-
const
|
|
927
|
+
const bindingRef = {
|
|
930
928
|
channel: "matrix",
|
|
931
929
|
accountId: params.accountId,
|
|
932
930
|
conversationId: bindingConversationId,
|
|
933
931
|
parentConversationId: bindingParentConversationId
|
|
932
|
+
};
|
|
933
|
+
const runtimeRoute = resolveRuntimeConversationBindingRoute({
|
|
934
|
+
route: baseRoute,
|
|
935
|
+
conversation: bindingRef,
|
|
936
|
+
touchBinding: false
|
|
934
937
|
});
|
|
935
|
-
const runtimeBinding =
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
route: {
|
|
939
|
-
...baseRoute,
|
|
940
|
-
sessionKey: boundSessionKey,
|
|
941
|
-
agentId: resolveAgentIdFromSessionKey(boundSessionKey) || baseRoute.agentId,
|
|
942
|
-
lastRoutePolicy: deriveLastRoutePolicy({
|
|
943
|
-
sessionKey: boundSessionKey,
|
|
944
|
-
mainSessionKey: baseRoute.mainSessionKey
|
|
945
|
-
}),
|
|
946
|
-
matchedBy: "binding.channel"
|
|
947
|
-
},
|
|
938
|
+
const runtimeBinding = runtimeRoute.bindingRecord;
|
|
939
|
+
if (runtimeBinding && runtimeRoute.boundSessionKey) return {
|
|
940
|
+
route: runtimeRoute.route,
|
|
948
941
|
configuredBinding: null,
|
|
949
942
|
bindingOwnerAvailable: true,
|
|
950
943
|
runtimeBindingId: runtimeBinding.bindingId
|
|
@@ -960,17 +953,14 @@ function resolveMatrixInboundRoute(params) {
|
|
|
960
953
|
const effectiveRoute = configuredBinding && configuredSessionKey ? {
|
|
961
954
|
...baseRoute,
|
|
962
955
|
sessionKey: configuredSessionKey,
|
|
963
|
-
agentId: resolveAgentIdFromSessionKey(configuredSessionKey
|
|
956
|
+
agentId: resolveAgentIdFromSessionKey(configuredSessionKey, configuredBinding.spec.agentId),
|
|
964
957
|
lastRoutePolicy: deriveLastRoutePolicy({
|
|
965
958
|
sessionKey: configuredSessionKey,
|
|
966
959
|
mainSessionKey: baseRoute.mainSessionKey
|
|
967
960
|
}),
|
|
968
961
|
matchedBy: "binding.channel"
|
|
969
962
|
} : baseRoute;
|
|
970
|
-
const dmSessionKey =
|
|
971
|
-
isDirectMessage: params.isDirectMessage,
|
|
972
|
-
configuredSessionKey
|
|
973
|
-
}) ? resolveMatrixDmSessionKey({
|
|
963
|
+
const dmSessionKey = params.isDirectMessage && !configuredSessionKey ? resolveMatrixDmSessionKey({
|
|
974
964
|
accountId: params.accountId,
|
|
975
965
|
agentId: effectiveRoute.agentId,
|
|
976
966
|
roomId: params.roomId,
|
|
@@ -999,15 +989,17 @@ function resolveMatrixInboundRoute(params) {
|
|
|
999
989
|
})
|
|
1000
990
|
},
|
|
1001
991
|
configuredBinding,
|
|
1002
|
-
bindingOwnerAvailable:
|
|
1003
|
-
runtimeBindingId: runtimeBinding?.bindingId ?? null
|
|
992
|
+
bindingOwnerAvailable: runtimeRoute.bindingOwnerAvailable ?? true,
|
|
993
|
+
runtimeBindingId: runtimeBinding?.bindingId ?? null,
|
|
994
|
+
pluginId: runtimeRoute.pluginId
|
|
1004
995
|
};
|
|
1005
996
|
}
|
|
1006
997
|
return {
|
|
1007
998
|
route: routeWithDmScope,
|
|
1008
999
|
configuredBinding,
|
|
1009
|
-
bindingOwnerAvailable:
|
|
1010
|
-
runtimeBindingId: runtimeBinding?.bindingId ?? null
|
|
1000
|
+
bindingOwnerAvailable: runtimeRoute.bindingOwnerAvailable ?? true,
|
|
1001
|
+
runtimeBindingId: runtimeBinding?.bindingId ?? null,
|
|
1002
|
+
pluginId: runtimeRoute.pluginId
|
|
1011
1003
|
};
|
|
1012
1004
|
}
|
|
1013
1005
|
//#endregion
|
|
@@ -1031,7 +1023,11 @@ function resolveMatrixConversationRouteOwner(params) {
|
|
|
1031
1023
|
resolveAgentRoute
|
|
1032
1024
|
});
|
|
1033
1025
|
if (!result.bindingOwnerAvailable) return { kind: "unavailable" };
|
|
1034
|
-
if (result.
|
|
1026
|
+
if (result.pluginId) return {
|
|
1027
|
+
kind: "plugin",
|
|
1028
|
+
pluginId: result.pluginId,
|
|
1029
|
+
fallbackAgentId: result.route.agentId
|
|
1030
|
+
};
|
|
1035
1031
|
return {
|
|
1036
1032
|
kind: "agent",
|
|
1037
1033
|
agentId: result.route.agentId
|
|
@@ -1039,7 +1035,7 @@ function resolveMatrixConversationRouteOwner(params) {
|
|
|
1039
1035
|
}
|
|
1040
1036
|
//#endregion
|
|
1041
1037
|
//#region extensions/matrix/src/resolver.ts
|
|
1042
|
-
const loadMatrixChannelRuntime$1 = createLazyRuntimeNamedExport(() => import("./resolver.runtime-
|
|
1038
|
+
const loadMatrixChannelRuntime$1 = createLazyRuntimeNamedExport(() => import("./resolver.runtime-DJQxR35r.js"), "matrixResolverRuntime");
|
|
1043
1039
|
const matrixResolverAdapter = { resolveTargets: async ({ cfg, accountId, inputs, kind, runtime }) => (await loadMatrixChannelRuntime$1()).resolveMatrixTargets({
|
|
1044
1040
|
cfg,
|
|
1045
1041
|
accountId,
|
|
@@ -1102,8 +1098,9 @@ function resolveMatrixCurrentDmRoomId(params) {
|
|
|
1102
1098
|
const sessionKey = parseThreadSessionSuffix(params.currentSessionKey).baseSessionKey ?? params.currentSessionKey?.trim();
|
|
1103
1099
|
if (!sessionKey) return;
|
|
1104
1100
|
try {
|
|
1101
|
+
const storePath = resolveStorePath(params.cfg.session?.store, { agentId: params.agentId });
|
|
1105
1102
|
const currentSession = resolveMatrixStoredSessionMeta(getSessionEntry({
|
|
1106
|
-
storePath
|
|
1103
|
+
storePath,
|
|
1107
1104
|
sessionKey
|
|
1108
1105
|
}));
|
|
1109
1106
|
if (!currentSession) return;
|
|
@@ -1139,18 +1136,19 @@ function resolveMatrixOutboundSessionRoute(params) {
|
|
|
1139
1136
|
const chatType = target.kind === "user" ? "direct" : "channel";
|
|
1140
1137
|
const from = target.kind === "user" ? `matrix:${target.id}` : `matrix:channel:${target.id}`;
|
|
1141
1138
|
const to = `room:${roomScopedDmId ?? target.id}`;
|
|
1139
|
+
const baseRoute = buildChannelOutboundSessionRoute({
|
|
1140
|
+
cfg: params.cfg,
|
|
1141
|
+
agentId: params.agentId,
|
|
1142
|
+
channel: "matrix",
|
|
1143
|
+
accountId: effectiveAccountId,
|
|
1144
|
+
recipientSessionExact: target.kind === "room" ? dmSessionScope === "per-room" && isMatrixRoomId(target.id) : dmSessionScope === "per-user" ? isMatrixQualifiedUserId(target.id) : roomScopedDmId !== void 0,
|
|
1145
|
+
peer,
|
|
1146
|
+
chatType,
|
|
1147
|
+
from,
|
|
1148
|
+
to
|
|
1149
|
+
});
|
|
1142
1150
|
return buildThreadAwareOutboundSessionRoute({
|
|
1143
|
-
route:
|
|
1144
|
-
cfg: params.cfg,
|
|
1145
|
-
agentId: params.agentId,
|
|
1146
|
-
channel: "matrix",
|
|
1147
|
-
accountId: effectiveAccountId,
|
|
1148
|
-
recipientSessionExact: target.kind === "room" ? dmSessionScope === "per-room" && isMatrixRoomId(target.id) : dmSessionScope === "per-user" ? isMatrixQualifiedUserId(target.id) : roomScopedDmId !== void 0,
|
|
1149
|
-
peer,
|
|
1150
|
-
chatType,
|
|
1151
|
-
from,
|
|
1152
|
-
to
|
|
1153
|
-
}),
|
|
1151
|
+
route: baseRoute,
|
|
1154
1152
|
replyToId: params.replyToId,
|
|
1155
1153
|
threadId: params.threadId,
|
|
1156
1154
|
currentSessionKey: params.currentSessionKey,
|
|
@@ -1166,8 +1164,8 @@ function resolveMatrixOutboundSessionRoute(params) {
|
|
|
1166
1164
|
//#endregion
|
|
1167
1165
|
//#region extensions/matrix/src/channel.ts
|
|
1168
1166
|
let matrixStartupLock = Promise.resolve();
|
|
1169
|
-
const loadMatrixChannelRuntime = createLazyRuntimeNamedExport(() => import("./channel.runtime-
|
|
1170
|
-
const loadMatrixDoctorModule = createLazyRuntimeModule(() => import("./doctor-
|
|
1167
|
+
const loadMatrixChannelRuntime = createLazyRuntimeNamedExport(() => import("./channel.runtime-BMA0dG2k.js"), "matrixChannelRuntime");
|
|
1168
|
+
const loadMatrixDoctorModule = createLazyRuntimeModule(() => import("./doctor-CJE8wO6y.js"));
|
|
1171
1169
|
function buildMatrixTrafficStatusSummary(snapshot) {
|
|
1172
1170
|
return {
|
|
1173
1171
|
lastInboundAt: snapshot?.lastInboundAt ?? null,
|
|
@@ -1517,7 +1515,7 @@ const matrixPlugin = createChatChannelPlugin({
|
|
|
1517
1515
|
await previousLock;
|
|
1518
1516
|
let monitorMatrixProvider;
|
|
1519
1517
|
try {
|
|
1520
|
-
monitorMatrixProvider = (await import("./monitor-
|
|
1518
|
+
monitorMatrixProvider = (await import("./monitor-U2LcVtHt.js")).monitorMatrixProvider;
|
|
1521
1519
|
} finally {
|
|
1522
1520
|
releaseLock();
|
|
1523
1521
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as matrixPlugin } from "./channel-
|
|
1
|
+
import { t as matrixPlugin } from "./channel-D6-ajB_u.js";
|
|
2
2
|
export { matrixPlugin };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { i as sendPollMatrix, o as sendTypingMatrix, r as sendMessageMatrix, v as cleanupMatrixDeliveryPlans, y as reconcileMatrixUnknownSend } from "./send-
|
|
1
|
+
import { i as sendPollMatrix, o as sendTypingMatrix, r as sendMessageMatrix, v as cleanupMatrixDeliveryPlans, y as reconcileMatrixUnknownSend } from "./send-DfS5ciUL.js";
|
|
2
2
|
import { t as isBunRuntime } from "./runtime-BefyhPWv.js";
|
|
3
|
-
import {
|
|
4
|
-
import { n as listMatrixDirectoryGroupsLive, r as listMatrixDirectoryPeersLive } from "./directory-live-
|
|
5
|
-
import { t as resolveMatrixTargets } from "./resolve-targets-
|
|
3
|
+
import { l as resolveMatrixAuth } from "./client-DFsRJEgB.js";
|
|
4
|
+
import { n as listMatrixDirectoryGroupsLive, r as listMatrixDirectoryPeersLive } from "./directory-live-Drh343TW.js";
|
|
5
|
+
import { t as resolveMatrixTargets } from "./resolve-targets-D3Eakgzs.js";
|
|
6
6
|
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
7
7
|
import { createMessageReceiptFromOutboundResults, createReplyToFanout, resolveOutboundSendDep } from "openclaw/plugin-sdk/channel-outbound";
|
|
8
8
|
import { asOptionalRecord, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
@@ -13,7 +13,7 @@ import { attachChannelToResult } from "openclaw/plugin-sdk/channel-send-result";
|
|
|
13
13
|
import { renderMessagePresentationFallbackText } from "openclaw/plugin-sdk/interactive-runtime";
|
|
14
14
|
import { resolveSendableOutboundReplyParts, sendPayloadMediaSequence } from "openclaw/plugin-sdk/reply-payload";
|
|
15
15
|
//#region extensions/matrix/src/matrix/probe.ts
|
|
16
|
-
const loadMatrixProbeRuntimeDeps = createLazyRuntimeModule(() => import("./probe.runtime-
|
|
16
|
+
const loadMatrixProbeRuntimeDeps = createLazyRuntimeModule(() => import("./probe.runtime-CNo-5_iz.js").then((runtimeModule) => ({ createMatrixClient: runtimeModule.createMatrixClient })));
|
|
17
17
|
async function probeMatrix(params) {
|
|
18
18
|
return await runChannelProbe(void 0, async () => {
|
|
19
19
|
const result = {
|
|
@@ -89,7 +89,8 @@ function buildMatrixPresentationContent(presentation) {
|
|
|
89
89
|
};
|
|
90
90
|
}
|
|
91
91
|
function resolveMatrixPresentationContent(payload) {
|
|
92
|
-
const
|
|
92
|
+
const extraContent = asOptionalRecord(resolveMatrixChannelData(payload).extraContent);
|
|
93
|
+
const presentation = asOptionalRecord(extraContent?.[MATRIX_OPENCLAW_PRESENTATION_KEY]);
|
|
93
94
|
if (!presentation || presentation.version !== 1 || presentation.type !== MATRIX_OPENCLAW_PRESENTATION_TYPE) return;
|
|
94
95
|
return presentation;
|
|
95
96
|
}
|
|
@@ -202,7 +203,7 @@ const matrixChannelRuntime = {
|
|
|
202
203
|
}));
|
|
203
204
|
}
|
|
204
205
|
}
|
|
205
|
-
|
|
206
|
+
const result = await send(to, payloadText, {
|
|
206
207
|
cfg,
|
|
207
208
|
mediaAccess,
|
|
208
209
|
mediaLocalRoots,
|
|
@@ -217,10 +218,11 @@ const matrixChannelRuntime = {
|
|
|
217
218
|
onPlatformSendDispatch,
|
|
218
219
|
extraContent: resolveMatrixExtraContent(payload),
|
|
219
220
|
onDeliveryResult: resolveMatrixDeliveryProgress(onDeliveryResult)
|
|
220
|
-
})
|
|
221
|
+
});
|
|
222
|
+
return attachChannelToResult("matrix", toMatrixOutboundResult(result));
|
|
221
223
|
},
|
|
222
224
|
sendText: async ({ cfg, to, text, deps, replyToId, threadId, accountId, audioAsVoice, deliveryQueueId, deliveryPartIndex, deliveryPartCount, onPlatformSendDispatch, onDeliveryResult }) => {
|
|
223
|
-
|
|
225
|
+
const result = await (resolveOutboundSendDep(deps, "matrix") ?? sendMessageMatrix)(to, text, {
|
|
224
226
|
cfg,
|
|
225
227
|
replyToId: replyToId ?? void 0,
|
|
226
228
|
threadId: threadId !== void 0 && threadId !== null ? String(threadId) : void 0,
|
|
@@ -231,10 +233,11 @@ const matrixChannelRuntime = {
|
|
|
231
233
|
...deliveryQueueId !== void 0 ? { deliveryPartCount } : {},
|
|
232
234
|
onPlatformSendDispatch,
|
|
233
235
|
onDeliveryResult: resolveMatrixDeliveryProgress(onDeliveryResult)
|
|
234
|
-
})
|
|
236
|
+
});
|
|
237
|
+
return attachChannelToResult("matrix", toMatrixOutboundResult(result));
|
|
235
238
|
},
|
|
236
239
|
sendMedia: async ({ cfg, to, text, mediaUrl, mediaLocalRoots, mediaReadFile, mediaAccess, deps, replyToId, threadId, accountId, audioAsVoice, deliveryQueueId, deliveryPartIndex, deliveryPartCount, onPlatformSendDispatch, onDeliveryResult }) => {
|
|
237
|
-
|
|
240
|
+
const result = await (resolveOutboundSendDep(deps, "matrix") ?? sendMessageMatrix)(to, text, {
|
|
238
241
|
cfg,
|
|
239
242
|
mediaUrl,
|
|
240
243
|
mediaLocalRoots,
|
|
@@ -249,7 +252,8 @@ const matrixChannelRuntime = {
|
|
|
249
252
|
...deliveryQueueId !== void 0 ? { deliveryPartCount } : {},
|
|
250
253
|
onPlatformSendDispatch,
|
|
251
254
|
onDeliveryResult: resolveMatrixDeliveryProgress(onDeliveryResult)
|
|
252
|
-
})
|
|
255
|
+
});
|
|
256
|
+
return attachChannelToResult("matrix", toMatrixOutboundResult(result));
|
|
253
257
|
},
|
|
254
258
|
sendPoll: async ({ cfg, to, poll, threadId, accountId }) => {
|
|
255
259
|
const result = await sendPollMatrix(to, poll, {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as resolveMatrixAccountConfig } from "./account-config-CRsKoMqJ.js";
|
|
2
|
-
import { i as resolveMatrixAccount, r as resolveDefaultMatrixAccountId, t as listMatrixAccountIds } from "./accounts-
|
|
3
|
-
import { r as matrixSetupContract, t as createMatrixSetupWizardProxy } from "./setup-core-
|
|
2
|
+
import { i as resolveMatrixAccount, r as resolveDefaultMatrixAccountId, t as listMatrixAccountIds } from "./accounts-DR1c4xF_.js";
|
|
3
|
+
import { r as matrixSetupContract, t as createMatrixSetupWizardProxy } from "./setup-core-CZM496H-.js";
|
|
4
4
|
import { adaptScopedAccountAccessor, createScopedChannelConfigAdapter } from "openclaw/plugin-sdk/channel-config-helpers";
|
|
5
5
|
import { createChannelConfigUiHints } from "openclaw/plugin-sdk/channel-core";
|
|
6
6
|
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
@@ -50,22 +50,23 @@ function resolveMatrixAllowListMatch(params) {
|
|
|
50
50
|
matchSource: "wildcard"
|
|
51
51
|
};
|
|
52
52
|
const userId = normalizeMatrixUser(params.userId);
|
|
53
|
+
const candidates = [
|
|
54
|
+
{
|
|
55
|
+
value: userId,
|
|
56
|
+
source: "id"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
value: userId ? `matrix:${userId}` : "",
|
|
60
|
+
source: "prefixed-id"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
value: userId ? `user:${userId}` : "",
|
|
64
|
+
source: "prefixed-user"
|
|
65
|
+
}
|
|
66
|
+
];
|
|
53
67
|
return resolveAllowlistMatchByCandidates({
|
|
54
68
|
allowList,
|
|
55
|
-
candidates
|
|
56
|
-
{
|
|
57
|
-
value: userId,
|
|
58
|
-
source: "id"
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
value: userId ? `matrix:${userId}` : "",
|
|
62
|
-
source: "prefixed-id"
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
value: userId ? `user:${userId}` : "",
|
|
66
|
-
source: "prefixed-user"
|
|
67
|
-
}
|
|
68
|
-
]
|
|
69
|
+
candidates
|
|
69
70
|
});
|
|
70
71
|
}
|
|
71
72
|
//#endregion
|
|
@@ -225,7 +226,7 @@ function hasCanonicalMatrixAccountStreaming(account) {
|
|
|
225
226
|
const streaming = account.streaming;
|
|
226
227
|
return typeof streaming === "object" && streaming !== null && !Array.isArray(streaming);
|
|
227
228
|
}
|
|
228
|
-
const
|
|
229
|
+
const MatrixConfigSchema = z.object({
|
|
229
230
|
name: z.string().optional(),
|
|
230
231
|
enabled: z.boolean().optional(),
|
|
231
232
|
configWrites: z.boolean().optional(),
|
|
@@ -299,7 +300,8 @@ const MatrixChannelConfigSchema = buildChannelConfigSchema(z.object({
|
|
|
299
300
|
groups: z.object({}).catchall(matrixRoomSchema).optional(),
|
|
300
301
|
rooms: z.object({}).catchall(matrixRoomSchema).optional(),
|
|
301
302
|
actions: matrixActionSchema
|
|
302
|
-
})
|
|
303
|
+
});
|
|
304
|
+
const MatrixChannelConfigSchema = buildChannelConfigSchema(MatrixConfigSchema, { uiHints: matrixChannelConfigUiHints });
|
|
303
305
|
const matrixPluginBase = {
|
|
304
306
|
id: "matrix",
|
|
305
307
|
meta: {
|
|
@@ -312,7 +314,7 @@ const matrixPluginBase = {
|
|
|
312
314
|
order: 70,
|
|
313
315
|
quickstartAllowFrom: true
|
|
314
316
|
},
|
|
315
|
-
setupWizard: createMatrixSetupWizardProxy(async () => ({ matrixSetupWizard: (await import("./setup-surface-
|
|
317
|
+
setupWizard: createMatrixSetupWizardProxy(async () => ({ matrixSetupWizard: (await import("./setup-surface-DSZtOsWK.js").then((n) => n.t)).matrixSetupWizard })),
|
|
316
318
|
setupContract: matrixSetupContract,
|
|
317
319
|
capabilities: {
|
|
318
320
|
chatTypes: [
|