Skip to content

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

chore: apply formatting and import reorganisation across the codebase

Steven Enamakelaf3921e7acca
diff --git a/crates/openhuman-core/src/agent/progress_tracing/langfuse.rs b/crates/openhuman-core/src/agent/progress_tracing/langfuse.rs
index d3778afb63..501a3288db 100644
--- a/crates/openhuman-core/src/agent/progress_tracing/langfuse.rs
+++ b/crates/openhuman-core/src/agent/progress_tracing/langfuse.rs
@@ -27,10 +27,10 @@ mod journal_export;
mod span_export;
pub(crate) use environment::{environment_for_base, ingestion_url, skip_push};
+pub(crate) use journal_export::journal_push_ready;
#[cfg(test)]
pub(crate) use journal_export::push_observations;
pub(crate) use journal_export::root_subagent_observations;
-pub(crate) use journal_export::journal_push_ready;
#[cfg(test)]
pub(crate) use span_export::push_spans;
diff --git a/crates/openhuman-core/src/agent/progress_tracing/langfuse/span_export.rs b/crates/openhuman-core/src/agent/progress_tracing/langfuse/span_export.rs
index 26437fe780..848b9b4a92 100644
--- a/crates/openhuman-core/src/agent/progress_tracing/langfuse/span_export.rs
+++ b/crates/openhuman-core/src/agent/progress_tracing/langfuse/span_export.rs
@@ -4,8 +4,8 @@
use serde_json::{json, Map, Value};
-use crate::security::credentials::jwt::bearer_authorization_value;
use crate::config::Config;
+use crate::security::credentials::jwt::bearer_authorization_value;
use crate::security::credentials::session_support::direct_backend_credential;
use super::ingestion_batch::{iso_millis, new_event_id};
diff --git a/crates/openhuman-core/src/agent/progress_tracing/otlp.rs b/crates/openhuman-core/src/agent/progress_tracing/otlp.rs
index b1147d9272..c2d2b7c363 100644
--- a/crates/openhuman-core/src/agent/progress_tracing/otlp.rs
+++ b/crates/openhuman-core/src/agent/progress_tracing/otlp.rs
@@ -7,8 +7,8 @@ use sha2::{Digest, Sha256};
use super::langfuse::{environment_for_base, ingestion_url, skip_push};
use super::types::{SpanKind, SpanStatus, TraceSpan};
-use crate::security::credentials::jwt::bearer_authorization_value;
use crate::config::Config;
+use crate::security::credentials::jwt::bearer_authorization_value;
use crate::security::credentials::session_support::direct_backend_credential;
// The backend JSON parser caps requests at 10 MiB. A generation can carry a
diff --git a/crates/openhuman-core/src/agent/progress_tracing/serialize.rs b/crates/openhuman-core/src/agent/progress_tracing/serialize.rs
index 5e266c5c8c..adecb827d3 100644
--- a/crates/openhuman-core/src/agent/progress_tracing/serialize.rs
+++ b/crates/openhuman-core/src/agent/progress_tracing/serialize.rs
@@ -38,7 +38,10 @@ pub(super) fn capture_model_content(value: &serde_json::Value) -> serde_json::Va
*content = serde_json::Value::String(format!(
"{}…[message content truncated]",
truncate_chars(
- &content.as_str().map(str::to_owned).unwrap_or_else(|| content.to_string()),
+ &content
+ .as_str()
+ .map(str::to_owned)
+ .unwrap_or_else(|| content.to_string()),
MAX_MODEL_CONTENT_CHARS / 2
)
));
@@ -68,7 +71,10 @@ pub(super) fn capture_model_content(value: &serde_json::Value) -> serde_json::Va
let mut kept = fields.clone();
if let Some(content) = kept.get_mut("content") {
*content = serde_json::Value::String(truncate_chars(
- &content.as_str().map(str::to_owned).unwrap_or_else(|| content.to_string()),
+ &content
+ .as_str()
+ .map(str::to_owned)
+ .unwrap_or_else(|| content.to_string()),
MAX_MODEL_CONTENT_CHARS / 2,
));
if serde_json::Value::Object(kept.clone())
diff --git a/crates/openhuman-core/src/backend/client_tests.rs b/crates/openhuman-core/src/backend/client_tests.rs
index f219b1c86c..dbb124e9a3 100644
--- a/crates/openhuman-core/src/backend/client_tests.rs
+++ b/crates/openhuman-core/src/backend/client_tests.rs
@@ -61,7 +61,6 @@ async fn spawn_header_capture_server() -> (String, CapturedHeaders) {
(format!("http://{addr}"), captured)
}
-
#[tokio::test]
async fn authed_json_sends_an_api_key_as_x_api_key_and_no_bearer() {
// Library mode: the TinyHumans API key rides the SDK REST routes as
diff --git a/crates/openhuman-core/src/backend/mod_tests.rs b/crates/openhuman-core/src/backend/mod_tests.rs
index 9c5df47530..3b967ac288 100644
--- a/crates/openhuman-core/src/backend/mod_tests.rs
+++ b/crates/openhuman-core/src/backend/mod_tests.rs
@@ -6,12 +6,18 @@ fn base_urls_come_from_the_transport_and_honour_the_override() {
// or a loopback discard port when nothing is configured.
let configured = Some(" http://127.0.0.1:4010/openai/v1/chat/completions ".to_string());
assert_eq!(base_url(&configured).unwrap(), "http://127.0.0.1:4010");
- assert_eq!(inference_base_url(&configured).unwrap(), "http://127.0.0.1:4010");
+ assert_eq!(
+ inference_base_url(&configured).unwrap(),
+ "http://127.0.0.1:4010"
+ );
assert_eq!(
base_url(&Some(" ".to_string())).unwrap(),
transport::plain::TEST_FALLBACK_BASE_URL
);
- assert_eq!(base_url(&None).unwrap(), transport::plain::TEST_FALLBACK_BASE_URL);
+ assert_eq!(
+ base_url(&None).unwrap(),
+ transport::plain::TEST_FALLBACK_BASE_URL
+ );
}
#[test]
@@ -25,7 +31,10 @@ fn product_identity_comes_from_the_transport() {
#[test]
fn require_base_url_resolves_through_the_transport() {
let configured = Some("http://127.0.0.1:4010".to_string());
- assert_eq!(require_base_url(&configured).unwrap(), "http://127.0.0.1:4010");
+ assert_eq!(
+ require_base_url(&configured).unwrap(),
+ "http://127.0.0.1:4010"
+ );
}
#[test]
diff --git a/crates/openhuman-core/src/backend/transport/transport_tests.rs b/crates/openhuman-core/src/backend/transport/transport_tests.rs
index 66fda1eb20..4f7fc171a5 100644
--- a/crates/openhuman-core/src/backend/transport/transport_tests.rs
+++ b/crates/openhuman-core/src/backend/transport/transport_tests.rs
@@ -186,7 +186,10 @@ async fn plain_transport_sends_attribution_and_credential_headers() {
Mock::given(method("GET"))
.and(path("/teams/me/usage"))
.and(header("authorization", "Bearer jwt.a.b"))
- .and(header(plain::TEST_PRODUCT_HEADER, plain::TEST_PRODUCT_IDENTITY))
+ .and(header(
+ plain::TEST_PRODUCT_HEADER,
+ plain::TEST_PRODUCT_IDENTITY,
+ ))
.respond_with(ResponseTemplate::new(200).set_body_json(json!({
"success": true,
"data": {"remainingUsd": 4.5}
diff --git a/crates/openhuman-core/src/channels/bus/delivery.rs b/crates/openhuman-core/src/channels/bus/delivery.rs
index be43e5f994..37ae447970 100644
--- a/crates/openhuman-core/src/channels/bus/delivery.rs
+++ b/crates/openhuman-core/src/channels/bus/delivery.rs
@@ -208,8 +208,7 @@ fn relay_session_token(config: &crate::config::Config, op: &str) -> Option<Strin
/// Construct the REST client + session JWT shared by every outbound
/// channel call on this turn. Returns `None` and logs if either is
/// unavailable so the caller can bail quietly.
-pub(super) async fn build_channel_client() -> Option<(crate::backend::BackendClient, String)>
-{
+pub(super) async fn build_channel_client() -> Option<(crate::backend::BackendClient, String)> {
let config = match crate::config::rpc::load_config_with_timeout().await {
Ok(c) => c,
Err(e) => {
diff --git a/crates/openhuman-core/src/channels/controllers/ops/messaging.rs b/crates/openhuman-core/src/channels/controllers/ops/messaging.rs
index 62072019e6..cf417d3e38 100644
--- a/crates/openhuman-core/src/channels/controllers/ops/messaging.rs
+++ b/crates/openhuman-core/src/channels/controllers/ops/messaging.rs
@@ -2,10 +2,10 @@
use serde_json::Value;
-use crate::security::credentials::jwt::get_session_token;
use crate::backend::BackendClient;
use crate::config::Config;
use crate::rpc::RpcOutcome;
+use crate::security::credentials::jwt::get_session_token;
/// Send a rich message to a channel via the backend API.
pub async fn channel_send_message(
diff --git a/crates/openhuman-core/src/config/schema/load/dirs.rs b/crates/openhuman-core/src/config/schema/load/dirs.rs
index d981c5969b..9c694d4dd4 100644
--- a/crates/openhuman-core/src/config/schema/load/dirs.rs
+++ b/crates/openhuman-core/src/config/schema/load/dirs.rs
@@ -39,7 +39,9 @@ pub const ACTION_DIR_ENV_VAR: &str = "OPENHUMAN_ACTION_DIR";
pub const MEMORY_SYNC_INTERVAL_SECS_ENV_VAR: &str = "OPENHUMAN_MEMORY_SYNC_INTERVAL_SECS";
fn default_root_dir_name() -> &'static str {
- if crate::config::app_env::is_staging_app_env(crate::config::app_env::app_env_from_env().as_deref()) {
+ if crate::config::app_env::is_staging_app_env(
+ crate::config::app_env::app_env_from_env().as_deref(),
+ ) {
".openhuman-staging"
} else {
".openhuman"
diff --git a/crates/openhuman-core/src/config/schema/mod.rs b/crates/openhuman-core/src/config/schema/mod.rs
index 6bd0806f5c..399f4ec212 100644
--- a/crates/openhuman-core/src/config/schema/mod.rs
+++ b/crates/openhuman-core/src/config/schema/mod.rs
@@ -123,10 +123,10 @@ pub use tools::{
BrowserComputerUseConfig, BrowserConfig, ComposioConfig, CurlConfig, GitbooksConfig,
HttpHeader, HttpRequestConfig, IntegrationToggle, IntegrationsConfig, McpAuthConfig,
McpClientConfig, McpClientIdentityConfig, McpServerConfig, MultimodalConfig,
- MultimodalFileConfig, SearchConfig, SearchEngine, SearchEngineCredentials, SearxngConfig, SEARCH_PROVIDERS,
+ MultimodalFileConfig, SearchConfig, SearchEngine, SearchEngineCredentials, SearxngConfig,
SecretsConfig, SeltzConfig, WebSearchConfig, COMPOSIO_MODE_BACKEND, COMPOSIO_MODE_DIRECT,
SEARCH_ENGINE_BRAVE, SEARCH_ENGINE_DISABLED, SEARCH_ENGINE_EXA, SEARCH_ENGINE_MANAGED,
- SEARCH_ENGINE_PARALLEL, SEARCH_ENGINE_QUERIT, SEARCH_ENGINE_TAVILY,
+ SEARCH_ENGINE_PARALLEL, SEARCH_ENGINE_QUERIT, SEARCH_ENGINE_TAVILY, SEARCH_PROVIDERS,
};
pub use update::{UpdateConfig, UpdateRestartStrategy};
pub use web_chat_config::WebChatConfig;
diff --git a/crates/openhuman-core/src/core/runtime/context.rs b/crates/openhuman-core/src/core/runtime/context.rs
index 705d0fa946..d732b794d3 100644
--- a/crates/openhuman-core/src/core/runtime/context.rs
+++ b/crates/openhuman-core/src/core/runtime/context.rs
@@ -449,7 +449,9 @@ impl CoreContext {
}
/// The backend transport bound to this context, if the host supplied one.
- pub fn backend_transport(&self) -> Option<Arc<dyn crate::backend::transport::BackendTransport>> {
+ pub fn backend_transport(
+ &self,
+ ) -> Option<Arc<dyn crate::backend::transport::BackendTransport>> {
self.backend_transport.clone()
}
diff --git a/crates/openhuman-core/src/core/runtime/services.rs b/crates/openhuman-core/src/core/runtime/services.rs
index 9878d57911..a3dfb2ca0a 100644
--- a/crates/openhuman-core/src/core/runtime/services.rs
+++ b/crates/openhuman-core/src/core/runtime/services.rs
@@ -447,7 +447,8 @@ pub fn spawn_socket_auto_connect(
log::debug!("[socket] No backend base URL — skipping auto-connect");
return;
};
- let initial_token = match crate::security::credentials::jwt::get_session_token(&config) {
+ let initial_token = match crate::security::credentials::jwt::get_session_token(&config)
+ {
Ok(Some(t))
if crate::security::credentials::session_support::is_local_session_token(
&t,
diff --git a/crates/openhuman-core/src/integrations/client/pricing.rs b/crates/openhuman-core/src/integrations/client/pricing.rs
index 501f046493..cdcbdb5ad9 100644
--- a/crates/openhuman-core/src/integrations/client/pricing.rs
+++ b/crates/openhuman-core/src/integrations/client/pricing.rs
@@ -99,7 +99,9 @@ pub fn build_client(config: &crate::config::Config) -> Option<Arc<IntegrationCli
let backend_url = match crate::backend::base_url(&config.api_url) {
Ok(url) => url,
Err(_) => {
- tracing::debug!("[integrations] no backend transport — integrations client unavailable");
+ tracing::debug!(
+ "[integrations] no backend transport — integrations client unavailable"
+ );
return None;
}
};
diff --git a/crates/openhuman-core/src/modules/memory_host.rs b/crates/openhuman-core/src/modules/memory_host.rs
index 42905a38be..284e60e7c3 100644
--- a/crates/openhuman-core/src/modules/memory_host.rs
+++ b/crates/openhuman-core/src/modules/memory_host.rs
@@ -301,9 +301,11 @@ impl ComposioCallbacks {
/// differently.
async fn session_bearer(&self) -> tinybus::Result<Option<String>> {
let config = self.live_config_or_installed().await;
- Ok(crate::security::credentials::jwt::get_session_token(config.as_ref())
- .ok()
- .flatten())
+ Ok(
+ crate::security::credentials::jwt::get_session_token(config.as_ref())
+ .ok()
+ .flatten(),
+ )
}
/// Whether *some* viable Composio client resolves right now.
diff --git a/crates/openhuman-core/src/platform/socket/event_handlers.rs b/crates/openhuman-core/src/platform/socket/event_handlers.rs
index 8d574d7446..31bf7756a4 100644
--- a/crates/openhuman-core/src/platform/socket/event_handlers.rs
+++ b/crates/openhuman-core/src/platform/socket/event_handlers.rs
@@ -9,9 +9,9 @@ use std::sync::Arc;
use serde_json::json;
use tokio::sync::mpsc;
-use crate::platform::socket::models::ConnectionStatus;
use crate::core::bus::BUS;
use crate::core::events::DomainEvent;
+use crate::platform::socket::models::ConnectionStatus;
use crate::skills::webhooks::WebhookRequest;
use super::manager::{emit_server_event, emit_state_change, SharedState};
diff --git a/crates/openhuman-core/src/security/credentials/bus.rs b/crates/openhuman-core/src/security/credentials/bus.rs
index 32037958df..8da80f575c 100644
--- a/crates/openhuman-core/src/security/credentials/bus.rs
+++ b/crates/openhuman-core/src/security/credentials/bus.rs
@@ -75,14 +75,15 @@ impl EventHandler<DomainEvent> for SessionExpiredSubscriber {
scheduler_gate::set_signed_out(false);
return;
}
- let is_local_session = crate::security::credentials::jwt::get_session_token(&config)
- .ok()
- .flatten()
- .is_some_and(|token| {
- crate::security::credentials::session_support::is_local_session_token(
- &token,
- )
- });
+ let is_local_session =
+ crate::security::credentials::jwt::get_session_token(&config)
+ .ok()
+ .flatten()
+ .is_some_and(|token| {
+ crate::security::credentials::session_support::is_local_session_token(
+ &token,
+ )
+ });
if is_local_session {
tracing::warn!(
source = %source,
diff --git a/crates/openhuman-core/src/security/credentials/mod.rs b/crates/openhuman-core/src/security/credentials/mod.rs
index 8c3cd3918e..aac767dcc5 100644
--- a/crates/openhuman-core/src/security/credentials/mod.rs
+++ b/crates/openhuman-core/src/security/credentials/mod.rs
@@ -17,12 +17,12 @@ pub mod session_support;
pub mod tools;
pub use crate::backend::BackendClient;
-pub use jwt::user_id_from_profile_payload;
pub use core::*;
pub use credential_ref::{CredentialRef, CredentialRefError, CredentialRefScheme, ResolvedSecret};
pub use http_creds::{
HttpCredential, HttpCredentialScheme, HttpCredentialSummary, HttpCredentialsStore,
};
+pub use jwt::user_id_from_profile_payload;
pub use ops as rpc;
pub use ops::*;
// Direct-mode (BYO Composio API key) credential helpers.
diff --git a/crates/openhuman-core/src/security/credentials/ops/credential.rs b/crates/openhuman-core/src/security/credentials/ops/credential.rs
index 12a0d2d5c6..a3c34dfa85 100644
--- a/crates/openhuman-core/src/security/credentials/ops/credential.rs
+++ b/crates/openhuman-core/src/security/credentials/ops/credential.rs
@@ -12,9 +12,9 @@
use serde::Deserialize;
use serde_json::{json, Value};
-use crate::security::credentials::jwt::decode_jwt_exp;
use crate::config::Config;
use crate::rpc::RpcOutcome;
+use crate::security::credentials::jwt::decode_jwt_exp;
use crate::security::credentials::responses::AuthStateResponse;
use crate::security::credentials::session_support::{
build_session_state, load_app_session_profile, local_session_user_id,
diff --git a/crates/openhuman-core/src/security/credentials/ops/oauth.rs b/crates/openhuman-core/src/security/credentials/ops/oauth.rs
index ffced51001..68f3c8ac75 100644
--- a/crates/openhuman-core/src/security/credentials/ops/oauth.rs
+++ b/crates/openhuman-core/src/security/credentials/ops/oauth.rs
@@ -10,10 +10,10 @@
use serde_json::json;
-use crate::security::credentials::jwt::get_session_token;
use crate::backend::BackendClient;
use crate::config::Config;
use crate::rpc::RpcOutcome;
+use crate::security::credentials::jwt::get_session_token;
pub async fn oauth_fetch_client_key(
config: &Config,
diff --git a/crates/openhuman-core/src/security/credentials/ops/session_query.rs b/crates/openhuman-core/src/security/credentials/ops/session_query.rs
index 0216caf4ed..1cb13696c1 100644
--- a/crates/openhuman-core/src/security/credentials/ops/session_query.rs
+++ b/crates/openhuman-core/src/security/credentials/ops/session_query.rs
@@ -2,9 +2,9 @@
use serde_json::json;
-use crate::security::credentials::jwt::get_session_token;
use crate::config::Config;
use crate::rpc::RpcOutcome;
+use crate::security::credentials::jwt::get_session_token;
use crate::security::credentials::session_support::build_session_state;
pub async fn auth_get_state(
diff --git a/crates/openhuman-core/src/security/credentials/schemas_tests.rs b/crates/openhuman-core/src/security/credentials/schemas_tests.rs
index 06d43227ea..256f380e8c 100644
--- a/crates/openhuman-core/src/security/credentials/schemas_tests.rs
+++ b/crates/openhuman-core/src/security/credentials/schemas_tests.rs
@@ -9,7 +9,10 @@ fn catalog_counts_match() {
assert_eq!(schemas.len(), handlers.len());
// The account-bound `auth.oauth_*` / `auth.create_channel_link_token`
// controllers moved to `openhuman-tinyhumans`; the core keeps the rest.
- assert!(schemas.len() >= 8, "auth namespace should expose ≥8 core fns");
+ assert!(
+ schemas.len() >= 8,
+ "auth namespace should expose ≥8 core fns"
+ );
}
#[test]
diff --git a/crates/openhuman-core/src/util/url.rs b/crates/openhuman-core/src/util/url.rs
index 977c3d2384..3b01602d8e 100644
--- a/crates/openhuman-core/src/util/url.rs
+++ b/crates/openhuman-core/src/util/url.rs
@@ -36,8 +36,8 @@ pub fn normalize_backend_api_base_url(url: &str) -> String {
return normalized;
}
- let parsed =
- ::url::Url::parse(&normalized).or_else(|_| ::url::Url::parse(&format!("https://{normalized}")));
+ let parsed = ::url::Url::parse(&normalized)
+ .or_else(|_| ::url::Url::parse(&format!("https://{normalized}")));
let Ok(mut parsed) = parsed else {
// Unparseable even with the scheme prefix — return as-is; the caller
diff --git a/crates/openhuman-core/src/util/url_tests.rs b/crates/openhuman-core/src/util/url_tests.rs
index a9ae4ba198..0e0b6789e8 100644
--- a/crates/openhuman-core/src/util/url_tests.rs
+++ b/crates/openhuman-core/src/util/url_tests.rs
@@ -2,9 +2,15 @@ use super::*;
#[test]
fn join_url_replaces_any_base_path_with_the_absolute_route() {
- assert_eq!(join_url("https://h.example", "/auth/me"), "https://h.example/auth/me");
assert_eq!(
- join_url("https://h.example/openai/v1/chat/completions", "/agent-integrations/x"),
+ join_url("https://h.example", "/auth/me"),
+ "https://h.example/auth/me"
+ );
+ assert_eq!(
+ join_url(
+ "https://h.example/openai/v1/chat/completions",
+ "/agent-integrations/x"
+ ),
"https://h.example/agent-integrations/x"
);
assert_eq!(join_url(" https://h.example/ ", ""), "https://h.example");
@@ -23,7 +29,10 @@ fn normalize_backend_api_base_url_keeps_only_the_origin() {
"https://h.example"
);
assert_eq!(normalize_backend_api_base_url(" "), "");
- assert_eq!(normalize_api_base_url(" https://h.example// "), "https://h.example");
+ assert_eq!(
+ normalize_api_base_url(" https://h.example// "),
+ "https://h.example"
+ );
}
#[test]
diff --git a/crates/openhuman-core/src/voice/cloud_transcribe.rs b/crates/openhuman-core/src/voice/cloud_transcribe.rs
index 05a3aad5a0..c517eaeefe 100644
--- a/crates/openhuman-core/src/voice/cloud_transcribe.rs
+++ b/crates/openhuman-core/src/voice/cloud_transcribe.rs
@@ -1,9 +1,9 @@
//! OpenHuman authentication adapter for hosted speech-to-text.
-use crate::security::credentials::jwt::get_session_token;
use crate::backend::BackendClient;
use crate::config::Config;
use crate::rpc::RpcOutcome;
+use crate::security::credentials::jwt::get_session_token;
pub use tinyinference_voice::cloud::{CloudTranscribeOptions, CloudTranscribeResult};
diff --git a/crates/openhuman-core/src/voice/cloud_transcribe_tests.rs b/crates/openhuman-core/src/voice/cloud_transcribe_tests.rs
index d0a2aa219b..56fb8c9fe6 100644
--- a/crates/openhuman-core/src/voice/cloud_transcribe_tests.rs
+++ b/crates/openhuman-core/src/voice/cloud_transcribe_tests.rs
@@ -7,7 +7,9 @@ fn backend_401_is_tagged_as_session_expiry() {
.to_string(),
);
assert!(tagged.starts_with("SESSION_EXPIRED: "));
- assert!(crate::core::observability::is_session_expired_message(&tagged));
+ assert!(crate::core::observability::is_session_expired_message(
+ &tagged
+ ));
}
#[test]
@@ -37,5 +39,8 @@ async fn offline_local_session_refuses_without_a_request() {
let err = transcribe_cloud(&config, "AAAA", &CloudTranscribeOptions::default())
.await
.unwrap_err();
- assert!(crate::core::observability::is_backend_unavailable_message(&err), "{err}");
+ assert!(
+ crate::core::observability::is_backend_unavailable_message(&err),
+ "{err}"
+ );
}
diff --git a/crates/openhuman-core/src/voice/realtime.rs b/crates/openhuman-core/src/voice/realtime.rs
index ddb238a53a..502a232c16 100644
--- a/crates/openhuman-core/src/voice/realtime.rs
+++ b/crates/openhuman-core/src/voice/realtime.rs
@@ -13,10 +13,10 @@ use reqwest::Method;
use serde::{Deserialize, Serialize};
use serde_json::Value;
-use crate::security::credentials::jwt::get_session_token;
use crate::backend::BackendClient;
use crate::config::Config;
use crate::rpc::RpcOutcome;
+use crate::security::credentials::jwt::get_session_token;
const LOG_PREFIX: &str = "[voice-realtime]";
diff --git a/crates/openhuman-core/src/voice/reply_speech.rs b/crates/openhuman-core/src/voice/reply_speech.rs
index ccf406a022..9309c79f1f 100644
--- a/crates/openhuman-core/src/voice/reply_speech.rs
+++ b/crates/openhuman-core/src/voice/reply_speech.rs
@@ -20,10 +20,10 @@ use reqwest::Method;
use serde::{Deserialize, Serialize};
use serde_json::{json, Value};
-use crate::security::credentials::jwt::get_session_token;
use crate::backend::BackendClient;
use crate::config::Config;
use crate::rpc::RpcOutcome;
+use crate::security::credentials::jwt::get_session_token;
const LOG_PREFIX: &str = "[voice_reply]";
diff --git a/crates/openhuman-embed/tests/common/mod.rs b/crates/openhuman-embed/tests/common/mod.rs
index 00cde7e03c..b3fd3d5b07 100644
--- a/crates/openhuman-embed/tests/common/mod.rs
+++ b/crates/openhuman-embed/tests/common/mod.rs
@@ -125,9 +125,12 @@ pub fn tool_results(request: &wiremock::Request) -> String {
Some("tool") => Some(content),
// The harness may prepend continuation guidance and
// the active user request before the tool-result block.
- Some("user") if content.contains(PROMPT_TOOL_RESULTS_PREFIX) => {
- Some(content.split_once(PROMPT_TOOL_RESULTS_PREFIX)?.1.to_string())
- }
+ Some("user") if content.contains(PROMPT_TOOL_RESULTS_PREFIX) => Some(
+ content
+ .split_once(PROMPT_TOOL_RESULTS_PREFIX)?
+ .1
+ .to_string(),
+ ),
_ => None,
}
})
diff --git a/crates/openhuman-embed/tests/public_api.rs b/crates/openhuman-embed/tests/public_api.rs
index 98a4025def..de78933097 100644
--- a/crates/openhuman-embed/tests/public_api.rs
+++ b/crates/openhuman-embed/tests/public_api.rs
@@ -1,10 +1,10 @@
use std::sync::Arc;
use openhuman_embed::{
- set_product_identity, Access, Agent, AgentDefinitionSpec, AgentSpec, AgentTurnOrigin, ApiKey,
- Core, CoreBuilder, CoreRuntime, DomainSet, GroupMode, Harness, HostKind, ProductIdentity,
- Provider, Runtime, RuntimeBuilder, RuntimeConfig, SandboxModeSpec, ServiceSet, ToolGroups,
- ToolScopeSpec, TrustedAccess, TrustedAutomationSource, Workspace,
+ Access, Agent, AgentDefinitionSpec, AgentSpec, AgentTurnOrigin, ApiKey, Core, CoreBuilder,
+ CoreRuntime, DomainSet, GroupMode, Harness, HostKind, Provider, Runtime, RuntimeBuilder,
+ RuntimeConfig, SandboxModeSpec, ServiceSet, ToolGroups, ToolScopeSpec, TrustedAccess,
+ TrustedAutomationSource, Workspace,
};
#[test]
@@ -69,6 +69,4 @@ fn exposes_the_host_facing_embedding_contract() {
let _ = Access::full()
.trust("/tmp/embed-public-api", TrustedAccess::ReadWrite)
.origin(automation);
- let _ = set_product_identity;
- assert!(ProductIdentity::new("opencompany").is_some());
}
diff --git a/tests/config_auth_app_state_connectivity_e2e.rs b/tests/config_auth_app_state_connectivity_e2e.rs
index 65b53011cc..1b566f888d 100644
--- a/tests/config_auth_app_state_connectivity_e2e.rs
+++ b/tests/config_auth_app_state_connectivity_e2e.rs
@@ -17,11 +17,11 @@ use reqwest::StatusCode;
use serde_json::{json, Value};
use tempfile::{tempdir, TempDir};
-use openhuman_core::api::config::{
- api_base_from_env, api_url, app_env_from_env, default_api_base_url_for_env, effective_api_url,
- effective_backend_api_url, effective_inference_url, looks_like_local_ai_endpoint,
- normalize_api_base_url, APP_ENV_VAR, DEFAULT_API_BASE_URL, DEFAULT_STAGING_API_BASE_URL,
- OPENHUMAN_INFERENCE_PATH, VITE_APP_ENV_VAR,
+use openhuman_tinyhumans::backend::url::{
+ api_base_from_env, app_env_from_env, default_api_base_url_for_env, effective_api_url,
+ effective_backend_api_url, effective_inference_url, join_url as api_url,
+ looks_like_local_ai_endpoint, normalize_api_base_url, APP_ENV_VAR, DEFAULT_API_BASE_URL,
+ DEFAULT_STAGING_API_BASE_URL, OPENHUMAN_INFERENCE_PATH, VITE_APP_ENV_VAR,
};
use openhuman_core::config::schema::{
generate_provider_id, generate_voice_provider_id, is_slug_reserved, is_voice_slug_reserved,