Skip to main content

codex_cli/agent/
exec.rs

1use std::io::Write;
2
3pub use crate::runtime::ExecOptions;
4
5pub fn require_allow_dangerous(caller: Option<&str>, stderr: &mut impl Write) -> bool {
6    crate::runtime::require_allow_dangerous(caller, stderr)
7}
8
9pub fn exec_dangerous(prompt: &str, caller: &str, stderr: &mut impl Write) -> i32 {
10    crate::runtime::exec_dangerous(prompt, caller, stderr)
11}
12
13pub fn exec_dangerous_with_options(
14    prompt: &str,
15    caller: &str,
16    stderr: &mut impl Write,
17    options: ExecOptions,
18) -> i32 {
19    crate::runtime::exec_dangerous_with_options(prompt, caller, stderr, options)
20}