Skip to content

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

feat(install): add option to install Jev tool_search ranker

Steven Enamakela7762522b835
diff --git a/Cargo.lock b/Cargo.lock
index aabb016144..c6e526563a 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -4238,6 +4238,8 @@ dependencies = [
"tempfile",
"thiserror 2.0.20",
"tinyhumans-sdk",
+ "tinytools 0.3.0",
+ "tinytools-jev",
"tokio",
"url",
"urlencoding",
@@ -6844,6 +6846,19 @@ dependencies = [
"uuid",
]
+[[package]]
+name = "tinyjevclient"
+version = "0.2.1"
+source = "git+https://github.com/tinyhumansai/tinyjevclient?rev=e53d5f088ff03fa38c53bac219dab7697b5016c9#e53d5f088ff03fa38c53bac219dab7697b5016c9"
+dependencies = [
+ "httpdate",
+ "reqwest",
+ "serde",
+ "serde_json",
+ "thiserror 2.0.20",
+ "tokio",
+]
+
[[package]]
name = "tinyjuice-bus"
version = "0.2.5"
@@ -7021,6 +7036,17 @@ dependencies = [
"tinytools 0.3.0 (git+https://github.com/tinyhumansai/tinytools?rev=a5d04a7f3af0abc1dd748f87f94871b36ae9fe71)",
]
+[[package]]
+name = "tinytools-jev"
+version = "0.3.0"
+dependencies = [
+ "async-trait",
+ "serde_json",
+ "tinyjevclient",
+ "tinytools 0.3.0",
+ "tokio",
+]
+
[[package]]
name = "tinyvec"
version = "1.13.3"
diff --git a/crates/openhuman-tinyhumans/src/install.rs b/crates/openhuman-tinyhumans/src/install.rs
index c796f78819..e40919a753 100644
--- a/crates/openhuman-tinyhumans/src/install.rs
+++ b/crates/openhuman-tinyhumans/src/install.rs
@@ -29,6 +29,11 @@ pub struct InstallOptions {
/// gate hides them — or turn it off to keep them out of the registry
/// entirely.
pub hosted_controllers: bool,
+ /// Install the Jev-backed `tool_search` ranker (`crate::jev`) as the
+ /// core's process-wide ranker. Default `true`; only meaningful with the
+ /// `jev` feature, and only used when `agent.tool_search.ranker` lets it.
+ /// Without it the harness ranks `tool_search` with BM25 alone.
+ pub tool_ranker: bool,
}
impl Default for InstallOptions {
@@ -36,6 +41,7 @@ impl Default for InstallOptions {
Self {
product_identity: None,
hosted_controllers: true,
+ tool_ranker: true,
}
}
}
@@ -52,6 +58,12 @@ impl InstallOptions {
self.hosted_controllers = enabled;
self
}
+
+ /// Whether to install the Jev `tool_search` ranker (default `true`).
+ pub fn tool_ranker(mut self, enabled: bool) -> Self {
+ self.tool_ranker = enabled;
+ self
+ }
}
/// Why [`install`] could not set the process up.
@@ -94,6 +106,13 @@ pub fn install(options: InstallOptions) -> Result<Arc<SdkBackendTransport>, Inst
.map_err(InstallError::Registry)?;
}
+ #[cfg(feature = "jev")]
+ if options.tool_ranker {
+ // Idempotent in the core: the slot is replaced in place. The ranker
+ // resolves the credential per search, so nothing here needs a login.
+ crate::jev::install_jev_ranker();
+ }
+
if let Some(existing) = guard.as_ref() {
// Re-install into the core slot in case something cleared it (tests).
if installed_backend_transport().is_none() {
diff --git a/crates/openhuman-tinyhumans/src/lib.rs b/crates/openhuman-tinyhumans/src/lib.rs
index 47928555fd..231a93cdc5 100644
--- a/crates/openhuman-tinyhumans/src/lib.rs
+++ b/crates/openhuman-tinyhumans/src/lib.rs
@@ -37,6 +37,8 @@
pub use openhuman_embed as embed;
pub mod hosted;
+#[cfg(feature = "jev")]
+pub mod jev;
mod install;
pub mod jwt;
mod runtime;