The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
test(agent_registry): verify orchestrator subagents are spawnable
Steven Enamakelf82781fa8117
diff --git a/crates/openhuman-core/src/agent_registry/agents/fleet_prompt_tests.rs b/crates/openhuman-core/src/agent_registry/agents/fleet_prompt_tests.rsindex f157218ad4..a11499c85f 100644--- a/crates/openhuman-core/src/agent_registry/agents/fleet_prompt_tests.rs+++ b/crates/openhuman-core/src/agent_registry/agents/fleet_prompt_tests.rs@@ -169,19 +169,6 @@ pub(super) fn names_presented_as_callable<'a>(prose = prose.replace(&format!("skill `{}`, tool `{name}`", pack.id), "");}}- // The workflow pack is feature-gated, but its route syntax is still- // intentional prose when that pack is unavailable in this build.- for route in [- "skill `workflows`, tool `build_workflow`",- "skill `workflows`, tool `discover_workflows`",- ] {- prose = prose.replace(route, "");- }- // The generated workflow guide can also mention the routed tool on its- // own after the pack-specific text has been elided.- prose = prose- .replace("`build_workflow`", "")- .replace("`discover_workflows`", "");not_callable.into_iter().filter(|name| prose.contains(&format!("`{name}`")))diff --git a/crates/openhuman-core/src/agent_registry/agents/loader_tests_specialist_agents_tests.rs b/crates/openhuman-core/src/agent_registry/agents/loader_tests_specialist_agents_tests.rsindex 49b2bc02fc..68c8a7477b 100644--- a/crates/openhuman-core/src/agent_registry/agents/loader_tests_specialist_agents_tests.rs+++ b/crates/openhuman-core/src/agent_registry/agents/loader_tests_specialist_agents_tests.rs@@ -241,6 +241,27 @@ fn specialist_agents_are_registered_with_narrow_tools() {}}+#[test]+fn orchestrator_routes_every_registered_specialist_through_spawn_subagent() {+ let registry = crate::agent_registry::host_definition::AgentDefinitionRegistry::builtins_only();+ let orchestrator = registry.get("orchestrator").expect("orchestrator exists");+ let spawn = crate::agent::orchestration::tools::SpawnSubagentTool::new();+ let allowed = spawn+ .parameters_schema()+ .pointer("/properties/agent_id/enum")+ .and_then(serde_json::Value::as_array)+ .expect("spawn_subagent has a finite agent_id enum");+ for entry in &orchestrator.subagents {+ let SubagentEntry::AgentId(agent_id) = entry else {+ continue;+ };+ assert!(+ allowed.iter().any(|candidate| candidate.as_str() == Some(agent_id)),+ "orchestrator allows `{agent_id}` but spawn_subagent does not"+ );+ }+}+#[test]fn morning_briefing_is_read_only() {let def = find("morning_briefing");diff --git a/crates/openhuman-core/src/profiles/provider_settings.rs b/crates/openhuman-core/src/profiles/provider_settings.rsindex fb9a2512a3..8ad4550eff 100644--- a/crates/openhuman-core/src/profiles/provider_settings.rs+++ b/crates/openhuman-core/src/profiles/provider_settings.rs@@ -18,14 +18,6 @@ use tinysearch_bus::Role;/// profiles must keep outside their tool capabilities.pub(crate) fn is_profile_spawn_tool(name: &str) -> bool {crate::agent::tinyagents::turn_policy::is_subagent_spawn_tool(name)- || crate::agent_registry::host_definition::AgentDefinitionRegistry::current().is_some_and(- |registry| {- registry- .list()- .iter()- .any(|definition| definition.delegate_name.as_deref() == Some(name))- },- )}/// Search capability vocabulary for operator presentation settings.pub use tinysearch_bus::Role as SearchRole;diff --git a/crates/openhuman-core/src/tools/toolpacks/registry.rs b/crates/openhuman-core/src/tools/toolpacks/registry.rsindex b65e856738..d9ea667800 100644--- a/crates/openhuman-core/src/tools/toolpacks/registry.rs+++ b/crates/openhuman-core/src/tools/toolpacks/registry.rs@@ -325,10 +325,6 @@ pub const PACKS: &[ToolPack] = &[tools: &["create_image","create_video",- // Reading an image, not making one, but it is the same belt from- // the model's point of view: the request that reaches for it names- // a picture either way.- "analyze_image","media_generate_image","media_generate_video","media_list_models",@@ -336,13 +332,6 @@ pub const PACKS: &[ToolPack] = &[owners: &["image_agent", "video_agent", "vision_agent"],guide: "",},- ToolPack {- id: "tasks",- summary: "Task sources, workflows, artifacts: add, preview, fetch, update, remove.",- tools: &[],- owners: &["task_manager_agent"],- guide: "",- },ToolPack {id: "goals",// Everything about goals EXCEPT closing one.