@openclaw/mattermost 2026.9.5 → 2026.9.7

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 (380) hide show
  1. package/assets/icon.png +0 -0
  2. package/dist/.setup/{channel-plugin-api-N-mnrhds.mjs → channel-plugin-api-Bc8Qc1-t.mjs} +2 -2
  3. package/dist/.setup/{channel-plugin-api-CKz3b0dp.mjs → channel-plugin-api-DXqHarCt.mjs} +2 -2
  4. package/dist/.setup/{channel-plugin-runtime-Ca4cZHq2.mjs → channel-plugin-runtime-B0CAMiHe.mjs} +146 -176
  5. package/dist/.setup/channel.runtime-E2B5dNrh.mjs +383 -0
  6. package/dist/.setup/{client-Cx71KZ1x.mjs → client-CVeeTqCO.mjs} +55 -46
  7. package/dist/.setup/doctor-contract-BI6SB2cd.mjs +175 -0
  8. package/dist/.setup/{interactions-BG-CQbVD.mjs → interactions-DMSZYnEx.mjs} +170 -80
  9. package/dist/.setup/{channel.runtime-C074p7wv.mjs → monitor-BZyzPkkb.mjs} +237 -726
  10. package/dist/.setup/{monitor-auth-DBoM2Bja.mjs → monitor-auth-aZ0b1gqx.mjs} +11 -16
  11. package/dist/.setup/{normalize-BQzx2u8S.mjs → normalize-BCjtmxtp.mjs} +8 -17
  12. package/dist/.setup/rolldown-runtime-BBjsoOtd.mjs +27 -0
  13. package/dist/.setup/send-ClgX-usq.mjs +438 -0
  14. package/dist/.setup/{slash-state-CmyIYDIc.mjs → slash-state-Dni1XNc1.mjs} +144 -764
  15. package/dist/api.js +2 -2
  16. package/dist/channel-plugin-api.js +2 -2
  17. package/dist/channel-plugin-runtime.js +1 -1
  18. package/dist/doctor-contract-api.js +1 -1
  19. package/dist/policy-api.js +1 -1
  20. package/dist/runtime-api.js +2 -23
  21. package/dist/setup-entry.js +1 -1
  22. package/dist/slash-route-api.js +1 -1
  23. package/node_modules/zod/README.md +2 -2
  24. package/node_modules/zod/compile.cjs +19 -0
  25. package/node_modules/zod/index.cjs +19 -0
  26. package/node_modules/zod/locales/index.cjs +19 -0
  27. package/node_modules/zod/mini/index.cjs +19 -0
  28. package/node_modules/zod/package.json +8 -7
  29. package/node_modules/zod/src/v3/helpers/errorUtil.ts +1 -1
  30. package/node_modules/zod/src/v4/classic/external.ts +2 -0
  31. package/node_modules/zod/src/v4/classic/from-json-schema.ts +248 -25
  32. package/node_modules/zod/src/v4/classic/schemas.ts +243 -168
  33. package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +60 -9
  34. package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +6 -0
  35. package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +2 -2
  36. package/node_modules/zod/src/v4/classic/tests/cyclic-data.test.ts +265 -0
  37. package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +112 -6
  38. package/node_modules/zod/src/v4/classic/tests/enum.test.ts +9 -0
  39. package/node_modules/zod/src/v4/classic/tests/error.test.ts +130 -1
  40. package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +157 -0
  41. package/node_modules/zod/src/v4/classic/tests/iban.test.ts +81 -0
  42. package/node_modules/zod/src/v4/classic/tests/instance-footprint.test.ts +40 -2
  43. package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +27 -7
  44. package/node_modules/zod/src/v4/classic/tests/issue-schema.test.ts +88 -56
  45. package/node_modules/zod/src/v4/classic/tests/number.test.ts +39 -0
  46. package/node_modules/zod/src/v4/classic/tests/object.test.ts +56 -0
  47. package/node_modules/zod/src/v4/classic/tests/optin-ladder.test.ts +3 -2
  48. package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +70 -0
  49. package/node_modules/zod/src/v4/classic/tests/properties.test.ts +141 -0
  50. package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +46 -1
  51. package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +19 -0
  52. package/node_modules/zod/src/v4/classic/tests/string.test.ts +95 -1
  53. package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +33 -1
  54. package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +234 -38
  55. package/node_modules/zod/src/v4/classic/tests/validate.test.ts +569 -0
  56. package/node_modules/zod/src/v4/core/api.ts +44 -28
  57. package/node_modules/zod/src/v4/core/checks.ts +62 -102
  58. package/node_modules/zod/src/v4/core/compile.ts +218 -93
  59. package/node_modules/zod/src/v4/core/core.ts +1 -3
  60. package/node_modules/zod/src/v4/core/doc.ts +6 -2
  61. package/node_modules/zod/src/v4/core/errors.ts +3 -6
  62. package/node_modules/zod/src/v4/core/json-schema-generator.ts +2 -2
  63. package/node_modules/zod/src/v4/core/json-schema-processors.ts +185 -81
  64. package/node_modules/zod/src/v4/core/memoizer.ts +75 -28
  65. package/node_modules/zod/src/v4/core/parse.ts +37 -16
  66. package/node_modules/zod/src/v4/core/regexes.ts +14 -4
  67. package/node_modules/zod/src/v4/core/schemas.ts +296 -132
  68. package/node_modules/zod/src/v4/core/tests/cached.test.ts +54 -0
  69. package/node_modules/zod/src/v4/core/tests/compile-differential.test.ts +35 -0
  70. package/node_modules/zod/src/v4/core/tests/compile-generative.test.ts +445 -0
  71. package/node_modules/zod/src/v4/core/tests/compile.test.ts +399 -2
  72. package/node_modules/zod/src/v4/core/tests/email-regex.test.ts +140 -0
  73. package/node_modules/zod/src/v4/core/tests/locales/tg.test.ts +85 -0
  74. package/node_modules/zod/src/v4/core/tests/polyfill-collision.test.ts +46 -0
  75. package/node_modules/zod/src/v4/core/tests/url-no-canparse.test.ts +118 -16
  76. package/node_modules/zod/src/v4/core/to-json-schema.ts +9 -7
  77. package/node_modules/zod/src/v4/core/util.ts +218 -147
  78. package/node_modules/zod/src/v4/core/versions.ts +2 -2
  79. package/node_modules/zod/src/v4/locales/ar.ts +2 -0
  80. package/node_modules/zod/src/v4/locales/az.ts +2 -0
  81. package/node_modules/zod/src/v4/locales/be.ts +2 -0
  82. package/node_modules/zod/src/v4/locales/bg.ts +2 -0
  83. package/node_modules/zod/src/v4/locales/bn.ts +2 -0
  84. package/node_modules/zod/src/v4/locales/ca.ts +2 -0
  85. package/node_modules/zod/src/v4/locales/ckb.ts +2 -0
  86. package/node_modules/zod/src/v4/locales/cs.ts +2 -0
  87. package/node_modules/zod/src/v4/locales/da.ts +2 -0
  88. package/node_modules/zod/src/v4/locales/de.ts +2 -0
  89. package/node_modules/zod/src/v4/locales/el.ts +2 -0
  90. package/node_modules/zod/src/v4/locales/en.ts +2 -0
  91. package/node_modules/zod/src/v4/locales/eo.ts +2 -0
  92. package/node_modules/zod/src/v4/locales/es.ts +2 -0
  93. package/node_modules/zod/src/v4/locales/fa.ts +2 -0
  94. package/node_modules/zod/src/v4/locales/fi.ts +2 -0
  95. package/node_modules/zod/src/v4/locales/fr-CA.ts +2 -0
  96. package/node_modules/zod/src/v4/locales/fr.ts +2 -0
  97. package/node_modules/zod/src/v4/locales/gu.ts +2 -0
  98. package/node_modules/zod/src/v4/locales/he.ts +2 -0
  99. package/node_modules/zod/src/v4/locales/hi.ts +2 -0
  100. package/node_modules/zod/src/v4/locales/hr.ts +2 -0
  101. package/node_modules/zod/src/v4/locales/hu.ts +2 -0
  102. package/node_modules/zod/src/v4/locales/hy.ts +2 -0
  103. package/node_modules/zod/src/v4/locales/id.ts +2 -0
  104. package/node_modules/zod/src/v4/locales/index.ts +1 -0
  105. package/node_modules/zod/src/v4/locales/is.ts +2 -0
  106. package/node_modules/zod/src/v4/locales/it.ts +2 -0
  107. package/node_modules/zod/src/v4/locales/ja.ts +2 -0
  108. package/node_modules/zod/src/v4/locales/ka.ts +2 -0
  109. package/node_modules/zod/src/v4/locales/km.ts +2 -0
  110. package/node_modules/zod/src/v4/locales/kn.ts +2 -0
  111. package/node_modules/zod/src/v4/locales/ko.ts +2 -0
  112. package/node_modules/zod/src/v4/locales/lt.ts +2 -0
  113. package/node_modules/zod/src/v4/locales/mk.ts +2 -0
  114. package/node_modules/zod/src/v4/locales/ms.ts +2 -0
  115. package/node_modules/zod/src/v4/locales/ne.ts +2 -0
  116. package/node_modules/zod/src/v4/locales/nl.ts +2 -0
  117. package/node_modules/zod/src/v4/locales/nn.ts +2 -0
  118. package/node_modules/zod/src/v4/locales/no.ts +2 -0
  119. package/node_modules/zod/src/v4/locales/ota.ts +2 -0
  120. package/node_modules/zod/src/v4/locales/pl.ts +2 -0
  121. package/node_modules/zod/src/v4/locales/ps.ts +2 -0
  122. package/node_modules/zod/src/v4/locales/pt-BR.ts +2 -0
  123. package/node_modules/zod/src/v4/locales/pt.ts +2 -0
  124. package/node_modules/zod/src/v4/locales/ro.ts +2 -0
  125. package/node_modules/zod/src/v4/locales/ru.ts +2 -0
  126. package/node_modules/zod/src/v4/locales/sk.ts +2 -0
  127. package/node_modules/zod/src/v4/locales/sl.ts +2 -0
  128. package/node_modules/zod/src/v4/locales/sv.ts +2 -0
  129. package/node_modules/zod/src/v4/locales/ta.ts +2 -0
  130. package/node_modules/zod/src/v4/locales/tg.ts +135 -0
  131. package/node_modules/zod/src/v4/locales/th.ts +2 -0
  132. package/node_modules/zod/src/v4/locales/tk.ts +2 -0
  133. package/node_modules/zod/src/v4/locales/tr.ts +2 -0
  134. package/node_modules/zod/src/v4/locales/uk.ts +2 -0
  135. package/node_modules/zod/src/v4/locales/ur.ts +2 -0
  136. package/node_modules/zod/src/v4/locales/uz.ts +2 -0
  137. package/node_modules/zod/src/v4/locales/vi.ts +2 -0
  138. package/node_modules/zod/src/v4/locales/yo.ts +2 -0
  139. package/node_modules/zod/src/v4/locales/zh-CN.ts +2 -0
  140. package/node_modules/zod/src/v4/locales/zh-TW.ts +2 -0
  141. package/node_modules/zod/src/v4/mini/external.ts +2 -0
  142. package/node_modules/zod/src/v4/mini/schemas.ts +32 -7
  143. package/node_modules/zod/src/v4/mini/tests/checks.test.ts +1 -1
  144. package/node_modules/zod/src/v4/mini/tests/computed.test.ts +11 -17
  145. package/node_modules/zod/src/v4/mini/tests/index.test.ts +86 -0
  146. package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +16 -0
  147. package/node_modules/zod/src/v4/mini/tests/string.test.ts +23 -0
  148. package/node_modules/zod/v3/ZodError.cjs +19 -0
  149. package/node_modules/zod/v3/errors.cjs +19 -0
  150. package/node_modules/zod/v3/external.cjs +19 -0
  151. package/node_modules/zod/v3/helpers/enumUtil.cjs +19 -0
  152. package/node_modules/zod/v3/helpers/errorUtil.cjs +20 -1
  153. package/node_modules/zod/v3/helpers/errorUtil.js +1 -1
  154. package/node_modules/zod/v3/helpers/parseUtil.cjs +19 -0
  155. package/node_modules/zod/v3/helpers/partialUtil.cjs +19 -0
  156. package/node_modules/zod/v3/helpers/typeAliases.cjs +19 -0
  157. package/node_modules/zod/v3/helpers/util.cjs +19 -0
  158. package/node_modules/zod/v3/index.cjs +19 -0
  159. package/node_modules/zod/v3/standard-schema.cjs +19 -0
  160. package/node_modules/zod/v3/types.cjs +19 -0
  161. package/node_modules/zod/v4/classic/checks.cjs +19 -0
  162. package/node_modules/zod/v4/classic/coerce.cjs +19 -0
  163. package/node_modules/zod/v4/classic/compat.cjs +19 -0
  164. package/node_modules/zod/v4/classic/deep-partial.cjs +19 -0
  165. package/node_modules/zod/v4/classic/errors.cjs +19 -0
  166. package/node_modules/zod/v4/classic/external.cjs +22 -1
  167. package/node_modules/zod/v4/classic/external.d.cts +1 -1
  168. package/node_modules/zod/v4/classic/external.d.ts +1 -1
  169. package/node_modules/zod/v4/classic/external.js +1 -1
  170. package/node_modules/zod/v4/classic/from-json-schema.cjs +264 -24
  171. package/node_modules/zod/v4/classic/from-json-schema.js +245 -24
  172. package/node_modules/zod/v4/classic/in-out.cjs +19 -0
  173. package/node_modules/zod/v4/classic/index.cjs +19 -0
  174. package/node_modules/zod/v4/classic/iso.cjs +19 -0
  175. package/node_modules/zod/v4/classic/parse.cjs +19 -0
  176. package/node_modules/zod/v4/classic/schemas.cjs +100 -35
  177. package/node_modules/zod/v4/classic/schemas.d.cts +15 -1
  178. package/node_modules/zod/v4/classic/schemas.d.ts +15 -1
  179. package/node_modules/zod/v4/classic/schemas.js +77 -33
  180. package/node_modules/zod/v4/core/api.cjs +45 -22
  181. package/node_modules/zod/v4/core/api.d.cts +12 -6
  182. package/node_modules/zod/v4/core/api.d.ts +12 -6
  183. package/node_modules/zod/v4/core/api.js +25 -22
  184. package/node_modules/zod/v4/core/checks.cjs +51 -97
  185. package/node_modules/zod/v4/core/checks.d.cts +17 -1
  186. package/node_modules/zod/v4/core/checks.d.ts +17 -1
  187. package/node_modules/zod/v4/core/checks.js +31 -96
  188. package/node_modules/zod/v4/core/compile.cjs +173 -78
  189. package/node_modules/zod/v4/core/compile.d.cts +18 -4
  190. package/node_modules/zod/v4/core/compile.d.ts +18 -4
  191. package/node_modules/zod/v4/core/compile.js +154 -79
  192. package/node_modules/zod/v4/core/core.cjs +20 -1
  193. package/node_modules/zod/v4/core/core.js +1 -1
  194. package/node_modules/zod/v4/core/doc.cjs +26 -2
  195. package/node_modules/zod/v4/core/doc.js +7 -2
  196. package/node_modules/zod/v4/core/errors.cjs +21 -5
  197. package/node_modules/zod/v4/core/errors.js +2 -5
  198. package/node_modules/zod/v4/core/index.cjs +19 -0
  199. package/node_modules/zod/v4/core/json-schema-generator.cjs +20 -1
  200. package/node_modules/zod/v4/core/json-schema-generator.js +2 -2
  201. package/node_modules/zod/v4/core/json-schema-processors.cjs +188 -72
  202. package/node_modules/zod/v4/core/json-schema-processors.d.cts +16 -0
  203. package/node_modules/zod/v4/core/json-schema-processors.d.ts +16 -0
  204. package/node_modules/zod/v4/core/json-schema-processors.js +170 -74
  205. package/node_modules/zod/v4/core/json-schema.cjs +19 -0
  206. package/node_modules/zod/v4/core/memoizer.cjs +111 -23
  207. package/node_modules/zod/v4/core/memoizer.js +69 -23
  208. package/node_modules/zod/v4/core/parse.cjs +56 -16
  209. package/node_modules/zod/v4/core/parse.js +37 -16
  210. package/node_modules/zod/v4/core/regexes.cjs +31 -6
  211. package/node_modules/zod/v4/core/regexes.d.cts +3 -0
  212. package/node_modules/zod/v4/core/regexes.d.ts +3 -0
  213. package/node_modules/zod/v4/core/regexes.js +10 -4
  214. package/node_modules/zod/v4/core/registries.cjs +19 -0
  215. package/node_modules/zod/v4/core/schemas.cjs +302 -114
  216. package/node_modules/zod/v4/core/schemas.d.cts +28 -8
  217. package/node_modules/zod/v4/core/schemas.d.ts +28 -8
  218. package/node_modules/zod/v4/core/schemas.js +279 -113
  219. package/node_modules/zod/v4/core/standard-schema.cjs +19 -0
  220. package/node_modules/zod/v4/core/to-json-schema.cjs +28 -7
  221. package/node_modules/zod/v4/core/to-json-schema.d.cts +4 -3
  222. package/node_modules/zod/v4/core/to-json-schema.d.ts +4 -3
  223. package/node_modules/zod/v4/core/to-json-schema.js +7 -6
  224. package/node_modules/zod/v4/core/util.cjs +177 -143
  225. package/node_modules/zod/v4/core/util.d.cts +25 -4
  226. package/node_modules/zod/v4/core/util.d.ts +25 -4
  227. package/node_modules/zod/v4/core/util.js +156 -143
  228. package/node_modules/zod/v4/core/versions.cjs +21 -2
  229. package/node_modules/zod/v4/core/versions.d.cts +1 -1
  230. package/node_modules/zod/v4/core/versions.d.ts +1 -1
  231. package/node_modules/zod/v4/core/versions.js +2 -2
  232. package/node_modules/zod/v4/core/visit.cjs +19 -0
  233. package/node_modules/zod/v4/index.cjs +19 -0
  234. package/node_modules/zod/v4/locales/ar.cjs +2 -0
  235. package/node_modules/zod/v4/locales/ar.js +2 -0
  236. package/node_modules/zod/v4/locales/az.cjs +2 -0
  237. package/node_modules/zod/v4/locales/az.js +2 -0
  238. package/node_modules/zod/v4/locales/be.cjs +2 -0
  239. package/node_modules/zod/v4/locales/be.js +2 -0
  240. package/node_modules/zod/v4/locales/bg.cjs +2 -0
  241. package/node_modules/zod/v4/locales/bg.js +2 -0
  242. package/node_modules/zod/v4/locales/bn.cjs +2 -0
  243. package/node_modules/zod/v4/locales/bn.js +2 -0
  244. package/node_modules/zod/v4/locales/ca.cjs +2 -0
  245. package/node_modules/zod/v4/locales/ca.js +2 -0
  246. package/node_modules/zod/v4/locales/ckb.cjs +2 -0
  247. package/node_modules/zod/v4/locales/ckb.js +2 -0
  248. package/node_modules/zod/v4/locales/cs.cjs +2 -0
  249. package/node_modules/zod/v4/locales/cs.js +2 -0
  250. package/node_modules/zod/v4/locales/da.cjs +2 -0
  251. package/node_modules/zod/v4/locales/da.js +2 -0
  252. package/node_modules/zod/v4/locales/de.cjs +2 -0
  253. package/node_modules/zod/v4/locales/de.js +2 -0
  254. package/node_modules/zod/v4/locales/el.cjs +2 -0
  255. package/node_modules/zod/v4/locales/el.js +2 -0
  256. package/node_modules/zod/v4/locales/en.cjs +2 -0
  257. package/node_modules/zod/v4/locales/en.js +2 -0
  258. package/node_modules/zod/v4/locales/eo.cjs +2 -0
  259. package/node_modules/zod/v4/locales/eo.js +2 -0
  260. package/node_modules/zod/v4/locales/es.cjs +2 -0
  261. package/node_modules/zod/v4/locales/es.js +2 -0
  262. package/node_modules/zod/v4/locales/fa.cjs +2 -0
  263. package/node_modules/zod/v4/locales/fa.js +2 -0
  264. package/node_modules/zod/v4/locales/fi.cjs +2 -0
  265. package/node_modules/zod/v4/locales/fi.js +2 -0
  266. package/node_modules/zod/v4/locales/fr-CA.cjs +2 -0
  267. package/node_modules/zod/v4/locales/fr-CA.js +2 -0
  268. package/node_modules/zod/v4/locales/fr.cjs +2 -0
  269. package/node_modules/zod/v4/locales/fr.js +2 -0
  270. package/node_modules/zod/v4/locales/gu.cjs +2 -0
  271. package/node_modules/zod/v4/locales/gu.js +2 -0
  272. package/node_modules/zod/v4/locales/he.cjs +2 -0
  273. package/node_modules/zod/v4/locales/he.js +2 -0
  274. package/node_modules/zod/v4/locales/hi.cjs +2 -0
  275. package/node_modules/zod/v4/locales/hi.js +2 -0
  276. package/node_modules/zod/v4/locales/hr.cjs +2 -0
  277. package/node_modules/zod/v4/locales/hr.js +2 -0
  278. package/node_modules/zod/v4/locales/hu.cjs +2 -0
  279. package/node_modules/zod/v4/locales/hu.js +2 -0
  280. package/node_modules/zod/v4/locales/hy.cjs +2 -0
  281. package/node_modules/zod/v4/locales/hy.js +2 -0
  282. package/node_modules/zod/v4/locales/id.cjs +2 -0
  283. package/node_modules/zod/v4/locales/id.js +2 -0
  284. package/node_modules/zod/v4/locales/index.cjs +22 -1
  285. package/node_modules/zod/v4/locales/index.d.cts +1 -0
  286. package/node_modules/zod/v4/locales/index.d.ts +1 -0
  287. package/node_modules/zod/v4/locales/index.js +1 -0
  288. package/node_modules/zod/v4/locales/is.cjs +2 -0
  289. package/node_modules/zod/v4/locales/is.js +2 -0
  290. package/node_modules/zod/v4/locales/it.cjs +2 -0
  291. package/node_modules/zod/v4/locales/it.js +2 -0
  292. package/node_modules/zod/v4/locales/ja.cjs +2 -0
  293. package/node_modules/zod/v4/locales/ja.js +2 -0
  294. package/node_modules/zod/v4/locales/ka.cjs +2 -0
  295. package/node_modules/zod/v4/locales/ka.js +2 -0
  296. package/node_modules/zod/v4/locales/km.cjs +2 -0
  297. package/node_modules/zod/v4/locales/km.js +2 -0
  298. package/node_modules/zod/v4/locales/kn.cjs +2 -0
  299. package/node_modules/zod/v4/locales/kn.js +2 -0
  300. package/node_modules/zod/v4/locales/ko.cjs +2 -0
  301. package/node_modules/zod/v4/locales/ko.js +2 -0
  302. package/node_modules/zod/v4/locales/lt.cjs +2 -0
  303. package/node_modules/zod/v4/locales/lt.js +2 -0
  304. package/node_modules/zod/v4/locales/mk.cjs +2 -0
  305. package/node_modules/zod/v4/locales/mk.js +2 -0
  306. package/node_modules/zod/v4/locales/ms.cjs +2 -0
  307. package/node_modules/zod/v4/locales/ms.js +2 -0
  308. package/node_modules/zod/v4/locales/ne.cjs +2 -0
  309. package/node_modules/zod/v4/locales/ne.js +2 -0
  310. package/node_modules/zod/v4/locales/nl.cjs +2 -0
  311. package/node_modules/zod/v4/locales/nl.js +2 -0
  312. package/node_modules/zod/v4/locales/nn.cjs +2 -0
  313. package/node_modules/zod/v4/locales/nn.js +2 -0
  314. package/node_modules/zod/v4/locales/no.cjs +2 -0
  315. package/node_modules/zod/v4/locales/no.js +2 -0
  316. package/node_modules/zod/v4/locales/ota.cjs +2 -0
  317. package/node_modules/zod/v4/locales/ota.js +2 -0
  318. package/node_modules/zod/v4/locales/pl.cjs +2 -0
  319. package/node_modules/zod/v4/locales/pl.js +2 -0
  320. package/node_modules/zod/v4/locales/ps.cjs +2 -0
  321. package/node_modules/zod/v4/locales/ps.js +2 -0
  322. package/node_modules/zod/v4/locales/pt-BR.cjs +2 -0
  323. package/node_modules/zod/v4/locales/pt-BR.js +2 -0
  324. package/node_modules/zod/v4/locales/pt.cjs +2 -0
  325. package/node_modules/zod/v4/locales/pt.js +2 -0
  326. package/node_modules/zod/v4/locales/ro.cjs +2 -0
  327. package/node_modules/zod/v4/locales/ro.js +2 -0
  328. package/node_modules/zod/v4/locales/ru.cjs +2 -0
  329. package/node_modules/zod/v4/locales/ru.js +2 -0
  330. package/node_modules/zod/v4/locales/sk.cjs +2 -0
  331. package/node_modules/zod/v4/locales/sk.js +2 -0
  332. package/node_modules/zod/v4/locales/sl.cjs +2 -0
  333. package/node_modules/zod/v4/locales/sl.js +2 -0
  334. package/node_modules/zod/v4/locales/sv.cjs +2 -0
  335. package/node_modules/zod/v4/locales/sv.js +2 -0
  336. package/node_modules/zod/v4/locales/ta.cjs +2 -0
  337. package/node_modules/zod/v4/locales/ta.js +2 -0
  338. package/node_modules/zod/v4/locales/tg.cjs +144 -0
  339. package/node_modules/zod/v4/locales/tg.d.cts +5 -0
  340. package/node_modules/zod/v4/locales/tg.d.ts +4 -0
  341. package/node_modules/zod/v4/locales/tg.js +117 -0
  342. package/node_modules/zod/v4/locales/th.cjs +2 -0
  343. package/node_modules/zod/v4/locales/th.js +2 -0
  344. package/node_modules/zod/v4/locales/tk.cjs +2 -0
  345. package/node_modules/zod/v4/locales/tk.js +2 -0
  346. package/node_modules/zod/v4/locales/tr.cjs +2 -0
  347. package/node_modules/zod/v4/locales/tr.js +2 -0
  348. package/node_modules/zod/v4/locales/uk.cjs +2 -0
  349. package/node_modules/zod/v4/locales/uk.js +2 -0
  350. package/node_modules/zod/v4/locales/ur.cjs +2 -0
  351. package/node_modules/zod/v4/locales/ur.js +2 -0
  352. package/node_modules/zod/v4/locales/uz.cjs +2 -0
  353. package/node_modules/zod/v4/locales/uz.js +2 -0
  354. package/node_modules/zod/v4/locales/vi.cjs +2 -0
  355. package/node_modules/zod/v4/locales/vi.js +2 -0
  356. package/node_modules/zod/v4/locales/yo.cjs +2 -0
  357. package/node_modules/zod/v4/locales/yo.js +2 -0
  358. package/node_modules/zod/v4/locales/zh-CN.cjs +2 -0
  359. package/node_modules/zod/v4/locales/zh-CN.js +2 -0
  360. package/node_modules/zod/v4/locales/zh-TW.cjs +2 -0
  361. package/node_modules/zod/v4/locales/zh-TW.js +2 -0
  362. package/node_modules/zod/v4/mini/checks.cjs +19 -0
  363. package/node_modules/zod/v4/mini/coerce.cjs +19 -0
  364. package/node_modules/zod/v4/mini/deep-partial.cjs +19 -0
  365. package/node_modules/zod/v4/mini/external.cjs +22 -1
  366. package/node_modules/zod/v4/mini/external.d.cts +1 -1
  367. package/node_modules/zod/v4/mini/external.d.ts +1 -1
  368. package/node_modules/zod/v4/mini/external.js +1 -1
  369. package/node_modules/zod/v4/mini/in-out.cjs +19 -0
  370. package/node_modules/zod/v4/mini/index.cjs +19 -0
  371. package/node_modules/zod/v4/mini/iso.cjs +19 -0
  372. package/node_modules/zod/v4/mini/parse.cjs +19 -0
  373. package/node_modules/zod/v4/mini/schemas.cjs +44 -8
  374. package/node_modules/zod/v4/mini/schemas.d.cts +6 -1
  375. package/node_modules/zod/v4/mini/schemas.d.ts +6 -1
  376. package/node_modules/zod/v4/mini/schemas.js +21 -6
  377. package/node_modules/zod/v4-mini/index.cjs +19 -0
  378. package/openclaw.plugin.json +20 -0
  379. package/package.json +5 -5
  380. package/dist/.setup/doctor-contract-mvORF4f6.mjs +0 -18
package/assets/icon.png CHANGED
Binary file
@@ -1,3 +1,3 @@
1
- import { t as mattermostPlugin } from "./channel-plugin-runtime-Ca4cZHq2.mjs";
2
- import { t as mattermostSetupPlugin } from "./channel-plugin-api-CKz3b0dp.mjs";
1
+ import { t as mattermostPlugin } from "./channel-plugin-runtime-B0CAMiHe.mjs";
2
+ import { t as mattermostSetupPlugin } from "./channel-plugin-api-DXqHarCt.mjs";
3
3
  export { mattermostPlugin, mattermostSetupPlugin };
@@ -1,5 +1,5 @@
1
- import { s as isMattermostConfigured } from "./normalize-BQzx2u8S.mjs";
2
- import { a as describeMattermostAccount, i as MattermostChannelConfigSchema, n as mattermostSetupWizard, o as mattermostConfigAdapter, r as mattermostSetupContract, s as mattermostMeta } from "./channel-plugin-runtime-Ca4cZHq2.mjs";
1
+ import { s as isMattermostConfigured } from "./normalize-BCjtmxtp.mjs";
2
+ import { a as describeMattermostAccount, i as MattermostChannelConfigSchema, n as mattermostSetupWizard, o as mattermostConfigAdapter, r as mattermostSetupContract, s as mattermostMeta } from "./channel-plugin-runtime-B0CAMiHe.mjs";
3
3
  import { t as resolveMattermostGatewayAuthBypassPaths } from "./gateway-auth-bypass-B93t91oq.mjs";
4
4
  //#region extensions/mattermost/src/channel.setup.ts
5
5
  const mattermostSetupPlugin = {
@@ -1,8 +1,8 @@
1
- import { h as normalizeMattermostBaseUrl } from "./client-Cx71KZ1x.mjs";
1
+ import { h as normalizeMattermostBaseUrl } from "./client-CVeeTqCO.mjs";
2
2
  import { t as mattermostIngressIdentity } from "./ingress-identity-DNl4yQSc.mjs";
3
- import { a as resolveMattermostPresentation, c as listMattermostAccountIds, d as resolveMattermostReplyToMode, f as buildSecretInputSchema, i as requiresMattermostMediaUpload, l as resolveDefaultMattermostAccountId, n as normalizeMattermostMessagingTarget, o as inspectMattermostAccount, p as hasConfiguredSecretInput, s as isMattermostConfigured$1, t as looksLikeMattermostTargetId, u as resolveMattermostAccount } from "./normalize-BQzx2u8S.mjs";
3
+ import { a as resolveMattermostPresentation, c as listMattermostAccountIds, d as resolveMattermostReplyToMode, i as requiresMattermostMediaUpload, l as resolveDefaultMattermostAccountId, n as normalizeMattermostMessagingTarget, o as inspectMattermostAccount, s as isMattermostConfigured$1, t as looksLikeMattermostTargetId, u as resolveMattermostAccount } from "./normalize-BCjtmxtp.mjs";
4
4
  import { t as resolveMattermostGatewayAuthBypassPaths } from "./gateway-auth-bypass-B93t91oq.mjs";
5
- import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-mvORF4f6.mjs";
5
+ import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-BI6SB2cd.mjs";
6
6
  import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-qg3NXRlS.mjs";
7
7
  import { normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
8
8
  import { buildPassiveProbedChannelStatusSummary } from "openclaw/plugin-sdk/extension-shared";
@@ -12,10 +12,11 @@ import { formatNormalizedAllowFromEntries } from "openclaw/plugin-sdk/allow-from
12
12
  import { createLoggedPairingApprovalNotifier } from "openclaw/plugin-sdk/channel-pairing";
13
13
  import { createAccountStatusSink, createChannelMessageAdapterFromOutbound } from "openclaw/plugin-sdk/channel-outbound";
14
14
  import { describeAccountSnapshot } from "openclaw/plugin-sdk/account-helpers";
15
- import { DEFAULT_ACCOUNT_ID as DEFAULT_ACCOUNT_ID$1, buildChannelOutboundSessionRoute, buildThreadAwareOutboundSessionRoute, stripChannelTargetPrefix, stripTargetKindPrefix } from "openclaw/plugin-sdk/core";
16
- import { identityEntryAuthenticationClassifier } from "openclaw/plugin-sdk/channel-ingress-runtime";
15
+ import { buildChannelOutboundSessionRoute, buildThreadAwareOutboundSessionRoute, stripChannelTargetPrefix, stripTargetKindPrefix } from "openclaw/plugin-sdk/core";
16
+ import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/account-id";
17
17
  import { jsonResult, readPositiveIntegerParam, readStringArrayParam, readStringParam, withNormalizedTimestamp } from "openclaw/plugin-sdk/channel-actions";
18
18
  import { createChannelConfigUiHints, createChatChannelPlugin } from "openclaw/plugin-sdk/channel-core";
19
+ import { identityEntryAuthenticationClassifier } from "openclaw/plugin-sdk/channel-ingress-runtime";
19
20
  import { buildChannelGroupsScopeTree, buildMutableAllowEntryDetector, collectStandardAllowlistLists, createDangerousNameMatchingMutableAllowlistWarningCollector, createRestrictSendersChannelSecurity, resolveScopeRequireMention } from "openclaw/plugin-sdk/channel-policy";
20
21
  import { attachChannelToResult, createAttachedChannelResultAdapter } from "openclaw/plugin-sdk/channel-send-result";
21
22
  import { createChannelDirectoryAdapter } from "openclaw/plugin-sdk/directory-runtime";
@@ -25,9 +26,9 @@ import { resolvePayloadMediaUrls, sendTextMediaPayload } from "openclaw/plugin-s
25
26
  import { createComputedAccountStatusAdapter, createDefaultChannelRuntimeState } from "openclaw/plugin-sdk/status-helpers";
26
27
  import { chunkTextForOutbound, sanitizeAssistantVisibleText } from "openclaw/plugin-sdk/text-chunking";
27
28
  import { createChannelApprovalAuth } from "openclaw/plugin-sdk/approval-auth-runtime";
28
- import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/account-id";
29
+ import { buildSecretInputSchema, hasConfiguredSecretInput } from "openclaw/plugin-sdk/secret-input";
29
30
  import { adaptScopedAccountAccessor, createScopedChannelConfigAdapter } from "openclaw/plugin-sdk/channel-config-helpers";
30
- import { BlockStreamingCoalesceSchema, ChannelImplicitMentionsSchema, ContextVisibilityModeSchema, DmPolicySchema, GroupPolicySchema, MarkdownConfigSchema, buildChannelConfigSchema, buildGroupEntrySchema, buildMultiAccountChannelSchema, requireOpenAllowFrom } from "openclaw/plugin-sdk/channel-config-schema";
31
+ import { ChannelImplicitMentionsSchema, ChannelPreviewStreamingConfigSchema, ChannelStreamingPreviewSchema, ChannelStreamingProgressSchema, ContextVisibilityModeSchema, DmPolicySchema, GroupPolicySchema, MarkdownConfigSchema, buildChannelConfigSchema, buildGroupEntrySchema, buildMultiAccountChannelSchema, requireOpenAllowFrom } from "openclaw/plugin-sdk/channel-config-schema";
31
32
  import { defineChannelSetupContract } from "openclaw/plugin-sdk/channel-setup";
32
33
  import { applyAccountNameToChannelSection, applySetupAccountConfigPatch, baseUrlTextInput, createSetupTranslator, createStandardChannelSetupStatus, defineTokenCredential, formatDocsLink, migrateBaseNameToDefaultAccount, setSetupChannelEnabled } from "openclaw/plugin-sdk/setup";
33
34
  import { createSetupInputPresenceValidator } from "openclaw/plugin-sdk/setup-runtime";
@@ -103,8 +104,25 @@ function describeMattermostAccount(account) {
103
104
  });
104
105
  }
105
106
  //#endregion
107
+ //#region extensions/mattermost/src/channel-send-result.ts
108
+ function toMattermostOutboundResult(result) {
109
+ const { channelId, ...delivery } = result;
110
+ return {
111
+ ...delivery,
112
+ target: {
113
+ kind: "channel",
114
+ id: channelId
115
+ }
116
+ };
117
+ }
118
+ function createMattermostDeliveryProgressReporter(onDeliveryResult) {
119
+ return onDeliveryResult ? async (result) => {
120
+ await onDeliveryResult(attachChannelToResult("mattermost", toMattermostOutboundResult(result)));
121
+ } : void 0;
122
+ }
123
+ //#endregion
106
124
  //#region extensions/mattermost/src/config-schema-core.ts
107
- const MattermostGroupSchema = buildGroupEntrySchema().omit({
125
+ const MattermostGroupSchema = buildGroupEntrySchema({ requireMentionInBotThreads: z.boolean().optional() }).omit({
108
126
  tools: true,
109
127
  toolsBySender: true,
110
128
  skills: true,
@@ -112,15 +130,6 @@ const MattermostGroupSchema = buildGroupEntrySchema().omit({
112
130
  allowFrom: true,
113
131
  systemPrompt: true
114
132
  });
115
- function requireMattermostOpenAllowFrom(params) {
116
- requireOpenAllowFrom({
117
- policy: params.policy,
118
- allowFrom: params.allowFrom,
119
- ctx: params.ctx,
120
- path: ["allowFrom"],
121
- message: "channels.mattermost.dmPolicy=\"open\" requires channels.mattermost.allowFrom to include \"*\""
122
- });
123
- }
124
133
  const DmChannelRetrySchema = z.object({
125
134
  /** Maximum number of retry attempts for DM channel creation (default: 3) */
126
135
  maxRetries: z.number().int().min(0).max(10).optional(),
@@ -150,35 +159,13 @@ const MattermostSlashCommandsSchema = z.object({
150
159
  const MattermostNetworkSchema = z.object({
151
160
  /** Dangerous opt-in for self-hosted Mattermost on trusted private/internal hosts. */
152
161
  dangerouslyAllowPrivateNetwork: z.boolean().optional() }).strict().optional();
153
- const MattermostStreamingModeSchema = z.enum([
154
- "off",
155
- "partial",
156
- "block",
157
- "progress"
158
- ]);
159
- const MattermostStreamingProgressSchema = z.object({
160
- label: z.union([z.string(), z.literal(false)]).optional(),
161
- labels: z.array(z.string()).optional(),
162
- maxLines: z.number().int().positive().optional(),
163
- maxLineChars: z.number().int().positive().optional(),
164
- toolProgress: z.boolean().optional(),
165
- commandText: z.enum(["raw", "status"]).optional()
166
- }).strict();
167
- const MattermostStreamingPreviewSchema = z.object({
168
- toolProgress: z.boolean().optional(),
169
- commandText: z.enum(["raw", "status"]).optional()
170
- }).strict();
171
- const MattermostStreamingBlockSchema = z.object({
172
- enabled: z.boolean().optional(),
173
- coalesce: BlockStreamingCoalesceSchema.optional()
174
- }).strict();
175
- const MattermostStreamingSchema = z.object({
176
- mode: MattermostStreamingModeSchema.optional(),
177
- chunkMode: z.enum(["length", "newline"]).optional(),
178
- preview: MattermostStreamingPreviewSchema.optional(),
179
- progress: MattermostStreamingProgressSchema.optional(),
180
- block: MattermostStreamingBlockSchema.optional()
181
- }).strict();
162
+ const MattermostStreamingSchema = ChannelPreviewStreamingConfigSchema.extend({
163
+ preview: ChannelStreamingPreviewSchema.omit({ chunk: true }).optional(),
164
+ progress: ChannelStreamingProgressSchema.omit({
165
+ commentary: true,
166
+ narration: true
167
+ }).optional()
168
+ });
182
169
  const MattermostReplyToModeSchema = z.enum([
183
170
  "off",
184
171
  "first",
@@ -209,6 +196,7 @@ const MattermostAccountSchemaBase = z.object({
209
196
  ]).optional(),
210
197
  oncharPrefixes: z.array(z.string()).optional(),
211
198
  requireMention: z.boolean().optional(),
199
+ requireMentionInBotThreads: z.boolean().optional(),
212
200
  implicitMentions: ChannelImplicitMentionsSchema.optional(),
213
201
  dmPolicy: DmPolicySchema.optional().default("pairing"),
214
202
  allowFrom: z.array(z.union([z.string(), z.number()])).optional(),
@@ -238,10 +226,12 @@ const MattermostAccountSchemaBase = z.object({
238
226
  const MattermostConfigSchema = buildMultiAccountChannelSchema(MattermostAccountSchemaBase, {
239
227
  optionalAccount: true,
240
228
  refine: (value, ctx) => {
241
- requireMattermostOpenAllowFrom({
229
+ requireOpenAllowFrom({
242
230
  policy: value.dmPolicy,
243
231
  allowFrom: value.allowFrom,
244
- ctx
232
+ ctx,
233
+ path: ["allowFrom"],
234
+ message: "channels.mattermost.dmPolicy=\"open\" requires channels.mattermost.allowFrom to include \"*\""
245
235
  });
246
236
  }
247
237
  });
@@ -252,6 +242,14 @@ const mattermostChannelConfigUiHints = {
252
242
  label: "Mattermost",
253
243
  help: "Mattermost channel provider configuration for bot auth, access policy, slash commands, and preview streaming."
254
244
  },
245
+ requireMentionInBotThreads: {
246
+ label: "Mention in Bot Threads",
247
+ help: "Require an explicit mention or configured trigger in threads rooted in this bot's own posts. Set false to accept unmentioned follow-ups; omit to preserve existing mention and participation behavior."
248
+ },
249
+ "groups.*.requireMentionInBotThreads": {
250
+ label: "Mention in Bot Threads",
251
+ help: "Override bot-created thread mention policy for this Mattermost channel. Exact channel settings override the wildcard, then the account setting."
252
+ },
255
253
  ...createChannelConfigUiHints({
256
254
  channelLabel: "Mattermost",
257
255
  dmPolicy: { channelKey: "mattermost" },
@@ -276,7 +274,7 @@ const isMattermostMutableAllowEntry = buildMutableAllowEntryDetector({ stableIdP
276
274
  const collectMattermostMutableAllowlistWarnings = createDangerousNameMatchingMutableAllowlistWarningCollector({
277
275
  channel: "mattermost",
278
276
  detector: isMattermostMutableAllowEntry,
279
- collectLists: (scope) => collectStandardAllowlistLists(scope)
277
+ collectLists: collectStandardAllowlistLists
280
278
  });
281
279
  const mattermostDoctor = {
282
280
  legacyConfigRules,
@@ -408,12 +406,6 @@ const channel$1 = "mattermost";
408
406
  function isMattermostConfigured(account) {
409
407
  return (Boolean(account.botToken?.trim()) || hasConfiguredSecretInput(account.config.botToken)) && Boolean(account.baseUrl);
410
408
  }
411
- function resolveMattermostAccountWithSecrets(cfg, accountId) {
412
- return inspectMattermostAccount({
413
- cfg,
414
- accountId
415
- });
416
- }
417
409
  function applyMattermostSetupConfigPatch(params) {
418
410
  const namedConfig = applyAccountNameToChannelSection({
419
411
  cfg: params.cfg,
@@ -526,7 +518,10 @@ const mattermostSetupWizard = {
526
518
  unconfiguredHint: t("wizard.channels.statusNeedsSetup"),
527
519
  configuredScore: 2,
528
520
  unconfiguredScore: 1,
529
- resolveConfigured: ({ cfg, accountId }) => isMattermostConfigured(resolveMattermostAccountWithSecrets(cfg, accountId ?? DEFAULT_ACCOUNT_ID))
521
+ resolveConfigured: ({ cfg, accountId }) => isMattermostConfigured(inspectMattermostAccount({
522
+ cfg,
523
+ accountId: accountId ?? DEFAULT_ACCOUNT_ID
524
+ }))
530
525
  }),
531
526
  introNote: {
532
527
  title: t("wizard.mattermost.botTokenTitle"),
@@ -537,14 +532,20 @@ const mattermostSetupWizard = {
537
532
  t("wizard.mattermost.helpBotMember"),
538
533
  t("wizard.channels.docs", { link: formatDocsLink("/mattermost", "mattermost") })
539
534
  ],
540
- shouldShow: ({ cfg, accountId }) => !isMattermostConfigured(resolveMattermostAccountWithSecrets(cfg, accountId))
535
+ shouldShow: ({ cfg, accountId }) => !isMattermostConfigured(inspectMattermostAccount({
536
+ cfg,
537
+ accountId
538
+ }))
541
539
  },
542
540
  envShortcut: {
543
541
  prompt: t("wizard.mattermost.envPrompt"),
544
542
  preferredEnvVar: "MATTERMOST_BOT_TOKEN",
545
543
  isAvailable: ({ cfg, accountId }) => {
546
544
  if (accountId !== DEFAULT_ACCOUNT_ID) return false;
547
- const resolvedAccount = resolveMattermostAccountWithSecrets(cfg, accountId);
545
+ const resolvedAccount = inspectMattermostAccount({
546
+ cfg,
547
+ accountId
548
+ });
548
549
  const hasConfigValues = hasConfiguredSecretInput(resolvedAccount.config.botToken) || Boolean(resolvedAccount.config.baseUrl?.trim());
549
550
  return Boolean(process.env.MATTERMOST_BOT_TOKEN?.trim() && process.env.MATTERMOST_URL?.trim() && !hasConfigValues);
550
551
  },
@@ -564,7 +565,7 @@ const mattermostSetupWizard = {
564
565
  envPrompt: t("wizard.mattermost.envPrompt"),
565
566
  keepPrompt: t("wizard.mattermost.botTokenKeep"),
566
567
  inputPrompt: t("wizard.mattermost.botTokenInput"),
567
- resolveAccount: ({ cfg, accountId }) => resolveMattermostAccountWithSecrets(cfg, accountId),
568
+ resolveAccount: inspectMattermostAccount,
568
569
  accountConfigured: isMattermostConfigured,
569
570
  patchAccount: ({ cfg, accountId, patch }) => applyMattermostSetupConfigPatch({
570
571
  cfg,
@@ -578,11 +579,14 @@ const mattermostSetupWizard = {
578
579
  configKey: "baseUrl",
579
580
  message: t("wizard.mattermost.baseUrlPrompt"),
580
581
  confirmCurrentValue: false,
581
- resolveAccount: ({ cfg, accountId }) => resolveMattermostAccountWithSecrets(cfg, accountId),
582
+ resolveAccount: inspectMattermostAccount,
582
583
  currentValue: (account) => account.baseUrl ?? process.env.MATTERMOST_URL?.trim(),
583
584
  includeInitialValue: true,
584
585
  shouldPrompt: ({ cfg, accountId, credentialValues, currentValue }) => {
585
- const resolvedAccount = resolveMattermostAccountWithSecrets(cfg, accountId);
586
+ const resolvedAccount = inspectMattermostAccount({
587
+ cfg,
588
+ accountId
589
+ });
586
590
  const tokenConfigured = Boolean(resolvedAccount.botToken?.trim()) || hasConfiguredSecretInput(resolvedAccount.config.botToken);
587
591
  return Boolean(credentialValues.botToken) || !tokenConfigured || !currentValue;
588
592
  },
@@ -598,7 +602,7 @@ const mattermostSetupWizard = {
598
602
  };
599
603
  //#endregion
600
604
  //#region extensions/mattermost/src/channel.ts
601
- const loadMattermostChannelRuntime = createLazyRuntimeModule(() => import("./channel.runtime-C074p7wv.mjs"));
605
+ const loadMattermostChannelRuntime = createLazyRuntimeModule(() => import("./channel.runtime-E2B5dNrh.mjs"));
602
606
  const MATTERMOST_PRESENTATION_CAPABILITIES = {
603
607
  supported: true,
604
608
  buttons: true,
@@ -633,19 +637,25 @@ const mattermostSecurityAdapter = createRestrictSendersChannelSecurity({
633
637
  findingTitle: "Mattermost security warning",
634
638
  policyPathSuffix: "dmPolicy",
635
639
  classifyEntryAuthentication: identityEntryAuthenticationClassifier(mattermostIngressIdentity),
636
- normalizeDmEntry: (raw) => normalizeMattermostAllowEntry(raw)
640
+ normalizeDmEntry: normalizeMattermostAllowEntry
637
641
  });
638
- function describeMattermostMessageTool({ cfg, accountId }) {
639
- const enabledAccounts = (accountId ? [inspectMattermostAccount({
642
+ function listEnabledMattermostAccounts({ cfg, accountId }) {
643
+ return (accountId ? [inspectMattermostAccount({
640
644
  cfg,
641
645
  accountId
642
646
  })] : listMattermostAccountIds(cfg).map((listedAccountId) => inspectMattermostAccount({
643
647
  cfg,
644
648
  accountId: listedAccountId
645
- }))).filter((account) => account.enabled).filter((account) => Boolean(account.botToken?.trim() && account.baseUrl?.trim()));
649
+ }))).filter((account) => account.enabled && account.botToken?.trim() && account.baseUrl?.trim());
650
+ }
651
+ function describeMattermostMessageTool({ cfg, accountId }) {
652
+ const enabledAccounts = listEnabledMattermostAccounts({
653
+ cfg,
654
+ accountId
655
+ });
646
656
  const actions = [];
647
657
  if (enabledAccounts.length > 0) actions.push("send");
648
- const actionsConfig = cfg.channels?.mattermost?.actions;
658
+ const actionsConfig = (cfg.channels?.mattermost)?.actions;
649
659
  const baseMessages = actionsConfig?.messages;
650
660
  const baseReactions = actionsConfig?.reactions;
651
661
  if (enabledAccounts.some((account) => {
@@ -657,15 +667,6 @@ function describeMattermostMessageTool({ cfg, accountId }) {
657
667
  capabilities: enabledAccounts.length > 0 ? ["presentation"] : []
658
668
  };
659
669
  }
660
- function hasConfiguredMattermostDirectoryAccount({ cfg, accountId }) {
661
- return (accountId ? [inspectMattermostAccount({
662
- cfg,
663
- accountId
664
- })] : listMattermostAccountIds(cfg).map((listedAccountId) => inspectMattermostAccount({
665
- cfg,
666
- accountId: listedAccountId
667
- }))).some((account) => Boolean(account.enabled && account.botToken?.trim() && account.baseUrl?.trim()));
668
- }
669
670
  function extractMattermostToolSend(args) {
670
671
  if (normalizeOptionalString(args.action) !== "send") return null;
671
672
  const to = normalizeOptionalString(args.to) ?? normalizeOptionalString(args.target);
@@ -684,7 +685,7 @@ function resolveMattermostAutoThreadId(params) {
684
685
  const replyToId = normalizeOptionalString(params.replyToId);
685
686
  const context = params.toolContext;
686
687
  const currentThreadId = normalizeOptionalString(context?.currentThreadTs);
687
- const currentMessageId = typeof context?.currentMessageId === "number" ? String(context.currentMessageId) : normalizeOptionalString(context?.currentMessageId);
688
+ const currentMessageId = normalizeMattermostThreadId(context?.currentMessageId);
688
689
  const currentTarget = normalizeMattermostThreadTarget(context?.currentChannelId);
689
690
  if (currentThreadId && currentTarget === normalizeMattermostThreadTarget(params.to)) {
690
691
  if (replyToId === currentMessageId) return currentThreadId;
@@ -729,11 +730,11 @@ function buildMattermostThreadingToolContext(params) {
729
730
  };
730
731
  }
731
732
  async function listMattermostDirectoryGroups(params) {
732
- if (!hasConfiguredMattermostDirectoryAccount(params)) return [];
733
+ if (listEnabledMattermostAccounts(params).length === 0) return [];
733
734
  return (await loadMattermostChannelRuntime()).listMattermostDirectoryGroups(params);
734
735
  }
735
736
  async function listMattermostDirectoryPeers(params) {
736
- if (!hasConfiguredMattermostDirectoryAccount(params)) return [];
737
+ if (listEnabledMattermostAccounts(params).length === 0) return [];
737
738
  return (await loadMattermostChannelRuntime()).listMattermostDirectoryPeers(params);
738
739
  }
739
740
  const mattermostMessageActions = {
@@ -761,19 +762,18 @@ const mattermostMessageActions = {
761
762
  } } : {}
762
763
  };
763
764
  },
764
- supportsAction: ({ action }) => {
765
- return action === "react" || action === "read";
766
- },
765
+ supportsAction: ({ action }) => action === "react" || action === "read",
767
766
  handleAction: async ({ action, params, cfg, accountId, conversationReadOrigin, requesterAccountId, toolContext }) => {
767
+ if (action !== "read" && action !== "react") throw new Error(`Unsupported Mattermost action: ${action}`);
768
+ const resolvedAccountId = accountId ?? resolveDefaultMattermostAccountId(cfg);
769
+ const account = resolveMattermostAccount({
770
+ cfg,
771
+ accountId: resolvedAccountId
772
+ });
773
+ if (!account.enabled) throw new Error(`Mattermost account "${resolvedAccountId}" is disabled`);
774
+ const actionsConfig = (cfg.channels?.mattermost)?.actions;
768
775
  if (action === "read") {
769
- const resolvedAccountId = accountId ?? resolveDefaultMattermostAccountId(cfg);
770
- const mattermostConfig = cfg.channels?.mattermost;
771
- const account = resolveMattermostAccount({
772
- cfg,
773
- accountId: resolvedAccountId
774
- });
775
- if (!account.enabled) throw new Error(`Mattermost account "${resolvedAccountId}" is disabled`);
776
- if (!(account.config.actions?.messages ?? mattermostConfig?.actions?.messages ?? false)) throw new Error("Mattermost message reads are disabled in config");
776
+ if (!(account.config.actions?.messages ?? actionsConfig?.messages ?? false)) throw new Error("Mattermost message reads are disabled in config");
777
777
  const rawTarget = readStringParam(params, "to") ?? readStringParam(params, "channelId") ?? readStringParam(params, "target");
778
778
  if (!rawTarget) throw new Error("Mattermost read requires target, to, or channelId.");
779
779
  const normalizedTarget = normalizeMattermostMessagingTarget(rawTarget);
@@ -802,36 +802,26 @@ const mattermostMessageActions = {
802
802
  hasMore: result.hasMore
803
803
  });
804
804
  }
805
- if (action === "react") {
806
- const resolvedAccountId = accountId ?? resolveDefaultMattermostAccountId(cfg);
807
- const mattermostConfig = cfg.channels?.mattermost;
808
- const account = resolveMattermostAccount({
809
- cfg,
810
- accountId: resolvedAccountId
811
- });
812
- if (!account.enabled) throw new Error(`Mattermost account "${resolvedAccountId}" is disabled`);
813
- if (!(account.config.actions?.reactions ?? mattermostConfig?.actions?.reactions ?? true)) throw new Error("Mattermost reactions are disabled in config");
814
- const { postId, emojiName, remove } = parseMattermostReactActionParams(params);
815
- const authorizedTarget = normalizeOptionalString(params.to);
816
- const runtime = await loadMattermostChannelRuntime();
817
- const result = await (remove ? runtime.removeMattermostReaction : runtime.addMattermostReaction)({
818
- cfg,
819
- postId,
820
- emojiName,
821
- accountId: resolvedAccountId,
822
- authorizedTarget,
823
- conversationReadOrigin
824
- });
825
- if (!result.ok) throw new Error(result.error);
826
- return {
827
- content: [{
828
- type: "text",
829
- text: remove ? `Removed reaction :${emojiName}: from ${postId}` : `Reacted with :${emojiName}: on ${postId}`
830
- }],
831
- details: {}
832
- };
833
- }
834
- throw new Error(`Unsupported Mattermost action: ${action}`);
805
+ if (!(account.config.actions?.reactions ?? actionsConfig?.reactions ?? true)) throw new Error("Mattermost reactions are disabled in config");
806
+ const { postId, emojiName, remove } = parseMattermostReactActionParams(params);
807
+ const authorizedTarget = normalizeOptionalString(params.to);
808
+ const runtime = await loadMattermostChannelRuntime();
809
+ const result = await (remove ? runtime.removeMattermostReaction : runtime.addMattermostReaction)({
810
+ cfg,
811
+ postId,
812
+ emojiName,
813
+ accountId: resolvedAccountId,
814
+ authorizedTarget,
815
+ conversationReadOrigin
816
+ });
817
+ if (!result.ok) throw new Error(result.error);
818
+ return {
819
+ content: [{
820
+ type: "text",
821
+ text: remove ? `Removed reaction :${emojiName}: from ${postId}` : `Reacted with :${emojiName}: on ${postId}`
822
+ }],
823
+ details: {}
824
+ };
835
825
  }
836
826
  };
837
827
  function parseMattermostReactActionParams(params) {
@@ -868,20 +858,22 @@ function resolveMattermostSendAttachmentMedia(params) {
868
858
  if (mediaUrls.length > 1) throw new Error("Mattermost send supports one attachment per message; split multiple mediaUrls or attachments[] entries into separate sends.");
869
859
  return mediaUrls[0];
870
860
  }
871
- function toMattermostOutboundResult(result) {
872
- const { channelId, ...delivery } = result;
873
- return {
874
- ...delivery,
875
- target: {
876
- kind: "channel",
877
- id: channelId
878
- }
879
- };
880
- }
881
- function createMattermostDeliveryProgressReporter(onDeliveryResult) {
882
- return onDeliveryResult ? async (result) => {
883
- await onDeliveryResult(attachChannelToResult("mattermost", toMattermostOutboundResult(result)));
884
- } : void 0;
861
+ async function sendMattermostMedia(ctx, content = ctx) {
862
+ return toMattermostOutboundResult(await (await loadMattermostChannelRuntime()).sendMessageMattermost(ctx.to, content.text, {
863
+ cfg: ctx.cfg,
864
+ accountId: ctx.accountId ?? void 0,
865
+ mediaUrl: content.mediaUrl,
866
+ mediaLocalRoots: ctx.mediaLocalRoots ?? ctx.mediaAccess?.localRoots,
867
+ mediaReadFile: ctx.mediaReadFile ?? ctx.mediaAccess?.readFile,
868
+ ...ctx.mediaAccess?.workspaceDir ? { workspaceDir: ctx.mediaAccess.workspaceDir } : {},
869
+ requireMediaUpload: requiresMattermostMediaUpload(content.mediaUrl) ? true : void 0,
870
+ replyToId: ctx.replyToId ?? (ctx.threadId != null ? String(ctx.threadId) : void 0),
871
+ ...content.buttons?.length ? { buttons: content.buttons } : {},
872
+ ...content.attachmentText !== void 0 ? { attachmentText: content.attachmentText } : {},
873
+ assertDirectAdapterHandoff: ctx.assertDirectAdapterHandoff,
874
+ onPlatformSendDispatch: ctx.onPlatformSendDispatch,
875
+ onDeliveryResult: createMattermostDeliveryProgressReporter(ctx.onDeliveryResult)
876
+ }));
885
877
  }
886
878
  const mattermostOutbound = {
887
879
  deliveryMode: "direct",
@@ -927,20 +919,13 @@ const mattermostOutbound = {
927
919
  ...ctx.payload,
928
920
  mediaUrl: ctx.payload.mediaUrl ?? ctx.mediaUrl
929
921
  }).map((url) => url.trim()).find(Boolean);
930
- const result = await (await loadMattermostChannelRuntime()).sendMessageMattermost(ctx.to, ctx.payload.text ?? ctx.text, {
931
- cfg: ctx.cfg,
932
- accountId: ctx.accountId ?? void 0,
922
+ const result = await sendMattermostMedia(ctx, {
923
+ text: ctx.payload.text ?? ctx.text,
933
924
  mediaUrl,
934
- mediaLocalRoots: ctx.mediaLocalRoots ?? ctx.mediaAccess?.localRoots,
935
- mediaReadFile: ctx.mediaReadFile ?? ctx.mediaAccess?.readFile,
936
- ...ctx.mediaAccess?.workspaceDir ? { workspaceDir: ctx.mediaAccess.workspaceDir } : {},
937
- requireMediaUpload: requiresMattermostMediaUpload(mediaUrl) ? true : void 0,
938
- replyToId: ctx.replyToId ?? (ctx.threadId != null ? String(ctx.threadId) : void 0),
939
- buttons: buttons?.length ? buttons : void 0,
940
- attachmentText,
941
- onDeliveryResult: createMattermostDeliveryProgressReporter(ctx.onDeliveryResult)
925
+ buttons,
926
+ attachmentText
942
927
  });
943
- return attachChannelToResult("mattermost", toMattermostOutboundResult(result));
928
+ return attachChannelToResult("mattermost", result);
944
929
  }
945
930
  return await sendTextMediaPayload({
946
931
  channel: "mattermost",
@@ -961,23 +946,15 @@ const mattermostOutbound = {
961
946
  },
962
947
  ...createAttachedChannelResultAdapter({
963
948
  channel: "mattermost",
964
- sendText: async ({ cfg, to, text, accountId, replyToId, threadId, onDeliveryResult }) => toMattermostOutboundResult(await (await loadMattermostChannelRuntime()).sendMessageMattermost(to, text, {
965
- cfg,
966
- accountId: accountId ?? void 0,
967
- replyToId: replyToId ?? (threadId != null ? String(threadId) : void 0),
968
- onDeliveryResult: createMattermostDeliveryProgressReporter(onDeliveryResult)
949
+ sendText: async (ctx) => toMattermostOutboundResult(await (await loadMattermostChannelRuntime()).sendMessageMattermost(ctx.to, ctx.text, {
950
+ cfg: ctx.cfg,
951
+ accountId: ctx.accountId ?? void 0,
952
+ replyToId: ctx.replyToId ?? (ctx.threadId != null ? String(ctx.threadId) : void 0),
953
+ assertDirectAdapterHandoff: ctx.assertDirectAdapterHandoff,
954
+ onPlatformSendDispatch: ctx.onPlatformSendDispatch,
955
+ onDeliveryResult: createMattermostDeliveryProgressReporter(ctx.onDeliveryResult)
969
956
  })),
970
- sendMedia: async ({ cfg, to, text, mediaUrl, mediaAccess, mediaLocalRoots, mediaReadFile, accountId, replyToId, threadId, onDeliveryResult }) => toMattermostOutboundResult(await (await loadMattermostChannelRuntime()).sendMessageMattermost(to, text, {
971
- cfg,
972
- accountId: accountId ?? void 0,
973
- mediaUrl,
974
- mediaLocalRoots: mediaLocalRoots ?? mediaAccess?.localRoots,
975
- mediaReadFile: mediaReadFile ?? mediaAccess?.readFile,
976
- ...mediaAccess?.workspaceDir ? { workspaceDir: mediaAccess.workspaceDir } : {},
977
- requireMediaUpload: requiresMattermostMediaUpload(mediaUrl) ? true : void 0,
978
- replyToId: replyToId ?? (threadId != null ? String(threadId) : void 0),
979
- onDeliveryResult: createMattermostDeliveryProgressReporter(onDeliveryResult)
980
- }))
957
+ sendMedia: sendMattermostMedia
981
958
  })
982
959
  };
983
960
  const mattermostMessageAdapter = createChannelMessageAdapterFromOutbound({
@@ -1067,7 +1044,7 @@ const mattermostPlugin = createChatChannelPlugin({
1067
1044
  threadId: child
1068
1045
  } : { to: normalizeMattermostMessagingTarget(`channel:${child}`) };
1069
1046
  },
1070
- resolveOutboundSessionRoute: (params) => resolveMattermostOutboundSessionRoute(params),
1047
+ resolveOutboundSessionRoute: resolveMattermostOutboundSessionRoute,
1071
1048
  targetResolver: {
1072
1049
  looksLikeId: looksLikeMattermostTargetId,
1073
1050
  hint: "<channelId|user:ID|channel:ID>",
@@ -1087,7 +1064,7 @@ const mattermostPlugin = createChatChannelPlugin({
1087
1064
  }
1088
1065
  },
1089
1066
  status: createComputedAccountStatusAdapter({
1090
- defaultRuntime: createDefaultChannelRuntimeState(DEFAULT_ACCOUNT_ID$1, {
1067
+ defaultRuntime: createDefaultChannelRuntimeState(DEFAULT_ACCOUNT_ID, {
1091
1068
  connected: false,
1092
1069
  lastConnectedAt: null,
1093
1070
  lastDisconnect: null
@@ -1135,7 +1112,7 @@ const mattermostPlugin = createChatChannelPlugin({
1135
1112
  botTokenSource: account.botTokenSource
1136
1113
  });
1137
1114
  ctx.log?.info(`[${account.accountId}] starting channel`);
1138
- return (await loadMattermostChannelRuntime()).monitorMattermostProvider({
1115
+ return (await import("./monitor-BZyzPkkb.mjs")).monitorMattermostProvider({
1139
1116
  botToken: account.botToken ?? void 0,
1140
1117
  baseUrl: account.baseUrl ?? void 0,
1141
1118
  accountId: account.accountId,
@@ -1150,11 +1127,11 @@ const mattermostPlugin = createChatChannelPlugin({
1150
1127
  pairing: { text: {
1151
1128
  idLabel: "mattermostUserId",
1152
1129
  message: "OpenClaw: your access has been approved.",
1153
- normalizeAllowEntry: (entry) => normalizeMattermostAllowEntry(entry),
1130
+ normalizeAllowEntry: normalizeMattermostAllowEntry,
1154
1131
  notify: createLoggedPairingApprovalNotifier(({ id }) => `[mattermost] User ${id} approved for pairing`)
1155
1132
  } },
1156
1133
  threading: {
1157
- buildToolContext: (params) => buildMattermostThreadingToolContext(params),
1134
+ buildToolContext: buildMattermostThreadingToolContext,
1158
1135
  scopedAccountReplyToMode: {
1159
1136
  resolveAccount: (cfg, accountId) => resolveMattermostAccount({
1160
1137
  cfg,
@@ -1162,15 +1139,8 @@ const mattermostPlugin = createChatChannelPlugin({
1162
1139
  }),
1163
1140
  resolveReplyToMode: (account, chatType) => resolveMattermostReplyToMode(account, chatType === "direct" || chatType === "group" || chatType === "channel" ? chatType : "channel")
1164
1141
  },
1165
- resolveAutoThreadId: ({ to, replyToId, toolContext }) => resolveMattermostAutoThreadId({
1166
- to,
1167
- replyToId,
1168
- toolContext
1169
- }),
1170
- matchesToolContextTarget: ({ target, toolContext }) => matchesMattermostToolContextTarget({
1171
- target,
1172
- toolContext
1173
- }),
1142
+ resolveAutoThreadId: resolveMattermostAutoThreadId,
1143
+ matchesToolContextTarget: matchesMattermostToolContextTarget,
1174
1144
  resolveReplyTransport: ({ threadId, replyToId, replyToIsExplicit, replyDelivery }) => {
1175
1145
  const ambientThreadId = threadId != null ? String(threadId) : void 0;
1176
1146
  const isFlatDirect = replyDelivery?.chatType === "direct" && replyDelivery.replyToMode === "off";