@openclaw/matrix 2026.7.2-beta.3 → 2026.7.2-beta.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/api.js +4 -4
- package/dist/{approval-handler.runtime-BEa98wwG.js → approval-handler.runtime-AsawryfP.js} +4 -4
- package/dist/{approval-ids-Dfn7oQAm.js → approval-ids-XAMP8vN9.js} +1 -1
- package/dist/{approval-reaction-auth-kXkCJBGi.js → approval-reaction-auth-DButmM13.js} +2 -2
- package/dist/{channel-j331Xd7b.js → channel-MBtrY36B.js} +17 -11
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel.runtime-BIwlVfQw.js → channel.runtime-Bi4Dgy2P.js} +6 -6
- package/dist/{cli-0EcKfqFw.js → cli-CcPuMyCk.js} +14 -18
- package/dist/{cli-metadata-Xq1Xb15R.js → cli-metadata-DAhDhbYX.js} +1 -1
- package/dist/cli-metadata.js +1 -1
- package/dist/{client-BtG4quUl.js → client-BwX6rURh.js} +2 -2
- package/dist/{client-CA0PULls.js → client-Dg8dk8NW.js} +2 -2
- package/dist/{client-bootstrap-Dk5EAn3n.js → client-bootstrap-ZAaO9fZ-.js} +1 -1
- package/dist/{config-schema-B5GRV8wL.js → config-schema-CggnuwnJ.js} +4 -5
- package/dist/contract-api.js +2 -2
- package/dist/{create-client-WQExaby_.js → create-client-Und1YmJ2.js} +3 -3
- package/dist/{crypto-runtime-CAff-n15.js → crypto-runtime-_j7TpS7k.js} +2 -2
- package/dist/{directory-live-DiC-0XBC.js → directory-live-B6fbX6jf.js} +3 -3
- package/dist/{doctor-DwUVm5Lw.js → doctor-C0LPJGTz.js} +1 -1
- package/dist/doctor-contract-CWVdlRQR.js +183 -0
- package/dist/doctor-contract-api.js +112 -71
- package/dist/{draft-stream-CTLKtJJ0.js → draft-stream-BfibauH1.js} +1 -1
- package/dist/{file-sync-store-CPkgnSXp.js → file-sync-store-DUEWCEjb.js} +1 -1
- package/dist/{http-client-BmrgOZTL.js → http-client-DOyTG9l2.js} +1 -1
- package/dist/{idb-persistence-Dyy6ipgU.js → idb-persistence-C6zQfW2w.js} +72 -63
- package/dist/index.js +1 -1
- package/dist/{media-text-BMXEXb1j.js → media-text-Cv1VIHXW.js} +1 -1
- package/dist/{messages-3UBHfZrN.js → messages-ClTgfFl6.js} +3 -3
- package/dist/{monitor-BtUIds8T.js → monitor-2BjKS9RV.js} +23 -20
- package/dist/plugin-entry.handlers.runtime.js +1 -1
- package/dist/probe.runtime-BWkgfbiE.js +3 -0
- package/dist/{profile-update-Bh2XtJwN.js → profile-update-C2My3TML.js} +2 -2
- package/dist/{reaction-events-BwAKtUyQ.js → reaction-events-Cj6thhmc.js} +2 -2
- package/dist/{recovery-key-store-CW6eePfp.js → recovery-key-store-0O8ARdT_.js} +1 -1
- package/dist/{resolve-targets-DVoj-YxB.js → resolve-targets-Dn11HT76.js} +1 -1
- package/dist/{resolver.runtime-CC0VVsAt.js → resolver.runtime-Zguh0hH9.js} +1 -1
- package/dist/{sdk-CIDZXWpZ.js → sdk-DiRXiRRf.js} +5 -5
- package/dist/{send-BJbrdmNm.js → send-CZCmDQu8.js} +2 -2
- package/dist/session-binding-contract-api.js +1 -1
- package/dist/{setup-bootstrap-DGPOOdz-.js → setup-bootstrap-C9w01xQK.js} +2 -2
- package/dist/{setup-core-XCdAx1nY.js → setup-core-D6gyoyeg.js} +107 -19
- package/dist/setup-plugin-api.js +4 -3
- package/dist/{setup-surface-CzUiTe_k.js → setup-surface-DZIEWtQC.js} +6 -4
- package/dist/{shared-DquM1oz6.js → shared-C7Vm9RxI.js} +3 -3
- package/dist/{startup-verification-CA00kebL.js → startup-verification-D1nscMh8.js} +1 -1
- package/dist/{storage-CzHxeF5E.js → storage-BrkTJZov.js} +6 -39
- package/dist/{thread-bindings-Cw194yEn.js → thread-bindings-BcYBELC7.js} +2 -2
- package/dist/{tool-actions.runtime-C0jgWYhX.js → tool-actions.runtime-Dbco_Vwn.js} +7 -7
- package/dist/{verification-DjxyWTNP.js → verification-DhMBWxOJ.js} +1 -1
- package/node_modules/music-metadata/lib/common/Util.d.ts +1 -1
- package/node_modules/music-metadata/lib/common/Util.js +7 -1
- package/node_modules/music-metadata/lib/id3v2/FrameHeader.js +23 -3
- package/node_modules/music-metadata/lib/id3v2/FrameParser.js +2 -2
- package/node_modules/music-metadata/lib/id3v2/ID3v2Token.js +1 -1
- package/node_modules/music-metadata/lib/mp4/AtomToken.js +38 -13
- package/node_modules/music-metadata/lib/mpeg/MpegParser.js +1 -1
- package/node_modules/music-metadata/package.json +6 -6
- package/node_modules/typebox/build/compile/validator.d.mts +1 -4
- package/node_modules/typebox/build/guard/guard.d.mts +1 -1
- package/node_modules/typebox/build/guard/guard.mjs +5 -2
- package/node_modules/typebox/build/guard/string.mjs +16 -4
- package/node_modules/typebox/build/schema/engine/_functions.mjs +34 -15
- package/node_modules/typebox/build/type/action/readonly_object.d.mts +5 -0
- package/node_modules/typebox/build/type/action/readonly_object.mjs +8 -0
- package/node_modules/typebox/build/typebox.d.mts +1 -1
- package/node_modules/typebox/build/typebox.mjs +1 -1
- package/node_modules/typebox/package.json +1 -1
- package/node_modules/typebox/readme.md +29 -32
- package/npm-shrinkwrap.json +11 -11
- package/openclaw.plugin.json +7 -20
- package/package.json +111 -28
- package/dist/doctor-contract-BA2Y6Crx.js +0 -312
- package/dist/probe.runtime-sBV-Govx.js +0 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as getMatrixRuntime } from "./runtime-6S3DNFNv.js";
|
|
2
|
-
import {
|
|
3
|
-
import { n as withResolvedActionClient } from "./client-
|
|
2
|
+
import { l as resolveMatrixConfigPath, s as syncMatrixOwnProfile, u as updateMatrixAccountConfig } from "./setup-core-D6gyoyeg.js";
|
|
3
|
+
import { n as withResolvedActionClient } from "./client-BwX6rURh.js";
|
|
4
4
|
import { normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
|
5
5
|
//#region extensions/matrix/src/matrix/actions/profile.ts
|
|
6
6
|
async function updateMatrixOwnProfile(opts = {}) {
|
|
@@ -6,9 +6,9 @@ import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
|
6
6
|
import { normalizeAccountId } from "openclaw/plugin-sdk/routing";
|
|
7
7
|
import { getSessionBindingService } from "openclaw/plugin-sdk/session-binding-runtime";
|
|
8
8
|
//#region extensions/matrix/src/matrix/monitor/reaction-events.ts
|
|
9
|
-
const loadApprovalReactionAuth = createLazyRuntimeModule(() => import("./approval-reaction-auth-
|
|
9
|
+
const loadApprovalReactionAuth = createLazyRuntimeModule(() => import("./approval-reaction-auth-DButmM13.js"));
|
|
10
10
|
const loadExecApprovalResolver = createLazyRuntimeModule(() => import("./exec-approval-resolver-BCgqRtZS.js"));
|
|
11
|
-
const loadMatrixSend = createLazyRuntimeModule(() => import("./send-
|
|
11
|
+
const loadMatrixSend = createLazyRuntimeModule(() => import("./send-CZCmDQu8.js").then((n) => n.l));
|
|
12
12
|
function buildMatrixApprovalTerminalText(result) {
|
|
13
13
|
const approval = result.approval;
|
|
14
14
|
const terminalLabel = approval.status === "allowed" ? approval.decision === "allow-always" ? "Allowed always" : "Allowed once" : approval.status === "denied" ? "Denied" : approval.status === "expired" ? "Expired" : "Cancelled";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as formatMatrixErrorReason, t as formatMatrixErrorMessage } from "./errors-C47hvAF8.js";
|
|
2
|
-
import { A as writeMatrixRecoveryKeyStateForPath,
|
|
2
|
+
import { A as writeMatrixRecoveryKeyStateForPath, E as readMatrixRecoveryKeyStateForPath, S as readLegacyMatrixRecoveryKeyFile, _ as migrateLegacyMatrixRecoveryKeyFilePathToStore } from "./storage-BrkTJZov.js";
|
|
3
3
|
import { n as LogService } from "./logger-D0GCSDQq.js";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import { decodeRecoveryKey } from "matrix-js-sdk/lib/crypto-api/recovery-key.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
|
|
2
2
|
import { n as normalizeMatrixMessagingTarget, t as isMatrixQualifiedUserId } from "./target-ids-B-5aQxwn.js";
|
|
3
|
-
import { n as listMatrixDirectoryGroupsLive, r as listMatrixDirectoryPeersLive } from "./directory-live-
|
|
3
|
+
import { n as listMatrixDirectoryGroupsLive, r as listMatrixDirectoryPeersLive } from "./directory-live-B6fbX6jf.js";
|
|
4
4
|
import { normalizeOptionalLowercaseString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
5
5
|
//#region extensions/matrix/src/resolve-targets.ts
|
|
6
6
|
var resolve_targets_exports = /* @__PURE__ */ __exportAll({ resolveMatrixTargets: () => resolveMatrixTargets });
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as resolveMatrixTargets } from "./resolve-targets-
|
|
1
|
+
import { t as resolveMatrixTargets } from "./resolve-targets-Dn11HT76.js";
|
|
2
2
|
//#region extensions/matrix/src/resolver.runtime.ts
|
|
3
3
|
const matrixResolverRuntime = { resolveMatrixTargets };
|
|
4
4
|
//#endregion
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { n as formatMatrixErrorReason, r as isMatrixNotFoundError, t as formatMatrixErrorMessage } from "./errors-C47hvAF8.js";
|
|
2
|
-
import { t as SqliteBackedMatrixSyncStore } from "./file-sync-store-
|
|
2
|
+
import { t as SqliteBackedMatrixSyncStore } from "./file-sync-store-DUEWCEjb.js";
|
|
3
3
|
import { n as LogService, r as noop, t as ConsoleLogger } from "./logger-D0GCSDQq.js";
|
|
4
4
|
import { t as MATRIX_IDB_PERSIST_INTERVAL_MS } from "./idb-persistence-lock-DAJ49nZX.js";
|
|
5
|
-
import { c as createMatrixStartupAbortError, u as throwIfMatrixStartupAborted } from "./shared-
|
|
6
|
-
import { a as matrixEventToRaw, n as createMatrixGuardedFetch, o as parseMxc, t as MatrixAuthedHttpClient } from "./http-client-
|
|
5
|
+
import { c as createMatrixStartupAbortError, u as throwIfMatrixStartupAborted } from "./shared-C7Vm9RxI.js";
|
|
6
|
+
import { a as matrixEventToRaw, n as createMatrixGuardedFetch, o as parseMxc, t as MatrixAuthedHttpClient } from "./http-client-DOyTG9l2.js";
|
|
7
7
|
import { n as resolveMatrixRoomKeyBackupReadinessError } from "./backup-health-Dm_YMVFT.js";
|
|
8
8
|
import { createMatrixJsSdkClientLogger } from "./logging-QH-48Gr6.js";
|
|
9
9
|
import { n as isMatrixReadySyncState, r as isMatrixTerminalSyncState } from "./sync-state-CWbp0QSY.js";
|
|
10
|
-
import { n as isRepairableSecretStorageAccessError, t as MatrixRecoveryKeyStore } from "./recovery-key-store-
|
|
10
|
+
import { n as isRepairableSecretStorageAccessError, t as MatrixRecoveryKeyStore } from "./recovery-key-store-0O8ARdT_.js";
|
|
11
11
|
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
12
12
|
import { normalizeNullableString, normalizeStringEntries, uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
13
13
|
import { KeyedAsyncQueue } from "openclaw/plugin-sdk/keyed-async-queue";
|
|
@@ -94,7 +94,7 @@ function createMatrixExplicitBootstrapOptions(params) {
|
|
|
94
94
|
};
|
|
95
95
|
}
|
|
96
96
|
let loadedMatrixCryptoRuntime = null;
|
|
97
|
-
const loadMatrixCryptoRuntime = createLazyRuntimeModule(() => import("./crypto-runtime-
|
|
97
|
+
const loadMatrixCryptoRuntime = createLazyRuntimeModule(() => import("./crypto-runtime-_j7TpS7k.js").then((runtime) => {
|
|
98
98
|
loadedMatrixCryptoRuntime = runtime;
|
|
99
99
|
return runtime;
|
|
100
100
|
}));
|
|
@@ -229,7 +229,7 @@ function buildPollResponseContent(pollEventId, answerIds) {
|
|
|
229
229
|
}
|
|
230
230
|
//#endregion
|
|
231
231
|
//#region extensions/matrix/src/matrix/send/client.ts
|
|
232
|
-
const loadMatrixSendClientRuntime = createLazyRuntimeModule(() => import("./client-bootstrap-
|
|
232
|
+
const loadMatrixSendClientRuntime = createLazyRuntimeModule(() => import("./client-bootstrap-ZAaO9fZ-.js").then((n) => n.t));
|
|
233
233
|
function resolveMediaMaxBytes(accountId, cfg) {
|
|
234
234
|
if (!cfg) throw new Error("Matrix media limits requires a resolved runtime config. Load and resolve config at the command or gateway boundary, then pass cfg through the runtime path.");
|
|
235
235
|
const matrixCfg = resolveMatrixAccountConfig({
|
|
@@ -1311,7 +1311,7 @@ async function sendMessageMatrix(to, message, opts) {
|
|
|
1311
1311
|
buffer: media.buffer,
|
|
1312
1312
|
contentType: media.contentType,
|
|
1313
1313
|
fileName: media.fileName,
|
|
1314
|
-
kind: media.kind ?? "unknown"
|
|
1314
|
+
kind: media.kind === "sticker" ? "unknown" : media.kind ?? "unknown"
|
|
1315
1315
|
});
|
|
1316
1316
|
const baseMsgType = resolveMatrixMsgType(media.contentType, media.fileName);
|
|
1317
1317
|
const { useVoice } = resolveMatrixVoiceDecision({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { r as setMatrixRuntime } from "./runtime-6S3DNFNv.js";
|
|
2
2
|
import { s as resetMatrixThreadBindingsForTests } from "./thread-bindings-shared-CKnY4LSd.js";
|
|
3
|
-
import { t as createMatrixThreadBindingManager } from "./thread-bindings-
|
|
3
|
+
import { t as createMatrixThreadBindingManager } from "./thread-bindings-BcYBELC7.js";
|
|
4
4
|
export { createMatrixThreadBindingManager, resetMatrixThreadBindingsForTests, setMatrixRuntime };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as resolveMatrixAccountConfig, n as hasExplicitMatrixAccountConfig } from "./account-config-BZWN9tGS.js";
|
|
2
|
-
import "./setup-core-
|
|
2
|
+
import "./setup-core-D6gyoyeg.js";
|
|
3
3
|
import { t as formatMatrixErrorMessage } from "./errors-C47hvAF8.js";
|
|
4
|
-
import { n as bootstrapMatrixVerification } from "./verification-
|
|
4
|
+
import { n as bootstrapMatrixVerification } from "./verification-DhMBWxOJ.js";
|
|
5
5
|
//#region extensions/matrix/src/setup-bootstrap.ts
|
|
6
6
|
async function maybeBootstrapNewEncryptedMatrixAccount(params) {
|
|
7
7
|
const accountConfig = resolveMatrixAccountConfig({
|
|
@@ -8,6 +8,7 @@ import { normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "opencl
|
|
|
8
8
|
import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
|
9
9
|
import { hasConfiguredSecretInput } from "openclaw/plugin-sdk/secret-input-runtime";
|
|
10
10
|
import { DEFAULT_ACCOUNT_ID as DEFAULT_ACCOUNT_ID$1, normalizeAccountId as normalizeAccountId$1 } from "openclaw/plugin-sdk/routing";
|
|
11
|
+
import { defineChannelSetupContract } from "openclaw/plugin-sdk/channel-setup";
|
|
11
12
|
import { DEFAULT_ACCOUNT_ID as DEFAULT_ACCOUNT_ID$2, addWildcardAllowFrom, applyAccountNameToChannelSection, normalizeAccountId as normalizeAccountId$2, normalizeAllowFromEntries, normalizeSecretInputString, prepareScopedSetupConfig } from "openclaw/plugin-sdk/setup";
|
|
12
13
|
import { resolveOptionalIntegerOption } from "openclaw/plugin-sdk/number-runtime";
|
|
13
14
|
import { coerceSecretRef as coerceSecretRef$1 } from "openclaw/plugin-sdk/secret-ref-runtime";
|
|
@@ -135,7 +136,12 @@ function resolveMatrixAccount(params) {
|
|
|
135
136
|
//#endregion
|
|
136
137
|
//#region extensions/matrix/src/setup-contract.ts
|
|
137
138
|
const matrixSingleAccountKeysToMove = [
|
|
139
|
+
"homeserver",
|
|
140
|
+
"userId",
|
|
141
|
+
"accessToken",
|
|
142
|
+
"password",
|
|
138
143
|
"deviceId",
|
|
144
|
+
"deviceName",
|
|
139
145
|
"avatarUrl",
|
|
140
146
|
"initialSyncLimit",
|
|
141
147
|
"encryption",
|
|
@@ -509,16 +515,17 @@ function moveSingleMatrixAccountConfigToNamedAccount(cfg) {
|
|
|
509
515
|
};
|
|
510
516
|
}
|
|
511
517
|
function validateMatrixSetupInput(params) {
|
|
512
|
-
const
|
|
518
|
+
const input = params.input;
|
|
519
|
+
const avatarUrl = resolveSetupAvatarUrl(input);
|
|
513
520
|
if (avatarUrl && !isSupportedMatrixAvatarSource(avatarUrl)) return "Matrix avatar URL must be an mxc:// URI or an http(s) URL.";
|
|
514
|
-
if (
|
|
521
|
+
if (input.useEnv) {
|
|
515
522
|
const envReadiness = resolveMatrixEnvAuthReadiness(params.accountId, process.env);
|
|
516
523
|
return envReadiness.ready ? null : envReadiness.missingMessage;
|
|
517
524
|
}
|
|
518
|
-
if (!
|
|
519
|
-
const accessToken =
|
|
520
|
-
const password = normalizeSecretInputString(
|
|
521
|
-
const userId =
|
|
525
|
+
if (!input.homeserver?.trim()) return "Matrix requires --homeserver";
|
|
526
|
+
const accessToken = input.accessToken?.trim();
|
|
527
|
+
const password = normalizeSecretInputString(input.password);
|
|
528
|
+
const userId = input.userId?.trim();
|
|
522
529
|
if (!accessToken && !password) return "Matrix requires --access-token or --password";
|
|
523
530
|
if (!accessToken) {
|
|
524
531
|
if (!userId) return "Matrix requires --user-id when using --password";
|
|
@@ -527,15 +534,16 @@ function validateMatrixSetupInput(params) {
|
|
|
527
534
|
return null;
|
|
528
535
|
}
|
|
529
536
|
function applyMatrixSetupAccountConfig(params) {
|
|
537
|
+
const input = params.input;
|
|
530
538
|
const normalizedAccountId = normalizeAccountId$2(params.accountId);
|
|
531
539
|
const next = applyAccountNameToChannelSection({
|
|
532
540
|
cfg: normalizedAccountId !== DEFAULT_ACCOUNT_ID$2 ? moveSingleMatrixAccountConfigToNamedAccount(params.cfg) : params.cfg,
|
|
533
541
|
channelKey: channel$1,
|
|
534
542
|
accountId: normalizedAccountId,
|
|
535
|
-
name:
|
|
543
|
+
name: input.name
|
|
536
544
|
});
|
|
537
|
-
const avatarUrl = resolveSetupAvatarUrl(
|
|
538
|
-
if (
|
|
545
|
+
const avatarUrl = resolveSetupAvatarUrl(input);
|
|
546
|
+
if (input.useEnv) return updateMatrixAccountConfig(next, normalizedAccountId, {
|
|
539
547
|
enabled: true,
|
|
540
548
|
homeserver: null,
|
|
541
549
|
allowPrivateNetwork: null,
|
|
@@ -547,20 +555,20 @@ function applyMatrixSetupAccountConfig(params) {
|
|
|
547
555
|
deviceName: null,
|
|
548
556
|
avatarUrl
|
|
549
557
|
});
|
|
550
|
-
const accessToken =
|
|
551
|
-
const password = normalizeSecretInputString(
|
|
552
|
-
const userId =
|
|
558
|
+
const accessToken = input.accessToken?.trim();
|
|
559
|
+
const password = normalizeSecretInputString(input.password);
|
|
560
|
+
const userId = input.userId?.trim();
|
|
553
561
|
return updateMatrixAccountConfig(next, normalizedAccountId, {
|
|
554
562
|
enabled: true,
|
|
555
|
-
homeserver:
|
|
556
|
-
allowPrivateNetwork: typeof
|
|
557
|
-
proxy: normalizeOptionalString(
|
|
563
|
+
homeserver: input.homeserver?.trim(),
|
|
564
|
+
allowPrivateNetwork: typeof input.dangerouslyAllowPrivateNetwork === "boolean" ? input.dangerouslyAllowPrivateNetwork : typeof input.allowPrivateNetwork === "boolean" ? input.allowPrivateNetwork : void 0,
|
|
565
|
+
proxy: normalizeOptionalString(input.proxy),
|
|
558
566
|
userId: password && !userId ? null : userId,
|
|
559
567
|
accessToken: accessToken || (password ? null : void 0),
|
|
560
568
|
password: password || (accessToken ? null : void 0),
|
|
561
|
-
deviceName:
|
|
569
|
+
deviceName: input.deviceName?.trim(),
|
|
562
570
|
avatarUrl,
|
|
563
|
-
initialSyncLimit:
|
|
571
|
+
initialSyncLimit: input.initialSyncLimit
|
|
564
572
|
});
|
|
565
573
|
}
|
|
566
574
|
//#endregion
|
|
@@ -645,6 +653,9 @@ function createMatrixSetupWizardProxy(loadWizardModule) {
|
|
|
645
653
|
};
|
|
646
654
|
}
|
|
647
655
|
const matrixSetupAdapter = {
|
|
656
|
+
singleAccountKeysToMove,
|
|
657
|
+
namedAccountPromotionKeys,
|
|
658
|
+
resolveSingleAccountPromotionTarget,
|
|
648
659
|
resolveAccountId: ({ accountId, input }) => resolveMatrixSetupAccountId({
|
|
649
660
|
accountId,
|
|
650
661
|
name: input?.name
|
|
@@ -669,7 +680,7 @@ const matrixSetupAdapter = {
|
|
|
669
680
|
input
|
|
670
681
|
}),
|
|
671
682
|
afterAccountConfigWritten: async ({ previousCfg, cfg, accountId, runtime }) => {
|
|
672
|
-
const { runMatrixSetupBootstrapAfterConfigWrite } = await import("./setup-bootstrap-
|
|
683
|
+
const { runMatrixSetupBootstrapAfterConfigWrite } = await import("./setup-bootstrap-C9w01xQK.js");
|
|
673
684
|
await runMatrixSetupBootstrapAfterConfigWrite({
|
|
674
685
|
previousCfg,
|
|
675
686
|
cfg,
|
|
@@ -678,5 +689,82 @@ const matrixSetupAdapter = {
|
|
|
678
689
|
});
|
|
679
690
|
}
|
|
680
691
|
};
|
|
692
|
+
const matrixSetupContract = defineChannelSetupContract({
|
|
693
|
+
fields: {
|
|
694
|
+
homeserver: {
|
|
695
|
+
kind: "string",
|
|
696
|
+
cli: {
|
|
697
|
+
flags: "--homeserver <url>",
|
|
698
|
+
description: "Matrix homeserver URL"
|
|
699
|
+
}
|
|
700
|
+
},
|
|
701
|
+
userId: {
|
|
702
|
+
kind: "string",
|
|
703
|
+
cli: {
|
|
704
|
+
flags: "--user-id <id>",
|
|
705
|
+
description: "Matrix user id"
|
|
706
|
+
}
|
|
707
|
+
},
|
|
708
|
+
accessToken: {
|
|
709
|
+
kind: "string",
|
|
710
|
+
sensitive: true,
|
|
711
|
+
cli: {
|
|
712
|
+
flags: "--access-token <token>",
|
|
713
|
+
description: "Matrix access token"
|
|
714
|
+
}
|
|
715
|
+
},
|
|
716
|
+
password: {
|
|
717
|
+
kind: "string",
|
|
718
|
+
sensitive: true,
|
|
719
|
+
cli: {
|
|
720
|
+
flags: "--password <password>",
|
|
721
|
+
description: "Matrix password"
|
|
722
|
+
}
|
|
723
|
+
},
|
|
724
|
+
deviceName: {
|
|
725
|
+
kind: "string",
|
|
726
|
+
cli: {
|
|
727
|
+
flags: "--device-name <name>",
|
|
728
|
+
description: "Matrix device name"
|
|
729
|
+
}
|
|
730
|
+
},
|
|
731
|
+
avatarUrl: {
|
|
732
|
+
kind: "string",
|
|
733
|
+
cli: {
|
|
734
|
+
flags: "--avatar-url <url>",
|
|
735
|
+
description: "Matrix avatar URL"
|
|
736
|
+
}
|
|
737
|
+
},
|
|
738
|
+
initialSyncLimit: {
|
|
739
|
+
kind: "integer",
|
|
740
|
+
cli: {
|
|
741
|
+
flags: "--initial-sync-limit <n>",
|
|
742
|
+
description: "Matrix initial sync room limit"
|
|
743
|
+
}
|
|
744
|
+
},
|
|
745
|
+
proxy: {
|
|
746
|
+
kind: "string",
|
|
747
|
+
cli: {
|
|
748
|
+
flags: "--proxy <url>",
|
|
749
|
+
description: "Matrix proxy URL"
|
|
750
|
+
}
|
|
751
|
+
},
|
|
752
|
+
dangerouslyAllowPrivateNetwork: {
|
|
753
|
+
kind: "boolean",
|
|
754
|
+
cli: {
|
|
755
|
+
flags: "--dangerously-allow-private-network",
|
|
756
|
+
description: "Allow private-network Matrix homeservers"
|
|
757
|
+
}
|
|
758
|
+
},
|
|
759
|
+
useEnv: {
|
|
760
|
+
kind: "boolean",
|
|
761
|
+
cli: {
|
|
762
|
+
flags: "--use-env",
|
|
763
|
+
description: "Use Matrix environment credentials"
|
|
764
|
+
}
|
|
765
|
+
}
|
|
766
|
+
},
|
|
767
|
+
legacyAdapter: matrixSetupAdapter
|
|
768
|
+
});
|
|
681
769
|
//#endregion
|
|
682
|
-
export {
|
|
770
|
+
export { resolveMatrixAccount as _, moveSingleMatrixAccountConfigToNamedAccount as a, config_update_exports as c, namedAccountPromotionKeys as d, resolveSingleAccountPromotionTarget as f, resolveDefaultMatrixAccountId as g, resolveConfiguredMatrixBotUserIds as h, resolveMatrixSetupDmAllowFrom as i, resolveMatrixConfigPath as l, listMatrixAccountIds as m, matrixSetupAdapter as n, profile_exports as o, singleAccountKeysToMove as p, matrixSetupContract as r, syncMatrixOwnProfile as s, createMatrixSetupWizardProxy as t, updateMatrixAccountConfig as u };
|
package/dist/setup-plugin-api.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { r as matrixConfigAdapter, t as MatrixChannelConfigSchema } from "./config-schema-
|
|
1
|
+
import { _ as resolveMatrixAccount, n as matrixSetupAdapter, r as matrixSetupContract, t as createMatrixSetupWizardProxy } from "./setup-core-D6gyoyeg.js";
|
|
2
|
+
import { r as matrixConfigAdapter, t as MatrixChannelConfigSchema } from "./config-schema-CggnuwnJ.js";
|
|
3
3
|
import { describeAccountSnapshot } from "openclaw/plugin-sdk/account-helpers";
|
|
4
4
|
const matrixSetupPlugin = {
|
|
5
5
|
id: "matrix",
|
|
@@ -13,8 +13,9 @@ const matrixSetupPlugin = {
|
|
|
13
13
|
order: 70,
|
|
14
14
|
quickstartAllowFrom: true
|
|
15
15
|
},
|
|
16
|
-
setupWizard: createMatrixSetupWizardProxy(async () => ({ matrixSetupWizard: (await import("./setup-surface-
|
|
16
|
+
setupWizard: createMatrixSetupWizardProxy(async () => ({ matrixSetupWizard: (await import("./setup-surface-DZIEWtQC.js").then((n) => n.t)).matrixSetupWizard })),
|
|
17
17
|
setup: matrixSetupAdapter,
|
|
18
|
+
setupContract: matrixSetupContract,
|
|
18
19
|
capabilities: {
|
|
19
20
|
chatTypes: [
|
|
20
21
|
"direct",
|
|
@@ -2,7 +2,7 @@ import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
|
|
|
2
2
|
import { n as requiresExplicitMatrixDefaultAccount } from "./account-selection-kqquRzCf.js";
|
|
3
3
|
import { a as resolveMatrixAccountConfig } from "./account-config-BZWN9tGS.js";
|
|
4
4
|
import { r as resolveMatrixEnvAuthReadiness } from "./env-auth-CQsYbz-p.js";
|
|
5
|
-
import {
|
|
5
|
+
import { _ as resolveMatrixAccount, a as moveSingleMatrixAccountConfigToNamedAccount, g as resolveDefaultMatrixAccountId, i as resolveMatrixSetupDmAllowFrom, m as listMatrixAccountIds, u as updateMatrixAccountConfig } from "./setup-core-D6gyoyeg.js";
|
|
6
6
|
import { t as resolveMatrixConfigFieldPath } from "./config-paths-CnREYb1Y.js";
|
|
7
7
|
import { n as validateMatrixHomeserverUrl, r as isPrivateOrLoopbackHost, t as resolveValidatedMatrixHomeserverUrl } from "./url-validation-GRHde6lq.js";
|
|
8
8
|
import { n as ensureMatrixSdkInstalled, r as isMatrixSdkAvailable } from "./deps-CcVJfvRM.js";
|
|
@@ -105,7 +105,7 @@ async function promptMatrixAllowFrom(params) {
|
|
|
105
105
|
pending.push(part);
|
|
106
106
|
}
|
|
107
107
|
if (pending.length > 0) {
|
|
108
|
-
const { resolveMatrixTargets } = await import("./resolve-targets-
|
|
108
|
+
const { resolveMatrixTargets } = await import("./resolve-targets-Dn11HT76.js").then((n) => n.n);
|
|
109
109
|
const results = await resolveMatrixTargets({
|
|
110
110
|
cfg,
|
|
111
111
|
accountId,
|
|
@@ -233,7 +233,7 @@ async function configureMatrixAccessPrompts(params) {
|
|
|
233
233
|
resolvedIds.push(cleaned);
|
|
234
234
|
continue;
|
|
235
235
|
}
|
|
236
|
-
const { listMatrixDirectoryGroupsLive } = await import("./directory-live-
|
|
236
|
+
const { listMatrixDirectoryGroupsLive } = await import("./directory-live-B6fbX6jf.js").then((n) => n.t);
|
|
237
237
|
const matches = await listMatrixDirectoryGroupsLive({
|
|
238
238
|
cfg: next,
|
|
239
239
|
accountId: params.accountId,
|
|
@@ -387,6 +387,7 @@ async function runMatrixConfigure(params) {
|
|
|
387
387
|
}) === "token") {
|
|
388
388
|
accessToken = normalizeStringifiedOptionalString(await params.prompter.text({
|
|
389
389
|
message: "Matrix access token",
|
|
390
|
+
sensitive: true,
|
|
390
391
|
validate: (value) => normalizeOptionalString(value) ? void 0 : "Required"
|
|
391
392
|
})) ?? "";
|
|
392
393
|
password = void 0;
|
|
@@ -404,6 +405,7 @@ async function runMatrixConfigure(params) {
|
|
|
404
405
|
})) ?? "";
|
|
405
406
|
password = normalizeStringifiedOptionalString(await params.prompter.text({
|
|
406
407
|
message: "Matrix password",
|
|
408
|
+
sensitive: true,
|
|
407
409
|
validate: (value) => normalizeOptionalString(value) ? void 0 : "Required"
|
|
408
410
|
})) ?? "";
|
|
409
411
|
accessToken = void 0;
|
|
@@ -508,7 +510,7 @@ const matrixOnboardingAdapter = {
|
|
|
508
510
|
});
|
|
509
511
|
},
|
|
510
512
|
afterConfigWritten: async ({ previousCfg, cfg, accountId, runtime }) => {
|
|
511
|
-
const { runMatrixSetupBootstrapAfterConfigWrite } = await import("./setup-bootstrap-
|
|
513
|
+
const { runMatrixSetupBootstrapAfterConfigWrite } = await import("./setup-bootstrap-C9w01xQK.js");
|
|
512
514
|
await runMatrixSetupBootstrapAfterConfigWrite({
|
|
513
515
|
previousCfg,
|
|
514
516
|
cfg,
|
|
@@ -5,7 +5,7 @@ import { o as resolveMatrixBaseConfig, r as listNormalizedMatrixAccountIds, t as
|
|
|
5
5
|
import { i as resolveScopedMatrixEnvConfig, n as resolveGlobalMatrixEnvConfig } from "./env-auth-CQsYbz-p.js";
|
|
6
6
|
import { t as resolveMatrixConfigFieldPath } from "./config-paths-CnREYb1Y.js";
|
|
7
7
|
import { t as resolveValidatedMatrixHomeserverUrl } from "./url-validation-GRHde6lq.js";
|
|
8
|
-
import { s as repairCurrentTokenStorageMetaDeviceId } from "./storage-
|
|
8
|
+
import { s as repairCurrentTokenStorageMetaDeviceId } from "./storage-BrkTJZov.js";
|
|
9
9
|
import { n as LogService } from "./logger-D0GCSDQq.js";
|
|
10
10
|
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
11
11
|
import { DEFAULT_ACCOUNT_ID as DEFAULT_ACCOUNT_ID$1, normalizeAccountId as normalizeAccountId$1, normalizeOptionalAccountId, normalizeOptionalAccountId as normalizeOptionalAccountId$1 } from "openclaw/plugin-sdk/account-id";
|
|
@@ -16,7 +16,7 @@ import { resolveOptionalIntegerOption } from "openclaw/plugin-sdk/number-runtime
|
|
|
16
16
|
import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime";
|
|
17
17
|
import { retryAsync } from "openclaw/plugin-sdk/retry-runtime";
|
|
18
18
|
//#region extensions/matrix/src/matrix/client/config.ts
|
|
19
|
-
const loadDefaultMatrixAuthClientDeps = createLazyRuntimeModule(() => Promise.all([import("./sdk-
|
|
19
|
+
const loadDefaultMatrixAuthClientDeps = createLazyRuntimeModule(() => Promise.all([import("./sdk-DiRXiRRf.js"), import("./logging-QH-48Gr6.js")]).then(([sdkModule, loggingModule]) => ({
|
|
20
20
|
MatrixClient: sdkModule.MatrixClient,
|
|
21
21
|
ensureMatrixSdkLoggingConfigured: loggingModule.ensureMatrixSdkLoggingConfigured
|
|
22
22
|
})));
|
|
@@ -492,7 +492,7 @@ var shared_exports = /* @__PURE__ */ __exportAll({
|
|
|
492
492
|
stopSharedClientForAccount: () => stopSharedClientForAccount,
|
|
493
493
|
stopSharedClientInstance: () => stopSharedClientInstance
|
|
494
494
|
});
|
|
495
|
-
const loadMatrixCreateClientDeps = createLazyRuntimeModule(() => import("./create-client-
|
|
495
|
+
const loadMatrixCreateClientDeps = createLazyRuntimeModule(() => import("./create-client-Und1YmJ2.js").then((n) => n.n).then((runtime) => ({ createMatrixClient: runtime.createMatrixClient })));
|
|
496
496
|
const sharedClientStates = /* @__PURE__ */ new Map();
|
|
497
497
|
const sharedClientPromises = /* @__PURE__ */ new Map();
|
|
498
498
|
function serializeDispatcherPolicyKey(auth) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as getMatrixRuntime } from "./runtime-6S3DNFNv.js";
|
|
2
2
|
import { t as formatMatrixErrorMessage } from "./errors-C47hvAF8.js";
|
|
3
|
-
import { M as resolveMatrixSqliteStateEnv, l as resolveMatrixStoragePaths, o as recordCurrentStorageMetaDeviceId } from "./storage-
|
|
3
|
+
import { M as resolveMatrixSqliteStateEnv, l as resolveMatrixStoragePaths, o as recordCurrentStorageMetaDeviceId } from "./storage-BrkTJZov.js";
|
|
4
4
|
import { createHash } from "node:crypto";
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
import { timestampMsToIsoString } from "openclaw/plugin-sdk/number-runtime";
|
|
@@ -123,8 +123,8 @@ function writeMatrixIdbSnapshotJson(params) {
|
|
|
123
123
|
store: openSyncStore(openMatrixIdbSnapshotStoreOptions(params.storageRootDir))
|
|
124
124
|
});
|
|
125
125
|
}
|
|
126
|
-
async function
|
|
127
|
-
return await readIdbSnapshotJsonFromAsyncStore(params.store)
|
|
126
|
+
async function readMatrixIdbSnapshotJsonFromStore(params) {
|
|
127
|
+
return await readIdbSnapshotJsonFromAsyncStore(params.store);
|
|
128
128
|
}
|
|
129
129
|
async function writeMatrixIdbSnapshotJsonToStore(params) {
|
|
130
130
|
const rows = buildIdbSnapshotRows(params.snapshotJson, params.databaseCount);
|
|
@@ -526,12 +526,11 @@ function resolveMatrixStateFilePath(params) {
|
|
|
526
526
|
}
|
|
527
527
|
async function maybeMigrateLegacyStorage(params) {
|
|
528
528
|
const hasAccountScopedLegacyStorageFile = fs.existsSync(params.storagePaths.storagePath);
|
|
529
|
-
const syncCache = hasAccountScopedLegacyStorageFile ? await import("./file-sync-store-
|
|
529
|
+
const syncCache = hasAccountScopedLegacyStorageFile ? await import("./file-sync-store-DUEWCEjb.js").then((n) => n.n) : null;
|
|
530
530
|
const hasAccountScopedLegacyStorage = hasAccountScopedLegacyStorageFile && await syncCache?.readLegacyMatrixSyncCacheState(params.storagePaths.rootDir) !== null;
|
|
531
531
|
const hasAccountScopedRecoveryKey = fs.existsSync(params.storagePaths.recoveryKeyPath);
|
|
532
|
-
const hasAccountScopedIdbSnapshot = fs.existsSync(params.storagePaths.idbSnapshotPath);
|
|
533
532
|
const hasAccountScopedLegacyCryptoMigration = fs.existsSync(path.join(params.storagePaths.rootDir, MATRIX_LEGACY_CRYPTO_MIGRATION_FILENAME));
|
|
534
|
-
if (!hasAccountScopedLegacyStorage && !hasAccountScopedRecoveryKey && !
|
|
533
|
+
if (!hasAccountScopedLegacyStorage && !hasAccountScopedRecoveryKey && !hasAccountScopedLegacyCryptoMigration) return;
|
|
535
534
|
const logger = getMatrixRuntime().logging.getChildLogger({ module: "matrix-storage" });
|
|
536
535
|
fs.mkdirSync(params.storagePaths.rootDir, { recursive: true });
|
|
537
536
|
const moved = [];
|
|
@@ -562,12 +561,6 @@ async function maybeMigrateLegacyStorage(params) {
|
|
|
562
561
|
label: "legacy crypto migration"
|
|
563
562
|
});
|
|
564
563
|
}
|
|
565
|
-
if (hasAccountScopedIdbSnapshot) await migrateLegacyIdbSnapshotToSqlite({
|
|
566
|
-
storageRootDir: params.storagePaths.rootDir,
|
|
567
|
-
snapshotPath: params.storagePaths.idbSnapshotPath,
|
|
568
|
-
moved,
|
|
569
|
-
pendingArchives
|
|
570
|
-
});
|
|
571
564
|
} catch (err) {
|
|
572
565
|
const rollbackError = rollbackLegacyMoves(moved);
|
|
573
566
|
throw new Error(rollbackError ? `Failed migrating legacy Matrix client storage: ${String(err)}. Rollback also failed: ${rollbackError}` : `Failed migrating legacy Matrix client storage: ${String(err)}`, { cause: err });
|
|
@@ -579,34 +572,8 @@ async function maybeMigrateLegacyStorage(params) {
|
|
|
579
572
|
if (moved.length > 0) logger.info(`matrix: migrated legacy client storage into ${params.storagePaths.rootDir}\n${moved.map((entry) => `- ${entry.label}: ${entry.sourcePath} -> ${entry.targetPath}`).join("\n")}`);
|
|
580
573
|
if (skippedExistingTargets.length > 0) logger.warn?.(`matrix: legacy client storage files were left in place because their migrated targets already existed.\n${skippedExistingTargets.join("\n")}`);
|
|
581
574
|
}
|
|
582
|
-
async function migrateLegacyIdbSnapshotToSqlite(params) {
|
|
583
|
-
if (readMatrixIdbSnapshotJson(params.storageRootDir)) {
|
|
584
|
-
params.pendingArchives.push({
|
|
585
|
-
sourcePath: params.snapshotPath,
|
|
586
|
-
label: "IndexedDB snapshot"
|
|
587
|
-
});
|
|
588
|
-
return;
|
|
589
|
-
}
|
|
590
|
-
const { readLegacyMatrixIdbSnapshotState } = await import("./idb-persistence-Dyy6ipgU.js").then((n) => n.t);
|
|
591
|
-
const snapshot = await readLegacyMatrixIdbSnapshotState(params.storageRootDir);
|
|
592
|
-
if (!snapshot) return;
|
|
593
|
-
writeMatrixIdbSnapshotJson({
|
|
594
|
-
storageRootDir: params.storageRootDir,
|
|
595
|
-
snapshotJson: JSON.stringify(snapshot),
|
|
596
|
-
databaseCount: snapshot.length
|
|
597
|
-
});
|
|
598
|
-
params.moved.push({
|
|
599
|
-
sourcePath: params.snapshotPath,
|
|
600
|
-
targetPath: `${params.storageRootDir} SQLite IndexedDB snapshot state`,
|
|
601
|
-
label: "IndexedDB snapshot"
|
|
602
|
-
});
|
|
603
|
-
params.pendingArchives.push({
|
|
604
|
-
sourcePath: params.snapshotPath,
|
|
605
|
-
label: "IndexedDB snapshot"
|
|
606
|
-
});
|
|
607
|
-
}
|
|
608
575
|
async function migrateLegacySyncCacheToSqlite(params) {
|
|
609
|
-
const syncCache = await import("./file-sync-store-
|
|
576
|
+
const syncCache = await import("./file-sync-store-DUEWCEjb.js").then((n) => n.n);
|
|
610
577
|
const persisted = await syncCache.readLegacyMatrixSyncCacheState(params.sourceRootDir);
|
|
611
578
|
if (!persisted) return;
|
|
612
579
|
const store = getMatrixRuntime().state.openKeyedStore(syncCache.openMatrixSyncCacheStoreOptions(params.targetRootDir));
|
|
@@ -715,4 +682,4 @@ function repairCurrentTokenStorageMetaDeviceId(params) {
|
|
|
715
682
|
});
|
|
716
683
|
}
|
|
717
684
|
//#endregion
|
|
718
|
-
export { writeMatrixRecoveryKeyStateForPath as A,
|
|
685
|
+
export { writeMatrixRecoveryKeyStateForPath as A, readLegacyMatrixRecoveryKeyState as C, writeMatrixIdbSnapshotJson as D, readMatrixRecoveryKeyStateForPath as E, resolveMatrixSqliteStateEnv as M, resolveMatrixSqliteStateKey as N, writeMatrixIdbSnapshotJsonToStore as O, readLegacyMatrixRecoveryKeyFile as S, readMatrixIdbSnapshotJsonFromStore as T, migrateLegacyMatrixRecoveryKeyFilePathToStore as _, openMatrixStorageMetaStoreOptions as a, openMatrixRecoveryKeyStoreOptions as b, resolveMatrixStateFilePath as c, writeStorageMeta as d, MATRIX_IDB_SNAPSHOT_FILENAME as f, hasMatrixRecoveryKeyStateInStore as g, hasMatrixLegacyCryptoMigrationStateInStore as h, normalizeMatrixStorageMetadata as i, writeMatrixRecoveryKeyStateToStore as j, writeMatrixLegacyCryptoMigrationStateToStore as k, resolveMatrixStoragePaths as l, MATRIX_RECOVERY_KEY_FILENAME as m, hasMatrixStorageMetaStateInStore as n, recordCurrentStorageMetaDeviceId as o, MATRIX_LEGACY_CRYPTO_MIGRATION_FILENAME as p, maybeMigrateLegacyStorage as r, repairCurrentTokenStorageMetaDeviceId as s, claimCurrentTokenStorageState as t, writeMatrixStorageMetaStateToStore as u, openMatrixIdbSnapshotStoreOptions as v, readMatrixIdbSnapshotJson as w, readLegacyMatrixLegacyCryptoMigrationState as x, openMatrixLegacyCryptoMigrationStoreOptions as y };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as getMatrixRuntime } from "./runtime-6S3DNFNv.js";
|
|
2
2
|
import { a as listBindingsForAccount, c as resolveBindingKey, f as setMatrixThreadBindingManagerEntry, h as toSessionBindingRecord, l as resolveEffectiveBindingExpiry, m as toMatrixBindingTargetKind, o as removeBindingRecord, r as getMatrixThreadBindingManagerEntry, t as deleteMatrixThreadBindingManagerEntry, u as setBindingRecord } from "./thread-bindings-shared-CKnY4LSd.js";
|
|
3
|
-
import { M as resolveMatrixSqliteStateEnv, N as resolveMatrixSqliteStateKey, c as resolveMatrixStateFilePath, t as claimCurrentTokenStorageState } from "./storage-
|
|
4
|
-
import { a as sendMessageMatrix } from "./send-
|
|
3
|
+
import { M as resolveMatrixSqliteStateEnv, N as resolveMatrixSqliteStateKey, c as resolveMatrixStateFilePath, t as claimCurrentTokenStorageState } from "./storage-BrkTJZov.js";
|
|
4
|
+
import { a as sendMessageMatrix } from "./send-CZCmDQu8.js";
|
|
5
5
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
6
6
|
import { createHash } from "node:crypto";
|
|
7
7
|
import path from "node:path";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { a as resolveMatrixAccountConfig, o as resolveMatrixBaseConfig } from "./account-config-BZWN9tGS.js";
|
|
2
|
-
import {
|
|
3
|
-
import { r as resolveMatrixRoomConfig } from "./channel-
|
|
2
|
+
import { _ as resolveMatrixAccount } from "./setup-core-D6gyoyeg.js";
|
|
3
|
+
import { r as resolveMatrixRoomConfig } from "./channel-MBtrY36B.js";
|
|
4
4
|
import { r as normalizeMatrixResolvableTarget } from "./target-ids-B-5aQxwn.js";
|
|
5
|
-
import { E as parsePollStart, T as isPollStartType, _ as readJoinedMatrixMembers, b as buildPollResponseContent, g as isStrictDirectMembership, h as hasDirectMatrixMemberFlag, i as reactMatrixMessage, u as resolveMatrixRoomId } from "./send-
|
|
5
|
+
import { E as parsePollStart, T as isPollStartType, _ as readJoinedMatrixMembers, b as buildPollResponseContent, g as isStrictDirectMembership, h as hasDirectMatrixMemberFlag, i as reactMatrixMessage, u as resolveMatrixRoomId } from "./send-CZCmDQu8.js";
|
|
6
6
|
import { i as buildMatrixReactionRelationsPath, o as selectOwnMatrixReactionEventIds, s as summarizeMatrixReactionEvents } from "./reaction-common-DkrQdBSZ.js";
|
|
7
|
-
import { n as withResolvedActionClient, r as withResolvedRoomAction } from "./client-
|
|
8
|
-
import { a as fetchEventSummary, c as resolveMatrixActionLimit, i as sendMatrixMessage, n as editMatrixMessage, o as readPinnedEvents, r as readMatrixMessages, s as EventType, t as deleteMatrixMessage } from "./messages-
|
|
7
|
+
import { n as withResolvedActionClient, r as withResolvedRoomAction } from "./client-BwX6rURh.js";
|
|
8
|
+
import { a as fetchEventSummary, c as resolveMatrixActionLimit, i as sendMatrixMessage, n as editMatrixMessage, o as readPinnedEvents, r as readMatrixMessages, s as EventType, t as deleteMatrixMessage } from "./messages-ClTgfFl6.js";
|
|
9
9
|
import { c as readReactionParams, d as resolveAllowlistProviderRuntimeGroupPolicy, f as resolveDefaultGroupPolicy, i as createActionGate, l as readStringArrayParam, n as ToolAuthorizationError, o as jsonResult, s as readPositiveIntegerParam, u as readStringParam } from "./runtime-api-D1xI_cvh.js";
|
|
10
|
-
import { t as applyMatrixProfileUpdate } from "./profile-update-
|
|
11
|
-
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-
|
|
10
|
+
import { t as applyMatrixProfileUpdate } from "./profile-update-C2My3TML.js";
|
|
11
|
+
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-DhMBWxOJ.js";
|
|
12
12
|
import { t as createMatrixRoomInfoResolver } from "./room-info-B6vKD5DF.js";
|
|
13
13
|
import { normalizeOptionalLowercaseString, uniqueStrings, uniqueValues } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
14
14
|
import { normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
|
|
2
|
-
import { i as withStartedActionClient, n as withResolvedActionClient } from "./client-
|
|
2
|
+
import { i as withStartedActionClient, n as withResolvedActionClient } from "./client-BwX6rURh.js";
|
|
3
3
|
import { n as formatMatrixEncryptionUnavailableError } from "./encryption-guidance-CbEFe38F.js";
|
|
4
4
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
5
5
|
import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { IRatio } from '../type.js';
|
|
2
|
-
export type StringEncoding = 'ascii' | 'utf8' | 'utf-16le' | 'ucs2' | 'base64url' | 'latin1' | 'hex';
|
|
2
|
+
export type StringEncoding = 'ascii' | 'utf8' | 'utf-16le' | 'utf-16be' | 'ucs2' | 'base64url' | 'latin1' | 'hex';
|
|
3
3
|
export declare function getBit(buf: Uint8Array, off: number, bit: number): boolean;
|
|
4
4
|
/**
|
|
5
5
|
* Find delimiting zero in uint8Array
|
|
@@ -12,7 +12,7 @@ export function getBit(buf, off, bit) {
|
|
|
12
12
|
*/
|
|
13
13
|
export function findZero(uint8Array, encoding) {
|
|
14
14
|
const len = uint8Array.length;
|
|
15
|
-
if (encoding === 'utf-16le') {
|
|
15
|
+
if (encoding === 'utf-16le' || encoding === 'utf-16be') {
|
|
16
16
|
// Look for 0x00 0x00 on 2-byte boundary
|
|
17
17
|
for (let i = 0; i + 1 < len; i += 2) {
|
|
18
18
|
if (uint8Array[i] === 0 && uint8Array[i + 1] === 0)
|
|
@@ -57,6 +57,12 @@ export function decodeString(uint8Array, encoding) {
|
|
|
57
57
|
throw new FieldDecodingError('Expected even number of octets for 16-bit unicode string');
|
|
58
58
|
return decodeString(swapBytes(uint8Array), encoding);
|
|
59
59
|
}
|
|
60
|
+
if (encoding === 'utf-16be') {
|
|
61
|
+
// There is no native UTF-16BE decoder; swap to UTF-16LE and decode that.
|
|
62
|
+
if ((uint8Array.length & 1) !== 0)
|
|
63
|
+
throw new FieldDecodingError('Expected even number of octets for 16-bit unicode string');
|
|
64
|
+
return new StringType(uint8Array.length, 'utf-16le').get(swapBytes(Uint8Array.from(uint8Array)), 0);
|
|
65
|
+
}
|
|
60
66
|
return new StringType(uint8Array.length, encoding).get(uint8Array, 0);
|
|
61
67
|
}
|
|
62
68
|
export function stripNulls(str) {
|