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
feat(config): add tool_rules for operator and per-agent tool filtering
Steven Enamakel5a7406009e4a
diff --git a/crates/openhuman-core/src/agent/harness/definition/agent_definition.rs b/crates/openhuman-core/src/agent/harness/definition/agent_definition.rsindex ed270a1f22..ca712b51b5 100644--- a/crates/openhuman-core/src/agent/harness/definition/agent_definition.rs+++ b/crates/openhuman-core/src/agent/harness/definition/agent_definition.rs@@ -122,6 +122,13 @@ pub struct AgentDefinition {#[serde(default)]pub deferred_tools: Vec<String>,+ /// Pattern rules narrowing this agent's tools on every surface — the+ /// catalogue, `tool_search` and each call — on top of [`ToolScope`] and+ /// [`AgentDefinition::disallowed_tools`]. A `[tool_rules]` table in the+ /// agent's TOML; see `tinytools::ToolRules` and `crate::tools::rules`.+ #[serde(default, skip_serializing_if = "Option::is_none")]+ pub tool_rules: Option<tinytools::ToolRules>,+// ── runtime limits ──────────────────────────────────────────────────/// Maximum number of tool iterations for this sub-agent's task.#[serde(default = "defaults::max_iterations")]diff --git a/crates/openhuman-core/src/config/schema/types/config.rs b/crates/openhuman-core/src/config/schema/types/config.rsindex c38ef51ce9..caf0905099 100644--- a/crates/openhuman-core/src/config/schema/types/config.rs+++ b/crates/openhuman-core/src/config/schema/types/config.rs@@ -155,6 +155,14 @@ pub struct Config {#[serde(default)]pub autonomy: AutonomyConfig,+ /// Operator tool rules (`[tool_rules]`): allow / deny / hide / approval+ /// patterns over tool names, families and tags, applied to every agent's+ /// catalogue, `tool_search` and calls. See `tinytools::ToolRules` and+ /// `crate::tools::rules`. Empty by default, which restricts nothing.+ #[serde(default)]+ #[schemars(with = "serde_json::Value")]+ pub tool_rules: tinytools::ToolRules,+#[serde(default)]pub desktop: DesktopConfig,diff --git a/crates/openhuman-core/src/config/schema/types/config_clone.rs b/crates/openhuman-core/src/config/schema/types/config_clone.rsindex d5fd546e58..a07aae3876 100644--- a/crates/openhuman-core/src/config/schema/types/config_clone.rs+++ b/crates/openhuman-core/src/config/schema/types/config_clone.rs@@ -32,6 +32,7 @@ impl Clone for Config {dashboard: self.dashboard.clone(),observability: self.observability.clone(),autonomy: self.autonomy.clone(),+ tool_rules: self.tool_rules.clone(),desktop: self.desktop.clone(),computer: self.computer.clone(),hooks: self.hooks.clone(),diff --git a/crates/openhuman-core/src/config/schema/types/defaults.rs b/crates/openhuman-core/src/config/schema/types/defaults.rsindex f48399118f..278647e8c2 100644--- a/crates/openhuman-core/src/config/schema/types/defaults.rs+++ b/crates/openhuman-core/src/config/schema/types/defaults.rs@@ -46,6 +46,7 @@ impl Default for Config {observability: ObservabilityConfig::default(),dashboard: DashboardConfig::default(),autonomy: AutonomyConfig::default(),+ tool_rules: tinytools::ToolRules::default(),desktop: DesktopConfig::default(),computer: ComputerConfig::default(),hooks: HooksConfig::default(),diff --git a/crates/openhuman-core/src/tools/mod.rs b/crates/openhuman-core/src/tools/mod.rsindex acfcf9e033..a108ec7891 100644--- a/crates/openhuman-core/src/tools/mod.rs+++ b/crates/openhuman-core/src/tools/mod.rs@@ -3,6 +3,7 @@ pub mod host_extensions;pub mod ops;pub mod orchestrator_tools;pub mod registry;+pub mod rules;mod schemas;pub mod status;pub mod timeout;