Skip to content

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

chore(clippy): name the tool dispatch selector type

oxoxDev1badec256a14
diff --git a/crates/openhuman-core/src/agent/tinyagents/tool_registration.rs b/crates/openhuman-core/src/agent/tinyagents/tool_registration.rs
index c1f923ca39..4def8d84fb 100644
--- a/crates/openhuman-core/src/agent/tinyagents/tool_registration.rs
+++ b/crates/openhuman-core/src/agent/tinyagents/tool_registration.rs
@@ -133,17 +133,17 @@ pub(crate) fn shared_tool_adapter(
)
}
+type DispatchSelector = Arc<
+ dyn Fn(&str, Arc<dyn tinytools::Tool>) -> Option<Arc<dyn ToolDispatch<(), OpenHumanRunContext>>>
+ + Send
+ + Sync,
+>;
+
/// Chooses the typed dispatch for a registered tool: `use_skill` gets its own
/// (it is the proxy every packed archetype delegation is reached through and
/// must resolve the SAME live parent a natively advertised delegate tool does,
/// regression R3), everything else goes through [`typed_dispatch_for`].
-fn dispatch_selector(
- tool_sets: Vec<SharedToolSet>,
-) -> Arc<
- dyn Fn(&str, Arc<dyn tinytools::Tool>) -> Option<Arc<dyn ToolDispatch<(), OpenHumanRunContext>>>
- + Send
- + Sync,
-> {
+fn dispatch_selector(tool_sets: Vec<SharedToolSet>) -> DispatchSelector {
Arc::new(move |name, adapter| {
if name != USE_SKILL {
return typed_dispatch_for(name, adapter);