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
chore: files changed crates/openhuman-core/src/agent/bus.rs,crates/openhuman-core/src/agent/harness/
Steven Enamakel6517e895eec1
diff --git a/crates/openhuman-core/src/agent/bus.rs b/crates/openhuman-core/src/agent/bus.rsindex 897f98c8b3..f11377d62f 100644--- a/crates/openhuman-core/src/agent/bus.rs+++ b/crates/openhuman-core/src/agent/bus.rs@@ -30,9 +30,9 @@ use crate::security::prompt_injection::{use tinyagents_session::transcript::TranscriptMessage;use tinytools::Tool;-use super::harness::host_definition::{AgentDefinitionRegistry};-use tinyagents_definition::{SandboxMode};+use super::harness::host_definition::AgentDefinitionRegistry;use super::harness::run_channel_turn_via_graph;+use tinyagents_definition::SandboxMode;use tinytools_std::file_state::with_file_state_agent_id;/// Method name used to dispatch an agentic turn through the native bus.diff --git a/crates/openhuman-core/src/agent/harness/builtin_definitions.rs b/crates/openhuman-core/src/agent/harness/builtin_definitions.rsindex 8f5f6d6673..c3649b23e3 100644--- a/crates/openhuman-core/src/agent/harness/builtin_definitions.rs+++ b/crates/openhuman-core/src/agent/harness/builtin_definitions.rs@@ -47,7 +47,9 @@ 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 tinyagents_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(),diff --git a/crates/openhuman-core/src/agent/harness/host_definition.rs b/crates/openhuman-core/src/agent/harness/host_definition.rsindex 4abcc07106..23284361c4 100644--- a/crates/openhuman-core/src/agent/harness/host_definition.rs+++ b/crates/openhuman-core/src/agent/harness/host_definition.rs@@ -83,7 +83,10 @@ impl Default for AgentExt {impl AgentExt {/// Resolve the authored TokenJuice profile to the concrete per-call policy/// for an agent whose model pin is `model`.- pub fn effective_tokenjuice_compression(&self, model: &ModelSpec) -> AgentTokenjuiceCompression {+ pub fn effective_tokenjuice_compression(+ &self,+ model: &ModelSpec,+ ) -> AgentTokenjuiceCompression {match self.tokenjuice_compression {AgentTokenjuiceCompression::Auto => match model {ModelSpec::Hint(hint) if hint.trim().eq_ignore_ascii_case("coding") => {diff --git a/crates/openhuman-core/src/agent/harness/mod.rs b/crates/openhuman-core/src/agent/harness/mod.rsindex 2d5ea75187..0c8b1c4f77 100644--- a/crates/openhuman-core/src/agent/harness/mod.rs+++ b/crates/openhuman-core/src/agent/harness/mod.rs@@ -22,9 +22,9 @@pub mod artifact_offload;pub(crate) mod builtin_definitions;-pub mod host_definition;pub mod fork_context;pub(crate) mod graph;+pub mod host_definition;pub(crate) mod tool_result_artifacts;// NOTE: deliberately no flat re-export here. `artifact_offload::ArtifactKind`diff --git a/crates/openhuman-core/src/agent/library/ops.rs b/crates/openhuman-core/src/agent/library/ops.rsindex 37bfc80f16..d0fec20e79 100644--- a/crates/openhuman-core/src/agent/library/ops.rs+++ b/crates/openhuman-core/src/agent/library/ops.rs@@ -1,6 +1,8 @@use crate::agent::harness::host_definition::{AgentDefinition, AgentDefinitionRegistry};-use tinyagents_definition::{AgentTier, DefinitionSource, ModelSpec, SandboxMode, SubagentEntry, ToolScope};use crate::config::rpc as config_rpc;+use tinyagents_definition::{+ AgentTier, DefinitionSource, ModelSpec, SandboxMode, SubagentEntry, ToolScope,+};use super::types::{AgentDefinitionDisplay, AgentDefinitionModel, AgentDefinitionSource};diff --git a/crates/openhuman-core/src/agent/orchestration/fleet_tools.rs b/crates/openhuman-core/src/agent/orchestration/fleet_tools.rsindex f7658c7771..7d131993f9 100644--- a/crates/openhuman-core/src/agent/orchestration/fleet_tools.rs+++ b/crates/openhuman-core/src/agent/orchestration/fleet_tools.rs@@ -13,8 +13,8 @@//! "does this parent see tool X?", so both texts only ever name tools that//! are in the caller's belt.-use crate::agent::harness::host_definition::{AgentDefinitionRegistry};-use tinyagents_definition::{ToolScope};+use crate::agent::harness::host_definition::AgentDefinitionRegistry;+use tinyagents_definition::ToolScope;/// The fleet-control tools whose availability shapes the delegation texts.const FLEET_TOOLS: &[&str] = &[diff --git a/crates/openhuman-core/src/agent/orchestration/parent_context/builder.rs b/crates/openhuman-core/src/agent/orchestration/parent_context/builder.rsindex 909af66971..91660b9848 100644--- a/crates/openhuman-core/src/agent/orchestration/parent_context/builder.rs+++ b/crates/openhuman-core/src/agent/orchestration/parent_context/builder.rs@@ -65,7 +65,9 @@ pub(crate) async fn build_root_parent(// makes this idempotent: a no-op when the registry is already loaded.if crate::agent::harness::host_definition::AgentDefinitionRegistry::global().is_none() {if let Err(err) =- crate::agent::harness::host_definition::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 ifdiff --git a/crates/openhuman-core/src/agent/orchestration/tools/spawn_parallel_agents_tests.rs b/crates/openhuman-core/src/agent/orchestration/tools/spawn_parallel_agents_tests.rsindex 749e2ff2dd..08f1ee30c7 100644--- a/crates/openhuman-core/src/agent/orchestration/tools/spawn_parallel_agents_tests.rs+++ b/crates/openhuman-core/src/agent/orchestration/tools/spawn_parallel_agents_tests.rs@@ -1,8 +1,7 @@use super::*;-use crate::agent::harness::host_definition::AgentDefinitionRegistry;-use crate::agent::harness::host_definition::{AgentDefinition};-use tinyagents_definition::{AgentTier, DefinitionSource, ModelSpec, PromptSource, SandboxMode, ToolScope};use crate::agent::harness::fork_context::{with_parent_context, ParentExecutionContext};+use crate::agent::harness::host_definition::AgentDefinition;+use crate::agent::harness::host_definition::AgentDefinitionRegistry;use crate::agent::orchestration::spawn_parallel_graph::{prepare_spawn_parallel_tasks_from_defs, ParallelTaskRejectionKind, SpawnParallelTaskPreflight,WorkerDispatchMode,@@ -19,6 +18,9 @@ use std::sync::{atomic::{AtomicUsize, Ordering},Arc,};+use tinyagents_definition::{+ AgentTier, DefinitionSource, ModelSpec, PromptSource, SandboxMode, ToolScope,+};use tinyagents_harness::tool::ToolDispatch;use tinyinference_llm::message::{AssistantMessage, Message};use tinyinference_llm::model::{ChatModel, ModelProfile, ModelRequest, ModelResponse};diff --git a/crates/openhuman-core/src/agent/orchestration/workflow_runs/host.rs b/crates/openhuman-core/src/agent/orchestration/workflow_runs/host.rsindex a0979391c1..5b45323532 100644--- a/crates/openhuman-core/src/agent/orchestration/workflow_runs/host.rs+++ b/crates/openhuman-core/src/agent/orchestration/workflow_runs/host.rs@@ -11,7 +11,7 @@ use tinyagents_orchestration::workflow::{WorkflowDefinition, WorkflowExecutor,};-use crate::agent::harness::host_definition::{AgentDefinitionRegistry};+use crate::agent::harness::host_definition::AgentDefinitionRegistry;use tinyagents_definition::{SandboxMode, ToolScope};use {crate::agent::orchestration::AgentOrchestrationSession,diff --git a/crates/openhuman-core/src/agent/registry/agents/loader.rs b/crates/openhuman-core/src/agent/registry/agents/loader.rsindex 2ba4446079..5f62e5b939 100644--- a/crates/openhuman-core/src/agent/registry/agents/loader.rs+++ b/crates/openhuman-core/src/agent/registry/agents/loader.rs@@ -30,9 +30,11 @@//! collision.use crate::agent::harness::host_definition::{AgentDefinition, PromptBuilder};-use tinyagents_definition::{validate_tier_transition, AgentTier, DefinitionSource, PromptSource, SubagentEntry};use anyhow::{Context, Result};use std::collections::HashMap;+use tinyagents_definition::{+ validate_tier_transition, AgentTier, DefinitionSource, PromptSource, SubagentEntry,+};/// A single built-in agent: its id plus the metadata TOML and a/// function-driven prompt builder.diff --git a/crates/openhuman-core/src/agent/registry/agents/orchestrator/prompt.rs b/crates/openhuman-core/src/agent/registry/agents/orchestrator/prompt.rsindex 230c9bea5a..99c573cda0 100644--- a/crates/openhuman-core/src/agent/registry/agents/orchestrator/prompt.rs+++ b/crates/openhuman-core/src/agent/registry/agents/orchestrator/prompt.rs@@ -10,7 +10,6 @@//! delegate to any more. That prose lives here (not in the shared prompts//! module) so nobody has to branch on `agent_id` in a shared section impl.-use tinyagents_definition::SubagentEntry;use crate::agent::harness::host_definition::AgentDefinitionRegistry;use crate::agent::prompts::{render_datetime, render_identity, render_tools, render_workspace, ConnectedIntegration,@@ -20,6 +19,7 @@ use crate::tools::orchestrator_tools::sanitise_slug;use crate::tools::toolpacks;use anyhow::Result;use std::fmt::Write;+use tinyagents_definition::SubagentEntry;use tinyskills::Skill as Workflow;const ARCHETYPE: &str = include_str!("prompt.md");diff --git a/crates/openhuman-core/src/agent/registry/defaults.rs b/crates/openhuman-core/src/agent/registry/defaults.rsindex c66b5fd3f5..ba86d78385 100644--- a/crates/openhuman-core/src/agent/registry/defaults.rs+++ b/crates/openhuman-core/src/agent/registry/defaults.rs@@ -2,8 +2,11 @@use serde_json::Value;-use crate::agent::harness::host_definition::{AgentDefinition};-use tinyagents_definition::{AgentTier, DefinitionSource, IterationPolicy, ModelSpec, PromptSource, SandboxMode, SubagentEntry, ToolScope};+use crate::agent::harness::host_definition::AgentDefinition;+use tinyagents_definition::{+ AgentTier, DefinitionSource, IterationPolicy, ModelSpec, PromptSource, SandboxMode,+ SubagentEntry, ToolScope,+};use super::types::{AgentRegistryEntry, AgentRegistrySource, AgentSubagentPolicy};diff --git a/crates/openhuman-core/src/agent/schemas.rs b/crates/openhuman-core/src/agent/schemas.rsindex 1fce2c1e09..c7b7eb29e0 100644--- a/crates/openhuman-core/src/agent/schemas.rs+++ b/crates/openhuman-core/src/agent/schemas.rs@@ -332,7 +332,8 @@ 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::host_definition::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/factory.rs b/crates/openhuman-core/src/agent/session_host/builder/factory.rsindex 1a1dccaae9..2742e522cd 100644--- a/crates/openhuman-core/src/agent/session_host/builder/factory.rs+++ b/crates/openhuman-core/src/agent/session_host/builder/factory.rs@@ -4,7 +4,6 @@ use super::dispatcher::{resolve_dispatcher_kind, DispatcherKind};use super::host_tools::derive_turn_workspace_descriptor;use super::should_synthesize_delegation_tools;use crate::agent::harness::host_definition::{AgentDefinitionRegistry, NO_TOOLS_SENTINEL};-use tinyagents_definition::{PromptSource, ToolScope};use crate::agent::host_runtime;use crate::agent::prompts::SystemPromptBuilder;use crate::agent::session_host::types::OpenHumanSessionHost;@@ -13,6 +12,7 @@ use crate::security::SecurityPolicy;use crate::tools;use anyhow::Result;use std::sync::Arc;+use tinyagents_definition::{PromptSource, ToolScope};use tinytools::Tool;use tinytools_agent::dialect::{CodeDialect, NativeDialect, PFormatDialect, ToolDialect, XmlDialect,diff --git a/crates/openhuman-core/src/agent/session_host/builder/mod.rs b/crates/openhuman-core/src/agent/session_host/builder/mod.rsindex fefa7b4e65..46fca3721b 100644--- a/crates/openhuman-core/src/agent/session_host/builder/mod.rs+++ b/crates/openhuman-core/src/agent/session_host/builder/mod.rs@@ -25,9 +25,9 @@ pub use host_tools::{HostTools, HostTurnTools, TurnContext};#[cfg(test)]mod builder_tests;-use crate::agent::harness::host_definition::{AgentDefinition};-use tinyagents_definition::{ToolScope};+use crate::agent::harness::host_definition::AgentDefinition;use std::sync::Arc;+use tinyagents_definition::ToolScope;use tinytools::ToolPolicySession;use tinytools::{Tool, ToolSpec};@@ -274,7 +274,8 @@ 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::host_definition::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/subagent_host/ops/mod.rs b/crates/openhuman-core/src/agent/subagent_host/ops/mod.rsindex 15a201818e..84d3dc24ef 100644--- a/crates/openhuman-core/src/agent/subagent_host/ops/mod.rs+++ b/crates/openhuman-core/src/agent/subagent_host/ops/mod.rs@@ -60,14 +60,14 @@ pub(super) use super::tool_prep::filter_tool_indices;#[cfg(test)]pub(super) use super::types::{SubagentMode, SubagentRunError, SubagentRunOptions};#[cfg(test)]-pub(super) use crate::agent::harness::host_definition::{AgentDefinition};-#[cfg(test)]-use tinyagents_definition::{PromptSource};-#[cfg(test)]pub(super) use crate::agent::harness::fork_context::ParentExecutionContext;#[cfg(test)]+pub(super) use crate::agent::harness::host_definition::AgentDefinition;+#[cfg(test)]pub(super) use crate::agent::tinyagents::budget::MAX_SPAWN_DEPTH;#[cfg(test)]+use tinyagents_definition::PromptSource;+#[cfg(test)]use tinytools::ToolSpec;// Test companion modules — path references relative to their original location.diff --git a/crates/openhuman-core/src/agent/subagent_host/ops/runner.rs b/crates/openhuman-core/src/agent/subagent_host/ops/runner.rsindex e9de9230d1..66165d98cc 100644--- a/crates/openhuman-core/src/agent/subagent_host/ops/runner.rs+++ b/crates/openhuman-core/src/agent/subagent_host/ops/runner.rs@@ -10,9 +10,8 @@ use std::collections::HashSet;use std::time::Instant;use crate::agent::harness::artifact_offload::{new_artifact_offload, offload_oversized_result};-use crate::agent::harness::host_definition::{AgentDefinition, AgentDefinitionRegistry};-use tinyagents_definition::{validate_tier_transition, AgentTier, IterationPolicy, PromptSource, SandboxMode as AgentSandboxMode};use crate::agent::harness::fork_context::ParentExecutionContext;+use crate::agent::harness::host_definition::{AgentDefinition, AgentDefinitionRegistry};use crate::agent::prompts::{render_subagent_system_prompt_with_format, PromptContext, SubagentRenderOptions,};@@ -25,6 +24,10 @@ use crate::agent::subagent_host::types::{};use crate::agent::tinyagents::budget::MAX_SPAWN_DEPTH;use crate::inference::provider::AGENT_TURN_MAX_OUTPUT_TOKENS;+use tinyagents_definition::{+ validate_tier_transition, AgentTier, IterationPolicy, PromptSource,+ SandboxMode as AgentSandboxMode,+};use tinyagents_harness::artifacts::{effective_offload_threshold, extract_artifact_paths, note_artifact_handoff,DEFAULT_OFFLOAD_THRESHOLD_BYTES, HANDOFF_STAGE_RECORDED,diff --git a/crates/openhuman-core/src/agent/subagent_host/tool_prep.rs b/crates/openhuman-core/src/agent/subagent_host/tool_prep.rsindex 3543b50e3d..f66ac74887 100644--- a/crates/openhuman-core/src/agent/subagent_host/tool_prep.rs+++ b/crates/openhuman-core/src/agent/subagent_host/tool_prep.rs@@ -6,8 +6,8 @@use super::types::SubagentRunError;use crate::agent::harness::host_definition::AgentDefinition;-use tinyagents_definition::{PromptSource, ToolScope};use crate::agent::prompts::PromptContext;+use tinyagents_definition::{PromptSource, ToolScope};use tinytools::Tool;// ── Prompt dialect selection ────────────────────────────────────────────@@ -76,7 +76,9 @@ pub(super) fn is_subagent_spawn_tool(name: &str) -> bool {// which let wildcard-scoped children inherit the orchestrator's spawn// surface. Resolve the override names via the registry so the strip// stays in lockstep with `collect_orchestrator_tools`'s naming.- if let Some(registry) = crate::agent::harness::host_definition::AgentDefinitionRegistry::current() {+ if let Some(registry) =+ crate::agent::harness::host_definition::AgentDefinitionRegistry::current()+ {return registry.list().iter()diff --git a/crates/openhuman-core/src/agent/tinyagents/harness_tool_registration.rs b/crates/openhuman-core/src/agent/tinyagents/harness_tool_registration.rsindex aaa40a5ce0..e1b682ab3d 100644--- a/crates/openhuman-core/src/agent/tinyagents/harness_tool_registration.rs+++ b/crates/openhuman-core/src/agent/tinyagents/harness_tool_registration.rs@@ -233,7 +233,9 @@ pub(super) fn register_turn_tools_and_agents(// remains the deferred follow-up.let mut registered_agents: HashSet<String> = HashSet::new();let mut runtime_agent_count = 0usize;- if let Some(runtime) = crate::agent::harness::host_definition::AgentDefinitionRegistry::current() {+ if let Some(runtime) =+ crate::agent::harness::host_definition::AgentDefinitionRegistry::current()+ {for def in runtime.list() {if registered_agents.insert(def.id.clone()) {let _ =diff --git a/crates/openhuman-core/src/agent/tinyagents/host/definition_registry.rs b/crates/openhuman-core/src/agent/tinyagents/host/definition_registry.rsindex 880e38994a..d77052e8c7 100644--- a/crates/openhuman-core/src/agent/tinyagents/host/definition_registry.rs+++ b/crates/openhuman-core/src/agent/tinyagents/host/definition_registry.rs@@ -62,9 +62,9 @@ use crate::agent::harness::host_definition::NO_TOOLS_SENTINEL;use crate::agent::harness::host_definition::{AgentDefinition as HostAgentDefinition, AgentDefinitionRegistry,};-use tinyagents_definition::{AgentTier, ToolScope};use crate::agent::registry::{definition_from_registry_entry, find_custom_in_config};use crate::config::Config;+use tinyagents_definition::{AgentTier, ToolScope};// ── Registry handle ───────────────────────────────────────────────────────────@@ -420,10 +420,8 @@ impl OpenHumanDefinitionRegistry {out.push(id);continue;};- match tinyagents_definition::validate_tier_transition(- def.agent_tier,- child.agent_tier,- ) {+ match tinyagents_definition::validate_tier_transition(def.agent_tier, child.agent_tier)+ {Ok(()) => out.push(id),Err(reason) => {tracing::warn!(diff --git a/crates/openhuman-core/src/agent/tinyagents/host/mod.rs b/crates/openhuman-core/src/agent/tinyagents/host/mod.rsindex 0b5bce3330..44effcfe02 100644--- a/crates/openhuman-core/src/agent/tinyagents/host/mod.rs+++ b/crates/openhuman-core/src/agent/tinyagents/host/mod.rs@@ -52,8 +52,8 @@ pub use model_resolver::OpenHumanModelResolver;pub use progress_sink::OpenHumanProgressSink;pub(crate) use run_context::direct_subagent_child;pub use run_context::{- decide_dispatch, DispatchDecision, DispatchInputs, LastTurnUsage, OpenHumanRunContext, OpenHumanRunExt,- SubagentUsageEntry, TurnDispatchState,+ decide_dispatch, DispatchDecision, DispatchInputs, LastTurnUsage, OpenHumanRunContext,+ OpenHumanRunExt, SubagentUsageEntry, TurnDispatchState,};pub(crate) use security_gate::with_untrusted_input_turn;pub use security_gate::OpenHumanSecurityGate;diff --git a/crates/openhuman-core/src/agent/tinyagents/host/run_context.rs b/crates/openhuman-core/src/agent/tinyagents/host/run_context.rsindex 019ebfd2fb..23e43890f9 100644--- a/crates/openhuman-core/src/agent/tinyagents/host/run_context.rs+++ b/crates/openhuman-core/src/agent/tinyagents/host/run_context.rs@@ -16,7 +16,6 @@ use std::time::Instant;use tokio::sync::mpsc::Sender;-use tinyagents_definition::SandboxMode;use crate::agent::harness::fork_context::{AgentContextPreparedSource, ParentExecutionContext};use crate::agent::progress::AgentProgress;use crate::agent::subagent_host::SubagentUsage;@@ -25,6 +24,7 @@ use crate::agent::tinyagents::{turn_outcome::ToolCallOutcome, turn_policy::ToolPolicyEnforcement, TurnContextMiddleware,};use crate::agent::turn_origin::AgentTurnOrigin;+use tinyagents_definition::SandboxMode;use tinyagents_harness::middleware::StopHook;use tinyagents_harness::store::InMemoryStore as ToolResultArtifactIndexStore;use tinyinference_llm::model::ResolvedModelRoute;diff --git a/crates/openhuman-core/src/agent/tinyagents/observability.rs b/crates/openhuman-core/src/agent/tinyagents/observability.rsindex 70ce1c5659..9d4c8c3659 100644--- a/crates/openhuman-core/src/agent/tinyagents/observability.rs+++ b/crates/openhuman-core/src/agent/tinyagents/observability.rs@@ -24,9 +24,7 @@ use tinyinference_llm::usage::Usage;#[cfg(test)]use crate::agent::progress::AgentProgress;-pub(crate) use bridge_types::{- ProviderUsageCarry, SubagentScope, ToolFailureMap, ToolNameMap,-};+pub(crate) use bridge_types::{ProviderUsageCarry, SubagentScope, ToolFailureMap, ToolNameMap};pub(crate) use event_bridge::OpenhumanEventBridge;pub(crate) use event_projection::surface_cache_layout_events;pub(crate) use graph_tracing::GraphTracingSink;diff --git a/crates/openhuman-core/src/agent/tinyagents/response_shape.rs b/crates/openhuman-core/src/agent/tinyagents/response_shape.rsindex 192071e28f..92339ffb85 100644--- a/crates/openhuman-core/src/agent/tinyagents/response_shape.rs+++ b/crates/openhuman-core/src/agent/tinyagents/response_shape.rs@@ -161,7 +161,9 @@ pub async fn with_response_shape<F: std::future::Future>(let observer = scope.shape.observer.clone();let run = RESPONSE_SHAPE.scope(scope, Box::pin(fut));match observer {- Some(observer) => tinyagents_harness::observability::turn_observer::with_observer(observer, run).await,+ Some(observer) => {+ tinyagents_harness::observability::turn_observer::with_observer(observer, run).await+ }None => run.await,}}diff --git a/crates/openhuman-core/src/agent/triage/escalation.rs b/crates/openhuman-core/src/agent/triage/escalation.rsindex 121fca7386..5dcf294725 100644--- a/crates/openhuman-core/src/agent/triage/escalation.rs+++ b/crates/openhuman-core/src/agent/triage/escalation.rs@@ -18,8 +18,8 @@use anyhow::{anyhow, Context};-use crate::agent::harness::host_definition::AgentDefinitionRegistry;use crate::agent::harness::fork_context::ParentExecutionContext;+use crate::agent::harness::host_definition::AgentDefinitionRegistry;use crate::agent::orchestration::parent_context::build_root_parent;use crate::agent::subagent_host::{self, SubagentRunOptions};use crate::config::Config;diff --git a/crates/openhuman-core/src/agent/triage/evaluator.rs b/crates/openhuman-core/src/agent/triage/evaluator.rsindex 2185ea9415..9acb4ccf0e 100644--- a/crates/openhuman-core/src/agent/triage/evaluator.rs+++ b/crates/openhuman-core/src/agent/triage/evaluator.rs@@ -48,15 +48,15 @@ use super::envelope::TriggerEnvelope;#[cfg(test)]use super::routing::ResolvedProvider;#[cfg(test)]-use crate::agent::harness::host_definition::{AgentDefinition};-#[cfg(test)]-use tinyagents_definition::{PromptSource};+use crate::agent::harness::host_definition::AgentDefinition;#[cfg(test)]pub(crate) use arm::{classify_error, ArmError};#[cfg(test)]pub(crate) use chain::run_triage_with_arms_for_test;#[cfg(test)]pub(crate) use prompt::{extract_inline_prompt, render_user_message, truncate_payload};+#[cfg(test)]+use tinyagents_definition::PromptSource;#[cfg(test)]#[path = "evaluator_tests.rs"]diff --git a/crates/openhuman-core/src/channels/runtime/dispatch/routing.rs b/crates/openhuman-core/src/channels/runtime/dispatch/routing.rsindex 1590f9b294..803fd74a03 100644--- a/crates/openhuman-core/src/channels/runtime/dispatch/routing.rs+++ b/crates/openhuman-core/src/channels/runtime/dispatch/routing.rs@@ -7,7 +7,6 @@//! * [`build_visible_tool_set`] — union of named tools + extra (delegation) tools.use crate::agent::harness::host_definition::{AgentDefinition, AgentDefinitionRegistry};-use tinyagents_definition::{ToolScope};use crate::agent::prompts::ConnectedIntegration;use crate::config::Config;use crate::integrations::composio::{@@ -17,6 +16,7 @@ use crate::integrations::composio::{use crate::tools::orchestrator_tools;use std::collections::HashSet;use std::time::Duration;+use tinyagents_definition::ToolScope;use tinytools::Tool;/// Per-turn scoping fields derived from the active agent definition.diff --git a/crates/openhuman-core/src/core/runtime/saas.rs b/crates/openhuman-core/src/core/runtime/saas.rsindex 59e17564ae..6dbe680626 100644--- a/crates/openhuman-core/src/core/runtime/saas.rs+++ b/crates/openhuman-core/src/core/runtime/saas.rs@@ -500,7 +500,9 @@ 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::host_definition::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 RPCsdiff --git a/crates/openhuman-core/src/flows/tinyflows/caps/code.rs b/crates/openhuman-core/src/flows/tinyflows/caps/code.rsindex 6a6f44be1f..4311aa2e02 100644--- a/crates/openhuman-core/src/flows/tinyflows/caps/code.rs+++ b/crates/openhuman-core/src/flows/tinyflows/caps/code.rs@@ -13,10 +13,10 @@ use tinyflows::caps::*;use tinyflows::error::{EngineError, Result};use super::*;-use tinyagents_definition::SandboxMode;use crate::config::Config;use crate::sandbox::{execute_in_sandbox, resolve_sandbox_policy};use crate::security::SecurityPolicy;+use tinyagents_definition::SandboxMode;use tinybox_bus::CommandClass;/// [`CodeRunner`] adapter running sandboxed user code viadiff --git a/crates/openhuman-core/src/integrations/composio/action_tool.rs b/crates/openhuman-core/src/integrations/composio/action_tool.rsindex 13afd0ae35..5f33a080b2 100644--- a/crates/openhuman-core/src/integrations/composio/action_tool.rs+++ b/crates/openhuman-core/src/integrations/composio/action_tool.rs@@ -35,10 +35,10 @@ use serde_json::Value;use super::contract::ToolScope;use super::tools::resolve_action_scope;-use tinyagents_definition::SandboxMode;use crate::agent::tinyagents::host::run_context::sandbox_mode_for_tool;use crate::config::rpc as config_rpc;use crate::config::Config;+use tinyagents_definition::SandboxMode;use tinytools::{PermissionLevel, Tool, ToolCallOptions, ToolCategory, ToolResult, ToolRunContext};/// A single Composio action exposed as a first-class tool.diff --git a/crates/openhuman-core/src/integrations/composio/mod.rs b/crates/openhuman-core/src/integrations/composio/mod.rsindex 59b3108082..f5e32080e2 100644--- a/crates/openhuman-core/src/integrations/composio/mod.rs+++ b/crates/openhuman-core/src/integrations/composio/mod.rs@@ -87,4 +87,3 @@ pub use types::{ComposioToolsResponse, ComposioTriggerEvent, ComposioTriggerHistoryEntry,ComposioTriggerHistoryResult, ComposioTriggerMetadata,};-diff --git a/crates/openhuman-core/src/sandbox/ops.rs b/crates/openhuman-core/src/sandbox/ops.rsindex f2fbcac7e3..d23504aa3e 100644--- a/crates/openhuman-core/src/sandbox/ops.rs+++ b/crates/openhuman-core/src/sandbox/ops.rs@@ -6,12 +6,12 @@ use super::types::{ElevatedOp, SandboxBackendHandle, SandboxBackendKind, SandboxExecRequest, SandboxExecResult,SandboxPolicy, SandboxStatus, ELEVATED_TOOLS,};-use tinyagents_definition::SandboxMode;use crate::config::{RuntimeConfig, SandboxBackend, SandboxConfig};use std::collections::HashMap;use std::ffi::OsString;use std::path::Path;use std::time::Duration;+use tinyagents_definition::SandboxMode;/// Safe environment variables forwarded into sandboxed execution.///diff --git a/crates/openhuman-core/src/skills/registry.rs b/crates/openhuman-core/src/skills/registry.rsindex 68d595b852..b248397555 100644--- a/crates/openhuman-core/src/skills/registry.rs+++ b/crates/openhuman-core/src/skills/registry.rs@@ -12,8 +12,8 @@ use std::path::Path;use serde::{Deserialize, Serialize};-use crate::agent::harness::host_definition::{AgentDefinition};-use tinyagents_definition::{PromptSource};+use crate::agent::harness::host_definition::AgentDefinition;+use tinyagents_definition::PromptSource;use tinyskills::Skill as Workflow;/// One declared input — a parameter the skill needs, with a human description.diff --git a/crates/openhuman-core/src/storage/import/sessions.rs b/crates/openhuman-core/src/storage/import/sessions.rsindex 62b722c626..43587d2f5d 100644--- a/crates/openhuman-core/src/storage/import/sessions.rs+++ b/crates/openhuman-core/src/storage/import/sessions.rs@@ -137,7 +137,9 @@ fn known_agents() -> HashMap<String, String> {.iter().map(|def| def.id.clone()).collect();- if let Some(current) = crate::agent::harness::host_definition::AgentDefinitionRegistry::current() {+ if let Some(current) =+ crate::agent::harness::host_definition::AgentDefinitionRegistry::current()+ {ids.extend(current.list().iter().map(|def| def.id.clone()));}ids.sort();diff --git a/crates/openhuman-core/src/tools/orchestrator_tools.rs b/crates/openhuman-core/src/tools/orchestrator_tools.rsindex 499e5be74f..89745d636a 100644--- a/crates/openhuman-core/src/tools/orchestrator_tools.rs+++ b/crates/openhuman-core/src/tools/orchestrator_tools.rs@@ -33,9 +33,9 @@//! [`SubagentEntry::Skills`]: tinyagents_definition::SubagentEntry::Skillsuse crate::agent::harness::host_definition::{AgentDefinition, AgentDefinitionRegistry};-use tinyagents_definition::{SubagentEntry};use crate::agent::prompts::ConnectedIntegration;use crate::integrations::composio::ComposioActionTool;+use tinyagents_definition::SubagentEntry;// SpawnWorkerThreadTool import kept commented while the worker-thread spawn is// temporarily disabled (see tinyhumansai/openhuman#1624).diff --git a/crates/openhuman-embed/src/agent/build.rs b/crates/openhuman-embed/src/agent/build.rsindex 3f98e76e45..29806548d9 100644--- a/crates/openhuman-embed/src/agent/build.rs+++ b/crates/openhuman-embed/src/agent/build.rs@@ -8,10 +8,10 @@use std::path::Path;use openhuman_core::agent::harness::host_definition::{AgentDefinition, AgentDefinitionRegistry};-use tinyagents_definition::{SubagentEntry};use openhuman_core::core::all::DomainGroup;use openhuman_core::core::runtime::{ContextOverlay, DomainSet};use openhuman_core::tools::toolpacks::{GroupMode, ToolGroups};+use tinyagents_definition::SubagentEntry;use super::{AgentError, AgentInner, AgentLayout, AgentSpec};use crate::harness::Access;@@ -246,10 +246,8 @@ pub(crate) fn instantiate(runtime: &Runtime, spec: AgentSpec) -> Result<AgentInn// delegates only to the sub-agents its host declares, never to the// inherited built-in roster (which would otherwise come back as// `delegate_*` tools the scope never listed).- if matches!(- definition.tools,- tinyagents_definition::ToolScope::Named(_)- ) && !definition.tools.names_a_spawn_tool()+ if matches!(definition.tools, tinyagents_definition::ToolScope::Named(_))+ && !definition.tools.names_a_spawn_tool()&& !definition.subagents.is_empty(){log::debug!(@@ -415,9 +413,7 @@ fn own_catalogue(/// Adds `tool_search` to a named belt that lacks it. A wildcard belt already/// has discovery.#[cfg(feature = "mcp")]-fn opt_named_belt_into_discovery(- scope: &mut tinyagents_definition::ToolScope,-) {+fn opt_named_belt_into_discovery(scope: &mut tinyagents_definition::ToolScope) {use tinyagents_definition::ToolScope;const TOOL_SEARCH: &str = "tool_search";if let ToolScope::Named(names) = scope {diff --git a/tests/agent_harness_e2e.rs b/tests/agent_harness_e2e.rsindex 9d01d3accf..157ffd158f 100644--- a/tests/agent_harness_e2e.rs+++ b/tests/agent_harness_e2e.rs@@ -2318,8 +2318,9 @@ async fn multi_hop_delegation_chain_inner() {mod streaming_support {use async_trait::async_trait;- use openhuman_core::agent::harness::host_definition::{AgentDefinition, AgentDefinitionRegistry};-use tinyagents_definition::{ToolScope as DefinitionToolScope};+ use openhuman_core::agent::harness::host_definition::{+ AgentDefinition, AgentDefinitionRegistry,+ };use openhuman_core::agent::OpenHumanSessionHost;use openhuman_core::config::{AgentConfig, ContextConfig};use serde_json::json;@@ -2328,6 +2329,7 @@ use tinyagents_definition::{ToolScope as DefinitionToolScope};use std::sync::atomic::{AtomicUsize, Ordering};use std::sync::{Arc, Mutex};use tempfile::TempDir;+ use tinyagents_definition::ToolScope as DefinitionToolScope;use tinyinference_llm::message::{AssistantMessage, ContentBlock};use tinyinference_llm::model::{ChatModel, ModelProfile, ModelRequest, ModelResponse, ModelStream, ModelStreamItem,diff --git a/tests/memory_v2_e2e.rs b/tests/memory_v2_e2e.rsindex 7c2600609a..e4309c5cf7 100644--- a/tests/memory_v2_e2e.rs+++ b/tests/memory_v2_e2e.rs@@ -1715,8 +1715,9 @@ async fn wait_for_request(f: &Fixture, what: &str, found: impl Fn(&str, &str) ->async fn a_later_chat_turn_carries_cached_memory_and_is_logged() {// Chat sessions resolve their hosted authority from the agent definition// registry, which the full runtime initialises at startup.- openhuman_core::agent::harness::host_definition::AgentDefinitionRegistry::init_global_builtins()- .expect("builtin agent definitions");+ openhuman_core::agent::harness::host_definition::AgentDefinitionRegistry::init_global_builtins(+ )+ .expect("builtin agent definitions");let f = Fixture::new(true).await;f.learn("The user prefers launch events in Lisbon").await;