Skip to content

Seed the run form from the input schema's defaults - #13

Merged
kamath merged 4 commits into
mainfrom
upsert-input-defaults
Jul 27, 2026
Merged

Seed the run form from the input schema's defaults#13
kamath merged 4 commits into
mainfrom
upsert-input-defaults

Conversation

@kamath

@kamath kamath commented Jul 26, 2026

Copy link
Copy Markdown
Collaborator

The run panel opened on {}, so running a script meant retyping the same owner/repo every time. apps/frontend/src/components/scripts/default-input.ts now builds the form's starting payload from the script's declared input schema — a root-level default wins, otherwise each property that declares one contributes, and properties without a default are left out rather than invented.

Nothing enforces those defaults, so the upsert route's prose and its input parameter description now ask authors to supply them; that text reaches script-writing agents through the generated MCP tool, which mcp.test.ts pins. JsonSchema gains a default field so the stored schema carries it verbatim, and the frontend fixtures grow defaults so Storybook shows the seeded form.

🤖 Generated with Claude Code

kamath and others added 4 commits July 26, 2026 15:44
The run panel opened on `{}` and made you retype the same owner/repo every
time. `default-input.ts` turns a script's declared input schema into the
form's starting payload — a root-level `default` wins, otherwise each
property that declares one contributes, and properties without a default
are left out rather than invented.

Nothing enforces those defaults, so the upsert route's prose and the
`input` parameter's description now ask authors to supply them; that text
reaches script-writing agents through the generated MCP tool, which
`mcp.test.ts` pins. `JsonSchema` gains a `default` field so the stored
schema carries it verbatim.

Co-Authored-By: Claude <noreply@anthropic.com>
Defaults belong in the script body (e.g. `input.limit ?? 25`), not on JSON
Schema properties. Drop the schema-default seeding path so the run form stays
on an empty payload that those internal fallbacks can satisfy.

Co-authored-by: Cursor <cursoragent@cursor.com>
Ask upsert authors to embed `default` on input properties, and fill required fields without one with type-shaped placeholders so Run always starts from a complete payload.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@kamath
kamath merged commit d5545c1 into main Jul 27, 2026
1 check passed
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.

1 participant