Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

test(agent_registry): add checks for presentation agent loading

Steven Enamakel285f8a0e4cf4
diff --git a/crates/openhuman-core/src/agent_registry/agents/loader_tests_specialist_agents_tests.rs b/crates/openhuman-core/src/agent_registry/agents/loader_tests_specialist_agents_tests.rs
index c3686c9fdb..fd41ac15a5 100644
--- a/crates/openhuman-core/src/agent_registry/agents/loader_tests_specialist_agents_tests.rs
+++ b/crates/openhuman-core/src/agent_registry/agents/loader_tests_specialist_agents_tests.rs
@@ -270,6 +270,23 @@ fn orchestrator_routes_every_registered_specialist_through_spawn_subagent() {
let SubagentEntry::AgentId(agent_id) = entry else {
continue;
};
+ if agent_id == "presentation_agent" && !cfg!(feature = "documents") {
+ assert!(
+ registry.get(agent_id).is_none(),
+ "presentation_agent is intentionally absent without documents"
+ );
+ assert!(
+ !allowed
+ .iter()
+ .any(|candidate| candidate.as_str() == Some(agent_id)),
+ "spawn_subagent must not advertise presentation_agent without documents"
+ );
+ continue;
+ }
+ assert!(
+ registry.get(agent_id).is_some(),
+ "orchestrator specialist `{agent_id}` must be registered"
+ );
assert!(
allowed
.iter()