@warlock.js/seal 5.28.0 → 5.30.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 (443) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/README.md +2 -0
  3. package/cjs/index.cjs +37 -30
  4. package/cjs/index.cjs.map +1 -1
  5. package/cjs/{object-DubGC-xu.cjs → object--LXRt5RF.cjs} +10 -8
  6. package/cjs/object--LXRt5RF.cjs.map +1 -0
  7. package/cjs/object.cjs +2 -2
  8. package/cjs/{required-methods-BOVNRtci.cjs → required-methods-DYsRO9aZ.cjs} +97 -68
  9. package/cjs/required-methods-DYsRO9aZ.cjs.map +1 -0
  10. package/cjs/{string-DpDpgefH.cjs → string-DsqnKoSB.cjs} +6 -6
  11. package/cjs/string-DsqnKoSB.cjs.map +1 -0
  12. package/cjs/string.cjs +2 -2
  13. package/esm/config.d.mts +2 -1
  14. package/esm/config.d.mts.map +1 -1
  15. package/esm/config.mjs +1 -1
  16. package/esm/config.mjs.map +1 -1
  17. package/esm/factory/validate.d.mts +9 -6
  18. package/esm/factory/validate.d.mts.map +1 -1
  19. package/esm/factory/validate.mjs +12 -4
  20. package/esm/factory/validate.mjs.map +1 -1
  21. package/esm/factory/validators.d.mts +5 -5
  22. package/esm/factory/validators.d.mts.map +1 -1
  23. package/esm/factory/validators.mjs +1 -1
  24. package/esm/factory/validators.mjs.map +1 -1
  25. package/esm/helpers/date-helpers.d.mts +1 -1
  26. package/esm/helpers/date-helpers.d.mts.map +1 -1
  27. package/esm/helpers/date-helpers.mjs +1 -1
  28. package/esm/helpers/date-helpers.mjs.map +1 -1
  29. package/esm/helpers/file.utils.d.mts +1 -1
  30. package/esm/helpers/file.utils.d.mts.map +1 -1
  31. package/esm/helpers/file.utils.mjs +1 -1
  32. package/esm/helpers/file.utils.mjs.map +1 -1
  33. package/esm/helpers/get-field-value.d.mts +2 -1
  34. package/esm/helpers/get-field-value.d.mts.map +1 -1
  35. package/esm/helpers/get-field-value.mjs +1 -1
  36. package/esm/helpers/get-field-value.mjs.map +1 -1
  37. package/esm/helpers/is-empty-value.mjs +1 -1
  38. package/esm/helpers/is-empty-value.mjs.map +1 -1
  39. package/esm/helpers/path-helpers.d.mts +1 -1
  40. package/esm/helpers/path-helpers.d.mts.map +1 -1
  41. package/esm/helpers/path-helpers.mjs +1 -1
  42. package/esm/helpers/path-helpers.mjs.map +1 -1
  43. package/esm/helpers/validation-helpers.d.mts +2 -1
  44. package/esm/helpers/validation-helpers.d.mts.map +1 -1
  45. package/esm/helpers/validation-helpers.mjs +1 -1
  46. package/esm/helpers/validation-helpers.mjs.map +1 -1
  47. package/esm/index.d.mts +3 -3
  48. package/esm/mutators/array-mutators.d.mts +2 -1
  49. package/esm/mutators/array-mutators.d.mts.map +1 -1
  50. package/esm/mutators/array-mutators.mjs +1 -1
  51. package/esm/mutators/array-mutators.mjs.map +1 -1
  52. package/esm/mutators/boolean-mutators.d.mts +2 -1
  53. package/esm/mutators/boolean-mutators.d.mts.map +1 -1
  54. package/esm/mutators/boolean-mutators.mjs +1 -1
  55. package/esm/mutators/boolean-mutators.mjs.map +1 -1
  56. package/esm/mutators/date-mutators.d.mts +2 -1
  57. package/esm/mutators/date-mutators.d.mts.map +1 -1
  58. package/esm/mutators/date-mutators.mjs +1 -1
  59. package/esm/mutators/date-mutators.mjs.map +1 -1
  60. package/esm/mutators/number-mutators.d.mts +2 -1
  61. package/esm/mutators/number-mutators.d.mts.map +1 -1
  62. package/esm/mutators/number-mutators.mjs +1 -1
  63. package/esm/mutators/number-mutators.mjs.map +1 -1
  64. package/esm/mutators/object-mutators.d.mts +2 -1
  65. package/esm/mutators/object-mutators.d.mts.map +1 -1
  66. package/esm/mutators/object-mutators.mjs +1 -1
  67. package/esm/mutators/object-mutators.mjs.map +1 -1
  68. package/esm/mutators/scalar-mutators.d.mts +2 -1
  69. package/esm/mutators/scalar-mutators.d.mts.map +1 -1
  70. package/esm/mutators/scalar-mutators.mjs +1 -1
  71. package/esm/mutators/scalar-mutators.mjs.map +1 -1
  72. package/esm/mutators/string-mutators.d.mts +2 -1
  73. package/esm/mutators/string-mutators.d.mts.map +1 -1
  74. package/esm/mutators/string-mutators.mjs +1 -1
  75. package/esm/mutators/string-mutators.mjs.map +1 -1
  76. package/esm/object.d.mts +1 -1
  77. package/esm/object.d.mts.map +1 -1
  78. package/esm/object.mjs +1 -1
  79. package/esm/object.mjs.map +1 -1
  80. package/esm/plugins/plugin-system.d.mts +1 -1
  81. package/esm/plugins/plugin-system.d.mts.map +1 -1
  82. package/esm/plugins/plugin-system.mjs +1 -1
  83. package/esm/plugins/plugin-system.mjs.map +1 -1
  84. package/esm/rules/array/array-rules.d.mts +2 -1
  85. package/esm/rules/array/array-rules.d.mts.map +1 -1
  86. package/esm/rules/array/array-rules.mjs +1 -1
  87. package/esm/rules/array/array-rules.mjs.map +1 -1
  88. package/esm/rules/color/color-rules.d.mts +2 -1
  89. package/esm/rules/color/color-rules.d.mts.map +1 -1
  90. package/esm/rules/color/color-rules.mjs +1 -1
  91. package/esm/rules/color/color-rules.mjs.map +1 -1
  92. package/esm/rules/common/enum.d.mts +2 -1
  93. package/esm/rules/common/enum.d.mts.map +1 -1
  94. package/esm/rules/common/enum.mjs +1 -1
  95. package/esm/rules/common/enum.mjs.map +1 -1
  96. package/esm/rules/common/equals-field-rules.d.mts +2 -1
  97. package/esm/rules/common/equals-field-rules.d.mts.map +1 -1
  98. package/esm/rules/common/equals-field-rules.mjs +1 -1
  99. package/esm/rules/common/equals-field-rules.mjs.map +1 -1
  100. package/esm/rules/common/instanceof.d.mts +2 -1
  101. package/esm/rules/common/instanceof.d.mts.map +1 -1
  102. package/esm/rules/common/instanceof.mjs +1 -1
  103. package/esm/rules/common/instanceof.mjs.map +1 -1
  104. package/esm/rules/common/literal.d.mts +2 -1
  105. package/esm/rules/common/literal.d.mts.map +1 -1
  106. package/esm/rules/common/literal.mjs +1 -1
  107. package/esm/rules/common/literal.mjs.map +1 -1
  108. package/esm/rules/common/type-rules.d.mts +2 -1
  109. package/esm/rules/common/type-rules.d.mts.map +1 -1
  110. package/esm/rules/common/type-rules.mjs +1 -1
  111. package/esm/rules/common/type-rules.mjs.map +1 -1
  112. package/esm/rules/common/unknown-key.d.mts +2 -1
  113. package/esm/rules/common/unknown-key.d.mts.map +1 -1
  114. package/esm/rules/common/unknown-key.mjs +1 -1
  115. package/esm/rules/common/unknown-key.mjs.map +1 -1
  116. package/esm/rules/conditional/forbidden-if-rules.d.mts +2 -1
  117. package/esm/rules/conditional/forbidden-if-rules.d.mts.map +1 -1
  118. package/esm/rules/conditional/forbidden-if-rules.mjs +1 -1
  119. package/esm/rules/conditional/forbidden-if-rules.mjs.map +1 -1
  120. package/esm/rules/conditional/present-if-rules.d.mts +2 -1
  121. package/esm/rules/conditional/present-if-rules.d.mts.map +1 -1
  122. package/esm/rules/conditional/present-if-rules.mjs +1 -1
  123. package/esm/rules/conditional/present-if-rules.mjs.map +1 -1
  124. package/esm/rules/conditional/present-unless-rules.d.mts +2 -1
  125. package/esm/rules/conditional/present-unless-rules.d.mts.map +1 -1
  126. package/esm/rules/conditional/present-unless-rules.mjs +1 -1
  127. package/esm/rules/conditional/present-unless-rules.mjs.map +1 -1
  128. package/esm/rules/conditional/present-with-rules.d.mts +2 -1
  129. package/esm/rules/conditional/present-with-rules.d.mts.map +1 -1
  130. package/esm/rules/conditional/present-with-rules.mjs +1 -1
  131. package/esm/rules/conditional/present-with-rules.mjs.map +1 -1
  132. package/esm/rules/conditional/present-without-rules.d.mts +2 -1
  133. package/esm/rules/conditional/present-without-rules.d.mts.map +1 -1
  134. package/esm/rules/conditional/present-without-rules.mjs +1 -1
  135. package/esm/rules/conditional/present-without-rules.mjs.map +1 -1
  136. package/esm/rules/conditional/required-if-rules.d.mts +2 -1
  137. package/esm/rules/conditional/required-if-rules.d.mts.map +1 -1
  138. package/esm/rules/conditional/required-if-rules.mjs +1 -1
  139. package/esm/rules/conditional/required-if-rules.mjs.map +1 -1
  140. package/esm/rules/conditional/required-unless-rules.d.mts +2 -1
  141. package/esm/rules/conditional/required-unless-rules.d.mts.map +1 -1
  142. package/esm/rules/conditional/required-unless-rules.mjs +1 -1
  143. package/esm/rules/conditional/required-unless-rules.mjs.map +1 -1
  144. package/esm/rules/conditional/required-when-rule.d.mts +2 -1
  145. package/esm/rules/conditional/required-when-rule.d.mts.map +1 -1
  146. package/esm/rules/conditional/required-when-rule.mjs +1 -1
  147. package/esm/rules/conditional/required-when-rule.mjs.map +1 -1
  148. package/esm/rules/conditional/required-with-rules.d.mts +2 -1
  149. package/esm/rules/conditional/required-with-rules.d.mts.map +1 -1
  150. package/esm/rules/conditional/required-with-rules.mjs +1 -1
  151. package/esm/rules/conditional/required-with-rules.mjs.map +1 -1
  152. package/esm/rules/conditional/required-without-rules.d.mts +2 -1
  153. package/esm/rules/conditional/required-without-rules.d.mts.map +1 -1
  154. package/esm/rules/conditional/required-without-rules.mjs +1 -1
  155. package/esm/rules/conditional/required-without-rules.mjs.map +1 -1
  156. package/esm/rules/core/equal.d.mts +2 -1
  157. package/esm/rules/core/equal.d.mts.map +1 -1
  158. package/esm/rules/core/equal.mjs +1 -1
  159. package/esm/rules/core/equal.mjs.map +1 -1
  160. package/esm/rules/core/forbidden.d.mts +2 -1
  161. package/esm/rules/core/forbidden.d.mts.map +1 -1
  162. package/esm/rules/core/forbidden.mjs +1 -1
  163. package/esm/rules/core/forbidden.mjs.map +1 -1
  164. package/esm/rules/core/required.d.mts +2 -1
  165. package/esm/rules/core/required.d.mts.map +1 -1
  166. package/esm/rules/core/required.mjs +1 -1
  167. package/esm/rules/core/required.mjs.map +1 -1
  168. package/esm/rules/core/union.d.mts +1 -1
  169. package/esm/rules/core/union.d.mts.map +1 -1
  170. package/esm/rules/core/union.mjs +3 -1
  171. package/esm/rules/core/union.mjs.map +1 -1
  172. package/esm/rules/core/when.d.mts +2 -1
  173. package/esm/rules/core/when.d.mts.map +1 -1
  174. package/esm/rules/core/when.mjs +1 -1
  175. package/esm/rules/core/when.mjs.map +1 -1
  176. package/esm/rules/date/date-comparison-rules.d.mts +2 -1
  177. package/esm/rules/date/date-comparison-rules.d.mts.map +1 -1
  178. package/esm/rules/date/date-comparison-rules.mjs +1 -1
  179. package/esm/rules/date/date-comparison-rules.mjs.map +1 -1
  180. package/esm/rules/date/date-day-rules.d.mts +2 -1
  181. package/esm/rules/date/date-day-rules.d.mts.map +1 -1
  182. package/esm/rules/date/date-day-rules.mjs +1 -1
  183. package/esm/rules/date/date-day-rules.mjs.map +1 -1
  184. package/esm/rules/date/date-field-comparison-rules.d.mts +2 -1
  185. package/esm/rules/date/date-field-comparison-rules.d.mts.map +1 -1
  186. package/esm/rules/date/date-field-comparison-rules.mjs +1 -1
  187. package/esm/rules/date/date-field-comparison-rules.mjs.map +1 -1
  188. package/esm/rules/date/date-period-rules.d.mts +2 -1
  189. package/esm/rules/date/date-period-rules.d.mts.map +1 -1
  190. package/esm/rules/date/date-period-rules.mjs +1 -1
  191. package/esm/rules/date/date-period-rules.mjs.map +1 -1
  192. package/esm/rules/date/date-relative-rules.d.mts +2 -1
  193. package/esm/rules/date/date-relative-rules.d.mts.map +1 -1
  194. package/esm/rules/date/date-relative-rules.mjs +1 -1
  195. package/esm/rules/date/date-relative-rules.mjs.map +1 -1
  196. package/esm/rules/date/date-special-rules.d.mts +2 -1
  197. package/esm/rules/date/date-special-rules.d.mts.map +1 -1
  198. package/esm/rules/date/date-special-rules.mjs +1 -1
  199. package/esm/rules/date/date-special-rules.mjs.map +1 -1
  200. package/esm/rules/date/date.d.mts +2 -1
  201. package/esm/rules/date/date.d.mts.map +1 -1
  202. package/esm/rules/date/date.mjs +1 -1
  203. package/esm/rules/date/date.mjs.map +1 -1
  204. package/esm/rules/file/dimensions.d.mts +2 -1
  205. package/esm/rules/file/dimensions.d.mts.map +1 -1
  206. package/esm/rules/file/dimensions.mjs +1 -1
  207. package/esm/rules/file/dimensions.mjs.map +1 -1
  208. package/esm/rules/file/file-size.d.mts +2 -1
  209. package/esm/rules/file/file-size.d.mts.map +1 -1
  210. package/esm/rules/file/file-size.mjs +1 -1
  211. package/esm/rules/file/file-size.mjs.map +1 -1
  212. package/esm/rules/length/length-rules.d.mts +2 -1
  213. package/esm/rules/length/length-rules.d.mts.map +1 -1
  214. package/esm/rules/length/length-rules.mjs +1 -1
  215. package/esm/rules/length/length-rules.mjs.map +1 -1
  216. package/esm/rules/number/number-rules.d.mts +2 -1
  217. package/esm/rules/number/number-rules.d.mts.map +1 -1
  218. package/esm/rules/number/number-rules.mjs +1 -1
  219. package/esm/rules/number/number-rules.mjs.map +1 -1
  220. package/esm/rules/scalar/accepted-rule.mjs +1 -1
  221. package/esm/rules/scalar/accepted-rule.mjs.map +1 -1
  222. package/esm/rules/scalar/declined-rule.mjs +1 -1
  223. package/esm/rules/scalar/declined-rule.mjs.map +1 -1
  224. package/esm/rules/string/alpha.d.mts +2 -1
  225. package/esm/rules/string/alpha.d.mts.map +1 -1
  226. package/esm/rules/string/alpha.mjs +1 -1
  227. package/esm/rules/string/alpha.mjs.map +1 -1
  228. package/esm/rules/string/credit-card.d.mts +2 -1
  229. package/esm/rules/string/credit-card.d.mts.map +1 -1
  230. package/esm/rules/string/credit-card.mjs +1 -1
  231. package/esm/rules/string/credit-card.mjs.map +1 -1
  232. package/esm/rules/string/email.d.mts +2 -1
  233. package/esm/rules/string/email.d.mts.map +1 -1
  234. package/esm/rules/string/email.mjs +1 -1
  235. package/esm/rules/string/email.mjs.map +1 -1
  236. package/esm/rules/string/id-formats.d.mts +2 -1
  237. package/esm/rules/string/id-formats.d.mts.map +1 -1
  238. package/esm/rules/string/id-formats.mjs +1 -1
  239. package/esm/rules/string/id-formats.mjs.map +1 -1
  240. package/esm/rules/string/ip.d.mts +2 -1
  241. package/esm/rules/string/ip.d.mts.map +1 -1
  242. package/esm/rules/string/ip.mjs +1 -1
  243. package/esm/rules/string/ip.mjs.map +1 -1
  244. package/esm/rules/string/matches.d.mts +2 -1
  245. package/esm/rules/string/matches.d.mts.map +1 -1
  246. package/esm/rules/string/matches.mjs +1 -1
  247. package/esm/rules/string/matches.mjs.map +1 -1
  248. package/esm/rules/string/pattern.d.mts +2 -1
  249. package/esm/rules/string/pattern.d.mts.map +1 -1
  250. package/esm/rules/string/pattern.mjs +1 -1
  251. package/esm/rules/string/pattern.mjs.map +1 -1
  252. package/esm/rules/string/string-comparison.d.mts +2 -1
  253. package/esm/rules/string/string-comparison.d.mts.map +1 -1
  254. package/esm/rules/string/string-comparison.mjs +1 -1
  255. package/esm/rules/string/string-comparison.mjs.map +1 -1
  256. package/esm/rules/string/strong-password-rule.d.mts +2 -1
  257. package/esm/rules/string/strong-password-rule.d.mts.map +1 -1
  258. package/esm/rules/string/strong-password-rule.mjs +1 -1
  259. package/esm/rules/string/strong-password-rule.mjs.map +1 -1
  260. package/esm/rules/string/url.d.mts +2 -1
  261. package/esm/rules/string/url.d.mts.map +1 -1
  262. package/esm/rules/string/url.mjs +1 -1
  263. package/esm/rules/string/url.mjs.map +1 -1
  264. package/esm/rules/string/without-whitespace.d.mts +2 -1
  265. package/esm/rules/string/without-whitespace.d.mts.map +1 -1
  266. package/esm/rules/string/without-whitespace.mjs +1 -1
  267. package/esm/rules/string/without-whitespace.mjs.map +1 -1
  268. package/esm/standard-schema/json-schema.d.mts +1 -1
  269. package/esm/standard-schema/json-schema.d.mts.map +1 -1
  270. package/esm/standard-schema/json-schema.mjs +1 -1
  271. package/esm/standard-schema/json-schema.mjs.map +1 -1
  272. package/esm/standard-schema/map-result.d.mts +2 -1
  273. package/esm/standard-schema/map-result.d.mts.map +1 -1
  274. package/esm/standard-schema/map-result.mjs +1 -1
  275. package/esm/standard-schema/map-result.mjs.map +1 -1
  276. package/esm/standard-schema/types.d.mts +1 -1
  277. package/esm/standard-schema/types.d.mts.map +1 -1
  278. package/esm/string.d.mts +1 -1
  279. package/esm/string.d.mts.map +1 -1
  280. package/esm/string.mjs +1 -1
  281. package/esm/string.mjs.map +1 -1
  282. package/esm/types/conditional-types.d.mts +1 -1
  283. package/esm/types/conditional-types.d.mts.map +1 -1
  284. package/esm/types/context-types.d.mts +8 -2
  285. package/esm/types/context-types.d.mts.map +1 -1
  286. package/esm/types/data-transformer-types.d.mts +1 -1
  287. package/esm/types/data-transformer-types.d.mts.map +1 -1
  288. package/esm/types/date-types.d.mts +1 -1
  289. package/esm/types/date-types.d.mts.map +1 -1
  290. package/esm/types/date-types.mjs +1 -1
  291. package/esm/types/date-types.mjs.map +1 -1
  292. package/esm/types/file.types.d.mts +1 -1
  293. package/esm/types/file.types.d.mts.map +1 -1
  294. package/esm/types/inference-types.d.mts +21 -4
  295. package/esm/types/inference-types.d.mts.map +1 -1
  296. package/esm/types/mutator-types.d.mts +1 -1
  297. package/esm/types/mutator-types.d.mts.map +1 -1
  298. package/esm/types/result-types.d.mts +26 -2
  299. package/esm/types/result-types.d.mts.map +1 -1
  300. package/esm/types/rule-types.d.mts +1 -1
  301. package/esm/types/rule-types.d.mts.map +1 -1
  302. package/esm/types/schema-types.d.mts +1 -1
  303. package/esm/types/schema-types.d.mts.map +1 -1
  304. package/esm/validators/any-validator.d.mts +1 -1
  305. package/esm/validators/any-validator.d.mts.map +1 -1
  306. package/esm/validators/any-validator.mjs +1 -1
  307. package/esm/validators/any-validator.mjs.map +1 -1
  308. package/esm/validators/array-validator.d.mts +1 -1
  309. package/esm/validators/array-validator.d.mts.map +1 -1
  310. package/esm/validators/array-validator.mjs +1 -1
  311. package/esm/validators/array-validator.mjs.map +1 -1
  312. package/esm/validators/base-validator.d.mts +8 -1
  313. package/esm/validators/base-validator.d.mts.map +1 -1
  314. package/esm/validators/base-validator.mjs +23 -4
  315. package/esm/validators/base-validator.mjs.map +1 -1
  316. package/esm/validators/boolean-validator.d.mts +1 -1
  317. package/esm/validators/boolean-validator.d.mts.map +1 -1
  318. package/esm/validators/boolean-validator.mjs +1 -1
  319. package/esm/validators/boolean-validator.mjs.map +1 -1
  320. package/esm/validators/computed-validator.d.mts +1 -1
  321. package/esm/validators/computed-validator.d.mts.map +1 -1
  322. package/esm/validators/computed-validator.mjs +1 -1
  323. package/esm/validators/computed-validator.mjs.map +1 -1
  324. package/esm/validators/date-validator.d.mts +2 -1
  325. package/esm/validators/date-validator.d.mts.map +1 -1
  326. package/esm/validators/date-validator.mjs +1 -1
  327. package/esm/validators/date-validator.mjs.map +1 -1
  328. package/esm/validators/discriminated-union-validator.d.mts +8 -2
  329. package/esm/validators/discriminated-union-validator.d.mts.map +1 -1
  330. package/esm/validators/discriminated-union-validator.mjs +6 -1
  331. package/esm/validators/discriminated-union-validator.mjs.map +1 -1
  332. package/esm/validators/float-validator.d.mts +1 -1
  333. package/esm/validators/float-validator.d.mts.map +1 -1
  334. package/esm/validators/float-validator.mjs +1 -1
  335. package/esm/validators/float-validator.mjs.map +1 -1
  336. package/esm/validators/instanceof-validator.d.mts +1 -1
  337. package/esm/validators/instanceof-validator.d.mts.map +1 -1
  338. package/esm/validators/instanceof-validator.mjs +1 -1
  339. package/esm/validators/instanceof-validator.mjs.map +1 -1
  340. package/esm/validators/int-validator.d.mts +1 -1
  341. package/esm/validators/int-validator.d.mts.map +1 -1
  342. package/esm/validators/int-validator.mjs +1 -1
  343. package/esm/validators/int-validator.mjs.map +1 -1
  344. package/esm/validators/lazy-validator.d.mts +1 -1
  345. package/esm/validators/lazy-validator.d.mts.map +1 -1
  346. package/esm/validators/lazy-validator.mjs +1 -1
  347. package/esm/validators/lazy-validator.mjs.map +1 -1
  348. package/esm/validators/literal-validator.d.mts +1 -1
  349. package/esm/validators/literal-validator.d.mts.map +1 -1
  350. package/esm/validators/literal-validator.mjs +5 -2
  351. package/esm/validators/literal-validator.mjs.map +1 -1
  352. package/esm/validators/managed-validator.d.mts +1 -1
  353. package/esm/validators/managed-validator.d.mts.map +1 -1
  354. package/esm/validators/managed-validator.mjs +1 -1
  355. package/esm/validators/managed-validator.mjs.map +1 -1
  356. package/esm/validators/methods/equality-conditional-methods.d.mts +2 -1
  357. package/esm/validators/methods/equality-conditional-methods.d.mts.map +1 -1
  358. package/esm/validators/methods/equality-conditional-methods.mjs +1 -1
  359. package/esm/validators/methods/equality-conditional-methods.mjs.map +1 -1
  360. package/esm/validators/methods/forbidden-methods.d.mts +1 -1
  361. package/esm/validators/methods/forbidden-methods.d.mts.map +1 -1
  362. package/esm/validators/methods/forbidden-methods.mjs +1 -1
  363. package/esm/validators/methods/forbidden-methods.mjs.map +1 -1
  364. package/esm/validators/methods/present-methods.d.mts +1 -1
  365. package/esm/validators/methods/present-methods.d.mts.map +1 -1
  366. package/esm/validators/methods/present-methods.mjs +1 -1
  367. package/esm/validators/methods/present-methods.mjs.map +1 -1
  368. package/esm/validators/methods/required-methods.d.mts +2 -1
  369. package/esm/validators/methods/required-methods.d.mts.map +1 -1
  370. package/esm/validators/methods/required-methods.mjs +1 -1
  371. package/esm/validators/methods/required-methods.mjs.map +1 -1
  372. package/esm/validators/number-validator.d.mts +1 -1
  373. package/esm/validators/number-validator.d.mts.map +1 -1
  374. package/esm/validators/number-validator.mjs +1 -1
  375. package/esm/validators/number-validator.mjs.map +1 -1
  376. package/esm/validators/numeric-validator.d.mts +1 -1
  377. package/esm/validators/numeric-validator.d.mts.map +1 -1
  378. package/esm/validators/numeric-validator.mjs +1 -1
  379. package/esm/validators/numeric-validator.mjs.map +1 -1
  380. package/esm/validators/object-validator.d.mts +1 -1
  381. package/esm/validators/object-validator.d.mts.map +1 -1
  382. package/esm/validators/object-validator.mjs +5 -3
  383. package/esm/validators/object-validator.mjs.map +1 -1
  384. package/esm/validators/primitive-validator.d.mts +1 -1
  385. package/esm/validators/primitive-validator.d.mts.map +1 -1
  386. package/esm/validators/primitive-validator.mjs +1 -1
  387. package/esm/validators/primitive-validator.mjs.map +1 -1
  388. package/esm/validators/record-validator.d.mts +1 -1
  389. package/esm/validators/record-validator.d.mts.map +1 -1
  390. package/esm/validators/record-validator.mjs +1 -1
  391. package/esm/validators/record-validator.mjs.map +1 -1
  392. package/esm/validators/scalar-validator.d.mts +1 -1
  393. package/esm/validators/scalar-validator.d.mts.map +1 -1
  394. package/esm/validators/scalar-validator.mjs +1 -1
  395. package/esm/validators/scalar-validator.mjs.map +1 -1
  396. package/esm/validators/string-validator.d.mts +1 -1
  397. package/esm/validators/string-validator.d.mts.map +1 -1
  398. package/esm/validators/string-validator.mjs +1 -1
  399. package/esm/validators/string-validator.mjs.map +1 -1
  400. package/esm/validators/tuple-validator.d.mts +1 -1
  401. package/esm/validators/tuple-validator.d.mts.map +1 -1
  402. package/esm/validators/tuple-validator.mjs +1 -1
  403. package/esm/validators/tuple-validator.mjs.map +1 -1
  404. package/esm/validators/union-validator.d.mts +1 -1
  405. package/esm/validators/union-validator.d.mts.map +1 -1
  406. package/esm/validators/union-validator.mjs +1 -1
  407. package/esm/validators/union-validator.mjs.map +1 -1
  408. package/llms-full.txt +49 -47
  409. package/llms.txt +7 -7
  410. package/package.json +3 -2
  411. package/skills/bridge-standard-schema/SKILL.md +1 -1
  412. package/skills/compose-seal-modifiers/SKILL.md +2 -2
  413. package/skills/define-structural-shape/SKILL.md +3 -3
  414. package/skills/define-structural-shape/array-methods.md +1 -1
  415. package/skills/define-structural-shape/object-methods.md +1 -1
  416. package/skills/extend-seal-with-plugins/SKILL.md +3 -3
  417. package/skills/generate-json-schema/SKILL.md +1 -1
  418. package/skills/handle-seal-errors/SKILL.md +5 -7
  419. package/skills/overview/SKILL.md +10 -10
  420. package/skills/pick-seal-primitive/SKILL.md +7 -3
  421. package/skills/pick-seal-primitive/boolean-methods.md +1 -1
  422. package/skills/pick-seal-primitive/date-methods.md +1 -1
  423. package/skills/pick-seal-primitive/number-methods.md +1 -1
  424. package/skills/pick-seal-primitive/string-methods.md +2 -2
  425. package/skills/seal-basics/SKILL.md +10 -10
  426. package/cjs/object-DubGC-xu.cjs.map +0 -1
  427. package/cjs/required-methods-BOVNRtci.cjs.map +0 -1
  428. package/cjs/string-DpDpgefH.cjs.map +0 -1
  429. package/esm/helpers/index.d.mts +0 -5
  430. package/esm/mutators/index.d.mts +0 -7
  431. package/esm/rules/array/index.d.mts +0 -1
  432. package/esm/rules/color/index.d.mts +0 -1
  433. package/esm/rules/common/index.d.mts +0 -6
  434. package/esm/rules/conditional/index.d.mts +0 -10
  435. package/esm/rules/core/index.d.mts +0 -5
  436. package/esm/rules/date/index.d.mts +0 -7
  437. package/esm/rules/file/index.d.mts +0 -2
  438. package/esm/rules/index.d.mts +0 -45
  439. package/esm/rules/length/index.d.mts +0 -1
  440. package/esm/rules/number/index.d.mts +0 -1
  441. package/esm/rules/string/index.d.mts +0 -11
  442. package/esm/standard-schema/index.d.mts +0 -3
  443. package/esm/types/index.d.mts +0 -10
package/llms-full.txt CHANGED
@@ -8,7 +8,7 @@
8
8
 
9
9
  ---
10
10
  name: bridge-standard-schema
11
- description: 'Diagnose `StandardSchemaV1` interop — phantom-intersection at the `v` factory return, why typed slots reject a schema, cascade `Model<TSchema>` variance. Triggers: `StandardSchemaV1`, `~standard`, `Infer`, `ObjectValidator`, `StringValidator`, `LiteralValidator`, `BaseValidator`, `Model<TSchema>`, `StandardJSONSchemaV1`, `Result<unknown>`; "StandardSchemaV1 slot rejecting my schema", "Result<unknown> error", "drop as unknown as cast", "cascade Model schema variance"; typical import `import { v, type Infer } from "@warlock.js/seal"`. Skip: foundations — `@warlock.js/seal/seal-basics/SKILL.md`; JSON Schema gen — `@warlock.js/seal/generate-json-schema/SKILL.md`; competing spec `@standard-schema/spec`.'
11
+ description: 'Diagnose `StandardSchemaV1` interop — phantom-intersection at the `v` factory return, why typed slots reject a schema, cascade `Model<TSchema>` variance. Triggers: `StandardSchemaV1`, `~standard`, `Infer`, `ObjectValidator`, `StringValidator`, `LiteralValidator`, `BaseValidator`, `Model<TSchema>`, `StandardJSONSchemaV1`, `Result<unknown>`; "StandardSchemaV1 slot rejecting my schema", "Result<unknown> error", "drop as unknown as cast", "cascade Model schema variance"; typical import `import { v, type Infer } from "@warlock.js/seal"`. Skip: foundations — the `seal-basics` topic; JSON Schema gen — the `generate-json-schema` topic; competing spec `@standard-schema/spec`.'
12
12
  ---
13
13
 
14
14
  # The Standard Schema bridge
@@ -150,12 +150,12 @@ If V2 lands, re-fork. Until then the local copy is the right call.
150
150
 
151
151
  ---
152
152
  name: compose-seal-modifiers
153
- description: 'Apply cross-cutting modifiers — `.optional` / `.nullable` / `.default` / `.catch` / `.omit` / membership rules — plus the mutator-vs-transformer pipeline and `Infer.Input` vs `Infer.Output`. Triggers: `.optional`, `.required`, `.nullable`, `.default`, `.catch`, `.present`, `.requiredIf`, `.requiredWith`, `.in`, `.oneOf`, `.notIn`, `.omit`, `.attribute`, `.mutable`, `.addMutator`, `Infer.Input`, `Infer.Output`; "mark field optional in seal", "default value in schema", "mutator vs transformer", "when does .catch fire"; typical import `import { v, type Infer } from "@warlock.js/seal"`. Skip: primitives — `@warlock.js/seal/pick-seal-primitive/SKILL.md`; containers — `@warlock.js/seal/define-structural-shape/SKILL.md`; errors — `@warlock.js/seal/handle-seal-errors/SKILL.md`; competing `zod` `.optional`/`.default`.'
153
+ description: 'Apply cross-cutting modifiers — `.optional` / `.nullable` / `.default` / `.catch` / `.omit` / membership rules — plus the mutator-vs-transformer pipeline and `Infer.Input` vs `Infer.Output`. Triggers: `.optional`, `.required`, `.nullable`, `.default`, `.catch`, `.present`, `.requiredIf`, `.requiredWith`, `.in`, `.oneOf`, `.notIn`, `.omit`, `.attribute`, `.mutable`, `.addMutator`, `Infer.Input`, `Infer.Output`; "mark field optional in seal", "default value in schema", "mutator vs transformer", "when does .catch fire"; typical import `import { v, type Infer } from "@warlock.js/seal"`. Skip: primitives — the `pick-seal-primitive` topic; containers — the `define-structural-shape` topic; errors — the `handle-seal-errors` topic; competing `zod` `.optional`/`.default`.'
154
154
  ---
155
155
 
156
156
  # Cross-cutting modifiers + the pipeline
157
157
 
158
- This skill covers methods that work on **every** validator. Type-specific methods (`.email()`, `.min()` on strings, `.between()` on numbers, `.weekDay()` on dates, etc.) live in the per-type method references — see [`@warlock.js/seal/pick-seal-primitive/SKILL.md`](@warlock.js/seal/pick-seal-primitive/SKILL.md) and [`@warlock.js/seal/define-structural-shape/SKILL.md`](@warlock.js/seal/define-structural-shape/SKILL.md).
158
+ This skill covers methods that work on **every** validator. Type-specific methods (`.email()`, `.min()` on strings, `.between()` on numbers, `.weekDay()` on dates, etc.) live in the per-type method references — see the `pick-seal-primitive` topic and the `define-structural-shape` topic.
159
159
 
160
160
  ## The pipeline
161
161
 
@@ -423,7 +423,7 @@ Switch back with `.immutable`. Default is fine 99% of the time. Reach for `.muta
423
423
 
424
424
  ---
425
425
  name: define-structural-shape
426
- description: 'Compose `v.object` / `v.array` / `v.record` / `v.tuple` / `v.union` / `v.discriminatedUnion` / `v.lazy`. Triggers: `v.object`, `v.array`, `v.record`, `v.tuple`, `v.union`, `v.discriminatedUnion`, `v.lazy`, `ObjectValidator`; "how do I build an object schema", "dynamic-keyed record", "tagged union with discriminator", "recursive schema", "self-referencing schema"; typical import `import { v, type Infer } from "@warlock.js/seal"`. Skip: leaf primitives — `@warlock.js/seal/pick-seal-primitive/SKILL.md`; modifiers — `@warlock.js/seal/compose-seal-modifiers/SKILL.md`; standard-schema bridge — `@warlock.js/seal/bridge-standard-schema/SKILL.md`; competing libs `zod`, `valibot`.'
426
+ description: 'Compose `v.object` / `v.array` / `v.record` / `v.tuple` / `v.union` / `v.discriminatedUnion` / `v.lazy`. Triggers: `v.object`, `v.array`, `v.record`, `v.tuple`, `v.union`, `v.discriminatedUnion`, `v.lazy`, `ObjectValidator`; "how do I build an object schema", "dynamic-keyed record", "tagged union with discriminator", "recursive schema", "self-referencing schema"; typical import `import { v, type Infer } from "@warlock.js/seal"`. Skip: leaf primitives — the `pick-seal-primitive` topic; modifiers — the `compose-seal-modifiers` topic; standard-schema bridge — the `bridge-standard-schema` topic; competing libs `zod`, `valibot`.'
427
427
  ---
428
428
 
429
429
  # Structural validators — picking guide
@@ -547,11 +547,11 @@ Use for: trees (categories, file systems), threaded data (comment chains), mutua
547
547
  | One of N scalar types | `v.union([...])` |
548
548
  | One of N object shapes with a tag field | `v.discriminatedUnion(key, [...])` |
549
549
  | Self-referencing or forward reference | `v.lazy(() => schema)` |
550
- | One of N constants | `v.literal(...values)` (not structural — see [`@warlock.js/seal/pick-seal-primitive/SKILL.md`](@warlock.js/seal/pick-seal-primitive/SKILL.md)) |
550
+ | One of N constants | `v.literal(...values)` (not structural — see the `pick-seal-primitive` topic) |
551
551
 
552
552
  ## A note on cascade Models
553
553
 
554
- `@warlock.js/cascade` Models declare `static schema: ObjectValidator<TSchema>`. Passing a `v.object({...})` works directly — the factory return widens to fit the Model's invariant generic without breaking type checking. If TS complains *"`ObjectValidator<{specific}>` is not assignable to `ObjectValidator<TSchema>`"*, that's the variance trap and the answer isn't to widen the schema — it's almost always that `Model<TSchema>` was parameterized with a hand-rolled type that drifted from the schema's inferred shape. Fix the type, not the schema. See [`@warlock.js/seal/bridge-standard-schema/SKILL.md`](@warlock.js/seal/bridge-standard-schema/SKILL.md).
554
+ `@warlock.js/cascade` Models declare `static schema: ObjectValidator<TSchema>`. Passing a `v.object({...})` works directly — the factory return widens to fit the Model's invariant generic without breaking type checking. If TS complains *"`ObjectValidator<{specific}>` is not assignable to `ObjectValidator<TSchema>`"*, that's the variance trap and the answer isn't to widen the schema — it's almost always that `Model<TSchema>` was parameterized with a hand-rolled type that drifted from the schema's inferred shape. Fix the type, not the schema. See the `bridge-standard-schema` topic.
555
555
 
556
556
  ## Method-surface reference
557
557
 
@@ -565,7 +565,7 @@ Use for: trees (categories, file systems), threaded data (comment chains), mutua
565
565
 
566
566
  # `v.array(itemValidator)` — method reference
567
567
 
568
- The inner validator runs against each element. Failure on any element fails the array. Picking guide (array vs tuple vs record) is in [`@warlock.js/seal/define-structural-shape/SKILL.md`](@warlock.js/seal/define-structural-shape/SKILL.md).
568
+ The inner validator runs against each element. Failure on any element fails the array. Picking guide (array vs tuple vs record) is in the `define-structural-shape` topic.
569
569
 
570
570
  ## Length
571
571
 
@@ -647,7 +647,7 @@ v.array(v.string()).default([]).optional()
647
647
 
648
648
  # `v.object({...})` — method reference
649
649
 
650
- Picking guide for structural validators is in [`@warlock.js/seal/define-structural-shape/SKILL.md`](@warlock.js/seal/define-structural-shape/SKILL.md). For field-level chaining (`.required` / `.optional` / `.attribute`), see [`@warlock.js/seal/compose-seal-modifiers/SKILL.md`](@warlock.js/seal/compose-seal-modifiers/SKILL.md).
650
+ Picking guide for structural validators is in the `define-structural-shape` topic. For field-level chaining (`.required` / `.optional` / `.attribute`), see the `compose-seal-modifiers` topic.
651
651
 
652
652
  ## Schema composition
653
653
 
@@ -837,7 +837,7 @@ const signupSchema = v.object({
837
837
 
838
838
  ---
839
839
  name: extend-seal-with-plugins
840
- description: 'Author a custom seal plugin to add validator methods (`.slug`, `.postalCode`, etc) — `SealPlugin` shape, `registerPlugin` lifecycle, TS prototype augmentation. Triggers: `SealPlugin`, `registerPlugin`, `unregisterPlugin`, `hasPlugin`, `getInstalledPlugins`, `StringValidator`, `NumberValidator`, `DateValidator`, `BaseValidator`, `install`, `uninstall`; "how do I add a custom validator method", "write a seal plugin", "extend v.string with .slug", "module augmentation for seal"; typical import `import { StringValidator, registerPlugin, type SealPlugin } from "@warlock.js/seal"`. Skip: built-in primitives — `@warlock.js/seal/pick-seal-primitive/SKILL.md`; bridge typing — `@warlock.js/seal/bridge-standard-schema/SKILL.md`; competing `zod` `.refine`/`.transform`.'
840
+ description: 'Author a custom seal plugin to add validator methods (`.slug`, `.postalCode`, etc) — `SealPlugin` shape, `registerPlugin` lifecycle, TS prototype augmentation. Triggers: `SealPlugin`, `registerPlugin`, `unregisterPlugin`, `hasPlugin`, `getInstalledPlugins`, `StringValidator`, `NumberValidator`, `DateValidator`, `BaseValidator`, `install`, `uninstall`; "how do I add a custom validator method", "write a seal plugin", "extend v.string with .slug", "module augmentation for seal"; typical import `import { StringValidator, registerPlugin, type SealPlugin } from "@warlock.js/seal"`. Skip: built-in primitives — the `pick-seal-primitive` topic; bridge typing — the `bridge-standard-schema` topic; competing `zod` `.refine`/`.transform`.'
841
841
  ---
842
842
 
843
843
  # Extend seal with plugins
@@ -846,7 +846,7 @@ Seal exposes a plugin system so you can add validator methods without forking th
846
846
 
847
847
  ## When to reach for a plugin
848
848
 
849
- - The validator method you want **does not exist** in built-in seal — check [`@warlock.js/seal/pick-seal-primitive/SKILL.md`](@warlock.js/seal/pick-seal-primitive/SKILL.md) and its method references first.
849
+ - The validator method you want **does not exist** in built-in seal — check the `pick-seal-primitive` topic and its method references first.
850
850
  - The validation is **stable and reusable** across modules — domain-specific formats (IBAN, postal codes, tax IDs, license plates, internal ID schemes).
851
851
  - You want the **chainable syntax** — `v.string().slug()` reads better than `v.string().pattern(/.../).addMutator(s => slugify(s))` at every call site.
852
852
 
@@ -937,7 +937,7 @@ declare module "@warlock.js/seal" {
937
937
 
938
938
  After this file is included in the project's `tsconfig.json` (via `include` or a side-effect import), `v.string().slug()` autocompletes and type-checks everywhere.
939
939
 
940
- **Important.** The augmentation has to declare on the **class** (`StringValidator`), not the factory return type. The factory return widens with `& StandardSchemaV1<...>` (see [`@warlock.js/seal/bridge-standard-schema/SKILL.md`](@warlock.js/seal/bridge-standard-schema/SKILL.md)) — augmentations on the intersection don't propagate. Patch the class, augment the class; the factory return picks up the new methods through structural inference.
940
+ **Important.** The augmentation has to declare on the **class** (`StringValidator`), not the factory return type. The factory return widens with `& StandardSchemaV1<...>` (see the `bridge-standard-schema` topic) — augmentations on the intersection don't propagate. Patch the class, augment the class; the factory return picks up the new methods through structural inference.
941
941
 
942
942
  ## Larger example — postal codes per country
943
943
 
@@ -1019,7 +1019,7 @@ Use these in startup diagnostics or in tests that need to assert a plugin is reg
1019
1019
 
1020
1020
  ---
1021
1021
  name: generate-json-schema
1022
- description: 'Generate JSON Schema via `schema.toJsonSchema(target)` — `draft-2020-12` / `draft-07` / `openapi-3.0` / `openai-strict`. Triggers: `toJsonSchema`, `JsonSchemaTarget`, `draft-2020-12`, `draft-07`, `openapi-3.0`, `openai-strict`, `response_format`, `additionalProperties`, `nullable`; "how do I generate JSON Schema from seal", "OpenAI structured outputs from schema", "OpenAPI 3.0 nullable", "json_schema strict mode"; typical import `import { v } from "@warlock.js/seal"`. Skip: foundations — `@warlock.js/seal/seal-basics/SKILL.md`; bridge typing — `@warlock.js/seal/bridge-standard-schema/SKILL.md`; competing libs `zod-to-json-schema`, `ajv`, `@anatine/zod-openapi`.'
1022
+ description: 'Generate JSON Schema via `schema.toJsonSchema(target)` — `draft-2020-12` / `draft-07` / `openapi-3.0` / `openai-strict`. Triggers: `toJsonSchema`, `JsonSchemaTarget`, `draft-2020-12`, `draft-07`, `openapi-3.0`, `openai-strict`, `response_format`, `additionalProperties`, `nullable`; "how do I generate JSON Schema from seal", "OpenAI structured outputs from schema", "OpenAPI 3.0 nullable", "json_schema strict mode"; typical import `import { v } from "@warlock.js/seal"`. Skip: foundations — the `seal-basics` topic; bridge typing — the `bridge-standard-schema` topic; competing libs `zod-to-json-schema`, `ajv`, `@anatine/zod-openapi`.'
1023
1023
  ---
1024
1024
 
1025
1025
  # JSON Schema generation
@@ -1166,19 +1166,17 @@ Generating JSON Schema is cheap (pure-function tree walk), so don't worry about
1166
1166
 
1167
1167
  ---
1168
1168
  name: handle-seal-errors
1169
- description: 'Read `ValidationResult` — `isValid`, `errors[]`, `data`. Branch on `error.type`, customize messages, hook translation. Triggers: `ValidationResult`, `ValidationError`, `validate`, `isValid`, `errors`, `data`, `error.type`, `error.input`, `error.error`, `translationParams`, `.attribute`, `SealConfig`; "how to read seal errors", "branch on a specific rule failure", "customize validation error message", "translate seal error", "surface validation errors as 422"; typical import `import { validate, v } from "@warlock.js/seal"`. Skip: modifiers — `@warlock.js/seal/compose-seal-modifiers/SKILL.md`; structural shapes — `@warlock.js/seal/define-structural-shape/SKILL.md`; competing libs `zod` `.safeParse`, `yup` `ValidationError`, `joi`.'
1169
+ description: 'Read `ValidationResult` — `isValid`, `errors[]`, `data`. Branch on `error.type`, customize messages, hook translation. Triggers: `ValidationResult`, `ValidationError`, `validate`, `isValid`, `errors`, `data`, `error.type`, `error.input`, `error.error`, `translationParams`, `.attribute`, `SealConfig`; "how to read seal errors", "branch on a specific rule failure", "customize validation error message", "translate seal error", "surface validation errors as 422"; typical import `import { validate, v } from "@warlock.js/seal"`. Skip: modifiers — the `compose-seal-modifiers` topic; structural shapes — the `define-structural-shape` topic; competing libs `zod` `.safeParse`, `yup` `ValidationError`, `joi`.'
1170
1170
  ---
1171
1171
 
1172
1172
  # `ValidationResult` — reading errors
1173
1173
 
1174
- `validate(schema, data)` never throws. It returns a `ValidationResult`:
1174
+ `validate(schema, data)` never throws. It returns a result narrowed on `isValid`:
1175
1175
 
1176
1176
  ```ts
1177
- type ValidationResult = {
1178
- isValid: boolean;
1179
- data: any; // shape after mutators + transformers (the validated value)
1180
- errors: ValidationError[];
1181
- };
1177
+ type TypedValidationResult<TData> =
1178
+ | { isValid: true; data: TData; errors: ValidationError[] } // TData = Infer.Output<typeof schema>
1179
+ | { isValid: false; data: undefined; errors: ValidationError[] };
1182
1180
 
1183
1181
  type ValidationError = {
1184
1182
  type: string; // rule type that failed — "required", "email", "min", "string", ...
@@ -1345,32 +1343,32 @@ Eight task skills. Most schemas only need `seal-basics` + `pick-seal-primitive`
1345
1343
 
1346
1344
  ### Foundations
1347
1345
 
1348
- #### [`seal-basics/`](../seal-basics/SKILL.md)
1346
+ #### `seal-basics`
1349
1347
  Start here. The `v` factory, `validate(schema, data)`, and `Infer<typeof schema>`.
1350
1348
 
1351
1349
  ### Building schemas
1352
1350
 
1353
- #### [`pick-seal-primitive/`](../pick-seal-primitive/SKILL.md)
1351
+ #### `pick-seal-primitive`
1354
1352
  Choose the right primitive — `string` / `int` / `literal` / `date` / `enum` / `computed` / `managed` / `instanceof` / `any`. Covers the close calls (`string` vs `scalar`, `int` vs `number`, `literal` vs `enum`).
1355
1353
 
1356
- #### [`define-structural-shape/`](../define-structural-shape/SKILL.md)
1354
+ #### `define-structural-shape`
1357
1355
  Compose `v.object` / `v.array` / `v.record` / `v.tuple` / `v.union` / `v.discriminatedUnion` / `v.lazy` — object schemas, dynamic-keyed records, tagged unions, recursive shapes.
1358
1356
 
1359
- #### [`compose-seal-modifiers/`](../compose-seal-modifiers/SKILL.md)
1357
+ #### `compose-seal-modifiers`
1360
1358
  Cross-cutting modifiers — `.optional` / `.nullable` / `.default` / `.catch` / `.omit` / membership rules — plus the mutator-vs-transformer pipeline and `Infer.Input` vs `Infer.Output`.
1361
1359
 
1362
1360
  ### Output + interop
1363
1361
 
1364
- #### [`handle-seal-errors/`](../handle-seal-errors/SKILL.md)
1362
+ #### `handle-seal-errors`
1365
1363
  Read a `ValidationResult` — `isValid`, `errors[]`, `data`. Branch on `error.type`, customize messages, hook translation.
1366
1364
 
1367
- #### [`generate-json-schema/`](../generate-json-schema/SKILL.md)
1365
+ #### `generate-json-schema`
1368
1366
  `schema.toJsonSchema(target)` — draft-2020-12 / draft-07 / openapi-3.0 / openai-strict. For OpenAI structured outputs, OpenAPI specs, any JSON-Schema consumer.
1369
1367
 
1370
- #### [`bridge-standard-schema/`](../bridge-standard-schema/SKILL.md)
1368
+ #### `bridge-standard-schema`
1371
1369
  Standard Schema interop — why a `StandardSchemaV1<T>` slot might reject a schema, the phantom-intersection at the `v` factory return, Cascade `Model<TSchema>` variance. For migrating off `as unknown as` casts.
1372
1370
 
1373
- #### [`extend-seal-with-plugins/`](../extend-seal-with-plugins/SKILL.md)
1371
+ #### `extend-seal-with-plugins`
1374
1372
  Author a plugin to add validator methods (`.slug`, `.postalCode`, …) — the `SealPlugin` shape, `registerPlugin` lifecycle, TS prototype augmentation.
1375
1373
 
1376
1374
  ## Configuration
@@ -1385,8 +1383,8 @@ Author a plugin to add validator methods (`.slug`, `.postalCode`, …) — the `
1385
1383
 
1386
1384
  ## See also
1387
1385
 
1388
- - [`@warlock.js/cascade`](../../../cascade/skills/cascade-basics/SKILL.md) — uses seal schemas as `Model.schema`.
1389
- - [`@warlock.js/core`](../../../core/skills/validate-input/SKILL.md) — re-exports `v` (aliased) and adds framework validators in `core/v`.
1386
+ - `@warlock.js/cascade` (the `cascade-basics` topic of the `warlock-js-cascade` skill) — uses seal schemas as `Model.schema`.
1387
+ - `@warlock.js/core` (the `validate-input` topic of the `warlock-js-core` skill) — re-exports `v` (aliased) and adds framework validators in `core/v`.
1390
1388
  - [`mongez-agent-kit-authoring-skills`](../../../../domains/shared/skills/) (load via agent-kit sync) — how this becomes `.claude/skills/warlock-js-seal-overview/`.
1391
1389
 
1392
1390
 
@@ -1394,7 +1392,7 @@ Author a plugin to add validator methods (`.slug`, `.postalCode`, …) — the `
1394
1392
 
1395
1393
  ---
1396
1394
  name: pick-seal-primitive
1397
- description: 'Pick the right `v` factory primitive — string / int / literal / date / enum / computed / managed / instanceof / any. Triggers: `v.string`, `v.email`, `v.number`, `v.int`, `v.float`, `v.numeric`, `v.boolean`, `v.scalar`, `v.date`, `v.literal`, `v.enum`, `v.instanceof`, `v.computed`, `v.managed`, `v.any`; "v.string vs v.scalar", "v.literal vs v.enum", "v.date vs v.instanceof(Date)", "what is v.computed"; typical import `import { v } from "@warlock.js/seal"`. Skip: structural shapes — `@warlock.js/seal/define-structural-shape/SKILL.md`; modifiers — `@warlock.js/seal/compose-seal-modifiers/SKILL.md`; competing libs `zod`, `valibot`, `yup`.'
1395
+ description: 'Pick the right `v` factory primitive — string / int / literal / date / enum / computed / managed / instanceof / any. Triggers: `v.string`, `v.email`, `v.number`, `v.int`, `v.float`, `v.numeric`, `v.boolean`, `v.scalar`, `v.date`, `v.literal`, `v.enum`, `v.instanceof`, `v.computed`, `v.managed`, `v.any`; "v.string vs v.scalar", "v.literal vs v.enum", "v.date vs v.instanceof(Date)", "what is v.computed"; typical import `import { v } from "@warlock.js/seal"`. Skip: structural shapes — the `define-structural-shape` topic; modifiers — the `compose-seal-modifiers` topic; competing libs `zod`, `valibot`, `yup`.'
1398
1396
  ---
1399
1397
 
1400
1398
  # Picking the right primitive
@@ -1475,6 +1473,10 @@ That distinction matters wherever "empty" and "absent" mean different things —
1475
1473
  Before 4.9.2 `v.literal("")` always failed with *"is required"*, and `.optional()` looked like a workaround while actually disabling the literal check — accepting `""`, `null`, and a missing key alike. `v.literal(0)` and `v.literal(false)` were never affected.
1476
1474
  :::
1477
1475
 
1476
+ :::note[Fixed again in 5.30]
1477
+ 5.25 made a blank form value count as missing for literal and enum sets, so an unselected `<select>` reads as absent. That rule also caught `v.literal("")` from 5.25 to 5.29: the required literal rejected `""` and `.optional()` dropped it from the data. Since 5.30 a literal set that lists a blank string keeps `""` as a value in its default (implicit) required state and under `.present()`, `.optional()` and `.nullable()`; a set without one still reads a blank value as missing. An explicit `.required()` (or `requiredIf` and the other conditional rules) puts back the strict non-empty rule and rejects `""` — leave the default state in place when `""` is a valid value.
1478
+ :::
1479
+
1478
1480
  `v.instanceof(Ctor)` for File/Buffer/Uint8Array/custom classes. Returns `{}` from `toJsonSchema()` (not representable). For OpenAPI `File`, attach `{ type: "string", format: "binary" }` manually after generation.
1479
1481
 
1480
1482
  ## `v.any` — escape hatch
@@ -1518,7 +1520,7 @@ Both are **skipped** when their parent `v.object` generates JSON Schema — they
1518
1520
  | Date in the past | `v.date().past()` |
1519
1521
  | File upload | `v.instanceof(File)` |
1520
1522
  | Class instance (not Date) | `v.instanceof(Ctor)` |
1521
- | Discriminated union | see [`@warlock.js/seal/define-structural-shape/SKILL.md`](@warlock.js/seal/define-structural-shape/SKILL.md) |
1523
+ | Discriminated union | see the `define-structural-shape` topic |
1522
1524
  | Derived value (computed from siblings) | `v.computed<T>(callback)` |
1523
1525
  | Framework-injected value | `v.managed<T>(callback)` |
1524
1526
  | Free-form / pass-through | `v.any()` (only when you've thought about it) |
@@ -1532,7 +1534,7 @@ Each primitive's full method list lives in a sibling file:
1532
1534
  - [`date-methods.md`](./date-methods.md) — `.min` / `.before` / `.after` / `.today` / `.past` / `.future` / `.weekDay` / `.minAge` / `.year` / `.quarter` / `.toISOString` / …
1533
1535
  - [`boolean-methods.md`](./boolean-methods.md) — `.accepted` / `.declined` / `.mustBeTrue` / `.mustBeFalse` / `.acceptedIf` / `.declinedWithout` / …
1534
1536
 
1535
- For cross-cutting modifiers (`.optional`/`.nullable`/`.default`/`.catch`/`.in`/`.oneOf`), see [`@warlock.js/seal/compose-seal-modifiers/SKILL.md`](@warlock.js/seal/compose-seal-modifiers/SKILL.md). For containers (object/array/record/tuple/union), see [`@warlock.js/seal/define-structural-shape/SKILL.md`](@warlock.js/seal/define-structural-shape/SKILL.md).
1537
+ For cross-cutting modifiers (`.optional`/`.nullable`/`.default`/`.catch`/`.in`/`.oneOf`), see the `compose-seal-modifiers` topic. For containers (object/array/record/tuple/union), see the `define-structural-shape` topic.
1536
1538
 
1537
1539
  ## Things NOT to do
1538
1540
 
@@ -1547,7 +1549,7 @@ For cross-cutting modifiers (`.optional`/`.nullable`/`.default`/`.catch`/`.in`/`
1547
1549
 
1548
1550
  # `v.boolean()` — method reference
1549
1551
 
1550
- Picking guide is in [`@warlock.js/seal/pick-seal-primitive/SKILL.md`](@warlock.js/seal/pick-seal-primitive/SKILL.md). Membership rules (`.in`/`.oneOf`) inherited from PrimitiveValidator — see [`@warlock.js/seal/compose-seal-modifiers/SKILL.md`](@warlock.js/seal/compose-seal-modifiers/SKILL.md).
1552
+ Picking guide is in the `pick-seal-primitive` topic. Membership rules (`.in`/`.oneOf`) inherited from PrimitiveValidator — see the `compose-seal-modifiers` topic.
1551
1553
 
1552
1554
  ## Strict equality
1553
1555
 
@@ -1655,7 +1657,7 @@ v.object({
1655
1657
 
1656
1658
  # `v.date()` — method reference
1657
1659
 
1658
- `v.date()` ships a built-in mutator that normalizes strings, timestamps, and `Date` objects to a `Date` before rules run. Picking guide (`v.date()` vs `v.instanceof(Date)`) is in [`@warlock.js/seal/pick-seal-primitive/SKILL.md`](@warlock.js/seal/pick-seal-primitive/SKILL.md).
1660
+ `v.date()` ships a built-in mutator that normalizes strings, timestamps, and `Date` objects to a `Date` before rules run. Picking guide (`v.date()` vs `v.instanceof(Date)`) is in the `pick-seal-primitive` topic.
1659
1661
 
1660
1662
  ## Range — global value comparison
1661
1663
 
@@ -1834,7 +1836,7 @@ v.date().toEndOfDay().toDateOnly()
1834
1836
 
1835
1837
  # `v.number()` / `v.int()` / `v.float()` / `v.numeric()` — method reference
1836
1838
 
1837
- All four share this surface. The picking guide (which factory to call) is in [`@warlock.js/seal/pick-seal-primitive/SKILL.md`](@warlock.js/seal/pick-seal-primitive/SKILL.md). For `.optional()` / `.in()` / `.oneOf()`, see [`@warlock.js/seal/compose-seal-modifiers/SKILL.md`](@warlock.js/seal/compose-seal-modifiers/SKILL.md).
1839
+ All four share this surface. The picking guide (which factory to call) is in the `pick-seal-primitive` topic. For `.optional()` / `.in()` / `.oneOf()`, see the `compose-seal-modifiers` topic.
1838
1840
 
1839
1841
  ## Range — global value comparison
1840
1842
 
@@ -1978,7 +1980,7 @@ v.int().min(0).default(0).optional()
1978
1980
 
1979
1981
  Reference for `v.string()` / `v.email()`. Covers length, format, content, color, mutators (case, trim, mask, slug, base64, …) and what each maps to in JSON Schema.
1980
1982
 
1981
- For the picking guide (`v.string` vs `v.scalar` vs `v.literal`), see [`@warlock.js/seal/pick-seal-primitive/SKILL.md`](@warlock.js/seal/pick-seal-primitive/SKILL.md). For `.optional()` / `.nullable()` / `.default()` / `.in()` / `.oneOf()`, see [`@warlock.js/seal/compose-seal-modifiers/SKILL.md`](@warlock.js/seal/compose-seal-modifiers/SKILL.md).
1983
+ For the picking guide (`v.string` vs `v.scalar` vs `v.literal`), see the `pick-seal-primitive` topic. For `.optional()` / `.nullable()` / `.default()` / `.in()` / `.oneOf()`, see the `compose-seal-modifiers` topic.
1982
1984
 
1983
1985
  ## Length
1984
1986
 
@@ -2112,7 +2114,7 @@ JSON Schema: `format: "color"` for `.hexColor()`; the others map to `format: "co
2112
2114
 
2113
2115
  ## Mutator vs transformer
2114
2116
 
2115
- The methods above are **all mutators** — they reshape the value *before* validation rules run. If you want post-validation reshaping, attach via `.addTransformer(fn)` (see [`@warlock.js/seal/compose-seal-modifiers/SKILL.md`](@warlock.js/seal/compose-seal-modifiers/SKILL.md)).
2117
+ The methods above are **all mutators** — they reshape the value *before* validation rules run. If you want post-validation reshaping, attach via `.addTransformer(fn)` (see the `compose-seal-modifiers` topic).
2116
2118
 
2117
2119
  Practical implication: `v.string().min(3).trim()` runs `min(3)` against the *un-trimmed* input. To check trimmed length, mutate first: `v.string().trim().min(3)`.
2118
2120
 
@@ -2214,15 +2216,15 @@ root `v` factory when a schema needs other factories.
2214
2216
 
2215
2217
  The 12 things that are true in every seal use:
2216
2218
 
2217
- 1. **Public API is the `v` factory.** Never `new ObjectValidator(...)` from app code — bare classes lose the StandardSchema bridge typing. See [`@warlock.js/seal/bridge-standard-schema/SKILL.md`](@warlock.js/seal/bridge-standard-schema/SKILL.md).
2219
+ 1. **Public API is the `v` factory.** Never `new ObjectValidator(...)` from app code — bare classes lose the StandardSchema bridge typing. See the `bridge-standard-schema` topic.
2218
2220
  2. **Every factory return is a `StandardSchemaV1<Infer.Output<T>>`.** Pass seal schemas straight into `StandardSchemaV1<T>`-typed slots — no casts.
2219
2221
  3. **Two inference helpers — `Infer.Input<T>` and `Infer.Output<T>`.** Bare `Infer<T>` is an alias for `Infer.Input<T>` (the dominant usage: HTTP bodies, DTOs, form payloads). Use `Infer.Output<T>` for validated state (Cascade `Model<>` params, post-`validate()` data). See [the rules below](#inferinput-vs-inferoutput).
2220
2222
  4. **Fields are required by default.** Mark optional explicitly: `.optional()`. Skip `.required()` — canonical seal style omits the redundant call; inferred types already show what's required.
2221
- 5. **`validate(schema, data)` never throws.** Returns `Promise<ValidationResult>` with `{ isValid, data, errors }` — the validated value is `result.data`. See [`@warlock.js/seal/handle-seal-errors/SKILL.md`](@warlock.js/seal/handle-seal-errors/SKILL.md).
2223
+ 5. **`validate(schema, data)` never throws.** Returns `{ isValid, data, errors }`, narrowed on `isValid`: on success `data` is `Infer.Output<typeof schema>`, on failure it is `undefined` (a bare `BaseValidator`/`ObjectValidator` annotation keeps `data: any`). See the `handle-seal-errors` topic.
2222
2224
  6. **Validators are immutable by default.** Every chain method (`.min(3)`, `.email()`, `.optional()`, …) returns a clone. Toggle with the `.mutable` getter.
2223
2225
  7. **Two pipelines: mutators (pre-validation), transformers (post-validation).** Order: `default → mutators → required check → required-condition rule → other rules → transformers → data`. `.catch(fallback)` rescues any failure on leaf validators.
2224
2226
  8. **Cross-field rules need a `v.object` parent.** Standalone scalar validators have no siblings to resolve against.
2225
- 9. **JSON Schema generation is built-in.** `schema.toJsonSchema(target)` for `"draft-2020-12"` (default), `"draft-07"`, `"openapi-3.0"`, `"openai-strict"`. See [`@warlock.js/seal/generate-json-schema/SKILL.md`](@warlock.js/seal/generate-json-schema/SKILL.md).
2227
+ 9. **JSON Schema generation is built-in.** `schema.toJsonSchema(target)` for `"draft-2020-12"` (default), `"draft-07"`, `"openapi-3.0"`, `"openai-strict"`. See the `generate-json-schema` topic.
2226
2228
  10. **`v.computed` / `v.managed` derive — they don't validate inputs.** They produce values from siblings or context, and are **skipped** when the parent `v.object` emits JSON Schema (runtime-only constructs — calling `.toJsonSchema()` on one directly throws).
2227
2229
  11. **`v.lazy(() => schema)` for recursive shapes.** Defers resolution until validate-time so self-referencing types work.
2228
2230
  12. **`v.discriminatedUnion(field, branches)` for tagged unions.** Routes by a literal discriminator field instead of `matchesType()` trial — precise errors, exact inference.
@@ -2260,13 +2262,13 @@ Both flavours widen with `| null` when `.nullable()` is set.
2260
2262
 
2261
2263
  | If the task is about… | Load |
2262
2264
  | --- | --- |
2263
- | Picking the right primitive (`v.string` vs `v.scalar`, `v.literal` vs `v.enum`, `v.date` vs `v.instanceof(Date)`) | [`@warlock.js/seal/pick-seal-primitive/SKILL.md`](@warlock.js/seal/pick-seal-primitive/SKILL.md) |
2264
- | Building object / array / record / tuple / union schemas, discriminated unions, recursive schemas | [`@warlock.js/seal/define-structural-shape/SKILL.md`](@warlock.js/seal/define-structural-shape/SKILL.md) |
2265
- | Modifiers — `.required` / `.optional` / `.nullable` / `.default` / `.catch` / `.omit`, transformer vs mutator pipelines, membership rules | [`@warlock.js/seal/compose-seal-modifiers/SKILL.md`](@warlock.js/seal/compose-seal-modifiers/SKILL.md) |
2266
- | Reading `ValidationResult`, branching on `error.type`, error message customization, translation | [`@warlock.js/seal/handle-seal-errors/SKILL.md`](@warlock.js/seal/handle-seal-errors/SKILL.md) |
2267
- | Generating JSON Schema for OpenAI strict / OpenAPI / draft-07 | [`@warlock.js/seal/generate-json-schema/SKILL.md`](@warlock.js/seal/generate-json-schema/SKILL.md) |
2268
- | Why a `StandardSchemaV1<T>` slot accepts/rejects a schema, the phantom-intersection design, `Result<unknown>` errors | [`@warlock.js/seal/bridge-standard-schema/SKILL.md`](@warlock.js/seal/bridge-standard-schema/SKILL.md) |
2269
- | Authoring custom seal plugins to add validator methods | [`@warlock.js/seal/extend-seal-with-plugins/SKILL.md`](@warlock.js/seal/extend-seal-with-plugins/SKILL.md) |
2265
+ | Picking the right primitive (`v.string` vs `v.scalar`, `v.literal` vs `v.enum`, `v.date` vs `v.instanceof(Date)`) | The `pick-seal-primitive` topic |
2266
+ | Building object / array / record / tuple / union schemas, discriminated unions, recursive schemas | The `define-structural-shape` topic |
2267
+ | Modifiers — `.required` / `.optional` / `.nullable` / `.default` / `.catch` / `.omit`, transformer vs mutator pipelines, membership rules | The `compose-seal-modifiers` topic |
2268
+ | Reading `ValidationResult`, branching on `error.type`, error message customization, translation | The `handle-seal-errors` topic |
2269
+ | Generating JSON Schema for OpenAI strict / OpenAPI / draft-07 | The `generate-json-schema` topic |
2270
+ | Why a `StandardSchemaV1<T>` slot accepts/rejects a schema, the phantom-intersection design, `Result<unknown>` errors | The `bridge-standard-schema` topic |
2271
+ | Authoring custom seal plugins to add validator methods | The `extend-seal-with-plugins` topic |
2270
2272
 
2271
2273
  ## Things NOT to do
2272
2274
 
package/llms.txt CHANGED
@@ -6,12 +6,12 @@
6
6
 
7
7
  ## Skills
8
8
 
9
- - [bridge-standard-schema](@warlock.js/seal/bridge-standard-schema/SKILL.md): Diagnose `StandardSchemaV1` interop — phantom-intersection at the `v` factory return, why typed slots reject a schema, cascade `Model<TSchema>` variance. Triggers: `StandardSchemaV1`, `~standard`, `Infer`, `ObjectValidator`, `StringValidator`, `LiteralValidator`, `BaseValidator`, `Model<TSchema>`, `StandardJSONSchemaV1`, `Result<unknown>`; "StandardSchemaV1 slot rejecting my schema", "Result<unknown> error", "drop as unknown as cast", "cascade Model schema variance"; typical import `import { v, type Infer } from "@warlock.js/seal"`. Skip: foundations — `@warlock.js/seal/seal-basics/SKILL.md`; JSON Schema gen — `@warlock.js/seal/generate-json-schema/SKILL.md`; competing spec `@standard-schema/spec`.
10
- - [compose-seal-modifiers](@warlock.js/seal/compose-seal-modifiers/SKILL.md): Apply cross-cutting modifiers — `.optional` / `.nullable` / `.default` / `.catch` / `.omit` / membership rules — plus the mutator-vs-transformer pipeline and `Infer.Input` vs `Infer.Output`. Triggers: `.optional`, `.required`, `.nullable`, `.default`, `.catch`, `.present`, `.requiredIf`, `.requiredWith`, `.in`, `.oneOf`, `.notIn`, `.omit`, `.attribute`, `.mutable`, `.addMutator`, `Infer.Input`, `Infer.Output`; "mark field optional in seal", "default value in schema", "mutator vs transformer", "when does .catch fire"; typical import `import { v, type Infer } from "@warlock.js/seal"`. Skip: primitives — `@warlock.js/seal/pick-seal-primitive/SKILL.md`; containers — `@warlock.js/seal/define-structural-shape/SKILL.md`; errors — `@warlock.js/seal/handle-seal-errors/SKILL.md`; competing `zod` `.optional`/`.default`.
11
- - [define-structural-shape](@warlock.js/seal/define-structural-shape/SKILL.md): Compose `v.object` / `v.array` / `v.record` / `v.tuple` / `v.union` / `v.discriminatedUnion` / `v.lazy`. Triggers: `v.object`, `v.array`, `v.record`, `v.tuple`, `v.union`, `v.discriminatedUnion`, `v.lazy`, `ObjectValidator`; "how do I build an object schema", "dynamic-keyed record", "tagged union with discriminator", "recursive schema", "self-referencing schema"; typical import `import { v, type Infer } from "@warlock.js/seal"`. Skip: leaf primitives — `@warlock.js/seal/pick-seal-primitive/SKILL.md`; modifiers — `@warlock.js/seal/compose-seal-modifiers/SKILL.md`; standard-schema bridge — `@warlock.js/seal/bridge-standard-schema/SKILL.md`; competing libs `zod`, `valibot`.
12
- - [extend-seal-with-plugins](@warlock.js/seal/extend-seal-with-plugins/SKILL.md): Author a custom seal plugin to add validator methods (`.slug`, `.postalCode`, etc) — `SealPlugin` shape, `registerPlugin` lifecycle, TS prototype augmentation. Triggers: `SealPlugin`, `registerPlugin`, `unregisterPlugin`, `hasPlugin`, `getInstalledPlugins`, `StringValidator`, `NumberValidator`, `DateValidator`, `BaseValidator`, `install`, `uninstall`; "how do I add a custom validator method", "write a seal plugin", "extend v.string with .slug", "module augmentation for seal"; typical import `import { StringValidator, registerPlugin, type SealPlugin } from "@warlock.js/seal"`. Skip: built-in primitives — `@warlock.js/seal/pick-seal-primitive/SKILL.md`; bridge typing — `@warlock.js/seal/bridge-standard-schema/SKILL.md`; competing `zod` `.refine`/`.transform`.
13
- - [generate-json-schema](@warlock.js/seal/generate-json-schema/SKILL.md): Generate JSON Schema via `schema.toJsonSchema(target)` — `draft-2020-12` / `draft-07` / `openapi-3.0` / `openai-strict`. Triggers: `toJsonSchema`, `JsonSchemaTarget`, `draft-2020-12`, `draft-07`, `openapi-3.0`, `openai-strict`, `response_format`, `additionalProperties`, `nullable`; "how do I generate JSON Schema from seal", "OpenAI structured outputs from schema", "OpenAPI 3.0 nullable", "json_schema strict mode"; typical import `import { v } from "@warlock.js/seal"`. Skip: foundations — `@warlock.js/seal/seal-basics/SKILL.md`; bridge typing — `@warlock.js/seal/bridge-standard-schema/SKILL.md`; competing libs `zod-to-json-schema`, `ajv`, `@anatine/zod-openapi`.
14
- - [handle-seal-errors](@warlock.js/seal/handle-seal-errors/SKILL.md): Read `ValidationResult` — `isValid`, `errors[]`, `data`. Branch on `error.type`, customize messages, hook translation. Triggers: `ValidationResult`, `ValidationError`, `validate`, `isValid`, `errors`, `data`, `error.type`, `error.input`, `error.error`, `translationParams`, `.attribute`, `SealConfig`; "how to read seal errors", "branch on a specific rule failure", "customize validation error message", "translate seal error", "surface validation errors as 422"; typical import `import { validate, v } from "@warlock.js/seal"`. Skip: modifiers — `@warlock.js/seal/compose-seal-modifiers/SKILL.md`; structural shapes — `@warlock.js/seal/define-structural-shape/SKILL.md`; competing libs `zod` `.safeParse`, `yup` `ValidationError`, `joi`.
9
+ - [bridge-standard-schema](@warlock.js/seal/bridge-standard-schema/SKILL.md): Diagnose `StandardSchemaV1` interop — phantom-intersection at the `v` factory return, why typed slots reject a schema, cascade `Model<TSchema>` variance. Triggers: `StandardSchemaV1`, `~standard`, `Infer`, `ObjectValidator`, `StringValidator`, `LiteralValidator`, `BaseValidator`, `Model<TSchema>`, `StandardJSONSchemaV1`, `Result<unknown>`; "StandardSchemaV1 slot rejecting my schema", "Result<unknown> error", "drop as unknown as cast", "cascade Model schema variance"; typical import `import { v, type Infer } from "@warlock.js/seal"`. Skip: foundations — the `seal-basics` topic; JSON Schema gen — the `generate-json-schema` topic; competing spec `@standard-schema/spec`.
10
+ - [compose-seal-modifiers](@warlock.js/seal/compose-seal-modifiers/SKILL.md): Apply cross-cutting modifiers — `.optional` / `.nullable` / `.default` / `.catch` / `.omit` / membership rules — plus the mutator-vs-transformer pipeline and `Infer.Input` vs `Infer.Output`. Triggers: `.optional`, `.required`, `.nullable`, `.default`, `.catch`, `.present`, `.requiredIf`, `.requiredWith`, `.in`, `.oneOf`, `.notIn`, `.omit`, `.attribute`, `.mutable`, `.addMutator`, `Infer.Input`, `Infer.Output`; "mark field optional in seal", "default value in schema", "mutator vs transformer", "when does .catch fire"; typical import `import { v, type Infer } from "@warlock.js/seal"`. Skip: primitives — the `pick-seal-primitive` topic; containers — the `define-structural-shape` topic; errors — the `handle-seal-errors` topic; competing `zod` `.optional`/`.default`.
11
+ - [define-structural-shape](@warlock.js/seal/define-structural-shape/SKILL.md): Compose `v.object` / `v.array` / `v.record` / `v.tuple` / `v.union` / `v.discriminatedUnion` / `v.lazy`. Triggers: `v.object`, `v.array`, `v.record`, `v.tuple`, `v.union`, `v.discriminatedUnion`, `v.lazy`, `ObjectValidator`; "how do I build an object schema", "dynamic-keyed record", "tagged union with discriminator", "recursive schema", "self-referencing schema"; typical import `import { v, type Infer } from "@warlock.js/seal"`. Skip: leaf primitives — the `pick-seal-primitive` topic; modifiers — the `compose-seal-modifiers` topic; standard-schema bridge — the `bridge-standard-schema` topic; competing libs `zod`, `valibot`.
12
+ - [extend-seal-with-plugins](@warlock.js/seal/extend-seal-with-plugins/SKILL.md): Author a custom seal plugin to add validator methods (`.slug`, `.postalCode`, etc) — `SealPlugin` shape, `registerPlugin` lifecycle, TS prototype augmentation. Triggers: `SealPlugin`, `registerPlugin`, `unregisterPlugin`, `hasPlugin`, `getInstalledPlugins`, `StringValidator`, `NumberValidator`, `DateValidator`, `BaseValidator`, `install`, `uninstall`; "how do I add a custom validator method", "write a seal plugin", "extend v.string with .slug", "module augmentation for seal"; typical import `import { StringValidator, registerPlugin, type SealPlugin } from "@warlock.js/seal"`. Skip: built-in primitives — the `pick-seal-primitive` topic; bridge typing — the `bridge-standard-schema` topic; competing `zod` `.refine`/`.transform`.
13
+ - [generate-json-schema](@warlock.js/seal/generate-json-schema/SKILL.md): Generate JSON Schema via `schema.toJsonSchema(target)` — `draft-2020-12` / `draft-07` / `openapi-3.0` / `openai-strict`. Triggers: `toJsonSchema`, `JsonSchemaTarget`, `draft-2020-12`, `draft-07`, `openapi-3.0`, `openai-strict`, `response_format`, `additionalProperties`, `nullable`; "how do I generate JSON Schema from seal", "OpenAI structured outputs from schema", "OpenAPI 3.0 nullable", "json_schema strict mode"; typical import `import { v } from "@warlock.js/seal"`. Skip: foundations — the `seal-basics` topic; bridge typing — the `bridge-standard-schema` topic; competing libs `zod-to-json-schema`, `ajv`, `@anatine/zod-openapi`.
14
+ - [handle-seal-errors](@warlock.js/seal/handle-seal-errors/SKILL.md): Read `ValidationResult` — `isValid`, `errors[]`, `data`. Branch on `error.type`, customize messages, hook translation. Triggers: `ValidationResult`, `ValidationError`, `validate`, `isValid`, `errors`, `data`, `error.type`, `error.input`, `error.error`, `translationParams`, `.attribute`, `SealConfig`; "how to read seal errors", "branch on a specific rule failure", "customize validation error message", "translate seal error", "surface validation errors as 422"; typical import `import { validate, v } from "@warlock.js/seal"`. Skip: modifiers — the `compose-seal-modifiers` topic; structural shapes — the `define-structural-shape` topic; competing libs `zod` `.safeParse`, `yup` `ValidationError`, `joi`.
15
15
  - [overview](@warlock.js/seal/overview/SKILL.md): @warlock.js/seal overview for orientation and choosing the focused skill for the task.
16
- - [pick-seal-primitive](@warlock.js/seal/pick-seal-primitive/SKILL.md): Pick the right `v` factory primitive — string / int / literal / date / enum / computed / managed / instanceof / any. Triggers: `v.string`, `v.email`, `v.number`, `v.int`, `v.float`, `v.numeric`, `v.boolean`, `v.scalar`, `v.date`, `v.literal`, `v.enum`, `v.instanceof`, `v.computed`, `v.managed`, `v.any`; "v.string vs v.scalar", "v.literal vs v.enum", "v.date vs v.instanceof(Date)", "what is v.computed"; typical import `import { v } from "@warlock.js/seal"`. Skip: structural shapes — `@warlock.js/seal/define-structural-shape/SKILL.md`; modifiers — `@warlock.js/seal/compose-seal-modifiers/SKILL.md`; competing libs `zod`, `valibot`, `yup`.
16
+ - [pick-seal-primitive](@warlock.js/seal/pick-seal-primitive/SKILL.md): Pick the right `v` factory primitive — string / int / literal / date / enum / computed / managed / instanceof / any. Triggers: `v.string`, `v.email`, `v.number`, `v.int`, `v.float`, `v.numeric`, `v.boolean`, `v.scalar`, `v.date`, `v.literal`, `v.enum`, `v.instanceof`, `v.computed`, `v.managed`, `v.any`; "v.string vs v.scalar", "v.literal vs v.enum", "v.date vs v.instanceof(Date)", "what is v.computed"; typical import `import { v } from "@warlock.js/seal"`. Skip: structural shapes — the `define-structural-shape` topic; modifiers — the `compose-seal-modifiers` topic; competing libs `zod`, `valibot`, `yup`.
17
17
  - [seal-basics](@warlock.js/seal/seal-basics/SKILL.md): Start here for @warlock.js/seal schemas, validation, parsing, and typed structural contracts.
package/package.json CHANGED
@@ -11,7 +11,8 @@
11
11
  },
12
12
  "repository": {
13
13
  "type": "git",
14
- "url": "https://github.com/warlockjs/seal"
14
+ "url": "git+https://github.com/warlockjs/framework.git",
15
+ "directory": "packages/seal"
15
16
  },
16
17
  "keywords": [
17
18
  "validation",
@@ -22,7 +23,7 @@
22
23
  ],
23
24
  "author": "hassanzohdy",
24
25
  "license": "MIT",
25
- "version": "5.28.0",
26
+ "version": "5.30.0",
26
27
  "main": "./cjs/index.cjs",
27
28
  "module": "./esm/index.mjs",
28
29
  "types": "./esm/index.d.mts",
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: bridge-standard-schema
3
- description: 'Diagnose `StandardSchemaV1` interop — phantom-intersection at the `v` factory return, why typed slots reject a schema, cascade `Model<TSchema>` variance. Triggers: `StandardSchemaV1`, `~standard`, `Infer`, `ObjectValidator`, `StringValidator`, `LiteralValidator`, `BaseValidator`, `Model<TSchema>`, `StandardJSONSchemaV1`, `Result<unknown>`; "StandardSchemaV1 slot rejecting my schema", "Result<unknown> error", "drop as unknown as cast", "cascade Model schema variance"; typical import `import { v, type Infer } from "@warlock.js/seal"`. Skip: foundations — `@warlock.js/seal/seal-basics/SKILL.md`; JSON Schema gen — `@warlock.js/seal/generate-json-schema/SKILL.md`; competing spec `@standard-schema/spec`.'
3
+ description: 'Diagnose `StandardSchemaV1` interop — phantom-intersection at the `v` factory return, why typed slots reject a schema, cascade `Model<TSchema>` variance. Triggers: `StandardSchemaV1`, `~standard`, `Infer`, `ObjectValidator`, `StringValidator`, `LiteralValidator`, `BaseValidator`, `Model<TSchema>`, `StandardJSONSchemaV1`, `Result<unknown>`; "StandardSchemaV1 slot rejecting my schema", "Result<unknown> error", "drop as unknown as cast", "cascade Model schema variance"; typical import `import { v, type Infer } from "@warlock.js/seal"`. Skip: foundations — the `seal-basics` topic; JSON Schema gen — the `generate-json-schema` topic; competing spec `@standard-schema/spec`.'
4
4
  ---
5
5
 
6
6
  # The Standard Schema bridge
@@ -1,11 +1,11 @@
1
1
  ---
2
2
  name: compose-seal-modifiers
3
- description: 'Apply cross-cutting modifiers — `.optional` / `.nullable` / `.default` / `.catch` / `.omit` / membership rules — plus the mutator-vs-transformer pipeline and `Infer.Input` vs `Infer.Output`. Triggers: `.optional`, `.required`, `.nullable`, `.default`, `.catch`, `.present`, `.requiredIf`, `.requiredWith`, `.in`, `.oneOf`, `.notIn`, `.omit`, `.attribute`, `.mutable`, `.addMutator`, `Infer.Input`, `Infer.Output`; "mark field optional in seal", "default value in schema", "mutator vs transformer", "when does .catch fire"; typical import `import { v, type Infer } from "@warlock.js/seal"`. Skip: primitives — `@warlock.js/seal/pick-seal-primitive/SKILL.md`; containers — `@warlock.js/seal/define-structural-shape/SKILL.md`; errors — `@warlock.js/seal/handle-seal-errors/SKILL.md`; competing `zod` `.optional`/`.default`.'
3
+ description: 'Apply cross-cutting modifiers — `.optional` / `.nullable` / `.default` / `.catch` / `.omit` / membership rules — plus the mutator-vs-transformer pipeline and `Infer.Input` vs `Infer.Output`. Triggers: `.optional`, `.required`, `.nullable`, `.default`, `.catch`, `.present`, `.requiredIf`, `.requiredWith`, `.in`, `.oneOf`, `.notIn`, `.omit`, `.attribute`, `.mutable`, `.addMutator`, `Infer.Input`, `Infer.Output`; "mark field optional in seal", "default value in schema", "mutator vs transformer", "when does .catch fire"; typical import `import { v, type Infer } from "@warlock.js/seal"`. Skip: primitives — the `pick-seal-primitive` topic; containers — the `define-structural-shape` topic; errors — the `handle-seal-errors` topic; competing `zod` `.optional`/`.default`.'
4
4
  ---
5
5
 
6
6
  # Cross-cutting modifiers + the pipeline
7
7
 
8
- This skill covers methods that work on **every** validator. Type-specific methods (`.email()`, `.min()` on strings, `.between()` on numbers, `.weekDay()` on dates, etc.) live in the per-type method references — see [`@warlock.js/seal/pick-seal-primitive/SKILL.md`](@warlock.js/seal/pick-seal-primitive/SKILL.md) and [`@warlock.js/seal/define-structural-shape/SKILL.md`](@warlock.js/seal/define-structural-shape/SKILL.md).
8
+ This skill covers methods that work on **every** validator. Type-specific methods (`.email()`, `.min()` on strings, `.between()` on numbers, `.weekDay()` on dates, etc.) live in the per-type method references — see the `pick-seal-primitive` topic and the `define-structural-shape` topic.
9
9
 
10
10
  ## The pipeline
11
11
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: define-structural-shape
3
- description: 'Compose `v.object` / `v.array` / `v.record` / `v.tuple` / `v.union` / `v.discriminatedUnion` / `v.lazy`. Triggers: `v.object`, `v.array`, `v.record`, `v.tuple`, `v.union`, `v.discriminatedUnion`, `v.lazy`, `ObjectValidator`; "how do I build an object schema", "dynamic-keyed record", "tagged union with discriminator", "recursive schema", "self-referencing schema"; typical import `import { v, type Infer } from "@warlock.js/seal"`. Skip: leaf primitives — `@warlock.js/seal/pick-seal-primitive/SKILL.md`; modifiers — `@warlock.js/seal/compose-seal-modifiers/SKILL.md`; standard-schema bridge — `@warlock.js/seal/bridge-standard-schema/SKILL.md`; competing libs `zod`, `valibot`.'
3
+ description: 'Compose `v.object` / `v.array` / `v.record` / `v.tuple` / `v.union` / `v.discriminatedUnion` / `v.lazy`. Triggers: `v.object`, `v.array`, `v.record`, `v.tuple`, `v.union`, `v.discriminatedUnion`, `v.lazy`, `ObjectValidator`; "how do I build an object schema", "dynamic-keyed record", "tagged union with discriminator", "recursive schema", "self-referencing schema"; typical import `import { v, type Infer } from "@warlock.js/seal"`. Skip: leaf primitives — the `pick-seal-primitive` topic; modifiers — the `compose-seal-modifiers` topic; standard-schema bridge — the `bridge-standard-schema` topic; competing libs `zod`, `valibot`.'
4
4
  ---
5
5
 
6
6
  # Structural validators — picking guide
@@ -124,11 +124,11 @@ Use for: trees (categories, file systems), threaded data (comment chains), mutua
124
124
  | One of N scalar types | `v.union([...])` |
125
125
  | One of N object shapes with a tag field | `v.discriminatedUnion(key, [...])` |
126
126
  | Self-referencing or forward reference | `v.lazy(() => schema)` |
127
- | One of N constants | `v.literal(...values)` (not structural — see [`@warlock.js/seal/pick-seal-primitive/SKILL.md`](@warlock.js/seal/pick-seal-primitive/SKILL.md)) |
127
+ | One of N constants | `v.literal(...values)` (not structural — see the `pick-seal-primitive` topic) |
128
128
 
129
129
  ## A note on cascade Models
130
130
 
131
- `@warlock.js/cascade` Models declare `static schema: ObjectValidator<TSchema>`. Passing a `v.object({...})` works directly — the factory return widens to fit the Model's invariant generic without breaking type checking. If TS complains *"`ObjectValidator<{specific}>` is not assignable to `ObjectValidator<TSchema>`"*, that's the variance trap and the answer isn't to widen the schema — it's almost always that `Model<TSchema>` was parameterized with a hand-rolled type that drifted from the schema's inferred shape. Fix the type, not the schema. See [`@warlock.js/seal/bridge-standard-schema/SKILL.md`](@warlock.js/seal/bridge-standard-schema/SKILL.md).
131
+ `@warlock.js/cascade` Models declare `static schema: ObjectValidator<TSchema>`. Passing a `v.object({...})` works directly — the factory return widens to fit the Model's invariant generic without breaking type checking. If TS complains *"`ObjectValidator<{specific}>` is not assignable to `ObjectValidator<TSchema>`"*, that's the variance trap and the answer isn't to widen the schema — it's almost always that `Model<TSchema>` was parameterized with a hand-rolled type that drifted from the schema's inferred shape. Fix the type, not the schema. See the `bridge-standard-schema` topic.
132
132
 
133
133
  ## Method-surface reference
134
134
 
@@ -1,6 +1,6 @@
1
1
  # `v.array(itemValidator)` — method reference
2
2
 
3
- The inner validator runs against each element. Failure on any element fails the array. Picking guide (array vs tuple vs record) is in [`@warlock.js/seal/define-structural-shape/SKILL.md`](@warlock.js/seal/define-structural-shape/SKILL.md).
3
+ The inner validator runs against each element. Failure on any element fails the array. Picking guide (array vs tuple vs record) is in the `define-structural-shape` topic.
4
4
 
5
5
  ## Length
6
6
 
@@ -1,6 +1,6 @@
1
1
  # `v.object({...})` — method reference
2
2
 
3
- Picking guide for structural validators is in [`@warlock.js/seal/define-structural-shape/SKILL.md`](@warlock.js/seal/define-structural-shape/SKILL.md). For field-level chaining (`.required` / `.optional` / `.attribute`), see [`@warlock.js/seal/compose-seal-modifiers/SKILL.md`](@warlock.js/seal/compose-seal-modifiers/SKILL.md).
3
+ Picking guide for structural validators is in the `define-structural-shape` topic. For field-level chaining (`.required` / `.optional` / `.attribute`), see the `compose-seal-modifiers` topic.
4
4
 
5
5
  ## Schema composition
6
6
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: extend-seal-with-plugins
3
- description: 'Author a custom seal plugin to add validator methods (`.slug`, `.postalCode`, etc) — `SealPlugin` shape, `registerPlugin` lifecycle, TS prototype augmentation. Triggers: `SealPlugin`, `registerPlugin`, `unregisterPlugin`, `hasPlugin`, `getInstalledPlugins`, `StringValidator`, `NumberValidator`, `DateValidator`, `BaseValidator`, `install`, `uninstall`; "how do I add a custom validator method", "write a seal plugin", "extend v.string with .slug", "module augmentation for seal"; typical import `import { StringValidator, registerPlugin, type SealPlugin } from "@warlock.js/seal"`. Skip: built-in primitives — `@warlock.js/seal/pick-seal-primitive/SKILL.md`; bridge typing — `@warlock.js/seal/bridge-standard-schema/SKILL.md`; competing `zod` `.refine`/`.transform`.'
3
+ description: 'Author a custom seal plugin to add validator methods (`.slug`, `.postalCode`, etc) — `SealPlugin` shape, `registerPlugin` lifecycle, TS prototype augmentation. Triggers: `SealPlugin`, `registerPlugin`, `unregisterPlugin`, `hasPlugin`, `getInstalledPlugins`, `StringValidator`, `NumberValidator`, `DateValidator`, `BaseValidator`, `install`, `uninstall`; "how do I add a custom validator method", "write a seal plugin", "extend v.string with .slug", "module augmentation for seal"; typical import `import { StringValidator, registerPlugin, type SealPlugin } from "@warlock.js/seal"`. Skip: built-in primitives — the `pick-seal-primitive` topic; bridge typing — the `bridge-standard-schema` topic; competing `zod` `.refine`/`.transform`.'
4
4
  ---
5
5
 
6
6
  # Extend seal with plugins
@@ -9,7 +9,7 @@ Seal exposes a plugin system so you can add validator methods without forking th
9
9
 
10
10
  ## When to reach for a plugin
11
11
 
12
- - The validator method you want **does not exist** in built-in seal — check [`@warlock.js/seal/pick-seal-primitive/SKILL.md`](@warlock.js/seal/pick-seal-primitive/SKILL.md) and its method references first.
12
+ - The validator method you want **does not exist** in built-in seal — check the `pick-seal-primitive` topic and its method references first.
13
13
  - The validation is **stable and reusable** across modules — domain-specific formats (IBAN, postal codes, tax IDs, license plates, internal ID schemes).
14
14
  - You want the **chainable syntax** — `v.string().slug()` reads better than `v.string().pattern(/.../).addMutator(s => slugify(s))` at every call site.
15
15
 
@@ -100,7 +100,7 @@ declare module "@warlock.js/seal" {
100
100
 
101
101
  After this file is included in the project's `tsconfig.json` (via `include` or a side-effect import), `v.string().slug()` autocompletes and type-checks everywhere.
102
102
 
103
- **Important.** The augmentation has to declare on the **class** (`StringValidator`), not the factory return type. The factory return widens with `& StandardSchemaV1<...>` (see [`@warlock.js/seal/bridge-standard-schema/SKILL.md`](@warlock.js/seal/bridge-standard-schema/SKILL.md)) — augmentations on the intersection don't propagate. Patch the class, augment the class; the factory return picks up the new methods through structural inference.
103
+ **Important.** The augmentation has to declare on the **class** (`StringValidator`), not the factory return type. The factory return widens with `& StandardSchemaV1<...>` (see the `bridge-standard-schema` topic) — augmentations on the intersection don't propagate. Patch the class, augment the class; the factory return picks up the new methods through structural inference.
104
104
 
105
105
  ## Larger example — postal codes per country
106
106
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: generate-json-schema
3
- description: 'Generate JSON Schema via `schema.toJsonSchema(target)` — `draft-2020-12` / `draft-07` / `openapi-3.0` / `openai-strict`. Triggers: `toJsonSchema`, `JsonSchemaTarget`, `draft-2020-12`, `draft-07`, `openapi-3.0`, `openai-strict`, `response_format`, `additionalProperties`, `nullable`; "how do I generate JSON Schema from seal", "OpenAI structured outputs from schema", "OpenAPI 3.0 nullable", "json_schema strict mode"; typical import `import { v } from "@warlock.js/seal"`. Skip: foundations — `@warlock.js/seal/seal-basics/SKILL.md`; bridge typing — `@warlock.js/seal/bridge-standard-schema/SKILL.md`; competing libs `zod-to-json-schema`, `ajv`, `@anatine/zod-openapi`.'
3
+ description: 'Generate JSON Schema via `schema.toJsonSchema(target)` — `draft-2020-12` / `draft-07` / `openapi-3.0` / `openai-strict`. Triggers: `toJsonSchema`, `JsonSchemaTarget`, `draft-2020-12`, `draft-07`, `openapi-3.0`, `openai-strict`, `response_format`, `additionalProperties`, `nullable`; "how do I generate JSON Schema from seal", "OpenAI structured outputs from schema", "OpenAPI 3.0 nullable", "json_schema strict mode"; typical import `import { v } from "@warlock.js/seal"`. Skip: foundations — the `seal-basics` topic; bridge typing — the `bridge-standard-schema` topic; competing libs `zod-to-json-schema`, `ajv`, `@anatine/zod-openapi`.'
4
4
  ---
5
5
 
6
6
  # JSON Schema generation
@@ -1,18 +1,16 @@
1
1
  ---
2
2
  name: handle-seal-errors
3
- description: 'Read `ValidationResult` — `isValid`, `errors[]`, `data`. Branch on `error.type`, customize messages, hook translation. Triggers: `ValidationResult`, `ValidationError`, `validate`, `isValid`, `errors`, `data`, `error.type`, `error.input`, `error.error`, `translationParams`, `.attribute`, `SealConfig`; "how to read seal errors", "branch on a specific rule failure", "customize validation error message", "translate seal error", "surface validation errors as 422"; typical import `import { validate, v } from "@warlock.js/seal"`. Skip: modifiers — `@warlock.js/seal/compose-seal-modifiers/SKILL.md`; structural shapes — `@warlock.js/seal/define-structural-shape/SKILL.md`; competing libs `zod` `.safeParse`, `yup` `ValidationError`, `joi`.'
3
+ description: 'Read `ValidationResult` — `isValid`, `errors[]`, `data`. Branch on `error.type`, customize messages, hook translation. Triggers: `ValidationResult`, `ValidationError`, `validate`, `isValid`, `errors`, `data`, `error.type`, `error.input`, `error.error`, `translationParams`, `.attribute`, `SealConfig`; "how to read seal errors", "branch on a specific rule failure", "customize validation error message", "translate seal error", "surface validation errors as 422"; typical import `import { validate, v } from "@warlock.js/seal"`. Skip: modifiers — the `compose-seal-modifiers` topic; structural shapes — the `define-structural-shape` topic; competing libs `zod` `.safeParse`, `yup` `ValidationError`, `joi`.'
4
4
  ---
5
5
 
6
6
  # `ValidationResult` — reading errors
7
7
 
8
- `validate(schema, data)` never throws. It returns a `ValidationResult`:
8
+ `validate(schema, data)` never throws. It returns a result narrowed on `isValid`:
9
9
 
10
10
  ```ts
11
- type ValidationResult = {
12
- isValid: boolean;
13
- data: any; // shape after mutators + transformers (the validated value)
14
- errors: ValidationError[];
15
- };
11
+ type TypedValidationResult<TData> =
12
+ | { isValid: true; data: TData; errors: ValidationError[] } // TData = Infer.Output<typeof schema>
13
+ | { isValid: false; data: undefined; errors: ValidationError[] };
16
14
 
17
15
  type ValidationError = {
18
16
  type: string; // rule type that failed — "required", "email", "min", "string", ...
@@ -27,32 +27,32 @@ Eight task skills. Most schemas only need `seal-basics` + `pick-seal-primitive`
27
27
 
28
28
  ### Foundations
29
29
 
30
- #### [`seal-basics/`](../seal-basics/SKILL.md)
30
+ #### `seal-basics`
31
31
  Start here. The `v` factory, `validate(schema, data)`, and `Infer<typeof schema>`.
32
32
 
33
33
  ### Building schemas
34
34
 
35
- #### [`pick-seal-primitive/`](../pick-seal-primitive/SKILL.md)
35
+ #### `pick-seal-primitive`
36
36
  Choose the right primitive — `string` / `int` / `literal` / `date` / `enum` / `computed` / `managed` / `instanceof` / `any`. Covers the close calls (`string` vs `scalar`, `int` vs `number`, `literal` vs `enum`).
37
37
 
38
- #### [`define-structural-shape/`](../define-structural-shape/SKILL.md)
38
+ #### `define-structural-shape`
39
39
  Compose `v.object` / `v.array` / `v.record` / `v.tuple` / `v.union` / `v.discriminatedUnion` / `v.lazy` — object schemas, dynamic-keyed records, tagged unions, recursive shapes.
40
40
 
41
- #### [`compose-seal-modifiers/`](../compose-seal-modifiers/SKILL.md)
41
+ #### `compose-seal-modifiers`
42
42
  Cross-cutting modifiers — `.optional` / `.nullable` / `.default` / `.catch` / `.omit` / membership rules — plus the mutator-vs-transformer pipeline and `Infer.Input` vs `Infer.Output`.
43
43
 
44
44
  ### Output + interop
45
45
 
46
- #### [`handle-seal-errors/`](../handle-seal-errors/SKILL.md)
46
+ #### `handle-seal-errors`
47
47
  Read a `ValidationResult` — `isValid`, `errors[]`, `data`. Branch on `error.type`, customize messages, hook translation.
48
48
 
49
- #### [`generate-json-schema/`](../generate-json-schema/SKILL.md)
49
+ #### `generate-json-schema`
50
50
  `schema.toJsonSchema(target)` — draft-2020-12 / draft-07 / openapi-3.0 / openai-strict. For OpenAI structured outputs, OpenAPI specs, any JSON-Schema consumer.
51
51
 
52
- #### [`bridge-standard-schema/`](../bridge-standard-schema/SKILL.md)
52
+ #### `bridge-standard-schema`
53
53
  Standard Schema interop — why a `StandardSchemaV1<T>` slot might reject a schema, the phantom-intersection at the `v` factory return, Cascade `Model<TSchema>` variance. For migrating off `as unknown as` casts.
54
54
 
55
- #### [`extend-seal-with-plugins/`](../extend-seal-with-plugins/SKILL.md)
55
+ #### `extend-seal-with-plugins`
56
56
  Author a plugin to add validator methods (`.slug`, `.postalCode`, …) — the `SealPlugin` shape, `registerPlugin` lifecycle, TS prototype augmentation.
57
57
 
58
58
  ## Configuration
@@ -67,6 +67,6 @@ Author a plugin to add validator methods (`.slug`, `.postalCode`, …) — the `
67
67
 
68
68
  ## See also
69
69
 
70
- - [`@warlock.js/cascade`](../../../cascade/skills/cascade-basics/SKILL.md) — uses seal schemas as `Model.schema`.
71
- - [`@warlock.js/core`](../../../core/skills/validate-input/SKILL.md) — re-exports `v` (aliased) and adds framework validators in `core/v`.
70
+ - `@warlock.js/cascade` (the `cascade-basics` topic of the `warlock-js-cascade` skill) — uses seal schemas as `Model.schema`.
71
+ - `@warlock.js/core` (the `validate-input` topic of the `warlock-js-core` skill) — re-exports `v` (aliased) and adds framework validators in `core/v`.
72
72
  - [`mongez-agent-kit-authoring-skills`](../../../../domains/shared/skills/) (load via agent-kit sync) — how this becomes `.claude/skills/warlock-js-seal-overview/`.