av_harness/lib.rs
1//! The Agent Harness: the drop-in inline proxy wrapping agent → LLM traffic
2//! (brief §9 data flow).
3//!
4//! Hot path (per request): validate identity → check token quota → sanitize →
5//! compress → dispatch a copy to the async workers (non-blocking `try_send`,
6//! bounded channels) → forward upstream → stream chunks back. Workers do the
7//! heavy work: embeddings, loop delta, OCSF emission, bridge publish, ATIF
8//! appends. Receipts are signed once, at session close, asynchronously
9//! (brief §2 signing rule).
10//!
11//! Silent-error posture: every dropped worker message increments
12//! `av_events_dropped_total`; audited chat/tool work reserves worker capacity
13//! before quotas mutate, so ATIF-bearing jobs are admission-gated (fail
14//! closed), never dropped mid-flight; client aborts still finalize sessions;
15//! worker panics are supervised and counted.
16
17pub mod config;
18pub mod dashboard;
19pub(crate) mod journal;
20pub mod pipeline;
21pub mod reconciler;
22pub mod routes;
23pub mod session;
24pub(crate) mod spool;
25pub mod worker;
26
27pub use config::HarnessConfig;
28pub use journal::key_from_signer as control_key_from_signer;
29pub use pipeline::AppState;
30pub use routes::build_router;