cleanlib-client 0.2.0

HTTP client SDK for the CleanLibrary verdict API — VerdictEnvelopeV1 types, derive_status logic, transport, config, and risk-acceptance YAML emitter shared between cleanlib-cli and other CleanLibrary consumers.
Documentation
// CleanLibrary shared client library — HTTP / auth / telemetry surface
// shared between Rust CLI (cleanlib-cli) and any other Rust consumers.
// Telemetry transport impl lands in subsequent CLEANLIB-N PRs per Client
// spec rev1 §7.

pub mod attestation_verify;
pub mod config;
pub mod customer_state;
pub mod derive_status;
pub mod ecosystem_detect;
pub mod envelope;
pub mod errors;
pub mod gate;
pub mod proxy;
pub mod risk_acceptance;
pub mod transport;
pub mod types;
pub mod verdict_to_envelope;

// Re-exports — load-bearing surface for sibling-crate consumers (cleanlib-cli,
// cleanlib-app integration tests) so they import via `cleanlib_client::*`
// without reaching into module paths.
pub use customer_state::{CustomerState, Tier};
// CLEANLIB-657 (CX-8 P1-b): the verdict()/enforce() dual consumption API — a
// blocked verdict is a returned value, a couldn't-assess is the exception.
pub use gate::{enforce, verdict, Assessment, GateError};
pub use ecosystem_detect::ecosystem_from_path;
pub use derive_status::{derive_status, DerivedStatus};
pub use envelope::{ReasonCode, Status, VerdictEnvelopeV1, ALL_REASON_CODES, ALL_VERDICT_SOURCES};
pub use verdict_to_envelope::verdict_to_envelope_v1;

// CLEANLIB-126 M1″ — extern-consumer surface re-exports (cycle-13).
// Per cycle-13 R5-Lane-2 F2: third-party consumers importing
// `cleanlib_client::{Client, Verdict, PolicyDecision}` previously hit
// `error[E0432]: unresolved imports` because the types lived behind
// module paths. Re-export at crate-root so the public API matches the
// documented surface (cf. docs-site SDK-Rust.md customer page).
pub use transport::{Client, RemediationOutcome};
pub use types::{PolicyDecision, PreviousVerdict, Verdict};
// Cosign gate 3 (Q6=a): capability-not-policy attestation verify. Nothing
// calls this automatically — an integrator opts in explicitly (Q14).
pub use attestation_verify::{
    verify_attestation, AttestationKeyLookup, PubkeysEndpointLookup, DEFAULT_PUBKEY_CACHE_TTL,
};
// CLEANLIB-536: RFC 9457 problem+json surface — consumers match on
// `CleanLibraryError::Problem { problem }` and branch on `problem.reason_class`.
pub use errors::{CleanLibraryError, ProblemDetails};