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
chore: files changed crates/openhuman-core/src/memory/engine.rs,crates/openhuman-core/src/memory/eng
Steven Enamakelbd6a24c8a388
diff --git a/crates/openhuman-core/src/memory/engine.rs b/crates/openhuman-core/src/memory/engine.rsindex 0297cf2809..f751f47c45 100644--- a/crates/openhuman-core/src/memory/engine.rs+++ b/crates/openhuman-core/src/memory/engine.rs@@ -34,9 +34,9 @@//! used at once and signing out turns memory off.use std::collections::HashMap;-use std::sync::{Arc, LazyLock};#[cfg(test)]use std::sync::RwLock;+use std::sync::{Arc, LazyLock};use sha2::{Digest, Sha256};use tinymemory_api::MemoryEngine;diff --git a/crates/openhuman-core/src/memory/engine_tests.rs b/crates/openhuman-core/src/memory/engine_tests.rsindex 420a6880ad..7977ef934f 100644--- a/crates/openhuman-core/src/memory/engine_tests.rs+++ b/crates/openhuman-core/src/memory/engine_tests.rs@@ -58,8 +58,14 @@ async fn assert_host_scrubbing(.map(|hit| hit.text.as_str()).expect("the corroborated host policy preserves an unqualified number");- assert!(!text.contains(SECRET), "credentials are scrubbed before store");- assert!(!text.contains(PHONE), "phone numbers are scrubbed before store");+ assert!(+ !text.contains(SECRET),+ "credentials are scrubbed before store"+ );+ assert!(+ !text.contains(PHONE),+ "phone numbers are scrubbed before store"+ );}#[tokio::test]@@ -98,7 +104,9 @@ async fn installed_host_engine_binding_uses_the_host_scrub_policy() {clear_host_engine();let _cleanup = ClearInstalledHostEngine;install_host_engine(reference.clone());- let bound = resolve(&config).engine().expect("installed host engine binds");+ let bound = resolve(&config)+ .engine()+ .expect("installed host engine binds");assert_host_scrubbing(bound, &reference).await;println!("{CHILD_MARKER}");}@@ -446,7 +454,8 @@ fn an_installed_engine_has_one_layout_unless_one_is_installed_per_root() {#[test]fn a_root_sets_the_scope_root_its_owner_and_the_cache_key() {// CortexDB's own API: `org:<id>` is the root, owned by the actor.- let (settings, key) = EngineBinder::rooted(EngineSettings::default(), Some("org:42"), false, false);+ let (settings, key) =+ EngineBinder::rooted(EngineSettings::default(), Some("org:42"), false, false);assert_eq!(settings.scope_root.as_deref(), Some("org:42"));assert_eq!(settings.scope_owner.as_deref(), Some("user:42"));assert!(!settings.tenant_root);@@ -461,16 +470,19 @@ fn a_root_sets_the_scope_root_its_owner_and_the_cache_key() {#[test]fn the_hosted_wire_sends_no_root_and_legacy_read_names_the_user_segment() {// TinyHumans: the backend pins `org:<id>`; no root, no `user:` segment.- let (settings, key) = EngineBinder::rooted(EngineSettings::default(), Some("org:42"), true, false);+ let (settings, key) =+ EngineBinder::rooted(EngineSettings::default(), Some("org:42"), true, false);assert!(settings.tenant_root);assert_eq!(settings.scope_root, None);assert_eq!(settings.scope_owner, None);assert_eq!(settings.retired_scope_root, None);// During the move, the earlier `user:<id>` root is read and forgotten.- let (settings, read_too) = EngineBinder::rooted(EngineSettings::default(), Some("org:42"), true, true);+ let (settings, read_too) =+ EngineBinder::rooted(EngineSettings::default(), Some("org:42"), true, true);assert_eq!(settings.retired_scope_root.as_deref(), Some("user:42"));assert_ne!(key, read_too, "the flag rebuilds the engine");- let (settings, _) = EngineBinder::rooted(EngineSettings::default(), Some("org:42"), false, true);+ let (settings, _) =+ EngineBinder::rooted(EngineSettings::default(), Some("org:42"), false, true);assert_eq!(settings.retired_scope_root.as_deref(), Some("user:42"));}diff --git a/crates/openhuman-core/src/memory/mod.rs b/crates/openhuman-core/src/memory/mod.rsindex 0b4b1acf12..163db06df0 100644--- a/crates/openhuman-core/src/memory/mod.rs+++ b/crates/openhuman-core/src/memory/mod.rs@@ -32,7 +32,7 @@ mod guard {use std::sync::Arc;use tinymemory_api::{MemoryEngine, StoreItem};- use tinymemory_integrations::safety::{Policy, scrub_item_with};+ use tinymemory_integrations::safety::{scrub_item_with, Policy};use tinymemory_integrations::EngineBinder;fn wrap(engine: Arc<dyn MemoryEngine>) -> Arc<dyn MemoryEngine> {diff --git a/crates/openhuman-tinyhumans/src/transport/memory_bearer_tests.rs b/crates/openhuman-tinyhumans/src/transport/memory_bearer_tests.rsindex 85b673b74c..ecc51f264d 100644--- a/crates/openhuman-tinyhumans/src/transport/memory_bearer_tests.rs+++ b/crates/openhuman-tinyhumans/src/transport/memory_bearer_tests.rs@@ -43,6 +43,8 @@ async fn memory_bearer_rejects_the_host_local_session() {assert!(matches!(source.bearer().await,- Err(openhuman_embed::__host::memory::MemoryError::Unauthorized(_))+ Err(openhuman_embed::__host::memory::MemoryError::Unauthorized(+ _+ ))));}diff --git a/crates/openhuman-tinyhumans/src/transport/mod.rs b/crates/openhuman-tinyhumans/src/transport/mod.rsindex 84a338783c..cd9806816e 100644--- a/crates/openhuman-tinyhumans/src/transport/mod.rs+++ b/crates/openhuman-tinyhumans/src/transport/mod.rs@@ -122,10 +122,7 @@ impl BackendTransport for SdkBackendTransport {.map_err(|error| map_sdk_error(error, &Method::POST, req.path))}- fn memory_bearer_source(- &self,- config: Arc<Config>,- ) -> Option<Arc<dyn BearerSource>> {+ fn memory_bearer_source(&self, config: Arc<Config>) -> Option<Arc<dyn BearerSource>> {Some(Arc::new(CallbackBearerSource::new(move || {let config = Arc::clone(&config);async move {