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
feat(saas): add require_user_signature config flag
Steven Enamakel1af2315be013
diff --git a/crates/openhuman-core/src/core/runtime/saas.rs b/crates/openhuman-core/src/core/runtime/saas.rsindex 9ffb121832..4eec2f38dd 100644--- a/crates/openhuman-core/src/core/runtime/saas.rs+++ b/crates/openhuman-core/src/core/runtime/saas.rs@@ -56,6 +56,14 @@ pub struct SaasConfig {/// Let users store their own agent definitions.#[serde(default)]pub custom_definitions: bool,+ /// Require `X-OpenHuman-User-Sig` on every request made for a user+ /// (see `user_agents::gateway`).+ #[serde(default = "default_true")]+ pub require_user_signature: bool,+}++fn default_true() -> bool {+ true}fn default_max_agents_open() -> usize {@@ -78,6 +86,7 @@ impl SaasConfig {idle_evict_secs: default_idle_evict_secs(),shared_backend_api_key: false,custom_definitions: false,+ require_user_signature: true,}}diff --git a/crates/openhuman-core/src/core/runtime/saas_tests.rs b/crates/openhuman-core/src/core/runtime/saas_tests.rsindex c0b926a021..27b2818c63 100644--- a/crates/openhuman-core/src/core/runtime/saas_tests.rs+++ b/crates/openhuman-core/src/core/runtime/saas_tests.rs@@ -28,6 +28,7 @@ max_agents_open = 8idle_evict_secs = 60shared_backend_api_key = truecustom_definitions = true+require_user_signature = false"#,).unwrap();@@ -41,6 +42,7 @@ custom_definitions = trueassert_eq!(config.max_agents_open, 8);assert_eq!(config.idle_evict_secs, 60);assert!(config.shared_backend_api_key && config.custom_definitions);+ assert!(!config.require_user_signature);}#[test]diff --git a/crates/openhuman-core/src/user_agents/host.rs b/crates/openhuman-core/src/user_agents/host.rsindex 611e03b26c..70b531e3f5 100644--- a/crates/openhuman-core/src/user_agents/host.rs+++ b/crates/openhuman-core/src/user_agents/host.rs@@ -79,6 +79,11 @@ impl AgentHost {}}+ /// The operator's settings this host runs with.+ pub fn saas(&self) -> &SaasConfig {+ &self.saas+ }+fn layout(&self, id: &UserAgentId) -> UserAgentLayout {UserAgentLayout::new(&self.saas.root, id)}diff --git a/crates/openhuman-core/src/user_agents/mod.rs b/crates/openhuman-core/src/user_agents/mod.rsindex 80b45ad4f6..791cd215cb 100644--- a/crates/openhuman-core/src/user_agents/mod.rs+++ b/crates/openhuman-core/src/user_agents/mod.rs@@ -14,6 +14,7 @@//!//! [`CoreContext`]: crate::core::runtime::CoreContext+pub mod gateway;pub mod host;pub mod layout;pub mod ops;