Skip to main content

Module approvals

Module approvals 

Source
Expand description

Phase 3.4-3.6 HITL approval HTTP surface.

Substrate-agnostic handlers for the four approval endpoints:

MethodPathHandler
GET/approvals/pendinghandle_list_pending
GET/approvals/{id}handle_get_approval
POST/approvals/{id}/respondhandle_respond
POST/approvals/batch/respondhandle_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§

ApprovalAdmin
Admin handle bound to the kernel’s approval store.
BatchDecisionEntry
BatchRespondRequest
Body for POST /approvals/batch/respond.
BatchRespondResponse
BatchRespondResult
BatchRespondSummary
GetApprovalResponse
GET /approvals/{id}.
PendingListResponse
PendingQuery
Query parameters for GET /approvals/pending.
RespondRequest
Body for POST /approvals/{id}/respond.
RespondResponse

Enums§

ApprovalHandlerError
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.