systemprompt_loader/bundle/mod.rs
1//! Signed services bundles: packing, fetching, verifying and composing.
2//!
3//! A bundle is a gzipped tar carrying `bundle.json` and a `services/` tree,
4//! published to any HTTPS location or OCI registry and fetched by an instance
5//! at boot. The instance is the verifier: an archive digest pin and an
6//! ed25519 signature decide whether the bytes are trusted, per-file checksums
7//! decide whether the extraction is intact, and the content hash keys the
8//! cache. Nothing here warns and continues.
9//!
10//! # Modules
11//!
12//! - [`pack`] — builds a manifest and archive from a services tree.
13//! - [`source`] — the HTTPS and OCI transports behind
14//! [`source::BundleFetcher`].
15//! - [`verify`] — the trust chain, in order.
16//! - [`extract`] — hardened tar extraction shared with the backup path.
17//! - [`cache`] — content-addressed on-disk layout and the `current` swap.
18//! - [`mod@compose`] — overlaying several bundles with an ownership check.
19//! - [`bootstrap`] — the boot path and its failure policy.
20//! - [`error`] — [`error::BundleError`] and [`error::VerifyFailure`].
21//!
22//! Copyright (c) systemprompt.io — Business Source License 1.1.
23//! See <https://systemprompt.io> for licensing details.
24
25pub mod bootstrap;
26pub mod cache;
27pub mod compose;
28pub mod error;
29pub mod extract;
30pub mod pack;
31pub mod source;
32pub mod verify;
33
34pub use bootstrap::{ServicesSourceBootstrap, cache_root};
35pub use cache::BundleCache;
36pub use compose::{BundleMember, compose, composed_hash};
37pub use error::{BundleError, BundleResult, VerifyFailure};
38pub use extract::{BUNDLE_TREE_PREFIX, ExtractOptions, TarLayout, extract_bytes, extract_tarball};
39pub use source::{AnyFetcher, BundleFetcher, FetchedBundle, RemoteRef};
40pub use verify::{verify_bundle, verify_extracted};