Skip to content

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

refactor(agent): use shared test support for in-memory tool result store

Steven Enamakelea441799ed6e
diff --git a/crates/openhuman-core/src/agent/harness/tool_result_artifacts/mod.rs b/crates/openhuman-core/src/agent/harness/tool_result_artifacts/mod.rs
index 268d4f1b4b..474f41f4eb 100644
--- a/crates/openhuman-core/src/agent/harness/tool_result_artifacts/mod.rs
+++ b/crates/openhuman-core/src/agent/harness/tool_result_artifacts/mod.rs
@@ -157,10 +157,11 @@ pub(crate) fn in_memory_tool_result_store(
materialize_root: PathBuf,
session_key: impl Into<String>,
) -> HostArtifactStore {
- let scope = tinystoragedrivers::Scope::new("local").expect("scope");
- let blobs = tinystoragedrivers::MemoryStorage::new();
- let blobs = tinystoragedrivers::StorageBackend::for_scope(&blobs, &scope).expect("scope");
- new_tool_result_store(Arc::clone(blobs.blobs()), materialize_root, session_key)
+ let backend = crate::storage::test_support::memory_backend();
+ let storage = backend
+ .for_scope(&crate::storage::Scope::local())
+ .expect("scope");
+ new_tool_result_store(Arc::clone(storage.blobs()), materialize_root, session_key)
}
/// The artifact a tool call reads, if any — `file_read`, possibly wrapped in