onepipeline_ui/lib.rs
1//! The `onepipeline-ui` read API: an axum server wrapping the onepipeline SDK.
2//!
3//! [`docs/contract.md`](https://github.com/nickderobertis/onepipeline-ui/blob/main/docs/contract.md)
4//! is the source of truth for the HTTP surface; everything here is its Rust
5//! rendering. [`contract`] is the wire vocabulary — routes, envelope,
6//! identifiers, queries — [`api::ReadApi`] is the trait one method per route,
7//! [`store::RunStore`] implements it over a runs root through the SDK's
8//! [`views`](onepipeline::views), and [`server`] is the axum router that serves
9//! it. [`liveness`] is the one reading in here that restates one of the SDK's,
10//! because the bounded document a listing reads carries that reading's inputs
11//! and the SDK publishes no entry point that takes them; its own header names
12//! the check that fails when the two drift apart. `tests/contract.rs` holds the types to the contract text and
13//! `tests/e2e/` drives the compiled binary over real HTTP.
14//!
15//! Payloads are carried as [`serde_json::Value`] on purpose. Anything the API
16//! computes that is presentation-worthy lands in the onepipeline SDK/CLI first,
17//! so the typed records arrive from there rather than being invented here; what
18//! this crate owns, and what the fixtures pin, is the envelope. [`payload`] is
19//! the projection from the SDK's records onto the wire, and AGENTS.md lists
20//! every derivation in it that is proposed for the SDK. [`telemetry`] is the
21//! seam onto the SDK's own telemetry document, which it aggregates and this
22//! crate reads rather than folding a run's clock a second time.
23
24#![deny(missing_docs)]
25
26pub mod api;
27pub mod cli;
28pub mod contract;
29pub mod error;
30pub mod filter;
31pub mod liveness;
32pub mod payload;
33pub mod server;
34pub mod store;
35pub mod telemetry;
36
37pub use error::ApiError;