The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
refactor(util): use tinytools_std sanitize directly
Steven Enamakelafc36dbb77ec
diff --git a/crates/openhuman-core/src/agent/registry/agents/orchestrator/prompt.rs b/crates/openhuman-core/src/agent/registry/agents/orchestrator/prompt.rsindex 56713425bf..f2bd83edd6 100644--- a/crates/openhuman-core/src/agent/registry/agents/orchestrator/prompt.rs+++ b/crates/openhuman-core/src/agent/registry/agents/orchestrator/prompt.rs@@ -420,7 +420,7 @@ fn render_installed_skills(// chars / instruction fences) and cap so a single installed// skill can't bloat the prompt or smuggle routing instructions;// full details stay one `describe_workflow` call away.- crate::util::sanitize::sanitize_for_llm(&skill.description, SKILL_DESCRIPTION_CHARS)+ tinytools_std::sanitize::sanitize_for_llm(&skill.description, SKILL_DESCRIPTION_CHARS).replace(['\n', '\t'], " ").trim().to_string()@@ -499,7 +499,7 @@ fn format_connected_mcp_block(let capability = if capability_raw.is_empty() {String::new()} else {- crate::util::sanitize::sanitize_for_llm(capability_raw, 120)+ tinytools_std::sanitize::sanitize_for_llm(capability_raw, 120).replace(['\n', '\t'], " ").trim().to_string()diff --git a/crates/openhuman-core/src/skills/search.rs b/crates/openhuman-core/src/skills/search.rsindex 89333c1bd8..7422dd23c8 100644--- a/crates/openhuman-core/src/skills/search.rs+++ b/crates/openhuman-core/src/skills/search.rs@@ -102,7 +102,7 @@ fn project(workflow: &Workflow) -> Value {// author-controlled text about to be read by a model as if the host had// said it. `sanitize_for_llm` strips control characters and instruction// fences and caps the length.- "description": crate::util::sanitize::sanitize_for_llm(+ "description": tinytools_std::sanitize::sanitize_for_llm(&workflow.description,MAX_DESCRIPTION,),diff --git a/crates/openhuman-core/src/util/mod.rs b/crates/openhuman-core/src/util/mod.rsindex 9cf362c0da..635c19e9db 100644--- a/crates/openhuman-core/src/util/mod.rs+++ b/crates/openhuman-core/src/util/mod.rs@@ -6,7 +6,7 @@//!//! - [`text`] — UTF-8-safe truncation, char-boundary rounding, provenance tags//! - [`retry`] — retry-with-backoff + transient-filesystem-error classification-//! - [`sanitize`] — LLM-facing text sanitization (control-char stripping,+//! - `tinytools_std::sanitize` — LLM-facing text sanitization (control-char stripping,//! instruction-fence removal, UTF-8-safe byte caps)//! - [`tls`] — platform-conditional `reqwest::ClientBuilder` factory//! - [`types`] — shared utility types@@ -26,7 +26,6 @@ pub mod params;/// not taken from the memory engine.pub mod redact;pub mod retry;-pub mod sanitize;pub mod text;pub mod tls;pub mod types;diff --git a/crates/openhuman-core/src/util/sanitize.rs b/crates/openhuman-core/src/util/sanitize.rsdeleted file mode 100644index ef1c75a91c..0000000000--- a/crates/openhuman-core/src/util/sanitize.rs+++ /dev/null@@ -1,14 +0,0 @@-//! Sanitization helpers for untrusted text bound for a model's context.-//!-//! The implementation is shared from `tinytools_std`; TinyMCP applies it to-//! remote tool descriptions, and OpenHuman also uses it for skill descriptions.-//! Keeping both call sites on the same helper prevents their stripping rules-//! from drifting.-//!-//! Re-exported under the path this module has always been at, so callers keep-//! their spelling.--pub use tinymcp_bus::sanitize::{MAX_DESCRIPTION_BYTES, MAX_TITLE_BYTES};-pub use tinytools_std::sanitize::{- sanitize_for_llm, strip_control_chars, strip_instruction_fences, truncate_utf8_safe,-};