Skip to content

validate-actor-input: check an input against a build's input schema without running #1428

Description

@DaveHanns

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions