Skip to main content

Module guard

Module guard 

Source
Expand description

Sync guard trait for portable evaluation.

The surface matches chio_kernel::Guard byte-for-byte so the same guard implementations run in both crates with no behavioural change:

pub trait Guard: Send + Sync {
    fn name(&self) -> &str;
    fn evaluate(&self, ctx: &GuardContext) -> Result<Verdict, KernelCoreError>;
}

The error type is crate::evaluate::KernelCoreError instead of chio_kernel::KernelError because the full error enum carries std/tokio/sqlite-flavoured variants that are not portable. The adapter in chio-kernel::kernel bridges the two.

Structs§

GuardContext
Inputs a guard sees when it runs inside the core evaluate pipeline.
PortableToolCallRequest
Portable projection of an chio_kernel::runtime::ToolCallRequest.

Traits§

Guard
Sync guard trait. Signature-for-signature compatible with chio_kernel::Guard.