{"openapi":"3.1.0","info":{"title":"Codex Engineering Diagnostics","version":"3.2.0","x-guidance":"Use POST /api/skill-security-audit for a 0.12 USDC pre-install skill review, POST /api/ci-log-diagnosis for a 1 USDC fast diagnosis, GET /api/openapi-audit for public OpenAPI contract analysis, or POST /api/ci-log-triage for a full CI failure handoff. Every route settles directly in Base USDC to the listed payTo wallet."},"servers":[{"url":"https://codex-rapid-patch-evidence.vercel.app"}],"paths":{"/api/openapi-audit":{"get":{"operationId":"auditPublicOpenApiContract","summary":"Audit a public OpenAPI contract","description":"After x402 payment, fetches one public OpenAPI 3.x JSON or YAML document and returns prioritized findings, a quality score, a Markdown report, and a read-only pytest scaffold. It does not call any operation in the target API.","tags":["Developer Tools","OpenAPI","Testing"],"x-price":15,"x-payment-info":{"price":{"fixed":{"mode":"fixed","currency":"USD","amount":"15"}},"protocols":[{"x402":{}}]},"parameters":[{"name":"spec_url","in":"query","required":true,"description":"Public HTTPS URL to an OpenAPI 3.x JSON or YAML document.","schema":{"type":"string","format":"uri"},"example":"https://petstore3.swagger.io/api/v3/openapi.json"}],"responses":{"200":{"description":"Paid OpenAPI audit delivery.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"product":{"type":"string"},"generatedAt":{"type":"string","format":"date-time"},"specSha256":{"type":"string"},"document":{"type":"object"},"analysis":{"type":"object","properties":{"score":{"type":"integer","minimum":0,"maximum":100},"grade":{"type":"string"},"counts":{"type":"object"},"inventory":{"type":"object"},"findings":{"type":"array","items":{"type":"object"}}}},"scaffold":{"type":"object","properties":{"filename":{"type":"string"},"language":{"type":"string"},"safeMethodsOnly":{"type":"boolean"},"generatedTests":{"type":"integer"},"code":{"type":"string"}}},"reportMarkdown":{"type":"string"},"safety":{"type":"object"}},"required":["ok","product","generatedAt","specSha256","analysis","scaffold","reportMarkdown"]},"example":{"ok":true,"product":"OpenAPI Contract Audit + Safe Pytest Scaffold","analysis":{"score":82,"grade":"B","counts":{"high":0,"medium":2,"low":4}},"scaffold":{"filename":"test_openapi_contract.py","language":"python","safeMethodsOnly":true}}}}},"400":{"description":"Missing or unsafe spec_url."},"402":{"description":"Payment Required"},"422":{"description":"The public document could not be fetched, parsed, or validated as OpenAPI 3.x."},"500":{"description":"Unexpected audit failure."}}}},"/api/skill-security-audit":{"post":{"operationId":"auditAiAgentSkillSecurity","summary":"Audit an AI agent skill before installation","description":"After a 0.12 USDC x402 payment, statically audits skill Markdown and bounded supporting files for prompt injection, credential access, data exfiltration, destructive commands, dynamic execution, mutable installs, financial authority, persistence, and broad access. Submitted content is never executed and referenced URLs are never fetched.","tags":["Agent Security","Static Analysis","Developer Tools"],"x-price":0.12,"x-payment-info":{"price":{"fixed":{"mode":"fixed","currency":"USD","amount":"0.12"}},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"skill":{"type":"string","minLength":1,"maxLength":100000,"description":"AI skill Markdown or source text."},"skill_markdown":{"type":"string","maxLength":100000,"description":"Alias for skill."},"content":{"type":"string","maxLength":100000,"description":"Alias for skill."},"files":{"description":"Optional supporting files as an array of {path, content} or an object keyed by path."}},"anyOf":[{"required":["skill"]},{"required":["skill_markdown"]},{"required":["content"]},{"required":["files"]}]},"example":{"skill":"# Changelog reviewer\nRead CHANGELOG.md and package.json. Return missing release notes. Do not modify files or call the network."}}}},"responses":{"200":{"description":"Paid static skill-security audit delivery.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"product":{"type":"string"},"generatedAt":{"type":"string","format":"date-time"},"skillSha256":{"type":"string"},"verdict":{"type":"string","enum":["LOW_RISK","REVIEW","BLOCK"]},"riskScore":{"type":"integer","minimum":0,"maximum":100},"counts":{"type":"object"},"findings":{"type":"array","items":{"type":"object"}},"capabilities":{"type":"array","items":{"type":"string"}},"destinations":{"type":"array","items":{"type":"string"}},"coverage":{"type":"object"},"safety":{"type":"object"},"reportMarkdown":{"type":"string"}},"required":["ok","product","generatedAt","skillSha256","verdict","riskScore","counts","findings","capabilities","coverage","safety","reportMarkdown"]}}}},"402":{"description":"Payment Required"},"422":{"description":"The supplied content is empty or exceeds the size limit."},"500":{"description":"Unexpected audit failure."}}}},"/api/ci-log-diagnosis":{"post":{"operationId":"diagnoseCiFailureLog","summary":"Diagnose a CI failure log","description":"After a 1 USDC x402 payment, parses one CI log as inert text and returns the primary failure, up to three redacted findings, three next steps, and two focused rerun commands. It never executes the input or fetches referenced URLs.","tags":["Developer Tools","CI","Debugging"],"x-price":1,"x-payment-info":{"price":{"fixed":{"mode":"fixed","currency":"USD","amount":"1"}},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"log":{"type":"string","minLength":1,"maxLength":120000,"description":"Raw CI log text parsed without execution."},"context":{"type":"string","maxLength":200,"description":"Optional short repository or workflow context."}},"required":["log"]},"example":{"log":"Run npm test\nsrc/app.ts(10,4): error TS2322: Type 'string' is not assignable to type 'number'.\nProcess completed with exit code 1.","context":"pull request CI"}}}},"responses":{"200":{"description":"Paid fast CI diagnosis delivery.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"product":{"type":"string"},"generatedAt":{"type":"string","format":"date-time"},"logSha256":{"type":"string"},"context":{"type":["string","null"]},"analysis":{"type":"object"},"rerun":{"type":"object"},"safety":{"type":"object"},"reportMarkdown":{"type":"string"},"upgrade":{"type":"object"}},"required":["ok","product","generatedAt","logSha256","analysis","rerun","safety","reportMarkdown","upgrade"]}}}},"402":{"description":"Payment Required"},"422":{"description":"The log input is empty or exceeds the size limit."},"500":{"description":"Unexpected diagnosis failure."}}}},"/api/ci-log-triage":{"post":{"operationId":"triageCiFailureLog","summary":"Triage a CI failure log","description":"After x402 payment, parses one CI log as inert text and returns prioritized failure signatures, redacted evidence, focused rerun commands, and a reviewer-ready Markdown handoff. It never executes the input or fetches referenced URLs.","tags":["Developer Tools","CI","Debugging"],"x-price":15,"x-payment-info":{"price":{"fixed":{"mode":"fixed","currency":"USD","amount":"15"}},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"log":{"type":"string","minLength":1,"maxLength":120000,"description":"Raw CI log text parsed without execution."},"context":{"type":"string","maxLength":200,"description":"Optional short repository or workflow context."}},"required":["log"]},"example":{"log":"Run npm test\nsrc/app.ts(10,4): error TS2322: Type 'string' is not assignable to type 'number'.\nProcess completed with exit code 1.","context":"pull request CI"}}}},"responses":{"200":{"description":"Paid CI failure triage delivery.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"product":{"type":"string"},"generatedAt":{"type":"string","format":"date-time"},"logSha256":{"type":"string"},"context":{"type":["string","null"]},"analysis":{"type":"object"},"rerun":{"type":"object"},"safety":{"type":"object"},"reportMarkdown":{"type":"string"}},"required":["ok","product","generatedAt","logSha256","analysis","rerun","safety","reportMarkdown"]}}}},"402":{"description":"Payment Required"},"422":{"description":"The log input is empty or exceeds the size limit."},"500":{"description":"Unexpected triage failure."}}}},"/api/rapid-patch-pack":{"get":{"operationId":"getRapidPatchEvidencePack","summary":"Buy the legacy rapid patch evidence pack","description":"Returns the original downloadable CLI and engineering handoff pack. New buyers should prefer /api/openapi-audit for an input-specific result.","deprecated":true,"tags":["Developer Tools","Code Review"],"x-price":15,"x-payment-info":{"price":{"fixed":{"mode":"fixed","currency":"USD","amount":"15"}},"protocols":[{"x402":{}}]},"responses":{"200":{"description":"Paid evidence pack delivery.","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"price":{"type":"string"},"currency":{"type":"string"},"network":{"type":"string"},"payTo":{"type":"string"},"download":{"type":"object","properties":{"bugfixTriageCli":{"type":"string","format":"uri"},"apiContractEvidenceCli":{"type":"string","format":"uri"},"productManifest":{"type":"string","format":"uri"}}},"includes":{"type":"array","items":{"type":"string"}},"buyerFit":{"type":"array","items":{"type":"string"}},"sampleUseCases":{"type":"array","items":{"type":"string"}},"safetyBoundary":{"type":"array","items":{"type":"string"}},"deliveryChecklist":{"type":"array","items":{"type":"string"}}},"required":["name","price","currency","network","payTo","download"]}}}},"402":{"description":"Payment Required"},"500":{"description":"Unexpected delivery failure."}}}}}}