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/core/runtime/context_overlay.rs

Steven Enamakela0d8c9ef5b91
diff --git a/crates/openhuman-core/src/core/runtime/context_overlay.rs b/crates/openhuman-core/src/core/runtime/context_overlay.rs
index dbac553b42..87762c7daf 100644
--- a/crates/openhuman-core/src/core/runtime/context_overlay.rs
+++ b/crates/openhuman-core/src/core/runtime/context_overlay.rs
@@ -140,3 +140,17 @@ impl ContextOverlay {
self
}
}
+
+pub(super) fn stricter_autonomy_ceiling(
+ left: Option<crate::security::AutonomyLevel>,
+ right: Option<crate::security::AutonomyLevel>,
+) -> Option<crate::security::AutonomyLevel> {
+ use crate::security::AutonomyLevel::{Full, ReadOnly, Supervised};
+
+ match (left, right) {
+ (None, ceiling) | (ceiling, None) => ceiling,
+ (Some(ReadOnly), _) | (_, Some(ReadOnly)) => Some(ReadOnly),
+ (Some(Supervised), _) | (_, Some(Supervised)) => Some(Supervised),
+ (Some(Full), Some(Full)) => Some(Full),
+ }
+}