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
refactor(caps_host): simplify native tool invocation logic
Steven Enamakel3fc44bbddef0
diff --git a/crates/openhuman-core/src/flows/caps_host/tools/native.rs b/crates/openhuman-core/src/flows/caps_host/tools/native.rsindex 0860725255..42d7c827e5 100644--- a/crates/openhuman-core/src/flows/caps_host/tools/native.rs+++ b/crates/openhuman-core/src/flows/caps_host/tools/native.rs@@ -31,14 +31,9 @@ impl ToolBackend for NativeToolBackend {args: Value,_conn: Option<&str>,) -> Result<Value> {- flow_backend::invoke(- ctx.config,- slug,- args,- &NativeFlowPolicyHooks { ctx },- )- .await- .map_err(EngineError::Capability)+ flow_backend::invoke(ctx.config, slug, args, &NativeFlowPolicyHooks { ctx })+ .await+ .map_err(EngineError::Capability)}}diff --git a/crates/openhuman-core/src/flows/caps_host/tools/native_backend.rs b/crates/openhuman-core/src/flows/caps_host/tools/native_backend.rsindex 68ac0f7f52..eb127a8a7a 100644--- a/crates/openhuman-core/src/flows/caps_host/tools/native_backend.rs+++ b/crates/openhuman-core/src/flows/caps_host/tools/native_backend.rs@@ -55,11 +55,11 @@ pub(crate) async fn invoke(let result = crate::tools::native_ops::execute_tool_with_security(config, policy, tool_name, args, false,)- .await- .and_then(|outcome| {- reject_failed_native_tool_result(slug, &outcome.result)- .map(|()| native_tool_payload(&outcome.result))- });+ .await+ .and_then(|outcome| {+ reject_failed_native_tool_result(slug, &outcome.result)+ .map(|()| native_tool_payload(&outcome.result))+ });hooks.record_execution(audit_id.as_deref(), &result);result}diff --git a/crates/openhuman-core/src/tools/native_ops.rs b/crates/openhuman-core/src/tools/native_ops.rsindex 1f695b164d..e38d80a6d8 100644--- a/crates/openhuman-core/src/tools/native_ops.rs+++ b/crates/openhuman-core/src/tools/native_ops.rs@@ -263,4 +263,3 @@ pub async fn execute_tool_with_security(result,})}-