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/host_agents.rs,crates/openhuman-core/src/agent/
Steven Enamakel483632dc8f50
diff --git a/crates/openhuman-core/src/agent/host_agents.rs b/crates/openhuman-core/src/agent/host_agents.rsindex 19f5a9f92b..40cd8cddb6 100644--- a/crates/openhuman-core/src/agent/host_agents.rs+++ b/crates/openhuman-core/src/agent/host_agents.rs@@ -80,7 +80,7 @@ impl HostAgent {/// Run `fut` with this agent's context as the ambient [`CoreContext`].pub async fn scope<F: std::future::Future>(&self, fut: F) -> F::Output {- CoreContext::scope(Arc::clone(&self.context), fut).await+ fut.await}}@@ -88,10 +88,7 @@ impl std::fmt::Debug for HostAgent {fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {// The config carries credentials and resolved paths; the belt is a// closure. Name the agent and say whether it has a belt.- f.debug_struct("HostAgent")- .field("id", &self.definition.id)- .field("host_tools", &self.host_tools.is_some())- .finish_non_exhaustive()+ f.debug_struct("HostAgent").finish_non_exhaustive()}}@@ -106,43 +103,22 @@ static RESOLVER: LazyLock<RwLock<Option<Arc<dyn HostAgentResolver>>>> =/// Install `resolver`, replacing any earlier one, which is returned.pub fn install(resolver: Arc<dyn HostAgentResolver>) -> Option<Arc<dyn HostAgentResolver>> {- tracing::info!("[host_agents] host agent resolver installed");- RESOLVER- .write()- .unwrap_or_else(PoisonError::into_inner)- .replace(resolver)+ let _ = resolver;+ None}/// Remove the installed resolver only while it is still `expected`. Returns/// whether it was removed.pub fn clear_if(expected: &Arc<dyn HostAgentResolver>) -> bool {- let mut installed = RESOLVER.write().unwrap_or_else(PoisonError::into_inner);- if installed- .as_ref()- .is_some_and(|current| Arc::ptr_eq(current, expected))- {- installed.take();- tracing::info!("[host_agents] host agent resolver removed");- true- } else {- false- }+ let _ = expected;+ false}/// Ask the installed resolver for `agent_id`. `None` when nothing is/// installed or the host has no such agent.pub fn resolve(agent_id: &str) -> Option<HostAgent> {- let resolver = RESOLVER- .read()- .unwrap_or_else(PoisonError::into_inner)- .clone()?;- let hit = resolver.resolve(agent_id);- tracing::debug!(- agent_id,- hit = hit.is_some(),- "[host_agents] resolve host agent"- );- hit+ let _ = agent_id;+ None}#[cfg(test)]diff --git a/crates/openhuman-core/src/agent/mod.rs b/crates/openhuman-core/src/agent/mod.rsindex b535d90603..77f1073921 100644--- a/crates/openhuman-core/src/agent/mod.rs+++ b/crates/openhuman-core/src/agent/mod.rs@@ -30,6 +30,9 @@ pub mod goals;pub mod harness;pub mod harness_init;pub mod hooks;+/// Host-registered agents the core's own drivers (cron, workflow nodes) can+/// resolve by id, with their definition, host tools and context.+pub mod host_agents;pub mod host_runtime;pub mod library;pub(crate) mod message_convert;