pub trait Worker: Send + Sync {
// Required methods
fn descriptor(&self) -> &WorkerDescriptor;
fn execute<'life0, 'async_trait>(
&'life0 self,
request: ExecuteRequest,
events: UnboundedSender<WorkerEvent>,
cancel: CancellationToken,
) -> Pin<Box<dyn Future<Output = Result<ExecuteResult, RinneError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
// Provided method
fn serves_mcp_tools(&self) -> bool { ... }
}Expand description
A unit of work that can be dispatched to (CONTEXT.md §8).
Implementors normalize their underlying tool’s output into ExecuteResult.
Streaming events go to the provided EventSink; cancellation is observed
via the CancellationToken (used by /pause, budget kills, and
stuck-detector aborts — CONTEXT.md §14).
Required Methods§
Sourcefn descriptor(&self) -> &WorkerDescriptor
fn descriptor(&self) -> &WorkerDescriptor
The worker’s self-description, used by the scheduler to resolve a node’s
capability needs to a concrete worker.
Sourcefn execute<'life0, 'async_trait>(
&'life0 self,
request: ExecuteRequest,
events: UnboundedSender<WorkerEvent>,
cancel: CancellationToken,
) -> Pin<Box<dyn Future<Output = Result<ExecuteResult, RinneError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn execute<'life0, 'async_trait>(
&'life0 self,
request: ExecuteRequest,
events: UnboundedSender<WorkerEvent>,
cancel: CancellationToken,
) -> Pin<Box<dyn Future<Output = Result<ExecuteResult, RinneError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Do one unit of work. Returns the normalized result, or an error if the
worker could not be driven at all (distinct from a worker that ran and
reported ExecStatus::Failed).
Provided Methods§
Sourcefn serves_mcp_tools(&self) -> bool
fn serves_mcp_tools(&self) -> bool
Whether this worker can actually run a node’s attached MCP tools
(MCP_SKILLS.md §6): an API worker with the host agentic loop wired, or a
harness that can provision MCP servers into itself. The scheduler uses
this to keep a tool node off a worker that would silently drop its tools.
Default false — a worker opts in by overriding.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".