#[non_exhaustive]pub struct SessionNotification {
pub session_id: SessionId,
pub update: SessionUpdate,
pub meta: Option<Map<String, Value>>,
}Expand description
Notification containing a session update from the agent.
Used to stream real-time progress and results during prompt processing.
See protocol docs: Agent Reports Output
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_id: SessionIdThe ID of the session this update pertains to.
update: SessionUpdateThe actual update content.
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 SessionNotification
impl SessionNotification
Sourcepub fn new(
session_id: impl Into<SessionId>,
update: SessionUpdate,
) -> SessionNotification
pub fn new( session_id: impl Into<SessionId>, update: SessionUpdate, ) -> SessionNotification
Builds SessionNotification with the required notification fields set; optional fields start unset or empty.
Sourcepub fn meta(
self,
meta: impl IntoOption<Map<String, Value>>,
) -> SessionNotification
pub fn meta( self, meta: impl IntoOption<Map<String, Value>>, ) -> SessionNotification
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 SessionNotification
impl Clone for SessionNotification
Source§fn clone(&self) -> SessionNotification
fn clone(&self) -> SessionNotification
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 SessionNotification
impl Debug for SessionNotification
Source§impl<'de> Deserialize<'de> for SessionNotification
impl<'de> Deserialize<'de> for SessionNotification
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SessionNotification, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SessionNotification, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl IntoV2 for SessionNotification
impl IntoV2 for SessionNotification
Source§type Output = SessionNotification
type Output = SessionNotification
Source§fn into_v2(
self,
) -> Result<<SessionNotification as IntoV2>::Output, ProtocolConversionError>
fn into_v2( self, ) -> Result<<SessionNotification as IntoV2>::Output, ProtocolConversionError>
Source§impl JsonRpcMessage for SessionNotification
impl JsonRpcMessage for SessionNotification
Source§fn matches_method(method: &str) -> bool
fn matches_method(method: &str) -> bool
Source§fn to_untyped_message(&self) -> Result<UntypedMessage, Error>
fn to_untyped_message(&self) -> Result<UntypedMessage, Error>
impl JsonRpcNotification for SessionNotification
Source§impl JsonSchema for SessionNotification
impl JsonSchema for SessionNotification
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 SessionNotification
impl PartialEq for SessionNotification
Source§fn eq(&self, other: &SessionNotification) -> bool
fn eq(&self, other: &SessionNotification) -> bool
self and other values to be equal, and is used by ==.