#[non_exhaustive]pub struct AgentCapabilities {
pub session: Option<SessionCapabilities>,
pub auth: AgentAuthCapabilities,
pub providers: Option<ProvidersCapabilities>,
pub nes: Option<NesCapabilities>,
pub position_encoding: Option<PositionEncodingKind>,
pub meta: Option<Meta>,
}unstable_protocol_v2 only.Expand description
Capabilities supported by the agent.
Advertised during initialization to inform the client about available features and content types.
See protocol docs: Agent Capabilities
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.session: Option<SessionCapabilities>Session capabilities supported by the agent.
Optional. Omitted or null both mean the agent does not support the
session/* method surface. Supplying {} means the agent supports the
baseline session methods: session/new, session/prompt,
session/cancel, and session/update.
auth: AgentAuthCapabilitiesAuthentication-related capabilities supported by the agent.
providers: Option<ProvidersCapabilities>unstable_llm_providers only.UNSTABLE
This capability is not part of the spec yet, and may be removed or changed at any point.
Provider configuration capabilities supported by the agent.
By supplying {} it means that the agent supports provider configuration methods.
nes: Option<NesCapabilities>unstable_nes only.UNSTABLE
This capability is not part of the spec yet, and may be removed or changed at any point.
NES (Next Edit Suggestions) capabilities supported by the agent.
position_encoding: Option<PositionEncodingKind>unstable_nes only.UNSTABLE
This capability is not part of the spec yet, and may be removed or changed at any point.
The position encoding selected by the agent from the client’s supported encodings.
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 AgentCapabilities
impl AgentCapabilities
pub fn new() -> Self
Sourcepub fn session(self, session: impl IntoOption<SessionCapabilities>) -> Self
pub fn session(self, session: impl IntoOption<SessionCapabilities>) -> Self
Session capabilities supported by the agent.
Omitted or null both mean the agent does not support the session/*
method surface. Supplying {} means the agent supports the baseline
session methods: session/new, session/prompt, session/cancel, and
session/update.
Sourcepub fn auth(self, auth: AgentAuthCapabilities) -> Self
pub fn auth(self, auth: AgentAuthCapabilities) -> Self
Authentication-related capabilities supported by the agent.
Sourcepub fn providers(
self,
providers: impl IntoOption<ProvidersCapabilities>,
) -> Self
Available on crate feature unstable_llm_providers only.
pub fn providers( self, providers: impl IntoOption<ProvidersCapabilities>, ) -> Self
unstable_llm_providers only.UNSTABLE
This capability is not part of the spec yet, and may be removed or changed at any point.
Provider configuration capabilities supported by the agent.
Sourcepub fn nes(self, nes: impl IntoOption<NesCapabilities>) -> Self
Available on crate feature unstable_nes only.
pub fn nes(self, nes: impl IntoOption<NesCapabilities>) -> Self
unstable_nes only.UNSTABLE
This capability is not part of the spec yet, and may be removed or changed at any point.
NES (Next Edit Suggestions) capabilities supported by the agent.
Sourcepub fn position_encoding(
self,
position_encoding: impl IntoOption<PositionEncodingKind>,
) -> Self
Available on crate feature unstable_nes only.
pub fn position_encoding( self, position_encoding: impl IntoOption<PositionEncodingKind>, ) -> Self
unstable_nes only.UNSTABLE
The position encoding selected by the agent from the client’s supported encodings.
Sourcepub fn meta(self, meta: impl IntoOption<Meta>) -> Self
pub fn meta(self, meta: impl IntoOption<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 AgentCapabilities
impl Clone for AgentCapabilities
Source§fn clone(&self) -> AgentCapabilities
fn clone(&self) -> AgentCapabilities
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AgentCapabilities
impl Debug for AgentCapabilities
Source§impl Default for AgentCapabilities
impl Default for AgentCapabilities
Source§fn default() -> AgentCapabilities
fn default() -> AgentCapabilities
Source§impl<'de> Deserialize<'de> for AgentCapabilities
impl<'de> Deserialize<'de> for AgentCapabilities
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>,
impl Eq for AgentCapabilities
Source§impl IntoV1 for AgentCapabilities
impl IntoV1 for AgentCapabilities
Source§impl JsonSchema for AgentCapabilities
impl JsonSchema for AgentCapabilities
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 moreSource§impl PartialEq for AgentCapabilities
impl PartialEq for AgentCapabilities
Source§fn eq(&self, other: &AgentCapabilities) -> bool
fn eq(&self, other: &AgentCapabilities) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for AgentCapabilities
impl Serialize for AgentCapabilities
impl StructuralPartialEq for AgentCapabilities
Auto Trait Implementations§
impl Freeze for AgentCapabilities
impl RefUnwindSafe for AgentCapabilities
impl Send for AgentCapabilities
impl Sync for AgentCapabilities
impl Unpin for AgentCapabilities
impl UnsafeUnpin for AgentCapabilities
impl UnwindSafe for AgentCapabilities
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.