pub struct AuditLogger { /* private fields */ }Implementations§
Source§impl AuditLogger
impl AuditLogger
pub fn new() -> Self
Sourcepub async fn log(&self, call: &ToolCall, verdict: &Verdict)
pub async fn log(&self, call: &ToolCall, verdict: &Verdict)
Log a tool call verdict to both the ring buffer and the libro chain.
Sourcepub async fn recent(&self, limit: usize) -> Vec<SecurityEvent>
pub async fn recent(&self, limit: usize) -> Vec<SecurityEvent>
Get recent events.
Sourcepub async fn agent_events(
&self,
agent_id: &str,
limit: usize,
) -> Vec<SecurityEvent>
pub async fn agent_events( &self, agent_id: &str, limit: usize, ) -> Vec<SecurityEvent>
Get events for a specific agent.
Sourcepub async fn deny_count(&self) -> usize
pub async fn deny_count(&self) -> usize
Count denied calls.
Sourcepub async fn total_count(&self) -> usize
pub async fn total_count(&self) -> usize
Total event count.
Sourcepub fn verify_chain(&self) -> Result<()>
pub fn verify_chain(&self) -> Result<()>
Verify the libro audit chain integrity.
Sourcepub fn chain_review(&self) -> ChainReview
pub fn chain_review(&self) -> ChainReview
Get a structured review/summary of the audit chain.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for AuditLogger
impl !RefUnwindSafe for AuditLogger
impl Send for AuditLogger
impl Sync for AuditLogger
impl Unpin for AuditLogger
impl UnsafeUnpin for AuditLogger
impl UnwindSafe for AuditLogger
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