Skip to content

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

refactor(tools): remove unused tool modules and re-exports

Steven Enamakel0b19577006c3
diff --git a/crates/openhuman-core/src/tools/impl/README.md b/crates/openhuman-core/src/tools/impl/README.md
index 3d1e61fc51..aee3e3faac 100644
--- a/crates/openhuman-core/src/tools/impl/README.md
+++ b/crates/openhuman-core/src/tools/impl/README.md
@@ -3,7 +3,6 @@
Built-in implementations of the cross-cutting tool families that `tools/ops.rs`
assembles into the agent registry. Ownership rule from `AGENTS.md`: only
cross-cutting capabilities (filesystem, browser, generic process/system, generic
-network, document/presentation generation, tool-surface meta helpers) live
here. Domain-owned tools (memory, cron, wallet, composio, integrations, voice,
agent sub-dispatch, ...) live in their own domain's `tools.rs` and are only
re-exported through `tools/mod.rs`. Do not add a family under `impl/` for a
@@ -13,8 +12,6 @@ domain capability.
implementations` (`impl` is a keyword) and glob re-exports it, so tool structs
are imported as `crate::tools::*`. `impl/mod.rs` gates [`document/`](./document/) and
[`presentation/`](./presentation/) behind the `documents` Cargo feature; the other five families
-compile unconditionally. [`meta/`](./meta/) is declared but not glob re-exported, so its
-items are reached as `crate::tools::implementations::meta::...`.
See [`../README.md`](../README.md) for the registry, policy, and RPC layer this
feeds, and [`../../security/README.md`](../../security/README.md) for the
@@ -35,14 +32,12 @@ tested but no production assembly site constructs it today.
| [`network/`](./network/) | `HttpRequestTool`, `WebFetchTool`, `CurlTool`, `GitbooksSearchTool`, `GitbooksGetPageTool`, `GmailUnsubscribeTool`, and under the `mcp` Cargo feature `McpListServersTool`, `McpListToolsTool`, `McpCallTool`; `url_guard.rs` is the shared SSRF/allowlist validator, not a tool | `http_request`, `web_fetch`, `curl`, `gmail_unsubscribe` always registered; `gitbooks_*` need `gitbooks.enabled` and, when the active profile sets an `mcp_allowlist`, an entry named `gitbooks`; `mcp_list_servers`/`mcp_list_tools`/`mcp_call_tool` register only when the static `[[mcp_client.servers]]` registry (after the profile allowlist) is non-empty |
| [`document/`](./document/) (feature `documents`) | `DocumentTool` (`generate_document`) | always registered when compiled. Builds `.docx` bytes via the pure-Rust `engine` module (`docx-rs`, no subprocess) inside `spawn_blocking` + `tokio::time::timeout`; allocates the artifact with `agent::artifacts::create_artifact` (kind `Document`), persists `args.json` next to it for the failed-card Retry path, then `finalize_artifact` or `fail_artifact` |
| [`presentation/`](./presentation/) (feature `documents`) | `PresentationTool` (`generate_presentation`) | always registered when compiled. Same shape as `document/` with `ppt-rs` producing `.pptx` and kind `Presentation` |
-| [`meta/`](./meta/) | `deferred` (`strip_deferred_from_visible`, `deferred_tool_names`, the `TOOL_SEARCH_NAME` belt opt-in constant); `collapse` helpers (`resolve`, `merge_action_schemas`, `args_without_action`, `strictest_permission`, `any_external_effect`, `unknown_action_message`, `CollapsedAction`) | not registered: `deferred` is the host's half of `ToolExposure::Deferred`: the session builder (`agent/session_host/builder/builder_build.rs`) uses it to split a belt into the advertised set and the still-registered deferred set, and the tinyagents harness advertises its intrinsic `tool_search` / `tool_call` bridge over the latter (ranked per `agent/tinyagents/discovery`). The `collapse` helpers are used by `cron/tools/collapsed.rs` and `memory/tools/collapsed.rs` to merge a multi-action tool's per-action schemas and permissions into one entry |
## Notes
- `document/` and `presentation/` are kept structurally parallel (validate
input, allocate artifact, generate bytes off the async runtime, finalize or
fail the artifact) so further artifact-producing tools follow the same shape.
-- `meta/` sits outside [`system/`](./system/) because it is the model introspecting its own
tool surface, not a host capability.
- [`system/mod.rs`](./system/mod.rs) (`security_for_tool_context`) and [`filesystem/gate.rs`](./filesystem/gate.rs)
(`security_scoped_to_root`, behind `FsGate::scoped_to_workspace`) each grant the run's TinyAgents workspace
diff --git a/crates/openhuman-core/src/tools/impl/mod.rs b/crates/openhuman-core/src/tools/impl/mod.rs
index e5db89f4a5..5eea8196d3 100644
--- a/crates/openhuman-core/src/tools/impl/mod.rs
+++ b/crates/openhuman-core/src/tools/impl/mod.rs
@@ -2,7 +2,6 @@ pub mod browser;
#[cfg(feature = "documents")]
pub mod document;
mod filesystem;
-pub mod meta;
pub mod network;
#[cfg(feature = "documents")]
pub mod presentation;
diff --git a/crates/openhuman-core/src/tools/mod.rs b/crates/openhuman-core/src/tools/mod.rs
index 91ddc52b50..94cf92bdca 100644
--- a/crates/openhuman-core/src/tools/mod.rs
+++ b/crates/openhuman-core/src/tools/mod.rs
@@ -1,4 +1,3 @@
-pub mod agent_policy;
pub mod host_extensions;
pub(crate) mod native_ops;
mod native_ops_types;
diff --git a/crates/openhuman-core/src/tools/registry/mod.rs b/crates/openhuman-core/src/tools/registry/mod.rs
index 3d94c15195..472c488d20 100644
--- a/crates/openhuman-core/src/tools/registry/mod.rs
+++ b/crates/openhuman-core/src/tools/registry/mod.rs
@@ -1,10 +1,8 @@
//! Unified read-only tool registry for discovery across OpenHuman tool surfaces.
-pub mod denials;
pub mod ops;
mod providers;
mod schemas;
-mod types;
pub use ops::{get_tool, list_tools, registry_entries, registry_entries_for_config};
pub use providers::{
@@ -17,7 +15,7 @@ pub use schemas::{
all_controller_schemas as all_tool_registry_controller_schemas,
all_registered_controllers as all_tool_registry_registered_controllers,
};
-pub use types::{
+pub use tinytools::{
CapabilityProviderDiagnostics, McpAllowlistDiagnostics, McpServerAllowlistSummary,
McpWriteAuditHealth, RecentPolicyDenial, ToolPolicyDiagnostics, ToolPolicyPosture,
ToolRegistryEntry, ToolRegistryHealth, ToolRegistryList, ToolRegistryTransport,