agent_client_protocol_schema/lib.rs
1//! [](https://agentclientprotocol.com/)
2//!
3//! # Agent Client Protocol Schema
4//!
5//! Strongly-typed Rust definitions of the Agent Client Protocol (ACP) wire
6//! format. ACP is a JSON-RPC based protocol that standardizes communication
7//! between code editors (IDEs, text-editors, etc.) and coding agents
8//! (programs that use generative AI to autonomously modify code).
9//!
10//! This crate is **only** the schema: the request, response, and
11//! notification types, plus serde plumbing and JSON Schema generation. For
12//! the runtime pieces (transport, connection setup, the `Agent` / `Client`
13//! traits, etc.) use the higher-level [`agent-client-protocol`] crate, which
14//! builds on top of these types.
15//!
16//! [`agent-client-protocol`]: https://crates.io/crates/agent-client-protocol
17//!
18//! ## What's in this crate
19//!
20//! - Wire-format types for every ACP method: request, response, and
21//! notification structs grouped by which side handles them.
22//! - JSON-RPC envelope and routing types: [`JsonRpcMessage`], [`Request`],
23//! [`Response`], [`Notification`], [`RequestId`], [`Error`].
24//! - Aggregated routing enums: [`AgentRequest`], [`AgentResponse`],
25//! [`AgentNotification`], and the matching client-side trio used by SDK
26//! crates to dispatch incoming JSON-RPC messages.
27//! - The `generate` binary that emits the published `schema.json`,
28//! `meta.json`, and the accompanying mdx documentation consumed by the
29//! protocol website and registry.
30//!
31//! ## Versioning
32//!
33//! The default surface re-exports the v1 (current stable) protocol types
34//! directly at the crate root, so most consumers can write
35//! `agent_client_protocol_schema::SessionId` (and so on) without thinking
36//! about versions.
37//!
38//! For the complete protocol specification and documentation, visit
39//! <https://agentclientprotocol.com>.
40
41pub mod rpc;
42mod serde_util;
43mod v1;
44#[cfg(feature = "unstable_protocol_v2")]
45pub mod v2;
46mod version;
47
48pub use serde_util::*;
49pub use v1::*;
50pub use version::*;