feat: add --dangerously-bypass-approvals-and-sandbox

This commit is contained in:
Michael Bolin
2025-06-25 11:33:37 -07:00
parent e09691337d
commit 552b404626
10 changed files with 114 additions and 40 deletions
+1 -7
View File
@@ -120,7 +120,7 @@ pub enum AskForApproval {
/// Everything else will ask the user to approve.
#[default]
#[serde(rename = "untrusted")]
UnlessAllowListed,
UnlessTrusted,
/// *All* commands are auto‑approved, but they are expected to run inside a
/// sandbox where network access is disabled and writes are confined to a
@@ -231,12 +231,6 @@ impl SandboxPolicy {
}
}
}
// TODO(mbolin): This conflates sandbox policy and approval policy and
// should go away.
pub fn is_unrestricted(&self) -> bool {
matches!(self, SandboxPolicy::DangerFullAccess)
}
}
/// User input