#[non_exhaustive]pub struct InitializeResponse {
pub protocol_version: ProtocolVersion,
pub agent_capabilities: AgentCapabilities,
pub auth_methods: Vec<AuthMethod>,
pub agent_info: Option<Implementation>,
pub meta: Option<Meta>,
}Expand description
Response to the initialize method.
Contains the negotiated protocol version and agent capabilities.
See protocol docs: Initialization
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.protocol_version: ProtocolVersionThe protocol version the client specified if supported by the agent, or the latest protocol version supported by the agent.
The client should disconnect, if it doesn’t support this version.
agent_capabilities: AgentCapabilitiesCapabilities supported by the agent.
auth_methods: Vec<AuthMethod>Authentication methods supported by the agent.
agent_info: Option<Implementation>Information about the Agent name and version sent to the Client.
Note: in future versions of the protocol, this will be required.
meta: Option<Meta>The _meta property is reserved by ACP to allow clients and agents to attach additional metadata to their interactions. Implementations MUST NOT make assumptions about values at these keys.
See protocol docs: Extensibility
Implementations§
Source§impl InitializeResponse
impl InitializeResponse
pub fn new(protocol_version: ProtocolVersion) -> Self
Sourcepub fn agent_capabilities(self, agent_capabilities: AgentCapabilities) -> Self
pub fn agent_capabilities(self, agent_capabilities: AgentCapabilities) -> Self
Capabilities supported by the agent.
Sourcepub fn auth_methods(self, auth_methods: Vec<AuthMethod>) -> Self
pub fn auth_methods(self, auth_methods: Vec<AuthMethod>) -> Self
Authentication methods supported by the agent.
Sourcepub fn agent_info(self, agent_info: Implementation) -> Self
pub fn agent_info(self, agent_info: Implementation) -> Self
Information about the Agent name and version sent to the Client.
Sourcepub fn meta(self, meta: Meta) -> Self
pub fn meta(self, meta: Meta) -> Self
The _meta property is reserved by ACP to allow clients and agents to attach additional metadata to their interactions. Implementations MUST NOT make assumptions about values at these keys.
See protocol docs: Extensibility
Trait Implementations§
Source§impl Clone for InitializeResponse
impl Clone for InitializeResponse
Source§fn clone(&self) -> InitializeResponse
fn clone(&self) -> InitializeResponse
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for InitializeResponse
impl Debug for InitializeResponse
Source§impl<'de> Deserialize<'de> for InitializeResponse
impl<'de> Deserialize<'de> for InitializeResponse
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for InitializeResponse
impl JsonSchema for InitializeResponse
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more