Skip to content

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

fix(memory): add namespace field to MemorySourceConfig in tests and production path

Steven Enamakel7a4eaf25cc39
diff --git a/crates/openhuman-core/src/memory/bus_tests.rs b/crates/openhuman-core/src/memory/bus_tests.rs
index 2c02f3030e..e1994bbc3c 100644
--- a/crates/openhuman-core/src/memory/bus_tests.rs
+++ b/crates/openhuman-core/src/memory/bus_tests.rs
@@ -96,6 +96,7 @@ async fn run_system_job_starts_due_source_syncs() {
target: folder.display().to_string(),
label: "Notes".into(),
schedule_mins: Some(15),
+ namespace: None,
});
run_system_job(&config, SOURCES_SYNC_JOB).await;
// The sync runs in the background; wait for its recorded state.
diff --git a/crates/openhuman-core/src/memory/sources/composio_tests.rs b/crates/openhuman-core/src/memory/sources/composio_tests.rs
index 8df8a06529..8507adf6ce 100644
--- a/crates/openhuman-core/src/memory/sources/composio_tests.rs
+++ b/crates/openhuman-core/src/memory/sources/composio_tests.rs
@@ -124,6 +124,7 @@ fn source_id_for_toolkit_prefers_the_configured_source() {
target: "gmail".into(),
label: "Gmail".into(),
schedule_mins: None,
+ namespace: None,
});
config
.memory
@@ -134,6 +135,7 @@ fn source_id_for_toolkit_prefers_the_configured_source() {
target: "notion".into(),
label: "Folder named like a toolkit".into(),
schedule_mins: None,
+ namespace: None,
});
assert_eq!(source_id_for_toolkit(&config, "GMAIL"), "src-gmail");
assert_eq!(source_id_for_toolkit(&config, "notion"), "composio:notion");
@@ -188,6 +190,7 @@ async fn sync_toolkit_without_a_connector_is_an_error_not_a_panic() {
target: "gmail".into(),
label: "Gmail".into(),
schedule_mins: None,
+ namespace: None,
};
assert!(sync_toolkit(&config, &bound, &source).await.is_err());
}
diff --git a/crates/openhuman-core/src/memory/sources/mod.rs b/crates/openhuman-core/src/memory/sources/mod.rs
index fb9348aa47..e810b24e58 100644
--- a/crates/openhuman-core/src/memory/sources/mod.rs
+++ b/crates/openhuman-core/src/memory/sources/mod.rs
@@ -141,6 +141,7 @@ pub fn apply_add(
target,
label,
schedule_mins: params.schedule_mins,
+ namespace: None,
};
sync::reader_entry(&source)?;
config.memory.sources.push(source.clone());
diff --git a/crates/openhuman-core/src/memory/sources/mod_tests.rs b/crates/openhuman-core/src/memory/sources/mod_tests.rs
index 56b78932ed..94705dcee4 100644
--- a/crates/openhuman-core/src/memory/sources/mod_tests.rs
+++ b/crates/openhuman-core/src/memory/sources/mod_tests.rs
@@ -20,6 +20,7 @@ fn source(id: &str, mins: Option<u32>) -> MemorySourceConfig {
target: "/tmp/x".to_string(),
label: id.to_string(),
schedule_mins: mins,
+ namespace: None,
}
}
diff --git a/crates/openhuman-core/src/memory/sources/sync_tests.rs b/crates/openhuman-core/src/memory/sources/sync_tests.rs
index 68675a651c..346935330a 100644
--- a/crates/openhuman-core/src/memory/sources/sync_tests.rs
+++ b/crates/openhuman-core/src/memory/sources/sync_tests.rs
@@ -11,6 +11,7 @@ fn folder_source(id: &str, dir: &std::path::Path, mins: Option<u32>) -> MemorySo
target: dir.display().to_string(),
label: id.to_string(),
schedule_mins: mins,
+ namespace: None,
}
}
@@ -48,6 +49,7 @@ fn reader_entry_maps_every_kind() {
target: target.into(),
label: "L".into(),
schedule_mins: None,
+ namespace: None,
};
let folder = reader_entry(&mk(MemorySourceKind::Folder, "/p"))
.unwrap()