Skip to content

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

refactor(embed): move product identity and backend transport to tinyhumans

Steven Enamakel32f15f25cee1
diff --git a/crates/openhuman-app/src/session/mod.rs b/crates/openhuman-app/src/session/mod.rs
index 3f7d2e5e1d..0934d1cc5c 100644
--- a/crates/openhuman-app/src/session/mod.rs
+++ b/crates/openhuman-app/src/session/mod.rs
@@ -37,7 +37,7 @@ impl SessionHost {
pub fn new(desktop: CoreProcessHandle) -> Self {
// The shell and the core ship as one release, so one version answers
// for both `x-core-version` and `x-tauri-version`.
- let headers = ClientHeaders::new(openhuman_core::api::product_identity().as_str())
+ let headers = ClientHeaders::new(openhuman_tinyhumans::product_identity().as_str())
.with_core_version(env!("CARGO_PKG_VERSION"))
.with_tauri_version(env!("CARGO_PKG_VERSION"));
let link = Arc::new(HttpCoreLink::new(desktop));
diff --git a/crates/openhuman-embed/src/lib.rs b/crates/openhuman-embed/src/lib.rs
index 480b140069..c6b7c7f1cd 100644
--- a/crates/openhuman-embed/src/lib.rs
+++ b/crates/openhuman-embed/src/lib.rs
@@ -59,11 +59,10 @@
//! reporting a failure.
pub use openhuman_core::agent::turn_origin::{AgentTurnOrigin, TrustedAutomationSource};
-pub use openhuman_core::api::transport::{
+pub use openhuman_core::backend::{
install_backend_transport, installed_backend_transport, BackendRequest, BackendTransport,
- BackendTransportError, TransportProfile,
+ BackendTransportError, BaseUrlPurpose, TransportProfile,
};
-pub use openhuman_core::api::{product_identity, set_product_identity, ProductIdentity};
pub use openhuman_core::config::Config as RuntimeConfig;
pub use openhuman_core::security::TrustedAccess;
pub use openhuman_core::tools::toolpacks::{GroupMode, ToolGroups};
diff --git a/crates/openhuman-embed/src/runtime/builder.rs b/crates/openhuman-embed/src/runtime/builder.rs
index 87f3806686..e47e838d2d 100644
--- a/crates/openhuman-embed/src/runtime/builder.rs
+++ b/crates/openhuman-embed/src/runtime/builder.rs
@@ -7,7 +7,7 @@
use std::sync::Arc;
-use openhuman_core::api::transport::BackendTransport;
+use openhuman_core::backend::BackendTransport;
use openhuman_core::config::Config;
use openhuman_core::core::runtime::{CoreBuilder, DomainSet, ServiceSet, TokenSource};
use openhuman_core::core::types::HostKind;
diff --git a/crates/openhuman-tinyhumans/src/lib.rs b/crates/openhuman-tinyhumans/src/lib.rs
index 86e08699c2..63746dcad4 100644
--- a/crates/openhuman-tinyhumans/src/lib.rs
+++ b/crates/openhuman-tinyhumans/src/lib.rs
@@ -46,6 +46,7 @@ mod runtime;
pub mod session;
pub mod transport;
+pub use backend::{product_identity, set_product_identity, ProductIdentity};
pub use hosted::extension as hosted_controllers;
pub use install::{install, is_installed, InstallError, InstallOptions};
pub use openhuman_embed::{
diff --git a/crates/openhuman-tinyhumans/src/runtime.rs b/crates/openhuman-tinyhumans/src/runtime.rs
index b0feaf8e59..d5272ef93c 100644
--- a/crates/openhuman-tinyhumans/src/runtime.rs
+++ b/crates/openhuman-tinyhumans/src/runtime.rs
@@ -47,7 +47,7 @@ impl RuntimeBuilder {
}
/// The `x-sdk-name` this runtime reports to the backend.
- pub fn product_identity(mut self, identity: openhuman_embed::ProductIdentity) -> Self {
+ pub fn product_identity(mut self, identity: crate::backend::ProductIdentity) -> Self {
self.install.product_identity = Some(identity);
self
}
diff --git a/crates/openhuman-tui/src/session.rs b/crates/openhuman-tui/src/session.rs
index a8bfc80aa9..02cc6b1676 100644
--- a/crates/openhuman-tui/src/session.rs
+++ b/crates/openhuman-tui/src/session.rs
@@ -30,7 +30,7 @@ static MANAGER: OnceLock<Arc<SessionManager<InProcessLink>>> = OnceLock::new();
/// same manager regardless of the handle they pass.
pub fn session_manager(runtime: &Arc<CoreRuntime>) -> Arc<SessionManager<InProcessLink>> {
Arc::clone(MANAGER.get_or_init(|| {
- let headers = ClientHeaders::new(openhuman_core::api::product_identity().as_str())
+ let headers = ClientHeaders::new(openhuman_tinyhumans::product_identity().as_str())
.with_core_version(env!("CARGO_PKG_VERSION"));
SessionManager::new(Arc::new(InProcessLink(Arc::clone(runtime))), headers)
}))