Skip to content

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

style: apply rustfmt formatting across core modules

Steven Enamakel57a4615fb3bf
diff --git a/crates/openhuman-core/src/agent/session_host/prelude_integrations_tests.rs b/crates/openhuman-core/src/agent/session_host/prelude_integrations_tests.rs
index 69282a6996..0826e63131 100644
--- a/crates/openhuman-core/src/agent/session_host/prelude_integrations_tests.rs
+++ b/crates/openhuman-core/src/agent/session_host/prelude_integrations_tests.rs
@@ -85,7 +85,10 @@ fn a_toolkit_connected_between_a_stale_and_an_authoritative_hydration_is_announc
HashSet::from(["mcp_a".to_string()]),
);
assert!(!state.connected_integrations_initialized);
- assert_eq!(state.announced_integrations, HashSet::from(["gmail".into()]));
+ assert_eq!(
+ state.announced_integrations,
+ HashSet::from(["gmail".into()])
+ );
assert!(state.pending_integration_announcement.is_empty());
// Turn 2: the live fetch succeeds and notion is now connected, as is a
@@ -98,7 +101,10 @@ fn a_toolkit_connected_between_a_stale_and_an_authoritative_hydration_is_announc
);
assert!(state.connected_integrations_initialized);
assert!(state.connected_integrations_authoritative);
- assert_eq!(state.pending_integration_announcement, vec!["notion".to_string()]);
+ assert_eq!(
+ state.pending_integration_announcement,
+ vec!["notion".to_string()]
+ );
assert_eq!(state.pending_mcp_announcement, vec!["mcp_b".to_string()]);
assert_eq!(state.connected_integrations.len(), 2);
}
@@ -112,7 +118,10 @@ fn the_first_hydration_seeds_without_announcing() {
true,
HashSet::from(["mcp_a".to_string()]),
);
- assert_eq!(state.announced_integrations, HashSet::from(["gmail".into()]));
+ assert_eq!(
+ state.announced_integrations,
+ HashSet::from(["gmail".into()])
+ );
assert!(state.pending_integration_announcement.is_empty());
assert!(state.pending_mcp_announcement.is_empty());
}
diff --git a/crates/openhuman-core/src/inference/tokenjuice/repl_tools_tests.rs b/crates/openhuman-core/src/inference/tokenjuice/repl_tools_tests.rs
index b24a1538bd..ef0f8ae9ca 100644
--- a/crates/openhuman-core/src/inference/tokenjuice/repl_tools_tests.rs
+++ b/crates/openhuman-core/src/inference/tokenjuice/repl_tools_tests.rs
@@ -477,7 +477,10 @@ fn a_canonical_artifact_path_is_accepted_when_the_workspace_is_a_symlink() {
std::fs::create_dir_all(file.parent().unwrap()).unwrap();
std::fs::write(&file, log_body()).unwrap();
let canonical_file = std::fs::canonicalize(&file).unwrap();
- assert!(!canonical_file.starts_with(&dir), "fixture must differ lexically");
+ assert!(
+ !canonical_file.starts_with(&dir),
+ "fixture must differ lexically"
+ );
let ok = read_tool_result_artifact(&dir, &canonical_file.to_string_lossy(), 1 << 20)
.expect("canonical artifact path must be readable");
@@ -486,7 +489,7 @@ fn a_canonical_artifact_path_is_accepted_when_the_workspace_is_a_symlink() {
let secret = real.join("secret.txt");
std::fs::write(&secret, "needle secret").unwrap();
let canonical_secret = std::fs::canonicalize(&secret).unwrap();
- let err = read_tool_result_artifact(&dir, &canonical_secret.to_string_lossy(), 1 << 20)
- .unwrap_err();
+ let err =
+ read_tool_result_artifact(&dir, &canonical_secret.to_string_lossy(), 1 << 20).unwrap_err();
assert!(!err.contains("needle secret"), "{err}");
}
diff --git a/crates/openhuman-core/src/integrations/composio/tools/connect.rs b/crates/openhuman-core/src/integrations/composio/tools/connect.rs
index 7675d0cc9d..8f20ea1536 100644
--- a/crates/openhuman-core/src/integrations/composio/tools/connect.rs
+++ b/crates/openhuman-core/src/integrations/composio/tools/connect.rs
@@ -98,7 +98,11 @@ pub(super) fn remaining_park_bound(
park_bound: Option<std::time::Duration>,
pre_gate: std::time::Duration,
) -> Option<std::time::Duration> {
- park_bound.map(|bound| bound.saturating_sub(pre_gate).max(COMPOSIO_CONNECT_MIN_PARK))
+ park_bound.map(|bound| {
+ bound
+ .saturating_sub(pre_gate)
+ .max(COMPOSIO_CONNECT_MIN_PARK)
+ })
}
/// Pure core of [`composio_connect_timeout`], kept env-free so it is
diff --git a/crates/openhuman-core/src/modules/search/proxy.rs b/crates/openhuman-core/src/modules/search/proxy.rs
index 673fd804e5..2256714e1b 100644
--- a/crates/openhuman-core/src/modules/search/proxy.rs
+++ b/crates/openhuman-core/src/modules/search/proxy.rs
@@ -197,8 +197,7 @@ pub(super) async fn call_execute_tool<R: serde::de::DeserializeOwned>(
proxy: tinybus::Proxy,
request: ExecuteToolRequest,
) -> tinybus::Result<R> {
- let timeout =
- execute_tool_timeout_for(crate::tools::timeout::tool_execution_timeout_secs());
+ let timeout = execute_tool_timeout_for(crate::tools::timeout::tool_execution_timeout_secs());
tracing::debug!(
tool = %request.name,
timeout_secs = timeout.as_secs(),
diff --git a/crates/openhuman-core/src/security/approval/gate_subagent_tests.rs b/crates/openhuman-core/src/security/approval/gate_subagent_tests.rs
index ce5c377ee2..2719315987 100644
--- a/crates/openhuman-core/src/security/approval/gate_subagent_tests.rs
+++ b/crates/openhuman-core/src/security/approval/gate_subagent_tests.rs
@@ -242,7 +242,10 @@ async fn every_detached_park_on_a_thread_stays_recoverable() {
let gate = Arc::new(gate);
let mut handles = Vec::new();
- for tool in ["media_generate_image_multi_a", "media_generate_video_multi_b"] {
+ for tool in [
+ "media_generate_image_multi_a",
+ "media_generate_video_multi_b",
+ ] {
let g = gate.clone();
handles.push(tokio::spawn(async move {
turn_origin::with_origin(
@@ -269,7 +272,10 @@ async fn every_detached_park_on_a_thread_stays_recoverable() {
let tools: Vec<_> = parked.iter().map(|row| row.tool_name.as_str()).collect();
assert_eq!(
tools,
- vec!["media_generate_image_multi_a", "media_generate_video_multi_b"],
+ vec![
+ "media_generate_image_multi_a",
+ "media_generate_video_multi_b"
+ ],
"both parks must be replayable, oldest first"
);
assert!(gate