Skip to content

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

chore: reformat multi-line expressions for consistency

Steven Enamakelf590337644e9
diff --git a/crates/openhuman-core/src/agent/debug/dump_writer_tests.rs b/crates/openhuman-core/src/agent/debug/dump_writer_tests.rs
index 9b50b6cda9..2012035efd 100644
--- a/crates/openhuman-core/src/agent/debug/dump_writer_tests.rs
+++ b/crates/openhuman-core/src/agent/debug/dump_writer_tests.rs
@@ -27,10 +27,7 @@ fn golden_layout_matches_cli_format() {
// File set exactly as expected.
assert_eq!(out.prompt_paths.len(), 2);
assert_eq!(out.prompt_paths[0], dir.path().join("1_orchestrator.md"));
- assert_eq!(
- out.prompt_paths[1],
- dir.path().join("2_researcher.md")
- );
+ assert_eq!(out.prompt_paths[1], dir.path().join("2_researcher.md"));
assert_eq!(out.summary_path, dir.path().join("SUMMARY.txt"));
// Prompt body is raw bytes.
diff --git a/crates/openhuman-core/src/agent/orchestration/tools/spawn_parallel_agents_tests.rs b/crates/openhuman-core/src/agent/orchestration/tools/spawn_parallel_agents_tests.rs
index 255bdb18f9..518579b999 100644
--- a/crates/openhuman-core/src/agent/orchestration/tools/spawn_parallel_agents_tests.rs
+++ b/crates/openhuman-core/src/agent/orchestration/tools/spawn_parallel_agents_tests.rs
@@ -116,12 +116,9 @@ fn parent_context(max_parallel_tools: usize) -> ParentExecutionContext {
ParentExecutionContext {
workspace_descriptor: None,
agent_definition_id: "orchestrator".into(),
- allowed_subagent_ids: [
- "researcher".to_string(),
- "critic".to_string(),
- ]
- .into_iter()
- .collect(),
+ allowed_subagent_ids: ["researcher".to_string(), "critic".to_string()]
+ .into_iter()
+ .collect(),
turn_model_source: crate::agent::tinyagents::TurnModelSource::from_model(model),
all_tools: Arc::new(Vec::new()),
all_tool_specs: Arc::new(Vec::new()),
diff --git a/crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_tests.rs b/crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_tests.rs
index c955f8b242..b7b36e5345 100644
--- a/crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_tests.rs
+++ b/crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_tests.rs
@@ -202,7 +202,9 @@ async fn continue_subagent_resumes_idle_durable_session_e2e() {
let _ = env_logger::builder().is_test(true).try_init();
let _ = AgentDefinitionRegistry::init_global_builtins();
let registry = AgentDefinitionRegistry::global().expect("registry");
- let definition = registry.get("task_manager_agent").expect("task_manager_agent definition");
+ let definition = registry
+ .get("task_manager_agent")
+ .expect("task_manager_agent definition");
let workspace = tempfile::TempDir::new().expect("workspace");
let provider = Arc::new(ScriptedModel::new(vec![(
"continue-durable-canary",
@@ -416,9 +418,7 @@ fn parent_context(
ParentExecutionContext {
workspace_descriptor: None,
agent_definition_id: "orchestrator".into(),
- allowed_subagent_ids: ["task_manager_agent".to_string()]
- .into_iter()
- .collect(),
+ allowed_subagent_ids: ["task_manager_agent".to_string()].into_iter().collect(),
turn_model_source: crate::agent::tinyagents::TurnModelSource::from_model(model),
all_tools: Arc::new(Vec::new()),
all_tool_specs: Arc::new(Vec::new()),
diff --git a/crates/openhuman-core/src/agent/session_host/builder/factory_provider_role_tests_tests.rs b/crates/openhuman-core/src/agent/session_host/builder/factory_provider_role_tests_tests.rs
index 99e1abc96b..268b38cd74 100644
--- a/crates/openhuman-core/src/agent/session_host/builder/factory_provider_role_tests_tests.rs
+++ b/crates/openhuman-core/src/agent/session_host/builder/factory_provider_role_tests_tests.rs
@@ -52,15 +52,9 @@ fn auto_prefers_native_when_supported_never_pformat() {
DispatcherKind::Native
);
// Text-only provider defaults to JSON-in-tag, NOT P-Format.
- assert_eq!(
- resolve_dispatcher_kind("auto", false),
- DispatcherKind::Xml
- );
+ assert_eq!(resolve_dispatcher_kind("auto", false), DispatcherKind::Xml);
// An unrecognized value behaves like "auto".
- assert_eq!(
- resolve_dispatcher_kind("bogus", false),
- DispatcherKind::Xml
- );
+ assert_eq!(resolve_dispatcher_kind("bogus", false), DispatcherKind::Xml);
}
#[test]
@@ -69,10 +63,7 @@ fn explicit_choices_are_honoured_including_opt_in_pformat() {
resolve_dispatcher_kind("native", false),
DispatcherKind::Native
);
- assert_eq!(
- resolve_dispatcher_kind("xml", true),
- DispatcherKind::Xml
- );
+ assert_eq!(resolve_dispatcher_kind("xml", true), DispatcherKind::Xml);
// P-Format is only ever selected when explicitly requested.
assert_eq!(
resolve_dispatcher_kind("pformat", true),
diff --git a/crates/openhuman-core/src/agent/tinyagents/turn_models.rs b/crates/openhuman-core/src/agent/tinyagents/turn_models.rs
index a67299d96e..d20bd13e7c 100644
--- a/crates/openhuman-core/src/agent/tinyagents/turn_models.rs
+++ b/crates/openhuman-core/src/agent/tinyagents/turn_models.rs
@@ -213,13 +213,8 @@ fn build_turn_models_crate(
})
.unwrap_or_else(|| factory::resolves_to_managed_backend(role, config));
if managed {
- let (backend, _) = factory::make_openhuman_backend_model_for_thread(
- role,
- config,
- m,
- true,
- thread_id,
- )?;
+ let (backend, _) =
+ factory::make_openhuman_backend_model_for_thread(role, config, m, true, thread_id)?;
return Ok(Arc::new(RouteRecordingModel::new(
backend,
ResolvedModelRoute::new("openhuman", m, m),
@@ -269,11 +264,7 @@ fn build_turn_models_crate(
let tier_role = factory::role_for_model_tier(tier);
let route = if factory::resolves_to_managed_backend(tier_role, config) {
factory::make_openhuman_backend_model_for_thread(
- tier_role,
- config,
- tier,
- true,
- thread_id,
+ tier_role, config, tier, true, thread_id,
)
.map(|(backend, _)| (backend, "openhuman".to_string(), tier.to_string()))
} else {