Skip to content

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

merge: integrate main and preserve MCP argument coverage

Steven Enamakel94bc128c3ba9
diff --cc crates/openhuman-core/src/mcp/registry/tools_tests.rs
index bdfe5f7e07,032e7fc560..41d1d99494
--- a/crates/openhuman-core/src/mcp/registry/tools_tests.rs
+++ b/crates/openhuman-core/src/mcp/registry/tools_tests.rs
@@@ -408,18 -413,23 +413,25 @@@ async fn tool_call_preserves_missing_ar
connected: true,
..ToolCallPort::default()
};
+ let arguments = SharedArc::clone(&port.arguments);
+ let normalized_arguments = SharedArc::clone(&port.normalized_arguments);
crate::mcp::module_client::McpConfiguredClient::install_test_port(&config, Box::new(port))
.expect("test module port");
+ let tool = McpRegistryToolCallTool::new(Arc::clone(&config));
- let result = McpRegistryToolCallTool::new(Arc::clone(&config))
- .execute(json!({
- "server_id": "srv-1",
- "tool_name": "forecast"
- }))
- .await
- .expect("call");
- assert!(!result.is_error, "{}", result.text());
+ for args in [
+ json!({"server_id":"srv-1", "tool_name":"forecast"}),
+ json!({"server_id":"srv-1", "tool_name":"forecast", "arguments":null}),
+ ] {
+ tool.execute(args)
+ .await
+ .expect("missing and null arguments normalize successfully");
+ }
- assert_eq!(arguments.lock().unwrap().as_slice(), &[json!({})]);
+ assert_eq!(
+ normalized_arguments.lock().unwrap().as_slice(),
+ &[None, Some(Value::Null)],
+ "the host must preserve the bus distinction between omitted arguments and JSON null"
+ );
++ assert_eq!(arguments.lock().unwrap().as_slice(), &[json!({}), json!({})]);
}