@posthog/agent 1.26.0 → 1.27.0

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 (571) hide show
  1. package/dist/index.d.ts +1274 -20
  2. package/dist/index.js +7296 -11
  3. package/dist/index.js.map +1 -1
  4. package/package.json +6 -12
  5. package/src/agent.ts +42 -5
  6. package/src/types.ts +1 -1
  7. package/dist/_virtual/_commonjsHelpers.js +0 -6
  8. package/dist/_virtual/_commonjsHelpers.js.map +0 -1
  9. package/dist/_virtual/_tslib.js +0 -74
  10. package/dist/_virtual/_tslib.js.map +0 -1
  11. package/dist/_virtual/additionalItems.js +0 -4
  12. package/dist/_virtual/additionalItems.js.map +0 -1
  13. package/dist/_virtual/additionalProperties.js +0 -4
  14. package/dist/_virtual/additionalProperties.js.map +0 -1
  15. package/dist/_virtual/ajv.js +0 -4
  16. package/dist/_virtual/ajv.js.map +0 -1
  17. package/dist/_virtual/allOf.js +0 -4
  18. package/dist/_virtual/allOf.js.map +0 -1
  19. package/dist/_virtual/anyOf.js +0 -4
  20. package/dist/_virtual/anyOf.js.map +0 -1
  21. package/dist/_virtual/applicability.js +0 -4
  22. package/dist/_virtual/applicability.js.map +0 -1
  23. package/dist/_virtual/boolSchema.js +0 -4
  24. package/dist/_virtual/boolSchema.js.map +0 -1
  25. package/dist/_virtual/code.js +0 -4
  26. package/dist/_virtual/code.js.map +0 -1
  27. package/dist/_virtual/code2.js +0 -4
  28. package/dist/_virtual/code2.js.map +0 -1
  29. package/dist/_virtual/const.js +0 -4
  30. package/dist/_virtual/const.js.map +0 -1
  31. package/dist/_virtual/contains.js +0 -4
  32. package/dist/_virtual/contains.js.map +0 -1
  33. package/dist/_virtual/core.js +0 -4
  34. package/dist/_virtual/core.js.map +0 -1
  35. package/dist/_virtual/dataType.js +0 -4
  36. package/dist/_virtual/dataType.js.map +0 -1
  37. package/dist/_virtual/defaults.js +0 -4
  38. package/dist/_virtual/defaults.js.map +0 -1
  39. package/dist/_virtual/dependencies.js +0 -4
  40. package/dist/_virtual/dependencies.js.map +0 -1
  41. package/dist/_virtual/draft7.js +0 -4
  42. package/dist/_virtual/draft7.js.map +0 -1
  43. package/dist/_virtual/enum.js +0 -4
  44. package/dist/_virtual/enum.js.map +0 -1
  45. package/dist/_virtual/equal.js +0 -4
  46. package/dist/_virtual/equal.js.map +0 -1
  47. package/dist/_virtual/errors.js +0 -4
  48. package/dist/_virtual/errors.js.map +0 -1
  49. package/dist/_virtual/format.js +0 -4
  50. package/dist/_virtual/format.js.map +0 -1
  51. package/dist/_virtual/formats.js +0 -4
  52. package/dist/_virtual/formats.js.map +0 -1
  53. package/dist/_virtual/id.js +0 -4
  54. package/dist/_virtual/id.js.map +0 -1
  55. package/dist/_virtual/if.js +0 -4
  56. package/dist/_virtual/if.js.map +0 -1
  57. package/dist/_virtual/index.js +0 -4
  58. package/dist/_virtual/index.js.map +0 -1
  59. package/dist/_virtual/index10.js +0 -4
  60. package/dist/_virtual/index10.js.map +0 -1
  61. package/dist/_virtual/index11.js +0 -4
  62. package/dist/_virtual/index11.js.map +0 -1
  63. package/dist/_virtual/index2.js +0 -4
  64. package/dist/_virtual/index2.js.map +0 -1
  65. package/dist/_virtual/index3.js +0 -4
  66. package/dist/_virtual/index3.js.map +0 -1
  67. package/dist/_virtual/index4.js +0 -4
  68. package/dist/_virtual/index4.js.map +0 -1
  69. package/dist/_virtual/index5.js +0 -4
  70. package/dist/_virtual/index5.js.map +0 -1
  71. package/dist/_virtual/index6.js +0 -4
  72. package/dist/_virtual/index6.js.map +0 -1
  73. package/dist/_virtual/index7.js +0 -4
  74. package/dist/_virtual/index7.js.map +0 -1
  75. package/dist/_virtual/index8.js +0 -4
  76. package/dist/_virtual/index8.js.map +0 -1
  77. package/dist/_virtual/index9.js +0 -4
  78. package/dist/_virtual/index9.js.map +0 -1
  79. package/dist/_virtual/items.js +0 -4
  80. package/dist/_virtual/items.js.map +0 -1
  81. package/dist/_virtual/items2020.js +0 -4
  82. package/dist/_virtual/items2020.js.map +0 -1
  83. package/dist/_virtual/keyword.js +0 -4
  84. package/dist/_virtual/keyword.js.map +0 -1
  85. package/dist/_virtual/limit.js +0 -4
  86. package/dist/_virtual/limit.js.map +0 -1
  87. package/dist/_virtual/limitItems.js +0 -4
  88. package/dist/_virtual/limitItems.js.map +0 -1
  89. package/dist/_virtual/limitLength.js +0 -4
  90. package/dist/_virtual/limitLength.js.map +0 -1
  91. package/dist/_virtual/limitNumber.js +0 -4
  92. package/dist/_virtual/limitNumber.js.map +0 -1
  93. package/dist/_virtual/limitProperties.js +0 -4
  94. package/dist/_virtual/limitProperties.js.map +0 -1
  95. package/dist/_virtual/metadata.js +0 -4
  96. package/dist/_virtual/metadata.js.map +0 -1
  97. package/dist/_virtual/multipleOf.js +0 -4
  98. package/dist/_virtual/multipleOf.js.map +0 -1
  99. package/dist/_virtual/names.js +0 -4
  100. package/dist/_virtual/names.js.map +0 -1
  101. package/dist/_virtual/not.js +0 -4
  102. package/dist/_virtual/not.js.map +0 -1
  103. package/dist/_virtual/oneOf.js +0 -4
  104. package/dist/_virtual/oneOf.js.map +0 -1
  105. package/dist/_virtual/pattern.js +0 -4
  106. package/dist/_virtual/pattern.js.map +0 -1
  107. package/dist/_virtual/patternProperties.js +0 -4
  108. package/dist/_virtual/patternProperties.js.map +0 -1
  109. package/dist/_virtual/prefixItems.js +0 -4
  110. package/dist/_virtual/prefixItems.js.map +0 -1
  111. package/dist/_virtual/properties.js +0 -4
  112. package/dist/_virtual/properties.js.map +0 -1
  113. package/dist/_virtual/propertyNames.js +0 -4
  114. package/dist/_virtual/propertyNames.js.map +0 -1
  115. package/dist/_virtual/ref.js +0 -4
  116. package/dist/_virtual/ref.js.map +0 -1
  117. package/dist/_virtual/ref_error.js +0 -4
  118. package/dist/_virtual/ref_error.js.map +0 -1
  119. package/dist/_virtual/required.js +0 -4
  120. package/dist/_virtual/required.js.map +0 -1
  121. package/dist/_virtual/resolve.js +0 -4
  122. package/dist/_virtual/resolve.js.map +0 -1
  123. package/dist/_virtual/rules.js +0 -4
  124. package/dist/_virtual/rules.js.map +0 -1
  125. package/dist/_virtual/scope.js +0 -4
  126. package/dist/_virtual/scope.js.map +0 -1
  127. package/dist/_virtual/subschema.js +0 -4
  128. package/dist/_virtual/subschema.js.map +0 -1
  129. package/dist/_virtual/thenElse.js +0 -4
  130. package/dist/_virtual/thenElse.js.map +0 -1
  131. package/dist/_virtual/types.js +0 -4
  132. package/dist/_virtual/types.js.map +0 -1
  133. package/dist/_virtual/ucs2length.js +0 -4
  134. package/dist/_virtual/ucs2length.js.map +0 -1
  135. package/dist/_virtual/uniqueItems.js +0 -4
  136. package/dist/_virtual/uniqueItems.js.map +0 -1
  137. package/dist/_virtual/uri.js +0 -4
  138. package/dist/_virtual/uri.js.map +0 -1
  139. package/dist/_virtual/util.js +0 -4
  140. package/dist/_virtual/util.js.map +0 -1
  141. package/dist/_virtual/validation_error.js +0 -4
  142. package/dist/_virtual/validation_error.js.map +0 -1
  143. package/dist/example-client.d.ts +0 -3
  144. package/dist/example-client.d.ts.map +0 -1
  145. package/dist/example.d.ts +0 -3
  146. package/dist/example.d.ts.map +0 -1
  147. package/dist/index.d.ts.map +0 -1
  148. package/dist/node_modules/@agentclientprotocol/sdk/dist/acp.js +0 -891
  149. package/dist/node_modules/@agentclientprotocol/sdk/dist/acp.js.map +0 -1
  150. package/dist/node_modules/@agentclientprotocol/sdk/dist/schema.js +0 -876
  151. package/dist/node_modules/@agentclientprotocol/sdk/dist/schema.js.map +0 -1
  152. package/dist/node_modules/@agentclientprotocol/sdk/dist/stream.js +0 -66
  153. package/dist/node_modules/@agentclientprotocol/sdk/dist/stream.js.map +0 -1
  154. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/server/completable.js +0 -23
  155. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/server/completable.js.map +0 -1
  156. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js +0 -331
  157. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js.map +0 -1
  158. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js +0 -717
  159. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js.map +0 -1
  160. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js +0 -221
  161. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js.map +0 -1
  162. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js +0 -56
  163. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js.map +0 -1
  164. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js +0 -440
  165. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js.map +0 -1
  166. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/toolNameValidation.js +0 -94
  167. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/toolNameValidation.js.map +0 -1
  168. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js +0 -1610
  169. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js.map +0 -1
  170. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js +0 -91
  171. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js.map +0 -1
  172. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v3/ZodError.js +0 -133
  173. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v3/ZodError.js.map +0 -1
  174. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v3/errors.js +0 -9
  175. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v3/errors.js.map +0 -1
  176. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v3/helpers/errorUtil.js +0 -9
  177. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v3/helpers/errorUtil.js.map +0 -1
  178. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v3/helpers/parseUtil.js +0 -112
  179. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v3/helpers/parseUtil.js.map +0 -1
  180. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v3/helpers/util.js +0 -136
  181. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v3/helpers/util.js.map +0 -1
  182. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v3/locales/en.js +0 -112
  183. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v3/locales/en.js.map +0 -1
  184. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v3/types.js +0 -3297
  185. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v3/types.js.map +0 -1
  186. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/classic/errors.js +0 -44
  187. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/classic/errors.js.map +0 -1
  188. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/classic/iso.js +0 -36
  189. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/classic/iso.js.map +0 -1
  190. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/classic/parse.js +0 -10
  191. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/classic/parse.js.map +0 -1
  192. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/classic/schemas.js +0 -657
  193. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/classic/schemas.js.map +0 -1
  194. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/core/api.js +0 -449
  195. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/core/api.js.map +0 -1
  196. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/core/checks.js +0 -413
  197. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/core/checks.js.map +0 -1
  198. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/core/core.js +0 -57
  199. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/core/core.js.map +0 -1
  200. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/core/doc.js +0 -38
  201. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/core/doc.js.map +0 -1
  202. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/core/errors.js +0 -86
  203. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/core/errors.js.map +0 -1
  204. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/core/parse.js +0 -61
  205. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/core/parse.js.map +0 -1
  206. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/core/regexes.js +0 -80
  207. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/core/regexes.js.map +0 -1
  208. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/core/registries.js +0 -52
  209. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/core/registries.js.map +0 -1
  210. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/core/schemas.js +0 -1307
  211. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/core/schemas.js.map +0 -1
  212. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/core/to-json-schema.js +0 -842
  213. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/core/to-json-schema.js.map +0 -1
  214. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/core/util.js +0 -335
  215. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/core/util.js.map +0 -1
  216. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/core/versions.js +0 -8
  217. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/core/versions.js.map +0 -1
  218. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/mini/schemas.js +0 -51
  219. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/mini/schemas.js.map +0 -1
  220. package/dist/node_modules/ajv/dist/ajv.js +0 -69
  221. package/dist/node_modules/ajv/dist/ajv.js.map +0 -1
  222. package/dist/node_modules/ajv/dist/compile/codegen/code.js +0 -169
  223. package/dist/node_modules/ajv/dist/compile/codegen/code.js.map +0 -1
  224. package/dist/node_modules/ajv/dist/compile/codegen/index.js +0 -712
  225. package/dist/node_modules/ajv/dist/compile/codegen/index.js.map +0 -1
  226. package/dist/node_modules/ajv/dist/compile/codegen/scope.js +0 -157
  227. package/dist/node_modules/ajv/dist/compile/codegen/scope.js.map +0 -1
  228. package/dist/node_modules/ajv/dist/compile/errors.js +0 -140
  229. package/dist/node_modules/ajv/dist/compile/errors.js.map +0 -1
  230. package/dist/node_modules/ajv/dist/compile/index.js +0 -253
  231. package/dist/node_modules/ajv/dist/compile/index.js.map +0 -1
  232. package/dist/node_modules/ajv/dist/compile/names.js +0 -40
  233. package/dist/node_modules/ajv/dist/compile/names.js.map +0 -1
  234. package/dist/node_modules/ajv/dist/compile/ref_error.js +0 -25
  235. package/dist/node_modules/ajv/dist/compile/ref_error.js.map +0 -1
  236. package/dist/node_modules/ajv/dist/compile/resolve.js +0 -162
  237. package/dist/node_modules/ajv/dist/compile/resolve.js.map +0 -1
  238. package/dist/node_modules/ajv/dist/compile/rules.js +0 -29
  239. package/dist/node_modules/ajv/dist/compile/rules.js.map +0 -1
  240. package/dist/node_modules/ajv/dist/compile/util.js +0 -183
  241. package/dist/node_modules/ajv/dist/compile/util.js.map +0 -1
  242. package/dist/node_modules/ajv/dist/compile/validate/applicability.js +0 -30
  243. package/dist/node_modules/ajv/dist/compile/validate/applicability.js.map +0 -1
  244. package/dist/node_modules/ajv/dist/compile/validate/boolSchema.js +0 -64
  245. package/dist/node_modules/ajv/dist/compile/validate/boolSchema.js.map +0 -1
  246. package/dist/node_modules/ajv/dist/compile/validate/dataType.js +0 -213
  247. package/dist/node_modules/ajv/dist/compile/validate/dataType.js.map +0 -1
  248. package/dist/node_modules/ajv/dist/compile/validate/defaults.js +0 -49
  249. package/dist/node_modules/ajv/dist/compile/validate/defaults.js.map +0 -1
  250. package/dist/node_modules/ajv/dist/compile/validate/index.js +0 -544
  251. package/dist/node_modules/ajv/dist/compile/validate/index.js.map +0 -1
  252. package/dist/node_modules/ajv/dist/compile/validate/keyword.js +0 -139
  253. package/dist/node_modules/ajv/dist/compile/validate/keyword.js.map +0 -1
  254. package/dist/node_modules/ajv/dist/compile/validate/subschema.js +0 -95
  255. package/dist/node_modules/ajv/dist/compile/validate/subschema.js.map +0 -1
  256. package/dist/node_modules/ajv/dist/core.js +0 -639
  257. package/dist/node_modules/ajv/dist/core.js.map +0 -1
  258. package/dist/node_modules/ajv/dist/refs/data.json.js +0 -31
  259. package/dist/node_modules/ajv/dist/refs/data.json.js.map +0 -1
  260. package/dist/node_modules/ajv/dist/refs/json-schema-draft-07.json.js +0 -254
  261. package/dist/node_modules/ajv/dist/refs/json-schema-draft-07.json.js.map +0 -1
  262. package/dist/node_modules/ajv/dist/runtime/equal.js +0 -9
  263. package/dist/node_modules/ajv/dist/runtime/equal.js.map +0 -1
  264. package/dist/node_modules/ajv/dist/runtime/ucs2length.js +0 -25
  265. package/dist/node_modules/ajv/dist/runtime/ucs2length.js.map +0 -1
  266. package/dist/node_modules/ajv/dist/runtime/uri.js +0 -8
  267. package/dist/node_modules/ajv/dist/runtime/uri.js.map +0 -1
  268. package/dist/node_modules/ajv/dist/runtime/validation_error.js +0 -22
  269. package/dist/node_modules/ajv/dist/runtime/validation_error.js.map +0 -1
  270. package/dist/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js +0 -53
  271. package/dist/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js.map +0 -1
  272. package/dist/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js +0 -112
  273. package/dist/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js.map +0 -1
  274. package/dist/node_modules/ajv/dist/vocabularies/applicator/allOf.js +0 -26
  275. package/dist/node_modules/ajv/dist/vocabularies/applicator/allOf.js.map +0 -1
  276. package/dist/node_modules/ajv/dist/vocabularies/applicator/anyOf.js +0 -14
  277. package/dist/node_modules/ajv/dist/vocabularies/applicator/anyOf.js.map +0 -1
  278. package/dist/node_modules/ajv/dist/vocabularies/applicator/contains.js +0 -99
  279. package/dist/node_modules/ajv/dist/vocabularies/applicator/contains.js.map +0 -1
  280. package/dist/node_modules/ajv/dist/vocabularies/applicator/dependencies.js +0 -93
  281. package/dist/node_modules/ajv/dist/vocabularies/applicator/dependencies.js.map +0 -1
  282. package/dist/node_modules/ajv/dist/vocabularies/applicator/if.js +0 -70
  283. package/dist/node_modules/ajv/dist/vocabularies/applicator/if.js.map +0 -1
  284. package/dist/node_modules/ajv/dist/vocabularies/applicator/index.js +0 -77
  285. package/dist/node_modules/ajv/dist/vocabularies/applicator/index.js.map +0 -1
  286. package/dist/node_modules/ajv/dist/vocabularies/applicator/items.js +0 -57
  287. package/dist/node_modules/ajv/dist/vocabularies/applicator/items.js.map +0 -1
  288. package/dist/node_modules/ajv/dist/vocabularies/applicator/items2020.js +0 -37
  289. package/dist/node_modules/ajv/dist/vocabularies/applicator/items2020.js.map +0 -1
  290. package/dist/node_modules/ajv/dist/vocabularies/applicator/not.js +0 -29
  291. package/dist/node_modules/ajv/dist/vocabularies/applicator/not.js.map +0 -1
  292. package/dist/node_modules/ajv/dist/vocabularies/applicator/oneOf.js +0 -64
  293. package/dist/node_modules/ajv/dist/vocabularies/applicator/oneOf.js.map +0 -1
  294. package/dist/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js +0 -80
  295. package/dist/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js.map +0 -1
  296. package/dist/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js +0 -15
  297. package/dist/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js.map +0 -1
  298. package/dist/node_modules/ajv/dist/vocabularies/applicator/properties.js +0 -61
  299. package/dist/node_modules/ajv/dist/vocabularies/applicator/properties.js.map +0 -1
  300. package/dist/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js +0 -42
  301. package/dist/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js.map +0 -1
  302. package/dist/node_modules/ajv/dist/vocabularies/applicator/thenElse.js +0 -16
  303. package/dist/node_modules/ajv/dist/vocabularies/applicator/thenElse.js.map +0 -1
  304. package/dist/node_modules/ajv/dist/vocabularies/code.js +0 -146
  305. package/dist/node_modules/ajv/dist/vocabularies/code.js.map +0 -1
  306. package/dist/node_modules/ajv/dist/vocabularies/core/id.js +0 -11
  307. package/dist/node_modules/ajv/dist/vocabularies/core/id.js.map +0 -1
  308. package/dist/node_modules/ajv/dist/vocabularies/core/index.js +0 -21
  309. package/dist/node_modules/ajv/dist/vocabularies/core/index.js.map +0 -1
  310. package/dist/node_modules/ajv/dist/vocabularies/core/ref.js +0 -131
  311. package/dist/node_modules/ajv/dist/vocabularies/core/ref.js.map +0 -1
  312. package/dist/node_modules/ajv/dist/vocabularies/discriminator/index.js +0 -113
  313. package/dist/node_modules/ajv/dist/vocabularies/discriminator/index.js.map +0 -1
  314. package/dist/node_modules/ajv/dist/vocabularies/discriminator/types.js +0 -12
  315. package/dist/node_modules/ajv/dist/vocabularies/discriminator/types.js.map +0 -1
  316. package/dist/node_modules/ajv/dist/vocabularies/draft7.js +0 -28
  317. package/dist/node_modules/ajv/dist/vocabularies/draft7.js.map +0 -1
  318. package/dist/node_modules/ajv/dist/vocabularies/format/format.js +0 -94
  319. package/dist/node_modules/ajv/dist/vocabularies/format/format.js.map +0 -1
  320. package/dist/node_modules/ajv/dist/vocabularies/format/index.js +0 -9
  321. package/dist/node_modules/ajv/dist/vocabularies/format/index.js.map +0 -1
  322. package/dist/node_modules/ajv/dist/vocabularies/metadata.js +0 -21
  323. package/dist/node_modules/ajv/dist/vocabularies/metadata.js.map +0 -1
  324. package/dist/node_modules/ajv/dist/vocabularies/validation/const.js +0 -31
  325. package/dist/node_modules/ajv/dist/vocabularies/validation/const.js.map +0 -1
  326. package/dist/node_modules/ajv/dist/vocabularies/validation/enum.js +0 -54
  327. package/dist/node_modules/ajv/dist/vocabularies/validation/enum.js.map +0 -1
  328. package/dist/node_modules/ajv/dist/vocabularies/validation/index.js +0 -54
  329. package/dist/node_modules/ajv/dist/vocabularies/validation/index.js.map +0 -1
  330. package/dist/node_modules/ajv/dist/vocabularies/validation/limitItems.js +0 -26
  331. package/dist/node_modules/ajv/dist/vocabularies/validation/limitItems.js.map +0 -1
  332. package/dist/node_modules/ajv/dist/vocabularies/validation/limitLength.js +0 -33
  333. package/dist/node_modules/ajv/dist/vocabularies/validation/limitLength.js.map +0 -1
  334. package/dist/node_modules/ajv/dist/vocabularies/validation/limitNumber.js +0 -29
  335. package/dist/node_modules/ajv/dist/vocabularies/validation/limitNumber.js.map +0 -1
  336. package/dist/node_modules/ajv/dist/vocabularies/validation/limitProperties.js +0 -26
  337. package/dist/node_modules/ajv/dist/vocabularies/validation/limitProperties.js.map +0 -1
  338. package/dist/node_modules/ajv/dist/vocabularies/validation/multipleOf.js +0 -28
  339. package/dist/node_modules/ajv/dist/vocabularies/validation/multipleOf.js.map +0 -1
  340. package/dist/node_modules/ajv/dist/vocabularies/validation/pattern.js +0 -27
  341. package/dist/node_modules/ajv/dist/vocabularies/validation/pattern.js.map +0 -1
  342. package/dist/node_modules/ajv/dist/vocabularies/validation/required.js +0 -84
  343. package/dist/node_modules/ajv/dist/vocabularies/validation/required.js.map +0 -1
  344. package/dist/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js +0 -72
  345. package/dist/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js.map +0 -1
  346. package/dist/node_modules/ajv-formats/dist/formats.js +0 -212
  347. package/dist/node_modules/ajv-formats/dist/formats.js.map +0 -1
  348. package/dist/node_modules/ajv-formats/dist/index.js +0 -52
  349. package/dist/node_modules/ajv-formats/dist/index.js.map +0 -1
  350. package/dist/node_modules/ajv-formats/dist/limit.js +0 -75
  351. package/dist/node_modules/ajv-formats/dist/limit.js.map +0 -1
  352. package/dist/node_modules/diff/libesm/diff/base.js +0 -256
  353. package/dist/node_modules/diff/libesm/diff/base.js.map +0 -1
  354. package/dist/node_modules/diff/libesm/diff/line.js +0 -64
  355. package/dist/node_modules/diff/libesm/diff/line.js.map +0 -1
  356. package/dist/node_modules/diff/libesm/patch/create.js +0 -185
  357. package/dist/node_modules/diff/libesm/patch/create.js.map +0 -1
  358. package/dist/node_modules/fast-deep-equal/index.js +0 -47
  359. package/dist/node_modules/fast-deep-equal/index.js.map +0 -1
  360. package/dist/node_modules/fast-uri/index.js +0 -347
  361. package/dist/node_modules/fast-uri/index.js.map +0 -1
  362. package/dist/node_modules/fast-uri/lib/schemes.js +0 -255
  363. package/dist/node_modules/fast-uri/lib/schemes.js.map +0 -1
  364. package/dist/node_modules/fast-uri/lib/utils.js +0 -334
  365. package/dist/node_modules/fast-uri/lib/utils.js.map +0 -1
  366. package/dist/node_modules/json-schema-traverse/index.js +0 -98
  367. package/dist/node_modules/json-schema-traverse/index.js.map +0 -1
  368. package/dist/node_modules/uuid/dist/rng.js +0 -14
  369. package/dist/node_modules/uuid/dist/rng.js.map +0 -1
  370. package/dist/node_modules/uuid/dist/stringify.js +0 -29
  371. package/dist/node_modules/uuid/dist/stringify.js.map +0 -1
  372. package/dist/node_modules/uuid/dist/v7.js +0 -65
  373. package/dist/node_modules/uuid/dist/v7.js.map +0 -1
  374. package/dist/node_modules/zod-to-json-schema/dist/esm/Options.js +0 -37
  375. package/dist/node_modules/zod-to-json-schema/dist/esm/Options.js.map +0 -1
  376. package/dist/node_modules/zod-to-json-schema/dist/esm/Refs.js +0 -26
  377. package/dist/node_modules/zod-to-json-schema/dist/esm/Refs.js.map +0 -1
  378. package/dist/node_modules/zod-to-json-schema/dist/esm/errorMessages.js +0 -17
  379. package/dist/node_modules/zod-to-json-schema/dist/esm/errorMessages.js.map +0 -1
  380. package/dist/node_modules/zod-to-json-schema/dist/esm/getRelativePath.js +0 -11
  381. package/dist/node_modules/zod-to-json-schema/dist/esm/getRelativePath.js.map +0 -1
  382. package/dist/node_modules/zod-to-json-schema/dist/esm/parseDef.js +0 -66
  383. package/dist/node_modules/zod-to-json-schema/dist/esm/parseDef.js.map +0 -1
  384. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/any.js +0 -21
  385. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/any.js.map +0 -1
  386. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/array.js +0 -30
  387. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/array.js.map +0 -1
  388. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js +0 -53
  389. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js.map +0 -1
  390. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/boolean.js +0 -8
  391. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/boolean.js.map +0 -1
  392. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/branded.js +0 -8
  393. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/branded.js.map +0 -1
  394. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/catch.js +0 -8
  395. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/catch.js.map +0 -1
  396. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/date.js +0 -50
  397. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/date.js.map +0 -1
  398. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/default.js +0 -11
  399. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/default.js.map +0 -1
  400. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/effects.js +0 -11
  401. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/effects.js.map +0 -1
  402. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/enum.js +0 -9
  403. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/enum.js.map +0 -1
  404. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js +0 -56
  405. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js.map +0 -1
  406. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/literal.js +0 -24
  407. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/literal.js.map +0 -1
  408. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/map.js +0 -30
  409. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/map.js.map +0 -1
  410. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/nativeEnum.js +0 -19
  411. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/nativeEnum.js.map +0 -1
  412. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/never.js +0 -15
  413. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/never.js.map +0 -1
  414. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/null.js +0 -13
  415. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/null.js.map +0 -1
  416. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/nullable.js +0 -37
  417. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/nullable.js.map +0 -1
  418. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/number.js +0 -56
  419. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/number.js.map +0 -1
  420. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/object.js +0 -76
  421. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/object.js.map +0 -1
  422. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/optional.js +0 -25
  423. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/optional.js.map +0 -1
  424. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/pipeline.js +0 -24
  425. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/pipeline.js.map +0 -1
  426. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/promise.js +0 -8
  427. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/promise.js.map +0 -1
  428. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js +0 -8
  429. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js.map +0 -1
  430. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/record.js +0 -65
  431. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/record.js.map +0 -1
  432. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/set.js +0 -24
  433. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/set.js.map +0 -1
  434. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/string.js +0 -350
  435. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/string.js.map +0 -1
  436. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/tuple.js +0 -36
  437. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/tuple.js.map +0 -1
  438. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/undefined.js +0 -10
  439. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/undefined.js.map +0 -1
  440. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/union.js +0 -84
  441. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/union.js.map +0 -1
  442. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/unknown.js +0 -8
  443. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/unknown.js.map +0 -1
  444. package/dist/node_modules/zod-to-json-schema/dist/esm/selectParser.js +0 -109
  445. package/dist/node_modules/zod-to-json-schema/dist/esm/selectParser.js.map +0 -1
  446. package/dist/node_modules/zod-to-json-schema/dist/esm/zodToJsonSchema.js +0 -90
  447. package/dist/node_modules/zod-to-json-schema/dist/esm/zodToJsonSchema.js.map +0 -1
  448. package/dist/node_modules/zod-to-json-schema/node_modules/zod/v3/types.js +0 -42
  449. package/dist/node_modules/zod-to-json-schema/node_modules/zod/v3/types.js.map +0 -1
  450. package/dist/package.json.js +0 -8
  451. package/dist/package.json.js.map +0 -1
  452. package/dist/src/acp-extensions.d.ts +0 -91
  453. package/dist/src/acp-extensions.d.ts.map +0 -1
  454. package/dist/src/acp-extensions.js +0 -38
  455. package/dist/src/acp-extensions.js.map +0 -1
  456. package/dist/src/adapters/claude/claude.d.ts +0 -136
  457. package/dist/src/adapters/claude/claude.d.ts.map +0 -1
  458. package/dist/src/adapters/claude/claude.js +0 -1128
  459. package/dist/src/adapters/claude/claude.js.map +0 -1
  460. package/dist/src/adapters/claude/mcp-server.d.ts +0 -30
  461. package/dist/src/adapters/claude/mcp-server.d.ts.map +0 -1
  462. package/dist/src/adapters/claude/mcp-server.js +0 -668
  463. package/dist/src/adapters/claude/mcp-server.js.map +0 -1
  464. package/dist/src/adapters/claude/tools.d.ts +0 -35
  465. package/dist/src/adapters/claude/tools.d.ts.map +0 -1
  466. package/dist/src/adapters/claude/tools.js +0 -473
  467. package/dist/src/adapters/claude/tools.js.map +0 -1
  468. package/dist/src/adapters/claude/utils.d.ts +0 -48
  469. package/dist/src/adapters/claude/utils.d.ts.map +0 -1
  470. package/dist/src/adapters/claude/utils.js +0 -158
  471. package/dist/src/adapters/claude/utils.js.map +0 -1
  472. package/dist/src/agent.d.ts +0 -58
  473. package/dist/src/agent.d.ts.map +0 -1
  474. package/dist/src/agent.js +0 -576
  475. package/dist/src/agent.js.map +0 -1
  476. package/dist/src/agents/execution.d.ts +0 -2
  477. package/dist/src/agents/execution.d.ts.map +0 -1
  478. package/dist/src/agents/execution.js +0 -40
  479. package/dist/src/agents/execution.js.map +0 -1
  480. package/dist/src/agents/planning.d.ts +0 -2
  481. package/dist/src/agents/planning.d.ts.map +0 -1
  482. package/dist/src/agents/planning.js +0 -63
  483. package/dist/src/agents/planning.js.map +0 -1
  484. package/dist/src/agents/research.d.ts +0 -2
  485. package/dist/src/agents/research.d.ts.map +0 -1
  486. package/dist/src/agents/research.js +0 -163
  487. package/dist/src/agents/research.js.map +0 -1
  488. package/dist/src/file-manager.d.ts +0 -43
  489. package/dist/src/file-manager.d.ts.map +0 -1
  490. package/dist/src/file-manager.js +0 -266
  491. package/dist/src/file-manager.js.map +0 -1
  492. package/dist/src/git-manager.d.ts +0 -79
  493. package/dist/src/git-manager.d.ts.map +0 -1
  494. package/dist/src/git-manager.js +0 -454
  495. package/dist/src/git-manager.js.map +0 -1
  496. package/dist/src/posthog-api.d.ts +0 -48
  497. package/dist/src/posthog-api.d.ts.map +0 -1
  498. package/dist/src/posthog-api.js +0 -260
  499. package/dist/src/posthog-api.js.map +0 -1
  500. package/dist/src/prompt-builder.d.ts +0 -49
  501. package/dist/src/prompt-builder.d.ts.map +0 -1
  502. package/dist/src/prompt-builder.js +0 -397
  503. package/dist/src/prompt-builder.js.map +0 -1
  504. package/dist/src/schemas.d.ts +0 -980
  505. package/dist/src/schemas.d.ts.map +0 -1
  506. package/dist/src/schemas.js +0 -196
  507. package/dist/src/schemas.js.map +0 -1
  508. package/dist/src/session-store.d.ts +0 -58
  509. package/dist/src/session-store.d.ts.map +0 -1
  510. package/dist/src/session-store.js +0 -206
  511. package/dist/src/session-store.js.map +0 -1
  512. package/dist/src/task-manager.d.ts +0 -25
  513. package/dist/src/task-manager.d.ts.map +0 -1
  514. package/dist/src/task-manager.js +0 -123
  515. package/dist/src/task-manager.js.map +0 -1
  516. package/dist/src/template-manager.d.ts +0 -30
  517. package/dist/src/template-manager.d.ts.map +0 -1
  518. package/dist/src/template-manager.js +0 -152
  519. package/dist/src/template-manager.js.map +0 -1
  520. package/dist/src/todo-manager.d.ts +0 -29
  521. package/dist/src/todo-manager.d.ts.map +0 -1
  522. package/dist/src/todo-manager.js +0 -135
  523. package/dist/src/todo-manager.js.map +0 -1
  524. package/dist/src/tools/registry.d.ts +0 -25
  525. package/dist/src/tools/registry.d.ts.map +0 -1
  526. package/dist/src/tools/registry.js +0 -120
  527. package/dist/src/tools/registry.js.map +0 -1
  528. package/dist/src/tools/types.d.ts +0 -80
  529. package/dist/src/tools/types.d.ts.map +0 -1
  530. package/dist/src/types.d.ts +0 -193
  531. package/dist/src/types.d.ts.map +0 -1
  532. package/dist/src/types.js +0 -11
  533. package/dist/src/types.js.map +0 -1
  534. package/dist/src/utils/logger.d.ts +0 -37
  535. package/dist/src/utils/logger.d.ts.map +0 -1
  536. package/dist/src/utils/logger.js +0 -83
  537. package/dist/src/utils/logger.js.map +0 -1
  538. package/dist/src/utils/tapped-stream.d.ts +0 -17
  539. package/dist/src/utils/tapped-stream.d.ts.map +0 -1
  540. package/dist/src/utils/tapped-stream.js +0 -45
  541. package/dist/src/utils/tapped-stream.js.map +0 -1
  542. package/dist/src/workflow/config.d.ts +0 -3
  543. package/dist/src/workflow/config.d.ts.map +0 -1
  544. package/dist/src/workflow/config.js +0 -54
  545. package/dist/src/workflow/config.js.map +0 -1
  546. package/dist/src/workflow/steps/build.d.ts +0 -3
  547. package/dist/src/workflow/steps/build.d.ts.map +0 -1
  548. package/dist/src/workflow/steps/build.js +0 -108
  549. package/dist/src/workflow/steps/build.js.map +0 -1
  550. package/dist/src/workflow/steps/finalize.d.ts +0 -3
  551. package/dist/src/workflow/steps/finalize.d.ts.map +0 -1
  552. package/dist/src/workflow/steps/finalize.js +0 -188
  553. package/dist/src/workflow/steps/finalize.js.map +0 -1
  554. package/dist/src/workflow/steps/plan.d.ts +0 -3
  555. package/dist/src/workflow/steps/plan.d.ts.map +0 -1
  556. package/dist/src/workflow/steps/plan.js +0 -136
  557. package/dist/src/workflow/steps/plan.js.map +0 -1
  558. package/dist/src/workflow/steps/research.d.ts +0 -3
  559. package/dist/src/workflow/steps/research.d.ts.map +0 -1
  560. package/dist/src/workflow/steps/research.js +0 -189
  561. package/dist/src/workflow/steps/research.js.map +0 -1
  562. package/dist/src/workflow/types.d.ts +0 -51
  563. package/dist/src/workflow/types.d.ts.map +0 -1
  564. package/dist/src/workflow/utils.d.ts +0 -12
  565. package/dist/src/workflow/utils.d.ts.map +0 -1
  566. package/dist/src/workflow/utils.js +0 -41
  567. package/dist/src/workflow/utils.js.map +0 -1
  568. package/dist/src/worktree-manager.d.ts +0 -39
  569. package/dist/src/worktree-manager.d.ts.map +0 -1
  570. package/dist/src/worktree-manager.js +0 -808
  571. package/dist/src/worktree-manager.js.map +0 -1
@@ -1,657 +0,0 @@
1
- import { datetime, date, time, duration } from './iso.js';
2
- import { parse, safeParse, parseAsync, safeParseAsync } from './parse.js';
3
- import { _custom, _string, _number, _unknown, _array, _boolean, _email, _url, _jwt, _emoji, _guid, _uuid, _uuidv4, _uuidv6, _uuidv7, _nanoid, _cuid, _cuid2, _ulid, _base64, _base64url, _xid, _ksuid, _ipv4, _ipv6, _cidrv4, _cidrv6, _e164, _gt, _gte, _lt, _lte, _multipleOf, _minLength, _maxLength, _length, _overwrite, _never, _regex, _includes, _startsWith, _endsWith, _lowercase, _uppercase, _trim, _normalize, _toLowerCase, _toUpperCase, _int, _refine } from '../core/api.js';
4
- import { $constructor } from '../core/core.js';
5
- import { normalizeParams, assignProp, defineLazy, extend, merge, pick, omit, partial, required, issue, clone } from '../core/util.js';
6
- import { $ZodObject, $ZodUnion, $ZodDiscriminatedUnion, $ZodIntersection, $ZodRecord, $ZodEnum, $ZodLiteral, $ZodTransform, $ZodOptional, $ZodNonOptional, $ZodPipe, $ZodString, $ZodNumber, $ZodBoolean, $ZodUnknown, $ZodArray, $ZodType, $ZodCustom, $ZodNullable, $ZodDefault, $ZodPrefault, $ZodCatch, $ZodReadonly, $ZodStringFormat, $ZodEmail, $ZodGUID, $ZodUUID, $ZodURL, $ZodEmoji, $ZodNanoID, $ZodCUID, $ZodCUID2, $ZodULID, $ZodXID, $ZodKSUID, $ZodIPv4, $ZodIPv6, $ZodCIDRv4, $ZodCIDRv6, $ZodBase64, $ZodBase64URL, $ZodE164, $ZodJWT, $ZodNumberFormat, $ZodNever } from '../core/schemas.js';
7
- import { globalRegistry } from '../core/registries.js';
8
- import { $ZodCheck } from '../core/checks.js';
9
-
10
- const ZodType = /*@__PURE__*/ $constructor("ZodType", (inst, def) => {
11
- $ZodType.init(inst, def);
12
- inst.def = def;
13
- Object.defineProperty(inst, "_def", { value: def });
14
- // base methods
15
- inst.check = (...checks) => {
16
- return inst.clone({
17
- ...def,
18
- checks: [
19
- ...(def.checks ?? []),
20
- ...checks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch),
21
- ],
22
- }
23
- // { parent: true }
24
- );
25
- };
26
- inst.clone = (def, params) => clone(inst, def, params);
27
- inst.brand = () => inst;
28
- inst.register = ((reg, meta) => {
29
- reg.add(inst, meta);
30
- return inst;
31
- });
32
- // parsing
33
- inst.parse = (data, params) => parse(inst, data, params, { callee: inst.parse });
34
- inst.safeParse = (data, params) => safeParse(inst, data, params);
35
- inst.parseAsync = async (data, params) => parseAsync(inst, data, params, { callee: inst.parseAsync });
36
- inst.safeParseAsync = async (data, params) => safeParseAsync(inst, data, params);
37
- inst.spa = inst.safeParseAsync;
38
- // refinements
39
- inst.refine = (check, params) => inst.check(refine(check, params));
40
- inst.superRefine = (refinement) => inst.check(superRefine(refinement));
41
- inst.overwrite = (fn) => inst.check(_overwrite(fn));
42
- // wrappers
43
- inst.optional = () => optional(inst);
44
- inst.nullable = () => nullable(inst);
45
- inst.nullish = () => optional(nullable(inst));
46
- inst.nonoptional = (params) => nonoptional(inst, params);
47
- inst.array = () => array(inst);
48
- inst.or = (arg) => union([inst, arg]);
49
- inst.and = (arg) => intersection(inst, arg);
50
- inst.transform = (tx) => pipe(inst, transform(tx));
51
- inst.default = (def) => _default(inst, def);
52
- inst.prefault = (def) => prefault(inst, def);
53
- // inst.coalesce = (def, params) => coalesce(inst, def, params);
54
- inst.catch = (params) => _catch(inst, params);
55
- inst.pipe = (target) => pipe(inst, target);
56
- inst.readonly = () => readonly(inst);
57
- // meta
58
- inst.describe = (description) => {
59
- const cl = inst.clone();
60
- globalRegistry.add(cl, { description });
61
- return cl;
62
- };
63
- Object.defineProperty(inst, "description", {
64
- get() {
65
- return globalRegistry.get(inst)?.description;
66
- },
67
- configurable: true,
68
- });
69
- inst.meta = (...args) => {
70
- if (args.length === 0) {
71
- return globalRegistry.get(inst);
72
- }
73
- const cl = inst.clone();
74
- globalRegistry.add(cl, args[0]);
75
- return cl;
76
- };
77
- // helpers
78
- inst.isOptional = () => inst.safeParse(undefined).success;
79
- inst.isNullable = () => inst.safeParse(null).success;
80
- return inst;
81
- });
82
- /** @internal */
83
- const _ZodString = /*@__PURE__*/ $constructor("_ZodString", (inst, def) => {
84
- $ZodString.init(inst, def);
85
- ZodType.init(inst, def);
86
- const bag = inst._zod.bag;
87
- inst.format = bag.format ?? null;
88
- inst.minLength = bag.minimum ?? null;
89
- inst.maxLength = bag.maximum ?? null;
90
- // validations
91
- inst.regex = (...args) => inst.check(_regex(...args));
92
- inst.includes = (...args) => inst.check(_includes(...args));
93
- inst.startsWith = (...args) => inst.check(_startsWith(...args));
94
- inst.endsWith = (...args) => inst.check(_endsWith(...args));
95
- inst.min = (...args) => inst.check(_minLength(...args));
96
- inst.max = (...args) => inst.check(_maxLength(...args));
97
- inst.length = (...args) => inst.check(_length(...args));
98
- inst.nonempty = (...args) => inst.check(_minLength(1, ...args));
99
- inst.lowercase = (params) => inst.check(_lowercase(params));
100
- inst.uppercase = (params) => inst.check(_uppercase(params));
101
- // transforms
102
- inst.trim = () => inst.check(_trim());
103
- inst.normalize = (...args) => inst.check(_normalize(...args));
104
- inst.toLowerCase = () => inst.check(_toLowerCase());
105
- inst.toUpperCase = () => inst.check(_toUpperCase());
106
- });
107
- const ZodString = /*@__PURE__*/ $constructor("ZodString", (inst, def) => {
108
- $ZodString.init(inst, def);
109
- _ZodString.init(inst, def);
110
- inst.email = (params) => inst.check(_email(ZodEmail, params));
111
- inst.url = (params) => inst.check(_url(ZodURL, params));
112
- inst.jwt = (params) => inst.check(_jwt(ZodJWT, params));
113
- inst.emoji = (params) => inst.check(_emoji(ZodEmoji, params));
114
- inst.guid = (params) => inst.check(_guid(ZodGUID, params));
115
- inst.uuid = (params) => inst.check(_uuid(ZodUUID, params));
116
- inst.uuidv4 = (params) => inst.check(_uuidv4(ZodUUID, params));
117
- inst.uuidv6 = (params) => inst.check(_uuidv6(ZodUUID, params));
118
- inst.uuidv7 = (params) => inst.check(_uuidv7(ZodUUID, params));
119
- inst.nanoid = (params) => inst.check(_nanoid(ZodNanoID, params));
120
- inst.guid = (params) => inst.check(_guid(ZodGUID, params));
121
- inst.cuid = (params) => inst.check(_cuid(ZodCUID, params));
122
- inst.cuid2 = (params) => inst.check(_cuid2(ZodCUID2, params));
123
- inst.ulid = (params) => inst.check(_ulid(ZodULID, params));
124
- inst.base64 = (params) => inst.check(_base64(ZodBase64, params));
125
- inst.base64url = (params) => inst.check(_base64url(ZodBase64URL, params));
126
- inst.xid = (params) => inst.check(_xid(ZodXID, params));
127
- inst.ksuid = (params) => inst.check(_ksuid(ZodKSUID, params));
128
- inst.ipv4 = (params) => inst.check(_ipv4(ZodIPv4, params));
129
- inst.ipv6 = (params) => inst.check(_ipv6(ZodIPv6, params));
130
- inst.cidrv4 = (params) => inst.check(_cidrv4(ZodCIDRv4, params));
131
- inst.cidrv6 = (params) => inst.check(_cidrv6(ZodCIDRv6, params));
132
- inst.e164 = (params) => inst.check(_e164(ZodE164, params));
133
- // iso
134
- inst.datetime = (params) => inst.check(datetime(params));
135
- inst.date = (params) => inst.check(date(params));
136
- inst.time = (params) => inst.check(time(params));
137
- inst.duration = (params) => inst.check(duration(params));
138
- });
139
- function string(params) {
140
- return _string(ZodString, params);
141
- }
142
- const ZodStringFormat = /*@__PURE__*/ $constructor("ZodStringFormat", (inst, def) => {
143
- $ZodStringFormat.init(inst, def);
144
- _ZodString.init(inst, def);
145
- });
146
- const ZodEmail = /*@__PURE__*/ $constructor("ZodEmail", (inst, def) => {
147
- // ZodStringFormat.init(inst, def);
148
- $ZodEmail.init(inst, def);
149
- ZodStringFormat.init(inst, def);
150
- });
151
- const ZodGUID = /*@__PURE__*/ $constructor("ZodGUID", (inst, def) => {
152
- // ZodStringFormat.init(inst, def);
153
- $ZodGUID.init(inst, def);
154
- ZodStringFormat.init(inst, def);
155
- });
156
- const ZodUUID = /*@__PURE__*/ $constructor("ZodUUID", (inst, def) => {
157
- // ZodStringFormat.init(inst, def);
158
- $ZodUUID.init(inst, def);
159
- ZodStringFormat.init(inst, def);
160
- });
161
- const ZodURL = /*@__PURE__*/ $constructor("ZodURL", (inst, def) => {
162
- // ZodStringFormat.init(inst, def);
163
- $ZodURL.init(inst, def);
164
- ZodStringFormat.init(inst, def);
165
- });
166
- const ZodEmoji = /*@__PURE__*/ $constructor("ZodEmoji", (inst, def) => {
167
- // ZodStringFormat.init(inst, def);
168
- $ZodEmoji.init(inst, def);
169
- ZodStringFormat.init(inst, def);
170
- });
171
- const ZodNanoID = /*@__PURE__*/ $constructor("ZodNanoID", (inst, def) => {
172
- // ZodStringFormat.init(inst, def);
173
- $ZodNanoID.init(inst, def);
174
- ZodStringFormat.init(inst, def);
175
- });
176
- const ZodCUID = /*@__PURE__*/ $constructor("ZodCUID", (inst, def) => {
177
- // ZodStringFormat.init(inst, def);
178
- $ZodCUID.init(inst, def);
179
- ZodStringFormat.init(inst, def);
180
- });
181
- const ZodCUID2 = /*@__PURE__*/ $constructor("ZodCUID2", (inst, def) => {
182
- // ZodStringFormat.init(inst, def);
183
- $ZodCUID2.init(inst, def);
184
- ZodStringFormat.init(inst, def);
185
- });
186
- const ZodULID = /*@__PURE__*/ $constructor("ZodULID", (inst, def) => {
187
- // ZodStringFormat.init(inst, def);
188
- $ZodULID.init(inst, def);
189
- ZodStringFormat.init(inst, def);
190
- });
191
- const ZodXID = /*@__PURE__*/ $constructor("ZodXID", (inst, def) => {
192
- // ZodStringFormat.init(inst, def);
193
- $ZodXID.init(inst, def);
194
- ZodStringFormat.init(inst, def);
195
- });
196
- const ZodKSUID = /*@__PURE__*/ $constructor("ZodKSUID", (inst, def) => {
197
- // ZodStringFormat.init(inst, def);
198
- $ZodKSUID.init(inst, def);
199
- ZodStringFormat.init(inst, def);
200
- });
201
- const ZodIPv4 = /*@__PURE__*/ $constructor("ZodIPv4", (inst, def) => {
202
- // ZodStringFormat.init(inst, def);
203
- $ZodIPv4.init(inst, def);
204
- ZodStringFormat.init(inst, def);
205
- });
206
- const ZodIPv6 = /*@__PURE__*/ $constructor("ZodIPv6", (inst, def) => {
207
- // ZodStringFormat.init(inst, def);
208
- $ZodIPv6.init(inst, def);
209
- ZodStringFormat.init(inst, def);
210
- });
211
- const ZodCIDRv4 = /*@__PURE__*/ $constructor("ZodCIDRv4", (inst, def) => {
212
- $ZodCIDRv4.init(inst, def);
213
- ZodStringFormat.init(inst, def);
214
- });
215
- const ZodCIDRv6 = /*@__PURE__*/ $constructor("ZodCIDRv6", (inst, def) => {
216
- $ZodCIDRv6.init(inst, def);
217
- ZodStringFormat.init(inst, def);
218
- });
219
- const ZodBase64 = /*@__PURE__*/ $constructor("ZodBase64", (inst, def) => {
220
- // ZodStringFormat.init(inst, def);
221
- $ZodBase64.init(inst, def);
222
- ZodStringFormat.init(inst, def);
223
- });
224
- const ZodBase64URL = /*@__PURE__*/ $constructor("ZodBase64URL", (inst, def) => {
225
- // ZodStringFormat.init(inst, def);
226
- $ZodBase64URL.init(inst, def);
227
- ZodStringFormat.init(inst, def);
228
- });
229
- const ZodE164 = /*@__PURE__*/ $constructor("ZodE164", (inst, def) => {
230
- // ZodStringFormat.init(inst, def);
231
- $ZodE164.init(inst, def);
232
- ZodStringFormat.init(inst, def);
233
- });
234
- const ZodJWT = /*@__PURE__*/ $constructor("ZodJWT", (inst, def) => {
235
- // ZodStringFormat.init(inst, def);
236
- $ZodJWT.init(inst, def);
237
- ZodStringFormat.init(inst, def);
238
- });
239
- const ZodNumber = /*@__PURE__*/ $constructor("ZodNumber", (inst, def) => {
240
- $ZodNumber.init(inst, def);
241
- ZodType.init(inst, def);
242
- inst.gt = (value, params) => inst.check(_gt(value, params));
243
- inst.gte = (value, params) => inst.check(_gte(value, params));
244
- inst.min = (value, params) => inst.check(_gte(value, params));
245
- inst.lt = (value, params) => inst.check(_lt(value, params));
246
- inst.lte = (value, params) => inst.check(_lte(value, params));
247
- inst.max = (value, params) => inst.check(_lte(value, params));
248
- inst.int = (params) => inst.check(int(params));
249
- inst.safe = (params) => inst.check(int(params));
250
- inst.positive = (params) => inst.check(_gt(0, params));
251
- inst.nonnegative = (params) => inst.check(_gte(0, params));
252
- inst.negative = (params) => inst.check(_lt(0, params));
253
- inst.nonpositive = (params) => inst.check(_lte(0, params));
254
- inst.multipleOf = (value, params) => inst.check(_multipleOf(value, params));
255
- inst.step = (value, params) => inst.check(_multipleOf(value, params));
256
- // inst.finite = (params) => inst.check(core.finite(params));
257
- inst.finite = () => inst;
258
- const bag = inst._zod.bag;
259
- inst.minValue =
260
- Math.max(bag.minimum ?? Number.NEGATIVE_INFINITY, bag.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null;
261
- inst.maxValue =
262
- Math.min(bag.maximum ?? Number.POSITIVE_INFINITY, bag.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null;
263
- inst.isInt = (bag.format ?? "").includes("int") || Number.isSafeInteger(bag.multipleOf ?? 0.5);
264
- inst.isFinite = true;
265
- inst.format = bag.format ?? null;
266
- });
267
- function number(params) {
268
- return _number(ZodNumber, params);
269
- }
270
- const ZodNumberFormat = /*@__PURE__*/ $constructor("ZodNumberFormat", (inst, def) => {
271
- $ZodNumberFormat.init(inst, def);
272
- ZodNumber.init(inst, def);
273
- });
274
- function int(params) {
275
- return _int(ZodNumberFormat, params);
276
- }
277
- const ZodBoolean = /*@__PURE__*/ $constructor("ZodBoolean", (inst, def) => {
278
- $ZodBoolean.init(inst, def);
279
- ZodType.init(inst, def);
280
- });
281
- function boolean(params) {
282
- return _boolean(ZodBoolean, params);
283
- }
284
- const ZodUnknown = /*@__PURE__*/ $constructor("ZodUnknown", (inst, def) => {
285
- $ZodUnknown.init(inst, def);
286
- ZodType.init(inst, def);
287
- });
288
- function unknown() {
289
- return _unknown(ZodUnknown);
290
- }
291
- const ZodNever = /*@__PURE__*/ $constructor("ZodNever", (inst, def) => {
292
- $ZodNever.init(inst, def);
293
- ZodType.init(inst, def);
294
- });
295
- function never(params) {
296
- return _never(ZodNever, params);
297
- }
298
- const ZodArray = /*@__PURE__*/ $constructor("ZodArray", (inst, def) => {
299
- $ZodArray.init(inst, def);
300
- ZodType.init(inst, def);
301
- inst.element = def.element;
302
- inst.min = (minLength, params) => inst.check(_minLength(minLength, params));
303
- inst.nonempty = (params) => inst.check(_minLength(1, params));
304
- inst.max = (maxLength, params) => inst.check(_maxLength(maxLength, params));
305
- inst.length = (len, params) => inst.check(_length(len, params));
306
- inst.unwrap = () => inst.element;
307
- });
308
- function array(element, params) {
309
- return _array(ZodArray, element, params);
310
- }
311
- const ZodObject = /*@__PURE__*/ $constructor("ZodObject", (inst, def) => {
312
- $ZodObject.init(inst, def);
313
- ZodType.init(inst, def);
314
- defineLazy(inst, "shape", () => def.shape);
315
- inst.keyof = () => _enum(Object.keys(inst._zod.def.shape));
316
- inst.catchall = (catchall) => inst.clone({ ...inst._zod.def, catchall: catchall });
317
- inst.passthrough = () => inst.clone({ ...inst._zod.def, catchall: unknown() });
318
- // inst.nonstrict = () => inst.clone({ ...inst._zod.def, catchall: api.unknown() });
319
- inst.loose = () => inst.clone({ ...inst._zod.def, catchall: unknown() });
320
- inst.strict = () => inst.clone({ ...inst._zod.def, catchall: never() });
321
- inst.strip = () => inst.clone({ ...inst._zod.def, catchall: undefined });
322
- inst.extend = (incoming) => {
323
- return extend(inst, incoming);
324
- };
325
- inst.merge = (other) => merge(inst, other);
326
- inst.pick = (mask) => pick(inst, mask);
327
- inst.omit = (mask) => omit(inst, mask);
328
- inst.partial = (...args) => partial(ZodOptional, inst, args[0]);
329
- inst.required = (...args) => required(ZodNonOptional, inst, args[0]);
330
- });
331
- function object(shape, params) {
332
- const def = {
333
- type: "object",
334
- get shape() {
335
- assignProp(this, "shape", { ...shape });
336
- return this.shape;
337
- },
338
- ...normalizeParams(params),
339
- };
340
- return new ZodObject(def);
341
- }
342
- // looseObject
343
- function looseObject(shape, params) {
344
- return new ZodObject({
345
- type: "object",
346
- get shape() {
347
- assignProp(this, "shape", { ...shape });
348
- return this.shape;
349
- },
350
- catchall: unknown(),
351
- ...normalizeParams(params),
352
- });
353
- }
354
- const ZodUnion = /*@__PURE__*/ $constructor("ZodUnion", (inst, def) => {
355
- $ZodUnion.init(inst, def);
356
- ZodType.init(inst, def);
357
- inst.options = def.options;
358
- });
359
- function union(options, params) {
360
- return new ZodUnion({
361
- type: "union",
362
- options: options,
363
- ...normalizeParams(params),
364
- });
365
- }
366
- const ZodDiscriminatedUnion = /*@__PURE__*/ $constructor("ZodDiscriminatedUnion", (inst, def) => {
367
- ZodUnion.init(inst, def);
368
- $ZodDiscriminatedUnion.init(inst, def);
369
- });
370
- function discriminatedUnion(discriminator, options, params) {
371
- // const [options, params] = args;
372
- return new ZodDiscriminatedUnion({
373
- type: "union",
374
- options,
375
- discriminator,
376
- ...normalizeParams(params),
377
- });
378
- }
379
- const ZodIntersection = /*@__PURE__*/ $constructor("ZodIntersection", (inst, def) => {
380
- $ZodIntersection.init(inst, def);
381
- ZodType.init(inst, def);
382
- });
383
- function intersection(left, right) {
384
- return new ZodIntersection({
385
- type: "intersection",
386
- left: left,
387
- right: right,
388
- });
389
- }
390
- const ZodRecord = /*@__PURE__*/ $constructor("ZodRecord", (inst, def) => {
391
- $ZodRecord.init(inst, def);
392
- ZodType.init(inst, def);
393
- inst.keyType = def.keyType;
394
- inst.valueType = def.valueType;
395
- });
396
- function record(keyType, valueType, params) {
397
- return new ZodRecord({
398
- type: "record",
399
- keyType,
400
- valueType: valueType,
401
- ...normalizeParams(params),
402
- });
403
- }
404
- const ZodEnum = /*@__PURE__*/ $constructor("ZodEnum", (inst, def) => {
405
- $ZodEnum.init(inst, def);
406
- ZodType.init(inst, def);
407
- inst.enum = def.entries;
408
- inst.options = Object.values(def.entries);
409
- const keys = new Set(Object.keys(def.entries));
410
- inst.extract = (values, params) => {
411
- const newEntries = {};
412
- for (const value of values) {
413
- if (keys.has(value)) {
414
- newEntries[value] = def.entries[value];
415
- }
416
- else
417
- throw new Error(`Key ${value} not found in enum`);
418
- }
419
- return new ZodEnum({
420
- ...def,
421
- checks: [],
422
- ...normalizeParams(params),
423
- entries: newEntries,
424
- });
425
- };
426
- inst.exclude = (values, params) => {
427
- const newEntries = { ...def.entries };
428
- for (const value of values) {
429
- if (keys.has(value)) {
430
- delete newEntries[value];
431
- }
432
- else
433
- throw new Error(`Key ${value} not found in enum`);
434
- }
435
- return new ZodEnum({
436
- ...def,
437
- checks: [],
438
- ...normalizeParams(params),
439
- entries: newEntries,
440
- });
441
- };
442
- });
443
- function _enum(values, params) {
444
- const entries = Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values;
445
- return new ZodEnum({
446
- type: "enum",
447
- entries,
448
- ...normalizeParams(params),
449
- });
450
- }
451
- const ZodLiteral = /*@__PURE__*/ $constructor("ZodLiteral", (inst, def) => {
452
- $ZodLiteral.init(inst, def);
453
- ZodType.init(inst, def);
454
- inst.values = new Set(def.values);
455
- Object.defineProperty(inst, "value", {
456
- get() {
457
- if (def.values.length > 1) {
458
- throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");
459
- }
460
- return def.values[0];
461
- },
462
- });
463
- });
464
- function literal(value, params) {
465
- return new ZodLiteral({
466
- type: "literal",
467
- values: Array.isArray(value) ? value : [value],
468
- ...normalizeParams(params),
469
- });
470
- }
471
- const ZodTransform = /*@__PURE__*/ $constructor("ZodTransform", (inst, def) => {
472
- $ZodTransform.init(inst, def);
473
- ZodType.init(inst, def);
474
- inst._zod.parse = (payload, _ctx) => {
475
- payload.addIssue = (issue$1) => {
476
- if (typeof issue$1 === "string") {
477
- payload.issues.push(issue(issue$1, payload.value, def));
478
- }
479
- else {
480
- // for Zod 3 backwards compatibility
481
- const _issue = issue$1;
482
- if (_issue.fatal)
483
- _issue.continue = false;
484
- _issue.code ?? (_issue.code = "custom");
485
- _issue.input ?? (_issue.input = payload.value);
486
- _issue.inst ?? (_issue.inst = inst);
487
- _issue.continue ?? (_issue.continue = true);
488
- payload.issues.push(issue(_issue));
489
- }
490
- };
491
- const output = def.transform(payload.value, payload);
492
- if (output instanceof Promise) {
493
- return output.then((output) => {
494
- payload.value = output;
495
- return payload;
496
- });
497
- }
498
- payload.value = output;
499
- return payload;
500
- };
501
- });
502
- function transform(fn) {
503
- return new ZodTransform({
504
- type: "transform",
505
- transform: fn,
506
- });
507
- }
508
- const ZodOptional = /*@__PURE__*/ $constructor("ZodOptional", (inst, def) => {
509
- $ZodOptional.init(inst, def);
510
- ZodType.init(inst, def);
511
- inst.unwrap = () => inst._zod.def.innerType;
512
- });
513
- function optional(innerType) {
514
- return new ZodOptional({
515
- type: "optional",
516
- innerType: innerType,
517
- });
518
- }
519
- const ZodNullable = /*@__PURE__*/ $constructor("ZodNullable", (inst, def) => {
520
- $ZodNullable.init(inst, def);
521
- ZodType.init(inst, def);
522
- inst.unwrap = () => inst._zod.def.innerType;
523
- });
524
- function nullable(innerType) {
525
- return new ZodNullable({
526
- type: "nullable",
527
- innerType: innerType,
528
- });
529
- }
530
- const ZodDefault = /*@__PURE__*/ $constructor("ZodDefault", (inst, def) => {
531
- $ZodDefault.init(inst, def);
532
- ZodType.init(inst, def);
533
- inst.unwrap = () => inst._zod.def.innerType;
534
- inst.removeDefault = inst.unwrap;
535
- });
536
- function _default(innerType, defaultValue) {
537
- return new ZodDefault({
538
- type: "default",
539
- innerType: innerType,
540
- get defaultValue() {
541
- return typeof defaultValue === "function" ? defaultValue() : defaultValue;
542
- },
543
- });
544
- }
545
- const ZodPrefault = /*@__PURE__*/ $constructor("ZodPrefault", (inst, def) => {
546
- $ZodPrefault.init(inst, def);
547
- ZodType.init(inst, def);
548
- inst.unwrap = () => inst._zod.def.innerType;
549
- });
550
- function prefault(innerType, defaultValue) {
551
- return new ZodPrefault({
552
- type: "prefault",
553
- innerType: innerType,
554
- get defaultValue() {
555
- return typeof defaultValue === "function" ? defaultValue() : defaultValue;
556
- },
557
- });
558
- }
559
- const ZodNonOptional = /*@__PURE__*/ $constructor("ZodNonOptional", (inst, def) => {
560
- $ZodNonOptional.init(inst, def);
561
- ZodType.init(inst, def);
562
- inst.unwrap = () => inst._zod.def.innerType;
563
- });
564
- function nonoptional(innerType, params) {
565
- return new ZodNonOptional({
566
- type: "nonoptional",
567
- innerType: innerType,
568
- ...normalizeParams(params),
569
- });
570
- }
571
- const ZodCatch = /*@__PURE__*/ $constructor("ZodCatch", (inst, def) => {
572
- $ZodCatch.init(inst, def);
573
- ZodType.init(inst, def);
574
- inst.unwrap = () => inst._zod.def.innerType;
575
- inst.removeCatch = inst.unwrap;
576
- });
577
- function _catch(innerType, catchValue) {
578
- return new ZodCatch({
579
- type: "catch",
580
- innerType: innerType,
581
- catchValue: (typeof catchValue === "function" ? catchValue : () => catchValue),
582
- });
583
- }
584
- const ZodPipe = /*@__PURE__*/ $constructor("ZodPipe", (inst, def) => {
585
- $ZodPipe.init(inst, def);
586
- ZodType.init(inst, def);
587
- inst.in = def.in;
588
- inst.out = def.out;
589
- });
590
- function pipe(in_, out) {
591
- return new ZodPipe({
592
- type: "pipe",
593
- in: in_,
594
- out: out,
595
- // ...util.normalizeParams(params),
596
- });
597
- }
598
- const ZodReadonly = /*@__PURE__*/ $constructor("ZodReadonly", (inst, def) => {
599
- $ZodReadonly.init(inst, def);
600
- ZodType.init(inst, def);
601
- });
602
- function readonly(innerType) {
603
- return new ZodReadonly({
604
- type: "readonly",
605
- innerType: innerType,
606
- });
607
- }
608
- const ZodCustom = /*@__PURE__*/ $constructor("ZodCustom", (inst, def) => {
609
- $ZodCustom.init(inst, def);
610
- ZodType.init(inst, def);
611
- });
612
- // custom checks
613
- function check(fn) {
614
- const ch = new $ZodCheck({
615
- check: "custom",
616
- // ...util.normalizeParams(params),
617
- });
618
- ch._zod.check = fn;
619
- return ch;
620
- }
621
- function custom(fn, _params) {
622
- return _custom(ZodCustom, fn ?? (() => true), _params);
623
- }
624
- function refine(fn, _params = {}) {
625
- return _refine(ZodCustom, fn, _params);
626
- }
627
- // superRefine
628
- function superRefine(fn) {
629
- const ch = check((payload) => {
630
- payload.addIssue = (issue$1) => {
631
- if (typeof issue$1 === "string") {
632
- payload.issues.push(issue(issue$1, payload.value, ch._zod.def));
633
- }
634
- else {
635
- // for Zod 3 backwards compatibility
636
- const _issue = issue$1;
637
- if (_issue.fatal)
638
- _issue.continue = false;
639
- _issue.code ?? (_issue.code = "custom");
640
- _issue.input ?? (_issue.input = payload.value);
641
- _issue.inst ?? (_issue.inst = ch);
642
- _issue.continue ?? (_issue.continue = !ch._zod.def.abort);
643
- payload.issues.push(issue(_issue));
644
- }
645
- };
646
- return fn(payload.value, payload);
647
- });
648
- return ch;
649
- }
650
- // preprocess
651
- // /** @deprecated Use `z.pipe()` and `z.transform()` instead. */
652
- function preprocess(fn, schema) {
653
- return pipe(transform(fn), schema);
654
- }
655
-
656
- export { ZodArray, ZodBase64, ZodBase64URL, ZodBoolean, ZodCIDRv4, ZodCIDRv6, ZodCUID, ZodCUID2, ZodCatch, ZodCustom, ZodDefault, ZodDiscriminatedUnion, ZodE164, ZodEmail, ZodEmoji, ZodEnum, ZodGUID, ZodIPv4, ZodIPv6, ZodIntersection, ZodJWT, ZodKSUID, ZodLiteral, ZodNanoID, ZodNever, ZodNonOptional, ZodNullable, ZodNumber, ZodNumberFormat, ZodObject, ZodOptional, ZodPipe, ZodPrefault, ZodReadonly, ZodRecord, ZodString, ZodStringFormat, ZodTransform, ZodType, ZodULID, ZodURL, ZodUUID, ZodUnion, ZodUnknown, ZodXID, _ZodString, _default, array, boolean, _catch as catch, check, custom, discriminatedUnion, _enum as enum, int, intersection, literal, looseObject, never, nonoptional, nullable, number, object, optional, pipe, prefault, preprocess, readonly, record, refine, string, superRefine, transform, union, unknown };
657
- //# sourceMappingURL=schemas.js.map