Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

chore: files changed crates/openhuman-core/src/agent/tinyagents/host/run_context.rs,crates/openhuman

Steven Enamakel7ea5c776d707
diff --git a/crates/openhuman-core/src/agent/tinyagents/host/run_context.rs b/crates/openhuman-core/src/agent/tinyagents/host/run_context.rs
index 5c957fb5d1..8463b4c436 100644
--- a/crates/openhuman-core/src/agent/tinyagents/host/run_context.rs
+++ b/crates/openhuman-core/src/agent/tinyagents/host/run_context.rs
@@ -593,10 +593,7 @@ impl OpenHumanRunContext {
}
self.turn_deadline = env.turn_deadline.or(self.turn_deadline);
self.tool_call_limit = env.tool_call_limit.or(self.tool_call_limit);
- self.command_environment = env
- .command_environment
- .clone()
- .or(self.command_environment);
+ self.command_environment = env.command_environment.clone().or(self.command_environment);
self.memory_identity = env.memory_identity.clone().or(self.memory_identity);
self.core = env.core.clone().or(self.core);
self.stop_hooks
diff --git a/crates/openhuman-core/src/tools/impl/system/shell.rs b/crates/openhuman-core/src/tools/impl/system/shell.rs
index 76539b158c..12beb61841 100644
--- a/crates/openhuman-core/src/tools/impl/system/shell.rs
+++ b/crates/openhuman-core/src/tools/impl/system/shell.rs
@@ -715,10 +715,8 @@ impl ShellTool {
"[shell] routing to sandbox backend"
);
- let mut extra_env = std::collections::HashMap::<
- std::ffi::OsString,
- std::ffi::OsString,
- >::new();
+ let mut extra_env =
+ std::collections::HashMap::<std::ffi::OsString, std::ffi::OsString>::new();
if let Some(overrides) = command_environment {
extra_env.extend(overrides.iter().map(|(name, value)| {
(
diff --git a/crates/openhuman-core/src/tools/impl/system/shell_support.rs b/crates/openhuman-core/src/tools/impl/system/shell_support.rs
index 750e0537a2..699a12c1e9 100644
--- a/crates/openhuman-core/src/tools/impl/system/shell_support.rs
+++ b/crates/openhuman-core/src/tools/impl/system/shell_support.rs
@@ -83,7 +83,11 @@ pub(super) fn container_environment(
) -> Option<std::collections::BTreeMap<String, String>> {
let mut env = std::collections::BTreeMap::new();
if let Some(explicit) = explicit {
- env.extend(explicit.iter().map(|(name, value)| (name.clone(), value.clone())));
+ env.extend(
+ explicit
+ .iter()
+ .map(|(name, value)| (name.clone(), value.clone())),
+ );
}
let inherited = if explicit.is_none() {
crate::sandbox::ops::SANDBOX_ENV_PASSTHROUGH
@@ -100,7 +104,8 @@ pub(super) fn container_environment(
explicit
.and_then(|overrides| overrides.get(name).map(std::ffi::OsString::from))
.or_else(|| {
- explicit.is_none()
+ explicit
+ .is_none()
.then(|| tinytools_std::timeout::CommandEnvironment::var_os(name))
.flatten()
})
diff --git a/crates/openhuman-embed/tests/attached_tools.rs b/crates/openhuman-embed/tests/attached_tools.rs
index 19c7b6b6b4..e51c94d8dd 100644
--- a/crates/openhuman-embed/tests/attached_tools.rs
+++ b/crates/openhuman-embed/tests/attached_tools.rs
@@ -1,10 +1,10 @@
mod common;
use common::{chat_completion, chat_requests, offline_config, runtime, stub_backend};
+use openhuman_embed::session_store::SessionRef;
use openhuman_embed::{
AgentDefinitionSpec, AgentSpec, HostTools, HostTurnTools, InMemorySessionStores, Provider,
Runtime, SessionStoreProvider, Tool, ToolScopeSpec, Workspace,
};
-use openhuman_embed::session_store::SessionRef;
use std::sync::Arc;
use wiremock::matchers::{method, path};
use wiremock::{Mock, ResponseTemplate};
diff --git a/crates/openhuman-embed/tests/completion_routing.rs b/crates/openhuman-embed/tests/completion_routing.rs
index 67cdce377e..254562aeb1 100644
--- a/crates/openhuman-embed/tests/completion_routing.rs
+++ b/crates/openhuman-embed/tests/completion_routing.rs
@@ -267,10 +267,7 @@ async fn uppercase_max_tokens_retries_the_same_rung_and_counts_buyer_charges() {
.await
.unwrap();
assert_eq!(outcome.attempts.len(), 2);
- assert_eq!(
- outcome.attempts[0].finish_reason.as_deref(),
- Some("length")
- );
+ assert_eq!(outcome.attempts[0].finish_reason.as_deref(), Some("length"));
assert_eq!(outcome.attempts[1].max_tokens, Some(32));
assert_eq!(outcome.response.usage.unwrap().cost_usd, Some(0.000004));
assert!((outcome.total_usage.unwrap().cost_usd.unwrap() - 0.000007).abs() < 1e-12);
diff --git a/crates/openhuman-embed/tests/tool_hook_context.rs b/crates/openhuman-embed/tests/tool_hook_context.rs
index aecf894206..9604980ec6 100644
--- a/crates/openhuman-embed/tests/tool_hook_context.rs
+++ b/crates/openhuman-embed/tests/tool_hook_context.rs
@@ -85,10 +85,11 @@ async fn scenario() {
.unwrap();
let observed = observed.lock().unwrap();
assert_eq!(observed.len(), 4);
- assert!(observed[1]["output"]
- .as_str()
- .unwrap()
- .contains("owner=isolated"),
+ assert!(
+ observed[1]["output"]
+ .as_str()
+ .unwrap()
+ .contains("owner=isolated"),
"unexpected shell output: {}",
observed[1]["output"]
);