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/brain.rs,crates/openhuman-core/src/memory/brai
Steven Enamakel8c1d8f62bb7e
diff --git a/crates/openhuman-core/src/memory/brain.rs b/crates/openhuman-core/src/memory/brain.rsindex f9b0367d49..d6ba64d3fb 100644--- a/crates/openhuman-core/src/memory/brain.rs+++ b/crates/openhuman-core/src/memory/brain.rs@@ -12,9 +12,10 @@use serde::{Deserialize, Serialize};use tinymemory_api::{Error, Hit, Namespace, StoreItem, WriteOptions};+use tinymemory_integrations::brain::MAX_INGEST_BYTES;use tinymemory_integrations::documents::RawDocument;use tinymemory_tools::layout::placement::{brain_node_with, files_source};-use tinymemory_tools::{Brain, BrainSource, MemoryLayout};+use tinymemory_tools::{Brain, BrainSource, BrainSourcesView, MemoryLayout};use crate::config::Config;use crate::config::schema::MemorySourceKind;@@ -23,11 +24,6 @@ use super::engine;use super::lifecycle::jobs;use tinymemory_api::Result;-pub use tinymemory_tools::{BrainSourceCount, BrainSourcesView};--/// Largest file `memory_brain_ingest` reads, in bytes.-pub const MAX_INGEST_BYTES: u64 = tinymemory_integrations::brain::MAX_INGEST_BYTES;-/// The brain source a synced item belongs to: the connector it came from,/// so removing it erases one source. GitHub to `github`, links and feeds to/// `web`, and local files, whatever their format, to `files`.diff --git a/crates/openhuman-core/src/memory/brain_tests.rs b/crates/openhuman-core/src/memory/brain_tests.rsindex 3ee4fb5062..d65760fecb 100644--- a/crates/openhuman-core/src/memory/brain_tests.rs+++ b/crates/openhuman-core/src/memory/brain_tests.rs@@ -3,6 +3,7 @@ use super::*;use tinymemory_tools::layout::placement::file_into;use tinymemory_api::{ItemKind, MemoryMeta, MetaFilter};+use tinymemory_integrations::brain::MAX_INGEST_BYTES;use crate::memory::test_fixtures::{bind_reference, config_in, stored};diff --git a/crates/openhuman-core/src/memory/sources/mod.rs b/crates/openhuman-core/src/memory/sources/mod.rsindex 817c83ac0b..07950f6fec 100644--- a/crates/openhuman-core/src/memory/sources/mod.rs+++ b/crates/openhuman-core/src/memory/sources/mod.rs@@ -11,6 +11,7 @@ pub mod state;mod sync;use tinymemory_integrations::sources::{Error as SourceError, SourceSpec};+use tinymemory_integrations::sources::SourceState;use tinymemory_tools::ops::MemoryOps;use crate::config::Config;@@ -34,7 +35,7 @@ fn source_spec_error(error: SourceError) -> Error {/// The view of `source` with its sync state.#[must_use]-pub fn view(source: &MemorySourceConfig, state: Option<&state::SourceState>) -> SourceView {+pub fn view(source: &MemorySourceConfig, state: Option<&SourceState>) -> SourceView {let state = state.cloned().unwrap_or_default();SourceView {id: source.id.clone(),diff --git a/crates/openhuman-core/src/memory/sources/mod_tests.rs b/crates/openhuman-core/src/memory/sources/mod_tests.rsindex c8e66e3af4..84af5ccc5b 100644--- a/crates/openhuman-core/src/memory/sources/mod_tests.rs+++ b/crates/openhuman-core/src/memory/sources/mod_tests.rs@@ -1,7 +1,7 @@use super::*;use crate::memory::test_fixtures::{bind_reference, config_in, stored};-use crate::memory::types::SourceStatus;use chrono::Utc;+use tinymemory_integrations::sources::{SourceState, SourceStatus};use tinymemory_api::{DocumentBody, MemoryMeta, SourceKind, SourceRef, StoreItem};fn add_params(kind: &str, target: &str) -> SourcesAddParams {@@ -216,7 +216,7 @@ fn the_removed_composio_kind_is_rejected_and_every_other_kind_is_accepted() {#[test]fn view_overlays_the_sync_state() {let src = source("src-1", Some(30));- let state = state::SourceState {+ let state = SourceState {last_sync_at: Some(Utc::now()),status: SourceStatus::Error,error: Some("boom".into()),diff --git a/crates/openhuman-core/src/memory/sources/state.rs b/crates/openhuman-core/src/memory/sources/state.rsindex a26d723645..29046fdacd 100644--- a/crates/openhuman-core/src/memory/sources/state.rs+++ b/crates/openhuman-core/src/memory/sources/state.rs@@ -9,7 +9,7 @@ use std::collections::BTreeMap;use std::path::{Path, PathBuf};use std::sync::{LazyLock, Mutex};-pub use tinymemory_integrations::sources::{SourceState, SourceStatus};+use tinymemory_integrations::sources::{SourceState, SourceStatus};/// Serialises state-file read-modify-writes in this process.static LOCK: LazyLock<Mutex<()>> = LazyLock::new(|| Mutex::new(()));diff --git a/crates/openhuman-core/src/memory/sources/state_tests.rs b/crates/openhuman-core/src/memory/sources/state_tests.rsindex 6f6f458060..fab1ef3af4 100644--- a/crates/openhuman-core/src/memory/sources/state_tests.rs+++ b/crates/openhuman-core/src/memory/sources/state_tests.rs@@ -1,4 +1,5 @@use super::*;+use tinymemory_integrations::sources::SourceStatus;#[test]fn corrupt_source_state_file_is_set_aside() {diff --git a/crates/openhuman-core/src/memory/sources/sync.rs b/crates/openhuman-core/src/memory/sources/sync.rsindex b3d05d1cd0..453abb1e4a 100644--- a/crates/openhuman-core/src/memory/sources/sync.rs+++ b/crates/openhuman-core/src/memory/sources/sync.rs@@ -16,11 +16,11 @@ use tinymemory_integrations::sources::sync::{self as module, RegisteredSource, SourceRegistry, SyncError, SyncState, SyncStatus, SyncUpdate,Syncer,};+use tinymemory_integrations::sources::SourceStatus;use crate::config::Config;use crate::config::schema::{MemorySourceConfig, MemorySourceKind};use crate::memory::engine;-use crate::memory::types::SourceStatus;use tinymemory_api::{Error, Result};use super::state;diff --git a/crates/openhuman-core/src/memory/sources/sync_tests.rs b/crates/openhuman-core/src/memory/sources/sync_tests.rsindex 24d8b46b46..224ea73f11 100644--- a/crates/openhuman-core/src/memory/sources/sync_tests.rs+++ b/crates/openhuman-core/src/memory/sources/sync_tests.rs@@ -1,6 +1,7 @@use super::*;use crate::memory::sources::state;use crate::memory::test_fixtures::{bind_reference, config_in, stored};+use tinymemory_integrations::sources::{SourceState, SourceStatus};use tinymemory_api::{ItemKind, MetaFilter};fn folder_source(id: &str, dir: &std::path::Path, mins: Option<u32>) -> MemorySourceConfig {@@ -28,7 +29,7 @@ fn notes(config: &Config, n: usize) -> PathBuf {dir}-async fn wait_for_idle(config: &Config, id: &str) -> state::SourceState {+async fn wait_for_idle(config: &Config, id: &str) -> SourceState {for _ in 0..400 {if let Some(state) = state::load(&config.workspace_dir).get(id) {if state.status != SourceStatus::Syncing {diff --git a/crates/openhuman-core/src/memory/types.rs b/crates/openhuman-core/src/memory/types.rsindex e01c304bf7..e3dc4f7734 100644--- a/crates/openhuman-core/src/memory/types.rs+++ b/crates/openhuman-core/src/memory/types.rs@@ -11,7 +11,7 @@ use tinymemory_api::{Citation, EngineDescriptor, FetchMode, Hit, LearningKind, MemoryMeta, MetaFilter,};use tinymemory_integrations::import::ImportState;-pub use tinymemory_integrations::sources::SourceStatus;+use tinymemory_integrations::sources::SourceStatus;use crate::config::schema::MemorySourceKind;