Skip to content

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

feat(tools): export the DNS-checking URL guard

oxoxDev1b7fae5b85bc
diff --git a/src/openhuman/tools/impl/network/mod.rs b/src/openhuman/tools/impl/network/mod.rs
index a7f4b030b8..bce75ffac6 100644
--- a/src/openhuman/tools/impl/network/mod.rs
+++ b/src/openhuman/tools/impl/network/mod.rs
@@ -25,6 +25,9 @@ pub use mcp_setup::{
McpSetupGetTool, McpSetupInstallAndConnectTool, McpSetupRequestSecretTool, McpSetupSearchTool,
McpSetupTestConnectionTool,
};
+/// The SSRF guard the network tools apply, so a host outside this crate can
+/// hold user-supplied URLs to the same rule rather than writing a second one.
+pub use url_guard::validate_url_with_dns_check;
pub use web_fetch::WebFetchTool;
/// Shared test helper for the network tools' local-only enforcement tests
diff --git a/src/openhuman/tools/impl/network/url_guard.rs b/src/openhuman/tools/impl/network/url_guard.rs
index 3576473c34..7198893843 100644
--- a/src/openhuman/tools/impl/network/url_guard.rs
+++ b/src/openhuman/tools/impl/network/url_guard.rs
@@ -97,7 +97,7 @@ pub(super) fn validate_url(raw_url: &str, allowed_domains: &[String]) -> anyhow:
///
/// Callers should use this function instead of `validate_url` in all
/// paths that make outbound HTTP requests.
-pub(super) async fn validate_url_with_dns_check(
+pub async fn validate_url_with_dns_check(
raw_url: &str,
allowed_domains: &[String],
) -> anyhow::Result<String> {