Skip to content

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

refactor(security_gate): extract command risk classification into helpers

Steven Enamakelf95365a90e28
diff --git a/crates/openhuman-core/src/agent/tinyagents/host/security_gate.rs b/crates/openhuman-core/src/agent/tinyagents/host/security_gate.rs
index 0e806f33a9..b8b815a0f1 100644
--- a/crates/openhuman-core/src/agent/tinyagents/host/security_gate.rs
+++ b/crates/openhuman-core/src/agent/tinyagents/host/security_gate.rs
@@ -345,7 +345,16 @@ impl OpenHumanSecurityGate {
);
return GateDecision::Allow;
};
+ self.park_for_approval_on(&gate, call).await
+ }
+ /// [`Self::park_for_approval`] against an explicit gate, with this turn's
+ /// approval context.
+ pub(crate) async fn park_for_approval_on(
+ &self,
+ gate: &ApprovalGate,
+ call: &ToolCallRequest,
+ ) -> GateDecision {
let summary = summarize_action(&call.tool_name, &call.arguments);
let redacted = redact_args(&call.arguments);
tracing::debug!(