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
fix(memory): scope host engine and filters to the tenant in SaaS
Steven Enamakeld96445517083
diff --git a/crates/openhuman-core/src/memory/engine.rs b/crates/openhuman-core/src/memory/engine.rsindex e9369fddf3..933d6a2fb3 100644--- a/crates/openhuman-core/src/memory/engine.rs+++ b/crates/openhuman-core/src/memory/engine.rs@@ -176,7 +176,12 @@ pub fn resolve(config: &Config) -> Binding {}}if let Some(bound) = host_engine() {- return Binding::On(bound);+ // A host engine is one store for the whole process: in SaaS it would+ // put every user in one engine, so it is ignored there.+ if !crate::core::runtime::is_saas() {+ return Binding::On(bound);+ }+ tracing::warn!("[memory:engine] ignoring the host engine in SaaS mode");}let engine_id = config.memory.engine.trim().to_string();match engine_id.as_str() {diff --git a/crates/openhuman-core/src/memory/explore.rs b/crates/openhuman-core/src/memory/explore.rsindex 3a142a8304..91d3f5e95c 100644--- a/crates/openhuman-core/src/memory/explore.rs+++ b/crates/openhuman-core/src/memory/explore.rs@@ -94,7 +94,7 @@ pub fn narrowed(filter: Option<MetaFilter>, path: &[PathStep]) -> MemoryResult<Mpub async fn explore(config: &Config, params: ExploreParams) -> MemoryResult<ExplorePage> {let bound = engine::resolve(config).engine()?;let mut request = ExploreRequest::new(params.facet, params.limit.unwrap_or(DEFAULT_BUCKETS));- request.filter = narrowed(params.filter, ¶ms.path)?;+ request.filter = super::ops::confine_filter(config, narrowed(params.filter, ¶ms.path)?);if let Some(scan_limit) = params.scan_limit {request.scan_limit = scan_limit;}diff --git a/crates/openhuman-core/src/memory/ops.rs b/crates/openhuman-core/src/memory/ops.rsindex 239acd7b00..296476e1a1 100644--- a/crates/openhuman-core/src/memory/ops.rs+++ b/crates/openhuman-core/src/memory/ops.rs@@ -183,7 +183,7 @@ pub async fn fetch(config: &Config, params: FetchParams) -> MemoryResult<FetchVilet request = FetchRequest {query: params.query,mode,- filter: params.filter.unwrap_or_default(),+ filter: confine_filter(config, params.filter.unwrap_or_default()),limit: clamp_limit(params.limit),cursor: params.cursor,beliefs: 0,