agent_client_protocol_schema/v1/
mod.rs1mod agent;
4mod client;
5mod content;
6#[cfg(feature = "unstable_elicitation")]
7mod elicitation;
8mod error;
9mod ext;
10#[cfg(feature = "unstable_mcp_over_acp")]
11mod mcp;
12#[cfg(feature = "unstable_nes")]
13mod nes;
14mod plan;
15#[cfg(feature = "unstable_cancel_request")]
16mod protocol_level;
17mod tool_call;
18
19pub use crate::rpc::{JsonRpcMessage, Notification, Request, RequestId};
20pub use agent::*;
21pub use client::*;
22pub use content::*;
23use derive_more::{Display, From};
24#[cfg(feature = "unstable_elicitation")]
25pub use elicitation::*;
26pub use error::*;
27pub use ext::*;
28#[cfg(feature = "unstable_mcp_over_acp")]
29pub use mcp::*;
30#[cfg(feature = "unstable_nes")]
31pub use nes::*;
32pub use plan::*;
33#[cfg(feature = "unstable_cancel_request")]
34pub use protocol_level::*;
35pub use serde_json::value::RawValue;
36pub use tool_call::*;
37
38pub type Response<Result> = crate::rpc::Response<Result, Error>;
40
41use schemars::JsonSchema;
42use serde::{Deserialize, Serialize};
43use std::sync::Arc;
44
45#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema, PartialEq, Eq, Hash, Display, From)]
52#[serde(transparent)]
53#[from(Arc<str>, String, &'static str)]
54#[non_exhaustive]
55pub struct SessionId(pub Arc<str>);
56
57impl SessionId {
58 #[must_use]
60 pub fn new(id: impl Into<Arc<str>>) -> Self {
61 Self(id.into())
62 }
63}