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>;
52
53use schemars::JsonSchema;
54use serde::{Deserialize, Serialize};
55use std::sync::Arc;
56
57#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema, PartialEq, Eq, Hash, Display, From)]
64#[serde(transparent)]
65#[from(Arc<str>, String, &'static str)]
66#[non_exhaustive]
67pub struct SessionId(pub Arc<str>);
68
69impl SessionId {
70 #[must_use]
71 pub fn new(id: impl Into<Arc<str>>) -> Self {
72 Self(id.into())
73 }
74}