Skip to content

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

refactor(artifacts): move artifact store wiring under tool result artifacts

Steven Enamakel05fea4f5d845
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 4e4e54aa63..ec422899b3 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
@@ -35,6 +35,10 @@ use tinystoragedrivers::BlobStore;
use crate::agent::harness::artifact_offload::{SanitizingRedactor, READ_TOOL};
use tinyagents_harness_tools::fs::filesystem::FileReadTool;
+mod wiring;
+
+pub(crate) use wiring::build_artifact_store;
+
/// Namespace of the artifact index in the run's store registry.
pub(crate) const TINYAGENTS_TOOL_RESULT_ARTIFACT_STORE: &str = "openhuman_tool_result_artifacts";
diff --git a/crates/openhuman-core/src/agent/harness/tool_result_artifacts/wiring.rs b/crates/openhuman-core/src/agent/harness/tool_result_artifacts/wiring.rs
index 865b28d9e3..d91bbfa550 100644
--- a/crates/openhuman-core/src/agent/harness/tool_result_artifacts/wiring.rs
+++ b/crates/openhuman-core/src/agent/harness/tool_result_artifacts/wiring.rs
@@ -14,7 +14,7 @@
use std::path::Path;
use std::sync::Arc;
-use crate::agent::harness::tool_result_artifacts::{new_tool_result_store, HostArtifactStore};
+use super::{new_tool_result_store, HostArtifactStore};
use crate::security::policy::tool_result_artifacts_dir;
use crate::storage::sessions::artifact_blobs_for;
use tinystoragedrivers::{MemoryStorage, Scope, StorageBackend};
@@ -116,5 +116,5 @@ fn prune_materialized(root: &Path, ttl: std::time::Duration) -> usize {
}
#[cfg(test)]
-#[path = "artifact_wiring_tests.rs"]
+#[path = "wiring_tests.rs"]
mod tests;
diff --git a/crates/openhuman-core/src/agent/session_host/runtime_session.rs b/crates/openhuman-core/src/agent/session_host/runtime_session.rs
index 8f7be5eb24..ce515c3872 100644
--- a/crates/openhuman-core/src/agent/session_host/runtime_session.rs
+++ b/crates/openhuman-core/src/agent/session_host/runtime_session.rs
@@ -273,7 +273,7 @@ impl OpenHumanSessionHost {
};
let autocompact_enabled = context_config.enabled && context_config.autocompact_enabled;
let compaction = context_config.compaction_settings();
- let artifact_store = crate::artifacts::artifact_wiring::build_artifact_store(
+ let artifact_store = crate::agent::harness::tool_result_artifacts::build_artifact_store(
&self.workspace_dir,
&self.event_session_id,
);
@@ -284,7 +284,7 @@ impl OpenHumanSessionHost {
let context_mw = TurnContextMiddleware {
tool_result_budget_bytes,
payload_summarizer: self.payload_summarizer.clone().filter(|_| juice_on),
- // Rooted outside the project; see `artifact_wiring` (#6408, #6483).
+ // Rooted outside the project; see `tool_result_artifacts` (#6408, #6483).
artifact_store: Some(artifact_store),
tokenjuice_compaction_enabled: tokenjuice_compaction_enabled && juice_on,
tokenjuice_compression: self.tokenjuice_compression,
diff --git a/crates/openhuman-core/src/artifacts/mod.rs b/crates/openhuman-core/src/artifacts/mod.rs
index e4d0e8245f..449b390b53 100644
--- a/crates/openhuman-core/src/artifacts/mod.rs
+++ b/crates/openhuman-core/src/artifacts/mod.rs
@@ -1,4 +1,3 @@
-pub(crate) mod artifact_wiring;
pub mod files;
pub mod migrate;
pub mod ops;