@openclaw/matrix 2026.9.2 → 2026.9.4
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-DA-jfx22.js → account-selection-Bbtc483D.js} +9 -1
- package/dist/{accounts-DR1c4xF_.js → accounts-GwSAk9vY.js} +2 -2
- package/dist/api.js +6 -6
- package/dist/{approval-handler.runtime-BJCD4dLf.js → approval-handler.runtime-6I3IpyeX.js} +6 -6
- package/dist/{approval-ids-Bst7HM_o.js → approval-ids-C4NdeXNz.js} +1 -1
- package/dist/{approval-reaction-auth-DhH8QOSe.js → approval-reaction-auth-cbltZAUQ.js} +2 -2
- package/dist/{channel-Bs8VLb6q.js → channel-Cg97H4c1.js} +13 -202
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel.runtime-CCJRhdH5.js → channel.runtime-Bhpfa1qc.js} +6 -11
- package/dist/{channel.setup-DhmDXwPp.js → channel.setup-DmS7m7aT.js} +3 -3
- package/dist/{cli-IvDUuiDH.js → cli-CLexRrQw.js} +9 -9
- package/dist/{cli-metadata-BGryAl2e.js → cli-metadata-zRyVmUOL.js} +1 -1
- package/dist/cli-metadata.js +1 -1
- package/dist/{client-oNOlldJI.js → client-C0nZFCTj.js} +2 -2
- package/dist/{client-Dj4mcf-s.js → client-CPcRv6ab.js} +6 -6
- package/dist/{client-bootstrap-n1Rqc8Go.js → client-bootstrap-DLN-K8Xb.js} +1 -6
- package/dist/contract-api.js +2 -2
- package/dist/{credentials-DJj2xs3q.js → credentials-DysXbkv2.js} +2 -2
- package/dist/{credentials-read-mexhw-Ur.js → credentials-read-WWpqi88V.js} +1 -1
- package/dist/{credentials-write.runtime-DQt-kgJq.js → credentials-write.runtime-D22lPwRO.js} +1 -1
- package/dist/{crypto-runtime-m1eplj3b.js → crypto-runtime-DiyH4R3D.js} +3 -25
- package/dist/{crypto-snapshot-doctor.runtime-D0v841D_.js → crypto-snapshot-doctor.runtime-DxgUMXUy.js} +2 -2
- package/dist/{directory-live-DLUgWBhA.js → directory-live-B8-GAVcc.js} +2 -2
- package/dist/doctor-contract-api.js +41 -21
- package/dist/{draft-stream-DglwxWzJ.js → draft-stream--NdEtnZ8.js} +16 -5
- package/dist/{encryption-guidance-BNcZNQZI.js → encryption-guidance-mDyxJV9U.js} +1 -1
- package/dist/{event-helpers-XRfAbOIh.js → event-helpers-CspuhE9k.js} +9 -1
- package/dist/helper-api.js +3 -3
- package/dist/{http-client-DOmFvKvB.js → http-client-BfPeF4CE.js} +1 -1
- package/dist/{idb-persistence-CU7CNLlX.js → idb-persistence-DBdwHSWg.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/{messages-Czn8lNEh.js → messages-CpZfiQO0.js} +6 -99
- package/dist/{monitor-DouG43FJ.js → monitor-BUek91SW.js} +61 -92
- package/dist/{outbound-Co_tJyE6.js → outbound-D91JinYa.js} +1 -1
- package/dist/plugin-entry.handlers.runtime.js +1 -1
- package/dist/probe.runtime-DWdw74_H.js +2 -0
- package/dist/{profile-update-CAl8nZNG.js → profile-update-vnhxwjEt.js} +1 -1
- package/dist/{reaction-events-C_7G7bvI.js → reaction-events-2WM2nJe_.js} +5 -7
- package/dist/{resolve-targets-B64O69Nd.js → resolve-targets-K8D0HWPX.js} +1 -1
- package/dist/{resolver.runtime-TRmePJDV.js → resolver.runtime-C88GwQCx.js} +1 -1
- package/dist/{room-info-6viLR3NH.js → room-info-BPVJkXnp.js} +7 -4
- package/dist/runtime-api.js +2 -2
- package/dist/{sdk-C1yfda1L.js → sdk-B4By16Bt.js} +13 -6
- package/dist/{send-B5XChnvB.js → send-UWLIQ0bG.js} +211 -135
- package/dist/session-binding-contract-api.js +1 -1
- package/dist/{setup-bootstrap-S_loyUyM.js → setup-bootstrap-sVqkwtSY.js} +2 -2
- package/dist/{setup-core-XkIfQ65J.js → setup-core-8keb-Yre.js} +14 -29
- package/dist/setup-plugin-api.js +1 -1
- package/dist/{setup-surface-B2yZ8KGc.js → setup-surface-bcluelBI.js} +8 -17
- package/dist/{startup-verification-1Ney1mmI.js → startup-verification-BTSf31hS.js} +2 -1
- package/dist/storage-CV-pfV_2.js +320 -0
- package/dist/{storage-BVf4uucD.js → storage-metadata-DYArLcq1.js} +14 -319
- package/dist/{storage-paths-gUmSydsW.js → storage-paths-DVCANXTc.js} +13 -1
- package/dist/{sync-cache-state-d-A_OhbU.js → sync-cache-state-C-mhj3xb.js} +9 -3
- package/dist/{thread-bindings-BkBnn4te.js → thread-bindings-Bwv87Gve.js} +3 -2
- package/dist/{tool-actions.runtime-a5L5xGSP.js → tool-actions.runtime-Bf98Juk6.js} +295 -256
- package/dist/types-DzSc7Sqm.js +32 -0
- package/dist/{verification-XJtTc5DI.js → verification-BbG-VC9S.js} +2 -2
- package/node_modules/@matrix-org/matrix-sdk-crypto-wasm/package.json +1 -1
- package/node_modules/@matrix-org/matrix-sdk-crypto-wasm/pkg/matrix_sdk_crypto_wasm.d.ts +69 -4
- package/node_modules/@matrix-org/matrix-sdk-crypto-wasm/pkg/matrix_sdk_crypto_wasm_bg.cjs +526 -432
- package/node_modules/@matrix-org/matrix-sdk-crypto-wasm/pkg/matrix_sdk_crypto_wasm_bg.js +358 -265
- package/node_modules/@matrix-org/matrix-sdk-crypto-wasm/pkg/matrix_sdk_crypto_wasm_bg.wasm +0 -0
- package/node_modules/@matrix-org/matrix-sdk-crypto-wasm/pkg/matrix_sdk_crypto_wasm_bg.wasm.d.ts +8 -7
- package/openclaw.plugin.json +27 -1
- package/package.json +5 -5
- package/dist/probe.runtime-B1YPxG9x.js +0 -2
- package/dist/runtime-BefyhPWv.js +0 -6
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
|
|
1
2
|
import { n as listMatrixEnvAccountIds, t as getMatrixScopedEnvVarNames } from "./env-vars-dGqak9dN.js";
|
|
2
3
|
import { isRecord, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
3
4
|
import { listCombinedAccountIds, listConfiguredAccountIds, resolveListedDefaultAccountId, resolveNormalizedAccountEntry } from "openclaw/plugin-sdk/account-core";
|
|
@@ -91,6 +92,13 @@ function resolveMatrixEnvAuthReadiness(accountId, env = process.env) {
|
|
|
91
92
|
}
|
|
92
93
|
//#endregion
|
|
93
94
|
//#region extensions/matrix/src/account-selection.ts
|
|
95
|
+
var account_selection_exports = /* @__PURE__ */ __exportAll({
|
|
96
|
+
findMatrixAccountEntry: () => findMatrixAccountEntry,
|
|
97
|
+
requiresExplicitMatrixDefaultAccount: () => requiresExplicitMatrixDefaultAccount,
|
|
98
|
+
resolveConfiguredMatrixAccountIds: () => resolveConfiguredMatrixAccountIds,
|
|
99
|
+
resolveMatrixChannelConfig: () => resolveMatrixChannelConfig,
|
|
100
|
+
resolveMatrixDefaultOrOnlyAccountId: () => resolveMatrixDefaultOrOnlyAccountId
|
|
101
|
+
});
|
|
94
102
|
function readConfiguredMatrixString(value) {
|
|
95
103
|
return normalizeOptionalString(value) ?? "";
|
|
96
104
|
}
|
|
@@ -192,4 +200,4 @@ function requiresExplicitMatrixDefaultAccount(cfg, env = process.env) {
|
|
|
192
200
|
return !(configuredDefault && configuredAccountIds.includes(configuredDefault));
|
|
193
201
|
}
|
|
194
202
|
//#endregion
|
|
195
|
-
export {
|
|
203
|
+
export { resolveMatrixChannelConfig as a, resolveMatrixEnvAuthReadiness as c, resolveConfiguredMatrixAccountIds as i, resolveScopedMatrixEnvConfig as l, findMatrixAccountEntry as n, resolveMatrixDefaultOrOnlyAccountId as o, requiresExplicitMatrixDefaultAccount as r, resolveGlobalMatrixEnvConfig as s, account_selection_exports as t, resolveMatrixAccountStringValues as u };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { i as resolveConfiguredMatrixAccountIds, l as resolveScopedMatrixEnvConfig, o as resolveMatrixDefaultOrOnlyAccountId, s as resolveGlobalMatrixEnvConfig, u as resolveMatrixAccountStringValues } from "./account-selection-Bbtc483D.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-WWpqi88V.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
|
|
1
|
+
import { a as resolveMatrixChannelConfig, i as resolveConfiguredMatrixAccountIds, n as findMatrixAccountEntry, o as resolveMatrixDefaultOrOnlyAccountId, r as requiresExplicitMatrixDefaultAccount } from "./account-selection-Bbtc483D.js";
|
|
2
2
|
import { n as listMatrixEnvAccountIds, r as resolveMatrixEnvAccountToken, t as getMatrixScopedEnvVarNames } from "./env-vars-dGqak9dN.js";
|
|
3
|
-
import { a as
|
|
4
|
-
import { t as matrixPlugin } from "./channel-
|
|
5
|
-
import { n as matrixSetupAdapter, t as createMatrixSetupWizardProxy } from "./setup-core-
|
|
3
|
+
import { a as resolveMatrixCredentialsFilename, i as resolveMatrixCredentialsDir, l as sanitizeMatrixPathSegment, o as resolveMatrixCredentialsPath, r as resolveMatrixAccountStorageRoot, s as resolveMatrixHomeserverKey, t as hashMatrixAccessToken } from "./storage-paths-DVCANXTc.js";
|
|
4
|
+
import { t as matrixPlugin } from "./channel-Cg97H4c1.js";
|
|
5
|
+
import { n as matrixSetupAdapter, t as createMatrixSetupWizardProxy } from "./setup-core-8keb-Yre.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-bcluelBI.js";
|
|
8
|
+
import { t as createMatrixThreadBindingManager } from "./thread-bindings-Bwv87Gve.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,16 +1,16 @@
|
|
|
1
|
-
import { i as resolveMatrixAccount } from "./accounts-
|
|
2
|
-
import {
|
|
1
|
+
import { i as resolveMatrixAccount } from "./accounts-GwSAk9vY.js";
|
|
2
|
+
import { v as isMatrixAnyApprovalClientEnabled, y as shouldHandleMatrixApprovalRequest } from "./channel-Cg97H4c1.js";
|
|
3
3
|
import { o as resolveMatrixTargetIdentity } from "./target-ids-Nwx7cMVE.js";
|
|
4
|
-
import {
|
|
4
|
+
import { a as sendSingleTextMessageMatrix, j as repairMatrixDirectRooms, n as reactMatrixMessage, r as sendMessageMatrix } from "./send-UWLIQ0bG.js";
|
|
5
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-
|
|
6
|
+
import { n as editMatrixMessage, t as deleteMatrixMessage } from "./messages-CpZfiQO0.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";
|
|
10
10
|
import { normalizeAccountId } from "openclaw/plugin-sdk/routing";
|
|
11
11
|
import { createChannelApprovalNativeRuntimeAdapter } from "openclaw/plugin-sdk/approval-handler-runtime";
|
|
12
12
|
import { buildExecApprovalPendingReplyPayload, buildPluginApprovalPendingReplyPayload } from "openclaw/plugin-sdk/approval-reply-runtime";
|
|
13
|
-
import { buildApprovalPendingReplyPayload, buildPluginApprovalResolvedReplyPayload } from "openclaw/plugin-sdk/approval-runtime";
|
|
13
|
+
import { buildApprovalPendingReplyPayload, buildPluginApprovalResolvedReplyPayload, formatChannelApprovalResolvedLabel } from "openclaw/plugin-sdk/approval-runtime";
|
|
14
14
|
import { retryAsync } from "openclaw/plugin-sdk/retry-runtime";
|
|
15
15
|
//#region extensions/matrix/src/approval-handler.runtime.ts
|
|
16
16
|
const MATRIX_APPROVAL_METADATA_KEY = "com.openclaw.approval";
|
|
@@ -197,7 +197,7 @@ function buildResolvedApprovalText(view) {
|
|
|
197
197
|
resolvedBy: view.resolvedBy ?? void 0,
|
|
198
198
|
ts: 0
|
|
199
199
|
} }).text ?? "";
|
|
200
|
-
const decisionLabel = view
|
|
200
|
+
const decisionLabel = formatChannelApprovalResolvedLabel(view);
|
|
201
201
|
return [
|
|
202
202
|
`${view.approvalKind === "system-agent" ? "OpenClaw change" : "Exec approval"}: ${decisionLabel}`,
|
|
203
203
|
"",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as normalizeMatrixUserId } from "./channel.setup-
|
|
1
|
+
import { a as normalizeMatrixUserId } from "./channel.setup-DmS7m7aT.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-GwSAk9vY.js";
|
|
2
|
+
import { t as normalizeMatrixApproverId } from "./approval-ids-C4NdeXNz.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,11 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { r as requiresExplicitMatrixDefaultAccount } from "./account-selection-Bbtc483D.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-GwSAk9vY.js";
|
|
4
|
+
import { a as normalizeMatrixUserId, r as DEFAULT_ACCOUNT_ID$2, t as matrixPluginBase } from "./channel.setup-DmS7m7aT.js";
|
|
5
|
+
import { t as normalizeMatrixApproverId } from "./approval-ids-C4NdeXNz.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
7
|
import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-HyWFZQVG.js";
|
|
8
|
-
import { n as MATRIX_REACTION_EVENT_TYPE } from "./reaction-common-DkrQdBSZ.js";
|
|
9
8
|
import { f as setMatrixThreadBindingMaxAgeBySessionKey, u as setMatrixThreadBindingIdleTimeoutBySessionKey } from "./thread-bindings-shared-oNPiyMWY.js";
|
|
10
9
|
import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-CufozuyJ.js";
|
|
11
10
|
import { n as resolveMatrixInboundConversation, t as defaultTopLevelPlacement } from "./thread-binding-api-CzkeLZCU.js";
|
|
@@ -19,7 +18,7 @@ import { createChannelDirectoryAdapter, createResolvedDirectoryEntriesLister, cr
|
|
|
19
18
|
import { buildProbeChannelStatusSummary, collectStatusIssuesFromLastError, createComputedAccountStatusAdapter, createDefaultChannelRuntimeState } from "openclaw/plugin-sdk/status-helpers";
|
|
20
19
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString, normalizeOptionalStringifiedId } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
21
20
|
import { chunkTextForOutbound, sanitizeAssistantVisibleText } from "openclaw/plugin-sdk/text-chunking";
|
|
22
|
-
import {
|
|
21
|
+
import { createActionGate } from "openclaw/plugin-sdk/channel-actions";
|
|
23
22
|
import { extractToolSend } from "openclaw/plugin-sdk/tool-send";
|
|
24
23
|
import { Type } from "typebox";
|
|
25
24
|
import { normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
|
@@ -149,169 +148,8 @@ const matrixMessageActions = {
|
|
|
149
148
|
return account && createActionGate(account.config.actions)("messages") ? payload : null;
|
|
150
149
|
},
|
|
151
150
|
handleAction: async (ctx) => {
|
|
152
|
-
const { handleMatrixAction } = await import("./tool-actions.runtime-
|
|
153
|
-
|
|
154
|
-
const dispatch = async (actionParams) => await handleMatrixAction({
|
|
155
|
-
...actionParams,
|
|
156
|
-
...accountId ? { accountId } : {}
|
|
157
|
-
}, cfg, {
|
|
158
|
-
...action === "send" && ctx.mediaAccess ? { mediaAccess: ctx.mediaAccess } : {},
|
|
159
|
-
mediaLocalRoots,
|
|
160
|
-
readContext: {
|
|
161
|
-
accountId,
|
|
162
|
-
requesterAccountId: ctx.requesterAccountId,
|
|
163
|
-
currentChannelId: ctx.toolContext?.currentChannelId,
|
|
164
|
-
currentChannelProvider: ctx.toolContext?.currentChannelProvider,
|
|
165
|
-
currentChatType: ctx.toolContext?.currentChatType,
|
|
166
|
-
conversationReadOrigin: ctx.conversationReadOrigin
|
|
167
|
-
}
|
|
168
|
-
});
|
|
169
|
-
const resolveRoomId = () => readStringParam(params, "roomId") ?? readStringParam(params, "channelId") ?? readStringParam(params, "to", { required: true });
|
|
170
|
-
if (action === "send") {
|
|
171
|
-
const to = readStringParam(params, "to", { required: true });
|
|
172
|
-
const mediaUrl = readStringParam(params, "media", { trim: false }) ?? readStringParam(params, "mediaUrl", { trim: false }) ?? readStringParam(params, "filePath", { trim: false }) ?? readStringParam(params, "path", { trim: false });
|
|
173
|
-
const content = readStringParam(params, "message", {
|
|
174
|
-
required: !mediaUrl,
|
|
175
|
-
allowEmpty: true,
|
|
176
|
-
trim: false
|
|
177
|
-
});
|
|
178
|
-
const replyTo = readStringParam(params, "replyTo");
|
|
179
|
-
const threadId = readStringParam(params, "threadId");
|
|
180
|
-
const audioAsVoice = typeof params.asVoice === "boolean" ? params.asVoice : typeof params.audioAsVoice === "boolean" ? params.audioAsVoice : void 0;
|
|
181
|
-
return await dispatch({
|
|
182
|
-
action: "sendMessage",
|
|
183
|
-
to,
|
|
184
|
-
content,
|
|
185
|
-
mediaUrl: mediaUrl ?? void 0,
|
|
186
|
-
replyToId: replyTo ?? void 0,
|
|
187
|
-
threadId: threadId ?? void 0,
|
|
188
|
-
audioAsVoice
|
|
189
|
-
});
|
|
190
|
-
}
|
|
191
|
-
if (action === "poll-vote") return await dispatch({
|
|
192
|
-
...params,
|
|
193
|
-
action: "pollVote"
|
|
194
|
-
});
|
|
195
|
-
if (action === "react") {
|
|
196
|
-
const messageId = readStringParam(params, "messageId", { required: true });
|
|
197
|
-
const emoji = readStringParam(params, "emoji", { allowEmpty: true });
|
|
198
|
-
const remove = typeof params.remove === "boolean" ? params.remove : void 0;
|
|
199
|
-
return await dispatch({
|
|
200
|
-
action: "react",
|
|
201
|
-
roomId: resolveRoomId(),
|
|
202
|
-
messageId,
|
|
203
|
-
emoji,
|
|
204
|
-
remove
|
|
205
|
-
});
|
|
206
|
-
}
|
|
207
|
-
if (action === "reactions") {
|
|
208
|
-
const messageId = readStringParam(params, "messageId", { required: true });
|
|
209
|
-
const limit = readPositiveIntegerParam(params, "limit", { message: "limit must be a positive integer." });
|
|
210
|
-
return await dispatch({
|
|
211
|
-
action: "reactions",
|
|
212
|
-
roomId: resolveRoomId(),
|
|
213
|
-
messageId,
|
|
214
|
-
limit
|
|
215
|
-
});
|
|
216
|
-
}
|
|
217
|
-
if (action === "emoji-list") {
|
|
218
|
-
const roomId = readStringParam(params, "roomId") ?? readStringParam(params, "channelId") ?? readStringParam(params, "to") ?? (ctx.toolContext?.currentChannelProvider === "matrix" ? ctx.toolContext.currentChannelId : void 0);
|
|
219
|
-
if (!roomId) throw new Error("Matrix emoji-list requires a roomId or current Matrix conversation.");
|
|
220
|
-
return await dispatch({
|
|
221
|
-
action: "emoji-list",
|
|
222
|
-
roomId,
|
|
223
|
-
limit: readPositiveIntegerParam(params, "limit", { message: "limit must be a positive integer." })
|
|
224
|
-
});
|
|
225
|
-
}
|
|
226
|
-
if (action === "read") {
|
|
227
|
-
const limit = readPositiveIntegerParam(params, "limit", { message: "limit must be a positive integer." });
|
|
228
|
-
return await dispatch({
|
|
229
|
-
action: "readMessages",
|
|
230
|
-
roomId: resolveRoomId(),
|
|
231
|
-
limit,
|
|
232
|
-
before: readStringParam(params, "before"),
|
|
233
|
-
after: readStringParam(params, "after"),
|
|
234
|
-
threadId: readStringParam(params, "threadId")
|
|
235
|
-
});
|
|
236
|
-
}
|
|
237
|
-
if (action === "edit") {
|
|
238
|
-
const messageId = readStringParam(params, "messageId", { required: true });
|
|
239
|
-
const content = readStringParam(params, "message", {
|
|
240
|
-
required: true,
|
|
241
|
-
trim: false
|
|
242
|
-
});
|
|
243
|
-
return await dispatch({
|
|
244
|
-
action: "editMessage",
|
|
245
|
-
roomId: resolveRoomId(),
|
|
246
|
-
messageId,
|
|
247
|
-
content
|
|
248
|
-
});
|
|
249
|
-
}
|
|
250
|
-
if (action === "delete") {
|
|
251
|
-
const messageId = readStringParam(params, "messageId", { required: true });
|
|
252
|
-
return await dispatch({
|
|
253
|
-
action: "deleteMessage",
|
|
254
|
-
roomId: resolveRoomId(),
|
|
255
|
-
messageId
|
|
256
|
-
});
|
|
257
|
-
}
|
|
258
|
-
if (action === "pin" || action === "unpin" || action === "list-pins") {
|
|
259
|
-
const messageId = action === "list-pins" ? void 0 : readStringParam(params, "messageId", { required: true });
|
|
260
|
-
return await dispatch({
|
|
261
|
-
action: action === "pin" ? "pinMessage" : action === "unpin" ? "unpinMessage" : "listPins",
|
|
262
|
-
roomId: resolveRoomId(),
|
|
263
|
-
messageId
|
|
264
|
-
});
|
|
265
|
-
}
|
|
266
|
-
if (action === "set-profile") {
|
|
267
|
-
if (ctx.senderIsOwner !== true) throw new ToolAuthorizationError("Matrix profile updates require owner access.");
|
|
268
|
-
const avatarPath = readStringParam(params, "avatarPath") ?? readStringParam(params, "path") ?? readStringParam(params, "filePath");
|
|
269
|
-
return await dispatch({
|
|
270
|
-
action: "setProfile",
|
|
271
|
-
displayName: readStringParam(params, "displayName") ?? readStringParam(params, "name"),
|
|
272
|
-
avatarUrl: readStringParam(params, "avatarUrl"),
|
|
273
|
-
avatarPath
|
|
274
|
-
});
|
|
275
|
-
}
|
|
276
|
-
if (action === "member-info") return await dispatch({
|
|
277
|
-
action: "memberInfo",
|
|
278
|
-
userId: readStringParam(params, "userId", { required: true }),
|
|
279
|
-
roomId: resolveRoomId()
|
|
280
|
-
});
|
|
281
|
-
if (action === "channel-info") return await dispatch({
|
|
282
|
-
action: "channelInfo",
|
|
283
|
-
roomId: resolveRoomId()
|
|
284
|
-
});
|
|
285
|
-
if (action === "permissions") {
|
|
286
|
-
if (ctx.senderIsOwner !== true) throw new ToolAuthorizationError("Matrix verification actions require owner access.");
|
|
287
|
-
const operation = normalizeLowercaseStringOrEmpty(readStringParam(params, "operation") ?? readStringParam(params, "mode") ?? "verification-list");
|
|
288
|
-
const operationToAction = {
|
|
289
|
-
"encryption-status": "encryptionStatus",
|
|
290
|
-
"verification-status": "verificationStatus",
|
|
291
|
-
"verification-bootstrap": "verificationBootstrap",
|
|
292
|
-
"verification-recovery-key": "verificationRecoveryKey",
|
|
293
|
-
"verification-backup-status": "verificationBackupStatus",
|
|
294
|
-
"verification-backup-restore": "verificationBackupRestore",
|
|
295
|
-
"verification-list": "verificationList",
|
|
296
|
-
"verification-request": "verificationRequest",
|
|
297
|
-
"verification-accept": "verificationAccept",
|
|
298
|
-
"verification-cancel": "verificationCancel",
|
|
299
|
-
"verification-start": "verificationStart",
|
|
300
|
-
"verification-generate-qr": "verificationGenerateQr",
|
|
301
|
-
"verification-scan-qr": "verificationScanQr",
|
|
302
|
-
"verification-sas": "verificationSas",
|
|
303
|
-
"verification-confirm": "verificationConfirm",
|
|
304
|
-
"verification-mismatch": "verificationMismatch",
|
|
305
|
-
"verification-confirm-qr": "verificationConfirmQr"
|
|
306
|
-
};
|
|
307
|
-
const resolvedAction = operationToAction[operation];
|
|
308
|
-
if (!resolvedAction) throw new Error(`Unsupported Matrix permissions operation: ${operation}. Supported values: ${Object.keys(operationToAction).join(", ")}`);
|
|
309
|
-
return await dispatch({
|
|
310
|
-
...params,
|
|
311
|
-
action: resolvedAction
|
|
312
|
-
});
|
|
313
|
-
}
|
|
314
|
-
throw new Error(`Action ${action} is not supported for provider matrix.`);
|
|
151
|
+
const { handleMatrixAction } = await import("./tool-actions.runtime-Bf98Juk6.js");
|
|
152
|
+
return await handleMatrixAction(ctx);
|
|
315
153
|
}
|
|
316
154
|
};
|
|
317
155
|
//#endregion
|
|
@@ -619,6 +457,7 @@ const matrixNativeApprovalCapability = createApproverRestrictedNativeApprovalCap
|
|
|
619
457
|
resolveApproverDmTargets: resolveMatrixApproverDmTargets,
|
|
620
458
|
notifyOriginWhenDmOnly: true,
|
|
621
459
|
nativeRuntime: createLazyChannelApprovalNativeRuntimeAdapter({
|
|
460
|
+
capabilityBoundary: true,
|
|
622
461
|
eventKinds: [
|
|
623
462
|
"exec",
|
|
624
463
|
"plugin",
|
|
@@ -634,7 +473,7 @@ const matrixNativeApprovalCapability = createApproverRestrictedNativeApprovalCap
|
|
|
634
473
|
approvalKind,
|
|
635
474
|
request
|
|
636
475
|
}),
|
|
637
|
-
load: async () => (await import("./approval-handler.runtime-
|
|
476
|
+
load: async () => (await import("./approval-handler.runtime-6I3IpyeX.js")).matrixApprovalNativeRuntime
|
|
638
477
|
})
|
|
639
478
|
});
|
|
640
479
|
const splitMatrixApprovalCapability = splitChannelApprovalCapability(matrixNativeApprovalCapability);
|
|
@@ -859,19 +698,6 @@ function resolveMatrixGroupToolPolicy(params) {
|
|
|
859
698
|
return resolveScopeToolsPolicy(resolveMatrixGroupScope(params));
|
|
860
699
|
}
|
|
861
700
|
//#endregion
|
|
862
|
-
//#region extensions/matrix/src/matrix/monitor/types.ts
|
|
863
|
-
const EventType = {
|
|
864
|
-
RoomMessage: "m.room.message",
|
|
865
|
-
RoomMessageEncrypted: "m.room.encrypted",
|
|
866
|
-
RoomMember: "m.room.member",
|
|
867
|
-
Location: "m.location",
|
|
868
|
-
Reaction: MATRIX_REACTION_EVENT_TYPE
|
|
869
|
-
};
|
|
870
|
-
const RelationType = {
|
|
871
|
-
Replace: "m.replace",
|
|
872
|
-
Thread: "m.thread"
|
|
873
|
-
};
|
|
874
|
-
//#endregion
|
|
875
701
|
//#region extensions/matrix/src/matrix/monitor/threads.ts
|
|
876
702
|
function resolveMatrixThreadSessionKeys(params) {
|
|
877
703
|
return resolveThreadSessionKeys({
|
|
@@ -879,10 +705,6 @@ function resolveMatrixThreadSessionKeys(params) {
|
|
|
879
705
|
normalizeThreadId: (threadId) => threadId
|
|
880
706
|
});
|
|
881
707
|
}
|
|
882
|
-
function resolveMatrixRelatedReplyToEventId(relates) {
|
|
883
|
-
if (!relates || typeof relates !== "object") return;
|
|
884
|
-
if ("m.in_reply_to" in relates && typeof relates["m.in_reply_to"] === "object" && relates["m.in_reply_to"] && "event_id" in relates["m.in_reply_to"] && typeof relates["m.in_reply_to"].event_id === "string") return relates["m.in_reply_to"].event_id;
|
|
885
|
-
}
|
|
886
708
|
function resolveMatrixThreadRouting(params) {
|
|
887
709
|
const effectiveThreadReplies = params.isDirectMessage && params.dmThreadReplies !== void 0 ? params.dmThreadReplies : params.threadReplies;
|
|
888
710
|
const messageId = params.messageId.trim();
|
|
@@ -890,17 +712,6 @@ function resolveMatrixThreadRouting(params) {
|
|
|
890
712
|
const inboundThreadId = threadRootId && threadRootId !== messageId ? threadRootId : void 0;
|
|
891
713
|
return { threadId: effectiveThreadReplies === "off" ? void 0 : effectiveThreadReplies === "inbound" ? inboundThreadId : inboundThreadId ?? (messageId || void 0) };
|
|
892
714
|
}
|
|
893
|
-
function resolveMatrixThreadRootId(params) {
|
|
894
|
-
const relates = params.content["m.relates_to"];
|
|
895
|
-
if (!relates || typeof relates !== "object") return;
|
|
896
|
-
if ("rel_type" in relates && relates.rel_type === RelationType.Thread) {
|
|
897
|
-
if ("event_id" in relates && typeof relates.event_id === "string") return relates.event_id;
|
|
898
|
-
return resolveMatrixRelatedReplyToEventId(relates);
|
|
899
|
-
}
|
|
900
|
-
}
|
|
901
|
-
function resolveMatrixReplyToEventId(content) {
|
|
902
|
-
return resolveMatrixRelatedReplyToEventId(content["m.relates_to"]);
|
|
903
|
-
}
|
|
904
715
|
//#endregion
|
|
905
716
|
//#region extensions/matrix/src/matrix/monitor/route.ts
|
|
906
717
|
function resolveMatrixDmSessionKey(params) {
|
|
@@ -1042,7 +853,7 @@ function resolveMatrixConversationRouteOwner(params) {
|
|
|
1042
853
|
}
|
|
1043
854
|
//#endregion
|
|
1044
855
|
//#region extensions/matrix/src/resolver.ts
|
|
1045
|
-
const loadMatrixChannelRuntime$1 = createLazyRuntimeNamedExport(() => import("./resolver.runtime-
|
|
856
|
+
const loadMatrixChannelRuntime$1 = createLazyRuntimeNamedExport(() => import("./resolver.runtime-C88GwQCx.js"), "matrixResolverRuntime");
|
|
1046
857
|
const matrixResolverAdapter = { resolveTargets: async ({ cfg, accountId, inputs, kind, runtime }) => (await loadMatrixChannelRuntime$1()).resolveMatrixTargets({
|
|
1047
858
|
cfg,
|
|
1048
859
|
accountId,
|
|
@@ -1171,7 +982,7 @@ function resolveMatrixOutboundSessionRoute(params) {
|
|
|
1171
982
|
//#endregion
|
|
1172
983
|
//#region extensions/matrix/src/channel.ts
|
|
1173
984
|
let matrixStartupLock = Promise.resolve();
|
|
1174
|
-
const loadMatrixChannelRuntime = createLazyRuntimeNamedExport(() => import("./channel.runtime-
|
|
985
|
+
const loadMatrixChannelRuntime = createLazyRuntimeNamedExport(() => import("./channel.runtime-Bhpfa1qc.js"), "matrixChannelRuntime");
|
|
1175
986
|
const loadMatrixDoctorModule = createLazyRuntimeModule(() => import("./doctor-CJE8wO6y.js"));
|
|
1176
987
|
function buildMatrixTrafficStatusSummary(snapshot) {
|
|
1177
988
|
return {
|
|
@@ -1522,7 +1333,7 @@ const matrixPlugin = createChatChannelPlugin({
|
|
|
1522
1333
|
await previousLock;
|
|
1523
1334
|
let monitorMatrixProvider;
|
|
1524
1335
|
try {
|
|
1525
|
-
monitorMatrixProvider = (await import("./monitor-
|
|
1336
|
+
monitorMatrixProvider = (await import("./monitor-BUek91SW.js")).monitorMatrixProvider;
|
|
1526
1337
|
} finally {
|
|
1527
1338
|
releaseLock();
|
|
1528
1339
|
}
|
|
@@ -1592,4 +1403,4 @@ const matrixPlugin = createChatChannelPlugin({
|
|
|
1592
1403
|
outbound: matrixChannelOutbound
|
|
1593
1404
|
});
|
|
1594
1405
|
//#endregion
|
|
1595
|
-
export {
|
|
1406
|
+
export { toLocationContext as _, resolveMatrixRoomConfig as a, canonicalizeAllowlistWithResolvedIds as c, formatLocationText as d, getAgentScopedMediaLocalRoots as f, summarizeMapping as g, patchAllowlistUsersInConfigEntries as h, resolveMatrixThreadRouting as i, createReplyPrefixOptions as l, logTypingFailure as m, resolveMatrixStoredSessionMeta as n, addAllowlistUserEntriesFromConfigEntry as o, logInboundDrop as p, resolveMatrixInboundRoute as r, buildAllowlistResolutionSummary as s, matrixPlugin as t, createTypingCallbacks as u, isMatrixAnyApprovalClientEnabled as v, shouldHandleMatrixApprovalRequest as y };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as matrixPlugin } from "./channel-
|
|
1
|
+
import { t as matrixPlugin } from "./channel-Cg97H4c1.js";
|
|
2
2
|
export { matrixPlugin };
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { t as
|
|
6
|
-
import { t as resolveMatrixTargets } from "./resolve-targets-B64O69Nd.js";
|
|
1
|
+
import { D as reconcileMatrixUnknownSend, E as cleanupMatrixDeliveryPlans, o as sendTypingMatrix, r as sendMessageMatrix } from "./send-UWLIQ0bG.js";
|
|
2
|
+
import { l as resolveMatrixAuth } from "./client-CPcRv6ab.js";
|
|
3
|
+
import { n as listMatrixDirectoryGroupsLive, r as listMatrixDirectoryPeersLive } from "./directory-live-B8-GAVcc.js";
|
|
4
|
+
import { t as matrixOutbound } from "./outbound-D91JinYa.js";
|
|
5
|
+
import { t as resolveMatrixTargets } from "./resolve-targets-K8D0HWPX.js";
|
|
7
6
|
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
8
7
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
9
8
|
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
10
9
|
import { runChannelProbe } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
11
10
|
//#region extensions/matrix/src/matrix/probe.ts
|
|
12
|
-
const loadMatrixProbeRuntimeDeps = createLazyRuntimeModule(() => import("./probe.runtime-
|
|
11
|
+
const loadMatrixProbeRuntimeDeps = createLazyRuntimeModule(() => import("./probe.runtime-DWdw74_H.js").then((runtimeModule) => ({ createMatrixClient: runtimeModule.createMatrixClient })));
|
|
13
12
|
async function probeMatrix(params) {
|
|
14
13
|
return await runChannelProbe(void 0, async () => {
|
|
15
14
|
const result = {
|
|
@@ -17,10 +16,6 @@ async function probeMatrix(params) {
|
|
|
17
16
|
status: null,
|
|
18
17
|
error: null
|
|
19
18
|
};
|
|
20
|
-
if (isBunRuntime()) return {
|
|
21
|
-
...result,
|
|
22
|
-
error: "Matrix probe requires Node (bun runtime not supported)"
|
|
23
|
-
};
|
|
24
19
|
if (!params.homeserver?.trim()) return {
|
|
25
20
|
...result,
|
|
26
21
|
error: "missing homeserver"
|
|
@@ -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-GwSAk9vY.js";
|
|
3
|
+
import { r as matrixSetupContract, t as createMatrixSetupWizardProxy } from "./setup-core-8keb-Yre.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";
|
|
@@ -314,7 +314,7 @@ const matrixPluginBase = {
|
|
|
314
314
|
order: 70,
|
|
315
315
|
quickstartAllowFrom: true
|
|
316
316
|
},
|
|
317
|
-
setupWizard: createMatrixSetupWizardProxy(async () => ({ matrixSetupWizard: (await import("./setup-surface-
|
|
317
|
+
setupWizard: createMatrixSetupWizardProxy(async () => ({ matrixSetupWizard: (await import("./setup-surface-bcluelBI.js").then((n) => n.t)).matrixSetupWizard })),
|
|
318
318
|
setupContract: matrixSetupContract,
|
|
319
319
|
capabilities: {
|
|
320
320
|
chatTypes: [
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { a as resolveMatrixAccountConfig, n as hasExplicitMatrixAccountConfig } from "./account-config-CRsKoMqJ.js";
|
|
2
2
|
import { t as getMatrixRuntime } from "./runtime-6S3DNFNv.js";
|
|
3
|
-
import { i as resolveMatrixAccount } from "./accounts-
|
|
3
|
+
import { i as resolveMatrixAccount } from "./accounts-GwSAk9vY.js";
|
|
4
4
|
import { n as resolveMatrixConfigPath, r as updateMatrixAccountConfig } from "./config-update-BnX26jCO.js";
|
|
5
|
-
import { n as matrixSetupAdapter } from "./setup-core-
|
|
6
|
-
import { n as withResolvedActionClient } from "./client-
|
|
7
|
-
import { u as resolveMatrixAuthContext } from "./client-
|
|
5
|
+
import { n as matrixSetupAdapter } from "./setup-core-8keb-Yre.js";
|
|
6
|
+
import { n as withResolvedActionClient } from "./client-C0nZFCTj.js";
|
|
7
|
+
import { u as resolveMatrixAuthContext } from "./client-CPcRv6ab.js";
|
|
8
8
|
import { t as resolveMatrixRoomKeyBackupIssue } from "./backup-health-Dm_YMVFT.js";
|
|
9
9
|
import { i as setMatrixSdkLogMode, r as setMatrixSdkConsoleLogging } from "./logging-DRjvUOIh.js";
|
|
10
10
|
import { n as isOpenClawManagedMatrixDevice, r as summarizeMatrixDeviceHealth } from "./device-health-B4-YXtJR.js";
|
|
11
|
-
import { n as updateMatrixOwnProfile, t as applyMatrixProfileUpdate } from "./profile-update-
|
|
12
|
-
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-
|
|
11
|
+
import { n as updateMatrixOwnProfile, t as applyMatrixProfileUpdate } from "./profile-update-vnhxwjEt.js";
|
|
12
|
+
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-BbG-VC9S.js";
|
|
13
13
|
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
14
14
|
import { normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
|
15
15
|
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
@@ -448,7 +448,7 @@ async function addMatrixAccount(params) {
|
|
|
448
448
|
backupVersion: null
|
|
449
449
|
};
|
|
450
450
|
if (accountConfig.encryption === true) {
|
|
451
|
-
const { maybeBootstrapNewEncryptedMatrixAccount } = await import("./setup-bootstrap-
|
|
451
|
+
const { maybeBootstrapNewEncryptedMatrixAccount } = await import("./setup-bootstrap-sVqkwtSY.js");
|
|
452
452
|
verificationBootstrap = await maybeBootstrapNewEncryptedMatrixAccount({
|
|
453
453
|
previousCfg: cfg,
|
|
454
454
|
cfg: updated,
|
|
@@ -636,8 +636,8 @@ function registerMatrixDeviceCommands(root) {
|
|
|
636
636
|
}
|
|
637
637
|
//#endregion
|
|
638
638
|
//#region extensions/matrix/src/cli-direct.ts
|
|
639
|
-
const loadMatrixActionClientModule = createLazyRuntimeModule(() => import("./client-
|
|
640
|
-
const loadMatrixDirectManagementModule = createLazyRuntimeModule(() => import("./send-
|
|
639
|
+
const loadMatrixActionClientModule = createLazyRuntimeModule(() => import("./client-C0nZFCTj.js").then((n) => n.t));
|
|
640
|
+
const loadMatrixDirectManagementModule = createLazyRuntimeModule(() => import("./send-UWLIQ0bG.js").then((n) => n.k));
|
|
641
641
|
function printDirectRoomCandidate(room) {
|
|
642
642
|
const members = room.joinedMembers === null ? "unavailable" : room.joinedMembers.map((member) => formatMatrixCliText(member)).join(", ") || "none";
|
|
643
643
|
console.log(`- ${formatMatrixCliText(room.roomId)} [${room.source}] strict=${room.strict ? "yes" : "no"} joined=${members}`);
|
|
@@ -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-CLexRrQw.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-zRyVmUOL.js";
|
|
2
2
|
export { cli_metadata_default as default, registerMatrixCliMetadata };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
|
|
2
|
-
import {
|
|
3
|
-
import { n as withResolvedRuntimeMatrixClient } from "./client-bootstrap-
|
|
2
|
+
import { O as resolveMatrixRoomId } from "./send-UWLIQ0bG.js";
|
|
3
|
+
import { n as withResolvedRuntimeMatrixClient } from "./client-bootstrap-DLN-K8Xb.js";
|
|
4
4
|
//#region extensions/matrix/src/matrix/actions/client.ts
|
|
5
5
|
var client_exports = /* @__PURE__ */ __exportAll({
|
|
6
6
|
withResolvedActionClient: () => withResolvedActionClient,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
|
|
2
|
-
import {
|
|
2
|
+
import { l as resolveScopedMatrixEnvConfig, o as resolveMatrixDefaultOrOnlyAccountId, r as requiresExplicitMatrixDefaultAccount, s as resolveGlobalMatrixEnvConfig, u as resolveMatrixAccountStringValues } from "./account-selection-Bbtc483D.js";
|
|
3
3
|
import { t as getMatrixScopedEnvVarNames } from "./env-vars-dGqak9dN.js";
|
|
4
4
|
import { o as resolveMatrixBaseConfig, r as listNormalizedMatrixAccountIds, t as findMatrixAccountConfig } from "./account-config-CRsKoMqJ.js";
|
|
5
5
|
import { t as resolveMatrixConfigFieldPath } from "./config-paths-CnREYb1Y.js";
|
|
6
6
|
import { t as resolveValidatedMatrixHomeserverUrl } from "./url-validation-GRHde6lq.js";
|
|
7
|
-
import {
|
|
7
|
+
import { i as repairCurrentTokenStorageMetaDeviceId, n as maybeMigrateLegacyStorage, o as resolveMatrixStoragePaths, s as writeStorageMeta } from "./storage-CV-pfV_2.js";
|
|
8
8
|
import { n as LogService } from "./logger-B_71hN6W.js";
|
|
9
9
|
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
10
10
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
@@ -20,13 +20,13 @@ import { sleepWithAbort } from "openclaw/plugin-sdk/runtime-env";
|
|
|
20
20
|
import { createDeferred } from "openclaw/plugin-sdk/extension-shared";
|
|
21
21
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
22
22
|
//#region extensions/matrix/src/matrix/client/config.ts
|
|
23
|
-
const loadMatrixAuthClientDeps = createLazyRuntimeModule(() => Promise.all([import("./sdk-
|
|
23
|
+
const loadMatrixAuthClientDeps = createLazyRuntimeModule(() => Promise.all([import("./sdk-B4By16Bt.js").then((n) => n.t), import("./logging-DRjvUOIh.js").then((n) => n.n)]).then(([sdkModule, loggingModule]) => ({
|
|
24
24
|
MatrixClient: sdkModule.MatrixClient,
|
|
25
25
|
ensureMatrixSdkLoggingConfigured: loggingModule.ensureMatrixSdkLoggingConfigured
|
|
26
26
|
})));
|
|
27
27
|
const MATRIX_AUTH_REQUEST_RETRY_RE = /\b(fetch failed|econnreset|econnrefused|enotfound|etimedout|ehostunreach|enetunreach|eai_again|und_err_|socket hang up|network|headers timeout|body timeout|connect timeout)\b/i;
|
|
28
|
-
const loadMatrixCredentialsReadDeps = createLazyRuntimeModule(() => import("./credentials-read-
|
|
29
|
-
const loadMatrixCredentialsWriteRuntime = createLazyRuntimeModule(() => import("./credentials-write.runtime-
|
|
28
|
+
const loadMatrixCredentialsReadDeps = createLazyRuntimeModule(() => import("./credentials-read-WWpqi88V.js").then((n) => n.r));
|
|
29
|
+
const loadMatrixCredentialsWriteRuntime = createLazyRuntimeModule(() => import("./credentials-write.runtime-D22lPwRO.js"));
|
|
30
30
|
const loadMatrixSecretInputDeps = createLazyRuntimeModule(() => import("./config-secret-input.runtime-CwsP3--c.js"));
|
|
31
31
|
function shouldRetryMatrixAuthRequest(err) {
|
|
32
32
|
return MATRIX_AUTH_REQUEST_RETRY_RE.test(formatErrorMessage(err));
|
|
@@ -416,7 +416,7 @@ async function backfillMatrixAuthDeviceIdAfterStartup(params) {
|
|
|
416
416
|
//#endregion
|
|
417
417
|
//#region extensions/matrix/src/matrix/client/create-client.ts
|
|
418
418
|
var create_client_exports = /* @__PURE__ */ __exportAll({ createMatrixClient: () => createMatrixClient });
|
|
419
|
-
const loadMatrixCreateClientRuntimeDeps = createLazyRuntimeModule(() => Promise.all([import("./sdk-
|
|
419
|
+
const loadMatrixCreateClientRuntimeDeps = createLazyRuntimeModule(() => Promise.all([import("./sdk-B4By16Bt.js").then((n) => n.t), import("./logging-DRjvUOIh.js").then((n) => n.n)]).then(([sdkModule, loggingModule]) => ({
|
|
420
420
|
MatrixClient: sdkModule.MatrixClient,
|
|
421
421
|
ensureMatrixSdkLoggingConfigured: loggingModule.ensureMatrixSdkLoggingConfigured
|
|
422
422
|
})));
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
|
|
2
|
-
import { t as isBunRuntime } from "./runtime-BefyhPWv.js";
|
|
3
2
|
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
4
3
|
import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime";
|
|
5
4
|
//#region extensions/matrix/src/matrix/client-bootstrap.ts
|
|
@@ -7,7 +6,7 @@ var client_bootstrap_exports = /* @__PURE__ */ __exportAll({
|
|
|
7
6
|
resolveRuntimeMatrixClientWithReadiness: () => resolveRuntimeMatrixClientWithReadiness,
|
|
8
7
|
withResolvedRuntimeMatrixClient: () => withResolvedRuntimeMatrixClient
|
|
9
8
|
});
|
|
10
|
-
const loadMatrixSharedClientRuntimeDeps = createLazyRuntimeModule(() => import("./client-
|
|
9
|
+
const loadMatrixSharedClientRuntimeDeps = createLazyRuntimeModule(() => import("./client-CPcRv6ab.js").then((n) => n.t).then((clientModule) => ({
|
|
11
10
|
acquireSharedMatrixClient: clientModule.acquireSharedMatrixClient,
|
|
12
11
|
resolveMatrixAuthContext: clientModule.resolveMatrixAuthContext
|
|
13
12
|
})));
|
|
@@ -19,11 +18,7 @@ async function ensureResolvedClientReadiness(params) {
|
|
|
19
18
|
}
|
|
20
19
|
if (params.readiness === "prepared" || !params.readiness && params.preparedByDefault) await params.client.prepareForOneOff();
|
|
21
20
|
}
|
|
22
|
-
function ensureMatrixNodeRuntime() {
|
|
23
|
-
if (isBunRuntime()) throw new Error("Matrix support requires Node (bun runtime not supported)");
|
|
24
|
-
}
|
|
25
21
|
async function resolveRuntimeMatrixClientWithReadiness(opts) {
|
|
26
|
-
ensureMatrixNodeRuntime();
|
|
27
22
|
if (opts.client) {
|
|
28
23
|
await ensureResolvedClientReadiness({
|
|
29
24
|
client: opts.client,
|
package/dist/contract-api.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { c as singleAccountKeysToMove, n as matrixSetupAdapter, o as namedAccountPromotionKeys, s as resolveSingleAccountPromotionTarget } from "./setup-core-
|
|
2
|
-
import { n as matrixOnboardingAdapter } from "./setup-surface-
|
|
1
|
+
import { c as singleAccountKeysToMove, n as matrixSetupAdapter, o as namedAccountPromotionKeys, s as resolveSingleAccountPromotionTarget } from "./setup-core-8keb-Yre.js";
|
|
2
|
+
import { n as matrixOnboardingAdapter } from "./setup-surface-bcluelBI.js";
|
|
3
3
|
export { matrixSetupAdapter, matrixOnboardingAdapter as matrixSetupWizard, namedAccountPromotionKeys, resolveSingleAccountPromotionTarget, singleAccountKeysToMove };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { i as normalizeMatrixStoredCredentials, n as isMatrixCredentialRevocation, r as matrixCredentialsStoreKey } from "./credentials-state-B3cuUFwZ.js";
|
|
2
|
-
import {
|
|
3
|
-
import { a as openMatrixCredentialsStore, i as loadMatrixCredentials, n as credentialsMatchConfig, t as clearMatrixCredentials } from "./credentials-read-
|
|
2
|
+
import { i as resolveMatrixCredentialsDir, o as resolveMatrixCredentialsPath } from "./storage-paths-DVCANXTc.js";
|
|
3
|
+
import { a as openMatrixCredentialsStore, i as loadMatrixCredentials, n as credentialsMatchConfig, t as clearMatrixCredentials } from "./credentials-read-WWpqi88V.js";
|
|
4
4
|
import { normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
|
5
5
|
//#region extensions/matrix/src/matrix/credentials.ts
|
|
6
6
|
async function saveMatrixCredentials(credentials, env = process.env, accountId) {
|