Skip to content

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

docs: update host boot references to openhuman_rpc::host

Steven Enamakelc034e2793a16
diff --git a/.github/workflows/test-reusable.yml b/.github/workflows/test-reusable.yml
index 391214e96a..c9c4ff1c19 100644
--- a/.github/workflows/test-reusable.yml
+++ b/.github/workflows/test-reusable.yml
@@ -218,7 +218,7 @@ jobs:
# web3, documents, meet, contacts, inference and crash-reporting.
# Source of truth: scripts/ci/product-features.txt.
#
- # The same silent-skip trap the bin-tools note below describes applies
+ # The same silent-skip trap the bin-tools note below describes (for openhuman-fleet) applies
# here, and harder: four tests/*.rs targets carry `required-features`
# (observability_smoke, x402_twit_sh_live, json_rpc_e2e,
# raw_coverage_all — see Cargo.toml). Without these features
@@ -232,11 +232,11 @@ jobs:
CLI_FEATURES="${FEATURES},bin-tools"
echo "[test-reusable] feature set: ${FEATURES} (cli: ${CLI_FEATURES})"
- # `--features bin-tools` is load-bearing, not cosmetic: the ops binaries
- # under crates/openhuman-cli/src/bin/ declare `required-features = ["bin-tools"]`, so without
- # it `--bins` silently skips them and this lane goes green having
- # compiled none of them. fleet.rs carries a `#[cfg(test)] mod`, so those
- # tests would vanish too, with no error.
+ # `--features bin-tools` is load-bearing, not cosmetic: the
+ # `openhuman-fleet` bin (crates/openhuman-cli/src/bin/fleet.rs) declares
+ # `required-features = ["http-server", "bin-tools"]`, so without it
+ # `--bins` silently skips it and this lane goes green having compiled
+ # none of it. Its tests would vanish too, with no error.
bash scripts/ci-cancel-aware.sh cargo test -p openhuman --lib --features "${FEATURES}"
# The core binary and developer bins live in the CLI crate.
bash scripts/ci-cancel-aware.sh cargo test -p openhuman-cli --bins --features "${CLI_FEATURES}"
diff --git a/crates/openhuman-core/README.md b/crates/openhuman-core/README.md
index eccfcca02e..f014c0b5d8 100644
--- a/crates/openhuman-core/README.md
+++ b/crates/openhuman-core/README.md
@@ -136,7 +136,7 @@ migrations, cost ledger, socket manager, subscribers, services) is in
[`crates/openhuman-cli/src/main.rs`](../openhuman-cli/src/main.rs) and the desktop binary's `core` and `mcp`
subcommands. It loads dotenv, applies the startup restart delay, initializes
the keyring master key, and dispatches to `core::cli`. A host that serves RPC
-calls `openhuman_rpc::server::install_cli_server()` first.
+boots through `openhuman_rpc::host::cli`, which installs the server launcher.
## Layout
diff --git a/crates/openhuman-core/src/core/README.md b/crates/openhuman-core/src/core/README.md
index 5e26f6b8ba..8a516935a7 100644
--- a/crates/openhuman-core/src/core/README.md
+++ b/crates/openhuman-core/src/core/README.md
@@ -241,8 +241,8 @@ the JSON-RPC server.
`run` and `serve` need a server, which the core does not contain.
[`server_launcher.rs`](./server_launcher.rs) holds a `ServerLauncher` port; the host installs one
-(`openhuman_rpc::server::install_cli_server()` in the `openhuman-core` binary
-and the desktop app) before calling `run_from_cli_args`. Without it those
+(`openhuman_rpc::host::cli` for the `openhuman-core` binary, the desktop
+builder for the app) before calling `run_from_cli_args`. Without it those
subcommands fail with an explanation.
### Logging, redaction and crash reporting
diff --git a/crates/openhuman-core/src/core/cli_serve.rs b/crates/openhuman-core/src/core/cli_serve.rs
index db513360a4..b52dd0b3f1 100644
--- a/crates/openhuman-core/src/core/cli_serve.rs
+++ b/crates/openhuman-core/src/core/cli_serve.rs
@@ -139,8 +139,9 @@ fn launch_server(request: crate::core::server_launcher::ServeRequest) -> Result<
.build()?;
let launcher = crate::core::server_launcher::installed_server_launcher().ok_or_else(|| {
anyhow::anyhow!(
- "this binary has no JSON-RPC server linked in; the host must call \
- openhuman_rpc::server::install_cli_server() before run_core_from_args"
+ "this binary has no JSON-RPC server linked in; the host must boot \
+ through openhuman_rpc::host::cli or install a server launcher before \
+ run_core_from_args"
)
})?;
rt.block_on(launcher(request))?;
diff --git a/crates/openhuman-core/src/core/server_launcher.rs b/crates/openhuman-core/src/core/server_launcher.rs
index f92df138da..32f9334622 100644
--- a/crates/openhuman-core/src/core/server_launcher.rs
+++ b/crates/openhuman-core/src/core/server_launcher.rs
@@ -2,7 +2,7 @@
//!
//! The JSON-RPC server lives in `openhuman-rpc`, which sits above this crate,
//! so the CLI cannot call it directly. A host binary installs a launcher once
-//! at startup (`openhuman_rpc::server::install_cli_server()`) before it hands
+//! at startup (through `openhuman_rpc::host::cli`) before it hands
//! its arguments to [`run_core_from_args`](crate::run_core_from_args).
//! Without one, `run` / `serve` fail with an error that says so instead of
//! starting a core nothing can reach.
diff --git a/crates/openhuman-tinyhumans/src/install.rs b/crates/openhuman-tinyhumans/src/install.rs
index a535380221..b789dd379a 100644
--- a/crates/openhuman-tinyhumans/src/install.rs
+++ b/crates/openhuman-tinyhumans/src/install.rs
@@ -3,8 +3,8 @@
//!
//! Hosts that build the core through [`crate::RuntimeBuilder`] do not need
//! this; it is for hosts that boot the core themselves
-//! (`run_server_embedded_with_ready`, `run_core_from_args`, `CoreBuilder`)
-//! and for test fixtures. Idempotent: calling it again re-installs an
+//! (`run_core_from_args`, `CoreBuilder`) and for test fixtures. The shared host
+//! boot (`openhuman_rpc::host`) connects the backend on its own. Idempotent: calling it again re-installs an
//! equivalent transport and is harmless.
use std::sync::{Arc, Mutex, OnceLock};
diff --git a/crates/openhuman-tinyhumans/src/lib.rs b/crates/openhuman-tinyhumans/src/lib.rs
index 12bc73e068..e67f671c34 100644
--- a/crates/openhuman-tinyhumans/src/lib.rs
+++ b/crates/openhuman-tinyhumans/src/lib.rs
@@ -32,9 +32,8 @@
//! [`RuntimeBuilder`] is the configuration path: it hands the embed builder
//! the SDK transport, the hosted controllers and the Jev ranker through
//! embed's seam options, and forwards the embed presets and knobs. Hosts that
-//! still boot the core themselves (the desktop shell's
-//! `run_server_embedded_with_ready`, the CLI's `run_core_from_args`, a
-//! `CoreBuilder`) call [`install`] once before the first backend-touching
+//! still boot the core themselves (a bare `run_core_from_args`, a
+//! `CoreBuilder`, a test fixture) call [`install`] once before the first backend-touching
//! dispatch instead; it resolves the same wiring and applies it to the
//! process globals.
//!
diff --git a/gitbooks/developing/architecture.md b/gitbooks/developing/architecture.md
index d5965a26de..a2ab6d2a51 100644
--- a/gitbooks/developing/architecture.md
+++ b/gitbooks/developing/architecture.md
@@ -22,7 +22,7 @@ OpenHuman ships for desktop only: Windows, macOS and Linux. Web is not a support
| `app/` | pnpm workspace `openhuman-app`: Vite/React UI (`app/src/`), Vitest and WDIO tests. The Tauri shell itself is the Rust crate `crates/openhuman-app/` (below). |
| `crates/openhuman-app/` | Thin Tauri v2 desktop host (Cargo package `openhuman-app`). Built from its own manifest and lockfile, excluded from the root workspace; depends on `openhuman-rpc` only and hosts the core as an in-process tokio task (`src/core_process.rs`, `openhuman_rpc::host::desktop`). |
| `crates/openhuman-core/` | Cargo package `openhuman`, library `openhuman_core`, with no `tinyhumans-sdk` dependency. The hosted backend is reached through the `backend::transport::BackendTransport` port, except hosted memory, which `vendor/tinymemory`'s own HTTP client calls (see `memory/engine.rs`). Flat domain modules directly under `src/` (`agent`, `backend`, `channels`, `config`, `cron`, `desktop`, `flows`, `hooks`, `hosting`, `inference`, `integrations`, `mcp`, `media`, `memory`, `modules`, `platform`, `runtime`, `sandbox`, `search`, `security`, `skills`, `threads`, `tools`, `util`, `voice`, `web3`, `web_chat`, …). `src/core/` holds the CLI (`cli.rs`), dispatch, controller registry (`all.rs`), event bus (`bus.rs`), `runtime/` (`CoreBuilder`/`CoreRuntime`) and `subsystem/`. |
-| `crates/openhuman-rpc/` | Shared JSON-RPC contracts: `RpcOutcome`, `unwrap_rpc`, `apply_log_envelope`, `StructuredRpcError`. The `http-client` feature (default on; off for root-workspace consumers) adds `post_json_rpc`, `bearer_header`, `redact_url_for_log`, `HttpRpcResponse`. Used by the Tauri shell (`core_rpc.rs` → `relay_http_rpc`) and the TUI (envelope decoding). The core does not depend on this crate and does not re-export it: the controller contract (`Outcome`, `ControllerSchema`, `StructuredRpcError`, params rules, in-process dispatch) lives in `crates/openhuman-core/src/core/`, and this crate sits above it. Behind `server` it also owns the `http_host` static-directory file server and registers its controllers as a core extension. |
+| `crates/openhuman-rpc/` | Top of the library chain (depends on `openhuman-tinyhumans`): JSON-RPC 2.0 envelopes, the server (router, Socket.IO, listener, `run_server*`), and the shared host boot `host::{cli, desktop, tui}` the three hosts call; re-exports `embed` and `tinyhumans` as their curated facade. The `http-client` feature (default on; off for root-workspace consumers) adds `post_json_rpc`, `bearer_header`, `redact_url_for_log`, `HttpRpcResponse`. Used by the Tauri shell (`core_rpc.rs` → `relay_http_rpc`) and the TUI (envelope decoding). The core does not depend on this crate and does not re-export it: the controller contract (`Outcome`, `ControllerSchema`, `StructuredRpcError`, params rules, in-process dispatch) lives in `crates/openhuman-core/src/core/`, and this crate sits above it. Behind `server` it also owns the `http_host` static-directory file server and registers its controllers as a core extension. |
| `crates/openhuman-embed/` | Typed library facade (`Runtime`/`RuntimeBuilder` → `Agent`, host presets, `embed::process`, and the `config` / `artifacts` / `chat_surface` / `modules` facades) for embedding the core in another product; forwards the core's feature gates. Installs no backend transport itself. |
| `crates/openhuman-tinyhumans/` | The TinyHumans layer above embed: `SdkBackendTransport` (the only crate that depends on the vendored `tinyhumans-sdk`), `install()` for hosts that boot the core themselves, a `RuntimeBuilder` that boots an embed runtime connected, the hosted RPC proxies (`hosted/`, all on the SDK's typed clients through one `hosted::client::HostedClient`: billing, team and usage, referral, announcements, webhook tunnels, managed Telegram/Discord linking, and backend-brokered OAuth; registered into the core's controller registry as an extension, some sharing the core's `auth` / `channels` / `webhooks` namespaces), and the host-side login/session owner (`session/`). A user without a TinyHumans account gets the core's `BACKEND_UNAVAILABLE:` sentinel from these without a request. |
| `crates/openhuman-cli/` | The `openhuman-core` binary (`openhuman_rpc::host::cli`), the ops bins, and every root `tests/*.rs` / `examples/*.rs` target (which reach the core through dev-dependencies). The benchmark bins live in [openhuman-benchmarks](https://github.com/tinyhumansai/openhuman-benchmarks). |
diff --git a/tests/support/tinyhumans_boot.rs b/tests/support/tinyhumans_boot.rs
index a22d55a196..57b61a5faf 100644
--- a/tests/support/tinyhumans_boot.rs
+++ b/tests/support/tinyhumans_boot.rs
@@ -1,7 +1,8 @@
//! Give an in-process core its TinyHumans backend transport.
//!
//! The core carries no backend client. Suites that spawn the
-//! `openhuman-core` binary get the transport from `main.rs`; suites that boot
+//! `openhuman-core` binary get the transport from `main.rs`
+//! (`openhuman_rpc::host::cli`); suites that boot
//! the core in-process (`build_core_http_router`, direct `ops` calls against
//! the mock backend) must call [`boot`] first or every backend-touching call
//! answers `BACKEND_UNAVAILABLE:`. Idempotent and cheap: call it from any