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 to orchestration code

Steven Enamakel4093b82cccc1
diff --git a/crates/openhuman-core/src/agent/orchestration/background_delivery.rs b/crates/openhuman-core/src/agent/orchestration/background_delivery.rs
index 34e4dc7af5..63d80d4152 100644
--- a/crates/openhuman-core/src/agent/orchestration/background_delivery.rs
+++ b/crates/openhuman-core/src/agent/orchestration/background_delivery.rs
@@ -138,8 +138,8 @@ fn schedule_delivery_inner(
.push((thread_id.clone(), delay));
#[cfg(not(test))]
let _ = delay; // The owner applies debounce/recovery timing inside its delivery API.
- // Scoped: the thread -> workspace table is keyed per profile, so the
- // delayed task must run under the profile that scheduled it.
+ // Scoped: the thread -> workspace table is keyed per profile, so the
+ // delayed task must run under the profile that scheduled it.
ctx.clone().spawn(async move {
let outcome = try_deliver(ctx.clone(), thread_id.clone(), fence.clone(), wait_idle).await;
if outcome == DeliveryOutcome::ParentBusy {
diff --git a/crates/openhuman-core/src/agent/orchestration/running_subagents.rs b/crates/openhuman-core/src/agent/orchestration/running_subagents.rs
index f07303591f..6708dc6d51 100644
--- a/crates/openhuman-core/src/agent/orchestration/running_subagents.rs
+++ b/crates/openhuman-core/src/agent/orchestration/running_subagents.rs
@@ -7,8 +7,8 @@ mod roster;
mod task_ledger;
pub(crate) use cancel::{
- cancel_all, cancel_by_session_in_workspace, cancel_by_task_with_workspace_reason,
- cancel_for_thread, stop_for_thread, CancelledSubagent,
+ CancelledSubagent, cancel_all, cancel_by_session_in_workspace,
+ cancel_by_task_with_workspace_reason, cancel_for_thread, stop_for_thread,
};
pub(crate) use registry::admit_spawn;
pub(crate) use roster::active_subagents_context_block;
diff --git a/crates/openhuman-core/src/agent/orchestration/running_subagents/task_ledger.rs b/crates/openhuman-core/src/agent/orchestration/running_subagents/task_ledger.rs
index 03cbd66f9a..cbbe54d187 100644
--- a/crates/openhuman-core/src/agent/orchestration/running_subagents/task_ledger.rs
+++ b/crates/openhuman-core/src/agent/orchestration/running_subagents/task_ledger.rs
@@ -11,11 +11,11 @@ use std::path::{Path, PathBuf};
use std::sync::{Arc, OnceLock};
use tinyagents_orchestration::subagent::{
- orphaned_subagent_reason, record_agent_id, record_parent_session, task_status_label, WaitError,
+ WaitError, orphaned_subagent_reason, record_agent_id, record_parent_session, task_status_label,
};
use tinyagents_tasks::{
- open_driver_task_store_or_memory, reconcile_orphaned_tasks, InMemoryTaskStore,
- OrchestrationTaskFilter, TaskStore, TaskStoreRegistry,
+ InMemoryTaskStore, OrchestrationTaskFilter, TaskStore, TaskStoreRegistry,
+ open_driver_task_store_or_memory, reconcile_orphaned_tasks,
};
/// One cached ledger: a workspace and the storage scope it was opened for.
diff --git a/crates/openhuman-core/src/agent/orchestration/tools/spawn_subagent_async_tests.rs b/crates/openhuman-core/src/agent/orchestration/tools/spawn_subagent_async_tests.rs
index 2b9e55d274..3503bbc45b 100644
--- a/crates/openhuman-core/src/agent/orchestration/tools/spawn_subagent_async_tests.rs
+++ b/crates/openhuman-core/src/agent/orchestration/tools/spawn_subagent_async_tests.rs
@@ -452,8 +452,10 @@ fn scoped_instance_advertises_exactly_the_allowlist() {
schema["properties"]["agent_id"]["enum"],
serde_json::json!(["agent_memory", "workflow_builder"])
);
- assert!(schema["properties"]["agent_id"]["description"]
- .as_str()
- .unwrap_or_default()
- .contains("only these are dispatchable"));
+ assert!(
+ schema["properties"]["agent_id"]["description"]
+ .as_str()
+ .unwrap_or_default()
+ .contains("only these are dispatchable")
+ );
}
diff --git a/crates/openhuman-core/src/agent/orchestration/tools/spawn_subagent_tests.rs b/crates/openhuman-core/src/agent/orchestration/tools/spawn_subagent_tests.rs
index b6d95d880d..ad80030ff6 100644
--- a/crates/openhuman-core/src/agent/orchestration/tools/spawn_subagent_tests.rs
+++ b/crates/openhuman-core/src/agent/orchestration/tools/spawn_subagent_tests.rs
@@ -10,9 +10,11 @@ fn parameters_schema_hides_legacy_mode_flags_and_keeps_required_agent_id() {
"legacy `{legacy}` is not advertised"
);
}
- assert!(schema["required"]
- .as_array()
- .is_some_and(|required| { required.iter().any(|key| key.as_str() == Some("agent_id")) }));
+ assert!(
+ schema["required"].as_array().is_some_and(|required| {
+ required.iter().any(|key| key.as_str() == Some("agent_id"))
+ })
+ );
}
#[test]
@@ -22,11 +24,13 @@ fn parameters_schema_advertises_optional_model_override() {
let props = schema.get("properties").expect("schema has properties");
let model = props.get("model").expect("model override advertised");
assert_eq!(model.get("type").and_then(|v| v.as_str()), Some("string"));
- assert!(schema
- .get("required")
- .and_then(|v| v.as_array())
- .map(|arr| arr.iter().all(|s| s.as_str() != Some("model")))
- .unwrap_or(true));
+ assert!(
+ schema
+ .get("required")
+ .and_then(|v| v.as_array())
+ .map(|arr| arr.iter().all(|s| s.as_str() != Some("model")))
+ .unwrap_or(true)
+ );
}
#[tokio::test]
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 0208b1dd43..296ab097fe 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
@@ -377,7 +377,11 @@ async fn unexecuted_tool_call_stub_is_projected_as_incomplete_not_success() {
)
.await
.expect("the asynchronous spawn request is accepted");
- assert!(!accepted.is_error, "completion is asynchronous: {}", accepted.output());
+ assert!(
+ !accepted.is_error,
+ "completion is asynchronous: {}",
+ accepted.output()
+ );
let completed = tokio::time::timeout(std::time::Duration::from_secs(5), async {
loop {