@openclaw/voice-call 2026.9.5 → 2026.9.6

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 (367) hide show
  1. package/dist/.setup/{cli-z1onSLj4.mjs → cli-D6j7ppuN.mjs} +1 -1
  2. package/dist/.setup/{guarded-json-api-CuLkeTrl.mjs → guarded-json-api-exU4Hutw.mjs} +1 -1
  3. package/dist/.setup/{plivo-DWYNkAQ3.mjs → plivo-BGJda1Uz.mjs} +2 -2
  4. package/dist/.setup/{realtime-handler-CaoetLrM.mjs → realtime-handler-DlFmdSPn.mjs} +1 -1
  5. package/dist/.setup/{response-generator-DB1nElLO.mjs → response-generator-hZyGIjO4.mjs} +2 -1
  6. package/dist/.setup/{runtime-entry-YWSSnAsH.mjs → runtime-entry-dDRm6RgA.mjs} +5 -5
  7. package/dist/.setup/{telnyx-BY3ef4Cc.mjs → telnyx-BV56PXr-.mjs} +1 -1
  8. package/dist/.setup/{twilio-DWZ4HVmF.mjs → twilio-BMb-7cu-.mjs} +2 -2
  9. package/dist/doctor-contract-api.js +1 -0
  10. package/dist/index.js +2 -2
  11. package/dist/runtime-entry.js +1 -1
  12. package/node_modules/zod/README.md +2 -2
  13. package/node_modules/zod/compile.cjs +19 -0
  14. package/node_modules/zod/index.cjs +19 -0
  15. package/node_modules/zod/locales/index.cjs +19 -0
  16. package/node_modules/zod/mini/index.cjs +19 -0
  17. package/node_modules/zod/package.json +8 -7
  18. package/node_modules/zod/src/v3/helpers/errorUtil.ts +1 -1
  19. package/node_modules/zod/src/v4/classic/external.ts +2 -0
  20. package/node_modules/zod/src/v4/classic/from-json-schema.ts +248 -25
  21. package/node_modules/zod/src/v4/classic/schemas.ts +243 -168
  22. package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +60 -9
  23. package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +6 -0
  24. package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +2 -2
  25. package/node_modules/zod/src/v4/classic/tests/cyclic-data.test.ts +265 -0
  26. package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +112 -6
  27. package/node_modules/zod/src/v4/classic/tests/enum.test.ts +9 -0
  28. package/node_modules/zod/src/v4/classic/tests/error.test.ts +130 -1
  29. package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +157 -0
  30. package/node_modules/zod/src/v4/classic/tests/iban.test.ts +81 -0
  31. package/node_modules/zod/src/v4/classic/tests/instance-footprint.test.ts +40 -2
  32. package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +27 -7
  33. package/node_modules/zod/src/v4/classic/tests/issue-schema.test.ts +88 -56
  34. package/node_modules/zod/src/v4/classic/tests/number.test.ts +39 -0
  35. package/node_modules/zod/src/v4/classic/tests/object.test.ts +56 -0
  36. package/node_modules/zod/src/v4/classic/tests/optin-ladder.test.ts +3 -2
  37. package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +70 -0
  38. package/node_modules/zod/src/v4/classic/tests/properties.test.ts +141 -0
  39. package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +46 -1
  40. package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +19 -0
  41. package/node_modules/zod/src/v4/classic/tests/string.test.ts +95 -1
  42. package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +33 -1
  43. package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +234 -38
  44. package/node_modules/zod/src/v4/classic/tests/validate.test.ts +569 -0
  45. package/node_modules/zod/src/v4/core/api.ts +44 -28
  46. package/node_modules/zod/src/v4/core/checks.ts +62 -102
  47. package/node_modules/zod/src/v4/core/compile.ts +218 -93
  48. package/node_modules/zod/src/v4/core/core.ts +1 -3
  49. package/node_modules/zod/src/v4/core/doc.ts +6 -2
  50. package/node_modules/zod/src/v4/core/errors.ts +3 -6
  51. package/node_modules/zod/src/v4/core/json-schema-generator.ts +2 -2
  52. package/node_modules/zod/src/v4/core/json-schema-processors.ts +185 -81
  53. package/node_modules/zod/src/v4/core/memoizer.ts +75 -28
  54. package/node_modules/zod/src/v4/core/parse.ts +37 -16
  55. package/node_modules/zod/src/v4/core/regexes.ts +14 -4
  56. package/node_modules/zod/src/v4/core/schemas.ts +296 -132
  57. package/node_modules/zod/src/v4/core/tests/cached.test.ts +54 -0
  58. package/node_modules/zod/src/v4/core/tests/compile-differential.test.ts +35 -0
  59. package/node_modules/zod/src/v4/core/tests/compile-generative.test.ts +445 -0
  60. package/node_modules/zod/src/v4/core/tests/compile.test.ts +399 -2
  61. package/node_modules/zod/src/v4/core/tests/email-regex.test.ts +140 -0
  62. package/node_modules/zod/src/v4/core/tests/locales/tg.test.ts +85 -0
  63. package/node_modules/zod/src/v4/core/tests/polyfill-collision.test.ts +46 -0
  64. package/node_modules/zod/src/v4/core/tests/url-no-canparse.test.ts +118 -16
  65. package/node_modules/zod/src/v4/core/to-json-schema.ts +9 -7
  66. package/node_modules/zod/src/v4/core/util.ts +218 -147
  67. package/node_modules/zod/src/v4/core/versions.ts +2 -2
  68. package/node_modules/zod/src/v4/locales/ar.ts +2 -0
  69. package/node_modules/zod/src/v4/locales/az.ts +2 -0
  70. package/node_modules/zod/src/v4/locales/be.ts +2 -0
  71. package/node_modules/zod/src/v4/locales/bg.ts +2 -0
  72. package/node_modules/zod/src/v4/locales/bn.ts +2 -0
  73. package/node_modules/zod/src/v4/locales/ca.ts +2 -0
  74. package/node_modules/zod/src/v4/locales/ckb.ts +2 -0
  75. package/node_modules/zod/src/v4/locales/cs.ts +2 -0
  76. package/node_modules/zod/src/v4/locales/da.ts +2 -0
  77. package/node_modules/zod/src/v4/locales/de.ts +2 -0
  78. package/node_modules/zod/src/v4/locales/el.ts +2 -0
  79. package/node_modules/zod/src/v4/locales/en.ts +2 -0
  80. package/node_modules/zod/src/v4/locales/eo.ts +2 -0
  81. package/node_modules/zod/src/v4/locales/es.ts +2 -0
  82. package/node_modules/zod/src/v4/locales/fa.ts +2 -0
  83. package/node_modules/zod/src/v4/locales/fi.ts +2 -0
  84. package/node_modules/zod/src/v4/locales/fr-CA.ts +2 -0
  85. package/node_modules/zod/src/v4/locales/fr.ts +2 -0
  86. package/node_modules/zod/src/v4/locales/gu.ts +2 -0
  87. package/node_modules/zod/src/v4/locales/he.ts +2 -0
  88. package/node_modules/zod/src/v4/locales/hi.ts +2 -0
  89. package/node_modules/zod/src/v4/locales/hr.ts +2 -0
  90. package/node_modules/zod/src/v4/locales/hu.ts +2 -0
  91. package/node_modules/zod/src/v4/locales/hy.ts +2 -0
  92. package/node_modules/zod/src/v4/locales/id.ts +2 -0
  93. package/node_modules/zod/src/v4/locales/index.ts +1 -0
  94. package/node_modules/zod/src/v4/locales/is.ts +2 -0
  95. package/node_modules/zod/src/v4/locales/it.ts +2 -0
  96. package/node_modules/zod/src/v4/locales/ja.ts +2 -0
  97. package/node_modules/zod/src/v4/locales/ka.ts +2 -0
  98. package/node_modules/zod/src/v4/locales/km.ts +2 -0
  99. package/node_modules/zod/src/v4/locales/kn.ts +2 -0
  100. package/node_modules/zod/src/v4/locales/ko.ts +2 -0
  101. package/node_modules/zod/src/v4/locales/lt.ts +2 -0
  102. package/node_modules/zod/src/v4/locales/mk.ts +2 -0
  103. package/node_modules/zod/src/v4/locales/ms.ts +2 -0
  104. package/node_modules/zod/src/v4/locales/ne.ts +2 -0
  105. package/node_modules/zod/src/v4/locales/nl.ts +2 -0
  106. package/node_modules/zod/src/v4/locales/nn.ts +2 -0
  107. package/node_modules/zod/src/v4/locales/no.ts +2 -0
  108. package/node_modules/zod/src/v4/locales/ota.ts +2 -0
  109. package/node_modules/zod/src/v4/locales/pl.ts +2 -0
  110. package/node_modules/zod/src/v4/locales/ps.ts +2 -0
  111. package/node_modules/zod/src/v4/locales/pt-BR.ts +2 -0
  112. package/node_modules/zod/src/v4/locales/pt.ts +2 -0
  113. package/node_modules/zod/src/v4/locales/ro.ts +2 -0
  114. package/node_modules/zod/src/v4/locales/ru.ts +2 -0
  115. package/node_modules/zod/src/v4/locales/sk.ts +2 -0
  116. package/node_modules/zod/src/v4/locales/sl.ts +2 -0
  117. package/node_modules/zod/src/v4/locales/sv.ts +2 -0
  118. package/node_modules/zod/src/v4/locales/ta.ts +2 -0
  119. package/node_modules/zod/src/v4/locales/tg.ts +135 -0
  120. package/node_modules/zod/src/v4/locales/th.ts +2 -0
  121. package/node_modules/zod/src/v4/locales/tk.ts +2 -0
  122. package/node_modules/zod/src/v4/locales/tr.ts +2 -0
  123. package/node_modules/zod/src/v4/locales/uk.ts +2 -0
  124. package/node_modules/zod/src/v4/locales/ur.ts +2 -0
  125. package/node_modules/zod/src/v4/locales/uz.ts +2 -0
  126. package/node_modules/zod/src/v4/locales/vi.ts +2 -0
  127. package/node_modules/zod/src/v4/locales/yo.ts +2 -0
  128. package/node_modules/zod/src/v4/locales/zh-CN.ts +2 -0
  129. package/node_modules/zod/src/v4/locales/zh-TW.ts +2 -0
  130. package/node_modules/zod/src/v4/mini/external.ts +2 -0
  131. package/node_modules/zod/src/v4/mini/schemas.ts +32 -7
  132. package/node_modules/zod/src/v4/mini/tests/checks.test.ts +1 -1
  133. package/node_modules/zod/src/v4/mini/tests/computed.test.ts +11 -17
  134. package/node_modules/zod/src/v4/mini/tests/index.test.ts +86 -0
  135. package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +16 -0
  136. package/node_modules/zod/src/v4/mini/tests/string.test.ts +23 -0
  137. package/node_modules/zod/v3/ZodError.cjs +19 -0
  138. package/node_modules/zod/v3/errors.cjs +19 -0
  139. package/node_modules/zod/v3/external.cjs +19 -0
  140. package/node_modules/zod/v3/helpers/enumUtil.cjs +19 -0
  141. package/node_modules/zod/v3/helpers/errorUtil.cjs +20 -1
  142. package/node_modules/zod/v3/helpers/errorUtil.js +1 -1
  143. package/node_modules/zod/v3/helpers/parseUtil.cjs +19 -0
  144. package/node_modules/zod/v3/helpers/partialUtil.cjs +19 -0
  145. package/node_modules/zod/v3/helpers/typeAliases.cjs +19 -0
  146. package/node_modules/zod/v3/helpers/util.cjs +19 -0
  147. package/node_modules/zod/v3/index.cjs +19 -0
  148. package/node_modules/zod/v3/standard-schema.cjs +19 -0
  149. package/node_modules/zod/v3/types.cjs +19 -0
  150. package/node_modules/zod/v4/classic/checks.cjs +19 -0
  151. package/node_modules/zod/v4/classic/coerce.cjs +19 -0
  152. package/node_modules/zod/v4/classic/compat.cjs +19 -0
  153. package/node_modules/zod/v4/classic/deep-partial.cjs +19 -0
  154. package/node_modules/zod/v4/classic/errors.cjs +19 -0
  155. package/node_modules/zod/v4/classic/external.cjs +22 -1
  156. package/node_modules/zod/v4/classic/external.d.cts +1 -1
  157. package/node_modules/zod/v4/classic/external.d.ts +1 -1
  158. package/node_modules/zod/v4/classic/external.js +1 -1
  159. package/node_modules/zod/v4/classic/from-json-schema.cjs +264 -24
  160. package/node_modules/zod/v4/classic/from-json-schema.js +245 -24
  161. package/node_modules/zod/v4/classic/in-out.cjs +19 -0
  162. package/node_modules/zod/v4/classic/index.cjs +19 -0
  163. package/node_modules/zod/v4/classic/iso.cjs +19 -0
  164. package/node_modules/zod/v4/classic/parse.cjs +19 -0
  165. package/node_modules/zod/v4/classic/schemas.cjs +100 -35
  166. package/node_modules/zod/v4/classic/schemas.d.cts +15 -1
  167. package/node_modules/zod/v4/classic/schemas.d.ts +15 -1
  168. package/node_modules/zod/v4/classic/schemas.js +77 -33
  169. package/node_modules/zod/v4/core/api.cjs +45 -22
  170. package/node_modules/zod/v4/core/api.d.cts +12 -6
  171. package/node_modules/zod/v4/core/api.d.ts +12 -6
  172. package/node_modules/zod/v4/core/api.js +25 -22
  173. package/node_modules/zod/v4/core/checks.cjs +51 -97
  174. package/node_modules/zod/v4/core/checks.d.cts +17 -1
  175. package/node_modules/zod/v4/core/checks.d.ts +17 -1
  176. package/node_modules/zod/v4/core/checks.js +31 -96
  177. package/node_modules/zod/v4/core/compile.cjs +173 -78
  178. package/node_modules/zod/v4/core/compile.d.cts +18 -4
  179. package/node_modules/zod/v4/core/compile.d.ts +18 -4
  180. package/node_modules/zod/v4/core/compile.js +154 -79
  181. package/node_modules/zod/v4/core/core.cjs +20 -1
  182. package/node_modules/zod/v4/core/core.js +1 -1
  183. package/node_modules/zod/v4/core/doc.cjs +26 -2
  184. package/node_modules/zod/v4/core/doc.js +7 -2
  185. package/node_modules/zod/v4/core/errors.cjs +21 -5
  186. package/node_modules/zod/v4/core/errors.js +2 -5
  187. package/node_modules/zod/v4/core/index.cjs +19 -0
  188. package/node_modules/zod/v4/core/json-schema-generator.cjs +20 -1
  189. package/node_modules/zod/v4/core/json-schema-generator.js +2 -2
  190. package/node_modules/zod/v4/core/json-schema-processors.cjs +188 -72
  191. package/node_modules/zod/v4/core/json-schema-processors.d.cts +16 -0
  192. package/node_modules/zod/v4/core/json-schema-processors.d.ts +16 -0
  193. package/node_modules/zod/v4/core/json-schema-processors.js +170 -74
  194. package/node_modules/zod/v4/core/json-schema.cjs +19 -0
  195. package/node_modules/zod/v4/core/memoizer.cjs +111 -23
  196. package/node_modules/zod/v4/core/memoizer.js +69 -23
  197. package/node_modules/zod/v4/core/parse.cjs +56 -16
  198. package/node_modules/zod/v4/core/parse.js +37 -16
  199. package/node_modules/zod/v4/core/regexes.cjs +31 -6
  200. package/node_modules/zod/v4/core/regexes.d.cts +3 -0
  201. package/node_modules/zod/v4/core/regexes.d.ts +3 -0
  202. package/node_modules/zod/v4/core/regexes.js +10 -4
  203. package/node_modules/zod/v4/core/registries.cjs +19 -0
  204. package/node_modules/zod/v4/core/schemas.cjs +302 -114
  205. package/node_modules/zod/v4/core/schemas.d.cts +28 -8
  206. package/node_modules/zod/v4/core/schemas.d.ts +28 -8
  207. package/node_modules/zod/v4/core/schemas.js +279 -113
  208. package/node_modules/zod/v4/core/standard-schema.cjs +19 -0
  209. package/node_modules/zod/v4/core/to-json-schema.cjs +28 -7
  210. package/node_modules/zod/v4/core/to-json-schema.d.cts +4 -3
  211. package/node_modules/zod/v4/core/to-json-schema.d.ts +4 -3
  212. package/node_modules/zod/v4/core/to-json-schema.js +7 -6
  213. package/node_modules/zod/v4/core/util.cjs +177 -143
  214. package/node_modules/zod/v4/core/util.d.cts +25 -4
  215. package/node_modules/zod/v4/core/util.d.ts +25 -4
  216. package/node_modules/zod/v4/core/util.js +156 -143
  217. package/node_modules/zod/v4/core/versions.cjs +21 -2
  218. package/node_modules/zod/v4/core/versions.d.cts +1 -1
  219. package/node_modules/zod/v4/core/versions.d.ts +1 -1
  220. package/node_modules/zod/v4/core/versions.js +2 -2
  221. package/node_modules/zod/v4/core/visit.cjs +19 -0
  222. package/node_modules/zod/v4/index.cjs +19 -0
  223. package/node_modules/zod/v4/locales/ar.cjs +2 -0
  224. package/node_modules/zod/v4/locales/ar.js +2 -0
  225. package/node_modules/zod/v4/locales/az.cjs +2 -0
  226. package/node_modules/zod/v4/locales/az.js +2 -0
  227. package/node_modules/zod/v4/locales/be.cjs +2 -0
  228. package/node_modules/zod/v4/locales/be.js +2 -0
  229. package/node_modules/zod/v4/locales/bg.cjs +2 -0
  230. package/node_modules/zod/v4/locales/bg.js +2 -0
  231. package/node_modules/zod/v4/locales/bn.cjs +2 -0
  232. package/node_modules/zod/v4/locales/bn.js +2 -0
  233. package/node_modules/zod/v4/locales/ca.cjs +2 -0
  234. package/node_modules/zod/v4/locales/ca.js +2 -0
  235. package/node_modules/zod/v4/locales/ckb.cjs +2 -0
  236. package/node_modules/zod/v4/locales/ckb.js +2 -0
  237. package/node_modules/zod/v4/locales/cs.cjs +2 -0
  238. package/node_modules/zod/v4/locales/cs.js +2 -0
  239. package/node_modules/zod/v4/locales/da.cjs +2 -0
  240. package/node_modules/zod/v4/locales/da.js +2 -0
  241. package/node_modules/zod/v4/locales/de.cjs +2 -0
  242. package/node_modules/zod/v4/locales/de.js +2 -0
  243. package/node_modules/zod/v4/locales/el.cjs +2 -0
  244. package/node_modules/zod/v4/locales/el.js +2 -0
  245. package/node_modules/zod/v4/locales/en.cjs +2 -0
  246. package/node_modules/zod/v4/locales/en.js +2 -0
  247. package/node_modules/zod/v4/locales/eo.cjs +2 -0
  248. package/node_modules/zod/v4/locales/eo.js +2 -0
  249. package/node_modules/zod/v4/locales/es.cjs +2 -0
  250. package/node_modules/zod/v4/locales/es.js +2 -0
  251. package/node_modules/zod/v4/locales/fa.cjs +2 -0
  252. package/node_modules/zod/v4/locales/fa.js +2 -0
  253. package/node_modules/zod/v4/locales/fi.cjs +2 -0
  254. package/node_modules/zod/v4/locales/fi.js +2 -0
  255. package/node_modules/zod/v4/locales/fr-CA.cjs +2 -0
  256. package/node_modules/zod/v4/locales/fr-CA.js +2 -0
  257. package/node_modules/zod/v4/locales/fr.cjs +2 -0
  258. package/node_modules/zod/v4/locales/fr.js +2 -0
  259. package/node_modules/zod/v4/locales/gu.cjs +2 -0
  260. package/node_modules/zod/v4/locales/gu.js +2 -0
  261. package/node_modules/zod/v4/locales/he.cjs +2 -0
  262. package/node_modules/zod/v4/locales/he.js +2 -0
  263. package/node_modules/zod/v4/locales/hi.cjs +2 -0
  264. package/node_modules/zod/v4/locales/hi.js +2 -0
  265. package/node_modules/zod/v4/locales/hr.cjs +2 -0
  266. package/node_modules/zod/v4/locales/hr.js +2 -0
  267. package/node_modules/zod/v4/locales/hu.cjs +2 -0
  268. package/node_modules/zod/v4/locales/hu.js +2 -0
  269. package/node_modules/zod/v4/locales/hy.cjs +2 -0
  270. package/node_modules/zod/v4/locales/hy.js +2 -0
  271. package/node_modules/zod/v4/locales/id.cjs +2 -0
  272. package/node_modules/zod/v4/locales/id.js +2 -0
  273. package/node_modules/zod/v4/locales/index.cjs +22 -1
  274. package/node_modules/zod/v4/locales/index.d.cts +1 -0
  275. package/node_modules/zod/v4/locales/index.d.ts +1 -0
  276. package/node_modules/zod/v4/locales/index.js +1 -0
  277. package/node_modules/zod/v4/locales/is.cjs +2 -0
  278. package/node_modules/zod/v4/locales/is.js +2 -0
  279. package/node_modules/zod/v4/locales/it.cjs +2 -0
  280. package/node_modules/zod/v4/locales/it.js +2 -0
  281. package/node_modules/zod/v4/locales/ja.cjs +2 -0
  282. package/node_modules/zod/v4/locales/ja.js +2 -0
  283. package/node_modules/zod/v4/locales/ka.cjs +2 -0
  284. package/node_modules/zod/v4/locales/ka.js +2 -0
  285. package/node_modules/zod/v4/locales/km.cjs +2 -0
  286. package/node_modules/zod/v4/locales/km.js +2 -0
  287. package/node_modules/zod/v4/locales/kn.cjs +2 -0
  288. package/node_modules/zod/v4/locales/kn.js +2 -0
  289. package/node_modules/zod/v4/locales/ko.cjs +2 -0
  290. package/node_modules/zod/v4/locales/ko.js +2 -0
  291. package/node_modules/zod/v4/locales/lt.cjs +2 -0
  292. package/node_modules/zod/v4/locales/lt.js +2 -0
  293. package/node_modules/zod/v4/locales/mk.cjs +2 -0
  294. package/node_modules/zod/v4/locales/mk.js +2 -0
  295. package/node_modules/zod/v4/locales/ms.cjs +2 -0
  296. package/node_modules/zod/v4/locales/ms.js +2 -0
  297. package/node_modules/zod/v4/locales/ne.cjs +2 -0
  298. package/node_modules/zod/v4/locales/ne.js +2 -0
  299. package/node_modules/zod/v4/locales/nl.cjs +2 -0
  300. package/node_modules/zod/v4/locales/nl.js +2 -0
  301. package/node_modules/zod/v4/locales/nn.cjs +2 -0
  302. package/node_modules/zod/v4/locales/nn.js +2 -0
  303. package/node_modules/zod/v4/locales/no.cjs +2 -0
  304. package/node_modules/zod/v4/locales/no.js +2 -0
  305. package/node_modules/zod/v4/locales/ota.cjs +2 -0
  306. package/node_modules/zod/v4/locales/ota.js +2 -0
  307. package/node_modules/zod/v4/locales/pl.cjs +2 -0
  308. package/node_modules/zod/v4/locales/pl.js +2 -0
  309. package/node_modules/zod/v4/locales/ps.cjs +2 -0
  310. package/node_modules/zod/v4/locales/ps.js +2 -0
  311. package/node_modules/zod/v4/locales/pt-BR.cjs +2 -0
  312. package/node_modules/zod/v4/locales/pt-BR.js +2 -0
  313. package/node_modules/zod/v4/locales/pt.cjs +2 -0
  314. package/node_modules/zod/v4/locales/pt.js +2 -0
  315. package/node_modules/zod/v4/locales/ro.cjs +2 -0
  316. package/node_modules/zod/v4/locales/ro.js +2 -0
  317. package/node_modules/zod/v4/locales/ru.cjs +2 -0
  318. package/node_modules/zod/v4/locales/ru.js +2 -0
  319. package/node_modules/zod/v4/locales/sk.cjs +2 -0
  320. package/node_modules/zod/v4/locales/sk.js +2 -0
  321. package/node_modules/zod/v4/locales/sl.cjs +2 -0
  322. package/node_modules/zod/v4/locales/sl.js +2 -0
  323. package/node_modules/zod/v4/locales/sv.cjs +2 -0
  324. package/node_modules/zod/v4/locales/sv.js +2 -0
  325. package/node_modules/zod/v4/locales/ta.cjs +2 -0
  326. package/node_modules/zod/v4/locales/ta.js +2 -0
  327. package/node_modules/zod/v4/locales/tg.cjs +144 -0
  328. package/node_modules/zod/v4/locales/tg.d.cts +5 -0
  329. package/node_modules/zod/v4/locales/tg.d.ts +4 -0
  330. package/node_modules/zod/v4/locales/tg.js +117 -0
  331. package/node_modules/zod/v4/locales/th.cjs +2 -0
  332. package/node_modules/zod/v4/locales/th.js +2 -0
  333. package/node_modules/zod/v4/locales/tk.cjs +2 -0
  334. package/node_modules/zod/v4/locales/tk.js +2 -0
  335. package/node_modules/zod/v4/locales/tr.cjs +2 -0
  336. package/node_modules/zod/v4/locales/tr.js +2 -0
  337. package/node_modules/zod/v4/locales/uk.cjs +2 -0
  338. package/node_modules/zod/v4/locales/uk.js +2 -0
  339. package/node_modules/zod/v4/locales/ur.cjs +2 -0
  340. package/node_modules/zod/v4/locales/ur.js +2 -0
  341. package/node_modules/zod/v4/locales/uz.cjs +2 -0
  342. package/node_modules/zod/v4/locales/uz.js +2 -0
  343. package/node_modules/zod/v4/locales/vi.cjs +2 -0
  344. package/node_modules/zod/v4/locales/vi.js +2 -0
  345. package/node_modules/zod/v4/locales/yo.cjs +2 -0
  346. package/node_modules/zod/v4/locales/yo.js +2 -0
  347. package/node_modules/zod/v4/locales/zh-CN.cjs +2 -0
  348. package/node_modules/zod/v4/locales/zh-CN.js +2 -0
  349. package/node_modules/zod/v4/locales/zh-TW.cjs +2 -0
  350. package/node_modules/zod/v4/locales/zh-TW.js +2 -0
  351. package/node_modules/zod/v4/mini/checks.cjs +19 -0
  352. package/node_modules/zod/v4/mini/coerce.cjs +19 -0
  353. package/node_modules/zod/v4/mini/deep-partial.cjs +19 -0
  354. package/node_modules/zod/v4/mini/external.cjs +22 -1
  355. package/node_modules/zod/v4/mini/external.d.cts +1 -1
  356. package/node_modules/zod/v4/mini/external.d.ts +1 -1
  357. package/node_modules/zod/v4/mini/external.js +1 -1
  358. package/node_modules/zod/v4/mini/in-out.cjs +19 -0
  359. package/node_modules/zod/v4/mini/index.cjs +19 -0
  360. package/node_modules/zod/v4/mini/iso.cjs +19 -0
  361. package/node_modules/zod/v4/mini/parse.cjs +19 -0
  362. package/node_modules/zod/v4/mini/schemas.cjs +44 -8
  363. package/node_modules/zod/v4/mini/schemas.d.cts +6 -1
  364. package/node_modules/zod/v4/mini/schemas.d.ts +6 -1
  365. package/node_modules/zod/v4/mini/schemas.js +21 -6
  366. package/node_modules/zod/v4-mini/index.cjs +19 -0
  367. package/package.json +5 -5
@@ -1,7 +1,7 @@
1
1
  import { sleep } from "../runtime-api.js";
2
2
  import "../api.js";
3
3
  import { l as resolveVoiceCallStreamExposurePaths, u as validateProviderConfig } from "./config-72FnMWHb.mjs";
4
- import { d as cleanupTailscaleExposureRoute, f as getTailscaleSelfInfo, p as setupTailscaleExposureRoutes, u as resolveWebhookExposureStatus, v as resolveVoiceCallAgentId, y as resolveUserPath } from "./runtime-entry-YWSSnAsH.mjs";
4
+ import { d as cleanupTailscaleExposureRoute, f as getTailscaleSelfInfo, p as setupTailscaleExposureRoutes, u as resolveWebhookExposureStatus, v as resolveVoiceCallAgentId, y as resolveUserPath } from "./runtime-entry-dDRm6RgA.mjs";
5
5
  import { b as setVoiceCallStateRuntime, d as getCallHistoryFromStore, f as loadActiveCallsFromStore, o as MAX_CALL_RECORD_EVENTS, t as resolveDefaultVoiceCallStoreDir, u as findCallInStore } from "./store-path-B1j1up4_.mjs";
6
6
  import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
7
7
  import { callGatewayFromCli, isGatewayClientRequestError, isGatewayTransportError, redactSensitiveUrlLikeString } from "openclaw/plugin-sdk/gateway-runtime";
@@ -1,6 +1,6 @@
1
1
  import { fetchWithSsrFGuard } from "../runtime-api.js";
2
2
  import "../api.js";
3
- import { l as getHeader, n as normalizeProxyIp } from "./runtime-entry-YWSSnAsH.mjs";
3
+ import { l as getHeader, n as normalizeProxyIp } from "./runtime-entry-dDRm6RgA.mjs";
4
4
  import { n as reserveWebhookReplay, t as createWebhookReplayCache } from "./webhook-replay-CCQSoBNF.mjs";
5
5
  import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
6
6
  import { isLoopbackHost } from "openclaw/plugin-sdk/gateway-runtime";
@@ -1,5 +1,5 @@
1
- import { b as escapeXml, l as getHeader } from "./runtime-entry-YWSSnAsH.mjs";
2
- import { a as reconstructWebhookUrl, o as verifyPlivoWebhook, t as guardedJsonApiRequest } from "./guarded-json-api-CuLkeTrl.mjs";
1
+ import { b as escapeXml, l as getHeader } from "./runtime-entry-dDRm6RgA.mjs";
2
+ import { a as reconstructWebhookUrl, o as verifyPlivoWebhook, t as guardedJsonApiRequest } from "./guarded-json-api-exU4Hutw.mjs";
3
3
  import { normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
4
4
  import crypto from "node:crypto";
5
5
  //#region extensions/voice-call/src/providers/plivo.ts
@@ -1,5 +1,5 @@
1
1
  import { d as REALTIME_VOICE_END_CALL_TOOL_NAME, s as resolveVoiceCallPublicPathPrefix } from "./config-72FnMWHb.mjs";
2
- import { c as canonicalizeVoiceCallMediaBase64, o as WebSocket, s as WebSocketServer } from "./runtime-entry-YWSSnAsH.mjs";
2
+ import { c as canonicalizeVoiceCallMediaBase64, o as WebSocket, s as WebSocketServer } from "./runtime-entry-dDRm6RgA.mjs";
3
3
  import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
4
4
  import { asNullableRecord, asOptionalObjectRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
5
5
  import { createSubsystemLogger } from "openclaw/plugin-sdk/runtime-env";
@@ -1,5 +1,5 @@
1
1
  import { c as resolveVoiceCallSessionKey } from "./config-72FnMWHb.mjs";
2
- import { _ as resolveCallAgentId, g as resolveVoiceResponseModel } from "./runtime-entry-YWSSnAsH.mjs";
2
+ import { _ as resolveCallAgentId, g as resolveVoiceResponseModel } from "./runtime-entry-dDRm6RgA.mjs";
3
3
  import { filterStringEntries, isRecord, normalizeLowercaseStringOrEmpty, normalizeStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
4
4
  import { resolveAgentConfig } from "openclaw/plugin-sdk/agent-scope-runtime";
5
5
  import { isValidAgentHarnessSessionStoreEntry } from "openclaw/plugin-sdk/session-store-runtime";
@@ -282,6 +282,7 @@ async function generateVoiceResponse(params) {
282
282
  toolsAllow,
283
283
  abortSignal,
284
284
  blockReplyBreak: "text_end",
285
+ resolveReplyDelivery: async (minimumAssistantMessageIndex = 0) => deliveredEarly && minimumAssistantMessageIndex === 0 ? "pending" : "missing",
285
286
  onBlockReply: (payload, context) => {
286
287
  if (latestToolBoundaryMessageIndex !== void 0) {
287
288
  const messageIndex = context?.assistantMessageIndex;
@@ -2845,7 +2845,7 @@ const MAX_WEBHOOK_BODY_BYTES = WEBHOOK_BODY_READ_DEFAULTS.preAuth.maxBytes;
2845
2845
  const WEBHOOK_BODY_TIMEOUT_MS = WEBHOOK_BODY_READ_DEFAULTS.preAuth.timeoutMs;
2846
2846
  const MISSING_REMOTE_ADDRESS_IN_FLIGHT_KEY = "__voice_call_no_remote__";
2847
2847
  const loadRealtimeTranscriptionRuntime = createLazyRuntimeModule(() => import("./realtime-transcription.runtime-CbJAs5t_.mjs"));
2848
- const loadResponseGeneratorModule = createLazyRuntimeModule(() => import("./response-generator-DB1nElLO.mjs"));
2848
+ const loadResponseGeneratorModule = createLazyRuntimeModule(() => import("./response-generator-hZyGIjO4.mjs"));
2849
2849
  function appendRecentTalkEventMetadata(metadata, event) {
2850
2850
  const previous = metadata ?? {};
2851
2851
  const recent = Array.isArray(previous.recentTalkEvents) ? previous.recentTalkEvents.filter((entry) => Boolean(entry) && typeof entry === "object" && !Array.isArray(entry)) : [];
@@ -3585,12 +3585,12 @@ const REALTIME_VOICE_CONSULT_SYSTEM_PROMPT = [
3585
3585
  "Do not print secret values or dump environment variables; only check whether required configuration is present.",
3586
3586
  "Be accurate, brief, and speakable."
3587
3587
  ].join(" ");
3588
- const loadTelnyxProvider = createLazyRuntimeModule(() => import("./telnyx-BY3ef4Cc.mjs"));
3589
- const loadTwilioProvider = createLazyRuntimeModule(() => import("./twilio-DWZ4HVmF.mjs"));
3590
- const loadPlivoProvider = createLazyRuntimeModule(() => import("./plivo-DWYNkAQ3.mjs"));
3588
+ const loadTelnyxProvider = createLazyRuntimeModule(() => import("./telnyx-BV56PXr-.mjs"));
3589
+ const loadTwilioProvider = createLazyRuntimeModule(() => import("./twilio-BMb-7cu-.mjs"));
3590
+ const loadPlivoProvider = createLazyRuntimeModule(() => import("./plivo-BGJda1Uz.mjs"));
3591
3591
  const loadMockProvider = createLazyRuntimeModule(() => import("./mock-CcYEAUhV.mjs"));
3592
3592
  const loadRealtimeVoiceRuntime = createLazyRuntimeModule(() => import("./realtime-voice.runtime-vtdCOWg-.mjs"));
3593
- const loadRealtimeHandler = createLazyRuntimeModule(() => import("./realtime-handler-CaoetLrM.mjs"));
3593
+ const loadRealtimeHandler = createLazyRuntimeModule(() => import("./realtime-handler-DlFmdSPn.mjs"));
3594
3594
  function resolveVoiceCallConsultSessionKey(call) {
3595
3595
  return resolveVoiceCallSessionKey({
3596
3596
  config: call.config,
@@ -1,4 +1,4 @@
1
- import { s as verifyTelnyxWebhook, t as guardedJsonApiRequest } from "./guarded-json-api-CuLkeTrl.mjs";
1
+ import { s as verifyTelnyxWebhook, t as guardedJsonApiRequest } from "./guarded-json-api-exU4Hutw.mjs";
2
2
  import crypto from "node:crypto";
3
3
  //#region extensions/voice-call/src/providers/telnyx.ts
4
4
  function normalizeTelnyxDirection(direction) {
@@ -1,8 +1,8 @@
1
1
  import { fetchWithSsrFGuard } from "../runtime-api.js";
2
2
  import "../api.js";
3
3
  import { n as requireSupportedTwilioApiHostname, r as resolveTwilioApiBaseUrl } from "./twilio-region-4fkgz3UG.mjs";
4
- import { a as normalizeProviderStatus, b as escapeXml, h as chunkAudio, i as mapProviderStatusToEndReason, l as getHeader, r as isProviderStatusTerminal, x as mapVoiceToPolly } from "./runtime-entry-YWSSnAsH.mjs";
5
- import { c as verifyTwilioWebhook, i as readVoiceCallProviderJsonResponse, n as cancelProviderResponseBody, r as readProviderErrorResponseSnippet, t as guardedJsonApiRequest } from "./guarded-json-api-CuLkeTrl.mjs";
4
+ import { a as normalizeProviderStatus, b as escapeXml, h as chunkAudio, i as mapProviderStatusToEndReason, l as getHeader, r as isProviderStatusTerminal, x as mapVoiceToPolly } from "./runtime-entry-dDRm6RgA.mjs";
5
+ import { c as verifyTwilioWebhook, i as readVoiceCallProviderJsonResponse, n as cancelProviderResponseBody, r as readProviderErrorResponseSnippet, t as guardedJsonApiRequest } from "./guarded-json-api-exU4Hutw.mjs";
6
6
  import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
7
7
  import { sleepWithAbort } from "openclaw/plugin-sdk/runtime-env";
8
8
  import crypto from "node:crypto";
@@ -71,6 +71,7 @@ function describeVoiceCallSchemaMigration(migration) {
71
71
  case "conversation-binding-targets-v15": return "conversation bindings -> exact target keys without agent/session projections";
72
72
  case "skill-workshop-directory-ownership-v16": return "Skill Workshop proposals -> per-agent Workshop directory ownership";
73
73
  case "prepared-worker-ownership-v17": return "prepared workers -> one-use capacity and fixed workspace ownership";
74
+ case "github-publication-requester-authority-v18": return "GitHub publication receipts -> original requesting authority";
74
75
  case "worker-placement-execution-mode-v8": return "cloud worker placements -> execution-mode claims";
75
76
  case "operator-approvals-system-agent": return "operator approvals -> OpenClaw system changes";
76
77
  case "session-watch-cursor-provenance-v4": return "session watch cursors -> provenance column";
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@ import { definePluginEntry } from "./runtime-api.js";
2
2
  import "./api.js";
3
3
  import { VOICE_CALL_CLI_DESCRIPTOR } from "./cli-output-mode.js";
4
4
  import { i as resolveVoiceCallConfig, t as VoiceCallConfigSchema, u as validateProviderConfig } from "./.setup/config-72FnMWHb.mjs";
5
- import { t as createVoiceCallRuntime } from "./.setup/runtime-entry-YWSSnAsH.mjs";
5
+ import { t as createVoiceCallRuntime } from "./.setup/runtime-entry-dDRm6RgA.mjs";
6
6
  import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
7
7
  import { ErrorCodes, errorShape } from "openclaw/plugin-sdk/gateway-runtime";
8
8
  import { resolveGlobalSingleton } from "openclaw/plugin-sdk/global-singleton";
@@ -514,7 +514,7 @@ var voice_call_default = definePluginEntry({
514
514
  }
515
515
  }));
516
516
  api.registerCli(async ({ program }) => {
517
- const { registerVoiceCallCli } = await import("./.setup/cli-z1onSLj4.mjs");
517
+ const { registerVoiceCallCli } = await import("./.setup/cli-D6j7ppuN.mjs");
518
518
  registerVoiceCallCli({
519
519
  program,
520
520
  config,
@@ -1,2 +1,2 @@
1
- import { t as createVoiceCallRuntime } from "./.setup/runtime-entry-YWSSnAsH.mjs";
1
+ import { t as createVoiceCallRuntime } from "./.setup/runtime-entry-dDRm6RgA.mjs";
2
2
  export { createVoiceCallRuntime };
@@ -155,13 +155,13 @@ try {
155
155
  expected: 'string',
156
156
  code: 'invalid_type',
157
157
  path: [ 'username' ],
158
- message: 'Invalid input: expected string'
158
+ message: 'Invalid input: expected string, received number'
159
159
  },
160
160
  {
161
161
  expected: 'number',
162
162
  code: 'invalid_type',
163
163
  path: [ 'xp' ],
164
- message: 'Invalid input: expected number'
164
+ message: 'Invalid input: expected number, received string'
165
165
  }
166
166
  ] */
167
167
  }
@@ -75,3 +75,22 @@ core.globalConfig.postProcessor = (inst) => {
75
75
  shim.__originalRun = originalRun;
76
76
  inst._zod.run = shim;
77
77
  };
78
+
79
+ // seal-cjs-exports
80
+ (function () {
81
+ var keys = Object.getOwnPropertyNames(exports);
82
+ for (var i = 0; i < keys.length; i++) {
83
+ var desc = Object.getOwnPropertyDescriptor(exports, keys[i]);
84
+ if (!desc || !desc.get || !desc.configurable) continue;
85
+ var value;
86
+ try {
87
+ value = desc.get();
88
+ } catch (e) {
89
+ continue;
90
+ }
91
+ // a circular require may not have settled this one yet, so leave it live
92
+ if (value === undefined) continue;
93
+ Object.defineProperty(exports, keys[i], { value: value, writable: false, enumerable: desc.enumerable, configurable: false });
94
+ }
95
+ Object.freeze(exports);
96
+ })();
@@ -31,3 +31,22 @@ const z = __importStar(require("./v4/classic/external.cjs"));
31
31
  exports.z = z;
32
32
  exports.default = z;
33
33
  __exportStar(require("./v4/classic/external.cjs"), exports);
34
+
35
+ // seal-cjs-exports
36
+ (function () {
37
+ var keys = Object.getOwnPropertyNames(exports);
38
+ for (var i = 0; i < keys.length; i++) {
39
+ var desc = Object.getOwnPropertyDescriptor(exports, keys[i]);
40
+ if (!desc || !desc.get || !desc.configurable) continue;
41
+ var value;
42
+ try {
43
+ value = desc.get();
44
+ } catch (e) {
45
+ continue;
46
+ }
47
+ // a circular require may not have settled this one yet, so leave it live
48
+ if (value === undefined) continue;
49
+ Object.defineProperty(exports, keys[i], { value: value, writable: false, enumerable: desc.enumerable, configurable: false });
50
+ }
51
+ Object.freeze(exports);
52
+ })();
@@ -15,3 +15,22 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("../v4/locales/index.cjs"), exports);
18
+
19
+ // seal-cjs-exports
20
+ (function () {
21
+ var keys = Object.getOwnPropertyNames(exports);
22
+ for (var i = 0; i < keys.length; i++) {
23
+ var desc = Object.getOwnPropertyDescriptor(exports, keys[i]);
24
+ if (!desc || !desc.get || !desc.configurable) continue;
25
+ var value;
26
+ try {
27
+ value = desc.get();
28
+ } catch (e) {
29
+ continue;
30
+ }
31
+ // a circular require may not have settled this one yet, so leave it live
32
+ if (value === undefined) continue;
33
+ Object.defineProperty(exports, keys[i], { value: value, writable: false, enumerable: desc.enumerable, configurable: false });
34
+ }
35
+ Object.freeze(exports);
36
+ })();
@@ -30,3 +30,22 @@ exports.z = void 0;
30
30
  const z = __importStar(require("../v4/mini/external.cjs"));
31
31
  exports.z = z;
32
32
  __exportStar(require("../v4/mini/external.cjs"), exports);
33
+
34
+ // seal-cjs-exports
35
+ (function () {
36
+ var keys = Object.getOwnPropertyNames(exports);
37
+ for (var i = 0; i < keys.length; i++) {
38
+ var desc = Object.getOwnPropertyDescriptor(exports, keys[i]);
39
+ if (!desc || !desc.get || !desc.configurable) continue;
40
+ var value;
41
+ try {
42
+ value = desc.get();
43
+ } catch (e) {
44
+ continue;
45
+ }
46
+ // a circular require may not have settled this one yet, so leave it live
47
+ if (value === undefined) continue;
48
+ Object.defineProperty(exports, keys[i], { value: value, writable: false, enumerable: desc.enumerable, configurable: false });
49
+ }
50
+ Object.freeze(exports);
51
+ })();
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zod",
3
- "version": "4.5.4",
3
+ "version": "4.6.5",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "author": "Colin McDonnell <zod@colinhacks.com>",
@@ -52,7 +52,8 @@
52
52
  },
53
53
  "conditions": {
54
54
  "@zod/source": "src"
55
- }
55
+ },
56
+ "sealCjsExports": true
56
57
  },
57
58
  "exports": {
58
59
  "./package.json": "./package.json",
@@ -137,10 +138,10 @@
137
138
  },
138
139
  "scripts": {
139
140
  "clean": "git clean -xdf . -e node_modules",
140
- "build": "zshy --project tsconfig.build.json",
141
- "postbuild": "tsx ../../scripts/write-stub-package-jsons.ts && pnpm biome check --write .",
142
- "test:watch": "pnpm vitest",
143
- "test": "pnpm vitest run",
144
- "prepublishOnly": "tsx ../../scripts/check-versions.ts"
141
+ "build": "nub exec --node zshy --project tsconfig.build.json",
142
+ "postbuild": "nub ../../scripts/write-stub-package-jsons.ts && nub exec --node biome check --write .",
143
+ "test:watch": "nub exec --node vitest",
144
+ "test": "nub exec --node vitest run",
145
+ "prepublishOnly": "nub ../../scripts/check-versions.ts"
145
146
  }
146
147
  }
@@ -2,7 +2,7 @@ export namespace errorUtil {
2
2
  export type ErrMessage = string | { message?: string | undefined };
3
3
  export const errToObj = (message?: ErrMessage): { message?: string | undefined } =>
4
4
  typeof message === "string" ? { message } : message || {};
5
- // biome-ignore lint:
5
+ // biome-ignore lint/suspicious/noShadowRestrictedNames: renaming churns 31 v3 call sites
6
6
  export const toString = (message?: ErrMessage): string | undefined =>
7
7
  typeof message === "string" ? message : message?.message;
8
8
  }
@@ -26,8 +26,10 @@ export {
26
26
  TimePrecision,
27
27
  util,
28
28
  NEVER,
29
+ INVALID,
29
30
  toZod,
30
31
  compile,
32
+ withParser,
31
33
  ZodCompileAsyncError,
32
34
  ZodCompileUnsupportedError,
33
35
  getDiscriminatedOption,
@@ -155,34 +155,225 @@ function resolveRef(ref: string, ctx: ConversionContext): JSONSchema.JSONSchema
155
155
  }
156
156
 
157
157
  /**
158
- * Rejects every own key that fails `keySchema`, before `objectSchema` runs. The
159
- * guard has to see the raw input: an object parse drops `__proto__` and can add
160
- * keys from a property `default`, so its output is not the set of names the
161
- * instance actually carried.
158
+ * Enforces the keywords that constrain an object's own keys — `propertyNames`,
159
+ * `minProperties`, `maxProperties` — before `objectSchema` runs. The guard has
160
+ * to see the raw input: an object parse drops `__proto__` and can add keys from
161
+ * a property `default`, so its output is not the set of names the instance
162
+ * actually carried.
162
163
  */
163
- function checkPropertyNames(objectSchema: ZodType, keySchema: ZodType): ZodType {
164
+ function checkObjectGuards(
165
+ objectSchema: ZodType,
166
+ guards: { keySchema?: ZodType | undefined; minProperties?: number | undefined; maxProperties?: number | undefined }
167
+ ): ZodType {
164
168
  // An identity transform, not z.any(), so `toJSONSchema` reports the object on both the input and the output side of the pipe.
165
169
  const guard = z
166
170
  .transform((value: unknown) => value)
167
171
  .check((payload) => {
168
172
  const value = payload.value;
169
173
  if (typeof value !== "object" || value === null || Array.isArray(value)) return;
170
- for (const key of Object.getOwnPropertyNames(value)) {
171
- const result = keySchema.safeParse(key);
172
- if (result.success) continue;
174
+ const keys = Object.getOwnPropertyNames(value);
175
+ if (guards.minProperties !== undefined && keys.length < guards.minProperties) {
173
176
  payload.issues.push({
174
- code: "invalid_key",
175
- origin: "record",
176
- issues: result.error.issues,
177
- input: key,
178
- path: [key],
177
+ origin: "object",
178
+ code: "too_small",
179
+ minimum: guards.minProperties,
180
+ inclusive: true,
181
+ message: `Too small: expected object to have >=${guards.minProperties} properties`,
182
+ input: value,
183
+ inst: objectSchema,
179
184
  continue: true,
180
185
  });
181
186
  }
187
+ if (guards.maxProperties !== undefined && keys.length > guards.maxProperties) {
188
+ payload.issues.push({
189
+ origin: "object",
190
+ code: "too_big",
191
+ maximum: guards.maxProperties,
192
+ inclusive: true,
193
+ message: `Too big: expected object to have <=${guards.maxProperties} properties`,
194
+ input: value,
195
+ inst: objectSchema,
196
+ continue: true,
197
+ });
198
+ }
199
+ if (guards.keySchema) {
200
+ for (const key of keys) {
201
+ const result = guards.keySchema.safeParse(key);
202
+ if (result.success) continue;
203
+ payload.issues.push({
204
+ code: "invalid_key",
205
+ origin: "record",
206
+ issues: result.error.issues,
207
+ input: key,
208
+ path: [key],
209
+ continue: true,
210
+ });
211
+ }
212
+ }
182
213
  });
183
214
  return guard.pipe(objectSchema);
184
215
  }
185
216
 
217
+ /**
218
+ * An injective string for JSON data: two values share a key exactly when `uniqueItems` calls them
219
+ * equal, so duplicate detection is a Map lookup rather than a pairwise walk. Strings and keys are
220
+ * length-prefixed so no value can spell another one. `null` means "never equal to anything" — a
221
+ * cycle or a NaN, neither of which JSON can express.
222
+ */
223
+ function canonicalKey(value: unknown, seen: Set<object>): string | null {
224
+ if (value === null) return "z";
225
+ const type = typeof value;
226
+ if (type !== "object") {
227
+ if (type === "number" && Number.isNaN(value)) return null;
228
+ const raw = String(value);
229
+ return `${type[0]}${raw.length}:${raw}`;
230
+ }
231
+ if (seen.has(value as object)) return null;
232
+ seen.add(value as object);
233
+ try {
234
+ if (Array.isArray(value)) {
235
+ const parts: string[] = [];
236
+ for (const item of value) {
237
+ const key = canonicalKey(item, seen);
238
+ if (key === null) return null;
239
+ parts.push(key);
240
+ }
241
+ return `a${parts.length}:[${parts.join(",")}]`;
242
+ }
243
+ const keys = Object.keys(value as object).sort();
244
+ const parts: string[] = [];
245
+ for (const k of keys) {
246
+ const key = canonicalKey((value as any)[k], seen);
247
+ if (key === null) return null;
248
+ parts.push(`${k.length}:${k}=${key}`);
249
+ }
250
+ return `o${parts.length}:{${parts.join(",")}}`;
251
+ } finally {
252
+ seen.delete(value as object);
253
+ }
254
+ }
255
+
256
+ // keywords whose value is a schema or an array of them
257
+ const SCHEMA_KEYWORDS = /*@__PURE__*/ new Set([
258
+ "items",
259
+ "prefixItems",
260
+ "additionalItems",
261
+ "additionalProperties",
262
+ "contains",
263
+ "propertyNames",
264
+ "not",
265
+ "if",
266
+ "then",
267
+ "else",
268
+ "allOf",
269
+ "anyOf",
270
+ "oneOf",
271
+ "unevaluatedItems",
272
+ "unevaluatedProperties",
273
+ "contentSchema",
274
+ ]);
275
+
276
+ // keywords whose value maps names to schemas. draft-7 `dependencies` also allows an array of property names, which holds no schema to walk
277
+ const SCHEMA_MAP_KEYWORDS = /*@__PURE__*/ new Set([
278
+ "properties",
279
+ "patternProperties",
280
+ "dependentSchemas",
281
+ "dependencies",
282
+ "$defs",
283
+ "definitions",
284
+ ]);
285
+
286
+ /**
287
+ * True when a subschema holds a `$ref` anywhere a schema can appear. Only those positions are
288
+ * walked: `$ref` under `default` or an `x-` annotation is instance data with an ordinary key, and
289
+ * reading it as a reference would drop a constraint that resolves perfectly well.
290
+ */
291
+ function containsRef(value: unknown): boolean {
292
+ if (typeof value !== "object" || value === null) return false;
293
+ if (Array.isArray(value)) return value.some(containsRef);
294
+ if (typeof (value as any).$ref === "string") return true;
295
+ return Object.entries(value).some(([key, sub]) => {
296
+ if (SCHEMA_KEYWORDS.has(key)) return containsRef(sub);
297
+ if (!SCHEMA_MAP_KEYWORDS.has(key) || typeof sub !== "object" || sub === null) return false;
298
+ return Object.values(sub).some(containsRef);
299
+ });
300
+ }
301
+
302
+ function plural(n: number): string {
303
+ return n === 1 ? "element" : "elements";
304
+ }
305
+
306
+ /**
307
+ * Enforces `uniqueItems` and the `contains` family before `arraySchema` runs, for the same reason
308
+ * `checkObjectGuards` runs pre-pipe: an item parse can apply a nested `default`, so the parsed
309
+ * array is not the instance the keywords are defined over. A guard issue aborts the pipe, so
310
+ * `minItems`/`maxItems` are not also reported on the same parse — instance correctness is worth
311
+ * more than co-reporting two issues.
312
+ */
313
+ function checkArrayGuards(
314
+ arraySchema: ZodType,
315
+ guards: {
316
+ uniqueItems?: boolean | undefined;
317
+ containsSchema?: ZodType | undefined;
318
+ minContains?: number | undefined;
319
+ maxContains?: number | undefined;
320
+ }
321
+ ): ZodType {
322
+ // An identity transform, not z.any(), so `toJSONSchema` reports the array on both the input and the output side of the pipe.
323
+ const guard = z
324
+ .transform((value: unknown) => value)
325
+ .check((payload) => {
326
+ const items = payload.value;
327
+ if (!Array.isArray(items)) return;
328
+ if (guards.uniqueItems === true) {
329
+ const firstSeen = new Map<string, number>();
330
+ for (let i = 0; i < items.length; i++) {
331
+ const key = canonicalKey(items[i], new Set());
332
+ if (key === null) continue;
333
+ const first = firstSeen.get(key);
334
+ if (first === undefined) {
335
+ firstSeen.set(key, i);
336
+ continue;
337
+ }
338
+ payload.issues.push({
339
+ code: "custom",
340
+ message: `Array items must be unique: element at index ${i} duplicates the one at index ${first}`,
341
+ input: items,
342
+ path: [i],
343
+ continue: true,
344
+ });
345
+ }
346
+ }
347
+ if (guards.containsSchema) {
348
+ const minContains = guards.minContains ?? 1;
349
+ // one past the ceiling already proves the failure, and nothing above it changes the verdict
350
+ const ceiling = guards.maxContains !== undefined ? guards.maxContains + 1 : Number.POSITIVE_INFINITY;
351
+ let matches = 0;
352
+ for (const item of items) {
353
+ if (guards.containsSchema.safeParse(item).success && ++matches >= ceiling) break;
354
+ }
355
+ if (matches < minContains) {
356
+ // the scan ran to the end, so this count is exact
357
+ payload.issues.push({
358
+ code: "custom",
359
+ message: `Array must contain at least ${minContains} matching ${plural(minContains)}; found ${matches}`,
360
+ input: items,
361
+ continue: true,
362
+ });
363
+ }
364
+ if (guards.maxContains !== undefined && matches > guards.maxContains) {
365
+ payload.issues.push({
366
+ code: "custom",
367
+ message: `Array must contain at most ${guards.maxContains} matching ${plural(guards.maxContains)}`,
368
+ input: items,
369
+ continue: true,
370
+ });
371
+ }
372
+ }
373
+ });
374
+ return guard.pipe(arraySchema);
375
+ }
376
+
186
377
  function getTupleRest(restSchema: JSONSchema._JSONSchema | undefined, ctx: ConversionContext): ZodType | undefined {
187
378
  if (restSchema === false) {
188
379
  return undefined;
@@ -351,6 +542,8 @@ function convertBaseSchema(schema: JSONSchema.JSONSchema, ctx: ConversionContext
351
542
  stringSchema = stringSchema.check(z.e164());
352
543
  } else if (format === "credit_card") {
353
544
  stringSchema = stringSchema.check(z.creditCard());
545
+ } else if (format === "iban") {
546
+ stringSchema = stringSchema.check(z.iban());
354
547
  } else if (format === "jwt") {
355
548
  stringSchema = stringSchema.check(z.jwt());
356
549
  } else if (format === "emoji") {
@@ -519,20 +712,25 @@ function convertBaseSchema(schema: JSONSchema.JSONSchema, ctx: ConversionContext
519
712
  }
520
713
 
521
714
  // propertyNames constrains key *names* only, and says nothing about which keys are required or how their values validate. Layering it on top of the result keeps properties/patternProperties/additionalProperties composing underneath. `true` allows every name, so it needs no guard.
522
- if (schema.propertyNames !== undefined && schema.propertyNames !== true) {
523
- // Keys are always strings, so a propertyNames subschema that omits `type` still constrains them — without this it would convert to z.any().
524
- const keyJSONSchema =
525
- typeof schema.propertyNames === "object" && schema.propertyNames.type === undefined
526
- ? { type: "string", ...schema.propertyNames }
527
- : schema.propertyNames;
528
- zodSchema = checkPropertyNames(zodSchema, convertSchema(keyJSONSchema as JSONSchema.JSONSchema, ctx));
715
+ const hasKeyGuard = schema.propertyNames !== undefined && schema.propertyNames !== true;
716
+ const minProperties = typeof schema.minProperties === "number" ? schema.minProperties : undefined;
717
+ const maxProperties = typeof schema.maxProperties === "number" ? schema.maxProperties : undefined;
718
+ if (hasKeyGuard || minProperties !== undefined || maxProperties !== undefined) {
719
+ let keySchema: ZodType | undefined;
720
+ if (hasKeyGuard) {
721
+ // Keys are always strings, so a propertyNames subschema that omits `type` still constrains them — without this it would convert to z.any().
722
+ const keyJSONSchema =
723
+ typeof schema.propertyNames === "object" && schema.propertyNames.type === undefined
724
+ ? { type: "string", ...schema.propertyNames }
725
+ : schema.propertyNames;
726
+ keySchema = convertSchema(keyJSONSchema as JSONSchema.JSONSchema, ctx);
727
+ }
728
+ zodSchema = checkObjectGuards(zodSchema, { keySchema, minProperties, maxProperties });
529
729
  }
530
730
  break;
531
731
  }
532
732
 
533
733
  case "array": {
534
- // TODO: uniqueItems and contains/minContains/maxContains are not supported
535
-
536
734
  // Check if this is a tuple (prefixItems or items as array)
537
735
  const prefixItems = schema.prefixItems;
538
736
  const items = schema.items;
@@ -585,6 +783,18 @@ function convertBaseSchema(schema: JSONSchema.JSONSchema, ctx: ConversionContext
585
783
  // No items specified - array of any
586
784
  zodSchema = z.array(z.any());
587
785
  }
786
+
787
+ // minContains/maxContains only constrain anything when `contains` itself is present
788
+ if (schema.uniqueItems === true || schema.contains !== undefined) {
789
+ zodSchema = checkArrayGuards(zodSchema, {
790
+ uniqueItems: schema.uniqueItems === true,
791
+ containsSchema:
792
+ schema.contains !== undefined ? convertSchema(schema.contains as JSONSchema.JSONSchema, ctx) : undefined,
793
+ minContains: typeof schema.minContains === "number" ? schema.minContains : undefined,
794
+ maxContains: typeof schema.maxContains === "number" ? schema.maxContains : undefined,
795
+ });
796
+ }
797
+
588
798
  break;
589
799
  }
590
800
 
@@ -666,9 +876,22 @@ function convertSchema(schema: JSONSchema.JSONSchema | boolean, ctx: ConversionC
666
876
  }
667
877
  }
668
878
 
669
- // `propertyNames` is enforced by a key guard, which `toJSONSchema` cannot infer, so the original keyword is carried as metadata to keep the round-trip lossless. Only where it was actually applied: on any other type it is inert, and on a `$ref` the metadata would land on the target every reference shares.
670
- if (schema.propertyNames !== undefined && schema.type === "object" && schema.$ref === undefined) {
671
- extraMeta.propertyNames = schema.propertyNames;
879
+ // `propertyNames` and `contains` are enforced by a guard, which `toJSONSchema` cannot infer, so the original keyword is carried as metadata to keep the round-trip lossless. Only where it was actually applied: on any other type it is inert, and on a `$ref` the metadata would land on the target every reference shares. A carried subschema is copied verbatim while the root `$defs` stay behind, so one holding a `$ref` is dropped rather than emitted as a dangling reference.
880
+ if (schema.type === "object" && schema.$ref === undefined) {
881
+ if (schema.propertyNames !== undefined && !containsRef(schema.propertyNames)) {
882
+ extraMeta.propertyNames = schema.propertyNames;
883
+ }
884
+ for (const key of ["minProperties", "maxProperties"] as const) {
885
+ if (schema[key] !== undefined) extraMeta[key] = schema[key];
886
+ }
887
+ }
888
+ if (schema.type === "array" && schema.$ref === undefined) {
889
+ if (schema.contains !== undefined && !containsRef(schema.contains)) {
890
+ extraMeta.contains = schema.contains;
891
+ }
892
+ for (const key of ["uniqueItems", "minContains", "maxContains"] as const) {
893
+ if (schema[key] !== undefined) extraMeta[key] = schema[key];
894
+ }
672
895
  }
673
896
 
674
897
  for (const key of Object.keys(schema)) {