Skip to main content

Notification

Enum Notification 

Source
pub enum Notification {
Show 64 variants ThreadStarted(ThreadStartedNotification), ThreadStatusChanged(ThreadStatusChangedNotification), ThreadTokenUsageUpdated(ThreadTokenUsageUpdatedNotification), TurnStarted(TurnStartedNotification), TurnCompleted(TurnCompletedNotification), ItemStarted(ItemStartedNotification), ItemCompleted(ItemCompletedNotification), AgentMessageDelta(AgentMessageDeltaNotification), CmdOutputDelta(CommandExecutionOutputDeltaNotification), FileChangeOutputDelta(FileChangeOutputDeltaNotification), ReasoningDelta(ReasoningSummaryTextDeltaNotification), Error(ErrorNotification), AccountRateLimitsUpdated(AccountRateLimitsUpdatedNotification), McpServerStartupStatusUpdated(McpServerStatusUpdatedNotification), RemoteControlStatusChanged(RemoteControlStatusChangedNotification), McpServerOauthLoginCompleted(McpServerOauthLoginCompletedNotification), FileChangePatchUpdated(FileChangePatchUpdatedNotification), PlanDelta(PlanDeltaNotification), TurnPlanUpdated(TurnPlanUpdatedNotification), TurnDiffUpdated(TurnDiffUpdatedNotification), ReasoningSummaryPartAdded(ReasoningSummaryPartAddedNotification), ReasoningTextDelta(ReasoningTextDeltaNotification), AccountLoginCompleted(AccountLoginCompletedNotification), DeprecationNotice(DeprecationNoticeNotification), GuardianWarning(GuardianWarningNotification), Warning(WarningNotification), ThreadArchived(ThreadArchivedNotification), ThreadClosed(ThreadClosedNotification), ThreadUnarchived(ThreadUnarchivedNotification), ThreadGoalCleared(ThreadGoalClearedNotification), ThreadNameUpdated(ThreadNameUpdatedNotification), SkillsChanged(SkillsChangedNotification), FsChanged(FsChangedNotification), ConfigWarning(ConfigWarningNotification), AccountUpdated(AccountUpdatedNotification), AppListUpdated(AppListUpdatedNotification), CommandExecOutputDelta(CommandExecOutputDeltaNotification), ExternalAgentConfigImportCompleted(ExternalAgentConfigImportCompletedNotification), FuzzyFileSearchSessionCompleted(FuzzyFileSearchSessionCompletedNotification), FuzzyFileSearchSessionUpdated(FuzzyFileSearchSessionUpdatedNotification), HookCompleted(HookCompletedNotification), HookStarted(HookStartedNotification), ItemGuardianApprovalReviewCompleted(ItemGuardianApprovalReviewCompletedNotification), ItemGuardianApprovalReviewStarted(ItemGuardianApprovalReviewStartedNotification), TerminalInteraction(TerminalInteractionNotification), McpToolCallProgress(McpToolCallProgressNotification), ModelRerouted(ModelReroutedNotification), ModelVerification(ModelVerificationNotification), ProcessExited(ProcessExitedNotification), ProcessOutputDelta(ProcessOutputDeltaNotification), ServerRequestResolved(ServerRequestResolvedNotification), ContextCompacted(ContextCompactedNotification), ThreadGoalUpdated(ThreadGoalUpdatedNotification), ThreadRealtimeClosed(ThreadRealtimeClosedNotification), ThreadRealtimeError(ThreadRealtimeErrorNotification), ThreadRealtimeItemAdded(ThreadRealtimeItemAddedNotification), ThreadRealtimeOutputAudioDelta(ThreadRealtimeOutputAudioDeltaNotification), ThreadRealtimeSdp(ThreadRealtimeSdpNotification), ThreadRealtimeStarted(ThreadRealtimeStartedNotification), ThreadRealtimeTranscriptDelta(ThreadRealtimeTranscriptDeltaNotification), ThreadRealtimeTranscriptDone(ThreadRealtimeTranscriptDoneNotification), WindowsWorldWritableWarning(WindowsWorldWritableWarningNotification), WindowsSandboxSetupCompleted(WindowsSandboxSetupCompletedNotification), 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(CommandExecutionOutputDeltaNotification)

item/commandExecution/outputDelta

§

FileChangeOutputDelta(FileChangeOutputDeltaNotification)

item/fileChange/outputDelta

§

ReasoningDelta(ReasoningSummaryTextDeltaNotification)

item/reasoning/summaryTextDelta

§

Error(ErrorNotification)

error

§

AccountRateLimitsUpdated(AccountRateLimitsUpdatedNotification)

account/rateLimits/updated

§

McpServerStartupStatusUpdated(McpServerStatusUpdatedNotification)

mcpServer/startupStatus/updated

§

RemoteControlStatusChanged(RemoteControlStatusChangedNotification)

remoteControl/status/changed

§

McpServerOauthLoginCompleted(McpServerOauthLoginCompletedNotification)

mcpServer/oauthLogin/completed

§

FileChangePatchUpdated(FileChangePatchUpdatedNotification)

item/fileChange/patchUpdated

§

PlanDelta(PlanDeltaNotification)

item/plan/delta (EXPERIMENTAL)

§

TurnPlanUpdated(TurnPlanUpdatedNotification)

turn/plan/updated

§

TurnDiffUpdated(TurnDiffUpdatedNotification)

turn/diff/updated

§

ReasoningSummaryPartAdded(ReasoningSummaryPartAddedNotification)

item/reasoning/summaryPartAdded

§

ReasoningTextDelta(ReasoningTextDeltaNotification)

item/reasoning/textDelta

§

AccountLoginCompleted(AccountLoginCompletedNotification)

account/login/completed

§

DeprecationNotice(DeprecationNoticeNotification)

deprecationNotice

§

GuardianWarning(GuardianWarningNotification)

guardianWarning

§

Warning(WarningNotification)

warning

§

ThreadArchived(ThreadArchivedNotification)

thread/archived

§

ThreadClosed(ThreadClosedNotification)

thread/closed

§

ThreadUnarchived(ThreadUnarchivedNotification)

thread/unarchived

§

ThreadGoalCleared(ThreadGoalClearedNotification)

thread/goal/cleared

§

ThreadNameUpdated(ThreadNameUpdatedNotification)

thread/name/updated

§

SkillsChanged(SkillsChangedNotification)

skills/changed

§

FsChanged(FsChangedNotification)

fs/changed

§

ConfigWarning(ConfigWarningNotification)

configWarning

§

AccountUpdated(AccountUpdatedNotification)

account/updated

§

AppListUpdated(AppListUpdatedNotification)

app/list/updated

§

CommandExecOutputDelta(CommandExecOutputDeltaNotification)

command/exec/outputDelta

§

ExternalAgentConfigImportCompleted(ExternalAgentConfigImportCompletedNotification)

externalAgentConfig/import/completed

§

FuzzyFileSearchSessionCompleted(FuzzyFileSearchSessionCompletedNotification)

fuzzyFileSearch/sessionCompleted

§

FuzzyFileSearchSessionUpdated(FuzzyFileSearchSessionUpdatedNotification)

fuzzyFileSearch/sessionUpdated

§

HookCompleted(HookCompletedNotification)

hook/completed

§

HookStarted(HookStartedNotification)

hook/started

§

ItemGuardianApprovalReviewCompleted(ItemGuardianApprovalReviewCompletedNotification)

item/autoApprovalReview/completed

§

ItemGuardianApprovalReviewStarted(ItemGuardianApprovalReviewStartedNotification)

item/autoApprovalReview/started

§

TerminalInteraction(TerminalInteractionNotification)

item/commandExecution/terminalInteraction

§

McpToolCallProgress(McpToolCallProgressNotification)

item/mcpToolCall/progress

§

ModelRerouted(ModelReroutedNotification)

model/rerouted

§

ModelVerification(ModelVerificationNotification)

model/verification

§

ProcessExited(ProcessExitedNotification)

process/exited

§

ProcessOutputDelta(ProcessOutputDeltaNotification)

process/outputDelta

§

ServerRequestResolved(ServerRequestResolvedNotification)

serverRequest/resolved

§

ContextCompacted(ContextCompactedNotification)

thread/compacted

§

ThreadGoalUpdated(ThreadGoalUpdatedNotification)

thread/goal/updated

§

ThreadRealtimeClosed(ThreadRealtimeClosedNotification)

thread/realtime/closed

§

ThreadRealtimeError(ThreadRealtimeErrorNotification)

thread/realtime/error

§

ThreadRealtimeItemAdded(ThreadRealtimeItemAddedNotification)

thread/realtime/itemAdded

§

ThreadRealtimeOutputAudioDelta(ThreadRealtimeOutputAudioDeltaNotification)

thread/realtime/outputAudio/delta

§

ThreadRealtimeSdp(ThreadRealtimeSdpNotification)

thread/realtime/sdp

§

ThreadRealtimeStarted(ThreadRealtimeStartedNotification)

thread/realtime/started

§

ThreadRealtimeTranscriptDelta(ThreadRealtimeTranscriptDeltaNotification)

thread/realtime/transcript/delta

§

ThreadRealtimeTranscriptDone(ThreadRealtimeTranscriptDoneNotification)

thread/realtime/transcript/done

§

WindowsWorldWritableWarning(WindowsWorldWritableWarningNotification)

windows/worldWritableWarning

§

WindowsSandboxSetupCompleted(WindowsSandboxSetupCompletedNotification)

windowsSandbox/setupCompleted

§

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.

Fields

§method: String
§params: Option<Value>

Implementations§

Source§

impl Notification

Source

pub fn method(&self) -> &str

Return the wire method string for this notification.

Source

pub fn is_unknown(&self) -> bool

true if this notification’s method isn’t modeled by the crate.

Source

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.

Source

pub fn into_envelope(self) -> Result<(String, Option<Value>), Error>

Decompose this notification back into a (method, params) pair.

Trait Implementations§

Source§

impl Clone for Notification

Source§

fn clone(&self) -> Notification

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Notification

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Notification

Source§

fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for Notification

Source§

fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error>

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,