aitp_session_bundle/lib.rs
1//! Session Trust Bundle (RFC-AITP-0010).
2//!
3//! In a multi-agent session of N participants, requiring O(N²) bilateral
4//! Mutual Handshakes is unscalable. The Session Trust Bundle is a signed
5//! artifact a coordinator constructs from N coordinator↔participant
6//! Mutual Handshakes (each producing a peer-issued TCT) and distributes
7//! to all participants, so that every agent-to-agent pair within the
8//! session has a verifiable trust artifact without a full mesh of
9//! handshakes.
10//!
11//! # Trust model
12//!
13//! A bundle provides **coordinator-attested membership**, not
14//! peer-to-peer identity binding. If A and B both appear in the same
15//! bundle, they know:
16//! 1. The coordinator authenticated each of them directly via a
17//! bilateral handshake (the coordinator holds a peer-issued TCT for
18//! each participant).
19//! 2. The coordinator signed both of those TCTs into the same bundle.
20//!
21//! Pairs that need direct peer-to-peer identity binding (rather than
22//! coordinator-attested membership) MUST run a separate bilateral
23//! Mutual Handshake.
24
25#![forbid(unsafe_code)]
26#![warn(missing_docs)]
27
28pub mod builder;
29pub mod error;
30pub mod types;
31pub mod verifier;
32pub mod wire;
33
34pub use builder::{SessionBundleBuilder, DEFAULT_BUNDLE_VERSION};
35pub use error::SessionBundleError;
36pub use types::{
37 ParticipantEntry, SessionBundleEnvelope, SessionTrustBundle, SESSION_BUNDLE_MEMBERS,
38};
39pub use verifier::{verify_session_bundle, BundleOutcome, VerifySessionBundleContext};
40pub use wire::parse_session_bundle_wire;
41
42/// Manifest `extensions` key under which a coordinator advertises the
43/// concrete HTTPS URL of its session-bundle endpoint (RFC-AITP-0010
44/// §4.3.1; registered in the spec's `registries/extension-keys.md`).
45///
46/// The §4.3.1 paths (`/aitp/session/bundle` and
47/// `/aitp/session/bundle/{session_id}`) are RECOMMENDED, not reserved:
48/// participants MUST discover the actual endpoint via this extension
49/// key and MUST NOT probe the default paths when the key is absent.
50pub const RFC_AITP_0010_BUNDLE_URI: &str = "rfc-aitp-0010.bundle_uri";