agentstategraph_taint/lib.rs
1//! Taint / quarantine / watch substrate for AgentStateGraph
2//! (see spec/TAINT_SPEC.md).
3//!
4//! Dynamic runtime markers that bridge passive observation into
5//! enforcement. Every taint is a first-class commit (auditable,
6//! blameable, full intent metadata) and the pre-commit hook
7//! consults [`evaluate_access`] to gate writes.
8//!
9//! This crate ships the types + the pure check algorithm. Storage
10//! lives in `agentstategraph-storage`; commit-pipeline wiring lives
11//! in `agentstategraph` (the main repository crate).
12
13#![deny(rust_2018_idioms)]
14
15mod check;
16mod error;
17mod types;
18
19pub use check::{REVIEW_CONFIDENCE_THRESHOLD, ancestor_candidates, evaluate_access};
20pub use error::TaintError;
21pub use types::{
22 QuarantineParams, Taint, TaintCheck, TaintEffect, TaintKind, TaintMetadata, TaintParams,
23 TaintSeverity, UnquarantineParams, UntaintParams, UnwatchParams, WatchDirection, WatchParams,
24};
25
26/// Crate version exposed for downstream `MCP` / FFI introspection.
27pub const VERSION: &str = env!("CARGO_PKG_VERSION");