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(embed): source tool ranker types from tinytools directly
Steven Enamakel95ca6d2e6cd8
diff --git a/crates/openhuman-core/src/agent/tinyagents/discovery/mod.rs b/crates/openhuman-core/src/agent/tinyagents/discovery/mod.rsindex 3d3f8d08c5..808964dee8 100644--- a/crates/openhuman-core/src/agent/tinyagents/discovery/mod.rs+++ b/crates/openhuman-core/src/agent/tinyagents/discovery/mod.rs@@ -16,9 +16,7 @@use std::sync::{Arc, OnceLock, RwLock};use tinyagents_harness::tool::discover::{DiscoveryRankMode, ToolDiscoveryPolicy};-// Re-exported so an embedder can implement the ranker it hands to-// [`install_tool_ranker`] without taking `tinytools` as a second path.-pub use tinytools::{RankCandidate, RankContext, RankError, RankHit, ToolRanker};+use tinytools::ToolRanker;use crate::config::schema::ToolSearchConfig;diff --git a/crates/openhuman-embed/Cargo.toml b/crates/openhuman-embed/Cargo.tomlindex 5227dc8ced..7606187cac 100644--- a/crates/openhuman-embed/Cargo.toml+++ b/crates/openhuman-embed/Cargo.toml@@ -56,6 +56,9 @@ tinyagents-session = { path = "../../vendor/tinyagents/crates/tinyagents-session# core's so one copy resolves.tinyinference-llm = { path = "../../vendor/tinyagents/vendor/tinyinference/crates/tinyinference-llm" }tinyinference-embeddings = { path = "../../vendor/tinyagents/vendor/tinyinference/crates/tinyinference-embeddings" }+# `RuntimeBuilder::tool_ranker` takes `tinytools::ToolRanker`; same vendored+# path as the core's so the trait unifies.+tinytools = { path = "../../vendor/tinyagents/vendor/tinytools/crates/tinytools" }tokio = { version = "1", features = ["macros", "rt-multi-thread", "sync", "time"] }url = "2"uuid = { version = "1", features = ["v4"] }diff --git a/crates/openhuman-embed/src/lib.rs b/crates/openhuman-embed/src/lib.rsindex 6e3d31893d..ea1f8ed4d1 100644--- a/crates/openhuman-embed/src/lib.rs+++ b/crates/openhuman-embed/src/lib.rs@@ -137,14 +137,14 @@ pub use harness::{HttpHeader, McpAuthConfig, McpServer};pub use runtime::{run_from_args, ApiKey, ConfigSource, Runtime, RuntimeBuilder, RuntimeError};/// The types the [`RuntimeBuilder`] seam options take: controller-/// extensions, the `tool_search` ranker, embedder hooks, the CLI server-/// launcher and the live security policy.+/// extensions, embedder hooks, the CLI server launcher and the live security+/// policy. A `tool_search` ranker implements `tinytools::ToolRanker`; take+/// `tinytools` from the vendored path (`vendor/tinyagents/vendor/tinytools`)+/// so the trait unifies — re-exporting it here would break the+/// agent-runtime ownership boundary.pub mod seams {pub use openhuman_core::agent::hooks::{PostTurnHook, ToolHook};pub use openhuman_core::agent::hooks::{ToolHookContext, ToolHookDecision, TurnContext};- pub use openhuman_core::agent::tinyagents::discovery::{- RankCandidate, RankContext, RankError, RankHit, ToolRanker,- };pub use openhuman_core::core::all::{ControllerExtension, DomainGroup};pub use openhuman_core::core::server_launcher::{ServeRequest, ServerLauncher};pub use openhuman_core::security::SecurityPolicy;diff --git a/crates/openhuman-embed/src/runtime/seams.rs b/crates/openhuman-embed/src/runtime/seams.rsindex 6e2d8d1f1e..82c50bc1e7 100644--- a/crates/openhuman-embed/src/runtime/seams.rs+++ b/crates/openhuman-embed/src/runtime/seams.rs@@ -26,8 +26,9 @@ use openhuman_core::agent::hooks::{replace_embedder_tool_hook, PostTurnHook, ToolHook,};use openhuman_core::agent::tinyagents::discovery::{- clear_tool_ranker, install_tool_ranker, installed_tool_ranker, ToolRanker,+ clear_tool_ranker, install_tool_ranker, installed_tool_ranker,};+use tinytools::ToolRanker;use openhuman_core::core::all::{register_controller_extension, ControllerExtension};use openhuman_core::core::server_launcher::{install_server_launcher, ServerLauncher};use openhuman_core::security::SecurityPolicy;diff --git a/crates/openhuman-embed/src/runtime/seams_tests.rs b/crates/openhuman-embed/src/runtime/seams_tests.rsindex 85a205e969..19a5b43bde 100644--- a/crates/openhuman-embed/src/runtime/seams_tests.rs+++ b/crates/openhuman-embed/src/runtime/seams_tests.rs@@ -3,9 +3,7 @@use super::*;use openhuman_core::agent::hooks::{ToolHookContext, TurnContext};-use openhuman_core::agent::tinyagents::discovery::{- RankCandidate, RankContext, RankError, RankHit,-};+use tinytools::{RankCandidate, RankContext, RankError, RankHit, ToolRanker};static RANKER_LOCK: std::sync::Mutex<()> = std::sync::Mutex::new(());