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_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
per-MCP GET stream — /objectiveai or
/{owner}/{name}/{ver}/{mcp}, subscribed under the
per-agent response_id + matching McpKind.
Returns Ok(()) if the server accepted the notify. Returns
the server-supplied code + message if the server replied
with an Error variant. Returns
super::HttpError::NotifyChannelClosed if the WS was torn
down before the reply arrived.
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