pub trait SubagentResolutionPort: Send + Sync {
// Required methods
fn resolve_subagent_model<'life0, 'life1, 'async_trait>(
&'life0 self,
subagent_type: &'life1 str,
) -> Pin<Box<dyn Future<Output = Option<ProviderModelRef>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn resolve_runtime_metadata<'life0, 'life1, 'async_trait>(
&'life0 self,
subagent_type: &'life1 str,
) -> Pin<Box<dyn Future<Output = HashMap<String, String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Resolves subagent-type–specific configuration (model, runtime metadata)
for the SubAgent tool.
Kept separate from ChildSessionPort (session CRUD/lifecycle/state): this
port is pure subagent_type → config resolution (cross-provider model
routing + actor/external-agent metadata). The server layer implements it;
the tool depends only on the trait, carrying no AppState coupling.
Required Methods§
Sourcefn resolve_subagent_model<'life0, 'life1, 'async_trait>(
&'life0 self,
subagent_type: &'life1 str,
) -> Pin<Box<dyn Future<Output = Option<ProviderModelRef>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn resolve_subagent_model<'life0, 'life1, 'async_trait>(
&'life0 self,
subagent_type: &'life1 str,
) -> Pin<Box<dyn Future<Output = Option<ProviderModelRef>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Provider+model ref for a subagent_type, or None to use defaults.
Sourcefn resolve_runtime_metadata<'life0, 'life1, 'async_trait>(
&'life0 self,
subagent_type: &'life1 str,
) -> Pin<Box<dyn Future<Output = HashMap<String, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn resolve_runtime_metadata<'life0, 'life1, 'async_trait>(
&'life0 self,
subagent_type: &'life1 str,
) -> Pin<Box<dyn Future<Output = HashMap<String, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Runtime metadata (e.g. external-agent routing) for a subagent_type.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".