Forge discovery schema accepts quote probes as executable jobs

Abierto
#580 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
1-2 días
Aptitud para principiantes
48/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
javascript, json, openapi

Línea de trabajo

Start with the served /openapi.json schemas for GET and POST /api/x402/forge, then read the paid handler around api/x402/forge.js:717-723 and the inline success branch around api/x402/forge.js:379-382. Check how the schemas represent executable inputs and the queued and done response shapes; validate the resulting contracts with Ajv 2020. Done when discovery probes remain distinct from executable inputs and both success shapes match their served schemas.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

The public GET /api/x402/forge input schema and the POST /api/x402/forge request schema in /openapi.json both validate {} and {"tier":"high"} as generation inputs. In an unsigned Linux check, the latter returned a valid x402 v2 quote for 0.50 USDC. That is useful for price discovery, but it is not a job an agent can complete. The paid handler at 89050b3 returns missing_input for this shape before verification or settlement.

If exactly one input is the intended discovery contract, keep the empty unsigned price probe and add this to the executable input projection used by agents:

{"oneOf":[{"required":["prompt"]},{"required":["image_urls"]}]}

I checked the two served schemas with Ajv 2020. The executable-only variant still accepts text-only and images-only, and rejects empty, tier-only and both. The HTTP probe remains a separate case. If image precedence for both is intentional, document it in the machine schema and use anyOf instead. No signed request or 3D job was submitted.

Related output-contract control: the served OpenAPI 200 schema requires string job_id and poll_url, but the inline success branch returns nulls for both plus glb_url. An offline five-case replay confirmed the current schema rejects that real response shape and accepts a done response without the artifact if both handle fields are strings. Two status-based branches describe the useful outputs: queued requires a nonempty job_id and poll_url; done requires glb_url. That keeps native polling and inline completion intact.

Lenguaje dominante
JavaScript
Estrellas
230
Forks
63
Merge medio
15 h 43 min
PR fusionados (30 d)
225

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de nirholas/three.ws

Todos los issues de nirholas/three.ws

Issues similares

Más issues de JavaScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.