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.
proxyRequest() when policy requires human confirmation. See Agents → Approvals for the conceptual flow.
getApprovalStatus()
Snapshot the current state of an approval. Non-blocking.
Signature
Returns
ApprovalStatus with approvalId, status (one of pending, approved, executing, denied, expired, executed, failed), expiresAt, decidedAt, decisionReason, executedAt, and hasResult (true once the proxied result is fetchable). The provider response is NOT on ApprovalStatus — fetch it via awaitApproval() (which returns an ApprovalResult on the executed terminal).
Example
awaitApproval()
Block until an approval reaches a terminal state, then return the proxied result.
Signature
timeoutMs = 300_000 (5 min), pollIntervalMs = 2_000 (2 s).
Returns
ApprovalResult with approvalId, statusCode, headers, bodyB64, bodyTruncated. The body is base64-encoded; decode with the helper methods bodyBytes(), bodyText(encoding?), or bodyJson().
Throws
ApprovalDeniedError, ApprovalExpiredError, ApprovalTimeoutError, ApprovalExecutionFailedError. See Errors.