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
refactor(tinyhumans): reorganize backend, hosted, and transport modules
Steven Enamakel359df421ac38
diff --git a/crates/openhuman-tinyhumans/src/backend/README.md b/crates/openhuman-tinyhumans/src/backend/README.mdindex 5511d04b1b..556ea6f82d 100644--- a/crates/openhuman-tinyhumans/src/backend/README.md+++ b/crates/openhuman-tinyhumans/src/backend/README.md@@ -4,7 +4,7 @@ Everything host-specific about reaching the TinyHumans backend: where it is,how requests are attributed, and which product they are attributed to. Thecore holds none of this. It asks the installed `BackendTransport`(`SdkBackendTransport` in [`../transport/`](../transport/README.md)) through-`openhuman_core::backend::{base_url, inference_base_url, product_identity,+`openhuman_embed::__host::backend::{base_url, inference_base_url, product_identity,attribution_headers}`, and the transport answers from the three files here.## How it works@@ -75,7 +75,7 @@ header-safe characters and clamped to 64 bytes. `attribution_headers()`builds that map.`backend_client_builder(profile)` returns a `reqwest::ClientBuilder` with the-platform TLS backend (`openhuman_core::util::tls::tls_client_builder`, which+platform TLS backend (`openhuman_embed::__host::util::tls::tls_client_builder`, whichpicks schannel on Windows and rustls elsewhere), HTTP/1 only, redirectsdisabled, a 15 s connect timeout and the attribution headers as defaults. Therequest timeout depends on the `TransportProfile`: 120 s for `Api` and 60 s@@ -125,7 +125,7 @@ process.- The core owns the questions (`backend::base_url` and friends in`crates/openhuman-core/src/backend/mod.rs`) and the URL utilities this file- re-exports (`openhuman_core::util::url`). It owns the app-environment+ re-exports (`openhuman_embed::__host::util::url`). It owns the app-environmentreading too (`config::app_env`).- Do not put the `x-sdk-name` header on third-party endpoints, MCP servers,BYOK inference endpoints or presigned storage redirects. These helpers arediff --git a/crates/openhuman-tinyhumans/src/backend/headers.rs b/crates/openhuman-tinyhumans/src/backend/headers.rsindex 0acd74e471..4377c469aa 100644--- a/crates/openhuman-tinyhumans/src/backend/headers.rs+++ b/crates/openhuman-tinyhumans/src/backend/headers.rs@@ -7,13 +7,13 @@//! shell, when it hosts the core) and `x-sdk-name` (the product identity from//! [`crate::backend::product`]). This is TinyHumans header policy, so it lives//! with the TinyHumans transport; the core only asks the installed-//! [`BackendTransport`](openhuman_core::backend::BackendTransport) for them.+//! [`BackendTransport`](openhuman_embed::__host::backend::BackendTransport) for them.use anyhow::{Context, Result};use reqwest::header::{HeaderMap, HeaderName, HeaderValue};use std::time::Duration;-use openhuman_core::backend::TransportProfile;+use openhuman_embed::__host::backend::TransportProfile;/// Upper bound on the `x-core-version` / `x-tauri-version` header values. A/// version string is short; anything longer is a misconfigured environment and@@ -48,7 +48,7 @@ pub(crate) fn sanitize_client_version(raw: &str) -> Option<String> {////// Set at the transport level rather than per request because some callers/// drive a raw `reqwest::Client` themselves (multipart STT upload via-/// [`BackendClient::raw_client`](openhuman_core::backend::BackendClient::raw_client))+/// [`BackendClient::raw_client`](openhuman_embed::__host::backend::BackendClient::raw_client))/// and that traffic needs attributing too.pub fn attribution_headers() -> Result<HeaderMap> {let mut headers = HeaderMap::new();@@ -77,7 +77,7 @@ pub fn attribution_headers() -> Result<HeaderMap> {////// Platform-appropriate TLS: Windows → schannel (honors the OS cert store,/// required for corporate TLS-inspection proxies); macOS / Linux → rustls.-/// See [`openhuman_core::util::tls::tls_client_builder`].+/// See [`openhuman_embed::__host::util::tls::tls_client_builder`].pub fn backend_client_builder(profile: TransportProfile) -> Result<reqwest::ClientBuilder> {let timeout = match profile {// `BackendClient` historically allowed 120 s: it fronts slow@@ -86,7 +86,7 @@ pub fn backend_client_builder(profile: TransportProfile) -> Result<reqwest::Clie// `/agent-integrations/*` tool calls were always capped at 60 s.TransportProfile::Integrations => Duration::from_secs(60),};- Ok(openhuman_core::util::tls::tls_client_builder()+ Ok(openhuman_embed::__host::util::tls::tls_client_builder().default_headers(attribution_headers()?).http1_only()// The SDK adds `x-api-key` per request. Reqwest does not strip thisdiff --git a/crates/openhuman-tinyhumans/src/backend/mod.rs b/crates/openhuman-tinyhumans/src/backend/mod.rsindex 94a28704d5..40dfbc38c3 100644--- a/crates/openhuman-tinyhumans/src/backend/mod.rs+++ b/crates/openhuman-tinyhumans/src/backend/mod.rs@@ -2,7 +2,7 @@//! is, how requests are attributed, and who they are attributed to.//!//! The core knows none of this. It asks the installed-//! [`BackendTransport`](openhuman_core::backend::BackendTransport) —+//! [`BackendTransport`](openhuman_embed::__host::backend::BackendTransport) —//! [`SdkBackendTransport`](crate::SdkBackendTransport) — which answers from//! these modules://!diff --git a/crates/openhuman-tinyhumans/src/backend/product.rs b/crates/openhuman-tinyhumans/src/backend/product.rsindex ca1a1fd0b0..9ac385a44c 100644--- a/crates/openhuman-tinyhumans/src/backend/product.rs+++ b/crates/openhuman-tinyhumans/src/backend/product.rs@@ -24,7 +24,7 @@//! A build that never calls the setter sends [`DEFAULT_PRODUCT_IDENTITY`], so//! behaviour is unchanged for any host that does not opt in.//!-//! The shape mirrors `openhuman_core::config::schema::proxy`'s runtime+//! The shape mirrors `openhuman_embed::__host::config::schema::proxy`'s runtime//! proxy config — a `OnceLock<RwLock<_>>` holding a defaulted value — rather//! than a bare `OnceLock<T>`, which could only ever be set once per process and//! would make the override untestable without poisoning the test binary.@@ -40,7 +40,7 @@ pub const DEFAULT_PRODUCT_IDENTITY: &str = "openhuman";/// Upper bound on the emitted header value. Mirrors the cap/// `sanitize_client_version` applies to `x-core-version` in-/// [`openhuman_core::backend`].+/// [`openhuman_embed::__host::backend`].const PRODUCT_IDENTITY_MAX_LEN: usize = 64;/// A product identity that is always safe to send as a header value.@@ -107,7 +107,7 @@ fn slot() -> &'static RwLock<ProductIdentity> {/// Set the product identity for this process.////// Call once during startup, before the first backend client is constructed.-/// [`BackendClient`](openhuman_core::backend::BackendClient) and `IntegrationClient` read the+/// [`BackendClient`](openhuman_embed::__host::backend::BackendClient) and `IntegrationClient` read the/// identity into their default headers at construction, so a later call does/// not retroactively re-tag clients that already exist.pub fn set_product_identity(identity: ProductIdentity) {@@ -154,7 +154,7 @@ pub fn product_identity_headers() -> HeaderMap {////// The identity is process state, so a module-local lock cannot prevent/// cross-module races: `backend::product`, `backend::headers` and-/// `openhuman_core::integrations` tests all touch it from parallel test threads, and+/// `openhuman_embed::__host::integrations` tests all touch it from parallel test threads, and/// a test asserting the `openhuman` default would flake against a test that has/// installed an override. Every test that touches the identity must take THIS/// lock and restore the default before releasing it.diff --git a/crates/openhuman-tinyhumans/src/backend/url.rs b/crates/openhuman-tinyhumans/src/backend/url.rsindex 32ca75b08d..e98487c3ae 100644--- a/crates/openhuman-tinyhumans/src/backend/url.rs+++ b/crates/openhuman-tinyhumans/src/backend/url.rs@@ -40,10 +40,10 @@//! 4. Environment-aware default: `staging` env → [`DEFAULT_STAGING_API_BASE_URL`],//! otherwise [`DEFAULT_API_BASE_URL`].-pub use openhuman_core::config::app_env::{+pub use openhuman_embed::__host::config::app_env::{app_env_from_env, is_staging_app_env, APP_ENV_VAR, VITE_APP_ENV_VAR,};-pub use openhuman_core::util::url::{+pub use openhuman_embed::__host::util::url::{host_is_local, join_url, normalize_api_base_url, normalize_backend_api_base_url,};@@ -162,9 +162,9 @@ pub fn effective_backend_api_url(api_url: &Option<String>) -> String {// billing) would 400/404 against the inference host — TAURI-RUST-HW1// (4932 `GET /teams/me/usage` 400s from `openrouter.ai`). Cloud analogue// of the local-AI guard (OPENHUMAN-TAURI-51/-80/-7Z, Ollama).- let is_cloud_inference = openhuman_core::config::schema::cloud_providers::endpoint_host(u)+ let is_cloud_inference = openhuman_embed::__host::config::schema::cloud_providers::endpoint_host(u).is_some_and(|h| {- openhuman_core::config::schema::cloud_providers::host_is_builtin_cloud_provider(&h)+ openhuman_embed::__host::config::schema::cloud_providers::host_is_builtin_cloud_provider(&h)});tracing::debug!(@@ -502,7 +502,7 @@ fn compile_time_api_base_env_values() -> [Option<&'static str>; 2] {////// Falls back to a scheme-prefixed parse for bare-host strings like/// `localhost:1234` so those are still sanitised rather than returned verbatim.-use openhuman_core::util::redact_url_for_log;+use openhuman_embed::__host::util::redact_url_for_log;/// Emit a single `warn!` log the **first time** the backend URL falls back/// from a user-set local-AI endpoint. Uses `std::sync::Once` to suppressdiff --git a/crates/openhuman-tinyhumans/src/hosted/announcements/ops.rs b/crates/openhuman-tinyhumans/src/hosted/announcements/ops.rsindex 3d1d56dabf..a7c0383a9b 100644--- a/crates/openhuman-tinyhumans/src/hosted/announcements/ops.rs+++ b/crates/openhuman-tinyhumans/src/hosted/announcements/ops.rs@@ -9,8 +9,8 @@use serde_json::Value;use tinyhumans_sdk::Error as SdkError;-use openhuman_core::config::Config;-use openhuman_core::core::Outcome;+use openhuman_embed::__host::config::Config;+use openhuman_embed::__host::core::Outcome;use crate::hosted::client::HostedClient;diff --git a/crates/openhuman-tinyhumans/src/hosted/announcements/ops_tests.rs b/crates/openhuman-tinyhumans/src/hosted/announcements/ops_tests.rsindex c4b2588afa..1641866ff9 100644--- a/crates/openhuman-tinyhumans/src/hosted/announcements/ops_tests.rs+++ b/crates/openhuman-tinyhumans/src/hosted/announcements/ops_tests.rs@@ -1,5 +1,5 @@use super::*;-use openhuman_core::security::credentials::session_support::BackendCredential;+use openhuman_embed::__host::security::credentials::session_support::BackendCredential;use serde_json::json;use wiremock::matchers::{method, path};use wiremock::{Mock, MockServer, ResponseTemplate};diff --git a/crates/openhuman-tinyhumans/src/hosted/announcements/schemas.rs b/crates/openhuman-tinyhumans/src/hosted/announcements/schemas.rsindex b8b6f6c375..3c466368c6 100644--- a/crates/openhuman-tinyhumans/src/hosted/announcements/schemas.rs+++ b/crates/openhuman-tinyhumans/src/hosted/announcements/schemas.rs@@ -1,9 +1,9 @@use serde_json::{Map, Value};-use openhuman_core::config::rpc as config_rpc;-use openhuman_core::core::all::{ControllerFuture, RegisteredController};-use openhuman_core::core::Outcome;-use openhuman_core::core::{ControllerSchema, FieldSchema, TypeSchema};+use openhuman_embed::__host::config::rpc as config_rpc;+use openhuman_embed::__host::core::all::{ControllerFuture, RegisteredController};+use openhuman_embed::__host::core::Outcome;+use openhuman_embed::__host::core::{ControllerSchema, FieldSchema, TypeSchema};pub fn all_announcements_controller_schemas() -> Vec<ControllerSchema> {vec![announcements_schemas("announcements_get_latest")]diff --git a/crates/openhuman-tinyhumans/src/hosted/billing/ops.rs b/crates/openhuman-tinyhumans/src/hosted/billing/ops.rsindex acea33f2e6..b3e42c805e 100644--- a/crates/openhuman-tinyhumans/src/hosted/billing/ops.rs+++ b/crates/openhuman-tinyhumans/src/hosted/billing/ops.rs@@ -18,8 +18,8 @@ use tinyhumans_sdk::api::payments::{};use tinyhumans_sdk::api::types::{BillingPlan, CodeRequest};-use openhuman_core::config::Config;-use openhuman_core::core::Outcome;+use openhuman_embed::__host::config::Config;+use openhuman_embed::__host::core::Outcome;use crate::hosted::client::HostedClient;diff --git a/crates/openhuman-tinyhumans/src/hosted/billing/schemas.rs b/crates/openhuman-tinyhumans/src/hosted/billing/schemas.rsindex b5d87c376f..dc2be0925d 100644--- a/crates/openhuman-tinyhumans/src/hosted/billing/schemas.rs+++ b/crates/openhuman-tinyhumans/src/hosted/billing/schemas.rs@@ -2,10 +2,10 @@ use serde::de::DeserializeOwned;use serde::Deserialize;use serde_json::{Map, Value};-use openhuman_core::config::rpc as config_rpc;-use openhuman_core::core::all::{ControllerFuture, RegisteredController};-use openhuman_core::core::Outcome;-use openhuman_core::core::{ControllerSchema, FieldSchema, TypeSchema};+use openhuman_embed::__host::config::rpc as config_rpc;+use openhuman_embed::__host::core::all::{ControllerFuture, RegisteredController};+use openhuman_embed::__host::core::Outcome;+use openhuman_embed::__host::core::{ControllerSchema, FieldSchema, TypeSchema};#[derive(Debug, Deserialize)]#[serde(rename_all = "camelCase")]diff --git a/crates/openhuman-tinyhumans/src/hosted/channel_link/managed.rs b/crates/openhuman-tinyhumans/src/hosted/channel_link/managed.rsindex e07bea3cf2..20300246e9 100644--- a/crates/openhuman-tinyhumans/src/hosted/channel_link/managed.rs+++ b/crates/openhuman-tinyhumans/src/hosted/channel_link/managed.rs@@ -10,10 +10,10 @@ use tinychannels_bus::controllers::{TelegramLoginCheckResult, TelegramLoginStartResult,};-use openhuman_core::config::app_env::{app_env_from_env, is_staging_app_env};-use openhuman_core::config::Config;-use openhuman_core::core::Outcome;-use openhuman_core::security::credentials;+use openhuman_embed::__host::config::app_env::{app_env_from_env, is_staging_app_env};+use openhuman_embed::__host::config::Config;+use openhuman_embed::__host::core::Outcome;+use openhuman_embed::__host::security::credentials;use super::ops::link_token_payload;use crate::hosted::client::HostedClient;diff --git a/crates/openhuman-tinyhumans/src/hosted/channel_link/managed_tests.rs b/crates/openhuman-tinyhumans/src/hosted/channel_link/managed_tests.rsindex 30bca5145c..774f1a3467 100644--- a/crates/openhuman-tinyhumans/src/hosted/channel_link/managed_tests.rs+++ b/crates/openhuman-tinyhumans/src/hosted/channel_link/managed_tests.rs@@ -80,7 +80,7 @@ async fn check_flows_read_auth_me_and_store_the_marker_when_linked() {let tg = telegram_login_check(&config, "lt").await.unwrap().value;assert!(tg.linked);assert_eq!(tg.details.unwrap()["telegramId"], json!("tg-42"));- let stored = openhuman_core::security::credentials::ops::list_provider_credentials(+ let stored = openhuman_embed::__host::security::credentials::ops::list_provider_credentials(&config,Some("channel:telegram:managed_dm".to_string()),)diff --git a/crates/openhuman-tinyhumans/src/hosted/channel_link/ops.rs b/crates/openhuman-tinyhumans/src/hosted/channel_link/ops.rsindex 5f55fc5729..9a8f12a969 100644--- a/crates/openhuman-tinyhumans/src/hosted/channel_link/ops.rs+++ b/crates/openhuman-tinyhumans/src/hosted/channel_link/ops.rs@@ -6,8 +6,8 @@use serde_json::Value;-use openhuman_core::config::Config;-use openhuman_core::core::Outcome;+use openhuman_embed::__host::config::Config;+use openhuman_embed::__host::core::Outcome;use crate::hosted::client::HostedClient;diff --git a/crates/openhuman-tinyhumans/src/hosted/channel_link/ops_tests.rs b/crates/openhuman-tinyhumans/src/hosted/channel_link/ops_tests.rsindex e3beec99fb..2872f057a8 100644--- a/crates/openhuman-tinyhumans/src/hosted/channel_link/ops_tests.rs+++ b/crates/openhuman-tinyhumans/src/hosted/channel_link/ops_tests.rs@@ -1,6 +1,6 @@use super::*;use crate::hosted::test_support;-use openhuman_core::core::observability::is_session_expired_message;+use openhuman_embed::__host::core::observability::is_session_expired_message;use serde_json::json;use tempfile::TempDir;use wiremock::matchers::{method, path};diff --git a/crates/openhuman-tinyhumans/src/hosted/channel_link/schemas.rs b/crates/openhuman-tinyhumans/src/hosted/channel_link/schemas.rsindex 2e4309ba34..1ec2101164 100644--- a/crates/openhuman-tinyhumans/src/hosted/channel_link/schemas.rs+++ b/crates/openhuman-tinyhumans/src/hosted/channel_link/schemas.rs@@ -2,10 +2,10 @@ use serde::de::DeserializeOwned;use serde::Deserialize;use serde_json::{Map, Value};-use openhuman_core::config::rpc as config_rpc;-use openhuman_core::core::all::{ControllerFuture, RegisteredController};-use openhuman_core::core::Outcome;-use openhuman_core::core::{ControllerSchema, FieldSchema, TypeSchema};+use openhuman_embed::__host::config::rpc as config_rpc;+use openhuman_embed::__host::core::all::{ControllerFuture, RegisteredController};+use openhuman_embed::__host::core::Outcome;+use openhuman_embed::__host::core::{ControllerSchema, FieldSchema, TypeSchema};#[derive(Debug, Deserialize)]#[serde(rename_all = "camelCase")]@@ -83,7 +83,7 @@ pub fn channel_link_schemas(function: &str) -> ControllerSchema {}],},f if CHANNEL_FUNCTIONS.contains(&f) => {- openhuman_core::channels::contract_schema::contract_controller_schema(f)+ openhuman_embed::__host::channels::contract_schema::contract_controller_schema(f)}_ => ControllerSchema {namespace: "auth",diff --git a/crates/openhuman-tinyhumans/src/hosted/client.rs b/crates/openhuman-tinyhumans/src/hosted/client.rsindex 3789936a0e..e1257b167a 100644--- a/crates/openhuman-tinyhumans/src/hosted/client.rs+++ b/crates/openhuman-tinyhumans/src/hosted/client.rs@@ -30,15 +30,15 @@//! phrases, budget exhaustion) keep matching them.use crate::backend::url::effective_backend_api_url;-use openhuman_core::backend::transport::{+use openhuman_embed::__host::backend::transport::{resolve_backend_transport, BackendTransport, BackendTransportError, TransportProfile,};-use openhuman_core::config::Config;-use openhuman_core::core::observability::{+use openhuman_embed::__host::config::Config;+use openhuman_embed::__host::core::observability::{contains_transient_transport_phrase, is_transient_http_status_code, API_KEY_REJECTED_PREFIX,BACKEND_UNAVAILABLE_PREFIX,};-use openhuman_core::security::credentials::session_support::{+use openhuman_embed::__host::security::credentials::session_support::{resolve_backend_credential, BackendCredential,};use serde_json::Value;diff --git a/crates/openhuman-tinyhumans/src/hosted/client_tests.rs b/crates/openhuman-tinyhumans/src/hosted/client_tests.rsindex 82d99ecdbc..07b6bb421f 100644--- a/crates/openhuman-tinyhumans/src/hosted/client_tests.rs+++ b/crates/openhuman-tinyhumans/src/hosted/client_tests.rs@@ -1,8 +1,8 @@use super::*;-use openhuman_core::core::observability::{+use openhuman_embed::__host::core::observability::{expected_error_kind, is_api_key_rejected_message, is_session_expired_message,};-use openhuman_core::security::credentials::{AuthService, APP_SESSION_PROVIDER};+use openhuman_embed::__host::security::credentials::{AuthService, APP_SESSION_PROVIDER};use serde_json::json;use tempfile::TempDir;use wiremock::matchers::{header, method, path};@@ -137,7 +137,7 @@ fn offline_local_session_fails_before_any_request() {.expect("local refuses");assert_eq!(err,- openhuman_core::security::credentials::session_support::LOCAL_SESSION_BACKEND_UNAVAILABLE+ openhuman_embed::__host::security::credentials::session_support::LOCAL_SESSION_BACKEND_UNAVAILABLE);assert!(expected_error_kind(&err).is_some());}diff --git a/crates/openhuman-tinyhumans/src/hosted/mod.rs b/crates/openhuman-tinyhumans/src/hosted/mod.rsindex cfb5c8f833..fe363707d0 100644--- a/crates/openhuman-tinyhumans/src/hosted/mod.rs+++ b/crates/openhuman-tinyhumans/src/hosted/mod.rs@@ -44,7 +44,7 @@ pub mod webhooks;#[cfg(test)]pub(crate) mod test_support;-use openhuman_core::core::all::{ControllerExtension, DomainGroup};+use openhuman_embed::__host::core::all::{ControllerExtension, DomainGroup};/// Namespace descriptions the core's `namespace_description` serves for the/// namespaces only the hosted surface uses. Shared namespaces (`auth`,diff --git a/crates/openhuman-tinyhumans/src/hosted/oauth/ops.rs b/crates/openhuman-tinyhumans/src/hosted/oauth/ops.rsindex 958e099701..0d28b270a9 100644--- a/crates/openhuman-tinyhumans/src/hosted/oauth/ops.rs+++ b/crates/openhuman-tinyhumans/src/hosted/oauth/ops.rs@@ -8,8 +8,8 @@ use serde_json::{json, Value};use tinyhumans_sdk::api::types::IntegrationTokenRequest;use super::handoff::decrypt_handoff_blob;-use openhuman_core::config::Config;-use openhuman_core::core::Outcome;+use openhuman_embed::__host::config::Config;+use openhuman_embed::__host::core::Outcome;use super::types::{IntegrationSummary, IntegrationTokensHandoff};use crate::hosted::client::{CredentialKind, HostedClient};diff --git a/crates/openhuman-tinyhumans/src/hosted/oauth/schemas.rs b/crates/openhuman-tinyhumans/src/hosted/oauth/schemas.rsindex ad44f04f1b..56a3b7105f 100644--- a/crates/openhuman-tinyhumans/src/hosted/oauth/schemas.rs+++ b/crates/openhuman-tinyhumans/src/hosted/oauth/schemas.rs@@ -2,10 +2,10 @@ use serde::de::DeserializeOwned;use serde::Deserialize;use serde_json::{Map, Value};-use openhuman_core::config::rpc as config_rpc;-use openhuman_core::core::all::{ControllerFuture, RegisteredController};-use openhuman_core::core::Outcome;-use openhuman_core::core::{ControllerSchema, FieldSchema, TypeSchema};+use openhuman_embed::__host::config::rpc as config_rpc;+use openhuman_embed::__host::core::all::{ControllerFuture, RegisteredController};+use openhuman_embed::__host::core::Outcome;+use openhuman_embed::__host::core::{ControllerSchema, FieldSchema, TypeSchema};#[derive(Debug, Deserialize)]#[serde(rename_all = "camelCase")]diff --git a/crates/openhuman-tinyhumans/src/hosted/referral/ops.rs b/crates/openhuman-tinyhumans/src/hosted/referral/ops.rsindex d0ee9ff4be..0180aca128 100644--- a/crates/openhuman-tinyhumans/src/hosted/referral/ops.rs+++ b/crates/openhuman-tinyhumans/src/hosted/referral/ops.rs@@ -7,8 +7,8 @@use serde_json::Value;use tinyhumans_sdk::api::types::ClaimReferralRequest;-use openhuman_core::config::Config;-use openhuman_core::core::Outcome;+use openhuman_embed::__host::config::Config;+use openhuman_embed::__host::core::Outcome;use crate::hosted::client::HostedClient;diff --git a/crates/openhuman-tinyhumans/src/hosted/referral/ops_tests.rs b/crates/openhuman-tinyhumans/src/hosted/referral/ops_tests.rsindex 2a6b9d15a8..676a566481 100644--- a/crates/openhuman-tinyhumans/src/hosted/referral/ops_tests.rs+++ b/crates/openhuman-tinyhumans/src/hosted/referral/ops_tests.rs@@ -3,7 +3,7 @@ use axum::{routing::{get, post},Json, Router,};-use openhuman_core::security::credentials::{+use openhuman_embed::__host::security::credentials::{AuthService, APP_SESSION_PROVIDER, DEFAULT_AUTH_PROFILE_NAME,};use serde_json::json;diff --git a/crates/openhuman-tinyhumans/src/hosted/referral/schemas.rs b/crates/openhuman-tinyhumans/src/hosted/referral/schemas.rsindex f7f2ce49de..8387e07af5 100644--- a/crates/openhuman-tinyhumans/src/hosted/referral/schemas.rs+++ b/crates/openhuman-tinyhumans/src/hosted/referral/schemas.rs@@ -2,10 +2,10 @@ use serde::de::DeserializeOwned;use serde::Deserialize;use serde_json::{Map, Value};-use openhuman_core::config::rpc as config_rpc;-use openhuman_core::core::all::{ControllerFuture, RegisteredController};-use openhuman_core::core::Outcome;-use openhuman_core::core::{ControllerSchema, FieldSchema, TypeSchema};+use openhuman_embed::__host::config::rpc as config_rpc;+use openhuman_embed::__host::core::all::{ControllerFuture, RegisteredController};+use openhuman_embed::__host::core::Outcome;+use openhuman_embed::__host::core::{ControllerSchema, FieldSchema, TypeSchema};#[derive(Debug, Deserialize)]#[serde(rename_all = "camelCase")]diff --git a/crates/openhuman-tinyhumans/src/hosted/team/ops.rs b/crates/openhuman-tinyhumans/src/hosted/team/ops.rsindex f08f953a07..d2a0b32ee9 100644--- a/crates/openhuman-tinyhumans/src/hosted/team/ops.rs+++ b/crates/openhuman-tinyhumans/src/hosted/team/ops.rs@@ -16,10 +16,10 @@ use serde_json::{json, Value};use tinyhumans_sdk::api::types::{CodeRequest, CreateTeamInviteRequest};use crate::backend::url::effective_backend_api_url;-use openhuman_core::backend::BackendClient;-use openhuman_core::config::Config;-use openhuman_core::core::Outcome;-use openhuman_core::integrations::client::budget_gate;+use openhuman_embed::__host::backend::BackendClient;+use openhuman_embed::__host::config::Config;+use openhuman_embed::__host::core::Outcome;+use openhuman_embed::__host::integrations::client::budget_gate;use crate::hosted::client::HostedClient;@@ -118,13 +118,13 @@ async fn legacy_authed_value(body: Option<Value>,) -> Result<Value, String> {let credential =- openhuman_core::security::credentials::session_support::resolve_backend_credential(config)?;+ openhuman_embed::__host::security::credentials::session_support::resolve_backend_credential(config)?;let api_url = effective_backend_api_url(&config.api_url);let client = BackendClient::new(&api_url).map_err(|e| format!("{e:#}"))?;client.authed_json(credential, method, path, body).await- .map_err(openhuman_core::backend::flatten_authed_error)+ .map_err(openhuman_embed::__host::backend::flatten_authed_error)}pub async fn update_team(diff --git a/crates/openhuman-tinyhumans/src/hosted/team/ops_tests.rs b/crates/openhuman-tinyhumans/src/hosted/team/ops_tests.rsindex 33f0702ba7..93bd7a52fd 100644--- a/crates/openhuman-tinyhumans/src/hosted/team/ops_tests.rs+++ b/crates/openhuman-tinyhumans/src/hosted/team/ops_tests.rs@@ -162,7 +162,7 @@ async fn revoke_invite_rejects_empty_invite_id() {// --- SDK-backed calls against a mock backend -----------------------------use crate::hosted::test_support;-use openhuman_core::core::observability::expected_error_kind;+use openhuman_embed::__host::core::observability::expected_error_kind;use serde_json::json;use tempfile::TempDir;use wiremock::matchers::{body_json, method, path};diff --git a/crates/openhuman-tinyhumans/src/hosted/team/schemas.rs b/crates/openhuman-tinyhumans/src/hosted/team/schemas.rsindex 368a16de8f..47c96c9643 100644--- a/crates/openhuman-tinyhumans/src/hosted/team/schemas.rs+++ b/crates/openhuman-tinyhumans/src/hosted/team/schemas.rs@@ -2,10 +2,10 @@ use serde::de::DeserializeOwned;use serde::Deserialize;use serde_json::{Map, Value};-use openhuman_core::config::rpc as config_rpc;-use openhuman_core::core::all::{ControllerFuture, RegisteredController};-use openhuman_core::core::Outcome;-use openhuman_core::core::{ControllerSchema, FieldSchema, TypeSchema};+use openhuman_embed::__host::config::rpc as config_rpc;+use openhuman_embed::__host::core::all::{ControllerFuture, RegisteredController};+use openhuman_embed::__host::core::Outcome;+use openhuman_embed::__host::core::{ControllerSchema, FieldSchema, TypeSchema};#[derive(Debug, Deserialize)]#[serde(rename_all = "camelCase")]diff --git a/crates/openhuman-tinyhumans/src/hosted/test_support.rs b/crates/openhuman-tinyhumans/src/hosted/test_support.rsindex 3a2de07559..9f2d28ef96 100644--- a/crates/openhuman-tinyhumans/src/hosted/test_support.rs+++ b/crates/openhuman-tinyhumans/src/hosted/test_support.rs@@ -1,7 +1,7 @@//! Test fixtures shared by the hosted domains' `*_tests.rs`.-use openhuman_core::config::Config;-use openhuman_core::security::credentials::{AuthService, APP_SESSION_PROVIDER};+use openhuman_embed::__host::config::Config;+use openhuman_embed::__host::security::credentials::{AuthService, APP_SESSION_PROVIDER};use tempfile::TempDir;/// A config rooted in `tmp` whose backend is `api_url`.diff --git a/crates/openhuman-tinyhumans/src/hosted/webhooks/ops.rs b/crates/openhuman-tinyhumans/src/hosted/webhooks/ops.rsindex db9c5eeaeb..39683e4b51 100644--- a/crates/openhuman-tinyhumans/src/hosted/webhooks/ops.rs+++ b/crates/openhuman-tinyhumans/src/hosted/webhooks/ops.rs@@ -7,8 +7,8 @@use serde_json::Value;use tinyhumans_sdk::api::webhooks::{CreateWebhookTunnelRequest, UpdateWebhookTunnelRequest};-use openhuman_core::config::Config;-use openhuman_core::core::Outcome;+use openhuman_embed::__host::config::Config;+use openhuman_embed::__host::core::Outcome;use crate::hosted::client::HostedClient;diff --git a/crates/openhuman-tinyhumans/src/hosted/webhooks/ops_tests.rs b/crates/openhuman-tinyhumans/src/hosted/webhooks/ops_tests.rsindex 4b4fc8022d..28161eb922 100644--- a/crates/openhuman-tinyhumans/src/hosted/webhooks/ops_tests.rs+++ b/crates/openhuman-tinyhumans/src/hosted/webhooks/ops_tests.rs@@ -1,6 +1,6 @@use super::*;use crate::hosted::test_support;-use openhuman_core::core::observability::expected_error_kind;+use openhuman_embed::__host::core::observability::expected_error_kind;use serde_json::json;use tempfile::TempDir;use wiremock::matchers::{body_json, header, method, path};diff --git a/crates/openhuman-tinyhumans/src/hosted/webhooks/schemas.rs b/crates/openhuman-tinyhumans/src/hosted/webhooks/schemas.rsindex f8cc5b8ab9..81f608c5c9 100644--- a/crates/openhuman-tinyhumans/src/hosted/webhooks/schemas.rs+++ b/crates/openhuman-tinyhumans/src/hosted/webhooks/schemas.rs@@ -3,10 +3,10 @@ use serde::Deserialize;use serde_json::{Map, Value};use tinyhumans_sdk::api::webhooks::UpdateWebhookTunnelRequest;-use openhuman_core::config::rpc as config_rpc;-use openhuman_core::core::all::{ControllerFuture, RegisteredController};-use openhuman_core::core::Outcome;-use openhuman_core::core::{ControllerSchema, FieldSchema, TypeSchema};+use openhuman_embed::__host::config::rpc as config_rpc;+use openhuman_embed::__host::core::all::{ControllerFuture, RegisteredController};+use openhuman_embed::__host::core::Outcome;+use openhuman_embed::__host::core::{ControllerSchema, FieldSchema, TypeSchema};#[derive(Debug, Deserialize)]struct WebhookCreateTunnelParams {diff --git a/crates/openhuman-tinyhumans/src/install.rs b/crates/openhuman-tinyhumans/src/install.rsindex b521e2f511..959785889c 100644--- a/crates/openhuman-tinyhumans/src/install.rs+++ b/crates/openhuman-tinyhumans/src/install.rs@@ -10,8 +10,8 @@use std::sync::{Arc, Mutex, OnceLock};use crate::backend::{set_product_identity, ProductIdentity};-use openhuman_core::backend::transport::{install_backend_transport, installed_backend_transport};-use openhuman_core::core::all::register_controller_extension;+use openhuman_embed::__host::backend::transport::{install_backend_transport, installed_backend_transport};+use openhuman_embed::__host::core::all::register_controller_extension;use crate::transport::SdkBackendTransport;diff --git a/crates/openhuman-tinyhumans/src/jev/README.md b/crates/openhuman-tinyhumans/src/jev/README.mdindex c130e13568..1c839aaade 100644--- a/crates/openhuman-tinyhumans/src/jev/README.md+++ b/crates/openhuman-tinyhumans/src/jev/README.md@@ -14,7 +14,7 @@ what Jev is, the benchmark numbers, and how it compares to plain BM25.`crate::install()` calls `install_jev_ranker()`, which builds a`TinyHumansJevRanker` and registers it through-`openhuman_core::agent::tinyagents::discovery::install_tool_ranker`. Calling+`openhuman_embed::__host::agent::tinyagents::discovery::install_tool_ranker`. Callingit again replaces the ranker in place. Install needs no login, because theranker resolves everything per search.diff --git a/crates/openhuman-tinyhumans/src/jev/mod.rs b/crates/openhuman-tinyhumans/src/jev/mod.rsindex 6983e82509..f08e06d469 100644--- a/crates/openhuman-tinyhumans/src/jev/mod.rs+++ b/crates/openhuman-tinyhumans/src/jev/mod.rs@@ -2,7 +2,7 @@//!//! The core's harness advertises a `tool_search` bridge over every deferred//! tool and ranks searches with whatever ranker the process installed-//! (`openhuman_core::agent::tinyagents::discovery`). This module installs+//! (`openhuman_embed::__host::agent::tinyagents::discovery`). This module installs//! [`TinyHumansJevRanker`]: `tinytools_jev::JevRanker` — BM25 retrieval to a//! shortlist, one Jev `Choice` to decide — reached over the route//! `agent.tool_search.jev_route` selects: the TinyHumans backend's@@ -27,7 +27,7 @@ pub use route::{JevRoute, OPENROUTER_API_KEY_ENV, TYPESAFE_API_KEY_ENV};use std::sync::Arc;-use openhuman_core::agent::tinyagents::discovery::install_tool_ranker;+use openhuman_embed::__host::agent::tinyagents::discovery::install_tool_ranker;/// Install the Jev ranker as the process-wide `tool_search` ranker.///diff --git a/crates/openhuman-tinyhumans/src/jev/ranker.rs b/crates/openhuman-tinyhumans/src/jev/ranker.rsindex 0b2fb18c19..7e6139eedb 100644--- a/crates/openhuman-tinyhumans/src/jev/ranker.rs+++ b/crates/openhuman-tinyhumans/src/jev/ranker.rs@@ -9,10 +9,10 @@ use std::{use std::{future::Future, pin::Pin, sync::Arc, time::Duration};-use openhuman_core::agent::tinyagents::discovery::{+use openhuman_embed::__host::agent::tinyagents::discovery::{embedding_provider_is_usable, embedding_tool_ranker,};-use openhuman_core::config::Config;+use openhuman_embed::__host::config::Config;use tinyjevclient::Client;use tinytools::{RankCandidate, RankContext, RankError, RankHit, ToolRanker};use tinytools_jev::{JevRanker, JevRankerConfig, JevStrategy};@@ -87,7 +87,7 @@ impl TinyHumansJevRanker {Self {config,load_config: Arc::new(|| {- Box::pin(openhuman_core::config::ops::load_config_with_timeout())+ Box::pin(openhuman_embed::__host::config::ops::load_config_with_timeout())}),env: Arc::new(route::process_env),deadline: DEFAULT_DEADLINE,@@ -162,7 +162,7 @@ impl TinyHumansJevRanker {);log::info!("[tool-search] jev ranker bound to route={route_label} backend {} ({})",- openhuman_core::util::redact::redact_url_for_log(&base_url),+ openhuman_embed::__host::util::redact::redact_url_for_log(&base_url),if fingerprint_changed(cached.as_ref(), fingerprint) {"credential or backend changed"} else {@@ -186,7 +186,7 @@ impl TinyHumansJevRanker {/// round trip to the same recall.fn retriever_for(config: &Config) -> Result<Arc<dyn ToolRanker>, RankError> {let provider =- openhuman_core::inference::embedding_host::default_embedding_provider_with_config(config);+ openhuman_embed::__host::inference::embedding_host::default_embedding_provider_with_config(config);if !embedding_provider_is_usable(provider.as_ref()) {log::info!("[tool-search] embedding provider `{}` cannot embed; jev search disabled, bm25 answers",diff --git a/crates/openhuman-tinyhumans/src/jev/route.rs b/crates/openhuman-tinyhumans/src/jev/route.rsindex 7eda12af0f..f969d1b054 100644--- a/crates/openhuman-tinyhumans/src/jev/route.rs+++ b/crates/openhuman-tinyhumans/src/jev/route.rs@@ -8,9 +8,9 @@//! calls somewhere they did not choose. `auto` keeps the historical order and//! only reaches for the other two when there is no TinyHumans credential.-use openhuman_core::config::Config;-use openhuman_core::inference::provider::factory::lookup_key_for_slug;-use openhuman_core::security::credentials::session_support::resolve_backend_credential;+use openhuman_embed::__host::config::Config;+use openhuman_embed::__host::inference::provider::factory::lookup_key_for_slug;+use openhuman_embed::__host::security::credentials::session_support::resolve_backend_credential;use tinyjevclient::ClientConfig;use tinytools::RankError;diff --git a/crates/openhuman-tinyhumans/src/jwt.rs b/crates/openhuman-tinyhumans/src/jwt.rsindex 2fc65d03ce..a6b75a9dc2 100644--- a/crates/openhuman-tinyhumans/src/jwt.rs+++ b/crates/openhuman-tinyhumans/src/jwt.rs@@ -1,7 +1,7 @@//! JWT helpers for TinyHumans session tokens, from the SDK.//!//! The core carries its own copy of these three functions in-//! `openhuman_core::security::credentials::jwt` because it needs them with no backend+//! `openhuman_embed::__host::security::credentials::jwt` because it needs them with no backend//! dependency; this module exposes the SDK's originals for hosts that already//! depend on this crate.diff --git a/crates/openhuman-tinyhumans/src/session/README.md b/crates/openhuman-tinyhumans/src/session/README.mdindex 1f5e5bced0..578b36c733 100644--- a/crates/openhuman-tinyhumans/src/session/README.md+++ b/crates/openhuman-tinyhumans/src/session/README.md@@ -127,7 +127,7 @@ attribution headers from `ClientHeaders` (`x-sdk-name`, plus## Boundaries- This module may use core utilities (`util::tls`) and this crate's own- `backend::product`, but it never calls `openhuman_core::security::*` and+ `backend::product`, but it never calls `openhuman_embed::__host::security::*` andnever dispatches into a core except through `CoreLink`. The host owns thelogin; the core only takes the resulting credential.- `link::unwrap_envelope` copies the walk `openhuman_rpc::unwrap_rpc` doesdiff --git a/crates/openhuman-tinyhumans/src/session/client.rs b/crates/openhuman-tinyhumans/src/session/client.rsindex 8b78f4abb2..e780d0da6e 100644--- a/crates/openhuman-tinyhumans/src/session/client.rs+++ b/crates/openhuman-tinyhumans/src/session/client.rs@@ -251,7 +251,7 @@ impl SessionClient {base.set_query(None);base.set_fragment(None);- let http = openhuman_core::util::tls::tls_client_builder()+ let http = openhuman_embed::__host::util::tls::tls_client_builder().http1_only().timeout(REQUEST_TIMEOUT).connect_timeout(CONNECT_TIMEOUT)diff --git a/crates/openhuman-tinyhumans/src/session/credential.rs b/crates/openhuman-tinyhumans/src/session/credential.rsindex 8be62af5f1..3e9eb89d3f 100644--- a/crates/openhuman-tinyhumans/src/session/credential.rs+++ b/crates/openhuman-tinyhumans/src/session/credential.rs@@ -143,7 +143,7 @@ fn user_id_from_object(obj: &serde_json::Map<String, Value>) -> Option<String> {/// The user id inside a `/auth/me`-shaped payload: top-level `id`/`_id`//// `userId`, or the same under `data` or `user`. Same rules as the core's-/// `openhuman_core::security::credentials::jwt::user_id_from_profile_payload`.+/// `openhuman_embed::__host::security::credentials::jwt::user_id_from_profile_payload`.pub fn user_id_from_profile_payload(payload: &Value) -> Option<String> {let obj = payload.as_object()?;if let Some(data) = obj.get("data").and_then(Value::as_object) {diff --git a/crates/openhuman-tinyhumans/src/session/mod.rs b/crates/openhuman-tinyhumans/src/session/mod.rsindex c7158d2723..e4228a8102 100644--- a/crates/openhuman-tinyhumans/src/session/mod.rs+++ b/crates/openhuman-tinyhumans/src/session/mod.rs@@ -18,7 +18,7 @@//!//! Invariant kept from the standalone `openhuman-session` crate this module//! absorbed: it may use core *utilities* (`util::tls`, `crate::backend::product`,-//! `openhuman_rpc::unwrap_rpc`) but must never call `openhuman_core::security::*`+//! `openhuman_rpc::unwrap_rpc`) but must never call `openhuman_embed::__host::security::*`//! or dispatch into a core except through [`CoreLink`] — the host owns the//! login, the core only takes the credential.diff --git a/crates/openhuman-tinyhumans/src/transport/README.md b/crates/openhuman-tinyhumans/src/transport/README.mdindex e953866c86..38d0444c22 100644--- a/crates/openhuman-tinyhumans/src/transport/README.md+++ b/crates/openhuman-tinyhumans/src/transport/README.md@@ -84,7 +84,7 @@ The core recovers from the two differently (`BackendApiError` variants in- `SdkBackendTransport::new()` builds the transport; it fails only when a`reqwest::Client` cannot be built.- `SdkBackendTransport::shared()` returns it as `Arc<dyn BackendTransport>`,- ready for `openhuman_core::backend::install_backend_transport`.+ ready for `openhuman_embed::__host::backend::install_backend_transport`.- `map_sdk_error` is public (re-exported at the crate root) for code thatcalls the SDK and needs the same translation.diff --git a/crates/openhuman-tinyhumans/src/transport/error.rs b/crates/openhuman-tinyhumans/src/transport/error.rsindex 34d9676fcf..ea2b7ba96c 100644--- a/crates/openhuman-tinyhumans/src/transport/error.rs+++ b/crates/openhuman-tinyhumans/src/transport/error.rs@@ -3,7 +3,7 @@//! the integrations client see exactly the shapes they saw when they called//! the SDK directly.-use openhuman_core::backend::transport::BackendTransportError;+use openhuman_embed::__host::backend::transport::BackendTransportError;use reqwest::Method;use tinyhumans_sdk::Error as SdkError;diff --git a/crates/openhuman-tinyhumans/src/transport/mod.rs b/crates/openhuman-tinyhumans/src/transport/mod.rsindex 7404832586..8be9999fde 100644--- a/crates/openhuman-tinyhumans/src/transport/mod.rs+++ b/crates/openhuman-tinyhumans/src/transport/mod.rs@@ -6,10 +6,10 @@use std::sync::Arc;use async_trait::async_trait;-use openhuman_core::backend::{+use openhuman_embed::__host::backend::{BackendRequest, BackendTransport, BackendTransportError, BaseUrlPurpose, TransportProfile,};-use openhuman_core::security::credentials::session_support::BackendCredential;+use openhuman_embed::__host::security::credentials::session_support::BackendCredential;use reqwest::Method;use serde_json::Value;use tinyhumans_sdk::TinyHumansClient;@@ -41,7 +41,7 @@ impl SdkBackendTransport {}/// [`Self::new`] as a shared handle ready for- /// [`install_backend_transport`](openhuman_core::backend::install_backend_transport).+ /// [`install_backend_transport`](openhuman_embed::__host::backend::install_backend_transport).pub fn shared() -> anyhow::Result<Arc<dyn BackendTransport>> {Ok(Arc::new(Self::new()?))}diff --git a/crates/openhuman-tinyhumans/src/transport/transport_tests.rs b/crates/openhuman-tinyhumans/src/transport/transport_tests.rsindex 0e132c668d..054452aa25 100644--- a/crates/openhuman-tinyhumans/src/transport/transport_tests.rs+++ b/crates/openhuman-tinyhumans/src/transport/transport_tests.rs@@ -2,7 +2,7 @@//! code relies on, pinned against a mock backend.use super::*;-use openhuman_core::backend::transport::{clear_backend_transport, resolve_backend_transport};+use openhuman_embed::__host::backend::transport::{clear_backend_transport, resolve_backend_transport};use serde_json::json;use wiremock::matchers::{header, header_exists, method, path};use wiremock::{Mock, MockServer, ResponseTemplate};@@ -234,7 +234,7 @@ async fn backend_client_round_trips_through_the_installed_transport() {let _guard = global_lock().lock().await;let _t = crate::install(crate::InstallOptions::default()).unwrap();- let client = openhuman_core::backend::BackendClient::new(&server.uri()).unwrap();+ let client = openhuman_embed::__host::backend::BackendClient::new(&server.uri()).unwrap();let value = client.authed_json("jwt", reqwest::Method::GET, "/announcements/latest", None).await@@ -247,7 +247,7 @@ async fn backend_client_round_trips_through_the_installed_transport() {/// the backend through the SDK transport.#[tokio::test]async fn install_registers_hosted_controllers_that_dispatch_through_the_transport() {- use openhuman_core::core::all::{+ use openhuman_embed::__host::core::all::{namespace_description, rpc_method_from_parts, schema_for_rpc_method,};@@ -329,7 +329,7 @@ fn product_identity_and_attribution_come_from_this_crate() {#[tokio::test]async fn core_channel_routes_recover_from_the_transports_typed_404s() {- use openhuman_core::backend::BackendApiError;+ use openhuman_embed::__host::backend::BackendApiError;// POST + DELETE only, mirroring the deployed router: PATCH falls through// to Express's HTML 404 (#5230); DELETE answers a handler-level 404.let server = MockServer::start().await;@@ -351,7 +351,7 @@ async fn core_channel_routes_recover_from_the_transports_typed_404s() {let _guard = global_lock().lock().await;let _t = crate::install(crate::InstallOptions::default()).unwrap();- let client = openhuman_core::backend::BackendClient::new(&server.uri()).unwrap();+ let client = openhuman_embed::__host::backend::BackendClient::new(&server.uri()).unwrap();let err = client.send_channel_edit("telegram", "1103", "jwt", json!({}))