Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

refactor(tinyagents): route spawn tool checks through turn_policy

Steven Enamakelec839f2b1233
diff --git a/crates/openhuman-core/src/agent/subagent_host/tool_prep.rs b/crates/openhuman-core/src/agent/subagent_host/tool_prep.rs
index 5a01444e85..2cc5887d0c 100644
--- a/crates/openhuman-core/src/agent/subagent_host/tool_prep.rs
+++ b/crates/openhuman-core/src/agent/subagent_host/tool_prep.rs
@@ -43,7 +43,7 @@ pub(crate) fn subagent_prompt_protocol(
/// The shared static names stay aligned with TinyAgents; registry lookup is
/// needed only for host-defined, unprefixed `delegate_name` overrides.
pub(super) fn is_subagent_spawn_tool(name: &str) -> bool {
- if crate::agent::tinyagents::is_subagent_spawn_or_delegate_tool(name) {
+ if crate::agent::tinyagents::turn_policy::is_subagent_spawn_or_delegate_tool(name) {
return true;
}
// Synthesised delegation tools are named by the target agent's
diff --git a/crates/openhuman-core/src/profiles/provider_settings.rs b/crates/openhuman-core/src/profiles/provider_settings.rs
index 5d71283bd9..359ffa6e97 100644
--- a/crates/openhuman-core/src/profiles/provider_settings.rs
+++ b/crates/openhuman-core/src/profiles/provider_settings.rs
@@ -17,7 +17,7 @@ use tinysearch_bus::Role;
/// Whether a tool name belongs to a spawn/delegation surface that hosted
/// profiles must keep outside their tool capabilities.
pub(crate) fn is_profile_spawn_tool(name: &str) -> bool {
- crate::agent::tinyagents::is_subagent_spawn_or_delegate_tool(name)
+ crate::agent::tinyagents::turn_policy::is_subagent_spawn_or_delegate_tool(name)
|| crate::agent_registry::host_definition::AgentDefinitionRegistry::current().is_some_and(
|registry| {
registry