Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

chore: files changed crates/openhuman-core/Cargo.toml,crates/openhuman-core/src/memory/layout_migrat

Steven Enamakeld66d42e43276
diff --git a/crates/openhuman-core/Cargo.toml b/crates/openhuman-core/Cargo.toml
index dbae371c5e..5137868d1a 100644
--- a/crates/openhuman-core/Cargo.toml
+++ b/crates/openhuman-core/Cargo.toml
@@ -207,10 +207,9 @@ tinytools-std = { path = "../../vendor/tinyagents/vendor/tinytools/crates/tinyto
# TinyMemory (https://github.com/tinyhumansai/tinymemory), three crates:
# - `tinymemory-api`: the engine contract (`MemoryEngine`: recall / fetch /
# store / forget / list / consolidate) and its types. No I/O.
-# - `tinymemory-tools`: the agent surface over any engine — the lifecycle this
-# host drives around every turn (`AgentMemory`: start_session, pre_turn,
-# post_turn, recall_for_compaction), the standard `MemoryLayout`, the shared
-# `Brain`, holistic recall (`ContextPack`) and `BackgroundJob`s.
+# - `tinymemory-tools`: the agent surface over any engine, the memory lifecycle,
+# `MemoryLayout`, shared `Brain`, backfill driver, layout migration service,
+# run-slot interlock, and optional filesystem legacy-tree claim.
# - `tinymemory-integrations`: everything that touches the outside world — the
# CortexDB engines (`cortexdb` direct, `tinyhumans` hosted), document
# conversion and the brain filer, source readers (with the SSRF-guarded
diff --git a/crates/openhuman-core/src/memory/layout_migration/app_host.rs b/crates/openhuman-core/src/memory/layout_migration/app_host.rs
index 4cbf395965..58d9a28f2c 100644
--- a/crates/openhuman-core/src/memory/layout_migration/app_host.rs
+++ b/crates/openhuman-core/src/memory/layout_migration/app_host.rs
@@ -6,9 +6,8 @@
use async_trait::async_trait;
use tinymemory_api::Error as EngineError;
use tinymemory_tools::layout_migration as lm;
-use tinymemory_tools::layout_migration::{Engines, FlowPlacement, LegacyClaim, Placement};
+use tinymemory_tools::layout_migration::{Engines, FlowPlacement, FsLegacyClaim, LegacyClaim, Placement};
-use super::claim::ClaimKey;
use super::state::FileStateStore;
use crate::config::{Config, MemoryLayoutMode};
use crate::memory::engine::{self, CORTEXDB_ENGINE};
@@ -111,8 +110,8 @@ impl lm::LayoutHost for AppHost {
}
fn legacy_claim(&self) -> lm::Result<Option<Box<dyn LegacyClaim>>> {
- claim_key(&self.config)
- .map(|key| key.map(|key| Box::new(key) as Box<dyn LegacyClaim>))
+ claim(&self.config)
+ .map(|claim| claim.map(|claim| Box::new(claim) as Box<dyn LegacyClaim>))
.map_err(to_module)
}
@@ -127,7 +126,7 @@ impl lm::LayoutHost for AppHost {
/// The claim on the legacy tree `config`'s account would move, if it is
/// shared by every account on the machine.
-pub(super) fn claim_key(config: &Config) -> Result<Option<ClaimKey>> {
+pub(super) fn claim(config: &Config) -> Result<Option<FsLegacyClaim>> {
// A self-hosted key is the operator's: every local account using it
// shares one legacy tree. The hosted engine is one tenant per person.
if config.memory.engine.trim() != CORTEXDB_ENGINE {
@@ -144,7 +143,7 @@ pub(super) fn claim_key(config: &Config) -> Result<Option<ClaimKey>> {
.and_then(std::path::Path::parent)
.ok_or_else(signed_out)?;
let endpoint = engine::bind_with_root(config, None)?.endpoint;
- Ok(Some(ClaimKey::new(app_dir, &endpoint, &owner)))
+ Ok(Some(FsLegacyClaim::new(app_dir, &endpoint, &owner)))
}
fn signed_in_root(config: &Config) -> Result<String> {
diff --git a/crates/openhuman-core/src/memory/layout_migration/test_host.rs b/crates/openhuman-core/src/memory/layout_migration/test_host.rs
index 01d343c634..be2e875deb 100644
--- a/crates/openhuman-core/src/memory/layout_migration/test_host.rs
+++ b/crates/openhuman-core/src/memory/layout_migration/test_host.rs
@@ -8,11 +8,10 @@ use tinymemory_api::{
LearningKind, ListRequest, MemoryEngine, MemoryMeta, MetaFilter, Namespace, StoreItem,
};
use tinymemory_tools::layout_migration::{
- Engines, FlowPlacement, LayoutHost, LegacyClaim, MigrationStateStore, Placement, Result,
+ Engines, FlowPlacement, FsLegacyClaim, LayoutHost, LegacyClaim, MigrationStateStore, Placement, Result,
};
use tinymemory_tools::MemoryLayout;
-use super::claim::ClaimKey;
use super::state::FileStateStore;
use crate::config::Config;
@@ -24,7 +23,7 @@ pub(crate) struct FakeHost {
pub(crate) switched: AtomicBool,
pub(crate) free: AtomicBool,
/// The claim when the legacy tree is shared.
- pub(crate) claim: Option<ClaimKey>,
+ pub(crate) claim: Option<FsLegacyClaim>,
/// Asks for free_now: after this many, moving stops being free.
pub(crate) free_for: AtomicUsize,
/// Written to the legacy tree as the switch happens (a turn racing it).