harness_core/lib.rs
1// SPDX-License-Identifier: Apache-2.0 OR MIT
2//! AiEGIS Harness core library.
3//!
4//! Provides policy-pack loading + validation, the rule evaluator, and the audit-log
5//! entry shape. Wire it up via the `harness-cli` crate (or any embedder).
6//!
7//! Behaviour is a direct port of the Python reference daemon at
8//! `aiegis-harness-reference/reference-daemon/harness.py`; every translation has
9//! been cross-checked against the Python source. See module-level docs for the
10//! Python function each Rust function corresponds to.
11//!
12//! Spec: `policy-pack-format.md` (sha 72e33894c738f5c9).
13//! Canonical positioning: `AIEGIS_HARNESS_SPEC.md` (Nel, sha d4f0b5d19066eba9).
14
15pub mod audit;
16pub mod eval;
17pub mod pack;
18pub mod pack_sig;
19
20pub const SPEC_VERSION: &str = "ahp-policy-pack/0.1";
21pub const DAEMON_VERSION: &str = "0.1.0-reference-rs";
22
23pub use audit::{AuditEntry, AuditLog, AuditSink, SqliteAuditLog};
24pub use eval::{evaluate_packs, Decision, DecisionResult};
25pub use pack::{load_pack, PackError, PolicyPack, Rule};
26pub use pack_sig::{verify_pack_tarball, SigError, DEFAULT_PACK_ISSUER_PUBKEY_HEX};