agent_client_protocol_schema/v2/
mod.rs1mod agent;
14mod client;
15mod content;
16pub mod conversion;
17#[cfg(feature = "unstable_elicitation")]
18mod elicitation;
19mod error;
20mod ext;
21#[cfg(feature = "unstable_mcp_over_acp")]
22mod mcp;
23#[cfg(feature = "unstable_nes")]
24mod nes;
25mod plan;
26mod protocol_level;
27pub(crate) mod schema_util;
28mod tool_call;
29
30pub use crate::rpc::{JsonRpcBatch, JsonRpcMessage, Notification, Request, RequestId};
31pub use agent::*;
32pub use client::*;
33pub use content::*;
34use derive_more::{Display, From};
35#[cfg(feature = "unstable_elicitation")]
36pub use elicitation::*;
37pub use error::*;
38pub use ext::*;
39#[cfg(feature = "unstable_mcp_over_acp")]
40pub use mcp::*;
41#[cfg(feature = "unstable_nes")]
42pub use nes::*;
43pub use plan::*;
44pub use protocol_level::*;
45pub use serde_json::value::RawValue;
46pub use tool_call::*;
47
48pub type Response<Result> = crate::rpc::Response<Result, Error>;
50
51use schemars::JsonSchema;
52use serde::{Deserialize, Serialize};
53use std::sync::Arc;
54
55#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema, PartialEq, Eq, Hash, Display, From)]
62#[serde(transparent)]
63#[from(Arc<str>, String, &'static str)]
64#[non_exhaustive]
65pub struct SessionId(pub Arc<str>);
66
67impl SessionId {
68 #[must_use]
70 pub fn new(id: impl Into<Arc<str>>) -> Self {
71 Self(id.into())
72 }
73}