@oh-my-pi/pi-coding-agent
Changed
- Upgraded the bundled omptype schema engine: intersection and pipe operators, bigint and RegExp literals in the string DSL, Standard Schema V1 interop, JSON Schema import via fromJsonSchema(), and richer union/collection error reporting.
@oh-my-pi/omptype
Added
- Added
io: 'input'andio: 'output'options totoJsonSchema(), supporting input validation shapes and piped.to()target types - Added Standard Schema V1 interop: every schema exposes
~standardwith synchronous validation, enabling direct use with@t3-oss/env, tRPC, and other Standard Schema consumers. - Added
fromJsonSchema(), rebuilding callable schemas from JSON Schema documents (draft-07 / draft-2020-12 structural keywords, string formats,$defsrecursion, enums, andanyOf/oneOf/allOfcomposition) — the inverse ofType.toJsonSchema(). - Added
$defs/$refemission for recursive alias schemas intoJsonSchema()(draft-07 converts todefinitions), preventing unbounded recursion on cyclic scopes. - Added
AnyType, a minimal structural constraint for generic functions accepting any schema without descending the recursive fluent surface. - Root
.default()values now materialize forundefinedinput in direct calls and at the Standard Schema boundary (factories run per call). .narrow()/.filter()boolean overloads acceptOmpErrorsreturns, socond || ctx.reject(...)recipes typecheck.
Changed
- Restored low-overhead schema construction by lazily activating advanced normalization and compatibility machinery.
.default()is typed input-side (i | (() => i)) and marks the schema's input as optional (i | undefined).- Parse keywords (
string.integer.parse,parse.number, ...) now infer their morph output inside union strings, and input-side inference is union-aware. - Object-literal inference for
.merge()/.or()/.and()unwraps embedded schema values (output and input sides).
Fixed
- Alias intersections defer through memoized lazy nodes, so cyclic scope schemas no longer overflow the stack in
.and()or morph-union determinism checks.
Full Changelog: v17.2.7...v17.2.8