@openclaw/signal 2026.7.2-beta.2 → 2026.7.2-beta.4

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 (759) hide show
  1. package/dist/accounts-DrStJjiK.js +147 -0
  2. package/dist/api.js +11 -11
  3. package/dist/{approval-handler.runtime-I1SMFwwR.js → approval-handler.runtime-C2qf7D0D.js} +5 -5
  4. package/dist/{approval-reactions-ChcS2rQN.js → approval-reactions-5uyOazxW.js} +2 -2
  5. package/dist/{channel-DK8XZHPe.js → channel-DQ9i00A8.js} +397 -29
  6. package/dist/channel-config-api.js +1 -1
  7. package/dist/channel-plugin-api.js +1 -1
  8. package/dist/channel.runtime-DWQdFD2O.js +92 -0
  9. package/dist/client-adapter-Bm0ZRqJn.js +56 -0
  10. package/dist/{client-adapter-aEM0kGhC.js → client-yjbwtufN.js} +140 -210
  11. package/dist/config-schema-DLvpQPN5.js +221 -0
  12. package/dist/contract-api.js +2 -2
  13. package/dist/doctor-contract-api-DbUCknbC.js +492 -0
  14. package/dist/doctor-contract-api.js +1 -15
  15. package/dist/{identity-BF8taj7g.js → identity-BQ4OzXXk.js} +17 -8
  16. package/dist/{install-signal-cli-CtusY3tN.js → install-signal-cli-qJF7iC4h.js} +44 -14
  17. package/dist/{monitor-BdzH3U64.js → monitor-C0aBYlJ0.js} +343 -207
  18. package/dist/{probe-CbWkI24J.js → probe-2yf2hpcc.js} +23 -4
  19. package/dist/question-reactions-DJ1xQzVF.js +109 -0
  20. package/dist/{reaction-runtime-api-DifyinAU.js → reaction-runtime-api-Bka61qO9.js} +5 -7
  21. package/dist/reaction-runtime-api.js +1 -1
  22. package/dist/{rpc-context-DsHWh2hc.js → rpc-context-CZUoE0-A.js} +1 -1
  23. package/dist/{runtime-BZ9hnS3a.js → runtime-JPrGlV7h.js} +2 -2
  24. package/dist/runtime-api.js +11 -10
  25. package/dist/{send-BWtA6h3J.js → send-BZAqAa8p.js} +16 -20
  26. package/dist/{send.runtime-D4WBNNgn.js → send.runtime-CcA5Qei9.js} +1 -1
  27. package/dist/{reply-authors-osU_SY4J.js → transport-detection-CiZWiMYa.js} +140 -182
  28. package/dist/transport-detection.runtime-BgjcIyww.js +2 -0
  29. package/dist/transport-policy-DxvSMHp9.js +99 -0
  30. package/dist/transport-probes.runtime-CbnZn38-.js +2 -0
  31. package/node_modules/ws/lib/receiver.js +15 -32
  32. package/node_modules/ws/lib/websocket-server.js +4 -4
  33. package/node_modules/ws/lib/websocket.js +4 -4
  34. package/node_modules/ws/package.json +5 -1
  35. package/node_modules/zod/LICENSE +21 -0
  36. package/node_modules/zod/README.md +191 -0
  37. package/node_modules/zod/index.cjs +33 -0
  38. package/node_modules/zod/index.d.cts +4 -0
  39. package/node_modules/zod/index.d.ts +4 -0
  40. package/node_modules/zod/index.js +4 -0
  41. package/node_modules/zod/locales/index.cjs +17 -0
  42. package/node_modules/zod/locales/index.d.cts +1 -0
  43. package/node_modules/zod/locales/index.d.ts +1 -0
  44. package/node_modules/zod/locales/index.js +1 -0
  45. package/node_modules/zod/locales/package.json +7 -0
  46. package/node_modules/zod/mini/index.cjs +32 -0
  47. package/node_modules/zod/mini/index.d.cts +3 -0
  48. package/node_modules/zod/mini/index.d.ts +3 -0
  49. package/node_modules/zod/mini/index.js +3 -0
  50. package/node_modules/zod/mini/package.json +7 -0
  51. package/node_modules/zod/package.json +135 -0
  52. package/node_modules/zod/src/index.ts +4 -0
  53. package/node_modules/zod/src/locales/index.ts +1 -0
  54. package/node_modules/zod/src/mini/index.ts +3 -0
  55. package/node_modules/zod/src/v3/ZodError.ts +330 -0
  56. package/node_modules/zod/src/v3/benchmarks/datetime.ts +58 -0
  57. package/node_modules/zod/src/v3/benchmarks/discriminatedUnion.ts +80 -0
  58. package/node_modules/zod/src/v3/benchmarks/index.ts +59 -0
  59. package/node_modules/zod/src/v3/benchmarks/ipv4.ts +57 -0
  60. package/node_modules/zod/src/v3/benchmarks/object.ts +69 -0
  61. package/node_modules/zod/src/v3/benchmarks/primitives.ts +162 -0
  62. package/node_modules/zod/src/v3/benchmarks/realworld.ts +63 -0
  63. package/node_modules/zod/src/v3/benchmarks/string.ts +55 -0
  64. package/node_modules/zod/src/v3/benchmarks/union.ts +80 -0
  65. package/node_modules/zod/src/v3/errors.ts +13 -0
  66. package/node_modules/zod/src/v3/external.ts +6 -0
  67. package/node_modules/zod/src/v3/helpers/enumUtil.ts +17 -0
  68. package/node_modules/zod/src/v3/helpers/errorUtil.ts +8 -0
  69. package/node_modules/zod/src/v3/helpers/parseUtil.ts +176 -0
  70. package/node_modules/zod/src/v3/helpers/partialUtil.ts +34 -0
  71. package/node_modules/zod/src/v3/helpers/typeAliases.ts +2 -0
  72. package/node_modules/zod/src/v3/helpers/util.ts +224 -0
  73. package/node_modules/zod/src/v3/index.ts +4 -0
  74. package/node_modules/zod/src/v3/locales/en.ts +124 -0
  75. package/node_modules/zod/src/v3/standard-schema.ts +113 -0
  76. package/node_modules/zod/src/v3/tests/Mocker.ts +54 -0
  77. package/node_modules/zod/src/v3/tests/all-errors.test.ts +157 -0
  78. package/node_modules/zod/src/v3/tests/anyunknown.test.ts +28 -0
  79. package/node_modules/zod/src/v3/tests/array.test.ts +71 -0
  80. package/node_modules/zod/src/v3/tests/async-parsing.test.ts +388 -0
  81. package/node_modules/zod/src/v3/tests/async-refinements.test.ts +46 -0
  82. package/node_modules/zod/src/v3/tests/base.test.ts +29 -0
  83. package/node_modules/zod/src/v3/tests/bigint.test.ts +55 -0
  84. package/node_modules/zod/src/v3/tests/branded.test.ts +53 -0
  85. package/node_modules/zod/src/v3/tests/catch.test.ts +220 -0
  86. package/node_modules/zod/src/v3/tests/coerce.test.ts +133 -0
  87. package/node_modules/zod/src/v3/tests/complex.test.ts +70 -0
  88. package/node_modules/zod/src/v3/tests/custom.test.ts +31 -0
  89. package/node_modules/zod/src/v3/tests/date.test.ts +32 -0
  90. package/node_modules/zod/src/v3/tests/deepmasking.test.ts +186 -0
  91. package/node_modules/zod/src/v3/tests/default.test.ts +112 -0
  92. package/node_modules/zod/src/v3/tests/description.test.ts +33 -0
  93. package/node_modules/zod/src/v3/tests/discriminated-unions.test.ts +315 -0
  94. package/node_modules/zod/src/v3/tests/enum.test.ts +80 -0
  95. package/node_modules/zod/src/v3/tests/error.test.ts +551 -0
  96. package/node_modules/zod/src/v3/tests/firstparty.test.ts +87 -0
  97. package/node_modules/zod/src/v3/tests/firstpartyschematypes.test.ts +21 -0
  98. package/node_modules/zod/src/v3/tests/function.test.ts +261 -0
  99. package/node_modules/zod/src/v3/tests/generics.test.ts +48 -0
  100. package/node_modules/zod/src/v3/tests/instanceof.test.ts +37 -0
  101. package/node_modules/zod/src/v3/tests/intersection.test.ts +110 -0
  102. package/node_modules/zod/src/v3/tests/language-server.source.ts +76 -0
  103. package/node_modules/zod/src/v3/tests/language-server.test.ts +207 -0
  104. package/node_modules/zod/src/v3/tests/literal.test.ts +36 -0
  105. package/node_modules/zod/src/v3/tests/map.test.ts +110 -0
  106. package/node_modules/zod/src/v3/tests/masking.test.ts +4 -0
  107. package/node_modules/zod/src/v3/tests/mocker.test.ts +19 -0
  108. package/node_modules/zod/src/v3/tests/nan.test.ts +24 -0
  109. package/node_modules/zod/src/v3/tests/nativeEnum.test.ts +87 -0
  110. package/node_modules/zod/src/v3/tests/nullable.test.ts +42 -0
  111. package/node_modules/zod/src/v3/tests/number.test.ts +176 -0
  112. package/node_modules/zod/src/v3/tests/object-augmentation.test.ts +29 -0
  113. package/node_modules/zod/src/v3/tests/object-in-es5-env.test.ts +29 -0
  114. package/node_modules/zod/src/v3/tests/object.test.ts +434 -0
  115. package/node_modules/zod/src/v3/tests/optional.test.ts +42 -0
  116. package/node_modules/zod/src/v3/tests/parseUtil.test.ts +23 -0
  117. package/node_modules/zod/src/v3/tests/parser.test.ts +41 -0
  118. package/node_modules/zod/src/v3/tests/partials.test.ts +243 -0
  119. package/node_modules/zod/src/v3/tests/pickomit.test.ts +111 -0
  120. package/node_modules/zod/src/v3/tests/pipeline.test.ts +29 -0
  121. package/node_modules/zod/src/v3/tests/preprocess.test.ts +186 -0
  122. package/node_modules/zod/src/v3/tests/primitive.test.ts +440 -0
  123. package/node_modules/zod/src/v3/tests/promise.test.ts +90 -0
  124. package/node_modules/zod/src/v3/tests/readonly.test.ts +194 -0
  125. package/node_modules/zod/src/v3/tests/record.test.ts +171 -0
  126. package/node_modules/zod/src/v3/tests/recursive.test.ts +197 -0
  127. package/node_modules/zod/src/v3/tests/refine.test.ts +313 -0
  128. package/node_modules/zod/src/v3/tests/safeparse.test.ts +27 -0
  129. package/node_modules/zod/src/v3/tests/set.test.ts +142 -0
  130. package/node_modules/zod/src/v3/tests/standard-schema.test.ts +83 -0
  131. package/node_modules/zod/src/v3/tests/string.test.ts +916 -0
  132. package/node_modules/zod/src/v3/tests/transformer.test.ts +233 -0
  133. package/node_modules/zod/src/v3/tests/tuple.test.ts +90 -0
  134. package/node_modules/zod/src/v3/tests/unions.test.ts +57 -0
  135. package/node_modules/zod/src/v3/tests/validations.test.ts +133 -0
  136. package/node_modules/zod/src/v3/tests/void.test.ts +15 -0
  137. package/node_modules/zod/src/v3/types.ts +5138 -0
  138. package/node_modules/zod/src/v4/classic/checks.ts +32 -0
  139. package/node_modules/zod/src/v4/classic/coerce.ts +27 -0
  140. package/node_modules/zod/src/v4/classic/compat.ts +70 -0
  141. package/node_modules/zod/src/v4/classic/errors.ts +82 -0
  142. package/node_modules/zod/src/v4/classic/external.ts +52 -0
  143. package/node_modules/zod/src/v4/classic/from-json-schema.ts +659 -0
  144. package/node_modules/zod/src/v4/classic/index.ts +5 -0
  145. package/node_modules/zod/src/v4/classic/iso.ts +90 -0
  146. package/node_modules/zod/src/v4/classic/parse.ts +82 -0
  147. package/node_modules/zod/src/v4/classic/schemas.ts +2672 -0
  148. package/node_modules/zod/src/v4/classic/tests/anyunknown.test.ts +26 -0
  149. package/node_modules/zod/src/v4/classic/tests/apply.test.ts +59 -0
  150. package/node_modules/zod/src/v4/classic/tests/array.test.ts +264 -0
  151. package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +216 -0
  152. package/node_modules/zod/src/v4/classic/tests/async-parsing.test.ts +381 -0
  153. package/node_modules/zod/src/v4/classic/tests/async-refinements.test.ts +68 -0
  154. package/node_modules/zod/src/v4/classic/tests/base.test.ts +7 -0
  155. package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +54 -0
  156. package/node_modules/zod/src/v4/classic/tests/brand.test.ts +106 -0
  157. package/node_modules/zod/src/v4/classic/tests/catch.test.ts +326 -0
  158. package/node_modules/zod/src/v4/classic/tests/coalesce.test.ts +20 -0
  159. package/node_modules/zod/src/v4/classic/tests/codec-examples.test.ts +573 -0
  160. package/node_modules/zod/src/v4/classic/tests/codec.test.ts +703 -0
  161. package/node_modules/zod/src/v4/classic/tests/coerce.test.ts +160 -0
  162. package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +374 -0
  163. package/node_modules/zod/src/v4/classic/tests/custom.test.ts +40 -0
  164. package/node_modules/zod/src/v4/classic/tests/date.test.ts +62 -0
  165. package/node_modules/zod/src/v4/classic/tests/datetime.test.ts +302 -0
  166. package/node_modules/zod/src/v4/classic/tests/default.test.ts +409 -0
  167. package/node_modules/zod/src/v4/classic/tests/describe-meta-checks.test.ts +27 -0
  168. package/node_modules/zod/src/v4/classic/tests/description.test.ts +32 -0
  169. package/node_modules/zod/src/v4/classic/tests/detached-methods.test.ts +197 -0
  170. package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +694 -0
  171. package/node_modules/zod/src/v4/classic/tests/enum.test.ts +285 -0
  172. package/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +807 -0
  173. package/node_modules/zod/src/v4/classic/tests/error.test.ts +711 -0
  174. package/node_modules/zod/src/v4/classic/tests/file.test.ts +96 -0
  175. package/node_modules/zod/src/v4/classic/tests/firstparty.test.ts +179 -0
  176. package/node_modules/zod/src/v4/classic/tests/fix-json-issue.test.ts +26 -0
  177. package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +895 -0
  178. package/node_modules/zod/src/v4/classic/tests/function.test.ts +360 -0
  179. package/node_modules/zod/src/v4/classic/tests/generics.test.ts +72 -0
  180. package/node_modules/zod/src/v4/classic/tests/global-config.test.ts +39 -0
  181. package/node_modules/zod/src/v4/classic/tests/hash.test.ts +68 -0
  182. package/node_modules/zod/src/v4/classic/tests/index.test.ts +939 -0
  183. package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +60 -0
  184. package/node_modules/zod/src/v4/classic/tests/intersection.test.ts +198 -0
  185. package/node_modules/zod/src/v4/classic/tests/jitless-allows-eval.test.ts +46 -0
  186. package/node_modules/zod/src/v4/classic/tests/json.test.ts +109 -0
  187. package/node_modules/zod/src/v4/classic/tests/lazy.test.ts +227 -0
  188. package/node_modules/zod/src/v4/classic/tests/literal.test.ts +117 -0
  189. package/node_modules/zod/src/v4/classic/tests/locales_ka.test.ts +29 -0
  190. package/node_modules/zod/src/v4/classic/tests/locales_ro.test.ts +24 -0
  191. package/node_modules/zod/src/v4/classic/tests/map.test.ts +330 -0
  192. package/node_modules/zod/src/v4/classic/tests/nan.test.ts +21 -0
  193. package/node_modules/zod/src/v4/classic/tests/nested-refine.test.ts +168 -0
  194. package/node_modules/zod/src/v4/classic/tests/nonoptional.test.ts +101 -0
  195. package/node_modules/zod/src/v4/classic/tests/nullable.test.ts +22 -0
  196. package/node_modules/zod/src/v4/classic/tests/number.test.ts +325 -0
  197. package/node_modules/zod/src/v4/classic/tests/object.test.ts +717 -0
  198. package/node_modules/zod/src/v4/classic/tests/optional.test.ts +333 -0
  199. package/node_modules/zod/src/v4/classic/tests/partial.test.ts +450 -0
  200. package/node_modules/zod/src/v4/classic/tests/pickomit.test.ts +211 -0
  201. package/node_modules/zod/src/v4/classic/tests/pipe.test.ts +101 -0
  202. package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +74 -0
  203. package/node_modules/zod/src/v4/classic/tests/preprocess-types.test.ts +26 -0
  204. package/node_modules/zod/src/v4/classic/tests/preprocess.test.ts +351 -0
  205. package/node_modules/zod/src/v4/classic/tests/primitive.test.ts +175 -0
  206. package/node_modules/zod/src/v4/classic/tests/promise.test.ts +81 -0
  207. package/node_modules/zod/src/v4/classic/tests/prototypes.test.ts +23 -0
  208. package/node_modules/zod/src/v4/classic/tests/readonly.test.ts +252 -0
  209. package/node_modules/zod/src/v4/classic/tests/record.test.ts +717 -0
  210. package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +631 -0
  211. package/node_modules/zod/src/v4/classic/tests/refine.test.ts +633 -0
  212. package/node_modules/zod/src/v4/classic/tests/registries.test.ts +243 -0
  213. package/node_modules/zod/src/v4/classic/tests/set.test.ts +181 -0
  214. package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +134 -0
  215. package/node_modules/zod/src/v4/classic/tests/string-formats.test.ts +125 -0
  216. package/node_modules/zod/src/v4/classic/tests/string.test.ts +1224 -0
  217. package/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +106 -0
  218. package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +771 -0
  219. package/node_modules/zod/src/v4/classic/tests/to-json-schema-methods.test.ts +438 -0
  220. package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +3125 -0
  221. package/node_modules/zod/src/v4/classic/tests/transform.test.ts +378 -0
  222. package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +496 -0
  223. package/node_modules/zod/src/v4/classic/tests/union.test.ts +273 -0
  224. package/node_modules/zod/src/v4/classic/tests/url.test.ts +13 -0
  225. package/node_modules/zod/src/v4/classic/tests/validations.test.ts +283 -0
  226. package/node_modules/zod/src/v4/classic/tests/void.test.ts +12 -0
  227. package/node_modules/zod/src/v4/core/api.ts +1823 -0
  228. package/node_modules/zod/src/v4/core/checks.ts +1293 -0
  229. package/node_modules/zod/src/v4/core/config.ts +15 -0
  230. package/node_modules/zod/src/v4/core/core.ts +153 -0
  231. package/node_modules/zod/src/v4/core/doc.ts +44 -0
  232. package/node_modules/zod/src/v4/core/errors.ts +455 -0
  233. package/node_modules/zod/src/v4/core/index.ts +16 -0
  234. package/node_modules/zod/src/v4/core/json-schema-generator.ts +126 -0
  235. package/node_modules/zod/src/v4/core/json-schema-processors.ts +666 -0
  236. package/node_modules/zod/src/v4/core/json-schema.ts +147 -0
  237. package/node_modules/zod/src/v4/core/parse.ts +195 -0
  238. package/node_modules/zod/src/v4/core/regexes.ts +190 -0
  239. package/node_modules/zod/src/v4/core/registries.ts +105 -0
  240. package/node_modules/zod/src/v4/core/schemas.ts +4730 -0
  241. package/node_modules/zod/src/v4/core/standard-schema.ts +159 -0
  242. package/node_modules/zod/src/v4/core/tests/extend.test.ts +59 -0
  243. package/node_modules/zod/src/v4/core/tests/index.test.ts +46 -0
  244. package/node_modules/zod/src/v4/core/tests/locales/be.test.ts +124 -0
  245. package/node_modules/zod/src/v4/core/tests/locales/el.test.ts +215 -0
  246. package/node_modules/zod/src/v4/core/tests/locales/en.test.ts +22 -0
  247. package/node_modules/zod/src/v4/core/tests/locales/es.test.ts +181 -0
  248. package/node_modules/zod/src/v4/core/tests/locales/fr.test.ts +72 -0
  249. package/node_modules/zod/src/v4/core/tests/locales/he.test.ts +379 -0
  250. package/node_modules/zod/src/v4/core/tests/locales/hr.test.ts +163 -0
  251. package/node_modules/zod/src/v4/core/tests/locales/nl.test.ts +46 -0
  252. package/node_modules/zod/src/v4/core/tests/locales/ru.test.ts +128 -0
  253. package/node_modules/zod/src/v4/core/tests/locales/tr.test.ts +69 -0
  254. package/node_modules/zod/src/v4/core/tests/locales/uz.test.ts +105 -0
  255. package/node_modules/zod/src/v4/core/tests/record-constructor.test.ts +125 -0
  256. package/node_modules/zod/src/v4/core/tests/recursive-tuples.test.ts +45 -0
  257. package/node_modules/zod/src/v4/core/to-json-schema.ts +622 -0
  258. package/node_modules/zod/src/v4/core/util.ts +983 -0
  259. package/node_modules/zod/src/v4/core/versions.ts +5 -0
  260. package/node_modules/zod/src/v4/core/zsf.ts +323 -0
  261. package/node_modules/zod/src/v4/index.ts +4 -0
  262. package/node_modules/zod/src/v4/locales/ar.ts +115 -0
  263. package/node_modules/zod/src/v4/locales/az.ts +111 -0
  264. package/node_modules/zod/src/v4/locales/be.ts +176 -0
  265. package/node_modules/zod/src/v4/locales/bg.ts +128 -0
  266. package/node_modules/zod/src/v4/locales/ca.ts +116 -0
  267. package/node_modules/zod/src/v4/locales/cs.ts +118 -0
  268. package/node_modules/zod/src/v4/locales/da.ts +123 -0
  269. package/node_modules/zod/src/v4/locales/de.ts +116 -0
  270. package/node_modules/zod/src/v4/locales/el.ts +121 -0
  271. package/node_modules/zod/src/v4/locales/en.ts +123 -0
  272. package/node_modules/zod/src/v4/locales/eo.ts +118 -0
  273. package/node_modules/zod/src/v4/locales/es.ts +141 -0
  274. package/node_modules/zod/src/v4/locales/fa.ts +126 -0
  275. package/node_modules/zod/src/v4/locales/fi.ts +121 -0
  276. package/node_modules/zod/src/v4/locales/fr-CA.ts +116 -0
  277. package/node_modules/zod/src/v4/locales/fr.ts +132 -0
  278. package/node_modules/zod/src/v4/locales/he.ts +246 -0
  279. package/node_modules/zod/src/v4/locales/hr.ts +131 -0
  280. package/node_modules/zod/src/v4/locales/hu.ts +117 -0
  281. package/node_modules/zod/src/v4/locales/hy.ts +164 -0
  282. package/node_modules/zod/src/v4/locales/id.ts +115 -0
  283. package/node_modules/zod/src/v4/locales/index.ts +52 -0
  284. package/node_modules/zod/src/v4/locales/is.ts +119 -0
  285. package/node_modules/zod/src/v4/locales/it.ts +116 -0
  286. package/node_modules/zod/src/v4/locales/ja.ts +114 -0
  287. package/node_modules/zod/src/v4/locales/ka.ts +123 -0
  288. package/node_modules/zod/src/v4/locales/kh.ts +7 -0
  289. package/node_modules/zod/src/v4/locales/km.ts +119 -0
  290. package/node_modules/zod/src/v4/locales/ko.ts +121 -0
  291. package/node_modules/zod/src/v4/locales/lt.ts +239 -0
  292. package/node_modules/zod/src/v4/locales/mk.ts +118 -0
  293. package/node_modules/zod/src/v4/locales/ms.ts +115 -0
  294. package/node_modules/zod/src/v4/locales/nl.ts +121 -0
  295. package/node_modules/zod/src/v4/locales/no.ts +116 -0
  296. package/node_modules/zod/src/v4/locales/ota.ts +117 -0
  297. package/node_modules/zod/src/v4/locales/pl.ts +118 -0
  298. package/node_modules/zod/src/v4/locales/ps.ts +126 -0
  299. package/node_modules/zod/src/v4/locales/pt.ts +116 -0
  300. package/node_modules/zod/src/v4/locales/ro.ts +129 -0
  301. package/node_modules/zod/src/v4/locales/ru.ts +176 -0
  302. package/node_modules/zod/src/v4/locales/sl.ts +118 -0
  303. package/node_modules/zod/src/v4/locales/sv.ts +119 -0
  304. package/node_modules/zod/src/v4/locales/ta.ts +118 -0
  305. package/node_modules/zod/src/v4/locales/th.ts +119 -0
  306. package/node_modules/zod/src/v4/locales/tr.ts +111 -0
  307. package/node_modules/zod/src/v4/locales/ua.ts +7 -0
  308. package/node_modules/zod/src/v4/locales/uk.ts +117 -0
  309. package/node_modules/zod/src/v4/locales/ur.ts +119 -0
  310. package/node_modules/zod/src/v4/locales/uz.ts +117 -0
  311. package/node_modules/zod/src/v4/locales/vi.ts +117 -0
  312. package/node_modules/zod/src/v4/locales/yo.ts +124 -0
  313. package/node_modules/zod/src/v4/locales/zh-CN.ts +116 -0
  314. package/node_modules/zod/src/v4/locales/zh-TW.ts +115 -0
  315. package/node_modules/zod/src/v4/mini/checks.ts +32 -0
  316. package/node_modules/zod/src/v4/mini/coerce.ts +27 -0
  317. package/node_modules/zod/src/v4/mini/external.ts +41 -0
  318. package/node_modules/zod/src/v4/mini/index.ts +3 -0
  319. package/node_modules/zod/src/v4/mini/iso.ts +66 -0
  320. package/node_modules/zod/src/v4/mini/parse.ts +14 -0
  321. package/node_modules/zod/src/v4/mini/schemas.ts +1947 -0
  322. package/node_modules/zod/src/v4/mini/tests/apply.test.ts +24 -0
  323. package/node_modules/zod/src/v4/mini/tests/assignability.test.ts +129 -0
  324. package/node_modules/zod/src/v4/mini/tests/brand.test.ts +94 -0
  325. package/node_modules/zod/src/v4/mini/tests/checks.test.ts +144 -0
  326. package/node_modules/zod/src/v4/mini/tests/codec.test.ts +548 -0
  327. package/node_modules/zod/src/v4/mini/tests/computed.test.ts +36 -0
  328. package/node_modules/zod/src/v4/mini/tests/error.test.ts +22 -0
  329. package/node_modules/zod/src/v4/mini/tests/functions.test.ts +5 -0
  330. package/node_modules/zod/src/v4/mini/tests/index.test.ts +993 -0
  331. package/node_modules/zod/src/v4/mini/tests/number.test.ts +95 -0
  332. package/node_modules/zod/src/v4/mini/tests/object.test.ts +227 -0
  333. package/node_modules/zod/src/v4/mini/tests/prototypes.test.ts +43 -0
  334. package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +325 -0
  335. package/node_modules/zod/src/v4/mini/tests/standard-schema.test.ts +50 -0
  336. package/node_modules/zod/src/v4/mini/tests/string.test.ts +352 -0
  337. package/node_modules/zod/src/v4-mini/index.ts +3 -0
  338. package/node_modules/zod/v3/ZodError.cjs +138 -0
  339. package/node_modules/zod/v3/ZodError.d.cts +164 -0
  340. package/node_modules/zod/v3/ZodError.d.ts +164 -0
  341. package/node_modules/zod/v3/ZodError.js +133 -0
  342. package/node_modules/zod/v3/errors.cjs +17 -0
  343. package/node_modules/zod/v3/errors.d.cts +5 -0
  344. package/node_modules/zod/v3/errors.d.ts +5 -0
  345. package/node_modules/zod/v3/errors.js +9 -0
  346. package/node_modules/zod/v3/external.cjs +22 -0
  347. package/node_modules/zod/v3/external.d.cts +6 -0
  348. package/node_modules/zod/v3/external.d.ts +6 -0
  349. package/node_modules/zod/v3/external.js +6 -0
  350. package/node_modules/zod/v3/helpers/enumUtil.cjs +2 -0
  351. package/node_modules/zod/v3/helpers/enumUtil.d.cts +8 -0
  352. package/node_modules/zod/v3/helpers/enumUtil.d.ts +8 -0
  353. package/node_modules/zod/v3/helpers/enumUtil.js +1 -0
  354. package/node_modules/zod/v3/helpers/errorUtil.cjs +9 -0
  355. package/node_modules/zod/v3/helpers/errorUtil.d.cts +9 -0
  356. package/node_modules/zod/v3/helpers/errorUtil.d.ts +9 -0
  357. package/node_modules/zod/v3/helpers/errorUtil.js +6 -0
  358. package/node_modules/zod/v3/helpers/parseUtil.cjs +124 -0
  359. package/node_modules/zod/v3/helpers/parseUtil.d.cts +78 -0
  360. package/node_modules/zod/v3/helpers/parseUtil.d.ts +78 -0
  361. package/node_modules/zod/v3/helpers/parseUtil.js +109 -0
  362. package/node_modules/zod/v3/helpers/partialUtil.cjs +2 -0
  363. package/node_modules/zod/v3/helpers/partialUtil.d.cts +8 -0
  364. package/node_modules/zod/v3/helpers/partialUtil.d.ts +8 -0
  365. package/node_modules/zod/v3/helpers/partialUtil.js +1 -0
  366. package/node_modules/zod/v3/helpers/typeAliases.cjs +2 -0
  367. package/node_modules/zod/v3/helpers/typeAliases.d.cts +2 -0
  368. package/node_modules/zod/v3/helpers/typeAliases.d.ts +2 -0
  369. package/node_modules/zod/v3/helpers/typeAliases.js +1 -0
  370. package/node_modules/zod/v3/helpers/util.cjs +137 -0
  371. package/node_modules/zod/v3/helpers/util.d.cts +85 -0
  372. package/node_modules/zod/v3/helpers/util.d.ts +85 -0
  373. package/node_modules/zod/v3/helpers/util.js +133 -0
  374. package/node_modules/zod/v3/index.cjs +33 -0
  375. package/node_modules/zod/v3/index.d.cts +4 -0
  376. package/node_modules/zod/v3/index.d.ts +4 -0
  377. package/node_modules/zod/v3/index.js +4 -0
  378. package/node_modules/zod/v3/locales/en.cjs +112 -0
  379. package/node_modules/zod/v3/locales/en.d.cts +3 -0
  380. package/node_modules/zod/v3/locales/en.d.ts +3 -0
  381. package/node_modules/zod/v3/locales/en.js +109 -0
  382. package/node_modules/zod/v3/package.json +7 -0
  383. package/node_modules/zod/v3/standard-schema.cjs +2 -0
  384. package/node_modules/zod/v3/standard-schema.d.cts +102 -0
  385. package/node_modules/zod/v3/standard-schema.d.ts +102 -0
  386. package/node_modules/zod/v3/standard-schema.js +1 -0
  387. package/node_modules/zod/v3/types.cjs +3777 -0
  388. package/node_modules/zod/v3/types.d.cts +1034 -0
  389. package/node_modules/zod/v3/types.d.ts +1034 -0
  390. package/node_modules/zod/v3/types.js +3695 -0
  391. package/node_modules/zod/v4/classic/checks.cjs +33 -0
  392. package/node_modules/zod/v4/classic/checks.d.cts +1 -0
  393. package/node_modules/zod/v4/classic/checks.d.ts +1 -0
  394. package/node_modules/zod/v4/classic/checks.js +1 -0
  395. package/node_modules/zod/v4/classic/coerce.cjs +47 -0
  396. package/node_modules/zod/v4/classic/coerce.d.cts +17 -0
  397. package/node_modules/zod/v4/classic/coerce.d.ts +17 -0
  398. package/node_modules/zod/v4/classic/coerce.js +17 -0
  399. package/node_modules/zod/v4/classic/compat.cjs +61 -0
  400. package/node_modules/zod/v4/classic/compat.d.cts +50 -0
  401. package/node_modules/zod/v4/classic/compat.d.ts +50 -0
  402. package/node_modules/zod/v4/classic/compat.js +31 -0
  403. package/node_modules/zod/v4/classic/errors.cjs +74 -0
  404. package/node_modules/zod/v4/classic/errors.d.cts +30 -0
  405. package/node_modules/zod/v4/classic/errors.d.ts +30 -0
  406. package/node_modules/zod/v4/classic/errors.js +48 -0
  407. package/node_modules/zod/v4/classic/external.cjs +73 -0
  408. package/node_modules/zod/v4/classic/external.d.cts +16 -0
  409. package/node_modules/zod/v4/classic/external.d.ts +16 -0
  410. package/node_modules/zod/v4/classic/external.js +20 -0
  411. package/node_modules/zod/v4/classic/from-json-schema.cjs +625 -0
  412. package/node_modules/zod/v4/classic/from-json-schema.d.cts +12 -0
  413. package/node_modules/zod/v4/classic/from-json-schema.d.ts +12 -0
  414. package/node_modules/zod/v4/classic/from-json-schema.js +599 -0
  415. package/node_modules/zod/v4/classic/index.cjs +33 -0
  416. package/node_modules/zod/v4/classic/index.d.cts +4 -0
  417. package/node_modules/zod/v4/classic/index.d.ts +4 -0
  418. package/node_modules/zod/v4/classic/index.js +4 -0
  419. package/node_modules/zod/v4/classic/iso.cjs +60 -0
  420. package/node_modules/zod/v4/classic/iso.d.cts +22 -0
  421. package/node_modules/zod/v4/classic/iso.d.ts +22 -0
  422. package/node_modules/zod/v4/classic/iso.js +30 -0
  423. package/node_modules/zod/v4/classic/package.json +7 -0
  424. package/node_modules/zod/v4/classic/parse.cjs +41 -0
  425. package/node_modules/zod/v4/classic/parse.d.cts +31 -0
  426. package/node_modules/zod/v4/classic/parse.d.ts +31 -0
  427. package/node_modules/zod/v4/classic/parse.js +15 -0
  428. package/node_modules/zod/v4/classic/schemas.cjs +1511 -0
  429. package/node_modules/zod/v4/classic/schemas.d.cts +767 -0
  430. package/node_modules/zod/v4/classic/schemas.d.ts +767 -0
  431. package/node_modules/zod/v4/classic/schemas.js +1395 -0
  432. package/node_modules/zod/v4/core/api.cjs +1227 -0
  433. package/node_modules/zod/v4/core/api.d.cts +325 -0
  434. package/node_modules/zod/v4/core/api.d.ts +325 -0
  435. package/node_modules/zod/v4/core/api.js +1087 -0
  436. package/node_modules/zod/v4/core/checks.cjs +601 -0
  437. package/node_modules/zod/v4/core/checks.d.cts +278 -0
  438. package/node_modules/zod/v4/core/checks.d.ts +278 -0
  439. package/node_modules/zod/v4/core/checks.js +575 -0
  440. package/node_modules/zod/v4/core/core.cjs +85 -0
  441. package/node_modules/zod/v4/core/core.d.cts +70 -0
  442. package/node_modules/zod/v4/core/core.d.ts +70 -0
  443. package/node_modules/zod/v4/core/core.js +78 -0
  444. package/node_modules/zod/v4/core/doc.cjs +39 -0
  445. package/node_modules/zod/v4/core/doc.d.cts +14 -0
  446. package/node_modules/zod/v4/core/doc.d.ts +14 -0
  447. package/node_modules/zod/v4/core/doc.js +35 -0
  448. package/node_modules/zod/v4/core/errors.cjs +216 -0
  449. package/node_modules/zod/v4/core/errors.d.cts +221 -0
  450. package/node_modules/zod/v4/core/errors.d.ts +221 -0
  451. package/node_modules/zod/v4/core/errors.js +185 -0
  452. package/node_modules/zod/v4/core/index.cjs +47 -0
  453. package/node_modules/zod/v4/core/index.d.cts +16 -0
  454. package/node_modules/zod/v4/core/index.d.ts +16 -0
  455. package/node_modules/zod/v4/core/index.js +16 -0
  456. package/node_modules/zod/v4/core/json-schema-generator.cjs +99 -0
  457. package/node_modules/zod/v4/core/json-schema-generator.d.cts +65 -0
  458. package/node_modules/zod/v4/core/json-schema-generator.d.ts +65 -0
  459. package/node_modules/zod/v4/core/json-schema-generator.js +95 -0
  460. package/node_modules/zod/v4/core/json-schema-processors.cjs +644 -0
  461. package/node_modules/zod/v4/core/json-schema-processors.d.cts +49 -0
  462. package/node_modules/zod/v4/core/json-schema-processors.d.ts +49 -0
  463. package/node_modules/zod/v4/core/json-schema-processors.js +601 -0
  464. package/node_modules/zod/v4/core/json-schema.cjs +2 -0
  465. package/node_modules/zod/v4/core/json-schema.d.cts +88 -0
  466. package/node_modules/zod/v4/core/json-schema.d.ts +88 -0
  467. package/node_modules/zod/v4/core/json-schema.js +1 -0
  468. package/node_modules/zod/v4/core/package.json +7 -0
  469. package/node_modules/zod/v4/core/parse.cjs +131 -0
  470. package/node_modules/zod/v4/core/parse.d.cts +49 -0
  471. package/node_modules/zod/v4/core/parse.d.ts +49 -0
  472. package/node_modules/zod/v4/core/parse.js +93 -0
  473. package/node_modules/zod/v4/core/regexes.cjs +172 -0
  474. package/node_modules/zod/v4/core/regexes.d.cts +85 -0
  475. package/node_modules/zod/v4/core/regexes.d.ts +85 -0
  476. package/node_modules/zod/v4/core/regexes.js +139 -0
  477. package/node_modules/zod/v4/core/registries.cjs +56 -0
  478. package/node_modules/zod/v4/core/registries.d.cts +35 -0
  479. package/node_modules/zod/v4/core/registries.d.ts +35 -0
  480. package/node_modules/zod/v4/core/registries.js +51 -0
  481. package/node_modules/zod/v4/core/schemas.cjs +2270 -0
  482. package/node_modules/zod/v4/core/schemas.d.cts +1184 -0
  483. package/node_modules/zod/v4/core/schemas.d.ts +1184 -0
  484. package/node_modules/zod/v4/core/schemas.js +2239 -0
  485. package/node_modules/zod/v4/core/standard-schema.cjs +2 -0
  486. package/node_modules/zod/v4/core/standard-schema.d.cts +126 -0
  487. package/node_modules/zod/v4/core/standard-schema.d.ts +126 -0
  488. package/node_modules/zod/v4/core/standard-schema.js +1 -0
  489. package/node_modules/zod/v4/core/to-json-schema.cjs +457 -0
  490. package/node_modules/zod/v4/core/to-json-schema.d.cts +114 -0
  491. package/node_modules/zod/v4/core/to-json-schema.d.ts +114 -0
  492. package/node_modules/zod/v4/core/to-json-schema.js +448 -0
  493. package/node_modules/zod/v4/core/util.cjs +734 -0
  494. package/node_modules/zod/v4/core/util.d.cts +200 -0
  495. package/node_modules/zod/v4/core/util.d.ts +200 -0
  496. package/node_modules/zod/v4/core/util.js +674 -0
  497. package/node_modules/zod/v4/core/versions.cjs +8 -0
  498. package/node_modules/zod/v4/core/versions.d.cts +5 -0
  499. package/node_modules/zod/v4/core/versions.d.ts +5 -0
  500. package/node_modules/zod/v4/core/versions.js +5 -0
  501. package/node_modules/zod/v4/index.cjs +22 -0
  502. package/node_modules/zod/v4/index.d.cts +3 -0
  503. package/node_modules/zod/v4/index.d.ts +3 -0
  504. package/node_modules/zod/v4/index.js +3 -0
  505. package/node_modules/zod/v4/locales/ar.cjs +133 -0
  506. package/node_modules/zod/v4/locales/ar.d.cts +5 -0
  507. package/node_modules/zod/v4/locales/ar.d.ts +4 -0
  508. package/node_modules/zod/v4/locales/ar.js +106 -0
  509. package/node_modules/zod/v4/locales/az.cjs +132 -0
  510. package/node_modules/zod/v4/locales/az.d.cts +5 -0
  511. package/node_modules/zod/v4/locales/az.d.ts +4 -0
  512. package/node_modules/zod/v4/locales/az.js +105 -0
  513. package/node_modules/zod/v4/locales/be.cjs +183 -0
  514. package/node_modules/zod/v4/locales/be.d.cts +5 -0
  515. package/node_modules/zod/v4/locales/be.d.ts +4 -0
  516. package/node_modules/zod/v4/locales/be.js +156 -0
  517. package/node_modules/zod/v4/locales/bg.cjs +147 -0
  518. package/node_modules/zod/v4/locales/bg.d.cts +5 -0
  519. package/node_modules/zod/v4/locales/bg.d.ts +4 -0
  520. package/node_modules/zod/v4/locales/bg.js +120 -0
  521. package/node_modules/zod/v4/locales/ca.cjs +134 -0
  522. package/node_modules/zod/v4/locales/ca.d.cts +5 -0
  523. package/node_modules/zod/v4/locales/ca.d.ts +4 -0
  524. package/node_modules/zod/v4/locales/ca.js +107 -0
  525. package/node_modules/zod/v4/locales/cs.cjs +138 -0
  526. package/node_modules/zod/v4/locales/cs.d.cts +5 -0
  527. package/node_modules/zod/v4/locales/cs.d.ts +4 -0
  528. package/node_modules/zod/v4/locales/cs.js +111 -0
  529. package/node_modules/zod/v4/locales/da.cjs +142 -0
  530. package/node_modules/zod/v4/locales/da.d.cts +5 -0
  531. package/node_modules/zod/v4/locales/da.d.ts +4 -0
  532. package/node_modules/zod/v4/locales/da.js +115 -0
  533. package/node_modules/zod/v4/locales/de.cjs +135 -0
  534. package/node_modules/zod/v4/locales/de.d.cts +5 -0
  535. package/node_modules/zod/v4/locales/de.d.ts +4 -0
  536. package/node_modules/zod/v4/locales/de.js +108 -0
  537. package/node_modules/zod/v4/locales/el.cjs +136 -0
  538. package/node_modules/zod/v4/locales/el.d.cts +5 -0
  539. package/node_modules/zod/v4/locales/el.d.ts +4 -0
  540. package/node_modules/zod/v4/locales/el.js +109 -0
  541. package/node_modules/zod/v4/locales/en.cjs +140 -0
  542. package/node_modules/zod/v4/locales/en.d.cts +5 -0
  543. package/node_modules/zod/v4/locales/en.d.ts +4 -0
  544. package/node_modules/zod/v4/locales/en.js +113 -0
  545. package/node_modules/zod/v4/locales/eo.cjs +136 -0
  546. package/node_modules/zod/v4/locales/eo.d.cts +5 -0
  547. package/node_modules/zod/v4/locales/eo.d.ts +4 -0
  548. package/node_modules/zod/v4/locales/eo.js +109 -0
  549. package/node_modules/zod/v4/locales/es.cjs +159 -0
  550. package/node_modules/zod/v4/locales/es.d.cts +5 -0
  551. package/node_modules/zod/v4/locales/es.d.ts +4 -0
  552. package/node_modules/zod/v4/locales/es.js +132 -0
  553. package/node_modules/zod/v4/locales/fa.cjs +141 -0
  554. package/node_modules/zod/v4/locales/fa.d.cts +5 -0
  555. package/node_modules/zod/v4/locales/fa.d.ts +4 -0
  556. package/node_modules/zod/v4/locales/fa.js +114 -0
  557. package/node_modules/zod/v4/locales/fi.cjs +139 -0
  558. package/node_modules/zod/v4/locales/fi.d.cts +5 -0
  559. package/node_modules/zod/v4/locales/fi.d.ts +4 -0
  560. package/node_modules/zod/v4/locales/fi.js +112 -0
  561. package/node_modules/zod/v4/locales/fr-CA.cjs +134 -0
  562. package/node_modules/zod/v4/locales/fr-CA.d.cts +5 -0
  563. package/node_modules/zod/v4/locales/fr-CA.d.ts +4 -0
  564. package/node_modules/zod/v4/locales/fr-CA.js +107 -0
  565. package/node_modules/zod/v4/locales/fr.cjs +152 -0
  566. package/node_modules/zod/v4/locales/fr.d.cts +5 -0
  567. package/node_modules/zod/v4/locales/fr.d.ts +4 -0
  568. package/node_modules/zod/v4/locales/fr.js +125 -0
  569. package/node_modules/zod/v4/locales/he.cjs +241 -0
  570. package/node_modules/zod/v4/locales/he.d.cts +5 -0
  571. package/node_modules/zod/v4/locales/he.d.ts +4 -0
  572. package/node_modules/zod/v4/locales/he.js +214 -0
  573. package/node_modules/zod/v4/locales/hr.cjs +149 -0
  574. package/node_modules/zod/v4/locales/hr.d.cts +5 -0
  575. package/node_modules/zod/v4/locales/hr.d.ts +4 -0
  576. package/node_modules/zod/v4/locales/hr.js +122 -0
  577. package/node_modules/zod/v4/locales/hu.cjs +135 -0
  578. package/node_modules/zod/v4/locales/hu.d.cts +5 -0
  579. package/node_modules/zod/v4/locales/hu.d.ts +4 -0
  580. package/node_modules/zod/v4/locales/hu.js +108 -0
  581. package/node_modules/zod/v4/locales/hy.cjs +174 -0
  582. package/node_modules/zod/v4/locales/hy.d.cts +5 -0
  583. package/node_modules/zod/v4/locales/hy.d.ts +4 -0
  584. package/node_modules/zod/v4/locales/hy.js +147 -0
  585. package/node_modules/zod/v4/locales/id.cjs +133 -0
  586. package/node_modules/zod/v4/locales/id.d.cts +5 -0
  587. package/node_modules/zod/v4/locales/id.d.ts +4 -0
  588. package/node_modules/zod/v4/locales/id.js +106 -0
  589. package/node_modules/zod/v4/locales/index.cjs +111 -0
  590. package/node_modules/zod/v4/locales/index.d.cts +52 -0
  591. package/node_modules/zod/v4/locales/index.d.ts +52 -0
  592. package/node_modules/zod/v4/locales/index.js +52 -0
  593. package/node_modules/zod/v4/locales/is.cjs +136 -0
  594. package/node_modules/zod/v4/locales/is.d.cts +5 -0
  595. package/node_modules/zod/v4/locales/is.d.ts +4 -0
  596. package/node_modules/zod/v4/locales/is.js +109 -0
  597. package/node_modules/zod/v4/locales/it.cjs +135 -0
  598. package/node_modules/zod/v4/locales/it.d.cts +5 -0
  599. package/node_modules/zod/v4/locales/it.d.ts +4 -0
  600. package/node_modules/zod/v4/locales/it.js +108 -0
  601. package/node_modules/zod/v4/locales/ja.cjs +134 -0
  602. package/node_modules/zod/v4/locales/ja.d.cts +5 -0
  603. package/node_modules/zod/v4/locales/ja.d.ts +4 -0
  604. package/node_modules/zod/v4/locales/ja.js +107 -0
  605. package/node_modules/zod/v4/locales/ka.cjs +139 -0
  606. package/node_modules/zod/v4/locales/ka.d.cts +5 -0
  607. package/node_modules/zod/v4/locales/ka.d.ts +4 -0
  608. package/node_modules/zod/v4/locales/ka.js +112 -0
  609. package/node_modules/zod/v4/locales/kh.cjs +12 -0
  610. package/node_modules/zod/v4/locales/kh.d.cts +5 -0
  611. package/node_modules/zod/v4/locales/kh.d.ts +5 -0
  612. package/node_modules/zod/v4/locales/kh.js +5 -0
  613. package/node_modules/zod/v4/locales/km.cjs +137 -0
  614. package/node_modules/zod/v4/locales/km.d.cts +5 -0
  615. package/node_modules/zod/v4/locales/km.d.ts +4 -0
  616. package/node_modules/zod/v4/locales/km.js +110 -0
  617. package/node_modules/zod/v4/locales/ko.cjs +138 -0
  618. package/node_modules/zod/v4/locales/ko.d.cts +5 -0
  619. package/node_modules/zod/v4/locales/ko.d.ts +4 -0
  620. package/node_modules/zod/v4/locales/ko.js +111 -0
  621. package/node_modules/zod/v4/locales/lt.cjs +230 -0
  622. package/node_modules/zod/v4/locales/lt.d.cts +5 -0
  623. package/node_modules/zod/v4/locales/lt.d.ts +4 -0
  624. package/node_modules/zod/v4/locales/lt.js +203 -0
  625. package/node_modules/zod/v4/locales/mk.cjs +136 -0
  626. package/node_modules/zod/v4/locales/mk.d.cts +5 -0
  627. package/node_modules/zod/v4/locales/mk.d.ts +4 -0
  628. package/node_modules/zod/v4/locales/mk.js +109 -0
  629. package/node_modules/zod/v4/locales/ms.cjs +134 -0
  630. package/node_modules/zod/v4/locales/ms.d.cts +5 -0
  631. package/node_modules/zod/v4/locales/ms.d.ts +4 -0
  632. package/node_modules/zod/v4/locales/ms.js +107 -0
  633. package/node_modules/zod/v4/locales/nl.cjs +137 -0
  634. package/node_modules/zod/v4/locales/nl.d.cts +5 -0
  635. package/node_modules/zod/v4/locales/nl.d.ts +4 -0
  636. package/node_modules/zod/v4/locales/nl.js +110 -0
  637. package/node_modules/zod/v4/locales/no.cjs +135 -0
  638. package/node_modules/zod/v4/locales/no.d.cts +5 -0
  639. package/node_modules/zod/v4/locales/no.d.ts +4 -0
  640. package/node_modules/zod/v4/locales/no.js +108 -0
  641. package/node_modules/zod/v4/locales/ota.cjs +136 -0
  642. package/node_modules/zod/v4/locales/ota.d.cts +5 -0
  643. package/node_modules/zod/v4/locales/ota.d.ts +4 -0
  644. package/node_modules/zod/v4/locales/ota.js +109 -0
  645. package/node_modules/zod/v4/locales/package.json +7 -0
  646. package/node_modules/zod/v4/locales/pl.cjs +136 -0
  647. package/node_modules/zod/v4/locales/pl.d.cts +5 -0
  648. package/node_modules/zod/v4/locales/pl.d.ts +4 -0
  649. package/node_modules/zod/v4/locales/pl.js +109 -0
  650. package/node_modules/zod/v4/locales/ps.cjs +141 -0
  651. package/node_modules/zod/v4/locales/ps.d.cts +5 -0
  652. package/node_modules/zod/v4/locales/ps.d.ts +4 -0
  653. package/node_modules/zod/v4/locales/ps.js +114 -0
  654. package/node_modules/zod/v4/locales/pt.cjs +135 -0
  655. package/node_modules/zod/v4/locales/pt.d.cts +5 -0
  656. package/node_modules/zod/v4/locales/pt.d.ts +4 -0
  657. package/node_modules/zod/v4/locales/pt.js +108 -0
  658. package/node_modules/zod/v4/locales/ro.cjs +146 -0
  659. package/node_modules/zod/v4/locales/ro.d.cts +5 -0
  660. package/node_modules/zod/v4/locales/ro.d.ts +4 -0
  661. package/node_modules/zod/v4/locales/ro.js +119 -0
  662. package/node_modules/zod/v4/locales/ru.cjs +183 -0
  663. package/node_modules/zod/v4/locales/ru.d.cts +5 -0
  664. package/node_modules/zod/v4/locales/ru.d.ts +4 -0
  665. package/node_modules/zod/v4/locales/ru.js +156 -0
  666. package/node_modules/zod/v4/locales/sl.cjs +136 -0
  667. package/node_modules/zod/v4/locales/sl.d.cts +5 -0
  668. package/node_modules/zod/v4/locales/sl.d.ts +4 -0
  669. package/node_modules/zod/v4/locales/sl.js +109 -0
  670. package/node_modules/zod/v4/locales/sv.cjs +137 -0
  671. package/node_modules/zod/v4/locales/sv.d.cts +5 -0
  672. package/node_modules/zod/v4/locales/sv.d.ts +4 -0
  673. package/node_modules/zod/v4/locales/sv.js +110 -0
  674. package/node_modules/zod/v4/locales/ta.cjs +137 -0
  675. package/node_modules/zod/v4/locales/ta.d.cts +5 -0
  676. package/node_modules/zod/v4/locales/ta.d.ts +4 -0
  677. package/node_modules/zod/v4/locales/ta.js +110 -0
  678. package/node_modules/zod/v4/locales/th.cjs +137 -0
  679. package/node_modules/zod/v4/locales/th.d.cts +5 -0
  680. package/node_modules/zod/v4/locales/th.d.ts +4 -0
  681. package/node_modules/zod/v4/locales/th.js +110 -0
  682. package/node_modules/zod/v4/locales/tr.cjs +132 -0
  683. package/node_modules/zod/v4/locales/tr.d.cts +5 -0
  684. package/node_modules/zod/v4/locales/tr.d.ts +4 -0
  685. package/node_modules/zod/v4/locales/tr.js +105 -0
  686. package/node_modules/zod/v4/locales/ua.cjs +12 -0
  687. package/node_modules/zod/v4/locales/ua.d.cts +5 -0
  688. package/node_modules/zod/v4/locales/ua.d.ts +5 -0
  689. package/node_modules/zod/v4/locales/ua.js +5 -0
  690. package/node_modules/zod/v4/locales/uk.cjs +135 -0
  691. package/node_modules/zod/v4/locales/uk.d.cts +5 -0
  692. package/node_modules/zod/v4/locales/uk.d.ts +4 -0
  693. package/node_modules/zod/v4/locales/uk.js +108 -0
  694. package/node_modules/zod/v4/locales/ur.cjs +137 -0
  695. package/node_modules/zod/v4/locales/ur.d.cts +5 -0
  696. package/node_modules/zod/v4/locales/ur.d.ts +4 -0
  697. package/node_modules/zod/v4/locales/ur.js +110 -0
  698. package/node_modules/zod/v4/locales/uz.cjs +137 -0
  699. package/node_modules/zod/v4/locales/uz.d.cts +5 -0
  700. package/node_modules/zod/v4/locales/uz.d.ts +4 -0
  701. package/node_modules/zod/v4/locales/uz.js +110 -0
  702. package/node_modules/zod/v4/locales/vi.cjs +135 -0
  703. package/node_modules/zod/v4/locales/vi.d.cts +5 -0
  704. package/node_modules/zod/v4/locales/vi.d.ts +4 -0
  705. package/node_modules/zod/v4/locales/vi.js +108 -0
  706. package/node_modules/zod/v4/locales/yo.cjs +134 -0
  707. package/node_modules/zod/v4/locales/yo.d.cts +5 -0
  708. package/node_modules/zod/v4/locales/yo.d.ts +4 -0
  709. package/node_modules/zod/v4/locales/yo.js +107 -0
  710. package/node_modules/zod/v4/locales/zh-CN.cjs +136 -0
  711. package/node_modules/zod/v4/locales/zh-CN.d.cts +5 -0
  712. package/node_modules/zod/v4/locales/zh-CN.d.ts +4 -0
  713. package/node_modules/zod/v4/locales/zh-CN.js +109 -0
  714. package/node_modules/zod/v4/locales/zh-TW.cjs +134 -0
  715. package/node_modules/zod/v4/locales/zh-TW.d.cts +5 -0
  716. package/node_modules/zod/v4/locales/zh-TW.d.ts +4 -0
  717. package/node_modules/zod/v4/locales/zh-TW.js +107 -0
  718. package/node_modules/zod/v4/mini/checks.cjs +34 -0
  719. package/node_modules/zod/v4/mini/checks.d.cts +1 -0
  720. package/node_modules/zod/v4/mini/checks.d.ts +1 -0
  721. package/node_modules/zod/v4/mini/checks.js +1 -0
  722. package/node_modules/zod/v4/mini/coerce.cjs +52 -0
  723. package/node_modules/zod/v4/mini/coerce.d.cts +7 -0
  724. package/node_modules/zod/v4/mini/coerce.d.ts +7 -0
  725. package/node_modules/zod/v4/mini/coerce.js +22 -0
  726. package/node_modules/zod/v4/mini/external.cjs +63 -0
  727. package/node_modules/zod/v4/mini/external.d.cts +13 -0
  728. package/node_modules/zod/v4/mini/external.d.ts +13 -0
  729. package/node_modules/zod/v4/mini/external.js +14 -0
  730. package/node_modules/zod/v4/mini/index.cjs +32 -0
  731. package/node_modules/zod/v4/mini/index.d.cts +3 -0
  732. package/node_modules/zod/v4/mini/index.d.ts +3 -0
  733. package/node_modules/zod/v4/mini/index.js +3 -0
  734. package/node_modules/zod/v4/mini/iso.cjs +64 -0
  735. package/node_modules/zod/v4/mini/iso.d.cts +22 -0
  736. package/node_modules/zod/v4/mini/iso.d.ts +22 -0
  737. package/node_modules/zod/v4/mini/iso.js +34 -0
  738. package/node_modules/zod/v4/mini/package.json +7 -0
  739. package/node_modules/zod/v4/mini/parse.cjs +16 -0
  740. package/node_modules/zod/v4/mini/parse.d.cts +1 -0
  741. package/node_modules/zod/v4/mini/parse.d.ts +1 -0
  742. package/node_modules/zod/v4/mini/parse.js +1 -0
  743. package/node_modules/zod/v4/mini/schemas.cjs +1083 -0
  744. package/node_modules/zod/v4/mini/schemas.d.cts +445 -0
  745. package/node_modules/zod/v4/mini/schemas.d.ts +445 -0
  746. package/node_modules/zod/v4/mini/schemas.js +961 -0
  747. package/node_modules/zod/v4/package.json +7 -0
  748. package/node_modules/zod/v4-mini/index.cjs +32 -0
  749. package/node_modules/zod/v4-mini/index.d.cts +3 -0
  750. package/node_modules/zod/v4-mini/index.d.ts +3 -0
  751. package/node_modules/zod/v4-mini/index.js +3 -0
  752. package/node_modules/zod/v4-mini/package.json +7 -0
  753. package/npm-shrinkwrap.json +16 -6
  754. package/openclaw.plugin.json +518 -384
  755. package/package.json +70 -20
  756. package/dist/accounts-Bz4HtP0g.js +0 -59
  757. package/dist/channel.runtime-BbDh5UIr.js +0 -66
  758. package/dist/config-api-DIg1lInT.js +0 -3
  759. package/dist/config-schema-CfVNH0DB.js +0 -25
@@ -1,18 +1,21 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
2
- import { a as resolveSignalReplyToMode, i as resolveSignalAccount } from "./accounts-Bz4HtP0g.js";
3
- import { a as normalizeSignalAllowRecipient, c as resolveSignalSender, d as normalizeSignalMessagingTarget, i as isSignalSenderAllowed, l as looksLikeUuid, n as formatSignalSenderDisplay, o as resolveSignalPeerId, r as formatSignalSenderId, s as resolveSignalRecipient, t as formatSignalPairingIdLine } from "./identity-BF8taj7g.js";
4
- import { a as resolveSignalReactionLevel, c as isSignalNativeApprovalHandlerConfigured, r as materializeSignalPresentationFallback, t as registerSignalReplyContext } from "./reply-authors-osU_SY4J.js";
5
- import { n as signalRpcRequest, r as streamSignalEvents, t as signalCheck } from "./client-adapter-aEM0kGhC.js";
6
- import { n as sendReactionSignal, t as removeReactionSignal } from "./reaction-runtime-api-DifyinAU.js";
7
- import { a as maybeResolveSignalApprovalReaction, l as resolveSignalApprovalConversationKey, s as registerSignalApprovalReactionTargetForDeliveredPayload, t as addSignalApprovalReactionHintToStructuredPayload } from "./approval-reactions-ChcS2rQN.js";
8
- import { n as sendReadReceiptSignal, r as sendTypingSignal, t as sendMessageSignal } from "./send-BWtA6h3J.js";
9
- import { createChannelMessageReplyPipeline, resolveChannelStreamingBlockEnabled } from "openclaw/plugin-sdk/channel-outbound";
2
+ import { i as resolveSignalAccount, o as resolveSignalReplyToMode } from "./accounts-DrStJjiK.js";
3
+ import { a as normalizeSignalAllowRecipient, c as resolveSignalSender, d as normalizeSignalMessagingTarget, i as isSignalSenderAllowed, l as looksLikeUuid, n as formatSignalSenderDisplay, o as resolveSignalPeerId, r as formatSignalSenderId, s as resolveSignalRecipient, t as formatSignalPairingIdLine } from "./identity-BQ4OzXXk.js";
4
+ import { t as getOptionalSignalRuntime } from "./runtime-JPrGlV7h.js";
5
+ import { i as materializeSignalPresentationFallback, n as registerSignalReplyContext, o as resolveSignalReactionLevel, s as formatSignalMediaText, u as isSignalNativeApprovalHandlerConfigured } from "./transport-detection-CiZWiMYa.js";
6
+ import { n as signalRpcRequest, r as streamSignalEvents, t as signalCheck } from "./client-adapter-Bm0ZRqJn.js";
7
+ import { n as sendReactionSignal } from "./reaction-runtime-api-Bka61qO9.js";
8
+ import { a as maybeResolveSignalApprovalReaction, l as resolveSignalApprovalConversationKey, s as registerSignalApprovalReactionTargetForDeliveredPayload, t as addSignalApprovalReactionHintToStructuredPayload } from "./approval-reactions-5uyOazxW.js";
9
+ import { r as registerSignalQuestionReactionTargetForDeliveredPayload, t as maybeResolveSignalQuestionReaction } from "./question-reactions-DJ1xQzVF.js";
10
+ import { n as sendReadReceiptSignal, r as sendTypingSignal, t as sendMessageSignal } from "./send-BZAqAa8p.js";
11
+ import { bindIngressLifecycleToReplyOptions, createChannelIngressMonitor, createChannelMessageReplyPipeline, resolveChannelStreamingBlockEnabled } from "openclaw/plugin-sdk/channel-outbound";
10
12
  import { createChannelPairingChallengeIssuer } from "openclaw/plugin-sdk/channel-pairing";
11
13
  import { detectMime, estimateBase64DecodedBytes, kindFromMime, saveMediaBuffer } from "openclaw/plugin-sdk/media-runtime";
12
14
  import { resolveAgentRoute, resolveInboundLastRouteSessionKey } from "openclaw/plugin-sdk/routing";
13
15
  import { normalizeOptionalString, normalizeStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
14
16
  import { CHANNEL_APPROVAL_NATIVE_RUNTIME_CONTEXT_CAPABILITY } from "openclaw/plugin-sdk/approval-handler-adapter-runtime";
15
17
  import { normalizeE164, truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
18
+ import { buildChannelInboundEventContext, buildMentionRegexes, createChannelInboundDebouncer, filterChannelInboundQuoteContext, formatInboundEnvelope, formatInboundFromLabel, formatInboundMediaUnavailableText, hasVisibleInboundReplyDispatch, logInboundDrop, matchesMentionPatterns, resolveEnvelopeFormatOptions, resolveInboundMentionDecision, resolveInboundSupplementalSenderAllowed, runChannelInboundEvent, shouldDebounceTextInbound, toHistoryMediaEntries, toInboundMediaFacts } from "openclaw/plugin-sdk/channel-inbound";
16
19
  import nodePath from "node:path";
17
20
  import { resolvePinnedMainDmOwnerFromAllowlist } from "openclaw/plugin-sdk/security-runtime";
18
21
  import { collectErrorGraphCandidates, formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
@@ -20,9 +23,9 @@ import { resolveChannelGroupPolicy, resolveChannelGroupRequireMention } from "op
20
23
  import { registerChannelRuntimeContext } from "openclaw/plugin-sdk/channel-runtime-context";
21
24
  import { DEFAULT_GROUP_HISTORY_LIMIT, createChannelHistoryWindow } from "openclaw/plugin-sdk/reply-history";
22
25
  import { deliverTextOrMediaReply, resolveSendableOutboundReplyParts } from "openclaw/plugin-sdk/reply-payload";
23
- import { chunkTextWithMode, createReplyDispatcherWithTyping, createReplyReferencePlanner, dispatchInboundMessage, resolveChunkMode, resolveTextChunkLimit, settleReplyDispatcher } from "openclaw/plugin-sdk/reply-runtime";
26
+ import { chunkTextWithMode, createReplyReferencePlanner, resolveChunkMode, resolveTextChunkLimit } from "openclaw/plugin-sdk/reply-runtime";
24
27
  import { getRuntimeConfig } from "openclaw/plugin-sdk/runtime-config-snapshot";
25
- import { computeBackoff, createNonExitingRuntime, danger, logVerbose, shouldLogVerbose, sleep, sleepWithAbort } from "openclaw/plugin-sdk/runtime-env";
28
+ import { computeBackoff, createNonExitingRuntime, danger, logVerbose, shouldLogVerbose, sleepWithAbort } from "openclaw/plugin-sdk/runtime-env";
26
29
  import { resolveAllowlistProviderRuntimeGroupPolicy, resolveDefaultGroupPolicy, warnMissingProviderGroupPolicyFallbackOnce } from "openclaw/plugin-sdk/runtime-group-policy";
27
30
  import { waitForTransportReady } from "openclaw/plugin-sdk/transport-ready-runtime";
28
31
  import { spawn } from "node:child_process";
@@ -31,14 +34,13 @@ import { createInterface } from "node:readline";
31
34
  import { setTimeout as setTimeout$1 } from "node:timers/promises";
32
35
  import { resolveHumanDelayConfig } from "openclaw/plugin-sdk/agent-runtime";
33
36
  import { DEFAULT_EMOJIS, DEFAULT_TIMING, createStatusReactionController, logAckFailure, logTypingFailure, resolveAckReaction, shouldAckReaction } from "openclaw/plugin-sdk/channel-feedback";
34
- import { buildChannelInboundEventContext, buildMentionRegexes, createChannelInboundDebouncer, filterChannelInboundQuoteContext, formatInboundEnvelope, formatInboundFromLabel, formatInboundMediaUnavailableText, hasVisibleInboundReplyDispatch, logInboundDrop, matchesMentionPatterns, resolveEnvelopeFormatOptions, resolveInboundMentionDecision, runChannelInboundEvent, shouldDebounceTextInbound } from "openclaw/plugin-sdk/channel-inbound";
35
37
  import { isControlCommandMessage } from "openclaw/plugin-sdk/command-detection";
36
- import { recordInboundSession, upsertChannelPairingRequest } from "openclaw/plugin-sdk/conversation-runtime";
37
38
  import { createInternalHookEvent, fireAndForgetHook, toInternalMessageReceivedContext, triggerInternalHook } from "openclaw/plugin-sdk/hook-runtime";
38
39
  import { resolveBatchedReplyThreadingPolicy } from "openclaw/plugin-sdk/reply-reference";
39
40
  import { readSessionUpdatedAt, resolveStorePath } from "openclaw/plugin-sdk/session-store-runtime";
40
41
  import { enqueueSystemEvent } from "openclaw/plugin-sdk/system-event-runtime";
41
42
  import { createChannelIngressResolver, defineStableChannelIngressIdentity } from "openclaw/plugin-sdk/channel-ingress-runtime";
43
+ import { upsertChannelPairingRequest } from "openclaw/plugin-sdk/conversation-runtime";
42
44
  import { listChatCommands, maybeResolveTextAlias, normalizeCommandBody } from "openclaw/plugin-sdk/command-auth-native";
43
45
  import { isAbortRequestText } from "openclaw/plugin-sdk/command-primitives-runtime";
44
46
  import { resolveChannelContextVisibilityMode } from "openclaw/plugin-sdk/context-visibility-runtime";
@@ -412,7 +414,12 @@ function resolveSignalQuoteContext(params) {
412
414
  sourceNumber: params.dataMessage?.quote?.author ?? null,
413
415
  sourceUuid: params.dataMessage?.quote?.authorUuid ?? null
414
416
  });
415
- const quoteSenderAllowed = !params.isGroup || params.effectiveGroupAllow.length === 0 ? true : quoteSender ? isSignalSenderAllowed(quoteSender, params.effectiveGroupAllow) : false;
417
+ const quoteSenderAllowed = resolveInboundSupplementalSenderAllowed({
418
+ isGroup: params.isGroup,
419
+ groupPolicy: params.effectiveGroupAllow.length === 0 ? "open" : "allowlist",
420
+ allowFrom: params.effectiveGroupAllow,
421
+ isSenderAllowed: (allowFrom) => quoteSender ? isSignalSenderAllowed(quoteSender, allowFrom) : false
422
+ });
416
423
  const visibleQuote = filterChannelInboundQuoteContext(contextVisibilityMode, {
417
424
  body: quoteText,
418
425
  sender: quoteSender ? formatSignalSenderDisplay(quoteSender) : void 0,
@@ -507,18 +514,6 @@ const RETRYABLE_FLUSH_RETRY_DELAYS_MS = [
507
514
  function isSignalReplySessionInitConflictError(error) {
508
515
  return collectErrorGraphCandidates(error, (current) => [current.cause, current.error]).some((candidate) => REPLY_SESSION_INIT_CONFLICT_MESSAGE_RE.test(formatErrorMessage(candidate)));
509
516
  }
510
- function formatAttachmentKindCount(kind, count) {
511
- if (kind === "attachment") return `${count} file${count > 1 ? "s" : ""}`;
512
- return `${count} ${kind}${count > 1 ? "s" : ""}`;
513
- }
514
- function formatAttachmentSummaryPlaceholder(contentTypes) {
515
- const kindCounts = /* @__PURE__ */ new Map();
516
- for (const contentType of contentTypes) {
517
- const kind = kindFromMime(contentType) ?? "attachment";
518
- kindCounts.set(kind, (kindCounts.get(kind) ?? 0) + 1);
519
- }
520
- return `[${[...kindCounts.entries()].map(([kind, count]) => formatAttachmentKindCount(kind, count)).join(" + ")} attached]`;
521
- }
522
517
  function resolveSignalInboundRoute(params) {
523
518
  return resolveAgentRoute({
524
519
  cfg: params.cfg,
@@ -547,26 +542,12 @@ function resolveSignalStatusReactionEmojis(emojis) {
547
542
  };
548
543
  }
549
544
  async function finalizeSignalStatusReaction(params) {
550
- if (params.outcome === "done") {
551
- await params.controller.setDone();
552
- if (params.removeAckAfterReply) {
553
- await sleep(params.timing.doneHoldMs);
554
- await params.controller.clear();
555
- } else await params.controller.restoreInitial();
556
- return;
557
- }
558
- await params.controller.setError();
559
- if (params.hasFinalResponse) {
560
- if (params.removeAckAfterReply) {
561
- await sleep(params.timing.errorHoldMs);
562
- await params.controller.clear();
563
- } else await params.controller.restoreInitial();
564
- return;
565
- }
566
- if (params.removeAckAfterReply) await sleep(params.timing.errorHoldMs);
545
+ if (params.outcome === "done") await params.controller.setDone();
546
+ else await params.controller.setError();
567
547
  await params.controller.restoreInitial();
568
548
  }
569
549
  function createSignalEventHandler(deps) {
550
+ const statusReactionTiming = deps.statusReactionTiming ?? DEFAULT_TIMING;
570
551
  const activeEnqueueEntries = /* @__PURE__ */ new WeakSet();
571
552
  async function handleSignalInboundMessage(entry) {
572
553
  const fromLabel = formatInboundFromLabel({
@@ -613,7 +594,7 @@ function createSignalEventHandler(deps) {
613
594
  channel: "Signal",
614
595
  from: fromLabel,
615
596
  timestamp: historyEntry.timestamp,
616
- body: `${historyEntry.body}${historyEntry.messageId ? ` [id:${historyEntry.messageId}]` : ""}`,
597
+ body: `${[historyEntry.body, formatSignalMediaText(historyEntry.media ?? [])].filter(Boolean).join("\n")}${historyEntry.messageId ? ` [id:${historyEntry.messageId}]` : ""}`,
617
598
  chatType: "group",
618
599
  senderLabel: historyEntry.sender,
619
600
  envelope: envelopeOptions
@@ -631,15 +612,7 @@ function createSignalEventHandler(deps) {
631
612
  chatType: entry.isGroup ? "group" : "direct"
632
613
  });
633
614
  const replyThreading = resolveBatchedReplyThreadingPolicy(replyToMode, entry.isBatched === true);
634
- const media = entry.mediaPaths && entry.mediaPaths.length > 0 ? entry.mediaPaths.map((path, index) => ({
635
- path,
636
- url: path,
637
- contentType: entry.mediaTypes?.[index]
638
- })) : entry.mediaPath ? [{
639
- path: entry.mediaPath,
640
- url: entry.mediaPath,
641
- contentType: entry.mediaType
642
- }] : void 0;
615
+ const media = toInboundMediaFacts(entry.media);
643
616
  const ctxPayload = buildChannelInboundEventContext({
644
617
  channel: "signal",
645
618
  supplemental: { quote: entry.replyToBody ? {
@@ -661,6 +634,7 @@ function createSignalEventHandler(deps) {
661
634
  },
662
635
  route: {
663
636
  agentId: route.agentId,
637
+ dmScope: route.dmScope,
664
638
  accountId: route.accountId,
665
639
  routeSessionKey: route.sessionKey
666
640
  },
@@ -675,6 +649,7 @@ function createSignalEventHandler(deps) {
675
649
  rawBody: entry.commandBody,
676
650
  commandBody: entry.commandBody
677
651
  },
652
+ sessionTranscript: { historyLimit: entry.isGroup ? deps.historyLimit : 0 },
678
653
  access: {
679
654
  ...entry.isGroup ? { mentions: {
680
655
  canDetectMention: true,
@@ -723,23 +698,14 @@ function createSignalEventHandler(deps) {
723
698
  } : {}
724
699
  };
725
700
  const statusReactionRecipient = entry.isGroup ? "" : entry.senderRecipient;
726
- let currentStatusReactionEmoji = ackReaction;
727
701
  const statusReactionController = statusReactionsConfig?.enabled === true && signalReactionLevel.level !== "off" && shouldSendStatusReaction && statusReactionTimestamp ? createStatusReactionController({
728
702
  enabled: true,
729
- adapter: {
730
- setReaction: async (emoji) => {
731
- await sendReactionSignal(statusReactionRecipient, statusReactionTimestamp, emoji, signalReactionOpts);
732
- currentStatusReactionEmoji = emoji;
733
- },
734
- clearReaction: async () => {
735
- if (!currentStatusReactionEmoji) return;
736
- await removeReactionSignal(statusReactionRecipient, statusReactionTimestamp, currentStatusReactionEmoji, signalReactionOpts);
737
- currentStatusReactionEmoji = "";
738
- }
739
- },
703
+ adapter: { setReaction: async (emoji) => {
704
+ await sendReactionSignal(statusReactionRecipient, statusReactionTimestamp, emoji, signalReactionOpts);
705
+ } },
740
706
  initialEmoji: ackReaction,
741
- emojis: resolveSignalStatusReactionEmojis(statusReactionsConfig.emojis),
742
- timing: statusReactionsConfig.timing,
707
+ emojis: resolveSignalStatusReactionEmojis(void 0),
708
+ timing: statusReactionTiming,
743
709
  onError: (err) => {
744
710
  logAckFailure({
745
711
  log: logVerbose,
@@ -749,10 +715,6 @@ function createSignalEventHandler(deps) {
749
715
  });
750
716
  }
751
717
  }) : null;
752
- const statusReactionTiming = {
753
- ...DEFAULT_TIMING,
754
- ...statusReactionsConfig?.timing
755
- };
756
718
  if (statusReactionController) statusReactionController.setQueued();
757
719
  const { onModelSelected, typingCallbacks, ...replyPipeline } = createChannelMessageReplyPipeline({
758
720
  cfg: deps.cfg,
@@ -786,10 +748,12 @@ function createSignalEventHandler(deps) {
786
748
  allowImplicitCurrentMessage: replyToMode !== "off" && replyThreading?.implicitCurrentMessage !== "deny",
787
749
  state: { hasReplied: false }
788
750
  };
789
- const { dispatcher, replyOptions, markDispatchIdle } = createReplyDispatcherWithTyping({
751
+ const dispatcherOptions = {
790
752
  ...replyPipeline,
791
753
  humanDelay: resolveHumanDelayConfig(deps.cfg, route.agentId),
792
- typingCallbacks,
754
+ typingCallbacks
755
+ };
756
+ const delivery = {
793
757
  deliver: async (payload, _info) => {
794
758
  await deps.deliverReplies({
795
759
  cfg: deps.cfg,
@@ -809,7 +773,7 @@ function createSignalEventHandler(deps) {
809
773
  onError: (err, info) => {
810
774
  deps.runtime.error?.(danger(`signal ${info.kind} reply failed: ${String(err)}`));
811
775
  }
812
- });
776
+ };
813
777
  const inboundLastRouteSessionKey = resolveInboundLastRouteSessionKey({
814
778
  route,
815
779
  sessionKey: route.sessionKey
@@ -826,12 +790,14 @@ function createSignalEventHandler(deps) {
826
790
  raw: entry
827
791
  }),
828
792
  resolveTurn: () => ({
793
+ cfg: deps.cfg,
829
794
  channel: "signal",
830
795
  accountId: route.accountId,
831
- routeSessionKey: route.sessionKey,
832
- storePath,
796
+ route: {
797
+ agentId: route.agentId,
798
+ sessionKey: route.sessionKey
799
+ },
833
800
  ctxPayload,
834
- recordInboundSession,
835
801
  record: {
836
802
  updateLastRoute: !entry.isGroup ? {
837
803
  sessionKey: inboundLastRouteSessionKey,
@@ -865,41 +831,31 @@ function createSignalEventHandler(deps) {
865
831
  historyMap: deps.groupHistories,
866
832
  limit: deps.historyLimit
867
833
  },
868
- onPreDispatchFailure: () => settleReplyDispatcher({
869
- dispatcher,
870
- onSettled: () => markDispatchIdle()
871
- }),
872
- runDispatch: async () => {
873
- try {
874
- if (statusReactionController) statusReactionController.setThinking();
875
- return await dispatchInboundMessage({
876
- ctx: ctxPayload,
877
- cfg: deps.cfg,
878
- dispatcher,
879
- replyOptions: {
880
- ...replyOptions,
881
- disableBlockStreaming: typeof deps.blockStreaming === "boolean" ? !deps.blockStreaming : void 0,
882
- ...statusReactionController ? {
883
- allowProgressCallbacksWhenSourceDeliverySuppressed: true,
884
- allowToolLifecycleWhenProgressHidden: true,
885
- onToolStart: async (payload) => {
886
- const toolName = payload.name?.trim();
887
- if (toolName) await statusReactionController.setTool(toolName);
888
- },
889
- onCompactionStart: async () => {
890
- await statusReactionController.setCompacting();
891
- },
892
- onCompactionEnd: async () => {
893
- statusReactionController.cancelPending();
894
- await statusReactionController.setThinking();
895
- }
896
- } : {},
897
- onModelSelected
898
- }
899
- });
900
- } finally {
901
- markDispatchIdle();
902
- }
834
+ afterRecord: () => {
835
+ if (statusReactionController) statusReactionController.setThinking();
836
+ },
837
+ dispatcherOptions,
838
+ delivery,
839
+ sessionInitRetry: { delaysMs: [] },
840
+ replyOptions: {
841
+ ...entry.turnAdoptionLifecycle ? bindIngressLifecycleToReplyOptions(entry.turnAdoptionLifecycle) : {},
842
+ disableBlockStreaming: typeof deps.blockStreaming === "boolean" ? !deps.blockStreaming : void 0,
843
+ ...statusReactionController ? {
844
+ allowProgressCallbacksWhenSourceDeliverySuppressed: true,
845
+ allowToolLifecycleWhenProgressHidden: true,
846
+ onToolStart: async (payload) => {
847
+ const toolName = payload.name?.trim();
848
+ if (toolName) await statusReactionController.setTool(toolName);
849
+ },
850
+ onCompactionStart: async () => {
851
+ await statusReactionController.setCompacting();
852
+ },
853
+ onCompactionEnd: async () => {
854
+ statusReactionController.cancelPending();
855
+ await statusReactionController.setThinking();
856
+ }
857
+ } : {},
858
+ onModelSelected
903
859
  }
904
860
  }),
905
861
  onFinalize: (result) => {
@@ -908,10 +864,7 @@ function createSignalEventHandler(deps) {
908
864
  const hasDeliveryFailure = result.dispatched && hasSignalStatusReplyDeliveryFailure(result.dispatchResult);
909
865
  finalizeSignalStatusReaction({
910
866
  controller: statusReactionController,
911
- outcome: hasFinalResponse && !hasDeliveryFailure ? "done" : "error",
912
- hasFinalResponse,
913
- removeAckAfterReply: deps.cfg.messages?.removeAckAfterReply ?? false,
914
- timing: statusReactionTiming
867
+ outcome: hasFinalResponse && !hasDeliveryFailure ? "done" : "error"
915
868
  }).catch((err) => {
916
869
  logVerbose(`signal: status reaction finalize failed: ${String(err)}`);
917
870
  });
@@ -919,27 +872,69 @@ function createSignalEventHandler(deps) {
919
872
  }
920
873
  });
921
874
  }
875
+ function buildFlushIngressLifecycle(entries) {
876
+ const lifecycles = entries.map((entry) => entry.turnAdoptionLifecycle).filter((lifecycle) => lifecycle !== void 0);
877
+ const [firstLifecycle] = lifecycles;
878
+ if (!firstLifecycle) return {
879
+ lifecycle: void 0,
880
+ settle: async () => {}
881
+ };
882
+ let handedOff = false;
883
+ const adoptAll = async () => {
884
+ for (const lifecycle of lifecycles) await lifecycle.onAdopted();
885
+ };
886
+ return {
887
+ lifecycle: {
888
+ abortSignal: lifecycles.length === 1 ? firstLifecycle.abortSignal : AbortSignal.any(lifecycles.map((lifecycle) => lifecycle.abortSignal)),
889
+ onAdopted: async () => {
890
+ handedOff = true;
891
+ await adoptAll();
892
+ },
893
+ onDeferred: () => {
894
+ handedOff = true;
895
+ for (const lifecycle of lifecycles) lifecycle.onDeferred();
896
+ },
897
+ onAdoptionFinalizing: () => {
898
+ for (const lifecycle of lifecycles) lifecycle.onAdoptionFinalizing();
899
+ },
900
+ onAbandoned: async () => {
901
+ handedOff = true;
902
+ await Promise.all(lifecycles.map((lifecycle) => Promise.resolve(lifecycle.onAbandoned())));
903
+ }
904
+ },
905
+ settle: async () => {
906
+ if (!handedOff) await adoptAll();
907
+ }
908
+ };
909
+ }
922
910
  async function flushSignalInboundEntries(entries) {
923
911
  const last = entries.at(-1);
924
912
  if (!last) return;
913
+ const { lifecycle, settle } = buildFlushIngressLifecycle(entries);
925
914
  if (entries.length === 1) {
926
- await handleSignalInboundMessage(last);
915
+ await handleSignalInboundMessage(lifecycle ? {
916
+ ...last,
917
+ turnAdoptionLifecycle: lifecycle
918
+ } : last);
919
+ await settle();
920
+ return;
921
+ }
922
+ const combinedText = entries.map((entry) => entry.bodyText).filter(Boolean).join("\n");
923
+ const combinedCommandBody = entries.map((entry) => entry.commandBody).filter(Boolean).join("\n");
924
+ if (!combinedText.trim()) {
925
+ await settle();
927
926
  return;
928
927
  }
929
- const combinedText = entries.map((entry) => entry.bodyText).filter(Boolean).join("\\n");
930
- const combinedCommandBody = entries.map((entry) => entry.commandBody).filter(Boolean).join("\\n");
931
- if (!combinedText.trim()) return;
932
928
  await handleSignalInboundMessage({
933
929
  ...last,
934
930
  bodyText: combinedText,
935
931
  commandBody: combinedCommandBody,
932
+ ...lifecycle ? { turnAdoptionLifecycle: lifecycle } : {},
936
933
  isBatched: true,
937
934
  nativeReplyBody: last.nativeReplyBody ?? last.bodyText,
938
- mediaPath: void 0,
939
- mediaType: void 0,
940
- mediaPaths: void 0,
941
- mediaTypes: void 0
935
+ media: entries.flatMap((entry) => entry.media ?? [])
942
936
  });
937
+ await settle();
943
938
  }
944
939
  async function retrySignalInboundFlush(entries, initialError) {
945
940
  let lastError = initialError;
@@ -974,7 +969,10 @@ function createSignalEventHandler(deps) {
974
969
  } catch (err) {
975
970
  if (!isSignalReplySessionInitConflictError(err)) throw err;
976
971
  if (deps.abortSignal?.aborted) return;
977
- const retryTask = retrySignalInboundFlush(entries, err);
972
+ const retryTask = retrySignalInboundFlush(entries, err).catch(async (terminalError) => {
973
+ await Promise.all(entries.map((entry) => Promise.resolve(entry.turnAdoptionLifecycle?.onAbandoned())));
974
+ throw terminalError;
975
+ });
978
976
  deps.runTrackedTask?.(() => retryTask.catch(() => void 0));
979
977
  await retryTask;
980
978
  }
@@ -988,13 +986,11 @@ function createSignalEventHandler(deps) {
988
986
  cfg: deps.cfg,
989
987
  channel: "signal",
990
988
  buildKey: (entry) => resolveSignalInboundDebounceKey(deps.accountId, entry),
991
- shouldDebounce: (entry) => {
992
- return shouldDebounceTextInbound({
993
- text: entry.commandBody,
994
- cfg: deps.cfg,
995
- hasMedia: Boolean(entry.mediaPath || entry.mediaType || entry.mediaPaths?.length)
996
- });
997
- },
989
+ shouldDebounce: (entry) => shouldDebounceTextInbound({
990
+ text: entry.commandBody,
991
+ cfg: deps.cfg,
992
+ hasMedia: entry.media?.some((media) => Boolean(media.path || media.url)) === true
993
+ }),
998
994
  onFlush: flushNormalSignalInboundEntries,
999
995
  onError: reportSignalInboundFlushError,
1000
996
  onCancel: pendingInboundRegistry.complete
@@ -1034,6 +1030,18 @@ function createSignalEventHandler(deps) {
1034
1030
  logVerbose(`Blocked signal reaction sender ${params.senderDisplay} (${params.accessDecision.reasonCode})`);
1035
1031
  return true;
1036
1032
  }
1033
+ if (conversationKey && await maybeResolveSignalQuestionReaction({
1034
+ cfg: deps.cfg,
1035
+ accountId: deps.accountId,
1036
+ conversationKey,
1037
+ messageId,
1038
+ reactionKey: emojiLabel,
1039
+ isRemove: Boolean(params.reaction.isRemove),
1040
+ actorId: formatSignalSenderId(params.sender),
1041
+ targetAuthor: params.reaction.targetAuthor,
1042
+ targetAuthorUuid: params.reaction.targetAuthorUuid,
1043
+ logDebug: logVerbose
1044
+ })) return true;
1037
1045
  const targets = deps.resolveSignalReactionTargets(params.reaction);
1038
1046
  if (!deps.shouldEmitSignalReactionNotification({
1039
1047
  mode: deps.reactionMode,
@@ -1073,7 +1081,7 @@ function createSignalEventHandler(deps) {
1073
1081
  });
1074
1082
  return true;
1075
1083
  }
1076
- return async (event) => {
1084
+ return async (event, turnAdoptionLifecycle) => {
1077
1085
  if (event.event !== "receive" || !event.data) return;
1078
1086
  let payload;
1079
1087
  try {
@@ -1222,23 +1230,23 @@ function createSignalEventHandler(deps) {
1222
1230
  reason: "no mention",
1223
1231
  target: senderDisplay
1224
1232
  });
1225
- const pendingPlaceholder = (() => {
1226
- if (!dataMessage.attachments?.length) return "";
1227
- if (deps.ignoreAttachments) return "<media:attachment>";
1228
- const attachmentTypes = (dataMessage.attachments ?? []).map((attachment) => typeof attachment?.contentType === "string" ? attachment.contentType : void 0);
1229
- if (attachmentTypes.length > 1) return formatAttachmentSummaryPlaceholder(attachmentTypes);
1230
- const firstContentType = dataMessage.attachments?.[0]?.contentType;
1231
- const pendingKind = kindFromMime(firstContentType ?? void 0);
1232
- return pendingKind ? `<media:${pendingKind}>` : "<media:attachment>";
1233
- })();
1234
- const pendingBodyText = messageText || pendingPlaceholder || visibleQuoteText;
1233
+ const pendingMedia = (dataMessage.attachments ?? []).map((attachment) => {
1234
+ const contentType = attachment?.contentType ?? void 0;
1235
+ return {
1236
+ contentType,
1237
+ kind: kindFromMime(contentType) ?? "unknown"
1238
+ };
1239
+ });
1240
+ const pendingMediaText = formatSignalMediaText(pendingMedia);
1241
+ const pendingBodyText = messageText || pendingMediaText || visibleQuoteText;
1235
1242
  const historyKey = groupId ?? "unknown";
1236
1243
  createChannelHistoryWindow({ historyMap: deps.groupHistories }).record({
1237
1244
  historyKey,
1238
1245
  limit: deps.historyLimit,
1239
1246
  entry: {
1240
1247
  sender: envelope.sourceName ?? senderDisplay,
1241
- body: pendingBodyText,
1248
+ body: messageText || visibleQuoteText,
1249
+ media: toHistoryMediaEntries(pendingMedia),
1242
1250
  timestamp: envelope.timestamp ?? void 0,
1243
1251
  messageId: typeof envelope.timestamp === "number" ? String(envelope.timestamp) : void 0
1244
1252
  }
@@ -1248,7 +1256,8 @@ function createSignalEventHandler(deps) {
1248
1256
  to: signalTo,
1249
1257
  replyToId,
1250
1258
  author: senderRecipient,
1251
- body: pendingBodyText,
1259
+ body: messageText || visibleQuoteText,
1260
+ media: pendingMedia,
1252
1261
  sourceTimestamp: inboundTimestamp
1253
1262
  });
1254
1263
  const signalGroupPolicy = resolveChannelGroupPolicy({
@@ -1280,14 +1289,16 @@ function createSignalEventHandler(deps) {
1280
1289
  }
1281
1290
  return;
1282
1291
  }
1283
- let mediaPath;
1284
- let mediaType;
1285
- const mediaPaths = [];
1286
- const mediaTypes = [];
1287
- let placeholder = "";
1288
1292
  const attachments = dataMessage.attachments ?? [];
1293
+ const mediaFacts = attachments.map((attachment) => {
1294
+ const contentType = attachment?.contentType ?? void 0;
1295
+ return {
1296
+ contentType,
1297
+ kind: kindFromMime(contentType) ?? "unknown"
1298
+ };
1299
+ });
1289
1300
  let unavailableAttachmentCount = deps.ignoreAttachments ? attachments.length : 0;
1290
- if (!deps.ignoreAttachments) for (const attachment of attachments) {
1301
+ if (!deps.ignoreAttachments) for (const [index, attachment] of attachments.entries()) {
1291
1302
  if (!attachment?.id) {
1292
1303
  unavailableAttachmentCount += 1;
1293
1304
  continue;
@@ -1302,25 +1313,20 @@ function createSignalEventHandler(deps) {
1302
1313
  maxBytes: deps.mediaMaxBytes
1303
1314
  });
1304
1315
  if (fetched) {
1305
- mediaPaths.push(fetched.path);
1306
- mediaTypes.push(fetched.contentType ?? attachment.contentType ?? "application/octet-stream");
1307
- if (!mediaPath) {
1308
- mediaPath = fetched.path;
1309
- mediaType = fetched.contentType ?? attachment.contentType ?? void 0;
1310
- }
1316
+ const contentType = fetched.contentType ?? attachment.contentType ?? "application/octet-stream";
1317
+ mediaFacts[index] = {
1318
+ path: fetched.path,
1319
+ url: fetched.path,
1320
+ contentType,
1321
+ kind: kindFromMime(contentType) ?? "unknown"
1322
+ };
1311
1323
  } else unavailableAttachmentCount += 1;
1312
1324
  } catch (err) {
1313
1325
  unavailableAttachmentCount += 1;
1314
1326
  deps.runtime.error?.(danger(`attachment fetch failed: ${String(err)}`));
1315
1327
  }
1316
1328
  }
1317
- if (mediaPaths.length > 1) placeholder = formatAttachmentSummaryPlaceholder(mediaTypes);
1318
- else {
1319
- const kind = kindFromMime(mediaType ?? void 0);
1320
- if (kind) placeholder = `<media:${kind}>`;
1321
- else if (mediaPaths.length > 0) placeholder = "<media:attachment>";
1322
- }
1323
- let bodyText = messageText || placeholder || visibleQuoteText || "";
1329
+ let bodyText = messageText;
1324
1330
  if (unavailableAttachmentCount > 0) {
1325
1331
  const attachmentLabel = unavailableAttachmentCount === 1 ? "attachment" : "attachments";
1326
1332
  bodyText = formatInboundMediaUnavailableText({
@@ -1328,7 +1334,7 @@ function createSignalEventHandler(deps) {
1328
1334
  notice: `[signal ${unavailableAttachmentCount > 1 ? `${unavailableAttachmentCount} ` : ""}${attachmentLabel} unavailable]`
1329
1335
  });
1330
1336
  }
1331
- if (!bodyText) return;
1337
+ if (!bodyText && mediaFacts.length === 0 && !visibleQuoteText) return;
1332
1338
  if (deps.sendReadReceipts && !deps.readReceiptsViaDaemon && !isGroup && inboundTimestamp) try {
1333
1339
  await sendReadReceiptSignal(`signal:${senderRecipient}`, inboundTimestamp, {
1334
1340
  cfg: deps.cfg,
@@ -1346,7 +1352,8 @@ function createSignalEventHandler(deps) {
1346
1352
  to: signalTo,
1347
1353
  replyToId,
1348
1354
  author: senderRecipient,
1349
- body: bodyText,
1355
+ body: messageText,
1356
+ media: mediaFacts,
1350
1357
  sourceTimestamp: inboundTimestamp
1351
1358
  });
1352
1359
  const entry = {
@@ -1358,21 +1365,20 @@ function createSignalEventHandler(deps) {
1358
1365
  groupName,
1359
1366
  isGroup,
1360
1367
  bodyText,
1368
+ nativeReplyBody: [messageText, formatSignalMediaText(mediaFacts)].filter(Boolean).join("\n"),
1361
1369
  commandBody: messageText,
1362
1370
  timestamp: inboundTimestamp,
1363
1371
  messageId,
1364
1372
  replyToId,
1365
- mediaPath,
1366
- mediaType,
1367
- mediaPaths: mediaPaths.length > 0 ? mediaPaths : void 0,
1368
- mediaTypes: mediaTypes.length > 0 ? mediaTypes : void 0,
1373
+ media: mediaFacts,
1369
1374
  commandAuthorized,
1370
1375
  canDetectMention,
1371
1376
  requireMention,
1372
1377
  wasMentioned: effectiveWasMentioned,
1373
1378
  replyToBody: visibleQuoteText || void 0,
1374
1379
  replyToSender: visibleQuoteSender,
1375
- replyToIsQuote: visibleQuoteText ? true : void 0
1380
+ replyToIsQuote: visibleQuoteText ? true : void 0,
1381
+ turnAdoptionLifecycle
1376
1382
  };
1377
1383
  pendingInboundRegistry.cancelPendingOnAbort(entry, debouncer.cancelKey);
1378
1384
  const inboundLane = resolveSignalControlLaneKey(deps.accountId, entry) ? controlDebouncer : debouncer;
@@ -1383,6 +1389,131 @@ function createSignalEventHandler(deps) {
1383
1389
  } finally {
1384
1390
  activeEnqueueEntries.delete(entry);
1385
1391
  }
1392
+ if (turnAdoptionLifecycle) return { kind: "deferred" };
1393
+ };
1394
+ }
1395
+ //#endregion
1396
+ //#region extensions/signal/src/reaction-targets.ts
1397
+ function registerSignalReactionTargetsForDeliveredPayload(params) {
1398
+ registerSignalQuestionReactionTargetForDeliveredPayload(params);
1399
+ registerSignalApprovalReactionTargetForDeliveredPayload(params);
1400
+ }
1401
+ //#endregion
1402
+ //#region extensions/signal/src/signal-ingress.ts
1403
+ const SIGNAL_INGRESS_COMPLETED_TTL_MS = 720 * 60 * 60 * 1e3;
1404
+ const SIGNAL_INGRESS_COMPLETED_MAX_ENTRIES = 1e3;
1405
+ const SIGNAL_INGRESS_FAILED_TTL_MS = 720 * 60 * 60 * 1e3;
1406
+ const SIGNAL_INGRESS_FAILED_MAX_ENTRIES = 1e3;
1407
+ const SIGNAL_INGRESS_DRAIN_INTERVAL_MS = 1e3;
1408
+ var SignalIngressPermanentError = class extends Error {
1409
+ constructor(reason, message, options) {
1410
+ super(message, options);
1411
+ this.reason = reason;
1412
+ this.name = "SignalIngressPermanentError";
1413
+ }
1414
+ };
1415
+ function isRecord$1(value) {
1416
+ return typeof value === "object" && value !== null && !Array.isArray(value);
1417
+ }
1418
+ function normalizeRawString(value) {
1419
+ return typeof value === "string" && value.trim() ? value.trim() : null;
1420
+ }
1421
+ function normalizeTimestamp(value) {
1422
+ return typeof value === "number" && Number.isSafeInteger(value) && value > 0 ? value : null;
1423
+ }
1424
+ function parseReceiveEnvelope(event) {
1425
+ if (event.event !== "receive" || !event.data) return null;
1426
+ let parsed;
1427
+ try {
1428
+ parsed = JSON.parse(event.data);
1429
+ } catch (error) {
1430
+ throw new SignalIngressPermanentError("parse-error", "Signal receive event contains invalid JSON", { cause: error });
1431
+ }
1432
+ if (!isRecord$1(parsed)) throw new SignalIngressPermanentError("parse-error", "Signal receive event must contain a JSON object");
1433
+ return isRecord$1(parsed.envelope) ? parsed.envelope : null;
1434
+ }
1435
+ function resolveDataMessage(envelope) {
1436
+ if (isRecord$1(envelope.dataMessage)) return envelope.dataMessage;
1437
+ return isRecord$1(envelope.editMessage?.dataMessage) ? envelope.editMessage.dataMessage : null;
1438
+ }
1439
+ function inspectSignalIngressEvent(event) {
1440
+ const envelope = parseReceiveEnvelope(event);
1441
+ if (!envelope || "syncMessage" in envelope) return null;
1442
+ const dataMessage = resolveDataMessage(envelope);
1443
+ const reactionMessage = isRecord$1(envelope.reactionMessage) ? envelope.reactionMessage : null;
1444
+ if (!dataMessage && !reactionMessage) return null;
1445
+ const senderUuid = normalizeRawString(envelope.sourceUuid);
1446
+ const senderNumber = normalizeRawString(envelope.sourceNumber);
1447
+ const senderKey = senderUuid ? `uuid:${senderUuid}` : senderNumber ? `number:${senderNumber}` : null;
1448
+ if (!senderKey) throw new SignalIngressPermanentError("missing-sender", "Signal dispatchable envelope is missing sourceUuid/sourceNumber");
1449
+ const timestamp = normalizeTimestamp(envelope.timestamp) ?? normalizeTimestamp(dataMessage?.timestamp);
1450
+ if (timestamp === null) throw new SignalIngressPermanentError("missing-timestamp", "Signal dispatchable envelope is missing a stable timestamp");
1451
+ const dataGroup = isRecord$1(dataMessage?.groupInfo) ? dataMessage.groupInfo : null;
1452
+ const reactionGroup = isRecord$1(reactionMessage?.groupInfo) ? reactionMessage.groupInfo : null;
1453
+ const groupId = normalizeRawString(dataGroup?.groupId) ?? normalizeRawString(reactionGroup?.groupId);
1454
+ return {
1455
+ eventId: JSON.stringify([senderKey, timestamp]),
1456
+ laneKey: groupId ? `group:${groupId}` : `direct:${senderKey}`
1457
+ };
1458
+ }
1459
+ function resolveSignalIngressNonRetryableFailure(error) {
1460
+ return error instanceof SignalIngressPermanentError ? {
1461
+ reason: error.reason,
1462
+ message: error.message
1463
+ } : null;
1464
+ }
1465
+ /** Open the account queue, recover it, and keep newly appended rows draining. */
1466
+ async function startSignalIngressMonitor(params) {
1467
+ let queue = params.queue;
1468
+ if (!queue) {
1469
+ const pluginRuntime = getOptionalSignalRuntime();
1470
+ if (!pluginRuntime) throw new Error("Signal runtime not initialized for durable ingress");
1471
+ queue = pluginRuntime.state.openChannelIngressQueue({ accountId: params.accountId });
1472
+ }
1473
+ const monitor = createChannelIngressMonitor({
1474
+ queue,
1475
+ inspect: (event) => inspectSignalIngressEvent(event),
1476
+ payload: {
1477
+ version: 1,
1478
+ serialize: (event, { receivedAt }) => ({
1479
+ receivedAt,
1480
+ event
1481
+ }),
1482
+ deserialize: (body) => body.event,
1483
+ encode: ({ body }) => ({
1484
+ version: 1,
1485
+ ...body
1486
+ }),
1487
+ decode: (payload) => ({
1488
+ version: payload.version,
1489
+ body: payload
1490
+ }),
1491
+ createClaimError: (_kind, claim) => new SignalIngressPermanentError("unsupported-event", `Signal ingress row ${claim.id} has an invalid payload`)
1492
+ },
1493
+ deliver: (event, lifecycle) => params.dispatch(event, lifecycle),
1494
+ pollIntervalMs: SIGNAL_INGRESS_DRAIN_INTERVAL_MS,
1495
+ retention: {
1496
+ pruneIntervalMs: 0,
1497
+ completedTtlMs: SIGNAL_INGRESS_COMPLETED_TTL_MS,
1498
+ completedMaxEntries: SIGNAL_INGRESS_COMPLETED_MAX_ENTRIES,
1499
+ failedTtlMs: SIGNAL_INGRESS_FAILED_TTL_MS,
1500
+ failedMaxEntries: SIGNAL_INGRESS_FAILED_MAX_ENTRIES
1501
+ },
1502
+ appendRetryDelaysMs: [0],
1503
+ drain: {
1504
+ resolveNonRetryableFailure: resolveSignalIngressNonRetryableFailure,
1505
+ onLog: (message) => params.runtime.log?.(`signal ${message}`)
1506
+ },
1507
+ onError: (error) => params.runtime.error?.(`signal ingress drain failed: ${String(error)}`)
1508
+ });
1509
+ monitor.start();
1510
+ return {
1511
+ receive: async (event) => {
1512
+ await monitor.admit(event);
1513
+ await monitor.waitForPumpIdle();
1514
+ },
1515
+ stop: monitor.stop,
1516
+ waitForIdle: monitor.waitForIdle
1386
1517
  };
1387
1518
  }
1388
1519
  //#endregion
@@ -1393,7 +1524,7 @@ const DEFAULT_RECONNECT_POLICY = {
1393
1524
  factor: 2,
1394
1525
  jitter: .2
1395
1526
  };
1396
- async function runSignalSseLoop({ baseUrl, account, abortSignal, runtime, onEvent, timeoutMs, apiMode, policy }) {
1527
+ async function runSignalSseLoop({ baseUrl, account, abortSignal, runtime, onEvent, timeoutMs, transportKind, policy }) {
1397
1528
  const reconnectPolicy = {
1398
1529
  ...DEFAULT_RECONNECT_POLICY,
1399
1530
  ...policy
@@ -1411,10 +1542,10 @@ async function runSignalSseLoop({ baseUrl, account, abortSignal, runtime, onEven
1411
1542
  account,
1412
1543
  abortSignal,
1413
1544
  timeoutMs,
1414
- apiMode,
1415
- onEvent: (event) => {
1545
+ transportKind,
1546
+ onEvent: async (event) => {
1416
1547
  reconnectAttempts = 0;
1417
- onEvent(event);
1548
+ await onEvent(event);
1418
1549
  },
1419
1550
  logger: {
1420
1551
  log: runtime.log,
@@ -1447,15 +1578,15 @@ var monitor_exports = /* @__PURE__ */ __exportAll({
1447
1578
  deliverReplies: () => deliverReplies,
1448
1579
  monitorSignalProvider: () => monitorSignalProvider
1449
1580
  });
1450
- function resolveRuntime(opts) {
1451
- return opts.runtime ?? createNonExitingRuntime();
1452
- }
1453
1581
  function createSignalMonitorTaskRunner(runtime) {
1454
1582
  const inFlight = /* @__PURE__ */ new Set();
1455
1583
  return {
1456
1584
  runTask(task) {
1457
- const trackedTask = Promise.resolve().then(task).catch((err) => runtime.error?.(`signal monitor task failed: ${String(err)}`)).finally(() => inFlight.delete(trackedTask));
1585
+ const trackedTask = Promise.resolve().then(task);
1458
1586
  inFlight.add(trackedTask);
1587
+ trackedTask.catch((err) => runtime.error?.(`signal monitor task failed: ${String(err)}`));
1588
+ trackedTask.finally(() => inFlight.delete(trackedTask)).catch(() => void 0);
1589
+ return trackedTask;
1459
1590
  },
1460
1591
  async waitForIdle() {
1461
1592
  while (inFlight.size > 0) await Promise.allSettled(inFlight);
@@ -1465,13 +1596,16 @@ function createSignalMonitorTaskRunner(runtime) {
1465
1596
  function createSignalDaemonLifecycle(params) {
1466
1597
  let daemonHandle = null;
1467
1598
  let daemonStopRequested = false;
1599
+ let daemonStopPromise;
1468
1600
  let daemonExitError;
1469
1601
  const daemonAbortController = new AbortController();
1470
1602
  const abortSignal = params.abortSignal ? AbortSignal.any([params.abortSignal, daemonAbortController.signal]) : daemonAbortController.signal;
1471
1603
  const stop = () => {
1604
+ if (daemonStopPromise) return daemonStopPromise;
1472
1605
  daemonStopRequested = true;
1473
1606
  if (!daemonAbortController.signal.aborted) daemonAbortController.abort(params.abortSignal?.reason ?? /* @__PURE__ */ new Error("Signal monitor stopped"));
1474
- return daemonHandle?.stop() ?? Promise.resolve();
1607
+ daemonStopPromise = daemonHandle?.stop() ?? Promise.resolve();
1608
+ return daemonStopPromise;
1475
1609
  };
1476
1610
  const attach = (handle) => {
1477
1611
  daemonHandle = handle;
@@ -1489,9 +1623,6 @@ function createSignalDaemonLifecycle(params) {
1489
1623
  abortSignal
1490
1624
  };
1491
1625
  }
1492
- function normalizeAllowList(raw) {
1493
- return normalizeStringEntries(raw);
1494
- }
1495
1626
  function resolveSignalReactionTargets(reaction) {
1496
1627
  const targets = [];
1497
1628
  const uuid = reaction.targetAuthorUuid?.trim();
@@ -1580,7 +1711,7 @@ async function fetchAttachment(params) {
1580
1711
  const result = await signalRpcRequest("getAttachment", rpcParams, {
1581
1712
  baseUrl: params.baseUrl,
1582
1713
  maxResponseBytes: deriveSignalAttachmentRpcMaxResponseBytes(params.maxBytes),
1583
- apiMode: params.apiMode
1714
+ transportKind: params.transportKind
1584
1715
  });
1585
1716
  if (!result?.data) return null;
1586
1717
  if (estimateBase64DecodedBytes(result.data) > params.maxBytes) throw new Error(`Signal attachment ${attachment.id} exceeds ${(params.maxBytes / (1024 * 1024)).toFixed(0)}MB limit`);
@@ -1654,7 +1785,7 @@ async function deliverReplies(params) {
1654
1785
  }), visibleText);
1655
1786
  }
1656
1787
  }) !== "empty") {
1657
- registerSignalApprovalReactionTargetForDeliveredPayload({
1788
+ registerSignalReactionTargetsForDeliveredPayload({
1658
1789
  cfg: params.cfg,
1659
1790
  target: {
1660
1791
  channel: "signal",
@@ -1712,7 +1843,7 @@ function createSignalNativeReplyResolver(params) {
1712
1843
  };
1713
1844
  }
1714
1845
  async function monitorSignalProvider(opts = {}) {
1715
- const runtime = resolveRuntime(opts);
1846
+ const runtime = opts.runtime ?? createNonExitingRuntime();
1716
1847
  const cfg = opts.config ?? getRuntimeConfig();
1717
1848
  const accountInfo = resolveSignalAccount({
1718
1849
  cfg,
@@ -1725,8 +1856,8 @@ async function monitorSignalProvider(opts = {}) {
1725
1856
  const baseUrl = normalizeOptionalString(opts.baseUrl) ?? accountInfo.baseUrl;
1726
1857
  const account = normalizeOptionalString(opts.account) ?? normalizeOptionalString(accountInfo.config.account);
1727
1858
  const dmPolicy = accountInfo.config.dmPolicy ?? "pairing";
1728
- const allowFrom = normalizeAllowList(opts.allowFrom ?? accountInfo.config.allowFrom);
1729
- const groupAllowFrom = normalizeAllowList(opts.groupAllowFrom ?? accountInfo.config.groupAllowFrom ?? (accountInfo.config.allowFrom && accountInfo.config.allowFrom.length > 0 ? accountInfo.config.allowFrom : []));
1859
+ const allowFrom = normalizeStringEntries(opts.allowFrom ?? accountInfo.config.allowFrom);
1860
+ const groupAllowFrom = normalizeStringEntries(opts.groupAllowFrom ?? accountInfo.config.groupAllowFrom ?? (accountInfo.config.allowFrom && accountInfo.config.allowFrom.length > 0 ? accountInfo.config.allowFrom : []));
1730
1861
  const defaultGroupPolicy = resolveDefaultGroupPolicy(cfg);
1731
1862
  const { groupPolicy, providerMissingFallbackApplied } = resolveAllowlistProviderRuntimeGroupPolicy({
1732
1863
  providerConfigPresent: cfg.channels?.signal !== void 0,
@@ -1740,41 +1871,40 @@ async function monitorSignalProvider(opts = {}) {
1740
1871
  log: (message) => runtime.log?.(message)
1741
1872
  });
1742
1873
  const reactionMode = accountInfo.config.reactionNotifications ?? "own";
1743
- const reactionAllowlist = normalizeAllowList(accountInfo.config.reactionAllowlist);
1874
+ const reactionAllowlist = normalizeStringEntries(accountInfo.config.reactionAllowlist);
1744
1875
  const mediaMaxBytes = (opts.mediaMaxMb ?? accountInfo.config.mediaMaxMb ?? 8) * 1024 * 1024;
1876
+ const transportKind = accountInfo.transport.kind;
1877
+ const managedTransport = accountInfo.transport.kind === "managed-native" ? accountInfo.transport : void 0;
1745
1878
  const ignoreAttachments = opts.ignoreAttachments ?? accountInfo.config.ignoreAttachments ?? false;
1746
1879
  const sendReadReceipts = Boolean(opts.sendReadReceipts ?? accountInfo.config.sendReadReceipts);
1747
1880
  const waitForTransportReadyFn = opts.waitForTransportReady ?? waitForTransportReady;
1748
- const autoStart = opts.autoStart ?? accountInfo.config.autoStart ?? !accountInfo.config.httpUrl;
1749
- const configuredApiMode = cfg.channels?.signal?.apiMode ?? "auto";
1750
- const startupTimeoutMs = Math.min(12e4, Math.max(1e3, opts.startupTimeoutMs ?? accountInfo.config.startupTimeoutMs ?? 3e4));
1881
+ const autoStart = Boolean(managedTransport) && (opts.autoStart ?? true);
1882
+ const startupTimeoutMs = Math.min(12e4, Math.max(1e3, opts.startupTimeoutMs ?? managedTransport?.startupTimeoutMs ?? 3e4));
1751
1883
  const readReceiptsViaDaemon = autoStart && sendReadReceipts;
1752
1884
  const daemonLifecycle = createSignalDaemonLifecycle({ abortSignal: opts.abortSignal });
1753
1885
  const monitorTaskRunner = createSignalMonitorTaskRunner(runtime);
1754
1886
  let daemonHandle = null;
1755
- if (autoStart && configuredApiMode === "container") throw new Error("channels.signal.autoStart=true is incompatible with channels.signal.apiMode=container");
1887
+ let ingressMonitor;
1756
1888
  if (autoStart) {
1757
- const cliPath = opts.cliPath ?? accountInfo.config.cliPath ?? "signal-cli";
1758
- const configPath = normalizeOptionalString(opts.configPath) ?? normalizeOptionalString(accountInfo.config.configPath);
1759
- const httpHost = opts.httpHost ?? accountInfo.config.httpHost ?? "127.0.0.1";
1760
- const httpPort = opts.httpPort ?? accountInfo.config.httpPort ?? 8080;
1889
+ const cliPath = opts.cliPath ?? managedTransport?.cliPath ?? "signal-cli";
1890
+ const configPath = normalizeOptionalString(opts.configPath) ?? normalizeOptionalString(managedTransport?.configPath);
1891
+ const httpHost = opts.httpHost ?? managedTransport?.httpHost ?? "127.0.0.1";
1892
+ const httpPort = opts.httpPort ?? managedTransport?.httpPort ?? 8080;
1761
1893
  daemonHandle = spawnSignalDaemon({
1762
1894
  cliPath,
1763
1895
  ...configPath ? { configPath } : {},
1764
1896
  account,
1765
1897
  httpHost,
1766
1898
  httpPort,
1767
- receiveMode: opts.receiveMode ?? accountInfo.config.receiveMode,
1899
+ receiveMode: opts.receiveMode ?? managedTransport?.receiveMode,
1768
1900
  ignoreAttachments: opts.ignoreAttachments ?? accountInfo.config.ignoreAttachments,
1769
- ignoreStories: opts.ignoreStories ?? accountInfo.config.ignoreStories,
1901
+ ignoreStories: opts.ignoreStories ?? managedTransport?.ignoreStories,
1770
1902
  sendReadReceipts,
1771
1903
  runtime
1772
1904
  });
1773
1905
  daemonLifecycle.attach(daemonHandle);
1774
1906
  }
1775
- const onAbort = () => {
1776
- daemonLifecycle.stop();
1777
- };
1907
+ const onAbort = () => void daemonLifecycle.stop();
1778
1908
  opts.abortSignal?.addEventListener("abort", onAbort, { once: true });
1779
1909
  try {
1780
1910
  if (daemonHandle) {
@@ -1809,7 +1939,9 @@ async function monitorSignalProvider(opts = {}) {
1809
1939
  const handleEvent = createSignalEventHandler({
1810
1940
  runtime,
1811
1941
  abortSignal: daemonLifecycle.abortSignal,
1812
- runTrackedTask: (task) => monitorTaskRunner.runTask(task),
1942
+ runTrackedTask: (task) => {
1943
+ monitorTaskRunner.runTask(task);
1944
+ },
1813
1945
  cfg,
1814
1946
  baseUrl,
1815
1947
  account,
@@ -1831,7 +1963,7 @@ async function monitorSignalProvider(opts = {}) {
1831
1963
  readReceiptsViaDaemon,
1832
1964
  fetchAttachment: (params) => fetchAttachment({
1833
1965
  ...params,
1834
- apiMode: configuredApiMode
1966
+ transportKind
1835
1967
  }),
1836
1968
  deliverReplies: (params) => deliverReplies({
1837
1969
  ...params,
@@ -1843,17 +1975,20 @@ async function monitorSignalProvider(opts = {}) {
1843
1975
  shouldEmitSignalReactionNotification,
1844
1976
  buildSignalReactionSystemEventText
1845
1977
  });
1978
+ ingressMonitor = await startSignalIngressMonitor({
1979
+ accountId: accountInfo.accountId,
1980
+ dispatch: handleEvent,
1981
+ runtime
1982
+ });
1846
1983
  await runSignalSseLoop({
1847
1984
  baseUrl,
1848
1985
  account,
1849
1986
  abortSignal: daemonLifecycle.abortSignal,
1850
1987
  runtime,
1851
1988
  timeoutMs: 0,
1852
- apiMode: configuredApiMode,
1989
+ transportKind,
1853
1990
  policy: opts.reconnectPolicy,
1854
- onEvent: (event) => {
1855
- monitorTaskRunner.runTask(() => handleEvent(event));
1856
- }
1991
+ onEvent: (event) => monitorTaskRunner.runTask(async () => await ingressMonitor?.receive(event))
1857
1992
  });
1858
1993
  const daemonExitError = daemonLifecycle.getExitError();
1859
1994
  if (daemonExitError) throw daemonExitError;
@@ -1862,6 +1997,7 @@ async function monitorSignalProvider(opts = {}) {
1862
1997
  if (opts.abortSignal?.aborted && !daemonExitError) return;
1863
1998
  throw err;
1864
1999
  } finally {
2000
+ await ingressMonitor?.stop();
1865
2001
  await Promise.all([daemonLifecycle.stop(), monitorTaskRunner.waitForIdle()]);
1866
2002
  opts.abortSignal?.removeEventListener("abort", onAbort);
1867
2003
  }