Problem
While developing an Actor an agent edits .actor/input_schema.json and writes example inputs, but the only way to find out whether an input matches the schema is to start a run and read the failure. The API can validate an input against a build's schema without running anything, and the client already wraps it (client.actor(id).validateInput(input, { build })).
Proposal
A validate-actor-input tool in the builds category taking actor (ID or name), input (the object to check), and an optional build (tag or number, defaults to the Actor's default build). It calls POST /v2/acts/{actorId}/validate-input and returns either "valid" or the API's validation errors as a soft failure, so the agent can fix the schema or the input and push again.
Notes
- Read-only, idempotent, free.
- Useful before
call-actor too, but the loop it serves is schema development; the response should point at push-actor and build-actor when loaded.
Part of #1351.
Draft PR: #1432
Problem
While developing an Actor an agent edits
.actor/input_schema.jsonand writes example inputs, but the only way to find out whether an input matches the schema is to start a run and read the failure. The API can validate an input against a build's schema without running anything, and the client already wraps it (client.actor(id).validateInput(input, { build })).Proposal
A
validate-actor-inputtool in thebuildscategory takingactor(ID or name),input(the object to check), and an optionalbuild(tag or number, defaults to the Actor's default build). It callsPOST /v2/acts/{actorId}/validate-inputand returns either "valid" or the API's validation errors as a soft failure, so the agent can fix the schema or the input and push again.Notes
call-actortoo, but the loop it serves is schema development; the response should point atpush-actorandbuild-actorwhen loaded.Part of #1351.
Draft PR: #1432