pub mod fanout;
pub mod openlineage;
pub mod sqlite;
pub mod stdout;
pub mod webhook;
use async_trait::async_trait;
use std::{sync::Arc, time::SystemTime};
#[derive(Clone)]
pub struct AuditEntry {
pub ts: SystemTime,
pub agent_id: String,
pub method: String,
pub tool: Option<String>,
pub arguments: Option<serde_json::Value>,
pub outcome: Outcome,
pub request_id: String,
pub input_tokens: u32,
}
#[derive(Clone)]
pub enum Outcome {
Allowed,
Blocked(String),
Forwarded,
Shadowed,
}
#[async_trait]
pub trait AuditLog: Send + Sync {
fn record(&self, entry: Arc<AuditEntry>);
async fn flush(&self) {}
}