cleanlib_client/lib.rs
1// CleanLibrary shared client library — HTTP / auth / telemetry surface
2// shared between Rust CLI (cleanlib-cli) and any other Rust consumers.
3// Telemetry transport impl lands in subsequent CLEANLIB-N PRs per Client
4// spec rev1 §7.
5
6pub mod config;
7pub mod customer_state;
8pub mod derive_status;
9pub mod ecosystem_detect;
10pub mod envelope;
11pub mod errors;
12pub mod proxy;
13pub mod risk_acceptance;
14pub mod transport;
15pub mod types;
16pub mod verdict_to_envelope;
17
18// Re-exports — load-bearing surface for sibling-crate consumers (cleanlib-cli,
19// cleanlib-app integration tests) so they import via `cleanlib_client::*`
20// without reaching into module paths.
21pub use customer_state::{CustomerState, Tier};
22pub use ecosystem_detect::ecosystem_from_path;
23pub use derive_status::{derive_status, DerivedStatus};
24pub use envelope::{ReasonCode, Status, VerdictEnvelopeV1, ALL_REASON_CODES, ALL_VERDICT_SOURCES};
25pub use verdict_to_envelope::verdict_to_envelope_v1;
26
27// CLEANLIB-126 M1″ — extern-consumer surface re-exports (cycle-13).
28// Per cycle-13 R5-Lane-2 F2: third-party consumers importing
29// `cleanlib_client::{Client, Verdict, PolicyDecision}` previously hit
30// `error[E0432]: unresolved imports` because the types lived behind
31// module paths. Re-export at crate-root so the public API matches the
32// documented surface (cf. docs-site SDK-Rust.md customer page).
33pub use transport::Client;
34pub use types::{PolicyDecision, PreviousVerdict, Verdict};
35// CLEANLIB-536: RFC 9457 problem+json surface — consumers match on
36// `CleanLibraryError::Problem { problem }` and branch on `problem.reason_class`.
37pub use errors::{CleanLibraryError, ProblemDetails};