Skip to main content

Module api_sop

Module api_sop 

Expand description

Out-of-band SOP approval surface (EPIC C, C6; EPIC G broker).

GET /admin/sop/pending, POST /admin/sop/approve, POST /admin/sop/deny. Auth reuses the vetted /admin/reload gate: loopback is always allowed and attributed as cli UNLESS pairing is required and it also presents a valid bearer token, in which case it is attributed as http (the authenticated subject); a non-loopback caller needs gateway.allow_remote_admin + pairing and passes require_auth, attributed as an http principal. The principal is ALWAYS derived from the transport here, never from the request body. Resolution funnels through resolve_via_broker (EPIC G’s authorization/ quorum layer over the shared engine’s resolve_gate chokepoint - a no-op pass-through when no [sop.approval] policy applies); sop_engine = None yields 503.

Structs§

SopResolveBody
Body for approve/deny.

Functions§

handle_sop_approve
POST /admin/sop/approve - clear a waiting gate out-of-band.
handle_sop_deny
POST /admin/sop/deny - deny (cancel) a waiting run out-of-band.
handle_sop_pending
GET /admin/sop/pending - list the runs parked on a human: WaitingApproval gates AND deterministic PausedCheckpoint runs (both are resolved by the same approve/deny chokepoint), distinguished by the kind field.