pub struct ExecPolicyContext<'a> {
pub command: &'a str,
pub cwd: &'a str,
pub tool: Option<&'a str>,
pub path: Option<&'a str>,
pub ask_for_approval: AskForApproval,
pub sandbox_mode: Option<&'a str>,
}Expand description
Input context provided to the execution policy engine for a single check.
Fields§
§command: &'a strThe shell command string being evaluated.
cwd: &'a strThe current working directory at invocation time.
tool: Option<&'a str>The tool name (e.g. "exec_shell", "edit_file"). Defaults to "exec_shell" when None.
path: Option<&'a str>An optional file path relevant to the invocation (used for path-based ask rules).
ask_for_approval: AskForApprovalThe current approval policy mode.
sandbox_mode: Option<&'a str>The sandbox mode in effect, if any (e.g. "workspace-write").
Trait Implementations§
Source§impl<'a> Clone for ExecPolicyContext<'a>
impl<'a> Clone for ExecPolicyContext<'a>
Source§fn clone(&self) -> ExecPolicyContext<'a>
fn clone(&self) -> ExecPolicyContext<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<'a> Freeze for ExecPolicyContext<'a>
impl<'a> RefUnwindSafe for ExecPolicyContext<'a>
impl<'a> Send for ExecPolicyContext<'a>
impl<'a> Sync for ExecPolicyContext<'a>
impl<'a> Unpin for ExecPolicyContext<'a>
impl<'a> UnsafeUnpin for ExecPolicyContext<'a>
impl<'a> UnwindSafe for ExecPolicyContext<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more