Skip to content

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

chore(config): reformat search-related re-exports and migrate code style

Steven Enamakelc272d14a927b
diff --git a/crates/openhuman-core/src/config/mod.rs b/crates/openhuman-core/src/config/mod.rs
index a76fea7546..0d44cc7076 100644
--- a/crates/openhuman-core/src/config/mod.rs
+++ b/crates/openhuman-core/src/config/mod.rs
@@ -63,8 +63,8 @@ pub use schema::{
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,
+ 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 3567150998..be41a5c8e7 100644
--- a/crates/openhuman-core/src/config/schema/mod.rs
+++ b/crates/openhuman-core/src/config/schema/mod.rs
@@ -124,9 +124,9 @@ pub use tools::{
MultimodalFileConfig, SearchConfig, SearchEngineCredentials, SearchPresentation,
SearchProviderSettings, SearchRoute, SearxngConfig, SecretsConfig, SeltzConfig,
WebSearchConfig, COMPOSIO_MODE_BACKEND, COMPOSIO_MODE_DIRECT, MANAGED_SEARCH_PROVIDERS,
- 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,
+ 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,
};
pub use update::{UpdateConfig, UpdateRestartStrategy};
pub use web_chat_config::WebChatConfig;
diff --git a/crates/openhuman-core/src/config/schema/tools/mod.rs b/crates/openhuman-core/src/config/schema/tools/mod.rs
index 4609ab68a7..7578d874bf 100644
--- a/crates/openhuman-core/src/config/schema/tools/mod.rs
+++ b/crates/openhuman-core/src/config/schema/tools/mod.rs
@@ -22,6 +22,6 @@ pub use search::{
LegacySearchInputs, SearchConfig, SearchEngineCredentials, SearchPresentation,
SearchProviderSettings, SearchRoute, SearxngConfig, SeltzConfig, WebSearchConfig,
MANAGED_SEARCH_PROVIDERS, 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,
+ 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,
};
diff --git a/crates/openhuman-core/src/config/schema/tools/search_migrate.rs b/crates/openhuman-core/src/config/schema/tools/search_migrate.rs
index b917fd4aa2..6ceff70b81 100644
--- a/crates/openhuman-core/src/config/schema/tools/search_migrate.rs
+++ b/crates/openhuman-core/src/config/schema/tools/search_migrate.rs
@@ -42,10 +42,7 @@ impl SearchConfig {
.unwrap_or(SearchRoute::Managed);
let mut providers = BTreeMap::new();
let parallel_key = self.parallel.has_key();
- let managed_parallel = self
- .parallel_route
- .as_deref()
- .and_then(SearchRoute::parse)
+ let managed_parallel = self.parallel_route.as_deref().and_then(SearchRoute::parse)
== Some(SearchRoute::Managed);
let mut dropped_parallel = false;
diff --git a/crates/openhuman-core/src/config/schema/tools/search_search_config_tests_tests.rs b/crates/openhuman-core/src/config/schema/tools/search_search_config_tests_tests.rs
index cad95cc2af..a7f054eea2 100644
--- a/crates/openhuman-core/src/config/schema/tools/search_search_config_tests_tests.rs
+++ b/crates/openhuman-core/src/config/schema/tools/search_search_config_tests_tests.rs
@@ -130,7 +130,10 @@ fn exa_key_under_managed_engine_stays_managed() {
fn a_parallel_key_is_kept_as_a_direct_provider() {
let mut cfg = legacy("engine = \"parallel\"\n[parallel]\napi_key = \"p\"\n");
cfg.migrate_legacy(LegacySearchInputs::default());
- assert_eq!(provider(&cfg, "parallel"), Some(SearchProviderSettings::direct()));
+ assert_eq!(
+ provider(&cfg, "parallel"),
+ Some(SearchProviderSettings::direct())
+ );
assert_eq!(cfg.parallel.key(), Some("p"));
assert_eq!(
cfg.roles.get(SEARCH_ROLE_SEARCH),
@@ -143,12 +146,14 @@ fn a_parallel_key_is_kept_as_a_direct_provider() {
#[test]
fn managed_parallel_without_a_key_is_dropped() {
- let mut cfg = legacy(
- "enabled_providers = [\"managed\", \"parallel\"]\nparallel_route = \"backend\"\n",
- );
+ let mut cfg =
+ legacy("enabled_providers = [\"managed\", \"parallel\"]\nparallel_route = \"backend\"\n");
cfg.migrate_legacy(LegacySearchInputs::default());
assert!(!cfg.providers.contains_key("parallel"));
- assert_eq!(provider(&cfg, "exa"), Some(SearchProviderSettings::managed()));
+ assert_eq!(
+ provider(&cfg, "exa"),
+ Some(SearchProviderSettings::managed())
+ );
}
#[test]
diff --git a/vendor/tinysearch b/vendor/tinysearch
index f0c977dbb7..f57a7257ea 160000
--- a/vendor/tinysearch
+++ b/vendor/tinysearch
@@ -1 +1 @@
-Subproject commit f0c977dbb7c259ab7622060054040e3900435e36
+Subproject commit f57a7257eafe87d5f405860c1bf9726867a9b0d3