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
chore: files changed src/openhuman/tools/orchestrator_tools.rs,src/openhuman/tools/toolpacks/mod.rs,
Steven Enamakel791a111dbfd2
diff --git a/src/openhuman/tools/orchestrator_tools.rs b/src/openhuman/tools/orchestrator_tools.rsindex 1b251a94ce..dc7b83a55c 100644--- a/src/openhuman/tools/orchestrator_tools.rs+++ b/src/openhuman/tools/orchestrator_tools.rs@@ -140,11 +140,26 @@ pub fn collect_orchestrator_tools(// but it reports `ToolExposure::Hidden` and so never reaches// the wire; the collapsed `delegate` tool built below is what// the model actually sees.- delegate_targets.push(DelegateTarget {- tool_name: tool_name.clone(),- agent_id: target.id.clone(),- description: target.when_to_use.clone(),- });+ // …unless the pack table withholds this route from this+ // parent. The `agent` enum is an advertised surface, so a+ // packed delegate that merely stopped being its own tool would+ // reappear here as a string and undo the withholding — see+ // `toolpacks::is_withheld_from`. A withheld route is still+ // reachable exactly as before: `load_skill` then `use_skill`.+ if crate::openhuman::tools::toolpacks::is_withheld_from(&definition.id, &tool_name)+ {+ log::debug!(+ "[orchestrator_tools] delegate route '{}' is packed for '{}' — omitted from the collapsed tool",+ tool_name,+ definition.id+ );+ } else {+ delegate_targets.push(DelegateTarget {+ tool_name: tool_name.clone(),+ agent_id: target.id.clone(),+ description: target.when_to_use.clone(),+ });+ }tools.push(Box::new(ArchetypeDelegationTool {tool_name,agent_id: target.id.clone(),diff --git a/src/openhuman/tools/toolpacks/mod.rs b/src/openhuman/tools/toolpacks/mod.rsindex 859fb36ec2..892b031bef 100644--- a/src/openhuman/tools/toolpacks/mod.rs+++ b/src/openhuman/tools/toolpacks/mod.rs@@ -28,7 +28,7 @@ pub mod tools;pub mod types;pub use groups::{GroupMode, ToolGroups, GROUP_COUNT};-pub use ops::{append_pack_tools, bind_pack_registry, strip_packed_from_visible};+pub use ops::{append_pack_tools, bind_pack_registry, is_withheld_from, strip_packed_from_visible};pub use registry::{all_packed_tool_names, pack, pack_for_tool, PACKS};pub use tools::{PackRegistryHandle, LOAD_SKILL, USE_SKILL};pub use types::ToolPack;diff --git a/src/openhuman/tools/toolpacks/ops.rs b/src/openhuman/tools/toolpacks/ops.rsindex 4c323e562e..3cdfaca6ab 100644--- a/src/openhuman/tools/toolpacks/ops.rs+++ b/src/openhuman/tools/toolpacks/ops.rs@@ -84,3 +84,25 @@ pub fn strip_packed_from_visible(visible: &mut HashSet<String>, agent_id: &str)"[toolpacks] withheld packed tool schemas; load_skill/use_skill advertised instead");}++/// Is `tool` withheld from `agent_id` by the pack table right now?+///+/// The predicate behind [`strip_packed_from_visible`], exposed for callers that+/// build a *listing* of tools rather than a visible set — today the collapsed+/// `delegate_to` tool, whose `agent` enum is an advertised surface that no+/// `visible` subtraction can reach.+///+/// That distinction is load-bearing. Collapsing the archetype delegates without+/// it silently re-advertised seven routes the pack table deliberately withholds+/// (`do_crypto`, `setup_mcp_server`, `use_mcp_server`, `setup_skills`,+/// `run_skill`, `build_workflow`, `discover_workflows`): each one stopped being+/// a tool — so `strip_packed_from_visible` had nothing to remove — and became a+/// string inside another tool's schema instead. A collapse must never widen+/// what the pack posture narrowed.+pub fn is_withheld_from(agent_id: &str, tool: &str) -> bool {+ let groups = super::groups::current();+ groups.mode_for_tool(tool) == super::groups::GroupMode::Withheld+ && registry::packed_tool_names_for_agent(agent_id)+ .into_iter()+ .any(|name| name == tool)+}