pub trait AgentResolver:
Send
+ Sync
+ 'static {
// Required method
fn resolve(&self, agent_hint: &str, ctx: &Ctx) -> String;
}Expand description
Routing resolver trait. Takes the Ctx.agent hint and returns a real
agent name the inner spawner can resolve. Sync is enough — this is meant
for light lookups. Push heavy resolvers into a separate spawner layer or
a Lua plugin.
The directive argument was removed in the current design: prompts now travel
through engine state and no longer appear in spawner arguments. If you
need prompt-content-driven routing, either have the resolver call
engine.fetch_prompt(token, task_id) from a separate layer, or implement
a dedicated prompt-based routing layer (carry).
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".