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
fix(registry): correct schema validation for optional fields
Steven Enamakel1acadc6ff8c2
diff --git a/crates/openhuman-core/src/tools/registry/ops_tests.rs b/crates/openhuman-core/src/tools/registry/ops_tests.rsindex ecc9d15dc9..fd43f5e818 100644--- a/crates/openhuman-core/src/tools/registry/ops_tests.rs+++ b/crates/openhuman-core/src/tools/registry/ops_tests.rs@@ -13,13 +13,13 @@ fn registry_entries_include_mcp_and_controller_tools() {// controller half below must keep its coverage in BOTH builds.#[cfg(feature = "mcp")]{- let memory_search = entries+ let memory_recall = entries.iter()- .find(|entry| entry.tool_id == "memory.search")- .expect("memory.search mcp tool");- assert_eq!(memory_search.transport, ToolRegistryTransport::McpStdio);- assert_eq!(memory_search.route["method"], json!("tools/call"));- assert_eq!(memory_search.health, ToolRegistryHealth::Available);+ .find(|entry| entry.tool_id == "memory.recall")+ .expect("memory.recall mcp tool");+ assert_eq!(memory_recall.transport, ToolRegistryTransport::McpStdio);+ assert_eq!(memory_recall.route["method"], json!("tools/call"));+ assert_eq!(memory_recall.health, ToolRegistryHealth::Available);}// With `mcp` compiled out the registry must contain NO MCP-transportdiff --git a/crates/openhuman-core/src/tools/registry/schemas.rs b/crates/openhuman-core/src/tools/registry/schemas.rsindex 4051f10732..0700f7e758 100644--- a/crates/openhuman-core/src/tools/registry/schemas.rs+++ b/crates/openhuman-core/src/tools/registry/schemas.rs@@ -49,7 +49,7 @@ pub fn schemas(function: &str) -> ControllerSchema {inputs: vec![FieldSchema {name: "tool_id",ty: TypeSchema::String,- comment: "Stable registry id, for example `memory.search` or `tools.web_search`.",+ comment: "Stable registry id, for example `memory.recall` or `tools.web_search`.",required: true,}],outputs: vec![FieldSchema {diff --git a/crates/openhuman-core/src/tools/registry/schemas_tests.rs b/crates/openhuman-core/src/tools/registry/schemas_tests.rsindex b0f4ac9d1d..469113745b 100644--- a/crates/openhuman-core/src/tools/registry/schemas_tests.rs+++ b/crates/openhuman-core/src/tools/registry/schemas_tests.rs@@ -55,12 +55,12 @@ async fn handle_list_returns_registry_object() {.and_then(Value::as_array).expect("tools array");- // `memory.search` is an MCP-transport entry, absent when the `mcp`+ // `memory.recall` is an MCP-transport entry, absent when the `mcp`// feature is compiled out. The behaviour under test is that `list`// returns a populated registry object, so assert against an entry that// exists in the build at hand rather than gating the test away.#[cfg(feature = "mcp")]- let expected = "memory.search";+ let expected = "memory.recall";#[cfg(not(feature = "mcp"))]let expected = "tools.web_search";