support standard schema / non-zod schemas for host tools
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 4.6k
- Forks
- 251
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 34
Description
host tool definitions are currently zod-specific.
today, inputSchema is typed as ZodType, converted with zodToJsonSchema, and validated with zod-specific parsing. that makes the host tool api harder to use with other schema libraries such as effect schema, valibot, arktype, and other libraries that implement Standard Schema.
relevant places:
packages/core/src/host-tools.tspackages/core/src/host-tools-zod.tspackages/core/src/agent-os.ts
proposal
make host tool schemas schema-library-agnostic by supporting Standard Schema-compatible validators, instead of requiring zod specifically.
ideally the api would support:
- Standard Schema validation for runtime input parsing
- JSON Schema generation when available via Standard JSON Schema
- raw JSON Schema + custom validation as an escape hatch
- backwards compatibility for existing zod-based tool definitions
other libraries like trpc, hono etc... do a similar thing to be able to for example define route definitions with any schema library https://hono.dev/docs/guides/validation
this would: - remove unnecessary vendor lock-in to zod
- make host tools easier to use with libraries like arktype, effect schema and other modern schema libraries
- align the api better with the broader TypeScript ecosystem, where many tools now accept Standard Schema-compatible inputs
- preserve the current zod experience while broadening compatibility
i'd be happy to implement this myself if the direction sounds good.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading packages/core/src/host-tools.ts, packages/core/src/host-tools-zod.ts, and packages/core/src/agent-os.ts to trace the current Zod typing, JSON Schema conversion, and runtime validation flow. Done means host tools accept Standard Schema-compatible validators, support JSON Schema when available or a raw-schema escape hatch, and preserve existing Zod definitions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100