Skip to content

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

feat(storage): register agents module and record live agents on install

Steven Enamakel061df3588a4f
diff --git a/crates/openhuman-core/src/storage/mod.rs b/crates/openhuman-core/src/storage/mod.rs
index 1ff9cf94e8..490f93423f 100644
--- a/crates/openhuman-core/src/storage/mod.rs
+++ b/crates/openhuman-core/src/storage/mod.rs
@@ -18,6 +18,7 @@
//! driver the build does not carry fails at [`open`] naming the feature, so a
//! misconfigured deployment stops at boot instead of at its first write.
+pub mod agents;
pub mod documents;
pub mod secrets;
@@ -102,7 +103,10 @@ pub async fn open(url: &str) -> Result<Arc<dyn StorageBackend>, StorageError> {
/// Makes `backend` the process's storage backend; returns the previous one.
pub fn install(backend: Arc<dyn StorageBackend>) -> Option<Arc<dyn StorageBackend>> {
- BACKEND.install(backend)
+ let previous = BACKEND.install(backend);
+ // Agents derived before the backend existed still need recording.
+ agents::record_live();
+ previous
}
/// The installed backend, when the host configured one.