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
refactor(session_host): use tinyagents_runtime dedup helper
Steven Enamakel9bb9ba4a240a
diff --git a/crates/openhuman-core/src/agent/session_host/builder/builder_tests.rs b/crates/openhuman-core/src/agent/session_host/builder/builder_tests.rsindex f860502917..06c08b0b24 100644--- a/crates/openhuman-core/src/agent/session_host/builder/builder_tests.rs+++ b/crates/openhuman-core/src/agent/session_host/builder/builder_tests.rs@@ -1,6 +1,7 @@//! Tests for the builder module — dedup_visible_tool_specs and related logic.-use super::{dedup_visible_tool_specs, visible_tool_specs_for_policy};+use super::visible_tool_specs_for_policy;+use tinyagents_runtime::dedup_visible_tool_specs;use serde_json::json;use tinytools::ToolSpec;diff --git a/crates/openhuman-core/src/agent/session_host/builder/host_tools.rs b/crates/openhuman-core/src/agent/session_host/builder/host_tools.rsindex b508ee7a39..9ade1194f5 100644--- a/crates/openhuman-core/src/agent/session_host/builder/host_tools.rs+++ b/crates/openhuman-core/src/agent/session_host/builder/host_tools.rs@@ -93,7 +93,7 @@ impl HostTurnTools {/// specifically, and a host that cannot override a tool it collides with/// has no way to correct one.///- /// First and not last because [`dedup_visible_tool_specs`] keeps the first+ /// First and not last because TinyAgents' `dedup_visible_tool_specs` keeps the first/// occurrence. Appending would advertise the config-derived spec while the/// host believed it had replaced it -- the model told about one tool and a/// different one answering, which is the version of this bug that is@@ -102,7 +102,8 @@ impl HostTurnTools {/// Returns `None` for an empty belt, which is also a host that supplied no/// gate: there is nothing to admit.///- /// [`dedup_visible_tool_specs`]: super::dedup_visible_tool_specs+ /// Tool schema deduplication is owned by+ /// `tinyagents_runtime::dedup_visible_tool_specs`.pub(super) fn merge_into(self,agent_id: &str,diff --git a/crates/openhuman-core/src/agent/session_host/mod.rs b/crates/openhuman-core/src/agent/session_host/mod.rsindex fe1cacb323..6f86407feb 100644--- a/crates/openhuman-core/src/agent/session_host/mod.rs+++ b/crates/openhuman-core/src/agent/session_host/mod.rs@@ -57,7 +57,6 @@ pub use types::{OpenHumanSessionHost, SessionHostBuilder, TurnOverrides};// Re-export the duplicate-tool-spec guard for sibling harness modules// (`session::runtime`, `subagent_host`) so all provider call sites// share one tested implementation.-pub(crate) use builder::dedup_visible_tool_specs;#[cfg(test)]mod orphaned_head_resume_tests;diff --git a/crates/openhuman-core/src/agent/session_host/runtime/accessors/tool_visibility.rs b/crates/openhuman-core/src/agent/session_host/runtime/accessors/tool_visibility.rsindex a855fce4f2..56bdd1d111 100644--- a/crates/openhuman-core/src/agent/session_host/runtime/accessors/tool_visibility.rs+++ b/crates/openhuman-core/src/agent/session_host/runtime/accessors/tool_visibility.rs@@ -132,7 +132,7 @@ impl OpenHumanSessionHost {&self.visible_tool_names,&self.tool_policy_session,);- self.visible_tool_specs = Arc::new(super::super::super::builder::dedup_visible_tool_specs(+ self.visible_tool_specs = Arc::new(tinyagents_runtime::dedup_visible_tool_specs(visible_specs,));}diff --git a/crates/openhuman-core/src/agent/session_host/runtime_session_tool_surface.rs b/crates/openhuman-core/src/agent/session_host/runtime_session_tool_surface.rsindex 1422dd4293..7bf753e96c 100644--- a/crates/openhuman-core/src/agent/session_host/runtime_session_tool_surface.rs+++ b/crates/openhuman-core/src/agent/session_host/runtime_session_tool_surface.rs@@ -273,7 +273,7 @@ impl OpenHumanTurnPrelude {&surface.agent_definition_name,&all_tools,);- let visible = super::super::builder::dedup_visible_tool_specs(+ let visible = tinyagents_runtime::dedup_visible_tool_specs(super::super::builder::visible_tool_specs_for_policy(&specs,&surface.visible_tool_names,