@openclaw/zalo 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 (376) hide show
  1. package/assets/icon.png +0 -0
  2. package/dist/.setup/{api-BPF84XFR.mjs → api-YaSbmx07.mjs} +3 -3
  3. package/dist/.setup/{channel-D14b6qHz.mjs → channel-COgJOEix.mjs} +8 -9
  4. package/dist/.setup/{channel.runtime-BA2foB5C.mjs → channel.runtime-F1ScBwNC.mjs} +3 -3
  5. package/dist/.setup/group-access-Blsyu-ot.mjs +8 -0
  6. package/dist/.setup/{monitor-Cu5XdWDg.mjs → monitor-BbW2wx_3.mjs} +26 -73
  7. package/dist/.setup/{monitor.webhook-SDR5zoSA.mjs → monitor.webhook-CaknDJfy.mjs} +3 -2
  8. package/dist/.setup/{send-C01aoqEH.mjs → send-sCQINy2G.mjs} +32 -66
  9. package/dist/.setup/{setup-core-CCMLSh4Q.mjs → setup-core-BE-EaCnS.mjs} +1 -1
  10. package/dist/.setup/{setup-surface-CNyPRzlv.mjs → setup-surface-DMW4dLWX.mjs} +6 -20
  11. package/dist/.setup/{webhook-spool-nmnflXt2.mjs → webhook-spool-CTCugbD_.mjs} +1 -1
  12. package/dist/api.js +3 -3
  13. package/dist/channel-plugin-api.js +1 -1
  14. package/dist/contract-api.js +1 -1
  15. package/dist/runtime-api.js +1 -15
  16. package/dist/setup-api.js +2 -2
  17. package/dist/setup-entry.js +1 -1
  18. package/dist/setup-surface.js +2 -2
  19. package/node_modules/zod/README.md +2 -2
  20. package/node_modules/zod/compile.cjs +19 -0
  21. package/node_modules/zod/index.cjs +19 -0
  22. package/node_modules/zod/locales/index.cjs +19 -0
  23. package/node_modules/zod/mini/index.cjs +19 -0
  24. package/node_modules/zod/package.json +8 -7
  25. package/node_modules/zod/src/v3/helpers/errorUtil.ts +1 -1
  26. package/node_modules/zod/src/v4/classic/external.ts +2 -0
  27. package/node_modules/zod/src/v4/classic/from-json-schema.ts +248 -25
  28. package/node_modules/zod/src/v4/classic/schemas.ts +243 -168
  29. package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +60 -9
  30. package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +6 -0
  31. package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +2 -2
  32. package/node_modules/zod/src/v4/classic/tests/cyclic-data.test.ts +265 -0
  33. package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +112 -6
  34. package/node_modules/zod/src/v4/classic/tests/enum.test.ts +9 -0
  35. package/node_modules/zod/src/v4/classic/tests/error.test.ts +130 -1
  36. package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +157 -0
  37. package/node_modules/zod/src/v4/classic/tests/iban.test.ts +81 -0
  38. package/node_modules/zod/src/v4/classic/tests/instance-footprint.test.ts +40 -2
  39. package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +27 -7
  40. package/node_modules/zod/src/v4/classic/tests/issue-schema.test.ts +88 -56
  41. package/node_modules/zod/src/v4/classic/tests/number.test.ts +39 -0
  42. package/node_modules/zod/src/v4/classic/tests/object.test.ts +56 -0
  43. package/node_modules/zod/src/v4/classic/tests/optin-ladder.test.ts +3 -2
  44. package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +70 -0
  45. package/node_modules/zod/src/v4/classic/tests/properties.test.ts +141 -0
  46. package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +46 -1
  47. package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +19 -0
  48. package/node_modules/zod/src/v4/classic/tests/string.test.ts +95 -1
  49. package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +33 -1
  50. package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +234 -38
  51. package/node_modules/zod/src/v4/classic/tests/validate.test.ts +569 -0
  52. package/node_modules/zod/src/v4/core/api.ts +44 -28
  53. package/node_modules/zod/src/v4/core/checks.ts +62 -102
  54. package/node_modules/zod/src/v4/core/compile.ts +218 -93
  55. package/node_modules/zod/src/v4/core/core.ts +1 -3
  56. package/node_modules/zod/src/v4/core/doc.ts +6 -2
  57. package/node_modules/zod/src/v4/core/errors.ts +3 -6
  58. package/node_modules/zod/src/v4/core/json-schema-generator.ts +2 -2
  59. package/node_modules/zod/src/v4/core/json-schema-processors.ts +185 -81
  60. package/node_modules/zod/src/v4/core/memoizer.ts +75 -28
  61. package/node_modules/zod/src/v4/core/parse.ts +37 -16
  62. package/node_modules/zod/src/v4/core/regexes.ts +14 -4
  63. package/node_modules/zod/src/v4/core/schemas.ts +296 -132
  64. package/node_modules/zod/src/v4/core/tests/cached.test.ts +54 -0
  65. package/node_modules/zod/src/v4/core/tests/compile-differential.test.ts +35 -0
  66. package/node_modules/zod/src/v4/core/tests/compile-generative.test.ts +445 -0
  67. package/node_modules/zod/src/v4/core/tests/compile.test.ts +399 -2
  68. package/node_modules/zod/src/v4/core/tests/email-regex.test.ts +140 -0
  69. package/node_modules/zod/src/v4/core/tests/locales/tg.test.ts +85 -0
  70. package/node_modules/zod/src/v4/core/tests/polyfill-collision.test.ts +46 -0
  71. package/node_modules/zod/src/v4/core/tests/url-no-canparse.test.ts +118 -16
  72. package/node_modules/zod/src/v4/core/to-json-schema.ts +9 -7
  73. package/node_modules/zod/src/v4/core/util.ts +218 -147
  74. package/node_modules/zod/src/v4/core/versions.ts +2 -2
  75. package/node_modules/zod/src/v4/locales/ar.ts +2 -0
  76. package/node_modules/zod/src/v4/locales/az.ts +2 -0
  77. package/node_modules/zod/src/v4/locales/be.ts +2 -0
  78. package/node_modules/zod/src/v4/locales/bg.ts +2 -0
  79. package/node_modules/zod/src/v4/locales/bn.ts +2 -0
  80. package/node_modules/zod/src/v4/locales/ca.ts +2 -0
  81. package/node_modules/zod/src/v4/locales/ckb.ts +2 -0
  82. package/node_modules/zod/src/v4/locales/cs.ts +2 -0
  83. package/node_modules/zod/src/v4/locales/da.ts +2 -0
  84. package/node_modules/zod/src/v4/locales/de.ts +2 -0
  85. package/node_modules/zod/src/v4/locales/el.ts +2 -0
  86. package/node_modules/zod/src/v4/locales/en.ts +2 -0
  87. package/node_modules/zod/src/v4/locales/eo.ts +2 -0
  88. package/node_modules/zod/src/v4/locales/es.ts +2 -0
  89. package/node_modules/zod/src/v4/locales/fa.ts +2 -0
  90. package/node_modules/zod/src/v4/locales/fi.ts +2 -0
  91. package/node_modules/zod/src/v4/locales/fr-CA.ts +2 -0
  92. package/node_modules/zod/src/v4/locales/fr.ts +2 -0
  93. package/node_modules/zod/src/v4/locales/gu.ts +2 -0
  94. package/node_modules/zod/src/v4/locales/he.ts +2 -0
  95. package/node_modules/zod/src/v4/locales/hi.ts +2 -0
  96. package/node_modules/zod/src/v4/locales/hr.ts +2 -0
  97. package/node_modules/zod/src/v4/locales/hu.ts +2 -0
  98. package/node_modules/zod/src/v4/locales/hy.ts +2 -0
  99. package/node_modules/zod/src/v4/locales/id.ts +2 -0
  100. package/node_modules/zod/src/v4/locales/index.ts +1 -0
  101. package/node_modules/zod/src/v4/locales/is.ts +2 -0
  102. package/node_modules/zod/src/v4/locales/it.ts +2 -0
  103. package/node_modules/zod/src/v4/locales/ja.ts +2 -0
  104. package/node_modules/zod/src/v4/locales/ka.ts +2 -0
  105. package/node_modules/zod/src/v4/locales/km.ts +2 -0
  106. package/node_modules/zod/src/v4/locales/kn.ts +2 -0
  107. package/node_modules/zod/src/v4/locales/ko.ts +2 -0
  108. package/node_modules/zod/src/v4/locales/lt.ts +2 -0
  109. package/node_modules/zod/src/v4/locales/mk.ts +2 -0
  110. package/node_modules/zod/src/v4/locales/ms.ts +2 -0
  111. package/node_modules/zod/src/v4/locales/ne.ts +2 -0
  112. package/node_modules/zod/src/v4/locales/nl.ts +2 -0
  113. package/node_modules/zod/src/v4/locales/nn.ts +2 -0
  114. package/node_modules/zod/src/v4/locales/no.ts +2 -0
  115. package/node_modules/zod/src/v4/locales/ota.ts +2 -0
  116. package/node_modules/zod/src/v4/locales/pl.ts +2 -0
  117. package/node_modules/zod/src/v4/locales/ps.ts +2 -0
  118. package/node_modules/zod/src/v4/locales/pt-BR.ts +2 -0
  119. package/node_modules/zod/src/v4/locales/pt.ts +2 -0
  120. package/node_modules/zod/src/v4/locales/ro.ts +2 -0
  121. package/node_modules/zod/src/v4/locales/ru.ts +2 -0
  122. package/node_modules/zod/src/v4/locales/sk.ts +2 -0
  123. package/node_modules/zod/src/v4/locales/sl.ts +2 -0
  124. package/node_modules/zod/src/v4/locales/sv.ts +2 -0
  125. package/node_modules/zod/src/v4/locales/ta.ts +2 -0
  126. package/node_modules/zod/src/v4/locales/tg.ts +135 -0
  127. package/node_modules/zod/src/v4/locales/th.ts +2 -0
  128. package/node_modules/zod/src/v4/locales/tk.ts +2 -0
  129. package/node_modules/zod/src/v4/locales/tr.ts +2 -0
  130. package/node_modules/zod/src/v4/locales/uk.ts +2 -0
  131. package/node_modules/zod/src/v4/locales/ur.ts +2 -0
  132. package/node_modules/zod/src/v4/locales/uz.ts +2 -0
  133. package/node_modules/zod/src/v4/locales/vi.ts +2 -0
  134. package/node_modules/zod/src/v4/locales/yo.ts +2 -0
  135. package/node_modules/zod/src/v4/locales/zh-CN.ts +2 -0
  136. package/node_modules/zod/src/v4/locales/zh-TW.ts +2 -0
  137. package/node_modules/zod/src/v4/mini/external.ts +2 -0
  138. package/node_modules/zod/src/v4/mini/schemas.ts +32 -7
  139. package/node_modules/zod/src/v4/mini/tests/checks.test.ts +1 -1
  140. package/node_modules/zod/src/v4/mini/tests/computed.test.ts +11 -17
  141. package/node_modules/zod/src/v4/mini/tests/index.test.ts +86 -0
  142. package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +16 -0
  143. package/node_modules/zod/src/v4/mini/tests/string.test.ts +23 -0
  144. package/node_modules/zod/v3/ZodError.cjs +19 -0
  145. package/node_modules/zod/v3/errors.cjs +19 -0
  146. package/node_modules/zod/v3/external.cjs +19 -0
  147. package/node_modules/zod/v3/helpers/enumUtil.cjs +19 -0
  148. package/node_modules/zod/v3/helpers/errorUtil.cjs +20 -1
  149. package/node_modules/zod/v3/helpers/errorUtil.js +1 -1
  150. package/node_modules/zod/v3/helpers/parseUtil.cjs +19 -0
  151. package/node_modules/zod/v3/helpers/partialUtil.cjs +19 -0
  152. package/node_modules/zod/v3/helpers/typeAliases.cjs +19 -0
  153. package/node_modules/zod/v3/helpers/util.cjs +19 -0
  154. package/node_modules/zod/v3/index.cjs +19 -0
  155. package/node_modules/zod/v3/standard-schema.cjs +19 -0
  156. package/node_modules/zod/v3/types.cjs +19 -0
  157. package/node_modules/zod/v4/classic/checks.cjs +19 -0
  158. package/node_modules/zod/v4/classic/coerce.cjs +19 -0
  159. package/node_modules/zod/v4/classic/compat.cjs +19 -0
  160. package/node_modules/zod/v4/classic/deep-partial.cjs +19 -0
  161. package/node_modules/zod/v4/classic/errors.cjs +19 -0
  162. package/node_modules/zod/v4/classic/external.cjs +22 -1
  163. package/node_modules/zod/v4/classic/external.d.cts +1 -1
  164. package/node_modules/zod/v4/classic/external.d.ts +1 -1
  165. package/node_modules/zod/v4/classic/external.js +1 -1
  166. package/node_modules/zod/v4/classic/from-json-schema.cjs +264 -24
  167. package/node_modules/zod/v4/classic/from-json-schema.js +245 -24
  168. package/node_modules/zod/v4/classic/in-out.cjs +19 -0
  169. package/node_modules/zod/v4/classic/index.cjs +19 -0
  170. package/node_modules/zod/v4/classic/iso.cjs +19 -0
  171. package/node_modules/zod/v4/classic/parse.cjs +19 -0
  172. package/node_modules/zod/v4/classic/schemas.cjs +100 -35
  173. package/node_modules/zod/v4/classic/schemas.d.cts +15 -1
  174. package/node_modules/zod/v4/classic/schemas.d.ts +15 -1
  175. package/node_modules/zod/v4/classic/schemas.js +77 -33
  176. package/node_modules/zod/v4/core/api.cjs +45 -22
  177. package/node_modules/zod/v4/core/api.d.cts +12 -6
  178. package/node_modules/zod/v4/core/api.d.ts +12 -6
  179. package/node_modules/zod/v4/core/api.js +25 -22
  180. package/node_modules/zod/v4/core/checks.cjs +51 -97
  181. package/node_modules/zod/v4/core/checks.d.cts +17 -1
  182. package/node_modules/zod/v4/core/checks.d.ts +17 -1
  183. package/node_modules/zod/v4/core/checks.js +31 -96
  184. package/node_modules/zod/v4/core/compile.cjs +173 -78
  185. package/node_modules/zod/v4/core/compile.d.cts +18 -4
  186. package/node_modules/zod/v4/core/compile.d.ts +18 -4
  187. package/node_modules/zod/v4/core/compile.js +154 -79
  188. package/node_modules/zod/v4/core/core.cjs +20 -1
  189. package/node_modules/zod/v4/core/core.js +1 -1
  190. package/node_modules/zod/v4/core/doc.cjs +26 -2
  191. package/node_modules/zod/v4/core/doc.js +7 -2
  192. package/node_modules/zod/v4/core/errors.cjs +21 -5
  193. package/node_modules/zod/v4/core/errors.js +2 -5
  194. package/node_modules/zod/v4/core/index.cjs +19 -0
  195. package/node_modules/zod/v4/core/json-schema-generator.cjs +20 -1
  196. package/node_modules/zod/v4/core/json-schema-generator.js +2 -2
  197. package/node_modules/zod/v4/core/json-schema-processors.cjs +188 -72
  198. package/node_modules/zod/v4/core/json-schema-processors.d.cts +16 -0
  199. package/node_modules/zod/v4/core/json-schema-processors.d.ts +16 -0
  200. package/node_modules/zod/v4/core/json-schema-processors.js +170 -74
  201. package/node_modules/zod/v4/core/json-schema.cjs +19 -0
  202. package/node_modules/zod/v4/core/memoizer.cjs +111 -23
  203. package/node_modules/zod/v4/core/memoizer.js +69 -23
  204. package/node_modules/zod/v4/core/parse.cjs +56 -16
  205. package/node_modules/zod/v4/core/parse.js +37 -16
  206. package/node_modules/zod/v4/core/regexes.cjs +31 -6
  207. package/node_modules/zod/v4/core/regexes.d.cts +3 -0
  208. package/node_modules/zod/v4/core/regexes.d.ts +3 -0
  209. package/node_modules/zod/v4/core/regexes.js +10 -4
  210. package/node_modules/zod/v4/core/registries.cjs +19 -0
  211. package/node_modules/zod/v4/core/schemas.cjs +302 -114
  212. package/node_modules/zod/v4/core/schemas.d.cts +28 -8
  213. package/node_modules/zod/v4/core/schemas.d.ts +28 -8
  214. package/node_modules/zod/v4/core/schemas.js +279 -113
  215. package/node_modules/zod/v4/core/standard-schema.cjs +19 -0
  216. package/node_modules/zod/v4/core/to-json-schema.cjs +28 -7
  217. package/node_modules/zod/v4/core/to-json-schema.d.cts +4 -3
  218. package/node_modules/zod/v4/core/to-json-schema.d.ts +4 -3
  219. package/node_modules/zod/v4/core/to-json-schema.js +7 -6
  220. package/node_modules/zod/v4/core/util.cjs +177 -143
  221. package/node_modules/zod/v4/core/util.d.cts +25 -4
  222. package/node_modules/zod/v4/core/util.d.ts +25 -4
  223. package/node_modules/zod/v4/core/util.js +156 -143
  224. package/node_modules/zod/v4/core/versions.cjs +21 -2
  225. package/node_modules/zod/v4/core/versions.d.cts +1 -1
  226. package/node_modules/zod/v4/core/versions.d.ts +1 -1
  227. package/node_modules/zod/v4/core/versions.js +2 -2
  228. package/node_modules/zod/v4/core/visit.cjs +19 -0
  229. package/node_modules/zod/v4/index.cjs +19 -0
  230. package/node_modules/zod/v4/locales/ar.cjs +2 -0
  231. package/node_modules/zod/v4/locales/ar.js +2 -0
  232. package/node_modules/zod/v4/locales/az.cjs +2 -0
  233. package/node_modules/zod/v4/locales/az.js +2 -0
  234. package/node_modules/zod/v4/locales/be.cjs +2 -0
  235. package/node_modules/zod/v4/locales/be.js +2 -0
  236. package/node_modules/zod/v4/locales/bg.cjs +2 -0
  237. package/node_modules/zod/v4/locales/bg.js +2 -0
  238. package/node_modules/zod/v4/locales/bn.cjs +2 -0
  239. package/node_modules/zod/v4/locales/bn.js +2 -0
  240. package/node_modules/zod/v4/locales/ca.cjs +2 -0
  241. package/node_modules/zod/v4/locales/ca.js +2 -0
  242. package/node_modules/zod/v4/locales/ckb.cjs +2 -0
  243. package/node_modules/zod/v4/locales/ckb.js +2 -0
  244. package/node_modules/zod/v4/locales/cs.cjs +2 -0
  245. package/node_modules/zod/v4/locales/cs.js +2 -0
  246. package/node_modules/zod/v4/locales/da.cjs +2 -0
  247. package/node_modules/zod/v4/locales/da.js +2 -0
  248. package/node_modules/zod/v4/locales/de.cjs +2 -0
  249. package/node_modules/zod/v4/locales/de.js +2 -0
  250. package/node_modules/zod/v4/locales/el.cjs +2 -0
  251. package/node_modules/zod/v4/locales/el.js +2 -0
  252. package/node_modules/zod/v4/locales/en.cjs +2 -0
  253. package/node_modules/zod/v4/locales/en.js +2 -0
  254. package/node_modules/zod/v4/locales/eo.cjs +2 -0
  255. package/node_modules/zod/v4/locales/eo.js +2 -0
  256. package/node_modules/zod/v4/locales/es.cjs +2 -0
  257. package/node_modules/zod/v4/locales/es.js +2 -0
  258. package/node_modules/zod/v4/locales/fa.cjs +2 -0
  259. package/node_modules/zod/v4/locales/fa.js +2 -0
  260. package/node_modules/zod/v4/locales/fi.cjs +2 -0
  261. package/node_modules/zod/v4/locales/fi.js +2 -0
  262. package/node_modules/zod/v4/locales/fr-CA.cjs +2 -0
  263. package/node_modules/zod/v4/locales/fr-CA.js +2 -0
  264. package/node_modules/zod/v4/locales/fr.cjs +2 -0
  265. package/node_modules/zod/v4/locales/fr.js +2 -0
  266. package/node_modules/zod/v4/locales/gu.cjs +2 -0
  267. package/node_modules/zod/v4/locales/gu.js +2 -0
  268. package/node_modules/zod/v4/locales/he.cjs +2 -0
  269. package/node_modules/zod/v4/locales/he.js +2 -0
  270. package/node_modules/zod/v4/locales/hi.cjs +2 -0
  271. package/node_modules/zod/v4/locales/hi.js +2 -0
  272. package/node_modules/zod/v4/locales/hr.cjs +2 -0
  273. package/node_modules/zod/v4/locales/hr.js +2 -0
  274. package/node_modules/zod/v4/locales/hu.cjs +2 -0
  275. package/node_modules/zod/v4/locales/hu.js +2 -0
  276. package/node_modules/zod/v4/locales/hy.cjs +2 -0
  277. package/node_modules/zod/v4/locales/hy.js +2 -0
  278. package/node_modules/zod/v4/locales/id.cjs +2 -0
  279. package/node_modules/zod/v4/locales/id.js +2 -0
  280. package/node_modules/zod/v4/locales/index.cjs +22 -1
  281. package/node_modules/zod/v4/locales/index.d.cts +1 -0
  282. package/node_modules/zod/v4/locales/index.d.ts +1 -0
  283. package/node_modules/zod/v4/locales/index.js +1 -0
  284. package/node_modules/zod/v4/locales/is.cjs +2 -0
  285. package/node_modules/zod/v4/locales/is.js +2 -0
  286. package/node_modules/zod/v4/locales/it.cjs +2 -0
  287. package/node_modules/zod/v4/locales/it.js +2 -0
  288. package/node_modules/zod/v4/locales/ja.cjs +2 -0
  289. package/node_modules/zod/v4/locales/ja.js +2 -0
  290. package/node_modules/zod/v4/locales/ka.cjs +2 -0
  291. package/node_modules/zod/v4/locales/ka.js +2 -0
  292. package/node_modules/zod/v4/locales/km.cjs +2 -0
  293. package/node_modules/zod/v4/locales/km.js +2 -0
  294. package/node_modules/zod/v4/locales/kn.cjs +2 -0
  295. package/node_modules/zod/v4/locales/kn.js +2 -0
  296. package/node_modules/zod/v4/locales/ko.cjs +2 -0
  297. package/node_modules/zod/v4/locales/ko.js +2 -0
  298. package/node_modules/zod/v4/locales/lt.cjs +2 -0
  299. package/node_modules/zod/v4/locales/lt.js +2 -0
  300. package/node_modules/zod/v4/locales/mk.cjs +2 -0
  301. package/node_modules/zod/v4/locales/mk.js +2 -0
  302. package/node_modules/zod/v4/locales/ms.cjs +2 -0
  303. package/node_modules/zod/v4/locales/ms.js +2 -0
  304. package/node_modules/zod/v4/locales/ne.cjs +2 -0
  305. package/node_modules/zod/v4/locales/ne.js +2 -0
  306. package/node_modules/zod/v4/locales/nl.cjs +2 -0
  307. package/node_modules/zod/v4/locales/nl.js +2 -0
  308. package/node_modules/zod/v4/locales/nn.cjs +2 -0
  309. package/node_modules/zod/v4/locales/nn.js +2 -0
  310. package/node_modules/zod/v4/locales/no.cjs +2 -0
  311. package/node_modules/zod/v4/locales/no.js +2 -0
  312. package/node_modules/zod/v4/locales/ota.cjs +2 -0
  313. package/node_modules/zod/v4/locales/ota.js +2 -0
  314. package/node_modules/zod/v4/locales/pl.cjs +2 -0
  315. package/node_modules/zod/v4/locales/pl.js +2 -0
  316. package/node_modules/zod/v4/locales/ps.cjs +2 -0
  317. package/node_modules/zod/v4/locales/ps.js +2 -0
  318. package/node_modules/zod/v4/locales/pt-BR.cjs +2 -0
  319. package/node_modules/zod/v4/locales/pt-BR.js +2 -0
  320. package/node_modules/zod/v4/locales/pt.cjs +2 -0
  321. package/node_modules/zod/v4/locales/pt.js +2 -0
  322. package/node_modules/zod/v4/locales/ro.cjs +2 -0
  323. package/node_modules/zod/v4/locales/ro.js +2 -0
  324. package/node_modules/zod/v4/locales/ru.cjs +2 -0
  325. package/node_modules/zod/v4/locales/ru.js +2 -0
  326. package/node_modules/zod/v4/locales/sk.cjs +2 -0
  327. package/node_modules/zod/v4/locales/sk.js +2 -0
  328. package/node_modules/zod/v4/locales/sl.cjs +2 -0
  329. package/node_modules/zod/v4/locales/sl.js +2 -0
  330. package/node_modules/zod/v4/locales/sv.cjs +2 -0
  331. package/node_modules/zod/v4/locales/sv.js +2 -0
  332. package/node_modules/zod/v4/locales/ta.cjs +2 -0
  333. package/node_modules/zod/v4/locales/ta.js +2 -0
  334. package/node_modules/zod/v4/locales/tg.cjs +144 -0
  335. package/node_modules/zod/v4/locales/tg.d.cts +5 -0
  336. package/node_modules/zod/v4/locales/tg.d.ts +4 -0
  337. package/node_modules/zod/v4/locales/tg.js +117 -0
  338. package/node_modules/zod/v4/locales/th.cjs +2 -0
  339. package/node_modules/zod/v4/locales/th.js +2 -0
  340. package/node_modules/zod/v4/locales/tk.cjs +2 -0
  341. package/node_modules/zod/v4/locales/tk.js +2 -0
  342. package/node_modules/zod/v4/locales/tr.cjs +2 -0
  343. package/node_modules/zod/v4/locales/tr.js +2 -0
  344. package/node_modules/zod/v4/locales/uk.cjs +2 -0
  345. package/node_modules/zod/v4/locales/uk.js +2 -0
  346. package/node_modules/zod/v4/locales/ur.cjs +2 -0
  347. package/node_modules/zod/v4/locales/ur.js +2 -0
  348. package/node_modules/zod/v4/locales/uz.cjs +2 -0
  349. package/node_modules/zod/v4/locales/uz.js +2 -0
  350. package/node_modules/zod/v4/locales/vi.cjs +2 -0
  351. package/node_modules/zod/v4/locales/vi.js +2 -0
  352. package/node_modules/zod/v4/locales/yo.cjs +2 -0
  353. package/node_modules/zod/v4/locales/yo.js +2 -0
  354. package/node_modules/zod/v4/locales/zh-CN.cjs +2 -0
  355. package/node_modules/zod/v4/locales/zh-CN.js +2 -0
  356. package/node_modules/zod/v4/locales/zh-TW.cjs +2 -0
  357. package/node_modules/zod/v4/locales/zh-TW.js +2 -0
  358. package/node_modules/zod/v4/mini/checks.cjs +19 -0
  359. package/node_modules/zod/v4/mini/coerce.cjs +19 -0
  360. package/node_modules/zod/v4/mini/deep-partial.cjs +19 -0
  361. package/node_modules/zod/v4/mini/external.cjs +22 -1
  362. package/node_modules/zod/v4/mini/external.d.cts +1 -1
  363. package/node_modules/zod/v4/mini/external.d.ts +1 -1
  364. package/node_modules/zod/v4/mini/external.js +1 -1
  365. package/node_modules/zod/v4/mini/in-out.cjs +19 -0
  366. package/node_modules/zod/v4/mini/index.cjs +19 -0
  367. package/node_modules/zod/v4/mini/iso.cjs +19 -0
  368. package/node_modules/zod/v4/mini/parse.cjs +19 -0
  369. package/node_modules/zod/v4/mini/schemas.cjs +44 -8
  370. package/node_modules/zod/v4/mini/schemas.d.cts +6 -1
  371. package/node_modules/zod/v4/mini/schemas.d.ts +6 -1
  372. package/node_modules/zod/v4/mini/schemas.js +21 -6
  373. package/node_modules/zod/v4-mini/index.cjs +19 -0
  374. package/package.json +5 -5
  375. package/dist/.setup/actions.runtime-DZsb7I67.mjs +0 -5
  376. package/dist/.setup/group-access-8qHRzDHx.mjs +0 -15
package/assets/icon.png CHANGED
Binary file
@@ -1,6 +1,6 @@
1
- import { n as zaloDmPolicy, r as zaloSetupAdapter, t as createZaloSetupWizardProxy } from "./setup-core-CCMLSh4Q.mjs";
2
- import { t as zaloPlugin } from "./channel-D14b6qHz.mjs";
3
- import { n as resolveZaloRuntimeGroupPolicy } from "./group-access-8qHRzDHx.mjs";
1
+ import { n as zaloDmPolicy, r as zaloSetupAdapter, t as createZaloSetupWizardProxy } from "./setup-core-BE-EaCnS.mjs";
2
+ import { t as zaloPlugin } from "./channel-COgJOEix.mjs";
3
+ import { n as resolveZaloRuntimeGroupPolicy } from "./group-access-Blsyu-ot.mjs";
4
4
  import { zaloSetupWizard } from "../setup-api.js";
5
5
  import "../api.js";
6
6
  export { createZaloSetupWizardProxy, resolveZaloRuntimeGroupPolicy, zaloDmPolicy, zaloPlugin, zaloSetupAdapter, zaloSetupWizard };
@@ -1,4 +1,4 @@
1
- import { c as isZaloAccountConfigured, d as resolveZaloAccount, i as zaloSetupContract, l as listZaloAccountIds, p as buildSecretInputSchema, s as inspectZaloAccount, t as createZaloSetupWizardProxy, u as resolveDefaultZaloAccountId } from "./setup-core-CCMLSh4Q.mjs";
1
+ import { c as isZaloAccountConfigured, d as resolveZaloAccount, i as zaloSetupContract, l as listZaloAccountIds, p as buildSecretInputSchema, s as inspectZaloAccount, t as createZaloSetupWizardProxy, u as resolveDefaultZaloAccountId } from "./setup-core-BE-EaCnS.mjs";
2
2
  import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-Cpsqe5Cv.mjs";
3
3
  import { describeWebhookAccountSnapshot } from "openclaw/plugin-sdk/account-helpers";
4
4
  import { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/account-id";
@@ -24,7 +24,7 @@ import { z } from "zod";
24
24
  import { buildChannelOutboundSessionRoute, stripChannelTargetPrefix, stripTargetKindPrefix } from "openclaw/plugin-sdk/core";
25
25
  import { coerceStatusIssueAccountId, readStatusIssueFields } from "openclaw/plugin-sdk/extension-shared";
26
26
  //#region extensions/zalo/src/actions.ts
27
- const loadZaloActionsRuntime = createLazyRuntimeNamedExport(() => import("./actions.runtime-DZsb7I67.mjs"), "zaloActionsRuntime");
27
+ const loadZaloActionsRuntime = createLazyRuntimeNamedExport(() => import("./send-sCQINy2G.mjs"), "sendMessageZalo");
28
28
  const providerId = "zalo";
29
29
  const ZALO_ACTIONS = /* @__PURE__ */ new Set(["send"]);
30
30
  function listEnabledAccounts(cfg, accountId) {
@@ -54,8 +54,7 @@ const zaloMessageActions = {
54
54
  allowEmpty: true
55
55
  });
56
56
  const mediaUrl = readStringParam(params, "media", { trim: false });
57
- const { sendMessageZalo } = await loadZaloActionsRuntime();
58
- const result = await sendMessageZalo(to ?? "", content ?? "", {
57
+ const result = await (await loadZaloActionsRuntime())(to ?? "", content ?? "", {
59
58
  accountId: accountId ?? void 0,
60
59
  mediaUrl: mediaUrl ?? void 0,
61
60
  cfg,
@@ -92,7 +91,7 @@ const zaloApprovalAuth = createChannelApprovalAuth({
92
91
  }).approvalAuth;
93
92
  //#endregion
94
93
  //#region extensions/zalo/src/config-schema.ts
95
- const zaloAccountSchema = z.object({
94
+ const ZaloAccountSchema = z.object({
96
95
  name: z.string().optional(),
97
96
  enabled: z.boolean().optional(),
98
97
  configWrites: z.boolean().optional(),
@@ -110,8 +109,8 @@ const zaloAccountSchema = z.object({
110
109
  proxy: z.string().optional(),
111
110
  responsePrefix: z.string().optional()
112
111
  });
113
- const ZaloConfigSchema = buildMultiAccountChannelSchema(zaloAccountSchema.extend({ historyLimit: z.number().int().min(0).optional() }), {
114
- accountSchema: zaloAccountSchema,
112
+ const ZaloConfigSchema = buildMultiAccountChannelSchema(ZaloAccountSchema.extend({ historyLimit: z.number().int().min(0).optional() }), {
113
+ accountSchema: ZaloAccountSchema,
115
114
  accountsMode: "catchall"
116
115
  });
117
116
  //#endregion
@@ -187,8 +186,8 @@ function looksLikeZaloChatId(raw, normalized) {
187
186
  const target = normalizeZaloMessagingTarget(normalized ?? raw);
188
187
  return Boolean(target);
189
188
  }
190
- const loadZaloChannelRuntime = createLazyRuntimeModule(() => import("./channel.runtime-BA2foB5C.mjs"));
191
- const zaloSetupWizard = createZaloSetupWizardProxy(async () => (await import("./setup-surface-CNyPRzlv.mjs").then((n) => n.t)).zaloSetupWizard);
189
+ const loadZaloChannelRuntime = createLazyRuntimeModule(() => import("./channel.runtime-F1ScBwNC.mjs"));
190
+ const zaloSetupWizard = createZaloSetupWizardProxy(async () => (await import("./setup-surface-DMW4dLWX.mjs").then((n) => n.t)).zaloSetupWizard);
192
191
  const zaloTextChunkLimit = 2e3;
193
192
  async function sendZaloDelivery(ctx) {
194
193
  const result = await (await loadZaloChannelRuntime()).sendZaloText({
@@ -1,5 +1,5 @@
1
- import { m as normalizeSecretInputString } from "./setup-core-CCMLSh4Q.mjs";
2
- import { a as getMe, n as resolveZaloProxyFetch, r as ZaloApiError, t as sendMessageZalo } from "./send-C01aoqEH.mjs";
1
+ import { m as normalizeSecretInputString } from "./setup-core-BE-EaCnS.mjs";
2
+ import { i as getMe, n as ZaloApiError, sendMessageZalo, t as resolveZaloProxyFetch } from "./send-sCQINy2G.mjs";
3
3
  import { createAccountStatusSink } from "openclaw/plugin-sdk/channel-outbound";
4
4
  import { runChannelProbe } from "openclaw/plugin-sdk/text-utility-runtime";
5
5
  //#region extensions/zalo/src/probe.ts
@@ -62,7 +62,7 @@ async function startZaloGatewayAccount(ctx) {
62
62
  setStatus: ctx.setStatus
63
63
  });
64
64
  ctx.log?.info(`[${account.accountId}] starting provider${zaloBotLabel} mode=${mode}`);
65
- const { monitorZaloProvider } = await import("./monitor-Cu5XdWDg.mjs");
65
+ const { monitorZaloProvider } = await import("./monitor-BbW2wx_3.mjs");
66
66
  return monitorZaloProvider({
67
67
  token,
68
68
  account,
@@ -0,0 +1,8 @@
1
+ import { resolveOpenProviderRuntimeGroupPolicy as resolveZaloRuntimeGroupPolicy } from "openclaw/plugin-sdk/runtime-group-policy";
2
+ //#region extensions/zalo/src/group-access.ts
3
+ const ZALO_ALLOW_FROM_PREFIX_RE = /^(zalo|zl):/i;
4
+ function normalizeZaloAllowEntry(value) {
5
+ return value.trim().replace(ZALO_ALLOW_FROM_PREFIX_RE, "").trim().toLowerCase();
6
+ }
7
+ //#endregion
8
+ export { resolveZaloRuntimeGroupPolicy as n, normalizeZaloAllowEntry as t };
@@ -1,19 +1,18 @@
1
- import { n as resolveZaloRuntimeGroupPolicy, t as normalizeZaloAllowEntry } from "./group-access-8qHRzDHx.mjs";
1
+ import { n as resolveZaloRuntimeGroupPolicy, t as normalizeZaloAllowEntry } from "./group-access-Blsyu-ot.mjs";
2
2
  import { t as getZaloRuntime } from "./runtime-Dfhzt7qb.mjs";
3
- import { c as sendChatAction, d as setWebhook, f as ZALO_OUTBOUND_MEDIA_TTL_MS, i as deleteWebhook, l as sendMessage, n as resolveZaloProxyFetch, o as getUpdates, r as ZaloApiError, s as getWebhookInfo, u as sendPhoto } from "./send-C01aoqEH.mjs";
3
+ import { a as getUpdates, c as sendMessage, d as ZALO_OUTBOUND_MEDIA_TTL_MS, l as sendPhoto, n as ZaloApiError, o as getWebhookInfo, r as deleteWebhook, s as sendChatAction, t as resolveZaloProxyFetch, u as setWebhook } from "./send-sCQINy2G.mjs";
4
4
  import { createMessageReceiptFromOutboundResults } from "openclaw/plugin-sdk/channel-outbound";
5
5
  import { createLazyRuntimeModule, createLazyRuntimeNamedExport } from "openclaw/plugin-sdk/lazy-runtime";
6
6
  import { deliverTextOrMediaReply, resolveSendableOutboundReplyParts } from "openclaw/plugin-sdk/reply-payload";
7
7
  import { normalizeStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
8
8
  import { resolveDefaultGroupPolicy, warnMissingProviderGroupPolicyFallbackOnce } from "openclaw/plugin-sdk/runtime-group-policy";
9
- import { createChannelPairingController } from "openclaw/plugin-sdk/channel-pairing";
10
- import { logTypingFailure } from "openclaw/plugin-sdk/channel-feedback";
11
- import { registerPluginHttpRoute, resolveWebhookPath } from "openclaw/plugin-sdk/webhook-ingress";
12
9
  import { asDateTimestampMs, resolveExpiresAtMsFromDurationMs } from "openclaw/plugin-sdk/number-runtime";
10
+ import { logTypingFailure } from "openclaw/plugin-sdk/channel-feedback";
13
11
  import { createChannelPartialDeliveryError, formatInboundMediaUnavailableText, resolveChannelInboundRouteEnvelope } from "openclaw/plugin-sdk/channel-inbound";
14
- import { resolveStableChannelMessageIngress } from "openclaw/plugin-sdk/channel-ingress-runtime";
12
+ import { createChannelPairingController } from "openclaw/plugin-sdk/channel-pairing";
15
13
  import { channelReadyPatch } from "openclaw/plugin-sdk/gateway-runtime";
16
14
  import { sleepWithAbort, waitForAbortSignal } from "openclaw/plugin-sdk/runtime-env";
15
+ import { registerPluginHttpRoute, resolveWebhookPath } from "openclaw/plugin-sdk/webhook-ingress";
17
16
  import { createHostedOutboundMediaStore } from "openclaw/plugin-sdk/outbound-media";
18
17
  import { safeEqualSecret } from "openclaw/plugin-sdk/security-runtime";
19
18
  //#region extensions/zalo/src/monitor-durable.ts
@@ -173,8 +172,8 @@ function resolveZaloTimestampMs(date) {
173
172
  if (!date) return;
174
173
  return date >= UNIX_MILLISECONDS_THRESHOLD ? date : date * 1e3;
175
174
  }
176
- const loadZaloWebhookRuntime = createLazyRuntimeNamedExport(() => import("./monitor.webhook-SDR5zoSA.mjs"), "zaloWebhookRuntime");
177
- const loadZaloWebhookIngressRuntime = createLazyRuntimeNamedExport(() => import("./webhook-spool-nmnflXt2.mjs"), "zaloWebhookIngressRuntime");
175
+ const loadZaloWebhookRuntime = createLazyRuntimeNamedExport(() => import("./monitor.webhook-CaknDJfy.mjs"), "zaloWebhookRuntime");
176
+ const loadZaloWebhookIngressRuntime = createLazyRuntimeNamedExport(() => import("./webhook-spool-CTCugbD_.mjs"), "zaloWebhookIngressRuntime");
178
177
  const loadZaloWebhookModule = createLazyRuntimeModule(async () => ({
179
178
  ...await loadZaloWebhookRuntime(),
180
179
  ...await loadZaloWebhookIngressRuntime()
@@ -217,26 +216,10 @@ function normalizeWebhookUrl(url) {
217
216
  function logVerbose(core, runtime, message) {
218
217
  if (core.logging.shouldLogVerbose()) runtime.log?.(`[zalo] ${message}`);
219
218
  }
220
- async function handleZaloWebhookRequest(req, res) {
221
- const { handleZaloWebhookRequest: handleZaloWebhookRequestInternal } = await loadZaloWebhookModule();
222
- return await handleZaloWebhookRequestInternal(req, res);
223
- }
224
219
  function startPollingLoop(params) {
225
- const { token, account, config, runtime, core, mediaMaxMb, canHostMedia, webhookUrl, webhookPath, abortSignal, isStopped, statusSink, fetcher } = params;
220
+ const { abortSignal, isStopped, ...processingContext } = params;
221
+ const { token, account, runtime, statusSink, fetcher } = processingContext;
226
222
  const pollTimeout = 30;
227
- const processingContext = {
228
- token,
229
- account,
230
- config,
231
- runtime,
232
- core,
233
- mediaMaxMb,
234
- canHostMedia,
235
- webhookUrl,
236
- webhookPath,
237
- statusSink,
238
- fetcher
239
- };
240
223
  runtime.log?.(`[${account.accountId}] Zalo polling loop started timeout=${String(pollTimeout)}s`);
241
224
  const poll = async () => {
242
225
  if (isStopped() || abortSignal.aborted) return;
@@ -270,22 +253,9 @@ function startPollingLoop(params) {
270
253
  poll();
271
254
  }
272
255
  async function processUpdate(params) {
273
- const { update, token, account, config, runtime, core, mediaMaxMb, statusSink, fetcher } = params;
256
+ const { update, ...sharedContext } = params;
257
+ const { account, core, runtime } = sharedContext;
274
258
  const { event_name, message } = update;
275
- const sharedContext = {
276
- token,
277
- account,
278
- config,
279
- runtime,
280
- core,
281
- mediaMaxMb,
282
- canHostMedia: params.canHostMedia,
283
- webhookUrl: params.webhookUrl,
284
- webhookPath: params.webhookPath,
285
- statusSink,
286
- fetcher,
287
- turnAdoptionLifecycle: params.turnAdoptionLifecycle
288
- };
289
259
  if (!message) return;
290
260
  switch (event_name) {
291
261
  case "message.text.received":
@@ -297,8 +267,7 @@ async function processUpdate(params) {
297
267
  case "message.image.received":
298
268
  await handleImageMessage({
299
269
  message,
300
- ...sharedContext,
301
- mediaMaxMb
270
+ ...sharedContext
302
271
  });
303
272
  break;
304
273
  case "message.sticker.received":
@@ -313,10 +282,7 @@ async function handleTextMessage(params) {
313
282
  if (!text?.trim()) return;
314
283
  await processMessageWithPipeline({
315
284
  ...params,
316
- text,
317
- mediaKind: void 0,
318
- mediaPath: void 0,
319
- mediaType: void 0
285
+ text
320
286
  });
321
287
  }
322
288
  async function handleImageMessage(params) {
@@ -325,9 +291,7 @@ async function handleImageMessage(params) {
325
291
  const authorization = await authorizeZaloMessage({
326
292
  ...params,
327
293
  text: caption,
328
- mediaKind: "image",
329
- mediaPath: void 0,
330
- mediaType: void 0
294
+ mediaKind: "image"
331
295
  });
332
296
  if (!authorization) return;
333
297
  let mediaPath;
@@ -380,7 +344,7 @@ async function authorizeZaloMessage(params) {
380
344
  defaultGroupPolicy
381
345
  });
382
346
  const shouldComputeAuth = core.channel.commands.shouldComputeCommandAuthorized(rawBody, config);
383
- const resolveChannelIngress = async (contextBinding) => await resolveStableChannelMessageIngress({
347
+ const resolveChannelIngress = async (contextBinding) => await core.channel.inbound.ingress.resolveStable({
384
348
  channelId: "zalo",
385
349
  accountId: account.accountId,
386
350
  identity: {
@@ -405,8 +369,7 @@ async function authorizeZaloMessage(params) {
405
369
  groupAllowFrom: normalizeStringEntries(account.config.groupAllowFrom),
406
370
  command: shouldComputeAuth ? {} : void 0
407
371
  });
408
- const access = await resolveChannelIngress();
409
- const senderAccess = access.senderAccess;
372
+ const senderAccess = (await resolveChannelIngress()).senderAccess;
410
373
  if (isGroup) {
411
374
  warnMissingProviderGroupPolicyFallbackOnce({
412
375
  providerMissingFallbackApplied: senderAccess.providerMissingFallbackApplied,
@@ -448,10 +411,8 @@ async function authorizeZaloMessage(params) {
448
411
  return;
449
412
  }
450
413
  return {
451
- channelIngress: access,
452
414
  resolveChannelIngress,
453
415
  chatId,
454
- commandAuthorized: access.commandAccess.requested ? access.commandAccess.authorized : void 0,
455
416
  isGroup,
456
417
  rawBody,
457
418
  senderId,
@@ -461,11 +422,7 @@ async function authorizeZaloMessage(params) {
461
422
  async function processMessageWithPipeline(params) {
462
423
  const { message, token, account, config, runtime, core, mediaPath, mediaKind, mediaType, statusSink, fetcher, agentBody: agentBodyOverride, authorization: authorizationOverride } = params;
463
424
  const { message_id, date } = message;
464
- const authorization = authorizationOverride ?? await authorizeZaloMessage({
465
- ...params,
466
- mediaPath,
467
- mediaType
468
- });
425
+ const authorization = authorizationOverride ?? await authorizeZaloMessage(params);
469
426
  if (!authorization) return;
470
427
  const { isGroup, chatId, senderId, senderName, rawBody } = authorization;
471
428
  const agentBody = agentBodyOverride ?? rawBody;
@@ -715,7 +672,7 @@ async function monitorZaloProvider(options) {
715
672
  stopHandlers.push(unregisterHostedMediaRoute);
716
673
  }
717
674
  if (useWebhook) {
718
- const { createZaloWebhookIngress, registerZaloWebhookTarget } = await loadZaloWebhookModule();
675
+ const { createZaloWebhookIngress, registerZaloWebhookTarget, handleZaloWebhookRequest } = await loadZaloWebhookModule();
719
676
  if (!effectiveWebhookUrl || !webhookSecret) throw new Error("Zalo webhookUrl and webhookSecret are required for webhook mode");
720
677
  if (!effectiveWebhookUrl.startsWith("https://")) throw new Error("Zalo webhook URL must use HTTPS");
721
678
  if (webhookSecret.length < 8 || webhookSecret.length > 256) throw new Error("Zalo webhook secret must be 8-256 characters");
@@ -795,20 +752,16 @@ async function monitorZaloProvider(options) {
795
752
  }
796
753
  runtime.log?.(`[${account.accountId}] Zalo polling mode: clearing webhook before startup`);
797
754
  try {
798
- try {
799
- const currentWebhookUrl = normalizeWebhookUrl((await getWebhookInfo(token, fetcher)).result?.url);
800
- if (!currentWebhookUrl) runtime.log?.(`[${account.accountId}] Zalo polling mode ready (no webhook configured)`);
801
- else {
802
- runtime.log?.(`[${account.accountId}] Zalo polling mode disabling existing webhook ${describeWebhookTarget(currentWebhookUrl)}`);
803
- await deleteWebhook(token, fetcher);
804
- runtime.log?.(`[${account.accountId}] Zalo polling mode ready (webhook disabled)`);
805
- }
806
- } catch (err) {
807
- if (err instanceof ZaloApiError && err.errorCode === 404) runtime.log?.(`[${account.accountId}] Zalo polling mode webhook inspection unavailable; continuing without webhook cleanup`);
808
- else throw err;
755
+ const currentWebhookUrl = normalizeWebhookUrl((await getWebhookInfo(token, fetcher)).result?.url);
756
+ if (!currentWebhookUrl) runtime.log?.(`[${account.accountId}] Zalo polling mode ready (no webhook configured)`);
757
+ else {
758
+ runtime.log?.(`[${account.accountId}] Zalo polling mode disabling existing webhook ${describeWebhookTarget(currentWebhookUrl)}`);
759
+ await deleteWebhook(token, fetcher);
760
+ runtime.log?.(`[${account.accountId}] Zalo polling mode ready (webhook disabled)`);
809
761
  }
810
762
  } catch (err) {
811
- runtime.error?.(`[${account.accountId}] Zalo polling startup could not clear webhook: ${formatZaloError(err)}`);
763
+ if (err instanceof ZaloApiError && err.errorCode === 404) runtime.log?.(`[${account.accountId}] Zalo polling mode webhook inspection unavailable; continuing without webhook cleanup`);
764
+ else runtime.error?.(`[${account.accountId}] Zalo polling startup could not clear webhook: ${formatZaloError(err)}`);
812
765
  }
813
766
  startPollingLoop({
814
767
  token,
@@ -1,5 +1,6 @@
1
- import { WEBHOOK_ANOMALY_COUNTER_DEFAULTS, WEBHOOK_RATE_LIMIT_DEFAULTS, applyBasicWebhookRequestGuards, createFixedWindowRateLimiter, createWebhookAnomalyTracker, registerWebhookTarget, registerWebhookTargetWithPluginRoute, resolveClientIp, resolveWebhookTargetWithAuthOrRejectSync, withResolvedWebhookRequestPipeline } from "../runtime-api.js";
2
- import { ZaloWebhookPayloadError } from "./webhook-spool-nmnflXt2.mjs";
1
+ import { ZaloWebhookPayloadError } from "./webhook-spool-CTCugbD_.mjs";
2
+ import { resolveClientIp } from "openclaw/plugin-sdk/core";
3
+ import { WEBHOOK_ANOMALY_COUNTER_DEFAULTS, WEBHOOK_RATE_LIMIT_DEFAULTS, applyBasicWebhookRequestGuards, createFixedWindowRateLimiter, createWebhookAnomalyTracker, registerWebhookTarget, registerWebhookTargetWithPluginRoute, resolveWebhookTargetWithAuthOrRejectSync, withResolvedWebhookRequestPipeline } from "openclaw/plugin-sdk/webhook-ingress";
3
4
  import { safeEqualSecret } from "openclaw/plugin-sdk/security-runtime";
4
5
  import { readWebhookBodyOrReject } from "openclaw/plugin-sdk/webhook-request-guards";
5
6
  //#region extensions/zalo/src/monitor.webhook.ts
@@ -1,12 +1,12 @@
1
- import { d as resolveZaloAccount, f as resolveZaloToken } from "./setup-core-CCMLSh4Q.mjs";
1
+ import { d as resolveZaloAccount, f as resolveZaloToken } from "./setup-core-BE-EaCnS.mjs";
2
2
  import { createMessageReceiptFromOutboundResults } from "openclaw/plugin-sdk/channel-outbound";
3
3
  import { stripChannelTargetPrefix, stripTargetKindPrefix } from "openclaw/plugin-sdk/core";
4
- import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
5
4
  import { truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
6
5
  import { resolveTimerTimeoutMs } from "openclaw/plugin-sdk/number-runtime";
7
6
  import { assertOkOrThrowProviderError, readProviderJsonResponse } from "openclaw/plugin-sdk/provider-http";
8
7
  import { resolvePinnedHostnameWithPolicy } from "openclaw/plugin-sdk/ssrf-runtime";
9
8
  import { makeProxyFetch } from "openclaw/plugin-sdk/fetch-runtime";
9
+ import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
10
10
  //#region extensions/zalo/src/timeouts.ts
11
11
  const ZALO_DEFAULT_REQUEST_TIMEOUT_MS = 3e4;
12
12
  const ZALO_OUTBOUND_MEDIA_TTL_MS = 12e4;
@@ -104,7 +104,8 @@ async function sendPhoto(token, params, fetcher, assertDirectAdapterHandoff) {
104
104
  await resolvePinnedHostnameWithPolicy(parsedPhotoUrl.hostname, { policy: ZALO_MEDIA_SSRF_POLICY });
105
105
  return callZaloApi("sendPhoto", token, {
106
106
  ...params,
107
- photo: parsedPhotoUrl.href
107
+ photo: parsedPhotoUrl.href,
108
+ caption: params.caption === void 0 ? void 0 : truncateUtf16Safe(params.caption, 2e3)
108
109
  }, {
109
110
  timeoutMs: ZALO_SEND_PHOTO_REQUEST_TIMEOUT_MS,
110
111
  fetch: fetcher,
@@ -178,25 +179,6 @@ function createZaloSendReceipt(params) {
178
179
  kind: params.kind
179
180
  });
180
181
  }
181
- function toZaloSendResult(response, params) {
182
- if (response.ok && response.result) return {
183
- ok: true,
184
- messageId: response.result.message_id,
185
- receipt: createZaloSendReceipt({
186
- messageId: response.result.message_id,
187
- chatId: params.chatId,
188
- kind: params.kind
189
- })
190
- };
191
- return {
192
- ok: false,
193
- error: "Failed to send message",
194
- receipt: createZaloSendReceipt({
195
- chatId: params.chatId,
196
- kind: params.kind
197
- })
198
- };
199
- }
200
182
  async function runZaloSend(failureMessage, params, assertDirectAdapterHandoff, send) {
201
183
  let handoffRejected = false;
202
184
  let handoffError;
@@ -210,11 +192,20 @@ async function runZaloSend(failureMessage, params, assertDirectAdapterHandoff, s
210
192
  }
211
193
  } : void 0;
212
194
  try {
213
- const result = toZaloSendResult(await send(assertCurrent), params);
214
- return result.ok ? result : {
195
+ const response = await send(assertCurrent);
196
+ const messageId = response.ok && response.result ? response.result.message_id : void 0;
197
+ const receipt = createZaloSendReceipt({
198
+ ...params,
199
+ messageId
200
+ });
201
+ return response.ok && response.result ? {
202
+ ok: true,
203
+ messageId,
204
+ receipt
205
+ } : {
215
206
  ok: false,
216
207
  error: failureMessage,
217
- receipt: result.receipt
208
+ receipt
218
209
  };
219
210
  } catch (err) {
220
211
  if (handoffRejected && Object.is(handoffError, err)) throw err;
@@ -246,69 +237,44 @@ function resolveSendContext(options) {
246
237
  fetcher: resolveZaloProxyFetch(proxy)
247
238
  };
248
239
  }
249
- function resolveValidatedSendContext(chatId, options) {
240
+ async function sendMessageZalo(chatId, text, options = {}) {
250
241
  const { token, fetcher } = resolveSendContext(options);
251
- if (!token) return {
252
- ok: false,
253
- error: "No Zalo bot token configured"
254
- };
255
- const trimmedChatId = normalizeZaloSendChatId(chatId);
256
- if (!trimmedChatId) return {
242
+ const normalizedChatId = token ? stripTargetKindPrefix(stripChannelTargetPrefix(chatId, "zalo", "zl")) : "";
243
+ if (!token || !normalizedChatId) return {
257
244
  ok: false,
258
- error: "No chat_id provided"
259
- };
260
- return {
261
- ok: true,
262
- chatId: trimmedChatId,
263
- token,
264
- fetcher
265
- };
266
- }
267
- function normalizeZaloSendChatId(chatId) {
268
- return stripTargetKindPrefix(stripChannelTargetPrefix(chatId, "zalo", "zl"));
269
- }
270
- function resolveSendContextOrFailure(chatId, options) {
271
- const context = resolveValidatedSendContext(chatId, options);
272
- return context.ok ? { context } : { failure: {
273
- ok: false,
274
- error: context.error,
245
+ error: token ? "No chat_id provided" : "No Zalo bot token configured",
275
246
  receipt: createZaloSendReceipt({
276
247
  chatId,
277
248
  kind: "unknown"
278
249
  })
279
- } };
280
- }
281
- async function sendMessageZalo(chatId, text, options = {}) {
282
- const resolved = resolveSendContextOrFailure(chatId, options);
283
- if ("failure" in resolved) return resolved.failure;
284
- const { context } = resolved;
250
+ };
285
251
  if (options.mediaUrl && (options.mediaUrl.trim() || !text)) {
286
252
  const photoUrl = options.mediaUrl.trim();
287
253
  if (!photoUrl) return {
288
254
  ok: false,
289
255
  error: "No photo URL provided",
290
256
  receipt: createZaloSendReceipt({
291
- chatId: context.chatId,
257
+ chatId: normalizedChatId,
292
258
  kind: "media"
293
259
  })
294
260
  };
295
261
  const caption = text || options.caption;
296
262
  return await runZaloSend("Failed to send photo", {
297
- chatId: context.chatId,
263
+ chatId: normalizedChatId,
298
264
  kind: "media"
299
- }, options.assertDirectAdapterHandoff, (assertCurrent) => sendPhoto(context.token, {
300
- chat_id: context.chatId,
265
+ }, options.assertDirectAdapterHandoff, (assertCurrent) => sendPhoto(token, {
266
+ chat_id: normalizedChatId,
301
267
  photo: photoUrl,
302
- caption: caption !== void 0 ? truncateUtf16Safe(caption, 2e3) : void 0
303
- }, context.fetcher, assertCurrent));
268
+ caption
269
+ }, fetcher, assertCurrent));
304
270
  }
305
271
  return await runZaloSend("Failed to send message", {
306
- chatId: context.chatId,
272
+ chatId: normalizedChatId,
307
273
  kind: "text"
308
- }, options.assertDirectAdapterHandoff, (assertCurrent) => sendMessage(context.token, {
309
- chat_id: context.chatId,
274
+ }, options.assertDirectAdapterHandoff, (assertCurrent) => sendMessage(token, {
275
+ chat_id: normalizedChatId,
310
276
  text: truncateUtf16Safe(text, 2e3)
311
- }, context.fetcher, assertCurrent));
277
+ }, fetcher, assertCurrent));
312
278
  }
313
279
  //#endregion
314
- export { getMe as a, sendChatAction as c, setWebhook as d, ZALO_OUTBOUND_MEDIA_TTL_MS as f, deleteWebhook as i, sendMessage as l, resolveZaloProxyFetch as n, getUpdates as o, ZaloApiError as r, getWebhookInfo as s, sendMessageZalo as t, sendPhoto as u };
280
+ export { getUpdates as a, sendMessage as c, ZALO_OUTBOUND_MEDIA_TTL_MS as d, getMe as i, sendPhoto as l, ZaloApiError as n, getWebhookInfo as o, deleteWebhook as r, sendChatAction as s, sendMessageZalo, resolveZaloProxyFetch as t, setWebhook as u };
@@ -227,7 +227,7 @@ const zaloDmPolicy = createChannelDmPolicy({
227
227
  resolveAccount: (cfg, accountId) => {
228
228
  return resolveZaloAccount({
229
229
  cfg,
230
- accountId: accountId && normalizeAccountId$1(accountId) ? normalizeAccountId$1(accountId) ?? DEFAULT_ACCOUNT_ID$1 : resolveDefaultZaloAccountId(cfg)
230
+ accountId: accountId ? normalizeAccountId$1(accountId) : resolveDefaultZaloAccountId(cfg)
231
231
  });
232
232
  },
233
233
  applyPatch: ({ cfg, account, patch }) => patchScopedAccountConfig({
@@ -1,4 +1,4 @@
1
- import { a as noteZaloTokenHelp, n as zaloDmPolicy, o as promptZaloAllowFrom, s as inspectZaloAccount } from "./setup-core-CCMLSh4Q.mjs";
1
+ import { a as noteZaloTokenHelp, n as zaloDmPolicy, o as promptZaloAllowFrom, s as inspectZaloAccount } from "./setup-core-BE-EaCnS.mjs";
2
2
  import { DEFAULT_ACCOUNT_ID, buildSingleChannelSecretPromptState, createSetupTranslator, createStandardChannelSetupStatus, hasConfiguredSecretInput, patchTopLevelChannelConfigSection, promptSingleChannelSecretInput, runSingleChannelSecretStep } from "openclaw/plugin-sdk/setup";
3
3
  //#region \0rolldown/runtime.js
4
4
  var __defProp = Object.defineProperty;
@@ -125,15 +125,15 @@ const zaloSetupWizard = {
125
125
  return "/zalo-webhook";
126
126
  }
127
127
  })();
128
- let webhookSecretResult = await promptSingleChannelSecretInput({
128
+ const promptWebhookSecret = (hasWebhookSecret) => promptSingleChannelSecretInput({
129
129
  cfg: next,
130
130
  prompter,
131
131
  providerHint: "zalo-webhook",
132
132
  credentialLabel: t("wizard.zalo.webhookSecret"),
133
133
  secretInputMode: options?.secretInputMode,
134
134
  ...buildSingleChannelSecretPromptState({
135
- accountConfigured: hasConfiguredSecretInput(resolvedAccount.config.webhookSecret),
136
- hasConfigToken: hasConfiguredSecretInput(resolvedAccount.config.webhookSecret),
135
+ accountConfigured: hasWebhookSecret,
136
+ hasConfigToken: hasWebhookSecret,
137
137
  allowEnv: false
138
138
  }),
139
139
  envPrompt: "",
@@ -141,24 +141,10 @@ const zaloSetupWizard = {
141
141
  inputPrompt: t("wizard.zalo.webhookSecretInput"),
142
142
  preferredEnvVar: "ZALO_WEBHOOK_SECRET"
143
143
  });
144
+ let webhookSecretResult = await promptWebhookSecret(hasConfiguredSecretInput(resolvedAccount.config.webhookSecret));
144
145
  while (webhookSecretResult.action === "set" && typeof webhookSecretResult.value === "string" && (webhookSecretResult.value.length < 8 || webhookSecretResult.value.length > 256)) {
145
146
  await prompter.note(t("wizard.zalo.webhookSecretLength"), t("wizard.zalo.webhookTitle"));
146
- webhookSecretResult = await promptSingleChannelSecretInput({
147
- cfg: next,
148
- prompter,
149
- providerHint: "zalo-webhook",
150
- credentialLabel: t("wizard.zalo.webhookSecret"),
151
- secretInputMode: options?.secretInputMode,
152
- ...buildSingleChannelSecretPromptState({
153
- accountConfigured: false,
154
- hasConfigToken: false,
155
- allowEnv: false
156
- }),
157
- envPrompt: "",
158
- keepPrompt: t("wizard.zalo.webhookSecretKeep"),
159
- inputPrompt: t("wizard.zalo.webhookSecretInput"),
160
- preferredEnvVar: "ZALO_WEBHOOK_SECRET"
161
- });
147
+ webhookSecretResult = await promptWebhookSecret(false);
162
148
  }
163
149
  const webhookSecret = webhookSecretResult.action === "set" ? webhookSecretResult.value : resolvedAccount.config.webhookSecret;
164
150
  const webhookPath = (await prompter.text({
@@ -1,5 +1,5 @@
1
1
  import { t as getZaloRuntime } from "./runtime-Dfhzt7qb.mjs";
2
- import { r as ZaloApiError } from "./send-C01aoqEH.mjs";
2
+ import { n as ZaloApiError } from "./send-sCQINy2G.mjs";
3
3
  import { DEFAULT_INGRESS_ADOPTION_STALL_MS, DEFAULT_INGRESS_RETRY_MAX_ATTEMPTS, bindIngressLifecycleToReplyOptions, createChannelIngressError, createChannelIngressMonitor } from "openclaw/plugin-sdk/channel-outbound";
4
4
  import { normalizeNullableString } from "openclaw/plugin-sdk/string-coerce-runtime";
5
5
  import { z } from "zod";
package/dist/api.js CHANGED
@@ -1,5 +1,5 @@
1
- import { n as zaloDmPolicy, r as zaloSetupAdapter, t as createZaloSetupWizardProxy } from "./.setup/setup-core-CCMLSh4Q.mjs";
2
- import { t as zaloPlugin } from "./.setup/channel-D14b6qHz.mjs";
3
- import { n as resolveZaloRuntimeGroupPolicy } from "./.setup/group-access-8qHRzDHx.mjs";
1
+ import { n as zaloDmPolicy, r as zaloSetupAdapter, t as createZaloSetupWizardProxy } from "./.setup/setup-core-BE-EaCnS.mjs";
2
+ import { t as zaloPlugin } from "./.setup/channel-COgJOEix.mjs";
3
+ import { n as resolveZaloRuntimeGroupPolicy } from "./.setup/group-access-Blsyu-ot.mjs";
4
4
  import { zaloSetupWizard } from "./setup-api.js";
5
5
  export { createZaloSetupWizardProxy, resolveZaloRuntimeGroupPolicy, zaloDmPolicy, zaloPlugin, zaloSetupAdapter, zaloSetupWizard };
@@ -1,2 +1,2 @@
1
- import { t as zaloPlugin } from "./.setup/channel-D14b6qHz.mjs";
1
+ import { t as zaloPlugin } from "./.setup/channel-COgJOEix.mjs";
2
2
  export { zaloPlugin };
@@ -1,2 +1,2 @@
1
- import { n as resolveZaloRuntimeGroupPolicy } from "./.setup/group-access-8qHRzDHx.mjs";
1
+ import { n as resolveZaloRuntimeGroupPolicy } from "./.setup/group-access-Blsyu-ot.mjs";
2
2
  export { resolveZaloRuntimeGroupPolicy };
@@ -1,16 +1,2 @@
1
1
  import { n as setZaloRuntime } from "./.setup/runtime-Dfhzt7qb.mjs";
2
- import { formatAllowFromLowercase, isNormalizedSenderAllowed } from "openclaw/plugin-sdk/allow-from";
3
- import { createChannelMessageReplyPipeline } from "openclaw/plugin-sdk/channel-outbound";
4
- import { PAIRING_APPROVED_MESSAGE, buildTokenChannelStatusSummary } from "openclaw/plugin-sdk/channel-status";
5
- import { deliverTextOrMediaReply, isNumericTargetId, sendPayloadWithChunkedTextAndMedia } from "openclaw/plugin-sdk/reply-payload";
6
- import { buildBaseAccountStatusSnapshot } from "openclaw/plugin-sdk/status-helpers";
7
- import { chunkTextForOutbound } from "openclaw/plugin-sdk/text-chunking";
8
- import { buildSecretInputSchema, hasConfiguredSecretInput, normalizeResolvedSecretInputString, normalizeSecretInputString } from "openclaw/plugin-sdk/secret-input";
9
- import { DEFAULT_ACCOUNT_ID, buildChannelConfigSchema, createDedupeCache, formatPairingApproveHint, jsonResult, normalizeAccountId, readStringParam, resolveClientIp } from "openclaw/plugin-sdk/core";
10
- import { addWildcardAllowFrom, applyAccountNameToChannelSection, applySetupAccountConfigPatch, buildSingleChannelSecretPromptState, mergeAllowFromEntries, migrateBaseNameToDefaultAccount, promptSingleChannelSecretInput, runSingleChannelSecretStep, setTopLevelChannelDmPolicyWithAllowFrom } from "openclaw/plugin-sdk/setup";
11
- import { resolveDefaultGroupPolicy, resolveOpenProviderRuntimeGroupPolicy, warnMissingProviderGroupPolicyFallbackOnce } from "openclaw/plugin-sdk/runtime-group-policy";
12
- import { createChannelPairingController } from "openclaw/plugin-sdk/channel-pairing";
13
- import { logTypingFailure } from "openclaw/plugin-sdk/channel-feedback";
14
- import { waitForAbortSignal } from "openclaw/plugin-sdk/runtime";
15
- import { WEBHOOK_ANOMALY_COUNTER_DEFAULTS, WEBHOOK_RATE_LIMIT_DEFAULTS, applyBasicWebhookRequestGuards, createFixedWindowRateLimiter, createWebhookAnomalyTracker, readJsonWebhookBodyOrReject, registerPluginHttpRoute, registerWebhookTarget, registerWebhookTargetWithPluginRoute, resolveWebhookPath, resolveWebhookTargetWithAuthOrRejectSync, withResolvedWebhookRequestPipeline } from "openclaw/plugin-sdk/webhook-ingress";
16
- export { DEFAULT_ACCOUNT_ID, PAIRING_APPROVED_MESSAGE, WEBHOOK_ANOMALY_COUNTER_DEFAULTS, WEBHOOK_RATE_LIMIT_DEFAULTS, addWildcardAllowFrom, applyAccountNameToChannelSection, applyBasicWebhookRequestGuards, applySetupAccountConfigPatch, buildBaseAccountStatusSnapshot, buildChannelConfigSchema, buildSecretInputSchema, buildSingleChannelSecretPromptState, buildTokenChannelStatusSummary, chunkTextForOutbound, createChannelMessageReplyPipeline, createChannelPairingController, createDedupeCache, createFixedWindowRateLimiter, createWebhookAnomalyTracker, deliverTextOrMediaReply, formatAllowFromLowercase, formatPairingApproveHint, hasConfiguredSecretInput, isNormalizedSenderAllowed, isNumericTargetId, jsonResult, logTypingFailure, mergeAllowFromEntries, migrateBaseNameToDefaultAccount, normalizeAccountId, normalizeResolvedSecretInputString, normalizeSecretInputString, promptSingleChannelSecretInput, readJsonWebhookBodyOrReject, readStringParam, registerPluginHttpRoute, registerWebhookTarget, registerWebhookTargetWithPluginRoute, resolveClientIp, resolveDefaultGroupPolicy, resolveOpenProviderRuntimeGroupPolicy, resolveWebhookPath, resolveWebhookTargetWithAuthOrRejectSync, runSingleChannelSecretStep, sendPayloadWithChunkedTextAndMedia, setTopLevelChannelDmPolicyWithAllowFrom, setZaloRuntime, waitForAbortSignal, warnMissingProviderGroupPolicyFallbackOnce, withResolvedWebhookRequestPipeline };
2
+ export { setZaloRuntime };
package/dist/setup-api.js CHANGED
@@ -1,5 +1,5 @@
1
- import { n as zaloDmPolicy, r as zaloSetupAdapter, t as createZaloSetupWizardProxy } from "./.setup/setup-core-CCMLSh4Q.mjs";
2
- import { n as resolveZaloRuntimeGroupPolicy } from "./.setup/group-access-8qHRzDHx.mjs";
1
+ import { n as zaloDmPolicy, r as zaloSetupAdapter, t as createZaloSetupWizardProxy } from "./.setup/setup-core-BE-EaCnS.mjs";
2
+ import { n as resolveZaloRuntimeGroupPolicy } from "./.setup/group-access-Blsyu-ot.mjs";
3
3
  import { loadBundledEntryExportSync } from "openclaw/plugin-sdk/channel-entry-contract";
4
4
  //#region extensions/zalo/setup-api.ts
5
5
  function createLazyObjectValue(load) {
@@ -4,7 +4,7 @@ import { fileURLToPath } from "node:url";
4
4
  var setup_entry_default = defineBundledChannelSetupEntry({
5
5
  importMetaUrl: import.meta.url,
6
6
  plugin: {
7
- specifier: fileURLToPath(new URL(".setup/api-BPF84XFR.mjs", import.meta.url).href),
7
+ specifier: fileURLToPath(new URL(".setup/api-YaSbmx07.mjs", import.meta.url).href),
8
8
  exportName: "zaloPlugin"
9
9
  },
10
10
  secrets: {
@@ -1,3 +1,3 @@
1
- import { n as zaloSetupWizard } from "./.setup/setup-surface-CNyPRzlv.mjs";
2
- import { r as zaloSetupAdapter } from "./.setup/setup-core-CCMLSh4Q.mjs";
1
+ import { n as zaloSetupWizard } from "./.setup/setup-surface-DMW4dLWX.mjs";
2
+ import { r as zaloSetupAdapter } from "./.setup/setup-core-BE-EaCnS.mjs";
3
3
  export { zaloSetupAdapter, zaloSetupWizard };
@@ -155,13 +155,13 @@ try {
155
155
  expected: 'string',
156
156
  code: 'invalid_type',
157
157
  path: [ 'username' ],
158
- message: 'Invalid input: expected string'
158
+ message: 'Invalid input: expected string, received number'
159
159
  },
160
160
  {
161
161
  expected: 'number',
162
162
  code: 'invalid_type',
163
163
  path: [ 'xp' ],
164
- message: 'Invalid input: expected number'
164
+ message: 'Invalid input: expected number, received string'
165
165
  }
166
166
  ] */
167
167
  }