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