Skip to main content

kvlar_core/
lib.rs

1//! # kvlar-core
2//!
3//! Core policy engine for Kvlar. Evaluates agent actions against YAML-based
4//! security policies. Pure logic — no I/O, no async, fully deterministic.
5//!
6//! ## Architecture
7//!
8//! - **Policy**: A set of rules defining what agents can and cannot do
9//! - **Action**: A description of something an agent wants to do (tool call, data access, etc.)
10//! - **Decision**: The engine's verdict — Allow, Deny, or RequireApproval
11//! - **Engine**: Evaluates actions against loaded policies
12
13pub mod action;
14pub mod approval;
15pub mod decision;
16pub mod engine;
17pub mod error;
18pub mod policy;
19pub mod testing;
20
21pub use action::Action;
22pub use approval::{ApprovalRequest, ApprovalResponse};
23pub use decision::{Decision, ErrorDetail};
24pub use engine::Engine;
25pub use error::KvlarError;
26pub use policy::Policy;