1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//! # agentcontract
//!
//! Rust implementation of the [AgentContract specification](https://github.com/agentcontract/spec).
//!
//! Behavioral contracts for AI agents — declare what an agent must, must not,
//! and can do, enforced on every run.
//!
//! ## Quick Start
//!
//! ```no_run
//! use agentcontract::{load_contract, ContractRunner, RunContext};
//!
//! let contract = load_contract("my-agent.contract.yaml").unwrap();
//! let runner = ContractRunner::new(contract);
//!
//! let ctx = RunContext {
//! input: "What are the GxP requirements?".into(),
//! output: "Per 21 CFR Part 211...".into(),
//! duration_ms: 1200.0,
//! ..Default::default()
//! };
//!
//! let result = runner.run(&ctx);
//! if !result.passed {
//! for v in result.blocking_violations() {
//! eprintln!("[{}] {}: {}", v.action_taken, v.clause_name, v.details);
//! }
//! }
//! ```
// Convenience re-exports
pub use AuditWriter;
pub use ;
pub use load_contract;
pub use Contract;
pub use ;
pub use RunContext;