Skip to content

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

feat(sources): add media source integration

Steven Enamakel6cb7edc038de
diff --git a/crates/openhuman-core/src/tools/sources.rs b/crates/openhuman-core/src/tools/sources.rs
index 91124979a1..7d175cac7d 100644
--- a/crates/openhuman-core/src/tools/sources.rs
+++ b/crates/openhuman-core/src/tools/sources.rs
@@ -84,11 +84,8 @@ where
}
/// Registers a tool source for the whole process at `placement`.
-pub fn register_tool_source_at<F>(
- id: impl Into<String>,
- placement: ToolSourcePlacement,
- factory: F,
-) where
+pub fn register_tool_source_at<F>(id: impl Into<String>, placement: ToolSourcePlacement, factory: F)
+where
F: for<'a> Fn(&ToolSourceCtx<'a>) -> Vec<Box<dyn Tool>> + Send + Sync + 'static,
{
TOOL_SOURCES.register(
diff --git a/crates/openhuman-tinyhumans/src/integrations/media/mod.rs b/crates/openhuman-tinyhumans/src/integrations/media/mod.rs
index c13237fddd..f7baad8005 100644
--- a/crates/openhuman-tinyhumans/src/integrations/media/mod.rs
+++ b/crates/openhuman-tinyhumans/src/integrations/media/mod.rs
@@ -28,15 +28,16 @@ pub(crate) fn register() {
TOOL_SOURCE_ID,
ToolSourcePlacement::After(ANCHOR_AFTER_SEARCH),
|ctx| {
- let Some(generators) = managed_generators(ctx.root_config) else {
- log::debug!("[tinyhumans] media: no managed generators; media tools skipped");
- return Vec::new();
- };
- media_tools_for_config(
- generators,
- ctx.root_config,
- ctx.action_dir,
- Arc::clone(&ctx.security.media_artifact_paths),
- )
- });
+ let Some(generators) = managed_generators(ctx.root_config) else {
+ log::debug!("[tinyhumans] media: no managed generators; media tools skipped");
+ return Vec::new();
+ };
+ media_tools_for_config(
+ generators,
+ ctx.root_config,
+ ctx.action_dir,
+ Arc::clone(&ctx.security.media_artifact_paths),
+ )
+ },
+ );
}