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
fix(dispatch): correct doc and test for worker spawn exemption
Steven Enamakel0605f1789fd3
diff --git a/crates/openhuman-core/src/agent/bus.rs b/crates/openhuman-core/src/agent/bus.rsindex c257cf9580..c70570d96d 100644--- a/crates/openhuman-core/src/agent/bus.rs+++ b/crates/openhuman-core/src/agent/bus.rs@@ -114,9 +114,9 @@ pub struct AgentTurnRequest {pub visible_tool_names: Option<HashSet<String>>,/// Per-turn synthesised tools to splice alongside `tools_registry`.- /// The dispatch path uses this to carry `ArchetypeDelegationTool` /- /// `SkillDelegationTool` instances built fresh each turn from the- /// active agent's `subagents` field and the current Composio+ /// The dispatch path uses this to carry `ArchetypeDelegationTool`+ /// instances and deferred Composio action tools built fresh each turn+ /// from the active agent's `subagents` field and the current Composio/// integrations — tools that don't exist in the global startup/// registry because they depend on per-user runtime state./// Empty vec for agents that don't delegate.diff --git a/crates/openhuman-core/src/agent/subagent_host/ops/runner.rs b/crates/openhuman-core/src/agent/subagent_host/ops/runner.rsindex dd48440930..9c08bdda81 100644--- a/crates/openhuman-core/src/agent/subagent_host/ops/runner.rs+++ b/crates/openhuman-core/src/agent/subagent_host/ops/runner.rs@@ -65,10 +65,9 @@ use super::provider::{/// initialised. A `None` parent yields `Ok(())`: we skip rather than mask, the/// same defensive posture the loader takes for unknown child ids.///-/// A **worker** parent is also exempted. At runtime a worker only reaches the-/// spawn chokepoint via the documented collapsed `delegate_to_integrations_agent`-/// path (→ `integrations_agent`, itself a worker) — a shape the loader-/// intentionally leaves untouched. Re-denying it here would turn valid custom+/// A **worker** parent is also exempted. A worker's `subagents` list holds no+/// agent id (the loader rejects one), so any spawn it reaches at runtime is+/// one the host dispatched for it. Re-denying it here would turn valid custom/// worker agents that use `{ skills = "*" }` into runtime failures. The/// worker-leaf authoring rule stays enforced statically at boot, and the/// per-parent allowlist gate blocks any other worker spawn.diff --git a/crates/openhuman-core/src/agent/subagent_host/ops_tests_tier_gate_tests.rs b/crates/openhuman-core/src/agent/subagent_host/ops_tests_tier_gate_tests.rsindex 0cf2602b67..a024fe8af5 100644--- a/crates/openhuman-core/src/agent/subagent_host/ops_tests_tier_gate_tests.rs+++ b/crates/openhuman-core/src/agent/subagent_host/ops_tests_tier_gate_tests.rs@@ -67,13 +67,14 @@ fn tier_gate_allows_legal_descending_hops() {}#[test]-fn tier_gate_allows_worker_parent_for_collapsed_integration() {+fn tier_gate_allows_worker_parent() {use crate::agent::harness::definition::AgentTier;- // A worker only reaches the runtime spawn chokepoint via the documented- // collapsed `delegate_to_integrations_agent` path (→ `integrations_agent`,- // itself a worker). The gate must NOT re-deny that — the worker-leaf rule- // is a static boot-time authoring constraint, not a runtime one. Regression- // for the wildcard-integration case (CodeRabbit P2 on PR #4102).+ // A worker's `subagents` list holds no agent id (the loader rejects+ // one), so any spawn it reaches at runtime is one the host dispatched for+ // it. The gate must NOT re-deny that — the worker-leaf rule is a static+ // boot-time authoring constraint, not a runtime one; the per-parent+ // allowlist gate blocks any other worker spawn. Regression for the+ // wildcard-integration case (CodeRabbit P2 on PR #4102).let mut parent = make_def_named_tools(&[]);let child = make_def_named_tools(&[]); // worker by defaultparent.agent_tier = AgentTier::Worker;diff --git a/crates/openhuman-core/src/channels/runtime/dispatch/mod_scoping_tests_tests.rs b/crates/openhuman-core/src/channels/runtime/dispatch/mod_scoping_tests_tests.rsindex 0c4c2ebe38..e95ae435ef 100644--- a/crates/openhuman-core/src/channels/runtime/dispatch/mod_scoping_tests_tests.rs+++ b/crates/openhuman-core/src/channels/runtime/dispatch/mod_scoping_tests_tests.rs@@ -110,7 +110,7 @@ fn named_scope_without_extras_returns_named_only() {/// `ToolScope::Named` with extras returns the union of the TOML/// named list and the extras' names. This is the orchestrator's/// path: direct tools from the TOML + the synthesised delegation-/// tools (`research`, `plan`, `delegate_to_integrations_agent`)+/// tools (`research`, `plan`) and deferred integration actions/// → all of them visible to the orchestrator's LLM. The stub/// names in this test are arbitrary; they exercise the union/// logic, not the real synthesiser.