Skip to content

Generate per-app recipe schemas - #142

Open
hexuria wants to merge 1 commit into
mainfrom
feat/gpui-agent-recipe-schema
Open

hexuria wants to merge 1 commit into
mainfrom
feat/gpui-agent-recipe-schema

Conversation

@hexuria

@hexuria hexuria commented Nov 30, 2026

Copy link
Copy Markdown
Owner

Summary

Closes #115.

  • Add gpui-agent recipe schema, printing schemas/recipe.v1.schema.json specialized with one invoke branch per invoke from --schema files offline or the live host table when a target is explicitly named.
  • Generate args schemas from invoke argument metadata: top-level types, embedded JSON Schemas, the required union, closed/open additional-property behavior, pre-binding $param placeholders, and validation-accurate missing/null args handling.
  • Embed the base recipe schema in gpui-agent-recipe with a byte-parity test so the published binary carries it; internal $ref/$dynamicRef resources keep or gain deterministic $ids when composed into the generated document.
  • Document the editor-aid contract and limitations in docs/RECIPES.md and CHANGELOG.md.

Test plan

  • cargo test --workspace
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo fmt --all -- --check
  • cargo package --list confirms the embedded schema ships in gpui-agent-recipe
  • Issue Design: a recipe schema per app, made from the app's invoke table #115 verdict rows pass/fail exactly as specified in schema_parity.rs
  • Offline, schema-file, live-table, and ambient-environment CLI coverage in recipe_live_schema.rs
  • Embedded schemas, required unions, closed/open args, null/missing args, booleans, placeholders, and internal refs covered in generated_schema.rs

Generated with Devin

`recipe schema` turns exported invoke metadata or a host's live table
into an editor-consumable JSON Schema, so invoke arguments can be
checked before validation and execution. The base schema is embedded in
the recipe crate with a byte-parity test, keeping the published CLI
self-contained while preserving the workspace schema as the source of
truth.

Generated branches mirror validation's closed/open argument rules and
placeholder pre-binding behavior; embedded argument schemas retain
internal reference semantics when composed into the larger document.
Document-level parity and live-host tests pin the boundary so the schema
remains an editor aid rather than a second validator.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Design: a recipe schema per app, made from the app's invoke table

1 participant