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(embed): reorganize runtime module into submodules
Steven Enamakelea1e02086b25
diff --git a/crates/openhuman-core/src/core/runtime/README.md b/crates/openhuman-core/src/core/runtime/README.mdindex 202a2543f8..a8ee54496a 100644--- a/crates/openhuman-core/src/core/runtime/README.md+++ b/crates/openhuman-core/src/core/runtime/README.md@@ -98,12 +98,6 @@ are compiled out, or whose `DomainGroup` is off, stays absent.- `.action_dir(dir)`: sugar over `.config()` for the agent's read/writeroot.- `.backend_url(url)`.-- `.backend_transport(Arc<dyn BackendTransport>)`: bind the transport this- core's handlers reach the hosted backend through (`backend::transport`). The- context carries it and every `derive_with` child inherits it. Optional:- without it the core resolves the process-global transport- (`backend::transport::install_backend_transport`), and with neither every- backend-touching call degrades to a typed "backend unavailable" error.## `CoreContext` and initialization orderdiff --git a/crates/openhuman-embed/src/host_internals.rs b/crates/openhuman-embed/src/host_internals.rsindex a2e468fb41..c28662cb42 100644--- a/crates/openhuman-embed/src/host_internals.rs+++ b/crates/openhuman-embed/src/host_internals.rs@@ -106,20 +106,6 @@ pub mod core {}}-/// tinyhumans (backend transport, hosted client, team ops) and rpc (`/health`).-pub mod backend {- pub use openhuman_core::backend::{- base_url, flatten_authed_error, BackendApiError, BackendClient,- };-- pub mod transport {- pub use openhuman_core::backend::transport::{- clear_backend_transport, resolve_backend_transport, BackendTransport,- BackendTransportError, TransportProfile,- };- }-}-/// tinyhumans (every hosted controller loads its config) and rpc (server).pub mod config {pub use openhuman_core::config::{diff --git a/crates/openhuman-embed/src/lib.rs b/crates/openhuman-embed/src/lib.rsindex c8b15b13d6..d1bf4d784d 100644--- a/crates/openhuman-embed/src/lib.rs+++ b/crates/openhuman-embed/src/lib.rs@@ -76,10 +76,6 @@ pub use openhuman_core::agent::turn_origin::{AgentTurnOrigin, TrustedAutomationSpub fn current_turn_origin() -> Option<AgentTurnOrigin> {openhuman_core::core::runtime::CoreContext::current_turn_origin()}-pub use openhuman_core::backend::{- install_backend_transport, installed_backend_transport, BackendRequest, BackendTransport,- BackendTransportError, BaseUrlPurpose, TransportProfile,-};pub use openhuman_core::config::ComposioHostCredential;pub use openhuman_core::config::Config as RuntimeConfig;pub use openhuman_core::config::{SearchHostCredential, UnknownKeyedSearchProvider};diff --git a/crates/openhuman-embed/src/runtime/build.rs b/crates/openhuman-embed/src/runtime/build.rsindex ada353d59e..2caa9413ce 100644--- a/crates/openhuman-embed/src/runtime/build.rs+++ b/crates/openhuman-embed/src/runtime/build.rs@@ -270,9 +270,6 @@ impl RuntimeBuilder {if let Some(port) = self.listen_port {builder = builder.port(port);}- if let Some(transport) = self.backend_transport.take() {- builder = builder.backend_transport(transport);- }let runtime = builder.build().await.map_err(|error| {log::warn!("[embed][runtime] core build failed: {error:#}");RuntimeError::Build(error)diff --git a/crates/openhuman-embed/src/runtime/builder.rs b/crates/openhuman-embed/src/runtime/builder.rsindex aaec18d055..a5e53a23ad 100644--- a/crates/openhuman-embed/src/runtime/builder.rs+++ b/crates/openhuman-embed/src/runtime/builder.rs@@ -14,7 +14,6 @@use std::path::PathBuf;use std::sync::Arc;-use openhuman_core::backend::BackendTransport;use openhuman_core::config::Config;use openhuman_core::core::runtime::{DomainSet, ServiceSet, TokenSource};use openhuman_core::core::types::HostKind;@@ -96,7 +95,6 @@ pub struct RuntimeBuilder {pub(super) session: Option<Session>,pub(super) backend_url: Option<String>,pub(super) api_key: Option<ApiKey>,- pub(super) backend_transport: Option<Arc<dyn BackendTransport>>,pub(super) memory_engine: Option<Arc<dyn tinymemory_api::MemoryEngine>>,pub(super) session_store: Option<Arc<dyn SessionStoreProvider>>,pub(super) cron_delivery: Option<Arc<dyn openhuman_core::cron::host_delivery::CronDelivery>>,@@ -142,7 +140,6 @@ impl RuntimeBuilder {session: None,backend_url: None,api_key: None,- backend_transport: None,memory_engine: None,session_store: None,cron_delivery: None,@@ -220,20 +217,6 @@ impl RuntimeBuilder {self}- /// The transport the runtime reaches the hosted TinyHumans backend- /// through (see [`BackendTransport`]).- ///- /// The core carries no backend client of its own: without a transport- /// every hosted-backend surface (billing, integrations tools, channel- /// relay, cloud voice) answers with a typed "backend unavailable" error- /// while agents, memory, skills and RPC work as normal. The- /// `openhuman-tinyhumans` crate supplies the SDK-backed implementation- /// and a builder that installs it for you.- pub fn backend_transport(mut self, transport: Arc<dyn BackendTransport>) -> Self {- self.backend_transport = Some(transport);- self- }-/// The memory engine every agent and [`crate::Runtime::memory`](super::Runtime::memory)/// use, in place of the configured `[memory]` engine (TinyHumans over the/// backend credential, or CortexDB with a stored key).diff --git a/crates/openhuman-embed/src/runtime/run.rs b/crates/openhuman-embed/src/runtime/run.rsindex 95fa1c1955..6032f9b816 100644--- a/crates/openhuman-embed/src/runtime/run.rs+++ b/crates/openhuman-embed/src/runtime/run.rs@@ -20,7 +20,6 @@use std::sync::Arc;-use openhuman_core::backend::BackendTransport;use openhuman_core::core::server_launcher::HostBoot;use tinyagents_session::port::SessionStoreProvider;@@ -124,7 +123,6 @@ impl RuntimeBuilder {seams.storage = storage.clone();self.seams.storage = storage;let globals = CliGlobals {- transport: self.backend_transport.clone(),memory_engine: self.memory_engine.clone(),session_store: self.session_store.clone(),seams,@@ -147,10 +145,6 @@ impl CliGlobals {fn install(mut self,) -> Result<Option<Arc<dyn openhuman_core::storage::StorageBackend>>, String> {- if let Some(transport) = self.transport {- openhuman_core::backend::install_backend_transport(transport);- log::debug!("[embed][cli] backend transport installed (process global)");- }if let Some(engine) = self.memory_engine {openhuman_core::memory::engine::install_host_engine(engine);}diff --git a/crates/openhuman-embed/src/runtime/summary.rs b/crates/openhuman-embed/src/runtime/summary.rsindex c4934eaf10..6574e1eb33 100644--- a/crates/openhuman-embed/src/runtime/summary.rs+++ b/crates/openhuman-embed/src/runtime/summary.rs@@ -41,8 +41,6 @@ pub struct BuilderSummary {pub listen_port: Option<u16>,/// Whether a backend API key was supplied, without exposing it.pub has_api_key: bool,- /// Whether a backend transport was supplied.- pub has_backend_transport: bool,/// Whether a host memory engine was supplied.pub has_memory_engine: bool,/// Whether a host session store was supplied.@@ -78,7 +76,6 @@ impl RuntimeBuilder {listen_host: self.listen_host.clone(),listen_port: self.listen_port,has_api_key: self.api_key.is_some(),- has_backend_transport: self.backend_transport.is_some(),has_memory_engine: self.memory_engine.is_some(),has_session_store: self.session_store.is_some(),controller_extensions: self