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 and reorder imports

Steven Enamakel7062bcf7f0ac
diff --git a/crates/openhuman-cli/src/bin/library_profile/mock.rs b/crates/openhuman-cli/src/bin/library_profile/mock.rs
index 1a81b03bb3..43daa15af8 100644
--- a/crates/openhuman-cli/src/bin/library_profile/mock.rs
+++ b/crates/openhuman-cli/src/bin/library_profile/mock.rs
@@ -206,8 +206,7 @@ impl SubagentMock {
/// every marker). The memory agent's system
/// prompt names it a memory retrieval specialist, so it matches neither header.
fn is_worker_turn(&self, joined: &str) -> bool {
- self.worker_index(joined).is_some()
- && !joined.contains("Agent: orchestrator")
+ self.worker_index(joined).is_some() && !joined.contains("Agent: orchestrator")
}
/// Build the fan-out tool call delegating to K parallel `agent_memory` workers. Only
diff --git a/crates/openhuman-core/src/agent/goals/runtime.rs b/crates/openhuman-core/src/agent/goals/runtime.rs
index 974705c44c..311d6865cd 100644
--- a/crates/openhuman-core/src/agent/goals/runtime.rs
+++ b/crates/openhuman-core/src/agent/goals/runtime.rs
@@ -185,8 +185,7 @@ pub async fn account_turn_against_goal(
let prev_tokens_used = prev.tokens_used;
let store = goals_store(workspace_dir);
- match crate_budget::account_turn(&store, &thread_id, input, output, secs, true).await
- {
+ match crate_budget::account_turn(&store, &thread_id, input, output, secs, true).await {
Ok(Some(updated)) => {
tracing::debug!(
thread_id = %thread_id,
diff --git a/crates/openhuman-core/src/agent/orchestration/parent_context/builder_tests.rs b/crates/openhuman-core/src/agent/orchestration/parent_context/builder_tests.rs
index 264d94e50a..37b6e493f3 100644
--- a/crates/openhuman-core/src/agent/orchestration/parent_context/builder_tests.rs
+++ b/crates/openhuman-core/src/agent/orchestration/parent_context/builder_tests.rs
@@ -30,13 +30,9 @@ async fn no_ambient_parent_outside_with_root_parent() {
#[tokio::test]
async fn with_root_parent_installs_parent_for_inner_future() {
let (_dir, config) = test_config();
- let observed = with_root_parent(
- &config,
- "cron",
- "cron",
- "cron",
- async { current_parent().map(|p| p.agent_definition_id) },
- )
+ let observed = with_root_parent(&config, "cron", "cron", "cron", async {
+ current_parent().map(|p| p.agent_definition_id)
+ })
.await
.expect("root parent builds from config");
assert_eq!(
diff --git a/crates/openhuman-core/src/agent/session_host/builder/factory.rs b/crates/openhuman-core/src/agent/session_host/builder/factory.rs
index c465c80072..bb731ff434 100644
--- a/crates/openhuman-core/src/agent/session_host/builder/factory.rs
+++ b/crates/openhuman-core/src/agent/session_host/builder/factory.rs
@@ -326,8 +326,7 @@ impl OpenHumanSessionHost {
let target_is_lead = target_def
.map(|def| !def.subagents.is_empty())
.unwrap_or(true);
- if let Some(pinned_model) = config.configured_agent_model(target_agent_id, target_is_lead)
- {
+ if let Some(pinned_model) = config.configured_agent_model(target_agent_id, target_is_lead) {
log::debug!(
"[session-builder] agent_id={} using config-level model pin model={}",
target_agent_id,
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 7e59f595de..190a1a100a 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
@@ -6,26 +6,14 @@ fn legacy_orchestrator_fallback_defaults_to_chat() {
assert_eq!(provider_role_for(Some("chat-v1")), "chat");
assert_eq!(provider_role_for(None), "chat");
// A legacy heavy default_model tier still falls through to chat.
- assert_eq!(
- provider_role_for(Some("reasoning-v1")),
- "chat"
- );
+ assert_eq!(provider_role_for(Some("reasoning-v1")), "chat");
}
#[test]
fn explicit_hints_route_to_workload() {
- assert_eq!(
- provider_role_for(Some("hint:agentic")),
- "agentic"
- );
- assert_eq!(
- provider_role_for(Some("hint:reasoning")),
- "reasoning"
- );
- assert_eq!(
- provider_role_for(Some("hint:coding")),
- "coding"
- );
+ assert_eq!(provider_role_for(Some("hint:agentic")), "agentic");
+ assert_eq!(provider_role_for(Some("hint:reasoning")), "reasoning");
+ assert_eq!(provider_role_for(Some("hint:coding")), "coding");
}
#[test]
diff --git a/crates/openhuman-core/src/config/migrations/unify_ai_provider_settings_tests.rs b/crates/openhuman-core/src/config/migrations/unify_ai_provider_settings_tests.rs
index 5307d15db9..d90ed6b3b8 100644
--- a/crates/openhuman-core/src/config/migrations/unify_ai_provider_settings_tests.rs
+++ b/crates/openhuman-core/src/config/migrations/unify_ai_provider_settings_tests.rs
@@ -97,7 +97,10 @@ fn retired_background_usage_flags_derive_no_route() {
let _ = run(&mut c).unwrap();
let serialized = toml::to_string(&c).unwrap();
assert!(!serialized.contains("heartbeat_provider"), "{serialized}");
- assert!(!serialized.contains("subconscious_provider"), "{serialized}");
+ assert!(
+ !serialized.contains("subconscious_provider"),
+ "{serialized}"
+ );
}
#[test]
diff --git a/crates/openhuman-core/src/config/mod.rs b/crates/openhuman-core/src/config/mod.rs
index 866f0a24cf..225fe4a7db 100644
--- a/crates/openhuman-core/src/config/mod.rs
+++ b/crates/openhuman-core/src/config/mod.rs
@@ -46,26 +46,25 @@ pub use schema::{
ComposioConfig, ComputerConfig, Config, ContextConfig, CostConfig, CronConfig, CurlConfig,
DashboardConfig, DecisionModel, DelegateAgentConfig, DiagramViewerConfig,
DictationActivationMode, DictationConfig, DiscordConfig, DockerRuntimeConfig, EmailConfig,
- EmbeddingRouteConfig, GitbooksConfig, HttpHeader, HttpRequestConfig,
- IMessageConfig, IntegrationToggle, IntegrationsConfig, LarkConfig, LearningConfig,
- LegacySearchInputs, LinqConfig, LlmBackend, LocalAiConfig, MatrixConfig, McpAuthConfig,
- McpClientConfig, McpClientIdentityConfig, McpServerConfig, MemoryConfig, MemoryTreeConfig,
- ModelRouteConfig, MultimodalConfig, MultimodalFileConfig, ObservabilityConfig,
- OrchestratorModelConfig, PrivacyConfig, PrivacyMode, ProxyConfig, ProxyScope, ReflectionSource,
- ReliabilityConfig, ResourceLimitsConfig, RuntimeConfig, RuntimePoolConfig,
- RuntimePoolLangConfig, SandboxBackend, SandboxConfig, SchedulerConfig, SchedulerGateConfig,
- SchedulerGateMode, SearchConfig, SearchEngineCredentials, SearchPresentation,
- SearchProviderSettings, SearchRoute, SearxngConfig, SecretsConfig, SecurityConfig, ShellConfig,
- SlackConfig, StorageConfig, StorageProviderConfig, StorageProviderSection, StreamMode,
- SttEngine, TeamModelConfig, TelegramConfig, TokenjuiceConfig, UpdateConfig,
- UpdateRestartStrategy, VoiceActivationMode, VoiceServerConfig, WebSearchConfig, WebhookConfig,
- YuanbaoConfig, DEFAULT_CLOUD_LLM_MODEL, DEFAULT_MEMORY_SYNC_INTERVAL_SECS, DEFAULT_MODEL,
- LEGACY_TIER_MODELS, MANAGED_MULTIMODAL_MODELS, MANAGED_SEARCH_PROVIDERS,
- MEMORY_SYNC_INTERVAL_PRESETS_SECS, MODEL_IMAGE_GENERATION_AGENT, MODEL_MANAGED_DEFAULT,
- MODEL_MEDIA_UNDERSTANDING, MODEL_VIDEO_GENERATION_AGENT, SEARCH_ENGINE_BRAVE,
- SEARCH_ENGINE_DISABLED, SEARCH_ENGINE_EXA, SEARCH_ENGINE_MANAGED, SEARCH_ENGINE_PARALLEL,
- SEARCH_ENGINE_QUERIT, SEARCH_ENGINE_TAVILY, SEARCH_PROVIDERS, SEARCH_ROLES, SEARCH_ROLE_ANSWER,
- SEARCH_ROLE_CONTENTS, SEARCH_ROLE_SEARCH,
+ EmbeddingRouteConfig, GitbooksConfig, HttpHeader, HttpRequestConfig, IMessageConfig,
+ IntegrationToggle, IntegrationsConfig, LarkConfig, LearningConfig, LegacySearchInputs,
+ LinqConfig, LlmBackend, LocalAiConfig, MatrixConfig, McpAuthConfig, McpClientConfig,
+ McpClientIdentityConfig, McpServerConfig, MemoryConfig, MemoryTreeConfig, ModelRouteConfig,
+ MultimodalConfig, MultimodalFileConfig, ObservabilityConfig, OrchestratorModelConfig,
+ PrivacyConfig, PrivacyMode, ProxyConfig, ProxyScope, ReflectionSource, ReliabilityConfig,
+ ResourceLimitsConfig, RuntimeConfig, RuntimePoolConfig, RuntimePoolLangConfig, SandboxBackend,
+ SandboxConfig, SchedulerConfig, SchedulerGateConfig, SchedulerGateMode, SearchConfig,
+ SearchEngineCredentials, SearchPresentation, SearchProviderSettings, SearchRoute,
+ SearxngConfig, SecretsConfig, SecurityConfig, ShellConfig, SlackConfig, StorageConfig,
+ StorageProviderConfig, StorageProviderSection, StreamMode, SttEngine, TeamModelConfig,
+ TelegramConfig, TokenjuiceConfig, UpdateConfig, UpdateRestartStrategy, VoiceActivationMode,
+ VoiceServerConfig, WebSearchConfig, WebhookConfig, YuanbaoConfig, DEFAULT_CLOUD_LLM_MODEL,
+ DEFAULT_MEMORY_SYNC_INTERVAL_SECS, DEFAULT_MODEL, LEGACY_TIER_MODELS,
+ MANAGED_MULTIMODAL_MODELS, MANAGED_SEARCH_PROVIDERS, MEMORY_SYNC_INTERVAL_PRESETS_SECS,
+ MODEL_IMAGE_GENERATION_AGENT, MODEL_MANAGED_DEFAULT, MODEL_MEDIA_UNDERSTANDING,
+ MODEL_VIDEO_GENERATION_AGENT, SEARCH_ENGINE_BRAVE, SEARCH_ENGINE_DISABLED, SEARCH_ENGINE_EXA,
+ SEARCH_ENGINE_MANAGED, SEARCH_ENGINE_PARALLEL, SEARCH_ENGINE_QUERIT, SEARCH_ENGINE_TAVILY,
+ SEARCH_PROVIDERS, SEARCH_ROLES, SEARCH_ROLE_ANSWER, SEARCH_ROLE_CONTENTS, SEARCH_ROLE_SEARCH,
};
// Kept as a separate re-export (issue #4117) so the large alphabetized group
// above stays byte-identical and rustfmt-stable.
diff --git a/crates/openhuman-core/src/config/schema/mod.rs b/crates/openhuman-core/src/config/schema/mod.rs
index 470124a11b..830cabf743 100644
--- a/crates/openhuman-core/src/config/schema/mod.rs
+++ b/crates/openhuman-core/src/config/schema/mod.rs
@@ -86,9 +86,9 @@ pub use channels::{
};
pub(crate) use cli_overrides::set_cli_inference_overrides;
pub use context::ContextConfig;
+pub use cron::CronConfig;
pub use dashboard::{DashboardConfig, DiagramViewerConfig, EventStreamConfig, ModelHealthConfig};
pub use dictation::{DictationActivationMode, DictationConfig};
-pub use cron::CronConfig;
pub use identity_cost::{CostConfig, ModelPricing};
pub use learning::{LearningConfig, ReflectionSource};
pub use local_ai::{LocalAiConfig, LocalAiUsage};