@harrylabsj/kiwi-merchant-cloud 0.12.5 → 0.12.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1874) hide show
  1. package/app/a2a/access/workbuddy-address.d.ts +45 -0
  2. package/app/a2a/access/workbuddy-address.js +88 -0
  3. package/app/a2a/access/workbuddy-address.js.map +1 -0
  4. package/app/a2a/client/client.d.ts +6 -0
  5. package/app/a2a/client/client.js +27 -2
  6. package/app/a2a/client/client.js.map +1 -1
  7. package/app/a2a/client/types.d.ts +5 -0
  8. package/app/a2a/server/server.d.ts +5 -0
  9. package/app/a2a/server/server.js +10 -2
  10. package/app/a2a/server/server.js.map +1 -1
  11. package/app/buyer-core/a2a-knp.d.ts +18 -1
  12. package/app/buyer-core/a2a-knp.js +29 -5
  13. package/app/buyer-core/a2a-knp.js.map +1 -1
  14. package/app/buyer-core/a2a-negotiator.d.ts +4 -0
  15. package/app/buyer-core/a2a-negotiator.js +3 -0
  16. package/app/buyer-core/a2a-negotiator.js.map +1 -1
  17. package/app/buyer-core/a2a-quote-fetcher.d.ts +47 -0
  18. package/app/buyer-core/a2a-quote-fetcher.js +109 -11
  19. package/app/buyer-core/a2a-quote-fetcher.js.map +1 -1
  20. package/app/buyer-core/build-service.d.ts +7 -0
  21. package/app/buyer-core/build-service.js +67 -0
  22. package/app/buyer-core/build-service.js.map +1 -1
  23. package/app/buyer-core/merchant-index.js +3 -0
  24. package/app/buyer-core/merchant-index.js.map +1 -1
  25. package/app/buyer-core/protocol-recovery.js +7 -0
  26. package/app/buyer-core/protocol-recovery.js.map +1 -1
  27. package/app/buyer-core/service.d.ts +36 -1
  28. package/app/buyer-core/service.js +325 -33
  29. package/app/buyer-core/service.js.map +1 -1
  30. package/app/buyer-core/store.d.ts +23 -0
  31. package/app/buyer-core/store.js +71 -8
  32. package/app/buyer-core/store.js.map +1 -1
  33. package/app/cloud/access/workbuddy-share-link.d.ts +92 -0
  34. package/app/cloud/access/workbuddy-share-link.js +150 -0
  35. package/app/cloud/access/workbuddy-share-link.js.map +1 -0
  36. package/app/cloud/bootstrap.d.ts +13 -0
  37. package/app/cloud/bootstrap.js +60 -4
  38. package/app/cloud/bootstrap.js.map +1 -1
  39. package/app/cloud/catalog-client.d.ts +66 -0
  40. package/app/cloud/catalog-client.js +155 -0
  41. package/app/cloud/catalog-client.js.map +1 -1
  42. package/app/cloud/config.d.ts +32 -0
  43. package/app/cloud/config.js +79 -3
  44. package/app/cloud/config.js.map +1 -1
  45. package/app/cloud/connect-service.d.ts +68 -0
  46. package/app/cloud/connect-service.js +198 -0
  47. package/app/cloud/connect-service.js.map +1 -1
  48. package/app/cloud/http-router.d.ts +5 -0
  49. package/app/cloud/http-router.js +7 -0
  50. package/app/cloud/http-router.js.map +1 -1
  51. package/app/cloud/main.d.ts +69 -0
  52. package/app/cloud/main.js +285 -0
  53. package/app/cloud/main.js.map +1 -1
  54. package/app/cloud/owned-clock.d.ts +27 -0
  55. package/app/cloud/owned-clock.js +98 -0
  56. package/app/cloud/owned-clock.js.map +1 -0
  57. package/app/cloud/owned-runtime.d.ts +188 -0
  58. package/app/cloud/owned-runtime.js +1041 -0
  59. package/app/cloud/owned-runtime.js.map +1 -0
  60. package/app/cloud-sample/products.json +3 -3
  61. package/app/demo/demo-runner.js +6 -0
  62. package/app/demo/demo-runner.js.map +1 -1
  63. package/app/discovery/catalog-source/kiwi-record.d.ts +10 -0
  64. package/app/discovery/catalog-source/kiwi-record.js.map +1 -1
  65. package/app/discovery/catalog-source/merchant-access.d.ts +77 -0
  66. package/app/discovery/catalog-source/merchant-access.js +279 -0
  67. package/app/discovery/catalog-source/merchant-access.js.map +1 -0
  68. package/app/handoff/destination.d.ts +2 -0
  69. package/app/handoff/destination.js +4 -0
  70. package/app/handoff/destination.js.map +1 -1
  71. package/app/http/merchant-management/api.d.ts +21 -0
  72. package/app/http/merchant-management/api.js +79 -0
  73. package/app/http/merchant-management/api.js.map +1 -1
  74. package/app/http/merchant-management/page.js +81 -1
  75. package/app/http/merchant-management/page.js.map +1 -1
  76. package/app/tools/trusted-buyer-keys.d.ts +31 -0
  77. package/app/tools/trusted-buyer-keys.js +98 -0
  78. package/app/tools/trusted-buyer-keys.js.map +1 -0
  79. package/app/tools/workbuddy-echo.d.ts +69 -0
  80. package/app/tools/workbuddy-echo.js +132 -0
  81. package/app/tools/workbuddy-echo.js.map +1 -0
  82. package/build-manifest.json +42847 -41772
  83. package/contracts/kiwi-catalog/1.0/agent-record.schema.json +21 -0
  84. package/contracts/kiwi-contracts.lock.json +2 -2
  85. package/contracts/manifest.json +2 -2
  86. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/README.md +356 -0
  87. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/cloudflare.d.ts +53 -0
  88. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/cloudflare.d.ts.map +1 -0
  89. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/cloudflare.js +64 -0
  90. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/cloudflare.js.map +1 -0
  91. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/declarations.d.ts +43 -0
  92. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/declarations.d.ts.map +1 -0
  93. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/declarations.js +320 -0
  94. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/declarations.js.map +1 -0
  95. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/identifier.d.ts +6 -0
  96. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/identifier.d.ts.map +1 -0
  97. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/identifier.js +13 -0
  98. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/identifier.js.map +1 -0
  99. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/index.d.ts +11 -0
  100. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/index.d.ts.map +1 -0
  101. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/index.js +10 -0
  102. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/index.js.map +1 -0
  103. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/portable.d.ts +15 -0
  104. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/portable.d.ts.map +1 -0
  105. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/portable.js +12 -0
  106. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/portable.js.map +1 -0
  107. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/runtime/execution.d.ts +66 -0
  108. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/runtime/execution.d.ts.map +1 -0
  109. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/runtime/execution.js +494 -0
  110. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/runtime/execution.js.map +1 -0
  111. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/runtime/host.d.ts +13 -0
  112. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/runtime/host.d.ts.map +1 -0
  113. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/runtime/host.js +72 -0
  114. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/runtime/host.js.map +1 -0
  115. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/runtime/inline.d.ts +63 -0
  116. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/runtime/inline.d.ts.map +1 -0
  117. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/runtime/inline.js +80 -0
  118. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/runtime/inline.js.map +1 -0
  119. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/runtime/prelude-source.d.ts +45 -0
  120. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/runtime/prelude-source.d.ts.map +1 -0
  121. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/runtime/prelude-source.js +520 -0
  122. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/runtime/prelude-source.js.map +1 -0
  123. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/runtime/protocol.d.ts +110 -0
  124. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/runtime/protocol.d.ts.map +1 -0
  125. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/runtime/protocol.js +15 -0
  126. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/runtime/protocol.js.map +1 -0
  127. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/runtime/remote.d.ts +102 -0
  128. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/runtime/remote.d.ts.map +1 -0
  129. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/runtime/remote.js +175 -0
  130. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/runtime/remote.js.map +1 -0
  131. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/runtime/vm.d.ts +24 -0
  132. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/runtime/vm.d.ts.map +1 -0
  133. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/runtime/vm.js +293 -0
  134. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/runtime/vm.js.map +1 -0
  135. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/runtime/worker.d.ts +2 -0
  136. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/runtime/worker.d.ts.map +1 -0
  137. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/runtime/worker.js +38 -0
  138. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/runtime/worker.js.map +1 -0
  139. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/source.d.ts +36 -0
  140. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/source.d.ts.map +1 -0
  141. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/source.js +98 -0
  142. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/source.js.map +1 -0
  143. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/types.d.ts +232 -0
  144. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/types.d.ts.map +1 -0
  145. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/types.js +2 -0
  146. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/types.js.map +1 -0
  147. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/wasm.d.ts +12 -0
  148. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/wasm.d.ts.map +1 -0
  149. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/wasm.js +24 -0
  150. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/wasm.js.map +1 -0
  151. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/package.json +76 -0
  152. package/node_modules/body-parser/README.md +17 -13
  153. package/node_modules/body-parser/lib/read.js +74 -57
  154. package/node_modules/body-parser/lib/types/json.js +11 -11
  155. package/node_modules/body-parser/lib/types/urlencoded.js +5 -5
  156. package/node_modules/body-parser/lib/utils.js +0 -15
  157. package/node_modules/body-parser/package.json +7 -12
  158. package/node_modules/fast-uri/.github/workflows/release.yml +35 -0
  159. package/node_modules/fast-uri/README.md +8 -0
  160. package/node_modules/fast-uri/index.js +98 -18
  161. package/node_modules/fast-uri/lib/utils.js +52 -0
  162. package/node_modules/fast-uri/package.json +1 -1
  163. package/node_modules/fast-uri/test/host-delimiter-security.test.js +94 -0
  164. package/node_modules/fast-uri/test/relative-normalization-security.test.js +156 -0
  165. package/node_modules/fast-uri/test/reserved-path-normalization.test.js +32 -4
  166. package/node_modules/fast-uri/test/scheme-validation.test.js +53 -14
  167. package/node_modules/hono/README.md +1 -1
  168. package/node_modules/hono/dist/_virtual/_rolldown/runtime.js +13 -0
  169. package/node_modules/hono/dist/adapter/aws-lambda/conninfo.js +42 -23
  170. package/node_modules/hono/dist/adapter/aws-lambda/handler.js +320 -342
  171. package/node_modules/hono/dist/adapter/aws-lambda/index.js +2 -8
  172. package/node_modules/hono/dist/adapter/aws-lambda/types.js +1 -0
  173. package/node_modules/hono/dist/adapter/bun/conninfo.js +20 -25
  174. package/node_modules/hono/dist/adapter/bun/index.js +3 -13
  175. package/node_modules/hono/dist/adapter/bun/serve-static.js +27 -27
  176. package/node_modules/hono/dist/adapter/bun/server.js +11 -5
  177. package/node_modules/hono/dist/adapter/bun/ssg.js +25 -15
  178. package/node_modules/hono/dist/adapter/bun/websocket.js +61 -68
  179. package/node_modules/hono/dist/adapter/cloudflare-pages/conninfo.js +24 -9
  180. package/node_modules/hono/dist/adapter/cloudflare-pages/handler.js +59 -62
  181. package/node_modules/hono/dist/adapter/cloudflare-pages/index.js +2 -8
  182. package/node_modules/hono/dist/adapter/cloudflare-workers/conninfo.js +7 -9
  183. package/node_modules/hono/dist/adapter/cloudflare-workers/index.js +3 -8
  184. package/node_modules/hono/dist/adapter/cloudflare-workers/serve-static-module.js +5 -6
  185. package/node_modules/hono/dist/adapter/cloudflare-workers/serve-static.js +26 -20
  186. package/node_modules/hono/dist/adapter/cloudflare-workers/utils.js +21 -34
  187. package/node_modules/hono/dist/adapter/cloudflare-workers/websocket.js +31 -39
  188. package/node_modules/hono/dist/adapter/deno/conninfo.js +16 -13
  189. package/node_modules/hono/dist/adapter/deno/deno.d.js +1 -0
  190. package/node_modules/hono/dist/adapter/deno/index.js +3 -10
  191. package/node_modules/hono/dist/adapter/deno/serve-static.js +33 -38
  192. package/node_modules/hono/dist/adapter/deno/ssg.js +27 -16
  193. package/node_modules/hono/dist/adapter/deno/websocket.js +30 -30
  194. package/node_modules/hono/dist/adapter/lambda-edge/conninfo.js +7 -9
  195. package/node_modules/hono/dist/adapter/lambda-edge/handler.js +102 -87
  196. package/node_modules/hono/dist/adapter/lambda-edge/index.js +2 -6
  197. package/node_modules/hono/dist/adapter/netlify/conninfo.js +24 -9
  198. package/node_modules/hono/dist/adapter/netlify/handler.js +10 -8
  199. package/node_modules/hono/dist/adapter/netlify/index.js +3 -2
  200. package/node_modules/hono/dist/adapter/netlify/mod.js +2 -6
  201. package/node_modules/hono/dist/adapter/service-worker/handler.js +15 -19
  202. package/node_modules/hono/dist/adapter/service-worker/index.js +23 -7
  203. package/node_modules/hono/dist/adapter/service-worker/types.js +1 -0
  204. package/node_modules/hono/dist/adapter/vercel/conninfo.js +7 -10
  205. package/node_modules/hono/dist/adapter/vercel/handler.js +8 -6
  206. package/node_modules/hono/dist/adapter/vercel/index.js +2 -6
  207. package/node_modules/hono/dist/cjs/_virtual/_rolldown/runtime.js +33 -0
  208. package/node_modules/hono/dist/cjs/adapter/aws-lambda/conninfo.js +42 -44
  209. package/node_modules/hono/dist/cjs/adapter/aws-lambda/handler.js +328 -371
  210. package/node_modules/hono/dist/cjs/adapter/aws-lambda/index.js +7 -34
  211. package/node_modules/hono/dist/cjs/adapter/aws-lambda/types.js +0 -15
  212. package/node_modules/hono/dist/cjs/adapter/bun/conninfo.js +21 -47
  213. package/node_modules/hono/dist/cjs/adapter/bun/index.js +14 -45
  214. package/node_modules/hono/dist/cjs/adapter/bun/serve-static.js +29 -50
  215. package/node_modules/hono/dist/cjs/adapter/bun/server.js +11 -26
  216. package/node_modules/hono/dist/cjs/adapter/bun/ssg.js +24 -35
  217. package/node_modules/hono/dist/cjs/adapter/bun/websocket.js +63 -91
  218. package/node_modules/hono/dist/cjs/adapter/cloudflare-pages/conninfo.js +25 -31
  219. package/node_modules/hono/dist/cjs/adapter/cloudflare-pages/handler.js +61 -85
  220. package/node_modules/hono/dist/cjs/adapter/cloudflare-pages/index.js +7 -34
  221. package/node_modules/hono/dist/cjs/adapter/cloudflare-workers/conninfo.js +8 -31
  222. package/node_modules/hono/dist/cjs/adapter/cloudflare-workers/index.js +7 -33
  223. package/node_modules/hono/dist/cjs/adapter/cloudflare-workers/serve-static-module.js +7 -29
  224. package/node_modules/hono/dist/cjs/adapter/cloudflare-workers/serve-static.js +27 -42
  225. package/node_modules/hono/dist/cjs/adapter/cloudflare-workers/utils.js +21 -55
  226. package/node_modules/hono/dist/cjs/adapter/cloudflare-workers/websocket.js +33 -62
  227. package/node_modules/hono/dist/cjs/adapter/deno/conninfo.js +16 -34
  228. package/node_modules/hono/dist/cjs/adapter/deno/index.js +10 -38
  229. package/node_modules/hono/dist/cjs/adapter/deno/serve-static.js +33 -59
  230. package/node_modules/hono/dist/cjs/adapter/deno/ssg.js +27 -37
  231. package/node_modules/hono/dist/cjs/adapter/deno/websocket.js +32 -53
  232. package/node_modules/hono/dist/cjs/adapter/lambda-edge/conninfo.js +8 -31
  233. package/node_modules/hono/dist/cjs/adapter/lambda-edge/handler.js +105 -119
  234. package/node_modules/hono/dist/cjs/adapter/lambda-edge/index.js +5 -30
  235. package/node_modules/hono/dist/cjs/adapter/netlify/conninfo.js +25 -31
  236. package/node_modules/hono/dist/cjs/adapter/netlify/handler.js +10 -29
  237. package/node_modules/hono/dist/cjs/adapter/netlify/index.js +5 -21
  238. package/node_modules/hono/dist/cjs/adapter/netlify/mod.js +5 -30
  239. package/node_modules/hono/dist/cjs/adapter/service-worker/handler.js +16 -41
  240. package/node_modules/hono/dist/cjs/adapter/service-worker/index.js +25 -30
  241. package/node_modules/hono/dist/cjs/adapter/service-worker/types.js +0 -15
  242. package/node_modules/hono/dist/cjs/adapter/vercel/conninfo.js +8 -32
  243. package/node_modules/hono/dist/cjs/adapter/vercel/handler.js +8 -27
  244. package/node_modules/hono/dist/cjs/adapter/vercel/index.js +5 -30
  245. package/node_modules/hono/dist/cjs/client/client.js +139 -212
  246. package/node_modules/hono/dist/cjs/client/fetch-result-please.js +62 -80
  247. package/node_modules/hono/dist/cjs/client/index.js +7 -32
  248. package/node_modules/hono/dist/cjs/client/types.js +0 -15
  249. package/node_modules/hono/dist/cjs/client/utils.js +54 -92
  250. package/node_modules/hono/dist/cjs/compose.js +49 -66
  251. package/node_modules/hono/dist/cjs/context.js +379 -450
  252. package/node_modules/hono/dist/cjs/helper/accepts/accepts.js +47 -70
  253. package/node_modules/hono/dist/cjs/helper/accepts/index.js +3 -27
  254. package/node_modules/hono/dist/cjs/helper/adapter/index.js +33 -73
  255. package/node_modules/hono/dist/cjs/helper/conninfo/index.js +0 -15
  256. package/node_modules/hono/dist/cjs/helper/conninfo/types.js +0 -15
  257. package/node_modules/hono/dist/cjs/helper/cookie/index.js +75 -116
  258. package/node_modules/hono/dist/cjs/helper/css/common.js +165 -244
  259. package/node_modules/hono/dist/cjs/helper/css/index.js +136 -151
  260. package/node_modules/hono/dist/cjs/helper/dev/index.js +45 -71
  261. package/node_modules/hono/dist/cjs/helper/factory/index.js +30 -51
  262. package/node_modules/hono/dist/cjs/helper/html/index.js +32 -62
  263. package/node_modules/hono/dist/cjs/helper/proxy/index.js +113 -106
  264. package/node_modules/hono/dist/cjs/helper/route/index.js +123 -66
  265. package/node_modules/hono/dist/cjs/helper/ssg/index.js +19 -43
  266. package/node_modules/hono/dist/cjs/helper/ssg/middleware.js +56 -64
  267. package/node_modules/hono/dist/cjs/helper/ssg/plugins.js +55 -57
  268. package/node_modules/hono/dist/cjs/helper/ssg/ssg.js +196 -296
  269. package/node_modules/hono/dist/cjs/helper/ssg/utils.js +47 -90
  270. package/node_modules/hono/dist/cjs/helper/streaming/index.js +8 -35
  271. package/node_modules/hono/dist/cjs/helper/streaming/sse.js +53 -85
  272. package/node_modules/hono/dist/cjs/helper/streaming/stream.js +23 -53
  273. package/node_modules/hono/dist/cjs/helper/streaming/text.js +10 -32
  274. package/node_modules/hono/dist/cjs/helper/streaming/utils.js +13 -32
  275. package/node_modules/hono/dist/cjs/helper/testing/index.js +16 -31
  276. package/node_modules/hono/dist/cjs/helper/websocket/index.js +51 -76
  277. package/node_modules/hono/dist/cjs/hono-base.js +345 -403
  278. package/node_modules/hono/dist/cjs/hono.js +28 -42
  279. package/node_modules/hono/dist/cjs/http-exception.js +55 -56
  280. package/node_modules/hono/dist/cjs/index.js +22 -30
  281. package/node_modules/hono/dist/cjs/jsx/base.js +237 -366
  282. package/node_modules/hono/dist/cjs/jsx/children.js +16 -41
  283. package/node_modules/hono/dist/cjs/jsx/components.js +119 -192
  284. package/node_modules/hono/dist/cjs/jsx/constants.js +15 -42
  285. package/node_modules/hono/dist/cjs/jsx/context.js +144 -162
  286. package/node_modules/hono/dist/cjs/jsx/dom/client.js +49 -69
  287. package/node_modules/hono/dist/cjs/jsx/dom/components.js +23 -52
  288. package/node_modules/hono/dist/cjs/jsx/dom/context.js +39 -67
  289. package/node_modules/hono/dist/cjs/jsx/dom/css.js +143 -158
  290. package/node_modules/hono/dist/cjs/jsx/dom/hooks/index.js +55 -64
  291. package/node_modules/hono/dist/cjs/jsx/dom/index.js +114 -173
  292. package/node_modules/hono/dist/cjs/jsx/dom/intrinsic-element/components.js +282 -375
  293. package/node_modules/hono/dist/cjs/jsx/dom/jsx-dev-runtime.js +14 -49
  294. package/node_modules/hono/dist/cjs/jsx/dom/jsx-runtime.js +5 -32
  295. package/node_modules/hono/dist/cjs/jsx/dom/render.js +471 -589
  296. package/node_modules/hono/dist/cjs/jsx/dom/server.js +37 -64
  297. package/node_modules/hono/dist/cjs/jsx/dom/utils.js +7 -30
  298. package/node_modules/hono/dist/cjs/jsx/hooks/index.js +225 -318
  299. package/node_modules/hono/dist/cjs/jsx/index.js +86 -135
  300. package/node_modules/hono/dist/cjs/jsx/intrinsic-element/common.js +20 -43
  301. package/node_modules/hono/dist/cjs/jsx/intrinsic-element/components.js +117 -168
  302. package/node_modules/hono/dist/cjs/jsx/intrinsic-elements.js +0 -15
  303. package/node_modules/hono/dist/cjs/jsx/jsx-dev-runtime.js +14 -39
  304. package/node_modules/hono/dist/cjs/jsx/jsx-runtime.js +34 -68
  305. package/node_modules/hono/dist/cjs/jsx/streaming.js +123 -166
  306. package/node_modules/hono/dist/cjs/jsx/types.js +0 -15
  307. package/node_modules/hono/dist/cjs/jsx/utils.js +91 -175
  308. package/node_modules/hono/dist/cjs/middleware/basic-auth/index.js +98 -86
  309. package/node_modules/hono/dist/cjs/middleware/bearer-auth/index.js +92 -109
  310. package/node_modules/hono/dist/cjs/middleware/body-limit/index.js +66 -72
  311. package/node_modules/hono/dist/cjs/middleware/cache/index.js +153 -199
  312. package/node_modules/hono/dist/cjs/middleware/combine/index.js +133 -95
  313. package/node_modules/hono/dist/cjs/middleware/compress/index.js +73 -88
  314. package/node_modules/hono/dist/cjs/middleware/context-storage/index.js +49 -41
  315. package/node_modules/hono/dist/cjs/middleware/cors/index.js +107 -107
  316. package/node_modules/hono/dist/cjs/middleware/csrf/index.js +101 -72
  317. package/node_modules/hono/dist/cjs/middleware/etag/digest.js +58 -97
  318. package/node_modules/hono/dist/cjs/middleware/etag/index.js +71 -91
  319. package/node_modules/hono/dist/cjs/middleware/ip-restriction/index.js +161 -169
  320. package/node_modules/hono/dist/cjs/middleware/jsx-renderer/index.js +99 -77
  321. package/node_modules/hono/dist/cjs/middleware/jwk/index.js +3 -27
  322. package/node_modules/hono/dist/cjs/middleware/jwk/jwk.js +118 -135
  323. package/node_modules/hono/dist/cjs/middleware/jwt/index.js +9 -38
  324. package/node_modules/hono/dist/cjs/middleware/jwt/jwt.js +120 -141
  325. package/node_modules/hono/dist/cjs/middleware/language/index.js +7 -35
  326. package/node_modules/hono/dist/cjs/middleware/language/language.js +184 -179
  327. package/node_modules/hono/dist/cjs/middleware/logger/index.js +41 -62
  328. package/node_modules/hono/dist/cjs/middleware/method-not-allowed/index.js +82 -88
  329. package/node_modules/hono/dist/cjs/middleware/method-override/index.js +101 -102
  330. package/node_modules/hono/dist/cjs/middleware/powered-by/index.js +23 -30
  331. package/node_modules/hono/dist/cjs/middleware/pretty-json/index.js +38 -36
  332. package/node_modules/hono/dist/cjs/middleware/request-id/index.js +3 -27
  333. package/node_modules/hono/dist/cjs/middleware/request-id/request-id.js +34 -42
  334. package/node_modules/hono/dist/cjs/middleware/secure-headers/index.js +4 -29
  335. package/node_modules/hono/dist/cjs/middleware/secure-headers/permissions-policy.js +0 -15
  336. package/node_modules/hono/dist/cjs/middleware/secure-headers/secure-headers.js +142 -174
  337. package/node_modules/hono/dist/cjs/middleware/serve-static/index.js +56 -93
  338. package/node_modules/hono/dist/cjs/middleware/serve-static/path.js +15 -38
  339. package/node_modules/hono/dist/cjs/middleware/timeout/index.js +40 -45
  340. package/node_modules/hono/dist/cjs/middleware/timing/index.js +7 -35
  341. package/node_modules/hono/dist/cjs/middleware/timing/timing.js +177 -118
  342. package/node_modules/hono/dist/cjs/middleware/trailing-slash/index.js +85 -58
  343. package/node_modules/hono/dist/cjs/preset/quick.js +18 -37
  344. package/node_modules/hono/dist/cjs/preset/tiny.js +15 -33
  345. package/node_modules/hono/dist/cjs/request/constants.js +5 -27
  346. package/node_modules/hono/dist/cjs/request.js +334 -343
  347. package/node_modules/hono/dist/cjs/router/linear-router/index.js +3 -27
  348. package/node_modules/hono/dist/cjs/router/linear-router/router.js +95 -143
  349. package/node_modules/hono/dist/cjs/router/pattern-router/index.js +3 -27
  350. package/node_modules/hono/dist/cjs/router/pattern-router/router.js +41 -63
  351. package/node_modules/hono/dist/cjs/router/reg-exp-router/index.js +7 -34
  352. package/node_modules/hono/dist/cjs/router/reg-exp-router/matcher.js +18 -45
  353. package/node_modules/hono/dist/cjs/router/reg-exp-router/node.js +91 -135
  354. package/node_modules/hono/dist/cjs/router/reg-exp-router/prepared-router.js +92 -161
  355. package/node_modules/hono/dist/cjs/router/reg-exp-router/router.js +98 -147
  356. package/node_modules/hono/dist/cjs/router/reg-exp-router/trie.js +73 -89
  357. package/node_modules/hono/dist/cjs/router/smart-router/index.js +3 -27
  358. package/node_modules/hono/dist/cjs/router/smart-router/router.js +49 -79
  359. package/node_modules/hono/dist/cjs/router/trie-router/index.js +3 -27
  360. package/node_modules/hono/dist/cjs/router/trie-router/node.js +134 -186
  361. package/node_modules/hono/dist/cjs/router/trie-router/router.js +15 -39
  362. package/node_modules/hono/dist/cjs/router/utils.js +5 -27
  363. package/node_modules/hono/dist/cjs/router.js +37 -37
  364. package/node_modules/hono/dist/cjs/types.js +5 -28
  365. package/node_modules/hono/dist/cjs/utils/accept.js +177 -228
  366. package/node_modules/hono/dist/cjs/utils/basic-auth.js +16 -40
  367. package/node_modules/hono/dist/cjs/utils/body.js +84 -110
  368. package/node_modules/hono/dist/cjs/utils/buffer.js +43 -91
  369. package/node_modules/hono/dist/cjs/utils/color.js +35 -44
  370. package/node_modules/hono/dist/cjs/utils/compress.js +11 -26
  371. package/node_modules/hono/dist/cjs/utils/concurrent.js +29 -59
  372. package/node_modules/hono/dist/cjs/utils/constants.js +7 -26
  373. package/node_modules/hono/dist/cjs/utils/cookie.js +107 -177
  374. package/node_modules/hono/dist/cjs/utils/crypto.js +30 -61
  375. package/node_modules/hono/dist/cjs/utils/encode.js +31 -48
  376. package/node_modules/hono/dist/cjs/utils/filepath.js +23 -54
  377. package/node_modules/hono/dist/cjs/utils/handler.js +11 -33
  378. package/node_modules/hono/dist/cjs/utils/headers.js +0 -15
  379. package/node_modules/hono/dist/cjs/utils/html.js +96 -137
  380. package/node_modules/hono/dist/cjs/utils/http-status.js +0 -15
  381. package/node_modules/hono/dist/cjs/utils/ipaddr.js +213 -286
  382. package/node_modules/hono/dist/cjs/utils/jwt/index.js +14 -27
  383. package/node_modules/hono/dist/cjs/utils/jwt/jwa.js +25 -42
  384. package/node_modules/hono/dist/cjs/utils/jwt/jws.js +119 -199
  385. package/node_modules/hono/dist/cjs/utils/jwt/jwt.js +122 -205
  386. package/node_modules/hono/dist/cjs/utils/jwt/types.js +122 -159
  387. package/node_modules/hono/dist/cjs/utils/jwt/utf8.js +9 -28
  388. package/node_modules/hono/dist/cjs/utils/mime.js +75 -101
  389. package/node_modules/hono/dist/cjs/utils/stream.js +88 -111
  390. package/node_modules/hono/dist/cjs/utils/types.js +0 -15
  391. package/node_modules/hono/dist/cjs/utils/url.js +185 -234
  392. package/node_modules/hono/dist/cjs/validator/index.js +3 -27
  393. package/node_modules/hono/dist/cjs/validator/utils.js +0 -15
  394. package/node_modules/hono/dist/cjs/validator/validator.js +60 -103
  395. package/node_modules/hono/dist/client/client.js +138 -197
  396. package/node_modules/hono/dist/client/fetch-result-please.js +59 -56
  397. package/node_modules/hono/dist/client/index.js +3 -7
  398. package/node_modules/hono/dist/client/types.js +1 -0
  399. package/node_modules/hono/dist/client/utils.js +51 -68
  400. package/node_modules/hono/dist/compose.js +49 -45
  401. package/node_modules/hono/dist/context.js +376 -426
  402. package/node_modules/hono/dist/helper/accepts/accepts.js +47 -49
  403. package/node_modules/hono/dist/helper/accepts/index.js +1 -4
  404. package/node_modules/hono/dist/helper/adapter/index.js +33 -52
  405. package/node_modules/hono/dist/helper/conninfo/index.js +1 -0
  406. package/node_modules/hono/dist/helper/conninfo/types.js +1 -0
  407. package/node_modules/hono/dist/helper/cookie/index.js +74 -94
  408. package/node_modules/hono/dist/helper/css/common.js +167 -225
  409. package/node_modules/hono/dist/helper/css/index.js +132 -137
  410. package/node_modules/hono/dist/helper/dev/index.js +44 -49
  411. package/node_modules/hono/dist/helper/factory/index.js +27 -27
  412. package/node_modules/hono/dist/helper/html/index.js +30 -39
  413. package/node_modules/hono/dist/helper/proxy/index.js +116 -88
  414. package/node_modules/hono/dist/helper/route/index.js +121 -43
  415. package/node_modules/hono/dist/helper/ssg/index.js +3 -18
  416. package/node_modules/hono/dist/helper/ssg/middleware.js +53 -40
  417. package/node_modules/hono/dist/helper/ssg/plugins.js +55 -36
  418. package/node_modules/hono/dist/helper/ssg/ssg.js +198 -283
  419. package/node_modules/hono/dist/helper/ssg/utils.js +53 -75
  420. package/node_modules/hono/dist/helper/streaming/index.js +2 -8
  421. package/node_modules/hono/dist/helper/streaming/sse.js +50 -61
  422. package/node_modules/hono/dist/helper/streaming/stream.js +22 -31
  423. package/node_modules/hono/dist/helper/streaming/text.js +9 -10
  424. package/node_modules/hono/dist/helper/streaming/utils.js +9 -12
  425. package/node_modules/hono/dist/helper/testing/index.js +16 -10
  426. package/node_modules/hono/dist/helper/websocket/index.js +49 -53
  427. package/node_modules/hono/dist/hono-base.js +342 -379
  428. package/node_modules/hono/dist/hono.js +27 -20
  429. package/node_modules/hono/dist/http-exception.js +53 -33
  430. package/node_modules/hono/dist/index.js +19 -6
  431. package/node_modules/hono/dist/jsx/base.js +231 -340
  432. package/node_modules/hono/dist/jsx/children.js +16 -20
  433. package/node_modules/hono/dist/jsx/components.js +118 -170
  434. package/node_modules/hono/dist/jsx/constants.js +9 -15
  435. package/node_modules/hono/dist/jsx/context.js +153 -150
  436. package/node_modules/hono/dist/jsx/dom/client.js +45 -48
  437. package/node_modules/hono/dist/jsx/dom/components.js +21 -29
  438. package/node_modules/hono/dist/jsx/dom/context.js +37 -44
  439. package/node_modules/hono/dist/jsx/dom/css.js +142 -147
  440. package/node_modules/hono/dist/jsx/dom/hooks/index.js +52 -40
  441. package/node_modules/hono/dist/jsx/dom/index.js +71 -134
  442. package/node_modules/hono/dist/jsx/dom/intrinsic-element/components.js +275 -359
  443. package/node_modules/hono/dist/jsx/dom/jsx-dev-runtime.js +14 -18
  444. package/node_modules/hono/dist/jsx/dom/jsx-runtime.js +2 -8
  445. package/node_modules/hono/dist/jsx/dom/render.js +492 -595
  446. package/node_modules/hono/dist/jsx/dom/server.js +32 -32
  447. package/node_modules/hono/dist/jsx/dom/utils.js +6 -8
  448. package/node_modules/hono/dist/jsx/hooks/index.js +236 -308
  449. package/node_modules/hono/dist/jsx/index.js +45 -98
  450. package/node_modules/hono/dist/jsx/intrinsic-element/common.js +20 -22
  451. package/node_modules/hono/dist/jsx/intrinsic-element/components.js +113 -154
  452. package/node_modules/hono/dist/jsx/intrinsic-elements.js +1 -0
  453. package/node_modules/hono/dist/jsx/jsx-dev-runtime.js +12 -16
  454. package/node_modules/hono/dist/jsx/jsx-runtime.js +29 -42
  455. package/node_modules/hono/dist/jsx/streaming.js +120 -142
  456. package/node_modules/hono/dist/jsx/types.js +1 -0
  457. package/node_modules/hono/dist/jsx/utils.js +105 -168
  458. package/node_modules/hono/dist/middleware/basic-auth/index.js +96 -63
  459. package/node_modules/hono/dist/middleware/bearer-auth/index.js +93 -89
  460. package/node_modules/hono/dist/middleware/body-limit/index.js +66 -51
  461. package/node_modules/hono/dist/middleware/cache/index.js +165 -190
  462. package/node_modules/hono/dist/middleware/combine/index.js +132 -73
  463. package/node_modules/hono/dist/middleware/compress/index.js +75 -69
  464. package/node_modules/hono/dist/middleware/context-storage/index.js +49 -19
  465. package/node_modules/hono/dist/middleware/cors/index.js +107 -86
  466. package/node_modules/hono/dist/middleware/csrf/index.js +103 -53
  467. package/node_modules/hono/dist/middleware/etag/digest.js +59 -77
  468. package/node_modules/hono/dist/middleware/etag/index.js +71 -70
  469. package/node_modules/hono/dist/middleware/ip-restriction/index.js +163 -158
  470. package/node_modules/hono/dist/middleware/jsx-renderer/index.js +97 -54
  471. package/node_modules/hono/dist/middleware/jwk/index.js +1 -4
  472. package/node_modules/hono/dist/middleware/jwk/jwk.js +116 -112
  473. package/node_modules/hono/dist/middleware/jwt/index.js +2 -10
  474. package/node_modules/hono/dist/middleware/jwt/jwt.js +114 -114
  475. package/node_modules/hono/dist/middleware/language/index.js +2 -15
  476. package/node_modules/hono/dist/middleware/language/language.js +180 -154
  477. package/node_modules/hono/dist/middleware/logger/index.js +43 -37
  478. package/node_modules/hono/dist/middleware/method-not-allowed/index.js +81 -66
  479. package/node_modules/hono/dist/middleware/method-override/index.js +101 -81
  480. package/node_modules/hono/dist/middleware/powered-by/index.js +23 -9
  481. package/node_modules/hono/dist/middleware/pretty-json/index.js +39 -16
  482. package/node_modules/hono/dist/middleware/request-id/index.js +1 -4
  483. package/node_modules/hono/dist/middleware/request-id/request-id.js +33 -20
  484. package/node_modules/hono/dist/middleware/secure-headers/index.js +1 -5
  485. package/node_modules/hono/dist/middleware/secure-headers/permissions-policy.js +1 -0
  486. package/node_modules/hono/dist/middleware/secure-headers/secure-headers.js +144 -155
  487. package/node_modules/hono/dist/middleware/serve-static/index.js +56 -72
  488. package/node_modules/hono/dist/middleware/serve-static/path.js +15 -17
  489. package/node_modules/hono/dist/middleware/timeout/index.js +40 -23
  490. package/node_modules/hono/dist/middleware/timing/index.js +2 -9
  491. package/node_modules/hono/dist/middleware/timing/timing.js +177 -97
  492. package/node_modules/hono/dist/middleware/trailing-slash/index.js +85 -37
  493. package/node_modules/hono/dist/preset/quick.js +17 -15
  494. package/node_modules/hono/dist/preset/tiny.js +14 -11
  495. package/node_modules/hono/dist/request/constants.js +4 -5
  496. package/node_modules/hono/dist/request.js +328 -316
  497. package/node_modules/hono/dist/router/linear-router/index.js +1 -4
  498. package/node_modules/hono/dist/router/linear-router/router.js +93 -120
  499. package/node_modules/hono/dist/router/pattern-router/index.js +1 -4
  500. package/node_modules/hono/dist/router/pattern-router/router.js +39 -40
  501. package/node_modules/hono/dist/router/reg-exp-router/index.js +1 -7
  502. package/node_modules/hono/dist/router/reg-exp-router/matcher.js +17 -23
  503. package/node_modules/hono/dist/router/reg-exp-router/node.js +87 -110
  504. package/node_modules/hono/dist/router/reg-exp-router/prepared-router.js +89 -137
  505. package/node_modules/hono/dist/router/reg-exp-router/router.js +92 -129
  506. package/node_modules/hono/dist/router/reg-exp-router/trie.js +69 -64
  507. package/node_modules/hono/dist/router/smart-router/index.js +1 -4
  508. package/node_modules/hono/dist/router/smart-router/router.js +46 -55
  509. package/node_modules/hono/dist/router/trie-router/index.js +1 -4
  510. package/node_modules/hono/dist/router/trie-router/node.js +131 -162
  511. package/node_modules/hono/dist/router/trie-router/router.js +11 -14
  512. package/node_modules/hono/dist/router/utils.js +4 -5
  513. package/node_modules/hono/dist/router.js +35 -14
  514. package/node_modules/hono/dist/types/adapter/aws-lambda/conninfo.d.ts +4 -1
  515. package/node_modules/hono/dist/types/adapter/aws-lambda/handler.d.ts +150 -105
  516. package/node_modules/hono/dist/types/adapter/aws-lambda/index.d.ts +4 -8
  517. package/node_modules/hono/dist/types/adapter/aws-lambda/types.d.ts +152 -123
  518. package/node_modules/hono/dist/types/adapter/bun/conninfo.d.ts +4 -1
  519. package/node_modules/hono/dist/types/adapter/bun/index.d.ts +6 -10
  520. package/node_modules/hono/dist/types/adapter/bun/serve-static.d.ts +7 -2
  521. package/node_modules/hono/dist/types/adapter/bun/server.d.ts +4 -5
  522. package/node_modules/hono/dist/types/adapter/bun/ssg.d.ts +5 -1
  523. package/node_modules/hono/dist/types/adapter/bun/websocket.d.ts +31 -17
  524. package/node_modules/hono/dist/types/adapter/cloudflare-pages/conninfo.d.ts +4 -1
  525. package/node_modules/hono/dist/types/adapter/cloudflare-pages/handler.d.ts +29 -18
  526. package/node_modules/hono/dist/types/adapter/cloudflare-pages/index.d.ts +3 -7
  527. package/node_modules/hono/dist/types/adapter/cloudflare-workers/conninfo.d.ts +6 -1
  528. package/node_modules/hono/dist/types/adapter/cloudflare-workers/index.d.ts +4 -7
  529. package/node_modules/hono/dist/types/adapter/cloudflare-workers/serve-static-module.d.ts +5 -3
  530. package/node_modules/hono/dist/types/adapter/cloudflare-workers/serve-static.d.ts +10 -5
  531. package/node_modules/hono/dist/types/adapter/cloudflare-workers/utils.d.ts +10 -2
  532. package/node_modules/hono/dist/types/adapter/cloudflare-workers/websocket.d.ts +6 -1
  533. package/node_modules/hono/dist/types/adapter/deno/conninfo.d.ts +4 -1
  534. package/node_modules/hono/dist/types/adapter/deno/deno.d.ts +1 -0
  535. package/node_modules/hono/dist/types/adapter/deno/index.d.ts +5 -8
  536. package/node_modules/hono/dist/types/adapter/deno/serve-static.d.ts +7 -2
  537. package/node_modules/hono/dist/types/adapter/deno/ssg.d.ts +5 -1
  538. package/node_modules/hono/dist/types/adapter/deno/websocket.d.ts +6 -1
  539. package/node_modules/hono/dist/types/adapter/lambda-edge/conninfo.d.ts +6 -1
  540. package/node_modules/hono/dist/types/adapter/lambda-edge/handler.d.ts +83 -58
  541. package/node_modules/hono/dist/types/adapter/lambda-edge/index.d.ts +3 -7
  542. package/node_modules/hono/dist/types/adapter/netlify/conninfo.d.ts +4 -1
  543. package/node_modules/hono/dist/types/adapter/netlify/handler.d.ts +6 -1
  544. package/node_modules/hono/dist/types/adapter/netlify/index.d.ts +3 -5
  545. package/node_modules/hono/dist/types/adapter/netlify/mod.d.ts +3 -2
  546. package/node_modules/hono/dist/types/adapter/service-worker/handler.d.ts +9 -8
  547. package/node_modules/hono/dist/types/adapter/service-worker/index.d.ts +6 -9
  548. package/node_modules/hono/dist/types/adapter/service-worker/types.d.ts +12 -8
  549. package/node_modules/hono/dist/types/adapter/vercel/conninfo.d.ts +6 -1
  550. package/node_modules/hono/dist/types/adapter/vercel/handler.d.ts +6 -1
  551. package/node_modules/hono/dist/types/adapter/vercel/index.d.ts +3 -6
  552. package/node_modules/hono/dist/types/client/client.d.ts +5 -3
  553. package/node_modules/hono/dist/types/client/fetch-result-please.d.ts +21 -19
  554. package/node_modules/hono/dist/types/client/index.d.ts +5 -7
  555. package/node_modules/hono/dist/types/client/types.d.ts +134 -160
  556. package/node_modules/hono/dist/types/client/utils.d.ts +6 -4
  557. package/node_modules/hono/dist/types/compose.d.ts +4 -2
  558. package/node_modules/hono/dist/types/context.d.ts +335 -336
  559. package/node_modules/hono/dist/types/helper/accepts/accepts.d.ts +11 -9
  560. package/node_modules/hono/dist/types/helper/accepts/index.d.ts +2 -5
  561. package/node_modules/hono/dist/types/helper/adapter/index.d.ts +4 -6
  562. package/node_modules/hono/dist/types/helper/conninfo/index.d.ts +2 -5
  563. package/node_modules/hono/dist/types/helper/conninfo/types.d.ts +25 -23
  564. package/node_modules/hono/dist/types/helper/cookie/index.d.ts +10 -13
  565. package/node_modules/hono/dist/types/helper/css/common.d.ts +11 -10
  566. package/node_modules/hono/dist/types/helper/css/index.d.ts +25 -28
  567. package/node_modules/hono/dist/types/helper/dev/index.d.ts +10 -13
  568. package/node_modules/hono/dist/types/helper/factory/index.d.ts +26 -74
  569. package/node_modules/hono/dist/types/helper/html/index.d.ts +4 -7
  570. package/node_modules/hono/dist/types/helper/proxy/index.d.ts +20 -23
  571. package/node_modules/hono/dist/types/helper/route/index.d.ts +6 -4
  572. package/node_modules/hono/dist/types/helper/ssg/index.d.ts +4 -7
  573. package/node_modules/hono/dist/types/helper/ssg/middleware.d.ts +8 -7
  574. package/node_modules/hono/dist/types/helper/ssg/plugins.d.ts +3 -1
  575. package/node_modules/hono/dist/types/helper/ssg/ssg.d.ts +38 -36
  576. package/node_modules/hono/dist/types/helper/ssg/utils.d.ts +5 -4
  577. package/node_modules/hono/dist/types/helper/streaming/index.d.ts +4 -8
  578. package/node_modules/hono/dist/types/helper/streaming/sse.d.ts +10 -8
  579. package/node_modules/hono/dist/types/helper/streaming/stream.d.ts +4 -2
  580. package/node_modules/hono/dist/types/helper/streaming/text.d.ts +4 -2
  581. package/node_modules/hono/dist/types/helper/streaming/utils.d.ts +2 -0
  582. package/node_modules/hono/dist/types/helper/testing/index.d.ts +7 -10
  583. package/node_modules/hono/dist/types/helper/websocket/index.d.ts +30 -33
  584. package/node_modules/hono/dist/types/hono-base.d.ts +208 -211
  585. package/node_modules/hono/dist/types/hono.d.ts +11 -10
  586. package/node_modules/hono/dist/types/http-exception.d.ts +20 -23
  587. package/node_modules/hono/dist/types/index.d.ts +6 -37
  588. package/node_modules/hono/dist/types/jsx/base.d.ts +36 -35
  589. package/node_modules/hono/dist/types/jsx/children.d.ts +8 -6
  590. package/node_modules/hono/dist/types/jsx/components.d.ts +8 -5
  591. package/node_modules/hono/dist/types/jsx/constants.d.ts +2 -0
  592. package/node_modules/hono/dist/types/jsx/context.d.ts +9 -7
  593. package/node_modules/hono/dist/types/jsx/dom/client.d.ts +8 -10
  594. package/node_modules/hono/dist/types/jsx/dom/components.d.ts +9 -6
  595. package/node_modules/hono/dist/types/jsx/dom/context.d.ts +3 -1
  596. package/node_modules/hono/dist/types/jsx/dom/css.d.ts +26 -30
  597. package/node_modules/hono/dist/types/jsx/dom/hooks/index.d.ts +11 -13
  598. package/node_modules/hono/dist/types/jsx/dom/index.d.ts +78 -83
  599. package/node_modules/hono/dist/types/jsx/dom/intrinsic-element/components.d.ts +9 -5
  600. package/node_modules/hono/dist/types/jsx/dom/jsx-dev-runtime.d.ts +4 -6
  601. package/node_modules/hono/dist/types/jsx/dom/jsx-runtime.d.ts +3 -7
  602. package/node_modules/hono/dist/types/jsx/dom/render.d.ts +32 -51
  603. package/node_modules/hono/dist/types/jsx/dom/server.d.ts +86 -85
  604. package/node_modules/hono/dist/types/jsx/dom/utils.d.ts +2 -0
  605. package/node_modules/hono/dist/types/jsx/hooks/index.d.ts +16 -17
  606. package/node_modules/hono/dist/types/jsx/index.d.ts +70 -73
  607. package/node_modules/hono/dist/types/jsx/intrinsic-element/common.d.ts +3 -1
  608. package/node_modules/hono/dist/types/jsx/intrinsic-element/components.d.ts +7 -4
  609. package/node_modules/hono/dist/types/jsx/intrinsic-elements.d.ts +708 -708
  610. package/node_modules/hono/dist/types/jsx/jsx-dev-runtime.d.ts +4 -7
  611. package/node_modules/hono/dist/types/jsx/jsx-runtime.d.ts +7 -10
  612. package/node_modules/hono/dist/types/jsx/streaming.d.ts +9 -10
  613. package/node_modules/hono/dist/types/jsx/types.d.ts +11 -13
  614. package/node_modules/hono/dist/types/jsx/utils.d.ts +2 -0
  615. package/node_modules/hono/dist/types/middleware/basic-auth/index.d.ts +17 -20
  616. package/node_modules/hono/dist/types/middleware/bearer-auth/index.d.ts +46 -49
  617. package/node_modules/hono/dist/types/middleware/body-limit/index.d.ts +6 -9
  618. package/node_modules/hono/dist/types/middleware/cache/index.d.ts +13 -15
  619. package/node_modules/hono/dist/types/middleware/combine/index.d.ts +7 -8
  620. package/node_modules/hono/dist/types/middleware/compress/index.d.ts +8 -10
  621. package/node_modules/hono/dist/types/middleware/context-storage/index.d.ts +4 -6
  622. package/node_modules/hono/dist/types/middleware/cors/index.d.ts +10 -13
  623. package/node_modules/hono/dist/types/middleware/csrf/index.d.ts +6 -9
  624. package/node_modules/hono/dist/types/middleware/etag/digest.d.ts +2 -0
  625. package/node_modules/hono/dist/types/middleware/etag/index.d.ts +6 -9
  626. package/node_modules/hono/dist/types/middleware/ip-restriction/index.d.ts +11 -13
  627. package/node_modules/hono/dist/types/middleware/jsx-renderer/index.d.ts +11 -12
  628. package/node_modules/hono/dist/types/middleware/jwk/index.d.ts +2 -1
  629. package/node_modules/hono/dist/types/middleware/jwk/jwk.d.ts +20 -23
  630. package/node_modules/hono/dist/types/middleware/jwt/index.d.ts +6 -6
  631. package/node_modules/hono/dist/types/middleware/jwt/jwt.d.ts +28 -30
  632. package/node_modules/hono/dist/types/middleware/language/index.d.ts +5 -5
  633. package/node_modules/hono/dist/types/middleware/language/language.d.ts +42 -44
  634. package/node_modules/hono/dist/types/middleware/logger/index.d.ts +3 -6
  635. package/node_modules/hono/dist/types/middleware/method-not-allowed/index.d.ts +7 -10
  636. package/node_modules/hono/dist/types/middleware/method-override/index.d.ts +14 -17
  637. package/node_modules/hono/dist/types/middleware/powered-by/index.d.ts +8 -11
  638. package/node_modules/hono/dist/types/middleware/pretty-json/index.d.ts +18 -21
  639. package/node_modules/hono/dist/types/middleware/request-id/index.d.ts +5 -5
  640. package/node_modules/hono/dist/types/middleware/request-id/request-id.d.ts +9 -11
  641. package/node_modules/hono/dist/types/middleware/secure-headers/index.d.ts +5 -6
  642. package/node_modules/hono/dist/types/middleware/secure-headers/permissions-policy.d.ts +2 -1
  643. package/node_modules/hono/dist/types/middleware/secure-headers/secure-headers.d.ts +55 -58
  644. package/node_modules/hono/dist/types/middleware/serve-static/index.d.ts +24 -24
  645. package/node_modules/hono/dist/types/middleware/serve-static/path.d.ts +2 -0
  646. package/node_modules/hono/dist/types/middleware/timeout/index.d.ts +5 -7
  647. package/node_modules/hono/dist/types/middleware/timing/index.d.ts +5 -5
  648. package/node_modules/hono/dist/types/middleware/timing/timing.d.ts +17 -21
  649. package/node_modules/hono/dist/types/middleware/trailing-slash/index.d.ts +35 -38
  650. package/node_modules/hono/dist/types/preset/quick.d.ts +6 -9
  651. package/node_modules/hono/dist/types/preset/tiny.d.ts +6 -9
  652. package/node_modules/hono/dist/types/request/constants.d.ts +2 -0
  653. package/node_modules/hono/dist/types/request.d.ts +288 -287
  654. package/node_modules/hono/dist/types/router/linear-router/index.d.ts +2 -5
  655. package/node_modules/hono/dist/types/router/linear-router/router.d.ts +7 -5
  656. package/node_modules/hono/dist/types/router/pattern-router/index.d.ts +2 -5
  657. package/node_modules/hono/dist/types/router/pattern-router/router.d.ts +7 -5
  658. package/node_modules/hono/dist/types/router/reg-exp-router/index.d.ts +3 -6
  659. package/node_modules/hono/dist/types/router/reg-exp-router/matcher.d.ts +3 -1
  660. package/node_modules/hono/dist/types/router/reg-exp-router/node.d.ts +6 -4
  661. package/node_modules/hono/dist/types/router/reg-exp-router/prepared-router.d.ts +11 -11
  662. package/node_modules/hono/dist/types/router/reg-exp-router/router.d.ts +10 -9
  663. package/node_modules/hono/dist/types/router/reg-exp-router/trie.d.ts +7 -5
  664. package/node_modules/hono/dist/types/router/smart-router/index.d.ts +2 -5
  665. package/node_modules/hono/dist/types/router/smart-router/router.d.ts +11 -9
  666. package/node_modules/hono/dist/types/router/trie-router/index.d.ts +2 -5
  667. package/node_modules/hono/dist/types/router/trie-router/node.d.ts +6 -4
  668. package/node_modules/hono/dist/types/router/trie-router/router.d.ts +7 -5
  669. package/node_modules/hono/dist/types/router/utils.d.ts +2 -0
  670. package/node_modules/hono/dist/types/router.d.ts +23 -22
  671. package/node_modules/hono/dist/types/types.d.ts +146 -506
  672. package/node_modules/hono/dist/types/utils/accept.d.ts +5 -3
  673. package/node_modules/hono/dist/types/utils/basic-auth.d.ts +4 -2
  674. package/node_modules/hono/dist/types/utils/body.d.ts +46 -51
  675. package/node_modules/hono/dist/types/utils/buffer.d.ts +7 -6
  676. package/node_modules/hono/dist/types/utils/color.d.ts +2 -0
  677. package/node_modules/hono/dist/types/utils/compress.d.ts +2 -0
  678. package/node_modules/hono/dist/types/utils/concurrent.d.ts +6 -4
  679. package/node_modules/hono/dist/types/utils/constants.d.ts +2 -0
  680. package/node_modules/hono/dist/types/utils/cookie.d.ts +20 -19
  681. package/node_modules/hono/dist/types/utils/crypto.d.ts +5 -8
  682. package/node_modules/hono/dist/types/utils/encode.d.ts +2 -0
  683. package/node_modules/hono/dist/types/utils/filepath.d.ts +5 -4
  684. package/node_modules/hono/dist/types/utils/handler.d.ts +2 -0
  685. package/node_modules/hono/dist/types/utils/headers.d.ts +2 -0
  686. package/node_modules/hono/dist/types/utils/html.d.ts +11 -10
  687. package/node_modules/hono/dist/types/utils/http-status.d.ts +2 -0
  688. package/node_modules/hono/dist/types/utils/ipaddr.d.ts +4 -6
  689. package/node_modules/hono/dist/types/utils/jwt/index.d.ts +18 -12
  690. package/node_modules/hono/dist/types/utils/jwt/jwa.d.ts +15 -13
  691. package/node_modules/hono/dist/types/utils/jwt/jws.d.ts +4 -7
  692. package/node_modules/hono/dist/types/utils/jwt/jwt.d.ts +26 -29
  693. package/node_modules/hono/dist/types/utils/jwt/types.d.ts +48 -45
  694. package/node_modules/hono/dist/types/utils/jwt/utf8.d.ts +2 -0
  695. package/node_modules/hono/dist/types/utils/mime.d.ts +59 -57
  696. package/node_modules/hono/dist/types/utils/stream.d.ts +27 -25
  697. package/node_modules/hono/dist/types/utils/types.d.ts +15 -28
  698. package/node_modules/hono/dist/types/utils/url.d.ts +2 -1
  699. package/node_modules/hono/dist/types/validator/index.d.ts +3 -7
  700. package/node_modules/hono/dist/types/validator/utils.d.ts +6 -9
  701. package/node_modules/hono/dist/types/validator/validator.d.ts +11 -10
  702. package/node_modules/hono/dist/types.js +4 -6
  703. package/node_modules/hono/dist/utils/accept.js +185 -215
  704. package/node_modules/hono/dist/utils/basic-auth.js +18 -21
  705. package/node_modules/hono/dist/utils/body.js +87 -92
  706. package/node_modules/hono/dist/utils/buffer.js +44 -71
  707. package/node_modules/hono/dist/utils/color.js +33 -21
  708. package/node_modules/hono/dist/utils/compress.js +11 -5
  709. package/node_modules/hono/dist/utils/concurrent.js +29 -38
  710. package/node_modules/hono/dist/utils/constants.js +7 -5
  711. package/node_modules/hono/dist/utils/cookie.js +114 -163
  712. package/node_modules/hono/dist/utils/crypto.js +30 -40
  713. package/node_modules/hono/dist/utils/encode.js +30 -26
  714. package/node_modules/hono/dist/utils/filepath.js +23 -33
  715. package/node_modules/hono/dist/utils/handler.js +10 -11
  716. package/node_modules/hono/dist/utils/headers.js +1 -0
  717. package/node_modules/hono/dist/utils/html.js +97 -117
  718. package/node_modules/hono/dist/utils/http-status.js +1 -0
  719. package/node_modules/hono/dist/utils/ipaddr.js +227 -279
  720. package/node_modules/hono/dist/utils/jwt/index.js +12 -4
  721. package/node_modules/hono/dist/utils/jwt/jwa.js +24 -20
  722. package/node_modules/hono/dist/utils/jwt/jws.js +115 -174
  723. package/node_modules/hono/dist/utils/jwt/jwt.js +120 -197
  724. package/node_modules/hono/dist/utils/jwt/types.js +79 -95
  725. package/node_modules/hono/dist/utils/jwt/utf8.js +9 -7
  726. package/node_modules/hono/dist/utils/mime.js +74 -79
  727. package/node_modules/hono/dist/utils/stream.js +86 -88
  728. package/node_modules/hono/dist/utils/types.js +1 -0
  729. package/node_modules/hono/dist/utils/url.js +187 -215
  730. package/node_modules/hono/dist/validator/index.js +1 -4
  731. package/node_modules/hono/dist/validator/utils.js +1 -0
  732. package/node_modules/hono/dist/validator/validator.js +61 -83
  733. package/node_modules/hono/package.json +27 -27
  734. package/node_modules/ip-address/README.md +104 -104
  735. package/node_modules/ip-address/dist/common.js +2 -2
  736. package/node_modules/ip-address/dist/common.js.map +1 -1
  737. package/node_modules/ip-address/dist/ipv4.js +7 -0
  738. package/node_modules/ip-address/dist/ipv4.js.map +1 -1
  739. package/node_modules/ip-address/dist/ipv6.js +7 -4
  740. package/node_modules/ip-address/dist/ipv6.js.map +1 -1
  741. package/node_modules/ip-address/dist/v6/constants.d.ts +3 -0
  742. package/node_modules/ip-address/dist/v6/constants.js +3 -0
  743. package/node_modules/ip-address/dist/v6/constants.js.map +1 -1
  744. package/node_modules/ip-address/package.json +3 -2
  745. package/node_modules/qs/.editorconfig +1 -1
  746. package/node_modules/qs/.github/THREAT_MODEL.md +4 -2
  747. package/node_modules/qs/CHANGELOG.md +61 -14
  748. package/node_modules/qs/README.md +57 -4
  749. package/node_modules/qs/dist/qs.js +19 -19
  750. package/node_modules/qs/eslint.config.mjs +61 -50
  751. package/node_modules/qs/lib/formats.js +7 -2
  752. package/node_modules/qs/lib/parse.js +105 -8
  753. package/node_modules/qs/lib/stringify.js +9 -7
  754. package/node_modules/qs/lib/utils.js +145 -13
  755. package/node_modules/qs/package.json +8 -8
  756. package/node_modules/qs/test/parse.js +440 -2
  757. package/node_modules/qs/test/stringify.js +485 -33
  758. package/node_modules/qs/test/utils.js +245 -3
  759. package/node_modules/zod/README.md +29 -2
  760. package/node_modules/zod/compile.cjs +96 -0
  761. package/node_modules/zod/compile.d.cts +1 -0
  762. package/node_modules/zod/compile.d.ts +1 -0
  763. package/node_modules/zod/compile.js +52 -0
  764. package/node_modules/zod/index.cjs +21 -2
  765. package/node_modules/zod/index.d.cts +1 -2
  766. package/node_modules/zod/index.d.ts +1 -2
  767. package/node_modules/zod/index.js +5 -2
  768. package/node_modules/zod/locales/index.cjs +19 -0
  769. package/node_modules/zod/mini/index.cjs +19 -0
  770. package/node_modules/zod/package.json +20 -8
  771. package/node_modules/zod/src/compile.ts +56 -0
  772. package/node_modules/zod/src/index.ts +5 -2
  773. package/node_modules/zod/src/v3/ZodError.ts +22 -12
  774. package/node_modules/zod/src/v3/helpers/errorUtil.ts +1 -1
  775. package/node_modules/zod/src/v3/tests/error.test.ts +35 -0
  776. package/node_modules/zod/src/v3/tests/intersection.test.ts +18 -0
  777. package/node_modules/zod/src/v3/tests/language-server.test.ts +1 -2
  778. package/node_modules/zod/src/v3/tests/object.test.ts +3 -6
  779. package/node_modules/zod/src/v3/tests/readonly.test.ts +0 -80
  780. package/node_modules/zod/src/v3/tests/string.test.ts +6 -0
  781. package/node_modules/zod/src/v3/types.ts +5 -5
  782. package/node_modules/zod/src/v4/classic/checks.ts +1 -0
  783. package/node_modules/zod/src/v4/classic/compat.ts +26 -18
  784. package/node_modules/zod/src/v4/classic/deep-partial.ts +76 -0
  785. package/node_modules/zod/src/v4/classic/errors.ts +59 -44
  786. package/node_modules/zod/src/v4/classic/external.ts +14 -9
  787. package/node_modules/zod/src/v4/classic/from-json-schema.ts +363 -78
  788. package/node_modules/zod/src/v4/classic/in-out.ts +45 -0
  789. package/node_modules/zod/src/v4/classic/index.ts +2 -2
  790. package/node_modules/zod/src/v4/classic/iso.ts +2 -72
  791. package/node_modules/zod/src/v4/classic/parse.ts +10 -4
  792. package/node_modules/zod/src/v4/classic/schemas.ts +640 -375
  793. package/node_modules/zod/src/v4/classic/tests/apply.test.ts +27 -0
  794. package/node_modules/zod/src/v4/classic/tests/array.test.ts +29 -2
  795. package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +186 -0
  796. package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +36 -1
  797. package/node_modules/zod/src/v4/classic/tests/catch.test.ts +278 -0
  798. package/node_modules/zod/src/v4/classic/tests/codec-examples.test.ts +1 -2
  799. package/node_modules/zod/src/v4/classic/tests/codec.test.ts +2 -1
  800. package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +3 -3
  801. package/node_modules/zod/src/v4/classic/tests/credit-card.test.ts +76 -0
  802. package/node_modules/zod/src/v4/classic/tests/cyclic-data.test.ts +985 -0
  803. package/node_modules/zod/src/v4/classic/tests/date.test.ts +30 -0
  804. package/node_modules/zod/src/v4/classic/tests/datetime.test.ts +32 -18
  805. package/node_modules/zod/src/v4/classic/tests/deep-partial.test.ts +380 -0
  806. package/node_modules/zod/src/v4/classic/tests/default-locale.test.ts +32 -0
  807. package/node_modules/zod/src/v4/classic/tests/default.test.ts +46 -0
  808. package/node_modules/zod/src/v4/classic/tests/detached-methods.test.ts +31 -7
  809. package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +261 -13
  810. package/node_modules/zod/src/v4/classic/tests/enum.test.ts +20 -0
  811. package/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +112 -2
  812. package/node_modules/zod/src/v4/classic/tests/error.test.ts +403 -6
  813. package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +582 -10
  814. package/node_modules/zod/src/v4/classic/tests/function.test.ts +31 -0
  815. package/node_modules/zod/src/v4/classic/tests/global-config.test.ts +2 -9
  816. package/node_modules/zod/src/v4/classic/tests/hash.test.ts +1 -2
  817. package/node_modules/zod/src/v4/classic/tests/iban.test.ts +81 -0
  818. package/node_modules/zod/src/v4/classic/tests/in-out.test.ts +159 -0
  819. package/node_modules/zod/src/v4/classic/tests/index.test.ts +21 -2
  820. package/node_modules/zod/src/v4/classic/tests/instance-footprint.test.ts +319 -0
  821. package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +67 -0
  822. package/node_modules/zod/src/v4/classic/tests/intersection.test.ts +136 -0
  823. package/node_modules/zod/src/v4/classic/tests/issue-schema.test.ts +215 -0
  824. package/node_modules/zod/src/v4/classic/tests/jitless-allows-eval.test.ts +3 -10
  825. package/node_modules/zod/src/v4/classic/tests/lazy.test.ts +36 -1
  826. package/node_modules/zod/src/v4/classic/tests/literal.test.ts +12 -1
  827. package/node_modules/zod/src/v4/classic/tests/map.test.ts +19 -0
  828. package/node_modules/zod/src/v4/classic/tests/number.test.ts +85 -9
  829. package/node_modules/zod/src/v4/classic/tests/object.test.ts +301 -12
  830. package/node_modules/zod/src/v4/classic/tests/optin-ladder.test.ts +235 -0
  831. package/node_modules/zod/src/v4/classic/tests/optional.test.ts +49 -16
  832. package/node_modules/zod/src/v4/classic/tests/partial.test.ts +51 -4
  833. package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +70 -0
  834. package/node_modules/zod/src/v4/classic/tests/preprocess-types.test.ts +20 -2
  835. package/node_modules/zod/src/v4/classic/tests/properties.test.ts +141 -0
  836. package/node_modules/zod/src/v4/classic/tests/readonly.test.ts +0 -68
  837. package/node_modules/zod/src/v4/classic/tests/record.test.ts +186 -18
  838. package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +79 -3
  839. package/node_modules/zod/src/v4/classic/tests/redos.test.ts +68 -0
  840. package/node_modules/zod/src/v4/classic/tests/refine.test.ts +60 -0
  841. package/node_modules/zod/src/v4/classic/tests/set.test.ts +15 -0
  842. package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +19 -0
  843. package/node_modules/zod/src/v4/classic/tests/string.test.ts +222 -6
  844. package/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +18 -0
  845. package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +44 -3
  846. package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +1812 -204
  847. package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +45 -30
  848. package/node_modules/zod/src/v4/classic/tests/union.test.ts +39 -2
  849. package/node_modules/zod/src/v4/classic/tests/validate.test.ts +645 -0
  850. package/node_modules/zod/src/v4/classic/tests/validations.test.ts +2 -2
  851. package/node_modules/zod/src/v4/core/api.ts +87 -35
  852. package/node_modules/zod/src/v4/core/checks.ts +119 -146
  853. package/node_modules/zod/src/v4/core/compile.ts +2322 -0
  854. package/node_modules/zod/src/v4/core/core.ts +99 -22
  855. package/node_modules/zod/src/v4/core/doc.ts +17 -9
  856. package/node_modules/zod/src/v4/core/errors.ts +113 -25
  857. package/node_modules/zod/src/v4/core/index.ts +3 -0
  858. package/node_modules/zod/src/v4/core/json-schema-generator.ts +8 -3
  859. package/node_modules/zod/src/v4/core/json-schema-processors.ts +424 -156
  860. package/node_modules/zod/src/v4/core/json-schema.ts +2 -1
  861. package/node_modules/zod/src/v4/core/memoizer.ts +331 -0
  862. package/node_modules/zod/src/v4/core/parse.ts +164 -50
  863. package/node_modules/zod/src/v4/core/regexes.ts +42 -15
  864. package/node_modules/zod/src/v4/core/registries.ts +2 -2
  865. package/node_modules/zod/src/v4/core/schemas.ts +1035 -539
  866. package/node_modules/zod/src/v4/core/tests/cached.test.ts +54 -0
  867. package/node_modules/zod/src/v4/core/tests/compile-differential.test.ts +1004 -0
  868. package/node_modules/zod/src/v4/core/tests/compile-generative.test.ts +445 -0
  869. package/node_modules/zod/src/v4/core/tests/compile-global.test.ts +89 -0
  870. package/node_modules/zod/src/v4/core/tests/compile-off-by-default.test.ts +26 -0
  871. package/node_modules/zod/src/v4/core/tests/compile-stats.test.ts +34 -0
  872. package/node_modules/zod/src/v4/core/tests/compile.test.ts +2036 -0
  873. package/node_modules/zod/src/v4/core/tests/email-regex.test.ts +140 -0
  874. package/node_modules/zod/src/v4/core/tests/locales/el.test.ts +1 -2
  875. package/node_modules/zod/src/v4/core/tests/locales/es.test.ts +1 -2
  876. package/node_modules/zod/src/v4/core/tests/locales/fr.test.ts +3 -3
  877. package/node_modules/zod/src/v4/core/tests/locales/parity.test.ts +42 -0
  878. package/node_modules/zod/src/v4/core/tests/locales/tg.test.ts +85 -0
  879. package/node_modules/zod/src/v4/core/tests/locales/tk.test.ts +69 -0
  880. package/node_modules/zod/src/v4/core/tests/polyfill-collision.test.ts +46 -0
  881. package/node_modules/zod/src/v4/core/tests/treeshake.test.ts +51 -0
  882. package/node_modules/zod/src/v4/core/tests/url-no-canparse.test.ts +133 -0
  883. package/node_modules/zod/src/v4/core/to-json-schema.ts +283 -48
  884. package/node_modules/zod/src/v4/core/util.ts +467 -157
  885. package/node_modules/zod/src/v4/core/versions.ts +2 -2
  886. package/node_modules/zod/src/v4/core/visit.ts +193 -0
  887. package/node_modules/zod/src/v4/index.ts +3 -3
  888. package/node_modules/zod/src/v4/locales/ar.ts +5 -0
  889. package/node_modules/zod/src/v4/locales/az.ts +5 -0
  890. package/node_modules/zod/src/v4/locales/be.ts +12 -0
  891. package/node_modules/zod/src/v4/locales/bg.ts +5 -0
  892. package/node_modules/zod/src/v4/locales/bn.ts +123 -0
  893. package/node_modules/zod/src/v4/locales/ca.ts +5 -0
  894. package/node_modules/zod/src/v4/locales/ckb.ts +140 -0
  895. package/node_modules/zod/src/v4/locales/cs.ts +5 -0
  896. package/node_modules/zod/src/v4/locales/da.ts +7 -2
  897. package/node_modules/zod/src/v4/locales/de.ts +5 -0
  898. package/node_modules/zod/src/v4/locales/el.ts +3 -0
  899. package/node_modules/zod/src/v4/locales/en.ts +17 -4
  900. package/node_modules/zod/src/v4/locales/eo.ts +5 -0
  901. package/node_modules/zod/src/v4/locales/es.ts +4 -0
  902. package/node_modules/zod/src/v4/locales/fa.ts +5 -0
  903. package/node_modules/zod/src/v4/locales/fi.ts +5 -0
  904. package/node_modules/zod/src/v4/locales/fr-CA.ts +5 -0
  905. package/node_modules/zod/src/v4/locales/fr.ts +21 -14
  906. package/node_modules/zod/src/v4/locales/gu.ts +123 -0
  907. package/node_modules/zod/src/v4/locales/he.ts +8 -1
  908. package/node_modules/zod/src/v4/locales/hi.ts +126 -0
  909. package/node_modules/zod/src/v4/locales/hr.ts +4 -0
  910. package/node_modules/zod/src/v4/locales/hu.ts +5 -0
  911. package/node_modules/zod/src/v4/locales/hy.ts +11 -0
  912. package/node_modules/zod/src/v4/locales/id.ts +5 -0
  913. package/node_modules/zod/src/v4/locales/index.ts +11 -0
  914. package/node_modules/zod/src/v4/locales/is.ts +5 -0
  915. package/node_modules/zod/src/v4/locales/it.ts +5 -0
  916. package/node_modules/zod/src/v4/locales/ja.ts +5 -0
  917. package/node_modules/zod/src/v4/locales/ka.ts +5 -0
  918. package/node_modules/zod/src/v4/locales/km.ts +5 -0
  919. package/node_modules/zod/src/v4/locales/kn.ts +126 -0
  920. package/node_modules/zod/src/v4/locales/ko.ts +5 -0
  921. package/node_modules/zod/src/v4/locales/lt.ts +4 -0
  922. package/node_modules/zod/src/v4/locales/mk.ts +5 -0
  923. package/node_modules/zod/src/v4/locales/ms.ts +5 -0
  924. package/node_modules/zod/src/v4/locales/ne.ts +128 -0
  925. package/node_modules/zod/src/v4/locales/nl.ts +5 -0
  926. package/node_modules/zod/src/v4/locales/nn.ts +121 -0
  927. package/node_modules/zod/src/v4/locales/no.ts +7 -2
  928. package/node_modules/zod/src/v4/locales/ota.ts +5 -0
  929. package/node_modules/zod/src/v4/locales/pl.ts +5 -0
  930. package/node_modules/zod/src/v4/locales/ps.ts +5 -0
  931. package/node_modules/zod/src/v4/locales/pt-BR.ts +161 -0
  932. package/node_modules/zod/src/v4/locales/pt.ts +101 -58
  933. package/node_modules/zod/src/v4/locales/ro.ts +3 -0
  934. package/node_modules/zod/src/v4/locales/ru.ts +12 -0
  935. package/node_modules/zod/src/v4/locales/sk.ts +123 -0
  936. package/node_modules/zod/src/v4/locales/sl.ts +5 -0
  937. package/node_modules/zod/src/v4/locales/sv.ts +7 -2
  938. package/node_modules/zod/src/v4/locales/ta.ts +5 -0
  939. package/node_modules/zod/src/v4/locales/tg.ts +135 -0
  940. package/node_modules/zod/src/v4/locales/th.ts +5 -0
  941. package/node_modules/zod/src/v4/locales/tk.ts +113 -0
  942. package/node_modules/zod/src/v4/locales/tr.ts +5 -0
  943. package/node_modules/zod/src/v4/locales/uk.ts +5 -0
  944. package/node_modules/zod/src/v4/locales/ur.ts +5 -0
  945. package/node_modules/zod/src/v4/locales/uz.ts +3 -0
  946. package/node_modules/zod/src/v4/locales/vi.ts +5 -0
  947. package/node_modules/zod/src/v4/locales/yo.ts +5 -0
  948. package/node_modules/zod/src/v4/locales/zh-CN.ts +5 -0
  949. package/node_modules/zod/src/v4/locales/zh-TW.ts +5 -0
  950. package/node_modules/zod/src/v4/mini/checks.ts +1 -0
  951. package/node_modules/zod/src/v4/mini/deep-partial.ts +73 -0
  952. package/node_modules/zod/src/v4/mini/external.ts +12 -1
  953. package/node_modules/zod/src/v4/mini/in-out.ts +45 -0
  954. package/node_modules/zod/src/v4/mini/parse.ts +2 -0
  955. package/node_modules/zod/src/v4/mini/schemas.ts +167 -63
  956. package/node_modules/zod/src/v4/mini/tests/apply.test.ts +33 -0
  957. package/node_modules/zod/src/v4/mini/tests/assignability.test.ts +62 -1
  958. package/node_modules/zod/src/v4/mini/tests/checks.test.ts +14 -0
  959. package/node_modules/zod/src/v4/mini/tests/codec.test.ts +35 -1
  960. package/node_modules/zod/src/v4/mini/tests/computed.test.ts +11 -17
  961. package/node_modules/zod/src/v4/mini/tests/cyclic-data.test.ts +84 -0
  962. package/node_modules/zod/src/v4/mini/tests/deep-partial.test.ts +54 -0
  963. package/node_modules/zod/src/v4/mini/tests/error.test.ts +23 -4
  964. package/node_modules/zod/src/v4/mini/tests/functions.test.ts +9 -0
  965. package/node_modules/zod/src/v4/mini/tests/index.test.ts +158 -5
  966. package/node_modules/zod/src/v4/mini/tests/number.test.ts +14 -0
  967. package/node_modules/zod/src/v4/mini/tests/object.test.ts +65 -0
  968. package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +16 -0
  969. package/node_modules/zod/src/v4/mini/tests/string.test.ts +44 -0
  970. package/node_modules/zod/v3/ZodError.cjs +41 -12
  971. package/node_modules/zod/v3/ZodError.d.cts +1 -1
  972. package/node_modules/zod/v3/ZodError.d.ts +1 -1
  973. package/node_modules/zod/v3/ZodError.js +22 -12
  974. package/node_modules/zod/v3/errors.cjs +19 -0
  975. package/node_modules/zod/v3/external.cjs +19 -0
  976. package/node_modules/zod/v3/helpers/enumUtil.cjs +19 -0
  977. package/node_modules/zod/v3/helpers/errorUtil.cjs +20 -1
  978. package/node_modules/zod/v3/helpers/errorUtil.js +1 -1
  979. package/node_modules/zod/v3/helpers/parseUtil.cjs +19 -0
  980. package/node_modules/zod/v3/helpers/partialUtil.cjs +19 -0
  981. package/node_modules/zod/v3/helpers/typeAliases.cjs +19 -0
  982. package/node_modules/zod/v3/helpers/util.cjs +19 -0
  983. package/node_modules/zod/v3/index.cjs +19 -0
  984. package/node_modules/zod/v3/standard-schema.cjs +19 -0
  985. package/node_modules/zod/v3/types.cjs +26 -5
  986. package/node_modules/zod/v3/types.js +7 -5
  987. package/node_modules/zod/v4/classic/checks.cjs +21 -1
  988. package/node_modules/zod/v4/classic/checks.d.cts +1 -1
  989. package/node_modules/zod/v4/classic/checks.d.ts +1 -1
  990. package/node_modules/zod/v4/classic/checks.js +1 -1
  991. package/node_modules/zod/v4/classic/coerce.cjs +19 -0
  992. package/node_modules/zod/v4/classic/compat.cjs +19 -0
  993. package/node_modules/zod/v4/classic/compat.d.cts +9 -11
  994. package/node_modules/zod/v4/classic/compat.d.ts +9 -11
  995. package/node_modules/zod/v4/classic/deep-partial.cjs +58 -0
  996. package/node_modules/zod/v4/classic/deep-partial.d.cts +14 -0
  997. package/node_modules/zod/v4/classic/deep-partial.d.ts +14 -0
  998. package/node_modules/zod/v4/classic/deep-partial.js +13 -0
  999. package/node_modules/zod/v4/classic/errors.cjs +62 -34
  1000. package/node_modules/zod/v4/classic/errors.d.cts +3 -4
  1001. package/node_modules/zod/v4/classic/errors.d.ts +3 -4
  1002. package/node_modules/zod/v4/classic/errors.js +43 -34
  1003. package/node_modules/zod/v4/classic/external.cjs +51 -27
  1004. package/node_modules/zod/v4/classic/external.d.cts +5 -2
  1005. package/node_modules/zod/v4/classic/external.d.ts +5 -2
  1006. package/node_modules/zod/v4/classic/external.js +5 -8
  1007. package/node_modules/zod/v4/classic/from-json-schema.cjs +376 -75
  1008. package/node_modules/zod/v4/classic/from-json-schema.js +357 -75
  1009. package/node_modules/zod/v4/classic/in-out.cjs +82 -0
  1010. package/node_modules/zod/v4/classic/in-out.d.cts +8 -0
  1011. package/node_modules/zod/v4/classic/in-out.d.ts +8 -0
  1012. package/node_modules/zod/v4/classic/in-out.js +36 -0
  1013. package/node_modules/zod/v4/classic/index.cjs +21 -2
  1014. package/node_modules/zod/v4/classic/index.d.cts +1 -2
  1015. package/node_modules/zod/v4/classic/index.d.ts +1 -2
  1016. package/node_modules/zod/v4/classic/index.js +2 -2
  1017. package/node_modules/zod/v4/classic/iso.cjs +30 -22
  1018. package/node_modules/zod/v4/classic/iso.d.cts +2 -17
  1019. package/node_modules/zod/v4/classic/iso.d.ts +2 -17
  1020. package/node_modules/zod/v4/classic/iso.js +2 -17
  1021. package/node_modules/zod/v4/classic/parse.cjs +23 -1
  1022. package/node_modules/zod/v4/classic/parse.d.cts +17 -4
  1023. package/node_modules/zod/v4/classic/parse.d.ts +17 -4
  1024. package/node_modules/zod/v4/classic/parse.js +1 -0
  1025. package/node_modules/zod/v4/classic/schemas.cjs +591 -426
  1026. package/node_modules/zod/v4/classic/schemas.d.cts +68 -19
  1027. package/node_modules/zod/v4/classic/schemas.d.ts +68 -19
  1028. package/node_modules/zod/v4/classic/schemas.js +564 -424
  1029. package/node_modules/zod/v4/core/api.cjs +66 -24
  1030. package/node_modules/zod/v4/core/api.d.cts +22 -12
  1031. package/node_modules/zod/v4/core/api.d.ts +22 -12
  1032. package/node_modules/zod/v4/core/api.js +44 -24
  1033. package/node_modules/zod/v4/core/checks.cjs +88 -128
  1034. package/node_modules/zod/v4/core/checks.d.cts +29 -13
  1035. package/node_modules/zod/v4/core/checks.d.ts +29 -13
  1036. package/node_modules/zod/v4/core/checks.js +68 -127
  1037. package/node_modules/zod/v4/core/compile.cjs +1916 -0
  1038. package/node_modules/zod/v4/core/compile.d.cts +65 -0
  1039. package/node_modules/zod/v4/core/compile.d.ts +65 -0
  1040. package/node_modules/zod/v4/core/compile.js +1866 -0
  1041. package/node_modules/zod/v4/core/core.cjs +101 -19
  1042. package/node_modules/zod/v4/core/core.d.cts +16 -4
  1043. package/node_modules/zod/v4/core/core.d.ts +16 -4
  1044. package/node_modules/zod/v4/core/core.js +83 -20
  1045. package/node_modules/zod/v4/core/doc.cjs +31 -9
  1046. package/node_modules/zod/v4/core/doc.d.cts +3 -1
  1047. package/node_modules/zod/v4/core/doc.d.ts +3 -1
  1048. package/node_modules/zod/v4/core/doc.js +12 -9
  1049. package/node_modules/zod/v4/core/errors.cjs +126 -25
  1050. package/node_modules/zod/v4/core/errors.d.cts +4 -0
  1051. package/node_modules/zod/v4/core/errors.d.ts +4 -0
  1052. package/node_modules/zod/v4/core/errors.js +107 -25
  1053. package/node_modules/zod/v4/core/index.cjs +24 -1
  1054. package/node_modules/zod/v4/core/index.d.cts +3 -0
  1055. package/node_modules/zod/v4/core/index.d.ts +3 -0
  1056. package/node_modules/zod/v4/core/index.js +3 -0
  1057. package/node_modules/zod/v4/core/json-schema-generator.cjs +24 -1
  1058. package/node_modules/zod/v4/core/json-schema-generator.d.cts +2 -2
  1059. package/node_modules/zod/v4/core/json-schema-generator.d.ts +2 -2
  1060. package/node_modules/zod/v4/core/json-schema-generator.js +6 -2
  1061. package/node_modules/zod/v4/core/json-schema-processors.cjs +441 -156
  1062. package/node_modules/zod/v4/core/json-schema-processors.d.cts +16 -0
  1063. package/node_modules/zod/v4/core/json-schema-processors.d.ts +16 -0
  1064. package/node_modules/zod/v4/core/json-schema-processors.js +400 -158
  1065. package/node_modules/zod/v4/core/json-schema.cjs +19 -0
  1066. package/node_modules/zod/v4/core/json-schema.d.cts +2 -1
  1067. package/node_modules/zod/v4/core/json-schema.d.ts +2 -1
  1068. package/node_modules/zod/v4/core/memoizer.cjs +360 -0
  1069. package/node_modules/zod/v4/core/memoizer.d.cts +15 -0
  1070. package/node_modules/zod/v4/core/memoizer.d.ts +15 -0
  1071. package/node_modules/zod/v4/core/memoizer.js +311 -0
  1072. package/node_modules/zod/v4/core/parse.cjs +148 -46
  1073. package/node_modules/zod/v4/core/parse.d.cts +14 -11
  1074. package/node_modules/zod/v4/core/parse.d.ts +14 -11
  1075. package/node_modules/zod/v4/core/parse.js +127 -45
  1076. package/node_modules/zod/v4/core/regexes.cjs +54 -17
  1077. package/node_modules/zod/v4/core/regexes.d.cts +5 -0
  1078. package/node_modules/zod/v4/core/regexes.d.ts +5 -0
  1079. package/node_modules/zod/v4/core/regexes.js +32 -15
  1080. package/node_modules/zod/v4/core/registries.cjs +19 -0
  1081. package/node_modules/zod/v4/core/registries.js +2 -2
  1082. package/node_modules/zod/v4/core/schemas.cjs +815 -386
  1083. package/node_modules/zod/v4/core/schemas.d.cts +126 -35
  1084. package/node_modules/zod/v4/core/schemas.d.ts +126 -35
  1085. package/node_modules/zod/v4/core/schemas.js +783 -386
  1086. package/node_modules/zod/v4/core/standard-schema.cjs +19 -0
  1087. package/node_modules/zod/v4/core/to-json-schema.cjs +269 -45
  1088. package/node_modules/zod/v4/core/to-json-schema.d.cts +45 -5
  1089. package/node_modules/zod/v4/core/to-json-schema.d.ts +45 -5
  1090. package/node_modules/zod/v4/core/to-json-schema.js +247 -44
  1091. package/node_modules/zod/v4/core/util.cjs +387 -157
  1092. package/node_modules/zod/v4/core/util.d.cts +81 -1
  1093. package/node_modules/zod/v4/core/util.d.ts +81 -1
  1094. package/node_modules/zod/v4/core/util.js +355 -156
  1095. package/node_modules/zod/v4/core/versions.cjs +21 -2
  1096. package/node_modules/zod/v4/core/versions.d.cts +1 -1
  1097. package/node_modules/zod/v4/core/versions.d.ts +1 -1
  1098. package/node_modules/zod/v4/core/versions.js +2 -2
  1099. package/node_modules/zod/v4/core/visit.cjs +214 -0
  1100. package/node_modules/zod/v4/core/visit.d.cts +30 -0
  1101. package/node_modules/zod/v4/core/visit.d.ts +30 -0
  1102. package/node_modules/zod/v4/core/visit.js +169 -0
  1103. package/node_modules/zod/v4/index.cjs +34 -5
  1104. package/node_modules/zod/v4/index.d.cts +2 -2
  1105. package/node_modules/zod/v4/index.d.ts +2 -2
  1106. package/node_modules/zod/v4/index.js +3 -2
  1107. package/node_modules/zod/v4/locales/ar.cjs +5 -0
  1108. package/node_modules/zod/v4/locales/ar.js +5 -0
  1109. package/node_modules/zod/v4/locales/az.cjs +5 -0
  1110. package/node_modules/zod/v4/locales/az.js +5 -0
  1111. package/node_modules/zod/v4/locales/be.cjs +12 -0
  1112. package/node_modules/zod/v4/locales/be.js +12 -0
  1113. package/node_modules/zod/v4/locales/bg.cjs +5 -0
  1114. package/node_modules/zod/v4/locales/bg.js +5 -0
  1115. package/node_modules/zod/v4/locales/bn.cjs +140 -0
  1116. package/node_modules/zod/v4/locales/bn.d.cts +5 -0
  1117. package/node_modules/zod/v4/locales/bn.d.ts +4 -0
  1118. package/node_modules/zod/v4/locales/bn.js +113 -0
  1119. package/node_modules/zod/v4/locales/ca.cjs +5 -0
  1120. package/node_modules/zod/v4/locales/ca.js +5 -0
  1121. package/node_modules/zod/v4/locales/ckb.cjs +160 -0
  1122. package/node_modules/zod/v4/locales/ckb.d.cts +5 -0
  1123. package/node_modules/zod/v4/locales/ckb.d.ts +4 -0
  1124. package/node_modules/zod/v4/locales/ckb.js +133 -0
  1125. package/node_modules/zod/v4/locales/cs.cjs +5 -0
  1126. package/node_modules/zod/v4/locales/cs.js +5 -0
  1127. package/node_modules/zod/v4/locales/da.cjs +7 -2
  1128. package/node_modules/zod/v4/locales/da.js +7 -2
  1129. package/node_modules/zod/v4/locales/de.cjs +5 -0
  1130. package/node_modules/zod/v4/locales/de.js +5 -0
  1131. package/node_modules/zod/v4/locales/el.cjs +3 -0
  1132. package/node_modules/zod/v4/locales/el.js +3 -0
  1133. package/node_modules/zod/v4/locales/en.cjs +16 -4
  1134. package/node_modules/zod/v4/locales/en.js +16 -4
  1135. package/node_modules/zod/v4/locales/eo.cjs +5 -0
  1136. package/node_modules/zod/v4/locales/eo.js +5 -0
  1137. package/node_modules/zod/v4/locales/es.cjs +4 -0
  1138. package/node_modules/zod/v4/locales/es.js +4 -0
  1139. package/node_modules/zod/v4/locales/fa.cjs +5 -0
  1140. package/node_modules/zod/v4/locales/fa.js +5 -0
  1141. package/node_modules/zod/v4/locales/fi.cjs +5 -0
  1142. package/node_modules/zod/v4/locales/fi.js +5 -0
  1143. package/node_modules/zod/v4/locales/fr-CA.cjs +5 -0
  1144. package/node_modules/zod/v4/locales/fr-CA.js +5 -0
  1145. package/node_modules/zod/v4/locales/fr.cjs +18 -14
  1146. package/node_modules/zod/v4/locales/fr.js +18 -14
  1147. package/node_modules/zod/v4/locales/gu.cjs +140 -0
  1148. package/node_modules/zod/v4/locales/gu.d.cts +5 -0
  1149. package/node_modules/zod/v4/locales/gu.d.ts +4 -0
  1150. package/node_modules/zod/v4/locales/gu.js +113 -0
  1151. package/node_modules/zod/v4/locales/he.cjs +7 -0
  1152. package/node_modules/zod/v4/locales/he.js +7 -0
  1153. package/node_modules/zod/v4/locales/hi.cjs +138 -0
  1154. package/node_modules/zod/v4/locales/hi.d.cts +5 -0
  1155. package/node_modules/zod/v4/locales/hi.d.ts +4 -0
  1156. package/node_modules/zod/v4/locales/hi.js +111 -0
  1157. package/node_modules/zod/v4/locales/hr.cjs +4 -0
  1158. package/node_modules/zod/v4/locales/hr.js +4 -0
  1159. package/node_modules/zod/v4/locales/hu.cjs +5 -0
  1160. package/node_modules/zod/v4/locales/hu.js +5 -0
  1161. package/node_modules/zod/v4/locales/hy.cjs +11 -0
  1162. package/node_modules/zod/v4/locales/hy.js +11 -0
  1163. package/node_modules/zod/v4/locales/id.cjs +5 -0
  1164. package/node_modules/zod/v4/locales/id.js +5 -0
  1165. package/node_modules/zod/v4/locales/index.cjs +43 -2
  1166. package/node_modules/zod/v4/locales/index.d.cts +11 -0
  1167. package/node_modules/zod/v4/locales/index.d.ts +11 -0
  1168. package/node_modules/zod/v4/locales/index.js +11 -0
  1169. package/node_modules/zod/v4/locales/is.cjs +5 -0
  1170. package/node_modules/zod/v4/locales/is.js +5 -0
  1171. package/node_modules/zod/v4/locales/it.cjs +5 -0
  1172. package/node_modules/zod/v4/locales/it.js +5 -0
  1173. package/node_modules/zod/v4/locales/ja.cjs +5 -0
  1174. package/node_modules/zod/v4/locales/ja.js +5 -0
  1175. package/node_modules/zod/v4/locales/ka.cjs +5 -0
  1176. package/node_modules/zod/v4/locales/ka.js +5 -0
  1177. package/node_modules/zod/v4/locales/km.cjs +5 -0
  1178. package/node_modules/zod/v4/locales/km.js +5 -0
  1179. package/node_modules/zod/v4/locales/kn.cjs +143 -0
  1180. package/node_modules/zod/v4/locales/kn.d.cts +5 -0
  1181. package/node_modules/zod/v4/locales/kn.d.ts +4 -0
  1182. package/node_modules/zod/v4/locales/kn.js +116 -0
  1183. package/node_modules/zod/v4/locales/ko.cjs +5 -0
  1184. package/node_modules/zod/v4/locales/ko.js +5 -0
  1185. package/node_modules/zod/v4/locales/lt.cjs +4 -0
  1186. package/node_modules/zod/v4/locales/lt.js +4 -0
  1187. package/node_modules/zod/v4/locales/mk.cjs +5 -0
  1188. package/node_modules/zod/v4/locales/mk.js +5 -0
  1189. package/node_modules/zod/v4/locales/ms.cjs +5 -0
  1190. package/node_modules/zod/v4/locales/ms.js +5 -0
  1191. package/node_modules/zod/v4/locales/ne.cjs +138 -0
  1192. package/node_modules/zod/v4/locales/ne.d.cts +5 -0
  1193. package/node_modules/zod/v4/locales/ne.d.ts +4 -0
  1194. package/node_modules/zod/v4/locales/ne.js +111 -0
  1195. package/node_modules/zod/v4/locales/nl.cjs +5 -0
  1196. package/node_modules/zod/v4/locales/nl.js +5 -0
  1197. package/node_modules/zod/v4/locales/nn.cjs +140 -0
  1198. package/node_modules/zod/v4/locales/nn.d.cts +5 -0
  1199. package/node_modules/zod/v4/locales/nn.d.ts +4 -0
  1200. package/node_modules/zod/v4/locales/nn.js +113 -0
  1201. package/node_modules/zod/v4/locales/no.cjs +7 -2
  1202. package/node_modules/zod/v4/locales/no.js +7 -2
  1203. package/node_modules/zod/v4/locales/ota.cjs +5 -0
  1204. package/node_modules/zod/v4/locales/ota.js +5 -0
  1205. package/node_modules/zod/v4/locales/pl.cjs +5 -0
  1206. package/node_modules/zod/v4/locales/pl.js +5 -0
  1207. package/node_modules/zod/v4/locales/ps.cjs +5 -0
  1208. package/node_modules/zod/v4/locales/ps.js +5 -0
  1209. package/node_modules/zod/v4/locales/pt-BR.cjs +170 -0
  1210. package/node_modules/zod/v4/locales/pt-BR.d.cts +5 -0
  1211. package/node_modules/zod/v4/locales/pt-BR.d.ts +4 -0
  1212. package/node_modules/zod/v4/locales/pt-BR.js +143 -0
  1213. package/node_modules/zod/v4/locales/pt.cjs +89 -55
  1214. package/node_modules/zod/v4/locales/pt.js +89 -55
  1215. package/node_modules/zod/v4/locales/ro.cjs +3 -0
  1216. package/node_modules/zod/v4/locales/ro.js +3 -0
  1217. package/node_modules/zod/v4/locales/ru.cjs +12 -0
  1218. package/node_modules/zod/v4/locales/ru.js +12 -0
  1219. package/node_modules/zod/v4/locales/sk.cjs +143 -0
  1220. package/node_modules/zod/v4/locales/sk.d.cts +5 -0
  1221. package/node_modules/zod/v4/locales/sk.d.ts +4 -0
  1222. package/node_modules/zod/v4/locales/sk.js +116 -0
  1223. package/node_modules/zod/v4/locales/sl.cjs +5 -0
  1224. package/node_modules/zod/v4/locales/sl.js +5 -0
  1225. package/node_modules/zod/v4/locales/sv.cjs +7 -2
  1226. package/node_modules/zod/v4/locales/sv.js +7 -2
  1227. package/node_modules/zod/v4/locales/ta.cjs +5 -0
  1228. package/node_modules/zod/v4/locales/ta.js +5 -0
  1229. package/node_modules/zod/v4/locales/tg.cjs +144 -0
  1230. package/node_modules/zod/v4/locales/tg.d.cts +5 -0
  1231. package/node_modules/zod/v4/locales/tg.d.ts +4 -0
  1232. package/node_modules/zod/v4/locales/tg.js +117 -0
  1233. package/node_modules/zod/v4/locales/th.cjs +5 -0
  1234. package/node_modules/zod/v4/locales/th.js +5 -0
  1235. package/node_modules/zod/v4/locales/tk.cjs +134 -0
  1236. package/node_modules/zod/v4/locales/tk.d.cts +5 -0
  1237. package/node_modules/zod/v4/locales/tk.d.ts +4 -0
  1238. package/node_modules/zod/v4/locales/tk.js +107 -0
  1239. package/node_modules/zod/v4/locales/tr.cjs +5 -0
  1240. package/node_modules/zod/v4/locales/tr.js +5 -0
  1241. package/node_modules/zod/v4/locales/uk.cjs +5 -0
  1242. package/node_modules/zod/v4/locales/uk.js +5 -0
  1243. package/node_modules/zod/v4/locales/ur.cjs +5 -0
  1244. package/node_modules/zod/v4/locales/ur.js +5 -0
  1245. package/node_modules/zod/v4/locales/uz.cjs +3 -0
  1246. package/node_modules/zod/v4/locales/uz.js +3 -0
  1247. package/node_modules/zod/v4/locales/vi.cjs +5 -0
  1248. package/node_modules/zod/v4/locales/vi.js +5 -0
  1249. package/node_modules/zod/v4/locales/yo.cjs +5 -0
  1250. package/node_modules/zod/v4/locales/yo.js +5 -0
  1251. package/node_modules/zod/v4/locales/zh-CN.cjs +5 -0
  1252. package/node_modules/zod/v4/locales/zh-CN.js +5 -0
  1253. package/node_modules/zod/v4/locales/zh-TW.cjs +5 -0
  1254. package/node_modules/zod/v4/locales/zh-TW.js +5 -0
  1255. package/node_modules/zod/v4/mini/checks.cjs +21 -1
  1256. package/node_modules/zod/v4/mini/checks.d.cts +1 -1
  1257. package/node_modules/zod/v4/mini/checks.d.ts +1 -1
  1258. package/node_modules/zod/v4/mini/checks.js +1 -1
  1259. package/node_modules/zod/v4/mini/coerce.cjs +19 -0
  1260. package/node_modules/zod/v4/mini/deep-partial.cjs +58 -0
  1261. package/node_modules/zod/v4/mini/deep-partial.d.cts +14 -0
  1262. package/node_modules/zod/v4/mini/deep-partial.d.ts +14 -0
  1263. package/node_modules/zod/v4/mini/deep-partial.js +13 -0
  1264. package/node_modules/zod/v4/mini/external.cjs +33 -1
  1265. package/node_modules/zod/v4/mini/external.d.cts +5 -2
  1266. package/node_modules/zod/v4/mini/external.d.ts +5 -2
  1267. package/node_modules/zod/v4/mini/external.js +3 -1
  1268. package/node_modules/zod/v4/mini/in-out.cjs +82 -0
  1269. package/node_modules/zod/v4/mini/in-out.d.cts +8 -0
  1270. package/node_modules/zod/v4/mini/in-out.d.ts +8 -0
  1271. package/node_modules/zod/v4/mini/in-out.js +36 -0
  1272. package/node_modules/zod/v4/mini/index.cjs +19 -0
  1273. package/node_modules/zod/v4/mini/iso.cjs +19 -0
  1274. package/node_modules/zod/v4/mini/parse.cjs +22 -1
  1275. package/node_modules/zod/v4/mini/parse.d.cts +1 -1
  1276. package/node_modules/zod/v4/mini/parse.d.ts +1 -1
  1277. package/node_modules/zod/v4/mini/parse.js +1 -1
  1278. package/node_modules/zod/v4/mini/schemas.cjs +117 -53
  1279. package/node_modules/zod/v4/mini/schemas.d.cts +49 -14
  1280. package/node_modules/zod/v4/mini/schemas.d.ts +49 -14
  1281. package/node_modules/zod/v4/mini/schemas.js +92 -51
  1282. package/node_modules/zod/v4-mini/index.cjs +19 -0
  1283. package/package.json +7 -7
  1284. package/prepare.mjs +109 -4
  1285. package/runtime-package.json +13 -8
  1286. package/shipping-sbom.cdx.json +167 -168
  1287. package/shipping-source.json +12 -12
  1288. package/node_modules/zod/src/v4/core/config.ts +0 -15
  1289. /package/node_modules/@earendil-works/{pi-telemetry → pi-ai/node_modules/@earendil-works/pi-telemetry}/README.md +0 -0
  1290. /package/node_modules/@earendil-works/{pi-telemetry → pi-ai/node_modules/@earendil-works/pi-telemetry}/dist/index.d.ts +0 -0
  1291. /package/node_modules/@earendil-works/{pi-telemetry → pi-ai/node_modules/@earendil-works/pi-telemetry}/dist/index.d.ts.map +0 -0
  1292. /package/node_modules/@earendil-works/{pi-telemetry → pi-ai/node_modules/@earendil-works/pi-telemetry}/dist/index.js +0 -0
  1293. /package/node_modules/@earendil-works/{pi-telemetry → pi-ai/node_modules/@earendil-works/pi-telemetry}/dist/index.js.map +0 -0
  1294. /package/node_modules/@earendil-works/{pi-telemetry → pi-ai/node_modules/@earendil-works/pi-telemetry}/dist/memory.d.ts +0 -0
  1295. /package/node_modules/@earendil-works/{pi-telemetry → pi-ai/node_modules/@earendil-works/pi-telemetry}/dist/memory.d.ts.map +0 -0
  1296. /package/node_modules/@earendil-works/{pi-telemetry → pi-ai/node_modules/@earendil-works/pi-telemetry}/dist/memory.js +0 -0
  1297. /package/node_modules/@earendil-works/{pi-telemetry → pi-ai/node_modules/@earendil-works/pi-telemetry}/dist/memory.js.map +0 -0
  1298. /package/node_modules/@earendil-works/{pi-telemetry → pi-ai/node_modules/@earendil-works/pi-telemetry}/dist/noop.d.ts +0 -0
  1299. /package/node_modules/@earendil-works/{pi-telemetry → pi-ai/node_modules/@earendil-works/pi-telemetry}/dist/noop.d.ts.map +0 -0
  1300. /package/node_modules/@earendil-works/{pi-telemetry → pi-ai/node_modules/@earendil-works/pi-telemetry}/dist/noop.js +0 -0
  1301. /package/node_modules/@earendil-works/{pi-telemetry → pi-ai/node_modules/@earendil-works/pi-telemetry}/dist/noop.js.map +0 -0
  1302. /package/node_modules/@earendil-works/{pi-telemetry → pi-ai/node_modules/@earendil-works/pi-telemetry}/dist/testing/conformance.d.ts +0 -0
  1303. /package/node_modules/@earendil-works/{pi-telemetry → pi-ai/node_modules/@earendil-works/pi-telemetry}/dist/testing/conformance.d.ts.map +0 -0
  1304. /package/node_modules/@earendil-works/{pi-telemetry → pi-ai/node_modules/@earendil-works/pi-telemetry}/dist/testing/conformance.js +0 -0
  1305. /package/node_modules/@earendil-works/{pi-telemetry → pi-ai/node_modules/@earendil-works/pi-telemetry}/dist/testing/conformance.js.map +0 -0
  1306. /package/node_modules/@earendil-works/{pi-telemetry → pi-ai/node_modules/@earendil-works/pi-telemetry}/dist/testing/index.d.ts +0 -0
  1307. /package/node_modules/@earendil-works/{pi-telemetry → pi-ai/node_modules/@earendil-works/pi-telemetry}/dist/testing/index.d.ts.map +0 -0
  1308. /package/node_modules/@earendil-works/{pi-telemetry → pi-ai/node_modules/@earendil-works/pi-telemetry}/dist/testing/index.js +0 -0
  1309. /package/node_modules/@earendil-works/{pi-telemetry → pi-ai/node_modules/@earendil-works/pi-telemetry}/dist/testing/index.js.map +0 -0
  1310. /package/node_modules/@earendil-works/{pi-telemetry → pi-ai/node_modules/@earendil-works/pi-telemetry}/dist/testing/types.d.ts +0 -0
  1311. /package/node_modules/@earendil-works/{pi-telemetry → pi-ai/node_modules/@earendil-works/pi-telemetry}/dist/testing/types.d.ts.map +0 -0
  1312. /package/node_modules/@earendil-works/{pi-codemode/dist → pi-ai/node_modules/@earendil-works/pi-telemetry/dist/testing}/types.js +0 -0
  1313. /package/node_modules/@earendil-works/{pi-telemetry → pi-ai/node_modules/@earendil-works/pi-telemetry}/dist/testing/types.js.map +0 -0
  1314. /package/node_modules/@earendil-works/{pi-telemetry → pi-ai/node_modules/@earendil-works/pi-telemetry}/package.json +0 -0
  1315. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/README.md +0 -0
  1316. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/cloudflare.d.ts +0 -0
  1317. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/cloudflare.d.ts.map +0 -0
  1318. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/cloudflare.js +0 -0
  1319. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/cloudflare.js.map +0 -0
  1320. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/declarations.d.ts +0 -0
  1321. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/declarations.d.ts.map +0 -0
  1322. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/declarations.js +0 -0
  1323. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/declarations.js.map +0 -0
  1324. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/identifier.d.ts +0 -0
  1325. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/identifier.d.ts.map +0 -0
  1326. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/identifier.js +0 -0
  1327. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/identifier.js.map +0 -0
  1328. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/index.d.ts +0 -0
  1329. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/index.d.ts.map +0 -0
  1330. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/index.js +0 -0
  1331. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/index.js.map +0 -0
  1332. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/portable.d.ts +0 -0
  1333. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/portable.d.ts.map +0 -0
  1334. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/portable.js +0 -0
  1335. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/portable.js.map +0 -0
  1336. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/runtime/execution.d.ts +0 -0
  1337. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/runtime/execution.d.ts.map +0 -0
  1338. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/runtime/execution.js +0 -0
  1339. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/runtime/execution.js.map +0 -0
  1340. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/runtime/host.d.ts +0 -0
  1341. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/runtime/host.d.ts.map +0 -0
  1342. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/runtime/host.js +0 -0
  1343. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/runtime/host.js.map +0 -0
  1344. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/runtime/inline.d.ts +0 -0
  1345. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/runtime/inline.d.ts.map +0 -0
  1346. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/runtime/inline.js +0 -0
  1347. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/runtime/inline.js.map +0 -0
  1348. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/runtime/prelude-source.d.ts +0 -0
  1349. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/runtime/prelude-source.d.ts.map +0 -0
  1350. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/runtime/prelude-source.js +0 -0
  1351. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/runtime/prelude-source.js.map +0 -0
  1352. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/runtime/protocol.d.ts +0 -0
  1353. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/runtime/protocol.d.ts.map +0 -0
  1354. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/runtime/protocol.js +0 -0
  1355. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/runtime/protocol.js.map +0 -0
  1356. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/runtime/remote.d.ts +0 -0
  1357. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/runtime/remote.d.ts.map +0 -0
  1358. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/runtime/remote.js +0 -0
  1359. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/runtime/remote.js.map +0 -0
  1360. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/runtime/vm.d.ts +0 -0
  1361. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/runtime/vm.d.ts.map +0 -0
  1362. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/runtime/vm.js +0 -0
  1363. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/runtime/vm.js.map +0 -0
  1364. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/runtime/worker.d.ts +0 -0
  1365. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/runtime/worker.d.ts.map +0 -0
  1366. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/runtime/worker.js +0 -0
  1367. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/runtime/worker.js.map +0 -0
  1368. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/source.d.ts +0 -0
  1369. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/source.d.ts.map +0 -0
  1370. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/source.js +0 -0
  1371. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/source.js.map +0 -0
  1372. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/types.d.ts +0 -0
  1373. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/types.d.ts.map +0 -0
  1374. /package/node_modules/@earendil-works/{pi-telemetry/dist/testing → pi-coding-agent/node_modules/@earendil-works/pi-codemode/dist}/types.js +0 -0
  1375. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/types.js.map +0 -0
  1376. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/wasm.d.ts +0 -0
  1377. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/wasm.d.ts.map +0 -0
  1378. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/wasm.js +0 -0
  1379. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/wasm.js.map +0 -0
  1380. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/package.json +0 -0
  1381. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/CHANGELOG.md +0 -0
  1382. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/LICENSES/modelcontextprotocol-typescript-sdk.txt +0 -0
  1383. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/README.md +0 -0
  1384. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/auth-provider.d.ts +0 -0
  1385. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/auth-provider.d.ts.map +0 -0
  1386. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/auth-provider.js +0 -0
  1387. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/auth-provider.js.map +0 -0
  1388. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/client.d.ts +0 -0
  1389. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/client.d.ts.map +0 -0
  1390. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/client.js +0 -0
  1391. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/client.js.map +0 -0
  1392. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/index.d.ts +0 -0
  1393. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/index.d.ts.map +0 -0
  1394. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/index.js +0 -0
  1395. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/index.js.map +0 -0
  1396. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/oauth/callback.d.ts +0 -0
  1397. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/oauth/callback.d.ts.map +0 -0
  1398. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/oauth/callback.js +0 -0
  1399. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/oauth/callback.js.map +0 -0
  1400. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/oauth/discovery.d.ts +0 -0
  1401. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/oauth/discovery.d.ts.map +0 -0
  1402. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/oauth/discovery.js +0 -0
  1403. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/oauth/discovery.js.map +0 -0
  1404. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/oauth/errors.d.ts +0 -0
  1405. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/oauth/errors.d.ts.map +0 -0
  1406. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/oauth/errors.js +0 -0
  1407. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/oauth/errors.js.map +0 -0
  1408. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/oauth/flow.d.ts +0 -0
  1409. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/oauth/flow.d.ts.map +0 -0
  1410. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/oauth/flow.js +0 -0
  1411. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/oauth/flow.js.map +0 -0
  1412. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/oauth/index.d.ts +0 -0
  1413. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/oauth/index.d.ts.map +0 -0
  1414. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/oauth/index.js +0 -0
  1415. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/oauth/index.js.map +0 -0
  1416. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/oauth/provider.d.ts +0 -0
  1417. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/oauth/provider.d.ts.map +0 -0
  1418. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/oauth/provider.js +0 -0
  1419. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/oauth/provider.js.map +0 -0
  1420. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/oauth/types.d.ts +0 -0
  1421. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/oauth/types.d.ts.map +0 -0
  1422. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/oauth/types.js +0 -0
  1423. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/oauth/types.js.map +0 -0
  1424. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/protocol/content.d.ts +0 -0
  1425. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/protocol/content.d.ts.map +0 -0
  1426. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/protocol/content.js +0 -0
  1427. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/protocol/content.js.map +0 -0
  1428. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/protocol/jsonrpc.d.ts +0 -0
  1429. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/protocol/jsonrpc.d.ts.map +0 -0
  1430. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/protocol/jsonrpc.js +0 -0
  1431. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/protocol/jsonrpc.js.map +0 -0
  1432. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/protocol/types.d.ts +0 -0
  1433. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/protocol/types.d.ts.map +0 -0
  1434. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/protocol/types.js +0 -0
  1435. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/protocol/types.js.map +0 -0
  1436. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/testing/index.d.ts +0 -0
  1437. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/testing/index.d.ts.map +0 -0
  1438. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/testing/index.js +0 -0
  1439. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/testing/index.js.map +0 -0
  1440. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/transports/in-memory.d.ts +0 -0
  1441. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/transports/in-memory.d.ts.map +0 -0
  1442. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/transports/in-memory.js +0 -0
  1443. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/transports/in-memory.js.map +0 -0
  1444. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/transports/stdio.d.ts +0 -0
  1445. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/transports/stdio.d.ts.map +0 -0
  1446. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/transports/stdio.js +0 -0
  1447. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/transports/stdio.js.map +0 -0
  1448. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/transports/streamable-http.d.ts +0 -0
  1449. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/transports/streamable-http.d.ts.map +0 -0
  1450. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/transports/streamable-http.js +0 -0
  1451. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/transports/streamable-http.js.map +0 -0
  1452. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/transports/transport.d.ts +0 -0
  1453. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/transports/transport.d.ts.map +0 -0
  1454. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/transports/transport.js +0 -0
  1455. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/transports/transport.js.map +0 -0
  1456. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/package.json +0 -0
  1457. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/README.md +0 -0
  1458. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/alt-screen-search.d.ts +0 -0
  1459. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/alt-screen-search.d.ts.map +0 -0
  1460. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/alt-screen-search.js +0 -0
  1461. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/alt-screen-search.js.map +0 -0
  1462. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/autocomplete.d.ts +0 -0
  1463. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/autocomplete.d.ts.map +0 -0
  1464. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/autocomplete.js +0 -0
  1465. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/autocomplete.js.map +0 -0
  1466. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/colors.d.ts +0 -0
  1467. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/colors.d.ts.map +0 -0
  1468. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/colors.js +0 -0
  1469. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/colors.js.map +0 -0
  1470. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/alt-screen-flash.d.ts +0 -0
  1471. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/alt-screen-flash.d.ts.map +0 -0
  1472. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/alt-screen-flash.js +0 -0
  1473. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/alt-screen-flash.js.map +0 -0
  1474. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/box.d.ts +0 -0
  1475. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/box.d.ts.map +0 -0
  1476. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/box.js +0 -0
  1477. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/box.js.map +0 -0
  1478. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/cancellable-loader.d.ts +0 -0
  1479. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/cancellable-loader.d.ts.map +0 -0
  1480. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/cancellable-loader.js +0 -0
  1481. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/cancellable-loader.js.map +0 -0
  1482. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/editor.d.ts +0 -0
  1483. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/editor.d.ts.map +0 -0
  1484. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/editor.js +0 -0
  1485. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/editor.js.map +0 -0
  1486. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/h-stack.d.ts +0 -0
  1487. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/h-stack.d.ts.map +0 -0
  1488. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/h-stack.js +0 -0
  1489. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/h-stack.js.map +0 -0
  1490. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/image.d.ts +0 -0
  1491. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/image.d.ts.map +0 -0
  1492. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/image.js +0 -0
  1493. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/image.js.map +0 -0
  1494. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/input.d.ts +0 -0
  1495. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/input.d.ts.map +0 -0
  1496. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/input.js +0 -0
  1497. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/input.js.map +0 -0
  1498. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/loader.d.ts +0 -0
  1499. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/loader.d.ts.map +0 -0
  1500. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/loader.js +0 -0
  1501. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/loader.js.map +0 -0
  1502. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/markdown.d.ts +0 -0
  1503. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/markdown.d.ts.map +0 -0
  1504. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/markdown.js +0 -0
  1505. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/markdown.js.map +0 -0
  1506. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/mouse-region.d.ts +0 -0
  1507. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/mouse-region.d.ts.map +0 -0
  1508. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/mouse-region.js +0 -0
  1509. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/mouse-region.js.map +0 -0
  1510. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/scroll-view.d.ts +0 -0
  1511. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/scroll-view.d.ts.map +0 -0
  1512. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/scroll-view.js +0 -0
  1513. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/scroll-view.js.map +0 -0
  1514. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/select-list.d.ts +0 -0
  1515. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/select-list.d.ts.map +0 -0
  1516. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/select-list.js +0 -0
  1517. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/select-list.js.map +0 -0
  1518. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/settings-list.d.ts +0 -0
  1519. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/settings-list.d.ts.map +0 -0
  1520. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/settings-list.js +0 -0
  1521. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/settings-list.js.map +0 -0
  1522. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/spacer.d.ts +0 -0
  1523. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/spacer.d.ts.map +0 -0
  1524. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/spacer.js +0 -0
  1525. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/spacer.js.map +0 -0
  1526. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/stack.d.ts +0 -0
  1527. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/stack.d.ts.map +0 -0
  1528. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/stack.js +0 -0
  1529. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/stack.js.map +0 -0
  1530. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/text.d.ts +0 -0
  1531. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/text.d.ts.map +0 -0
  1532. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/text.js +0 -0
  1533. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/text.js.map +0 -0
  1534. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/truncated-text.d.ts +0 -0
  1535. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/truncated-text.d.ts.map +0 -0
  1536. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/truncated-text.js +0 -0
  1537. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/truncated-text.js.map +0 -0
  1538. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/v-stack.d.ts +0 -0
  1539. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/v-stack.d.ts.map +0 -0
  1540. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/v-stack.js +0 -0
  1541. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/v-stack.js.map +0 -0
  1542. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/editor-component.d.ts +0 -0
  1543. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/editor-component.d.ts.map +0 -0
  1544. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/editor-component.js +0 -0
  1545. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/editor-component.js.map +0 -0
  1546. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/fuzzy.d.ts +0 -0
  1547. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/fuzzy.d.ts.map +0 -0
  1548. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/fuzzy.js +0 -0
  1549. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/fuzzy.js.map +0 -0
  1550. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/index.d.ts +0 -0
  1551. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/index.d.ts.map +0 -0
  1552. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/index.js +0 -0
  1553. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/index.js.map +0 -0
  1554. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/keybindings.d.ts +0 -0
  1555. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/keybindings.d.ts.map +0 -0
  1556. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/keybindings.js +0 -0
  1557. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/keybindings.js.map +0 -0
  1558. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/keys.d.ts +0 -0
  1559. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/keys.d.ts.map +0 -0
  1560. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/keys.js +0 -0
  1561. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/keys.js.map +0 -0
  1562. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/kill-ring.d.ts +0 -0
  1563. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/kill-ring.d.ts.map +0 -0
  1564. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/kill-ring.js +0 -0
  1565. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/kill-ring.js.map +0 -0
  1566. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/latex.d.ts +0 -0
  1567. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/latex.d.ts.map +0 -0
  1568. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/latex.js +0 -0
  1569. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/latex.js.map +0 -0
  1570. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/layout-node.d.ts +0 -0
  1571. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/layout-node.d.ts.map +0 -0
  1572. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/layout-node.js +0 -0
  1573. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/layout-node.js.map +0 -0
  1574. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/layout.d.ts +0 -0
  1575. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/layout.d.ts.map +0 -0
  1576. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/layout.js +0 -0
  1577. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/layout.js.map +0 -0
  1578. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/native-modifiers.d.ts +0 -0
  1579. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/native-modifiers.d.ts.map +0 -0
  1580. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/native-modifiers.js +0 -0
  1581. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/native-modifiers.js.map +0 -0
  1582. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/native-module-path.d.ts +0 -0
  1583. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/native-module-path.d.ts.map +0 -0
  1584. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/native-module-path.js +0 -0
  1585. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/native-module-path.js.map +0 -0
  1586. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/native-platform.d.ts +0 -0
  1587. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/native-platform.d.ts.map +0 -0
  1588. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/native-platform.js +0 -0
  1589. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/native-platform.js.map +0 -0
  1590. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/oklab.d.ts +0 -0
  1591. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/oklab.d.ts.map +0 -0
  1592. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/oklab.js +0 -0
  1593. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/oklab.js.map +0 -0
  1594. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/program-status.d.ts +0 -0
  1595. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/program-status.d.ts.map +0 -0
  1596. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/program-status.js +0 -0
  1597. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/program-status.js.map +0 -0
  1598. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/stdin-buffer.d.ts +0 -0
  1599. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/stdin-buffer.d.ts.map +0 -0
  1600. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/stdin-buffer.js +0 -0
  1601. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/stdin-buffer.js.map +0 -0
  1602. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/terminal-colors.d.ts +0 -0
  1603. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/terminal-colors.d.ts.map +0 -0
  1604. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/terminal-colors.js +0 -0
  1605. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/terminal-colors.js.map +0 -0
  1606. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/terminal-image.d.ts +0 -0
  1607. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/terminal-image.d.ts.map +0 -0
  1608. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/terminal-image.js +0 -0
  1609. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/terminal-image.js.map +0 -0
  1610. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/terminal.d.ts +0 -0
  1611. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/terminal.d.ts.map +0 -0
  1612. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/terminal.js +0 -0
  1613. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/terminal.js.map +0 -0
  1614. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/tui-alt-screen.d.ts +0 -0
  1615. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/tui-alt-screen.d.ts.map +0 -0
  1616. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/tui-alt-screen.js +0 -0
  1617. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/tui-alt-screen.js.map +0 -0
  1618. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/tui-main-screen.d.ts +0 -0
  1619. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/tui-main-screen.d.ts.map +0 -0
  1620. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/tui-main-screen.js +0 -0
  1621. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/tui-main-screen.js.map +0 -0
  1622. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/tui.d.ts +0 -0
  1623. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/tui.d.ts.map +0 -0
  1624. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/tui.js +0 -0
  1625. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/tui.js.map +0 -0
  1626. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/undo-stack.d.ts +0 -0
  1627. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/undo-stack.d.ts.map +0 -0
  1628. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/undo-stack.js +0 -0
  1629. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/undo-stack.js.map +0 -0
  1630. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/utils.d.ts +0 -0
  1631. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/utils.d.ts.map +0 -0
  1632. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/utils.js +0 -0
  1633. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/utils.js.map +0 -0
  1634. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/wheel-scroll.d.ts +0 -0
  1635. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/wheel-scroll.d.ts.map +0 -0
  1636. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/wheel-scroll.js +0 -0
  1637. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/wheel-scroll.js.map +0 -0
  1638. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/word-navigation.d.ts +0 -0
  1639. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/word-navigation.d.ts.map +0 -0
  1640. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/word-navigation.js +0 -0
  1641. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/word-navigation.js.map +0 -0
  1642. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/native/clipboard.h +0 -0
  1643. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/native/darwin/README.md +0 -0
  1644. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/native/darwin/build.sh +0 -0
  1645. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/native/darwin/prebuilds/darwin-arm64/darwin-platform.node +0 -0
  1646. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/native/darwin/prebuilds/darwin-x64/darwin-platform.node +0 -0
  1647. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/native/darwin/src/darwin-platform.m +0 -0
  1648. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/native/linux/README.md +0 -0
  1649. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/native/linux/build.sh +0 -0
  1650. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/native/linux/prebuilds/linux-arm64/linux-platform-x11.node +0 -0
  1651. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/native/linux/prebuilds/linux-x64/linux-platform-x11.node +0 -0
  1652. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/native/linux/src/clipboard-worker.h +0 -0
  1653. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/native/linux/src/linux-platform-x11.c +0 -0
  1654. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/native/napi.h +0 -0
  1655. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/native/win32/README.md +0 -0
  1656. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/native/win32/build.mjs +0 -0
  1657. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/native/win32/prebuilds/win32-arm64/win32-platform.node +0 -0
  1658. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/native/win32/prebuilds/win32-x64/win32-platform.node +0 -0
  1659. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/native/win32/src/win32-platform.c +0 -0
  1660. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/package.json +0 -0
  1661. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/LICENSE +0 -0
  1662. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/README.md +0 -0
  1663. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/api/Agent.md +0 -0
  1664. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/api/BalancedPool.md +0 -0
  1665. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/api/CacheStorage.md +0 -0
  1666. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/api/CacheStore.md +0 -0
  1667. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/api/Client.md +0 -0
  1668. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/api/ClientStats.md +0 -0
  1669. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/api/Connector.md +0 -0
  1670. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/api/ContentType.md +0 -0
  1671. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/api/Cookies.md +0 -0
  1672. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/api/Debug.md +0 -0
  1673. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/api/DiagnosticsChannel.md +0 -0
  1674. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/api/Dispatcher.md +0 -0
  1675. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/api/EnvHttpProxyAgent.md +0 -0
  1676. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/api/Errors.md +0 -0
  1677. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/api/EventSource.md +0 -0
  1678. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/api/Fetch.md +0 -0
  1679. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/api/GlobalInstallation.md +0 -0
  1680. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/api/H2CClient.md +0 -0
  1681. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/api/Interceptors.md +0 -0
  1682. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/api/MockAgent.md +0 -0
  1683. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/api/MockCallHistory.md +0 -0
  1684. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/api/MockCallHistoryLog.md +0 -0
  1685. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/api/MockClient.md +0 -0
  1686. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/api/MockErrors.md +0 -0
  1687. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/api/MockPool.md +0 -0
  1688. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/api/Pool.md +0 -0
  1689. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/api/PoolStats.md +0 -0
  1690. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/api/ProxyAgent.md +0 -0
  1691. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/api/RedirectHandler.md +0 -0
  1692. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/api/RetryAgent.md +0 -0
  1693. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/api/RetryHandler.md +0 -0
  1694. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/api/RoundRobinPool.md +0 -0
  1695. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/api/SnapshotAgent.md +0 -0
  1696. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/api/Socks5ProxyAgent.md +0 -0
  1697. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/api/Util.md +0 -0
  1698. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/api/WebSocket.md +0 -0
  1699. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/api/api-lifecycle.md +0 -0
  1700. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/best-practices/client-certificate.md +0 -0
  1701. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/best-practices/crawling.md +0 -0
  1702. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/best-practices/migrating-from-v7-to-v8.md +0 -0
  1703. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/best-practices/mocking-request.md +0 -0
  1704. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/best-practices/proxy.md +0 -0
  1705. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/best-practices/undici-vs-builtin-fetch.md +0 -0
  1706. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/best-practices/writing-tests.md +0 -0
  1707. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/getting-started.md +0 -0
  1708. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/index.md +0 -0
  1709. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/site.json +0 -0
  1710. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/type-map.json +0 -0
  1711. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/index-fetch.js +0 -0
  1712. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/index.d.ts +0 -0
  1713. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/index.js +0 -0
  1714. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/api/abort-signal.js +0 -0
  1715. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/api/api-connect.js +0 -0
  1716. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/api/api-pipeline.js +0 -0
  1717. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/api/api-request.js +0 -0
  1718. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/api/api-stream.js +0 -0
  1719. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/api/api-upgrade.js +0 -0
  1720. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/api/index.js +0 -0
  1721. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/api/readable.js +0 -0
  1722. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/cache/memory-cache-store.js +0 -0
  1723. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/cache/sqlite-cache-store.js +0 -0
  1724. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/core/connect.js +0 -0
  1725. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/core/constants.js +0 -0
  1726. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/core/diagnostics.js +0 -0
  1727. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/core/errors.js +0 -0
  1728. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/core/request.js +0 -0
  1729. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/core/socks5-client.js +0 -0
  1730. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/core/socks5-utils.js +0 -0
  1731. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/core/symbols.js +0 -0
  1732. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/core/tree.js +0 -0
  1733. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/core/util.js +0 -0
  1734. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/dispatcher/agent.js +0 -0
  1735. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/dispatcher/balanced-pool.js +0 -0
  1736. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/dispatcher/client-h1.js +0 -0
  1737. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/dispatcher/client-h2.js +0 -0
  1738. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/dispatcher/client.js +0 -0
  1739. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/dispatcher/dispatcher-base.js +0 -0
  1740. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/dispatcher/dispatcher.js +0 -0
  1741. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/dispatcher/dispatcher1-wrapper.js +0 -0
  1742. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/dispatcher/env-http-proxy-agent.js +0 -0
  1743. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/dispatcher/fixed-queue.js +0 -0
  1744. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/dispatcher/h2c-client.js +0 -0
  1745. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/dispatcher/pool-base.js +0 -0
  1746. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/dispatcher/pool.js +0 -0
  1747. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/dispatcher/proxy-agent.js +0 -0
  1748. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/dispatcher/retry-agent.js +0 -0
  1749. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/dispatcher/round-robin-pool.js +0 -0
  1750. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/dispatcher/socks5-proxy-agent.js +0 -0
  1751. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/encoding/index.js +0 -0
  1752. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/global.js +0 -0
  1753. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/handler/cache-handler.js +0 -0
  1754. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/handler/cache-revalidation-handler.js +0 -0
  1755. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/handler/decorator-handler.js +0 -0
  1756. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/handler/deduplication-handler.js +0 -0
  1757. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/handler/redirect-handler.js +0 -0
  1758. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/handler/retry-handler.js +0 -0
  1759. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/interceptor/cache.js +0 -0
  1760. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/interceptor/decompress.js +0 -0
  1761. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/interceptor/deduplicate.js +0 -0
  1762. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/interceptor/dns.js +0 -0
  1763. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/interceptor/dump.js +0 -0
  1764. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/interceptor/redirect.js +0 -0
  1765. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/interceptor/response-error.js +0 -0
  1766. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/interceptor/retry.js +0 -0
  1767. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/llhttp/constants.d.ts +0 -0
  1768. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/llhttp/constants.js +0 -0
  1769. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/llhttp/llhttp-wasm.js +0 -0
  1770. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/llhttp/llhttp_simd-wasm.js +0 -0
  1771. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/llhttp/utils.d.ts +0 -0
  1772. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/llhttp/utils.js +0 -0
  1773. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/mock/mock-agent.js +0 -0
  1774. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/mock/mock-call-history.js +0 -0
  1775. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/mock/mock-client.js +0 -0
  1776. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/mock/mock-errors.js +0 -0
  1777. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/mock/mock-interceptor.js +0 -0
  1778. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/mock/mock-pool.js +0 -0
  1779. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/mock/mock-symbols.js +0 -0
  1780. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/mock/mock-utils.js +0 -0
  1781. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/mock/pending-interceptors-formatter.js +0 -0
  1782. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/mock/snapshot-agent.js +0 -0
  1783. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/mock/snapshot-recorder.js +0 -0
  1784. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/mock/snapshot-utils.js +0 -0
  1785. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/util/cache.js +0 -0
  1786. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/util/date.js +0 -0
  1787. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/util/runtime-features.js +0 -0
  1788. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/util/stats.js +0 -0
  1789. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/util/timers.js +0 -0
  1790. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/web/cache/cache.js +0 -0
  1791. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/web/cache/cachestorage.js +0 -0
  1792. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/web/cache/util.js +0 -0
  1793. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/web/cookies/constants.js +0 -0
  1794. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/web/cookies/index.js +0 -0
  1795. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/web/cookies/parse.js +0 -0
  1796. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/web/cookies/util.js +0 -0
  1797. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/web/eventsource/eventsource-stream.js +0 -0
  1798. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/web/eventsource/eventsource.js +0 -0
  1799. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/web/eventsource/util.js +0 -0
  1800. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/web/fetch/LICENSE +0 -0
  1801. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/web/fetch/body.js +0 -0
  1802. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/web/fetch/constants.js +0 -0
  1803. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/web/fetch/data-url.js +0 -0
  1804. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/web/fetch/formdata-parser.js +0 -0
  1805. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/web/fetch/formdata.js +0 -0
  1806. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/web/fetch/global.js +0 -0
  1807. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/web/fetch/headers.js +0 -0
  1808. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/web/fetch/index.js +0 -0
  1809. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/web/fetch/request.js +0 -0
  1810. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/web/fetch/response.js +0 -0
  1811. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/web/fetch/util.js +0 -0
  1812. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/web/infra/index.js +0 -0
  1813. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/web/subresource-integrity/Readme.md +0 -0
  1814. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/web/subresource-integrity/subresource-integrity.js +0 -0
  1815. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/web/webidl/index.js +0 -0
  1816. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/web/websocket/connection.js +0 -0
  1817. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/web/websocket/constants.js +0 -0
  1818. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/web/websocket/events.js +0 -0
  1819. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/web/websocket/frame.js +0 -0
  1820. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/web/websocket/permessage-deflate.js +0 -0
  1821. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/web/websocket/receiver.js +0 -0
  1822. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/web/websocket/sender.js +0 -0
  1823. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/web/websocket/stream/websocketerror.js +0 -0
  1824. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/web/websocket/stream/websocketstream.js +0 -0
  1825. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/web/websocket/util.js +0 -0
  1826. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/web/websocket/websocket.js +0 -0
  1827. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/package.json +0 -0
  1828. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/scripts/strip-comments.js +0 -0
  1829. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/README.md +0 -0
  1830. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/agent.d.ts +0 -0
  1831. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/api.d.ts +0 -0
  1832. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/balanced-pool.d.ts +0 -0
  1833. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/cache-interceptor.d.ts +0 -0
  1834. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/cache.d.ts +0 -0
  1835. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/client-stats.d.ts +0 -0
  1836. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/client.d.ts +0 -0
  1837. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/connector.d.ts +0 -0
  1838. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/content-type.d.ts +0 -0
  1839. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/cookies.d.ts +0 -0
  1840. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/diagnostics-channel.d.ts +0 -0
  1841. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/dispatcher.d.ts +0 -0
  1842. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/dispatcher1-wrapper.d.ts +0 -0
  1843. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/env-http-proxy-agent.d.ts +0 -0
  1844. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/errors.d.ts +0 -0
  1845. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/eventsource.d.ts +0 -0
  1846. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/fetch.d.ts +0 -0
  1847. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/formdata.d.ts +0 -0
  1848. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/global-dispatcher.d.ts +0 -0
  1849. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/global-origin.d.ts +0 -0
  1850. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/h2c-client.d.ts +0 -0
  1851. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/handlers.d.ts +0 -0
  1852. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/header.d.ts +0 -0
  1853. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/index.d.ts +0 -0
  1854. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/interceptors.d.ts +0 -0
  1855. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/mock-agent.d.ts +0 -0
  1856. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/mock-call-history.d.ts +0 -0
  1857. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/mock-client.d.ts +0 -0
  1858. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/mock-errors.d.ts +0 -0
  1859. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/mock-interceptor.d.ts +0 -0
  1860. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/mock-pool.d.ts +0 -0
  1861. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/patch.d.ts +0 -0
  1862. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/pool-stats.d.ts +0 -0
  1863. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/pool.d.ts +0 -0
  1864. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/proxy-agent.d.ts +0 -0
  1865. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/readable.d.ts +0 -0
  1866. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/retry-agent.d.ts +0 -0
  1867. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/retry-handler.d.ts +0 -0
  1868. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/round-robin-pool.d.ts +0 -0
  1869. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/snapshot-agent.d.ts +0 -0
  1870. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/socks5-proxy-agent.d.ts +0 -0
  1871. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/util.d.ts +0 -0
  1872. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/utility.d.ts +0 -0
  1873. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/webidl.d.ts +0 -0
  1874. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/websocket.d.ts +0 -0
@@ -1,5 +1,5 @@
1
1
  import { Validator } from "@seriousme/openapi-schema-validator";
2
- import { describe, expect, test } from "vitest";
2
+ import { describe, expect, test, vi } from "vitest";
3
3
  import * as z from "zod";
4
4
  // import * as zCore from "zod/v4/core";
5
5
 
@@ -18,8 +18,7 @@ const validateOpenAPI30Schema = async (zodJSONSchema: Record<string, unknown>):
18
18
  });
19
19
 
20
20
  if (!res.valid) {
21
- // `console.error` should make `vitest` trow an unhandled error
22
- // printing the validation messages in consoles
21
+ // `console.error` should make `vitest` trow an unhandled error printing the validation messages in consoles
23
22
  console.error(
24
23
  `OpenAPI schema is not valid against ${openAPI30Validator.version}`,
25
24
  JSON.stringify(res.errors, null, 2)
@@ -80,7 +79,7 @@ describe("toJSONSchema", () => {
80
79
  {
81
80
  "$schema": "https://json-schema.org/draft/2020-12/schema",
82
81
  "format": "email",
83
- "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
82
+ "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
84
83
  "type": "string",
85
84
  }
86
85
  `);
@@ -88,7 +87,7 @@ describe("toJSONSchema", () => {
88
87
  {
89
88
  "$schema": "https://json-schema.org/draft/2020-12/schema",
90
89
  "format": "date-time",
91
- "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
90
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
92
91
  "type": "string",
93
92
  }
94
93
  `);
@@ -100,6 +99,17 @@ describe("toJSONSchema", () => {
100
99
  "type": "string",
101
100
  }
102
101
  `);
102
+ // only shapes keeping both an offset and seconds may advertise `date-time`, composed onto a string as well as constructed
103
+ expect(z.toJSONSchema(z.iso.datetime()).format).toEqual("date-time");
104
+ expect(z.toJSONSchema(z.iso.datetime({ offset: true })).format).toEqual("date-time");
105
+ expect(z.toJSONSchema(z.iso.datetime({ precision: 0 })).format).toEqual("date-time");
106
+ expect(z.toJSONSchema(z.iso.datetime({ local: true })).format).toEqual(undefined);
107
+ expect(z.toJSONSchema(z.iso.datetime({ precision: -1 })).format).toEqual(undefined);
108
+ expect(z.toJSONSchema(z.string().check(z.iso.datetime({ local: true }))).format).toEqual(undefined);
109
+ expect(z.toJSONSchema(z.string().check(z.iso.datetime())).format).toEqual("date-time");
110
+ // the pattern still describes what the schema accepts
111
+ expect(z.toJSONSchema(z.iso.datetime({ local: true })).pattern).toBeDefined();
112
+
103
113
  expect(z.toJSONSchema(z.iso.time())).toMatchInlineSnapshot(`
104
114
  {
105
115
  "$schema": "https://json-schema.org/draft/2020-12/schema",
@@ -208,6 +218,15 @@ describe("toJSONSchema", () => {
208
218
  "type": "string",
209
219
  }
210
220
  `);
221
+ expect(z.toJSONSchema(z.base64url())).toMatchInlineSnapshot(`
222
+ {
223
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
224
+ "contentEncoding": "base64url",
225
+ "format": "base64url",
226
+ "pattern": "^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$",
227
+ "type": "string",
228
+ }
229
+ `);
211
230
  expect(z.toJSONSchema(z.cuid())).toMatchInlineSnapshot(`
212
231
  {
213
232
  "$schema": "https://json-schema.org/draft/2020-12/schema",
@@ -221,7 +240,7 @@ describe("toJSONSchema", () => {
221
240
  {
222
241
  "$schema": "https://json-schema.org/draft/2020-12/schema",
223
242
  "format": "emoji",
224
- "pattern": "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",
243
+ "pattern": "^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$",
225
244
  "type": "string",
226
245
  }
227
246
  `);
@@ -233,6 +252,14 @@ describe("toJSONSchema", () => {
233
252
  "type": "string",
234
253
  }
235
254
  `);
255
+ expect(z.toJSONSchema(z.nanoid({ length: 64 }))).toMatchInlineSnapshot(`
256
+ {
257
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
258
+ "format": "nanoid",
259
+ "pattern": "^[a-zA-Z0-9_-]{64}$",
260
+ "type": "string",
261
+ }
262
+ `);
236
263
  expect(z.toJSONSchema(z.cuid2())).toMatchInlineSnapshot(`
237
264
  {
238
265
  "$schema": "https://json-schema.org/draft/2020-12/schema",
@@ -245,7 +272,7 @@ describe("toJSONSchema", () => {
245
272
  {
246
273
  "$schema": "https://json-schema.org/draft/2020-12/schema",
247
274
  "format": "ulid",
248
- "pattern": "^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$",
275
+ "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
249
276
  "type": "string",
250
277
  }
251
278
  `);
@@ -325,6 +352,12 @@ describe("toJSONSchema", () => {
325
352
  // Dynamic catch values
326
353
  const dynamicCatchSchema = z.string().catch((ctx) => `${ctx.issues.length}`);
327
354
  expect(() => z.toJSONSchema(dynamicCatchSchema)).toThrow("Dynamic catch values are not supported in JSON Schema");
355
+ expect(z.toJSONSchema(dynamicCatchSchema, { unrepresentable: "any" })).toMatchInlineSnapshot(`
356
+ {
357
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
358
+ "type": "string",
359
+ }
360
+ `);
328
361
  });
329
362
 
330
363
  test("string formats", () => {
@@ -332,7 +365,7 @@ describe("toJSONSchema", () => {
332
365
  {
333
366
  "$schema": "https://json-schema.org/draft/2020-12/schema",
334
367
  "format": "email",
335
- "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
368
+ "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
336
369
  "type": "string",
337
370
  }
338
371
  `);
@@ -348,7 +381,7 @@ describe("toJSONSchema", () => {
348
381
  {
349
382
  "$schema": "https://json-schema.org/draft/2020-12/schema",
350
383
  "format": "date-time",
351
- "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
384
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
352
385
  "type": "string",
353
386
  }
354
387
  `);
@@ -458,6 +491,30 @@ describe("toJSONSchema", () => {
458
491
  `);
459
492
  });
460
493
 
494
+ test("base64url pattern agrees with parse", () => {
495
+ const schema = z.base64url();
496
+ const pattern = new RegExp(z.toJSONSchema(schema).pattern!);
497
+ // lengths 1 (mod 4) carry no whole byte; the emitted pattern must reject them like parse does
498
+ for (const s of ["", "A", "AA", "AAA", "AAAA", "AAAAA"]) {
499
+ expect(pattern.test(s)).toBe(schema.safeParse(s).success);
500
+ }
501
+ });
502
+
503
+ test("base64 pattern agrees with parse", () => {
504
+ const schema = z.base64();
505
+ const pattern = new RegExp(z.toJSONSchema(schema).pattern!);
506
+ // the runtime def.pattern is lax; the emitted pattern must still carry the block structure parse enforces
507
+ for (const s of ["", "A", "AA", "AAA", "AAAA", "AAAAA", "AA==", "AAA=", "A===", "=", "AAAA=="]) {
508
+ expect(pattern.test(s)).toBe(schema.safeParse(s).success);
509
+ }
510
+ });
511
+
512
+ test("looseRecord with a format key emits the exact pattern", () => {
513
+ // recordProcessor reads bag.patterns directly; it must apply the same lax-to-exact swap as stringProcessor
514
+ const json = z.toJSONSchema(z.looseRecord(z.base64url(), z.number()));
515
+ expect(Object.keys(json.patternProperties!)).toEqual([z.regexes.base64url.source]);
516
+ });
517
+
461
518
  test("string patterns", () => {
462
519
  expect(
463
520
  z.toJSONSchema(
@@ -480,7 +537,7 @@ describe("toJSONSchema", () => {
480
537
  "pattern": "cruel",
481
538
  },
482
539
  {
483
- "pattern": "^.{10}dark",
540
+ "pattern": "^.{10,}dark",
484
541
  },
485
542
  {
486
543
  "pattern": ".*world$",
@@ -519,7 +576,7 @@ describe("toJSONSchema", () => {
519
576
  "type": "string",
520
577
  },
521
578
  {
522
- "pattern": "^.{10}dark",
579
+ "pattern": "^.{10,}dark",
523
580
  "type": "string",
524
581
  },
525
582
  {
@@ -536,6 +593,19 @@ describe("toJSONSchema", () => {
536
593
  `);
537
594
  });
538
595
 
596
+ test("includes with position emits a pattern matching runtime semantics", () => {
597
+ // String.prototype.includes(sub, position) matches `sub` at `position` OR
598
+ // LATER, so the JSON Schema pattern must allow >= position leading chars.
599
+ const schema = z.string().includes("foo", { position: 2 });
600
+ const json = z.toJSONSchema(schema) as { pattern?: string };
601
+ expect(json.pattern).toBe("^.{2,}foo");
602
+
603
+ const re = new RegExp(json.pattern!);
604
+ for (const input of ["xxfoo", "xxxfoo", "xfoo", "ab"]) {
605
+ expect(re.test(input)).toBe(schema.safeParse(input).success);
606
+ }
607
+ });
608
+
539
609
  test("number constraints", () => {
540
610
  expect(z.toJSONSchema(z.number().min(5).max(10))).toMatchInlineSnapshot(
541
611
  `
@@ -648,8 +718,7 @@ describe("toJSONSchema", () => {
648
718
  });
649
719
 
650
720
  test("number constraints intersection draft-04", () => {
651
- // When both minimum (from .int()) and exclusiveMinimum (from .positive()) exist,
652
- // the more restrictive constraint should be used
721
+ // When both minimum (from .int()) and exclusiveMinimum (from .positive()) exist, the more restrictive constraint should be used
653
722
  expect(z.toJSONSchema(z.number().int().positive().lte(65535), { target: "draft-04" })).toMatchInlineSnapshot(`
654
723
  {
655
724
  "$schema": "http://json-schema.org/draft-04/schema#",
@@ -688,8 +757,120 @@ describe("toJSONSchema", () => {
688
757
  `);
689
758
  });
690
759
 
760
+ test("number constraints order independence with int()", () => {
761
+ // .int() applied last should not overwrite the tighter bounds .min()/.max() already stored
762
+ expect(z.toJSONSchema(z.number().int().min(0).max(23))).toMatchInlineSnapshot(`
763
+ {
764
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
765
+ "maximum": 23,
766
+ "minimum": 0,
767
+ "type": "integer",
768
+ }
769
+ `);
770
+ expect(z.toJSONSchema(z.number().min(0).max(23).int())).toMatchInlineSnapshot(`
771
+ {
772
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
773
+ "maximum": 23,
774
+ "minimum": 0,
775
+ "type": "integer",
776
+ }
777
+ `);
778
+ });
779
+
780
+ test("chained multipleOf divisors emit the whole conjunction", () => {
781
+ // runtime rejects 4 (not a multiple of 3), so the emitted schema must too
782
+ expect(z.toJSONSchema(z.number().multipleOf(2).multipleOf(3))).toMatchInlineSnapshot(`
783
+ {
784
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
785
+ "allOf": [
786
+ {
787
+ "multipleOf": 3,
788
+ },
789
+ ],
790
+ "multipleOf": 2,
791
+ "type": "number",
792
+ }
793
+ `);
794
+ });
795
+
796
+ test("length() does not overwrite a tighter earlier bound", () => {
797
+ // min(8) + length(5) matches nothing at runtime; the emitted bounds stay honest about that
798
+ expect(z.toJSONSchema(z.string().min(8).length(5))).toMatchInlineSnapshot(`
799
+ {
800
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
801
+ "maxLength": 5,
802
+ "minLength": 8,
803
+ "type": "string",
804
+ }
805
+ `);
806
+ });
807
+
808
+ test("an integer format keeps the emitted type integer whatever format lands last", () => {
809
+ // runtime rejects 1.5 in both orders, so both must emit type integer
810
+ const after = z.number().int().check(z.float32());
811
+ expect(after.safeParse(1.5).success).toBe(false);
812
+ expect(z.toJSONSchema(after).type).toBe("integer");
813
+ expect(z.toJSONSchema(z.number().check(z.float32()).int()).type).toBe("integer");
814
+ });
815
+
816
+ test("disjoint mime checks emit a false schema, not an unconstrained file", () => {
817
+ const file = z.file().mime("image/png").mime("text/plain");
818
+ expect(z.toJSONSchema(file)).toMatchInlineSnapshot(`
819
+ {
820
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
821
+ "contentEncoding": "binary",
822
+ "format": "binary",
823
+ "not": {},
824
+ "type": "string",
825
+ }
826
+ `);
827
+ });
828
+
829
+ test("a custom mime narrowing via onattach intersects with built-in mime checks", () => {
830
+ const check = {
831
+ _zod: {
832
+ def: { check: "custom_mime" },
833
+ onattach: [
834
+ (inst: any) => {
835
+ inst._zod.bag.mime = ["text/plain"];
836
+ },
837
+ ],
838
+ check: () => {},
839
+ },
840
+ };
841
+ const file = z
842
+ .file()
843
+ .mime(["image/png", "text/plain"])
844
+ .check(check as any);
845
+ expect(z.toJSONSchema(file).contentMediaType).toBe("text/plain");
846
+ });
847
+
848
+ test("a custom check contributing via onattach still lands", () => {
849
+ // third-party checks have no converter handler; their bag writes are merged in as a fallback
850
+ const check = {
851
+ _zod: {
852
+ def: { check: "custom_range" },
853
+ onattach: [
854
+ (inst: any) => {
855
+ const bag = inst._zod.bag;
856
+ if (bag.minimum === undefined || 5 > bag.minimum) bag.minimum = 5;
857
+ },
858
+ ],
859
+ check: () => {},
860
+ },
861
+ };
862
+ expect(z.toJSONSchema(z.number().check(check as any))).toMatchInlineSnapshot(`
863
+ {
864
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
865
+ "minimum": 5,
866
+ "type": "number",
867
+ }
868
+ `);
869
+ });
870
+
691
871
  test("target normalization draft-04 and draft-07", () => {
692
872
  // Test that both old (draft-4, draft-7) and new (draft-04, draft-07) target formats work
873
+
693
874
  // Test draft-04 / draft-4
694
875
  expect(z.toJSONSchema(z.number().gt(5), { target: "draft-04" })).toMatchInlineSnapshot(`
695
876
  {
@@ -787,11 +968,159 @@ describe("toJSONSchema", () => {
787
968
 
788
969
  test("unions", () => {
789
970
  const schema = z.union([z.string(), z.number()]);
971
+ expect(z.toJSONSchema(schema)).toMatchInlineSnapshot(`
972
+ {
973
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
974
+ "type": [
975
+ "string",
976
+ "number",
977
+ ],
978
+ }
979
+ `);
980
+ });
981
+
982
+ test("nullable compacts to a type array", () => {
983
+ expect(z.toJSONSchema(z.string().nullable())).toMatchInlineSnapshot(`
984
+ {
985
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
986
+ "type": [
987
+ "string",
988
+ "null",
989
+ ],
990
+ }
991
+ `);
992
+
993
+ // a nested union folds into the outer type array rather than leaving a mixed shape
994
+ expect(z.toJSONSchema(z.union([z.string(), z.number()]).nullable())).toMatchInlineSnapshot(`
995
+ {
996
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
997
+ "type": [
998
+ "string",
999
+ "number",
1000
+ "null",
1001
+ ],
1002
+ }
1003
+ `);
1004
+
1005
+ // the null branch is bare but the object branch is not, so this stays an anyOf
1006
+ expect(z.toJSONSchema(z.object({ a: z.string() }).nullable())).toMatchInlineSnapshot(`
1007
+ {
1008
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1009
+ "anyOf": [
1010
+ {
1011
+ "additionalProperties": false,
1012
+ "properties": {
1013
+ "a": {
1014
+ "type": "string",
1015
+ },
1016
+ },
1017
+ "required": [
1018
+ "a",
1019
+ ],
1020
+ "type": "object",
1021
+ },
1022
+ {
1023
+ "type": "null",
1024
+ },
1025
+ ],
1026
+ }
1027
+ `);
1028
+ });
1029
+
1030
+ test("duplicate branches dedupe, single branch stays a bare type", () => {
1031
+ // a `type` array must have unique members, so two branches that erase to the same bare type collapse
1032
+ const refined = z.union([z.string().refine((s) => s.length > 2), z.string().refine((s) => s.length < 9)]);
1033
+ expect(z.toJSONSchema(refined)).toMatchInlineSnapshot(`
1034
+ {
1035
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1036
+ "type": "string",
1037
+ }
1038
+ `);
1039
+ expect(z.toJSONSchema(z.union([z.string()]))).toMatchInlineSnapshot(`
1040
+ {
1041
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1042
+ "type": "string",
1043
+ }
1044
+ `);
1045
+ });
1046
+
1047
+ test("compaction runs after overrides and ref extraction", () => {
1048
+ // an override decorates the string branch, so it is no longer a bare type and must survive in anyOf
1049
+ const decorated = z.toJSONSchema(z.union([z.string(), z.number()]), {
1050
+ override(ctx) {
1051
+ if (ctx.zodSchema._zod.def.type === "string") ctx.jsonSchema.whatever = "sup";
1052
+ },
1053
+ });
1054
+ expect(decorated).toMatchInlineSnapshot(`
1055
+ {
1056
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1057
+ "anyOf": [
1058
+ {
1059
+ "type": "string",
1060
+ "whatever": "sup",
1061
+ },
1062
+ {
1063
+ "type": "number",
1064
+ },
1065
+ ],
1066
+ }
1067
+ `);
1068
+
1069
+ // a branch extracted into $defs is a $ref, not a bare type, so `reused` is not silently bypassed
1070
+ const shared = z.string();
1071
+ expect(
1072
+ z.toJSONSchema(z.object({ a: shared, b: z.union([shared, z.null()]) }), { reused: "ref" })
1073
+ ).toMatchInlineSnapshot(`
1074
+ {
1075
+ "$defs": {
1076
+ "__schema0": {
1077
+ "type": "string",
1078
+ },
1079
+ },
1080
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1081
+ "additionalProperties": false,
1082
+ "properties": {
1083
+ "a": {
1084
+ "$ref": "#/$defs/__schema0",
1085
+ },
1086
+ "b": {
1087
+ "anyOf": [
1088
+ {
1089
+ "$ref": "#/$defs/__schema0",
1090
+ },
1091
+ {
1092
+ "type": "null",
1093
+ },
1094
+ ],
1095
+ },
1096
+ },
1097
+ "required": [
1098
+ "a",
1099
+ "b",
1100
+ ],
1101
+ "type": "object",
1102
+ }
1103
+ `);
1104
+ });
1105
+
1106
+ test("openapi-3.0 keeps a single-string type", () => {
1107
+ // OpenAPI 3.0 has no type arrays; nullability is spelled with `nullable`
1108
+ expect(z.toJSONSchema(z.string().nullable(), { target: "openapi-3.0" })).toMatchInlineSnapshot(`
1109
+ {
1110
+ "nullable": true,
1111
+ "type": "string",
1112
+ }
1113
+ `);
1114
+ });
1115
+
1116
+ test("union with constrained branch is not compacted", () => {
1117
+ const schema = z.union([z.string().min(1), z.number()]);
790
1118
  expect(z.toJSONSchema(schema)).toMatchInlineSnapshot(`
791
1119
  {
792
1120
  "$schema": "https://json-schema.org/draft/2020-12/schema",
793
1121
  "anyOf": [
794
1122
  {
1123
+ "minLength": 1,
795
1124
  "type": "string",
796
1125
  },
797
1126
  {
@@ -802,6 +1131,25 @@ describe("toJSONSchema", () => {
802
1131
  `);
803
1132
  });
804
1133
 
1134
+ test("union of literals is not compacted", () => {
1135
+ const schema = z.union([z.literal("a"), z.literal("b")]);
1136
+ expect(z.toJSONSchema(schema)).toMatchInlineSnapshot(`
1137
+ {
1138
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1139
+ "anyOf": [
1140
+ {
1141
+ "const": "a",
1142
+ "type": "string",
1143
+ },
1144
+ {
1145
+ "const": "b",
1146
+ "type": "string",
1147
+ },
1148
+ ],
1149
+ }
1150
+ `);
1151
+ });
1152
+
805
1153
  test("discriminated unions", () => {
806
1154
  const schema = z.discriminatedUnion("type", [
807
1155
  z.object({ type: z.literal("success"), data: z.string() }),
@@ -856,32 +1204,20 @@ describe("toJSONSchema", () => {
856
1204
  expect(z.toJSONSchema(schema)).toMatchInlineSnapshot(`
857
1205
  {
858
1206
  "$schema": "https://json-schema.org/draft/2020-12/schema",
859
- "allOf": [
860
- {
861
- "additionalProperties": false,
862
- "properties": {
863
- "name": {
864
- "type": "string",
865
- },
866
- },
867
- "required": [
868
- "name",
869
- ],
870
- "type": "object",
1207
+ "additionalProperties": false,
1208
+ "properties": {
1209
+ "age": {
1210
+ "type": "number",
871
1211
  },
872
- {
873
- "additionalProperties": false,
874
- "properties": {
875
- "age": {
876
- "type": "number",
877
- },
878
- },
879
- "required": [
880
- "age",
881
- ],
882
- "type": "object",
1212
+ "name": {
1213
+ "type": "string",
883
1214
  },
1215
+ },
1216
+ "required": [
1217
+ "name",
1218
+ "age",
884
1219
  ],
1220
+ "type": "object",
885
1221
  }
886
1222
  `);
887
1223
  });
@@ -941,7 +1277,23 @@ describe("toJSONSchema", () => {
941
1277
  `);
942
1278
  });
943
1279
 
944
- test("record filters enum values to strings and numbers for required", () => {
1280
+ test("record with enum keys drops required for an optional-in value under io: input", () => {
1281
+ const schema = z.record(z.enum(["key1", "key2"]), z.number().default(0));
1282
+
1283
+ expect(z.toJSONSchema(schema, { io: "input" }).required).toBeUndefined();
1284
+ expect(z.toJSONSchema(schema).required).toEqual(["key1", "key2"]);
1285
+ expect(z.toJSONSchema(z.record(z.enum(["key1", "key2"]), z.number()), { io: "input" }).required).toEqual([
1286
+ "key1",
1287
+ "key2",
1288
+ ]);
1289
+ // A caught value keeps required, matching the input type and z.object().
1290
+ expect(z.toJSONSchema(z.record(z.enum(["key1", "key2"]), z.number().catch(0)), { io: "input" }).required).toEqual([
1291
+ "key1",
1292
+ "key2",
1293
+ ]);
1294
+ });
1295
+
1296
+ test("record stringifies numeric enum keys for propertyNames and required", () => {
945
1297
  enum NumberEnum {
946
1298
  Zero = 0,
947
1299
  One = 1,
@@ -956,33 +1308,137 @@ describe("toJSONSchema", () => {
956
1308
  },
957
1309
  "propertyNames": {
958
1310
  "enum": [
959
- 0,
960
- 1,
1311
+ "0",
1312
+ "1",
961
1313
  ],
962
- "type": "number",
1314
+ "type": "string",
963
1315
  },
964
1316
  "required": [
965
- 0,
966
- 1,
1317
+ "0",
1318
+ "1",
967
1319
  ],
968
1320
  "type": "object",
969
1321
  }
970
1322
  `);
971
1323
  });
972
1324
 
973
- test("strict record with regex key uses propertyNames", () => {
974
- const schema = z.record(z.string().regex(/^label:[a-z]{2}$/), z.string());
1325
+ test("record with a numeric key emits propertyNames over the numeric-string form", () => {
1326
+ expect(z.toJSONSchema(z.record(z.number(), z.boolean())).propertyNames).toEqual({
1327
+ type: "string",
1328
+ pattern: "^-?\\d+(?:\\.\\d+)?$",
1329
+ });
1330
+ // range checks can't apply to a key, so only the integer shape survives
1331
+ expect(z.toJSONSchema(z.record(z.int32(), z.boolean())).propertyNames).toEqual({
1332
+ type: "string",
1333
+ pattern: "^-?\\d+$",
1334
+ });
1335
+ expect(z.toJSONSchema(z.record(z.literal([1, 2]), z.boolean()))).toMatchObject({
1336
+ propertyNames: { type: "string", enum: ["1", "2"] },
1337
+ required: ["1", "2"],
1338
+ });
1339
+ expect(z.toJSONSchema(z.record(z.literal(1), z.boolean())).propertyNames).toEqual({
1340
+ type: "string",
1341
+ const: "1",
1342
+ });
1343
+ });
975
1344
 
976
- expect(z.toJSONSchema(schema)).toMatchInlineSnapshot(`
977
- {
978
- "$schema": "https://json-schema.org/draft/2020-12/schema",
979
- "additionalProperties": {
980
- "type": "string",
981
- },
982
- "propertyNames": {
983
- "pattern": "^label:[a-z]{2}$",
984
- "type": "string",
985
- },
1345
+ test("record key rewrite reaches through wrappers and union branches", () => {
1346
+ const numericString = { type: "string", pattern: "^-?\\d+(?:\\.\\d+)?$" };
1347
+ // a wrapper only carries its inner type once the refs are flattened, so this is decided after the record itself is emitted
1348
+ expect(
1349
+ z.toJSONSchema(
1350
+ z.record(
1351
+ z.lazy(() => z.number()),
1352
+ z.boolean()
1353
+ )
1354
+ ).propertyNames
1355
+ ).toEqual(numericString);
1356
+ expect(z.toJSONSchema(z.record(z.number().pipe(z.number()), z.boolean())).propertyNames).toEqual(numericString);
1357
+ expect(z.toJSONSchema(z.record(z.number().readonly(), z.boolean())).propertyNames).toMatchObject(numericString);
1358
+ expect(z.toJSONSchema(z.record(z.union([z.literal("Tuna"), z.literal(21)]), z.string()))).toMatchObject({
1359
+ propertyNames: {
1360
+ anyOf: [
1361
+ { type: "string", const: "Tuna" },
1362
+ { type: "string", const: "21" },
1363
+ ],
1364
+ },
1365
+ required: ["Tuna", "21"],
1366
+ });
1367
+ });
1368
+
1369
+ test("record with a numeric key inlines an extracted key, and leaves a string one referenced", () => {
1370
+ expect(z.toJSONSchema(z.record(z.number().meta({ id: "Num" }), z.boolean())).propertyNames).toEqual({
1371
+ type: "string",
1372
+ pattern: "^-?\\d+(?:\\.\\d+)?$",
1373
+ });
1374
+ expect(z.toJSONSchema(z.record(z.string().meta({ id: "Str" }), z.boolean())).propertyNames).toEqual({
1375
+ $ref: "#/$defs/Str",
1376
+ });
1377
+ // the value position still wants the number form, so the two cannot share one def
1378
+ const key = z.number().meta({ id: "Shared" });
1379
+ expect(z.toJSONSchema(z.object({ a: key, b: z.record(key, z.string()) }))).toMatchObject({
1380
+ properties: { a: { $ref: "#/$defs/Shared" }, b: { propertyNames: { type: "string" } } },
1381
+ $defs: { Shared: { type: "number" } },
1382
+ });
1383
+ });
1384
+
1385
+ test("record key rewrite reaches a wrapped record", () => {
1386
+ // the flatten copies a record's properties onto its wrapper by reference, so the rewrite has to find every copy
1387
+ expect(z.toJSONSchema(z.record(z.number(), z.boolean()).optional()).propertyNames).toEqual({
1388
+ type: "string",
1389
+ pattern: "^-?\\d+(?:\\.\\d+)?$",
1390
+ });
1391
+ expect(z.toJSONSchema(z.object({ a: z.record(z.literal([1, 2]), z.boolean()).optional() }))).toMatchObject({
1392
+ properties: { a: { propertyNames: { type: "string", enum: ["1", "2"] }, required: ["1", "2"] } },
1393
+ });
1394
+ });
1395
+
1396
+ test("record with a recursive key converts without looping", () => {
1397
+ const numeric: any = z.lazy(() => z.union([z.number(), numeric]));
1398
+ expect(z.toJSONSchema(z.record(numeric, z.boolean())).propertyNames).toMatchObject({
1399
+ anyOf: [{ type: "string", pattern: "^-?\\d+(?:\\.\\d+)?$" }, { $ref: "#/$defs/__schema0" }],
1400
+ });
1401
+ // a key with nothing to re-express keeps the reference it had
1402
+ const stringy: any = z.lazy(() => z.union([z.string(), stringy]));
1403
+ expect(z.toJSONSchema(z.record(stringy, z.boolean())).propertyNames).toEqual({ $ref: "#/$defs/__schema0" });
1404
+ expect(
1405
+ z.toJSONSchema(z.record(z.union([z.literal("a"), z.literal("b")]).meta({ id: "Keys" }), z.boolean()))
1406
+ .propertyNames
1407
+ ).toEqual({ $ref: "#/$defs/Keys" });
1408
+ });
1409
+
1410
+ test("record with a heterogeneous key stringifies only its numeric members", () => {
1411
+ // a mixed key carries no `type`, so the numeric members are caught by value rather than by type
1412
+ expect(z.toJSONSchema(z.record(z.literal(["a", 1]), z.boolean()))).toMatchObject({
1413
+ propertyNames: { enum: ["a", "1"] },
1414
+ required: ["a", "1"],
1415
+ });
1416
+ // a member no key can spell is left as it was, since the parser only ever retries a key as a number
1417
+ expect(z.toJSONSchema(z.record(z.literal(["a", true]) as any, z.boolean())).propertyNames).toEqual({
1418
+ enum: ["a", true],
1419
+ });
1420
+ });
1421
+
1422
+ test("record stringifies required for every target", () => {
1423
+ const schema = z.record(z.literal([1, 2]), z.boolean());
1424
+ for (const target of ["draft-2020-12", "draft-7", "draft-4", "openapi-3.0"] as const) {
1425
+ expect(z.toJSONSchema(schema, { target }).required).toEqual(["1", "2"]);
1426
+ }
1427
+ });
1428
+
1429
+ test("strict record with regex key uses propertyNames", () => {
1430
+ const schema = z.record(z.string().regex(/^label:[a-z]{2}$/), z.string());
1431
+
1432
+ expect(z.toJSONSchema(schema)).toMatchInlineSnapshot(`
1433
+ {
1434
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1435
+ "additionalProperties": {
1436
+ "type": "string",
1437
+ },
1438
+ "propertyNames": {
1439
+ "pattern": "^label:[a-z]{2}$",
1440
+ "type": "string",
1441
+ },
986
1442
  "type": "object",
987
1443
  }
988
1444
  `);
@@ -1086,6 +1542,9 @@ describe("toJSONSchema", () => {
1086
1542
  expect(z.toJSONSchema(schema)).toMatchInlineSnapshot(`
1087
1543
  {
1088
1544
  "$schema": "https://json-schema.org/draft/2020-12/schema",
1545
+ "items": false,
1546
+ "maxItems": 2,
1547
+ "minItems": 2,
1089
1548
  "prefixItems": [
1090
1549
  {
1091
1550
  "type": "string",
@@ -1107,6 +1566,7 @@ describe("toJSONSchema", () => {
1107
1566
  "items": {
1108
1567
  "type": "boolean",
1109
1568
  },
1569
+ "minItems": 2,
1110
1570
  "prefixItems": [
1111
1571
  {
1112
1572
  "type": "string",
@@ -1162,7 +1622,7 @@ describe("toJSONSchema", () => {
1162
1622
  },
1163
1623
  ],
1164
1624
  },
1165
- "minItems": 3,
1625
+ "minItems": 2,
1166
1626
  "type": "array",
1167
1627
  }
1168
1628
  `);
@@ -1203,6 +1663,7 @@ describe("toJSONSchema", () => {
1203
1663
  expect(z.toJSONSchema(schema, { target: "draft-7", io: "input" })).toMatchInlineSnapshot(`
1204
1664
  {
1205
1665
  "$schema": "http://json-schema.org/draft-07/schema#",
1666
+ "additionalItems": false,
1206
1667
  "items": [
1207
1668
  {
1208
1669
  "type": "string",
@@ -1211,6 +1672,8 @@ describe("toJSONSchema", () => {
1211
1672
  "type": "number",
1212
1673
  },
1213
1674
  ],
1675
+ "maxItems": 2,
1676
+ "minItems": 2,
1214
1677
  "type": "array",
1215
1678
  }
1216
1679
  `);
@@ -1232,14 +1695,14 @@ describe("toJSONSchema", () => {
1232
1695
  "type": "number",
1233
1696
  },
1234
1697
  ],
1698
+ "minItems": 2,
1235
1699
  "type": "array",
1236
1700
  }
1237
1701
  `);
1238
1702
  });
1239
1703
 
1240
1704
  test("tuple with rest draft-7 - issue #5151 regression test", () => {
1241
- // This test addresses issue #5151: tuple with rest elements and ids
1242
- // in draft-7 had incorrect internal path handling affecting complex scenarios
1705
+ // This test addresses issue #5151: tuple with rest elements and ids in draft-7 had incorrect internal path handling affecting complex scenarios
1243
1706
  const primarySchema = z.string().meta({ id: "primary" });
1244
1707
  const restSchema = z.number().meta({ id: "rest" });
1245
1708
  const testSchema = z.tuple([primarySchema], restSchema);
@@ -1271,6 +1734,7 @@ describe("toJSONSchema", () => {
1271
1734
  "$ref": "#/definitions/primary",
1272
1735
  },
1273
1736
  ],
1737
+ "minItems": 1,
1274
1738
  "type": "array",
1275
1739
  }
1276
1740
  `);
@@ -1285,6 +1749,88 @@ describe("toJSONSchema", () => {
1285
1749
  expect(result.additionalItems).toBeDefined();
1286
1750
  });
1287
1751
 
1752
+ test("closed tuple length constraints - issue #6193", () => {
1753
+ const schema = z.tuple([z.string(), z.string(), z.object({ lang: z.string() })]);
1754
+
1755
+ expect(schema.safeParse(["a", "b", { lang: "en" }, "extra"]).success).toBe(false);
1756
+
1757
+ const draft2020 = z.toJSONSchema(schema, { target: "draft-2020-12" });
1758
+ expect(draft2020.items).toBe(false);
1759
+ expect(draft2020.minItems).toBe(3);
1760
+ expect(draft2020.maxItems).toBe(3);
1761
+
1762
+ const draft7 = z.toJSONSchema(schema, { target: "draft-7", io: "input" });
1763
+ expect(draft7.additionalItems).toBe(false);
1764
+ expect(draft7.minItems).toBe(3);
1765
+ expect(draft7.maxItems).toBe(3);
1766
+
1767
+ const openapi = z.toJSONSchema(schema, { target: "openapi-3.0" });
1768
+ validateOpenAPI30Schema(openapi);
1769
+ expect(openapi.minItems).toBe(3);
1770
+ expect(openapi.maxItems).toBe(3);
1771
+ });
1772
+
1773
+ test("closed tuple with optional trailing items", () => {
1774
+ const schema = z.tuple([z.string(), z.number().optional()]);
1775
+
1776
+ const draft2020 = z.toJSONSchema(schema, { target: "draft-2020-12" });
1777
+ expect(draft2020.items).toBe(false);
1778
+ expect(draft2020.minItems).toBe(1);
1779
+ expect(draft2020.maxItems).toBe(2);
1780
+
1781
+ const draft7 = z.toJSONSchema(schema, { target: "draft-7", io: "input" });
1782
+ expect(draft7.additionalItems).toBe(false);
1783
+ expect(draft7.minItems).toBe(1);
1784
+ expect(draft7.maxItems).toBe(2);
1785
+ });
1786
+
1787
+ test("empty closed tuple rejects extra elements", () => {
1788
+ const schema = z.tuple([]);
1789
+
1790
+ const draft2020 = z.toJSONSchema(schema, { target: "draft-2020-12" });
1791
+ expect(draft2020.items).toBe(false);
1792
+ expect(draft2020.maxItems).toBe(0);
1793
+
1794
+ const draft7 = z.toJSONSchema(schema, { target: "draft-7", io: "input" });
1795
+ expect(draft7.additionalItems).toBe(false);
1796
+ expect(draft7.maxItems).toBe(0);
1797
+
1798
+ const openapi = z.toJSONSchema(schema, { target: "openapi-3.0" });
1799
+ validateOpenAPI30Schema(openapi);
1800
+ expect(openapi.maxItems).toBe(0);
1801
+ });
1802
+
1803
+ test("closed tuple length respects io direction with defaults", () => {
1804
+ const schema = z.tuple([z.string(), z.string().default("x")]);
1805
+
1806
+ const input = z.toJSONSchema(schema, { target: "draft-2020-12", io: "input" });
1807
+ expect(input.items).toBe(false);
1808
+ expect(input.minItems).toBe(1);
1809
+ expect(input.maxItems).toBe(2);
1810
+
1811
+ const output = z.toJSONSchema(schema, { target: "draft-2020-12", io: "output" });
1812
+ expect(output.items).toBe(false);
1813
+ expect(output.minItems).toBe(2);
1814
+ expect(output.maxItems).toBe(2);
1815
+ });
1816
+
1817
+ test("closed tuple length resolves input optionality past transform and catch", () => {
1818
+ const minItems = (schema: z.core.$ZodType, io: "input" | "output") =>
1819
+ z.toJSONSchema(schema, { target: "draft-2020-12", io }).minItems;
1820
+
1821
+ // Both let the parser observe an absent slot, but declare a required input.
1822
+ const pre = z.tuple([z.string(), z.preprocess((v) => v, z.string())]);
1823
+ expect(minItems(pre, "input")).toBe(2);
1824
+ expect(minItems(pre, "output")).toBe(2);
1825
+
1826
+ const caught = z.tuple([z.string(), z.string().catch("x")]);
1827
+ expect(minItems(caught, "input")).toBe(2);
1828
+ expect(minItems(caught, "output")).toBe(2);
1829
+
1830
+ // Resolution passes through the wrapper rather than stopping at it.
1831
+ expect(minItems(z.tuple([z.string(), z.string().optional().catch("x")]), "input")).toBe(1);
1832
+ });
1833
+
1288
1834
  test("promise", () => {
1289
1835
  const schema = z.promise(z.string());
1290
1836
  expect(z.toJSONSchema(schema)).toMatchInlineSnapshot(`
@@ -1904,13 +2450,9 @@ test("override execution order", () => {
1904
2450
 
1905
2451
  expect(unionSchema).toMatchInlineSnapshot(`
1906
2452
  {
1907
- "anyOf": [
1908
- {
1909
- "type": "string",
1910
- },
1911
- {
1912
- "type": "number",
1913
- },
2453
+ "type": [
2454
+ "string",
2455
+ "number",
1914
2456
  ],
1915
2457
  }
1916
2458
  `);
@@ -2092,6 +2634,134 @@ test("extract schemas with id", () => {
2092
2634
  `);
2093
2635
  });
2094
2636
 
2637
+ test("escapes JSON Pointer reserved characters in $ref but not in $defs key", () => {
2638
+ const User = z.object({ name: z.string() }).meta({ id: "Shared/User~" });
2639
+ const result = z.toJSONSchema(z.object({ User }));
2640
+ // the $ref pointer escapes `/` -> `~1` and `~` -> `~0` (RFC 6901),
2641
+ // while the $defs key keeps the original id
2642
+ expect((result.properties!.User as any).$ref).toBe("#/$defs/Shared~1User~0");
2643
+ expect(Object.keys(result.$defs!)).toEqual(["Shared/User~"]);
2644
+ });
2645
+
2646
+ test("escapes JSON Pointer reserved characters in the root $ref", () => {
2647
+ const User = z.object({ name: z.string() }).meta({ id: "Shared/User~" });
2648
+ const result = z.toJSONSchema(User);
2649
+ expect(result.$ref).toBe("#/$defs/Shared~1User~0");
2650
+ expect(Object.keys(result.$defs!)).toEqual(["Shared/User~"]);
2651
+ });
2652
+
2653
+ test("a multipleOf divisor JSON Schema cannot express goes through `unrepresentable`", () => {
2654
+ // the keyword must be strictly greater than zero, and NaN/Infinity do not survive JSON at all
2655
+ for (const divisor of [0, Number.NaN, Number.POSITIVE_INFINITY, Number.NEGATIVE_INFINITY]) {
2656
+ expect(() => z.toJSONSchema(z.number().multipleOf(divisor))).toThrow(/cannot be represented in JSON Schema/);
2657
+ expect(z.toJSONSchema(z.number().multipleOf(divisor), { unrepresentable: "any" })).toMatchObject({
2658
+ type: "number",
2659
+ });
2660
+ expect(z.toJSONSchema(z.number().multipleOf(divisor), { unrepresentable: "any" })).not.toHaveProperty("multipleOf");
2661
+ }
2662
+
2663
+ // a negative divisor accepts exactly what its absolute value accepts, so it still maps
2664
+ expect(z.number().multipleOf(-5).safeParse(10).success).toEqual(true);
2665
+ expect(z.number().multipleOf(-5).safeParse(13).success).toEqual(false);
2666
+ expect(z.toJSONSchema(z.number().multipleOf(-5))).toMatchObject({ multipleOf: 5 });
2667
+ expect(z.toJSONSchema(z.number().multipleOf(0.1))).toMatchObject({ multipleOf: 0.1 });
2668
+ });
2669
+
2670
+ test("unrepresentable default values go through `unrepresentable`", () => {
2671
+ // a bigint default has no reliable JSON encoding, so it is dropped rather than approximated
2672
+ expect(z.toJSONSchema(z.bigint().default(0n), { unrepresentable: "any" })).toMatchInlineSnapshot(`
2673
+ {
2674
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2675
+ }
2676
+ `);
2677
+ expect(z.toJSONSchema(z.bigint().prefault(2n), { io: "input", unrepresentable: "any" })).toMatchInlineSnapshot(`
2678
+ {
2679
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2680
+ }
2681
+ `);
2682
+ // including when nested inside an otherwise representable default
2683
+ expect(
2684
+ z.toJSONSchema(z.object({ a: z.bigint() }).default({ a: 1n }), { unrepresentable: "any" })
2685
+ ).toMatchInlineSnapshot(`
2686
+ {
2687
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2688
+ "additionalProperties": false,
2689
+ "properties": {
2690
+ "a": {},
2691
+ },
2692
+ "required": [
2693
+ "a",
2694
+ ],
2695
+ "type": "object",
2696
+ }
2697
+ `);
2698
+
2699
+ // under the default strict mode the inner type throws first; a representable inner type surfaces the default's own error rather than a raw `JSON.stringify` TypeError
2700
+ expect(() => z.toJSONSchema(z.bigint().default(0n))).toThrow("BigInt cannot be represented in JSON Schema");
2701
+ expect(() => z.toJSONSchema(z.unknown().default(1n))).toThrow("BigInt defaults cannot be represented in JSON Schema");
2702
+
2703
+ // representable defaults are untouched
2704
+ expect(z.toJSONSchema(z.object({ a: z.number() }).default({ a: 2 }))).toMatchInlineSnapshot(`
2705
+ {
2706
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2707
+ "additionalProperties": false,
2708
+ "default": {
2709
+ "a": 2,
2710
+ },
2711
+ "properties": {
2712
+ "a": {
2713
+ "type": "number",
2714
+ },
2715
+ },
2716
+ "required": [
2717
+ "a",
2718
+ ],
2719
+ "type": "object",
2720
+ }
2721
+ `);
2722
+ });
2723
+
2724
+ test("an `unrepresentable` handler can represent a bigint default", () => {
2725
+ // one handler covers both the type and its default, so no `unrepresentable: "any"` is needed and every other unrepresentable type still throws
2726
+ expect(
2727
+ z.toJSONSchema(z.object({ startAt: z.coerce.bigint().optional().default(0n) }), {
2728
+ io: "input",
2729
+ unrepresentable: ({ zodSchema }) => {
2730
+ const def = zodSchema._zod.def;
2731
+ if (def.type === "bigint") return { type: "integer", format: "int64" };
2732
+ if (def.type === "default") return { default: String(def.defaultValue) };
2733
+ return "throw";
2734
+ },
2735
+ })
2736
+ ).toMatchInlineSnapshot(`
2737
+ {
2738
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2739
+ "properties": {
2740
+ "startAt": {
2741
+ "default": "0",
2742
+ "format": "int64",
2743
+ "type": "integer",
2744
+ },
2745
+ },
2746
+ "type": "object",
2747
+ }
2748
+ `);
2749
+
2750
+ // a handler may also drop just the default while still representing the type
2751
+ expect(
2752
+ z.toJSONSchema(z.bigint().default(0n), {
2753
+ unrepresentable: ({ zodSchema }) =>
2754
+ zodSchema._zod.def.type === "bigint" ? { type: "integer", format: "int64" } : "any",
2755
+ })
2756
+ ).toMatchInlineSnapshot(`
2757
+ {
2758
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2759
+ "format": "int64",
2760
+ "type": "integer",
2761
+ }
2762
+ `);
2763
+ });
2764
+
2095
2765
  test("unrepresentable literal values are ignored", () => {
2096
2766
  const a = z.toJSONSchema(z.literal(["hello", null, 5, BigInt(1324), undefined]), { unrepresentable: "any" });
2097
2767
  expect(a).toMatchInlineSnapshot(`
@@ -2168,8 +2838,7 @@ test("describe with id", () => {
2168
2838
  });
2169
2839
 
2170
2840
  test("id is stripped from $defs entries (draft-2020-12)", () => {
2171
- // The `id` in `.meta()` is a registration tag — it determines the $defs key
2172
- // but should not leak into the definition body, where it is redundant.
2841
+ // The `id` in `.meta()` is a registration tag — it determines the $defs key but should not leak into the definition body, where it is redundant.
2173
2842
  const inner = z.string().meta({ id: "Inner" });
2174
2843
  const result = z.toJSONSchema(z.object({ a: inner, b: inner }));
2175
2844
  expect(result.$defs?.Inner).toEqual({ type: "string" });
@@ -2177,9 +2846,7 @@ test("id is stripped from $defs entries (draft-2020-12)", () => {
2177
2846
  });
2178
2847
 
2179
2848
  test("id is stripped from definitions entries (draft-04)", () => {
2180
- // In draft-04, `id` is a reserved keyword that sets a base URI for the
2181
- // subschema. Leaking Zod's registration tag here is semantically wrong, so
2182
- // ensure it is stripped.
2849
+ // In draft-04, `id` is a reserved keyword that sets a base URI for the subschema. Leaking Zod's registration tag here is semantically wrong, so ensure it is stripped.
2183
2850
  const inner = z.string().meta({ id: "Inner" });
2184
2851
  const result = z.toJSONSchema(z.object({ a: inner, b: inner }), { target: "draft-04" }) as any;
2185
2852
  expect(result.definitions?.Inner).toEqual({ type: "string" });
@@ -2193,9 +2860,52 @@ test("id is stripped from root schema", () => {
2193
2860
  expect((result as any).id).toBeUndefined();
2194
2861
  });
2195
2862
 
2863
+ test("root schema with id is hoisted into $defs", () => {
2864
+ const A = z.object({ name: z.string() }).meta({ id: "A" });
2865
+ const result = z.toJSONSchema(A);
2866
+
2867
+ expect(result).toEqual({
2868
+ $schema: "https://json-schema.org/draft/2020-12/schema",
2869
+ $ref: "#/$defs/A",
2870
+ $defs: {
2871
+ A: {
2872
+ type: "object",
2873
+ properties: {
2874
+ name: {
2875
+ type: "string",
2876
+ },
2877
+ },
2878
+ required: ["name"],
2879
+ additionalProperties: false,
2880
+ },
2881
+ },
2882
+ });
2883
+ });
2884
+
2885
+ test("root schema with id uses definitions on legacy targets", () => {
2886
+ const A = z.object({ name: z.string() }).meta({ id: "A" });
2887
+ const result = z.toJSONSchema(A, { target: "draft-07" });
2888
+
2889
+ expect(result).toEqual({
2890
+ $schema: "http://json-schema.org/draft-07/schema#",
2891
+ $ref: "#/definitions/A",
2892
+ definitions: {
2893
+ A: {
2894
+ type: "object",
2895
+ properties: {
2896
+ name: {
2897
+ type: "string",
2898
+ },
2899
+ },
2900
+ required: ["name"],
2901
+ additionalProperties: false,
2902
+ },
2903
+ },
2904
+ });
2905
+ });
2906
+
2196
2907
  test("id is observable in override callback", () => {
2197
- // The strip happens after override callbacks run, so userland override code
2198
- // can still read `jsonSchema.id` if it wants to.
2908
+ // The strip happens after override callbacks run, so userland override code can still read `jsonSchema.id` if it wants to.
2199
2909
  const inner = z.string().meta({ id: "Inner" });
2200
2910
  const seenIds: Array<string | undefined> = [];
2201
2911
  z.toJSONSchema(z.object({ a: inner }), {
@@ -2207,8 +2917,7 @@ test("id is observable in override callback", () => {
2207
2917
  });
2208
2918
 
2209
2919
  test("describe with id on wrapper", () => {
2210
- // Test that $ref propagation works when processor sets a different ref (readonly -> innerType)
2211
- // but parent was extracted due to having an id
2920
+ // Test that $ref propagation works when processor sets a different ref (readonly -> innerType) but parent was extracted due to having an id
2212
2921
  const roJobId = z.string().readonly().meta({ id: "roJobId" });
2213
2922
 
2214
2923
  const a = z.toJSONSchema(
@@ -2416,45 +3125,40 @@ test("top-level readonly", () => {
2416
3125
  // .meta({ id: "B" });
2417
3126
 
2418
3127
  const result = z.toJSONSchema(A);
2419
- expect(result).toMatchInlineSnapshot(`
2420
- {
2421
- "$defs": {
2422
- "B": {
2423
- "additionalProperties": false,
2424
- "properties": {
2425
- "a": {
2426
- "$ref": "#",
2427
- },
2428
- "name": {
2429
- "type": "string",
2430
- },
3128
+ expect(result).toEqual({
3129
+ $schema: "https://json-schema.org/draft/2020-12/schema",
3130
+ $ref: "#/$defs/A",
3131
+ $defs: {
3132
+ A: {
3133
+ additionalProperties: false,
3134
+ properties: {
3135
+ b: {
3136
+ $ref: "#/$defs/B",
3137
+ },
3138
+ name: {
3139
+ type: "string",
2431
3140
  },
2432
- "readOnly": true,
2433
- "required": [
2434
- "name",
2435
- "a",
2436
- ],
2437
- "type": "object",
2438
3141
  },
3142
+ readOnly: true,
3143
+ required: ["name", "b"],
3144
+ type: "object",
2439
3145
  },
2440
- "$schema": "https://json-schema.org/draft/2020-12/schema",
2441
- "additionalProperties": false,
2442
- "properties": {
2443
- "b": {
2444
- "$ref": "#/$defs/B",
2445
- },
2446
- "name": {
2447
- "type": "string",
3146
+ B: {
3147
+ additionalProperties: false,
3148
+ properties: {
3149
+ a: {
3150
+ $ref: "#/$defs/A",
3151
+ },
3152
+ name: {
3153
+ type: "string",
3154
+ },
2448
3155
  },
3156
+ readOnly: true,
3157
+ required: ["name", "a"],
3158
+ type: "object",
2449
3159
  },
2450
- "readOnly": true,
2451
- "required": [
2452
- "name",
2453
- "b",
2454
- ],
2455
- "type": "object",
2456
- }
2457
- `);
3160
+ },
3161
+ });
2458
3162
  });
2459
3163
 
2460
3164
  test("basic registry", () => {
@@ -2531,52 +3235,256 @@ test("basic registry", () => {
2531
3235
  `);
2532
3236
  });
2533
3237
 
2534
- test("_ref", () => {
2535
- // const a = z.promise(z.string().describe("a"));
2536
- const a = z.toJSONSchema(z.promise(z.string().describe("a")));
2537
- expect(a).toMatchInlineSnapshot(`
2538
- {
2539
- "$schema": "https://json-schema.org/draft/2020-12/schema",
2540
- "description": "a",
2541
- "type": "string",
3238
+ function countMapScanWork<T>(convert: () => T): { result: T; work: number } {
3239
+ const entries = Map.prototype.entries;
3240
+ const values = Map.prototype.values;
3241
+ let work = 0;
3242
+ const entriesSpy = vi.spyOn(Map.prototype, "entries").mockImplementation(function (this: Map<unknown, unknown>) {
3243
+ work += this.size;
3244
+ return entries.call(this);
3245
+ } as typeof Map.prototype.entries);
3246
+ const valuesSpy = vi.spyOn(Map.prototype, "values").mockImplementation(function (this: Map<unknown, unknown>) {
3247
+ work += this.size;
3248
+ return values.call(this);
3249
+ } as typeof Map.prototype.values);
3250
+ try {
3251
+ return { result: convert(), work };
3252
+ } finally {
3253
+ entriesSpy.mockRestore();
3254
+ valuesSpy.mockRestore();
3255
+ }
3256
+ }
3257
+
3258
+ test("large registry conversion performs linear map-scan work", () => {
3259
+ const count = 64;
3260
+ const convert = (size: number, withIntersection: boolean) => {
3261
+ const registry = z.registry<{ id: string }>();
3262
+ for (let i = 0; i < size; i++) {
3263
+ registry.add(
3264
+ z.object({ id: z.string(), name: z.string(), count: z.number(), nested: z.object({ a: z.boolean() }) }),
3265
+ { id: `Type${i}` }
3266
+ );
2542
3267
  }
2543
- `);
3268
+ if (withIntersection) registry.add(z.object({ a: z.string() }).and(z.object({ b: z.string() })), { id: "Inter" });
3269
+
3270
+ return countMapScanWork(() => z.toJSONSchema(registry, { uri: (id) => `https://example.com/${id}.json` }));
3271
+ };
3272
+
3273
+ const plain = convert(count, false);
3274
+ const plainDouble = convert(count * 2, false);
3275
+ expect(Object.keys(plain.result.schemas)).toHaveLength(count);
3276
+ expect(plain.result.schemas.Type0).toMatchObject({
3277
+ $id: "https://example.com/Type0.json",
3278
+ type: "object",
3279
+ properties: { nested: { type: "object" } },
3280
+ });
3281
+ expect(plain.result.schemas[`Type${count - 1}`]!.$id).toBe(`https://example.com/Type${count - 1}.json`);
3282
+ expect(plain.work).toBeGreaterThan(0);
3283
+ expect(plainDouble.work).toBeLessThanOrEqual(plain.work * 2);
3284
+
3285
+ const folded = convert(count, true);
3286
+ const foldedDouble = convert(count * 2, true);
3287
+ expect(folded.result.schemas.Inter).toMatchObject({ type: "object", properties: { a: {}, b: {} } });
3288
+ expect(folded.work).toBeGreaterThan(0);
3289
+ expect(foldedDouble.work).toBeLessThanOrEqual(folded.work * 2);
3290
+ });
2544
3291
 
2545
- const b = z.toJSONSchema(z.lazy(() => z.string().describe("a")));
2546
- expect(b).toMatchInlineSnapshot(`
2547
- {
2548
- "$schema": "https://json-schema.org/draft/2020-12/schema",
2549
- "description": "a",
2550
- "type": "string",
3292
+ test("a registry of records with numeric keys performs linear map-scan work", () => {
3293
+ const count = 64;
3294
+ const convert = (size: number, key: (i: number) => z.core.$ZodType) => {
3295
+ const registry = z.registry<{ id: string }>();
3296
+ for (let i = 0; i < size; i++) {
3297
+ registry.add(z.object({ m: z.record(key(i) as z.core.$ZodRecordKey, z.boolean()) }), { id: `Type${i}` });
2551
3298
  }
2552
- `);
3299
+ return countMapScanWork(() => z.toJSONSchema(registry, { uri: (id) => `https://example.com/${id}.json` }));
3300
+ };
2553
3301
 
2554
- const c = z.toJSONSchema(z.optional(z.string().describe("a")));
2555
- expect(c).toMatchInlineSnapshot(`
2556
- {
2557
- "$schema": "https://json-schema.org/draft/2020-12/schema",
2558
- "description": "a",
2559
- "type": "string",
2560
- }
2561
- `);
3302
+ const numeric = convert(count, () => z.number());
3303
+ const numericDouble = convert(count * 2, () => z.number());
3304
+ expect(numeric.result.schemas.Type0).toMatchObject({
3305
+ properties: { m: { propertyNames: { type: "string", pattern: "^-?\\d+(?:\\.\\d+)?$" } } },
3306
+ });
3307
+ expect(numeric.work).toBeGreaterThan(0);
3308
+ expect(numericDouble.work).toBeLessThanOrEqual(numeric.work * 2);
2562
3309
 
2563
- const d = z.toJSONSchema(z.string().meta({ id: "foo" }).describe("bar").optional());
2564
- expect(d).toMatchInlineSnapshot(`
3310
+ const extracted = convert(count, (i) => z.number().meta({ id: `Key${i}` }));
3311
+ const extractedDouble = convert(count * 2, (i) => z.number().meta({ id: `Key${i}` }));
3312
+ expect(extracted.result.schemas.Type0).toMatchObject({
3313
+ properties: { m: { propertyNames: { type: "string", pattern: "^-?\\d+(?:\\.\\d+)?$" } } },
3314
+ });
3315
+ expect(extracted.work).toBeGreaterThan(0);
3316
+ expect(extractedDouble.work).toBeLessThanOrEqual(extracted.work * 2);
3317
+ });
3318
+
3319
+ test("registry extracts unregistered subschemas into __shared", () => {
3320
+ const registry = z.registry<{ id: string }>();
3321
+ const address = z.object({ street: z.string() }).meta({ id: "Address" });
3322
+ registry.add(z.object({ home: address, work: address }), { id: "Person" });
3323
+ registry.add(z.object({ hq: address }), { id: "Company" });
3324
+
3325
+ const { schemas } = z.toJSONSchema(registry, { uri: (id) => `https://example.com/${id}.json` });
3326
+
3327
+ expect(schemas.__shared).toMatchInlineSnapshot(`
2565
3328
  {
2566
3329
  "$defs": {
2567
- "foo": {
2568
- "type": "string",
3330
+ "Address": {
3331
+ "additionalProperties": false,
3332
+ "properties": {
3333
+ "street": {
3334
+ "type": "string",
3335
+ },
3336
+ },
3337
+ "required": [
3338
+ "street",
3339
+ ],
3340
+ "type": "object",
2569
3341
  },
2570
3342
  },
2571
- "$ref": "#/$defs/foo",
3343
+ }
3344
+ `);
3345
+ expect(schemas.Person).toMatchInlineSnapshot(`
3346
+ {
3347
+ "$id": "https://example.com/Person.json",
2572
3348
  "$schema": "https://json-schema.org/draft/2020-12/schema",
2573
- "description": "bar",
3349
+ "additionalProperties": false,
3350
+ "properties": {
3351
+ "home": {
3352
+ "$ref": "https://example.com/__shared.json#/$defs/Address",
3353
+ },
3354
+ "work": {
3355
+ "$ref": "https://example.com/__shared.json#/$defs/Address",
3356
+ },
3357
+ },
3358
+ "required": [
3359
+ "home",
3360
+ "work",
3361
+ ],
3362
+ "type": "object",
2574
3363
  }
2575
3364
  `);
3365
+ // Company is emitted after Person, so it only resolves if the shared $defs built on the first finalize are still reachable — the pass that writes them no longer runs per schema.
3366
+ expect(schemas.Company!.properties!.hq).toEqual({
3367
+ $ref: "https://example.com/__shared.json#/$defs/Address",
3368
+ });
2576
3369
  });
2577
3370
 
2578
- test("defaults/prefaults", () => {
2579
- const a = z
3371
+ test("registry extracts reused subschemas into __shared without an id", () => {
3372
+ const registry = z.registry<{ id: string }>();
3373
+ const shared = z.object({ q: z.string() });
3374
+ registry.add(z.object({ a: shared, b: shared }), { id: "First" });
3375
+ registry.add(z.object({ c: shared }), { id: "Second" });
3376
+
3377
+ const { schemas } = z.toJSONSchema(registry, { uri: (id) => `${id}.json`, reused: "ref" });
3378
+
3379
+ // The id is counter-generated, so this pins that ctx.counter is consumed exactly once.
3380
+ expect(Object.keys(schemas.__shared!.$defs!)).toEqual(["schema0"]);
3381
+ expect(schemas.First!.properties!.a).toEqual({ $ref: "__shared.json#/$defs/schema0" });
3382
+ expect(schemas.Second!.properties!.c).toEqual({ $ref: "__shared.json#/$defs/schema0" });
3383
+ });
3384
+
3385
+ test("JSONSchemaGenerator re-runs shared passes when emit params change", () => {
3386
+ const shared = z.object({ s: z.string() });
3387
+ const a = z.object({ x: shared, y: shared });
3388
+ const registry = z.registry<{ id: string }>();
3389
+ registry.add(a, { id: "A" });
3390
+
3391
+ const gen = new z.core.JSONSchemaGenerator({ target: "draft-2020-12" });
3392
+ gen.process(a);
3393
+ const defs: Record<string, any> = {};
3394
+ const external = { registry, uri: (id: string) => `${id}.json`, defs };
3395
+
3396
+ gen.emit(a, { external, reused: "inline" });
3397
+ // Same `external`, different `reused` — the second emit must still extract `shared`.
3398
+ const second: any = gen.emit(a, { external, reused: "ref" });
3399
+
3400
+ expect(Object.keys(defs)).toEqual(["schema0"]);
3401
+ expect(second.properties.x).toEqual({ $ref: "__shared.json#/$defs/schema0" });
3402
+ expect(second.properties.y).toEqual({ $ref: "__shared.json#/$defs/schema0" });
3403
+ });
3404
+
3405
+ test("JSONSchemaGenerator still throws on cycles when a later emit asks for it", () => {
3406
+ const Node: any = z.object({
3407
+ v: z.string(),
3408
+ get next() {
3409
+ return Node;
3410
+ },
3411
+ });
3412
+ const registry = z.registry<{ id: string }>();
3413
+ registry.add(Node, { id: "Node" });
3414
+
3415
+ const gen = new z.core.JSONSchemaGenerator({ target: "draft-2020-12" });
3416
+ gen.process(Node);
3417
+ const external = { registry, uri: (id: string) => `${id}.json`, defs: {} };
3418
+
3419
+ gen.emit(Node, { external, cycles: "ref" });
3420
+ expect(() => gen.emit(Node, { external, cycles: "throw" })).toThrow(/Cycle detected/);
3421
+ });
3422
+
3423
+ test("JSONSchemaGenerator re-runs shared passes on a no-params emit", () => {
3424
+ const shared = z.object({ s: z.string() });
3425
+ const a = z.object({ x: shared });
3426
+ const registry = z.registry<{ id: string }>();
3427
+ registry.add(a, { id: "A" });
3428
+
3429
+ const gen = new z.core.JSONSchemaGenerator({ target: "draft-2020-12" });
3430
+ gen.process(a);
3431
+ const defs: Record<string, any> = {};
3432
+ gen.emit(a, { external: { registry, uri: (id: string) => `${id}.json`, defs }, reused: "ref" });
3433
+
3434
+ // Re-processing an already-seen schema bumps `seen.count`, which `extractDefs` branches on under `reused: "ref"` — and it returns early, so it cannot clear the guards itself.
3435
+ gen.process(shared);
3436
+ const second: any = gen.emit(a);
3437
+
3438
+ expect(Object.keys(defs)).toEqual(["schema0"]);
3439
+ expect(second.properties.x).toEqual({ $ref: "__shared.json#/$defs/schema0" });
3440
+ });
3441
+
3442
+ test("_ref", () => {
3443
+ // const a = z.promise(z.string().describe("a"));
3444
+ const a = z.toJSONSchema(z.promise(z.string().describe("a")));
3445
+ expect(a).toMatchInlineSnapshot(`
3446
+ {
3447
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3448
+ "description": "a",
3449
+ "type": "string",
3450
+ }
3451
+ `);
3452
+
3453
+ const b = z.toJSONSchema(z.lazy(() => z.string().describe("a")));
3454
+ expect(b).toMatchInlineSnapshot(`
3455
+ {
3456
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3457
+ "description": "a",
3458
+ "type": "string",
3459
+ }
3460
+ `);
3461
+
3462
+ const c = z.toJSONSchema(z.optional(z.string().describe("a")));
3463
+ expect(c).toMatchInlineSnapshot(`
3464
+ {
3465
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3466
+ "description": "a",
3467
+ "type": "string",
3468
+ }
3469
+ `);
3470
+
3471
+ const d = z.toJSONSchema(z.string().meta({ id: "foo" }).describe("bar").optional());
3472
+ expect(d).toMatchInlineSnapshot(`
3473
+ {
3474
+ "$defs": {
3475
+ "foo": {
3476
+ "type": "string",
3477
+ },
3478
+ },
3479
+ "$ref": "#/$defs/foo",
3480
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3481
+ "description": "bar",
3482
+ }
3483
+ `);
3484
+ });
3485
+
3486
+ test("defaults/prefaults", () => {
3487
+ const a = z
2580
3488
  .string()
2581
3489
  .transform((val) => val.length)
2582
3490
  .pipe(z.number());
@@ -2627,6 +3535,45 @@ test("defaults/prefaults", () => {
2627
3535
  `);
2628
3536
  });
2629
3537
 
3538
+ test("catch on a transforming schema", () => {
3539
+ const a = z
3540
+ .string()
3541
+ .transform((val) => val.length)
3542
+ .pipe(z.number())
3543
+ .catch(0);
3544
+
3545
+ expect(z.toJSONSchema(a)).toMatchInlineSnapshot(`
3546
+ {
3547
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3548
+ "default": 0,
3549
+ "type": "number",
3550
+ }
3551
+ `);
3552
+ // catch values are output-typed, so they are not valid input
3553
+ expect(z.toJSONSchema(a, { io: "input" })).toMatchInlineSnapshot(`
3554
+ {
3555
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3556
+ "type": "string",
3557
+ }
3558
+ `);
3559
+
3560
+ // the catch no longer hides the inner transform from ancestors, so their output-typed metadata is stripped too — matching a bare nested transform
3561
+ expect(z.toJSONSchema(z.object({ a }).meta({ examples: [{ a: 1 }] }), { io: "input" })).toMatchInlineSnapshot(`
3562
+ {
3563
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3564
+ "properties": {
3565
+ "a": {
3566
+ "type": "string",
3567
+ },
3568
+ },
3569
+ "required": [
3570
+ "a",
3571
+ ],
3572
+ "type": "object",
3573
+ }
3574
+ `);
3575
+ });
3576
+
2630
3577
  test("falsy prefaults (false, 0, empty string)", () => {
2631
3578
  // boolean prefault false
2632
3579
  const a = z.boolean().prefault(false);
@@ -2686,13 +3633,9 @@ test("input type", () => {
2686
3633
  "type": "string",
2687
3634
  },
2688
3635
  "d": {
2689
- "anyOf": [
2690
- {
2691
- "type": "string",
2692
- },
2693
- {
2694
- "type": "null",
2695
- },
3636
+ "type": [
3637
+ "string",
3638
+ "null",
2696
3639
  ],
2697
3640
  },
2698
3641
  "e": {
@@ -2718,19 +3661,13 @@ test("input type", () => {
2718
3661
  ],
2719
3662
  },
2720
3663
  "i": {
2721
- "anyOf": [
2722
- {
2723
- "type": "string",
2724
- },
2725
- {
2726
- "type": "string",
2727
- },
2728
- ],
3664
+ "type": "string",
2729
3665
  },
2730
3666
  },
2731
3667
  "required": [
2732
3668
  "a",
2733
3669
  "d",
3670
+ "f",
2734
3671
  "g",
2735
3672
  ],
2736
3673
  "type": "object",
@@ -2752,13 +3689,9 @@ test("input type", () => {
2752
3689
  "type": "string",
2753
3690
  },
2754
3691
  "d": {
2755
- "anyOf": [
2756
- {
2757
- "type": "string",
2758
- },
2759
- {
2760
- "type": "null",
2761
- },
3692
+ "type": [
3693
+ "string",
3694
+ "null",
2762
3695
  ],
2763
3696
  },
2764
3697
  "e": {
@@ -2783,14 +3716,7 @@ test("input type", () => {
2783
3716
  ],
2784
3717
  },
2785
3718
  "i": {
2786
- "anyOf": [
2787
- {
2788
- "type": "string",
2789
- },
2790
- {
2791
- "type": "string",
2792
- },
2793
- ],
3719
+ "type": "string",
2794
3720
  },
2795
3721
  },
2796
3722
  "required": [
@@ -2895,6 +3821,77 @@ test("use output type for preprocess", () => {
2895
3821
  `);
2896
3822
  });
2897
3823
 
3824
+ test("object property with preprocess stays required in input JSON schema", () => {
3825
+ const schema = z.object({
3826
+ noPreprocess: z.string(),
3827
+ withPreprocess: z.preprocess((v) => v, z.string()),
3828
+ optionalPreprocess: z.preprocess((v) => v, z.string().optional()),
3829
+ });
3830
+
3831
+ // A preprocessed property is only optional when its inner schema is — the
3832
+ // transform wrapper must not make a required property optional in the input
3833
+ // JSON schema (matches runtime: `schema.parse({})` rejects `withPreprocess`).
3834
+ expect(z.toJSONSchema(schema, { io: "input" })).toMatchInlineSnapshot(`
3835
+ {
3836
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3837
+ "properties": {
3838
+ "noPreprocess": {
3839
+ "type": "string",
3840
+ },
3841
+ "optionalPreprocess": {
3842
+ "type": "string",
3843
+ },
3844
+ "withPreprocess": {
3845
+ "type": "string",
3846
+ },
3847
+ },
3848
+ "required": [
3849
+ "noPreprocess",
3850
+ "withPreprocess",
3851
+ ],
3852
+ "type": "object",
3853
+ }
3854
+ `);
3855
+ });
3856
+
3857
+ test("input JSON schema resolves requiredness past transform and catch wrappers", () => {
3858
+ const required = (schema: z.ZodObject) =>
3859
+ (z.toJSONSchema(schema, { io: "input" }) as z.core.JSONSchema.ObjectSchema).required;
3860
+ const id = (v: unknown) => v;
3861
+
3862
+ // catch observes an absent key at runtime, but its declared input type stays required (#5003)
3863
+ expect(required(z.object({ a: z.string().catch("x") }))).toEqual(["a"]);
3864
+ expect(required(z.object({ a: z.string().optional().catch("x") }))).toBeUndefined();
3865
+ // nested preprocess and the legacy transform-pipe form both resolve through to the inner schema
3866
+ expect(required(z.object({ a: z.preprocess(id, z.preprocess(id, z.string())) }))).toEqual(["a"]);
3867
+ expect(required(z.object({ a: z.transform((v: unknown) => String(v)).pipe(z.string()) }))).toEqual(["a"]);
3868
+ });
3869
+
3870
+ test("object required keys preserve shape order and direction", () => {
3871
+ const symbol = Symbol("symbol");
3872
+ const shape: z.ZodRawShape = {
3873
+ 10: z.string(),
3874
+ 2: z.string().optional(),
3875
+ plain: z.string(),
3876
+ optional: z.string().optional(),
3877
+ defaulted: z.string().default("x"),
3878
+ caught: z.string().catch("x"),
3879
+ [symbol]: z.string(),
3880
+ };
3881
+ Object.defineProperty(shape, "__proto__", { value: z.string(), enumerable: true });
3882
+ Object.defineProperty(shape, "hidden", { value: z.string(), enumerable: false });
3883
+
3884
+ const input = z.toJSONSchema(z.object(shape), { io: "input", unrepresentable: "any" });
3885
+ const output = z.toJSONSchema(z.object(shape), { io: "output", unrepresentable: "any" });
3886
+
3887
+ expect(Object.keys(input.properties!)).toEqual(["2", "10", "plain", "optional", "defaulted", "caught", "__proto__"]);
3888
+ expect(input.required).toEqual(["10", "plain", "caught", "__proto__"]);
3889
+ expect(output.required).toEqual(["10", "plain", "defaulted", "caught", "__proto__"]);
3890
+ expect(Object.prototype.hasOwnProperty.call(input.properties!, "__proto__")).toBe(true);
3891
+ expect(input.properties).not.toHaveProperty("hidden");
3892
+ expect(Object.getOwnPropertySymbols(input.properties!)).toEqual([]);
3893
+ });
3894
+
2898
3895
  test("strip output-side examples from input JSON schema for codec", () => {
2899
3896
  const codec = z
2900
3897
  .codec(z.string(), z.number(), { decode: (s) => Number(s), encode: (n) => String(n) })
@@ -2968,45 +3965,25 @@ test("flatten simple intersections", () => {
2968
3965
  expect(result).toMatchInlineSnapshot(`
2969
3966
  {
2970
3967
  "$schema": "http://json-schema.org/draft-07/schema#",
2971
- "allOf": [
2972
- {
2973
- "additionalProperties": false,
2974
- "properties": {
2975
- "testNum": {
2976
- "type": "number",
2977
- },
2978
- },
2979
- "required": [
2980
- "testNum",
2981
- ],
2982
- "type": "object",
3968
+ "additionalProperties": false,
3969
+ "description": "123",
3970
+ "properties": {
3971
+ "testBool": {
3972
+ "type": "boolean",
2983
3973
  },
2984
- {
2985
- "additionalProperties": false,
2986
- "properties": {
2987
- "testStr": {
2988
- "type": "string",
2989
- },
2990
- },
2991
- "required": [
2992
- "testStr",
2993
- ],
2994
- "type": "object",
3974
+ "testNum": {
3975
+ "type": "number",
2995
3976
  },
2996
- {
2997
- "additionalProperties": false,
2998
- "properties": {
2999
- "testBool": {
3000
- "type": "boolean",
3001
- },
3002
- },
3003
- "required": [
3004
- "testBool",
3005
- ],
3006
- "type": "object",
3977
+ "testStr": {
3978
+ "type": "string",
3007
3979
  },
3980
+ },
3981
+ "required": [
3982
+ "testNum",
3983
+ "testStr",
3984
+ "testBool",
3008
3985
  ],
3009
- "description": "123",
3986
+ "type": "object",
3010
3987
  }
3011
3988
  `);
3012
3989
  });
@@ -3123,3 +4100,634 @@ test("recursive lazy with describe does not stack overflow", () => {
3123
4100
  expect(result).toBeDefined();
3124
4101
  expect(result.$defs).toBeDefined();
3125
4102
  });
4103
+
4104
+ test("__proto__ shape key is emitted as an own property", () => {
4105
+ const schema = z.object({ ["__proto__"]: z.literal("admin"), role: z.string() });
4106
+ const result = z.toJSONSchema(schema, { io: "input" });
4107
+
4108
+ expect(result.required).toEqual(["__proto__", "role"]);
4109
+ // every required key needs a matching entry in properties
4110
+ for (const key of result.required!) {
4111
+ expect(Object.prototype.hasOwnProperty.call(result.properties, key)).toBe(true);
4112
+ }
4113
+ expect(JSON.parse(JSON.stringify(result)).properties.__proto__).toEqual({ type: "string", const: "admin" });
4114
+ });
4115
+
4116
+ test("__proto__ registry id is emitted as an own entry", () => {
4117
+ const myRegistry = z.registry<{ id: string }>();
4118
+ myRegistry.add(z.object({ a: z.string() }), { id: "__proto__" });
4119
+ myRegistry.add(z.object({ b: z.string() }), { id: "normal" });
4120
+
4121
+ expect(Object.keys(z.toJSONSchema(myRegistry).schemas)).toEqual(["__proto__", "normal"]);
4122
+ });
4123
+
4124
+ test("__proto__ def id emits a resolvable $ref", () => {
4125
+ const myRegistry = z.registry<{ id: string }>();
4126
+ const Inner = z.object({ x: z.string() });
4127
+ myRegistry.add(Inner, { id: "__proto__" });
4128
+
4129
+ const json = JSON.parse(JSON.stringify(z.toJSONSchema(z.object({ a: Inner, b: Inner }), { metadata: myRegistry })));
4130
+ expect(json.properties.a.$ref).toBe("#/$defs/__proto__");
4131
+ expect(json.$defs.__proto__).toBeDefined();
4132
+ });
4133
+
4134
+ test("__proto__ patternProperties key is emitted as an own property", () => {
4135
+ const result = z.toJSONSchema(z.looseRecord(z.string().regex(/__proto__/), z.string()));
4136
+
4137
+ expect(Object.getPrototypeOf(result.patternProperties)).toBe(Object.prototype);
4138
+ expect(Object.prototype.hasOwnProperty.call(result.patternProperties, "__proto__")).toBe(true);
4139
+ expect(result.patternProperties?.__proto__).toEqual({ type: "string" });
4140
+ });
4141
+
4142
+ test("__proto__ metadata survives direct and wrapper metadata merges", () => {
4143
+ for (const schema of [z.string(), z.readonly(z.string())]) {
4144
+ const registry = z.registry<Record<string, unknown>>();
4145
+ registry.add(schema, Object.fromEntries([["__proto__", { marker: true }]]));
4146
+
4147
+ const result: any = z.toJSONSchema(schema, { metadata: registry });
4148
+ expect(Object.getPrototypeOf(result)).toBe(Object.prototype);
4149
+ expect(Object.prototype.hasOwnProperty.call(result, "__proto__")).toBe(true);
4150
+ expect(result.__proto__).toEqual({ marker: true });
4151
+ expect(JSON.parse(JSON.stringify(result)).__proto__).toEqual({ marker: true });
4152
+ }
4153
+ });
4154
+
4155
+ test("partialRecord does not require finite keys", () => {
4156
+ const result = z.toJSONSchema(z.partialRecord(z.enum(["__proto__", "b"]), z.string()));
4157
+
4158
+ expect(result.required).toBeUndefined();
4159
+ expect(result.propertyNames).toEqual({ type: "string", enum: ["__proto__", "b"] });
4160
+ expect(result.additionalProperties).toEqual({ type: "string" });
4161
+ });
4162
+
4163
+ describe("unrepresentable callback", () => {
4164
+ test("is consulted for every unrepresentable type", () => {
4165
+ const seen: string[] = [];
4166
+ const collect: z.core.UnrepresentableHandler<z.core.$ZodTypes> = ({ zodSchema }) => {
4167
+ seen.push(zodSchema._zod.def.type);
4168
+ return "any";
4169
+ };
4170
+
4171
+ const schemas = [
4172
+ z.bigint(),
4173
+ z.symbol(),
4174
+ z.undefined(),
4175
+ z.void(),
4176
+ z.date(),
4177
+ z.nan(),
4178
+ z.custom<string>(),
4179
+ z.map(z.string(), z.string()),
4180
+ z.set(z.string()),
4181
+ z.transform((x: unknown) => x),
4182
+ z.literal([undefined]),
4183
+ z.literal([1n]),
4184
+ z.string().catch(() => {
4185
+ throw new Error("dynamic");
4186
+ }),
4187
+ // z.function() is not a ZodType, but its processor is reachable through the same path
4188
+ z.function() as unknown as z.ZodType,
4189
+ ];
4190
+ for (const schema of schemas) z.toJSONSchema(schema, { unrepresentable: collect });
4191
+
4192
+ expect(seen).toEqual([
4193
+ "bigint",
4194
+ "symbol",
4195
+ "undefined",
4196
+ "void",
4197
+ "date",
4198
+ "nan",
4199
+ "custom",
4200
+ "map",
4201
+ "set",
4202
+ "transform",
4203
+ "literal",
4204
+ "literal",
4205
+ "catch",
4206
+ "function",
4207
+ ]);
4208
+ });
4209
+
4210
+ test("returned JSON Schema replaces the unrepresentable node", () => {
4211
+ // the motivating case: represent dates, keep throwing for everything else
4212
+ const params: z.core.ToJSONSchemaParams = {
4213
+ unrepresentable: ({ zodSchema }) =>
4214
+ zodSchema._zod.def.type === "date" ? { type: "string", format: "date-time" } : "throw",
4215
+ };
4216
+ expect(z.toJSONSchema(z.object({ when: z.date() }), params)).toMatchInlineSnapshot(`
4217
+ {
4218
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4219
+ "additionalProperties": false,
4220
+ "properties": {
4221
+ "when": {
4222
+ "format": "date-time",
4223
+ "type": "string",
4224
+ },
4225
+ },
4226
+ "required": [
4227
+ "when",
4228
+ ],
4229
+ "type": "object",
4230
+ }
4231
+ `);
4232
+ expect(() => z.toJSONSchema(z.object({ id: z.bigint() }), params)).toThrow(
4233
+ "BigInt cannot be represented in JSON Schema"
4234
+ );
4235
+ });
4236
+
4237
+ test("`throw` and `undefined` returns produce the default error", () => {
4238
+ expect(() => z.toJSONSchema(z.date(), { unrepresentable: () => "throw" })).toThrow(
4239
+ "Date cannot be represented in JSON Schema"
4240
+ );
4241
+ expect(() => z.toJSONSchema(z.date(), { unrepresentable: () => undefined })).toThrow(
4242
+ "Date cannot be represented in JSON Schema"
4243
+ );
4244
+ });
4245
+
4246
+ test("`any` return matches the string option", () => {
4247
+ expect(z.toJSONSchema(z.date(), { unrepresentable: () => "any" })).toEqual(
4248
+ z.toJSONSchema(z.date(), { unrepresentable: "any" })
4249
+ );
4250
+ });
4251
+
4252
+ test("`message` distinguishes sites that share a schema", () => {
4253
+ const seen: string[] = [];
4254
+ expect(
4255
+ z.toJSONSchema(z.literal([undefined, 1n, "a"]), {
4256
+ unrepresentable: ({ zodSchema, message }) => {
4257
+ seen.push(`${zodSchema._zod.def.type}: ${message}`);
4258
+ return "any";
4259
+ },
4260
+ })
4261
+ ).toMatchInlineSnapshot(`
4262
+ {
4263
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4264
+ "enum": [
4265
+ 1,
4266
+ "a",
4267
+ ],
4268
+ }
4269
+ `);
4270
+ // same `zodSchema`, different message -- the only way to tell the two literal sites apart
4271
+ expect(seen).toEqual([
4272
+ "literal: Literal `undefined` cannot be represented in JSON Schema",
4273
+ "literal: BigInt literals cannot be represented in JSON Schema",
4274
+ ]);
4275
+ });
4276
+
4277
+ test("errors thrown by the callback propagate", () => {
4278
+ expect(() =>
4279
+ z.toJSONSchema(z.object({ when: z.date() }), {
4280
+ unrepresentable: ({ zodSchema, path }) => {
4281
+ throw new Error(`${zodSchema._zod.def.type} at /${path.join("/")}`);
4282
+ },
4283
+ })
4284
+ ).toThrow("date at /properties/when");
4285
+ });
4286
+
4287
+ test("runs before `override`", () => {
4288
+ const order: string[] = [];
4289
+ expect(
4290
+ z.toJSONSchema(z.date(), {
4291
+ unrepresentable: () => {
4292
+ order.push("unrepresentable");
4293
+ return { type: "string" };
4294
+ },
4295
+ override: (ctx) => {
4296
+ order.push("override");
4297
+ if (ctx.jsonSchema.type === "string") ctx.jsonSchema.format = "date-time";
4298
+ },
4299
+ })
4300
+ ).toMatchInlineSnapshot(`
4301
+ {
4302
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4303
+ "format": "date-time",
4304
+ "type": "string",
4305
+ }
4306
+ `);
4307
+ expect(order).toEqual(["unrepresentable", "override"]);
4308
+ });
4309
+
4310
+ test("a returned schema replaces the whole literal", () => {
4311
+ expect(
4312
+ z.toJSONSchema(z.literal(["a", 1n]), {
4313
+ unrepresentable: () => ({ type: "string", pattern: "^\\d+$" }),
4314
+ })
4315
+ ).toMatchInlineSnapshot(`
4316
+ {
4317
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4318
+ "pattern": "^\\d+$",
4319
+ "type": "string",
4320
+ }
4321
+ `);
4322
+
4323
+ // "any" keeps the existing per-value behavior: undefined dropped, bigint coerced
4324
+ expect(z.toJSONSchema(z.literal(["a", 1n, undefined]), { unrepresentable: () => "any" })).toEqual(
4325
+ z.toJSONSchema(z.literal(["a", 1n, undefined]), { unrepresentable: "any" })
4326
+ );
4327
+ });
4328
+
4329
+ const dateToString: z.core.ToJSONSchemaParams["unrepresentable"] = ({ zodSchema }) =>
4330
+ zodSchema._zod.def.type === "date" ? { type: "string", format: "date-time" } : "throw";
4331
+
4332
+ test("emits a valid OpenAPI 3.0 schema", async () => {
4333
+ const jsonSchema = z.toJSONSchema(z.object({ start: z.date() }), {
4334
+ target: "openapi-3.0",
4335
+ unrepresentable: dateToString,
4336
+ });
4337
+ expect(jsonSchema).toMatchInlineSnapshot(`
4338
+ {
4339
+ "additionalProperties": false,
4340
+ "properties": {
4341
+ "start": {
4342
+ "format": "date-time",
4343
+ "type": "string",
4344
+ },
4345
+ },
4346
+ "required": [
4347
+ "start",
4348
+ ],
4349
+ "type": "object",
4350
+ }
4351
+ `);
4352
+ await expect(validateOpenAPI30Schema(jsonSchema)).resolves.toBe(true);
4353
+ });
4354
+
4355
+ test("the returned schema survives extraction into $defs", () => {
4356
+ const When = z.date().meta({ id: "When" });
4357
+ expect(
4358
+ z.toJSONSchema(z.object({ start: When, end: When }), { unrepresentable: dateToString })
4359
+ ).toMatchInlineSnapshot(`
4360
+ {
4361
+ "$defs": {
4362
+ "When": {
4363
+ "format": "date-time",
4364
+ "type": "string",
4365
+ },
4366
+ },
4367
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4368
+ "additionalProperties": false,
4369
+ "properties": {
4370
+ "end": {
4371
+ "$ref": "#/$defs/When",
4372
+ },
4373
+ "start": {
4374
+ "$ref": "#/$defs/When",
4375
+ },
4376
+ },
4377
+ "required": [
4378
+ "start",
4379
+ "end",
4380
+ ],
4381
+ "type": "object",
4382
+ }
4383
+ `);
4384
+ });
4385
+
4386
+ test("applies to dynamic catch values", () => {
4387
+ const schema = z.string().catch(() => {
4388
+ throw new Error("dynamic");
4389
+ });
4390
+ expect(
4391
+ z.toJSONSchema(schema, {
4392
+ unrepresentable: () => ({ default: "fallback" }),
4393
+ })
4394
+ ).toMatchInlineSnapshot(`
4395
+ {
4396
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4397
+ "default": "fallback",
4398
+ "type": "string",
4399
+ }
4400
+ `);
4401
+ });
4402
+ });
4403
+
4404
+ describe("intersection folding", () => {
4405
+ const TARGETS = ["draft-2020-12", "draft-07", "draft-04", "openapi-3.0"] as const;
4406
+ const body = (schema: z.ZodType, params?: Parameters<typeof z.toJSONSchema>[1]) => {
4407
+ const { $schema, ...rest } = z.toJSONSchema(schema, params) as Record<string, unknown>;
4408
+ return rest;
4409
+ };
4410
+
4411
+ test("two objects become one object", () => {
4412
+ expect(body(z.object({ name: z.string() }).and(z.object({ age: z.number() })))).toMatchInlineSnapshot(`
4413
+ {
4414
+ "additionalProperties": false,
4415
+ "properties": {
4416
+ "age": {
4417
+ "type": "number",
4418
+ },
4419
+ "name": {
4420
+ "type": "string",
4421
+ },
4422
+ },
4423
+ "required": [
4424
+ "name",
4425
+ "age",
4426
+ ],
4427
+ "type": "object",
4428
+ }
4429
+ `);
4430
+ });
4431
+
4432
+ test("the folded shape is identical on every target", () => {
4433
+ const schema = z.object({ name: z.string() }).and(z.object({ age: z.number() }));
4434
+ const bodies = TARGETS.map((target) => body(schema, { target }));
4435
+ for (const emitted of bodies) expect(emitted).toEqual(bodies[0]);
4436
+ });
4437
+
4438
+ test("closed only when every member is closed", () => {
4439
+ expect(body(z.strictObject({ a: z.string() }).and(z.strictObject({ b: z.number() })))).toMatchObject({
4440
+ additionalProperties: false,
4441
+ });
4442
+ // A loose member keeps the intersection open, which is what the parser does: it merges both results, so the loose side's extra keys survive.
4443
+ expect(body(z.looseObject({ a: z.string() }).and(z.object({ b: z.number() })))).not.toHaveProperty(
4444
+ "additionalProperties"
4445
+ );
4446
+ });
4447
+
4448
+ test("chained and nested intersections fold flat", () => {
4449
+ const chained = z
4450
+ .object({ a: z.string() })
4451
+ .and(z.object({ b: z.string() }))
4452
+ .and(z.object({ c: z.string() }));
4453
+ expect(body(chained)).toMatchObject({ properties: { a: {}, b: {}, c: {} }, required: ["a", "b", "c"] });
4454
+ const nested = z.object({ a: z.string() }).and(z.object({ b: z.string() }).and(z.object({ c: z.string() })));
4455
+ expect(body(nested)).toEqual(body(chained));
4456
+ });
4457
+
4458
+ test("required is the union, and an optional key stays optional", () => {
4459
+ expect(body(z.object({ a: z.string().optional() }).and(z.object({ b: z.string() })))).toMatchObject({
4460
+ properties: { a: { type: "string" }, b: { type: "string" } },
4461
+ required: ["b"],
4462
+ });
4463
+ });
4464
+
4465
+ test("a key both members declare has to satisfy both", () => {
4466
+ // identical declarations collapse
4467
+ expect(body(z.object({ k: z.string() }).and(z.object({ k: z.string() })))).toMatchObject({
4468
+ properties: { k: { type: "string" } },
4469
+ });
4470
+ // object declarations fold, matching the parser's deep merge
4471
+ expect(
4472
+ body(z.object({ k: z.object({ a: z.string() }) }).and(z.object({ k: z.object({ b: z.string() }) })))
4473
+ ).toMatchObject({
4474
+ properties: { k: { type: "object", properties: { a: {}, b: {} }, required: ["a", "b"] } },
4475
+ });
4476
+ // anything else stays an intersection one level down
4477
+ expect(body(z.object({ k: z.string() }).and(z.object({ k: z.number() })))).toMatchObject({
4478
+ properties: { k: { allOf: [{ type: "string" }, { type: "number" }] } },
4479
+ });
4480
+ });
4481
+
4482
+ test("an intersection distributes over a union", () => {
4483
+ const schema = z
4484
+ .object({ name: z.string() })
4485
+ .and(
4486
+ z.discriminatedUnion("type", [
4487
+ z.object({ type: z.literal("a"), value: z.string() }),
4488
+ z.object({ type: z.literal("b"), count: z.number() }),
4489
+ ])
4490
+ );
4491
+ expect(body(schema)).toMatchObject({
4492
+ oneOf: [
4493
+ { type: "object", properties: { name: {}, type: {}, value: {} }, additionalProperties: false },
4494
+ { type: "object", properties: { name: {}, type: {}, count: {} }, additionalProperties: false },
4495
+ ],
4496
+ });
4497
+ const inclusive = z
4498
+ .object({ name: z.string() })
4499
+ .and(z.union([z.object({ v: z.string() }), z.object({ c: z.number() })]));
4500
+ expect(body(inclusive)).toMatchObject({
4501
+ anyOf: [{ properties: { name: {}, v: {} } }, { properties: { name: {}, c: {} } }],
4502
+ });
4503
+ });
4504
+
4505
+ test("input conversion has nothing to close", () => {
4506
+ expect(body(z.object({ a: z.string() }).and(z.object({ b: z.string() })), { io: "input" })).toEqual({
4507
+ type: "object",
4508
+ properties: { a: { type: "string" }, b: { type: "string" } },
4509
+ required: ["a", "b"],
4510
+ });
4511
+ });
4512
+
4513
+ test("folds through a property and through z.lazy", () => {
4514
+ expect(body(z.object({ inner: z.object({ a: z.string() }).and(z.object({ b: z.string() })) }))).toMatchObject({
4515
+ properties: { inner: { type: "object", properties: { a: {}, b: {} } } },
4516
+ });
4517
+ const self: z.ZodType = z.lazy(() => z.object({ a: z.string() }).and(z.object({ next: z.optional(self) })));
4518
+ expect(body(self)).toMatchObject({ type: "object", properties: { a: {}, next: { $ref: "#" } } });
4519
+ });
4520
+
4521
+ test("metadata on the intersection itself survives", () => {
4522
+ expect(
4523
+ body(
4524
+ z
4525
+ .object({ a: z.string() })
4526
+ .and(z.object({ b: z.string() }))
4527
+ .meta({ title: "T" })
4528
+ )
4529
+ ).toMatchObject({
4530
+ title: "T",
4531
+ type: "object",
4532
+ properties: { a: {}, b: {} },
4533
+ });
4534
+ });
4535
+
4536
+ test("a catchall constrains the sibling's keys too", () => {
4537
+ // The catchall member does not declare `b`, so its `additionalProperties` is what it demands of `b`. Folding `b` into `properties` has to carry that demand across, or the key would escape it.
4538
+ const schema = z
4539
+ .object({ a: z.string() })
4540
+ .catchall(z.number())
4541
+ .and(z.object({ b: z.string() }));
4542
+ expect(body(schema)).toEqual({
4543
+ type: "object",
4544
+ properties: { a: { type: "string" }, b: { allOf: [{ type: "number" }, { type: "string" }] } },
4545
+ required: ["a", "b"],
4546
+ additionalProperties: { type: "number" },
4547
+ });
4548
+ });
4549
+
4550
+ test("two catchalls both constrain the keys neither declares", () => {
4551
+ const schema = z
4552
+ .object({})
4553
+ .catchall(z.number())
4554
+ .and(z.object({}).catchall(z.number().min(0)));
4555
+ expect(body(schema)).toEqual({
4556
+ type: "object",
4557
+ properties: {},
4558
+ additionalProperties: { allOf: [{ type: "number" }, { type: "number", minimum: 0 }] },
4559
+ });
4560
+ expect(schema.safeParse({ zz: 5 }).success).toBe(true);
4561
+ expect(schema.safeParse({ zz: -1 }).success).toBe(false);
4562
+ });
4563
+
4564
+ test("the emitted openness agrees with the parser for every pair of object modes", () => {
4565
+ const modes = {
4566
+ strip: (shape: z.ZodRawShape) => z.object(shape),
4567
+ strict: (shape: z.ZodRawShape) => z.strictObject(shape),
4568
+ loose: (shape: z.ZodRawShape) => z.looseObject(shape),
4569
+ catchall: (shape: z.ZodRawShape) => z.object(shape).catchall(z.number()),
4570
+ };
4571
+ const grid: Record<string, unknown> = {};
4572
+ for (const [leftName, left] of Object.entries(modes)) {
4573
+ for (const [rightName, right] of Object.entries(modes)) {
4574
+ const schema = left({ a: z.string() }).and(right({ b: z.number() }));
4575
+ const emitted = body(schema) as { additionalProperties?: unknown };
4576
+ grid[`${leftName} & ${rightName}`] = emitted.additionalProperties ?? "open";
4577
+
4578
+ // Whatever the emitted keyword says, it has to agree with what the parser does with a key neither member declares.
4579
+ const parsed = schema.safeParse({ a: "s", b: 1, zz: 7 });
4580
+ const keepsUnknown = parsed.success && Object.prototype.hasOwnProperty.call(parsed.data, "zz");
4581
+ if (keepsUnknown) expect(emitted.additionalProperties).not.toBe(false);
4582
+ }
4583
+ }
4584
+ expect(grid).toMatchInlineSnapshot(`
4585
+ {
4586
+ "catchall & catchall": {
4587
+ "type": "number",
4588
+ },
4589
+ "catchall & loose": {
4590
+ "type": "number",
4591
+ },
4592
+ "catchall & strict": {
4593
+ "type": "number",
4594
+ },
4595
+ "catchall & strip": {
4596
+ "type": "number",
4597
+ },
4598
+ "loose & catchall": {
4599
+ "type": "number",
4600
+ },
4601
+ "loose & loose": "open",
4602
+ "loose & strict": "open",
4603
+ "loose & strip": "open",
4604
+ "strict & catchall": {
4605
+ "type": "number",
4606
+ },
4607
+ "strict & loose": "open",
4608
+ "strict & strict": false,
4609
+ "strict & strip": false,
4610
+ "strip & catchall": {
4611
+ "type": "number",
4612
+ },
4613
+ "strip & loose": "open",
4614
+ "strip & strict": false,
4615
+ "strip & strip": false,
4616
+ }
4617
+ `);
4618
+ });
4619
+
4620
+ test("a __proto__ key stays an own property", () => {
4621
+ const folded = body(z.object({ ["__proto__"]: z.string() }).and(z.object({ b: z.number() }))) as any;
4622
+ expect(Object.prototype.hasOwnProperty.call(folded.properties, "__proto__")).toBe(true);
4623
+ expect(folded.required).toEqual(["__proto__", "b"]);
4624
+ });
4625
+ });
4626
+
4627
+ describe("intersection folding declines", () => {
4628
+ // Every case here keeps the `allOf` it produces today. The fold only understands the four object keywords, so a member carrying anything else is left alone rather than having a constraint dropped or an annotation re-scoped.
4629
+ const allOf = (schema: z.ZodType, params?: Parameters<typeof z.toJSONSchema>[1]) =>
4630
+ (z.toJSONSchema(schema, params) as any).allOf;
4631
+
4632
+ test("a member that is a reference keeps its reference", () => {
4633
+ const named = z.object({ a: z.string() }).meta({ id: "Named" });
4634
+ expect(allOf(named.and(z.object({ b: z.string() })))[0]).toEqual({ $ref: "#/$defs/Named" });
4635
+
4636
+ const shared = z.object({ c: z.string() });
4637
+ const reused = z.toJSONSchema(z.object({ x: shared.and(z.object({ d: z.string() })), y: shared }), {
4638
+ reused: "ref",
4639
+ }) as any;
4640
+ expect(reused.properties.x.allOf[0]).toEqual({ $ref: "#/$defs/__schema0" });
4641
+
4642
+ const cyclic: any = z.object({
4643
+ get next() {
4644
+ return z.optional(cyclic);
4645
+ },
4646
+ n: z.string(),
4647
+ });
4648
+ expect(allOf(cyclic.and(z.object({ m: z.string() })))[0].$ref).toBe("#/$defs/__schema0");
4649
+ });
4650
+
4651
+ test("an annotated member keeps its place", () => {
4652
+ expect(
4653
+ allOf(
4654
+ z
4655
+ .object({ a: z.string() })
4656
+ .describe("A")
4657
+ .and(z.object({ b: z.string() }))
4658
+ )[0]
4659
+ ).toMatchObject({
4660
+ description: "A",
4661
+ });
4662
+ });
4663
+
4664
+ test("members that are not plain objects are left alone", () => {
4665
+ expect(allOf(z.intersection(z.string().min(2), z.string().max(5)))).toHaveLength(2);
4666
+ expect(allOf(z.object({ a: z.string() }).and(z.nullable(z.object({ b: z.string() }))))).toHaveLength(2);
4667
+ expect(
4668
+ allOf(z.object({ label: z.string() }).and(z.looseRecord(z.string().regex(/^label:[a-z]{2}$/), z.string())))
4669
+ ).toHaveLength(2);
4670
+ });
4671
+
4672
+ test("a shared member is never rewritten for its other uses", () => {
4673
+ const shared = z.object({ c: z.string() });
4674
+ const result = z.toJSONSchema(z.object({ x: shared.and(z.object({ d: z.string() })), y: shared })) as any;
4675
+ expect(result.properties.x).toMatchObject({ properties: { c: {}, d: {} }, additionalProperties: false });
4676
+ // `y` is the same Zod schema, emitted separately, and keeps the closedness it had on its own.
4677
+ expect(result.properties.y).toEqual({
4678
+ type: "object",
4679
+ properties: { c: { type: "string" } },
4680
+ required: ["c"],
4681
+ additionalProperties: false,
4682
+ });
4683
+ });
4684
+
4685
+ test("registry conversion keeps its cross-references", () => {
4686
+ const registry = z.registry<{ id: string }>();
4687
+ const left = z.object({ p: z.string() });
4688
+ const right = z.object({ q: z.string() });
4689
+ registry.add(left, { id: "P" });
4690
+ registry.add(right, { id: "Q" });
4691
+ registry.add(left.and(right), { id: "PQ" });
4692
+ expect((z.toJSONSchema(registry) as any).schemas.PQ.allOf).toEqual([{ $ref: "P" }, { $ref: "Q" }]);
4693
+ });
4694
+
4695
+ test("override still runs, and sees the intersection before it folds", () => {
4696
+ const schema = z.object({ a: z.string() }).and(z.object({ b: z.string() }));
4697
+ const result = z.toJSONSchema(schema, {
4698
+ override(ctx) {
4699
+ if ((ctx.jsonSchema as any).allOf) (ctx.jsonSchema as any).title = "intersection";
4700
+ },
4701
+ }) as any;
4702
+ expect(result).toMatchObject({ title: "intersection", type: "object", properties: { a: {}, b: {} } });
4703
+ });
4704
+
4705
+ test("an override that writes object keywords wins over the fold", () => {
4706
+ // The override runs first, so anything it puts on the intersection is deliberate. Folding would overwrite it silently, so the fold stands down instead.
4707
+ const result = z.toJSONSchema(z.object({ a: z.string() }).and(z.object({ b: z.string() })), {
4708
+ override(ctx) {
4709
+ if ((ctx.jsonSchema as any).allOf) (ctx.jsonSchema as any).additionalProperties = true;
4710
+ },
4711
+ }) as any;
4712
+ expect(result.additionalProperties).toBe(true);
4713
+ expect(result.allOf).toHaveLength(2);
4714
+ });
4715
+
4716
+ test("more than one union member is left alone rather than multiplied out", () => {
4717
+ // The second union lands among the members the first is distributed across, and a union is not an object, so every branch fails to fold and the whole intersection stands down.
4718
+ const schema = z
4719
+ .object({ a: z.string() })
4720
+ .and(z.union([z.object({ v: z.string() }), z.object({ w: z.string() })]))
4721
+ .and(z.union([z.object({ x: z.string() }), z.object({ y: z.string() })]));
4722
+ expect(allOf(schema)).toHaveLength(3);
4723
+ });
4724
+ });
4725
+
4726
+ test("currency code", () => {
4727
+ expect(z.toJSONSchema(z.currencyCode())).toEqual({
4728
+ $schema: "https://json-schema.org/draft/2020-12/schema",
4729
+ type: "string",
4730
+ format: "currency_code",
4731
+ pattern: z.regexes.currencyCode.source,
4732
+ });
4733
+ });