Skip to content

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

refactor(embed): simplify ranker seam types

Steven Enamakelc62208178afb
diff --git a/crates/openhuman-embed/src/process_sentry.rs b/crates/openhuman-embed/src/process_sentry.rs
index 80702f4959..76a7187da8 100644
--- a/crates/openhuman-embed/src/process_sentry.rs
+++ b/crates/openhuman-embed/src/process_sentry.rs
@@ -61,7 +61,7 @@ pub fn release_tag(version: &str, build_sha: Option<&str>) -> String {
/// The first non-blank value among `candidates` (runtime env values first,
/// then compile-time ones, as the hosts resolve their DSN).
-pub fn first_non_blank<'a>(candidates: impl IntoIterator<Item = Option<String>>) -> Option<String> {
+pub fn first_non_blank(candidates: impl IntoIterator<Item = Option<String>>) -> Option<String> {
candidates
.into_iter()
.flatten()
diff --git a/crates/openhuman-embed/src/runtime/seams.rs b/crates/openhuman-embed/src/runtime/seams.rs
index beb4a361b4..6e2d8d1f1e 100644
--- a/crates/openhuman-embed/src/runtime/seams.rs
+++ b/crates/openhuman-embed/src/runtime/seams.rs
@@ -123,11 +123,13 @@ impl HostSeams {
}
}
+/// A ranker we installed, and what held the slot before it.
+type InstalledRanker = (Arc<dyn ToolRanker>, Option<Arc<dyn ToolRanker>>);
+
/// Seams a runtime installed. Dropping it restores the restorable ones; see
/// the module docs.
pub(crate) struct InstalledSeams {
- /// Ours, and what held the slot before.
- ranker: Option<(Arc<dyn ToolRanker>, Option<Arc<dyn ToolRanker>>)>,
+ ranker: Option<InstalledRanker>,
/// Our hook names, and the same-named hook each one replaced.
post_turn_hooks: Vec<(String, Option<Arc<dyn PostTurnHook>>)>,
tool_hooks: Vec<(String, Option<Arc<dyn ToolHook>>)>,