Skip to main content

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;
32
33pub use builder::{SessionBundleBuilder, DEFAULT_BUNDLE_VERSION};
34pub use error::SessionBundleError;
35pub use types::{ParticipantEntry, SessionBundleEnvelope, SessionTrustBundle};
36pub use verifier::{verify_session_bundle, BundleOutcome, VerifySessionBundleContext};
37
38/// Manifest `extensions` key under which a coordinator advertises the
39/// concrete HTTPS URL of its session-bundle endpoint (RFC-AITP-0010
40/// §4.3.1; registered in the spec's `registries/extension-keys.md`).
41///
42/// The §4.3.1 paths (`/aitp/session/bundle` and
43/// `/aitp/session/bundle/{session_id}`) are RECOMMENDED, not reserved:
44/// participants MUST discover the actual endpoint via this extension
45/// key and MUST NOT probe the default paths when the key is absent.
46pub const RFC_AITP_0010_BUNDLE_URI: &str = "rfc-aitp-0010.bundle_uri";