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: remove tests for removed delegation and lsp surfaces
Steven Enamakelea40c75ddcd6
diff --git a/crates/openhuman-core/src/agent/orchestration/tools/dispatch_tests.rs b/crates/openhuman-core/src/agent/orchestration/tools/dispatch_tests.rsindex 2594f91231..09b5f73264 100644--- a/crates/openhuman-core/src/agent/orchestration/tools/dispatch_tests.rs+++ b/crates/openhuman-core/src/agent/orchestration/tools/dispatch_tests.rs@@ -3,9 +3,6 @@ use async_trait::async_trait;use std::sync::Arc;use tinytools::Tool;-use super::super::collapsed_delegation::{- dispatch_targets_from_schema, CollapsedDelegationTool, DelegateTarget,-};use super::super::delegate_graph::DelegateGraphDispatch;use crate::tools::delegate::DelegateToolDispatch;use tinyagents_harness::context::RunConfig;@@ -81,19 +78,6 @@ impl Tool for DelegationRegistrationTool {#[test]fn typed_dispatch_registration_recognises_every_synthesised_delegate_surface() {let _ = crate::agent_registry::host_definition::AgentDefinitionRegistry::init_global_builtins();- let collapsed: Arc<dyn Tool> = Arc::new(- CollapsedDelegationTool::for_targets(vec![DelegateTarget {- tool_name: "research".to_string(),- agent_id: "researcher".to_string(),- description: "Research the request.".to_string(),- }])- .expect("one collapsed target is routable"),- );- assert!(- DelegationDispatch::for_tool(collapsed.clone(), None).is_some(),- "every synthesised delegation name must select the typed dispatch: {}",- collapsed.name(),- );// The retired integrations delegate is not a delegation surface any more:// its name must not select a dispatcher, so a stale tool by that name// cannot spawn a sub-agent for one integration action.@@ -264,44 +248,6 @@ async fn config_delegate_dispatch_preserves_tool_failure_in_shared_jobs() {}#[test]-fn collapsed_dispatch_mapping_has_exact_advertised_vocabulary_and_rejects_drift() {- let tool = CollapsedDelegationTool::for_targets(vec![- DelegateTarget {- tool_name: "research".to_string(),- agent_id: "researcher".to_string(),- description: "Research the request.".to_string(),- },- DelegateTarget {- tool_name: "review".to_string(),- agent_id: "code_reviewer".to_string(),- description: "Review code.".to_string(),- },- ])- .expect("targets are routable");- let mut schema = tool.parameters_schema();- let targets = dispatch_targets_from_schema(&schema).expect("collapsed dispatch target mapping");- assert_eq!(- targets,- vec![- DelegateTarget {- tool_name: "research".to_string(),- agent_id: "researcher".to_string(),- description: String::new(),- },- DelegateTarget {- tool_name: "review".to_string(),- agent_id: "code_reviewer".to_string(),- description: String::new(),- },- ]- );-- schema["properties"]["agent"]["enum"] = serde_json::json!(["research", "unadvertised"]);- let error = dispatch_targets_from_schema(&schema)- .expect_err("a selector absent from the concrete target map must be rejected");- assert!(error.contains("exactly match"), "{error}");-}-#[test]fn ask_clarification_tool_is_the_harness_tool() {let tool = AskClarificationTool::new();diff --git a/crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_tests.rs b/crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_tests.rsindex 9e8f790ca1..ae2d6d1927 100644--- a/crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_tests.rs+++ b/crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_tests.rs@@ -3,7 +3,6 @@ use crate::agent::harness::ParentExecutionContext;use crate::agent_registry::host_definition::AgentDefinitionRegistry;use crate::integrations::ConnectedIntegration;use crate::threads::store as conversations;-use crate::tools::implementations::threads::SpawnWorkerThreadTool;use async_trait::async_trait;use parking_lot::Mutex;use serde_json::json;@@ -460,62 +459,6 @@ async fn continue_subagent_without_checkpoint_or_durable_session_names_the_roste}#[tokio::test]-async fn spawn_worker_thread_tool_persists_worker_thread_e2e() {- let _ = AgentDefinitionRegistry::init_global_builtins();- let workspace = tempfile::TempDir::new().expect("workspace");- let provider = Arc::new(ScriptedModel::new(vec![(- WORKER_THREAD_CANARY,- "worker-thread-child-answer",- )]));-- let live = super::live_parent_run_context(- "worker-thread-e2e",- parent_context(workspace.path(), provider.clone(), vec![]),- );- let result = SpawnWorkerThreadTool::new()- .execute_with_live_parent_context(- json!({- "agent_id": "task_manager_agent",- "prompt": format!("Handle long task {WORKER_THREAD_CANARY}"),- "task_title": "Long delegated task",- "model": "test-model"- }),- None,- live.data.child(),- Some(&live),- )- .await- .expect("tool execution");-- assert!(!result.is_error, "{}", result.output());- assert!(result.output().contains("[worker_thread_ref]"));- assert!(result.output().contains("\"status\":\"completed\""));- assert!(provider.saw(WORKER_THREAD_CANARY));-- let threads = conversations::list_threads(- &crate::core::runtime::DispatchCtx::ambient(),- workspace.path().to_path_buf(),- )- .expect("worker threads");- let worker = threads- .iter()- .find(|thread| thread.labels.contains(&"tasks".to_string()))- .expect("worker thread was persisted");- assert_eq!(worker.title, "Long delegated task");-- let messages = conversations::get_messages(- &crate::core::runtime::DispatchCtx::ambient(),- workspace.path().to_path_buf(),- &worker.id,- )- .expect("worker messages");- assert_eq!(messages.len(), 2);- assert_eq!(messages[0].sender, "user");- assert!(messages[0].content.contains(WORKER_THREAD_CANARY));- assert_eq!(messages[1].sender, "agent");- assert_eq!(messages[1].content, "worker-thread-child-answer");-}-fn parent_context(workspace_dir: &Path,model: Arc<dyn ChatModel<()>>,diff --git a/crates/openhuman-core/src/profiles/provider_settings_tests.rs b/crates/openhuman-core/src/profiles/provider_settings_tests.rsindex 19a9ac0ecd..44b038ac2b 100644--- a/crates/openhuman-core/src/profiles/provider_settings_tests.rs+++ b/crates/openhuman-core/src/profiles/provider_settings_tests.rs@@ -83,7 +83,6 @@ fn rejects_collisions_duplicates_unsafe_identifiers_and_alias_chains() {"spawn_subagent","spawn_async_subagent","spawn_parallel_agents",- "spawn_worker_thread","delegate","delegate_graph","continue_subagent",diff --git a/crates/openhuman-core/src/tools/ops_tests_execution_and_serde_tests.rs b/crates/openhuman-core/src/tools/ops_tests_execution_and_serde_tests.rsindex 9400caf46c..4eaa4950fe 100644--- a/crates/openhuman-core/src/tools/ops_tests_execution_and_serde_tests.rs+++ b/crates/openhuman-core/src/tools/ops_tests_execution_and_serde_tests.rs@@ -221,10 +221,10 @@ fn all_tools_registers_no_hosted_integration_families_without_a_tool_source() {}#[test]-fn all_tools_registers_brave_engine_and_lsp_when_enabled() {+fn all_tools_registers_brave_engine_when_enabled() {// Search registers one tool per capability role from the TinySearch// catalog; a usable BYOK Brave key yields the `search` role tool- // alongside lsp.+ // alongside the builtin tool set.let tmp = TempDir::new().unwrap();let security = Arc::new(SecurityPolicy::default());let browser = BrowserConfig::default();@@ -236,11 +236,6 @@ fn all_tools_registers_brave_engine_and_lsp_when_enabled() {);cfg.search.brave.api_key = Some("test-brave-key".into());- let _env_guard = crate::config::TEST_ENV_LOCK.blocking_lock();- unsafe {- std::env::set_var(crate::tools::implementations::LSP_ENABLED_ENV, "1");- }-let tools = all_tools(Arc::new(cfg.clone()),&security,@@ -257,13 +252,8 @@ fn all_tools_registers_brave_engine_and_lsp_when_enabled() {&[#[cfg(feature = "modules")]"web_search_tool",- "lsp",],);-- unsafe {- std::env::remove_var(crate::tools::implementations::LSP_ENABLED_ENV);- }}#[test]