Approvals
Human-in-the-loop approval gates surfaced through the Operating Room queue. Agents that need authorization for a sensitive action write an approval item; an operator approves or rejects from the UI; the agent reads the decision back and continues.
Concepts
type=approval. Created by the agent, consumed by an operator.["approve", "reject"], but agents may define richer sets like ["draft", "send", "discard"]).critical, high, medium, low. Affects sort order in the queue.expires_at. After expiry the item moves to expired; agents may choose to fail-safe or fail-open.How It Works
The agent reaches a step that needs operator authorization.
The agent writes an approval item to ~/.trinity/operator-queue.json (or calls a helper skill that does so).
The Operator Queue Sync Service polls the file every 5 seconds and persists the item to the backend.
The item appears in Operating Room → Queue with title, question, options, and any context the agent attached.
An operator picks an option and optionally adds a text comment.
The decision is written back into ~/.trinity/operator-queue.json for the agent to read.
The agent acknowledges the response and continues.
Real-Time Notifications
WebSocket events fired along the way:
operator_queue_new — when the item arrivesoperator_queue_responded — when the operator decidesoperator_queue_acknowledged — when the agent confirms it saw the decisionFor Agents
Approvals share the operator-queue API surface:
| Endpoint | Method | Description |
|---|---|---|
| /api/operator-queue | GET | List queue items (filter by type=approval) |
| /api/operator-queue/{id} | GET | Get a single item |
| /api/operator-queue/{id}/respond | POST | Submit the operator's decision |
| /api/operator-queue/{id}/cancel | POST | Cancel a pending item |
| /api/operator-queue/agents/{name} | GET | Items scoped to a specific agent |