Skip to main content

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//! - [`provenance`] — the composed, base and per-bundle hashes behind the
19//!   active tree, for projections that record where declarations came from.
20//! - [`mod@compose`] — overlaying several bundles with an ownership check.
21//! - [`bootstrap`] — the boot path and its failure policy.
22//! - [`error`] — [`error::BundleError`] and [`error::VerifyFailure`].
23//!
24//! Copyright (c) systemprompt.io — Business Source License 1.1.
25//! See <https://systemprompt.io> for licensing details.
26
27pub mod bootstrap;
28pub mod cache;
29pub mod compose;
30pub mod error;
31pub mod extract;
32pub mod pack;
33pub mod provenance;
34pub mod source;
35pub mod verify;
36
37pub use bootstrap::{ServicesSourceBootstrap, cache_root};
38pub use cache::BundleCache;
39pub use compose::{BundleMember, compose, composed_hash};
40pub use error::{BundleError, BundleResult, VerifyFailure};
41pub use extract::{BUNDLE_TREE_PREFIX, ExtractOptions, TarLayout, extract_bytes, extract_tarball};
42pub use provenance::{
43    BundleProvenance, SourcesProvenance, owning_bundle_hashes, sources_provenance,
44};
45pub use source::{AnyFetcher, BundleFetcher, FetchedBundle, RemoteRef};
46pub use verify::{verify_bundle, verify_extracted};