rivet-dev / rivet-dev/agentos

support standard schema / non-zod schemas for host tools

Open
#1,448 0 comments 0 reactions 0 assignees View on GitHub

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.ts
  • packages/core/src/host-tools-zod.ts
  • packages/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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.