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
style: apply rustfmt formatting to composio curated contract
Steven Enamakel7fbc7afabe09
diff --git a/crates/openhuman-app/Cargo.lock b/crates/openhuman-app/Cargo.lockindex a2b3cf1196..04f2ed7f8b 100644--- a/crates/openhuman-app/Cargo.lock+++ b/crates/openhuman-app/Cargo.lock@@ -6795,7 +6795,7 @@ dependencies = [[[package]]name = "tinyconnectors-bus"-version = "0.14.0"+version = "0.15.0"dependencies = ["serde","serde_json",diff --git a/crates/openhuman-core/src/integrations/composio/contract/curated.rs b/crates/openhuman-core/src/integrations/composio/contract/curated.rsindex a884b4e8bf..e66f9bc623 100644--- a/crates/openhuman-core/src/integrations/composio/contract/curated.rs+++ b/crates/openhuman-core/src/integrations/composio/contract/curated.rs@@ -26,7 +26,8 @@ const LOG: &str = "[composio][curated]";/// Description for a toolkit the module has no blurb for, used while the/// snapshot is empty.-pub const FALLBACK_DESCRIPTION: &str = "Interact with this connected service via its available actions";+pub const FALLBACK_DESCRIPTION: &str =+ "Interact with this connected service via its available actions";/// Spellings callers use that are not the module's canonical toolkit slug./// They are resolved by the module (`GetVocabulary` matches aliases), not here;@@ -121,7 +122,9 @@ fn test_fixture() -> Arc<Snapshot> {/// re-read after reinit must not grow the heap by another copy of the tables.fn intern(text: &str) -> &'static str {static POOL: Mutex<Option<HashSet<&'static str>>> = Mutex::new(None);- let mut pool = POOL.lock().unwrap_or_else(std::sync::PoisonError::into_inner);+ let mut pool = POOL+ .lock()+ .unwrap_or_else(std::sync::PoisonError::into_inner);let pool = pool.get_or_insert_with(HashSet::new);if let Some(found) = pool.get(text) {return found;@@ -235,10 +238,7 @@ pub fn invalidate() {/// Replace the snapshot directly. Test seam for callers that exercise the/// host adapters without a loaded module.#[cfg(test)]-pub(crate) fn install_for_test(- listed: &[BusCuratedTool],- vocabulary: &VocabularyResponse,-) {+pub(crate) fn install_for_test(listed: &[BusCuratedTool], vocabulary: &VocabularyResponse) {*store().write().unwrap_or_else(std::sync::PoisonError::into_inner) =diff --git a/crates/openhuman-core/src/integrations/composio/contract/curated_tests.rs b/crates/openhuman-core/src/integrations/composio/contract/curated_tests.rsindex d70dd9d5e5..d060781480 100644--- a/crates/openhuman-core/src/integrations/composio/contract/curated_tests.rs+++ b/crates/openhuman-core/src/integrations/composio/contract/curated_tests.rs@@ -14,8 +14,14 @@ fn reply() -> (Vec<BusCuratedTool>, VocabularyResponse) {description: "Mail".into(),native_provider: true,actions: Some(vec![- VocabularyAction { slug: "GMAIL_FETCH_EMAILS".into(), scope: BusScope::Read },- VocabularyAction { slug: "GMAIL_SEND_EMAIL".into(), scope: BusScope::Write },+ VocabularyAction {+ slug: "GMAIL_FETCH_EMAILS".into(),+ scope: BusScope::Read,+ },+ VocabularyAction {+ slug: "GMAIL_SEND_EMAIL".into(),+ scope: BusScope::Write,+ },]),},ToolkitVocabulary {@@ -67,14 +73,23 @@ fn lookups_use_the_installed_snapshot_and_invalidate_clears_it() {assert!(has_native_provider("gmail"));assert_eq!(toolkit_description("gmail"), "Mail");assert_eq!(toolkit_description("nope"), FALLBACK_DESCRIPTION);- assert_eq!(curated_scope_for("GMAIL_SEND_EMAIL"), Some(ToolScope::Write));+ assert_eq!(+ curated_scope_for("GMAIL_SEND_EMAIL"),+ Some(ToolScope::Write)+ );invalidate();assert!(store().read().unwrap().is_none());}#[test]fn fixture_serves_aliases_and_every_native_provider() {- for alias in ["one", "one_drive", "onedrive", "google_calendar", "microsoft"] {+ for alias in [+ "one",+ "one_drive",+ "onedrive",+ "google_calendar",+ "microsoft",+ ] {assert!(catalog_for_toolkit(alias).is_some(), "{alias}");}assert!(catalog_for_toolkit("flowstestkit").is_none());