Skip to content

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

refactor(rpc): curate tinyhumans and embed re-exports

Steven Enamakel024e226acd72
diff --git a/crates/openhuman-rpc/src/lib.rs b/crates/openhuman-rpc/src/lib.rs
index f6263f5ea5..aaf3329121 100644
--- a/crates/openhuman-rpc/src/lib.rs
+++ b/crates/openhuman-rpc/src/lib.rs
@@ -37,14 +37,31 @@
//! curated surface above; the doc-hidden `__host` list stays internal to the
//! layers.
-pub use openhuman_tinyhumans as tinyhumans;
-/// The embed facade (`openhuman_embed`): runtime builder, process helpers,
-/// config/artifact/chat-surface facades. Same crate as `tinyhumans::embed`.
-pub use openhuman_tinyhumans::embed;
+/// The TinyHumans layer items hosts use: the login/session owner, the
+/// session link constants and the product identity. A curated list, not the
+/// crate.
+pub mod tinyhumans {
+ pub use openhuman_tinyhumans::{
+ identity, link, product_identity, CachedUser, ClientHeaders, CoreLink, SessionError,
+ SessionEvent, SessionManager, SessionState,
+ };
+}
+
+/// The embed items hosts use: the process lifecycle helpers and the
+/// config/artifact/chat-surface/modules facades, plus the few process-level
+/// facts. A curated list, not the crate; embed's `__host` is not on it.
+pub mod embed {
+ pub use openhuman_tinyhumans::embed::{
+ artifacts, chat_surface, config, process, schema_for_rpc_method, CoreRuntime,
+ PickListenPortError, HTTP_SERVER_COMPILED_IN, VOICE_COMPILED_IN,
+ };
+ #[cfg(feature = "modules")]
+ pub use openhuman_tinyhumans::embed::modules;
+}
/// Core internals for this crate's own modules, through embed's doc-hidden
/// `__host` list. Crate-private: never re-exported on a public path.
-pub(crate) use openhuman_tinyhumans::embed::__host as core_host;
+pub(crate) use openhuman_tinyhumans::__host as core_host;
#[cfg(feature = "http-client")]
mod client;
diff --git a/crates/openhuman-tinyhumans/src/lib.rs b/crates/openhuman-tinyhumans/src/lib.rs
index 12bc73e068..fcb4c4c471 100644
--- a/crates/openhuman-tinyhumans/src/lib.rs
+++ b/crates/openhuman-tinyhumans/src/lib.rs
@@ -40,9 +40,38 @@
//!
//! This crate depends on `openhuman-embed` alone. Core internals it needs
//! come through embed's `#[doc(hidden)] __host` list; it re-exports only its
-//! own curated surface, never the core.
+//! own curated surface, never the core. The [`embed`] module below is a
+//! curated list of the embed items the layers above (rpc and the hosts) and
+//! library users take, not the crate: embed's own `__host` is not on it.
-pub use openhuman_embed as embed;
+/// The embed surface this layer passes up: the runtime and its builder, the
+/// host presets' types, the library agent API, and the facades the hosts use
+/// (`config`, `artifacts`, `chat_surface`, `modules`, `process`, ...). Every
+/// entry is named here on purpose; embed's doc-hidden `__host` list is not
+/// among them.
+pub mod embed {
+ // Runtime, builder and the knobs the hosts configure it with.
+ pub use openhuman_embed::{
+ Access, Agent, AgentSpec, ApiKey, ConfigSource, CoreError, CoreRuntime, DomainSet,
+ Harness, HarnessBuilder, HostKind, Provider, Runtime, RuntimeBuilder, RuntimeError,
+ ServiceSet, TokenSource, Workspace,
+ };
+ // Process-level facts a host reads.
+ pub use openhuman_embed::{
+ schema_for_rpc_method, PickListenPortError, HTTP_SERVER_COMPILED_IN, VOICE_COMPILED_IN,
+ };
+ // The curated facades (each is an explicit list inside embed).
+ pub use openhuman_embed::{
+ artifacts, chat_surface, config, identity, memory, process, seams, session_store,
+ };
+ #[cfg(feature = "modules")]
+ pub use openhuman_embed::modules;
+}
+
+/// Core internals for `openhuman-rpc` only, forwarded from embed's
+/// `#[doc(hidden)]` list. No layer above re-exports this.
+#[doc(hidden)]
+pub use openhuman_embed::__host;
pub mod backend;
pub mod hosted;