@openclaw/matrix 2026.6.6 → 2026.6.8-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -153,15 +153,17 @@ function configureCliLogMode(verbose) {
153
153
  setMatrixSdkLogMode(verbose ? "default" : "quiet");
154
154
  setMatrixSdkConsoleLogging(verbose);
155
155
  }
156
- function parseOptionalInt(value, fieldName) {
156
+ function parseOptionalInt(value, fieldName, opts = {}) {
157
157
  const trimmed = value?.trim();
158
158
  if (!trimmed) return;
159
159
  if (!/^-?\d+$/.test(trimmed)) throw new Error(`${fieldName} must be an integer`);
160
160
  const parsed = parseStrictInteger(trimmed);
161
161
  if (parsed === void 0) throw new Error(`${fieldName} must be an integer`);
162
+ if (opts.min !== void 0 && parsed < opts.min) throw new Error(opts.min === 1 ? `${fieldName} must be a positive integer` : `${fieldName} must be a non-negative integer`);
162
163
  return parsed;
163
164
  }
164
165
  async function addMatrixAccount(params) {
166
+ const initialSyncLimit = parseOptionalInt(params.initialSyncLimit, "--initial-sync-limit", { min: 0 });
165
167
  const runtime = getMatrixRuntime();
166
168
  const cfg = runtime.config.current();
167
169
  if (!matrixSetupAdapter.applyAccountConfig) throw new Error("Matrix account setup is unavailable.");
@@ -175,7 +177,7 @@ async function addMatrixAccount(params) {
175
177
  accessToken: params.accessToken,
176
178
  password: params.password,
177
179
  deviceName: params.deviceName,
178
- initialSyncLimit: parseOptionalInt(params.initialSyncLimit, "--initial-sync-limit"),
180
+ initialSyncLimit,
179
181
  useEnv: params.useEnv === true
180
182
  };
181
183
  const accountId = matrixSetupAdapter.resolveAccountId?.({
@@ -716,29 +718,34 @@ async function runMatrixCliVerificationSummaryCommand(params) {
716
718
  });
717
719
  }
718
720
  async function runMatrixCliSelfVerificationCommand(options) {
719
- const { accountId, cfg } = resolveMatrixCliAccountContext(options.account);
721
+ let resolvedAccountId;
720
722
  await runMatrixCliCommand({
721
723
  verbose: options.verbose === true,
722
724
  json: false,
723
- run: async () => await runMatrixSelfVerification({
724
- accountId,
725
- cfg,
726
- timeoutMs: parseOptionalInt(options.timeoutMs, "--timeout-ms"),
727
- onRequested: (summary) => {
728
- printAccountLabel(accountId);
729
- printMatrixVerificationSummary(summary);
730
- console.log("Accept this verification request in another Matrix client.");
731
- },
732
- onReady: (summary) => {
733
- console.log("Verification request accepted.");
734
- if (!summary.hasSas) console.log("Starting SAS verification...");
735
- },
736
- onSas: (summary) => {
737
- printMatrixVerificationSas(summary.sas ?? {});
738
- console.log("Compare this SAS with the other Matrix client.");
739
- },
740
- confirmSas: async () => await promptMatrixVerificationSasMatch()
741
- }),
725
+ run: async () => {
726
+ const timeoutMs = parseOptionalInt(options.timeoutMs, "--timeout-ms", { min: 1 });
727
+ const { accountId, cfg } = resolveMatrixCliAccountContext(options.account);
728
+ resolvedAccountId = accountId;
729
+ return await runMatrixSelfVerification({
730
+ accountId,
731
+ cfg,
732
+ timeoutMs,
733
+ onRequested: (summary) => {
734
+ printAccountLabel(accountId);
735
+ printMatrixVerificationSummary(summary);
736
+ console.log("Accept this verification request in another Matrix client.");
737
+ },
738
+ onReady: (summary) => {
739
+ console.log("Verification request accepted.");
740
+ if (!summary.hasSas) console.log("Starting SAS verification...");
741
+ },
742
+ onSas: (summary) => {
743
+ printMatrixVerificationSas(summary.sas ?? {});
744
+ console.log("Compare this SAS with the other Matrix client.");
745
+ },
746
+ confirmSas: async () => await promptMatrixVerificationSasMatch()
747
+ });
748
+ },
742
749
  onText: (summary, verbose) => {
743
750
  printMatrixVerificationSummary(summary);
744
751
  console.log(`Device verified by owner: ${summary.deviceOwnerVerified ? "yes" : "no"}`);
@@ -748,6 +755,7 @@ async function runMatrixCliSelfVerificationCommand(options) {
748
755
  console.log("Self-verification complete.");
749
756
  },
750
757
  onTextError: () => {
758
+ const accountId = resolvedAccountId ?? options.account;
751
759
  printGuidance([`Run ${formatMatrixCliCommand("verify self", accountId)} again and accept the request in another verified Matrix client for this account.`, `Then run ${formatMatrixCliCommand("verify status --verbose", accountId)} to confirm Cross-signing verified: yes and Signed by owner: yes.`]);
752
760
  },
753
761
  errorPrefix: "Self-verification failed"
@@ -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-Lx3osAvR.js");
5
+ const { registerMatrixCli } = await import("./cli-DIAzIKLC.js");
6
6
  registerMatrixCli({ program });
7
7
  }, { descriptors: [{
8
8
  name: "matrix",
@@ -1,2 +1,2 @@
1
- import { n as registerMatrixCliMetadata, t as cli_metadata_default } from "./cli-metadata-BeG8tm30.js";
1
+ import { n as registerMatrixCliMetadata, t as cli_metadata_default } from "./cli-metadata-CdRmBMLA.js";
2
2
  export { cli_metadata_default as default, registerMatrixCliMetadata };
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { n as registerMatrixCliMetadata } from "./cli-metadata-BeG8tm30.js";
1
+ import { n as registerMatrixCliMetadata } from "./cli-metadata-CdRmBMLA.js";
2
2
  import { registerMatrixSubagentHooks } from "./subagent-hooks-api.js";
3
3
  import { defineBundledChannelEntry } from "openclaw/plugin-sdk/channel-entry-contract";
4
4
  //#region extensions/matrix/index.ts
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@openclaw/matrix",
3
- "version": "2026.6.6",
3
+ "version": "2026.6.8-beta.2",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@openclaw/matrix",
9
- "version": "2026.6.6",
9
+ "version": "2026.6.8-beta.2",
10
10
  "dependencies": {
11
11
  "@matrix-org/matrix-sdk-crypto-nodejs": "0.6.0",
12
12
  "@matrix-org/matrix-sdk-crypto-wasm": "18.3.0",
@@ -18,7 +18,7 @@
18
18
  "zod": "4.4.3"
19
19
  },
20
20
  "peerDependencies": {
21
- "openclaw": ">=2026.6.6"
21
+ "openclaw": ">=2026.6.8-beta.2"
22
22
  },
23
23
  "peerDependenciesMeta": {
24
24
  "openclaw": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/matrix",
3
- "version": "2026.6.6",
3
+ "version": "2026.6.8-beta.2",
4
4
  "description": "OpenClaw Matrix channel plugin for rooms and direct messages.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -18,7 +18,7 @@
18
18
  "zod": "4.4.3"
19
19
  },
20
20
  "peerDependencies": {
21
- "openclaw": ">=2026.6.6"
21
+ "openclaw": ">=2026.6.8-beta.2"
22
22
  },
23
23
  "peerDependenciesMeta": {
24
24
  "openclaw": {
@@ -29,7 +29,7 @@
29
29
  "extensions": [
30
30
  "./index.ts"
31
31
  ],
32
- "setupEntry": "./setup-entry.ts",
32
+ "setupEntry": "./dist/setup-entry.js",
33
33
  "setupFeatures": {
34
34
  "configPromotion": true
35
35
  },
@@ -84,10 +84,10 @@
84
84
  "allowInvalidConfigRecovery": true
85
85
  },
86
86
  "compat": {
87
- "pluginApi": ">=2026.6.6"
87
+ "pluginApi": ">=2026.6.8-beta.2"
88
88
  },
89
89
  "build": {
90
- "openclawVersion": "2026.6.6"
90
+ "openclawVersion": "2026.6.8-beta.2"
91
91
  },
92
92
  "release": {
93
93
  "publishToClawHub": true,