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
fix(channels): bypass the linked manager for the credential-test RPC
Steven Enamakel0b2ef29d4652
diff --git a/crates/openhuman-core/src/channels/controllers/schemas.rs b/crates/openhuman-core/src/channels/controllers/schemas.rsindex b96252dcb7..e3349eda64 100644--- a/crates/openhuman-core/src/channels/controllers/schemas.rs+++ b/crates/openhuman-core/src/channels/controllers/schemas.rs@@ -340,19 +340,20 @@ fn handle_test(params: Map<String, Value>) -> ControllerFuture {Box::pin(async move {let config = config_rpc::load_config_with_timeout().await?;let p = deserialize_params::<TestParams>(params)?;- let mode: ChannelAuthMode = p- .auth_mode- .parse()- .map_err(|e: String| format!("invalid authMode: {e}"))?;- let manager = openhuman_channel_manager(config);- let result = manager- .test(p.channel.trim(), mode, p.credentials)- .await- .map_err(|e| e.to_string())?;- to_json(Outcome::new(result, vec![]))+ test_with_config(&config, p).await})}+async fn test_with_config(config: &Config, params: TestParams) -> Result<Value, String> {+ let mode: ChannelAuthMode = params+ .auth_mode+ .parse()+ .map_err(|e: String| format!("invalid authMode: {e}"))?;+ to_json(+ super::ops::test_channel(config, params.channel.trim(), mode, params.credentials).await?,+ )+}+fn handle_discord_list_guilds(_params: Map<String, Value>) -> ControllerFuture {Box::pin(async move {let config = config_rpc::load_config_with_timeout().await?;diff --git a/crates/openhuman-core/src/channels/controllers/schemas_tests.rs b/crates/openhuman-core/src/channels/controllers/schemas_tests.rsindex 42fd3824bb..abbb972bd5 100644--- a/crates/openhuman-core/src/channels/controllers/schemas_tests.rs+++ b/crates/openhuman-core/src/channels/controllers/schemas_tests.rs@@ -2,6 +2,23 @@ use super::*;use crate::core::TypeSchema;use serde_json::json;+#[tokio::test]+async fn channel_test_handler_requires_module_before_provider_field_validation() {+ let mut config = Config::default();+ config.modules.enabled = false;+ let error = test_with_config(+ &config,+ TestParams {+ channel: " telegram ".into(),+ auth_mode: "bot_token".into(),+ credentials: Value::Null,+ },+ )+ .await+ .unwrap_err();+ assert!(error.contains("module unavailable"), "{error}");+}+#[test]fn schema_handler_parity() {let schemas = all_controller_schemas();