pub async fn check_approval_with_tty_timeout(
module_def: &Value,
auto_approve: bool,
is_tty: bool,
timeout_secs: u64,
) -> Result<(), ApprovalError>Expand description
Testable gate that honors a configurable timeout.
Decision order:
- Skip entirely if
requires_approvalis not strict booltrue. - Bypass if
auto_approve == true(–yes flag). - Bypass if
APCORE_CLI_AUTO_APPROVE == "1"(exact match). - Reject if
!is_tty(NonInteractive). - Prompt interactively with
timeout_secstimeout.