pub enum Notification {
Show 16 variants
ThreadStarted(ThreadStartedNotification),
ThreadStatusChanged(ThreadStatusChangedNotification),
ThreadTokenUsageUpdated(ThreadTokenUsageUpdatedNotification),
TurnStarted(TurnStartedNotification),
TurnCompleted(TurnCompletedNotification),
ItemStarted(ItemStartedNotification),
ItemCompleted(ItemCompletedNotification),
AgentMessageDelta(AgentMessageDeltaNotification),
CmdOutputDelta(CmdOutputDeltaNotification),
FileChangeOutputDelta(FileChangeOutputDeltaNotification),
ReasoningDelta(ReasoningDeltaNotification),
Error(ErrorNotification),
AccountRateLimitsUpdated(AccountRateLimitsUpdatedNotification),
McpServerStartupStatusUpdated(McpServerStartupStatusUpdatedNotification),
RemoteControlStatusChanged(RemoteControlStatusChangedNotification),
Unknown {
method: String,
params: Option<Value>,
},
}Expand description
A server-to-client notification.
Each variant maps to a single method string on the wire. The Unknown
variant captures methods this crate version doesn’t model yet, preserving
the raw payload for inspection.
Variants§
ThreadStarted(ThreadStartedNotification)
thread/started
ThreadStatusChanged(ThreadStatusChangedNotification)
thread/status/changed
ThreadTokenUsageUpdated(ThreadTokenUsageUpdatedNotification)
thread/tokenUsage/updated
TurnStarted(TurnStartedNotification)
turn/started
TurnCompleted(TurnCompletedNotification)
turn/completed
ItemStarted(ItemStartedNotification)
item/started
ItemCompleted(ItemCompletedNotification)
item/completed
AgentMessageDelta(AgentMessageDeltaNotification)
item/agentMessage/delta
CmdOutputDelta(CmdOutputDeltaNotification)
item/commandExecution/outputDelta
FileChangeOutputDelta(FileChangeOutputDeltaNotification)
item/fileChange/outputDelta
ReasoningDelta(ReasoningDeltaNotification)
item/reasoning/summaryTextDelta
Error(ErrorNotification)
error
AccountRateLimitsUpdated(AccountRateLimitsUpdatedNotification)
account/rateLimits/updated
McpServerStartupStatusUpdated(McpServerStartupStatusUpdatedNotification)
mcpServer/startupStatus/updated
RemoteControlStatusChanged(RemoteControlStatusChangedNotification)
remoteControl/status/changed
Unknown
A method this crate version does not yet model. The raw params are preserved for caller inspection. Encountering this typically means the installed codex CLI is newer than the bindings.
Implementations§
Source§impl Notification
impl Notification
Sourcepub fn is_unknown(&self) -> bool
pub fn is_unknown(&self) -> bool
true if this notification’s method isn’t modeled by the crate.
Sourcepub fn from_envelope(method: &str, params: Option<Value>) -> Result<Self, Error>
pub fn from_envelope(method: &str, params: Option<Value>) -> Result<Self, Error>
Construct a Notification from a method + params envelope.
Returns an error if method is recognized but params doesn’t
deserialize into the typed struct. Unknown methods route to
Notification::Unknown without error.
Trait Implementations§
Source§impl Clone for Notification
impl Clone for Notification
Source§fn clone(&self) -> Notification
fn clone(&self) -> Notification
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more