Skip to content

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

chore: reformat long lines and reorder module declarations

Steven Enamakel1b799e9341f9
diff --git a/crates/openhuman-core/src/agent/orchestration/running_subagents/roster.rs b/crates/openhuman-core/src/agent/orchestration/running_subagents/roster.rs
index 468d9b2112..5e780f2d5d 100644
--- a/crates/openhuman-core/src/agent/orchestration/running_subagents/roster.rs
+++ b/crates/openhuman-core/src/agent/orchestration/running_subagents/roster.rs
@@ -10,7 +10,9 @@ use crate::agent::orchestration::fleet_tools::FleetToolSet;
/// read live from its watch channel (ordered by `agent_id` then `task_id`).
pub(crate) fn snapshot_for_parent(parent_session: &str) -> Vec<SubagentSnapshot> {
snapshot_for_owner(registry(), parent_session).unwrap_or_else(|err| {
- log::warn!("[running_subagents] roster unavailable parent_session={parent_session} err={err:?}");
+ log::warn!(
+ "[running_subagents] roster unavailable parent_session={parent_session} err={err:?}"
+ );
Vec::new()
})
}
diff --git a/crates/openhuman-core/src/agent/orchestration/tools/steer_subagent.rs b/crates/openhuman-core/src/agent/orchestration/tools/steer_subagent.rs
index c32d79d9b8..86356179ed 100644
--- a/crates/openhuman-core/src/agent/orchestration/tools/steer_subagent.rs
+++ b/crates/openhuman-core/src/agent/orchestration/tools/steer_subagent.rs
@@ -175,7 +175,8 @@ impl SteerSubagentTool {
}
Err(tinyagents_orchestration::subagent::WaitError::RegistryPoisoned) => {
return Ok(ToolResult::error(
- "steer_subagent: the sub-agent registry is unavailable; try again.".to_string(),
+ "steer_subagent: the sub-agent registry is unavailable; try again."
+ .to_string(),
));
}
}
diff --git a/crates/openhuman-core/src/agent/orchestration/tools/wait_subagent.rs b/crates/openhuman-core/src/agent/orchestration/tools/wait_subagent.rs
index e10e33742b..a820485232 100644
--- a/crates/openhuman-core/src/agent/orchestration/tools/wait_subagent.rs
+++ b/crates/openhuman-core/src/agent/orchestration/tools/wait_subagent.rs
@@ -201,7 +201,8 @@ impl WaitSubagentTool {
}
Err(WaitError::RegistryPoisoned) => {
return Ok(ToolResult::error(
- "wait_subagent: the sub-agent registry is unavailable; try again.".to_string(),
+ "wait_subagent: the sub-agent registry is unavailable; try again."
+ .to_string(),
));
}
}
diff --git a/crates/openhuman-core/src/agent/session_host/mod.rs b/crates/openhuman-core/src/agent/session_host/mod.rs
index 30a18b8988..4383b7d738 100644
--- a/crates/openhuman-core/src/agent/session_host/mod.rs
+++ b/crates/openhuman-core/src/agent/session_host/mod.rs
@@ -71,6 +71,6 @@ mod artifact_wiring;
#[cfg(test)]
mod orphaned_head_resume_tests;
#[cfg(test)]
-mod transcript_compat_tests;
-#[cfg(test)]
mod runtime_adapter_tests;
+#[cfg(test)]
+mod transcript_compat_tests;
diff --git a/crates/openhuman-core/src/agent/tinyagents/mod.rs b/crates/openhuman-core/src/agent/tinyagents/mod.rs
index 106521c6de..65befcbf11 100644
--- a/crates/openhuman-core/src/agent/tinyagents/mod.rs
+++ b/crates/openhuman-core/src/agent/tinyagents/mod.rs
@@ -93,9 +93,9 @@ use turn_policy::{
run_policy_for, DEFAULT_AGENT_TURN_TIMEOUT_SECS, DEFAULT_MODEL_CALL_TIMEOUT_SECS,
};
-#[cfg(test)]
-#[path = "tinyagents_tests.rs"]
-mod tests;
#[cfg(test)]
#[path = "prompt_cache_golden_tests.rs"]
mod prompt_cache_golden_tests;
+#[cfg(test)]
+#[path = "tinyagents_tests.rs"]
+mod tests;
diff --git a/crates/openhuman-core/src/inference/failure_copy/mod.rs b/crates/openhuman-core/src/inference/failure_copy/mod.rs
index 5e1972b121..14975ab319 100644
--- a/crates/openhuman-core/src/inference/failure_copy/mod.rs
+++ b/crates/openhuman-core/src/inference/failure_copy/mod.rs
@@ -13,10 +13,10 @@
mod halt;
mod table;
+#[cfg(test)]
+pub(crate) use halt::TerminalInferenceFailure;
pub(crate) use halt::{
recoverable_identical_halt_summary, recoverable_no_progress_halt_summary,
terminal_inference_failure_kind, terminal_inference_halt_summary, user_actionable_escalation,
};
-#[cfg(test)]
-pub(crate) use halt::TerminalInferenceFailure;
pub(crate) use table::{failure_copy, FailureClass};
diff --git a/crates/openhuman-core/src/inference/provider/types.rs b/crates/openhuman-core/src/inference/provider/types.rs
index 6e262cdd27..3f2f67f48f 100644
--- a/crates/openhuman-core/src/inference/provider/types.rs
+++ b/crates/openhuman-core/src/inference/provider/types.rs
@@ -1,8 +1,8 @@
+use tinyinference_llm::usage::Usage;
/// Token usage returned by a provider. Defined in the contract crate because
/// the extracted memory subsystem threads it out of summarisation runs; every
/// existing `inference::provider::UsageInfo` path keeps naming this one type.
pub use tinymemory_api::host::UsageInfo;
-use tinyinference_llm::usage::Usage;
use tinytools_agent::dialect::NativeToolCall;
/// Token usage returned by a provider: the vendor [`Usage`] token counts plus
diff --git a/crates/openhuman-core/src/web_chat/web_tests.rs b/crates/openhuman-core/src/web_chat/web_tests.rs
index 78f283699b..0e23843dcb 100644
--- a/crates/openhuman-core/src/web_chat/web_tests.rs
+++ b/crates/openhuman-core/src/web_chat/web_tests.rs
@@ -2,10 +2,9 @@ use super::{
all_web_channel_controller_schemas, all_web_channel_registered_controllers, cancel_chat,
channel_web_cancel, channel_web_queue_clear, channel_web_queue_remove,
channel_web_queue_status, classify_inference_error, drain_queued_turns_for_test,
- event_session_id_for, generic_inference_error_user_message,
- in_flight_entries_for_test, inference_budget_exceeded_user_message,
- is_inference_budget_exceeded_error, key_for, locale_reply_directive,
- normalize_model_override, parallel_in_flight_entries_for_test,
+ event_session_id_for, generic_inference_error_user_message, in_flight_entries_for_test,
+ inference_budget_exceeded_user_message, is_inference_budget_exceeded_error, key_for,
+ locale_reply_directive, normalize_model_override, parallel_in_flight_entries_for_test,
provider_role_for_model_override, schemas, sentry_suppression_reason,
set_test_forced_run_chat_task_error, set_test_run_chat_task_block, start_chat,
subscribe_web_channel_events, ChatRequestMetadata, ClassifiedError, StartChatError,
@@ -121,10 +120,10 @@ async fn wait_for_parallel<F: Fn(&[(String, String)]) -> bool>(pred: F) -> Vec<(
#[path = "web_tests_cancel_scoping_tests.rs"]
mod cancel_scoping_tests;
-#[path = "web_tests_error_copy_fixture_tests.rs"]
-mod error_copy_fixture_tests;
#[path = "web_tests_error_code_classification_tests.rs"]
mod error_code_classification_tests;
+#[path = "web_tests_error_copy_fixture_tests.rs"]
+mod error_copy_fixture_tests;
#[path = "web_tests_queue_acceptance_tests.rs"]
mod queue_acceptance_tests;
#[path = "web_tests_rate_limit_classification_tests.rs"]
diff --git a/tests/config_auth_app_state_connectivity_e2e.rs b/tests/config_auth_app_state_connectivity_e2e.rs
index 21314d0676..e70e633334 100644
--- a/tests/config_auth_app_state_connectivity_e2e.rs
+++ b/tests/config_auth_app_state_connectivity_e2e.rs
@@ -20,8 +20,8 @@ use tempfile::{tempdir, TempDir};
use openhuman_core::config::schema::{
AuditConfig, CapabilityProviderConfig, CapabilityProviderTrustState, DashboardConfig,
DingTalkConfig, DiscordConfig, EventStreamConfig, IrcConfig, LarkConfig, MatrixConfig,
- MemoryConfig, ModelHealthConfig, ProxyConfig, ProxyScope, QQConfig, ResourceLimitsConfig, SandboxConfig,
- SecurityConfig, SlackConfig, TelegramConfig, WebhookConfig, WhatsAppConfig,
+ MemoryConfig, ModelHealthConfig, ProxyConfig, ProxyScope, QQConfig, ResourceLimitsConfig,
+ SandboxConfig, SecurityConfig, SlackConfig, TelegramConfig, WebhookConfig, WhatsAppConfig,
};
use openhuman_core::config::{
clear_active_user, default_projects_dir, pre_login_user_dir, read_active_user_id,
diff --git a/tests/embedded_server_shutdown_e2e.rs b/tests/embedded_server_shutdown_e2e.rs
index c50d916e62..ee2a05ace6 100644
--- a/tests/embedded_server_shutdown_e2e.rs
+++ b/tests/embedded_server_shutdown_e2e.rs
@@ -55,8 +55,13 @@ async fn shutdown_token_stops_axum_listener_within_timeout() {
let shutdown_token = CancellationToken::new();
let server_token = shutdown_token.clone();
let server = tokio::spawn(async move {
- openhuman_rpc::server::run_server_embedded(Some("127.0.0.1"), Some(port), false, server_token)
- .await
+ openhuman_rpc::server::run_server_embedded(
+ Some("127.0.0.1"),
+ Some(port),
+ false,
+ server_token,
+ )
+ .await
});
wait_until_port(port, true).await;