Skip to content

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

feat(artifacts): add file store support to production artifact creation

Steven Enamakelb775b57fbd16
diff --git a/crates/openhuman-core/src/artifacts/production.rs b/crates/openhuman-core/src/artifacts/production.rs
index fc60573ccd..dd44eedd96 100644
--- a/crates/openhuman-core/src/artifacts/production.rs
+++ b/crates/openhuman-core/src/artifacts/production.rs
@@ -38,6 +38,7 @@ pub struct Production {
files: FileRoots,
chat: Option<ApprovalChatContext>,
ctx: crate::core::runtime::DispatchCtx,
+ file_store: Option<std::sync::Arc<dyn tiny_artifacts::FileStore>>,
id: String,
path: PathBuf,
/// Whether this adds a version to an artifact that already has one: its
@@ -119,13 +120,21 @@ impl Production {
)
.await?;
- let artifacts = artifacts_service(workspace_dir, files.clone(), None, chat, ctx);
+ let (artifacts, file_store) =
+ super::tiny_store::artifacts_service_with_file_store(
+ workspace_dir,
+ files.clone(),
+ None,
+ chat,
+ ctx,
+ );
let mut production = Self {
artifacts,
workspace_dir: workspace_dir.to_path_buf(),
files,
chat: chat.cloned(),
ctx: ctx.clone(),
+ file_store,
id: meta.id.clone(),
path,
revision: false,
@@ -267,7 +276,7 @@ impl Production {
let bridge = super::tiny_store::LegacyUiBridge::new(
&self.workspace_dir,
self.files.clone(),
- super::tiny_store::file_store_for(&self.workspace_dir, &self.ctx),
+ self.file_store.clone(),
self.chat.as_ref(),
);
if let Err(err) = bridge.show_newest(&record).await {