Skip to content

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

refactor: simplify negated boolean conditions

Steven Enamakel968d1eb755b1
diff --git a/crates/openhuman-core/src/agent/tinyagents/mod.rs b/crates/openhuman-core/src/agent/tinyagents/mod.rs
index ba474b0254..754e4d2610 100644
--- a/crates/openhuman-core/src/agent/tinyagents/mod.rs
+++ b/crates/openhuman-core/src/agent/tinyagents/mod.rs
@@ -90,10 +90,10 @@ pub(crate) use turn_outcome::{
HaltSummarySlot, TinyagentsTurnOutcome, ToolCallOutcome, ToolOutcomeSink,
};
#[cfg(test)]
-pub(crate) use turn_policy::is_subagent_spawn_or_delegate_tool;
+pub(crate) use turn_policy::{agent_turn_wall_clock_ms, is_subagent_spawn_or_delegate_tool};
pub(crate) use turn_policy::{
- agent_turn_wall_clock_ms, agent_turn_wall_clock_ms_for, chat_provider_is_local,
- local_web_turn_backstop_secs, ToolPolicyEnforcement,
+ agent_turn_wall_clock_ms_for, chat_provider_is_local, local_web_turn_backstop_secs,
+ ToolPolicyEnforcement,
};
pub(crate) use turn_runner::{run_root_turn_via_hosted_agent, run_turn_via_tinyagents_shared};
diff --git a/crates/openhuman-core/src/web3/x402/seams.rs b/crates/openhuman-core/src/web3/x402/seams.rs
index 26c309e9d7..0389b56f4d 100644
--- a/crates/openhuman-core/src/web3/x402/seams.rs
+++ b/crates/openhuman-core/src/web3/x402/seams.rs
@@ -284,9 +284,9 @@ fn direct_connection_allowed(
"https_proxy",
"all_proxy",
];
- !(config.enabled && config.scope == crate::config::ProxyScope::Environment)
- && !config.should_apply_to_service(service)
- && !PROXY_ENV_KEYS.iter().any(|key| env_has_value(key))
+ !((config.enabled && config.scope == crate::config::ProxyScope::Environment)
+ || config.should_apply_to_service(service)
+ || PROXY_ENV_KEYS.iter().any(|key| env_has_value(key)))
}
/// The crypto rail's payment builder, over OpenHuman's wallet and transport.