Skip to content

Implement human approval queue API (Litestar controller + guards) #37

@Aureliolo

Description

@Aureliolo

Context

Implement the human approval queue that allows humans to review, approve, or reject agent-proposed actions. This is a critical safety mechanism where uncertain or high-risk actions are escalated for human judgment.

Flow:

  1. Agent proposes an action
  2. SecOps agent reviews the action
  3. If uncertain or high-risk, the action enters the human approval queue
  4. Human reviews context and approves or rejects via the REST API
  5. Action is executed or blocked accordingly

Acceptance Criteria

  • Approval queue data model (pending items with full context)
  • Litestar controller: ApprovalController with list, approve, reject, get-details endpoints
  • Route guards restricting approval actions to authorized human roles (§13.4)
  • Each approval item includes: what (action description), why (agent reasoning), who (requesting agent), risk level
  • Timeout handling for stale approval items (configurable TTL)
  • Notification via WebSocket channel when new items enter the queue
  • Approval/rejection audit trail
  • Unit tests for approval workflow

Dependencies

Design Spec Reference

  • §12.1 — Human oversight and approval workflows
  • §12.4 — Approval timeout policies

Metadata

Metadata

Assignees

No one assigned

    Labels

    prio:highImportant, should be prioritizedscope:medium1-3 days of workspec:human-interactionDESIGN_SPEC Section 13 - Human Interaction Layerspec:securityDESIGN_SPEC Section 12 - Security & Approval Systemtype:featureNew feature implementation

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions