@openclaw/matrix 2026.8.1 → 2026.8.33
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 → .setup/account-selection-DZMazUgX.mjs} +12 -10
- package/dist/{accounts-fC57n-Jo.js → .setup/accounts-BJ6ECCac.mjs} +3 -3
- package/dist/{approval-handler.runtime-BBjFZw1t.js → .setup/approval-handler.runtime-CdT1wQve.mjs} +6 -6
- package/dist/{approval-ids-DTIdXV-m.js → .setup/approval-ids-CU_nMQy9.mjs} +1 -1
- package/dist/{approval-reaction-auth-BDONXxnF.js → .setup/approval-reaction-auth-CpxhvOOT.mjs} +2 -2
- package/dist/{approval-reactions-tXh9KYrW.js → .setup/approval-reactions-D5eegob9.mjs} +2 -2
- package/dist/{channel-BkEcVUs_.js → .setup/channel-Q_N83Wwa.mjs} +57 -59
- package/dist/{channel.runtime-CTLSBFsP.js → .setup/channel.runtime-BFXlZFP1.mjs} +17 -13
- package/dist/{channel.setup-CSacbORr.js → .setup/channel.setup-2A6HBRbA.mjs} +22 -20
- package/dist/{cli-DRVtgrq5.js → .setup/cli-CyuDGiIr.mjs} +43 -34
- package/dist/{cli-metadata-Ddx_y4Os.js → .setup/cli-metadata-B_y2Z5Np.mjs} +1 -1
- package/dist/{client-CZ_JvrO0.js → .setup/client-CpHMD-C2.mjs} +3 -3
- package/dist/{client-kSi51NKp.js → .setup/client-DvcYcTSy.mjs} +76 -23
- package/dist/{client-bootstrap-D8irSL2i.js → .setup/client-bootstrap-Cb1tHsT4.mjs} +3 -3
- package/dist/{client-support-DLj4vDeu.js → .setup/client-support-Bn9Bk0-H.mjs} +1 -1
- package/dist/{config-update-DC0fWBxc.js → .setup/config-update-B_4qZ5bV.mjs} +49 -31
- package/dist/{credentials-BdAaWuiR.js → .setup/credentials-B2roKThT.mjs} +6 -10
- package/dist/{credentials-read-B37cQknZ.js → .setup/credentials-read-DaemdXHy.mjs} +11 -9
- package/dist/{credentials-write.runtime-nAV2-5uR.js → .setup/credentials-write.runtime-D83HEGcL.mjs} +1 -1
- package/dist/{crypto-runtime-C4WDYxlP.js → .setup/crypto-runtime-Ch4WOG1y.mjs} +8 -8
- package/dist/{deps-CcVJfvRM.js → .setup/deps-mtxF2mHI.mjs} +1 -1
- package/dist/{device-health-B4-YXtJR.js → .setup/device-health-CWOuIirq.mjs} +1 -1
- package/dist/{direct-room-RinHjtqX.js → .setup/direct-room-CKyU8upP.mjs} +1 -1
- package/dist/{directory-live-DKr0w35b.js → .setup/directory-live-DggLE-28.mjs} +10 -8
- package/dist/{doctor-EWf9CDso.js → .setup/doctor-BLCvdOFo.mjs} +1 -1
- package/dist/{doctor-contract-DEt4O4Zt.js → .setup/doctor-contract-HyWFZQVG.mjs} +5 -4
- package/dist/{draft-stream-0CEpNrBk.js → .setup/draft-stream-DfUFwKfN.mjs} +1 -1
- package/dist/{encryption-guidance-D4ZdAqzM.js → .setup/encryption-guidance-CvN_NQUJ.mjs} +4 -3
- package/dist/{http-client-D8o8b9u6.js → .setup/http-client-Bv6a2OfI.mjs} +11 -8
- package/dist/{idb-persistence-DfgW720p.js → .setup/idb-persistence-BiscLSq4.mjs} +3 -3
- package/dist/{idb-persistence-lock-DAJ49nZX.js → .setup/idb-persistence-lock-B3fZXyF_.mjs} +1 -1
- package/dist/{inbound-dedupe-RvSLqdsz.js → .setup/inbound-dedupe-BOsuMiaj.mjs} +2 -2
- package/dist/{logger-B_71hN6W.js → .setup/logger-B3tfcB-m.mjs} +1 -1
- package/dist/{logging-DRjvUOIh.js → .setup/logging-CkohOZwO.mjs} +2 -2
- package/dist/{messages-DaGRt-tu.js → .setup/messages-C3v-jkaN.mjs} +4 -4
- package/dist/{monitor-CLPbPcR9.js → .setup/monitor-CQ6pGvZh.mjs} +56 -81
- package/dist/.setup/probe.runtime-ni46ImsO.mjs +2 -0
- package/dist/{profile-D-Wubo0A.js → .setup/profile-ClrB3IgR.mjs} +2 -2
- package/dist/{profile-update-zXVCMg7y.js → .setup/profile-update-B9Q6Ox2O.mjs} +6 -5
- package/dist/{reaction-events-CjVUiqcY.js → .setup/reaction-events-Dtd3W-rj.mjs} +10 -8
- package/dist/{resolve-targets-qG6gceps.js → .setup/resolve-targets-Bke5jHKS.mjs} +3 -3
- package/dist/{resolver.runtime-zX3TR3TN.js → .setup/resolver.runtime-BtrbC025.mjs} +1 -1
- package/dist/{room-info-yheP1mod.js → .setup/room-info-B0VNxsF8.mjs} +4 -4
- package/dist/.setup/runtime-setter-api-DGMubGUq.mjs +3 -0
- package/dist/{sdk-TZYyo0XQ.js → .setup/sdk-DoObvds0.mjs} +528 -30
- package/dist/{secret-contract-CufozuyJ.js → .setup/secret-contract-JlB6VmI3.mjs} +1 -1
- package/dist/.setup/secret-contract-api-B-iJoQEv.mjs +3 -0
- package/dist/{send-BL_iH5Ox.js → .setup/send-SmBzUhD-.mjs} +19 -15
- package/dist/{setup-bootstrap-D8M7FmcO.js → .setup/setup-bootstrap-CUKhebeX.mjs} +3 -3
- package/dist/{setup-core-r6L0nno-.js → .setup/setup-core-BnqoLunq.mjs} +9 -8
- package/dist/.setup/setup-plugin-api-Dg95tydH.mjs +3 -0
- package/dist/{setup-surface-g174ElFO.js → .setup/setup-surface-sWwADrZ8.mjs} +87 -81
- package/dist/{startup-verification-Cs08ca8u.js → .setup/startup-verification-E46yu4fh.mjs} +3 -3
- package/dist/{storage-BsGuHngK.js → .setup/storage-B-nf2ReN.mjs} +7 -6
- package/dist/{subagent-hooks-CMoZaARG.js → .setup/subagent-hooks-jFgft_Mr.mjs} +6 -2
- package/dist/.setup/sync-cache-state-6Hjn1K-v.mjs +234 -0
- package/dist/{thread-binding-api-CzkeLZCU.js → .setup/thread-binding-api-DRMC62cs.mjs} +1 -1
- package/dist/{thread-bindings-ERWNousC.js → .setup/thread-bindings-_WJ8RYWJ.mjs} +4 -4
- package/dist/{tool-actions.runtime-DcBCSwY4.js → .setup/tool-actions.runtime-DLICojA3.mjs} +230 -168
- package/dist/{verification-4vsW_WSn.js → .setup/verification-DOT16noD.mjs} +4 -3
- package/dist/api.js +8 -8
- package/dist/auth-presence.js +1 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/cli-metadata.js +1 -1
- package/dist/contract-api.js +2 -2
- package/dist/doctor-contract-api.js +9 -9
- package/dist/helper-api.js +3 -3
- package/dist/index.js +1 -1
- package/dist/plugin-entry.handlers.runtime.js +1 -1
- package/dist/runtime-api.js +6 -6
- package/dist/runtime-setter-api.js +1 -1
- package/dist/secret-contract-api.js +1 -1
- package/dist/session-binding-contract-api.js +2 -2
- package/dist/setup-entry.js +4 -3
- package/dist/setup-plugin-api.js +1 -1
- package/dist/subagent-hooks-api.js +1 -1
- package/dist/thread-binding-api.js +1 -1
- package/dist/thread-bindings-runtime.js +1 -1
- package/node_modules/markdown-it/dist/browser/markdown-it.esm.min.mjs +525 -484
- package/node_modules/markdown-it/dist/browser/markdown-it.esm.min.mjs.map +1 -1
- package/node_modules/markdown-it/dist/browser/markdown-it.umd.min.js +7 -7
- package/node_modules/markdown-it/dist/browser/markdown-it.umd.min.js.map +1 -1
- package/node_modules/markdown-it/dist/markdown-it.cjs.js +129 -121
- package/node_modules/markdown-it/dist/markdown-it.cjs.js.map +1 -1
- package/node_modules/markdown-it/dist/markdown-it.d.mts +42 -71
- package/node_modules/markdown-it/dist/markdown-it.mjs +129 -121
- package/node_modules/markdown-it/dist/markdown-it.mjs.map +1 -1
- package/node_modules/markdown-it/package.json +1 -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 +6 -6
- 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
- /package/dist/{account-config-CRsKoMqJ.js → .setup/account-config-CRsKoMqJ.mjs} +0 -0
- /package/dist/{backup-health-Dm_YMVFT.js → .setup/backup-health-Dm_YMVFT.mjs} +0 -0
- /package/dist/{config-paths-CnREYb1Y.js → .setup/config-paths-CnREYb1Y.mjs} +0 -0
- /package/dist/{config-secret-input.runtime-CwsP3--c.js → .setup/config-secret-input.runtime-CwsP3--c.mjs} +0 -0
- /package/dist/{credentials-state-B3cuUFwZ.js → .setup/credentials-state-B3cuUFwZ.mjs} +0 -0
- /package/dist/{crypto-node.runtime-6Aj_ltHQ.js → .setup/crypto-node.runtime-6Aj_ltHQ.mjs} +0 -0
- /package/dist/{env-vars-dGqak9dN.js → .setup/env-vars-dGqak9dN.mjs} +0 -0
- /package/dist/{errors-DKVS3_DO.js → .setup/errors-DKVS3_DO.mjs} +0 -0
- /package/dist/{event-helpers-XRfAbOIh.js → .setup/event-helpers-XRfAbOIh.mjs} +0 -0
- /package/dist/{reaction-common-DkrQdBSZ.js → .setup/reaction-common-DkrQdBSZ.mjs} +0 -0
- /package/dist/{rolldown-runtime-8H4AJuhK.js → .setup/rolldown-runtime-8H4AJuhK.mjs} +0 -0
- /package/dist/{runtime-6S3DNFNv.js → .setup/runtime-6S3DNFNv.mjs} +0 -0
- /package/dist/{runtime-BefyhPWv.js → .setup/runtime-BefyhPWv.mjs} +0 -0
- /package/dist/{storage-paths-gUmSydsW.js → .setup/storage-paths-gUmSydsW.mjs} +0 -0
- /package/dist/{target-ids-Nwx7cMVE.js → .setup/target-ids-Nwx7cMVE.mjs} +0 -0
- /package/dist/{thread-bindings-shared-oNPiyMWY.js → .setup/thread-bindings-shared-oNPiyMWY.mjs} +0 -0
- /package/dist/{url-validation-GRHde6lq.js → .setup/url-validation-GRHde6lq.mjs} +0 -0
|
@@ -1,23 +1,24 @@
|
|
|
1
|
-
import { a as resolveMatrixAccountConfig, o as resolveMatrixBaseConfig } from "./account-config-CRsKoMqJ.
|
|
2
|
-
import { i as resolveMatrixAccount } from "./accounts-
|
|
3
|
-
import { l as resolveMatrixRoomConfig } from "./channel-
|
|
4
|
-
import { i as normalizeMatrixResolvableTarget } from "./target-ids-Nwx7cMVE.
|
|
5
|
-
import { i as buildMatrixReactionRelationsPath, o as selectOwnMatrixReactionEventIds, s as summarizeMatrixReactionEvents } from "./reaction-common-DkrQdBSZ.
|
|
6
|
-
import { b as resolveMatrixRoomId, h as parsePollStart, l as buildPollResponseContent, m as isPollStartType, n as reactMatrixMessage } from "./send-
|
|
7
|
-
import { i as isStrictDirectMembership, n as hasDirectMatrixMemberFlag, o as readJoinedMatrixMembers } from "./direct-room-
|
|
8
|
-
import { a as fetchEventSummary, i as sendMatrixMessage, n as editMatrixMessage, o as readPinnedEvents, p as resolveMatrixActionLimit, r as readMatrixMessages, s as EventType, t as deleteMatrixMessage } from "./messages-
|
|
9
|
-
import { n as withResolvedActionClient, r as withResolvedRoomAction } from "./client-
|
|
10
|
-
import { r as parseMxc } from "./event-helpers-XRfAbOIh.
|
|
11
|
-
import { t as applyMatrixProfileUpdate } from "./profile-update-
|
|
12
|
-
import { _ as scanMatrixVerificationQr, a as confirmMatrixVerificationSas, b as verifyMatrixRecoveryKey, c as getMatrixRoomKeyBackupStatus, d as listMatrixVerifications, f as mismatchMatrixVerificationSas, h as restoreMatrixRoomKeyBackup, i as confirmMatrixVerificationReciprocateQr, l as getMatrixVerificationSas, n as bootstrapMatrixVerification, o as generateMatrixVerificationQr, p as requestMatrixVerification, r as cancelMatrixVerification, s as getMatrixEncryptionStatus, t as acceptMatrixVerification, u as getMatrixVerificationStatus, v as startMatrixVerification } from "./verification-
|
|
13
|
-
import { n as getMatrixMemberInfo, r as getMatrixRoomInfo, t as createMatrixRoomInfoResolver } from "./room-info-
|
|
1
|
+
import { a as resolveMatrixAccountConfig, o as resolveMatrixBaseConfig } from "./account-config-CRsKoMqJ.mjs";
|
|
2
|
+
import { i as resolveMatrixAccount } from "./accounts-BJ6ECCac.mjs";
|
|
3
|
+
import { l as resolveMatrixRoomConfig } from "./channel-Q_N83Wwa.mjs";
|
|
4
|
+
import { i as normalizeMatrixResolvableTarget } from "./target-ids-Nwx7cMVE.mjs";
|
|
5
|
+
import { i as buildMatrixReactionRelationsPath, o as selectOwnMatrixReactionEventIds, s as summarizeMatrixReactionEvents } from "./reaction-common-DkrQdBSZ.mjs";
|
|
6
|
+
import { b as resolveMatrixRoomId, h as parsePollStart, l as buildPollResponseContent, m as isPollStartType, n as reactMatrixMessage } from "./send-SmBzUhD-.mjs";
|
|
7
|
+
import { i as isStrictDirectMembership, n as hasDirectMatrixMemberFlag, o as readJoinedMatrixMembers } from "./direct-room-CKyU8upP.mjs";
|
|
8
|
+
import { a as fetchEventSummary, i as sendMatrixMessage, n as editMatrixMessage, o as readPinnedEvents, p as resolveMatrixActionLimit, r as readMatrixMessages, s as EventType, t as deleteMatrixMessage } from "./messages-C3v-jkaN.mjs";
|
|
9
|
+
import { n as withResolvedActionClient, r as withResolvedRoomAction } from "./client-CpHMD-C2.mjs";
|
|
10
|
+
import { r as parseMxc } from "./event-helpers-XRfAbOIh.mjs";
|
|
11
|
+
import { t as applyMatrixProfileUpdate } from "./profile-update-B9Q6Ox2O.mjs";
|
|
12
|
+
import { _ as scanMatrixVerificationQr, a as confirmMatrixVerificationSas, b as verifyMatrixRecoveryKey, c as getMatrixRoomKeyBackupStatus, d as listMatrixVerifications, f as mismatchMatrixVerificationSas, h as restoreMatrixRoomKeyBackup, i as confirmMatrixVerificationReciprocateQr, l as getMatrixVerificationSas, n as bootstrapMatrixVerification, o as generateMatrixVerificationQr, p as requestMatrixVerification, r as cancelMatrixVerification, s as getMatrixEncryptionStatus, t as acceptMatrixVerification, u as getMatrixVerificationStatus, v as startMatrixVerification } from "./verification-DOT16noD.mjs";
|
|
13
|
+
import { n as getMatrixMemberInfo, r as getMatrixRoomInfo, t as createMatrixRoomInfoResolver } from "./room-info-B0VNxsF8.mjs";
|
|
14
14
|
import { isRecord, normalizeOptionalLowercaseString, uniqueStrings, uniqueValues } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
15
15
|
import { ToolAuthorizationError, createActionGate, jsonResult, readPositiveIntegerParam, readReactionParams, readStringArrayParam, readStringParam } from "openclaw/plugin-sdk/channel-actions";
|
|
16
16
|
import { normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
|
17
17
|
import { resolveAllowlistProviderRuntimeGroupPolicy, resolveDefaultGroupPolicy } from "openclaw/plugin-sdk/runtime-group-policy";
|
|
18
18
|
//#region extensions/matrix/src/matrix/actions/polls.ts
|
|
19
19
|
function normalizeOptionIndexes(indexes) {
|
|
20
|
-
|
|
20
|
+
const normalized = indexes.map((index) => Math.trunc(index)).filter((index) => Number.isFinite(index) && index > 0);
|
|
21
|
+
return uniqueValues(normalized);
|
|
21
22
|
}
|
|
22
23
|
function normalizeOptionIds(optionIds) {
|
|
23
24
|
return uniqueStrings(optionIds.map((optionId) => optionId.trim()).filter((optionId) => optionId.length > 0));
|
|
@@ -48,7 +49,8 @@ function resolveSelectedAnswerIds(params) {
|
|
|
48
49
|
async function voteMatrixPoll(roomId, pollId, opts = {}) {
|
|
49
50
|
return await withResolvedRoomAction(roomId, opts, async (client, resolvedRoom) => {
|
|
50
51
|
const pollEvent = await client.getEvent(resolvedRoom, pollId);
|
|
51
|
-
|
|
52
|
+
const eventType = typeof pollEvent.type === "string" ? pollEvent.type : "";
|
|
53
|
+
if (!isPollStartType(eventType)) throw new Error(`Event ${pollId} is not a Matrix poll start event.`);
|
|
52
54
|
const { answerIds, labels, maxSelections } = resolveSelectedAnswerIds({
|
|
53
55
|
optionIds: [...opts.optionIds ?? [], ...opts.optionId ? [opts.optionId] : []],
|
|
54
56
|
optionIndexes: [...opts.optionIndexes ?? [], ...opts.optionIndex !== void 0 ? [opts.optionIndex] : []],
|
|
@@ -113,7 +115,8 @@ async function listMatrixReactionEvents(client, roomId, messageId, limit, opts =
|
|
|
113
115
|
}
|
|
114
116
|
async function listMatrixReactions(roomId, messageId, opts = {}) {
|
|
115
117
|
return await withResolvedRoomAction(roomId, opts, async (client, resolvedRoom) => {
|
|
116
|
-
|
|
118
|
+
const chunk = await listMatrixReactionEvents(client, resolvedRoom, messageId, resolveMatrixActionLimit(opts.limit, 100));
|
|
119
|
+
return summarizeMatrixReactionEvents(chunk);
|
|
117
120
|
});
|
|
118
121
|
}
|
|
119
122
|
async function removeMatrixReactions(roomId, messageId, opts = {}) {
|
|
@@ -177,8 +180,9 @@ function hasWildcardEntry(entries) {
|
|
|
177
180
|
return (entries ?? []).some((entry) => String(entry).replace(/^matrix:/i, "").trim() === "*");
|
|
178
181
|
}
|
|
179
182
|
function resolveMatrixReadRoomPolicy(params) {
|
|
183
|
+
const configuredRooms = params.account.config.groups ?? params.account.config.rooms;
|
|
180
184
|
const room = resolveMatrixRoomConfig({
|
|
181
|
-
rooms:
|
|
185
|
+
rooms: configuredRooms,
|
|
182
186
|
roomId: params.roomId,
|
|
183
187
|
aliases: params.aliases
|
|
184
188
|
});
|
|
@@ -387,28 +391,32 @@ async function handleMatrixAction(params, cfg, opts = {}) {
|
|
|
387
391
|
const roomId = readRoomId(params);
|
|
388
392
|
if (action === "emoji-list") {
|
|
389
393
|
const limit = readPositiveIntegerParam(params, "limit", { message: "limit must be a positive integer." });
|
|
394
|
+
const emojis = await withReadTarget(roomId, async (target) => listMatrixEmojis(target.roomId, {
|
|
395
|
+
...clientOpts,
|
|
396
|
+
client: target.client,
|
|
397
|
+
limit
|
|
398
|
+
}));
|
|
390
399
|
return jsonResult({
|
|
391
400
|
ok: true,
|
|
392
|
-
emojis
|
|
393
|
-
...clientOpts,
|
|
394
|
-
client: target.client,
|
|
395
|
-
limit
|
|
396
|
-
}))
|
|
401
|
+
emojis
|
|
397
402
|
});
|
|
398
403
|
}
|
|
399
404
|
const messageId = readStringParam(params, "messageId", { required: true });
|
|
400
405
|
if (action === "react") {
|
|
401
406
|
const { emoji, remove, isEmpty } = readReactionParams(params, { removeErrorMessage: "Emoji is required to remove a Matrix reaction." });
|
|
402
|
-
if (remove || isEmpty)
|
|
403
|
-
|
|
404
|
-
removed: (await withReadTarget(roomId, async (target) => {
|
|
407
|
+
if (remove || isEmpty) {
|
|
408
|
+
const result = await withReadTarget(roomId, async (target) => {
|
|
405
409
|
return await removeMatrixReactions(target.roomId, messageId, {
|
|
406
410
|
...clientOpts,
|
|
407
411
|
client: target.client,
|
|
408
412
|
emoji: remove ? emoji : void 0
|
|
409
413
|
});
|
|
410
|
-
})
|
|
411
|
-
|
|
414
|
+
});
|
|
415
|
+
return jsonResult({
|
|
416
|
+
ok: true,
|
|
417
|
+
removed: result.removed
|
|
418
|
+
});
|
|
419
|
+
}
|
|
412
420
|
await withReadTarget(roomId, async (target) => {
|
|
413
421
|
await reactMatrixMessage(target.roomId, messageId, emoji, {
|
|
414
422
|
...clientOpts,
|
|
@@ -421,15 +429,16 @@ async function handleMatrixAction(params, cfg, opts = {}) {
|
|
|
421
429
|
});
|
|
422
430
|
}
|
|
423
431
|
const limit = readPositiveIntegerParam(params, "limit", { message: "limit must be a positive integer." });
|
|
432
|
+
const reactions = await withReadTarget(roomId, async (target) => {
|
|
433
|
+
return await listMatrixReactions(target.roomId, messageId, {
|
|
434
|
+
...clientOpts,
|
|
435
|
+
client: target.client,
|
|
436
|
+
limit: limit ?? void 0
|
|
437
|
+
});
|
|
438
|
+
});
|
|
424
439
|
return jsonResult({
|
|
425
440
|
ok: true,
|
|
426
|
-
reactions
|
|
427
|
-
return await listMatrixReactions(target.roomId, messageId, {
|
|
428
|
-
...clientOpts,
|
|
429
|
-
client: target.client,
|
|
430
|
-
limit: limit ?? void 0
|
|
431
|
-
});
|
|
432
|
-
})
|
|
441
|
+
reactions
|
|
433
442
|
});
|
|
434
443
|
}
|
|
435
444
|
if (pollActions.has(action)) {
|
|
@@ -440,16 +449,17 @@ async function handleMatrixAction(params, cfg, opts = {}) {
|
|
|
440
449
|
const optionIndex = readPositiveIntegerParam(params, "pollOptionIndex", { message: "pollOptionIndex must be a positive integer." });
|
|
441
450
|
const optionIds = [...readStringArrayParam(params, "pollOptionIds") ?? [], ...optionId ? [optionId] : []];
|
|
442
451
|
const optionIndexes = [...readPositiveIntegerArrayParam(params, "pollOptionIndexes"), ...optionIndex !== void 0 ? [optionIndex] : []];
|
|
452
|
+
const result = await withReadTarget(roomId, async (target) => {
|
|
453
|
+
return await voteMatrixPoll(target.roomId, pollId, {
|
|
454
|
+
...clientOpts,
|
|
455
|
+
client: target.client,
|
|
456
|
+
optionIds,
|
|
457
|
+
optionIndexes
|
|
458
|
+
});
|
|
459
|
+
});
|
|
443
460
|
return jsonResult({
|
|
444
461
|
ok: true,
|
|
445
|
-
result
|
|
446
|
-
return await voteMatrixPoll(target.roomId, pollId, {
|
|
447
|
-
...clientOpts,
|
|
448
|
-
client: target.client,
|
|
449
|
-
optionIds,
|
|
450
|
-
optionIndexes
|
|
451
|
-
});
|
|
452
|
-
})
|
|
462
|
+
result
|
|
453
463
|
});
|
|
454
464
|
}
|
|
455
465
|
if (messageActions.has(action)) {
|
|
@@ -466,17 +476,18 @@ async function handleMatrixAction(params, cfg, opts = {}) {
|
|
|
466
476
|
const replyToId = readStringParam(params, "replyToId") ?? readStringParam(params, "replyTo");
|
|
467
477
|
const threadId = readStringParam(params, "threadId");
|
|
468
478
|
const audioAsVoice = typeof readRawParam(params, "audioAsVoice") === "boolean" ? readRawParam(params, "audioAsVoice") : typeof readRawParam(params, "asVoice") === "boolean" ? readRawParam(params, "asVoice") : void 0;
|
|
479
|
+
const result = await sendMatrixMessage(to, content, {
|
|
480
|
+
mediaUrl: mediaUrl ?? void 0,
|
|
481
|
+
...opts.mediaAccess ? { mediaAccess: opts.mediaAccess } : {},
|
|
482
|
+
mediaLocalRoots: opts.mediaLocalRoots,
|
|
483
|
+
replyToId: replyToId ?? void 0,
|
|
484
|
+
threadId: threadId ?? void 0,
|
|
485
|
+
audioAsVoice,
|
|
486
|
+
...clientOpts
|
|
487
|
+
});
|
|
469
488
|
return jsonResult({
|
|
470
489
|
ok: true,
|
|
471
|
-
result
|
|
472
|
-
mediaUrl: mediaUrl ?? void 0,
|
|
473
|
-
...opts.mediaAccess ? { mediaAccess: opts.mediaAccess } : {},
|
|
474
|
-
mediaLocalRoots: opts.mediaLocalRoots,
|
|
475
|
-
replyToId: replyToId ?? void 0,
|
|
476
|
-
threadId: threadId ?? void 0,
|
|
477
|
-
audioAsVoice,
|
|
478
|
-
...clientOpts
|
|
479
|
-
})
|
|
490
|
+
result
|
|
480
491
|
});
|
|
481
492
|
}
|
|
482
493
|
case "editMessage": {
|
|
@@ -486,14 +497,15 @@ async function handleMatrixAction(params, cfg, opts = {}) {
|
|
|
486
497
|
required: true,
|
|
487
498
|
trim: false
|
|
488
499
|
});
|
|
500
|
+
const result = await withReadTarget(roomId, async (target) => {
|
|
501
|
+
return await editMatrixMessage(target.roomId, messageId, content, {
|
|
502
|
+
...clientOpts,
|
|
503
|
+
client: target.client
|
|
504
|
+
});
|
|
505
|
+
});
|
|
489
506
|
return jsonResult({
|
|
490
507
|
ok: true,
|
|
491
|
-
result
|
|
492
|
-
return await editMatrixMessage(target.roomId, messageId, content, {
|
|
493
|
-
...clientOpts,
|
|
494
|
-
client: target.client
|
|
495
|
-
});
|
|
496
|
-
})
|
|
508
|
+
result
|
|
497
509
|
});
|
|
498
510
|
}
|
|
499
511
|
case "deleteMessage": {
|
|
@@ -518,27 +530,27 @@ async function handleMatrixAction(params, cfg, opts = {}) {
|
|
|
518
530
|
const before = readStringParam(params, "before");
|
|
519
531
|
const after = readStringParam(params, "after");
|
|
520
532
|
const threadId = readStringParam(params, "threadId");
|
|
533
|
+
const result = await withReadTarget(roomId, async (target) => {
|
|
534
|
+
const messages = await readMatrixMessages(target.roomId, {
|
|
535
|
+
limit: limit ?? void 0,
|
|
536
|
+
before: before ?? void 0,
|
|
537
|
+
after: after ?? void 0,
|
|
538
|
+
threadId: threadId ?? void 0,
|
|
539
|
+
...clientOpts,
|
|
540
|
+
client: target.client
|
|
541
|
+
});
|
|
542
|
+
return {
|
|
543
|
+
...messages,
|
|
544
|
+
messages: projectMatrixMessagesForDisplay(messages.messages),
|
|
545
|
+
roomId: target.roomId,
|
|
546
|
+
...threadId ? { threadId } : {}
|
|
547
|
+
};
|
|
548
|
+
});
|
|
521
549
|
return jsonResult({
|
|
522
550
|
ok: true,
|
|
523
|
-
...
|
|
524
|
-
const messages = await readMatrixMessages(target.roomId, {
|
|
525
|
-
limit: limit ?? void 0,
|
|
526
|
-
before: before ?? void 0,
|
|
527
|
-
after: after ?? void 0,
|
|
528
|
-
threadId: threadId ?? void 0,
|
|
529
|
-
...clientOpts,
|
|
530
|
-
client: target.client
|
|
531
|
-
});
|
|
532
|
-
return {
|
|
533
|
-
...messages,
|
|
534
|
-
messages: projectMatrixMessagesForDisplay(messages.messages),
|
|
535
|
-
roomId: target.roomId,
|
|
536
|
-
...threadId ? { threadId } : {}
|
|
537
|
-
};
|
|
538
|
-
})
|
|
551
|
+
...result
|
|
539
552
|
});
|
|
540
553
|
}
|
|
541
|
-
default: break;
|
|
542
554
|
}
|
|
543
555
|
}
|
|
544
556
|
if (pinActions.has(action)) {
|
|
@@ -556,14 +568,20 @@ async function handleMatrixAction(params, cfg, opts = {}) {
|
|
|
556
568
|
...clientOpts,
|
|
557
569
|
client: target.client
|
|
558
570
|
};
|
|
559
|
-
if (request.kind === "pin")
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
571
|
+
if (request.kind === "pin") {
|
|
572
|
+
const result = await pinMatrixMessage(target.roomId, request.messageId, actionOpts);
|
|
573
|
+
return jsonResult({
|
|
574
|
+
ok: true,
|
|
575
|
+
pinned: result.pinned
|
|
576
|
+
});
|
|
577
|
+
}
|
|
578
|
+
if (request.kind === "unpin") {
|
|
579
|
+
const result = await unpinMatrixMessage(target.roomId, request.messageId, actionOpts);
|
|
580
|
+
return jsonResult({
|
|
581
|
+
ok: true,
|
|
582
|
+
pinned: result.pinned
|
|
583
|
+
});
|
|
584
|
+
}
|
|
567
585
|
const result = await listMatrixPins(target.roomId, actionOpts);
|
|
568
586
|
return jsonResult({
|
|
569
587
|
ok: true,
|
|
@@ -576,64 +594,76 @@ async function handleMatrixAction(params, cfg, opts = {}) {
|
|
|
576
594
|
if (profileActions.has(action)) {
|
|
577
595
|
if (!isActionEnabled("profile")) throw new Error("Matrix profile updates are disabled.");
|
|
578
596
|
const avatarPath = readStringParam(params, "avatarPath") ?? readStringParam(params, "path") ?? readStringParam(params, "filePath");
|
|
597
|
+
const result = await applyMatrixProfileUpdate({
|
|
598
|
+
cfg,
|
|
599
|
+
account: accountId,
|
|
600
|
+
displayName: readStringParam(params, "displayName") ?? readStringParam(params, "name"),
|
|
601
|
+
avatarUrl: readStringParam(params, "avatarUrl"),
|
|
602
|
+
avatarPath,
|
|
603
|
+
mediaLocalRoots: opts.mediaLocalRoots
|
|
604
|
+
});
|
|
579
605
|
return jsonResult({
|
|
580
606
|
ok: true,
|
|
581
|
-
...
|
|
582
|
-
cfg,
|
|
583
|
-
account: accountId,
|
|
584
|
-
displayName: readStringParam(params, "displayName") ?? readStringParam(params, "name"),
|
|
585
|
-
avatarUrl: readStringParam(params, "avatarUrl"),
|
|
586
|
-
avatarPath,
|
|
587
|
-
mediaLocalRoots: opts.mediaLocalRoots
|
|
588
|
-
})
|
|
607
|
+
...result
|
|
589
608
|
});
|
|
590
609
|
}
|
|
591
610
|
if (action === "memberInfo") {
|
|
592
611
|
if (!isActionEnabled("memberInfo")) throw new Error("Matrix member info is disabled.");
|
|
593
612
|
const userId = readStringParam(params, "userId", { required: true });
|
|
613
|
+
const result = await withReadTarget(readRoomId(params), async (target) => {
|
|
614
|
+
return await getMatrixMemberInfo(userId, {
|
|
615
|
+
roomId: target.roomId,
|
|
616
|
+
...clientOpts,
|
|
617
|
+
client: target.client
|
|
618
|
+
});
|
|
619
|
+
});
|
|
594
620
|
return jsonResult({
|
|
595
621
|
ok: true,
|
|
596
|
-
member:
|
|
597
|
-
return await getMatrixMemberInfo(userId, {
|
|
598
|
-
roomId: target.roomId,
|
|
599
|
-
...clientOpts,
|
|
600
|
-
client: target.client
|
|
601
|
-
});
|
|
602
|
-
})
|
|
622
|
+
member: result
|
|
603
623
|
});
|
|
604
624
|
}
|
|
605
625
|
if (action === "channelInfo") {
|
|
606
626
|
if (!isActionEnabled("channelInfo")) throw new Error("Matrix room info is disabled.");
|
|
627
|
+
const result = await withReadTarget(readRoomId(params), async (target) => {
|
|
628
|
+
return await getMatrixRoomInfo(target.roomId, {
|
|
629
|
+
...clientOpts,
|
|
630
|
+
client: target.client
|
|
631
|
+
});
|
|
632
|
+
});
|
|
607
633
|
return jsonResult({
|
|
608
634
|
ok: true,
|
|
609
|
-
room:
|
|
610
|
-
return await getMatrixRoomInfo(target.roomId, {
|
|
611
|
-
...clientOpts,
|
|
612
|
-
client: target.client
|
|
613
|
-
});
|
|
614
|
-
})
|
|
635
|
+
room: result
|
|
615
636
|
});
|
|
616
637
|
}
|
|
617
638
|
if (verificationActions.has(action)) {
|
|
618
639
|
if (!isActionEnabled("verification")) throw new Error("Matrix verification actions are disabled.");
|
|
619
640
|
const requestId = readStringParam(params, "requestId") ?? readStringParam(params, "verificationId") ?? readStringParam(params, "id");
|
|
620
|
-
if (action === "encryptionStatus")
|
|
621
|
-
|
|
622
|
-
status
|
|
623
|
-
includeRecoveryKey
|
|
641
|
+
if (action === "encryptionStatus") {
|
|
642
|
+
const includeRecoveryKey = params.includeRecoveryKey === true;
|
|
643
|
+
const status = await getMatrixEncryptionStatus({
|
|
644
|
+
includeRecoveryKey,
|
|
624
645
|
...clientOpts
|
|
625
|
-
})
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
646
|
+
});
|
|
647
|
+
return jsonResult({
|
|
648
|
+
ok: true,
|
|
649
|
+
status
|
|
650
|
+
});
|
|
651
|
+
}
|
|
652
|
+
if (action === "verificationStatus") {
|
|
653
|
+
const includeRecoveryKey = params.includeRecoveryKey === true;
|
|
654
|
+
const status = await getMatrixVerificationStatus({
|
|
655
|
+
includeRecoveryKey,
|
|
631
656
|
...clientOpts
|
|
632
|
-
})
|
|
633
|
-
|
|
657
|
+
});
|
|
658
|
+
return jsonResult({
|
|
659
|
+
ok: true,
|
|
660
|
+
status
|
|
661
|
+
});
|
|
662
|
+
}
|
|
634
663
|
if (action === "verificationBootstrap") {
|
|
664
|
+
const recoveryKey = readStringParam(params, "recoveryKey", { trim: false }) ?? readStringParam(params, "key", { trim: false });
|
|
635
665
|
const result = await bootstrapMatrixVerification({
|
|
636
|
-
recoveryKey:
|
|
666
|
+
recoveryKey: recoveryKey ?? void 0,
|
|
637
667
|
forceResetCrossSigning: params.forceResetCrossSigning === true,
|
|
638
668
|
...clientOpts
|
|
639
669
|
});
|
|
@@ -643,7 +673,8 @@ async function handleMatrixAction(params, cfg, opts = {}) {
|
|
|
643
673
|
});
|
|
644
674
|
}
|
|
645
675
|
if (action === "verificationRecoveryKey") {
|
|
646
|
-
const
|
|
676
|
+
const recoveryKey = readStringParam(params, "recoveryKey", { trim: false }) ?? readStringParam(params, "key", { trim: false });
|
|
677
|
+
const result = await verifyMatrixRecoveryKey(readStringParam({ recoveryKey }, "recoveryKey", {
|
|
647
678
|
required: true,
|
|
648
679
|
trim: false
|
|
649
680
|
}), clientOpts);
|
|
@@ -652,13 +683,17 @@ async function handleMatrixAction(params, cfg, opts = {}) {
|
|
|
652
683
|
result
|
|
653
684
|
});
|
|
654
685
|
}
|
|
655
|
-
if (action === "verificationBackupStatus")
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
686
|
+
if (action === "verificationBackupStatus") {
|
|
687
|
+
const status = await getMatrixRoomKeyBackupStatus(clientOpts);
|
|
688
|
+
return jsonResult({
|
|
689
|
+
ok: true,
|
|
690
|
+
status
|
|
691
|
+
});
|
|
692
|
+
}
|
|
659
693
|
if (action === "verificationBackupRestore") {
|
|
694
|
+
const recoveryKey = readStringParam(params, "recoveryKey", { trim: false }) ?? readStringParam(params, "key", { trim: false });
|
|
660
695
|
const result = await restoreMatrixRoomKeyBackup({
|
|
661
|
-
recoveryKey:
|
|
696
|
+
recoveryKey: recoveryKey ?? void 0,
|
|
662
697
|
...clientOpts
|
|
663
698
|
});
|
|
664
699
|
return jsonResult({
|
|
@@ -666,79 +701,106 @@ async function handleMatrixAction(params, cfg, opts = {}) {
|
|
|
666
701
|
result
|
|
667
702
|
});
|
|
668
703
|
}
|
|
669
|
-
if (action === "verificationList")
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
704
|
+
if (action === "verificationList") {
|
|
705
|
+
const verifications = await listMatrixVerifications(clientOpts);
|
|
706
|
+
return jsonResult({
|
|
707
|
+
ok: true,
|
|
708
|
+
verifications
|
|
709
|
+
});
|
|
710
|
+
}
|
|
673
711
|
if (action === "verificationRequest") {
|
|
674
712
|
const userId = readStringParam(params, "userId");
|
|
675
713
|
const deviceId = readStringParam(params, "deviceId");
|
|
676
714
|
const roomId = readStringParam(params, "roomId") ?? readStringParam(params, "channelId");
|
|
715
|
+
const ownUser = typeof params.ownUser === "boolean" ? params.ownUser : void 0;
|
|
716
|
+
const verification = await requestMatrixVerification({
|
|
717
|
+
ownUser,
|
|
718
|
+
userId: userId ?? void 0,
|
|
719
|
+
deviceId: deviceId ?? void 0,
|
|
720
|
+
roomId: roomId ?? void 0,
|
|
721
|
+
...clientOpts
|
|
722
|
+
});
|
|
677
723
|
return jsonResult({
|
|
678
724
|
ok: true,
|
|
679
|
-
verification
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
725
|
+
verification
|
|
726
|
+
});
|
|
727
|
+
}
|
|
728
|
+
if (action === "verificationAccept") {
|
|
729
|
+
const verification = await acceptMatrixVerification(readStringParam({ requestId }, "requestId", { required: true }), clientOpts);
|
|
730
|
+
return jsonResult({
|
|
731
|
+
ok: true,
|
|
732
|
+
verification
|
|
686
733
|
});
|
|
687
734
|
}
|
|
688
|
-
if (action === "verificationAccept") return jsonResult({
|
|
689
|
-
ok: true,
|
|
690
|
-
verification: await acceptMatrixVerification(readStringParam({ requestId }, "requestId", { required: true }), clientOpts)
|
|
691
|
-
});
|
|
692
735
|
if (action === "verificationCancel") {
|
|
693
736
|
const reason = readStringParam(params, "reason");
|
|
694
737
|
const code = readStringParam(params, "code");
|
|
738
|
+
const verification = await cancelMatrixVerification(readStringParam({ requestId }, "requestId", { required: true }), {
|
|
739
|
+
reason: reason ?? void 0,
|
|
740
|
+
code: code ?? void 0,
|
|
741
|
+
...clientOpts
|
|
742
|
+
});
|
|
695
743
|
return jsonResult({
|
|
696
744
|
ok: true,
|
|
697
|
-
verification
|
|
698
|
-
reason: reason ?? void 0,
|
|
699
|
-
code: code ?? void 0,
|
|
700
|
-
...clientOpts
|
|
701
|
-
})
|
|
745
|
+
verification
|
|
702
746
|
});
|
|
703
747
|
}
|
|
704
748
|
if (action === "verificationStart") {
|
|
705
|
-
const
|
|
749
|
+
const methodRaw = readStringParam(params, "method");
|
|
750
|
+
const method = normalizeOptionalLowercaseString(methodRaw);
|
|
706
751
|
if (method && method !== "sas") throw new Error("Matrix verificationStart only supports method=sas; use verificationGenerateQr/verificationScanQr for QR flows.");
|
|
752
|
+
const verification = await startMatrixVerification(readStringParam({ requestId }, "requestId", { required: true }), {
|
|
753
|
+
method: "sas",
|
|
754
|
+
...clientOpts
|
|
755
|
+
});
|
|
707
756
|
return jsonResult({
|
|
708
757
|
ok: true,
|
|
709
|
-
verification
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
758
|
+
verification
|
|
759
|
+
});
|
|
760
|
+
}
|
|
761
|
+
if (action === "verificationGenerateQr") {
|
|
762
|
+
const qr = await generateMatrixVerificationQr(readStringParam({ requestId }, "requestId", { required: true }), clientOpts);
|
|
763
|
+
return jsonResult({
|
|
764
|
+
ok: true,
|
|
765
|
+
...qr
|
|
713
766
|
});
|
|
714
767
|
}
|
|
715
|
-
if (action === "verificationGenerateQr") return jsonResult({
|
|
716
|
-
ok: true,
|
|
717
|
-
...await generateMatrixVerificationQr(readStringParam({ requestId }, "requestId", { required: true }), clientOpts)
|
|
718
|
-
});
|
|
719
768
|
if (action === "verificationScanQr") {
|
|
720
769
|
const qrDataBase64 = readStringParam(params, "qrDataBase64") ?? readStringParam(params, "qrData") ?? readStringParam(params, "qr");
|
|
770
|
+
const verification = await scanMatrixVerificationQr(readStringParam({ requestId }, "requestId", { required: true }), readStringParam({ qrDataBase64 }, "qrDataBase64", { required: true }), clientOpts);
|
|
721
771
|
return jsonResult({
|
|
722
772
|
ok: true,
|
|
723
|
-
verification
|
|
773
|
+
verification
|
|
774
|
+
});
|
|
775
|
+
}
|
|
776
|
+
if (action === "verificationSas") {
|
|
777
|
+
const sas = await getMatrixVerificationSas(readStringParam({ requestId }, "requestId", { required: true }), clientOpts);
|
|
778
|
+
return jsonResult({
|
|
779
|
+
ok: true,
|
|
780
|
+
sas
|
|
781
|
+
});
|
|
782
|
+
}
|
|
783
|
+
if (action === "verificationConfirm") {
|
|
784
|
+
const verification = await confirmMatrixVerificationSas(readStringParam({ requestId }, "requestId", { required: true }), clientOpts);
|
|
785
|
+
return jsonResult({
|
|
786
|
+
ok: true,
|
|
787
|
+
verification
|
|
788
|
+
});
|
|
789
|
+
}
|
|
790
|
+
if (action === "verificationMismatch") {
|
|
791
|
+
const verification = await mismatchMatrixVerificationSas(readStringParam({ requestId }, "requestId", { required: true }), clientOpts);
|
|
792
|
+
return jsonResult({
|
|
793
|
+
ok: true,
|
|
794
|
+
verification
|
|
795
|
+
});
|
|
796
|
+
}
|
|
797
|
+
if (action === "verificationConfirmQr") {
|
|
798
|
+
const verification = await confirmMatrixVerificationReciprocateQr(readStringParam({ requestId }, "requestId", { required: true }), clientOpts);
|
|
799
|
+
return jsonResult({
|
|
800
|
+
ok: true,
|
|
801
|
+
verification
|
|
724
802
|
});
|
|
725
803
|
}
|
|
726
|
-
if (action === "verificationSas") return jsonResult({
|
|
727
|
-
ok: true,
|
|
728
|
-
sas: await getMatrixVerificationSas(readStringParam({ requestId }, "requestId", { required: true }), clientOpts)
|
|
729
|
-
});
|
|
730
|
-
if (action === "verificationConfirm") return jsonResult({
|
|
731
|
-
ok: true,
|
|
732
|
-
verification: await confirmMatrixVerificationSas(readStringParam({ requestId }, "requestId", { required: true }), clientOpts)
|
|
733
|
-
});
|
|
734
|
-
if (action === "verificationMismatch") return jsonResult({
|
|
735
|
-
ok: true,
|
|
736
|
-
verification: await mismatchMatrixVerificationSas(readStringParam({ requestId }, "requestId", { required: true }), clientOpts)
|
|
737
|
-
});
|
|
738
|
-
if (action === "verificationConfirmQr") return jsonResult({
|
|
739
|
-
ok: true,
|
|
740
|
-
verification: await confirmMatrixVerificationReciprocateQr(readStringParam({ requestId }, "requestId", { required: true }), clientOpts)
|
|
741
|
-
});
|
|
742
804
|
}
|
|
743
805
|
throw new Error(`Unsupported Matrix action: ${action}`);
|
|
744
806
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.
|
|
2
|
-
import { i as withStartedActionClient, n as withResolvedActionClient } from "./client-
|
|
3
|
-
import { n as formatMatrixEncryptionUnavailableError } from "./encryption-guidance-
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.mjs";
|
|
2
|
+
import { i as withStartedActionClient, n as withResolvedActionClient } from "./client-CpHMD-C2.mjs";
|
|
3
|
+
import { n as formatMatrixEncryptionUnavailableError } from "./encryption-guidance-CvN_NQUJ.mjs";
|
|
4
4
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
5
5
|
import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime";
|
|
6
6
|
import { setTimeout } from "node:timers/promises";
|
|
@@ -308,6 +308,7 @@ async function getMatrixVerificationStatus(opts = {}) {
|
|
|
308
308
|
if (readiness === "none" || preflight.serverDeviceKnown === false) return preflight;
|
|
309
309
|
if (readiness === "started") await client.start();
|
|
310
310
|
else await client.prepareForOneOff();
|
|
311
|
+
await client.refreshOwnDeviceKeys();
|
|
311
312
|
return await readMatrixVerificationStatus(client, opts);
|
|
312
313
|
}, "discard");
|
|
313
314
|
}
|
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 "
|
|
2
|
-
import { n as listMatrixEnvAccountIds, r as resolveMatrixEnvAccountToken, t as getMatrixScopedEnvVarNames } from "
|
|
3
|
-
import { a as resolveMatrixCredentialsPath, i as resolveMatrixCredentialsFilename, n as resolveMatrixAccountStorageRoot, o as resolveMatrixHomeserverKey, r as resolveMatrixCredentialsDir, s as sanitizeMatrixPathSegment, t as hashMatrixAccessToken } from "
|
|
4
|
-
import { t as matrixPlugin } from "
|
|
5
|
-
import { n as matrixSetupAdapter, t as createMatrixSetupWizardProxy } from "
|
|
6
|
-
import { f as setMatrixThreadBindingMaxAgeBySessionKey, n as getMatrixThreadBindingManager, u as setMatrixThreadBindingIdleTimeoutBySessionKey } from "
|
|
7
|
-
import { n as matrixOnboardingAdapter } from "
|
|
8
|
-
import { t as createMatrixThreadBindingManager } from "
|
|
1
|
+
import { a as resolveMatrixDefaultOrOnlyAccountId, i as resolveMatrixChannelConfig, n as requiresExplicitMatrixDefaultAccount, r as resolveConfiguredMatrixAccountIds, t as findMatrixAccountEntry } from "./.setup/account-selection-DZMazUgX.mjs";
|
|
2
|
+
import { n as listMatrixEnvAccountIds, r as resolveMatrixEnvAccountToken, t as getMatrixScopedEnvVarNames } from "./.setup/env-vars-dGqak9dN.mjs";
|
|
3
|
+
import { a as resolveMatrixCredentialsPath, i as resolveMatrixCredentialsFilename, n as resolveMatrixAccountStorageRoot, o as resolveMatrixHomeserverKey, r as resolveMatrixCredentialsDir, s as sanitizeMatrixPathSegment, t as hashMatrixAccessToken } from "./.setup/storage-paths-gUmSydsW.mjs";
|
|
4
|
+
import { t as matrixPlugin } from "./.setup/channel-Q_N83Wwa.mjs";
|
|
5
|
+
import { n as matrixSetupAdapter, t as createMatrixSetupWizardProxy } from "./.setup/setup-core-BnqoLunq.mjs";
|
|
6
|
+
import { f as setMatrixThreadBindingMaxAgeBySessionKey, n as getMatrixThreadBindingManager, u as setMatrixThreadBindingIdleTimeoutBySessionKey } from "./.setup/thread-bindings-shared-oNPiyMWY.mjs";
|
|
7
|
+
import { n as matrixOnboardingAdapter } from "./.setup/setup-surface-sWwADrZ8.mjs";
|
|
8
|
+
import { t as createMatrixThreadBindingManager } from "./.setup/thread-bindings-_WJ8RYWJ.mjs";
|
|
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 };
|
package/dist/auth-presence.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as normalizeMatrixStoredCredentials, t as MATRIX_CREDENTIALS_NAMESPACE } from "
|
|
1
|
+
import { i as normalizeMatrixStoredCredentials, t as MATRIX_CREDENTIALS_NAMESPACE } from "./.setup/credentials-state-B3cuUFwZ.mjs";
|
|
2
2
|
import { createPluginStateSyncKeyedStore } from "openclaw/plugin-sdk/plugin-state-store-runtime";
|
|
3
3
|
//#region extensions/matrix/auth-presence.ts
|
|
4
4
|
function hasAnyMatrixAuth(params, env = process.env) {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as matrixPlugin } from "
|
|
1
|
+
import { t as matrixPlugin } from "./.setup/channel-Q_N83Wwa.mjs";
|
|
2
2
|
export { matrixPlugin };
|
package/dist/cli-metadata.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as registerMatrixCliMetadata, t as cli_metadata_default } from "
|
|
1
|
+
import { n as registerMatrixCliMetadata, t as cli_metadata_default } from "./.setup/cli-metadata-B_y2Z5Np.mjs";
|
|
2
2
|
export { cli_metadata_default as default, registerMatrixCliMetadata };
|
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 "
|
|
2
|
-
import { n as matrixOnboardingAdapter } from "
|
|
1
|
+
import { c as singleAccountKeysToMove, n as matrixSetupAdapter, o as namedAccountPromotionKeys, s as resolveSingleAccountPromotionTarget } from "./.setup/setup-core-BnqoLunq.mjs";
|
|
2
|
+
import { n as matrixOnboardingAdapter } from "./.setup/setup-surface-sWwADrZ8.mjs";
|
|
3
3
|
export { matrixSetupAdapter, matrixOnboardingAdapter as matrixSetupWizard, namedAccountPromotionKeys, resolveSingleAccountPromotionTarget, singleAccountKeysToMove };
|