pub struct ChildSessionAdapter { /* private fields */ }Expand description
Server-side adapter that bridges domain ChildSessionPort to infrastructure.
Holds all shared state needed by SubAgentTool.
Implements the full ChildSessionPort trait with real methods (no stubs).
Implementations§
Source§impl ChildSessionAdapter
impl ChildSessionAdapter
Sourcepub async fn resolve_subagent_model(
&self,
subagent_type: &str,
) -> Option<ProviderModelRef>
pub async fn resolve_subagent_model( &self, subagent_type: &str, ) -> Option<ProviderModelRef>
Resolve the provider+model ref for a given subagent_type using the configured resolver.
Sourcepub async fn resolve_runtime_metadata(
&self,
subagent_type: &str,
) -> HashMap<String, String>
pub async fn resolve_runtime_metadata( &self, subagent_type: &str, ) -> HashMap<String, String>
Resolve runtime metadata (e.g. external agent routing) for a subagent_type.
Sourcepub fn resolve_subagent_prompt(&self, subagent_type: &str) -> String
pub fn resolve_subagent_prompt(&self, subagent_type: &str) -> String
Resolve the canonical system prompt for the given subagent_type.
Always returns a prompt: unknown / empty subagent_type values fall
back to the general-purpose profile (whose prompt is byte-equal to
the legacy CHILD_SYSTEM_PROMPT).
Sourcepub async fn register_parent_wait_for_child(
&self,
parent_session_id: &str,
child_session_id: &str,
tool_call_id: Option<&str>,
) -> Result<(), ChildSessionError>
pub async fn register_parent_wait_for_child( &self, parent_session_id: &str, child_session_id: &str, tool_call_id: Option<&str>, ) -> Result<(), ChildSessionError>
Register a durable parent wait for an enqueued child session.
This is intentionally idempotent: repeated registrations for the same child merge into the existing wait set. The child runner owns timeout and liveness; the parent wait timeout is a long lease for observability.