@posthog/agent 1.24.2 → 1.25.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 (604) hide show
  1. package/dist/_virtual/_commonjsHelpers.js +6 -0
  2. package/dist/_virtual/_commonjsHelpers.js.map +1 -0
  3. package/dist/_virtual/additionalItems.js +4 -0
  4. package/dist/_virtual/additionalItems.js.map +1 -0
  5. package/dist/_virtual/additionalProperties.js +4 -0
  6. package/dist/_virtual/additionalProperties.js.map +1 -0
  7. package/dist/_virtual/ajv.js +4 -0
  8. package/dist/_virtual/ajv.js.map +1 -0
  9. package/dist/_virtual/allOf.js +4 -0
  10. package/dist/_virtual/allOf.js.map +1 -0
  11. package/dist/_virtual/anyOf.js +4 -0
  12. package/dist/_virtual/anyOf.js.map +1 -0
  13. package/dist/_virtual/applicability.js +4 -0
  14. package/dist/_virtual/applicability.js.map +1 -0
  15. package/dist/_virtual/boolSchema.js +4 -0
  16. package/dist/_virtual/boolSchema.js.map +1 -0
  17. package/dist/_virtual/code.js +4 -0
  18. package/dist/_virtual/code.js.map +1 -0
  19. package/dist/_virtual/code2.js +4 -0
  20. package/dist/_virtual/code2.js.map +1 -0
  21. package/dist/_virtual/const.js +4 -0
  22. package/dist/_virtual/const.js.map +1 -0
  23. package/dist/_virtual/contains.js +4 -0
  24. package/dist/_virtual/contains.js.map +1 -0
  25. package/dist/_virtual/core.js +4 -0
  26. package/dist/_virtual/core.js.map +1 -0
  27. package/dist/_virtual/dataType.js +4 -0
  28. package/dist/_virtual/dataType.js.map +1 -0
  29. package/dist/_virtual/defaults.js +4 -0
  30. package/dist/_virtual/defaults.js.map +1 -0
  31. package/dist/_virtual/dependencies.js +4 -0
  32. package/dist/_virtual/dependencies.js.map +1 -0
  33. package/dist/_virtual/draft7.js +4 -0
  34. package/dist/_virtual/draft7.js.map +1 -0
  35. package/dist/_virtual/enum.js +4 -0
  36. package/dist/_virtual/enum.js.map +1 -0
  37. package/dist/_virtual/equal.js +4 -0
  38. package/dist/_virtual/equal.js.map +1 -0
  39. package/dist/_virtual/errors.js +4 -0
  40. package/dist/_virtual/errors.js.map +1 -0
  41. package/dist/_virtual/format.js +4 -0
  42. package/dist/_virtual/format.js.map +1 -0
  43. package/dist/_virtual/formats.js +4 -0
  44. package/dist/_virtual/formats.js.map +1 -0
  45. package/dist/_virtual/id.js +4 -0
  46. package/dist/_virtual/id.js.map +1 -0
  47. package/dist/_virtual/if.js +4 -0
  48. package/dist/_virtual/if.js.map +1 -0
  49. package/dist/_virtual/index.js +4 -0
  50. package/dist/_virtual/index.js.map +1 -0
  51. package/dist/_virtual/index10.js +4 -0
  52. package/dist/_virtual/index10.js.map +1 -0
  53. package/dist/_virtual/index11.js +4 -0
  54. package/dist/_virtual/index11.js.map +1 -0
  55. package/dist/_virtual/index2.js +4 -0
  56. package/dist/_virtual/index2.js.map +1 -0
  57. package/dist/_virtual/index3.js +4 -0
  58. package/dist/_virtual/index3.js.map +1 -0
  59. package/dist/_virtual/index4.js +4 -0
  60. package/dist/_virtual/index4.js.map +1 -0
  61. package/dist/_virtual/index5.js +4 -0
  62. package/dist/_virtual/index5.js.map +1 -0
  63. package/dist/_virtual/index6.js +4 -0
  64. package/dist/_virtual/index6.js.map +1 -0
  65. package/dist/_virtual/index7.js +4 -0
  66. package/dist/_virtual/index7.js.map +1 -0
  67. package/dist/_virtual/index8.js +4 -0
  68. package/dist/_virtual/index8.js.map +1 -0
  69. package/dist/_virtual/index9.js +4 -0
  70. package/dist/_virtual/index9.js.map +1 -0
  71. package/dist/_virtual/items.js +4 -0
  72. package/dist/_virtual/items.js.map +1 -0
  73. package/dist/_virtual/items2020.js +4 -0
  74. package/dist/_virtual/items2020.js.map +1 -0
  75. package/dist/_virtual/keyword.js +4 -0
  76. package/dist/_virtual/keyword.js.map +1 -0
  77. package/dist/_virtual/limit.js +4 -0
  78. package/dist/_virtual/limit.js.map +1 -0
  79. package/dist/_virtual/limitItems.js +4 -0
  80. package/dist/_virtual/limitItems.js.map +1 -0
  81. package/dist/_virtual/limitLength.js +4 -0
  82. package/dist/_virtual/limitLength.js.map +1 -0
  83. package/dist/_virtual/limitNumber.js +4 -0
  84. package/dist/_virtual/limitNumber.js.map +1 -0
  85. package/dist/_virtual/limitProperties.js +4 -0
  86. package/dist/_virtual/limitProperties.js.map +1 -0
  87. package/dist/_virtual/metadata.js +4 -0
  88. package/dist/_virtual/metadata.js.map +1 -0
  89. package/dist/_virtual/multipleOf.js +4 -0
  90. package/dist/_virtual/multipleOf.js.map +1 -0
  91. package/dist/_virtual/names.js +4 -0
  92. package/dist/_virtual/names.js.map +1 -0
  93. package/dist/_virtual/not.js +4 -0
  94. package/dist/_virtual/not.js.map +1 -0
  95. package/dist/_virtual/oneOf.js +4 -0
  96. package/dist/_virtual/oneOf.js.map +1 -0
  97. package/dist/_virtual/pattern.js +4 -0
  98. package/dist/_virtual/pattern.js.map +1 -0
  99. package/dist/_virtual/patternProperties.js +4 -0
  100. package/dist/_virtual/patternProperties.js.map +1 -0
  101. package/dist/_virtual/prefixItems.js +4 -0
  102. package/dist/_virtual/prefixItems.js.map +1 -0
  103. package/dist/_virtual/properties.js +4 -0
  104. package/dist/_virtual/properties.js.map +1 -0
  105. package/dist/_virtual/propertyNames.js +4 -0
  106. package/dist/_virtual/propertyNames.js.map +1 -0
  107. package/dist/_virtual/ref.js +4 -0
  108. package/dist/_virtual/ref.js.map +1 -0
  109. package/dist/_virtual/ref_error.js +4 -0
  110. package/dist/_virtual/ref_error.js.map +1 -0
  111. package/dist/_virtual/required.js +4 -0
  112. package/dist/_virtual/required.js.map +1 -0
  113. package/dist/_virtual/resolve.js +4 -0
  114. package/dist/_virtual/resolve.js.map +1 -0
  115. package/dist/_virtual/rules.js +4 -0
  116. package/dist/_virtual/rules.js.map +1 -0
  117. package/dist/_virtual/scope.js +4 -0
  118. package/dist/_virtual/scope.js.map +1 -0
  119. package/dist/_virtual/subschema.js +4 -0
  120. package/dist/_virtual/subschema.js.map +1 -0
  121. package/dist/_virtual/thenElse.js +4 -0
  122. package/dist/_virtual/thenElse.js.map +1 -0
  123. package/dist/_virtual/types.js +4 -0
  124. package/dist/_virtual/types.js.map +1 -0
  125. package/dist/_virtual/ucs2length.js +4 -0
  126. package/dist/_virtual/ucs2length.js.map +1 -0
  127. package/dist/_virtual/uniqueItems.js +4 -0
  128. package/dist/_virtual/uniqueItems.js.map +1 -0
  129. package/dist/_virtual/uri.js +4 -0
  130. package/dist/_virtual/uri.js.map +1 -0
  131. package/dist/_virtual/util.js +4 -0
  132. package/dist/_virtual/util.js.map +1 -0
  133. package/dist/_virtual/validation_error.js +4 -0
  134. package/dist/_virtual/validation_error.js.map +1 -0
  135. package/dist/claude-cli/cli.js +2294 -2146
  136. package/dist/example-client.d.ts +3 -0
  137. package/dist/example-client.d.ts.map +1 -0
  138. package/dist/index.d.ts +19 -11
  139. package/dist/index.d.ts.map +1 -1
  140. package/dist/index.js +7 -3
  141. package/dist/index.js.map +1 -1
  142. package/dist/node_modules/@agentclientprotocol/sdk/dist/acp.js +610 -0
  143. package/dist/node_modules/@agentclientprotocol/sdk/dist/acp.js.map +1 -0
  144. package/dist/node_modules/@agentclientprotocol/sdk/dist/schema.js +875 -0
  145. package/dist/node_modules/@agentclientprotocol/sdk/dist/schema.js.map +1 -0
  146. package/dist/node_modules/@agentclientprotocol/sdk/dist/stream.js +66 -0
  147. package/dist/node_modules/@agentclientprotocol/sdk/dist/stream.js.map +1 -0
  148. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/server/completable.js +23 -0
  149. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/server/completable.js.map +1 -0
  150. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js +331 -0
  151. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js.map +1 -0
  152. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js +717 -0
  153. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js.map +1 -0
  154. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js +221 -0
  155. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js.map +1 -0
  156. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js +56 -0
  157. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js.map +1 -0
  158. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js +440 -0
  159. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js.map +1 -0
  160. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/toolNameValidation.js +94 -0
  161. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/toolNameValidation.js.map +1 -0
  162. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js +1610 -0
  163. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js.map +1 -0
  164. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js +91 -0
  165. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js.map +1 -0
  166. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v3/ZodError.js +133 -0
  167. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v3/ZodError.js.map +1 -0
  168. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v3/errors.js +9 -0
  169. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v3/errors.js.map +1 -0
  170. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v3/helpers/errorUtil.js +9 -0
  171. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v3/helpers/errorUtil.js.map +1 -0
  172. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v3/helpers/parseUtil.js +112 -0
  173. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v3/helpers/parseUtil.js.map +1 -0
  174. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v3/helpers/util.js +136 -0
  175. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v3/helpers/util.js.map +1 -0
  176. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v3/locales/en.js +112 -0
  177. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v3/locales/en.js.map +1 -0
  178. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v3/types.js +3297 -0
  179. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v3/types.js.map +1 -0
  180. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/classic/errors.js +44 -0
  181. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/classic/errors.js.map +1 -0
  182. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/classic/iso.js +36 -0
  183. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/classic/iso.js.map +1 -0
  184. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/classic/parse.js +10 -0
  185. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/classic/parse.js.map +1 -0
  186. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/classic/schemas.js +657 -0
  187. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/classic/schemas.js.map +1 -0
  188. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/core/api.js +449 -0
  189. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/core/api.js.map +1 -0
  190. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/core/checks.js +413 -0
  191. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/core/checks.js.map +1 -0
  192. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/core/core.js +57 -0
  193. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/core/core.js.map +1 -0
  194. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/core/doc.js +38 -0
  195. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/core/doc.js.map +1 -0
  196. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/core/errors.js +86 -0
  197. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/core/errors.js.map +1 -0
  198. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/core/parse.js +61 -0
  199. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/core/parse.js.map +1 -0
  200. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/core/regexes.js +80 -0
  201. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/core/regexes.js.map +1 -0
  202. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/core/registries.js +52 -0
  203. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/core/registries.js.map +1 -0
  204. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/core/schemas.js +1307 -0
  205. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/core/schemas.js.map +1 -0
  206. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/core/to-json-schema.js +842 -0
  207. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/core/to-json-schema.js.map +1 -0
  208. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/core/util.js +335 -0
  209. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/core/util.js.map +1 -0
  210. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/core/versions.js +8 -0
  211. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/core/versions.js.map +1 -0
  212. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/mini/schemas.js +51 -0
  213. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/mini/schemas.js.map +1 -0
  214. package/dist/node_modules/ajv/dist/ajv.js +69 -0
  215. package/dist/node_modules/ajv/dist/ajv.js.map +1 -0
  216. package/dist/node_modules/ajv/dist/compile/codegen/code.js +169 -0
  217. package/dist/node_modules/ajv/dist/compile/codegen/code.js.map +1 -0
  218. package/dist/node_modules/ajv/dist/compile/codegen/index.js +712 -0
  219. package/dist/node_modules/ajv/dist/compile/codegen/index.js.map +1 -0
  220. package/dist/node_modules/ajv/dist/compile/codegen/scope.js +157 -0
  221. package/dist/node_modules/ajv/dist/compile/codegen/scope.js.map +1 -0
  222. package/dist/node_modules/ajv/dist/compile/errors.js +140 -0
  223. package/dist/node_modules/ajv/dist/compile/errors.js.map +1 -0
  224. package/dist/node_modules/ajv/dist/compile/index.js +253 -0
  225. package/dist/node_modules/ajv/dist/compile/index.js.map +1 -0
  226. package/dist/node_modules/ajv/dist/compile/names.js +40 -0
  227. package/dist/node_modules/ajv/dist/compile/names.js.map +1 -0
  228. package/dist/node_modules/ajv/dist/compile/ref_error.js +25 -0
  229. package/dist/node_modules/ajv/dist/compile/ref_error.js.map +1 -0
  230. package/dist/node_modules/ajv/dist/compile/resolve.js +162 -0
  231. package/dist/node_modules/ajv/dist/compile/resolve.js.map +1 -0
  232. package/dist/node_modules/ajv/dist/compile/rules.js +29 -0
  233. package/dist/node_modules/ajv/dist/compile/rules.js.map +1 -0
  234. package/dist/node_modules/ajv/dist/compile/util.js +183 -0
  235. package/dist/node_modules/ajv/dist/compile/util.js.map +1 -0
  236. package/dist/node_modules/ajv/dist/compile/validate/applicability.js +30 -0
  237. package/dist/node_modules/ajv/dist/compile/validate/applicability.js.map +1 -0
  238. package/dist/node_modules/ajv/dist/compile/validate/boolSchema.js +64 -0
  239. package/dist/node_modules/ajv/dist/compile/validate/boolSchema.js.map +1 -0
  240. package/dist/node_modules/ajv/dist/compile/validate/dataType.js +213 -0
  241. package/dist/node_modules/ajv/dist/compile/validate/dataType.js.map +1 -0
  242. package/dist/node_modules/ajv/dist/compile/validate/defaults.js +49 -0
  243. package/dist/node_modules/ajv/dist/compile/validate/defaults.js.map +1 -0
  244. package/dist/node_modules/ajv/dist/compile/validate/index.js +544 -0
  245. package/dist/node_modules/ajv/dist/compile/validate/index.js.map +1 -0
  246. package/dist/node_modules/ajv/dist/compile/validate/keyword.js +139 -0
  247. package/dist/node_modules/ajv/dist/compile/validate/keyword.js.map +1 -0
  248. package/dist/node_modules/ajv/dist/compile/validate/subschema.js +95 -0
  249. package/dist/node_modules/ajv/dist/compile/validate/subschema.js.map +1 -0
  250. package/dist/node_modules/ajv/dist/core.js +639 -0
  251. package/dist/node_modules/ajv/dist/core.js.map +1 -0
  252. package/dist/node_modules/ajv/dist/refs/data.json.js +31 -0
  253. package/dist/node_modules/ajv/dist/refs/data.json.js.map +1 -0
  254. package/dist/node_modules/ajv/dist/refs/json-schema-draft-07.json.js +254 -0
  255. package/dist/node_modules/ajv/dist/refs/json-schema-draft-07.json.js.map +1 -0
  256. package/dist/node_modules/ajv/dist/runtime/equal.js +9 -0
  257. package/dist/node_modules/ajv/dist/runtime/equal.js.map +1 -0
  258. package/dist/node_modules/ajv/dist/runtime/ucs2length.js +25 -0
  259. package/dist/node_modules/ajv/dist/runtime/ucs2length.js.map +1 -0
  260. package/dist/node_modules/ajv/dist/runtime/uri.js +8 -0
  261. package/dist/node_modules/ajv/dist/runtime/uri.js.map +1 -0
  262. package/dist/node_modules/ajv/dist/runtime/validation_error.js +22 -0
  263. package/dist/node_modules/ajv/dist/runtime/validation_error.js.map +1 -0
  264. package/dist/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js +53 -0
  265. package/dist/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js.map +1 -0
  266. package/dist/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js +112 -0
  267. package/dist/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js.map +1 -0
  268. package/dist/node_modules/ajv/dist/vocabularies/applicator/allOf.js +26 -0
  269. package/dist/node_modules/ajv/dist/vocabularies/applicator/allOf.js.map +1 -0
  270. package/dist/node_modules/ajv/dist/vocabularies/applicator/anyOf.js +14 -0
  271. package/dist/node_modules/ajv/dist/vocabularies/applicator/anyOf.js.map +1 -0
  272. package/dist/node_modules/ajv/dist/vocabularies/applicator/contains.js +99 -0
  273. package/dist/node_modules/ajv/dist/vocabularies/applicator/contains.js.map +1 -0
  274. package/dist/node_modules/ajv/dist/vocabularies/applicator/dependencies.js +93 -0
  275. package/dist/node_modules/ajv/dist/vocabularies/applicator/dependencies.js.map +1 -0
  276. package/dist/node_modules/ajv/dist/vocabularies/applicator/if.js +70 -0
  277. package/dist/node_modules/ajv/dist/vocabularies/applicator/if.js.map +1 -0
  278. package/dist/node_modules/ajv/dist/vocabularies/applicator/index.js +77 -0
  279. package/dist/node_modules/ajv/dist/vocabularies/applicator/index.js.map +1 -0
  280. package/dist/node_modules/ajv/dist/vocabularies/applicator/items.js +57 -0
  281. package/dist/node_modules/ajv/dist/vocabularies/applicator/items.js.map +1 -0
  282. package/dist/node_modules/ajv/dist/vocabularies/applicator/items2020.js +37 -0
  283. package/dist/node_modules/ajv/dist/vocabularies/applicator/items2020.js.map +1 -0
  284. package/dist/node_modules/ajv/dist/vocabularies/applicator/not.js +29 -0
  285. package/dist/node_modules/ajv/dist/vocabularies/applicator/not.js.map +1 -0
  286. package/dist/node_modules/ajv/dist/vocabularies/applicator/oneOf.js +64 -0
  287. package/dist/node_modules/ajv/dist/vocabularies/applicator/oneOf.js.map +1 -0
  288. package/dist/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js +80 -0
  289. package/dist/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js.map +1 -0
  290. package/dist/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js +15 -0
  291. package/dist/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js.map +1 -0
  292. package/dist/node_modules/ajv/dist/vocabularies/applicator/properties.js +61 -0
  293. package/dist/node_modules/ajv/dist/vocabularies/applicator/properties.js.map +1 -0
  294. package/dist/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js +42 -0
  295. package/dist/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js.map +1 -0
  296. package/dist/node_modules/ajv/dist/vocabularies/applicator/thenElse.js +16 -0
  297. package/dist/node_modules/ajv/dist/vocabularies/applicator/thenElse.js.map +1 -0
  298. package/dist/node_modules/ajv/dist/vocabularies/code.js +146 -0
  299. package/dist/node_modules/ajv/dist/vocabularies/code.js.map +1 -0
  300. package/dist/node_modules/ajv/dist/vocabularies/core/id.js +11 -0
  301. package/dist/node_modules/ajv/dist/vocabularies/core/id.js.map +1 -0
  302. package/dist/node_modules/ajv/dist/vocabularies/core/index.js +21 -0
  303. package/dist/node_modules/ajv/dist/vocabularies/core/index.js.map +1 -0
  304. package/dist/node_modules/ajv/dist/vocabularies/core/ref.js +131 -0
  305. package/dist/node_modules/ajv/dist/vocabularies/core/ref.js.map +1 -0
  306. package/dist/node_modules/ajv/dist/vocabularies/discriminator/index.js +113 -0
  307. package/dist/node_modules/ajv/dist/vocabularies/discriminator/index.js.map +1 -0
  308. package/dist/node_modules/ajv/dist/vocabularies/discriminator/types.js +12 -0
  309. package/dist/node_modules/ajv/dist/vocabularies/discriminator/types.js.map +1 -0
  310. package/dist/node_modules/ajv/dist/vocabularies/draft7.js +28 -0
  311. package/dist/node_modules/ajv/dist/vocabularies/draft7.js.map +1 -0
  312. package/dist/node_modules/ajv/dist/vocabularies/format/format.js +94 -0
  313. package/dist/node_modules/ajv/dist/vocabularies/format/format.js.map +1 -0
  314. package/dist/node_modules/ajv/dist/vocabularies/format/index.js +9 -0
  315. package/dist/node_modules/ajv/dist/vocabularies/format/index.js.map +1 -0
  316. package/dist/node_modules/ajv/dist/vocabularies/metadata.js +21 -0
  317. package/dist/node_modules/ajv/dist/vocabularies/metadata.js.map +1 -0
  318. package/dist/node_modules/ajv/dist/vocabularies/validation/const.js +31 -0
  319. package/dist/node_modules/ajv/dist/vocabularies/validation/const.js.map +1 -0
  320. package/dist/node_modules/ajv/dist/vocabularies/validation/enum.js +54 -0
  321. package/dist/node_modules/ajv/dist/vocabularies/validation/enum.js.map +1 -0
  322. package/dist/node_modules/ajv/dist/vocabularies/validation/index.js +54 -0
  323. package/dist/node_modules/ajv/dist/vocabularies/validation/index.js.map +1 -0
  324. package/dist/node_modules/ajv/dist/vocabularies/validation/limitItems.js +26 -0
  325. package/dist/node_modules/ajv/dist/vocabularies/validation/limitItems.js.map +1 -0
  326. package/dist/node_modules/ajv/dist/vocabularies/validation/limitLength.js +33 -0
  327. package/dist/node_modules/ajv/dist/vocabularies/validation/limitLength.js.map +1 -0
  328. package/dist/node_modules/ajv/dist/vocabularies/validation/limitNumber.js +29 -0
  329. package/dist/node_modules/ajv/dist/vocabularies/validation/limitNumber.js.map +1 -0
  330. package/dist/node_modules/ajv/dist/vocabularies/validation/limitProperties.js +26 -0
  331. package/dist/node_modules/ajv/dist/vocabularies/validation/limitProperties.js.map +1 -0
  332. package/dist/node_modules/ajv/dist/vocabularies/validation/multipleOf.js +28 -0
  333. package/dist/node_modules/ajv/dist/vocabularies/validation/multipleOf.js.map +1 -0
  334. package/dist/node_modules/ajv/dist/vocabularies/validation/pattern.js +27 -0
  335. package/dist/node_modules/ajv/dist/vocabularies/validation/pattern.js.map +1 -0
  336. package/dist/node_modules/ajv/dist/vocabularies/validation/required.js +84 -0
  337. package/dist/node_modules/ajv/dist/vocabularies/validation/required.js.map +1 -0
  338. package/dist/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js +72 -0
  339. package/dist/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js.map +1 -0
  340. package/dist/node_modules/ajv-formats/dist/formats.js +212 -0
  341. package/dist/node_modules/ajv-formats/dist/formats.js.map +1 -0
  342. package/dist/node_modules/ajv-formats/dist/index.js +52 -0
  343. package/dist/node_modules/ajv-formats/dist/index.js.map +1 -0
  344. package/dist/node_modules/ajv-formats/dist/limit.js +75 -0
  345. package/dist/node_modules/ajv-formats/dist/limit.js.map +1 -0
  346. package/dist/node_modules/diff/libesm/diff/base.js +256 -0
  347. package/dist/node_modules/diff/libesm/diff/base.js.map +1 -0
  348. package/dist/node_modules/diff/libesm/diff/line.js +64 -0
  349. package/dist/node_modules/diff/libesm/diff/line.js.map +1 -0
  350. package/dist/node_modules/diff/libesm/patch/create.js +185 -0
  351. package/dist/node_modules/diff/libesm/patch/create.js.map +1 -0
  352. package/dist/node_modules/fast-deep-equal/index.js +47 -0
  353. package/dist/node_modules/fast-deep-equal/index.js.map +1 -0
  354. package/dist/node_modules/fast-uri/index.js +347 -0
  355. package/dist/node_modules/fast-uri/index.js.map +1 -0
  356. package/dist/node_modules/fast-uri/lib/schemes.js +255 -0
  357. package/dist/node_modules/fast-uri/lib/schemes.js.map +1 -0
  358. package/dist/node_modules/fast-uri/lib/utils.js +334 -0
  359. package/dist/node_modules/fast-uri/lib/utils.js.map +1 -0
  360. package/dist/node_modules/json-schema-traverse/index.js +98 -0
  361. package/dist/node_modules/json-schema-traverse/index.js.map +1 -0
  362. package/dist/node_modules/uuid/dist/rng.js +14 -0
  363. package/dist/node_modules/uuid/dist/rng.js.map +1 -0
  364. package/dist/node_modules/uuid/dist/stringify.js +29 -0
  365. package/dist/node_modules/uuid/dist/stringify.js.map +1 -0
  366. package/dist/node_modules/uuid/dist/v7.js +65 -0
  367. package/dist/node_modules/uuid/dist/v7.js.map +1 -0
  368. package/dist/node_modules/zod-to-json-schema/dist/esm/Options.js +37 -0
  369. package/dist/node_modules/zod-to-json-schema/dist/esm/Options.js.map +1 -0
  370. package/dist/node_modules/zod-to-json-schema/dist/esm/Refs.js +26 -0
  371. package/dist/node_modules/zod-to-json-schema/dist/esm/Refs.js.map +1 -0
  372. package/dist/node_modules/zod-to-json-schema/dist/esm/errorMessages.js +17 -0
  373. package/dist/node_modules/zod-to-json-schema/dist/esm/errorMessages.js.map +1 -0
  374. package/dist/node_modules/zod-to-json-schema/dist/esm/getRelativePath.js +11 -0
  375. package/dist/node_modules/zod-to-json-schema/dist/esm/getRelativePath.js.map +1 -0
  376. package/dist/node_modules/zod-to-json-schema/dist/esm/parseDef.js +66 -0
  377. package/dist/node_modules/zod-to-json-schema/dist/esm/parseDef.js.map +1 -0
  378. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/any.js +21 -0
  379. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/any.js.map +1 -0
  380. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/array.js +30 -0
  381. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/array.js.map +1 -0
  382. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js +53 -0
  383. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js.map +1 -0
  384. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/boolean.js +8 -0
  385. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/boolean.js.map +1 -0
  386. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/branded.js +8 -0
  387. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/branded.js.map +1 -0
  388. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/catch.js +8 -0
  389. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/catch.js.map +1 -0
  390. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/date.js +50 -0
  391. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/date.js.map +1 -0
  392. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/default.js +11 -0
  393. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/default.js.map +1 -0
  394. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/effects.js +11 -0
  395. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/effects.js.map +1 -0
  396. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/enum.js +9 -0
  397. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/enum.js.map +1 -0
  398. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js +56 -0
  399. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js.map +1 -0
  400. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/literal.js +24 -0
  401. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/literal.js.map +1 -0
  402. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/map.js +30 -0
  403. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/map.js.map +1 -0
  404. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/nativeEnum.js +19 -0
  405. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/nativeEnum.js.map +1 -0
  406. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/never.js +15 -0
  407. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/never.js.map +1 -0
  408. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/null.js +13 -0
  409. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/null.js.map +1 -0
  410. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/nullable.js +37 -0
  411. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/nullable.js.map +1 -0
  412. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/number.js +56 -0
  413. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/number.js.map +1 -0
  414. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/object.js +76 -0
  415. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/object.js.map +1 -0
  416. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/optional.js +25 -0
  417. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/optional.js.map +1 -0
  418. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/pipeline.js +24 -0
  419. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/pipeline.js.map +1 -0
  420. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/promise.js +8 -0
  421. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/promise.js.map +1 -0
  422. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js +8 -0
  423. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js.map +1 -0
  424. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/record.js +65 -0
  425. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/record.js.map +1 -0
  426. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/set.js +24 -0
  427. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/set.js.map +1 -0
  428. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/string.js +350 -0
  429. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/string.js.map +1 -0
  430. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/tuple.js +36 -0
  431. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/tuple.js.map +1 -0
  432. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/undefined.js +10 -0
  433. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/undefined.js.map +1 -0
  434. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/union.js +84 -0
  435. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/union.js.map +1 -0
  436. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/unknown.js +8 -0
  437. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/unknown.js.map +1 -0
  438. package/dist/node_modules/zod-to-json-schema/dist/esm/selectParser.js +109 -0
  439. package/dist/node_modules/zod-to-json-schema/dist/esm/selectParser.js.map +1 -0
  440. package/dist/node_modules/zod-to-json-schema/dist/esm/zodToJsonSchema.js +90 -0
  441. package/dist/node_modules/zod-to-json-schema/dist/esm/zodToJsonSchema.js.map +1 -0
  442. package/dist/node_modules/zod-to-json-schema/node_modules/zod/v3/types.js +42 -0
  443. package/dist/node_modules/zod-to-json-schema/node_modules/zod/v3/types.js.map +1 -0
  444. package/dist/package.json.js +8 -0
  445. package/dist/package.json.js.map +1 -0
  446. package/dist/src/acp-extensions.d.ts +91 -0
  447. package/dist/src/acp-extensions.d.ts.map +1 -0
  448. package/dist/src/acp-extensions.js +38 -0
  449. package/dist/src/acp-extensions.js.map +1 -0
  450. package/dist/src/adapters/claude/claude.d.ts +136 -0
  451. package/dist/src/adapters/claude/claude.d.ts.map +1 -0
  452. package/dist/src/adapters/claude/claude.js +1112 -0
  453. package/dist/src/adapters/claude/claude.js.map +1 -0
  454. package/dist/src/adapters/claude/mcp-server.d.ts +30 -0
  455. package/dist/src/adapters/claude/mcp-server.d.ts.map +1 -0
  456. package/dist/src/adapters/claude/mcp-server.js +655 -0
  457. package/dist/src/adapters/claude/mcp-server.js.map +1 -0
  458. package/dist/src/adapters/claude/tools.d.ts +35 -0
  459. package/dist/src/adapters/claude/tools.d.ts.map +1 -0
  460. package/dist/src/adapters/claude/tools.js +466 -0
  461. package/dist/src/adapters/claude/tools.js.map +1 -0
  462. package/dist/src/adapters/claude/utils.d.ts +48 -0
  463. package/dist/src/adapters/claude/utils.d.ts.map +1 -0
  464. package/dist/src/adapters/claude/utils.js +158 -0
  465. package/dist/src/adapters/claude/utils.js.map +1 -0
  466. package/dist/src/agent.d.ts +18 -28
  467. package/dist/src/agent.d.ts.map +1 -1
  468. package/dist/src/agent.js +195 -175
  469. package/dist/src/agent.js.map +1 -1
  470. package/dist/src/agents/execution.js.map +1 -1
  471. package/dist/src/agents/planning.js.map +1 -1
  472. package/dist/src/agents/research.js.map +1 -1
  473. package/dist/src/file-manager.d.ts +6 -6
  474. package/dist/src/file-manager.d.ts.map +1 -1
  475. package/dist/src/file-manager.js +72 -63
  476. package/dist/src/file-manager.js.map +1 -1
  477. package/dist/src/git-manager.d.ts +2 -1
  478. package/dist/src/git-manager.d.ts.map +1 -1
  479. package/dist/src/git-manager.js +105 -70
  480. package/dist/src/git-manager.js.map +1 -1
  481. package/dist/src/posthog-api.d.ts +8 -14
  482. package/dist/src/posthog-api.d.ts.map +1 -1
  483. package/dist/src/posthog-api.js +35 -23
  484. package/dist/src/posthog-api.js.map +1 -1
  485. package/dist/src/prompt-builder.d.ts +4 -4
  486. package/dist/src/prompt-builder.d.ts.map +1 -1
  487. package/dist/src/prompt-builder.js +129 -99
  488. package/dist/src/prompt-builder.js.map +1 -1
  489. package/dist/src/schemas.d.ts +980 -0
  490. package/dist/src/schemas.d.ts.map +1 -0
  491. package/dist/src/schemas.js +196 -0
  492. package/dist/src/schemas.js.map +1 -0
  493. package/dist/src/session-store.d.ts +53 -0
  494. package/dist/src/session-store.d.ts.map +1 -0
  495. package/dist/src/session-store.js +195 -0
  496. package/dist/src/session-store.js.map +1 -0
  497. package/dist/src/task-manager.d.ts +7 -7
  498. package/dist/src/task-manager.d.ts.map +1 -1
  499. package/dist/src/task-manager.js +19 -18
  500. package/dist/src/task-manager.js.map +1 -1
  501. package/dist/src/template-manager.d.ts +1 -1
  502. package/dist/src/template-manager.d.ts.map +1 -1
  503. package/dist/src/template-manager.js +30 -28
  504. package/dist/src/template-manager.js.map +1 -1
  505. package/dist/src/todo-manager.d.ts +5 -5
  506. package/dist/src/todo-manager.d.ts.map +1 -1
  507. package/dist/src/todo-manager.js +33 -24
  508. package/dist/src/todo-manager.js.map +1 -1
  509. package/dist/src/tools/registry.d.ts +1 -1
  510. package/dist/src/tools/registry.js +60 -60
  511. package/dist/src/tools/registry.js.map +1 -1
  512. package/dist/src/tools/types.d.ts +31 -31
  513. package/dist/src/types.d.ts +62 -167
  514. package/dist/src/types.d.ts.map +1 -1
  515. package/dist/src/types.js +1 -0
  516. package/dist/src/types.js.map +1 -1
  517. package/dist/src/utils/logger.d.ts +14 -6
  518. package/dist/src/utils/logger.d.ts.map +1 -1
  519. package/dist/src/utils/logger.js +37 -22
  520. package/dist/src/utils/logger.js.map +1 -1
  521. package/dist/src/utils/tapped-stream.d.ts +17 -0
  522. package/dist/src/utils/tapped-stream.d.ts.map +1 -0
  523. package/dist/src/utils/tapped-stream.js +45 -0
  524. package/dist/src/utils/tapped-stream.js.map +1 -0
  525. package/dist/src/workflow/config.d.ts +1 -1
  526. package/dist/src/workflow/config.d.ts.map +1 -1
  527. package/dist/src/workflow/config.js +18 -18
  528. package/dist/src/workflow/config.js.map +1 -1
  529. package/dist/src/workflow/steps/build.d.ts +1 -1
  530. package/dist/src/workflow/steps/build.d.ts.map +1 -1
  531. package/dist/src/workflow/steps/build.js +53 -39
  532. package/dist/src/workflow/steps/build.js.map +1 -1
  533. package/dist/src/workflow/steps/finalize.d.ts +1 -1
  534. package/dist/src/workflow/steps/finalize.d.ts.map +1 -1
  535. package/dist/src/workflow/steps/finalize.js +58 -52
  536. package/dist/src/workflow/steps/finalize.js.map +1 -1
  537. package/dist/src/workflow/steps/plan.d.ts +1 -1
  538. package/dist/src/workflow/steps/plan.d.ts.map +1 -1
  539. package/dist/src/workflow/steps/plan.js +69 -47
  540. package/dist/src/workflow/steps/plan.js.map +1 -1
  541. package/dist/src/workflow/steps/research.d.ts +1 -1
  542. package/dist/src/workflow/steps/research.d.ts.map +1 -1
  543. package/dist/src/workflow/steps/research.js +86 -67
  544. package/dist/src/workflow/steps/research.js.map +1 -1
  545. package/dist/src/workflow/types.d.ts +19 -14
  546. package/dist/src/workflow/types.d.ts.map +1 -1
  547. package/dist/src/workflow/utils.d.ts +1 -1
  548. package/dist/src/workflow/utils.d.ts.map +1 -1
  549. package/dist/src/workflow/utils.js +7 -4
  550. package/dist/src/workflow/utils.js.map +1 -1
  551. package/dist/src/worktree-manager.d.ts +39 -0
  552. package/dist/src/worktree-manager.d.ts.map +1 -0
  553. package/dist/src/worktree-manager.js +810 -0
  554. package/dist/src/worktree-manager.js.map +1 -0
  555. package/package.json +20 -16
  556. package/src/acp-extensions.ts +117 -0
  557. package/src/adapters/claude/claude.ts +1498 -0
  558. package/src/adapters/claude/mcp-server.ts +810 -0
  559. package/src/adapters/claude/tools.ts +609 -0
  560. package/src/adapters/claude/utils.ts +267 -0
  561. package/src/agent.ts +511 -447
  562. package/src/agents/execution.ts +1 -1
  563. package/src/agents/planning.ts +1 -1
  564. package/src/agents/research.ts +0 -1
  565. package/src/file-manager.ts +80 -70
  566. package/src/git-manager.ts +164 -88
  567. package/src/posthog-api.ts +155 -94
  568. package/src/prompt-builder.ts +196 -143
  569. package/src/schemas.ts +241 -0
  570. package/src/session-store.ts +244 -0
  571. package/src/task-manager.ts +41 -33
  572. package/src/template-manager.ts +98 -45
  573. package/src/todo-manager.ts +43 -32
  574. package/src/tools/registry.ts +62 -62
  575. package/src/tools/types.ts +36 -36
  576. package/src/types.ts +130 -239
  577. package/src/utils/logger.ts +89 -58
  578. package/src/utils/tapped-stream.ts +60 -0
  579. package/src/workflow/config.ts +48 -48
  580. package/src/workflow/steps/build.ts +127 -113
  581. package/src/workflow/steps/finalize.ts +207 -182
  582. package/src/workflow/steps/plan.ts +155 -130
  583. package/src/workflow/steps/research.ts +207 -187
  584. package/src/workflow/types.ts +47 -36
  585. package/src/workflow/utils.ts +37 -34
  586. package/src/worktree-manager.ts +884 -0
  587. package/dist/src/adapters/claude/claude-adapter.d.ts +0 -18
  588. package/dist/src/adapters/claude/claude-adapter.d.ts.map +0 -1
  589. package/dist/src/adapters/claude/claude-adapter.js +0 -311
  590. package/dist/src/adapters/claude/claude-adapter.js.map +0 -1
  591. package/dist/src/adapters/claude/tool-mapper.d.ts +0 -19
  592. package/dist/src/adapters/claude/tool-mapper.d.ts.map +0 -1
  593. package/dist/src/adapters/claude/tool-mapper.js +0 -44
  594. package/dist/src/adapters/claude/tool-mapper.js.map +0 -1
  595. package/dist/src/adapters/types.d.ts +0 -33
  596. package/dist/src/adapters/types.d.ts.map +0 -1
  597. package/dist/src/task-progress-reporter.d.ts +0 -43
  598. package/dist/src/task-progress-reporter.d.ts.map +0 -1
  599. package/dist/src/task-progress-reporter.js +0 -393
  600. package/dist/src/task-progress-reporter.js.map +0 -1
  601. package/src/adapters/claude/claude-adapter.ts +0 -338
  602. package/src/adapters/claude/tool-mapper.ts +0 -46
  603. package/src/adapters/types.ts +0 -37
  604. package/src/task-progress-reporter.ts +0 -443
@@ -0,0 +1,657 @@
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