#[non_exhaustive]pub struct SessionCapabilities {
pub load: Option<SessionLoadCapabilities>,
pub list: Option<SessionListCapabilities>,
pub delete: Option<SessionDeleteCapabilities>,
pub additional_directories: Option<SessionAdditionalDirectoriesCapabilities>,
pub fork: Option<SessionForkCapabilities>,
pub resume: Option<SessionResumeCapabilities>,
pub close: Option<SessionCloseCapabilities>,
pub meta: Option<Map<String, Value>>,
}unstable_protocol_v2 only.Expand description
Session capabilities supported by the agent.
As a baseline, all Agents MUST support session/new, session/prompt, session/cancel, and session/update.
Optionally, they MAY support other session methods and notifications by specifying additional capabilities.
See protocol docs: Session 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.load: Option<SessionLoadCapabilities>Whether the agent supports session/load.
Optional. Omitted or null both mean the agent does not advertise support.
Supplying {} means the agent supports loading sessions.
list: Option<SessionListCapabilities>Whether the agent supports session/list.
delete: Option<SessionDeleteCapabilities>Whether the agent supports session/delete.
Optional. Omitted or null both mean the agent does not advertise support.
Supplying {} means the agent supports deleting sessions from session/list.
additional_directories: Option<SessionAdditionalDirectoriesCapabilities>Whether the agent supports additionalDirectories on supported session lifecycle requests.
Agents that also support session/list may return
SessionInfo.additionalDirectories to report the complete ordered
additional-root list associated with a listed session.
fork: Option<SessionForkCapabilities>unstable_session_fork only.UNSTABLE
This capability is not part of the spec yet, and may be removed or changed at any point.
Whether the agent supports session/fork.
resume: Option<SessionResumeCapabilities>Whether the agent supports session/resume.
close: Option<SessionCloseCapabilities>Whether the agent supports session/close.
meta: Option<Map<String, Value>>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 SessionCapabilities
impl SessionCapabilities
pub fn new() -> SessionCapabilities
Sourcepub fn load(
self,
load: impl IntoOption<SessionLoadCapabilities>,
) -> SessionCapabilities
pub fn load( self, load: impl IntoOption<SessionLoadCapabilities>, ) -> SessionCapabilities
Whether the agent supports session/load.
Omitted or null both mean the agent does not advertise support.
Supplying {} means the agent supports loading sessions.
Sourcepub fn list(
self,
list: impl IntoOption<SessionListCapabilities>,
) -> SessionCapabilities
pub fn list( self, list: impl IntoOption<SessionListCapabilities>, ) -> SessionCapabilities
Whether the agent supports session/list.
Sourcepub fn delete(
self,
delete: impl IntoOption<SessionDeleteCapabilities>,
) -> SessionCapabilities
pub fn delete( self, delete: impl IntoOption<SessionDeleteCapabilities>, ) -> SessionCapabilities
Whether the agent supports session/delete.
Omitted or null both mean the agent does not advertise support.
Supplying {} means the agent supports deleting sessions from session/list.
Sourcepub fn additional_directories(
self,
additional_directories: impl IntoOption<SessionAdditionalDirectoriesCapabilities>,
) -> SessionCapabilities
pub fn additional_directories( self, additional_directories: impl IntoOption<SessionAdditionalDirectoriesCapabilities>, ) -> SessionCapabilities
Whether the agent supports additionalDirectories on supported session lifecycle requests.
Agents that also support session/list may return
SessionInfo.additionalDirectories to report the complete ordered
additional-root list associated with a listed session.
Sourcepub fn fork(
self,
fork: impl IntoOption<SessionForkCapabilities>,
) -> SessionCapabilities
Available on crate feature unstable_session_fork only.
pub fn fork( self, fork: impl IntoOption<SessionForkCapabilities>, ) -> SessionCapabilities
unstable_session_fork only.Whether the agent supports session/fork.
Sourcepub fn resume(
self,
resume: impl IntoOption<SessionResumeCapabilities>,
) -> SessionCapabilities
pub fn resume( self, resume: impl IntoOption<SessionResumeCapabilities>, ) -> SessionCapabilities
Whether the agent supports session/resume.
Sourcepub fn close(
self,
close: impl IntoOption<SessionCloseCapabilities>,
) -> SessionCapabilities
pub fn close( self, close: impl IntoOption<SessionCloseCapabilities>, ) -> SessionCapabilities
Whether the agent supports session/close.
Sourcepub fn meta(
self,
meta: impl IntoOption<Map<String, Value>>,
) -> SessionCapabilities
pub fn meta( self, meta: impl IntoOption<Map<String, Value>>, ) -> SessionCapabilities
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 SessionCapabilities
impl Clone for SessionCapabilities
Source§fn clone(&self) -> SessionCapabilities
fn clone(&self) -> SessionCapabilities
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 SessionCapabilities
impl Debug for SessionCapabilities
Source§impl Default for SessionCapabilities
impl Default for SessionCapabilities
Source§fn default() -> SessionCapabilities
fn default() -> SessionCapabilities
Source§impl<'de> Deserialize<'de> for SessionCapabilities
impl<'de> Deserialize<'de> for SessionCapabilities
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SessionCapabilities, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SessionCapabilities, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for SessionCapabilities
Source§impl IntoV1 for SessionCapabilities
impl IntoV1 for SessionCapabilities
Source§type Output = SessionCapabilities
type Output = SessionCapabilities
Source§fn into_v1(
self,
) -> Result<<SessionCapabilities as IntoV1>::Output, ProtocolConversionError>
fn into_v1( self, ) -> Result<<SessionCapabilities as IntoV1>::Output, ProtocolConversionError>
Source§impl JsonSchema for SessionCapabilities
impl JsonSchema for SessionCapabilities
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 SessionCapabilities
impl PartialEq for SessionCapabilities
Source§fn eq(&self, other: &SessionCapabilities) -> bool
fn eq(&self, other: &SessionCapabilities) -> bool
self and other values to be equal, and is used by ==.