feat(schema): Standard Schema interop and DSL removal#60
Conversation
Define the generated-definition meta-schema directly as JSON Schema, eliminating an internal parser and converter used only for that constant.
Accept any Standard Schema v1 validator (zod, valibot, arktype) at the `flag.custom()` / `arg.custom()` boundary. The spec is vendored as types only, so consumers bring their own validation with no new runtime dependency. Validation runs as one async pass in `resolve()` after a value settles from any source (CLI, env, config, prompt, default); sync and async validators both work and `parse()` stays synchronous. Failures surface as `CONSTRAINT_VIOLATED` errors naming the flag/arg. Also commits staged tooling: drop `@biomejs/biome` for the `biome` package, refresh `.zed` formatter/LSP settings.
Let the GH canary link the repository package during install, use explicit workspace-local tool versions, and exercise whole-`import.meta` manifest anchoring. Refresh the lockfile to capture the resulting toolchain state.
Match the official v1 namespace and options shape, and detect callable validators before parse functions so conforming libraries work as advertised. Validate array and variadic elements individually, expose public types, and cover the behavior in tests and docs.
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
dreamcli | 638de6b | Commit Preview URL Branch Preview URL |
Jul 17 2026, 01:54 PM |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (2)
📜 Recent review details⏰ Context from checks skipped due to timeout. (8)
🧰 Additional context used📓 Path-based instructions (6)src/core/json-schema/**/*.ts📄 CodeRabbit inference engine (src/core/json-schema/AGENTS.md)
Files:
**/*.{ts,tsx}📄 CodeRabbit inference engine (AGENTS.md)
Files:
src/**/*.ts📄 CodeRabbit inference engine (AGENTS.md)
Files:
**/*.test.ts📄 CodeRabbit inference engine (AGENTS.md)
Files:
src/core/**/*.ts📄 CodeRabbit inference engine (AGENTS.md)
Files:
**/*📄 CodeRabbit inference engine (AGENTS.md)
Files:
🧠 Learnings (10)📚 Learning: 2026-02-11T11:57:27.623ZApplied to files:
📚 Learning: 2026-02-12T15:52:24.166ZApplied to files:
📚 Learning: 2026-04-02T00:14:17.279ZApplied to files:
📚 Learning: 2026-04-06T11:25:57.444ZApplied to files:
📚 Learning: 2026-04-06T11:26:11.173ZApplied to files:
📚 Learning: 2026-04-06T11:28:55.224ZApplied to files:
📚 Learning: 2026-04-06T11:26:04.030ZApplied to files:
📚 Learning: 2026-04-06T18:24:44.371ZApplied to files:
📚 Learning: 2026-04-06T18:40:01.263ZApplied to files:
📚 Learning: 2026-06-23T16:38:50.547ZApplied to files:
🔍 Remote MCP GitHub GrepRelevant review context
🔇 Additional comments (2)
📝 WalkthroughReplace the private template-literal schema DSL with direct JSON Schema meta-schema definitions, deleting the parser/validator/JSON Schema converter code (~1,500 lines) and the DSL tests while keeping the generated Add fully typed Standard Schema v1 interoperability at the Refresh GH workspace canary/tooling and repository metadata (e.g., CODEOWNERS/formatting/LSP config) and adjust schema serialization details (e.g., regex pattern metadata as Validated with WalkthroughThis PR adds Standard Schema v1 support to Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant CLI
participant Resolver
participant StandardValidator
participant ValidationError
CLI->>Resolver: resolve flags and arguments
Resolver->>StandardValidator: validate resolved values
StandardValidator-->>Resolver: transformed values or issues
Resolver->>ValidationError: aggregate constraint violations
Resolver-->>CLI: validated result or error
Possibly related issues
Possibly related PRs
Suggested labels: Poem
🚥 Pre-merge checks | ✅ 9 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (9 passed)
📋 Issue PlannerLet us write the prompt for your AI agent so you can ship faster (with fewer bugs). View plan for ticket: Comment |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Resolve the repository package by path instead of requiring a globally registered Bun link, so clean CI runners can install the workspace without prior machine state.
commit: |
Keep generated definitions and their meta-schema aligned for numeric, string, array, path, and value-hint fields. Add compile-time and runtime exhaustiveness checks while excluding runtime validators.
Represent pattern metadata as `{ source, flags }` so generated definitions
retain RegExp semantics. Require both fields in the meta-schema and cover
flagged and unflagged expressions.
Summary
flag.custom()andarg.custom()with inferred output types and no new runtime dependencyWhy
The internal DSL existed only to build one static definition schema, while consumers could not reuse validators from libraries such as Zod, Valibot, or ArkType. Direct schema objects make the internal path smaller, and Standard Schema interop provides a dependency-free validation boundary without introducing another runtime schema system.
Closes #56.
Validation
bun run ci