{
  "service": "okra-a11y-agent",
  "ok": true,
  "what": "Per-document accessibility audit agent (deterministic byte-level audit + human-gate). One Durable Object per document.",
  "endpoints": {
    "POST /audit": "{ pdf_url, id? } → run audit, returns gate/tier/findings",
    "POST /decide": "{ id, decision: approve|reject, note? } → resolve the human gate",
    "GET /status?id=": "current gate/tier/findings for a document",
    "POST /mcp": "MCP server (JSON-RPC): tools audit_document/decide/get_status + ui:// findings app",
    "GET /app?id=": "findings reviewer UI (also the MCP App resource)",
    "GET /v2/ping-facet?id=": "facets pre-flight: prove ctx.facets/ctx.exports enabled (subAgent round-trip)",
    "POST /v2/remediate": "{ pdf_url, image_url?, page_point_width?, fixed_pdf_url?, id? } → run the FULL PDF-remediation pipeline (Audit→Remediate→Compare→gate) in-process; returns the completed pipeline report. image_url+page_point_width enable real WCAG 1.4.3 contrast; fixed_pdf_url (a pre-built tagged V2) enables a real Compare before→after delta",
    "POST /v2/remediate-wf": "{ pdf_url, image_url?, page_point_width?, fixed_pdf_url?, id? } → SAME pipeline driven through the durable RemediationWorkflow; returns immediately with the seeded report, poll /v2/audit-status",
    "POST /v2/remediate-upload-wf": "multipart { file, id?, file_name? } or JSON { pdf_base64, id?, file_name? } → stores uploaded PDF bytes on the A11yAgent, then starts the SAME durable workflow",
    "POST /v2/audit-a11y": "{ pdf_url, image_url?, page_point_width?, id? } → run JUST the Audit step (the 6 WCAG criteria via byte-probe + contrast + validator facets); returns the report with pipeline.audit",
    "POST /v2/audit-a11y-wf": "{ pdf_url, image_url?, page_point_width?, id? } → the 2-domain specialist report driven through the coordinator-owned SpecialistWorkflow (routine→agent→done); returns immediately, poll /v2/audit-status",
    "GET /v2/audit-status?id=": "coordinator report ledger (pipeline + steps + rows + event log + gate)",
    "POST /v2/audit-decide": "{ id, decision: approve|reject, note? } → resolve the report-level human/attestation gate",
    "POST /v2/contrast": "{ image_url|pdf_url, page_point_width?, id? } → ColorContrastAgent durable workflow (WCAG 1.4.3); returns workflow id",
    "GET /v2/contrast-status?id=": "ColorContrastAgent ledger row + gate",
    "POST /v2/contrast-decide": "{ id, workflow_id, decision, note? } → resolve the contrast human gate"
  }
}