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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
//! # aaai-core
//!
//! Core engine for **aaai** (audit for asset integrity).
//!
//! This crate provides all domain logic: folder diffing, audit evaluation,
//! report generation, secret masking, audit history, profiles, and project config.
//! It is consumed by [`aaai-cli`] (the CLI binary) and [`aaai-gui`] (the desktop GUI).
//!
//! ## Module map
//!
//! ```text
//! aaai-core
//! ├── config — AuditDefinition YAML, entry fields, lockfile, I/O
//! ├── diff — parallel folder diff (rayon), DiffEntry, IgnoreRules (.aaaiignore)
//! ├── audit — AuditEngine, AuditResult, AuditStatus, AuditWarning
//! ├── report — Markdown / JSON / HTML / SARIF v2.1.0 output
//! ├── masking — regex-based secret redaction (9 built-in patterns)
//! ├── history — append-only audit run log (~/.aaai/history.jsonl)
//! ├── profile — named before/after/definition combos + user prefs (theme)
//! ├── project — .aaai.yaml auto-discovery and project-level defaults
//! └── templates — 8 built-in rule templates (version_bump, port_change, …)
//! ```
//!
//! ## Quick start
//!
//! ```rust,no_run
//! use aaai_core::{DiffEngine, AuditEngine, AuditDefinition};
//! use std::path::Path;
//!
//! let diffs = DiffEngine::compare(Path::new("./before"), Path::new("./after")).unwrap();
//! let definition = AuditDefinition::new_empty();
//! let result = AuditEngine::evaluate(&diffs, &definition);
//! println!("PASSED: {}", result.summary.is_passing());
//! ```
//!
//! ## Exit code contract (used by aaai-cli)
//!
//! | Code | Meaning |
//! |---|---|
//! | 0 | PASSED — all entries OK or Ignored |
//! | 1 | FAILED — one or more audit failures |
//! | 2 | PENDING — unresolved entries |
//! | 3 | ERROR — file-level errors |
//! | 4 | CONFIG_ERROR — definition parse error |
pub use ;
pub use ;
pub use ;
pub use DiffEngine;
pub use ;
pub use IgnoreRules;
pub use ;
pub use MaskingEngine;
pub use ReportGenerator;