Commit Graph

10 Commits

Author SHA1 Message Date
can1357 e9888367d1 refactor: migrated packages to internal utility modules and removed external dependencies
- Implemented in-house, zero-dependency utility modules in `pi-utils` covering DOM manipulation, markdown parsing, templating, browser automation helpers, and terminal buffers.
- Migrated packages across the repository to consume the new internal utilities and `omptype` schema validators instead of external dependencies.
- Removed multiple external runtime and development dependencies including Zod, Marked, LRU cache, Turndown, and Puppeteer browser packages.
2026-08-05 13:39:09 +02:00
roboomp 0a9ff29b17 fix(omptype): emit postfix bound for min-only numeric typebox schemas
tNumber rendered a min-only bound as the left-bound-only DSL
"1 <= number.integer", which parseBounded rejects because that range
spelling requires a trailing right bound. Standard TypeBox schemas like
Type.Integer({ minimum: 1 }) therefore failed to build, breaking
extension tool loading. Emit the postfix "number.integer >= 1" form when
there is no upper bound instead.

Fixes #7648
2026-08-04 20:18:52 +00:00
can1357 fc7cd30bd1 fix(omptype): restored required-first wire ordering and defaulted optional keys
- Restored required-before-optional property ordering in JSON Schema emission; downstream wire consumers (pi-ai toolWireSchema) rely on that stable ordering.
- Mapped Type.Optional with a default to a plain defaulted key in the TypeBox shim, since omptype (like ArkType) rejects optional keys that specify defaults.
2026-08-04 18:25:07 +02:00
can1357 90b5d8e707 feat(omptype): implemented advanced schema operators and type features
- Added support for bigint, RegExp literals, and regex execution in the string DSL alongside intersection and pipe operators.
- Enhanced error aggregation, cycle detection, and alternative branch rendering for union and collection validations.
- Updated object compilation and evaluation to support symbol and pattern indexes.
- Extended type methods with subtyping, type intersection, and scope building features.
2026-08-04 05:52:57 +02:00
can1357 b7adf21415 feat(omptype): added input and output io options for JSON schema generation
- Support `io: 'input'` and `io: 'output'` in `toJsonSchema` to control morph and default representation.
- Track `.to(target)` step output IR to drive output-side JSON schemas for piped types.
- Update string DSL inference to correctly handle input-side union members and morph sources.
2026-08-04 02:26:35 +02:00
can1357 e8f890fb16 feat(omptype): implemented standard schema interop and json schema parsing
- Added Standard Schema V1 interop via `~standard` property to enable synchronous validation across tools like tRPC and @t3-oss/env.
- Added `fromJsonSchema()` function to rebuild callable schemas from JSON Schema documents with recursive reference support.
- Added comprehensive unit test suites covering Standard Schema validation and JSON Schema round-tripping.
2026-08-04 02:12:35 +02:00
can1357 9b52d592a4 fix(omptype): bound toJsonSchema before wrapping in typebox adapter
- withJsonSchemaKeywords extracted toJsonSchema unbound, breaking this.description access added by the definition-inference fix.
2026-08-04 01:08:32 +02:00
can1357 b515024edc fix(omptype): resolved TS2589 instantiation cycles in definition inference
- Added an any-cutoff guard to InferDef/InferDefIn so permissive instantiation
  terminates instead of recursing through spread/index members without bound.
- Boxed spread and index-signature recursion behind an interface member and
  flattened primitive keyword lookup plus member-inference fallback chains.
- Gave BaseType (type.raw results) the fluent composition surface so .array()
  and friends type-check.
2026-08-03 23:36:29 +02:00
can1357 f559e7e9dc feat(omptype): introduced boolean validation caching and parser helpers
- Added `compileAllows` and specialized `.allows()` caching for boolean validation.
- Optimized parser performance with helper methods for whitespace scans and object definitions.
- Cloned path arrays in error handling to prevent internal mutation bugs.
- Updated benchmarks and added unit tests covering nested and optional property validation.
2026-08-03 23:02:52 +02:00
can1357 bc39ffa265 feat: introduced omptype validation package and migrated workspace dependencies
- Introduce `@oh-my-pi/omptype` as a new ArkType-compatible schema validation package featuring a lazy JIT runtime, JSON Schema emission, and compatibility adapters.
- Replace `arktype` across workspace packages and test utilities with `@oh-my-pi/omptype`.
- Add benchmark suites, tests, and documentation for the new validation engine and adapters.
- Update workspace build, test runner, and release configurations to include the new package.
2026-08-03 21:56:48 +02:00