Skip to main content

agent_mesh_protocol/
lib.rs

1//! Cryptographic primitives for the agent-mesh.
2//!
3//! This crate provides the identity layer the rest of the workspace
4//! builds on:
5//!
6//! * [`UserKey`] — root of trust, one ed25519 keypair per user.
7//! * [`AgentKey`] — short-lived per-process sub-key, certified by a
8//!   `UserKey` via a [`CertChain`].
9//! * [`GitHubBinding`] — cross-signature linking a `UserKey` to the
10//!   ed25519 SSH key GitHub already knows about.
11//! * [`SignedEnvelope`] — the wire format every mesh message is
12//!   wrapped in.
13//! * [`Fingerprint`] — short BLAKE3 identifier for keys and content.
14//!
15//! All wall-clock time in this crate is treated as a *claim* (e.g.
16//! `AgentMetadata::issued_at`), never as a coordination primitive.
17//! See the project `CLAUDE.md` for the rationale.
18
19#![doc(html_root_url = "https://docs.rs/agent-mesh-protocol")]
20
21pub mod agent_key;
22pub mod assertion;
23pub mod authority;
24pub mod caveats;
25pub mod envelope;
26pub mod error;
27pub mod fingerprint;
28pub mod github_binding;
29pub mod signer;
30pub mod user_key;
31
32#[cfg(feature = "pyo3")]
33pub mod pyo3_module;
34
35pub use agent_key::{AgentKey, AgentMetadata, CertChain, Issuer, SerdeSig};
36pub use assertion::Assertion;
37pub use authority::{
38    admit, check_derivation, empty_closure, relate, verify_chain, AdmissionDecision,
39    AdmissionReject, AttestationId, AttestationVerifier, Authority, AuthorityId, AuthorityMismatch,
40    BindError, ChainDecision, ChainReject, ConfinedAxis, DenyAllElevations, Derivation,
41    DerivationDecision, DerivationReject, Grant, GrantId, ResolvedAuthority, ResolvedGrant,
42    ResolvedScope, ScopeRelation,
43};
44pub use caveats::{Caveats, CountBound, Scope};
45pub use envelope::{Recipient, SignedEnvelope};
46pub use error::{MeshError, Result};
47pub use fingerprint::Fingerprint;
48pub use github_binding::{ssh_pubkey_ed25519_bytes, GitHubBinding};
49pub use signer::MeshSigner;
50pub use user_key::{UserKey, UserPublic};