1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
//! # acdp — Rust library for the Agent Context Distribution Protocol
//!
//! Reference implementation of **ACDP v0.1.0 Final** (specification
//! promoted to Final on 2026-05-19).
//!
//! ACDP lets agents publish immutable, producer-signed context descriptors,
//! retrieve and verify them locally, discover them by keyword, and follow
//! signed references across registries.
//!
//! ## Quick start — producer
//!
//! ```rust,no_run
//! # use acdp::{producer::Producer, crypto::SigningKey,
//! # types::{AgentDid, ContextType, Visibility}};
//! // In production, load from secure storage; `generate` uses OsRng.
//! let key = SigningKey::generate();
//! let prod = Producer::new(
//! key,
//! AgentDid::new("did:web:agents.example.com:my-agent"),
//! "did:web:agents.example.com:my-agent#key-1",
//! );
//!
//! let req = prod.publish_request()
//! .title("Q1 snapshot")
//! .context_type(ContextType::DataSnapshot)
//! .visibility(Visibility::Public)
//! .build()
//! .unwrap();
//!
//! println!("content_hash: {}", req.content_hash);
//! ```
//!
//! ## Quick start — consumer (feature = "client")
//!
//! ```rust,no_run
//! # #[cfg(feature = "client")]
//! # async fn example() -> Result<(), acdp::error::AcdpError> {
//! use acdp::{client::{RegistryClient, VerifiedContext}, did::WebResolver, types::CtxId};
//!
//! let client = RegistryClient::new("https://registry.example.com")?;
//! let resolver = WebResolver::new();
//! let ctx_id = CtxId("acdp://registry.example.com/…".into());
//! let ctx = VerifiedContext::fetch(&client, &resolver, &ctx_id).await?;
//! println!("title: {}", ctx.body().title);
//! # Ok(())
//! # }
//! ```
// Wire types and the profile vocabulary now live in the `acdp-types`
// crate; re-export under the historical `acdp::types` / `acdp::profile`
// paths.
pub use acdp_types as types;
pub use profile;
// Validation, high-level verification, and the producer builder are now
// their own crates; re-export under their historical module paths.
pub use acdp_producer as producer;
pub use acdp_validation as validation;
pub use acdp_verify as verify;
/// Cryptographic primitives — re-exports the `acdp-crypto` crate plus the
/// high-level verification helpers (which live in [`crate::verify`], one
/// layer up) under their historical `crate::crypto::*` paths.
// DID resolution now lives in the `acdp-did` crate.
pub use acdp_did as did;
// Foundational layer now lives in the `acdp-primitives` crate; re-export
// it under the historical module paths so `acdp::error`, `acdp::limits`,
// and `acdp::time` are unchanged for downstream users.
pub use ;
// SSRF defenses moved to the `acdp-safe-http` crate; re-export under the
// historical `acdp::safe_http` path.
pub use acdp_safe_http as safe_http;
// Consumer client and registry/server building blocks are their own
// crates; re-export under the historical `acdp::client` / `acdp::registry`
// / `acdp::pagination` paths.
pub use acdp_client as client;
pub use ;
// ── Protocol version ──────────────────────────────────────────────────────────
// Defined in `acdp-primitives`; re-exported here for the historical paths.
pub use ;
// ── Convenience re-exports ────────────────────────────────────────────────────
pub use ;
pub use ;