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(core): clean up factory and triage logic
Steven Enamakelc01d3c019b43
diff --git a/crates/openhuman-core/src/agent/session_host/builder/factory.rs b/crates/openhuman-core/src/agent/session_host/builder/factory.rsindex c84c1744fd..7faad54deb 100644--- a/crates/openhuman-core/src/agent/session_host/builder/factory.rs+++ b/crates/openhuman-core/src/agent/session_host/builder/factory.rs@@ -864,5 +864,3 @@ pub(super) fn resolve_target_definition(agent_id))}--use super::factory_resolution::provider_role_for_definition;diff --git a/crates/openhuman-core/src/agent/session_host/builder/factory_resolution.rs b/crates/openhuman-core/src/agent/session_host/builder/factory_resolution.rsindex 5fd8fcee43..df0e2e6cf6 100644--- a/crates/openhuman-core/src/agent/session_host/builder/factory_resolution.rs+++ b/crates/openhuman-core/src/agent/session_host/builder/factory_resolution.rs@@ -41,10 +41,6 @@ pub(crate) fn provider_role_for_definition(provider_role_for(master_hint.as_deref().or(default_model))}-#[cfg(test)]-#[path = "factory_resolution_tests.rs"]-mod tests;-/// Resolve the model source, workload role, and native-tool capability for a session.////// Session construction and triage direct turns share the same resolved source when one@@ -100,3 +96,7 @@ pub(crate) fn resolve_session_model(}Ok((provider_role, model_name, supports_native))}++#[cfg(test)]+#[path = "factory_resolution_tests.rs"]+mod tests;diff --git a/crates/openhuman-core/src/inference/host_runtime/ops/agent_chat.rs b/crates/openhuman-core/src/inference/host_runtime/ops/agent_chat.rsindex 0c5e383d83..595b7ee27d 100644--- a/crates/openhuman-core/src/inference/host_runtime/ops/agent_chat.rs+++ b/crates/openhuman-core/src/inference/host_runtime/ops/agent_chat.rs@@ -354,7 +354,7 @@ pub fn agent_chat_for<'a>(route: Option<crate::config::schema::EphemeralRoute>,env: AgentChatEnv,) -> futures::future::BoxFuture<'a, Result<Outcome<String>, String>> {- Box::pin(async {+ Box::pin(async move {agent_chat_reply_for_inner(config,target,diff --git a/crates/openhuman-core/src/triage/escalation.rs b/crates/openhuman-core/src/triage/escalation.rsindex 9c5f58d3fa..49f28f6850 100644--- a/crates/openhuman-core/src/triage/escalation.rs+++ b/crates/openhuman-core/src/triage/escalation.rs@@ -302,7 +302,7 @@ async fn dispatch_target_agent(host: parent_ctx.host_env.clone(),..Default::default()},- Some((turn_model_source, model)),+ (turn_model_source, model),).await.map_err(|e| anyhow!("agent_chat_for({agent_id}) failed: {e}"))?;diff --git a/crates/openhuman-core/src/triage/escalation_model_tests.rs b/crates/openhuman-core/src/triage/escalation_model_tests.rsindex 4eaf5336f4..244bcd26ae 100644--- a/crates/openhuman-core/src/triage/escalation_model_tests.rs+++ b/crates/openhuman-core/src/triage/escalation_model_tests.rs@@ -280,7 +280,7 @@ async fn direct_turn_model_source_metadata_probe_does_not_duplicate_egress_disclNone,None,crate::inference::host_runtime::ops::AgentChatEnv::default(),- Some((source, model_marker.to_string())),+ (source, model_marker.to_string()),),),)