Skip to main content

cellos_projector/
lib.rs

1//! `cellos-projector` library surface.
2//!
3//! This crate is primarily delivered as a set of binaries (see `src/main.rs`
4//! and `src/bin/*.rs`), but the library path is required so that pure
5//! rendering helpers — used by audit / evidence consumers — can be unit-tested
6//! without spawning a subprocess.
7//!
8//! Public modules:
9//! - [`audit_doc`] — the F6a evidence-bundle consumer. It accepts a
10//!   CloudEvent JSON value (`type ==
11//!   "dev.cellos.events.cell.evidence_bundle.v1.emitted"`) and renders a
12//!   one-page Markdown audit document.
13//! - [`event_decode`] — I5 per-event signing decode shim, shared between the
14//!   JSONL projector and the JetStream consumer (`cellos-state-server`).
15//!
16//! Design notes:
17//! - `render_audit_doc` is a pure, byte-deterministic function. It must never
18//!   panic on malformed input (D11): wrong event type or missing `data`
19//!   yields a single-line Markdown error sentinel rather than aborting.
20//! - The library deliberately does **not** depend on `cellos-core::events` or
21//!   `cellos-host-telemetry` for the F6a consumer. Slot F6a only reads from
22//!   the on-wire JSON shape, so the consumer stays decoupled from upstream
23//!   typed schemas.
24
25pub mod audit_doc;
26pub mod build_info;
27pub mod event_decode;
28
29pub use event_decode::{decode_event, EventVerifierConfig};