Expand description
Phase 3.4-3.6 HITL approval HTTP surface.
Substrate-agnostic handlers for the four approval endpoints:
| Method | Path | Handler |
|---|---|---|
| GET | /approvals/pending | handle_list_pending |
| GET | /approvals/{id} | handle_get_approval |
| POST | /approvals/{id}/respond | handle_respond |
| POST | /approvals/batch/respond | handle_batch_respond |
Each handler accepts parsed inputs and returns a typed response so
chio-tower, chio-api-protect, and hosted sidecars can serve them
without agreeing on a framework. Errors carry HTTP status codes via
ApprovalHandlerError::status for predictable mapping.
Structs§
- Approval
Admin - Admin handle bound to the kernel’s approval store.
- Batch
Decision Entry - Batch
Respond Request - Body for
POST /approvals/batch/respond. - Batch
Respond Response - Batch
Respond Result - Batch
Respond Summary - GetApproval
Response GET /approvals/{id}.- Pending
List Response - Pending
Query - Query parameters for
GET /approvals/pending. - Respond
Request - Body for
POST /approvals/{id}/respond. - Respond
Response
Enums§
- Approval
Handler Error - Errors returned by the approval handlers. Each variant maps onto a stable HTTP status so substrate adapters can relay the code without re-interpreting the semantics.
Functions§
- handle_
batch_ respond POST /approvals/batch/respond– apply decisions to multiple approvals in one call.- handle_
get_ approval - handle_
list_ pending GET /approvals/pending– list pending approvals matching the filter. Returns a stable JSON shape.- handle_
respond POST /approvals/{id}/respond– submit an approval decision.