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(agent): import agent definitions from tinyagents_definition
Steven Enamakel3a17d7e7cc67
diff --git a/crates/openhuman-core/src/agent/debug/prompt_size_tests.rs b/crates/openhuman-core/src/agent/debug/prompt_size_tests.rsindex 8cc7de5753..7e9c7aa9dd 100644--- a/crates/openhuman-core/src/agent/debug/prompt_size_tests.rs+++ b/crates/openhuman-core/src/agent/debug/prompt_size_tests.rs@@ -77,7 +77,7 @@ fn tools_are_ranked_by_cost_not_registration_order() {/// ~200 tools, so every `tool_bytes` budget described a belt no agent carries.#[test]fn session_report_measures_the_visible_belt_not_the_registry() {- crate::agent::harness::AgentDefinitionRegistry::init_global_builtins().unwrap();+ crate::agent::harness::host_definition::AgentDefinitionRegistry::init_global_builtins().unwrap();let tmp = tempfile::TempDir::new().unwrap();let config = crate::config::Config {workspace_dir: tmp.path().join("workspace"),diff --git a/crates/openhuman-core/src/agent/harness/builtin_definitions.rs b/crates/openhuman-core/src/agent/harness/builtin_definitions.rsindex af9b0fc1fe..ab30c13e81 100644--- a/crates/openhuman-core/src/agent/harness/builtin_definitions.rs+++ b/crates/openhuman-core/src/agent/harness/builtin_definitions.rs@@ -8,9 +8,9 @@//! Custom TOML definitions loaded later by//! [`super::definition_loader`] override any built-in with the same id.-use super::definition::AgentDefinition;+use super::host_definition::AgentDefinition;#[cfg(test)]-use super::definition::DefinitionSource;+use tinyagents_definition::DefinitionSource;/// All built-in definitions, in stable order.///@@ -47,9 +47,7 @@ pub fn all() -> Vec<AgentDefinition> {/// delegation tools, so the parent must explicitly allow those test children.#[cfg(test)]pub(crate) fn test_main_def() -> AgentDefinition {- use super::definition::{- AgentTier, ModelSpec, PromptSource, SandboxMode, SubagentEntry, ToolScope,- };+ use tinyagents_definition::{AgentTier, ModelSpec, PromptSource, SandboxMode, SubagentEntry, ToolScope};AgentDefinition {id: "main".into(),when_to_use: "test-only default parent agent".into(),@@ -94,7 +92,7 @@ pub(crate) fn test_main_def() -> AgentDefinition {/// `subagent_host::ops::tests::resolve_subagent_source_*`.#[cfg(test)]pub(crate) fn test_inherit_echo_def() -> AgentDefinition {- use super::definition::{ModelSpec, PromptSource, SandboxMode, ToolScope};+ use tinyagents_definition::{ModelSpec, PromptSource, SandboxMode, ToolScope};AgentDefinition {id: "__test_inherit_echo".into(),when_to_use: "test-only sub-agent that inherits the parent provider".into(),@@ -132,7 +130,7 @@ pub(crate) fn test_inherit_echo_def() -> AgentDefinition {/// repeated nested tool calls through the real sub-agent loop.#[cfg(test)]pub(crate) fn test_inherit_parallel_worker_def() -> AgentDefinition {- use super::definition::{ModelSpec, PromptSource, SandboxMode, ToolScope};+ use tinyagents_definition::{ModelSpec, PromptSource, SandboxMode, ToolScope};AgentDefinition {id: "__test_inherit_parallel_worker".into(),when_to_use: "test-only parallel sub-agent that inherits the parent provider".into(),diff --git a/crates/openhuman-core/src/agent/harness/builtin_definitions_tests.rs b/crates/openhuman-core/src/agent/harness/builtin_definitions_tests.rsindex 87ef7d7e79..50a9345c21 100644--- a/crates/openhuman-core/src/agent/harness/builtin_definitions_tests.rs+++ b/crates/openhuman-core/src/agent/harness/builtin_definitions_tests.rs@@ -28,7 +28,7 @@ fn all_definitions_present() {#[test]fn test_main_allows_test_inherit_workers() {- use super::super::definition::SubagentEntry;+ use tinyagents_definition::SubagentEntry;let def = all().into_iter().find(|d| d.id == "main")@@ -47,7 +47,7 @@ fn test_main_allows_test_inherit_workers() {#[test]fn test_inherit_echo_is_present_and_inherits() {- use super::super::definition::ModelSpec;+ use tinyagents_definition::ModelSpec;let def = all().into_iter().find(|d| d.id == "__test_inherit_echo")@@ -60,7 +60,7 @@ fn test_inherit_echo_is_present_and_inherits() {#[test]fn test_inherit_parallel_worker_is_present_and_inherits() {- use super::super::definition::{ModelSpec, ToolScope};+ use tinyagents_definition::{ModelSpec, ToolScope};let def = all().into_iter().find(|d| d.id == "__test_inherit_parallel_worker")diff --git a/crates/openhuman-core/src/agent/harness/graph.rs b/crates/openhuman-core/src/agent/harness/graph.rsindex acc396d9ef..f2c045431b 100644--- a/crates/openhuman-core/src/agent/harness/graph.rs+++ b/crates/openhuman-core/src/agent/harness/graph.rs@@ -57,7 +57,7 @@ pub(crate) async fn run_channel_turn_via_graph(multimodal_files: MultimodalFileConfig,on_progress: Option<Sender<AgentProgress>>,origin: Option<crate::agent::turn_origin::AgentTurnOrigin>,- sandbox_mode: crate::agent::harness::SandboxMode,+ sandbox_mode: tinyagents_definition::SandboxMode,) -> Result<crate::agent::tinyagents::TinyagentsTurnOutcome> {let extra_arc = Arc::new(extra_tools);diff --git a/crates/openhuman-core/src/agent/harness/graph_tests.rs b/crates/openhuman-core/src/agent/harness/graph_tests.rsindex c7fc49fb19..0019ac28fa 100644--- a/crates/openhuman-core/src/agent/harness/graph_tests.rs+++ b/crates/openhuman-core/src/agent/harness/graph_tests.rs@@ -63,7 +63,7 @@ async fn channel_turn_runs_through_the_graph() {MultimodalFileConfig::default(),None,None,- crate::agent::harness::SandboxMode::None,+ tinyagents_definition::SandboxMode::None,).await.expect("channel graph turn runs");@@ -125,7 +125,7 @@ async fn channel_turn_pauses_on_ask_user_clarification() {MultimodalFileConfig::default(),None,None,- crate::agent::harness::SandboxMode::None,+ tinyagents_definition::SandboxMode::None,).await.expect("channel graph turn runs");diff --git a/crates/openhuman-core/src/agent/orchestration/parent_context/builder.rs b/crates/openhuman-core/src/agent/orchestration/parent_context/builder.rsindex c449989326..909af66971 100644--- a/crates/openhuman-core/src/agent/orchestration/parent_context/builder.rs+++ b/crates/openhuman-core/src/agent/orchestration/parent_context/builder.rs@@ -63,16 +63,16 @@ pub(crate) async fn build_root_parent(// engines can also be reached from contexts that only built the HTTP router// (e.g. the JSON-RPC e2e harness) — so init defensively here. `OnceLock`// makes this idempotent: a no-op when the registry is already loaded.- if crate::agent::harness::AgentDefinitionRegistry::global().is_none() {+ if crate::agent::harness::host_definition::AgentDefinitionRegistry::global().is_none() {if let Err(err) =- crate::agent::harness::AgentDefinitionRegistry::init_global(&config.workspace_dir)+ crate::agent::harness::host_definition::AgentDefinitionRegistry::init_global(&config.workspace_dir){// A concurrent init may have won the race and populated the registry,// in which case the `AlreadyInitialized`-style error is benign. But if// the registry is *still* `None`, init genuinely failed — fail fast// here rather than letting every downstream `spawn_agent` fail later// with `NoParentContext` after orchestration state has advanced.- if crate::agent::harness::AgentDefinitionRegistry::global().is_none() {+ if crate::agent::harness::host_definition::AgentDefinitionRegistry::global().is_none() {return Err(err).context("initialize AgentDefinitionRegistry for orchestration root parent");}diff --git a/crates/openhuman-core/src/agent/registry/agents/orchestrator/prompt.rs b/crates/openhuman-core/src/agent/registry/agents/orchestrator/prompt.rsindex 90e444071c..937749b080 100644--- a/crates/openhuman-core/src/agent/registry/agents/orchestrator/prompt.rs+++ b/crates/openhuman-core/src/agent/registry/agents/orchestrator/prompt.rs@@ -11,7 +11,7 @@//! module) so nobody has to branch on `agent_id` in a shared section impl.use crate::agent::harness::definition::SubagentEntry;-use crate::agent::harness::AgentDefinitionRegistry;+use crate::agent::harness::host_definition::AgentDefinitionRegistry;use crate::agent::prompts::{render_datetime, render_identity, render_tools, render_workspace, ConnectedIntegration,PromptContext, ToolCallFormat,diff --git a/crates/openhuman-core/src/agent/registry/ops.rs b/crates/openhuman-core/src/agent/registry/ops.rsindex 4733d19faa..f272efed3f 100644--- a/crates/openhuman-core/src/agent/registry/ops.rs+++ b/crates/openhuman-core/src/agent/registry/ops.rs@@ -2,7 +2,7 @@use std::collections::HashMap;-use crate::agent::harness::AgentDefinitionRegistry;+use crate::agent::harness::host_definition::AgentDefinitionRegistry;use crate::agent::OpenHumanSessionHost;use crate::config::rpc as config_rpc;use crate::config::Config;diff --git a/crates/openhuman-core/src/agent/schemas.rs b/crates/openhuman-core/src/agent/schemas.rsindex f771ab92ca..1fce2c1e09 100644--- a/crates/openhuman-core/src/agent/schemas.rs+++ b/crates/openhuman-core/src/agent/schemas.rs@@ -318,7 +318,7 @@ struct GetDefinitionParams {fn handle_get_definition(params: Map<String, Value>) -> ControllerFuture {Box::pin(async move {let p = deserialize_params::<GetDefinitionParams>(params)?;- let registry = crate::agent::harness::AgentDefinitionRegistry::current()+ let registry = crate::agent::harness::host_definition::AgentDefinitionRegistry::current().ok_or_else(|| "AgentDefinitionRegistry not initialised".to_string())?;match registry.get(p.id.trim()) {Some(def) => Ok(serde_json::json!({ "definition": def })),@@ -332,7 +332,7 @@ fn handle_reload_definitions(_params: Map<String, Value>) -> ControllerFuture {// The global registry is OnceLock-backed so live reload is a// no-op in v1. Reply with a status payload that explains this// and tells the caller how to refresh.- let already_loaded = crate::agent::harness::AgentDefinitionRegistry::global().is_some();+ let already_loaded = crate::agent::harness::host_definition::AgentDefinitionRegistry::global().is_some();Ok(serde_json::json!({"status": "noop","registry_initialised": already_loaded,diff --git a/crates/openhuman-core/src/agent/session_host/builder/builder_build.rs b/crates/openhuman-core/src/agent/session_host/builder/builder_build.rsindex b2c51ffef8..b3004118e9 100644--- a/crates/openhuman-core/src/agent/session_host/builder/builder_build.rs+++ b/crates/openhuman-core/src/agent/session_host/builder/builder_build.rs@@ -352,12 +352,12 @@ impl SessionHostBuilder {let hosted_config = Arc::new(hosted_config);#[cfg(test)]let definitions = Some(- crate::agent::harness::AgentDefinitionRegistry::current().unwrap_or_else(|| {- Arc::new(crate::agent::harness::AgentDefinitionRegistry::builtins_only())+ crate::agent::harness::host_definition::AgentDefinitionRegistry::current().unwrap_or_else(|| {+ Arc::new(crate::agent::harness::host_definition::AgentDefinitionRegistry::builtins_only())}),);#[cfg(not(test))]- let definitions = crate::agent::harness::AgentDefinitionRegistry::current();+ let definitions = crate::agent::harness::host_definition::AgentDefinitionRegistry::current();// A caller that brought its own definition is the authority for this// session, so it does not need a process registry to exist before it// may run a turn. The stand-in is deliberately *empty* rather than@@ -371,7 +371,7 @@ impl SessionHostBuilder {let definitions = definitions.or_else(|| {session_definition.is_some()- .then(|| Arc::new(crate::agent::harness::AgentDefinitionRegistry::default()))+ .then(|| Arc::new(crate::agent::harness::host_definition::AgentDefinitionRegistry::default()))});let hosted_base = definitions.map(|definitions| {Arc::new(crate::agent::tinyagents::host::OpenHumanHostBase {diff --git a/crates/openhuman-core/src/agent/session_host/builder/builder_tests_tool_exposure_tests.rs b/crates/openhuman-core/src/agent/session_host/builder/builder_tests_tool_exposure_tests.rsindex c28473eb51..17e9d5a3a8 100644--- a/crates/openhuman-core/src/agent/session_host/builder/builder_tests_tool_exposure_tests.rs+++ b/crates/openhuman-core/src/agent/session_host/builder/builder_tests_tool_exposure_tests.rs@@ -1,7 +1,7 @@use super::*;fn visible_names(agent_id: &str) -> std::collections::HashSet<String> {- let definition = crate::agent::harness::AgentDefinitionRegistry::builtins_only()+ let definition = crate::agent::harness::host_definition::AgentDefinitionRegistry::builtins_only().get(agent_id).cloned().unwrap_or_else(|| panic!("built-in agent definition not found: {agent_id}"));@@ -217,7 +217,7 @@ fn named_belt_keeps_its_listed_members() {fn orchestrator_reaches_the_replaced_specialists_tools_through_discovery() {let tmp = tempfile::TempDir::new().unwrap();let config = test_config(&tmp);- let definition = crate::agent::harness::AgentDefinitionRegistry::builtins_only()+ let definition = crate::agent::harness::host_definition::AgentDefinitionRegistry::builtins_only().get("orchestrator").cloned().expect("orchestrator built-in definition");diff --git a/crates/openhuman-core/src/agent/session_host/builder/builder_tests_tool_spec_views_tests.rs b/crates/openhuman-core/src/agent/session_host/builder/builder_tests_tool_spec_views_tests.rsindex 5814ba3f2f..b943eb5735 100644--- a/crates/openhuman-core/src/agent/session_host/builder/builder_tests_tool_spec_views_tests.rs+++ b/crates/openhuman-core/src/agent/session_host/builder/builder_tests_tool_spec_views_tests.rs@@ -12,7 +12,7 @@ use super::*;/// One spec is exempt by design — see the `use_skill` branch below.#[test]fn the_three_spec_views_share_their_leaf_schemas() {- crate::agent::harness::AgentDefinitionRegistry::init_global_builtins().unwrap();+ crate::agent::harness::host_definition::AgentDefinitionRegistry::init_global_builtins().unwrap();let tmp = tempfile::TempDir::new().unwrap();let config = test_config(&tmp);diff --git a/crates/openhuman-core/src/agent/session_host/builder/mod.rs b/crates/openhuman-core/src/agent/session_host/builder/mod.rsindex 173c2b5a6a..2232c259de 100644--- a/crates/openhuman-core/src/agent/session_host/builder/mod.rs+++ b/crates/openhuman-core/src/agent/session_host/builder/mod.rs@@ -273,7 +273,7 @@ pub(super) fn should_synthesize_delegation_tools(def: &AgentDefinition) -> bool/// the name extends at an `_` boundary. Empty when the registry is not up or/// the id resolves to nothing, which leaves the schema untouched.fn allowed_subagent_ids_for(agent_id: &str) -> Vec<String> {- let Some(registry) = crate::agent::harness::AgentDefinitionRegistry::current() else {+ let Some(registry) = crate::agent::harness::host_definition::AgentDefinitionRegistry::current() else {return Vec::new();};let definition = registry.get(agent_id).or_else(|| {diff --git a/crates/openhuman-core/src/agent/session_host/turn/graph.rs b/crates/openhuman-core/src/agent/session_host/turn/graph.rsindex 4b6abdd1ff..1bc922fc8a 100644--- a/crates/openhuman-core/src/agent/session_host/turn/graph.rs+++ b/crates/openhuman-core/src/agent/session_host/turn/graph.rs@@ -28,7 +28,7 @@ use std::sync::Arc;use anyhow::Result;use tokio::sync::mpsc::Sender;-use crate::agent::harness::SandboxMode;+use tinyagents_definition::SandboxMode;use crate::agent::progress::AgentProgress;use crate::agent::tinyagents::{run_root_turn_via_hosted_agent, TinyagentsTurnOutcome, TurnContextMiddleware,diff --git a/crates/openhuman-core/src/agent/subagent_host/mod.rs b/crates/openhuman-core/src/agent/subagent_host/mod.rsindex 552a19db22..c230bd72fd 100644--- a/crates/openhuman-core/src/agent/subagent_host/mod.rs+++ b/crates/openhuman-core/src/agent/subagent_host/mod.rs@@ -1,6 +1,6 @@//! OpenHuman adapters for the neutral TinyAgents subagent lifecycle.//!-//! Given an [`super::definition::AgentDefinition`] and a task prompt, the+//! Given an [`super::host_definition::AgentDefinition`] and a task prompt, the//! runner://!//! 1. Reads the [`super::fork_context::ParentExecutionContext`] task-localdiff --git a/crates/openhuman-core/src/agent/triage/evaluator/arm.rs b/crates/openhuman-core/src/agent/triage/evaluator/arm.rsindex 4d17e54cd1..61aa4477e4 100644--- a/crates/openhuman-core/src/agent/triage/evaluator/arm.rs+++ b/crates/openhuman-core/src/agent/triage/evaluator/arm.rs@@ -8,7 +8,7 @@ use std::time::Instant;use anyhow::anyhow;use crate::agent::bus::{AgentTurnRequest, AgentTurnResponse, AGENT_RUN_TURN_METHOD};-use crate::agent::harness::AgentDefinitionRegistry;+use crate::agent::harness::host_definition::AgentDefinitionRegistry;use crate::config::MultimodalConfig;use crate::core::bus::BUS;use crate::inference::provider::error_classify::{diff --git a/crates/openhuman-core/src/agent/triage/evaluator_tests.rs b/crates/openhuman-core/src/agent/triage/evaluator_tests.rsindex 7f3e92ce6d..8ebd09fdeb 100644--- a/crates/openhuman-core/src/agent/triage/evaluator_tests.rs+++ b/crates/openhuman-core/src/agent/triage/evaluator_tests.rs@@ -1,6 +1,6 @@use super::*;use crate::agent::bus::{mock_agent_run_turn, AgentTurnResponse};-use crate::agent::harness::AgentDefinitionRegistry;+use crate::agent::harness::host_definition::AgentDefinitionRegistry;use crate::agent::registry::agents::BUILTINS;use serde_json::json;use std::sync::atomic::{AtomicUsize, Ordering};diff --git a/crates/openhuman-core/src/channels/runtime/dispatch/host_agent/dispatch_tests.rs b/crates/openhuman-core/src/channels/runtime/dispatch/host_agent/dispatch_tests.rsindex 3e044a7937..5738572cce 100644--- a/crates/openhuman-core/src/channels/runtime/dispatch/host_agent/dispatch_tests.rs+++ b/crates/openhuman-core/src/channels/runtime/dispatch/host_agent/dispatch_tests.rs@@ -319,7 +319,7 @@ async fn bound_channel_runs_its_host_agent() {let tmp = tempfile::tempdir().unwrap();// Every host boots the definition registry; a session's hosted authority// is built from it.- crate::agent::harness::AgentDefinitionRegistry::init_global_builtins().unwrap();+ crate::agent::harness::host_definition::AgentDefinitionRegistry::init_global_builtins().unwrap();let mut agent_config = config(&tmp, None);agent_config.default_model = Some("fixture".into());let route = crate::config::schema::EphemeralRoute::from_params(diff --git a/crates/openhuman-core/src/channels/runtime/startup/start_channels.rs b/crates/openhuman-core/src/channels/runtime/startup/start_channels.rsindex a9ef945be4..0013e926f2 100644--- a/crates/openhuman-core/src/channels/runtime/startup/start_channels.rs+++ b/crates/openhuman-core/src/channels/runtime/startup/start_channels.rs@@ -81,7 +81,7 @@ async fn start_channels_inner(mut config: Config, session: CancellationToken) ->// Initialise the sub-agent definition registry from this workspace.// Idempotent — `bootstrap_core_runtime` may also call it.if let Err(err) =- crate::agent::harness::AgentDefinitionRegistry::init_global(&config.workspace_dir)+ crate::agent::harness::host_definition::AgentDefinitionRegistry::init_global(&config.workspace_dir){tracing::warn!("AgentDefinitionRegistry::init_global failed: {err} — \diff --git a/crates/openhuman-core/src/core/runtime/agent_scope_tests.rs b/crates/openhuman-core/src/core/runtime/agent_scope_tests.rsindex 1232467209..b4af8e57a8 100644--- a/crates/openhuman-core/src/core/runtime/agent_scope_tests.rs+++ b/crates/openhuman-core/src/core/runtime/agent_scope_tests.rs@@ -68,7 +68,7 @@ fn derive_with_carries_policy_catalogue_and_approval_flag() {autonomy: AutonomyLevel::ReadOnly,..SecurityPolicy::default()});- let definitions = Arc::new(crate::agent::harness::AgentDefinitionRegistry::default());+ let definitions = Arc::new(crate::agent::harness::host_definition::AgentDefinitionRegistry::default());let mut spec = overlay("/tmp/agent-scope-ws").session_agent("alpha").agent_policy(Arc::clone(&policy))diff --git a/crates/openhuman-core/src/core/runtime/bootstrap.rs b/crates/openhuman-core/src/core/runtime/bootstrap.rsindex bd0de7e726..0619ec475d 100644--- a/crates/openhuman-core/src/core/runtime/bootstrap.rs+++ b/crates/openhuman-core/src/core/runtime/bootstrap.rs@@ -187,7 +187,7 @@ pub(crate) async fn bootstrap_core_runtime(// multiple times. Uses the per-user scoped workspace_dir.if agent_enabled {if let Err(err) =- crate::agent::harness::AgentDefinitionRegistry::init_global(&workspace_dir)+ crate::agent::harness::host_definition::AgentDefinitionRegistry::init_global(&workspace_dir){log::warn!("[runtime] AgentDefinitionRegistry::init_global failed: {err} — \diff --git a/crates/openhuman-core/src/core/runtime/saas.rs b/crates/openhuman-core/src/core/runtime/saas.rsindex 26c5d7a7d6..59e17564ae 100644--- a/crates/openhuman-core/src/core/runtime/saas.rs+++ b/crates/openhuman-core/src/core/runtime/saas.rs@@ -483,7 +483,7 @@ pub async fn build_with_profile_capabilities(// first initialiser wins, so seed it before the core builds: a lazy init// during the build would otherwise load one user's workspace definitions// for everyone.- crate::agent::harness::AgentDefinitionRegistry::init_global_builtins()?;+ crate::agent::harness::host_definition::AgentDefinitionRegistry::init_global_builtins()?;let mut builder = CoreBuilder::new(HostKind::Saas).token(TokenSource::Fixed(Arc::new(bearer)))@@ -500,7 +500,7 @@ pub async fn build_with_profile_capabilities(let runtime = builder.build().await?;// Whoever initialised first won; refuse to serve users from a registry// that holds anything but the built-ins.- verify_builtin_definitions(crate::agent::harness::AgentDefinitionRegistry::global())?;+ verify_builtin_definitions(crate::agent::harness::host_definition::AgentDefinitionRegistry::global())?;// A relayed platform message (`channel_relay_inbound`) runs through the// channel dispatch pipeline, which asks the native bus for an// `agent.run_turn`. The `Agent` family stays off in SaaS (no agent RPCs@@ -534,7 +534,7 @@ pub async fn build_with_profile_capabilities(/// Refuse boot unless the process-wide agent definition registry is seeded and/// holds the built-ins only.pub(crate) fn verify_builtin_definitions(- registry: Option<&crate::agent::harness::AgentDefinitionRegistry>,+ registry: Option<&crate::agent::harness::host_definition::AgentDefinitionRegistry>,) -> anyhow::Result<()> {let Some(registry) = registry else {anyhow::bail!("[saas] the agent definition registry was not seeded");diff --git a/crates/openhuman-core/src/core/runtime/saas_tests.rs b/crates/openhuman-core/src/core/runtime/saas_tests.rsindex 73202706fd..4f81707d41 100644--- a/crates/openhuman-core/src/core/runtime/saas_tests.rs+++ b/crates/openhuman-core/src/core/runtime/saas_tests.rs@@ -128,7 +128,7 @@ fn boot_refuses_an_unseeded_definition_registry() {#[test]fn boot_accepts_a_builtins_only_registry() {- let registry = crate::agent::harness::AgentDefinitionRegistry::builtins_only();+ let registry = crate::agent::harness::host_definition::AgentDefinitionRegistry::builtins_only();verify_builtin_definitions(Some(®istry)).unwrap();}diff --git a/crates/openhuman-core/src/flows/ops/builder.rs b/crates/openhuman-core/src/flows/ops/builder.rsindex 662ddcd375..200ecf79be 100644--- a/crates/openhuman-core/src/flows/ops/builder.rs+++ b/crates/openhuman-core/src/flows/ops/builder.rs@@ -74,7 +74,7 @@ pub(crate) async fn flows_build_with_extra_hidden_tools(// The registry must be initialised before building a named builtin agent// (idempotent — mirrors `flows_discover`).- crate::agent::harness::AgentDefinitionRegistry::init_global(&config.workspace_dir)+ crate::agent::harness::host_definition::AgentDefinitionRegistry::init_global(&config.workspace_dir).map_err(|e| format!("failed to initialise agent registry: {e}"))?;// Issue #4868 — the session builder (`build_session_agent_inner`) nowdiff --git a/crates/openhuman-core/src/flows/ops/builder_gates.rs b/crates/openhuman-core/src/flows/ops/builder_gates.rsindex fbfcf4a6e3..b9950d7969 100644--- a/crates/openhuman-core/src/flows/ops/builder_gates.rs+++ b/crates/openhuman-core/src/flows/ops/builder_gates.rs@@ -341,7 +341,7 @@ pub(crate) async fn build_builder_proposal(/// load_config_with_timeout` per node; an all-`Harness`/no-custom-ref graph/// still never reads it at all.pub(crate) async fn validate_agent_refs(config: &Config, graph: &WorkflowGraph) -> Vec<String> {- use crate::agent::harness::AgentDefinitionRegistry;+ use crate::agent::harness::host_definition::AgentDefinitionRegistry;use crate::agent::registry::AgentRegistryEntry;use crate::flows::tinyflows::caps::{route_for_agent_ref, AgentRoute};diff --git a/crates/openhuman-core/src/flows/ops/discovery.rs b/crates/openhuman-core/src/flows/ops/discovery.rsindex 6672c881ef..f8d97ebbf4 100644--- a/crates/openhuman-core/src/flows/ops/discovery.rs+++ b/crates/openhuman-core/src/flows/ops/discovery.rs@@ -51,7 +51,7 @@ pub async fn flows_discover(// The registry must be initialised before building a named builtin agent// (mirrors `agent_registry::ops::available_tools`); it is idempotent, so a// second call from an already-booted core is a cheap no-op.- crate::agent::harness::AgentDefinitionRegistry::init_global(&config.workspace_dir)+ crate::agent::harness::host_definition::AgentDefinitionRegistry::init_global(&config.workspace_dir).map_err(|e| format!("failed to initialise agent registry: {e}"))?;let mut agent = OpenHumanSessionHost::from_config_for_agent(config, "flow_discovery")diff --git a/crates/openhuman-core/src/flows/ops_migration_and_side_effect_tests.rs b/crates/openhuman-core/src/flows/ops_migration_and_side_effect_tests.rsindex d7b84730a6..5a174deee3 100644--- a/crates/openhuman-core/src/flows/ops_migration_and_side_effect_tests.rs+++ b/crates/openhuman-core/src/flows/ops_migration_and_side_effect_tests.rs@@ -14,9 +14,9 @@ async fn flows_discover_applies_the_flow_discovery_definitions_effective_iterati// Building an agent constructs a memory client, which needs the host seams// wired. `Once`-guarded, so this is free when another test got there first.- crate::agent::harness::AgentDefinitionRegistry::init_global(&config.workspace_dir)+ crate::agent::harness::host_definition::AgentDefinitionRegistry::init_global(&config.workspace_dir).expect("agent registry init");- let def = crate::agent::harness::AgentDefinitionRegistry::global()+ let def = crate::agent::harness::host_definition::AgentDefinitionRegistry::global().expect("registry initialised").get("flow_discovery").expect("flow_discovery definition registered")diff --git a/crates/openhuman-core/src/flows/ops_run_status_and_prompt_binding_tests.rs b/crates/openhuman-core/src/flows/ops_run_status_and_prompt_binding_tests.rsindex 9e34032c32..f8853d89c0 100644--- a/crates/openhuman-core/src/flows/ops_run_status_and_prompt_binding_tests.rs+++ b/crates/openhuman-core/src/flows/ops_run_status_and_prompt_binding_tests.rs@@ -146,7 +146,7 @@ async fn flows_build_hides_the_live_run_tool_from_the_builder_belt() {// Building an agent constructs a memory client, which needs the host seams// wired. `Once`-guarded, so this is free when another test got there first.- crate::agent::harness::AgentDefinitionRegistry::init_global(&config.workspace_dir)+ crate::agent::harness::host_definition::AgentDefinitionRegistry::init_global(&config.workspace_dir).expect("agent registry init");let mut agent =crate::agent::OpenHumanSessionHost::from_config_for_agent(&config, "workflow_builder")@@ -244,7 +244,7 @@ async fn flows_build_copilot_toolset_unhides_the_live_run_tools() {// Building an agent constructs a memory client, which needs the host seams// wired. `Once`-guarded, so this is free when another test got there first.- crate::agent::harness::AgentDefinitionRegistry::init_global(&config.workspace_dir)+ crate::agent::harness::host_definition::AgentDefinitionRegistry::init_global(&config.workspace_dir).expect("agent registry init");let mut agent =crate::agent::OpenHumanSessionHost::from_config_for_agent(&config, "workflow_builder")@@ -305,9 +305,9 @@ async fn flows_build_applies_the_builder_definitions_effective_iteration_cap() {// Building an agent constructs a memory client, which needs the host seams// wired. `Once`-guarded, so this is free when another test got there first.- crate::agent::harness::AgentDefinitionRegistry::init_global(&config.workspace_dir)+ crate::agent::harness::host_definition::AgentDefinitionRegistry::init_global(&config.workspace_dir).expect("agent registry init");- let def = crate::agent::harness::AgentDefinitionRegistry::global()+ let def = crate::agent::harness::host_definition::AgentDefinitionRegistry::global().expect("registry initialised").get("workflow_builder").expect("workflow_builder definition registered")diff --git a/crates/openhuman-core/src/integrations/composio/tools_metadata_and_sandbox_tests.rs b/crates/openhuman-core/src/integrations/composio/tools_metadata_and_sandbox_tests.rsindex 72f17eb302..c2fd7ef3da 100644--- a/crates/openhuman-core/src/integrations/composio/tools_metadata_and_sandbox_tests.rs+++ b/crates/openhuman-core/src/integrations/composio/tools_metadata_and_sandbox_tests.rs@@ -1,6 +1,6 @@use super::*;-use crate::agent::harness::SandboxMode;+use tinyagents_definition::SandboxMode;/// Every composio tool must report `ToolCategory::Workflow` so the/// skills sub-agent (`category_filter = "skill"`) picks them up.///diff --git a/crates/openhuman-core/src/mcp/server/tools/dispatch.rs b/crates/openhuman-core/src/mcp/server/tools/dispatch.rsindex 013c199543..21a40ca47f 100644--- a/crates/openhuman-core/src/mcp/server/tools/dispatch.rs+++ b/crates/openhuman-core/src/mcp/server/tools/dispatch.rs@@ -1,7 +1,7 @@use serde_json::{json, Map, Value};use tinyinference_llm::tool::ToolSchema;-use crate::agent::harness::AgentDefinitionRegistry;+use crate::agent::harness::host_definition::AgentDefinitionRegistry;use crate::agent::OpenHumanSessionHost;use crate::config::rpc as config_rpc;use crate::core::all;diff --git a/crates/openhuman-core/src/skills/e2e_plumbing_tests.rs b/crates/openhuman-core/src/skills/e2e_plumbing_tests.rsindex f092d73ab5..2f6b589392 100644--- a/crates/openhuman-core/src/skills/e2e_plumbing_tests.rs+++ b/crates/openhuman-core/src/skills/e2e_plumbing_tests.rs@@ -209,7 +209,7 @@ async fn mock_llm_orchestrator_lists_and_runs_workflows_through_the_loop() {MultimodalFileConfig::default(),None,None,- crate::agent::harness::SandboxMode::None,+ tinyagents_definition::SandboxMode::None,).await.expect("tool loop should run to completion");diff --git a/crates/openhuman-core/src/web_chat/session_checkout_tests.rs b/crates/openhuman-core/src/web_chat/session_checkout_tests.rsindex b897a0081f..5fcc1aff70 100644--- a/crates/openhuman-core/src/web_chat/session_checkout_tests.rs+++ b/crates/openhuman-core/src/web_chat/session_checkout_tests.rs@@ -511,7 +511,7 @@ fn fingerprint_diff_reports_every_differing_field() {#[test]fn chat_agent_id_selects_the_web_chat_agent_and_defaults_to_the_orchestrator() {use super::pick_target_agent_id;- crate::agent::harness::AgentDefinitionRegistry::init_global_builtins().unwrap();+ crate::agent::harness::host_definition::AgentDefinitionRegistry::init_global_builtins().unwrap();let mut config = crate::config::Config::default();assert_eq!(diff --git a/tests/agent_harness_e2e.rs b/tests/agent_harness_e2e.rsindex 40e8e1da6a..633a2440ee 100644--- a/tests/agent_harness_e2e.rs+++ b/tests/agent_harness_e2e.rs@@ -35,7 +35,7 @@ use futures_util::StreamExt;use serde_json::{json, Value};use tempfile::tempdir;-use openhuman_core::agent::harness::AgentDefinitionRegistry;+use openhuman_core::agent::harness::host_definition::AgentDefinitionRegistry;use openhuman_core::core::auth::{init_rpc_token, CORE_TOKEN_ENV_VAR};use openhuman_rpc::server::build_core_http_router;diff --git a/tests/in_process/agent_prompt_comprehension_e2e.rs b/tests/in_process/agent_prompt_comprehension_e2e.rsindex 6aeb923976..fa175533db 100644--- a/tests/in_process/agent_prompt_comprehension_e2e.rs+++ b/tests/in_process/agent_prompt_comprehension_e2e.rs@@ -34,7 +34,7 @@ use futures_util::StreamExt;use serde_json::{json, Value};use tempfile::tempdir;-use openhuman_core::agent::harness::AgentDefinitionRegistry;+use openhuman_core::agent::harness::host_definition::AgentDefinitionRegistry;use openhuman_rpc::server::build_core_http_router;// ─── Env serialization ──────────────────────────────────────────────────────diff --git a/tests/in_process/worker_b_domain_e2e.rs b/tests/in_process/worker_b_domain_e2e.rsindex e12a22f610..6c28cee0f1 100644--- a/tests/in_process/worker_b_domain_e2e.rs+++ b/tests/in_process/worker_b_domain_e2e.rs@@ -40,7 +40,7 @@ async fn setup() -> TestHarness {EnvVarGuard::set("OPENHUMAN_MEMORY_EMBED_MODEL", ""),];- let _ = openhuman_core::agent::harness::AgentDefinitionRegistry::init_global_builtins();+ let _ = openhuman_core::agent::harness::host_definition::AgentDefinitionRegistry::init_global_builtins();let (addr, join) = serve_rpc().await;TestHarness {diff --git a/tests/raw_coverage/worker_b_raw_coverage_e2e.rs b/tests/raw_coverage/worker_b_raw_coverage_e2e.rsindex 9147f79840..5c4d3a3965 100644--- a/tests/raw_coverage/worker_b_raw_coverage_e2e.rs+++ b/tests/raw_coverage/worker_b_raw_coverage_e2e.rs@@ -274,7 +274,7 @@ async fn setup() -> TestHarness {EnvVarGuard::set("OPENHUMAN_MEMORY_EMBED_MODEL", ""),];- let _ = openhuman_core::agent::harness::AgentDefinitionRegistry::init_global_builtins();+ let _ = openhuman_core::agent::harness::host_definition::AgentDefinitionRegistry::init_global_builtins();let (addr, rpc_join) = serve_rpc().await;TestHarness {