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(tools): add schema tests for tool definitions
Steven Enamakelfb421f2d054c
diff --git a/crates/openhuman-core/src/agent/orchestration/tools/steer_subagent_schema_tests.rs b/crates/openhuman-core/src/agent/orchestration/tools/steer_subagent_schema_tests.rsindex c884645544..f24ae3ada6 100644--- a/crates/openhuman-core/src/agent/orchestration/tools/steer_subagent_schema_tests.rs+++ b/crates/openhuman-core/src/agent/orchestration/tools/steer_subagent_schema_tests.rs@@ -30,6 +30,6 @@ fn expected_steer_subagent() -> serde_json::Value {#[test]fn steer_subagent_static_schema_matches_json_literal() {- let tool = todo!("construct tool");- assert_eq!(Tool::parameters_schema(&tool), expected_steer_subagent());+ let tool = SteerSubagentTool;+ assert_eq!(tinytools::Tool::parameters_schema(&tool), expected_steer_subagent());}diff --git a/crates/openhuman-core/src/cron/tools/add_schema_tests.rs b/crates/openhuman-core/src/cron/tools/add_schema_tests.rsindex b68e873996..78070bc9c4 100644--- a/crates/openhuman-core/src/cron/tools/add_schema_tests.rs+++ b/crates/openhuman-core/src/cron/tools/add_schema_tests.rs@@ -75,6 +75,6 @@ fn expected_cron_add() -> serde_json::Value {#[test]fn cron_add_static_schema_matches_json_literal() {- let tool = todo!("construct tool");- assert_eq!(Tool::parameters_schema(&tool), expected_cron_add());+ let tool = CronAddTool::new(std::sync::Arc::new(crate::config::Config::default()), std::sync::Arc::new(crate::security::SecurityPolicy::default()));+ assert_eq!(tinytools::Tool::parameters_schema(&tool), expected_cron_add());}diff --git a/crates/openhuman-core/src/flows/builder_tools/draft_edit_schema_tests.rs b/crates/openhuman-core/src/flows/builder_tools/draft_edit_schema_tests.rsindex e1d56fed70..66d3f8a367 100644--- a/crates/openhuman-core/src/flows/builder_tools/draft_edit_schema_tests.rs+++ b/crates/openhuman-core/src/flows/builder_tools/draft_edit_schema_tests.rs@@ -46,6 +46,6 @@ fn expected_edit_workflow() -> serde_json::Value {#[test]fn edit_workflow_static_schema_matches_json_literal() {- let tool = todo!("construct tool");- assert_eq!(Tool::parameters_schema(&tool), expected_edit_workflow());+ let tool = EditWorkflowTool::new(std::sync::Arc::new(crate::config::Config::default()));+ assert_eq!(tinytools::Tool::parameters_schema(&tool), expected_edit_workflow());}diff --git a/crates/openhuman-core/src/flows/builder_tools/draft_revise_schema_tests.rs b/crates/openhuman-core/src/flows/builder_tools/draft_revise_schema_tests.rsindex 8ea76b2b04..5dc225c781 100644--- a/crates/openhuman-core/src/flows/builder_tools/draft_revise_schema_tests.rs+++ b/crates/openhuman-core/src/flows/builder_tools/draft_revise_schema_tests.rs@@ -33,6 +33,6 @@ fn expected_revise_workflow() -> serde_json::Value {#[test]fn revise_workflow_static_schema_matches_json_literal() {- let tool = todo!("construct tool");- assert_eq!(Tool::parameters_schema(&tool), expected_revise_workflow());+ let tool = ReviseWorkflowTool::new(std::sync::Arc::new(crate::config::Config::default()));+ assert_eq!(tinytools::Tool::parameters_schema(&tool), expected_revise_workflow());}diff --git a/crates/openhuman-core/src/flows/builder_tools/dry_run_schema_tests.rs b/crates/openhuman-core/src/flows/builder_tools/dry_run_schema_tests.rsindex 83490fcacf..3130263c89 100644--- a/crates/openhuman-core/src/flows/builder_tools/dry_run_schema_tests.rs+++ b/crates/openhuman-core/src/flows/builder_tools/dry_run_schema_tests.rs@@ -31,6 +31,6 @@ fn expected_dry_run_workflow() -> serde_json::Value {#[test]fn dry_run_workflow_static_schema_matches_json_literal() {- let tool = todo!("construct tool");- assert_eq!(Tool::parameters_schema(&tool), expected_dry_run_workflow());+ let tool = DryRunWorkflowTool::new(std::sync::Arc::new(crate::config::Config::default()));+ assert_eq!(tinytools::Tool::parameters_schema(&tool), expected_dry_run_workflow());}diff --git a/crates/openhuman-core/src/flows/builder_tools/persistence_schema_tests.rs b/crates/openhuman-core/src/flows/builder_tools/persistence_schema_tests.rsindex 11291ce95f..e48b446034 100644--- a/crates/openhuman-core/src/flows/builder_tools/persistence_schema_tests.rs+++ b/crates/openhuman-core/src/flows/builder_tools/persistence_schema_tests.rs@@ -34,6 +34,6 @@ fn expected_save_workflow() -> serde_json::Value {#[test]fn save_workflow_static_schema_matches_json_literal() {- let tool = todo!("construct tool");- assert_eq!(Tool::parameters_schema(&tool), expected_save_workflow());+ let tool = SaveWorkflowTool::new(std::sync::Arc::new(crate::config::Config::default()));+ assert_eq!(tinytools::Tool::parameters_schema(&tool), expected_save_workflow());}diff --git a/crates/openhuman-core/src/flows/discovery_tools_schema_tests.rs b/crates/openhuman-core/src/flows/discovery_tools_schema_tests.rsindex 0a016a2f3c..8cff1f311c 100644--- a/crates/openhuman-core/src/flows/discovery_tools_schema_tests.rs+++ b/crates/openhuman-core/src/flows/discovery_tools_schema_tests.rs@@ -66,6 +66,6 @@ fn expected_suggest_workflows() -> serde_json::Value {#[test]fn suggest_workflows_static_schema_matches_json_literal() {- let tool = todo!("construct tool");- assert_eq!(Tool::parameters_schema(&tool), expected_suggest_workflows());+ let tool = SuggestWorkflowsTool::new(std::sync::Arc::new(crate::config::Config::default()));+ assert_eq!(tinytools::Tool::parameters_schema(&tool), expected_suggest_workflows());}diff --git a/crates/openhuman-core/src/flows/memory_tools_schema_tests.rs b/crates/openhuman-core/src/flows/memory_tools_schema_tests.rsindex 21e0df4c32..5acd1eb59c 100644--- a/crates/openhuman-core/src/flows/memory_tools_schema_tests.rs+++ b/crates/openhuman-core/src/flows/memory_tools_schema_tests.rs@@ -31,6 +31,6 @@ fn expected_flow_memory_remember() -> serde_json::Value {#[test]fn flow_memory_remember_static_schema_matches_json_literal() {- let tool = todo!("construct tool");- assert_eq!(Tool::parameters_schema(&tool), expected_flow_memory_remember());+ let tool = FlowMemoryRememberTool::new(std::sync::Arc::new(crate::security::SecurityPolicy::default()));+ assert_eq!(tinytools::Tool::parameters_schema(&tool), expected_flow_memory_remember());}diff --git a/crates/openhuman-core/src/flows/tools_schema_tests.rs b/crates/openhuman-core/src/flows/tools_schema_tests.rsindex 90b84d52ff..d868487555 100644--- a/crates/openhuman-core/src/flows/tools_schema_tests.rs+++ b/crates/openhuman-core/src/flows/tools_schema_tests.rs@@ -62,6 +62,6 @@ fn expected_propose_workflow() -> serde_json::Value {#[test]fn propose_workflow_static_schema_matches_json_literal() {- let tool = todo!("construct tool");- assert_eq!(Tool::parameters_schema(&tool), expected_propose_workflow());+ let tool = ProposeWorkflowTool::new(std::sync::Arc::new(crate::config::Config::default()));+ assert_eq!(tinytools::Tool::parameters_schema(&tool), expected_propose_workflow());}diff --git a/crates/openhuman-core/src/integrations/composio/tools/list_tools_schema_tests.rs b/crates/openhuman-core/src/integrations/composio/tools/list_tools_schema_tests.rsindex 56036fcbbe..07283fcc31 100644--- a/crates/openhuman-core/src/integrations/composio/tools/list_tools_schema_tests.rs+++ b/crates/openhuman-core/src/integrations/composio/tools/list_tools_schema_tests.rs@@ -31,6 +31,6 @@ fn expected_composio_list_tools() -> serde_json::Value {#[test]fn composio_list_tools_static_schema_matches_json_literal() {- let tool = todo!("construct tool");- assert_eq!(Tool::parameters_schema(&tool), expected_composio_list_tools());+ let tool = ComposioListToolsTool::new(std::sync::Arc::new(crate::config::Config::default()));+ assert_eq!(tinytools::Tool::parameters_schema(&tool), expected_composio_list_tools());}diff --git a/crates/openhuman-core/src/memory/tools_schema_tests.rs b/crates/openhuman-core/src/memory/tools_schema_tests.rsindex dbca508021..22e4603c88 100644--- a/crates/openhuman-core/src/memory/tools_schema_tests.rs+++ b/crates/openhuman-core/src/memory/tools_schema_tests.rs@@ -37,6 +37,6 @@ fn expected_memory() -> serde_json::Value {#[test]fn memory_static_schema_matches_json_literal() {- let tool = todo!("construct tool");- assert_eq!(Tool::parameters_schema(&tool), expected_memory());+ let tool = MemoryTool::new(std::sync::Arc::new(crate::config::Config::default()));+ assert_eq!(tinytools::Tool::parameters_schema(&tool), expected_memory());}diff --git a/crates/openhuman-core/src/tools/impl/browser/browser_schema_tests.rs b/crates/openhuman-core/src/tools/impl/browser/browser_schema_tests.rsindex cf5eabcd18..58bd0b0fbb 100644--- a/crates/openhuman-core/src/tools/impl/browser/browser_schema_tests.rs+++ b/crates/openhuman-core/src/tools/impl/browser/browser_schema_tests.rs@@ -10,6 +10,6 @@ fn expected_browser() -> serde_json::Value {#[test]fn browser_static_schema_matches_json_literal() {- let tool = todo!("construct tool");- assert_eq!(Tool::parameters_schema(&tool), expected_browser());+ let tool = BrowserTool::new(std::sync::Arc::new(crate::security::SecurityPolicy::default()), std::sync::Arc::new(BrowserClient::new(std::sync::Arc::new(crate::config::Config::default()))), 3);+ assert_eq!(tinytools::Tool::parameters_schema(&tool), expected_browser());}diff --git a/crates/openhuman-core/src/tools/impl/system/node_exec_schema_tests.rs b/crates/openhuman-core/src/tools/impl/system/node_exec_schema_tests.rsindex 8a0396265f..0a11d2e6da 100644--- a/crates/openhuman-core/src/tools/impl/system/node_exec_schema_tests.rs+++ b/crates/openhuman-core/src/tools/impl/system/node_exec_schema_tests.rs@@ -28,6 +28,6 @@ fn expected_node_exec() -> serde_json::Value {#[test]fn node_exec_static_schema_matches_json_literal() {- let tool = todo!("construct tool");- assert_eq!(Tool::parameters_schema(&tool), expected_node_exec());+ let tool = NodeExecTool::new(std::sync::Arc::new(crate::security::SecurityPolicy::default()), std::sync::Arc::new(crate::agent::host_runtime::NativeRuntime::new()), std::sync::Arc::new(NodeBootstrap::new(std::sync::Arc::new(crate::config::Config::default()))), crate::config::RuntimePoolConfig::default(), std::path::PathBuf::from("."));+ assert_eq!(tinytools::Tool::parameters_schema(&tool), expected_node_exec());}diff --git a/crates/openhuman-core/src/tools/impl/system/npm_exec_schema_tests.rs b/crates/openhuman-core/src/tools/impl/system/npm_exec_schema_tests.rsindex b577877627..a3f197584f 100644--- a/crates/openhuman-core/src/tools/impl/system/npm_exec_schema_tests.rs+++ b/crates/openhuman-core/src/tools/impl/system/npm_exec_schema_tests.rs@@ -29,6 +29,6 @@ fn expected_npm_exec() -> serde_json::Value {#[test]fn npm_exec_static_schema_matches_json_literal() {- let tool = todo!("construct tool");- assert_eq!(Tool::parameters_schema(&tool), expected_npm_exec());+ let tool = NpmExecTool::new(std::sync::Arc::new(crate::security::SecurityPolicy::default()), std::sync::Arc::new(crate::agent::host_runtime::NativeRuntime::new()), std::sync::Arc::new(NodeBootstrap::new(std::sync::Arc::new(crate::config::Config::default()))));+ assert_eq!(tinytools::Tool::parameters_schema(&tool), expected_npm_exec());}diff --git a/crates/openhuman-core/src/tools/impl/system/proxy_config_schema_tests.rs b/crates/openhuman-core/src/tools/impl/system/proxy_config_schema_tests.rsindex 291068d485..d0388e6b84 100644--- a/crates/openhuman-core/src/tools/impl/system/proxy_config_schema_tests.rs+++ b/crates/openhuman-core/src/tools/impl/system/proxy_config_schema_tests.rs@@ -54,6 +54,6 @@ fn expected_proxy_config() -> serde_json::Value {#[test]fn proxy_config_static_schema_matches_json_literal() {- let tool = todo!("construct tool");- assert_eq!(Tool::parameters_schema(&tool), expected_proxy_config());+ let tool = ProxyConfigTool::new(std::sync::Arc::new(crate::config::Config::default()), std::sync::Arc::new(crate::security::SecurityPolicy::default()));+ assert_eq!(tinytools::Tool::parameters_schema(&tool), expected_proxy_config());}diff --git a/crates/openhuman-core/src/tools/impl/system/schedule_schema_tests.rs b/crates/openhuman-core/src/tools/impl/system/schedule_schema_tests.rsindex 44ad09d955..2661ef45c1 100644--- a/crates/openhuman-core/src/tools/impl/system/schedule_schema_tests.rs+++ b/crates/openhuman-core/src/tools/impl/system/schedule_schema_tests.rs@@ -45,6 +45,6 @@ fn expected_schedule() -> serde_json::Value {#[test]fn schedule_static_schema_matches_json_literal() {- let tool = todo!("construct tool");- assert_eq!(Tool::parameters_schema(&tool), expected_schedule());+ let tool = ScheduleTool::new(std::sync::Arc::new(crate::security::SecurityPolicy::default()), crate::config::Config::default());+ assert_eq!(tinytools::Tool::parameters_schema(&tool), expected_schedule());}diff --git a/crates/openhuman-core/src/voice/audio_toolkit/tools/podcast_schema_tests.rs b/crates/openhuman-core/src/voice/audio_toolkit/tools/podcast_schema_tests.rsindex 1a3c15cbd1..122e3da928 100644--- a/crates/openhuman-core/src/voice/audio_toolkit/tools/podcast_schema_tests.rs+++ b/crates/openhuman-core/src/voice/audio_toolkit/tools/podcast_schema_tests.rs@@ -22,6 +22,6 @@ fn expected_audio_generate_and_email_podcast() -> serde_json::Value {#[test]fn audio_generate_and_email_podcast_static_schema_matches_json_literal() {- let tool = todo!("construct tool");- assert_eq!(Tool::parameters_schema(&tool), expected_audio_generate_and_email_podcast());+ let tool = AudioGenerateAndEmailPodcastTool::new(std::sync::Arc::new(crate::config::Config::default()), std::sync::Arc::new(crate::security::SecurityPolicy::default()));+ assert_eq!(tinytools::Tool::parameters_schema(&tool), expected_audio_generate_and_email_podcast());}