feat: add mailbox concept for wait (#16010)

Add a mailbox we can use for inter-agent communication
`wait` is now based on it and don't take target anymore
This commit is contained in:
jif-oai authored and GitHub committed 2026-03-30 11:47:20 +02:00
1 parent bb95ec3ec6
commit 213756c9ab
11 files changed
+601 -237

No files matched your search

-19
View File
@@ -28,25 +28,6 @@ pub(crate) async fn resolve_agent_target(
})
}
/// Resolves multiple tool-facing agent targets to thread ids.
pub(crate) async fn resolve_agent_targets(
session: &Arc<Session>,
turn: &Arc<TurnContext>,
targets: Vec<String>,
) -> Result<Vec<ThreadId>, FunctionCallError> {
if targets.is_empty() {
return Err(FunctionCallError::RespondToModel(
"agent targets must be non-empty".to_string(),
));
}
let mut resolved = Vec::with_capacity(targets.len());
for target in &targets {
resolved.push(resolve_agent_target(session, turn, target).await?);
}
Ok(resolved)
}
fn register_session_root(session: &Arc<Session>, turn: &Arc<TurnContext>) {
session
.services