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
style: apply rustfmt formatting
Steven Enamakel40db4d1aa0c1
diff --git a/crates/openhuman-core/src/sandbox/local_grants.rs b/crates/openhuman-core/src/sandbox/local_grants.rsindex c9fb30c354..b65ba909b3 100644--- a/crates/openhuman-core/src/sandbox/local_grants.rs+++ b/crates/openhuman-core/src/sandbox/local_grants.rs@@ -25,10 +25,7 @@ pub(crate) struct JailGrants {/// The operator home a grant set may be built from. A tenant never reads the/// operator's home, so SaaS callers get none and `home` is not consulted.-pub(crate) fn grant_home(- saas: bool,- home: impl FnOnce() -> Option<PathBuf>,-) -> Option<PathBuf> {+pub(crate) fn grant_home(saas: bool, home: impl FnOnce() -> Option<PathBuf>) -> Option<PathBuf> {if saas {None} else {diff --git a/crates/openhuman-core/src/sandbox/local_grants_tests.rs b/crates/openhuman-core/src/sandbox/local_grants_tests.rsindex 53168feb8f..065656131d 100644--- a/crates/openhuman-core/src/sandbox/local_grants_tests.rs+++ b/crates/openhuman-core/src/sandbox/local_grants_tests.rs@@ -2,7 +2,9 @@ use super::*;#[test]fn saas_never_consults_the_operator_home() {- let home = grant_home(true, || panic!("a tenant must not read the operator's home"));+ let home = grant_home(true, || {+ panic!("a tenant must not read the operator's home")+ });assert!(home.is_none());}@@ -26,11 +28,17 @@ mod with_module {"/etc".into(),"/home/op/.rustup".into(),],- read_write: vec!["/home/op/.aws/sso".into(), "/home/op/.cargo/registry".into()],+ read_write: vec![+ "/home/op/.aws/sso".into(),+ "/home/op/.cargo/registry".into(),+ ],};let grants = admit_module_grants(reply, false);assert_eq!(grants.read_only, [PathBuf::from("/home/op/.rustup")]);- assert_eq!(grants.read_write, [PathBuf::from("/home/op/.cargo/registry")]);+ assert_eq!(+ grants.read_write,+ [PathBuf::from("/home/op/.cargo/registry")]+ );}#[test]diff --git a/crates/openhuman-core/src/sandbox/ops.rs b/crates/openhuman-core/src/sandbox/ops.rsindex cc353baa3b..261f3a4ebe 100644--- a/crates/openhuman-core/src/sandbox/ops.rs+++ b/crates/openhuman-core/src/sandbox/ops.rs@@ -335,8 +335,7 @@ pub async fn execute_in_sandbox(anyhow::anyhow!("Cannot read module configuration: {error}")})?,};- let policy =- super::local_grants::with_resolved_grants(&config, policy).await?;+ let policy = super::local_grants::with_resolved_grants(&config, policy).await?;super::native_jail::execute(&config,&policy,diff --git a/crates/openhuman-core/src/security/policy/mod.rs b/crates/openhuman-core/src/security/policy/mod.rsindex 0cabf7a63f..500cc64e9a 100644--- a/crates/openhuman-core/src/security/policy/mod.rs+++ b/crates/openhuman-core/src/security/policy/mod.rs@@ -8,12 +8,12 @@ mod path_checks;mod types;+pub use enforcement::validate_path_within_root;+pub use enforcement::{ensure_openhuman_scratch_dir, openhuman_scratch_dir};#[cfg(feature = "modules")]pub(crate) use path_checks::{ALWAYS_FORBIDDEN_PREFIXES, SENSITIVE_COMPONENTS, SENSITIVE_FILES, SENSITIVE_PAIRS,};-pub use enforcement::validate_path_within_root;-pub use enforcement::{ensure_openhuman_scratch_dir, openhuman_scratch_dir};pub use types::{tool_result_artifacts_dir, ActionTracker, AutonomyLevel, CommandClass, CommandRiskLevel,GateDecision, SecurityPolicy, ToolOperation, TrustedAccess, TrustedRoot, POLICY_BLOCKED_MARKER,