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): map legacy import counts to local type
Steven Enamakela117a0bec9de
diff --git a/crates/openhuman-core/src/memory/backfill.rs b/crates/openhuman-core/src/memory/backfill.rsindex cd02bc0344..a6f698fce5 100644--- a/crates/openhuman-core/src/memory/backfill.rs+++ b/crates/openhuman-core/src/memory/backfill.rs@@ -40,7 +40,7 @@ use crate::config::Config;use crate::memory::engine::{self, BoundEngine};use crate::memory::error::{MemoryError, MemoryResult};use crate::memory::scope::{MemoryIdentity, ResolvedIdentity};-use crate::memory::types::ImportPhase;+use tinymemory_integrations::import::ImportPhase;use crate::threads::store::blocking as threads;use tinymemory_tools::backfill::{first_live_turn, group_items, turn_groups, ThreadMessage};diff --git a/crates/openhuman-core/src/memory/import.rs b/crates/openhuman-core/src/memory/import.rsindex 80093ff33e..413ade8ea8 100644--- a/crates/openhuman-core/src/memory/import.rs+++ b/crates/openhuman-core/src/memory/import.rs@@ -13,7 +13,8 @@ use std::sync::{Arc, LazyLock, Mutex};use std::time::Duration;use tinymemory_integrations::import::{- Begun, CheckpointStore, ImportError, ImportFile, ImportPhase, ImportState, Importer, Pacer,+ Begun, CheckpointStore, ImportCounts as LegacyImportCounts, ImportError, ImportFile,+ ImportPhase, ImportState, Importer, Pacer,};use crate::config::Config;@@ -137,6 +138,11 @@ pub async fn scan(config: &Config) -> MemoryResult<ImportScanView> {}).await.map_err(|error| MemoryError::Engine(format!("import scan failed: {error}")))?;+ let counts = counts.map(|counts: LegacyImportCounts| ImportCounts {+ documents: counts.documents,+ conversations: counts.conversations,+ learnings: counts.learnings,+ });Ok(ImportScanView {found: counts.is_some(),counts,diff --git a/crates/openhuman-core/src/memory/import_tests.rs b/crates/openhuman-core/src/memory/import_tests.rsindex 398d67c7aa..3aa549637a 100644--- a/crates/openhuman-core/src/memory/import_tests.rs+++ b/crates/openhuman-core/src/memory/import_tests.rs@@ -130,5 +130,5 @@ async fn a_paused_scheduler_leaves_an_interrupted_import_for_later() {#[test]fn a_store_with_no_legacy_files_counts_nothing() {let tmp = tempfile::tempdir().unwrap();- assert!(count_legacy(tmp.path()).is_none());+ assert!(tinymemory_integrations::import::count_legacy(tmp.path()).is_none());}