Yield orchestrators for child groups and correct subscription context catalogs

This commit is contained in:
2026-09-14 22:32:18 -05:00
parent 506dc5b225
commit 72cd38b54e
27 changed files with 741 additions and 115 deletions
+1 -1
View File
@@ -116,7 +116,7 @@ pub(crate) fn add_orchestration_model_options(
required.push(serde_json::Value::String("model_id".to_string()));
}
tool.description = "Start one or more child agents. Assign each child the best-fit, cost-effective model from its required model_id choices, prioritizing capability and likelihood of success over price. Use independent, uniquely named tasks and do not launch duplicate agents for follow-up work. After launch, call wait_for_events when you need child-agent results instead of repeating their work yourself.".to_string();
tool.description = "Start one or more child agents. Assign each child the best-fit, cost-effective model from its required model_id choices, prioritizing capability and likelihood of success over price. Use independent, uniquely named tasks and do not launch duplicate agents for follow-up work. Local launch automatically yields this turn. Do not batch other tools with run_agents. The user can keep talking to you while children work independently. Each group sends one combined update after all children finish; wait for that update before processing their results. User follow-ups do not cancel the group, and must not cause duplicate children or repeated delegated work.".to_string();
}
#[derive(Clone, Debug, Eq, PartialEq, serde::Serialize, serde::Deserialize)]
+18 -9
View File
@@ -13,8 +13,7 @@ use crate::ai::agent::{
AskUserQuestionOption, AskUserQuestionType, CreateDocumentsRequest, DocumentDiff,
DocumentToCreate, EditDocumentsRequest, FileEdit, FileLocations, ReadDocumentsRequest,
ReadFilesRequest, ReadSkillRequest, RunAgentsAgentRunConfig, RunAgentsExecutionMode,
RunAgentsRequest, SearchCodebaseRequest, ShellCommandDelay, StartAgentExecutionMode,
StartAgentVersion,
RunAgentsRequest, SearchCodebaseRequest, ShellCommandDelay,
};
use crate::ai::document::ai_document_model::AIDocumentId;
@@ -188,13 +187,23 @@ pub(crate) fn action_from_tool_call(
plan_id: optional_string(input, "plan_id")?.unwrap_or_default(),
harness_auth_secret_name: None,
}),
"start_agent" => AIAgentActionType::StartAgent {
version: StartAgentVersion::V1,
name: required_nonempty_string(input, "name")?,
prompt: required_nonempty_string(input, "prompt")?,
execution_mode: StartAgentExecutionMode::local_with_defaults(),
lifecycle_subscription: None,
},
// Direct-provider single-child delegation uses the same durable group lifecycle.
"start_agent" => AIAgentActionType::RunAgents(RunAgentsRequest {
summary: required_nonempty_string(input, "name")?,
base_prompt: String::new(),
skills: Vec::new(),
model_id: String::new(),
harness_type: String::new(),
execution_mode: RunAgentsExecutionMode::Local,
agent_run_configs: vec![RunAgentsAgentRunConfig {
name: required_nonempty_string(input, "name")?,
prompt: required_nonempty_string(input, "prompt")?,
title: String::new(),
model_id: String::new(),
}],
plan_id: String::new(),
harness_auth_secret_name: None,
}),
"send_message_to_agent" => AIAgentActionType::SendMessageToAgent {
addresses: vec![required_string(input, "agent_id")?],
subject: String::new(),