Skip to content

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

test: add missing test files for agent harness, registry, and MCP server

Steven Enamakelb178de279188
diff --git a/crates/openhuman-core/src/agent/harness/builtin_definitions_tests.rs b/crates/openhuman-core/src/agent/harness/builtin_definitions_tests.rs
index dc55672491..9e1e66ad57 100644
--- a/crates/openhuman-core/src/agent/harness/builtin_definitions_tests.rs
+++ b/crates/openhuman-core/src/agent/harness/builtin_definitions_tests.rs
@@ -93,13 +93,8 @@ fn expected_builtin_ids_are_present() {
for expected in [
"orchestrator",
"planner",
- "code_executor",
- "integrations_agent",
"task_manager_agent",
- "settings_agent",
"profile_memory_agent",
- "tool_maker",
- "skill_creator",
"critic",
"archivist",
"summarizer",
diff --git a/crates/openhuman-core/src/agent/harness/definition_loader_tests.rs b/crates/openhuman-core/src/agent/harness/definition_loader_tests.rs
index c0d13bd5b9..20aedf8ae2 100644
--- a/crates/openhuman-core/src/agent/harness/definition_loader_tests.rs
+++ b/crates/openhuman-core/src/agent/harness/definition_loader_tests.rs
@@ -93,7 +93,7 @@ fn registry_load_merges_builtins_and_custom() {
"expected at least one built-in plus the custom definition"
);
assert!(reg.get("notion_specialist").is_some());
- assert!(reg.get("code_executor").is_some());
+ assert!(reg.get("critic").is_some());
}
#[test]
@@ -122,11 +122,11 @@ fn custom_definition_overrides_same_id_builtin() {
let ws = fresh_workspace();
let agents_dir = ws.path().join("agents");
fs::create_dir_all(&agents_dir).unwrap();
- // Override the built-in `code_executor` with a custom one.
+ // Override the built-in `critic` with a custom one.
write_toml(
- &agents_dir.join("code_executor.toml"),
+ &agents_dir.join("critic.toml"),
r#"
-id = "code_executor"
+id = "critic"
when_to_use = "CUSTOM OVERRIDE"
[system_prompt]
@@ -146,10 +146,10 @@ wildcard = {}
let expected_count = baseline.len();
let reg = super::super::definition::AgentDefinitionRegistry::load(ws.path()).unwrap();
- // Same id replaced the built-in `code_executor` in place, so the
+ // Same id replaced the built-in `critic` in place, so the
// registry size doesn't grow when the custom TOML collides.
assert_eq!(reg.len(), expected_count);
- let def = reg.get("code_executor").unwrap();
+ let def = reg.get("critic").unwrap();
assert_eq!(def.when_to_use, "CUSTOM OVERRIDE");
assert!(matches!(def.source, DefinitionSource::File(_)));
}
diff --git a/crates/openhuman-core/src/agent/registry/defaults_tests.rs b/crates/openhuman-core/src/agent/registry/defaults_tests.rs
index a48b8c2b4a..40fcbbd443 100644
--- a/crates/openhuman-core/src/agent/registry/defaults_tests.rs
+++ b/crates/openhuman-core/src/agent/registry/defaults_tests.rs
@@ -7,7 +7,10 @@ fn default_agents_include_core_personas() {
assert!(ids.contains(&"orchestrator"));
assert!(ids.contains(&"archivist"));
assert!(!ids.contains(&"researcher"), "the researcher agent was removed");
- assert!(ids.contains(&"code_executor"));
+ for removed in ["code_executor", "tools_agent", "settings_agent", "crypto_agent"] {
+ assert!(!ids.contains(&removed), "`{removed}` was replaced by an inline skill");
+ }
+ assert!(ids.contains(&"planner"), "planner stays for workflow runs");
assert!(agents
.iter()
.all(|agent| agent.source == AgentRegistrySource::Default));
diff --git a/crates/openhuman-core/src/mcp/server/resources_tests.rs b/crates/openhuman-core/src/mcp/server/resources_tests.rs
index 1a44d5018b..8ad4f63d15 100644
--- a/crates/openhuman-core/src/mcp/server/resources_tests.rs
+++ b/crates/openhuman-core/src/mcp/server/resources_tests.rs
@@ -59,7 +59,7 @@ fn list_resources_includes_core_and_agent_uris() {
"openhuman://prompts/soul",
"openhuman://prompts/user",
"openhuman://prompts/agents/orchestrator",
- "openhuman://prompts/agents/mcp_agent",
+ "openhuman://prompts/agents/planner",
] {
assert!(uris.contains(&expected), "missing URI {expected}");
}