Skip to content

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

style: apply rustfmt import ordering and line wrapping

Steven Enamakel96e1979ff27b
diff --git a/crates/openhuman-core/src/core/all_bound_controller_tests.rs b/crates/openhuman-core/src/core/all_bound_controller_tests.rs
index b3aba029be..27ac3d8566 100644
--- a/crates/openhuman-core/src/core/all_bound_controller_tests.rs
+++ b/crates/openhuman-core/src/core/all_bound_controller_tests.rs
@@ -1,8 +1,8 @@
use super::*;
-use crate::core::{FieldSchema, TypeSchema, runtime::DispatchCtx};
+use crate::core::{runtime::DispatchCtx, FieldSchema, TypeSchema};
use std::sync::{
- Mutex,
atomic::{AtomicUsize, Ordering},
+ Mutex,
};
static CALLS: AtomicUsize = AtomicUsize::new(0);
@@ -71,11 +71,9 @@ fn production_registry_binds_every_socket_controller_to_its_declared_parser() {
contracts.len(),
"complete raw socket inventory"
);
- assert!(
- entries
- .iter()
- .all(|entry| entry.schema.namespace == "socket")
- );
+ assert!(entries
+ .iter()
+ .all(|entry| entry.schema.namespace == "socket"));
assert_eq!(
entries
.iter()
@@ -411,11 +409,9 @@ fn production_registry_binds_mcp_registry_get_to_its_declared_parser() {
.filter(|grouped| grouped.controller.schema.method_name() == "mcp_clients.registry_get")
.collect();
assert_eq!(entries.len(), 1, "registry_get has one public raw entry");
- assert!(
- !internal_registry()
- .iter()
- .any(|grouped| grouped.controller.schema.method_name() == "mcp_clients.registry_get")
- );
+ assert!(!internal_registry()
+ .iter()
+ .any(|grouped| grouped.controller.schema.method_name() == "mcp_clients.registry_get"));
let grouped = entries[0];
assert_eq!(grouped.group, DomainGroup::Mcp);
let entry = &grouped.controller;
@@ -449,11 +445,9 @@ fn production_registry_binds_mcp_registry_get_to_its_declared_parser() {
.expect("positive contract includes its required input")
.required = false;
}
- assert!(
- required_input_contract(&broken, contract.required)
- .unwrap_err()
- .contains("required inputs mismatch")
- );
+ assert!(required_input_contract(&broken, contract.required)
+ .unwrap_err()
+ .contains("required inputs mismatch"));
}
}
@@ -471,11 +465,9 @@ fn production_registry_binds_computer_status_to_its_declared_parser() {
1,
"computer_status has one internal raw registry entry"
);
- assert!(
- !registry()
- .iter()
- .any(|grouped| grouped.controller.schema.method_name() == "modules.computer_status")
- );
+ assert!(!registry()
+ .iter()
+ .any(|grouped| grouped.controller.schema.method_name() == "modules.computer_status"));
let grouped = entries[0];
assert_eq!(grouped.group, DomainGroup::Modules);
let entry = &grouped.controller;
@@ -555,11 +547,9 @@ fn production_registry_binds_composio_execute_to_its_declared_parser() {
.expect("independent required-field contract matches production schema");
let mut missing_required = entry.schema.clone();
missing_required.inputs.retain(|field| field.name != "tool");
- assert!(
- required_input_contract(&missing_required, &["tool"])
- .unwrap_err()
- .contains("required inputs mismatch")
- );
+ assert!(required_input_contract(&missing_required, &["tool"])
+ .unwrap_err()
+ .contains("required inputs mismatch"));
let mut optional_required = entry.schema.clone();
optional_required
.inputs
@@ -567,11 +557,9 @@ fn production_registry_binds_composio_execute_to_its_declared_parser() {
.find(|field| field.name == "tool")
.expect("tool schema field")
.required = false;
- assert!(
- required_input_contract(&optional_required, &["tool"])
- .unwrap_err()
- .contains("required inputs mismatch")
- );
+ assert!(required_input_contract(&optional_required, &["tool"])
+ .unwrap_err()
+ .contains("required inputs mismatch"));
for example in [
json!({"tool":"GMAIL_SEND_EMAIL"}),
diff --git a/crates/openhuman-core/src/platform/socket/mod.rs b/crates/openhuman-core/src/platform/socket/mod.rs
index 925792e233..bfc4633ea2 100644
--- a/crates/openhuman-core/src/platform/socket/mod.rs
+++ b/crates/openhuman-core/src/platform/socket/mod.rs
@@ -14,7 +14,7 @@ pub mod types;
pub mod url;
pub(crate) mod ws_loop;
-pub use manager::{SocketManager, global_socket_manager, set_global_socket_manager};
+pub use manager::{global_socket_manager, set_global_socket_manager, SocketManager};
pub use schemas::{
all_controller_schemas as all_socket_controller_schemas,
all_registered_controllers as all_socket_registered_controllers,
diff --git a/crates/openhuman-core/src/platform/socket/schemas.rs b/crates/openhuman-core/src/platform/socket/schemas.rs
index 85e47d9173..a9c3159ebb 100644
--- a/crates/openhuman-core/src/platform/socket/schemas.rs
+++ b/crates/openhuman-core/src/platform/socket/schemas.rs
@@ -1,7 +1,7 @@
//! Controller schemas and RPC handlers for the `socket` namespace.
use crate::core::runtime::DispatchCtx;
-use serde_json::{Map, Value, json};
+use serde_json::{json, Map, Value};
use crate::core::all::{
BoundRegisteredController, ControllerEntry, ControllerFuture, ControllerTask,
@@ -141,7 +141,8 @@ pub fn schemas(function: &str) -> ControllerSchema {
"connect_with_session" => ControllerSchema {
namespace: "socket",
function: "connect_with_session",
- description: "Connect to the backend using the stored session token and configured API URL.",
+ description:
+ "Connect to the backend using the stored session token and configured API URL.",
inputs: vec![],
outputs: vec![FieldSchema {
name: "status",
diff --git a/crates/openhuman-core/src/platform/socket/schemas_tests.rs b/crates/openhuman-core/src/platform/socket/schemas_tests.rs
index de8d9e02b8..2a9b3ee7ff 100644
--- a/crates/openhuman-core/src/platform/socket/schemas_tests.rs
+++ b/crates/openhuman-core/src/platform/socket/schemas_tests.rs
@@ -1,7 +1,7 @@
use super::*;
use crate::core::all::{
- ControllerHandler, ControllerParamContract, assert_schema_controller_parity,
- verify_parameter_schema,
+ assert_schema_controller_parity, verify_parameter_schema, ControllerHandler,
+ ControllerParamContract,
};
use crate::core::runtime::DispatchCtx;