@openclaw/matrix 2026.10.5-beta.1 → 2026.10.5-beta.3

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.
@@ -144,7 +144,7 @@ const matrixMessageActions = {
144
144
  return account.enabled && account.configured && createActionGate(account.config.actions)("messages") ? payload : null;
145
145
  },
146
146
  handleAction: async (ctx) => {
147
- const { handleMatrixAction } = await import("./tool-actions-DZvYw1pP.mjs");
147
+ const { handleMatrixAction } = await import("./tool-actions-DAp6_XSJ.mjs");
148
148
  return await handleMatrixAction(ctx);
149
149
  }
150
150
  };
@@ -735,8 +735,8 @@ function resolveMatrixOutboundSessionRoute(params) {
735
735
  }
736
736
  //#endregion
737
737
  //#region extensions/matrix/src/channel.ts
738
- const loadMatrixChannelRuntime = createLazyRuntimeNamedExport(() => import("./channel.runtime-wcXWqpVP.mjs"), "matrixChannelRuntime");
739
- const loadMatrixMonitorModule = createLazyRuntimeModule(() => import("./monitor-C9Azqr9G.mjs").catch((error) => {
738
+ const loadMatrixChannelRuntime = createLazyRuntimeNamedExport(() => import("./channel.runtime-CUc6rbu1.mjs"), "matrixChannelRuntime");
739
+ const loadMatrixMonitorModule = createLazyRuntimeModule(() => import("./monitor-Dk_fQL1k.mjs").catch((error) => {
740
740
  loadMatrixMonitorModule.clear();
741
741
  throw error;
742
742
  }));
@@ -1,7 +1,7 @@
1
1
  import { S as reconcileMatrixUnknownSend, o as sendTypingMatrix, r as sendMessageMatrix, x as cleanupMatrixDeliveryPlans } from "./send-LCOuTVc1.mjs";
2
2
  import { u as resolveMatrixAuth } from "./client-vPPbaxNp.mjs";
3
3
  import { n as listMatrixDirectoryGroupsLive, r as listMatrixDirectoryPeersLive } from "./directory-live-B1WbfSHo.mjs";
4
- import { t as matrixOutbound } from "./outbound-BUUQaZ6A.mjs";
4
+ import { t as matrixOutbound } from "./outbound-LR3SqPIq.mjs";
5
5
  import { t as resolveMatrixTargets } from "./resolve-targets-BVVbbvP6.mjs";
6
6
  import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
7
7
  import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
@@ -26,7 +26,7 @@ async function probeMatrix(params) {
26
26
  };
27
27
  const { createMatrixClient } = await loadMatrixProbeRuntimeDeps();
28
28
  const inputUserId = normalizeOptionalString(params.userId);
29
- const userId = await (await createMatrixClient({
29
+ const client = await createMatrixClient({
30
30
  homeserver: params.homeserver,
31
31
  userId: void 0,
32
32
  accessToken: params.accessToken,
@@ -37,16 +37,21 @@ async function probeMatrix(params) {
37
37
  allowPrivateNetwork: params.allowPrivateNetwork,
38
38
  ssrfPolicy: params.ssrfPolicy,
39
39
  dispatcherPolicy: params.dispatcherPolicy
40
- })).getUserId();
41
- if (inputUserId && inputUserId !== userId) return {
42
- ...result,
43
- error: "Matrix access token user does not match configured userId"
44
- };
45
- return {
46
- ...result,
47
- ok: true,
48
- userId
49
- };
40
+ });
41
+ try {
42
+ const userId = await client.getUserId();
43
+ if (inputUserId && inputUserId !== userId) return {
44
+ ...result,
45
+ error: "Matrix access token user does not match configured userId"
46
+ };
47
+ return {
48
+ ...result,
49
+ ok: true,
50
+ userId
51
+ };
52
+ } finally {
53
+ await client.stopWithoutPersist();
54
+ }
50
55
  }, (error) => ({
51
56
  ok: false,
52
57
  status: typeof error === "object" && error && "statusCode" in error ? Number(error.statusCode) : null,
@@ -1,7 +1,7 @@
1
1
  import { t as getMatrixRuntime } from "./runtime-1kn1P6io.mjs";
2
2
  import { a as resolveMatrixAccountConfig, i as resolveMatrixAccountAllowlistConfig } from "./account-config-CRsKoMqJ.mjs";
3
3
  import { h as resolveConfiguredMatrixBotUserIds } from "./setup-core-CKnNTfgD.mjs";
4
- import { a as resolveMatrixThreadRouting, i as resolveMatrixInboundRoute, n as resolveMatrixStoredSessionMeta, o as resolveMatrixRoomConfig } from "./channel-By05lEQz.mjs";
4
+ import { a as resolveMatrixThreadRouting, i as resolveMatrixInboundRoute, n as resolveMatrixStoredSessionMeta, o as resolveMatrixRoomConfig } from "./channel-BcwGspPw.mjs";
5
5
  import { a as resolveMatrixAllowListMatch, i as normalizeMatrixUserId, r as normalizeMatrixAllowList } from "./channel.setup-CwuYD_CT.mjs";
6
6
  import { n as isMatrixQualifiedUserId, r as isMatrixRoomId, t as isMatrixInviteAutoJoinTarget } from "./target-ids-HhcaKX1n.mjs";
7
7
  import { a as MATRIX_REACTION_EVENT_TYPE } from "./send-currentness-C2rMVVIQ.mjs";
@@ -11,7 +11,7 @@ import { t as createMatrixThreadBindingManager } from "./thread-bindings-CT4P-OS
11
11
  import { i as readMatrixMessages, u as fetchMatrixPollSnapshot } from "./messages-B1CZqU8u.mjs";
12
12
  import { a as isMatrixStartupAbortError, c as getMatrixMonitorTaskSignal, d as resolveMatrixAuthContext, l as backfillMatrixAuthDeviceIdAfterStartup, n as acquireSharedMatrixClient, o as throwIfMatrixStartupAborted, s as createMatrixMonitorTaskRunner, u as resolveMatrixAuth } from "./client-vPPbaxNp.mjs";
13
13
  import { i as isMatrixMediaSizeLimitError, r as MatrixMediaSizeLimitError } from "./http-client-ByR4STVQ.mjs";
14
- import { n as prepareMatrixReplyPayload, r as resolveMatrixExtraContent } from "./outbound-BUUQaZ6A.mjs";
14
+ import { n as prepareMatrixReplyPayload, r as resolveMatrixExtraContent } from "./outbound-LR3SqPIq.mjs";
15
15
  import { t as resolveMatrixTargets } from "./resolve-targets-BVVbbvP6.mjs";
16
16
  import { t as formatMatrixEncryptedEventDisabledWarning } from "./encryption-guidance-D5_IsDIy.mjs";
17
17
  import { createMatrixInboundEventDeduper } from "./inbound-dedupe-C-EBGY0B.mjs";
@@ -1577,7 +1577,7 @@ function formatMatrixToolProgressMarkdownCode(text) {
1577
1577
  const loadMatrixSendModule = createLazyRuntimeModule(() => import("./send-LCOuTVc1.mjs").then((n) => n.s));
1578
1578
  const loadAcpBindingRuntime = createLazyRuntimeModule(() => import("openclaw/plugin-sdk/acp-binding-runtime"));
1579
1579
  const loadSessionBindingRuntime = createLazyRuntimeModule(() => import("openclaw/plugin-sdk/session-binding-runtime"));
1580
- const loadMatrixReactionEvents = createLazyRuntimeModule(() => import("./reaction-events-D2lfkfaX.mjs"));
1580
+ const loadMatrixReactionEvents = createLazyRuntimeModule(() => import("./reaction-events-CTSvOlXO.mjs"));
1581
1581
  const loadMatrixDraftStream = createLazyRuntimeModule(() => import("./draft-stream-Bdrh7dRt.mjs"));
1582
1582
  async function matrixTextWouldActivateMentions(client, text) {
1583
1583
  const { resolveMatrixMentionsForBody } = await loadMatrixSendModule();
@@ -1,4 +1,4 @@
1
- import { r as matrixPresentationCapabilities } from "./channel-By05lEQz.mjs";
1
+ import { r as matrixPresentationCapabilities } from "./channel-BcwGspPw.mjs";
2
2
  import { i as sendPollMatrix, r as sendMessageMatrix } from "./send-LCOuTVc1.mjs";
3
3
  import { createMessageReceiptFromOutboundResults, createReplyToFanout, resolveOutboundSendDep } from "openclaw/plugin-sdk/channel-outbound";
4
4
  import { asOptionalRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
@@ -1,5 +1,5 @@
1
1
  import { a as resolveMatrixAccountConfig } from "./account-config-CRsKoMqJ.mjs";
2
- import { a as resolveMatrixThreadRouting, i as resolveMatrixInboundRoute } from "./channel-By05lEQz.mjs";
2
+ import { a as resolveMatrixThreadRouting, i as resolveMatrixInboundRoute } from "./channel-BcwGspPw.mjs";
3
3
  import { c as extractMatrixReactionAnnotation } from "./send-currentness-C2rMVVIQ.mjs";
4
4
  import { p as resolveMatrixThreadRootId } from "./direct-management-B3wYhx_M.mjs";
5
5
  import { i as resolveMatrixApprovalReactionTargetWithPersistence, o as unregisterMatrixApprovalReactionTargetsForApproval } from "./approval-reactions-DhB6gNPU.mjs";
@@ -8,7 +8,7 @@ import { isApprovalNotFoundError } from "openclaw/plugin-sdk/error-runtime";
8
8
  import { normalizeAccountId } from "openclaw/plugin-sdk/routing";
9
9
  import { getSessionBindingService } from "openclaw/plugin-sdk/session-binding-runtime";
10
10
  //#region extensions/matrix/src/matrix/monitor/reaction-events.ts
11
- const loadApprovalReactionAuth = createLazyRuntimeModule(() => import("./channel-By05lEQz.mjs").then((n) => n.s));
11
+ const loadApprovalReactionAuth = createLazyRuntimeModule(() => import("./channel-BcwGspPw.mjs").then((n) => n.s));
12
12
  const loadExecApprovalResolver = createLazyRuntimeModule(() => import("openclaw/plugin-sdk/approval-gateway-runtime"));
13
13
  const loadMatrixSend = createLazyRuntimeModule(() => import("./send-LCOuTVc1.mjs").then((n) => n.s));
14
14
  function buildMatrixApprovalTerminalText(result) {
@@ -1,6 +1,6 @@
1
1
  import { a as resolveMatrixAccountConfig, o as resolveMatrixBaseConfig } from "./account-config-CRsKoMqJ.mjs";
2
2
  import { g as resolveDefaultMatrixAccountId } from "./setup-core-CKnNTfgD.mjs";
3
- import { o as resolveMatrixRoomConfig } from "./channel-By05lEQz.mjs";
3
+ import { o as resolveMatrixRoomConfig } from "./channel-BcwGspPw.mjs";
4
4
  import { a as normalizeMatrixResolvableTarget } from "./target-ids-HhcaKX1n.mjs";
5
5
  import { l as selectOwnMatrixReactionEventIds, s as buildMatrixReactionRelationsPath, u as summarizeMatrixReactionEvents } from "./send-currentness-C2rMVVIQ.mjs";
6
6
  import { c as isStrictDirectMembership, s as hasDirectMatrixMemberFlag, u as readJoinedMatrixMembers } from "./direct-management-B3wYhx_M.mjs";
package/dist/api.js CHANGED
@@ -2,7 +2,7 @@ import { a as resolveConfiguredMatrixAccountIds, i as requiresExplicitMatrixDefa
2
2
  import { n as listMatrixEnvAccountIds, r as resolveMatrixEnvAccountToken, t as getMatrixScopedEnvVarNames } from "./.setup/env-vars-aEBngJPa.mjs";
3
3
  import { a as resolveMatrixCredentialsFilename, i as resolveMatrixCredentialsDir, l as sanitizeMatrixPathSegment, o as resolveMatrixCredentialsPath, r as resolveMatrixAccountStorageRoot, s as resolveMatrixHomeserverKey, t as hashMatrixAccessToken } from "./.setup/storage-paths-B51JM-pC.mjs";
4
4
  import { r as matrixSetupAdapter, t as createMatrixSetupWizardProxy } from "./.setup/setup-core-CKnNTfgD.mjs";
5
- import { t as matrixPlugin } from "./.setup/channel-By05lEQz.mjs";
5
+ import { t as matrixPlugin } from "./.setup/channel-BcwGspPw.mjs";
6
6
  import { d as setMatrixThreadBindingMaxAgeBySessionKey, l as setMatrixThreadBindingIdleTimeoutBySessionKey, n as getMatrixThreadBindingManager } from "./.setup/thread-bindings-shared-CbsFNbAY.mjs";
7
7
  import { t as matrixOnboardingAdapter } from "./.setup/onboarding-CrSexor_.mjs";
8
8
  import { t as createMatrixThreadBindingManager } from "./.setup/thread-bindings-CT4P-OSZ.mjs";
@@ -1,2 +1,2 @@
1
- import { t as matrixPlugin } from "./.setup/channel-By05lEQz.mjs";
1
+ import { t as matrixPlugin } from "./.setup/channel-BcwGspPw.mjs";
2
2
  export { matrixPlugin };
@@ -1,16 +1,6 @@
1
1
  import { IWidgetApiRequest, IWidgetApiRequestData } from "./IWidgetApiRequest";
2
2
  import { IWidgetApiResponseData } from "./IWidgetApiResponse";
3
3
  import { WidgetApiFromWidgetAction } from "./WidgetApiAction";
4
- /**
5
- * The MatrixRTC member a LiveKit request is made for.
6
- * @see {@link https://github.com/matrix-org/matrix-spec-proposals/pull/4195|MSC4195}
7
- */
8
- export interface IRtcLivekitMember {
9
- /** The identifier of the member within the MatrixRTC session. */
10
- id: string;
11
- /** The device ID the member claims to be using. */
12
- claimed_device_id?: string;
13
- }
14
4
  export interface IRtcLivekitGetTokenFromWidgetRequestData extends IWidgetApiRequestData {
15
5
  /** The name of the homeserver hosting the MatrixRTC session. */
16
6
  server_name: string;
@@ -20,7 +10,8 @@ export interface IRtcLivekitGetTokenFromWidgetRequestData extends IWidgetApiRequ
20
10
  room_id: string;
21
11
  /** The MatrixRTC session (slot) to join. */
22
12
  slot_id: string;
23
- member: IRtcLivekitMember;
13
+ /** The `member.id` property of the `m.rtc.member` event. */
14
+ member_id: string;
24
15
  }
25
16
  export interface IRtcLivekitGetTokenFromWidgetActionRequest extends IWidgetApiRequest {
26
17
  action: WidgetApiFromWidgetAction.MSC4533RtcLivekitGetToken;
@@ -34,11 +25,14 @@ export interface IRtcLivekitGetTokenFromWidgetActionResponse extends IRtcLivekit
34
25
  response: IRtcLivekitGetTokenFromWidgetResponseData;
35
26
  }
36
27
  export interface IRtcLivekitDelegateDelayedLeaveFromWidgetRequestData extends IWidgetApiRequestData {
28
+ /** The WebSocket URL of the LiveKit SFU that the user has connected to. */
29
+ url: string;
37
30
  /** The room the MatrixRTC session belongs to. */
38
31
  room_id: string;
39
32
  /** The MatrixRTC session (slot) the delayed leave event belongs to. */
40
33
  slot_id: string;
41
- member: IRtcLivekitMember;
34
+ /** The `member.id` property of the `m.rtc.member` event. */
35
+ member_id: string;
42
36
  /** The ID of the delayed leave event to hand over to the server. */
43
37
  delay_id: string;
44
38
  }
@@ -1 +1 @@
1
- {"version":3,"file":"RtcLivekitActions.js","names":[],"sources":["../../src/interfaces/RtcLivekitActions.ts"],"sourcesContent":["/*\n * Copyright 2026 The Matrix.org Foundation C.I.C.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { IWidgetApiRequest, IWidgetApiRequestData } from \"./IWidgetApiRequest\";\nimport { IWidgetApiResponseData } from \"./IWidgetApiResponse\";\nimport { WidgetApiFromWidgetAction } from \"./WidgetApiAction\";\n\n/**\n * The MatrixRTC member a LiveKit request is made for.\n * @see {@link https://github.com/matrix-org/matrix-spec-proposals/pull/4195|MSC4195}\n */\nexport interface IRtcLivekitMember {\n /** The identifier of the member within the MatrixRTC session. */\n id: string;\n /** The device ID the member claims to be using. */\n claimed_device_id?: string; // eslint-disable-line camelcase\n}\n\nexport interface IRtcLivekitGetTokenFromWidgetRequestData extends IWidgetApiRequestData {\n /** The name of the homeserver hosting the MatrixRTC session. */\n server_name: string; // eslint-disable-line camelcase\n /** The URL of the LiveKit SFU to obtain a token for. */\n url: string;\n /** The room the MatrixRTC session belongs to. */\n room_id: string; // eslint-disable-line camelcase\n /** The MatrixRTC session (slot) to join. */\n slot_id: string; // eslint-disable-line camelcase\n member: IRtcLivekitMember;\n}\n\nexport interface IRtcLivekitGetTokenFromWidgetActionRequest extends IWidgetApiRequest {\n action: WidgetApiFromWidgetAction.MSC4533RtcLivekitGetToken;\n data: IRtcLivekitGetTokenFromWidgetRequestData;\n}\n\nexport interface IRtcLivekitGetTokenFromWidgetResponseData extends IWidgetApiResponseData {\n /** The JWT to authenticate against the SFU with. */\n jwt: string;\n}\n\nexport interface IRtcLivekitGetTokenFromWidgetActionResponse extends IRtcLivekitGetTokenFromWidgetActionRequest {\n response: IRtcLivekitGetTokenFromWidgetResponseData;\n}\n\nexport interface IRtcLivekitDelegateDelayedLeaveFromWidgetRequestData extends IWidgetApiRequestData {\n /** The room the MatrixRTC session belongs to. */\n room_id: string; // eslint-disable-line camelcase\n /** The MatrixRTC session (slot) the delayed leave event belongs to. */\n slot_id: string; // eslint-disable-line camelcase\n member: IRtcLivekitMember;\n /** The ID of the delayed leave event to hand over to the server. */\n delay_id: string; // eslint-disable-line camelcase\n}\n\nexport interface IRtcLivekitDelegateDelayedLeaveFromWidgetActionRequest extends IWidgetApiRequest {\n action: WidgetApiFromWidgetAction.MSC4533RtcLivekitDelegateDelayedLeave;\n data: IRtcLivekitDelegateDelayedLeaveFromWidgetRequestData;\n}\n\nexport interface IRtcLivekitDelegateDelayedLeaveFromWidgetResponseData extends IWidgetApiResponseData {\n // nothing\n}\n\nexport interface IRtcLivekitDelegateDelayedLeaveFromWidgetActionResponse\n extends IRtcLivekitDelegateDelayedLeaveFromWidgetActionRequest {\n response: IRtcLivekitDelegateDelayedLeaveFromWidgetResponseData;\n}\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"RtcLivekitActions.js","names":[],"sources":["../../src/interfaces/RtcLivekitActions.ts"],"sourcesContent":["/*\n * Copyright 2026 The Matrix.org Foundation C.I.C.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { IWidgetApiRequest, IWidgetApiRequestData } from \"./IWidgetApiRequest\";\nimport { IWidgetApiResponseData } from \"./IWidgetApiResponse\";\nimport { WidgetApiFromWidgetAction } from \"./WidgetApiAction\";\n\nexport interface IRtcLivekitGetTokenFromWidgetRequestData extends IWidgetApiRequestData {\n /** The name of the homeserver hosting the MatrixRTC session. */\n server_name: string; // eslint-disable-line camelcase\n /** The URL of the LiveKit SFU to obtain a token for. */\n url: string;\n /** The room the MatrixRTC session belongs to. */\n room_id: string; // eslint-disable-line camelcase\n /** The MatrixRTC session (slot) to join. */\n slot_id: string; // eslint-disable-line camelcase\n /** The `member.id` property of the `m.rtc.member` event. */\n member_id: string;\n}\n\nexport interface IRtcLivekitGetTokenFromWidgetActionRequest extends IWidgetApiRequest {\n action: WidgetApiFromWidgetAction.MSC4533RtcLivekitGetToken;\n data: IRtcLivekitGetTokenFromWidgetRequestData;\n}\n\nexport interface IRtcLivekitGetTokenFromWidgetResponseData extends IWidgetApiResponseData {\n /** The JWT to authenticate against the SFU with. */\n jwt: string;\n}\n\nexport interface IRtcLivekitGetTokenFromWidgetActionResponse extends IRtcLivekitGetTokenFromWidgetActionRequest {\n response: IRtcLivekitGetTokenFromWidgetResponseData;\n}\n\nexport interface IRtcLivekitDelegateDelayedLeaveFromWidgetRequestData extends IWidgetApiRequestData {\n /** The WebSocket URL of the LiveKit SFU that the user has connected to. */\n url: string;\n /** The room the MatrixRTC session belongs to. */\n room_id: string; // eslint-disable-line camelcase\n /** The MatrixRTC session (slot) the delayed leave event belongs to. */\n slot_id: string; // eslint-disable-line camelcase\n /** The `member.id` property of the `m.rtc.member` event. */\n member_id: string;\n /** The ID of the delayed leave event to hand over to the server. */\n delay_id: string; // eslint-disable-line camelcase\n}\n\nexport interface IRtcLivekitDelegateDelayedLeaveFromWidgetActionRequest extends IWidgetApiRequest {\n action: WidgetApiFromWidgetAction.MSC4533RtcLivekitDelegateDelayedLeave;\n data: IRtcLivekitDelegateDelayedLeaveFromWidgetRequestData;\n}\n\nexport interface IRtcLivekitDelegateDelayedLeaveFromWidgetResponseData extends IWidgetApiResponseData {\n // nothing\n}\n\nexport interface IRtcLivekitDelegateDelayedLeaveFromWidgetActionResponse\n extends IRtcLivekitDelegateDelayedLeaveFromWidgetActionRequest {\n response: IRtcLivekitDelegateDelayedLeaveFromWidgetResponseData;\n}\n"],"mappings":"","ignoreList":[]}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "matrix-widget-api",
3
- "version": "1.19.0",
3
+ "version": "1.20.0",
4
4
  "description": "Matrix Widget API SDK",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -18,17 +18,6 @@ import { IWidgetApiRequest, IWidgetApiRequestData } from "./IWidgetApiRequest";
18
18
  import { IWidgetApiResponseData } from "./IWidgetApiResponse";
19
19
  import { WidgetApiFromWidgetAction } from "./WidgetApiAction";
20
20
 
21
- /**
22
- * The MatrixRTC member a LiveKit request is made for.
23
- * @see {@link https://github.com/matrix-org/matrix-spec-proposals/pull/4195|MSC4195}
24
- */
25
- export interface IRtcLivekitMember {
26
- /** The identifier of the member within the MatrixRTC session. */
27
- id: string;
28
- /** The device ID the member claims to be using. */
29
- claimed_device_id?: string; // eslint-disable-line camelcase
30
- }
31
-
32
21
  export interface IRtcLivekitGetTokenFromWidgetRequestData extends IWidgetApiRequestData {
33
22
  /** The name of the homeserver hosting the MatrixRTC session. */
34
23
  server_name: string; // eslint-disable-line camelcase
@@ -38,7 +27,8 @@ export interface IRtcLivekitGetTokenFromWidgetRequestData extends IWidgetApiRequ
38
27
  room_id: string; // eslint-disable-line camelcase
39
28
  /** The MatrixRTC session (slot) to join. */
40
29
  slot_id: string; // eslint-disable-line camelcase
41
- member: IRtcLivekitMember;
30
+ /** The `member.id` property of the `m.rtc.member` event. */
31
+ member_id: string;
42
32
  }
43
33
 
44
34
  export interface IRtcLivekitGetTokenFromWidgetActionRequest extends IWidgetApiRequest {
@@ -56,11 +46,14 @@ export interface IRtcLivekitGetTokenFromWidgetActionResponse extends IRtcLivekit
56
46
  }
57
47
 
58
48
  export interface IRtcLivekitDelegateDelayedLeaveFromWidgetRequestData extends IWidgetApiRequestData {
49
+ /** The WebSocket URL of the LiveKit SFU that the user has connected to. */
50
+ url: string;
59
51
  /** The room the MatrixRTC session belongs to. */
60
52
  room_id: string; // eslint-disable-line camelcase
61
53
  /** The MatrixRTC session (slot) the delayed leave event belongs to. */
62
54
  slot_id: string; // eslint-disable-line camelcase
63
- member: IRtcLivekitMember;
55
+ /** The `member.id` property of the `m.rtc.member` event. */
56
+ member_id: string;
64
57
  /** The ID of the delayed leave event to hand over to the server. */
65
58
  delay_id: string; // eslint-disable-line camelcase
66
59
  }
@@ -92,7 +92,7 @@ console.log(concatUint8Arrays([a, b]));
92
92
  //=> Uint8Array [1, 2, 3, 4, 5, 6]
93
93
  ```
94
94
  */
95
- export function concatUint8Arrays(arrays: Uint8Array[], totalLength?: number): Uint8Array<ArrayBuffer>;
95
+ export function concatUint8Arrays(arrays: Array<Uint8Array | ArrayBuffer>, totalLength?: number): Uint8Array<ArrayBuffer>;
96
96
 
97
97
  /**
98
98
  Check if two arrays are identical by verifying that they contain the same bytes in the same sequence.
@@ -114,7 +114,7 @@ console.log(areUint8ArraysEqual(a, c));
114
114
  //=> false
115
115
  ```
116
116
  */
117
- export function areUint8ArraysEqual(a: Uint8Array, b: Uint8Array): boolean;
117
+ export function areUint8ArraysEqual(a: Uint8Array | ArrayBuffer, b: Uint8Array | ArrayBuffer): boolean;
118
118
 
119
119
  /**
120
120
  Compare two arrays and indicate their relative order or equality. Useful for sorting.
@@ -133,7 +133,7 @@ const array3 = new Uint8Array([7, 8, 9]);
133
133
  //=> [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
134
134
  ```
135
135
  */
136
- export function compareUint8Arrays(a: Uint8Array, b: Uint8Array): 0 | 1 | -1;
136
+ export function compareUint8Arrays(a: Uint8Array | ArrayBuffer, b: Uint8Array | ArrayBuffer): 0 | 1 | -1;
137
137
 
138
138
  /**
139
139
  Convert a `Uint8Array` to a string.
@@ -193,7 +193,7 @@ console.log(uint8ArrayToBase64(byteArray));
193
193
  //=> 'SGVsbG8='
194
194
  ```
195
195
  */
196
- export function uint8ArrayToBase64(array: Uint8Array, options?: {urlSafe: boolean}): string;
196
+ export function uint8ArrayToBase64(array: Uint8Array | ArrayBuffer, options?: {urlSafe: boolean}): string;
197
197
 
198
198
  /**
199
199
  Convert a Base64-encoded or [Base64URL](https://base64.guru/standards/base64url)-encoded string to a `Uint8Array`.
@@ -261,7 +261,7 @@ console.log(uint8ArrayToHex(byteArray));
261
261
  //=> '48656c6c6f'
262
262
  ```
263
263
  */
264
- export function uint8ArrayToHex(array: Uint8Array): string;
264
+ export function uint8ArrayToHex(array: Uint8Array | ArrayBuffer): string;
265
265
 
266
266
  /**
267
267
  Convert a Hex string to a `Uint8Array`.
@@ -310,7 +310,7 @@ console.log(indexOf(byteArray, new Uint8Array([0x78, 0x90])));
310
310
  //=> 3
311
311
  ```
312
312
  */
313
- export function indexOf(array: Uint8Array, value: Uint8Array): number;
313
+ export function indexOf(array: Uint8Array | ArrayBuffer, value: Uint8Array | ArrayBuffer): number;
314
314
 
315
315
  /**
316
316
  Checks if the given sequence of bytes (`value`) is within the given `Uint8Array` (`array`).
@@ -328,4 +328,4 @@ console.log(includes(byteArray, new Uint8Array([0x78, 0x90])));
328
328
  //=> true
329
329
  ```
330
330
  */
331
- export function includes(array: Uint8Array, value: Uint8Array): boolean;
331
+ export function includes(array: Uint8Array | ArrayBuffer, value: Uint8Array | ArrayBuffer): boolean;
@@ -26,6 +26,10 @@ function isUint8ArrayOrArrayBuffer(value) {
26
26
  return isUint8Array(value) || isArrayBuffer(value);
27
27
  }
28
28
 
29
+ function toUint8ArrayIfArrayBuffer(value) {
30
+ return isArrayBuffer(value) ? new Uint8Array(value) : value;
31
+ }
32
+
29
33
  export function assertUint8Array(value) {
30
34
  if (!isUint8Array(value)) {
31
35
  throw new TypeError(`Expected \`Uint8Array\`, got \`${typeof value}\``);
@@ -55,13 +59,14 @@ export function concatUint8Arrays(arrays, totalLength) {
55
59
  return new Uint8Array(0);
56
60
  }
57
61
 
58
- totalLength ??= arrays.reduce((accumulator, currentValue) => accumulator + currentValue.length, 0);
62
+ totalLength ??= arrays.reduce((accumulator, currentValue) => accumulator + currentValue.byteLength, 0);
59
63
 
60
64
  const returnValue = new Uint8Array(totalLength);
61
65
 
62
66
  let offset = 0;
63
- for (const array of arrays) {
64
- assertUint8Array(array);
67
+ for (let array of arrays) {
68
+ assertUint8ArrayOrArrayBuffer(array);
69
+ array = toUint8ArrayIfArrayBuffer(array);
65
70
  returnValue.set(array, offset);
66
71
  offset += array.length;
67
72
  }
@@ -70,8 +75,10 @@ export function concatUint8Arrays(arrays, totalLength) {
70
75
  }
71
76
 
72
77
  export function areUint8ArraysEqual(a, b) {
73
- assertUint8Array(a);
74
- assertUint8Array(b);
78
+ assertUint8ArrayOrArrayBuffer(a);
79
+ assertUint8ArrayOrArrayBuffer(b);
80
+ a = toUint8ArrayIfArrayBuffer(a);
81
+ b = toUint8ArrayIfArrayBuffer(b);
75
82
 
76
83
  if (a === b) {
77
84
  return true;
@@ -92,8 +99,10 @@ export function areUint8ArraysEqual(a, b) {
92
99
  }
93
100
 
94
101
  export function compareUint8Arrays(a, b) {
95
- assertUint8Array(a);
96
- assertUint8Array(b);
102
+ assertUint8ArrayOrArrayBuffer(a);
103
+ assertUint8ArrayOrArrayBuffer(b);
104
+ a = toUint8ArrayIfArrayBuffer(a);
105
+ b = toUint8ArrayIfArrayBuffer(b);
97
106
 
98
107
  const length = Math.min(a.length, b.length);
99
108
 
@@ -147,7 +156,8 @@ function base64UrlToBase64(base64url) {
147
156
  const MAX_BLOCK_SIZE = 65_535;
148
157
 
149
158
  export function uint8ArrayToBase64(array, {urlSafe = false} = {}) {
150
- assertUint8Array(array);
159
+ assertUint8ArrayOrArrayBuffer(array);
160
+ array = toUint8ArrayIfArrayBuffer(array);
151
161
 
152
162
  let base64 = '';
153
163
 
@@ -178,7 +188,8 @@ export function base64ToString(base64String) {
178
188
  const byteToHexLookupTable = Array.from({length: 256}, (_, index) => index.toString(16).padStart(2, '0'));
179
189
 
180
190
  export function uint8ArrayToHex(array) {
181
- assertUint8Array(array);
191
+ assertUint8ArrayOrArrayBuffer(array);
192
+ array = toUint8ArrayIfArrayBuffer(array);
182
193
 
183
194
  // Concatenating a string is faster than using an array.
184
195
  let hexString = '';
@@ -273,11 +284,14 @@ export function getUintBE(view) {
273
284
  }
274
285
 
275
286
  /**
276
- @param {Uint8Array} array
277
- @param {Uint8Array} value
287
+ @param {Uint8Array | ArrayBuffer} array
288
+ @param {Uint8Array | ArrayBuffer} value
278
289
  @returns {number}
279
290
  */
280
291
  export function indexOf(array, value) {
292
+ array = toUint8ArrayIfArrayBuffer(array);
293
+ value = toUint8ArrayIfArrayBuffer(value);
294
+
281
295
  const arrayLength = array.length;
282
296
  const valueLength = value.length;
283
297
 
@@ -309,8 +323,8 @@ export function indexOf(array, value) {
309
323
  }
310
324
 
311
325
  /**
312
- @param {Uint8Array} array
313
- @param {Uint8Array} value
326
+ @param {Uint8Array | ArrayBuffer} array
327
+ @param {Uint8Array | ArrayBuffer} value
314
328
  @returns {boolean}
315
329
  */
316
330
  export function includes(array, value) {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uint8array-extras",
3
- "version": "1.5.0",
3
+ "version": "1.6.0",
4
4
  "description": "Useful utilities for working with Uint8Array (and Buffer)",
5
5
  "license": "MIT",
6
6
  "repository": "sindresorhus/uint8array-extras",
@@ -20,7 +20,7 @@
20
20
  "node": ">=18"
21
21
  },
22
22
  "scripts": {
23
- "test": "xo && ava && tsc index.d.ts"
23
+ "test": "xo && ava && tsc --lib es2023 index.d.ts"
24
24
  },
25
25
  "files": [
26
26
  "index.js",
@@ -46,9 +46,9 @@
46
46
  "hexadecimal"
47
47
  ],
48
48
  "devDependencies": {
49
- "ava": "^6.0.1",
50
- "typescript": "^5.3.3",
51
- "xo": "^0.56.0",
52
- "benchmark": "2.1.4"
49
+ "ava": "^6.4.1",
50
+ "benchmark": "2.1.4",
51
+ "typescript": "^5.9.3",
52
+ "xo": "^1.2.3"
53
53
  }
54
54
  }
@@ -86,7 +86,7 @@ This can be useful for converting a `Buffer` to a pure `Uint8Array`. `Buffer` is
86
86
 
87
87
  Tip: If you want a copy, just call `.slice()` on the return value.
88
88
 
89
- ### `concatUint8Arrays(arrays: Uint8Array[], totalLength?: number): Uint8Array`
89
+ ### `concatUint8Arrays(arrays: Array<Uint8Array | ArrayBuffer>, totalLength?: number): Uint8Array`
90
90
 
91
91
  Concatenate the given arrays into a new array.
92
92
 
@@ -106,7 +106,7 @@ console.log(concatUint8Arrays([a, b]));
106
106
  //=> Uint8Array [1, 2, 3, 4, 5, 6]
107
107
  ```
108
108
 
109
- ### `areUint8ArraysEqual(a: Uint8Array, b: Uint8Array): boolean`
109
+ ### `areUint8ArraysEqual(a: Uint8Array | ArrayBuffer, b: Uint8Array | ArrayBuffer): boolean`
110
110
 
111
111
  Check if two arrays are identical by verifying that they contain the same bytes in the same sequence.
112
112
 
@@ -126,7 +126,7 @@ console.log(areUint8ArraysEqual(a, c));
126
126
  //=> false
127
127
  ```
128
128
 
129
- ### `compareUint8Arrays(a: Uint8Array, b: Uint8Array): 0 | 1 | -1`
129
+ ### `compareUint8Arrays(a: Uint8Array | ArrayBuffer, b: Uint8Array | ArrayBuffer): 0 | 1 | -1`
130
130
 
131
131
  Compare two arrays and indicate their relative order or equality. Useful for sorting.
132
132
 
@@ -180,7 +180,7 @@ console.log(stringToUint8Array('Hello'));
180
180
  //=> Uint8Array [72, 101, 108, 108, 111]
181
181
  ```
182
182
 
183
- ### `uint8ArrayToBase64(array: Uint8Array, options?: {urlSafe: boolean}): string`
183
+ ### `uint8ArrayToBase64(array: Uint8Array | ArrayBuffer, options?: {urlSafe: boolean}): string`
184
184
 
185
185
  Convert a `Uint8Array` to a Base64-encoded string.
186
186
 
@@ -242,7 +242,7 @@ console.log(base64ToString('SGVsbG8='));
242
242
  //=> 'Hello'
243
243
  ```
244
244
 
245
- ### `uint8ArrayToHex(array: Uint8Array): string`
245
+ ### `uint8ArrayToHex(array: Uint8Array | ArrayBuffer): string`
246
246
 
247
247
  Convert a `Uint8Array` to a Hex string.
248
248
 
@@ -285,7 +285,7 @@ console.log(getUintBE(new DataView(byteArray.buffer)));
285
285
  //=> 20015998341291
286
286
  ```
287
287
 
288
- ### `indexOf(array: Uint8Array, value: Uint8Array): number`
288
+ ### `indexOf(array: Uint8Array | ArrayBuffer, value: Uint8Array | ArrayBuffer): number`
289
289
 
290
290
  Find the index of the first occurrence of the given sequence of bytes (`value`) within the given `Uint8Array` (`array`).
291
291
 
@@ -300,7 +300,7 @@ console.log(indexOf(byteArray, new Uint8Array([0x78, 0x90])));
300
300
  //=> 3
301
301
  ```
302
302
 
303
- ### `includes(array: Uint8Array, value: Uint8Array): boolean`
303
+ ### `includes(array: Uint8Array | ArrayBuffer, value: Uint8Array | ArrayBuffer): boolean`
304
304
 
305
305
  Checks if the given sequence of bytes (`value`) is within the given `Uint8Array` (`array`).
306
306
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/matrix",
3
- "version": "2026.10.5-beta.1",
3
+ "version": "2026.10.5-beta.3",
4
4
  "description": "OpenClaw Matrix channel plugin for rooms and direct messages.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -19,7 +19,7 @@
19
19
  "zod": "4.6.5"
20
20
  },
21
21
  "peerDependencies": {
22
- "openclaw": ">=2026.10.5-beta.1"
22
+ "openclaw": ">=2026.10.5-beta.3"
23
23
  },
24
24
  "peerDependenciesMeta": {
25
25
  "openclaw": {
@@ -169,11 +169,11 @@
169
169
  "allowInvalidConfigRecovery": true
170
170
  },
171
171
  "compat": {
172
- "pluginApi": ">=2026.10.5-beta.1"
172
+ "pluginApi": ">=2026.10.5-beta.3"
173
173
  },
174
174
  "build": {
175
175
  "bundledDist": false,
176
- "openclawVersion": "2026.10.5-beta.1"
176
+ "openclawVersion": "2026.10.5-beta.3"
177
177
  },
178
178
  "release": {
179
179
  "publishToClawHub": true,