@openclaw/matrix 2026.5.28 → 2026.5.31-beta.1

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.
Files changed (76) hide show
  1. package/dist/api.js +7 -7
  2. package/dist/{approval-handler.runtime-Cso-m9Q7.js → approval-handler.runtime-Dzh_2MS1.js} +5 -5
  3. package/dist/{approval-ids-IrHynnHK.js → approval-ids-CXPPSyAr.js} +1 -1
  4. package/dist/{approval-reaction-auth-D0nZ_4ik.js → approval-reaction-auth-m-11_ajL.js} +2 -2
  5. package/dist/auth-presence.js +1 -1
  6. package/dist/{channel-D7FK_lEY.js → channel-BwpVY2Ne.js} +23 -18
  7. package/dist/channel-plugin-api.js +1 -1
  8. package/dist/{channel.runtime-CBrW2dLp.js → channel.runtime-CUBxoFwA.js} +8 -8
  9. package/dist/{cli-C1xFg7Q-.js → cli-CaF5tlL-.js} +14 -13
  10. package/dist/{cli-metadata-zz9Cmwcs.js → cli-metadata-gFTG9oJL.js} +1 -1
  11. package/dist/cli-metadata.js +1 -1
  12. package/dist/{client-BIBY50VG.js → client-D-t6CdHz.js} +2 -2
  13. package/dist/{client-bootstrap-Chmkqhy7.js → client-bootstrap-DOlQb7Jx.js} +1 -1
  14. package/dist/{client-BMoZSA2L.js → client-spaouc7I.js} +2 -2
  15. package/dist/{config-schema-wK02TzmZ.js → config-schema-DfjBrYch.js} +21 -4
  16. package/dist/contract-api.js +4 -4
  17. package/dist/{create-client-B1a3Am-I.js → create-client-B4CPKa5P.js} +3 -3
  18. package/dist/{credentials-CDjQjIds.js → credentials-Bi0pTJDK.js} +1 -1
  19. package/dist/{credentials-read-DySnJlLx.js → credentials-read-DpxFOhx0.js} +2 -2
  20. package/dist/{credentials-write.runtime-Ca2MN99y.js → credentials-write.runtime-BB5QuM4Z.js} +1 -1
  21. package/dist/{crypto-runtime-oweQ3RiB.js → crypto-runtime-3hgwY-d6.js} +7 -6
  22. package/dist/{directory-live-M-3KeudM.js → directory-live-DgjzYeC_.js} +2 -2
  23. package/dist/{doctor-CENc9ks0.js → doctor-BKjr6uua.js} +17 -4
  24. package/dist/{draft-stream-r49dgIZc.js → draft-stream-eaBWrjVK.js} +1 -1
  25. package/dist/{encryption-guidance-CU-OAPMg.js → encryption-guidance-aEUzD940.js} +1 -1
  26. package/dist/helper-api.js +2 -2
  27. package/dist/index.js +2 -2
  28. package/dist/{legacy-crypto-restore-BgW3I87R.js → legacy-crypto-restore--9Wu5rsx.js} +1 -1
  29. package/dist/{logging-yEwXx4Hm.js → logging-C7wjdKK5.js} +1 -1
  30. package/dist/{matrix-migration.runtime-CZOep_JX.js → matrix-migration.runtime-RzIEp7RP.js} +3 -3
  31. package/dist/{media-text-C4IBQI5B.js → media-text-C2Wor3Gj.js} +1 -1
  32. package/dist/{messages-CMx2qIs1.js → messages-D0sumPNx.js} +3 -3
  33. package/dist/{monitor-COOR-Ksj.js → monitor-gDaABWfA.js} +140 -108
  34. package/dist/plugin-entry.handlers.runtime.js +1 -1
  35. package/dist/probe.runtime-BegszwhP.js +3 -0
  36. package/dist/{profile-update-Cl7wAFCq.js → profile-update-Defy1W90.js} +2 -2
  37. package/dist/{reaction-events-D3jtYqTp.js → reaction-events-Bh2u-_9j.js} +1 -1
  38. package/dist/{recovery-key-store-DfQ_9s6u.js → recovery-key-store-BRnvY8XS.js} +1 -1
  39. package/dist/{resolve-targets-D-K3tTPe.js → resolve-targets-CLuzv_Jl.js} +1 -1
  40. package/dist/{resolver.runtime-BRG9o8iL.js → resolver.runtime-VywXDAZv.js} +1 -1
  41. package/dist/runtime-api.js +3 -3
  42. package/dist/runtime-heavy-api.js +1 -1
  43. package/dist/{sdk-ymjYByhr.js → sdk-C2iC7PJZ.js} +6 -6
  44. package/dist/{send-peVVVL75.js → send-DHj1E9ji.js} +6 -4
  45. package/dist/{setup-bootstrap-CiX7Pd07.js → setup-bootstrap-kTPKb7jR.js} +2 -2
  46. package/dist/{setup-core-DOhHYRrZ.js → setup-core-DRg3cgB8.js} +4 -4
  47. package/dist/setup-plugin-api.js +3 -3
  48. package/dist/{setup-surface-CrUp7oeN.js → setup-surface-soZQLgfu.js} +6 -6
  49. package/dist/{shared-CmsjJY4i.js → shared-DjJds8e0.js} +6 -6
  50. package/dist/startup-verification-CWLSyFen.js +233 -0
  51. package/dist/{storage-onzulLbU.js → storage-Ds-2Iur5.js} +18 -6
  52. package/dist/subagent-hooks-api.js +18 -2
  53. package/dist/{subagent-hooks-api-bedE4GYl.js → subagent-hooks-dkPAF6Et.js} +3 -30
  54. package/dist/{thread-bindings-DAg6grT8.js → thread-bindings-DehFUArg.js} +142 -39
  55. package/dist/{tool-actions.runtime-DwbLBrRr.js → tool-actions.runtime-CU79qJ3e.js} +7 -7
  56. package/dist/{verification-BM7g0BeT.js → verification-BJfjKMr8.js} +2 -2
  57. package/node_modules/@babel/runtime/package.json +1 -1
  58. package/node_modules/@matrix-org/matrix-sdk-crypto-nodejs/.node-version +1 -1
  59. package/node_modules/@matrix-org/matrix-sdk-crypto-nodejs/CHANGELOG.md +32 -1
  60. package/node_modules/@matrix-org/matrix-sdk-crypto-nodejs/README.md +3 -3
  61. package/node_modules/@matrix-org/matrix-sdk-crypto-nodejs/index.d.ts +195 -15
  62. package/node_modules/@matrix-org/matrix-sdk-crypto-nodejs/index.js +6 -1
  63. package/node_modules/@matrix-org/matrix-sdk-crypto-nodejs/package.json +3 -3
  64. package/node_modules/typebox/build/type/script/mapping.d.mts +5 -2
  65. package/node_modules/typebox/build/type/script/mapping.mjs +15 -8
  66. package/node_modules/typebox/build/type/script/parser.d.mts +3 -1
  67. package/node_modules/typebox/build/type/script/parser.mjs +2 -1
  68. package/node_modules/typebox/package.json +29 -29
  69. package/npm-shrinkwrap.json +15 -15
  70. package/openclaw.plugin.json +46 -0
  71. package/package.json +6 -6
  72. package/dist/probe.runtime-DgSABMiF.js +0 -3
  73. package/dist/startup-verification-BmTEngvU.js +0 -132
  74. package/dist/{account-selection-C3arLOhC.js → account-selection-DEMtY2cn.js} +1 -1
  75. package/dist/{runtime-api-CsF7Kokd.js → runtime-api-CsBoesCU.js} +2 -2
  76. package/dist/{storage-paths-BV2Z7bns.js → storage-paths-BWo_ZEMC.js} +1 -1
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@matrix-org/matrix-sdk-crypto-nodejs",
3
- "version": "0.4.0",
3
+ "version": "0.6.0",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "repository": {
@@ -19,13 +19,13 @@
19
19
  "devDependencies": {
20
20
  "@napi-rs/cli": "^2.18.4",
21
21
  "jest": "^29.7.0",
22
- "prettier": "^3.3.3",
22
+ "prettier": "~3.3.3",
23
23
  "typedoc": "^0.26.11",
24
24
  "typescript": "^5.6.3",
25
25
  "yargs-parser": "~21.1.1"
26
26
  },
27
27
  "engines": {
28
- "node": ">= 22"
28
+ "node": ">= 24"
29
29
  },
30
30
  "scripts": {
31
31
  "lint": "prettier --check .",
@@ -164,10 +164,13 @@ export type TExtendsMapping<Input extends [unknown, unknown, unknown, unknown, u
164
164
  export declare function ExtendsMapping(input: [unknown, unknown, unknown, unknown, unknown, unknown] | []): unknown;
165
165
  export type TBaseMapping<Input extends [unknown, unknown, unknown] | unknown> = (Input extends ['(', infer Type extends T.TSchema, ')'] ? Type : Input extends infer Type extends T.TSchema ? Type : never);
166
166
  export declare function BaseMapping(input: [unknown, unknown, unknown] | unknown): unknown;
167
+ export type TWithMapping<Input extends [unknown, unknown] | []> = (Input extends ['with', infer Options extends Record<PropertyKey, unknown>] ? Options : []);
168
+ export declare function WithMapping(input: [unknown, unknown] | []): unknown;
167
169
  type TFactorIndexArray<Type extends T.TSchema, IndexArray extends unknown[]> = (IndexArray extends [infer Left extends T.TSchema[], ...infer Right extends unknown[]] ? (Left extends [infer Indexer extends T.TSchema] ? TFactorIndexArray<C.TIndexDeferred<Type, Indexer>, Right> : Left extends [] ? TFactorIndexArray<T.TArray<Type>, Right> : T.TNever) : Type);
168
170
  type TFactorExtends<Type extends T.TSchema, Extends extends unknown[]> = (Extends extends [infer Right extends T.TSchema, infer True extends T.TSchema, infer False extends T.TSchema] ? C.TConditionalDeferred<Type, Right, True, False> : Type);
169
- export type TFactorMapping<Input extends [unknown, unknown, unknown, unknown]> = (Input extends [infer KeyOf extends boolean, infer Type extends T.TSchema, infer IndexArray extends unknown[], infer Extend extends unknown[]] ? KeyOf extends true ? TFactorExtends<C.TKeyOfDeferred<TFactorIndexArray<Type, IndexArray>>, Extend> : TFactorExtends<TFactorIndexArray<Type, IndexArray>, Extend> : never);
170
- export declare function FactorMapping(input: [unknown, unknown, unknown, unknown]): unknown;
171
+ type TFactorWith<Type extends T.TSchema, With extends unknown> = (With extends Record<PropertyKey, unknown> ? C.TOptionsDeferred<Type, With> : Type);
172
+ export type TFactorMapping<Input extends [unknown, unknown, unknown, unknown, unknown]> = (Input extends [infer KeyOf extends boolean, infer Type extends T.TSchema, infer IndexArray extends unknown[], infer Extend extends unknown[], infer WithClause extends unknown] ? TFactorWith<KeyOf extends true ? TFactorExtends<C.TKeyOfDeferred<TFactorIndexArray<Type, IndexArray>>, Extend> : TFactorExtends<TFactorIndexArray<Type, IndexArray>, Extend>, WithClause> : never);
173
+ export declare function FactorMapping(input: [unknown, unknown, unknown, unknown, unknown]): unknown;
171
174
  type TExprBinaryMapping<Left extends T.TSchema, Rest extends unknown[]> = (Rest extends [infer Operator extends unknown, infer Right extends T.TSchema, infer Next extends unknown[]] ? (TExprBinaryMapping<Right, Next> extends infer Schema extends T.TSchema ? (Operator extends '&' ? (Schema extends T.TIntersect<infer Types extends T.TSchema[]> ? T.TIntersect<[Left, ...Types]> : T.TIntersect<[Left, Schema]>) : Operator extends '|' ? (Schema extends T.TUnion<infer Types extends T.TSchema[]> ? T.TUnion<[Left, ...Types]> : T.TUnion<[Left, Schema]>) : never) : never) : Left);
172
175
  export type TExprTermTailMapping<Input extends [unknown, unknown, unknown] | []> = (Input);
173
176
  export declare function ExprTermTailMapping(input: [unknown, unknown, unknown] | []): unknown;
@@ -185,27 +185,34 @@ export function BaseMapping(input) {
185
185
  ? input[1]
186
186
  : input;
187
187
  }
188
+ export function WithMapping(input) {
189
+ return Guard.IsEqual(input.length, 2) ? input[1] : [];
190
+ }
188
191
  // deno-coverage-ignore-start
189
- // ...
190
- const FactorIndexArray = (Type, indexArray) => {
192
+ function FactorIndexArray(Type, indexArray) {
191
193
  return indexArray.reduce((result, left) => {
192
194
  const _left = left;
193
195
  return (Guard.IsEqual(_left.length, 1) ? C.IndexDeferred(result, _left[0]) :
194
196
  Guard.IsEqual(_left.length, 0) ? T.Array(result) :
195
197
  Unreachable());
196
198
  }, Type);
197
- };
199
+ }
198
200
  // deno-coverage-ignore-stop
199
- const FactorExtends = (type, extend) => {
201
+ function FactorExtends(type, extend) {
200
202
  return Guard.IsEqual(extend.length, 3)
201
203
  ? C.ConditionalDeferred(type, extend[0], extend[1], extend[2])
202
204
  : type;
203
- };
205
+ }
206
+ function FactorWith(type, withClause) {
207
+ return Guard.IsArray(withClause) && Guard.IsEqual(withClause.length, 0)
208
+ ? type
209
+ : C.OptionsDeferred(type, withClause);
210
+ }
204
211
  export function FactorMapping(input) {
205
- const [keyOf, type, indexArray, extend] = input;
206
- return keyOf
212
+ const [keyOf, type, indexArray, extend, withClause] = input;
213
+ return FactorWith(keyOf
207
214
  ? FactorExtends(C.KeyOfDeferred(FactorIndexArray(type, indexArray)), extend)
208
- : FactorExtends(FactorIndexArray(type, indexArray), extend);
215
+ : FactorExtends(FactorIndexArray(type, indexArray), extend), withClause);
209
216
  }
210
217
  // deno-coverage-ignore-start
211
218
  function ExprBinaryMapping(left, rest) {
@@ -43,7 +43,8 @@ export type TIndexArray_0<Input extends string, Result extends unknown[] = []> =
43
43
  export type TIndexArray<Input extends string> = TIndexArray_0<Input> extends [infer _0 extends ([unknown, unknown, unknown] | [unknown, unknown])[], infer Input extends string] ? [S.TIndexArrayMapping<_0>, Input] : [];
44
44
  export type TExtends<Input extends string> = ((Token.TConst<'extends', Input> extends [infer _0, infer Input extends string] ? (TType<Input> extends [infer _1, infer Input extends string] ? (Token.TConst<'?', Input> extends [infer _2, infer Input extends string] ? (TType<Input> extends [infer _3, infer Input extends string] ? (Token.TConst<':', Input> extends [infer _4, infer Input extends string] ? (TType<Input> extends [infer _5, infer Input extends string] ? [[_0, _1, _2, _3, _4, _5], Input] : []) : []) : []) : []) : []) : []) extends [infer _0, infer Input extends string] ? [_0, Input] : [[], Input] extends [infer _0, infer Input extends string] ? [_0, Input] : []) extends [infer _0 extends [unknown, unknown, unknown, unknown, unknown, unknown] | [], infer Input extends string] ? [S.TExtendsMapping<_0>, Input] : [];
45
45
  export type TBase<Input extends string> = ((Token.TConst<'(', Input> extends [infer _0, infer Input extends string] ? (TType<Input> extends [infer _1, infer Input extends string] ? (Token.TConst<')', Input> extends [infer _2, infer Input extends string] ? [[_0, _1, _2], Input] : []) : []) : []) extends [infer _0, infer Input extends string] ? [_0, Input] : TKeyword<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : T_Object_<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TTuple<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TTemplateLiteral<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TLiteral<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TConstructor<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : T_Function_<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TMapped<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TOptions<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TGenericCall<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TReference<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : []) extends [infer _0 extends [unknown, unknown, unknown] | unknown, infer Input extends string] ? [S.TBaseMapping<_0>, Input] : [];
46
- export type TFactor<Input extends string> = (TKeyOf<Input> extends [infer _0, infer Input extends string] ? (TBase<Input> extends [infer _1, infer Input extends string] ? (TIndexArray<Input> extends [infer _2, infer Input extends string] ? (TExtends<Input> extends [infer _3, infer Input extends string] ? [[_0, _1, _2, _3], Input] : []) : []) : []) : []) extends [infer _0 extends [unknown, unknown, unknown, unknown], infer Input extends string] ? [S.TFactorMapping<_0>, Input] : [];
46
+ export type TWith<Input extends string> = ((Token.TConst<'with', Input> extends [infer _0, infer Input extends string] ? (TJsonObject<Input> extends [infer _1, infer Input extends string] ? [[_0, _1], Input] : []) : []) extends [infer _0, infer Input extends string] ? [_0, Input] : [[], Input] extends [infer _0, infer Input extends string] ? [_0, Input] : []) extends [infer _0 extends [unknown, unknown] | [], infer Input extends string] ? [S.TWithMapping<_0>, Input] : [];
47
+ export type TFactor<Input extends string> = (TKeyOf<Input> extends [infer _0, infer Input extends string] ? (TBase<Input> extends [infer _1, infer Input extends string] ? (TIndexArray<Input> extends [infer _2, infer Input extends string] ? (TExtends<Input> extends [infer _3, infer Input extends string] ? (TWith<Input> extends [infer _4, infer Input extends string] ? [[_0, _1, _2, _3, _4], Input] : []) : []) : []) : []) : []) extends [infer _0 extends [unknown, unknown, unknown, unknown, unknown], infer Input extends string] ? [S.TFactorMapping<_0>, Input] : [];
47
48
  export type TExprTermTail<Input extends string> = ((Token.TConst<'&', Input> extends [infer _0, infer Input extends string] ? (TFactor<Input> extends [infer _1, infer Input extends string] ? (TExprTermTail<Input> extends [infer _2, infer Input extends string] ? [[_0, _1, _2], Input] : []) : []) : []) extends [infer _0, infer Input extends string] ? [_0, Input] : [[], Input] extends [infer _0, infer Input extends string] ? [_0, Input] : []) extends [infer _0 extends [unknown, unknown, unknown] | [], infer Input extends string] ? [S.TExprTermTailMapping<_0>, Input] : [];
48
49
  export type TExprTerm<Input extends string> = (TFactor<Input> extends [infer _0, infer Input extends string] ? (TExprTermTail<Input> extends [infer _1, infer Input extends string] ? [[_0, _1], Input] : []) : []) extends [infer _0 extends [unknown, unknown], infer Input extends string] ? [S.TExprTermMapping<_0>, Input] : [];
49
50
  export type TExprTail<Input extends string> = ((Token.TConst<'|', Input> extends [infer _0, infer Input extends string] ? (TExprTerm<Input> extends [infer _1, infer Input extends string] ? (TExprTail<Input> extends [infer _2, infer Input extends string] ? [[_0, _1, _2], Input] : []) : []) : []) extends [infer _0, infer Input extends string] ? [_0, Input] : [[], Input] extends [infer _0, infer Input extends string] ? [_0, Input] : []) extends [infer _0 extends [unknown, unknown, unknown] | [], infer Input extends string] ? [S.TExprTailMapping<_0>, Input] : [];
@@ -172,6 +173,7 @@ export declare const IndexArray_0: (input: string, result?: unknown[]) => [unkno
172
173
  export declare const IndexArray: (input: string) => [unknown, string] | [];
173
174
  export declare const Extends: (input: string) => [unknown, string] | [];
174
175
  export declare const Base: (input: string) => [unknown, string] | [];
176
+ export declare const With: (input: string) => [unknown, string] | [];
175
177
  export declare const Factor: (input: string) => [unknown, string] | [];
176
178
  export declare const ExprTermTail: (input: string) => [unknown, string] | [];
177
179
  export declare const ExprTerm: (input: string) => [unknown, string] | [];
@@ -47,7 +47,8 @@ export const IndexArray_0 = (input, result = []) => If(If(If(Token.Const('[', in
47
47
  export const IndexArray = (input) => If(IndexArray_0(input), ([_0, input]) => [S.IndexArrayMapping(_0), input]);
48
48
  export const Extends = (input) => If(If(If(Token.Const('extends', input), ([_0, input]) => If(Type(input), ([_1, input]) => If(Token.Const('?', input), ([_2, input]) => If(Type(input), ([_3, input]) => If(Token.Const(':', input), ([_4, input]) => If(Type(input), ([_5, input]) => [[_0, _1, _2, _3, _4, _5], input])))))), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.ExtendsMapping(_0), input]);
49
49
  export const Base = (input) => If(If(If(Token.Const('(', input), ([_0, input]) => If(Type(input), ([_1, input]) => If(Token.Const(')', input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [_0, input], () => If(Keyword(input), ([_0, input]) => [_0, input], () => If(_Object_(input), ([_0, input]) => [_0, input], () => If(Tuple(input), ([_0, input]) => [_0, input], () => If(TemplateLiteral(input), ([_0, input]) => [_0, input], () => If(Literal(input), ([_0, input]) => [_0, input], () => If(Constructor(input), ([_0, input]) => [_0, input], () => If(_Function_(input), ([_0, input]) => [_0, input], () => If(Mapped(input), ([_0, input]) => [_0, input], () => If(Options(input), ([_0, input]) => [_0, input], () => If(GenericCall(input), ([_0, input]) => [_0, input], () => If(Reference(input), ([_0, input]) => [_0, input], () => [])))))))))))), ([_0, input]) => [S.BaseMapping(_0), input]);
50
- export const Factor = (input) => If(If(KeyOf(input), ([_0, input]) => If(Base(input), ([_1, input]) => If(IndexArray(input), ([_2, input]) => If(Extends(input), ([_3, input]) => [[_0, _1, _2, _3], input])))), ([_0, input]) => [S.FactorMapping(_0), input]);
50
+ export const With = (input) => If(If(If(Token.Const('with', input), ([_0, input]) => If(JsonObject(input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.WithMapping(_0), input]);
51
+ export const Factor = (input) => If(If(KeyOf(input), ([_0, input]) => If(Base(input), ([_1, input]) => If(IndexArray(input), ([_2, input]) => If(Extends(input), ([_3, input]) => If(With(input), ([_4, input]) => [[_0, _1, _2, _3, _4], input]))))), ([_0, input]) => [S.FactorMapping(_0), input]);
51
52
  export const ExprTermTail = (input) => If(If(If(Token.Const('&', input), ([_0, input]) => If(Factor(input), ([_1, input]) => If(ExprTermTail(input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.ExprTermTailMapping(_0), input]);
52
53
  export const ExprTerm = (input) => If(If(Factor(input), ([_0, input]) => If(ExprTermTail(input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [S.ExprTermMapping(_0), input]);
53
54
  export const ExprTail = (input) => If(If(If(Token.Const('|', input), ([_0, input]) => If(ExprTerm(input), ([_1, input]) => If(ExprTail(input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.ExprTailMapping(_0), input]);
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "typebox",
3
3
  "description": "Json Schema Type Builder with Static Type Resolution for TypeScript",
4
- "version": "1.1.38",
4
+ "version": "1.1.39",
5
5
  "keywords": [
6
6
  "typescript",
7
7
  "jsonschema"
@@ -16,22 +16,6 @@
16
16
  "types": "./build/index.d.mts",
17
17
  "module": "./build/index.mjs",
18
18
  "exports": {
19
- "./guard": {
20
- "import": "./build/guard/index.mjs",
21
- "default": "./build/guard/index.mjs"
22
- },
23
- "./error": {
24
- "import": "./build/error/index.mjs",
25
- "default": "./build/error/index.mjs"
26
- },
27
- "./compile": {
28
- "import": "./build/compile/index.mjs",
29
- "default": "./build/compile/index.mjs"
30
- },
31
- "./system": {
32
- "import": "./build/system/index.mjs",
33
- "default": "./build/system/index.mjs"
34
- },
35
19
  "./format": {
36
20
  "import": "./build/format/index.mjs",
37
21
  "default": "./build/format/index.mjs"
@@ -44,10 +28,26 @@
44
28
  "import": "./build/schema/index.mjs",
45
29
  "default": "./build/schema/index.mjs"
46
30
  },
31
+ "./compile": {
32
+ "import": "./build/compile/index.mjs",
33
+ "default": "./build/compile/index.mjs"
34
+ },
47
35
  "./value": {
48
36
  "import": "./build/value/index.mjs",
49
37
  "default": "./build/value/index.mjs"
50
38
  },
39
+ "./guard": {
40
+ "import": "./build/guard/index.mjs",
41
+ "default": "./build/guard/index.mjs"
42
+ },
43
+ "./system": {
44
+ "import": "./build/system/index.mjs",
45
+ "default": "./build/system/index.mjs"
46
+ },
47
+ "./error": {
48
+ "import": "./build/error/index.mjs",
49
+ "default": "./build/error/index.mjs"
50
+ },
51
51
  ".": {
52
52
  "import": "./build/index.mjs",
53
53
  "default": "./build/index.mjs"
@@ -55,18 +55,6 @@
55
55
  },
56
56
  "typesVersions": {
57
57
  "*": {
58
- "guard": [
59
- "./build/guard/index.d.mts"
60
- ],
61
- "error": [
62
- "./build/error/index.d.mts"
63
- ],
64
- "compile": [
65
- "./build/compile/index.d.mts"
66
- ],
67
- "system": [
68
- "./build/system/index.d.mts"
69
- ],
70
58
  "format": [
71
59
  "./build/format/index.d.mts"
72
60
  ],
@@ -76,9 +64,21 @@
76
64
  "schema": [
77
65
  "./build/schema/index.d.mts"
78
66
  ],
67
+ "compile": [
68
+ "./build/compile/index.d.mts"
69
+ ],
79
70
  "value": [
80
71
  "./build/value/index.d.mts"
81
72
  ],
73
+ "guard": [
74
+ "./build/guard/index.d.mts"
75
+ ],
76
+ "system": [
77
+ "./build/system/index.d.mts"
78
+ ],
79
+ "error": [
80
+ "./build/error/index.d.mts"
81
+ ],
82
82
  ".": [
83
83
  "./build/index.d.mts"
84
84
  ]
@@ -1,24 +1,24 @@
1
1
  {
2
2
  "name": "@openclaw/matrix",
3
- "version": "2026.5.28",
3
+ "version": "2026.5.31-beta.1",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@openclaw/matrix",
9
- "version": "2026.5.28",
9
+ "version": "2026.5.31-beta.1",
10
10
  "dependencies": {
11
- "@matrix-org/matrix-sdk-crypto-nodejs": "0.4.0",
11
+ "@matrix-org/matrix-sdk-crypto-nodejs": "0.6.0",
12
12
  "@matrix-org/matrix-sdk-crypto-wasm": "18.3.0",
13
13
  "fake-indexeddb": "6.2.5",
14
14
  "markdown-it": "14.2.0",
15
15
  "matrix-js-sdk": "41.6.0",
16
16
  "music-metadata": "11.12.3",
17
- "typebox": "1.1.38",
17
+ "typebox": "1.1.39",
18
18
  "zod": "4.4.3"
19
19
  },
20
20
  "peerDependencies": {
21
- "openclaw": ">=2026.5.28"
21
+ "openclaw": ">=2026.5.31-beta.1"
22
22
  },
23
23
  "peerDependenciesMeta": {
24
24
  "openclaw": {
@@ -27,9 +27,9 @@
27
27
  }
28
28
  },
29
29
  "node_modules/@babel/runtime": {
30
- "version": "7.29.2",
31
- "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.29.2.tgz",
32
- "integrity": "sha512-JiDShH45zKHWyGe4ZNVRrCjBz8Nh9TMmZG1kh4QTK8hCBTWBi8Da+i7s1fJw7/lYpM4ccepSNfqzZ/QvABBi5g==",
30
+ "version": "7.29.7",
31
+ "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.29.7.tgz",
32
+ "integrity": "sha512-Nq8OhGWiZIZGV6hLHoyAKLLcJihP/xFeBMGJoUrxTX2psI8dCifzLhZISFb+VWS3wFMRDmCGw5R+dOySCqPLhw==",
33
33
  "license": "MIT",
34
34
  "engines": {
35
35
  "node": ">=6.9.0"
@@ -46,9 +46,9 @@
46
46
  }
47
47
  },
48
48
  "node_modules/@matrix-org/matrix-sdk-crypto-nodejs": {
49
- "version": "0.4.0",
50
- "resolved": "https://registry.npmjs.org/@matrix-org/matrix-sdk-crypto-nodejs/-/matrix-sdk-crypto-nodejs-0.4.0.tgz",
51
- "integrity": "sha512-+qqgpn39XFSbsD0dFjssGO9vHEP7sTyfs8yTpt8vuqWpUpF20QMwpCZi0jpYw7GxjErNTsMshopuo8677DfGEA==",
49
+ "version": "0.6.0",
50
+ "resolved": "https://registry.npmjs.org/@matrix-org/matrix-sdk-crypto-nodejs/-/matrix-sdk-crypto-nodejs-0.6.0.tgz",
51
+ "integrity": "sha512-AndGryzkDtFbaDyPBAQ2B4pUhaA/q4HJf3wgiGpPa/70DsdY1Z3R5Wn9yp+56CeHOpk61mNHz/8WDPlzrZDSJw==",
52
52
  "hasInstallScript": true,
53
53
  "license": "Apache-2.0",
54
54
  "dependencies": {
@@ -56,7 +56,7 @@
56
56
  "node-downloader-helper": "^2.1.9"
57
57
  },
58
58
  "engines": {
59
- "node": ">= 22"
59
+ "node": ">= 24"
60
60
  }
61
61
  },
62
62
  "node_modules/@matrix-org/matrix-sdk-crypto-wasm": {
@@ -504,9 +504,9 @@
504
504
  }
505
505
  },
506
506
  "node_modules/typebox": {
507
- "version": "1.1.38",
508
- "resolved": "https://registry.npmjs.org/typebox/-/typebox-1.1.38.tgz",
509
- "integrity": "sha512-pZ0aQPmMmXoUvSbeuWf/Hzsc+avNw/Zd6VeE8CFgkVGWyuHPJvqeJJDeJqLve+K70LvjYIoleGcoJHPT17cWoA==",
507
+ "version": "1.1.39",
508
+ "resolved": "https://registry.npmjs.org/typebox/-/typebox-1.1.39.tgz",
509
+ "integrity": "sha512-vj0afVtOfLQvv0GR0VxVagYxsXN64btL7Z9XoaG0ZggH3mruMMkOO6hXdgMsjCY3shZgEvooAWVeznQVs5c43w==",
510
510
  "license": "MIT"
511
511
  },
512
512
  "node_modules/uc.micro": {
@@ -310,6 +310,36 @@
310
310
  "allowlist"
311
311
  ]
312
312
  },
313
+ "mentionPatterns": {
314
+ "type": "object",
315
+ "properties": {
316
+ "mode": {
317
+ "anyOf": [
318
+ {
319
+ "type": "string",
320
+ "const": "allow"
321
+ },
322
+ {
323
+ "type": "string",
324
+ "const": "deny"
325
+ }
326
+ ]
327
+ },
328
+ "allowIn": {
329
+ "type": "array",
330
+ "items": {
331
+ "type": "string"
332
+ }
333
+ },
334
+ "denyIn": {
335
+ "type": "array",
336
+ "items": {
337
+ "type": "string"
338
+ }
339
+ }
340
+ },
341
+ "additionalProperties": false
342
+ },
313
343
  "contextVisibility": {
314
344
  "type": "string",
315
345
  "enum": [
@@ -860,6 +890,22 @@
860
890
  "label": "Matrix",
861
891
  "description": "open protocol; install the plugin to enable.",
862
892
  "uiHints": {
893
+ "mentionPatterns": {
894
+ "label": "Matrix Mention Pattern Policy",
895
+ "help": "Scopes configured groupChat mentionPatterns to selected Matrix room IDs. Native Matrix mention evidence still triggers even when regex patterns are denied."
896
+ },
897
+ "mentionPatterns.mode": {
898
+ "label": "Matrix Mention Pattern Mode",
899
+ "help": "\"allow\" enables configured regex mention patterns unless denyIn matches; \"deny\" disables them unless allowIn matches."
900
+ },
901
+ "mentionPatterns.allowIn": {
902
+ "label": "Matrix Mention Pattern Allowlist",
903
+ "help": "Matrix room IDs where configured regex mention patterns are enabled when mode is deny."
904
+ },
905
+ "mentionPatterns.denyIn": {
906
+ "label": "Matrix Mention Pattern Denylist",
907
+ "help": "Matrix room IDs where configured regex mention patterns are disabled. Native mention evidence still triggers."
908
+ },
863
909
  "allowBots": {
864
910
  "label": "Matrix Allow Bot Messages",
865
911
  "help": "Allow messages from other configured Matrix bot accounts to trigger replies (default: false). Set \"mentions\" to require a visible room mention."
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/matrix",
3
- "version": "2026.5.28",
3
+ "version": "2026.5.31-beta.1",
4
4
  "description": "OpenClaw Matrix channel plugin for rooms and direct messages.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -8,17 +8,17 @@
8
8
  },
9
9
  "type": "module",
10
10
  "dependencies": {
11
- "@matrix-org/matrix-sdk-crypto-nodejs": "0.4.0",
11
+ "@matrix-org/matrix-sdk-crypto-nodejs": "0.6.0",
12
12
  "@matrix-org/matrix-sdk-crypto-wasm": "18.3.0",
13
13
  "fake-indexeddb": "6.2.5",
14
14
  "markdown-it": "14.2.0",
15
15
  "matrix-js-sdk": "41.6.0",
16
16
  "music-metadata": "11.12.3",
17
- "typebox": "1.1.38",
17
+ "typebox": "1.1.39",
18
18
  "zod": "4.4.3"
19
19
  },
20
20
  "peerDependencies": {
21
- "openclaw": ">=2026.5.28"
21
+ "openclaw": ">=2026.5.31-beta.1"
22
22
  },
23
23
  "peerDependenciesMeta": {
24
24
  "openclaw": {
@@ -84,10 +84,10 @@
84
84
  "allowInvalidConfigRecovery": true
85
85
  },
86
86
  "compat": {
87
- "pluginApi": ">=2026.5.28"
87
+ "pluginApi": ">=2026.5.31-beta.1"
88
88
  },
89
89
  "build": {
90
- "openclawVersion": "2026.5.28"
90
+ "openclawVersion": "2026.5.31-beta.1"
91
91
  },
92
92
  "release": {
93
93
  "publishToClawHub": true,
@@ -1,3 +0,0 @@
1
- import { t as createMatrixClient } from "./create-client-B1a3Am-I.js";
2
- import "./client-BMoZSA2L.js";
3
- export { createMatrixClient };
@@ -1,132 +0,0 @@
1
- import { t as formatMatrixErrorMessage } from "./errors-C47hvAF8.js";
2
- import { a as resolveMatrixStoragePaths } from "./storage-onzulLbU.js";
3
- import path from "node:path";
4
- import { readJsonFileWithFallback, writeJsonFileAtomically } from "openclaw/plugin-sdk/json-store";
5
- import fs from "node:fs/promises";
6
- //#region extensions/matrix/src/matrix/monitor/startup-verification.ts
7
- const STARTUP_VERIFICATION_STATE_FILENAME = "startup-verification.json";
8
- const DEFAULT_STARTUP_VERIFICATION_MODE = "if-unverified";
9
- const DEFAULT_STARTUP_VERIFICATION_COOLDOWN_HOURS = 24;
10
- const DEFAULT_STARTUP_VERIFICATION_FAILURE_COOLDOWN_MS = 3600 * 1e3;
11
- function normalizeCooldownHours(value) {
12
- if (typeof value !== "number" || !Number.isFinite(value)) return DEFAULT_STARTUP_VERIFICATION_COOLDOWN_HOURS;
13
- return Math.max(0, value);
14
- }
15
- function resolveStartupVerificationStatePath(params) {
16
- const storagePaths = resolveMatrixStoragePaths({
17
- homeserver: params.auth.homeserver,
18
- userId: params.auth.userId,
19
- accessToken: params.auth.accessToken,
20
- accountId: params.auth.accountId,
21
- deviceId: params.auth.deviceId,
22
- env: params.env
23
- });
24
- return path.join(storagePaths.rootDir, STARTUP_VERIFICATION_STATE_FILENAME);
25
- }
26
- async function readStartupVerificationState(filePath) {
27
- const { value } = await readJsonFileWithFallback(filePath, null);
28
- return value && typeof value === "object" ? value : null;
29
- }
30
- async function clearStartupVerificationState(filePath) {
31
- await fs.rm(filePath, { force: true }).catch(() => {});
32
- }
33
- function resolveStateCooldownMs(state, cooldownMs) {
34
- if (state?.outcome === "failed") return Math.min(cooldownMs, DEFAULT_STARTUP_VERIFICATION_FAILURE_COOLDOWN_MS);
35
- return cooldownMs;
36
- }
37
- function resolveRetryAfterMs(params) {
38
- const attemptedAtMs = Date.parse(params.attemptedAt ?? "");
39
- if (!Number.isFinite(attemptedAtMs)) return;
40
- const remaining = attemptedAtMs + params.cooldownMs - params.nowMs;
41
- return remaining > 0 ? remaining : void 0;
42
- }
43
- function shouldHonorCooldown(params) {
44
- if (!params.state || params.stateCooldownMs <= 0) return false;
45
- if (params.state.userId && params.verification.userId && params.state.userId !== params.verification.userId) return false;
46
- if (params.state.deviceId && params.verification.deviceId && params.state.deviceId !== params.verification.deviceId) return false;
47
- return resolveRetryAfterMs({
48
- attemptedAt: params.state.attemptedAt,
49
- cooldownMs: params.stateCooldownMs,
50
- nowMs: params.nowMs
51
- }) !== void 0;
52
- }
53
- function hasPendingSelfVerification(verifications) {
54
- return verifications.some((entry) => entry.isSelfVerification && !entry.completed && entry.pending);
55
- }
56
- async function ensureMatrixStartupVerification(params) {
57
- if (params.auth.encryption !== true || !params.client.crypto) return { kind: "unsupported" };
58
- const verification = await params.client.getOwnDeviceVerificationStatus();
59
- const statePath = params.stateFilePath ?? resolveStartupVerificationStatePath({
60
- auth: params.auth,
61
- env: params.env
62
- });
63
- if (verification.verified) {
64
- await clearStartupVerificationState(statePath);
65
- return {
66
- kind: "verified",
67
- verification
68
- };
69
- }
70
- if ((params.accountConfig.startupVerification ?? DEFAULT_STARTUP_VERIFICATION_MODE) === "off") {
71
- await clearStartupVerificationState(statePath);
72
- return {
73
- kind: "disabled",
74
- verification
75
- };
76
- }
77
- if (hasPendingSelfVerification(await params.client.crypto.listVerifications().catch(() => []))) return {
78
- kind: "pending",
79
- verification
80
- };
81
- const cooldownMs = normalizeCooldownHours(params.accountConfig.startupVerificationCooldownHours) * 60 * 60 * 1e3;
82
- const nowMs = params.nowMs ?? Date.now();
83
- const state = await readStartupVerificationState(statePath);
84
- const stateCooldownMs = resolveStateCooldownMs(state, cooldownMs);
85
- if (shouldHonorCooldown({
86
- state,
87
- verification,
88
- stateCooldownMs,
89
- nowMs
90
- })) return {
91
- kind: "cooldown",
92
- verification,
93
- retryAfterMs: resolveRetryAfterMs({
94
- attemptedAt: state?.attemptedAt,
95
- cooldownMs: stateCooldownMs,
96
- nowMs
97
- })
98
- };
99
- try {
100
- const request = await params.client.crypto.requestVerification({ ownUser: true });
101
- await writeJsonFileAtomically(statePath, {
102
- userId: verification.userId,
103
- deviceId: verification.deviceId,
104
- attemptedAt: new Date(nowMs).toISOString(),
105
- outcome: "requested",
106
- requestId: request.id,
107
- transactionId: request.transactionId
108
- });
109
- return {
110
- kind: "requested",
111
- verification,
112
- requestId: request.id,
113
- transactionId: request.transactionId ?? void 0
114
- };
115
- } catch (err) {
116
- const error = formatMatrixErrorMessage(err);
117
- await writeJsonFileAtomically(statePath, {
118
- userId: verification.userId,
119
- deviceId: verification.deviceId,
120
- attemptedAt: new Date(nowMs).toISOString(),
121
- outcome: "failed",
122
- error
123
- }).catch(() => {});
124
- return {
125
- kind: "request-failed",
126
- verification,
127
- error
128
- };
129
- }
130
- }
131
- //#endregion
132
- export { ensureMatrixStartupVerification };
@@ -1,8 +1,8 @@
1
1
  import { n as listMatrixEnvAccountIds, t as getMatrixScopedEnvVarNames } from "./env-vars-KzaYveuy.js";
2
2
  import { t as isRecord } from "./record-shared-CvzjvHRn.js";
3
- import { DEFAULT_ACCOUNT_ID, normalizeAccountId, normalizeOptionalAccountId } from "openclaw/plugin-sdk/account-id";
4
3
  import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
5
4
  import { listCombinedAccountIds, listConfiguredAccountIds, resolveListedDefaultAccountId, resolveNormalizedAccountEntry } from "openclaw/plugin-sdk/account-core";
5
+ import { DEFAULT_ACCOUNT_ID, normalizeAccountId, normalizeOptionalAccountId } from "openclaw/plugin-sdk/account-id";
6
6
  import { hasConfiguredSecretInput } from "openclaw/plugin-sdk/secret-input-runtime";
7
7
  //#region extensions/matrix/src/auth-precedence.ts
8
8
  const MATRIX_DEFAULT_ACCOUNT_AUTH_ONLY_FIELDS = new Set([
@@ -1,9 +1,9 @@
1
1
  import "./timeout-abort-signal-DMrgRFIy.js";
2
- import "openclaw/plugin-sdk/account-id";
3
- import { resolveThreadBindingIdleTimeoutMsForChannel, resolveThreadBindingMaxAgeMsForChannel } from "openclaw/plugin-sdk/conversation-runtime";
4
2
  import { resolveOutboundSendDep } from "openclaw/plugin-sdk/channel-outbound";
3
+ import { resolveThreadBindingIdleTimeoutMsForChannel, resolveThreadBindingMaxAgeMsForChannel } from "openclaw/plugin-sdk/conversation-runtime";
5
4
  import { chunkTextForOutbound as chunkTextForOutbound$1 } from "openclaw/plugin-sdk/text-chunking";
6
5
  import { createActionGate as createActionGate$1, jsonResult, readPositiveIntegerParam as readPositiveIntegerParam$1, readReactionParams, readStringArrayParam, readStringParam as readStringParam$1 } from "openclaw/plugin-sdk/channel-actions";
6
+ import "openclaw/plugin-sdk/account-id";
7
7
  import "openclaw/plugin-sdk/routing";
8
8
  import "openclaw/plugin-sdk/channel-status";
9
9
  import "openclaw/plugin-sdk/channel-config-primitives";
@@ -1,5 +1,5 @@
1
- import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/account-id";
2
1
  import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
2
+ import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/account-id";
3
3
  import path from "node:path";
4
4
  import crypto from "node:crypto";
5
5
  //#region extensions/matrix/src/storage-paths.ts