pub trait SubagentSpawnStore:
Send
+ Sync
+ 'static {
// Required methods
fn try_claim_spawn<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
parent_session_id: SessionId,
tool_call_id: &'life1 str,
subagent_name: &'life2 str,
subagent_task: &'life3 str,
claim_token: Uuid,
) -> Pin<Box<dyn Future<Output = Result<SpawnClaimResult>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn register_child_session<'life0, 'async_trait>(
&'life0 self,
spawn_handle_id: Uuid,
claim_token: Uuid,
child_session_id: SessionId,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn settle_spawn<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
parent_session_id: SessionId,
tool_call_id: &'life1 str,
claim_token: Uuid,
terminal_status: &'life2 str,
terminal_result: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
}Expand description
Durable spawn handle store for subagent idempotency (EVE-535).
Maps (parent_session_id, tool_call_id) → child_session_id so that when
a parent’s act is reclaimed mid-wait_for_idle, the tool can reattach
to the existing child instead of spawning a duplicate.
Lifecycle: claim → register_child_session → settle_spawn.
Required Methods§
Sourcefn try_claim_spawn<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
parent_session_id: SessionId,
tool_call_id: &'life1 str,
subagent_name: &'life2 str,
subagent_task: &'life3 str,
claim_token: Uuid,
) -> Pin<Box<dyn Future<Output = Result<SpawnClaimResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn try_claim_spawn<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
parent_session_id: SessionId,
tool_call_id: &'life1 str,
subagent_name: &'life2 str,
subagent_task: &'life3 str,
claim_token: Uuid,
) -> Pin<Box<dyn Future<Output = Result<SpawnClaimResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Attempt to claim a spawn slot for (parent_session_id, tool_call_id).
Does NOT accept child_session_id — the child session does not exist yet.
Call register_child_session with the actual child ID after creating it.
Sourcefn register_child_session<'life0, 'async_trait>(
&'life0 self,
spawn_handle_id: Uuid,
claim_token: Uuid,
child_session_id: SessionId,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn register_child_session<'life0, 'async_trait>(
&'life0 self,
spawn_handle_id: Uuid,
claim_token: Uuid,
child_session_id: SessionId,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Register the actual child session ID after it has been created.
Must be called after try_claim_spawn returns Claimed or
ClaimedPendingChild, before waiting for the child to complete.
Sourcefn settle_spawn<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
parent_session_id: SessionId,
tool_call_id: &'life1 str,
claim_token: Uuid,
terminal_status: &'life2 str,
terminal_result: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn settle_spawn<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
parent_session_id: SessionId,
tool_call_id: &'life1 str,
claim_token: Uuid,
terminal_status: &'life2 str,
terminal_result: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Record the terminal result once the child has completed.
claim_token must match the stored token. terminal_status is the
wait_for_idle return value (“idle”, “error”, “timeout”, etc.) and
terminal_result is the last agent message.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl<S: SubagentSpawnStore + ?Sized> SubagentSpawnStore for Arc<S>
Blanket impl: Arc<S> delegates to the inner store.
impl<S: SubagentSpawnStore + ?Sized> SubagentSpawnStore for Arc<S>
Blanket impl: Arc<S> delegates to the inner store.