Skip to main content

NestedFlowBridge

Trait NestedFlowBridge 

Source
pub trait NestedFlowBridge: Send {
    // Required methods
    fn parent_request_id(&self) -> &RequestId;
    fn list_roots(&mut self) -> Result<Vec<RootDefinition>, KernelError>;
    fn create_message(
        &mut self,
        operation: CreateMessageOperation,
    ) -> Result<CreateMessageResult, KernelError>;
    fn create_elicitation(
        &mut self,
        operation: CreateElicitationOperation,
    ) -> Result<CreateElicitationResult, KernelError>;
    fn notify_elicitation_completed(
        &mut self,
        elicitation_id: &str,
    ) -> Result<(), KernelError>;
    fn notify_resource_updated(&mut self, uri: &str) -> Result<(), KernelError>;
    fn notify_resources_list_changed(&mut self) -> Result<(), KernelError>;

    // Provided method
    fn poll_parent_cancellation(&mut self) -> Result<(), KernelError> { ... }
}
Expand description

Bridge exposed to tool-server implementations while a parent request is in flight.

Wrapped servers can use this to trigger negotiated server-to-client requests such as roots/list and sampling/createMessage, or to surface wrapped MCP notifications, without escaping kernel mediation.

Required Methods§

Provided Methods§

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§