pub struct PrivilegeBoundary { /* private fields */ }Expand description
Enforces privilege boundaries between agents, preventing escalation.
Implementations§
Source§impl PrivilegeBoundary
impl PrivilegeBoundary
Sourcepub fn register_agent(&mut self, profile: AgentProfile)
pub fn register_agent(&mut self, profile: AgentProfile)
Register an agent profile.
Sourcepub fn check_delegation(&self, from: &AgentId, to: &AgentId) -> DelegationCheck
pub fn check_delegation(&self, from: &AgentId, to: &AgentId) -> DelegationCheck
Check whether from is allowed to delegate to to.
Delegation is allowed only when the source has privilege >= the target, preventing a lower-privileged agent from escalating via delegation.
Sourcepub fn check_tool_access(&self, agent_id: &AgentId, tool_name: &str) -> bool
pub fn check_tool_access(&self, agent_id: &AgentId, tool_name: &str) -> bool
Check whether an agent is permitted to use a specific tool.
Sourcepub fn validate_delegation_chain(
&self,
chain: &[AgentId],
) -> DelegationChainResult
pub fn validate_delegation_chain( &self, chain: &[AgentId], ) -> DelegationChainResult
Validate an entire delegation chain for depth and privilege violations.
Trait Implementations§
Source§impl Clone for PrivilegeBoundary
impl Clone for PrivilegeBoundary
Source§fn clone(&self) -> PrivilegeBoundary
fn clone(&self) -> PrivilegeBoundary
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PrivilegeBoundary
impl Debug for PrivilegeBoundary
Auto Trait Implementations§
impl Freeze for PrivilegeBoundary
impl RefUnwindSafe for PrivilegeBoundary
impl Send for PrivilegeBoundary
impl Sync for PrivilegeBoundary
impl Unpin for PrivilegeBoundary
impl UnsafeUnpin for PrivilegeBoundary
impl UnwindSafe for PrivilegeBoundary
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