pub trait QueueDelegate: Send + Sync {
// Required method
fn read_pending_blocks<'a>(
&'a self,
agent_arguments: &'a IndexMap<String, String>,
mcp_session_id: &'a str,
) -> Pin<Box<dyn Future<Output = Option<QueueRead>> + Send + 'a>>;
}Expand description
Embedder-provided message-queue read path. None ⇒ no delegate
installed at proxy boot (CLI standalone case); the proxy’s
tool-call dispatcher short-circuits without invoking anything.
The trait method returns a boxed-pinned Future + Send rather
than using async_trait: no proc-macro dep, and the trait
stays dyn-safe so the proxy can hold it as
Arc<dyn QueueDelegate>. Implementations can still write the
body as an async move { ... } block wrapped in Box::pin.
Required Methods§
Sourcefn read_pending_blocks<'a>(
&'a self,
agent_arguments: &'a IndexMap<String, String>,
mcp_session_id: &'a str,
) -> Pin<Box<dyn Future<Output = Option<QueueRead>> + Send + 'a>>
fn read_pending_blocks<'a>( &'a self, agent_arguments: &'a IndexMap<String, String>, mcp_session_id: &'a str, ) -> Pin<Box<dyn Future<Output = Option<QueueRead>> + Send + 'a>>
Read pending content blocks for one MCP session. Returns
Some(QueueRead { token, blocks }) on success, None on
error / empty / “nothing right now.”
agent_arguments is the proxy’s per-session transient
header map (the agent-routing keys like
X-OBJECTIVEAI-AGENT-INSTANCE-HIERARCHY); the delegate
parses out whatever it needs to look up the right per-loop
state. mcp_session_id is the base62-encoded session
envelope.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".