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