The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
chore: reformat code and reorder module declarations
Steven Enamakel732d6f453379
diff --git a/crates/openhuman-core/src/agent/orchestration/running_subagents/roster.rs b/crates/openhuman-core/src/agent/orchestration/running_subagents/roster.rsindex 5e780f2d5d..468d9b2112 100644--- a/crates/openhuman-core/src/agent/orchestration/running_subagents/roster.rs+++ b/crates/openhuman-core/src/agent/orchestration/running_subagents/roster.rs@@ -10,9 +10,7 @@ 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.rsindex 86356179ed..c32d79d9b8 100644--- a/crates/openhuman-core/src/agent/orchestration/tools/steer_subagent.rs+++ b/crates/openhuman-core/src/agent/orchestration/tools/steer_subagent.rs@@ -175,8 +175,7 @@ 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.rsindex a820485232..e10e33742b 100644--- a/crates/openhuman-core/src/agent/orchestration/tools/wait_subagent.rs+++ b/crates/openhuman-core/src/agent/orchestration/tools/wait_subagent.rs@@ -201,8 +201,7 @@ 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.rsindex 4383b7d738..30a18b8988 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 runtime_adapter_tests;-#[cfg(test)]mod transcript_compat_tests;+#[cfg(test)]+mod runtime_adapter_tests;diff --git a/crates/openhuman-core/src/agent/tinyagents/mod.rs b/crates/openhuman-core/src/agent/tinyagents/mod.rsindex 65befcbf11..106521c6de 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 = "prompt_cache_golden_tests.rs"]-mod prompt_cache_golden_tests;#[cfg(test)]#[path = "tinyagents_tests.rs"]mod tests;+#[cfg(test)]+#[path = "prompt_cache_golden_tests.rs"]+mod prompt_cache_golden_tests;diff --git a/crates/openhuman-core/src/inference/provider/types.rs b/crates/openhuman-core/src/inference/provider/types.rsindex 3f2f67f48f..6e262cdd27 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 plusdiff --git a/crates/openhuman-core/src/web_chat/web_tests.rs b/crates/openhuman-core/src/web_chat/web_tests.rsindex 0e23843dcb..78f283699b 100644--- a/crates/openhuman-core/src/web_chat/web_tests.rs+++ b/crates/openhuman-core/src/web_chat/web_tests.rs@@ -2,9 +2,10 @@ 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,@@ -120,10 +121,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_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_error_code_classification_tests.rs"]+mod error_code_classification_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.rsindex e70e633334..21314d0676 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.rsindex ee2a05ace6..c50d916e62 100644--- a/tests/embedded_server_shutdown_e2e.rs+++ b/tests/embedded_server_shutdown_e2e.rs@@ -55,13 +55,8 @@ 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;diff --git a/vendor/tinymemory b/vendor/tinymemoryindex c9c94a9a50..0c0042c0eb 160000--- a/vendor/tinymemory+++ b/vendor/tinymemory@@ -1 +1 @@-Subproject commit c9c94a9a506914777482c35c16a1128729ea7151+Subproject commit 0c0042c0ebc81541b472c8d8573f7e29250ca590