@warlock.js/seal 5.34.2 → 5.35.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.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,12 @@ All notable changes to `@warlock.js/seal` are documented in this file.
4
4
 
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). `@warlock.js/*` packages are released in lockstep — every package shares the same version number, so a version below may list only the changes that affected this package.
6
6
 
7
+ ## 5.34.3 - 2026-10-20
8
+
9
+ ### Changed
10
+
11
+ - Condensed the package agent skill description to at most 450 characters, with API names and package routing guidance.
12
+
7
13
  ## 5.34.2 - 2026-10-19
8
14
 
9
15
  ### Fixed
package/llms-full.txt CHANGED
@@ -7,7 +7,7 @@
7
7
  ## Package orientation
8
8
 
9
9
  ---
10
- description: 'Type-safe, framework-agnostic validation for Warlock.js: schemas, coercion, modifiers, JSON Schema, Standard Schema. Exports `v`, `validate`, `ObjectValidator`, `StringValidator`, `Infer`, reached as `v.object`, `v.string`, `v.array`, `v.enum`, `v.union`. Use for: "validate this request body", "require an email and a min-length password", "infer the TypeScript type from a schema", "make a field optional or give it a default", "generate JSON Schema", "write a custom rule". Not this package: database rules and file validators live in @warlock.js/core; model schemas and persistence are @warlock.js/cascade.'
10
+ description: 'Framework-independent typed validation: `v`, `validate`, `ObjectValidator`, `StringValidator` and `Infer`. Use for "validate a request body", "require an email", optional fields and defaults, schema type inference, custom rules, JSON Schema or Standard Schema. Not this package → @warlock.js/core for database rules and upload validators; @warlock.js/cascade for model schemas and persistence.'
11
11
  ---
12
12
 
13
13
  # @warlock.js/seal
@@ -61,7 +61,7 @@ Skip if you only need framework-bound validators (file uploads, DB rules) — th
61
61
  - `@warlock.js/core` (the `validate-input` topic of the `warlock-js-core` skill) — adds framework validators through `core/v`; import the base `v` from seal.
62
62
 
63
63
 
64
- ## bridge-standard-schema `@warlock.js/seal/bridge-standard-schema/SKILL.md`
64
+ ## bridge-standard-schema `@warlock.js/seal/skills/bridge-standard-schema/SKILL.md`
65
65
 
66
66
  ---
67
67
  name: bridge-standard-schema
@@ -227,7 +227,7 @@ Seal forks the types locally. Reasons:
227
227
  If V2 lands, re-fork. Until then the local copy is the right call.
228
228
 
229
229
 
230
- ## compose-seal-modifiers `@warlock.js/seal/compose-seal-modifiers/SKILL.md`
230
+ ## compose-seal-modifiers `@warlock.js/seal/skills/compose-seal-modifiers/SKILL.md`
231
231
 
232
232
  ---
233
233
  name: compose-seal-modifiers
@@ -536,7 +536,7 @@ Switch back with `.immutable`. Default is fine 99% of the time. Reach for `.muta
536
536
  - Don't mutate a schema you handed to a Model. Default immutability protects you; opting into `.mutable` on shared schemas is asking for confusion.
537
537
 
538
538
 
539
- ## define-structural-shape `@warlock.js/seal/define-structural-shape/SKILL.md`
539
+ ## define-structural-shape `@warlock.js/seal/skills/define-structural-shape/SKILL.md`
540
540
 
541
541
  ---
542
542
  name: define-structural-shape
@@ -711,7 +711,7 @@ rename entries; present keys are validated as strings. Literal keys are optional
711
711
  in the inferred dictionary; use `v.object` for required named fields.
712
712
 
713
713
 
714
- ### define-structural-shape/array-methods.md `@warlock.js/seal/define-structural-shape/array-methods.md`
714
+ ### define-structural-shape/array-methods.md `@warlock.js/seal/skills/define-structural-shape/array-methods.md`
715
715
 
716
716
  # `v.array(itemValidator)` — method reference
717
717
 
@@ -793,7 +793,7 @@ v.array(v.string()).default([]).optional();
793
793
  ```
794
794
 
795
795
 
796
- ### define-structural-shape/object-methods.md `@warlock.js/seal/define-structural-shape/object-methods.md`
796
+ ### define-structural-shape/object-methods.md `@warlock.js/seal/skills/define-structural-shape/object-methods.md`
797
797
 
798
798
  # `v.object({...})` — method reference
799
799
 
@@ -991,7 +991,7 @@ const signupSchema = v.object({
991
991
  ```
992
992
 
993
993
 
994
- ## extend-seal-with-plugins `@warlock.js/seal/extend-seal-with-plugins/SKILL.md`
994
+ ## extend-seal-with-plugins `@warlock.js/seal/skills/extend-seal-with-plugins/SKILL.md`
995
995
 
996
996
  ---
997
997
  name: extend-seal-with-plugins
@@ -1207,7 +1207,7 @@ const bothDates: SchemaRule = {
1207
1207
  ```
1208
1208
 
1209
1209
 
1210
- ## generate-json-schema `@warlock.js/seal/generate-json-schema/SKILL.md`
1210
+ ## generate-json-schema `@warlock.js/seal/skills/generate-json-schema/SKILL.md`
1211
1211
 
1212
1212
  ---
1213
1213
  name: generate-json-schema
@@ -1354,7 +1354,7 @@ If the schema validator itself accepts data but the _generated_ JSON Schema reje
1354
1354
  Generating JSON Schema is cheap (pure-function tree walk), so don't worry about caching the result for schemas that change at startup. For dynamic schemas built per-request, generate per-request — there's no shared mutable state.
1355
1355
 
1356
1356
 
1357
- ## handle-seal-errors `@warlock.js/seal/handle-seal-errors/SKILL.md`
1357
+ ## handle-seal-errors `@warlock.js/seal/skills/handle-seal-errors/SKILL.md`
1358
1358
 
1359
1359
  ---
1360
1360
  name: handle-seal-errors
@@ -1504,7 +1504,7 @@ Avoid leaking `result.data` back to the client when rejecting — it might conta
1504
1504
  For server-side logs, log `errors[]` with the field paths and rule types; redact values unless you're certain the field isn't sensitive. The `@warlock.js/logger` redaction layer is the right place to enforce that.
1505
1505
 
1506
1506
 
1507
- ## pick-seal-primitive `@warlock.js/seal/pick-seal-primitive/SKILL.md`
1507
+ ## pick-seal-primitive `@warlock.js/seal/skills/pick-seal-primitive/SKILL.md`
1508
1508
 
1509
1509
  ---
1510
1510
  name: pick-seal-primitive
@@ -1661,7 +1661,7 @@ For cross-cutting modifiers (`.optional`/`.nullable`/`.default`/`.catch`/`.in`/`
1661
1661
  - Don't expect `v.computed` / `v.managed` to validate input — they ignore input shape entirely. Reach for them only when _producing_ a value.
1662
1662
 
1663
1663
 
1664
- ### pick-seal-primitive/boolean-methods.md `@warlock.js/seal/pick-seal-primitive/boolean-methods.md`
1664
+ ### pick-seal-primitive/boolean-methods.md `@warlock.js/seal/skills/pick-seal-primitive/boolean-methods.md`
1665
1665
 
1666
1666
  # `v.boolean()` — method reference
1667
1667
 
@@ -1769,7 +1769,7 @@ v.object({
1769
1769
  ```
1770
1770
 
1771
1771
 
1772
- ### pick-seal-primitive/date-methods.md `@warlock.js/seal/pick-seal-primitive/date-methods.md`
1772
+ ### pick-seal-primitive/date-methods.md `@warlock.js/seal/skills/pick-seal-primitive/date-methods.md`
1773
1773
 
1774
1774
  # `v.date()` — method reference
1775
1775
 
@@ -1948,7 +1948,7 @@ v.date().toEndOfDay().toDateOnly();
1948
1948
  ```
1949
1949
 
1950
1950
 
1951
- ### pick-seal-primitive/number-methods.md `@warlock.js/seal/pick-seal-primitive/number-methods.md`
1951
+ ### pick-seal-primitive/number-methods.md `@warlock.js/seal/skills/pick-seal-primitive/number-methods.md`
1952
1952
 
1953
1953
  # `v.number()` / `v.int()` / `v.float()` / `v.numeric()` — method reference
1954
1954
 
@@ -2090,7 +2090,7 @@ v.int().min(0).default(0).optional();
2090
2090
  ```
2091
2091
 
2092
2092
 
2093
- ### pick-seal-primitive/string-methods.md `@warlock.js/seal/pick-seal-primitive/string-methods.md`
2093
+ ### pick-seal-primitive/string-methods.md `@warlock.js/seal/skills/pick-seal-primitive/string-methods.md`
2094
2094
 
2095
2095
  # `v.string()` — method reference
2096
2096
 
@@ -2268,7 +2268,7 @@ The standalone `replaceMutator` and `replaceAllMutator` preserve the stringified
2268
2268
  value when called without a context or replacement options.
2269
2269
 
2270
2270
 
2271
- ## seal-basics `@warlock.js/seal/seal-basics/SKILL.md`
2271
+ ## seal-basics `@warlock.js/seal/skills/seal-basics/SKILL.md`
2272
2272
 
2273
2273
  ---
2274
2274
  name: seal-basics
package/llms.txt CHANGED
@@ -6,12 +6,12 @@
6
6
 
7
7
  ## Skills
8
8
 
9
- - [Package orientation](@warlock.js/seal/skills/index.md): Type-safe, framework-agnostic validation for Warlock.js: schemas, coercion, modifiers, JSON Schema, Standard Schema. Exports `v`, `validate`, `ObjectValidator`, `StringValidator`, `Infer`, reached as `v.object`, `v.string`, `v.array`, `v.enum`, `v.union`. Use for: "validate this request body", "require an email and a min-length password", "infer the TypeScript type from a schema", "make a field optional or give it a default", "generate JSON Schema", "write a custom rule". Not this package: database rules and file validators live in @warlock.js/core; model schemas and persistence are @warlock.js/cascade.
10
- - [bridge-standard-schema](@warlock.js/seal/bridge-standard-schema/SKILL.md): Diagnose `StandardSchemaV1` interop — input/output class parameters and primitive factory intersections, 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`.
11
- - [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`.
12
- - [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`.
13
- - [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`.
14
- - [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`.
15
- - [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`.
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
- - [seal-basics](@warlock.js/seal/seal-basics/SKILL.md): Start here for @warlock.js/seal schemas, validation, parsing, and typed structural contracts.
9
+ - [Package orientation](@warlock.js/seal/skills/index.md): Framework-independent typed validation: `v`, `validate`, `ObjectValidator`, `StringValidator` and `Infer`. Use for "validate a request body", "require an email", optional fields and defaults, schema type inference, custom rules, JSON Schema or Standard Schema. Not this package → @warlock.js/core for database rules and upload validators; @warlock.js/cascade for model schemas and persistence.
10
+ - [bridge-standard-schema](@warlock.js/seal/skills/bridge-standard-schema/SKILL.md): Diagnose `StandardSchemaV1` interop — input/output class parameters and primitive factory intersections, 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`.
11
+ - [compose-seal-modifiers](@warlock.js/seal/skills/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`.
12
+ - [define-structural-shape](@warlock.js/seal/skills/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`.
13
+ - [extend-seal-with-plugins](@warlock.js/seal/skills/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`.
14
+ - [generate-json-schema](@warlock.js/seal/skills/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`.
15
+ - [handle-seal-errors](@warlock.js/seal/skills/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`.
16
+ - [pick-seal-primitive](@warlock.js/seal/skills/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
+ - [seal-basics](@warlock.js/seal/skills/seal-basics/SKILL.md): Start here for @warlock.js/seal schemas, validation, parsing, and typed structural contracts.
package/package.json CHANGED
@@ -23,7 +23,7 @@
23
23
  ],
24
24
  "author": "hassanzohdy",
25
25
  "license": "MIT",
26
- "version": "5.34.2",
26
+ "version": "5.35.0",
27
27
  "main": "./cjs/index.cjs",
28
28
  "module": "./esm/index.mjs",
29
29
  "types": "./esm/index.d.mts",
package/skills/index.md CHANGED
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: 'Type-safe, framework-agnostic validation for Warlock.js: schemas, coercion, modifiers, JSON Schema, Standard Schema. Exports `v`, `validate`, `ObjectValidator`, `StringValidator`, `Infer`, reached as `v.object`, `v.string`, `v.array`, `v.enum`, `v.union`. Use for: "validate this request body", "require an email and a min-length password", "infer the TypeScript type from a schema", "make a field optional or give it a default", "generate JSON Schema", "write a custom rule". Not this package: database rules and file validators live in @warlock.js/core; model schemas and persistence are @warlock.js/cascade.'
2
+ description: 'Framework-independent typed validation: `v`, `validate`, `ObjectValidator`, `StringValidator` and `Infer`. Use for "validate a request body", "require an email", optional fields and defaults, schema type inference, custom rules, JSON Schema or Standard Schema. Not this package → @warlock.js/core for database rules and upload validators; @warlock.js/cascade for model schemas and persistence.'
3
3
  ---
4
4
 
5
5
  # @warlock.js/seal