cleanlib-cli 0.1.1

Terminal interface to CleanLibrary โ€” query dependency verdicts and scan package manifests for ALLOW / DENY / WARN signals from the terminal or CI pipelines.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! Offline verdict cache โ€” cycle-7 Cli7. Two layers per dispatch ยง2.6:
//!
//! - In-process cache for single CLI invocation (`memory.rs`; cycle-7 Cli2 may
//!   surface as a small wrapper; bounded by the CLI's lifetime)
//! - Persistent 7d-TTL cache via `sled` at `~/.cleanlib/cache.sled/`
//!   (`persistent.rs`; single-file embedded KV, no daemon)
//!
//! When cleanlib-enrich is unreachable, the CLI checks the persistent cache;
//! a hit within 7d TTL emits the verdict with a `(cached: <date>)` annotation
//! treated as `LIVE_DEGRADED` for exit-code purposes. Cache populated on every
//! successful live `cleanlib verdict`.

pub mod persistent;

#[allow(unused_imports)]
pub use persistent::{
    cache_key, default_cache_dir, CachedEntry, PersistentCache, DEFAULT_TTL_DAYS,
};