pub enum CheckRequest<'a> {
Tool {
context: &'a AgentContext,
tool_name: &'a str,
},
Path {
context: &'a AgentContext,
path: &'a Path,
mode: PathMode,
},
Exec {
context: &'a AgentContext,
binary: &'a str,
args: &'a [String],
},
Network {
context: &'a AgentContext,
},
Fork {
context: &'a AgentContext,
},
}Expand description
Authorization check request — specifies what is being accessed.
Variants§
Tool
Tool usage permission.
Path
Path access permission.
Fields
§
context: &'a AgentContextAgent security context.
Exec
Command execution permission.
Fields
§
context: &'a AgentContextAgent security context.
Network
Network access permission.
Fields
§
context: &'a AgentContextAgent security context.
Fork
Agent fork (sub-agent spawn) permission.
Fields
§
context: &'a AgentContextAgent security context.
Implementations§
Source§impl<'a> CheckRequest<'a>
impl<'a> CheckRequest<'a>
Sourcepub fn agent_context(&self) -> &AgentContext
pub fn agent_context(&self) -> &AgentContext
Returns the agent context for this request.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for CheckRequest<'a>
impl<'a> RefUnwindSafe for CheckRequest<'a>
impl<'a> Send for CheckRequest<'a>
impl<'a> Sync for CheckRequest<'a>
impl<'a> Unpin for CheckRequest<'a>
impl<'a> UnsafeUnpin for CheckRequest<'a>
impl<'a> UnwindSafe for CheckRequest<'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