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
chore: reformat code for consistent style across multiple files
Steven Enamakel2880845af5f3
diff --git a/crates/openhuman-core/src/core/all.rs b/crates/openhuman-core/src/core/all.rsindex a554a16a37..aeb1ef3bc4 100644--- a/crates/openhuman-core/src/core/all.rs+++ b/crates/openhuman-core/src/core/all.rs@@ -402,7 +402,12 @@ pub fn register_controller_extension(ext: ControllerExtension) -> Result<(), Str.collect();let already: std::collections::BTreeSet<String> = existing.iter()- .map(|g| format!("{}.{}", g.controller.schema.namespace, g.controller.schema.function))+ .map(|g| {+ format!(+ "{}.{}",+ g.controller.schema.namespace, g.controller.schema.function+ )+ }).collect();if !incoming_keys.is_empty() && incoming_keys.iter().all(|k| already.contains(k)) {log::debug!(@@ -1140,7 +1145,8 @@ fn build_internal_only_controllers() -> Vec<GroupedController> {pub fn all_registered_controllers() -> Vec<RegisteredController> {let caps = crate::core::runtime::context::CoreContext::current_memory_capabilities();let view = registry_view();- let found = view.iter()+ let found = view+ .iter().filter(|g| group_allowed(g.group) && capability_allowed_in(caps, g.capability)).map(|g| g.controller.clone()).collect();@@ -1157,7 +1163,8 @@ pub fn all_registered_controllers() -> Vec<RegisteredController> {pub fn all_controller_schemas() -> Vec<ControllerSchema> {let caps = crate::core::runtime::context::CoreContext::current_memory_capabilities();let view = registry_view();- let found = view.iter()+ let found = view+ .iter().filter(|g| group_allowed(g.group) && capability_allowed_in(caps, g.capability)).map(|g| g.controller.schema.clone()).collect();@@ -1301,7 +1308,8 @@ pub fn rpc_method_from_parts(namespace: &str, function: &str) -> Option<String>// method — the DomainSet gate is enforced at dispatch// (`try_invoke_registered_rpc`), not here. See that fn for the rationale.let view = registry_view();- let found = view.iter()+ let found = view+ .iter().find(|g| {g.controller.schema.namespace == namespace && g.controller.schema.function == function})@@ -1330,7 +1338,8 @@ pub fn rpc_method_from_parts(namespace: &str, function: &str) -> Option<String>/// would name a cause that is not the reason the command is unavailable.pub fn capability_for_parts(namespace: &str, function: &str) -> Option<Option<Capability>> {let view = registry_view();- let found = view.iter()+ let found = view+ .iter().find(|g| {g.controller.schema.namespace == namespace && g.controller.schema.function == function})@@ -1347,7 +1356,8 @@ pub fn capability_for_parts(namespace: &str, function: &str) -> Option<Option<Ca/// dispatches a capability-gated method.pub fn capability_for_rpc_method(method: &str) -> Option<Option<Capability>> {let view = registry_view();- let found = view.iter()+ let found = view+ .iter().find(|g| g.controller.rpc_method_name() == method).map(|g| g.capability);found@@ -1371,7 +1381,8 @@ pub fn sole_capability_for_namespace(namespace: &str) -> Option<Capability> {let mut found: Option<Capability> = None;let mut any = false;let view = registry_view();- for grouped in view.iter()+ for grouped in view+ .iter().filter(|g| g.controller.schema.namespace == namespace){any = true;@@ -1409,7 +1420,8 @@ pub fn schema_for_rpc_method(method: &str) -> Option<ControllerSchema> {// a `memory_tree.*` method hidden because the bound driver never advertised// `tree` must not leak back out through a param-validation error.let view = registry_view();- let found = view.iter()+ let found = view+ .iter().chain(internal_registry().iter()).find(|g| {g.controller.rpc_method_name() == method@@ -1615,7 +1627,8 @@ pub async fn try_invoke_registered_rpc(params: Map<String, Value>,) -> Option<Result<Value, String>> {let view = registry_view();- let grouped = view.iter()+ let grouped = view+ .iter().chain(internal_registry().iter()).find(|g| g.controller.rpc_method_name() == method)?;diff --git a/crates/openhuman-core/src/core/all_tests.rs b/crates/openhuman-core/src/core/all_tests.rsindex c254ca5e58..7aca8df1a1 100644--- a/crates/openhuman-core/src/core/all_tests.rs+++ b/crates/openhuman-core/src/core/all_tests.rs@@ -2565,7 +2565,10 @@ async fn registry_extension_is_visible_to_every_lookup_and_dispatches() {Some("openhuman.ext_probe_ping"));assert_eq!(capability_for_parts("ext_probe", "ping"), Some(None));- assert_eq!(capability_for_rpc_method("openhuman.ext_probe_ping"), Some(None));+ assert_eq!(+ capability_for_rpc_method("openhuman.ext_probe_ping"),+ Some(None)+ );assert!(schema_for_rpc_method("openhuman.ext_probe_ping").is_some());assert!(all_controller_schemas().iter()@@ -2640,5 +2643,9 @@ async fn registry_extension_is_gated_by_its_domain_group() {)}).await;- assert_eq!(hidden, (true, true), "hosted: false must hide the extension");+ assert_eq!(+ hidden,+ (true, true),+ "hosted: false must hide the extension"+ );}diff --git a/crates/openhuman-tinyhumans/src/hosted/referral/ops_tests.rs b/crates/openhuman-tinyhumans/src/hosted/referral/ops_tests.rsindex 68944514a4..c90d23ce7f 100644--- a/crates/openhuman-tinyhumans/src/hosted/referral/ops_tests.rs+++ b/crates/openhuman-tinyhumans/src/hosted/referral/ops_tests.rs@@ -1,9 +1,11 @@use super::*;-use openhuman_core::security::credentials::{AuthService, APP_SESSION_PROVIDER, DEFAULT_AUTH_PROFILE_NAME};use axum::{routing::{get, post},Json, Router,};+use openhuman_core::security::credentials::{+ AuthService, APP_SESSION_PROVIDER, DEFAULT_AUTH_PROFILE_NAME,+};use tempfile::TempDir;fn test_config(tmp: &TempDir) -> Config {diff --git a/crates/openhuman-tinyhumans/src/install.rs b/crates/openhuman-tinyhumans/src/install.rsindex 37c4272cde..c796f78819 100644--- a/crates/openhuman-tinyhumans/src/install.rs+++ b/crates/openhuman-tinyhumans/src/install.rs@@ -10,8 +10,8 @@use std::sync::{Arc, Mutex, OnceLock};use openhuman_core::api::transport::{install_backend_transport, installed_backend_transport};-use openhuman_core::core::all::register_controller_extension;use openhuman_core::api::{set_product_identity, ProductIdentity};+use openhuman_core::core::all::register_controller_extension;use crate::transport::SdkBackendTransport;