Skip to content

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

feat(openhuman-app): install TinyHumans backend transport on startup

Steven Enamakel793f0b8eefa2
diff --git a/crates/openhuman-app/src/lib.rs b/crates/openhuman-app/src/lib.rs
index 42417a6489..930c1b8255 100644
--- a/crates/openhuman-app/src/lib.rs
+++ b/crates/openhuman-app/src/lib.rs
@@ -2349,6 +2349,15 @@ pub fn run() {
// stderr is a console or file. See `stderr_panic_hook`.
stderr_panic_hook::neutralize_broken_parent_stderr();
+ // The in-process core reaches the hosted backend only through the
+ // transport `openhuman-tinyhumans` installs. `main.rs` installs it before
+ // dispatching here; this call is idempotent and covers embedders of
+ // `run()` that skip `main.rs`.
+ if let Err(err) = openhuman_tinyhumans::install(openhuman_tinyhumans::InstallOptions::default())
+ {
+ log::error!("[boot] TinyHumans backend transport unavailable: {err}");
+ }
+
// Must run before any GTK/CEF code that could trigger X calls — otherwise
// Xlib's default handler calls exit(1) on the first BadWindow and we never
// reach this line. See helper doc above for the full reasoning.
diff --git a/crates/openhuman-app/src/main.rs b/crates/openhuman-app/src/main.rs
index 573d0d445f..0a72934fe9 100644
--- a/crates/openhuman-app/src/main.rs
+++ b/crates/openhuman-app/src/main.rs
@@ -6,6 +6,15 @@
#![cfg_attr(target_os = "windows", windows_subsystem = "windows")]
fn main() {
+ // Every path below boots a core that must reach the hosted backend
+ // (billing, integrations, channel relay, login): give it the SDK-backed
+ // transport before the first dispatch. The core itself carries none.
+ if let Err(err) = openhuman_tinyhumans::install(openhuman_tinyhumans::InstallOptions::default())
+ {
+ eprintln!("failed to install the TinyHumans backend transport: {err}");
+ std::process::exit(1);
+ }
+
let args: Vec<String> = std::env::args().collect();
let sub = args.get(1).map(String::as_str);
if sub == Some("core") {