Skip to content

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

refactor(artifacts): update publisher type in tiny_store

Steven Enamakel6272388a97d1
diff --git a/crates/openhuman-core/src/artifacts/tiny_store.rs b/crates/openhuman-core/src/artifacts/tiny_store.rs
index ef877ac6da..d0de03703d 100644
--- a/crates/openhuman-core/src/artifacts/tiny_store.rs
+++ b/crates/openhuman-core/src/artifacts/tiny_store.rs
@@ -466,7 +466,7 @@ pub fn registered_tools(
workspace_dir: &Path,
files: FileRoots,
action_dir: &Path,
- publisher: Option<Arc<dyn tiny_artifacts::ArtifactPublisher>>,
+ publisher: Option<super::publisher_slot::ArtifactPublisherBinder>,
) -> Vec<Box<dyn tinytools::Tool>> {
let can_publish = publisher.is_some();
let service = {
diff --git a/crates/openhuman-core/src/artifacts/tiny_store_tests.rs b/crates/openhuman-core/src/artifacts/tiny_store_tests.rs
index e6babaeb4d..c7b7814303 100644
--- a/crates/openhuman-core/src/artifacts/tiny_store_tests.rs
+++ b/crates/openhuman-core/src/artifacts/tiny_store_tests.rs
@@ -265,7 +265,7 @@ impl tiny_artifacts::ArtifactPublisher for NoopPublisher {
#[test]
fn share_artifact_is_offered_only_with_a_publisher() {
let (workspace, files) = temp_dirs();
- let names = |publisher: Option<std::sync::Arc<dyn tiny_artifacts::ArtifactPublisher>>| {
+ let names = |publisher: Option<super::super::publisher_slot::ArtifactPublisherBinder>| {
registered_tools(&workspace, FileRoots::new(&files), &workspace, publisher)
.iter()
.map(|t| t.name().to_string())
@@ -277,7 +277,9 @@ fn share_artifact_is_offered_only_with_a_publisher() {
"{without:?}"
);
assert!(without.contains(&"delete_artifact".to_string()));
- let with = names(Some(std::sync::Arc::new(NoopPublisher)));
+ let binder: super::super::publisher_slot::ArtifactPublisherBinder =
+ std::sync::Arc::new(|_files| std::sync::Arc::new(NoopPublisher));
+ let with = names(Some(binder));
assert!(with.contains(&"share_artifact".to_string()), "{with:?}");
}