@openclaw/signal 2026.7.2-beta.7 → 2026.7.33

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 (763) hide show
  1. package/dist/.setup/accounts-Bz4HtP0g.mjs +59 -0
  2. package/dist/.setup/api-Q_S37MF_.mjs +16 -0
  3. package/dist/.setup/api-zi9Hs8Er.mjs +11 -0
  4. package/dist/{runtime-JPrGlV7h.js → .setup/approval-auth-CKMusyZI.mjs} +27 -36
  5. package/dist/{approval-handler.runtime-C-XYgcxE.js → .setup/approval-handler.runtime-eIT2knU-.mjs} +7 -7
  6. package/dist/{approval-reactions-DtL47gSK.js → .setup/approval-reactions-DoY1BVpl.mjs} +29 -38
  7. package/dist/{approval-resolver-B3m0D2R0.js → .setup/approval-resolver-BR0MioAA.mjs} +1 -2
  8. package/dist/{channel-CmbWaYlm.js → .setup/channel-DKzsFvG5.mjs} +90 -527
  9. package/dist/.setup/channel.runtime-jVmVayf_.mjs +66 -0
  10. package/dist/{client-BazXTH7O.js → .setup/client-adapter-BiGMiCr4.mjs} +236 -184
  11. package/dist/.setup/config-api-KS-qhQvD.mjs +2 -0
  12. package/dist/.setup/config-schema-BQRy2Glu.mjs +27 -0
  13. package/dist/{identity-BQ4OzXXk.js → .setup/identity-C8-yk4J9.mjs} +9 -21
  14. package/dist/{install-signal-cli-qJF7iC4h.js → .setup/install-signal-cli-BoniH0EF.mjs} +50 -88
  15. package/dist/.setup/message-actions-Cplx3XNC.mjs +529 -0
  16. package/dist/{monitor-BvIzkrYW.js → .setup/monitor-CZUTeDiv.mjs} +315 -610
  17. package/dist/.setup/probe-BXmpsFzO.mjs +48 -0
  18. package/dist/{reaction-runtime-api-BjeDyKcz.js → .setup/reaction-runtime-api-CAxalUfb.mjs} +7 -5
  19. package/dist/{rpc-context-CZUoE0-A.js → .setup/rpc-context-B-l6wiZj.mjs} +1 -1
  20. package/dist/{send-B_Ks4MZr.js → .setup/send-CF_VPaZJ.mjs} +41 -56
  21. package/dist/{send.runtime-CbuXycZT.js → .setup/send.runtime-DqumNf6-.mjs} +1 -1
  22. package/dist/api.js +11 -16
  23. package/dist/channel-config-api.js +1 -1
  24. package/dist/channel-plugin-api.js +1 -1
  25. package/dist/contract-api.js +3 -3
  26. package/dist/reaction-runtime-api.js +1 -1
  27. package/dist/runtime-api.js +10 -11
  28. package/dist/setup-entry.js +2 -1
  29. package/node_modules/ws/lib/permessage-deflate.js +3 -1
  30. package/node_modules/ws/package.json +1 -1
  31. package/openclaw.plugin.json +408 -566
  32. package/package.json +20 -70
  33. package/dist/accounts-DrStJjiK.js +0 -147
  34. package/dist/channel.runtime-BRDaqr5-.js +0 -92
  35. package/dist/client-adapter-mXGeEHQJ.js +0 -56
  36. package/dist/config-schema-Y3dFGwdL.js +0 -219
  37. package/dist/doctor-contract-api-Dcte-QYB.js +0 -487
  38. package/dist/doctor-contract-api.js +0 -2
  39. package/dist/probe-Br9abaGp.js +0 -65
  40. package/dist/question-reactions-Ds48FtEu.js +0 -109
  41. package/dist/transport-detection-Da06-LOL.js +0 -652
  42. package/dist/transport-detection.runtime-D_190UUL.js +0 -2
  43. package/dist/transport-policy-DxvSMHp9.js +0 -99
  44. package/dist/transport-probes.runtime-CV6Qs0Og.js +0 -2
  45. package/node_modules/zod/LICENSE +0 -21
  46. package/node_modules/zod/README.md +0 -191
  47. package/node_modules/zod/index.cjs +0 -33
  48. package/node_modules/zod/index.d.cts +0 -4
  49. package/node_modules/zod/index.d.ts +0 -4
  50. package/node_modules/zod/index.js +0 -4
  51. package/node_modules/zod/locales/index.cjs +0 -17
  52. package/node_modules/zod/locales/index.d.cts +0 -1
  53. package/node_modules/zod/locales/index.d.ts +0 -1
  54. package/node_modules/zod/locales/index.js +0 -1
  55. package/node_modules/zod/locales/package.json +0 -7
  56. package/node_modules/zod/mini/index.cjs +0 -32
  57. package/node_modules/zod/mini/index.d.cts +0 -3
  58. package/node_modules/zod/mini/index.d.ts +0 -3
  59. package/node_modules/zod/mini/index.js +0 -3
  60. package/node_modules/zod/mini/package.json +0 -7
  61. package/node_modules/zod/package.json +0 -135
  62. package/node_modules/zod/src/index.ts +0 -4
  63. package/node_modules/zod/src/locales/index.ts +0 -1
  64. package/node_modules/zod/src/mini/index.ts +0 -3
  65. package/node_modules/zod/src/v3/ZodError.ts +0 -330
  66. package/node_modules/zod/src/v3/benchmarks/datetime.ts +0 -58
  67. package/node_modules/zod/src/v3/benchmarks/discriminatedUnion.ts +0 -80
  68. package/node_modules/zod/src/v3/benchmarks/index.ts +0 -59
  69. package/node_modules/zod/src/v3/benchmarks/ipv4.ts +0 -57
  70. package/node_modules/zod/src/v3/benchmarks/object.ts +0 -69
  71. package/node_modules/zod/src/v3/benchmarks/primitives.ts +0 -162
  72. package/node_modules/zod/src/v3/benchmarks/realworld.ts +0 -63
  73. package/node_modules/zod/src/v3/benchmarks/string.ts +0 -55
  74. package/node_modules/zod/src/v3/benchmarks/union.ts +0 -80
  75. package/node_modules/zod/src/v3/errors.ts +0 -13
  76. package/node_modules/zod/src/v3/external.ts +0 -6
  77. package/node_modules/zod/src/v3/helpers/enumUtil.ts +0 -17
  78. package/node_modules/zod/src/v3/helpers/errorUtil.ts +0 -8
  79. package/node_modules/zod/src/v3/helpers/parseUtil.ts +0 -176
  80. package/node_modules/zod/src/v3/helpers/partialUtil.ts +0 -34
  81. package/node_modules/zod/src/v3/helpers/typeAliases.ts +0 -2
  82. package/node_modules/zod/src/v3/helpers/util.ts +0 -224
  83. package/node_modules/zod/src/v3/index.ts +0 -4
  84. package/node_modules/zod/src/v3/locales/en.ts +0 -124
  85. package/node_modules/zod/src/v3/standard-schema.ts +0 -113
  86. package/node_modules/zod/src/v3/tests/Mocker.ts +0 -54
  87. package/node_modules/zod/src/v3/tests/all-errors.test.ts +0 -157
  88. package/node_modules/zod/src/v3/tests/anyunknown.test.ts +0 -28
  89. package/node_modules/zod/src/v3/tests/array.test.ts +0 -71
  90. package/node_modules/zod/src/v3/tests/async-parsing.test.ts +0 -388
  91. package/node_modules/zod/src/v3/tests/async-refinements.test.ts +0 -46
  92. package/node_modules/zod/src/v3/tests/base.test.ts +0 -29
  93. package/node_modules/zod/src/v3/tests/bigint.test.ts +0 -55
  94. package/node_modules/zod/src/v3/tests/branded.test.ts +0 -53
  95. package/node_modules/zod/src/v3/tests/catch.test.ts +0 -220
  96. package/node_modules/zod/src/v3/tests/coerce.test.ts +0 -133
  97. package/node_modules/zod/src/v3/tests/complex.test.ts +0 -70
  98. package/node_modules/zod/src/v3/tests/custom.test.ts +0 -31
  99. package/node_modules/zod/src/v3/tests/date.test.ts +0 -32
  100. package/node_modules/zod/src/v3/tests/deepmasking.test.ts +0 -186
  101. package/node_modules/zod/src/v3/tests/default.test.ts +0 -112
  102. package/node_modules/zod/src/v3/tests/description.test.ts +0 -33
  103. package/node_modules/zod/src/v3/tests/discriminated-unions.test.ts +0 -315
  104. package/node_modules/zod/src/v3/tests/enum.test.ts +0 -80
  105. package/node_modules/zod/src/v3/tests/error.test.ts +0 -551
  106. package/node_modules/zod/src/v3/tests/firstparty.test.ts +0 -87
  107. package/node_modules/zod/src/v3/tests/firstpartyschematypes.test.ts +0 -21
  108. package/node_modules/zod/src/v3/tests/function.test.ts +0 -261
  109. package/node_modules/zod/src/v3/tests/generics.test.ts +0 -48
  110. package/node_modules/zod/src/v3/tests/instanceof.test.ts +0 -37
  111. package/node_modules/zod/src/v3/tests/intersection.test.ts +0 -110
  112. package/node_modules/zod/src/v3/tests/language-server.source.ts +0 -76
  113. package/node_modules/zod/src/v3/tests/language-server.test.ts +0 -207
  114. package/node_modules/zod/src/v3/tests/literal.test.ts +0 -36
  115. package/node_modules/zod/src/v3/tests/map.test.ts +0 -110
  116. package/node_modules/zod/src/v3/tests/masking.test.ts +0 -4
  117. package/node_modules/zod/src/v3/tests/mocker.test.ts +0 -19
  118. package/node_modules/zod/src/v3/tests/nan.test.ts +0 -24
  119. package/node_modules/zod/src/v3/tests/nativeEnum.test.ts +0 -87
  120. package/node_modules/zod/src/v3/tests/nullable.test.ts +0 -42
  121. package/node_modules/zod/src/v3/tests/number.test.ts +0 -176
  122. package/node_modules/zod/src/v3/tests/object-augmentation.test.ts +0 -29
  123. package/node_modules/zod/src/v3/tests/object-in-es5-env.test.ts +0 -29
  124. package/node_modules/zod/src/v3/tests/object.test.ts +0 -434
  125. package/node_modules/zod/src/v3/tests/optional.test.ts +0 -42
  126. package/node_modules/zod/src/v3/tests/parseUtil.test.ts +0 -23
  127. package/node_modules/zod/src/v3/tests/parser.test.ts +0 -41
  128. package/node_modules/zod/src/v3/tests/partials.test.ts +0 -243
  129. package/node_modules/zod/src/v3/tests/pickomit.test.ts +0 -111
  130. package/node_modules/zod/src/v3/tests/pipeline.test.ts +0 -29
  131. package/node_modules/zod/src/v3/tests/preprocess.test.ts +0 -186
  132. package/node_modules/zod/src/v3/tests/primitive.test.ts +0 -440
  133. package/node_modules/zod/src/v3/tests/promise.test.ts +0 -90
  134. package/node_modules/zod/src/v3/tests/readonly.test.ts +0 -194
  135. package/node_modules/zod/src/v3/tests/record.test.ts +0 -171
  136. package/node_modules/zod/src/v3/tests/recursive.test.ts +0 -197
  137. package/node_modules/zod/src/v3/tests/refine.test.ts +0 -313
  138. package/node_modules/zod/src/v3/tests/safeparse.test.ts +0 -27
  139. package/node_modules/zod/src/v3/tests/set.test.ts +0 -142
  140. package/node_modules/zod/src/v3/tests/standard-schema.test.ts +0 -83
  141. package/node_modules/zod/src/v3/tests/string.test.ts +0 -916
  142. package/node_modules/zod/src/v3/tests/transformer.test.ts +0 -233
  143. package/node_modules/zod/src/v3/tests/tuple.test.ts +0 -90
  144. package/node_modules/zod/src/v3/tests/unions.test.ts +0 -57
  145. package/node_modules/zod/src/v3/tests/validations.test.ts +0 -133
  146. package/node_modules/zod/src/v3/tests/void.test.ts +0 -15
  147. package/node_modules/zod/src/v3/types.ts +0 -5138
  148. package/node_modules/zod/src/v4/classic/checks.ts +0 -32
  149. package/node_modules/zod/src/v4/classic/coerce.ts +0 -27
  150. package/node_modules/zod/src/v4/classic/compat.ts +0 -70
  151. package/node_modules/zod/src/v4/classic/errors.ts +0 -82
  152. package/node_modules/zod/src/v4/classic/external.ts +0 -52
  153. package/node_modules/zod/src/v4/classic/from-json-schema.ts +0 -659
  154. package/node_modules/zod/src/v4/classic/index.ts +0 -5
  155. package/node_modules/zod/src/v4/classic/iso.ts +0 -90
  156. package/node_modules/zod/src/v4/classic/parse.ts +0 -82
  157. package/node_modules/zod/src/v4/classic/schemas.ts +0 -2672
  158. package/node_modules/zod/src/v4/classic/tests/anyunknown.test.ts +0 -26
  159. package/node_modules/zod/src/v4/classic/tests/apply.test.ts +0 -59
  160. package/node_modules/zod/src/v4/classic/tests/array.test.ts +0 -264
  161. package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +0 -216
  162. package/node_modules/zod/src/v4/classic/tests/async-parsing.test.ts +0 -381
  163. package/node_modules/zod/src/v4/classic/tests/async-refinements.test.ts +0 -68
  164. package/node_modules/zod/src/v4/classic/tests/base.test.ts +0 -7
  165. package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +0 -54
  166. package/node_modules/zod/src/v4/classic/tests/brand.test.ts +0 -106
  167. package/node_modules/zod/src/v4/classic/tests/catch.test.ts +0 -326
  168. package/node_modules/zod/src/v4/classic/tests/coalesce.test.ts +0 -20
  169. package/node_modules/zod/src/v4/classic/tests/codec-examples.test.ts +0 -573
  170. package/node_modules/zod/src/v4/classic/tests/codec.test.ts +0 -703
  171. package/node_modules/zod/src/v4/classic/tests/coerce.test.ts +0 -160
  172. package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +0 -374
  173. package/node_modules/zod/src/v4/classic/tests/custom.test.ts +0 -40
  174. package/node_modules/zod/src/v4/classic/tests/date.test.ts +0 -62
  175. package/node_modules/zod/src/v4/classic/tests/datetime.test.ts +0 -302
  176. package/node_modules/zod/src/v4/classic/tests/default.test.ts +0 -409
  177. package/node_modules/zod/src/v4/classic/tests/describe-meta-checks.test.ts +0 -27
  178. package/node_modules/zod/src/v4/classic/tests/description.test.ts +0 -32
  179. package/node_modules/zod/src/v4/classic/tests/detached-methods.test.ts +0 -197
  180. package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +0 -694
  181. package/node_modules/zod/src/v4/classic/tests/enum.test.ts +0 -285
  182. package/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +0 -807
  183. package/node_modules/zod/src/v4/classic/tests/error.test.ts +0 -711
  184. package/node_modules/zod/src/v4/classic/tests/file.test.ts +0 -96
  185. package/node_modules/zod/src/v4/classic/tests/firstparty.test.ts +0 -179
  186. package/node_modules/zod/src/v4/classic/tests/fix-json-issue.test.ts +0 -26
  187. package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +0 -895
  188. package/node_modules/zod/src/v4/classic/tests/function.test.ts +0 -360
  189. package/node_modules/zod/src/v4/classic/tests/generics.test.ts +0 -72
  190. package/node_modules/zod/src/v4/classic/tests/global-config.test.ts +0 -39
  191. package/node_modules/zod/src/v4/classic/tests/hash.test.ts +0 -68
  192. package/node_modules/zod/src/v4/classic/tests/index.test.ts +0 -939
  193. package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +0 -60
  194. package/node_modules/zod/src/v4/classic/tests/intersection.test.ts +0 -198
  195. package/node_modules/zod/src/v4/classic/tests/jitless-allows-eval.test.ts +0 -46
  196. package/node_modules/zod/src/v4/classic/tests/json.test.ts +0 -109
  197. package/node_modules/zod/src/v4/classic/tests/lazy.test.ts +0 -227
  198. package/node_modules/zod/src/v4/classic/tests/literal.test.ts +0 -117
  199. package/node_modules/zod/src/v4/classic/tests/locales_ka.test.ts +0 -29
  200. package/node_modules/zod/src/v4/classic/tests/locales_ro.test.ts +0 -24
  201. package/node_modules/zod/src/v4/classic/tests/map.test.ts +0 -330
  202. package/node_modules/zod/src/v4/classic/tests/nan.test.ts +0 -21
  203. package/node_modules/zod/src/v4/classic/tests/nested-refine.test.ts +0 -168
  204. package/node_modules/zod/src/v4/classic/tests/nonoptional.test.ts +0 -101
  205. package/node_modules/zod/src/v4/classic/tests/nullable.test.ts +0 -22
  206. package/node_modules/zod/src/v4/classic/tests/number.test.ts +0 -325
  207. package/node_modules/zod/src/v4/classic/tests/object.test.ts +0 -717
  208. package/node_modules/zod/src/v4/classic/tests/optional.test.ts +0 -333
  209. package/node_modules/zod/src/v4/classic/tests/partial.test.ts +0 -450
  210. package/node_modules/zod/src/v4/classic/tests/pickomit.test.ts +0 -211
  211. package/node_modules/zod/src/v4/classic/tests/pipe.test.ts +0 -101
  212. package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +0 -74
  213. package/node_modules/zod/src/v4/classic/tests/preprocess-types.test.ts +0 -26
  214. package/node_modules/zod/src/v4/classic/tests/preprocess.test.ts +0 -351
  215. package/node_modules/zod/src/v4/classic/tests/primitive.test.ts +0 -175
  216. package/node_modules/zod/src/v4/classic/tests/promise.test.ts +0 -81
  217. package/node_modules/zod/src/v4/classic/tests/prototypes.test.ts +0 -23
  218. package/node_modules/zod/src/v4/classic/tests/readonly.test.ts +0 -252
  219. package/node_modules/zod/src/v4/classic/tests/record.test.ts +0 -717
  220. package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +0 -631
  221. package/node_modules/zod/src/v4/classic/tests/refine.test.ts +0 -633
  222. package/node_modules/zod/src/v4/classic/tests/registries.test.ts +0 -243
  223. package/node_modules/zod/src/v4/classic/tests/set.test.ts +0 -181
  224. package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +0 -134
  225. package/node_modules/zod/src/v4/classic/tests/string-formats.test.ts +0 -125
  226. package/node_modules/zod/src/v4/classic/tests/string.test.ts +0 -1224
  227. package/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +0 -106
  228. package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +0 -771
  229. package/node_modules/zod/src/v4/classic/tests/to-json-schema-methods.test.ts +0 -438
  230. package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +0 -3125
  231. package/node_modules/zod/src/v4/classic/tests/transform.test.ts +0 -378
  232. package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +0 -496
  233. package/node_modules/zod/src/v4/classic/tests/union.test.ts +0 -273
  234. package/node_modules/zod/src/v4/classic/tests/url.test.ts +0 -13
  235. package/node_modules/zod/src/v4/classic/tests/validations.test.ts +0 -283
  236. package/node_modules/zod/src/v4/classic/tests/void.test.ts +0 -12
  237. package/node_modules/zod/src/v4/core/api.ts +0 -1823
  238. package/node_modules/zod/src/v4/core/checks.ts +0 -1293
  239. package/node_modules/zod/src/v4/core/config.ts +0 -15
  240. package/node_modules/zod/src/v4/core/core.ts +0 -153
  241. package/node_modules/zod/src/v4/core/doc.ts +0 -44
  242. package/node_modules/zod/src/v4/core/errors.ts +0 -455
  243. package/node_modules/zod/src/v4/core/index.ts +0 -16
  244. package/node_modules/zod/src/v4/core/json-schema-generator.ts +0 -126
  245. package/node_modules/zod/src/v4/core/json-schema-processors.ts +0 -666
  246. package/node_modules/zod/src/v4/core/json-schema.ts +0 -147
  247. package/node_modules/zod/src/v4/core/parse.ts +0 -195
  248. package/node_modules/zod/src/v4/core/regexes.ts +0 -190
  249. package/node_modules/zod/src/v4/core/registries.ts +0 -105
  250. package/node_modules/zod/src/v4/core/schemas.ts +0 -4730
  251. package/node_modules/zod/src/v4/core/standard-schema.ts +0 -159
  252. package/node_modules/zod/src/v4/core/tests/extend.test.ts +0 -59
  253. package/node_modules/zod/src/v4/core/tests/index.test.ts +0 -46
  254. package/node_modules/zod/src/v4/core/tests/locales/be.test.ts +0 -124
  255. package/node_modules/zod/src/v4/core/tests/locales/el.test.ts +0 -215
  256. package/node_modules/zod/src/v4/core/tests/locales/en.test.ts +0 -22
  257. package/node_modules/zod/src/v4/core/tests/locales/es.test.ts +0 -181
  258. package/node_modules/zod/src/v4/core/tests/locales/fr.test.ts +0 -72
  259. package/node_modules/zod/src/v4/core/tests/locales/he.test.ts +0 -379
  260. package/node_modules/zod/src/v4/core/tests/locales/hr.test.ts +0 -163
  261. package/node_modules/zod/src/v4/core/tests/locales/nl.test.ts +0 -46
  262. package/node_modules/zod/src/v4/core/tests/locales/ru.test.ts +0 -128
  263. package/node_modules/zod/src/v4/core/tests/locales/tr.test.ts +0 -69
  264. package/node_modules/zod/src/v4/core/tests/locales/uz.test.ts +0 -105
  265. package/node_modules/zod/src/v4/core/tests/record-constructor.test.ts +0 -125
  266. package/node_modules/zod/src/v4/core/tests/recursive-tuples.test.ts +0 -45
  267. package/node_modules/zod/src/v4/core/to-json-schema.ts +0 -622
  268. package/node_modules/zod/src/v4/core/util.ts +0 -983
  269. package/node_modules/zod/src/v4/core/versions.ts +0 -5
  270. package/node_modules/zod/src/v4/core/zsf.ts +0 -323
  271. package/node_modules/zod/src/v4/index.ts +0 -4
  272. package/node_modules/zod/src/v4/locales/ar.ts +0 -115
  273. package/node_modules/zod/src/v4/locales/az.ts +0 -111
  274. package/node_modules/zod/src/v4/locales/be.ts +0 -176
  275. package/node_modules/zod/src/v4/locales/bg.ts +0 -128
  276. package/node_modules/zod/src/v4/locales/ca.ts +0 -116
  277. package/node_modules/zod/src/v4/locales/cs.ts +0 -118
  278. package/node_modules/zod/src/v4/locales/da.ts +0 -123
  279. package/node_modules/zod/src/v4/locales/de.ts +0 -116
  280. package/node_modules/zod/src/v4/locales/el.ts +0 -121
  281. package/node_modules/zod/src/v4/locales/en.ts +0 -123
  282. package/node_modules/zod/src/v4/locales/eo.ts +0 -118
  283. package/node_modules/zod/src/v4/locales/es.ts +0 -141
  284. package/node_modules/zod/src/v4/locales/fa.ts +0 -126
  285. package/node_modules/zod/src/v4/locales/fi.ts +0 -121
  286. package/node_modules/zod/src/v4/locales/fr-CA.ts +0 -116
  287. package/node_modules/zod/src/v4/locales/fr.ts +0 -132
  288. package/node_modules/zod/src/v4/locales/he.ts +0 -246
  289. package/node_modules/zod/src/v4/locales/hr.ts +0 -131
  290. package/node_modules/zod/src/v4/locales/hu.ts +0 -117
  291. package/node_modules/zod/src/v4/locales/hy.ts +0 -164
  292. package/node_modules/zod/src/v4/locales/id.ts +0 -115
  293. package/node_modules/zod/src/v4/locales/index.ts +0 -52
  294. package/node_modules/zod/src/v4/locales/is.ts +0 -119
  295. package/node_modules/zod/src/v4/locales/it.ts +0 -116
  296. package/node_modules/zod/src/v4/locales/ja.ts +0 -114
  297. package/node_modules/zod/src/v4/locales/ka.ts +0 -123
  298. package/node_modules/zod/src/v4/locales/kh.ts +0 -7
  299. package/node_modules/zod/src/v4/locales/km.ts +0 -119
  300. package/node_modules/zod/src/v4/locales/ko.ts +0 -121
  301. package/node_modules/zod/src/v4/locales/lt.ts +0 -239
  302. package/node_modules/zod/src/v4/locales/mk.ts +0 -118
  303. package/node_modules/zod/src/v4/locales/ms.ts +0 -115
  304. package/node_modules/zod/src/v4/locales/nl.ts +0 -121
  305. package/node_modules/zod/src/v4/locales/no.ts +0 -116
  306. package/node_modules/zod/src/v4/locales/ota.ts +0 -117
  307. package/node_modules/zod/src/v4/locales/pl.ts +0 -118
  308. package/node_modules/zod/src/v4/locales/ps.ts +0 -126
  309. package/node_modules/zod/src/v4/locales/pt.ts +0 -116
  310. package/node_modules/zod/src/v4/locales/ro.ts +0 -129
  311. package/node_modules/zod/src/v4/locales/ru.ts +0 -176
  312. package/node_modules/zod/src/v4/locales/sl.ts +0 -118
  313. package/node_modules/zod/src/v4/locales/sv.ts +0 -119
  314. package/node_modules/zod/src/v4/locales/ta.ts +0 -118
  315. package/node_modules/zod/src/v4/locales/th.ts +0 -119
  316. package/node_modules/zod/src/v4/locales/tr.ts +0 -111
  317. package/node_modules/zod/src/v4/locales/ua.ts +0 -7
  318. package/node_modules/zod/src/v4/locales/uk.ts +0 -117
  319. package/node_modules/zod/src/v4/locales/ur.ts +0 -119
  320. package/node_modules/zod/src/v4/locales/uz.ts +0 -117
  321. package/node_modules/zod/src/v4/locales/vi.ts +0 -117
  322. package/node_modules/zod/src/v4/locales/yo.ts +0 -124
  323. package/node_modules/zod/src/v4/locales/zh-CN.ts +0 -116
  324. package/node_modules/zod/src/v4/locales/zh-TW.ts +0 -115
  325. package/node_modules/zod/src/v4/mini/checks.ts +0 -32
  326. package/node_modules/zod/src/v4/mini/coerce.ts +0 -27
  327. package/node_modules/zod/src/v4/mini/external.ts +0 -41
  328. package/node_modules/zod/src/v4/mini/index.ts +0 -3
  329. package/node_modules/zod/src/v4/mini/iso.ts +0 -66
  330. package/node_modules/zod/src/v4/mini/parse.ts +0 -14
  331. package/node_modules/zod/src/v4/mini/schemas.ts +0 -1947
  332. package/node_modules/zod/src/v4/mini/tests/apply.test.ts +0 -24
  333. package/node_modules/zod/src/v4/mini/tests/assignability.test.ts +0 -129
  334. package/node_modules/zod/src/v4/mini/tests/brand.test.ts +0 -94
  335. package/node_modules/zod/src/v4/mini/tests/checks.test.ts +0 -144
  336. package/node_modules/zod/src/v4/mini/tests/codec.test.ts +0 -548
  337. package/node_modules/zod/src/v4/mini/tests/computed.test.ts +0 -36
  338. package/node_modules/zod/src/v4/mini/tests/error.test.ts +0 -22
  339. package/node_modules/zod/src/v4/mini/tests/functions.test.ts +0 -5
  340. package/node_modules/zod/src/v4/mini/tests/index.test.ts +0 -993
  341. package/node_modules/zod/src/v4/mini/tests/number.test.ts +0 -95
  342. package/node_modules/zod/src/v4/mini/tests/object.test.ts +0 -227
  343. package/node_modules/zod/src/v4/mini/tests/prototypes.test.ts +0 -43
  344. package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +0 -325
  345. package/node_modules/zod/src/v4/mini/tests/standard-schema.test.ts +0 -50
  346. package/node_modules/zod/src/v4/mini/tests/string.test.ts +0 -352
  347. package/node_modules/zod/src/v4-mini/index.ts +0 -3
  348. package/node_modules/zod/v3/ZodError.cjs +0 -138
  349. package/node_modules/zod/v3/ZodError.d.cts +0 -164
  350. package/node_modules/zod/v3/ZodError.d.ts +0 -164
  351. package/node_modules/zod/v3/ZodError.js +0 -133
  352. package/node_modules/zod/v3/errors.cjs +0 -17
  353. package/node_modules/zod/v3/errors.d.cts +0 -5
  354. package/node_modules/zod/v3/errors.d.ts +0 -5
  355. package/node_modules/zod/v3/errors.js +0 -9
  356. package/node_modules/zod/v3/external.cjs +0 -22
  357. package/node_modules/zod/v3/external.d.cts +0 -6
  358. package/node_modules/zod/v3/external.d.ts +0 -6
  359. package/node_modules/zod/v3/external.js +0 -6
  360. package/node_modules/zod/v3/helpers/enumUtil.cjs +0 -2
  361. package/node_modules/zod/v3/helpers/enumUtil.d.cts +0 -8
  362. package/node_modules/zod/v3/helpers/enumUtil.d.ts +0 -8
  363. package/node_modules/zod/v3/helpers/enumUtil.js +0 -1
  364. package/node_modules/zod/v3/helpers/errorUtil.cjs +0 -9
  365. package/node_modules/zod/v3/helpers/errorUtil.d.cts +0 -9
  366. package/node_modules/zod/v3/helpers/errorUtil.d.ts +0 -9
  367. package/node_modules/zod/v3/helpers/errorUtil.js +0 -6
  368. package/node_modules/zod/v3/helpers/parseUtil.cjs +0 -124
  369. package/node_modules/zod/v3/helpers/parseUtil.d.cts +0 -78
  370. package/node_modules/zod/v3/helpers/parseUtil.d.ts +0 -78
  371. package/node_modules/zod/v3/helpers/parseUtil.js +0 -109
  372. package/node_modules/zod/v3/helpers/partialUtil.cjs +0 -2
  373. package/node_modules/zod/v3/helpers/partialUtil.d.cts +0 -8
  374. package/node_modules/zod/v3/helpers/partialUtil.d.ts +0 -8
  375. package/node_modules/zod/v3/helpers/partialUtil.js +0 -1
  376. package/node_modules/zod/v3/helpers/typeAliases.cjs +0 -2
  377. package/node_modules/zod/v3/helpers/typeAliases.d.cts +0 -2
  378. package/node_modules/zod/v3/helpers/typeAliases.d.ts +0 -2
  379. package/node_modules/zod/v3/helpers/typeAliases.js +0 -1
  380. package/node_modules/zod/v3/helpers/util.cjs +0 -137
  381. package/node_modules/zod/v3/helpers/util.d.cts +0 -85
  382. package/node_modules/zod/v3/helpers/util.d.ts +0 -85
  383. package/node_modules/zod/v3/helpers/util.js +0 -133
  384. package/node_modules/zod/v3/index.cjs +0 -33
  385. package/node_modules/zod/v3/index.d.cts +0 -4
  386. package/node_modules/zod/v3/index.d.ts +0 -4
  387. package/node_modules/zod/v3/index.js +0 -4
  388. package/node_modules/zod/v3/locales/en.cjs +0 -112
  389. package/node_modules/zod/v3/locales/en.d.cts +0 -3
  390. package/node_modules/zod/v3/locales/en.d.ts +0 -3
  391. package/node_modules/zod/v3/locales/en.js +0 -109
  392. package/node_modules/zod/v3/package.json +0 -7
  393. package/node_modules/zod/v3/standard-schema.cjs +0 -2
  394. package/node_modules/zod/v3/standard-schema.d.cts +0 -102
  395. package/node_modules/zod/v3/standard-schema.d.ts +0 -102
  396. package/node_modules/zod/v3/standard-schema.js +0 -1
  397. package/node_modules/zod/v3/types.cjs +0 -3777
  398. package/node_modules/zod/v3/types.d.cts +0 -1034
  399. package/node_modules/zod/v3/types.d.ts +0 -1034
  400. package/node_modules/zod/v3/types.js +0 -3695
  401. package/node_modules/zod/v4/classic/checks.cjs +0 -33
  402. package/node_modules/zod/v4/classic/checks.d.cts +0 -1
  403. package/node_modules/zod/v4/classic/checks.d.ts +0 -1
  404. package/node_modules/zod/v4/classic/checks.js +0 -1
  405. package/node_modules/zod/v4/classic/coerce.cjs +0 -47
  406. package/node_modules/zod/v4/classic/coerce.d.cts +0 -17
  407. package/node_modules/zod/v4/classic/coerce.d.ts +0 -17
  408. package/node_modules/zod/v4/classic/coerce.js +0 -17
  409. package/node_modules/zod/v4/classic/compat.cjs +0 -61
  410. package/node_modules/zod/v4/classic/compat.d.cts +0 -50
  411. package/node_modules/zod/v4/classic/compat.d.ts +0 -50
  412. package/node_modules/zod/v4/classic/compat.js +0 -31
  413. package/node_modules/zod/v4/classic/errors.cjs +0 -74
  414. package/node_modules/zod/v4/classic/errors.d.cts +0 -30
  415. package/node_modules/zod/v4/classic/errors.d.ts +0 -30
  416. package/node_modules/zod/v4/classic/errors.js +0 -48
  417. package/node_modules/zod/v4/classic/external.cjs +0 -73
  418. package/node_modules/zod/v4/classic/external.d.cts +0 -16
  419. package/node_modules/zod/v4/classic/external.d.ts +0 -16
  420. package/node_modules/zod/v4/classic/external.js +0 -20
  421. package/node_modules/zod/v4/classic/from-json-schema.cjs +0 -625
  422. package/node_modules/zod/v4/classic/from-json-schema.d.cts +0 -12
  423. package/node_modules/zod/v4/classic/from-json-schema.d.ts +0 -12
  424. package/node_modules/zod/v4/classic/from-json-schema.js +0 -599
  425. package/node_modules/zod/v4/classic/index.cjs +0 -33
  426. package/node_modules/zod/v4/classic/index.d.cts +0 -4
  427. package/node_modules/zod/v4/classic/index.d.ts +0 -4
  428. package/node_modules/zod/v4/classic/index.js +0 -4
  429. package/node_modules/zod/v4/classic/iso.cjs +0 -60
  430. package/node_modules/zod/v4/classic/iso.d.cts +0 -22
  431. package/node_modules/zod/v4/classic/iso.d.ts +0 -22
  432. package/node_modules/zod/v4/classic/iso.js +0 -30
  433. package/node_modules/zod/v4/classic/package.json +0 -7
  434. package/node_modules/zod/v4/classic/parse.cjs +0 -41
  435. package/node_modules/zod/v4/classic/parse.d.cts +0 -31
  436. package/node_modules/zod/v4/classic/parse.d.ts +0 -31
  437. package/node_modules/zod/v4/classic/parse.js +0 -15
  438. package/node_modules/zod/v4/classic/schemas.cjs +0 -1511
  439. package/node_modules/zod/v4/classic/schemas.d.cts +0 -767
  440. package/node_modules/zod/v4/classic/schemas.d.ts +0 -767
  441. package/node_modules/zod/v4/classic/schemas.js +0 -1395
  442. package/node_modules/zod/v4/core/api.cjs +0 -1227
  443. package/node_modules/zod/v4/core/api.d.cts +0 -325
  444. package/node_modules/zod/v4/core/api.d.ts +0 -325
  445. package/node_modules/zod/v4/core/api.js +0 -1087
  446. package/node_modules/zod/v4/core/checks.cjs +0 -601
  447. package/node_modules/zod/v4/core/checks.d.cts +0 -278
  448. package/node_modules/zod/v4/core/checks.d.ts +0 -278
  449. package/node_modules/zod/v4/core/checks.js +0 -575
  450. package/node_modules/zod/v4/core/core.cjs +0 -85
  451. package/node_modules/zod/v4/core/core.d.cts +0 -70
  452. package/node_modules/zod/v4/core/core.d.ts +0 -70
  453. package/node_modules/zod/v4/core/core.js +0 -78
  454. package/node_modules/zod/v4/core/doc.cjs +0 -39
  455. package/node_modules/zod/v4/core/doc.d.cts +0 -14
  456. package/node_modules/zod/v4/core/doc.d.ts +0 -14
  457. package/node_modules/zod/v4/core/doc.js +0 -35
  458. package/node_modules/zod/v4/core/errors.cjs +0 -216
  459. package/node_modules/zod/v4/core/errors.d.cts +0 -221
  460. package/node_modules/zod/v4/core/errors.d.ts +0 -221
  461. package/node_modules/zod/v4/core/errors.js +0 -185
  462. package/node_modules/zod/v4/core/index.cjs +0 -47
  463. package/node_modules/zod/v4/core/index.d.cts +0 -16
  464. package/node_modules/zod/v4/core/index.d.ts +0 -16
  465. package/node_modules/zod/v4/core/index.js +0 -16
  466. package/node_modules/zod/v4/core/json-schema-generator.cjs +0 -99
  467. package/node_modules/zod/v4/core/json-schema-generator.d.cts +0 -65
  468. package/node_modules/zod/v4/core/json-schema-generator.d.ts +0 -65
  469. package/node_modules/zod/v4/core/json-schema-generator.js +0 -95
  470. package/node_modules/zod/v4/core/json-schema-processors.cjs +0 -644
  471. package/node_modules/zod/v4/core/json-schema-processors.d.cts +0 -49
  472. package/node_modules/zod/v4/core/json-schema-processors.d.ts +0 -49
  473. package/node_modules/zod/v4/core/json-schema-processors.js +0 -601
  474. package/node_modules/zod/v4/core/json-schema.cjs +0 -2
  475. package/node_modules/zod/v4/core/json-schema.d.cts +0 -88
  476. package/node_modules/zod/v4/core/json-schema.d.ts +0 -88
  477. package/node_modules/zod/v4/core/json-schema.js +0 -1
  478. package/node_modules/zod/v4/core/package.json +0 -7
  479. package/node_modules/zod/v4/core/parse.cjs +0 -131
  480. package/node_modules/zod/v4/core/parse.d.cts +0 -49
  481. package/node_modules/zod/v4/core/parse.d.ts +0 -49
  482. package/node_modules/zod/v4/core/parse.js +0 -93
  483. package/node_modules/zod/v4/core/regexes.cjs +0 -172
  484. package/node_modules/zod/v4/core/regexes.d.cts +0 -85
  485. package/node_modules/zod/v4/core/regexes.d.ts +0 -85
  486. package/node_modules/zod/v4/core/regexes.js +0 -139
  487. package/node_modules/zod/v4/core/registries.cjs +0 -56
  488. package/node_modules/zod/v4/core/registries.d.cts +0 -35
  489. package/node_modules/zod/v4/core/registries.d.ts +0 -35
  490. package/node_modules/zod/v4/core/registries.js +0 -51
  491. package/node_modules/zod/v4/core/schemas.cjs +0 -2270
  492. package/node_modules/zod/v4/core/schemas.d.cts +0 -1184
  493. package/node_modules/zod/v4/core/schemas.d.ts +0 -1184
  494. package/node_modules/zod/v4/core/schemas.js +0 -2239
  495. package/node_modules/zod/v4/core/standard-schema.cjs +0 -2
  496. package/node_modules/zod/v4/core/standard-schema.d.cts +0 -126
  497. package/node_modules/zod/v4/core/standard-schema.d.ts +0 -126
  498. package/node_modules/zod/v4/core/standard-schema.js +0 -1
  499. package/node_modules/zod/v4/core/to-json-schema.cjs +0 -457
  500. package/node_modules/zod/v4/core/to-json-schema.d.cts +0 -114
  501. package/node_modules/zod/v4/core/to-json-schema.d.ts +0 -114
  502. package/node_modules/zod/v4/core/to-json-schema.js +0 -448
  503. package/node_modules/zod/v4/core/util.cjs +0 -734
  504. package/node_modules/zod/v4/core/util.d.cts +0 -200
  505. package/node_modules/zod/v4/core/util.d.ts +0 -200
  506. package/node_modules/zod/v4/core/util.js +0 -674
  507. package/node_modules/zod/v4/core/versions.cjs +0 -8
  508. package/node_modules/zod/v4/core/versions.d.cts +0 -5
  509. package/node_modules/zod/v4/core/versions.d.ts +0 -5
  510. package/node_modules/zod/v4/core/versions.js +0 -5
  511. package/node_modules/zod/v4/index.cjs +0 -22
  512. package/node_modules/zod/v4/index.d.cts +0 -3
  513. package/node_modules/zod/v4/index.d.ts +0 -3
  514. package/node_modules/zod/v4/index.js +0 -3
  515. package/node_modules/zod/v4/locales/ar.cjs +0 -133
  516. package/node_modules/zod/v4/locales/ar.d.cts +0 -5
  517. package/node_modules/zod/v4/locales/ar.d.ts +0 -4
  518. package/node_modules/zod/v4/locales/ar.js +0 -106
  519. package/node_modules/zod/v4/locales/az.cjs +0 -132
  520. package/node_modules/zod/v4/locales/az.d.cts +0 -5
  521. package/node_modules/zod/v4/locales/az.d.ts +0 -4
  522. package/node_modules/zod/v4/locales/az.js +0 -105
  523. package/node_modules/zod/v4/locales/be.cjs +0 -183
  524. package/node_modules/zod/v4/locales/be.d.cts +0 -5
  525. package/node_modules/zod/v4/locales/be.d.ts +0 -4
  526. package/node_modules/zod/v4/locales/be.js +0 -156
  527. package/node_modules/zod/v4/locales/bg.cjs +0 -147
  528. package/node_modules/zod/v4/locales/bg.d.cts +0 -5
  529. package/node_modules/zod/v4/locales/bg.d.ts +0 -4
  530. package/node_modules/zod/v4/locales/bg.js +0 -120
  531. package/node_modules/zod/v4/locales/ca.cjs +0 -134
  532. package/node_modules/zod/v4/locales/ca.d.cts +0 -5
  533. package/node_modules/zod/v4/locales/ca.d.ts +0 -4
  534. package/node_modules/zod/v4/locales/ca.js +0 -107
  535. package/node_modules/zod/v4/locales/cs.cjs +0 -138
  536. package/node_modules/zod/v4/locales/cs.d.cts +0 -5
  537. package/node_modules/zod/v4/locales/cs.d.ts +0 -4
  538. package/node_modules/zod/v4/locales/cs.js +0 -111
  539. package/node_modules/zod/v4/locales/da.cjs +0 -142
  540. package/node_modules/zod/v4/locales/da.d.cts +0 -5
  541. package/node_modules/zod/v4/locales/da.d.ts +0 -4
  542. package/node_modules/zod/v4/locales/da.js +0 -115
  543. package/node_modules/zod/v4/locales/de.cjs +0 -135
  544. package/node_modules/zod/v4/locales/de.d.cts +0 -5
  545. package/node_modules/zod/v4/locales/de.d.ts +0 -4
  546. package/node_modules/zod/v4/locales/de.js +0 -108
  547. package/node_modules/zod/v4/locales/el.cjs +0 -136
  548. package/node_modules/zod/v4/locales/el.d.cts +0 -5
  549. package/node_modules/zod/v4/locales/el.d.ts +0 -4
  550. package/node_modules/zod/v4/locales/el.js +0 -109
  551. package/node_modules/zod/v4/locales/en.cjs +0 -140
  552. package/node_modules/zod/v4/locales/en.d.cts +0 -5
  553. package/node_modules/zod/v4/locales/en.d.ts +0 -4
  554. package/node_modules/zod/v4/locales/en.js +0 -113
  555. package/node_modules/zod/v4/locales/eo.cjs +0 -136
  556. package/node_modules/zod/v4/locales/eo.d.cts +0 -5
  557. package/node_modules/zod/v4/locales/eo.d.ts +0 -4
  558. package/node_modules/zod/v4/locales/eo.js +0 -109
  559. package/node_modules/zod/v4/locales/es.cjs +0 -159
  560. package/node_modules/zod/v4/locales/es.d.cts +0 -5
  561. package/node_modules/zod/v4/locales/es.d.ts +0 -4
  562. package/node_modules/zod/v4/locales/es.js +0 -132
  563. package/node_modules/zod/v4/locales/fa.cjs +0 -141
  564. package/node_modules/zod/v4/locales/fa.d.cts +0 -5
  565. package/node_modules/zod/v4/locales/fa.d.ts +0 -4
  566. package/node_modules/zod/v4/locales/fa.js +0 -114
  567. package/node_modules/zod/v4/locales/fi.cjs +0 -139
  568. package/node_modules/zod/v4/locales/fi.d.cts +0 -5
  569. package/node_modules/zod/v4/locales/fi.d.ts +0 -4
  570. package/node_modules/zod/v4/locales/fi.js +0 -112
  571. package/node_modules/zod/v4/locales/fr-CA.cjs +0 -134
  572. package/node_modules/zod/v4/locales/fr-CA.d.cts +0 -5
  573. package/node_modules/zod/v4/locales/fr-CA.d.ts +0 -4
  574. package/node_modules/zod/v4/locales/fr-CA.js +0 -107
  575. package/node_modules/zod/v4/locales/fr.cjs +0 -152
  576. package/node_modules/zod/v4/locales/fr.d.cts +0 -5
  577. package/node_modules/zod/v4/locales/fr.d.ts +0 -4
  578. package/node_modules/zod/v4/locales/fr.js +0 -125
  579. package/node_modules/zod/v4/locales/he.cjs +0 -241
  580. package/node_modules/zod/v4/locales/he.d.cts +0 -5
  581. package/node_modules/zod/v4/locales/he.d.ts +0 -4
  582. package/node_modules/zod/v4/locales/he.js +0 -214
  583. package/node_modules/zod/v4/locales/hr.cjs +0 -149
  584. package/node_modules/zod/v4/locales/hr.d.cts +0 -5
  585. package/node_modules/zod/v4/locales/hr.d.ts +0 -4
  586. package/node_modules/zod/v4/locales/hr.js +0 -122
  587. package/node_modules/zod/v4/locales/hu.cjs +0 -135
  588. package/node_modules/zod/v4/locales/hu.d.cts +0 -5
  589. package/node_modules/zod/v4/locales/hu.d.ts +0 -4
  590. package/node_modules/zod/v4/locales/hu.js +0 -108
  591. package/node_modules/zod/v4/locales/hy.cjs +0 -174
  592. package/node_modules/zod/v4/locales/hy.d.cts +0 -5
  593. package/node_modules/zod/v4/locales/hy.d.ts +0 -4
  594. package/node_modules/zod/v4/locales/hy.js +0 -147
  595. package/node_modules/zod/v4/locales/id.cjs +0 -133
  596. package/node_modules/zod/v4/locales/id.d.cts +0 -5
  597. package/node_modules/zod/v4/locales/id.d.ts +0 -4
  598. package/node_modules/zod/v4/locales/id.js +0 -106
  599. package/node_modules/zod/v4/locales/index.cjs +0 -111
  600. package/node_modules/zod/v4/locales/index.d.cts +0 -52
  601. package/node_modules/zod/v4/locales/index.d.ts +0 -52
  602. package/node_modules/zod/v4/locales/index.js +0 -52
  603. package/node_modules/zod/v4/locales/is.cjs +0 -136
  604. package/node_modules/zod/v4/locales/is.d.cts +0 -5
  605. package/node_modules/zod/v4/locales/is.d.ts +0 -4
  606. package/node_modules/zod/v4/locales/is.js +0 -109
  607. package/node_modules/zod/v4/locales/it.cjs +0 -135
  608. package/node_modules/zod/v4/locales/it.d.cts +0 -5
  609. package/node_modules/zod/v4/locales/it.d.ts +0 -4
  610. package/node_modules/zod/v4/locales/it.js +0 -108
  611. package/node_modules/zod/v4/locales/ja.cjs +0 -134
  612. package/node_modules/zod/v4/locales/ja.d.cts +0 -5
  613. package/node_modules/zod/v4/locales/ja.d.ts +0 -4
  614. package/node_modules/zod/v4/locales/ja.js +0 -107
  615. package/node_modules/zod/v4/locales/ka.cjs +0 -139
  616. package/node_modules/zod/v4/locales/ka.d.cts +0 -5
  617. package/node_modules/zod/v4/locales/ka.d.ts +0 -4
  618. package/node_modules/zod/v4/locales/ka.js +0 -112
  619. package/node_modules/zod/v4/locales/kh.cjs +0 -12
  620. package/node_modules/zod/v4/locales/kh.d.cts +0 -5
  621. package/node_modules/zod/v4/locales/kh.d.ts +0 -5
  622. package/node_modules/zod/v4/locales/kh.js +0 -5
  623. package/node_modules/zod/v4/locales/km.cjs +0 -137
  624. package/node_modules/zod/v4/locales/km.d.cts +0 -5
  625. package/node_modules/zod/v4/locales/km.d.ts +0 -4
  626. package/node_modules/zod/v4/locales/km.js +0 -110
  627. package/node_modules/zod/v4/locales/ko.cjs +0 -138
  628. package/node_modules/zod/v4/locales/ko.d.cts +0 -5
  629. package/node_modules/zod/v4/locales/ko.d.ts +0 -4
  630. package/node_modules/zod/v4/locales/ko.js +0 -111
  631. package/node_modules/zod/v4/locales/lt.cjs +0 -230
  632. package/node_modules/zod/v4/locales/lt.d.cts +0 -5
  633. package/node_modules/zod/v4/locales/lt.d.ts +0 -4
  634. package/node_modules/zod/v4/locales/lt.js +0 -203
  635. package/node_modules/zod/v4/locales/mk.cjs +0 -136
  636. package/node_modules/zod/v4/locales/mk.d.cts +0 -5
  637. package/node_modules/zod/v4/locales/mk.d.ts +0 -4
  638. package/node_modules/zod/v4/locales/mk.js +0 -109
  639. package/node_modules/zod/v4/locales/ms.cjs +0 -134
  640. package/node_modules/zod/v4/locales/ms.d.cts +0 -5
  641. package/node_modules/zod/v4/locales/ms.d.ts +0 -4
  642. package/node_modules/zod/v4/locales/ms.js +0 -107
  643. package/node_modules/zod/v4/locales/nl.cjs +0 -137
  644. package/node_modules/zod/v4/locales/nl.d.cts +0 -5
  645. package/node_modules/zod/v4/locales/nl.d.ts +0 -4
  646. package/node_modules/zod/v4/locales/nl.js +0 -110
  647. package/node_modules/zod/v4/locales/no.cjs +0 -135
  648. package/node_modules/zod/v4/locales/no.d.cts +0 -5
  649. package/node_modules/zod/v4/locales/no.d.ts +0 -4
  650. package/node_modules/zod/v4/locales/no.js +0 -108
  651. package/node_modules/zod/v4/locales/ota.cjs +0 -136
  652. package/node_modules/zod/v4/locales/ota.d.cts +0 -5
  653. package/node_modules/zod/v4/locales/ota.d.ts +0 -4
  654. package/node_modules/zod/v4/locales/ota.js +0 -109
  655. package/node_modules/zod/v4/locales/package.json +0 -7
  656. package/node_modules/zod/v4/locales/pl.cjs +0 -136
  657. package/node_modules/zod/v4/locales/pl.d.cts +0 -5
  658. package/node_modules/zod/v4/locales/pl.d.ts +0 -4
  659. package/node_modules/zod/v4/locales/pl.js +0 -109
  660. package/node_modules/zod/v4/locales/ps.cjs +0 -141
  661. package/node_modules/zod/v4/locales/ps.d.cts +0 -5
  662. package/node_modules/zod/v4/locales/ps.d.ts +0 -4
  663. package/node_modules/zod/v4/locales/ps.js +0 -114
  664. package/node_modules/zod/v4/locales/pt.cjs +0 -135
  665. package/node_modules/zod/v4/locales/pt.d.cts +0 -5
  666. package/node_modules/zod/v4/locales/pt.d.ts +0 -4
  667. package/node_modules/zod/v4/locales/pt.js +0 -108
  668. package/node_modules/zod/v4/locales/ro.cjs +0 -146
  669. package/node_modules/zod/v4/locales/ro.d.cts +0 -5
  670. package/node_modules/zod/v4/locales/ro.d.ts +0 -4
  671. package/node_modules/zod/v4/locales/ro.js +0 -119
  672. package/node_modules/zod/v4/locales/ru.cjs +0 -183
  673. package/node_modules/zod/v4/locales/ru.d.cts +0 -5
  674. package/node_modules/zod/v4/locales/ru.d.ts +0 -4
  675. package/node_modules/zod/v4/locales/ru.js +0 -156
  676. package/node_modules/zod/v4/locales/sl.cjs +0 -136
  677. package/node_modules/zod/v4/locales/sl.d.cts +0 -5
  678. package/node_modules/zod/v4/locales/sl.d.ts +0 -4
  679. package/node_modules/zod/v4/locales/sl.js +0 -109
  680. package/node_modules/zod/v4/locales/sv.cjs +0 -137
  681. package/node_modules/zod/v4/locales/sv.d.cts +0 -5
  682. package/node_modules/zod/v4/locales/sv.d.ts +0 -4
  683. package/node_modules/zod/v4/locales/sv.js +0 -110
  684. package/node_modules/zod/v4/locales/ta.cjs +0 -137
  685. package/node_modules/zod/v4/locales/ta.d.cts +0 -5
  686. package/node_modules/zod/v4/locales/ta.d.ts +0 -4
  687. package/node_modules/zod/v4/locales/ta.js +0 -110
  688. package/node_modules/zod/v4/locales/th.cjs +0 -137
  689. package/node_modules/zod/v4/locales/th.d.cts +0 -5
  690. package/node_modules/zod/v4/locales/th.d.ts +0 -4
  691. package/node_modules/zod/v4/locales/th.js +0 -110
  692. package/node_modules/zod/v4/locales/tr.cjs +0 -132
  693. package/node_modules/zod/v4/locales/tr.d.cts +0 -5
  694. package/node_modules/zod/v4/locales/tr.d.ts +0 -4
  695. package/node_modules/zod/v4/locales/tr.js +0 -105
  696. package/node_modules/zod/v4/locales/ua.cjs +0 -12
  697. package/node_modules/zod/v4/locales/ua.d.cts +0 -5
  698. package/node_modules/zod/v4/locales/ua.d.ts +0 -5
  699. package/node_modules/zod/v4/locales/ua.js +0 -5
  700. package/node_modules/zod/v4/locales/uk.cjs +0 -135
  701. package/node_modules/zod/v4/locales/uk.d.cts +0 -5
  702. package/node_modules/zod/v4/locales/uk.d.ts +0 -4
  703. package/node_modules/zod/v4/locales/uk.js +0 -108
  704. package/node_modules/zod/v4/locales/ur.cjs +0 -137
  705. package/node_modules/zod/v4/locales/ur.d.cts +0 -5
  706. package/node_modules/zod/v4/locales/ur.d.ts +0 -4
  707. package/node_modules/zod/v4/locales/ur.js +0 -110
  708. package/node_modules/zod/v4/locales/uz.cjs +0 -137
  709. package/node_modules/zod/v4/locales/uz.d.cts +0 -5
  710. package/node_modules/zod/v4/locales/uz.d.ts +0 -4
  711. package/node_modules/zod/v4/locales/uz.js +0 -110
  712. package/node_modules/zod/v4/locales/vi.cjs +0 -135
  713. package/node_modules/zod/v4/locales/vi.d.cts +0 -5
  714. package/node_modules/zod/v4/locales/vi.d.ts +0 -4
  715. package/node_modules/zod/v4/locales/vi.js +0 -108
  716. package/node_modules/zod/v4/locales/yo.cjs +0 -134
  717. package/node_modules/zod/v4/locales/yo.d.cts +0 -5
  718. package/node_modules/zod/v4/locales/yo.d.ts +0 -4
  719. package/node_modules/zod/v4/locales/yo.js +0 -107
  720. package/node_modules/zod/v4/locales/zh-CN.cjs +0 -136
  721. package/node_modules/zod/v4/locales/zh-CN.d.cts +0 -5
  722. package/node_modules/zod/v4/locales/zh-CN.d.ts +0 -4
  723. package/node_modules/zod/v4/locales/zh-CN.js +0 -109
  724. package/node_modules/zod/v4/locales/zh-TW.cjs +0 -134
  725. package/node_modules/zod/v4/locales/zh-TW.d.cts +0 -5
  726. package/node_modules/zod/v4/locales/zh-TW.d.ts +0 -4
  727. package/node_modules/zod/v4/locales/zh-TW.js +0 -107
  728. package/node_modules/zod/v4/mini/checks.cjs +0 -34
  729. package/node_modules/zod/v4/mini/checks.d.cts +0 -1
  730. package/node_modules/zod/v4/mini/checks.d.ts +0 -1
  731. package/node_modules/zod/v4/mini/checks.js +0 -1
  732. package/node_modules/zod/v4/mini/coerce.cjs +0 -52
  733. package/node_modules/zod/v4/mini/coerce.d.cts +0 -7
  734. package/node_modules/zod/v4/mini/coerce.d.ts +0 -7
  735. package/node_modules/zod/v4/mini/coerce.js +0 -22
  736. package/node_modules/zod/v4/mini/external.cjs +0 -63
  737. package/node_modules/zod/v4/mini/external.d.cts +0 -13
  738. package/node_modules/zod/v4/mini/external.d.ts +0 -13
  739. package/node_modules/zod/v4/mini/external.js +0 -14
  740. package/node_modules/zod/v4/mini/index.cjs +0 -32
  741. package/node_modules/zod/v4/mini/index.d.cts +0 -3
  742. package/node_modules/zod/v4/mini/index.d.ts +0 -3
  743. package/node_modules/zod/v4/mini/index.js +0 -3
  744. package/node_modules/zod/v4/mini/iso.cjs +0 -64
  745. package/node_modules/zod/v4/mini/iso.d.cts +0 -22
  746. package/node_modules/zod/v4/mini/iso.d.ts +0 -22
  747. package/node_modules/zod/v4/mini/iso.js +0 -34
  748. package/node_modules/zod/v4/mini/package.json +0 -7
  749. package/node_modules/zod/v4/mini/parse.cjs +0 -16
  750. package/node_modules/zod/v4/mini/parse.d.cts +0 -1
  751. package/node_modules/zod/v4/mini/parse.d.ts +0 -1
  752. package/node_modules/zod/v4/mini/parse.js +0 -1
  753. package/node_modules/zod/v4/mini/schemas.cjs +0 -1083
  754. package/node_modules/zod/v4/mini/schemas.d.cts +0 -445
  755. package/node_modules/zod/v4/mini/schemas.d.ts +0 -445
  756. package/node_modules/zod/v4/mini/schemas.js +0 -961
  757. package/node_modules/zod/v4/package.json +0 -7
  758. package/node_modules/zod/v4-mini/index.cjs +0 -32
  759. package/node_modules/zod/v4-mini/index.d.cts +0 -3
  760. package/node_modules/zod/v4-mini/index.d.ts +0 -3
  761. package/node_modules/zod/v4-mini/index.js +0 -3
  762. package/node_modules/zod/v4-mini/package.json +0 -7
  763. /package/dist/{rolldown-runtime-D7D4PA-g.js → .setup/rolldown-runtime-D7D4PA-g.mjs} +0 -0
@@ -1,52 +1,44 @@
1
- import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
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-Da06-LOL.js";
6
- import { n as signalRpcRequest, r as streamSignalEvents, t as signalCheck } from "./client-adapter-mXGeEHQJ.js";
7
- import { n as sendReactionSignal } from "./reaction-runtime-api-BjeDyKcz.js";
8
- import { a as maybeResolveSignalApprovalReaction, l as resolveSignalApprovalConversationKey, s as registerSignalApprovalReactionTargetForDeliveredPayload, t as addSignalApprovalReactionHintToStructuredPayload } from "./approval-reactions-DtL47gSK.js";
9
- import { r as registerSignalQuestionReactionTargetForDeliveredPayload, t as maybeResolveSignalQuestionReaction } from "./question-reactions-Ds48FtEu.js";
10
- import { n as sendReadReceiptSignal, r as sendTypingSignal, t as sendMessageSignal } from "./send-B_Ks4MZr.js";
11
- import { bindIngressLifecycleToReplyOptions, createChannelIngressError, createChannelIngressMonitor, createChannelMessageReplyPipeline, resolveChannelStreamingBlockEnabled } from "openclaw/plugin-sdk/channel-outbound";
1
+ import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.mjs";
2
+ import { a as resolveSignalReplyToMode, i as resolveSignalAccount } from "./accounts-Bz4HtP0g.mjs";
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-C8-yk4J9.mjs";
4
+ import { a as isSignalNativeApprovalHandlerConfigured, n as resolveSignalReactionLevel } from "./message-actions-Cplx3XNC.mjs";
5
+ import { n as signalRpcRequest, r as streamSignalEvents, t as signalCheck } from "./client-adapter-BiGMiCr4.mjs";
6
+ import { n as sendReactionSignal, t as removeReactionSignal } from "./reaction-runtime-api-CAxalUfb.mjs";
7
+ import { a as maybeResolveSignalApprovalReaction, l as resolveSignalApprovalConversationKey, s as registerSignalApprovalReactionTargetForDeliveredPayload, t as addSignalApprovalReactionHintToStructuredPayload } from "./approval-reactions-DoY1BVpl.mjs";
8
+ import { n as sendReadReceiptSignal, r as sendTypingSignal, t as sendMessageSignal } from "./send-CF_VPaZJ.mjs";
9
+ import { createChannelMessageReplyPipeline } from "openclaw/plugin-sdk/channel-outbound";
12
10
  import { createChannelPairingChallengeIssuer } from "openclaw/plugin-sdk/channel-pairing";
13
- import { canonicalizeBase64, detectMime, estimateBase64DecodedBytes, kindFromMime, saveMediaBuffer } from "openclaw/plugin-sdk/media-runtime";
11
+ import { detectMime, estimateBase64DecodedBytes, kindFromMime, saveMediaBuffer } from "openclaw/plugin-sdk/media-runtime";
14
12
  import { resolveAgentRoute, resolveInboundLastRouteSessionKey } from "openclaw/plugin-sdk/routing";
15
- import { normalizeNullableString, normalizeOptionalString, normalizeStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
13
+ import { normalizeOptionalString, normalizeStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
16
14
  import { CHANNEL_APPROVAL_NATIVE_RUNTIME_CONTEXT_CAPABILITY } from "openclaw/plugin-sdk/approval-handler-adapter-runtime";
17
15
  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, toInboundMediaFactsWithMetadata } from "openclaw/plugin-sdk/channel-inbound";
19
16
  import nodePath from "node:path";
20
- import { collectErrorGraphCandidates, formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
21
17
  import { resolvePinnedMainDmOwnerFromAllowlist } from "openclaw/plugin-sdk/security-runtime";
22
- import { isRecord as isRecord$1 } from "openclaw/plugin-sdk/channel-secret-basic-runtime";
23
18
  import { resolveChannelGroupPolicy, resolveChannelGroupRequireMention } from "openclaw/plugin-sdk/channel-policy";
24
19
  import { registerChannelRuntimeContext } from "openclaw/plugin-sdk/channel-runtime-context";
25
20
  import { DEFAULT_GROUP_HISTORY_LIMIT, createChannelHistoryWindow } from "openclaw/plugin-sdk/reply-history";
26
21
  import { deliverTextOrMediaReply, resolveSendableOutboundReplyParts } from "openclaw/plugin-sdk/reply-payload";
27
- import { chunkTextWithMode, createReplyReferencePlanner, resolveChunkMode, resolveTextChunkLimit } from "openclaw/plugin-sdk/reply-runtime";
22
+ import { chunkTextWithMode, createReplyDispatcherWithTyping, createReplyReferencePlanner, dispatchInboundMessage, resolveChunkMode, resolveTextChunkLimit, settleReplyDispatcher } from "openclaw/plugin-sdk/reply-runtime";
28
23
  import { getRuntimeConfig } from "openclaw/plugin-sdk/runtime-config-snapshot";
29
- import { computeBackoff, createNonExitingRuntime, danger, logVerbose, shouldLogVerbose, sleepWithAbort } from "openclaw/plugin-sdk/runtime-env";
24
+ import { computeBackoff, createNonExitingRuntime, danger, logVerbose, shouldLogVerbose, sleep, sleepWithAbort } from "openclaw/plugin-sdk/runtime-env";
30
25
  import { resolveAllowlistProviderRuntimeGroupPolicy, resolveDefaultGroupPolicy, warnMissingProviderGroupPolicyFallbackOnce } from "openclaw/plugin-sdk/runtime-group-policy";
31
26
  import { waitForTransportReady } from "openclaw/plugin-sdk/transport-ready-runtime";
32
27
  import { spawn } from "node:child_process";
33
28
  import os from "node:os";
34
29
  import { createInterface } from "node:readline";
35
- import { setTimeout as setTimeout$1 } from "node:timers/promises";
36
30
  import { resolveHumanDelayConfig } from "openclaw/plugin-sdk/agent-runtime";
37
31
  import { DEFAULT_EMOJIS, DEFAULT_TIMING, createStatusReactionController, logAckFailure, logTypingFailure, resolveAckReaction, shouldAckReaction } from "openclaw/plugin-sdk/channel-feedback";
38
- import { createChannelIngressResolver, defineStableChannelIngressIdentity, fanInChannelIngressLifecycles } from "openclaw/plugin-sdk/channel-ingress-runtime";
39
- import { isControlCommandMessage } from "openclaw/plugin-sdk/command-detection";
32
+ import { buildChannelInboundEventContext, buildMentionRegexes, createChannelInboundDebouncer, filterChannelInboundQuoteContext, formatInboundEnvelope, formatInboundFromLabel, formatInboundMediaUnavailableText, hasVisibleInboundReplyDispatch, logInboundDrop, matchesMentionPatterns, resolveEnvelopeFormatOptions, resolveInboundMentionDecision, runChannelInboundEvent, shouldDebounceTextInbound } from "openclaw/plugin-sdk/channel-inbound";
33
+ import { hasControlCommand } from "openclaw/plugin-sdk/command-auth-native";
34
+ import { recordInboundSession, upsertChannelPairingRequest } from "openclaw/plugin-sdk/conversation-runtime";
40
35
  import { createInternalHookEvent, fireAndForgetHook, toInternalMessageReceivedContext, triggerInternalHook } from "openclaw/plugin-sdk/hook-runtime";
41
36
  import { resolveBatchedReplyThreadingPolicy } from "openclaw/plugin-sdk/reply-reference";
42
37
  import { readSessionUpdatedAt, resolveStorePath } from "openclaw/plugin-sdk/session-store-runtime";
43
38
  import { enqueueSystemEvent } from "openclaw/plugin-sdk/system-event-runtime";
44
- import { upsertChannelPairingRequest } from "openclaw/plugin-sdk/conversation-runtime";
45
- import { listChatCommands, maybeResolveTextAlias, normalizeCommandBody } from "openclaw/plugin-sdk/command-auth-native";
46
- import { isAbortRequestText } from "openclaw/plugin-sdk/command-primitives-runtime";
39
+ import { createChannelIngressResolver, defineStableChannelIngressIdentity } from "openclaw/plugin-sdk/channel-ingress-runtime";
47
40
  import { resolveChannelContextVisibilityMode } from "openclaw/plugin-sdk/context-visibility-runtime";
48
41
  //#region extensions/signal/src/daemon.ts
49
- const SIGNAL_DAEMON_STOP_KILL_TIMEOUT_MS = 1500;
50
42
  function formatSignalDaemonExit(exit) {
51
43
  return `signal daemon exited (source=${exit.source} code=${exit.code ?? "null"} signal=${exit.signal ?? "null"})`;
52
44
  }
@@ -99,7 +91,6 @@ function spawnSignalDaemon(opts) {
99
91
  const error = opts.runtime?.error ?? (() => {});
100
92
  let exited = false;
101
93
  let settledExit = false;
102
- let stopPromise;
103
94
  let resolveExit;
104
95
  const exitedPromise = new Promise((resolve) => {
105
96
  resolveExit = resolve;
@@ -140,42 +131,19 @@ function spawnSignalDaemon(opts) {
140
131
  });
141
132
  });
142
133
  child.on("error", (err) => {
143
- if (child.pid === void 0) {
144
- error(`signal-cli spawn error: ${String(err)}`);
145
- settleExit({
146
- source: "spawn-error",
147
- code: null,
148
- signal: null
149
- });
150
- } else error(`signal-cli process error: ${String(err)}`);
134
+ error(`signal-cli spawn error: ${String(err)}`);
135
+ settleExit({
136
+ source: "spawn-error",
137
+ code: null,
138
+ signal: null
139
+ });
151
140
  });
152
141
  return {
153
142
  pid: child.pid ?? void 0,
154
143
  exited: exitedPromise,
155
144
  isExited: () => exited,
156
145
  stop: () => {
157
- if (exited) return Promise.resolve();
158
- if (stopPromise) return stopPromise;
159
- if (!child.killed) try {
160
- child.kill("SIGTERM");
161
- } catch (err) {
162
- error(`signal-cli stop error: ${String(err)}`);
163
- }
164
- stopPromise = new Promise((resolve) => {
165
- const timeout = setTimeout(() => {
166
- if (!exited) try {
167
- child.kill("SIGKILL");
168
- } catch (err) {
169
- error(`signal-cli force-stop error: ${String(err)}`);
170
- }
171
- }, SIGNAL_DAEMON_STOP_KILL_TIMEOUT_MS);
172
- timeout.unref?.();
173
- exitedPromise.then(() => {
174
- clearTimeout(timeout);
175
- resolve();
176
- });
177
- });
178
- return stopPromise;
146
+ if (!child.killed && !exited) child.kill("SIGTERM");
179
147
  }
180
148
  };
181
149
  }
@@ -246,8 +214,8 @@ function signalSubjectInput(params) {
246
214
  return {
247
215
  stableId: formatSignalSenderId(params.sender),
248
216
  aliases: {
249
- phone: params.sender.kind === "phone" ? params.sender.e164 : params.sender.aliases?.e164,
250
- uuid: params.sender.kind === "uuid" ? params.sender.raw : params.sender.aliases?.uuid,
217
+ phone: params.sender.kind === "phone" ? params.sender.e164 : void 0,
218
+ uuid: params.sender.kind === "uuid" ? params.sender.raw : void 0,
251
219
  group: params.groupId
252
220
  }
253
221
  };
@@ -313,88 +281,6 @@ async function handleSignalDirectMessageAccess(params) {
313
281
  return false;
314
282
  }
315
283
  //#endregion
316
- //#region extensions/signal/src/monitor/event-handler.control-lane.ts
317
- const SIGNAL_ACTIVE_RUN_CONTROL_COMMAND_KEYS = /* @__PURE__ */ new Set([
318
- "approve",
319
- "commands",
320
- "context",
321
- "help",
322
- "status",
323
- "steer",
324
- "tasks",
325
- "tools",
326
- "whoami"
327
- ]);
328
- function resolveSignalConversationId(entry) {
329
- return (entry.isGroup ? entry.groupId : entry.senderPeerId)?.trim() || null;
330
- }
331
- function resolveSignalInboundDebounceKey(accountId, entry) {
332
- const conversationId = resolveSignalConversationId(entry);
333
- if (!conversationId || !entry.senderPeerId) return null;
334
- return `signal:${accountId}:${conversationId}:${entry.senderPeerId}`;
335
- }
336
- function resolveSignalInboundConversationKey(accountId, entry) {
337
- const conversationId = resolveSignalConversationId(entry);
338
- return conversationId ? `signal:${accountId}:${conversationId}` : null;
339
- }
340
- function isSignalActiveRunControlText(text) {
341
- if (isAbortRequestText(text)) return true;
342
- const normalizedBody = normalizeCommandBody(text.trim());
343
- const alias = maybeResolveTextAlias(normalizedBody);
344
- if (!alias) return false;
345
- const command = listChatCommands().find((entry) => entry.textAliases.some((candidate) => candidate.trim().toLowerCase() === alias));
346
- if (command?.key === "queue") return normalizedBody.slice(alias.length).trim() === "";
347
- return command ? SIGNAL_ACTIVE_RUN_CONTROL_COMMAND_KEYS.has(command.key) : false;
348
- }
349
- function resolveSignalControlLaneKey(accountId, entry) {
350
- if (!entry.commandAuthorized || !isSignalActiveRunControlText(entry.commandBody)) return null;
351
- const conversationId = resolveSignalConversationId(entry);
352
- return conversationId ? `signal:${accountId}:${conversationId}:control` : null;
353
- }
354
- function createSignalPendingInboundRegistry(accountId) {
355
- const trackedEntries = /* @__PURE__ */ new WeakMap();
356
- const countsByConversation = /* @__PURE__ */ new Map();
357
- const track = (entry) => {
358
- if (trackedEntries.has(entry)) return;
359
- const conversationKey = resolveSignalInboundConversationKey(accountId, entry);
360
- const inboundKey = resolveSignalInboundDebounceKey(accountId, entry);
361
- if (!conversationKey || !inboundKey) return;
362
- const counts = countsByConversation.get(conversationKey) ?? /* @__PURE__ */ new Map();
363
- counts.set(inboundKey, (counts.get(inboundKey) ?? 0) + 1);
364
- countsByConversation.set(conversationKey, counts);
365
- trackedEntries.set(entry, {
366
- conversationKey,
367
- inboundKey
368
- });
369
- };
370
- const complete = (entries) => {
371
- for (const entry of entries) {
372
- const tracked = trackedEntries.get(entry);
373
- if (!tracked) continue;
374
- trackedEntries.delete(entry);
375
- const counts = countsByConversation.get(tracked.conversationKey);
376
- const nextCount = (counts?.get(tracked.inboundKey) ?? 0) - 1;
377
- if (nextCount > 0) {
378
- counts?.set(tracked.inboundKey, nextCount);
379
- continue;
380
- }
381
- counts?.delete(tracked.inboundKey);
382
- if (counts?.size === 0) countsByConversation.delete(tracked.conversationKey);
383
- }
384
- };
385
- const cancelPendingOnAbort = (entry, cancelKey) => {
386
- if (!entry.commandAuthorized || !isAbortRequestText(entry.commandBody)) return;
387
- const conversationKey = resolveSignalInboundConversationKey(accountId, entry);
388
- if (!conversationKey) return;
389
- for (const inboundKey of countsByConversation.get(conversationKey)?.keys() ?? []) cancelKey(inboundKey);
390
- };
391
- return {
392
- track,
393
- complete,
394
- cancelPendingOnAbort
395
- };
396
- }
397
- //#endregion
398
284
  //#region extensions/signal/src/monitor/inbound-context.ts
399
285
  function resolveSignalQuoteContext(params) {
400
286
  const contextVisibilityMode = resolveChannelContextVisibilityMode({
@@ -407,12 +293,7 @@ function resolveSignalQuoteContext(params) {
407
293
  sourceNumber: params.dataMessage?.quote?.author ?? null,
408
294
  sourceUuid: params.dataMessage?.quote?.authorUuid ?? null
409
295
  });
410
- const quoteSenderAllowed = resolveInboundSupplementalSenderAllowed({
411
- isGroup: params.isGroup,
412
- groupPolicy: params.effectiveGroupAllow.length === 0 ? "open" : "allowlist",
413
- allowFrom: params.effectiveGroupAllow,
414
- isSenderAllowed: (allowFrom) => quoteSender ? isSignalSenderAllowed(quoteSender, allowFrom) : false
415
- });
296
+ const quoteSenderAllowed = !params.isGroup || params.effectiveGroupAllow.length === 0 ? true : quoteSender ? isSignalSenderAllowed(quoteSender, params.effectiveGroupAllow) : false;
416
297
  const visibleQuote = filterChannelInboundQuoteContext(contextVisibilityMode, {
417
298
  body: quoteText,
418
299
  sender: quoteSender ? formatSignalSenderDisplay(quoteSender) : void 0,
@@ -447,41 +328,6 @@ function clampBounds(start, length, textLength) {
447
328
  end: Math.min(textLength, safeStart + Math.max(0, Math.trunc(length)))
448
329
  };
449
330
  }
450
- function isValidStructuredMention(message, mention) {
451
- if (!mention || !(mention.uuid || mention.number)) return false;
452
- const { start, length } = mention;
453
- if (typeof start !== "number" || typeof length !== "number") return false;
454
- return Number.isInteger(start) && Number.isInteger(length) && start >= 0 && length > 0 && start + length <= message.length;
455
- }
456
- function normalizeAccountPhone(account) {
457
- const trimmed = account?.trim();
458
- return trimmed ? normalizeE164(trimmed) : void 0;
459
- }
460
- function resolveSignalNativeMentionFacts(params) {
461
- const validMentions = (params.mentions ?? []).filter((mention) => isValidStructuredMention(params.message, mention));
462
- const botUuid = params.accountUuid?.trim();
463
- const botPhone = normalizeAccountPhone(params.account);
464
- const canDetectBotMention = Boolean(botUuid || botPhone);
465
- const mentionsBot = validMentions.some((mention) => {
466
- const mentionUuid = mention.uuid?.trim();
467
- if (botUuid && mentionUuid === botUuid) return true;
468
- const mentionNumber = mention.number?.trim();
469
- return Boolean(botPhone && mentionNumber && normalizeE164(mentionNumber) === botPhone);
470
- });
471
- return {
472
- canDetectBotMention,
473
- hasAnyMention: validMentions.length > 0,
474
- mentionsBot
475
- };
476
- }
477
- function resolveSignalMentionFacts(identity, message, mentions) {
478
- return resolveSignalNativeMentionFacts({
479
- message,
480
- mentions,
481
- account: identity.account,
482
- accountUuid: identity.accountUuid
483
- });
484
- }
485
331
  function renderSignalMentions(message, mentions) {
486
332
  if (!message || !mentions?.length) return message;
487
333
  let normalized = message;
@@ -498,14 +344,17 @@ function renderSignalMentions(message, mentions) {
498
344
  }
499
345
  //#endregion
500
346
  //#region extensions/signal/src/monitor/event-handler.ts
501
- const REPLY_SESSION_INIT_CONFLICT_MESSAGE_RE = /reply session initialization conflicted for \S+/u;
502
- const RETRYABLE_FLUSH_RETRY_DELAYS_MS = [
503
- 1e3,
504
- 2e3,
505
- 4e3
506
- ];
507
- function isSignalReplySessionInitConflictError(error) {
508
- return collectErrorGraphCandidates(error, (current) => [current.cause, current.error]).some((candidate) => REPLY_SESSION_INIT_CONFLICT_MESSAGE_RE.test(formatErrorMessage(candidate)));
347
+ function formatAttachmentKindCount(kind, count) {
348
+ if (kind === "attachment") return `${count} file${count > 1 ? "s" : ""}`;
349
+ return `${count} ${kind}${count > 1 ? "s" : ""}`;
350
+ }
351
+ function formatAttachmentSummaryPlaceholder(contentTypes) {
352
+ const kindCounts = /* @__PURE__ */ new Map();
353
+ for (const contentType of contentTypes) {
354
+ const kind = kindFromMime(contentType) ?? "attachment";
355
+ kindCounts.set(kind, (kindCounts.get(kind) ?? 0) + 1);
356
+ }
357
+ return `[${[...kindCounts.entries()].map(([kind, count]) => formatAttachmentKindCount(kind, count)).join(" + ")} attached]`;
509
358
  }
510
359
  function resolveSignalInboundRoute(params) {
511
360
  return resolveAgentRoute({
@@ -535,13 +384,26 @@ function resolveSignalStatusReactionEmojis(emojis) {
535
384
  };
536
385
  }
537
386
  async function finalizeSignalStatusReaction(params) {
538
- if (params.outcome === "done") await params.controller.setDone();
539
- else await params.controller.setError();
387
+ if (params.outcome === "done") {
388
+ await params.controller.setDone();
389
+ if (params.removeAckAfterReply) {
390
+ await sleep(params.timing.doneHoldMs);
391
+ await params.controller.clear();
392
+ } else await params.controller.restoreInitial();
393
+ return;
394
+ }
395
+ await params.controller.setError();
396
+ if (params.hasFinalResponse) {
397
+ if (params.removeAckAfterReply) {
398
+ await sleep(params.timing.errorHoldMs);
399
+ await params.controller.clear();
400
+ } else await params.controller.restoreInitial();
401
+ return;
402
+ }
403
+ if (params.removeAckAfterReply) await sleep(params.timing.errorHoldMs);
540
404
  await params.controller.restoreInitial();
541
405
  }
542
406
  function createSignalEventHandler(deps) {
543
- const statusReactionTiming = deps.statusReactionTiming ?? DEFAULT_TIMING;
544
- const activeEnqueueEntries = /* @__PURE__ */ new WeakSet();
545
407
  async function handleSignalInboundMessage(entry) {
546
408
  const fromLabel = formatInboundFromLabel({
547
409
  isGroup: entry.isGroup,
@@ -587,7 +449,7 @@ function createSignalEventHandler(deps) {
587
449
  channel: "Signal",
588
450
  from: fromLabel,
589
451
  timestamp: historyEntry.timestamp,
590
- body: `${[historyEntry.body, formatSignalMediaText(historyEntry.media ?? [])].filter(Boolean).join("\n")}${historyEntry.messageId ? ` [id:${historyEntry.messageId}]` : ""}`,
452
+ body: `${historyEntry.body}${historyEntry.messageId ? ` [id:${historyEntry.messageId}]` : ""}`,
591
453
  chatType: "group",
592
454
  senderLabel: historyEntry.sender,
593
455
  envelope: envelopeOptions
@@ -599,13 +461,20 @@ function createSignalEventHandler(deps) {
599
461
  historyKey,
600
462
  limit: deps.historyLimit
601
463
  }) : void 0;
602
- const replyToMode = resolveSignalReplyToMode({
464
+ const replyThreading = resolveBatchedReplyThreadingPolicy(resolveSignalReplyToMode({
603
465
  cfg: deps.cfg,
604
466
  accountId: deps.accountId,
605
467
  chatType: entry.isGroup ? "group" : "direct"
606
- });
607
- const replyThreading = resolveBatchedReplyThreadingPolicy(replyToMode, entry.isBatched === true);
608
- const media = await toInboundMediaFactsWithMetadata(entry.media);
468
+ }), entry.isBatched === true);
469
+ const media = entry.mediaPaths && entry.mediaPaths.length > 0 ? entry.mediaPaths.map((path, index) => ({
470
+ path,
471
+ url: path,
472
+ contentType: entry.mediaTypes?.[index]
473
+ })) : entry.mediaPath ? [{
474
+ path: entry.mediaPath,
475
+ url: entry.mediaPath,
476
+ contentType: entry.mediaType
477
+ }] : void 0;
609
478
  const ctxPayload = buildChannelInboundEventContext({
610
479
  channel: "signal",
611
480
  supplemental: { quote: entry.replyToBody ? {
@@ -627,7 +496,6 @@ function createSignalEventHandler(deps) {
627
496
  },
628
497
  route: {
629
498
  agentId: route.agentId,
630
- dmScope: route.dmScope,
631
499
  accountId: route.accountId,
632
500
  routeSessionKey: route.sessionKey
633
501
  },
@@ -642,7 +510,6 @@ function createSignalEventHandler(deps) {
642
510
  rawBody: entry.commandBody,
643
511
  commandBody: entry.commandBody
644
512
  },
645
- sessionTranscript: { historyLimit: entry.isGroup ? deps.historyLimit : 0 },
646
513
  access: {
647
514
  ...entry.isGroup ? { mentions: {
648
515
  canDetectMention: true,
@@ -657,7 +524,7 @@ function createSignalEventHandler(deps) {
657
524
  }
658
525
  });
659
526
  if (shouldLogVerbose()) {
660
- const preview = truncateUtf16Safe(body, 200).replace(/\r/g, "\\r").replace(/\n/g, "\\n");
527
+ const preview = truncateUtf16Safe(body, 200).replace(/\\n/g, "\\\\n");
661
528
  logVerbose(`signal inbound: from=${ctxPayload.From} len=${body.length} preview="${preview}"`);
662
529
  }
663
530
  const statusReactionTimestamp = resolveSignalStatusReactionTimestamp(entry);
@@ -675,6 +542,7 @@ function createSignalEventHandler(deps) {
675
542
  isDirect: !entry.isGroup,
676
543
  isGroup: entry.isGroup,
677
544
  isMentionableGroup: entry.isGroup,
545
+ requireMention: entry.requireMention === true,
678
546
  canDetectMention: entry.canDetectMention === true,
679
547
  effectiveWasMentioned: entry.wasMentioned === true
680
548
  }));
@@ -690,14 +558,23 @@ function createSignalEventHandler(deps) {
690
558
  } : {}
691
559
  };
692
560
  const statusReactionRecipient = entry.isGroup ? "" : entry.senderRecipient;
561
+ let currentStatusReactionEmoji = ackReaction;
693
562
  const statusReactionController = statusReactionsConfig?.enabled === true && signalReactionLevel.level !== "off" && shouldSendStatusReaction && statusReactionTimestamp ? createStatusReactionController({
694
563
  enabled: true,
695
- adapter: { setReaction: async (emoji) => {
696
- await sendReactionSignal(statusReactionRecipient, statusReactionTimestamp, emoji, signalReactionOpts);
697
- } },
564
+ adapter: {
565
+ setReaction: async (emoji) => {
566
+ await sendReactionSignal(statusReactionRecipient, statusReactionTimestamp, emoji, signalReactionOpts);
567
+ currentStatusReactionEmoji = emoji;
568
+ },
569
+ clearReaction: async () => {
570
+ if (!currentStatusReactionEmoji) return;
571
+ await removeReactionSignal(statusReactionRecipient, statusReactionTimestamp, currentStatusReactionEmoji, signalReactionOpts);
572
+ currentStatusReactionEmoji = "";
573
+ }
574
+ },
698
575
  initialEmoji: ackReaction,
699
- emojis: resolveSignalStatusReactionEmojis(void 0),
700
- timing: statusReactionTiming,
576
+ emojis: resolveSignalStatusReactionEmojis(statusReactionsConfig.emojis),
577
+ timing: statusReactionsConfig.timing,
701
578
  onError: (err) => {
702
579
  logAckFailure({
703
580
  log: logVerbose,
@@ -707,6 +584,10 @@ function createSignalEventHandler(deps) {
707
584
  });
708
585
  }
709
586
  }) : null;
587
+ const statusReactionTiming = {
588
+ ...DEFAULT_TIMING,
589
+ ...statusReactionsConfig?.timing
590
+ };
710
591
  if (statusReactionController) statusReactionController.setQueued();
711
592
  const { onModelSelected, typingCallbacks, ...replyPipeline } = createChannelMessageReplyPipeline({
712
593
  cfg: deps.cfg,
@@ -737,15 +618,12 @@ function createSignalEventHandler(deps) {
737
618
  replyToId: ctxPayload.ReplyToId,
738
619
  author: entry.senderRecipient,
739
620
  body: entry.nativeReplyBody ?? entry.bodyText,
740
- allowImplicitCurrentMessage: replyToMode !== "off" && replyThreading?.implicitCurrentMessage !== "deny",
741
621
  state: { hasReplied: false }
742
622
  };
743
- const dispatcherOptions = {
623
+ const { dispatcher, replyOptions, markDispatchIdle } = createReplyDispatcherWithTyping({
744
624
  ...replyPipeline,
745
625
  humanDelay: resolveHumanDelayConfig(deps.cfg, route.agentId),
746
- typingCallbacks
747
- };
748
- const delivery = {
626
+ typingCallbacks,
749
627
  deliver: async (payload, _info) => {
750
628
  await deps.deliverReplies({
751
629
  cfg: deps.cfg,
@@ -765,7 +643,7 @@ function createSignalEventHandler(deps) {
765
643
  onError: (err, info) => {
766
644
  deps.runtime.error?.(danger(`signal ${info.kind} reply failed: ${String(err)}`));
767
645
  }
768
- };
646
+ });
769
647
  const inboundLastRouteSessionKey = resolveInboundLastRouteSessionKey({
770
648
  route,
771
649
  sessionKey: route.sessionKey
@@ -782,14 +660,12 @@ function createSignalEventHandler(deps) {
782
660
  raw: entry
783
661
  }),
784
662
  resolveTurn: () => ({
785
- cfg: deps.cfg,
786
663
  channel: "signal",
787
664
  accountId: route.accountId,
788
- route: {
789
- agentId: route.agentId,
790
- sessionKey: route.sessionKey
791
- },
665
+ routeSessionKey: route.sessionKey,
666
+ storePath,
792
667
  ctxPayload,
668
+ recordInboundSession,
793
669
  record: {
794
670
  updateLastRoute: !entry.isGroup ? {
795
671
  sessionKey: inboundLastRouteSessionKey,
@@ -823,31 +699,41 @@ function createSignalEventHandler(deps) {
823
699
  historyMap: deps.groupHistories,
824
700
  limit: deps.historyLimit
825
701
  },
826
- afterRecord: () => {
827
- if (statusReactionController) statusReactionController.setThinking();
828
- },
829
- dispatcherOptions,
830
- delivery,
831
- sessionInitRetry: { delaysMs: [] },
832
- replyOptions: {
833
- ...entry.turnAdoptionLifecycle ? bindIngressLifecycleToReplyOptions(entry.turnAdoptionLifecycle) : {},
834
- disableBlockStreaming: typeof deps.blockStreaming === "boolean" ? !deps.blockStreaming : void 0,
835
- ...statusReactionController ? {
836
- allowProgressCallbacksWhenSourceDeliverySuppressed: true,
837
- allowToolLifecycleWhenProgressHidden: true,
838
- onToolStart: async (payload) => {
839
- const toolName = payload.name?.trim();
840
- if (toolName) await statusReactionController.setTool(toolName);
841
- },
842
- onCompactionStart: async () => {
843
- await statusReactionController.setCompacting();
844
- },
845
- onCompactionEnd: async () => {
846
- statusReactionController.cancelPending();
847
- await statusReactionController.setThinking();
848
- }
849
- } : {},
850
- onModelSelected
702
+ onPreDispatchFailure: () => settleReplyDispatcher({
703
+ dispatcher,
704
+ onSettled: () => markDispatchIdle()
705
+ }),
706
+ runDispatch: async () => {
707
+ try {
708
+ if (statusReactionController) statusReactionController.setThinking();
709
+ return await dispatchInboundMessage({
710
+ ctx: ctxPayload,
711
+ cfg: deps.cfg,
712
+ dispatcher,
713
+ replyOptions: {
714
+ ...replyOptions,
715
+ disableBlockStreaming: typeof deps.blockStreaming === "boolean" ? !deps.blockStreaming : void 0,
716
+ ...statusReactionController ? {
717
+ allowProgressCallbacksWhenSourceDeliverySuppressed: true,
718
+ allowToolLifecycleWhenProgressHidden: true,
719
+ onToolStart: async (payload) => {
720
+ const toolName = payload.name?.trim();
721
+ if (toolName) await statusReactionController.setTool(toolName);
722
+ },
723
+ onCompactionStart: async () => {
724
+ await statusReactionController.setCompacting();
725
+ },
726
+ onCompactionEnd: async () => {
727
+ statusReactionController.cancelPending();
728
+ await statusReactionController.setThinking();
729
+ }
730
+ } : {},
731
+ onModelSelected
732
+ }
733
+ });
734
+ } finally {
735
+ markDispatchIdle();
736
+ }
851
737
  }
852
738
  }),
853
739
  onFinalize: (result) => {
@@ -856,7 +742,10 @@ function createSignalEventHandler(deps) {
856
742
  const hasDeliveryFailure = result.dispatched && hasSignalStatusReplyDeliveryFailure(result.dispatchResult);
857
743
  finalizeSignalStatusReaction({
858
744
  controller: statusReactionController,
859
- outcome: hasFinalResponse && !hasDeliveryFailure ? "done" : "error"
745
+ outcome: hasFinalResponse && !hasDeliveryFailure ? "done" : "error",
746
+ hasFinalResponse,
747
+ removeAckAfterReply: deps.cfg.messages?.removeAckAfterReply ?? false,
748
+ timing: statusReactionTiming
860
749
  }).catch((err) => {
861
750
  logVerbose(`signal: status reaction finalize failed: ${String(err)}`);
862
751
  });
@@ -864,116 +753,46 @@ function createSignalEventHandler(deps) {
864
753
  }
865
754
  });
866
755
  }
867
- async function flushSignalInboundEntries(entries, lifecycle, settle) {
868
- const last = entries.at(-1);
869
- if (!last) return;
870
- if (entries.length === 1) {
871
- await handleSignalInboundMessage({
872
- ...last,
873
- turnAdoptionLifecycle: lifecycle
756
+ const { debouncer: inboundDebouncer } = createChannelInboundDebouncer({
757
+ cfg: deps.cfg,
758
+ channel: "signal",
759
+ buildKey: (entry) => {
760
+ const conversationId = entry.isGroup ? entry.groupId ?? "unknown" : entry.senderPeerId;
761
+ if (!conversationId || !entry.senderPeerId) return null;
762
+ return `signal:${deps.accountId}:${conversationId}:${entry.senderPeerId}`;
763
+ },
764
+ shouldDebounce: (entry) => {
765
+ return shouldDebounceTextInbound({
766
+ text: entry.commandBody,
767
+ cfg: deps.cfg,
768
+ hasMedia: Boolean(entry.mediaPath || entry.mediaType || entry.mediaPaths?.length)
874
769
  });
875
- await settle();
876
- return;
877
- }
878
- const combinedText = entries.map((entry) => entry.bodyText).filter(Boolean).join("\n");
879
- const combinedCommandBody = entries.map((entry) => entry.commandBody).filter(Boolean).join("\n");
880
- if (!combinedText.trim()) {
881
- await settle();
882
- return;
883
- }
884
- await handleSignalInboundMessage({
885
- ...last,
886
- bodyText: combinedText,
887
- commandBody: combinedCommandBody,
888
- turnAdoptionLifecycle: lifecycle,
889
- isBatched: true,
890
- nativeReplyBody: last.nativeReplyBody ?? last.bodyText,
891
- media: entries.flatMap((entry) => entry.media ?? [])
892
- });
893
- await settle();
894
- }
895
- async function retrySignalInboundFlush(entries, lifecycle, settle, initialError) {
896
- let lastError = initialError;
897
- for (const [attemptIndex, delayMs] of RETRYABLE_FLUSH_RETRY_DELAYS_MS.entries()) {
898
- const attempt = attemptIndex + 1;
899
- logVerbose(`signal: reply session init conflict, retrying ${entries.length} inbound message(s) in ${delayMs}ms (attempt ${attempt}/${RETRYABLE_FLUSH_RETRY_DELAYS_MS.length})`);
900
- try {
901
- await setTimeout$1(delayMs, void 0, {
902
- ref: false,
903
- signal: deps.abortSignal
904
- });
905
- } catch (err) {
906
- if (deps.abortSignal?.aborted) return;
907
- throw err;
908
- }
909
- if (deps.abortSignal?.aborted) return;
910
- try {
911
- await flushSignalInboundEntries(entries, lifecycle, settle);
770
+ },
771
+ onFlush: async (entries) => {
772
+ const last = entries.at(-1);
773
+ if (!last) return;
774
+ if (entries.length === 1) {
775
+ await handleSignalInboundMessage(last);
912
776
  return;
913
- } catch (err) {
914
- if (deps.abortSignal?.aborted) return;
915
- lastError = err;
916
- if (!isSignalReplySessionInitConflictError(err)) throw err;
917
777
  }
778
+ const combinedText = entries.map((entry) => entry.bodyText).filter(Boolean).join("\\n");
779
+ const combinedCommandBody = entries.map((entry) => entry.commandBody).filter(Boolean).join("\\n");
780
+ if (!combinedText.trim()) return;
781
+ await handleSignalInboundMessage({
782
+ ...last,
783
+ bodyText: combinedText,
784
+ commandBody: combinedCommandBody,
785
+ isBatched: true,
786
+ nativeReplyBody: last.nativeReplyBody ?? last.bodyText,
787
+ mediaPath: void 0,
788
+ mediaType: void 0,
789
+ mediaPaths: void 0,
790
+ mediaTypes: void 0
791
+ });
792
+ },
793
+ onError: (err) => {
794
+ deps.runtime.error?.(`signal debounce flush failed: ${String(err)}`);
918
795
  }
919
- throw lastError;
920
- }
921
- const flushDebouncedSignalInboundEntries = (entries, createFlush) => {
922
- const { lifecycle, settle } = fanInChannelIngressLifecycles(entries.map((entry) => entry.turnAdoptionLifecycle));
923
- return createFlush({
924
- lifecycle,
925
- dispatch: async (admissionLifecycle) => {
926
- if (!entries.some((entry) => activeEnqueueEntries.has(entry)) && deps.abortSignal?.aborted) return;
927
- try {
928
- await flushSignalInboundEntries(entries, admissionLifecycle, settle);
929
- } catch (err) {
930
- if (!isSignalReplySessionInitConflictError(err)) throw err;
931
- if (deps.abortSignal?.aborted) return;
932
- await retrySignalInboundFlush(entries, admissionLifecycle, settle, err).catch(async (terminalError) => {
933
- await Promise.all(entries.map((entry) => Promise.resolve(entry.turnAdoptionLifecycle?.onAbandoned())));
934
- throw terminalError;
935
- });
936
- }
937
- }
938
- });
939
- };
940
- const reportSignalInboundFlushError = (err) => {
941
- deps.runtime.error?.(`signal debounce flush failed: ${String(err)}`);
942
- };
943
- const pendingInboundRegistry = createSignalPendingInboundRegistry(deps.accountId);
944
- const trackSignalInboundFlush = (flush) => {
945
- deps.runTrackedTask?.(() => flush.completion.catch(() => void 0));
946
- return flush;
947
- };
948
- const flushNormalSignalInboundEntries = (entries, createFlush) => {
949
- const flush = flushDebouncedSignalInboundEntries(entries, createFlush);
950
- const completion = flush.completion.finally(() => pendingInboundRegistry.complete(entries));
951
- return trackSignalInboundFlush({
952
- admission: flush.admission,
953
- completion
954
- });
955
- };
956
- const { debouncer } = createChannelInboundDebouncer({
957
- cfg: deps.cfg,
958
- channel: "signal",
959
- buildKey: (entry) => resolveSignalInboundDebounceKey(deps.accountId, entry),
960
- shouldDebounce: (entry) => shouldDebounceTextInbound({
961
- text: entry.commandBody,
962
- cfg: deps.cfg,
963
- hasMedia: entry.media?.some((media) => Boolean(media.path || media.url)) === true
964
- }),
965
- onFlush: flushNormalSignalInboundEntries,
966
- onError: reportSignalInboundFlushError,
967
- onCancel: pendingInboundRegistry.complete
968
- });
969
- const { debouncer: controlDebouncer } = createChannelInboundDebouncer({
970
- cfg: deps.cfg,
971
- channel: "signal",
972
- serializeImmediate: true,
973
- buildKey: (entry) => resolveSignalControlLaneKey(deps.accountId, entry),
974
- shouldDebounce: () => false,
975
- onFlush: (entries, createFlush) => trackSignalInboundFlush(flushDebouncedSignalInboundEntries(entries, createFlush)),
976
- onError: reportSignalInboundFlushError
977
796
  });
978
797
  async function handleReactionOnlyInbound(params) {
979
798
  if (params.hasBodyContent) return false;
@@ -1001,18 +820,6 @@ function createSignalEventHandler(deps) {
1001
820
  logVerbose(`Blocked signal reaction sender ${params.senderDisplay} (${params.accessDecision.reasonCode})`);
1002
821
  return true;
1003
822
  }
1004
- if (conversationKey && await maybeResolveSignalQuestionReaction({
1005
- cfg: deps.cfg,
1006
- accountId: deps.accountId,
1007
- conversationKey,
1008
- messageId,
1009
- reactionKey: emojiLabel,
1010
- isRemove: Boolean(params.reaction.isRemove),
1011
- actorId: formatSignalSenderId(params.sender),
1012
- targetAuthor: params.reaction.targetAuthor,
1013
- targetAuthorUuid: params.reaction.targetAuthorUuid,
1014
- logDebug: logVerbose
1015
- })) return true;
1016
823
  const targets = deps.resolveSignalReactionTargets(params.reaction);
1017
824
  if (!deps.shouldEmitSignalReactionNotification({
1018
825
  mode: deps.reactionMode,
@@ -1052,7 +859,7 @@ function createSignalEventHandler(deps) {
1052
859
  });
1053
860
  return true;
1054
861
  }
1055
- return async (event, turnAdoptionLifecycle) => {
862
+ return async (event) => {
1056
863
  if (event.event !== "receive" || !event.data) return;
1057
864
  let payload;
1058
865
  try {
@@ -1071,11 +878,10 @@ function createSignalEventHandler(deps) {
1071
878
  if ("syncMessage" in envelope) return;
1072
879
  const dataMessage = envelope.dataMessage ?? envelope.editMessage?.dataMessage;
1073
880
  const reaction = deps.isSignalReactionMessage(envelope.reactionMessage) ? envelope.reactionMessage : deps.isSignalReactionMessage(dataMessage?.reaction) ? dataMessage?.reaction : null;
1074
- const rawMessage = dataMessage?.message ?? "";
1075
- const messageText = renderSignalMentions(rawMessage, dataMessage?.mentions).trim();
881
+ const messageText = renderSignalMentions(dataMessage?.message ?? "", dataMessage?.mentions).trim();
1076
882
  const groupId = dataMessage?.groupInfo?.groupId ?? reaction?.groupInfo?.groupId ?? void 0;
1077
883
  const isGroup = Boolean(groupId);
1078
- const hasControlCommandInMessage = isControlCommandMessage(messageText, deps.cfg);
884
+ const hasControlCommandInMessage = hasControlCommand(messageText, deps.cfg);
1079
885
  const senderDisplay = formatSignalSenderDisplay(sender);
1080
886
  const { senderAccess, commandAccess } = await resolveSignalAccessState({
1081
887
  accountId: deps.accountId,
@@ -1160,16 +966,8 @@ function createSignalEventHandler(deps) {
1160
966
  groupId,
1161
967
  senderPeerId
1162
968
  });
1163
- const inboundTimestamp = typeof envelope.timestamp === "number" ? envelope.timestamp : typeof dataMessage.timestamp === "number" ? dataMessage.timestamp : void 0;
1164
- const nativeReplyTargetTimestamp = typeof envelope.editMessage?.targetSentTimestamp === "number" ? envelope.editMessage.targetSentTimestamp : inboundTimestamp;
1165
- const messageId = typeof inboundTimestamp === "number" ? String(inboundTimestamp) : void 0;
1166
- const replyToId = typeof nativeReplyTargetTimestamp === "number" ? String(nativeReplyTargetTimestamp) : void 0;
1167
- const signalToRaw = isGroup ? `group:${groupId}` : `signal:${senderRecipient}`;
1168
- const signalTo = normalizeSignalMessagingTarget(signalToRaw) ?? signalToRaw;
1169
969
  const mentionRegexes = buildMentionRegexes(deps.cfg, route.agentId);
1170
- const textWasMentioned = isGroup && matchesMentionPatterns(messageText, mentionRegexes);
1171
- const nativeMentionFacts = resolveSignalMentionFacts(deps, rawMessage, dataMessage?.mentions);
1172
- const wasMentioned = isGroup && (textWasMentioned || nativeMentionFacts.mentionsBot);
970
+ const wasMentioned = isGroup && matchesMentionPatterns(messageText, mentionRegexes);
1173
971
  const requireMention = isGroup && resolveChannelGroupRequireMention({
1174
972
  cfg: deps.cfg,
1175
973
  channel: "signal",
@@ -1177,12 +975,12 @@ function createSignalEventHandler(deps) {
1177
975
  accountId: deps.accountId,
1178
976
  configuredGroupDefaultsToNoMention: true
1179
977
  });
1180
- const canDetectMention = mentionRegexes.length > 0 || nativeMentionFacts.canDetectBotMention;
978
+ const canDetectMention = mentionRegexes.length > 0;
1181
979
  const mentionDecision = resolveInboundMentionDecision({
1182
980
  facts: {
1183
981
  canDetectMention,
1184
982
  wasMentioned,
1185
- hasAnyMention: nativeMentionFacts.hasAnyMention,
983
+ hasAnyMention: false,
1186
984
  implicitMentionKinds: []
1187
985
  },
1188
986
  policy: {
@@ -1201,36 +999,27 @@ function createSignalEventHandler(deps) {
1201
999
  reason: "no mention",
1202
1000
  target: senderDisplay
1203
1001
  });
1204
- const pendingMedia = (dataMessage.attachments ?? []).map((attachment) => {
1205
- const contentType = attachment?.contentType ?? void 0;
1206
- return {
1207
- contentType,
1208
- kind: kindFromMime(contentType) ?? "unknown"
1209
- };
1210
- });
1211
- const pendingMediaText = formatSignalMediaText(pendingMedia);
1212
- const pendingBodyText = messageText || pendingMediaText || visibleQuoteText;
1002
+ const pendingPlaceholder = (() => {
1003
+ if (!dataMessage.attachments?.length) return "";
1004
+ if (deps.ignoreAttachments) return "<media:attachment>";
1005
+ const attachmentTypes = (dataMessage.attachments ?? []).map((attachment) => typeof attachment?.contentType === "string" ? attachment.contentType : void 0);
1006
+ if (attachmentTypes.length > 1) return formatAttachmentSummaryPlaceholder(attachmentTypes);
1007
+ const firstContentType = dataMessage.attachments?.[0]?.contentType;
1008
+ const pendingKind = kindFromMime(firstContentType ?? void 0);
1009
+ return pendingKind ? `<media:${pendingKind}>` : "<media:attachment>";
1010
+ })();
1011
+ const pendingBodyText = messageText || pendingPlaceholder || visibleQuoteText;
1213
1012
  const historyKey = groupId ?? "unknown";
1214
1013
  createChannelHistoryWindow({ historyMap: deps.groupHistories }).record({
1215
1014
  historyKey,
1216
1015
  limit: deps.historyLimit,
1217
1016
  entry: {
1218
1017
  sender: envelope.sourceName ?? senderDisplay,
1219
- body: messageText || visibleQuoteText,
1220
- media: toHistoryMediaEntries(pendingMedia),
1018
+ body: pendingBodyText,
1221
1019
  timestamp: envelope.timestamp ?? void 0,
1222
1020
  messageId: typeof envelope.timestamp === "number" ? String(envelope.timestamp) : void 0
1223
1021
  }
1224
1022
  });
1225
- await registerSignalReplyContext({
1226
- accountId: deps.accountId,
1227
- to: signalTo,
1228
- replyToId,
1229
- author: senderRecipient,
1230
- body: messageText || visibleQuoteText,
1231
- media: pendingMedia,
1232
- sourceTimestamp: inboundTimestamp
1233
- });
1234
1023
  const signalGroupPolicy = resolveChannelGroupPolicy({
1235
1024
  cfg: deps.cfg,
1236
1025
  channel: "signal",
@@ -1260,16 +1049,14 @@ function createSignalEventHandler(deps) {
1260
1049
  }
1261
1050
  return;
1262
1051
  }
1052
+ let mediaPath;
1053
+ let mediaType;
1054
+ const mediaPaths = [];
1055
+ const mediaTypes = [];
1056
+ let placeholder = "";
1263
1057
  const attachments = dataMessage.attachments ?? [];
1264
- const mediaFacts = attachments.map((attachment) => {
1265
- const contentType = attachment?.contentType ?? void 0;
1266
- return {
1267
- contentType,
1268
- kind: kindFromMime(contentType) ?? "unknown"
1269
- };
1270
- });
1271
1058
  let unavailableAttachmentCount = deps.ignoreAttachments ? attachments.length : 0;
1272
- if (!deps.ignoreAttachments) for (const [index, attachment] of attachments.entries()) {
1059
+ if (!deps.ignoreAttachments) for (const attachment of attachments) {
1273
1060
  if (!attachment?.id) {
1274
1061
  unavailableAttachmentCount += 1;
1275
1062
  continue;
@@ -1284,20 +1071,25 @@ function createSignalEventHandler(deps) {
1284
1071
  maxBytes: deps.mediaMaxBytes
1285
1072
  });
1286
1073
  if (fetched) {
1287
- const contentType = fetched.contentType ?? attachment.contentType ?? "application/octet-stream";
1288
- mediaFacts[index] = {
1289
- path: fetched.path,
1290
- url: fetched.path,
1291
- contentType,
1292
- kind: kindFromMime(contentType) ?? "unknown"
1293
- };
1074
+ mediaPaths.push(fetched.path);
1075
+ mediaTypes.push(fetched.contentType ?? attachment.contentType ?? "application/octet-stream");
1076
+ if (!mediaPath) {
1077
+ mediaPath = fetched.path;
1078
+ mediaType = fetched.contentType ?? attachment.contentType ?? void 0;
1079
+ }
1294
1080
  } else unavailableAttachmentCount += 1;
1295
1081
  } catch (err) {
1296
1082
  unavailableAttachmentCount += 1;
1297
1083
  deps.runtime.error?.(danger(`attachment fetch failed: ${String(err)}`));
1298
1084
  }
1299
1085
  }
1300
- let bodyText = messageText;
1086
+ if (mediaPaths.length > 1) placeholder = formatAttachmentSummaryPlaceholder(mediaTypes);
1087
+ else {
1088
+ const kind = kindFromMime(mediaType ?? void 0);
1089
+ if (kind) placeholder = `<media:${kind}>`;
1090
+ else if (mediaPaths.length > 0) placeholder = "<media:attachment>";
1091
+ }
1092
+ let bodyText = messageText || placeholder || visibleQuoteText || "";
1301
1093
  if (unavailableAttachmentCount > 0) {
1302
1094
  const attachmentLabel = unavailableAttachmentCount === 1 ? "attachment" : "attachments";
1303
1095
  bodyText = formatInboundMediaUnavailableText({
@@ -1305,7 +1097,9 @@ function createSignalEventHandler(deps) {
1305
1097
  notice: `[signal ${unavailableAttachmentCount > 1 ? `${unavailableAttachmentCount} ` : ""}${attachmentLabel} unavailable]`
1306
1098
  });
1307
1099
  }
1308
- if (!bodyText && mediaFacts.length === 0 && !visibleQuoteText) return;
1100
+ if (!bodyText) return;
1101
+ const inboundTimestamp = typeof envelope.timestamp === "number" ? envelope.timestamp : typeof dataMessage.timestamp === "number" ? dataMessage.timestamp : void 0;
1102
+ const nativeReplyTargetTimestamp = typeof envelope.editMessage?.targetSentTimestamp === "number" ? envelope.editMessage.targetSentTimestamp : inboundTimestamp;
1309
1103
  if (deps.sendReadReceipts && !deps.readReceiptsViaDaemon && !isGroup && inboundTimestamp) try {
1310
1104
  await sendReadReceiptSignal(`signal:${senderRecipient}`, inboundTimestamp, {
1311
1105
  cfg: deps.cfg,
@@ -1318,16 +1112,9 @@ function createSignalEventHandler(deps) {
1318
1112
  }
1319
1113
  else if (deps.sendReadReceipts && !deps.readReceiptsViaDaemon && !isGroup && !inboundTimestamp) logVerbose(`signal read receipt skipped (missing timestamp) for ${senderDisplay}`);
1320
1114
  const senderName = envelope.sourceName ?? senderDisplay;
1321
- await registerSignalReplyContext({
1322
- accountId: deps.accountId,
1323
- to: signalTo,
1324
- replyToId,
1325
- author: senderRecipient,
1326
- body: messageText,
1327
- media: mediaFacts,
1328
- sourceTimestamp: inboundTimestamp
1329
- });
1330
- const entry = {
1115
+ const messageId = typeof inboundTimestamp === "number" ? String(inboundTimestamp) : void 0;
1116
+ const replyToId = typeof nativeReplyTargetTimestamp === "number" ? String(nativeReplyTargetTimestamp) : void 0;
1117
+ await inboundDebouncer.enqueue({
1331
1118
  senderName,
1332
1119
  senderDisplay,
1333
1120
  senderRecipient,
@@ -1336,137 +1123,22 @@ function createSignalEventHandler(deps) {
1336
1123
  groupName,
1337
1124
  isGroup,
1338
1125
  bodyText,
1339
- nativeReplyBody: [messageText, formatSignalMediaText(mediaFacts)].filter(Boolean).join("\n"),
1340
1126
  commandBody: messageText,
1341
1127
  timestamp: inboundTimestamp,
1342
1128
  messageId,
1343
1129
  replyToId,
1344
- media: mediaFacts,
1130
+ mediaPath,
1131
+ mediaType,
1132
+ mediaPaths: mediaPaths.length > 0 ? mediaPaths : void 0,
1133
+ mediaTypes: mediaTypes.length > 0 ? mediaTypes : void 0,
1345
1134
  commandAuthorized,
1346
1135
  canDetectMention,
1347
1136
  requireMention,
1348
1137
  wasMentioned: effectiveWasMentioned,
1349
1138
  replyToBody: visibleQuoteText || void 0,
1350
1139
  replyToSender: visibleQuoteSender,
1351
- replyToIsQuote: visibleQuoteText ? true : void 0,
1352
- turnAdoptionLifecycle
1353
- };
1354
- pendingInboundRegistry.cancelPendingOnAbort(entry, debouncer.cancelKey);
1355
- const inboundLane = resolveSignalControlLaneKey(deps.accountId, entry) ? controlDebouncer : debouncer;
1356
- if (inboundLane === debouncer) pendingInboundRegistry.track(entry);
1357
- activeEnqueueEntries.add(entry);
1358
- try {
1359
- await inboundLane.enqueue(entry);
1360
- } finally {
1361
- activeEnqueueEntries.delete(entry);
1362
- }
1363
- if (turnAdoptionLifecycle) return { kind: "deferred" };
1364
- };
1365
- }
1366
- //#endregion
1367
- //#region extensions/signal/src/reaction-targets.ts
1368
- function registerSignalReactionTargetsForDeliveredPayload(params) {
1369
- registerSignalQuestionReactionTargetForDeliveredPayload(params);
1370
- registerSignalApprovalReactionTargetForDeliveredPayload(params);
1371
- }
1372
- //#endregion
1373
- //#region extensions/signal/src/signal-ingress.ts
1374
- const SIGNAL_INGRESS_DRAIN_INTERVAL_MS = 1e3;
1375
- const SignalIngressPermanentError = createChannelIngressError("SignalIngressPermanentError", { withReason: true });
1376
- function normalizeTimestamp(value) {
1377
- return typeof value === "number" && Number.isSafeInteger(value) && value > 0 ? value : null;
1378
- }
1379
- function parseReceiveEnvelope(event) {
1380
- if (event.event !== "receive" || !event.data) return null;
1381
- let parsed;
1382
- try {
1383
- parsed = JSON.parse(event.data);
1384
- } catch (error) {
1385
- throw new SignalIngressPermanentError("parse-error", "Signal receive event contains invalid JSON", { cause: error });
1386
- }
1387
- if (!isRecord$1(parsed)) throw new SignalIngressPermanentError("parse-error", "Signal receive event must contain a JSON object");
1388
- return isRecord$1(parsed.envelope) ? parsed.envelope : null;
1389
- }
1390
- function resolveDataMessage(envelope) {
1391
- if (isRecord$1(envelope.dataMessage)) return envelope.dataMessage;
1392
- return isRecord$1(envelope.editMessage?.dataMessage) ? envelope.editMessage.dataMessage : null;
1393
- }
1394
- function inspectSignalIngressEvent(event) {
1395
- const envelope = parseReceiveEnvelope(event);
1396
- if (!envelope || "syncMessage" in envelope) return null;
1397
- const dataMessage = resolveDataMessage(envelope);
1398
- const reactionMessage = isRecord$1(envelope.reactionMessage) ? envelope.reactionMessage : null;
1399
- if (!dataMessage && !reactionMessage) return null;
1400
- const senderUuid = normalizeNullableString(envelope.sourceUuid);
1401
- const senderNumber = normalizeNullableString(envelope.sourceNumber);
1402
- const senderKey = senderUuid ? `uuid:${senderUuid}` : senderNumber ? `number:${senderNumber}` : null;
1403
- if (!senderKey) throw new SignalIngressPermanentError("missing-sender", "Signal dispatchable envelope is missing sourceUuid/sourceNumber");
1404
- const timestamp = normalizeTimestamp(envelope.timestamp) ?? normalizeTimestamp(dataMessage?.timestamp);
1405
- if (timestamp === null) throw new SignalIngressPermanentError("missing-timestamp", "Signal dispatchable envelope is missing a stable timestamp");
1406
- const dataGroup = isRecord$1(dataMessage?.groupInfo) ? dataMessage.groupInfo : null;
1407
- const reactionGroup = isRecord$1(reactionMessage?.groupInfo) ? reactionMessage.groupInfo : null;
1408
- const groupId = normalizeNullableString(dataGroup?.groupId) ?? normalizeNullableString(reactionGroup?.groupId);
1409
- return {
1410
- eventId: JSON.stringify([senderKey, timestamp]),
1411
- laneKey: groupId ? `group:${groupId}` : `direct:${senderKey}`
1412
- };
1413
- }
1414
- function resolveSignalIngressNonRetryableFailure(error) {
1415
- return error instanceof SignalIngressPermanentError ? {
1416
- reason: error.reason,
1417
- message: error.message
1418
- } : null;
1419
- }
1420
- /** Open the account queue, recover it, and keep newly appended rows draining. */
1421
- async function startSignalIngressMonitor(params) {
1422
- let queue = params.queue;
1423
- if (!queue) {
1424
- const pluginRuntime = getOptionalSignalRuntime();
1425
- if (!pluginRuntime) throw new Error("Signal runtime not initialized for durable ingress");
1426
- queue = pluginRuntime.state.openChannelIngressQueue({ accountId: params.accountId });
1427
- }
1428
- const monitor = createChannelIngressMonitor({
1429
- queue,
1430
- inspect: (event) => inspectSignalIngressEvent(event),
1431
- payload: {
1432
- version: 1,
1433
- serialize: (event, { receivedAt }) => ({
1434
- receivedAt,
1435
- event
1436
- }),
1437
- deserialize: (body) => body.event,
1438
- encode: ({ body }) => ({
1439
- version: 1,
1440
- ...body
1441
- }),
1442
- decode: (payload) => ({
1443
- version: payload.version,
1444
- body: payload
1445
- }),
1446
- createClaimError: (_kind, claim) => new SignalIngressPermanentError("unsupported-event", `Signal ingress row ${claim.id} has an invalid payload`)
1447
- },
1448
- deliver: (event, lifecycle) => params.dispatch(event, lifecycle),
1449
- pollIntervalMs: SIGNAL_INGRESS_DRAIN_INTERVAL_MS,
1450
- retention: {
1451
- pruneIntervalMs: 0,
1452
- completedMaxEntries: 1e3,
1453
- failedMaxEntries: 1e3
1454
- },
1455
- appendRetryDelaysMs: [0],
1456
- drain: {
1457
- resolveNonRetryableFailure: resolveSignalIngressNonRetryableFailure,
1458
- onLog: (message) => params.runtime.log?.(`signal ${message}`)
1459
- },
1460
- onError: (error) => params.runtime.error?.(`signal ingress drain failed: ${String(error)}`)
1461
- });
1462
- monitor.start();
1463
- return {
1464
- receive: async (event) => {
1465
- await monitor.admit(event);
1466
- await monitor.waitForPumpIdle();
1467
- },
1468
- stop: monitor.stop,
1469
- waitForIdle: monitor.waitForIdle
1140
+ replyToIsQuote: visibleQuoteText ? true : void 0
1141
+ });
1470
1142
  };
1471
1143
  }
1472
1144
  //#endregion
@@ -1477,7 +1149,7 @@ const DEFAULT_RECONNECT_POLICY = {
1477
1149
  factor: 2,
1478
1150
  jitter: .2
1479
1151
  };
1480
- async function runSignalSseLoop({ baseUrl, account, abortSignal, runtime, onEvent, timeoutMs, transportKind, policy }) {
1152
+ async function runSignalSseLoop({ baseUrl, account, abortSignal, runtime, onEvent, timeoutMs, apiMode, policy }) {
1481
1153
  const reconnectPolicy = {
1482
1154
  ...DEFAULT_RECONNECT_POLICY,
1483
1155
  ...policy
@@ -1495,10 +1167,10 @@ async function runSignalSseLoop({ baseUrl, account, abortSignal, runtime, onEven
1495
1167
  account,
1496
1168
  abortSignal,
1497
1169
  timeoutMs,
1498
- transportKind,
1499
- onEvent: async (event) => {
1170
+ apiMode,
1171
+ onEvent: (event) => {
1500
1172
  reconnectAttempts = 0;
1501
- await onEvent(event);
1173
+ onEvent(event);
1502
1174
  },
1503
1175
  logger: {
1504
1176
  log: runtime.log,
@@ -1531,34 +1203,73 @@ var monitor_exports = /* @__PURE__ */ __exportAll({
1531
1203
  deliverReplies: () => deliverReplies,
1532
1204
  monitorSignalProvider: () => monitorSignalProvider
1533
1205
  });
1206
+ function resolveRuntime(opts) {
1207
+ return opts.runtime ?? createNonExitingRuntime();
1208
+ }
1534
1209
  function createSignalMonitorTaskRunner(runtime) {
1535
1210
  const inFlight = /* @__PURE__ */ new Set();
1536
1211
  return {
1537
- runTask(task) {
1538
- const trackedTask = Promise.resolve().then(task);
1212
+ runEventTask(task) {
1213
+ const trackedTask = Promise.resolve().then(task).catch((err) => runtime.error?.(`event handler failed: ${String(err)}`)).finally(() => inFlight.delete(trackedTask));
1539
1214
  inFlight.add(trackedTask);
1540
- trackedTask.catch((err) => runtime.error?.(`signal monitor task failed: ${String(err)}`));
1541
- trackedTask.finally(() => inFlight.delete(trackedTask)).catch(() => void 0);
1542
- return trackedTask;
1543
1215
  },
1544
1216
  async waitForIdle() {
1545
1217
  while (inFlight.size > 0) await Promise.allSettled(inFlight);
1546
1218
  }
1547
1219
  };
1548
1220
  }
1221
+ function mergeAbortSignals(a, b) {
1222
+ if (!a && !b) return {
1223
+ signal: void 0,
1224
+ dispose: () => {}
1225
+ };
1226
+ if (!a) return {
1227
+ signal: b,
1228
+ dispose: () => {}
1229
+ };
1230
+ if (!b) return {
1231
+ signal: a,
1232
+ dispose: () => {}
1233
+ };
1234
+ const controller = new AbortController();
1235
+ const abortFrom = (source) => {
1236
+ if (!controller.signal.aborted) controller.abort(source.reason);
1237
+ };
1238
+ if (a.aborted) {
1239
+ abortFrom(a);
1240
+ return {
1241
+ signal: controller.signal,
1242
+ dispose: () => {}
1243
+ };
1244
+ }
1245
+ if (b.aborted) {
1246
+ abortFrom(b);
1247
+ return {
1248
+ signal: controller.signal,
1249
+ dispose: () => {}
1250
+ };
1251
+ }
1252
+ const onAbortA = () => abortFrom(a);
1253
+ const onAbortB = () => abortFrom(b);
1254
+ a.addEventListener("abort", onAbortA, { once: true });
1255
+ b.addEventListener("abort", onAbortB, { once: true });
1256
+ return {
1257
+ signal: controller.signal,
1258
+ dispose: () => {
1259
+ a.removeEventListener("abort", onAbortA);
1260
+ b.removeEventListener("abort", onAbortB);
1261
+ }
1262
+ };
1263
+ }
1549
1264
  function createSignalDaemonLifecycle(params) {
1550
1265
  let daemonHandle = null;
1551
1266
  let daemonStopRequested = false;
1552
- let daemonStopPromise;
1553
1267
  let daemonExitError;
1554
1268
  const daemonAbortController = new AbortController();
1555
- const abortSignal = params.abortSignal ? AbortSignal.any([params.abortSignal, daemonAbortController.signal]) : daemonAbortController.signal;
1269
+ const mergedAbort = mergeAbortSignals(params.abortSignal, daemonAbortController.signal);
1556
1270
  const stop = () => {
1557
- if (daemonStopPromise) return daemonStopPromise;
1558
1271
  daemonStopRequested = true;
1559
- if (!daemonAbortController.signal.aborted) daemonAbortController.abort(params.abortSignal?.reason ?? /* @__PURE__ */ new Error("Signal monitor stopped"));
1560
- daemonStopPromise = daemonHandle?.stop() ?? Promise.resolve();
1561
- return daemonStopPromise;
1272
+ daemonHandle?.stop();
1562
1273
  };
1563
1274
  const attach = (handle) => {
1564
1275
  daemonHandle = handle;
@@ -1573,9 +1284,13 @@ function createSignalDaemonLifecycle(params) {
1573
1284
  attach,
1574
1285
  stop,
1575
1286
  getExitError,
1576
- abortSignal
1287
+ abortSignal: mergedAbort.signal,
1288
+ dispose: mergedAbort.dispose
1577
1289
  };
1578
1290
  }
1291
+ function normalizeAllowList(raw) {
1292
+ return normalizeStringEntries(raw);
1293
+ }
1579
1294
  function resolveSignalReactionTargets(reaction) {
1580
1295
  const targets = [];
1581
1296
  const uuid = reaction.targetAuthorUuid?.trim();
@@ -1645,7 +1360,7 @@ async function waitForSignalDaemonReady(params) {
1645
1360
  }
1646
1361
  });
1647
1362
  }
1648
- const SIGNAL_ATTACHMENT_RPC_RESPONSE_HEADROOM_BYTES = 64 * 1024;
1363
+ const SIGNAL_ATTACHMENT_RPC_RESPONSE_HEADROOM_BYTES = 65536;
1649
1364
  const SIGNAL_BASE64_OVERHEAD_NUMERATOR = 4;
1650
1365
  const SIGNAL_BASE64_OVERHEAD_DENOMINATOR = 3;
1651
1366
  function deriveSignalAttachmentRpcMaxResponseBytes(maxBytes) {
@@ -1655,7 +1370,7 @@ function deriveSignalAttachmentRpcMaxResponseBytes(maxBytes) {
1655
1370
  async function fetchAttachment(params) {
1656
1371
  const { attachment } = params;
1657
1372
  if (!attachment?.id) return null;
1658
- if (typeof attachment.size === "number" && attachment.size > params.maxBytes) throw new Error(`Signal attachment ${attachment.id} exceeds ${(params.maxBytes / (1024 * 1024)).toFixed(0)}MB limit`);
1373
+ if (typeof attachment.size === "number" && attachment.size > params.maxBytes) throw new Error(`Signal attachment ${attachment.id} exceeds ${(params.maxBytes / 1048576).toFixed(0)}MB limit`);
1659
1374
  const rpcParams = { id: attachment.id };
1660
1375
  if (params.account) rpcParams.account = params.account;
1661
1376
  if (params.groupId) rpcParams.groupId = params.groupId;
@@ -1664,18 +1379,17 @@ async function fetchAttachment(params) {
1664
1379
  const result = await signalRpcRequest("getAttachment", rpcParams, {
1665
1380
  baseUrl: params.baseUrl,
1666
1381
  maxResponseBytes: deriveSignalAttachmentRpcMaxResponseBytes(params.maxBytes),
1667
- transportKind: params.transportKind
1382
+ apiMode: params.apiMode
1668
1383
  });
1669
1384
  if (!result?.data) return null;
1670
- if (estimateBase64DecodedBytes(result.data) > params.maxBytes) throw new Error(`Signal attachment ${attachment.id} exceeds ${(params.maxBytes / (1024 * 1024)).toFixed(0)}MB limit`);
1671
- const canonicalData = canonicalizeBase64(result.data);
1672
- if (!canonicalData) throw new Error(`Signal attachment ${attachment.id} returned malformed base64 data`);
1673
- const buffer = Buffer.from(canonicalData, "base64");
1385
+ if (estimateBase64DecodedBytes(result.data) > params.maxBytes) throw new Error(`Signal attachment ${attachment.id} exceeds ${(params.maxBytes / 1048576).toFixed(0)}MB limit`);
1386
+ const buffer = Buffer.from(result.data, "base64");
1674
1387
  const originalFilename = normalizeOptionalString(attachment.filename ?? void 0);
1675
- const saved = await saveMediaBuffer(buffer, normalizeOptionalString(attachment.contentType ?? void 0) ?? await detectMime({
1388
+ const contentType = normalizeOptionalString(attachment.contentType ?? void 0) ?? await detectMime({
1676
1389
  buffer,
1677
1390
  filePath: originalFilename
1678
- }), "inbound", params.maxBytes, originalFilename);
1391
+ });
1392
+ const saved = await saveMediaBuffer(buffer, contentType, "inbound", params.maxBytes, originalFilename);
1679
1393
  return {
1680
1394
  path: saved.path,
1681
1395
  contentType: saved.contentType
@@ -1690,15 +1404,14 @@ async function deliverReplies(params) {
1690
1404
  });
1691
1405
  for (const payload of replies) {
1692
1406
  const deliveryResults = [];
1693
- const presentationPayload = materializeSignalPresentationFallback(payload);
1694
1407
  const deliveredPayload = addSignalApprovalReactionHintToStructuredPayload({
1695
1408
  cfg: params.cfg,
1696
1409
  accountId,
1697
1410
  to: target,
1698
- payload: presentationPayload,
1411
+ payload,
1699
1412
  targetAuthor: account,
1700
1413
  targetAuthorUuid: accountUuid
1701
- }) ?? presentationPayload;
1414
+ }) ?? payload;
1702
1415
  const reply = resolveSendableOutboundReplyParts(deliveredPayload);
1703
1416
  const nextNativeReply = createSignalNativeReplyResolver({
1704
1417
  payload: deliveredPayload,
@@ -1740,7 +1453,7 @@ async function deliverReplies(params) {
1740
1453
  }), visibleText);
1741
1454
  }
1742
1455
  }) !== "empty") {
1743
- registerSignalReactionTargetsForDeliveredPayload({
1456
+ registerSignalApprovalReactionTargetForDeliveredPayload({
1744
1457
  cfg: params.cfg,
1745
1458
  target: {
1746
1459
  channel: "signal",
@@ -1759,15 +1472,12 @@ async function deliverReplies(params) {
1759
1472
  function resolveSignalNativeReplyOptions(params) {
1760
1473
  if (params.payload.replyToCurrent === false) return {};
1761
1474
  const payloadReplyToId = normalizeOptionalString(params.payload.replyToId);
1762
- const isExplicitCurrentReply = params.payload.replyToTag === true || params.payload.replyToCurrent === true;
1763
- if (!payloadReplyToId && !isExplicitCurrentReply && params.replyContext?.allowImplicitCurrentMessage === false) return {};
1764
1475
  const contextReplyToId = normalizeOptionalString(params.replyContext?.replyToId);
1765
- if (!contextReplyToId || payloadReplyToId && payloadReplyToId !== contextReplyToId) return {};
1766
- const replyToId = payloadReplyToId ?? contextReplyToId;
1476
+ if (!payloadReplyToId || !contextReplyToId || payloadReplyToId !== contextReplyToId) return {};
1767
1477
  const replyToAuthor = normalizeOptionalString(params.replyContext?.author);
1768
- if (!replyToAuthor) return { replyToId };
1478
+ if (!replyToAuthor) return { replyToId: payloadReplyToId };
1769
1479
  return {
1770
- replyToId,
1480
+ replyToId: payloadReplyToId,
1771
1481
  replyToAuthor,
1772
1482
  replyToBody: params.replyContext?.body ?? ""
1773
1483
  };
@@ -1798,7 +1508,7 @@ function createSignalNativeReplyResolver(params) {
1798
1508
  };
1799
1509
  }
1800
1510
  async function monitorSignalProvider(opts = {}) {
1801
- const runtime = opts.runtime ?? createNonExitingRuntime();
1511
+ const runtime = resolveRuntime(opts);
1802
1512
  const cfg = opts.config ?? getRuntimeConfig();
1803
1513
  const accountInfo = resolveSignalAccount({
1804
1514
  cfg,
@@ -1811,8 +1521,8 @@ async function monitorSignalProvider(opts = {}) {
1811
1521
  const baseUrl = normalizeOptionalString(opts.baseUrl) ?? accountInfo.baseUrl;
1812
1522
  const account = normalizeOptionalString(opts.account) ?? normalizeOptionalString(accountInfo.config.account);
1813
1523
  const dmPolicy = accountInfo.config.dmPolicy ?? "pairing";
1814
- const allowFrom = normalizeStringEntries(opts.allowFrom ?? accountInfo.config.allowFrom);
1815
- const groupAllowFrom = normalizeStringEntries(opts.groupAllowFrom ?? accountInfo.config.groupAllowFrom ?? (accountInfo.config.allowFrom && accountInfo.config.allowFrom.length > 0 ? accountInfo.config.allowFrom : []));
1524
+ const allowFrom = normalizeAllowList(opts.allowFrom ?? accountInfo.config.allowFrom);
1525
+ const groupAllowFrom = normalizeAllowList(opts.groupAllowFrom ?? accountInfo.config.groupAllowFrom ?? (accountInfo.config.allowFrom && accountInfo.config.allowFrom.length > 0 ? accountInfo.config.allowFrom : []));
1816
1526
  const defaultGroupPolicy = resolveDefaultGroupPolicy(cfg);
1817
1527
  const { groupPolicy, providerMissingFallbackApplied } = resolveAllowlistProviderRuntimeGroupPolicy({
1818
1528
  providerConfigPresent: cfg.channels?.signal !== void 0,
@@ -1826,40 +1536,41 @@ async function monitorSignalProvider(opts = {}) {
1826
1536
  log: (message) => runtime.log?.(message)
1827
1537
  });
1828
1538
  const reactionMode = accountInfo.config.reactionNotifications ?? "own";
1829
- const reactionAllowlist = normalizeStringEntries(accountInfo.config.reactionAllowlist);
1539
+ const reactionAllowlist = normalizeAllowList(accountInfo.config.reactionAllowlist);
1830
1540
  const mediaMaxBytes = (opts.mediaMaxMb ?? accountInfo.config.mediaMaxMb ?? 8) * 1024 * 1024;
1831
- const transportKind = accountInfo.transport.kind;
1832
- const managedTransport = accountInfo.transport.kind === "managed-native" ? accountInfo.transport : void 0;
1833
1541
  const ignoreAttachments = opts.ignoreAttachments ?? accountInfo.config.ignoreAttachments ?? false;
1834
1542
  const sendReadReceipts = Boolean(opts.sendReadReceipts ?? accountInfo.config.sendReadReceipts);
1835
1543
  const waitForTransportReadyFn = opts.waitForTransportReady ?? waitForTransportReady;
1836
- const autoStart = Boolean(managedTransport) && (opts.autoStart ?? true);
1837
- const startupTimeoutMs = Math.min(12e4, Math.max(1e3, opts.startupTimeoutMs ?? managedTransport?.startupTimeoutMs ?? 3e4));
1544
+ const autoStart = opts.autoStart ?? accountInfo.config.autoStart ?? !accountInfo.config.httpUrl;
1545
+ const configuredApiMode = cfg.channels?.signal?.apiMode ?? "auto";
1546
+ const startupTimeoutMs = Math.min(12e4, Math.max(1e3, opts.startupTimeoutMs ?? accountInfo.config.startupTimeoutMs ?? 3e4));
1838
1547
  const readReceiptsViaDaemon = autoStart && sendReadReceipts;
1839
1548
  const daemonLifecycle = createSignalDaemonLifecycle({ abortSignal: opts.abortSignal });
1840
1549
  const monitorTaskRunner = createSignalMonitorTaskRunner(runtime);
1841
1550
  let daemonHandle = null;
1842
- let ingressMonitor;
1551
+ if (autoStart && configuredApiMode === "container") throw new Error("channels.signal.autoStart=true is incompatible with channels.signal.apiMode=container");
1843
1552
  if (autoStart) {
1844
- const cliPath = opts.cliPath ?? managedTransport?.cliPath ?? "signal-cli";
1845
- const configPath = normalizeOptionalString(opts.configPath) ?? normalizeOptionalString(managedTransport?.configPath);
1846
- const httpHost = opts.httpHost ?? managedTransport?.httpHost ?? "127.0.0.1";
1847
- const httpPort = opts.httpPort ?? managedTransport?.httpPort ?? 8080;
1553
+ const cliPath = opts.cliPath ?? accountInfo.config.cliPath ?? "signal-cli";
1554
+ const configPath = normalizeOptionalString(opts.configPath) ?? normalizeOptionalString(accountInfo.config.configPath);
1555
+ const httpHost = opts.httpHost ?? accountInfo.config.httpHost ?? "127.0.0.1";
1556
+ const httpPort = opts.httpPort ?? accountInfo.config.httpPort ?? 8080;
1848
1557
  daemonHandle = spawnSignalDaemon({
1849
1558
  cliPath,
1850
1559
  ...configPath ? { configPath } : {},
1851
1560
  account,
1852
1561
  httpHost,
1853
1562
  httpPort,
1854
- receiveMode: opts.receiveMode ?? managedTransport?.receiveMode,
1563
+ receiveMode: opts.receiveMode ?? accountInfo.config.receiveMode,
1855
1564
  ignoreAttachments: opts.ignoreAttachments ?? accountInfo.config.ignoreAttachments,
1856
- ignoreStories: opts.ignoreStories ?? managedTransport?.ignoreStories,
1565
+ ignoreStories: opts.ignoreStories ?? accountInfo.config.ignoreStories,
1857
1566
  sendReadReceipts,
1858
1567
  runtime
1859
1568
  });
1860
1569
  daemonLifecycle.attach(daemonHandle);
1861
1570
  }
1862
- const onAbort = () => void daemonLifecycle.stop();
1571
+ const onAbort = () => {
1572
+ daemonLifecycle.stop();
1573
+ };
1863
1574
  opts.abortSignal?.addEventListener("abort", onAbort, { once: true });
1864
1575
  try {
1865
1576
  if (daemonHandle) {
@@ -1893,16 +1604,12 @@ async function monitorSignalProvider(opts = {}) {
1893
1604
  });
1894
1605
  const handleEvent = createSignalEventHandler({
1895
1606
  runtime,
1896
- abortSignal: daemonLifecycle.abortSignal,
1897
- runTrackedTask: (task) => {
1898
- monitorTaskRunner.runTask(task);
1899
- },
1900
1607
  cfg,
1901
1608
  baseUrl,
1902
1609
  account,
1903
1610
  accountUuid: accountInfo.config.accountUuid,
1904
1611
  accountId: accountInfo.accountId,
1905
- blockStreaming: resolveChannelStreamingBlockEnabled(accountInfo.config),
1612
+ blockStreaming: accountInfo.config.blockStreaming,
1906
1613
  historyLimit,
1907
1614
  groupHistories,
1908
1615
  textLimit,
@@ -1918,7 +1625,7 @@ async function monitorSignalProvider(opts = {}) {
1918
1625
  readReceiptsViaDaemon,
1919
1626
  fetchAttachment: (params) => fetchAttachment({
1920
1627
  ...params,
1921
- transportKind
1628
+ apiMode: configuredApiMode
1922
1629
  }),
1923
1630
  deliverReplies: (params) => deliverReplies({
1924
1631
  ...params,
@@ -1930,20 +1637,17 @@ async function monitorSignalProvider(opts = {}) {
1930
1637
  shouldEmitSignalReactionNotification,
1931
1638
  buildSignalReactionSystemEventText
1932
1639
  });
1933
- ingressMonitor = await startSignalIngressMonitor({
1934
- accountId: accountInfo.accountId,
1935
- dispatch: handleEvent,
1936
- runtime
1937
- });
1938
1640
  await runSignalSseLoop({
1939
1641
  baseUrl,
1940
1642
  account,
1941
1643
  abortSignal: daemonLifecycle.abortSignal,
1942
1644
  runtime,
1943
1645
  timeoutMs: 0,
1944
- transportKind,
1646
+ apiMode: configuredApiMode,
1945
1647
  policy: opts.reconnectPolicy,
1946
- onEvent: (event) => monitorTaskRunner.runTask(async () => await ingressMonitor?.receive(event))
1648
+ onEvent: (event) => {
1649
+ monitorTaskRunner.runEventTask(() => handleEvent(event));
1650
+ }
1947
1651
  });
1948
1652
  const daemonExitError = daemonLifecycle.getExitError();
1949
1653
  if (daemonExitError) throw daemonExitError;
@@ -1952,9 +1656,10 @@ async function monitorSignalProvider(opts = {}) {
1952
1656
  if (opts.abortSignal?.aborted && !daemonExitError) return;
1953
1657
  throw err;
1954
1658
  } finally {
1955
- await ingressMonitor?.stop();
1956
- await Promise.all([daemonLifecycle.stop(), monitorTaskRunner.waitForIdle()]);
1659
+ await monitorTaskRunner.waitForIdle();
1660
+ daemonLifecycle.dispose();
1957
1661
  opts.abortSignal?.removeEventListener("abort", onAbort);
1662
+ daemonLifecycle.stop();
1958
1663
  }
1959
1664
  }
1960
1665
  //#endregion