{"openapi":"3.1.0","info":{"title":"Review — AI/Human Intervention WebUI","description":"Challenge queue where AI agents post items that need human intervention (approvals, decisions, one-time codes, escalations) and humans resolve them from the web UI or the REST API. Resolutions are pushed back to Hermes via a signed webhook so agents are woken up with the answer. See /api/usage for the machine-readable integration guide.","version":"1.0.0"},"paths":{"/":{"get":{"summary":"Dashboard","operationId":"dashboard__get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/api/usage":{"get":{"summary":"Usage","description":"Machine-readable integration guide for AI agents.","operationId":"usage_api_usage_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/health":{"get":{"summary":"Health","operationId":"health_api_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/challenges":{"get":{"summary":"List Challenges","operationId":"list_challenges_api_challenges_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Challenge"},"title":"Response List Challenges Api Challenges Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Create Challenge","operationId":"create_challenge_api_challenges_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChallengeIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Challenge"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/challenges/{ch_id}":{"get":{"summary":"Get Challenge By Id","operationId":"get_challenge_by_id_api_challenges__ch_id__get","parameters":[{"name":"ch_id","in":"path","required":true,"schema":{"type":"string","title":"Ch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Challenge"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/challenges/{ch_id}/resolve":{"post":{"summary":"Resolve Challenge","operationId":"resolve_challenge_api_challenges__ch_id__resolve_post","parameters":[{"name":"ch_id","in":"path","required":true,"schema":{"type":"string","title":"Ch Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolutionIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Challenge"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/challenges/examples":{"post":{"summary":"Create Example Challenges","operationId":"create_example_challenges_api_challenges_examples_post","responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"Challenge":{"properties":{"id":{"type":"string","title":"Id"},"title":{"type":"string","maxLength":200,"minLength":1,"title":"Title"},"description":{"type":"string","maxLength":4000,"minLength":1,"title":"Description"},"type":{"type":"string","title":"Type","description":"One of: approval, decision, code, escalation, info.","default":"approval"},"options":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Options","description":"For decision: allowed responses, e.g. [\"wait\", \"use-fallback\"]."},"context":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Context","description":"Free-form structured data (urls, payloads, request/response)."},"source":{"type":"string","title":"Source","description":"Who created it, e.g. browser_agent, hermes, curl.","default":"agent"},"source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Url"},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expires At","description":"ISO-8601; for time-sensitive codes."},"priority":{"type":"string","title":"Priority","description":"low, normal, high, critical.","default":"normal"},"status":{"type":"string","title":"Status","default":"pending"},"created_at":{"type":"string","title":"Created At"},"resolved_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resolved By"},"resolved_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resolved At"},"resolution":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resolution"},"comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comment"}},"type":"object","required":["id","title","description","created_at"],"title":"Challenge"},"ChallengeIn":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id","description":"Optional caller-provided stable id."},"title":{"type":"string","maxLength":200,"minLength":1,"title":"Title"},"description":{"type":"string","maxLength":4000,"minLength":1,"title":"Description"},"type":{"type":"string","title":"Type","description":"One of: approval, decision, code, escalation, info.","default":"approval"},"options":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Options","description":"For decision: allowed responses, e.g. [\"wait\", \"use-fallback\"]."},"context":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Context","description":"Free-form structured data (urls, payloads, request/response)."},"source":{"type":"string","title":"Source","description":"Who created it, e.g. browser_agent, hermes, curl.","default":"agent"},"source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Url"},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expires At","description":"ISO-8601; for time-sensitive codes."},"priority":{"type":"string","title":"Priority","description":"low, normal, high, critical.","default":"normal"}},"type":"object","required":["title","description"],"title":"ChallengeIn"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ResolutionIn":{"properties":{"resolution":{"type":"string","maxLength":500,"minLength":1,"title":"Resolution"},"resolved_by":{"type":"string","maxLength":100,"minLength":1,"title":"Resolved By","default":"human"},"comment":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Comment"}},"type":"object","required":["resolution"],"title":"ResolutionIn"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}