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
test(composio): migrate test helpers from ComposioTool to DirectComposioClient
Steven Enamakel62dbc0c64636
diff --git a/crates/openhuman-core/src/integrations/composio/tools/direct_tests_constructor_and_wire_types_tests.rs b/crates/openhuman-core/src/integrations/composio/tools/direct_tests_constructor_and_wire_types_tests.rsindex 94ef0c4fc0..0e273feb11 100644--- a/crates/openhuman-core/src/integrations/composio/tools/direct_tests_constructor_and_wire_types_tests.rs+++ b/crates/openhuman-core/src/integrations/composio/tools/direct_tests_constructor_and_wire_types_tests.rs@@ -194,7 +194,7 @@ async fn list_tool_schemas_v3_sends_repeated_tags_to_v3_tools_endpoint() {);let base = start_mock_backend(app).await;- let tool = DirectComposioClient::new_with_v3_base("ck_test_direct", None, test_security(), base);+ let tool = DirectComposioClient::new_with_v3_base("ck_test_direct", base);let items = tool.list_tool_schemas_v3(&["github"], Some(&["stars", "repos"])).awaitdiff --git a/crates/openhuman-core/src/integrations/composio/tools/direct_tests_sanitization_and_connected_accounts_tests.rs b/crates/openhuman-core/src/integrations/composio/tools/direct_tests_sanitization_and_connected_accounts_tests.rsindex 68921eb562..af8c8f7d1f 100644--- a/crates/openhuman-core/src/integrations/composio/tools/direct_tests_sanitization_and_connected_accounts_tests.rs+++ b/crates/openhuman-core/src/integrations/composio/tools/direct_tests_sanitization_and_connected_accounts_tests.rs@@ -132,30 +132,30 @@ fn connected_account_accepts_camelcase_created_at() {// whitespace so legitimate keys containing spaces are not corrupted.#[test]-fn composio_tool_trims_surrounding_whitespace_in_api_key() {- let tool = ComposioTool::new(" key123 ", None, test_security());+fn direct_client_trims_surrounding_whitespace_in_api_key() {+ let tool = DirectComposioClient::new(" key123 ");assert_eq!(tool.api_key, "key123");}#[test]-fn composio_tool_trims_trailing_newline_in_api_key() {+fn direct_client_trims_trailing_newline_in_api_key() {// The real-world Sentry case: secret store payloads frequently carry a// trailing newline (clipboard paste, file read). It must be stripped.- let tool = ComposioTool::new("key123\n", None, test_security());+ let tool = DirectComposioClient::new("key123\n");assert_eq!(tool.api_key, "key123");}#[test]-fn composio_tool_preserves_internal_whitespace_in_api_key() {+fn direct_client_preserves_internal_whitespace_in_api_key() {// Pins the trim-scope: a future refactor must NOT widen this to// `replace(' ', "")` or similar — only surrounding whitespace is stripped.- let tool = ComposioTool::new("k1 k2", None, test_security());+ let tool = DirectComposioClient::new("k1 k2");assert_eq!(tool.api_key, "k1 k2");}#[test]-fn composio_tool_accepts_empty_api_key_without_panic() {- let tool = ComposioTool::new("", None, test_security());+fn direct_client_accepts_empty_api_key_without_panic() {+ let tool = DirectComposioClient::new("");assert_eq!(tool.api_key, "");}