pub struct GuardContext<'a> {
pub request: &'a PortableToolCallRequest,
pub scope: &'a ChioScope,
pub agent_id: &'a str,
pub server_id: &'a str,
pub session_filesystem_roots: Option<&'a [String]>,
pub matched_grant_index: Option<usize>,
}Expand description
Inputs a guard sees when it runs inside the core evaluate pipeline.
Mirrors chio_kernel::GuardContext with two deliberate restrictions:
requestcarries only the portable shape (nodpop_proof,governed_intent,approval_token, ormodel_metadata– those are full-kernel concerns). The legacy adapter inchio-kernelbuilds a temporaryPortableToolCallRequestwhen it runs the core evaluate pipeline.session_filesystem_rootsstays in the portable surface so the filesystem-roots guard (today the only session-aware guard) can run unchanged on every platform.
Fields§
§request: &'a PortableToolCallRequestThe tool call request being evaluated.
scope: &'a ChioScopeThe verified capability scope.
agent_id: &'a strThe agent making the request.
server_id: &'a strThe target server.
session_filesystem_roots: Option<&'a [String]>Session-scoped enforceable filesystem roots, when the request is being evaluated through the supported session-backed runtime path.
matched_grant_index: Option<usize>Index of the matched grant in the capability’s scope, populated by
[crate::evaluate] before guards run.
Auto Trait Implementations§
impl<'a> Freeze for GuardContext<'a>
impl<'a> RefUnwindSafe for GuardContext<'a>
impl<'a> Send for GuardContext<'a>
impl<'a> Sync for GuardContext<'a>
impl<'a> Unpin for GuardContext<'a>
impl<'a> UnsafeUnpin for GuardContext<'a>
impl<'a> UnwindSafe for GuardContext<'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