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 tests for builtin agent registration in loader
Steven Enamakel386ce6734f75
diff --git a/crates/openhuman-core/src/agent/registry/agents/loader_tests_builtin_registration_tests.rs b/crates/openhuman-core/src/agent/registry/agents/loader_tests_builtin_registration_tests.rsindex c019d9f7e6..dbd30e8154 100644--- a/crates/openhuman-core/src/agent/registry/agents/loader_tests_builtin_registration_tests.rs+++ b/crates/openhuman-core/src/agent/registry/agents/loader_tests_builtin_registration_tests.rs@@ -34,43 +34,15 @@ fn presentation_agent_absent_when_documents_off() {);}-#[test]-fn automatic_memory_agents_do_not_expose_call_memory_agent() {- for def in load_builtins().expect("built-in TOML must parse") {- if def.trigger_memory_agent != TriggerMemoryAgent::Always {- continue;- }-- let exposes_call_memory_agent = match &def.tools {- ToolScope::Named(tools) => tools.iter().any(|tool| tool == "call_memory_agent"),- ToolScope::Wildcard => false,- };-- assert!(- !exposes_call_memory_agent,- "{} uses trigger_memory_agent but still exposes call_memory_agent",- def.id- );- assert!(- !def.subagents- .iter()- .any(|entry| matches!(entry, SubagentEntry::AgentId(id) if id == "agent_memory")),- "{} uses trigger_memory_agent but still lists agent_memory in subagents",- def.id- );- }-}-#[test]fn trigger_reactor_has_agentic_hint_and_narrow_tools() {let def = find("trigger_reactor");assert!(matches!(def.model, ModelSpec::Hint(ref h) if h == "agentic"));match &def.tools {ToolScope::Named(tools) => {- assert!(!tools.iter().any(|t| t == "call_memory_agent"));assert!(- tools.iter().any(|t| t == "memory_store"),- "trigger_reactor needs memory_store"+ tools.iter().any(|t| t == "memory"),+ "trigger_reactor needs the memory tool");// A worker with no `[subagents]` allowlist can never dispatch a// spawn, so listing the tool only advertised a dead route.@@ -329,7 +301,6 @@ fn master_agent_has_coding_hint_and_named_tools() {!tools.iter().any(|t| t == "spawn_subagent"),"spawn_subagent must not appear — removed in #1141");- assert!(!tools.iter().any(|t| t == "call_memory_agent"));// The Master Agent owns the ordinary coding loop directly.// Keep its mutation surface intentionally small: one patch// mechanism for existing files, file_write for new files,@@ -367,34 +338,20 @@ fn master_agent_has_coding_hint_and_named_tools() {"Master Agent must have direct inspect tool `{direct}`");}- // Direct memory surface (#4762): recall/store are the product's- // core and must be first-class direct tools, not a sub-agent- // spawn — a trivial recall or a single "remember this" must not- // pay a blocking agentic round-trip (over-delegation, #4744) that- // can hang or return a 0-char result with persistence unconfirmed.- // Deep tree walks / reconciliation still delegate to- // `retrieve_memory` / `manage_profile_memory`.- for direct in ["memory_recall", "memory_store", "save_preference"] {- assert!(- tools.iter().any(|t| t == direct),- "orchestrator must have direct memory tool `{direct}` (#4762)"- );- }+ // Direct memory surface: recall/store are the product's core and+ // must be one first-class direct tool, not a sub-agent spawn+ // (over-delegation, #4744).+ assert!(+ tools.iter().any(|t| t == "memory"),+ "orchestrator must have the direct `memory` tool"+ );}ToolScope::Wildcard => panic!("orchestrator must have named tool allowlist"),}assert_eq!(def.max_iterations, 15);- // Memory retrieval is on-demand (via the `agent_memory` subagent,- // surfaced as `delegate_retrieve_memory`), not an eager pre-turn- // pre-fetch. The allowlist entry is what makes that route reachable- // (see the `agent_memory::tools` allowlist gate).- assert_eq!(def.trigger_memory_agent, TriggerMemoryAgent::Never);assert!(- def.subagents.iter().any(|entry| matches!(- entry,- SubagentEntry::AgentId(id) if id == "agent_memory"- )),- "orchestrator must allow `agent_memory` for on-demand retrieval"+ !def.omit_memory_context,+ "the user-facing agent opens new sessions with the memory context");}@@ -532,26 +489,6 @@ fn planner_has_readonly_mcp_discovery_not_execute() {}}-/// The archivist is registered but deliberately not a chat delegate: the-/// post-commit session-memory extraction runs it by id-/// (`runtime_session.rs`), and a delegate would add its schema to every turn.-#[test]-fn the_orchestrator_does_not_delegate_to_the_archivist() {- let orchestrator = find("orchestrator");- assert!(- !orchestrator- .subagents- .iter()- .any(|entry| matches!(entry, SubagentEntry::AgentId(id) if id == "archivist")),- "`archivist` is back on the orchestrator's subagent list"- );- assert_eq!(- find("archivist").id,- "archivist",- "archivist must stay registered"- );-}-/// The specialists the inline skills replaced must not come back as/// orchestrator delegates, and the ones kept for workflow runs must not/// become chat delegates.