pub struct Notifier { /* private fields */ }Expand description
Client-side handle for sending notifies to a running agent completion (or any other streaming endpoint) over the same WS that carries the chunk stream.
Multiple in-flight notifies are supported; each gets a unique id and parks its own oneshot. Calls are independent and can run concurrently from multiple tasks.
Implementations§
Source§impl Notifier
impl Notifier
Sourcepub async fn notify(
&self,
params: AgentCompletionNotifyParams,
) -> Result<(), HttpError>
pub async fn notify( &self, params: AgentCompletionNotifyParams, ) -> Result<(), HttpError>
Push a user message at a running agent completion identified
by params.response_id. The message surfaces to the model
on its next natural inspection point.
Returns Ok(()) if the server accepted the notify. Returns
the server-supplied code + message if the server replied
with an Error variant (e.g. unknown response_id, MCP
channel down). Returns super::HttpError::NotifyChannelClosed
if the WS was torn down before the reply arrived.
Sourcepub async fn notify_list_changed(
&self,
change: McpListChanged,
) -> Result<(), HttpError>
pub async fn notify_list_changed( &self, change: McpListChanged, ) -> Result<(), HttpError>
Forward a notifications/{tools,resources}/list_changed
observation from an upstream mcp::Connection up to the API,
which will fan it out as an SSE event on every matching
/objectiveai-mcp/{ws_session_id} GET stream subscribed to
the same mcp_session_id.
Same ack semantics as Self::notify.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Notifier
impl !UnwindSafe for Notifier
impl Freeze for Notifier
impl Send for Notifier
impl Sync for Notifier
impl Unpin for Notifier
impl UnsafeUnpin for Notifier
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more