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(session_host): flatten factory module paths
Steven Enamakele49f034b2065
diff --git a/crates/openhuman-core/src/agent/session_host/builder/factory/build_helpers.rs b/crates/openhuman-core/src/agent/session_host/builder/factory/build_helpers.rsindex b554a2c550..85cbdfae49 100644--- a/crates/openhuman-core/src/agent/session_host/builder/factory/build_helpers.rs+++ b/crates/openhuman-core/src/agent/session_host/builder/factory/build_helpers.rs@@ -122,7 +122,7 @@ pub(super) fn effective_agent_config(// while definitions still take precedence over the global default.let mut effective_agent_config = config.agent.clone();let effective_cap =- super::iteration_cap::resolve_max_tool_iterations(&config.agent, target_def);+ super::super::super::iteration_cap::resolve_max_tool_iterations(&config.agent, target_def);if let Some(def) = target_def {log::info!("[agent::builder] resolved iteration cap for agent_id={}: \@@ -153,7 +153,7 @@ pub(super) fn payload_summarizer(agent_id: &str,config: &Config,) -> Option<std::sync::Arc<crate::agent::tinyagents::payload_summarizer::DynPayloadSummarizer>> {- if !host_only && super::super::summarizes_tool_output(agent_id, config) {+ if !host_only && super::super::super::summarizes_tool_output(agent_id, config) {match crate::agent_registry::host_definition::AgentDefinitionRegistry::current() {Some(reg) => match reg.get("summarizer") {Some(summarizer_def) => {diff --git a/crates/openhuman-core/src/agent/session_host/builder/factory/build_session.rs b/crates/openhuman-core/src/agent/session_host/builder/factory/build_session.rsindex b641f6cf04..57da5e44c6 100644--- a/crates/openhuman-core/src/agent/session_host/builder/factory/build_session.rs+++ b/crates/openhuman-core/src/agent/session_host/builder/factory/build_session.rs@@ -11,7 +11,7 @@ impl OpenHumanSessionHost {agent_id: &str,target_def: Option<&crate::agent_registry::host_definition::AgentDefinition>,host_only: bool,- host: Option<&super::HostTools>,+ host: Option<&super::super::HostTools>,session_id: Option<&str>,turn_model_source: Option<(crate::agent::tinyagents::TurnModelSource, String)>,) -> Result<Self> {@@ -85,7 +85,7 @@ impl OpenHumanSessionHost {}let (provider_role, model_name, supports_native) =- super::factory_resolution::resolve_session_model(+ super::super::factory_resolution::resolve_session_model(ctx,config,agent_id,@@ -181,7 +181,7 @@ impl OpenHumanSessionHost {crate::agent_registry::host_definition::AgentDefinitionRegistry::current(),) {// Host-only: no delegation; the host's names join an empty belt.- _ if host_only => (Vec::new(), Some(super::host_policy::empty_belt())),+ _ if host_only => (Vec::new(), Some(super::super::host_policy::empty_belt())),(Some(def), Some(_reg)) => {let synthed = if should_synthesize_delegation_tools(def) {crate::integrations::composio::orchestrator_actions::collect_orchestrator_tools(@@ -331,7 +331,7 @@ impl OpenHumanSessionHost {// A summary names the tool in its footer too, and summaries run with// the router off, so either one makes the tool necessary.if !host_only {- super::ensure_tinyjuice_tools_visible(&mut visible, agent_id, config);+ super::super::ensure_tinyjuice_tools_visible(&mut visible, agent_id, config);}if let Some(def) = target_def {@@ -395,7 +395,7 @@ impl OpenHumanSessionHost {// so the crate-native streaming path is exercised end-to-end.//let effective_agent_config = helpers::effective_agent_config(config, target_def, agent_id);- let merged_host_tools = super::host_tools::merge_for_turn(+ let merged_host_tools = super::super::host_tools::merge_for_turn(ctx,host,agent_id,@@ -403,9 +403,10 @@ impl OpenHumanSessionHost {&mut tools,&mut visible,)?;- let session_definition = super::host_tools::scope_def(target_def, &merged_host_tools);+ let session_definition =+ super::super::host_tools::scope_def(target_def, &merged_host_tools);let host_policy =- super::host_policy::session_policy(host_only, &tools, merged_host_tools.policy);+ super::super::host_policy::session_policy(host_only, &tools, merged_host_tools.policy);let withheld_tool_names = merged_host_tools.withheld;let mut builder = OpenHumanSessionHost::builder().tools(tools)@@ -416,7 +417,7 @@ impl OpenHumanSessionHost {.permanent_tool_names(merged_host_tools.permanent).deferred_tools(target_def.map_or_else(Vec::new, |d| d.deferred_tools.clone())).tool_dispatcher(tool_dispatcher)- .prompt_builder(prompt_builder)+ .prompt_builder(prompt_builder?).config(effective_agent_config).context_config(config.context.clone()).model_name(model_name)@@ -458,7 +459,7 @@ impl OpenHumanSessionHost {definitions,security_policy: security,session_definition: session_definition.clone().map(|definition| {- Arc::new(super::host_tools::add_permanent_tools(+ Arc::new(super::super::host_tools::add_permanent_tools(definition,&agent.permanent_tool_names,))diff --git a/crates/openhuman-core/src/agent/session_host/driver/execute.rs b/crates/openhuman-core/src/agent/session_host/driver/execute.rsindex 5caebca360..9d50084cea 100644--- a/crates/openhuman-core/src/agent/session_host/driver/execute.rs+++ b/crates/openhuman-core/src/agent/session_host/driver/execute.rs@@ -251,10 +251,10 @@ impl SessionDriver<OpenHumanRunContext> for OpenHumanSessionDriver {if outcome.text.trim().is_empty()&& output.starts_with("I finished this turn without writing up a result."){- let results = super::product_copy::close_results(&outcome.tool_outcomes);- let rendered = super::product_copy::render_close_results(&results, 4_000);+ let results = super::super::product_copy::close_results(&outcome.tool_outcomes);+ let rendered = super::super::product_copy::render_close_results(&results, 4_000);output = tinyagents_harness::close::checkpoint_with_copy(- &super::product_copy::OPENHUMAN_CLOSE_COPY,+ &super::super::product_copy::OPENHUMAN_CLOSE_COPY,self.max_iterations,&rendered,!results.is_empty(),diff --git a/crates/openhuman-core/src/agent/tinyagents/turn_exec/drive.rs b/crates/openhuman-core/src/agent/tinyagents/turn_exec/drive.rsindex 16fe0b066e..dce40fdbcb 100644--- a/crates/openhuman-core/src/agent/tinyagents/turn_exec/drive.rs+++ b/crates/openhuman-core/src/agent/tinyagents/turn_exec/drive.rs@@ -152,7 +152,7 @@ pub(super) async fn drive_turn(}).with_max_model_calls(max_iterations).with_max_tool_calls(run_context.tool_call_limit_for(max_iterations))- .with_max_depth(super::budget::depth(&run_context))+ .with_max_depth(super::super::budget::depth(&run_context)).with_tag("openhuman").with_tag(if on_progress.is_some() {"observed"@@ -463,8 +463,8 @@ pub(super) async fn drive_turn(if let Some(scope) = run_context.response_shape.clone() {tinyagents_harness::middleware::install_response_shape(&mut prepared.harness, scope);}- super::budget::install_depth(&mut prepared.harness, &run_context);- super::deadline_wind_down::install(+ super::super::budget::install_depth(&mut prepared.harness, &run_context);+ super::super::deadline_wind_down::install(&mut prepared.harness,&Some(steering.clone()),&run_context,@@ -549,7 +549,7 @@ pub(super) async fn drive_turn(streaming,"[tinyagents] hosted root turn failed; keeping the typed kind");- super::hosted_error::run_error_from_hosted(error)+ super::super::hosted_error::run_error_from_hosted(error)});// Stop forwarding and deregister now: the poll loop must not deliver// into the no-longer-drained handle during post-run journal/mapping