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
test(agent): add tool_rules field to test agent definitions
Steven Enamakelef0af0710029
diff --git a/crates/openhuman-core/src/agent/harness/builtin_definitions.rs b/crates/openhuman-core/src/agent/harness/builtin_definitions.rsindex 85067ef71a..1d68a69aff 100644--- a/crates/openhuman-core/src/agent/harness/builtin_definitions.rs+++ b/crates/openhuman-core/src/agent/harness/builtin_definitions.rs@@ -65,6 +65,7 @@ pub(crate) fn test_main_def() -> AgentDefinition {skill_filter: None,extra_tools: vec![],deferred_tools: Vec::new(),+ tool_rules: None,max_iterations: 8,iteration_policy: Default::default(),max_result_chars: None,@@ -109,6 +110,7 @@ pub(crate) fn test_inherit_echo_def() -> AgentDefinition {skill_filter: None,extra_tools: vec![],deferred_tools: Vec::new(),+ tool_rules: None,max_iterations: 3,iteration_policy: Default::default(),max_result_chars: None,@@ -146,6 +148,7 @@ pub(crate) fn test_inherit_parallel_worker_def() -> AgentDefinition {skill_filter: None,extra_tools: vec![],deferred_tools: Vec::new(),+ tool_rules: None,max_iterations: 6,iteration_policy: Default::default(),max_result_chars: None,diff --git a/crates/openhuman-core/src/agent/harness/definition_tests.rs b/crates/openhuman-core/src/agent/harness/definition_tests.rsindex a94628b1be..0ad1163d93 100644--- a/crates/openhuman-core/src/agent/harness/definition_tests.rs+++ b/crates/openhuman-core/src/agent/harness/definition_tests.rs@@ -16,6 +16,7 @@ fn make_def(id: &str) -> AgentDefinition {skill_filter: None,extra_tools: vec![],deferred_tools: Vec::new(),+ tool_rules: None,max_iterations: 8,iteration_policy: Default::default(),max_result_chars: None,diff --git a/crates/openhuman-core/src/agent/library/ops_tests.rs b/crates/openhuman-core/src/agent/library/ops_tests.rsindex 1e30e42845..76dcc628c2 100644--- a/crates/openhuman-core/src/agent/library/ops_tests.rs+++ b/crates/openhuman-core/src/agent/library/ops_tests.rs@@ -17,6 +17,7 @@ fn definition() -> AgentDefinition {skill_filter: None,extra_tools: vec!["memory_search".to_string(), "web_search".to_string()],deferred_tools: Vec::new(),+ tool_rules: None,max_iterations: 8,iteration_policy: Default::default(),max_result_chars: None,diff --git a/crates/openhuman-core/src/agent/orchestration/tools/spawn_parallel_agents_tests.rs b/crates/openhuman-core/src/agent/orchestration/tools/spawn_parallel_agents_tests.rsindex 136b5a84a8..050ccd6cd7 100644--- a/crates/openhuman-core/src/agent/orchestration/tools/spawn_parallel_agents_tests.rs+++ b/crates/openhuman-core/src/agent/orchestration/tools/spawn_parallel_agents_tests.rs@@ -158,6 +158,7 @@ fn definition_with_tool_scope(skill_filter: None,extra_tools: Vec::new(),deferred_tools: Vec::new(),+ tool_rules: None,max_iterations: 3,iteration_policy: Default::default(),max_result_chars: None,diff --git a/crates/openhuman-core/src/agent/subagent_host/ops_tests.rs b/crates/openhuman-core/src/agent/subagent_host/ops_tests.rsindex f3914de3a8..a29981f088 100644--- a/crates/openhuman-core/src/agent/subagent_host/ops_tests.rs+++ b/crates/openhuman-core/src/agent/subagent_host/ops_tests.rs@@ -18,6 +18,7 @@ fn make_def_named_tools(names: &[&str]) -> AgentDefinition {skill_filter: None,extra_tools: vec![],deferred_tools: Vec::new(),+ tool_rules: None,max_iterations: 5,iteration_policy: Default::default(),max_result_chars: None,diff --git a/crates/openhuman-core/src/agent/tinyagents/payload_summarizer_tests.rs b/crates/openhuman-core/src/agent/tinyagents/payload_summarizer_tests.rsindex b50ae37ef5..80401a1cdd 100644--- a/crates/openhuman-core/src/agent/tinyagents/payload_summarizer_tests.rs+++ b/crates/openhuman-core/src/agent/tinyagents/payload_summarizer_tests.rs@@ -22,6 +22,7 @@ fn dummy_definition() -> AgentDefinition {skill_filter: None,extra_tools: vec![],deferred_tools: Vec::new(),+ tool_rules: None,max_iterations: 1,iteration_policy: Default::default(),max_result_chars: None,diff --git a/crates/openhuman-core/src/channels/runtime/dispatch/mod_scoping_tests_tests.rs b/crates/openhuman-core/src/channels/runtime/dispatch/mod_scoping_tests_tests.rsindex 6e1975ec10..729a69cbf7 100644--- a/crates/openhuman-core/src/channels/runtime/dispatch/mod_scoping_tests_tests.rs+++ b/crates/openhuman-core/src/channels/runtime/dispatch/mod_scoping_tests_tests.rs@@ -61,6 +61,7 @@ fn def_with_scope(scope: ToolScope) -> AgentDefinition {skill_filter: None,extra_tools: vec![],deferred_tools: Vec::new(),+ tool_rules: None,max_iterations: 8,iteration_policy: Default::default(),max_result_chars: None,diff --git a/crates/openhuman-core/src/tools/orchestrator_tools_tests.rs b/crates/openhuman-core/src/tools/orchestrator_tools_tests.rsindex a6cbd7fb6d..50f7930dd1 100644--- a/crates/openhuman-core/src/tools/orchestrator_tools_tests.rs+++ b/crates/openhuman-core/src/tools/orchestrator_tools_tests.rs@@ -19,6 +19,7 @@ fn def(id: &str, when_to_use: &str, delegate_name: Option<&str>) -> AgentDefinitskill_filter: None,extra_tools: vec![],deferred_tools: Vec::new(),+ tool_rules: None,max_iterations: 8,iteration_policy: Default::default(),max_result_chars: None,diff --git a/crates/openhuman-core/src/tools/rules/ops_tests.rs b/crates/openhuman-core/src/tools/rules/ops_tests.rsindex 34727a6ce9..73e0a59e16 100644--- a/crates/openhuman-core/src/tools/rules/ops_tests.rs+++ b/crates/openhuman-core/src/tools/rules/ops_tests.rs@@ -1,5 +1,11 @@use super::*;+use std::sync::Arc;++use crate::agent::harness::definition::AgentDefinition;+use crate::config::Config;+use tinytools::ToolRuleSet;+use tinytools::{Surface, ToolSubject};fn definition(id: &str) -> AgentDefinition {