mirror of
https://github.com/openai/codex.git
synced 2026-09-16 12:13:30 +00:00
36 lines
1.0 KiB
Rust
36 lines
1.0 KiB
Rust
#[cfg(target_os = "linux")]
|
|
mod landlock;
|
|
pub mod proto;
|
|
pub mod seatbelt;
|
|
|
|
use clap::Parser;
|
|
use codex_core::SandboxPermissionOption;
|
|
|
|
#[derive(Debug, Parser)]
|
|
pub struct SeatbeltCommand {
|
|
/// Convenience alias for low-friction sandboxed automatic execution (network-disabled sandbox that can write to cwd and TMPDIR)
|
|
#[arg(long = "full-auto", default_value_t = false)]
|
|
pub full_auto: bool,
|
|
|
|
#[clap(flatten)]
|
|
pub sandbox: SandboxPermissionOption,
|
|
|
|
/// Full command args to run under seatbelt.
|
|
#[arg(trailing_var_arg = true)]
|
|
pub command: Vec<String>,
|
|
}
|
|
|
|
#[derive(Debug, Parser)]
|
|
pub struct LandlockCommand {
|
|
/// Convenience alias for low-friction sandboxed automatic execution (network-disabled sandbox that can write to cwd and TMPDIR)
|
|
#[arg(long = "full-auto", default_value_t = false)]
|
|
pub full_auto: bool,
|
|
|
|
#[clap(flatten)]
|
|
pub sandbox: SandboxPermissionOption,
|
|
|
|
/// Full command args to run under landlock.
|
|
#[arg(trailing_var_arg = true)]
|
|
pub command: Vec<String>,
|
|
}
|