Skip to content

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

fix(tools): stop forwarding Hidden exposure in shared tool adapter

Steven Enamakel6bde0144dfc1
diff --git a/crates/openhuman-core/src/agent/tinyagents/tools.rs b/crates/openhuman-core/src/agent/tinyagents/tools.rs
index 8a146eda02..ace45b55bb 100644
--- a/crates/openhuman-core/src/agent/tinyagents/tools.rs
+++ b/crates/openhuman-core/src/agent/tinyagents/tools.rs
@@ -129,13 +129,24 @@ impl Tool for CanonicalSharedToolAdapter {
self.resolved_tool().map(Tool::policy).unwrap_or_default()
}
- /// Forwarded so the harness advertises only `Direct` registrations and
- /// indexes `Deferred` ones for its `tool_search` bridge. Without this
- /// every registered tool reported `Direct` and the bridge stayed inert.
+ /// Forwarded so the harness indexes `Deferred` registrations for its
+ /// `tool_search` bridge instead of advertising them. Without this every
+ /// registered tool reported `Direct` and the bridge stayed inert.
+ ///
+ /// `Hidden` is **not** forwarded. The host is the exposure policy owner:
+ /// the session builder already drops every `Hidden` registration from a
+ /// wildcard belt, so a `Hidden` tool that reaches harness registration was
+ /// named by hand in a `[tools] named` belt (`memory_recall` on the
+ /// orchestrator, the `memory_*` readers on `flow_memory_agent`) or is a
+ /// synthesised specialist route the belt admitted. Forwarding `Hidden`
+ /// made the harness advertise 14 of the orchestrator's 25 visible tools
+ /// while the prompt described all 25 (#6370): every `research` / `plan` /
+ /// `memory_*` call the model was told about was unreachable.
fn exposure(&self) -> tinytools::ToolExposure {
- self.resolved_tool()
- .map(Tool::exposure)
- .unwrap_or_default()
+ match self.resolved_tool().map(Tool::exposure) {
+ Some(tinytools::ToolExposure::Deferred) => tinytools::ToolExposure::Deferred,
+ _ => tinytools::ToolExposure::Direct,
+ }
}
fn family(&self) -> Option<&str> {