Skip to content

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

refactor(memory): replace for_workspace with for_config across binding calls

Steven Enamakel66d188036bd9
diff --git a/crates/openhuman-core/src/core/memory_cli.rs b/crates/openhuman-core/src/core/memory_cli.rs
index 6af9d41b07..2fe96de0e0 100644
--- a/crates/openhuman-core/src/core/memory_cli.rs
+++ b/crates/openhuman-core/src/core/memory_cli.rs
@@ -558,7 +558,7 @@ async fn create_memory_binding(
#[cfg(feature = "modules")]
crate::modules::memory::set_modules_policy(std::sync::Arc::new(config.clone()));
- crate::memory::binding::for_workspace(&config.workspace_dir, &config.subsystems.memory)
+ crate::memory::binding::for_config(&config)
.map_err(|error| anyhow::anyhow!(error))
}
diff --git a/crates/openhuman-core/src/core/runtime/context.rs b/crates/openhuman-core/src/core/runtime/context.rs
index 9646873b0f..00a34afee5 100644
--- a/crates/openhuman-core/src/core/runtime/context.rs
+++ b/crates/openhuman-core/src/core/runtime/context.rs
@@ -899,7 +899,7 @@ pub async fn init_stores(cfg: &crate::config::Config, domains: crate::core::runt
// than lazily so a bad `[subsystems.memory]` is loud at boot instead of
// at the first recall. Infallible by design: an inadmissible driver
// falls back, publishes `MemoryDriverBindFailed`, and records why.
- match crate::memory::binding::for_workspace(&cfg.workspace_dir, &cfg.subsystems.memory) {
+ match crate::memory::binding::for_config(&cfg) {
Ok(binding) => log::info!(
"[boot] memory driver bound: id={} class={} capabilities=[{}] fallback={:?}",
binding.driver_id(),
diff --git a/crates/openhuman-core/src/memory/ops/engine.rs b/crates/openhuman-core/src/memory/ops/engine.rs
index d93cbe3422..8c40075ab0 100644
--- a/crates/openhuman-core/src/memory/ops/engine.rs
+++ b/crates/openhuman-core/src/memory/ops/engine.rs
@@ -382,6 +382,7 @@ pub(super) async fn commit_engine(
prepared.id,
config.workspace_dir.display()
);
+ crate::memory::binding_remote::note_api_url(&config.workspace_dir, &config.api_url);
binding::rebind(&config.workspace_dir, &from, &config.subsystems.memory)?;
state_for(&config)
}
diff --git a/crates/openhuman-core/src/memory/ops/provider.rs b/crates/openhuman-core/src/memory/ops/provider.rs
index 563f1f0d9d..4942333ed1 100644
--- a/crates/openhuman-core/src/memory/ops/provider.rs
+++ b/crates/openhuman-core/src/memory/ops/provider.rs
@@ -62,7 +62,7 @@ async fn standalone_status() -> SubsystemStatus {
}
};
- match crate::memory::binding::for_workspace(&config.workspace_dir, &config.subsystems.memory) {
+ match crate::memory::binding::for_config(&config) {
Ok(binding) => status_from_binding(&binding).await,
Err(err) => {
log::debug!(