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
chore: reformat long function signatures and remove stray blank lines
Steven Enamakel87df33e7cc7d
diff --git a/crates/openhuman-core/src/backend/client/channel.rs b/crates/openhuman-core/src/backend/client/channel.rsindex 528e440beb..4d02015bb3 100644--- a/crates/openhuman-core/src/backend/client/channel.rs+++ b/crates/openhuman-core/src/backend/client/channel.rs@@ -36,7 +36,11 @@ impl BackendClient {/// so callers should re-invoke every ~4 s for as long as the turn is/// in flight. Returns `Err` if the backend doesn't support typing for/// this channel — caller should swallow the error silently.- pub async fn send_channel_typing(&self, channel: &str, credential: impl Into<BackendCredential>) -> Result<Value> {+ pub async fn send_channel_typing(+ &self,+ channel: &str,+ credential: impl Into<BackendCredential>,+ ) -> Result<Value> {let channel = channel.trim().trim_matches('/');anyhow::ensure!(!channel.is_empty(), "channel is required");let encoded = urlencoding::encode(channel);diff --git a/crates/openhuman-core/src/channels/controllers/ops/messaging.rs b/crates/openhuman-core/src/channels/controllers/ops/messaging.rsindex 6fd6d2f3ed..2884717f5e 100644--- a/crates/openhuman-core/src/channels/controllers/ops/messaging.rs+++ b/crates/openhuman-core/src/channels/controllers/ops/messaging.rs@@ -2,7 +2,6 @@use serde_json::Value;-use crate::backend::BackendClient;use crate::config::Config;use crate::rpc::RpcOutcome;diff --git a/crates/openhuman-core/src/integrations/composio/connected_integrations/cache.rs b/crates/openhuman-core/src/integrations/composio/connected_integrations/cache.rsindex 731dabd980..cce2bd679d 100644--- a/crates/openhuman-core/src/integrations/composio/connected_integrations/cache.rs+++ b/crates/openhuman-core/src/integrations/composio/connected_integrations/cache.rs@@ -60,7 +60,11 @@ pub(crate) fn cache_key(config: &Config) -> String {digest.update(b"\0");match crate::security::credentials::session_support::resolve_backend_credential(config) {Ok(credential) => {- digest.update(if credential.is_api_key() { b"api-key\0" } else { b"session\0" });+ digest.update(if credential.is_api_key() {+ b"api-key\0"+ } else {+ b"session\0"+ });digest.update(credential.secret().as_bytes());}Err(_) => digest.update(b"unavailable"),diff --git a/crates/openhuman-core/src/voice/cloud_transcribe.rs b/crates/openhuman-core/src/voice/cloud_transcribe.rsindex 77e774ef86..6ba187c43b 100644--- a/crates/openhuman-core/src/voice/cloud_transcribe.rs+++ b/crates/openhuman-core/src/voice/cloud_transcribe.rs@@ -1,11 +1,9 @@//! OpenHuman authentication adapter for hosted speech-to-text.-use crate::backend::BackendClient;use crate::config::Config;use crate::rpc::RpcOutcome;-pub use tinyinference_voice::cloud::{CloudTranscribeOptions, CloudTranscribeResult};/// Transcribe renderer-supplied base64 audio through the hosted backend.@@ -16,24 +14,35 @@ pub async fn transcribe_cloud() -> Result<RpcOutcome<CloudTranscribeResult>, String> {// The session JWT or the TinyHumans API key. The vendored client sends it// as `Authorization: Bearer`, which the backend accepts for either.- let credential = crate::security::credentials::session_support::resolve_backend_credential(config)?;+ let credential =+ crate::security::credentials::session_support::resolve_backend_credential(config)?;let is_api_key = credential.is_api_key();- let client = BackendClient::from_config(config)- .map_err(|error| error.to_string())?;+ let client = BackendClient::from_config(config).map_err(|error| error.to_string())?;let url = client.url_for("/openai/v1/audio/transcriptions").map_err(|error| error.to_string())?;if is_api_key- && !crate::inference::provider::openhuman_backend_model::is_safe_endpoint_for_managed_bearer(url.as_str())+ && !crate::inference::provider::openhuman_backend_model::is_safe_endpoint_for_managed_bearer(+ url.as_str(),+ ){- return Err("refusing to send the TinyHumans API key over a non-HTTPS, non-loopback endpoint".to_string());+ return Err(+ "refusing to send the TinyHumans API key over a non-HTTPS, non-loopback endpoint"+ .to_string(),+ );}let http = client.raw_client().map_err(crate::backend::flatten_authed_error)?;- let result = tinyinference_voice::cloud::transcribe(&http, url, credential.secret(), audio_base64, options)- .await- .map_err(|error| classify_transcribe_error(error, is_api_key))?;+ let result = tinyinference_voice::cloud::transcribe(+ &http,+ url,+ credential.secret(),+ audio_base64,+ options,+ )+ .await+ .map_err(|error| classify_transcribe_error(error, is_api_key))?;Ok(RpcOutcome::single_log(result,"cloud STT via POST /openai/v1/audio/transcriptions",diff --git a/crates/openhuman-core/src/voice/cloud_transcribe_tests.rs b/crates/openhuman-core/src/voice/cloud_transcribe_tests.rsindex 08e438326d..fbf68201a7 100644--- a/crates/openhuman-core/src/voice/cloud_transcribe_tests.rs+++ b/crates/openhuman-core/src/voice/cloud_transcribe_tests.rs@@ -26,7 +26,9 @@ fn backend_401_with_api_key_does_not_expire_session() {true,);assert!(tagged.starts_with("API_KEY_REJECTED: "));- assert!(!crate::core::observability::is_session_expired_message(&tagged));+ assert!(!crate::core::observability::is_session_expired_message(+ &tagged+ ));}#[tokio::test]diff --git a/crates/openhuman-core/src/voice/realtime.rs b/crates/openhuman-core/src/voice/realtime.rsindex 8a8a1794c3..64983ce63e 100644--- a/crates/openhuman-core/src/voice/realtime.rs+++ b/crates/openhuman-core/src/voice/realtime.rs@@ -13,7 +13,6 @@ use reqwest::Method;use serde::{Deserialize, Serialize};use serde_json::Value;-use crate::backend::BackendClient;use crate::config::Config;use crate::rpc::RpcOutcome;diff --git a/crates/openhuman-core/src/voice/reply_speech.rs b/crates/openhuman-core/src/voice/reply_speech.rsindex 697e58bbef..0830208d0e 100644--- a/crates/openhuman-core/src/voice/reply_speech.rs+++ b/crates/openhuman-core/src/voice/reply_speech.rs@@ -20,7 +20,6 @@ use reqwest::Method;use serde::{Deserialize, Serialize};use serde_json::{json, Value};-use crate::backend::BackendClient;use crate::config::Config;use crate::rpc::RpcOutcome;