Skip to main content

Module approval

Module approval 

Source

Structs§

ApprovalResult
Result of an approval request. Equivalent to the Python/TS protocol shape { status, approved_by, reason }.
CliApprovalHandler
Implements the apcore ApprovalHandler protocol so SDK consumers can pass a CLI-backed handler to executor.set_approval_handler(handler).

Enums§

ApprovalError
Errors returned by the approval gate. All variants map to exit code 46 (EXIT_APPROVAL_DENIED).
ApprovalStatus
Outcome of an CliApprovalHandler::request_approval / check_approval invocation. Mirrors the apcore ApprovalHandler protocol shape that Python and TypeScript SDKs return as a dict { status, approved_by | reason } duck-typed against ApprovalResult.

Constants§

DEFAULT_APPROVAL_TIMEOUT_SECS
Default approval prompt timeout in seconds.

Functions§

check_approval
Gate module execution behind an interactive approval prompt.
check_approval_with_timeout
Configurable-timeout variant of check_approval. Resolve the timeout from the --approval-timeout CLI flag or cli.approval_timeout config before calling.
check_approval_with_tty
Internal implementation accepting is_tty for testability.
check_approval_with_tty_timeout
Testable gate that honors a configurable timeout.

Type Aliases§

ApprovalDeniedError
Alias for ApprovalError — the denial variant. Use ApprovalError::Denied to match.
ApprovalTimeoutError
Alias for ApprovalError — the timeout variant. Use ApprovalError::Timeout to match.