Skip to content

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

refactor(core): simplify tool registration and host extension access

Steven Enamakelcad3f6c77805
diff --git a/crates/openhuman-core/src/agent/registration.rs b/crates/openhuman-core/src/agent/registration.rs
index 3dd3cc5ead..664bd8dd7f 100644
--- a/crates/openhuman-core/src/agent/registration.rs
+++ b/crates/openhuman-core/src/agent/registration.rs
@@ -39,8 +39,6 @@ pub(crate) fn dialogue_tools(action_dir: &Path, root_config: &Config) -> Vec<Box
// durable `subagent_session_id` (preferred) or transient `task_id`.
Box::new(ListSubagentsTool::new()),
Box::new(SteerSubagentTool::new()),
- Box::new(harness_tools::WaitTool::new()),
- Box::new(harness_tools::WaitLoopTool::new()),
Box::new(WaitSubagentTool::new()),
Box::new(CloseSubagentTool::new()),
Box::new(ContinueSubagentTool::new()),
diff --git a/crates/openhuman-core/src/tools/host_extensions.rs b/crates/openhuman-core/src/tools/host_extensions.rs
index 808bb93c22..22933fde54 100644
--- a/crates/openhuman-core/src/tools/host_extensions.rs
+++ b/crates/openhuman-core/src/tools/host_extensions.rs
@@ -5,7 +5,7 @@
//! host implementation details, not portable tool-trait APIs.
use crate::agent::orchestration::tools::DelegationTarget;
-use tinyagents_harness_tools::skills::{PackRegistryHandle, PackToolExtension};
+use tinyagents_harness_tools::skills::PackRegistryHandle;
#[cfg(test)]
use tinytools::{PermissionLevel, ToolCategory, ToolResult, ToolScope};
use tinytools::{Tool, ToolRunContext};
@@ -13,12 +13,7 @@ use tinytools::{Tool, ToolRunContext};
/// Reads a tool's pack-registry handle from its erased host extension.
pub fn pack_registry_handle(tool: &dyn Tool) -> Option<&PackRegistryHandle> {
tool.host_extension()
- .and_then(|any| any.downcast_ref::<PackToolExtension>())
- .map(PackToolExtension::registry_handle)
- .or_else(|| {
- tool.host_extension()
- .and_then(|any| any.downcast_ref::<PackRegistryHandle>())
- })
+ .and_then(|any| any.downcast_ref::<PackRegistryHandle>())
}
/// Reads the target agent a synthesized `delegate_*` tool routes to.