Documentation Index
Fetch the complete documentation index at: https://docs.alterauth.com/llms.txt
Use this file to discover all available pages before exploring further.
proxy_request() when policy requires human confirmation. See Agents → Approvals for the conceptual flow.
get_approval_status()
Snapshot the current state of an approval. Non-blocking.
Signature
Returns
ApprovalStatus with approval_id, status (one of pending, approved, executing, denied, expired, executed, failed), expires_at, decided_at, decision_reason, executed_at, and has_result (true once the proxied result is fetchable). The provider response is NOT on ApprovalStatus — fetch it via await_approval() (which returns an ApprovalResult on the executed terminal).
Example
await_approval()
Block until an approval reaches a terminal state, then return the proxied result.
Signature
Returns
ApprovalResult with approval_id, status_code, headers, body_b64, body_truncated. The body is base64-encoded; decode with the helper methods body_bytes(), body_text(encoding="utf-8"), or body_json().
Raises
ApprovalDeniedError, ApprovalExpiredError, ApprovalTimeoutError, ApprovalExecutionFailedError. See Errors.
Example
See also
- Agents → Approvals — full flow.
- Request —
proxy_requestreference. - Types —
PendingApproval,ApprovalStatus,ApprovalResult.