#[non_exhaustive]pub enum ClientNotification {
CancelSessionNotification(Box<CancelSessionNotification>),
DidOpenDocumentNotification(Box<DidOpenDocumentNotification>),
DidChangeDocumentNotification(Box<DidChangeDocumentNotification>),
DidCloseDocumentNotification(Box<DidCloseDocumentNotification>),
DidSaveDocumentNotification(Box<DidSaveDocumentNotification>),
DidFocusDocumentNotification(Box<DidFocusDocumentNotification>),
AcceptNesNotification(Box<AcceptNesNotification>),
RejectNesNotification(Box<RejectNesNotification>),
MessageMcpNotification(Box<MessageMcpNotification>),
ExtNotification(Box<ExtNotification>),
}unstable_protocol_v2 only.Expand description
All possible notifications that a client can send to an agent.
This enum is used internally for routing RPC notifications. You typically won’t need to use this directly.
Notifications do not expect a response.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
CancelSessionNotification(Box<CancelSessionNotification>)
Cancels ongoing operations for a session.
This is a notification sent by the client to cancel active work in a session.
Upon receiving this notification, the Agent SHOULD:
- Stop all language model requests as soon as possible
- Abort all tool call invocations in progress
- Send any pending
session/updatenotifications - Report an idle
state_updatewithStopReason::Cancelledafter cancellation succeeds
See protocol docs: Cancellation
DidOpenDocumentNotification(Box<DidOpenDocumentNotification>)
unstable_nes only.UNSTABLE
Notification sent when a file is opened in the editor.
DidChangeDocumentNotification(Box<DidChangeDocumentNotification>)
unstable_nes only.UNSTABLE
Notification sent when a file is edited.
DidCloseDocumentNotification(Box<DidCloseDocumentNotification>)
unstable_nes only.UNSTABLE
Notification sent when a file is closed.
DidSaveDocumentNotification(Box<DidSaveDocumentNotification>)
unstable_nes only.UNSTABLE
Notification sent when a file is saved.
DidFocusDocumentNotification(Box<DidFocusDocumentNotification>)
unstable_nes only.UNSTABLE
Notification sent when a file becomes the active editor tab.
AcceptNesNotification(Box<AcceptNesNotification>)
unstable_nes only.UNSTABLE
Notification sent when a suggestion is accepted.
RejectNesNotification(Box<RejectNesNotification>)
unstable_nes only.UNSTABLE
Notification sent when a suggestion is rejected.
MessageMcpNotification(Box<MessageMcpNotification>)
unstable_mcp_over_acp only.UNSTABLE
This capability is not part of the spec yet, and may be removed or changed at any point.
Sends an MCP-over-ACP notification.
ExtNotification(Box<ExtNotification>)
Handles extension notifications from the client.
Extension notifications provide a way to send one-way messages for custom functionality while maintaining protocol compatibility.
See protocol docs: Extensibility
Implementations§
Trait Implementations§
Source§impl Clone for ClientNotification
impl Clone for ClientNotification
Source§fn clone(&self) -> ClientNotification
fn clone(&self) -> ClientNotification
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 ClientNotification
impl Debug for ClientNotification
Source§impl<'de> Deserialize<'de> for ClientNotification
impl<'de> Deserialize<'de> for ClientNotification
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 IntoV1 for ClientNotification
impl IntoV1 for ClientNotification
Source§impl JsonSchema for ClientNotification
impl JsonSchema for ClientNotification
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