Skip to content

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

style: apply consistent formatting across multiple files

Steven Enamakel8bd284b524eb
diff --git a/crates/openhuman-core/src/backend/client.rs b/crates/openhuman-core/src/backend/client.rs
index def3e498f3..cccb7ed1dc 100644
--- a/crates/openhuman-core/src/backend/client.rs
+++ b/crates/openhuman-core/src/backend/client.rs
@@ -418,7 +418,9 @@ impl BackendClient {
) -> Result<Value> {
let credential = credential.into();
let is_api_key = credential.is_api_key();
- if !crate::inference::provider::openhuman_backend_model::is_safe_endpoint_for_managed_bearer(self.base.as_str()) {
+ if !crate::inference::provider::openhuman_backend_model::is_safe_endpoint_for_managed_bearer(
+ self.base.as_str(),
+ ) {
anyhow::bail!("backend credential requires HTTPS or a loopback HTTP endpoint");
}
let transport = self.transport(&method, path)?;
diff --git a/crates/openhuman-core/src/core/runtime/services.rs b/crates/openhuman-core/src/core/runtime/services.rs
index 7a2d92f8a4..80d4b0b7bd 100644
--- a/crates/openhuman-core/src/core/runtime/services.rs
+++ b/crates/openhuman-core/src/core/runtime/services.rs
@@ -457,7 +457,8 @@ pub fn spawn_socket_auto_connect(
return;
}
};
- if crate::security::credentials::session_support::is_local_session_token(&initial_token) {
+ if crate::security::credentials::session_support::is_local_session_token(&initial_token)
+ {
log::debug!("[socket] Offline local session — skipping auto-connect");
return;
}
diff --git a/crates/openhuman-core/src/integrations/composio/connected_integrations/cache.rs b/crates/openhuman-core/src/integrations/composio/connected_integrations/cache.rs
index 0e2dd74e74..9da559be5c 100644
--- a/crates/openhuman-core/src/integrations/composio/connected_integrations/cache.rs
+++ b/crates/openhuman-core/src/integrations/composio/connected_integrations/cache.rs
@@ -56,7 +56,11 @@ pub(crate) fn cache_key(config: &Config) -> String {
digest.update(b"openhuman-integrations-cache-v2\0");
digest.update(config.config_path.to_string_lossy().as_bytes());
digest.update(b"\0");
- digest.update(crate::backend::base_url(&config.api_url).unwrap_or_default().as_bytes());
+ digest.update(
+ crate::backend::base_url(&config.api_url)
+ .unwrap_or_default()
+ .as_bytes(),
+ );
digest.update(b"\0");
match crate::security::credentials::session_support::resolve_backend_credential(config) {
Ok(credential) => {
diff --git a/crates/openhuman-core/src/platform/socket/url.rs b/crates/openhuman-core/src/platform/socket/url.rs
index dc435f8581..c1e1e11784 100644
--- a/crates/openhuman-core/src/platform/socket/url.rs
+++ b/crates/openhuman-core/src/platform/socket/url.rs
@@ -4,12 +4,18 @@ use url::Url;
/// Permit credential-bearing socket connections only over TLS or loopback.
pub(super) fn is_safe_socket_endpoint(endpoint: &str) -> bool {
- let Ok(mut url) = Url::parse(endpoint) else { return false; };
+ let Ok(mut url) = Url::parse(endpoint) else {
+ return false;
+ };
match url.scheme() {
"wss" => url.set_scheme("https").is_ok(),
"ws" => {
- if url.set_scheme("http").is_err() { return false; }
- crate::inference::provider::openhuman_backend_model::is_safe_endpoint_for_managed_bearer(url.as_str())
+ if url.set_scheme("http").is_err() {
+ return false;
+ }
+ crate::inference::provider::openhuman_backend_model::is_safe_endpoint_for_managed_bearer(
+ url.as_str(),
+ )
}
_ => false,
}