pub struct CompositeExternalChildRunner { /* private fields */ }Expand description
Composite router that delegates to the first matching external child runner.
Implementations§
Source§impl CompositeExternalChildRunner
impl CompositeExternalChildRunner
pub fn new(runners: Vec<Arc<dyn ExternalChildRunner>>) -> Self
Trait Implementations§
Source§impl ExternalChildRunner for CompositeExternalChildRunner
impl ExternalChildRunner for CompositeExternalChildRunner
Source§fn set_escalation_bridge(&self, bridge: Option<HostBridge>)
fn set_escalation_bridge(&self, bridge: Option<HostBridge>)
#68: fan the per-run escalation bridge out to every inner runner. The
composite is what build_external_child_runner returns and what the
worker retains, so without this forward the bind would hit the trait’s
no-op default and the wrapped ActorChildRunners would never see it.
Source§fn set_local_child_skill_factory(
&self,
factory: Option<Arc<dyn LocalChildSkillFactory>>,
)
fn set_local_child_skill_factory( &self, factory: Option<Arc<dyn LocalChildSkillFactory>>, )
App catalog/read services for the owned local backend only.
Process and remote adapters deliberately retain the default no-op.
Source§fn set_local_task_runtime(&self, runtime: Option<LocalTaskRuntime>)
fn set_local_task_runtime(&self, runtime: Option<LocalTaskRuntime>)
Bind the Host’s in-process execution resources. Process/remote adapters
deliberately ignore this capability and retain their existing mode.
Source§fn prepare_child_execution<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session: &'life1 Session,
run_id: &'life2 str,
cancel: CancellationToken,
) -> Pin<Box<dyn Future<Output = Result<Option<Arc<dyn RuntimeSessionPersistence>>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn prepare_child_execution<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session: &'life1 Session,
run_id: &'life2 str,
cancel: CancellationToken,
) -> Pin<Box<dyn Future<Output = Result<Option<Arc<dyn RuntimeSessionPersistence>>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Acquire this backend’s exact durable writer before the canonical
running checkpoint. A default writer is never substituted after claim.
Source§fn abandon_child_execution<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session: &'life1 Session,
run_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn abandon_child_execution<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session: &'life1 Session,
run_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Roll back a prepared execution whose initial canonical checkpoint failed.
Local implementations must close the launch gate and prove resource drain.
Source§fn quarantine_child_execution(&self, session: &Session, run_id: &str)
fn quarantine_child_execution(&self, session: &Session, run_id: &str)
Record a setup panic without inventing a successful resource stop.
Source§fn track_child_task(
&self,
session_id: &str,
run_id: &str,
handle: JoinHandle<()>,
) -> Option<JoinHandle<()>>
fn track_child_task( &self, session_id: &str, run_id: &str, handle: JoinHandle<()>, ) -> Option<JoinHandle<()>>
Keep a local coordinator handle owned until it really exits. Returning
the handle leaves supervision to an outer composite or legacy caller.
Source§fn finish_child_execution<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session: &'life1 Session,
run_id: &'life2 str,
history_committed: bool,
) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn finish_child_execution<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session: &'life1 Session,
run_id: &'life2 str,
history_committed: bool,
) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
End the exact backend writer after terminal persistence and the history
barrier, before publishing runner replacement eligibility.
Source§fn shutdown<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn shutdown<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Stop admission, request cancellation, and await owned task/resource
completion. This is called by the Host’s graceful shutdown path.
Source§fn set_ticket_service(&self, service: Option<Arc<TicketService>>)
fn set_ticket_service(&self, service: Option<Arc<TicketService>>)
Opt-in, host-owned scope authority. It is never copied into the Worker.
Source§fn validate_required_child_context_route<'life0, 'life1, 'async_trait>(
&'life0 self,
session: &'life1 Session,
) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn validate_required_child_context_route<'life0, 'life1, 'async_trait>(
&'life0 self,
session: &'life1 Session,
) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
A narrow, pre-persistence compatibility check on the actual registered
runner. Unknown/custom routes fail closed for required one-shot packets.
Source§fn should_handle<'life0, 'life1, 'async_trait>(
&'life0 self,
session: &'life1 Session,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn should_handle<'life0, 'life1, 'async_trait>(
&'life0 self,
session: &'life1 Session,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Returns true if this runner should handle the given child session.
Source§fn execute_external_child<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session: &'life1 mut Session,
job: &'life2 SpawnJob,
event_tx: Sender<AgentEvent>,
cancel_token: CancellationToken,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn execute_external_child<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session: &'life1 mut Session,
job: &'life2 SpawnJob,
event_tx: Sender<AgentEvent>,
cancel_token: CancellationToken,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Execute the child session using an external runtime.
Source§fn commit_durable_child_delivery<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session: &'life1 Session,
activation_run_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn commit_durable_child_delivery<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session: &'life1 Session,
activation_run_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Commit and read back any Host-only proof required for this terminal
delivery after the final Child Session save. Failure (including timeout)
prevents a committed completion source and successful runner finalization.
When the source is pending, publish its terminal status and seal with an
exact-snapshot canonical write before returning; the SDK verifies readback.
Legacy/default runners need no separate proof and retain save-only behavior.
Source§fn confirm_durable_child_delivery<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session: &'life1 Session,
activation_run_id: &'life2 str,
history_committed: bool,
) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn confirm_durable_child_delivery<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session: &'life1 Session,
activation_run_id: &'life2 str,
history_committed: bool,
) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
ACK transport delivery only after the final Child save and required
Host proof commit both succeed. The exact Child birth and activation run
identify the pending receipt; failed commitment leaves it unacknowledged.
ACK delivery failure does not invalidate an already-proven completion.
Source§fn prepare_durable_child_delivery<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session: &'life1 Session,
activation_run_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<bool, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn prepare_durable_child_delivery<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session: &'life1 Session,
activation_run_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<bool, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Persist a Host-only broker receipt before the final Child checkpoint.
Ok(true) selects the append-safe final checkpoint. An unprepared
broker terminal must never be ACKed after a merely ordinary save.Source§fn set_session_inbox_runtime(&self, binding: Option<SessionInboxRuntimeBinding>)
fn set_session_inbox_runtime(&self, binding: Option<SessionInboxRuntimeBinding>)
Bind the owning runtime’s canonical SessionInbox resources. Actor
runners use this to bridge active local/remote/warm workers without a
process-global live-session registry.
Source§fn set_actor_directory_store(&self, store: Option<Arc<SessionStoreV2>>)
fn set_actor_directory_store(&self, store: Option<Arc<SessionStoreV2>>)
Optional actual host Store for the local zero-tool named-profile route.
This does not enable owned Inbox claims or grant authority to custom runners.
Source§fn set_canonical_subagent_tool(&self, tool: Option<Arc<dyn Tool>>)
fn set_canonical_subagent_tool(&self, tool: Option<Arc<dyn Tool>>)
Bind the application-owned logical SubAgent tool after its canonical
scheduler/adapter exist. Actor runners use it only for fenced child RPCs.
Source§fn set_actor_event_observer(
&self,
observer: Option<Arc<dyn ActorEventObserver>>,
)
fn set_actor_event_observer( &self, observer: Option<Arc<dyn ActorEventObserver>>, )
Optional host-owned, redacted canonical Actor event observer.
Auto Trait Implementations§
impl !RefUnwindSafe for CompositeExternalChildRunner
impl !UnwindSafe for CompositeExternalChildRunner
impl Freeze for CompositeExternalChildRunner
impl Send for CompositeExternalChildRunner
impl Sync for CompositeExternalChildRunner
impl Unpin for CompositeExternalChildRunner
impl UnsafeUnpin for CompositeExternalChildRunner
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more