The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
feat(artifacts): move artifact store to top-level module
Steven Enamakel4aa5c183223b
diff --git a/crates/openhuman-core/src/agent/attachments/mod.rs b/crates/openhuman-core/src/agent/attachments/mod.rsindex f306a3775b..1d086d1564 100644--- a/crates/openhuman-core/src/agent/attachments/mod.rs+++ b/crates/openhuman-core/src/agent/attachments/mod.rs@@ -181,7 +181,7 @@ fn policy(config: &Config, root: &Path) -> SecurityPolicy {.media_files_roots.lock().unwrap_or_else(std::sync::PoisonError::into_inner) =- Some(crate::agent::artifacts::FileRoots::from_config(config));+ Some(crate::artifacts::FileRoots::from_config(config));policy}diff --git a/crates/openhuman-core/src/agent/attachments/mod_tests.rs b/crates/openhuman-core/src/agent/attachments/mod_tests.rsindex 4d4cfa8967..b14493988b 100644--- a/crates/openhuman-core/src/agent/attachments/mod_tests.rs+++ b/crates/openhuman-core/src/agent/attachments/mod_tests.rs@@ -198,10 +198,10 @@ async fn ready_media_artifact_in_files_folder_can_be_attached() {config.files_dir_override = Some(files.clone());config.autonomy.enabled = true;- let (artifact, path) = crate::agent::artifacts::create_artifact(+ let (artifact, path) = crate::artifacts::create_artifact(&config.workspace_dir,&files,- crate::agent::artifacts::ArtifactKind::Image,+ crate::artifacts::ArtifactKind::Image,"Generated image","png",None,@@ -209,7 +209,7 @@ async fn ready_media_artifact_in_files_folder_can_be_attached() {.await.unwrap();tokio::fs::write(&path, b"image bytes").await.unwrap();- crate::agent::artifacts::finalize_artifact(&config.workspace_dir, &artifact.id, 11, None)+ crate::artifacts::finalize_artifact(&config.workspace_dir, &artifact.id, 11, None).await.unwrap();diff --git a/crates/openhuman-core/src/agent/artifacts/README.md b/crates/openhuman-core/src/artifacts/README.mdsimilarity index 100%rename from crates/openhuman-core/src/agent/artifacts/README.mdrename to crates/openhuman-core/src/artifacts/README.mddiff --git a/crates/openhuman-core/src/agent/session_host/artifact_wiring.rs b/crates/openhuman-core/src/artifacts/artifact_wiring.rssimilarity index 100%rename from crates/openhuman-core/src/agent/session_host/artifact_wiring.rsrename to crates/openhuman-core/src/artifacts/artifact_wiring.rsdiff --git a/crates/openhuman-core/src/agent/session_host/artifact_wiring_tests.rs b/crates/openhuman-core/src/artifacts/artifact_wiring_tests.rssimilarity index 100%rename from crates/openhuman-core/src/agent/session_host/artifact_wiring_tests.rsrename to crates/openhuman-core/src/artifacts/artifact_wiring_tests.rsdiff --git a/crates/openhuman-core/src/agent/artifacts/files.rs b/crates/openhuman-core/src/artifacts/files.rssimilarity index 100%rename from crates/openhuman-core/src/agent/artifacts/files.rsrename to crates/openhuman-core/src/artifacts/files.rsdiff --git a/crates/openhuman-core/src/agent/artifacts/files_tests.rs b/crates/openhuman-core/src/artifacts/files_tests.rssimilarity index 99%rename from crates/openhuman-core/src/agent/artifacts/files_tests.rsrename to crates/openhuman-core/src/artifacts/files_tests.rsindex 210ad49076..10b160ad1b 100644--- a/crates/openhuman-core/src/agent/artifacts/files_tests.rs+++ b/crates/openhuman-core/src/artifacts/files_tests.rs@@ -3,11 +3,11 @@ use std::path::{Path, PathBuf};use tempfile::TempDir;use super::*;-use crate::agent::artifacts::store::{+use crate::artifacts::store::{create_artifact, create_artifact_regenerating, delete_artifact, fail_artifact,finalize_artifact, list_artifacts, read_artifact_bytes, save_artifact_meta,};-use crate::agent::artifacts::types::ArtifactKind;+use crate::artifacts::types::ArtifactKind;async fn create_ready(workspace: &Path,diff --git a/crates/openhuman-core/src/agent/artifacts/migrate.rs b/crates/openhuman-core/src/artifacts/migrate.rssimilarity index 100%rename from crates/openhuman-core/src/agent/artifacts/migrate.rsrename to crates/openhuman-core/src/artifacts/migrate.rsdiff --git a/crates/openhuman-core/src/agent/artifacts/migrate_tests.rs b/crates/openhuman-core/src/artifacts/migrate_tests.rssimilarity index 99%rename from crates/openhuman-core/src/agent/artifacts/migrate_tests.rsrename to crates/openhuman-core/src/artifacts/migrate_tests.rsindex 478c2208b2..4bd54c0111 100644--- a/crates/openhuman-core/src/agent/artifacts/migrate_tests.rs+++ b/crates/openhuman-core/src/artifacts/migrate_tests.rs@@ -3,11 +3,11 @@ use std::path::{Path, PathBuf};use tempfile::TempDir;use super::*;-use crate::agent::artifacts::store::{+use crate::artifacts::store::{get_artifact, list_artifacts, read_artifact_args, read_artifact_bytes, save_artifact_args,save_artifact_meta,};-use crate::agent::artifacts::types::ArtifactKind;+use crate::artifacts::types::ArtifactKind;/// A pre-#5505 record: bytes under `<workspace>/artifacts/<id>/<name>`.async fn legacy(workspace: &Path, id: &str, name: &str, bytes: &[u8], status: ArtifactStatus) {diff --git a/crates/openhuman-core/src/agent/artifacts/mod.rs b/crates/openhuman-core/src/artifacts/mod.rssimilarity index 100%rename from crates/openhuman-core/src/agent/artifacts/mod.rsrename to crates/openhuman-core/src/artifacts/mod.rsdiff --git a/crates/openhuman-core/src/agent/artifacts/ops.rs b/crates/openhuman-core/src/artifacts/ops.rssimilarity index 100%rename from crates/openhuman-core/src/agent/artifacts/ops.rsrename to crates/openhuman-core/src/artifacts/ops.rsdiff --git a/crates/openhuman-core/src/agent/artifacts/ops_tests.rs b/crates/openhuman-core/src/artifacts/ops_tests.rssimilarity index 92%rename from crates/openhuman-core/src/agent/artifacts/ops_tests.rsrename to crates/openhuman-core/src/artifacts/ops_tests.rsindex f334ff3252..d8f55de0cb 100644--- a/crates/openhuman-core/src/agent/artifacts/ops_tests.rs+++ b/crates/openhuman-core/src/artifacts/ops_tests.rs@@ -29,8 +29,8 @@ async fn list_empty() {/// artifacts from every thread (and the legacy ones without a thread).#[tokio::test]async fn list_without_thread_filter_returns_all_threads() {- use crate::agent::artifacts::store::save_artifact_meta;- use crate::agent::artifacts::types::{ArtifactKind, ArtifactMeta, ArtifactStatus};+ use crate::artifacts::store::save_artifact_meta;+ use crate::artifacts::types::{ArtifactKind, ArtifactMeta, ArtifactStatus};let tmp = TempDir::new().unwrap();let config = test_config(&tmp);@@ -70,8 +70,8 @@ async fn list_without_thread_filter_returns_all_threads() {/// deliberately excluded — they have no addressable owning thread.#[tokio::test]async fn list_with_thread_filter_returns_only_matching_thread() {- use crate::agent::artifacts::store::save_artifact_meta;- use crate::agent::artifacts::types::{ArtifactKind, ArtifactMeta, ArtifactStatus};+ use crate::artifacts::store::save_artifact_meta;+ use crate::artifacts::types::{ArtifactKind, ArtifactMeta, ArtifactStatus};let tmp = TempDir::new().unwrap();let config = test_config(&tmp);@@ -130,8 +130,8 @@ async fn list_with_thread_filter_returns_only_matching_thread() {/// stays meaningful.#[tokio::test]async fn list_with_thread_filter_unknown_thread_returns_zero() {- use crate::agent::artifacts::store::save_artifact_meta;- use crate::agent::artifacts::types::{ArtifactKind, ArtifactMeta, ArtifactStatus};+ use crate::artifacts::store::save_artifact_meta;+ use crate::artifacts::types::{ArtifactKind, ArtifactMeta, ArtifactStatus};let tmp = TempDir::new().unwrap();let config = test_config(&tmp);save_artifact_meta(@@ -224,8 +224,8 @@ async fn regenerate_requires_thread_and_client() {#[tokio::test]async fn regenerate_rejects_non_presentation_kind() {- use crate::agent::artifacts::store::{save_artifact_args, save_artifact_meta};- use crate::agent::artifacts::types::{ArtifactKind, ArtifactMeta, ArtifactStatus};+ use crate::artifacts::store::{save_artifact_args, save_artifact_meta};+ use crate::artifacts::types::{ArtifactKind, ArtifactMeta, ArtifactStatus};let tmp = TempDir::new().unwrap();let config = test_config(&tmp);@@ -274,8 +274,8 @@ async fn regenerate_rejects_non_presentation_kind() {#[cfg(feature = "documents")]#[tokio::test]async fn regenerate_errors_when_args_missing() {- use crate::agent::artifacts::store::create_artifact;- use crate::agent::artifacts::types::ArtifactKind;+ use crate::artifacts::store::create_artifact;+ use crate::artifacts::types::ArtifactKind;let tmp = TempDir::new().unwrap();let config = test_config(&tmp);@@ -312,8 +312,8 @@ async fn regenerate_reruns_producer_and_reuses_id() {) {return;}- use crate::agent::artifacts::store::{create_artifact, get_artifact, save_artifact_args};- use crate::agent::artifacts::types::{ArtifactKind, ArtifactStatus};+ use crate::artifacts::store::{create_artifact, get_artifact, save_artifact_args};+ use crate::artifacts::types::{ArtifactKind, ArtifactStatus};let tmp = TempDir::new().unwrap();let config = test_config(&tmp);@@ -398,8 +398,8 @@ impl Drop for DefaultFilesDir {#[tokio::test]async fn get_returns_the_files_folder_path() {- use crate::agent::artifacts::store::{create_artifact, finalize_artifact};- use crate::agent::artifacts::types::ArtifactKind;+ use crate::artifacts::store::{create_artifact, finalize_artifact};+ use crate::artifacts::types::ArtifactKind;let tmp = TempDir::new().unwrap();let config = test_config(&tmp);let default = DefaultFilesDir::under(&tmp).await;@@ -433,8 +433,8 @@ async fn get_returns_the_files_folder_path() {#[tokio::test]async fn get_reports_a_ready_file_removed_outside_openhuman() {- use crate::agent::artifacts::store::{create_artifact, finalize_artifact};- use crate::agent::artifacts::types::ArtifactKind;+ use crate::artifacts::store::{create_artifact, finalize_artifact};+ use crate::artifacts::types::ArtifactKind;let tmp = TempDir::new().unwrap();let config = test_config(&tmp);let default = DefaultFilesDir::under(&tmp).await;@@ -462,8 +462,8 @@ async fn get_reports_a_ready_file_removed_outside_openhuman() {/// refused by get, and delete leaves the file it names alone.#[tokio::test]async fn get_and_delete_refuse_a_record_rooted_outside_the_files_folder() {- use crate::agent::artifacts::store::save_artifact_meta;- use crate::agent::artifacts::types::{ArtifactKind, ArtifactMeta, ArtifactStatus};+ use crate::artifacts::store::save_artifact_meta;+ use crate::artifacts::types::{ArtifactKind, ArtifactMeta, ArtifactStatus};let tmp = TempDir::new().unwrap();let config = test_config(&tmp);let _default = DefaultFilesDir::under(&tmp).await;diff --git a/crates/openhuman-core/src/agent/artifacts/preview.rs b/crates/openhuman-core/src/artifacts/preview.rssimilarity index 100%rename from crates/openhuman-core/src/agent/artifacts/preview.rsrename to crates/openhuman-core/src/artifacts/preview.rsdiff --git a/crates/openhuman-core/src/agent/artifacts/preview_tests.rs b/crates/openhuman-core/src/artifacts/preview_tests.rssimilarity index 97%rename from crates/openhuman-core/src/agent/artifacts/preview_tests.rsrename to crates/openhuman-core/src/artifacts/preview_tests.rsindex 15cee0f3b3..6ab5f6ff71 100644--- a/crates/openhuman-core/src/agent/artifacts/preview_tests.rs+++ b/crates/openhuman-core/src/artifacts/preview_tests.rs@@ -140,8 +140,8 @@ async fn an_unknown_artifact_is_not_found() {#[tokio::test]async fn an_artifact_made_before_versioning_opens_from_its_legacy_record() {- use crate::agent::artifacts::store::{create_artifact, finalize_artifact};- use crate::agent::artifacts::types::ArtifactKind as LegacyKind;+ use crate::artifacts::store::{create_artifact, finalize_artifact};+ use crate::artifacts::types::ArtifactKind as LegacyKind;let workspace = tempfile::tempdir().unwrap();let config = config_in(workspace.path());diff --git a/crates/openhuman-core/src/agent/artifacts/production.rs b/crates/openhuman-core/src/artifacts/production.rssimilarity index 100%rename from crates/openhuman-core/src/agent/artifacts/production.rsrename to crates/openhuman-core/src/artifacts/production.rsdiff --git a/crates/openhuman-core/src/agent/artifacts/production_tests.rs b/crates/openhuman-core/src/artifacts/production_tests.rssimilarity index 95%rename from crates/openhuman-core/src/agent/artifacts/production_tests.rsrename to crates/openhuman-core/src/artifacts/production_tests.rsindex 5bd907b072..32d038ec50 100644--- a/crates/openhuman-core/src/agent/artifacts/production_tests.rs+++ b/crates/openhuman-core/src/artifacts/production_tests.rs@@ -3,9 +3,9 @@ use std::path::PathBuf;use tiny_artifacts::{ArtifactKind, ArtifactStatus as RecordStatus, ArtifactStore};use super::*;-use crate::agent::artifacts::store::get_artifact;-use crate::agent::artifacts::tiny_store::versioned_store;-use crate::agent::artifacts::types::{ArtifactKind as CardKind, ArtifactStatus as CardStatus};+use crate::artifacts::store::get_artifact;+use crate::artifacts::tiny_store::versioned_store;+use crate::artifacts::types::{ArtifactKind as CardKind, ArtifactStatus as CardStatus};fn temp_dirs() -> (PathBuf, PathBuf) {let root = std::env::temp_dir().join(format!("production-{}", uuid::Uuid::new_v4()));@@ -85,11 +85,11 @@ async fn a_new_artifact_shares_one_id_and_one_file_between_card_and_record() {assert_eq!(record.status, RecordStatus::Ready);assert_eq!(record.latest().unwrap().author_id,- crate::agent::artifacts::tiny_store::AGENT_AUTHOR_ID+ crate::artifacts::tiny_store::AGENT_AUTHOR_ID);// The version holds its own copy; the files folder shows the newest.let file = record.latest().unwrap().file.clone().unwrap();- let kept = crate::agent::artifacts::tiny_store::version_files_dir(&workspace)+ let kept = crate::artifacts::tiny_store::version_files_dir(&workspace).join(&id).join("v1.pptx");assert_eq!(std::path::Path::new(&file.path), kept.as_path());diff --git a/crates/openhuman-core/src/agent/artifacts/schemas.rs b/crates/openhuman-core/src/artifacts/schemas.rssimilarity index 97%rename from crates/openhuman-core/src/agent/artifacts/schemas.rsrename to crates/openhuman-core/src/artifacts/schemas.rsindex 1cc33038c1..5883a7c478 100644--- a/crates/openhuman-core/src/agent/artifacts/schemas.rs+++ b/crates/openhuman-core/src/artifacts/schemas.rs@@ -431,7 +431,7 @@ fn handle_list_artifacts(ctx: DispatchCtx, params: Map<String, Value>) -> Contro.transpose()?;let thread_id = read_optional_string(¶ms, "thread_id")?;to_json(- crate::agent::artifacts::ops::ai_list_artifacts(+ crate::artifacts::ops::ai_list_artifacts(&config,offset,limit,@@ -446,7 +446,7 @@ fn handle_get_artifact(ctx: DispatchCtx, params: Map<String, Value>) -> ControllBox::pin(async move {let config = ctx.load_config().await?;let artifact_id = read_required::<String>(¶ms, "artifact_id")?;- to_json(crate::agent::artifacts::ops::ai_get_artifact(&config, artifact_id.trim()).await?)+ to_json(crate::artifacts::ops::ai_get_artifact(&config, artifact_id.trim()).await?)})}@@ -456,7 +456,7 @@ fn handle_save_artifact_version(ctx: DispatchCtx, params: Map<String, Value>) ->let artifact_id = read_required::<String>(¶ms, "artifact_id")?;let body = read_required::<String>(¶ms, "body")?;to_json(- crate::agent::artifacts::ops::ai_save_artifact_version(+ crate::artifacts::ops::ai_save_artifact_version(&config,artifact_id.trim(),&body,@@ -470,7 +470,7 @@ fn handle_read_artifact_body(ctx: DispatchCtx, params: Map<String, Value>) -> CoBox::pin(async move {let config = ctx.load_config().await?;let artifact_id = read_required::<String>(¶ms, "artifact_id")?;- let body = crate::agent::artifacts::preview::read_body(&config, artifact_id.trim()).await?;+ let body = crate::artifacts::preview::read_body(&config, artifact_id.trim()).await?;to_json(Outcome::new(body, vec![]))})}@@ -493,7 +493,7 @@ fn handle_share_artifact(ctx: DispatchCtx, params: Map<String, Value>) -> Contro}};to_json(- crate::agent::artifacts::ops::ai_share_artifact(+ crate::artifacts::ops::ai_share_artifact(&config,artifact_id.trim(),version,@@ -509,7 +509,7 @@ fn handle_delete_artifact(ctx: DispatchCtx, params: Map<String, Value>) -> Contrlet config = ctx.load_config().await?;let artifact_id = read_required::<String>(¶ms, "artifact_id")?;to_json(- crate::agent::artifacts::ops::ai_delete_artifact(&config, artifact_id.trim()).await?,+ crate::artifacts::ops::ai_delete_artifact(&config, artifact_id.trim()).await?,)})}@@ -521,7 +521,7 @@ fn handle_regenerate(ctx: DispatchCtx, params: Map<String, Value>) -> Controllerlet thread_id = read_required::<String>(¶ms, "thread_id")?;let client_id = read_required::<String>(¶ms, "client_id")?;to_json(- crate::agent::artifacts::ops::ai_regenerate(+ crate::artifacts::ops::ai_regenerate(&ctx,&config,artifact_id.trim(),diff --git a/crates/openhuman-core/src/agent/artifacts/schemas_tests.rs b/crates/openhuman-core/src/artifacts/schemas_tests.rssimilarity index 100%rename from crates/openhuman-core/src/agent/artifacts/schemas_tests.rsrename to crates/openhuman-core/src/artifacts/schemas_tests.rsdiff --git a/crates/openhuman-core/src/agent/artifacts/store.rs b/crates/openhuman-core/src/artifacts/store.rssimilarity index 100%rename from crates/openhuman-core/src/agent/artifacts/store.rsrename to crates/openhuman-core/src/artifacts/store.rsdiff --git a/crates/openhuman-core/src/agent/artifacts/store_documents.rs b/crates/openhuman-core/src/artifacts/store_documents.rssimilarity index 100%rename from crates/openhuman-core/src/agent/artifacts/store_documents.rsrename to crates/openhuman-core/src/artifacts/store_documents.rsdiff --git a/crates/openhuman-core/src/agent/artifacts/store_documents_tests.rs b/crates/openhuman-core/src/artifacts/store_documents_tests.rssimilarity index 97%rename from crates/openhuman-core/src/agent/artifacts/store_documents_tests.rsrename to crates/openhuman-core/src/artifacts/store_documents_tests.rsindex 10f937db45..e00790c523 100644--- a/crates/openhuman-core/src/agent/artifacts/store_documents_tests.rs+++ b/crates/openhuman-core/src/artifacts/store_documents_tests.rs@@ -1,10 +1,10 @@use super::*;-use crate::agent::artifacts::store::{+use crate::artifacts::store::{delete_artifact, get_artifact, list_artifacts, read_artifact_args, save_artifact_args,save_artifact_meta,};-use crate::agent::artifacts::types::{ArtifactKind, ArtifactStatus};-use crate::agent::artifacts::FileRoots;+use crate::artifacts::types::{ArtifactKind, ArtifactStatus};+use crate::artifacts::FileRoots;use crate::storage::{MemoryStorage, Scope, StorageBackend};use chrono::{TimeZone, Utc};diff --git a/crates/openhuman-core/src/agent/artifacts/store_tests.rs b/crates/openhuman-core/src/artifacts/store_tests.rssimilarity index 99%rename from crates/openhuman-core/src/agent/artifacts/store_tests.rsrename to crates/openhuman-core/src/artifacts/store_tests.rsindex 48aa5e3711..63a0ceb8e0 100644--- a/crates/openhuman-core/src/agent/artifacts/store_tests.rs+++ b/crates/openhuman-core/src/artifacts/store_tests.rs@@ -2,7 +2,7 @@ use chrono::{TimeZone, Utc};use tempfile::TempDir;use super::*;-use crate::agent::artifacts::types::{ArtifactKind, ArtifactMeta, ArtifactStatus};+use crate::artifacts::types::{ArtifactKind, ArtifactMeta, ArtifactStatus};fn make_meta(id: &str, title: &str, created_at: chrono::DateTime<Utc>) -> ArtifactMeta {ArtifactMeta {diff --git a/crates/openhuman-core/src/agent/artifacts/tiny_store.rs b/crates/openhuman-core/src/artifacts/tiny_store.rssimilarity index 100%rename from crates/openhuman-core/src/agent/artifacts/tiny_store.rsrename to crates/openhuman-core/src/artifacts/tiny_store.rsdiff --git a/crates/openhuman-core/src/agent/artifacts/tiny_store_tests.rs b/crates/openhuman-core/src/artifacts/tiny_store_tests.rssimilarity index 99%rename from crates/openhuman-core/src/agent/artifacts/tiny_store_tests.rsrename to crates/openhuman-core/src/artifacts/tiny_store_tests.rsindex db59821088..0060f9fa95 100644--- a/crates/openhuman-core/src/agent/artifacts/tiny_store_tests.rs+++ b/crates/openhuman-core/src/artifacts/tiny_store_tests.rs@@ -17,7 +17,7 @@ fn temp_dirs() -> (PathBuf, PathBuf) {async fn seeded(workspace: &std::path::Path,_files: &std::path::Path,-) -> crate::agent::artifacts::version_documents::DocumentArtifactStore {+) -> crate::artifacts::version_documents::DocumentArtifactStore {let store = versioned_store(workspace);let record = ArtifactRecord::new("a-1",diff --git a/crates/openhuman-core/src/agent/artifacts/types.rs b/crates/openhuman-core/src/artifacts/types.rssimilarity index 100%rename from crates/openhuman-core/src/agent/artifacts/types.rsrename to crates/openhuman-core/src/artifacts/types.rsdiff --git a/crates/openhuman-core/src/agent/artifacts/types_tests.rs b/crates/openhuman-core/src/artifacts/types_tests.rssimilarity index 100%rename from crates/openhuman-core/src/agent/artifacts/types_tests.rsrename to crates/openhuman-core/src/artifacts/types_tests.rsdiff --git a/crates/openhuman-core/src/agent/artifacts/version_documents.rs b/crates/openhuman-core/src/artifacts/version_documents.rssimilarity index 100%rename from crates/openhuman-core/src/agent/artifacts/version_documents.rsrename to crates/openhuman-core/src/artifacts/version_documents.rsdiff --git a/crates/openhuman-core/src/agent/artifacts/version_documents_tests.rs b/crates/openhuman-core/src/artifacts/version_documents_tests.rssimilarity index 100%rename from crates/openhuman-core/src/agent/artifacts/version_documents_tests.rsrename to crates/openhuman-core/src/artifacts/version_documents_tests.rsdiff --git a/crates/openhuman-core/src/config/ops/agent.rs b/crates/openhuman-core/src/config/ops/agent.rsindex 1f53f7d120..cc72ad87b3 100644--- a/crates/openhuman-core/src/config/ops/agent.rs+++ b/crates/openhuman-core/src/config/ops/agent.rs@@ -420,8 +420,8 @@ pub async fn ensure_agent_dirs(config: &mut Config) {);}let report =- crate::agent::artifacts::migrate_legacy_artifacts(&config.workspace_dir, &files_dir).await;- if report != crate::agent::artifacts::MigrationReport::default() {+ crate::artifacts::migrate_legacy_artifacts(&config.workspace_dir, &files_dir).await;+ if report != crate::artifacts::MigrationReport::default() {tracing::info!(moved = report.moved,cleaned = report.cleaned,diff --git a/crates/openhuman-core/src/config/ops_files_dir_tests.rs b/crates/openhuman-core/src/config/ops_files_dir_tests.rsindex ab3f996a51..f41414ec55 100644--- a/crates/openhuman-core/src/config/ops_files_dir_tests.rs+++ b/crates/openhuman-core/src/config/ops_files_dir_tests.rs@@ -118,8 +118,8 @@ fn a_relative_override_on_disk_falls_back_to_the_default() {/// the default one.#[tokio::test]async fn boot_migrates_legacy_files_into_the_chosen_folder() {- use crate::agent::artifacts::store::save_artifact_meta;- use crate::agent::artifacts::{ArtifactKind, ArtifactMeta, ArtifactStatus};+ use crate::artifacts::store::save_artifact_meta;+ use crate::artifacts::{ArtifactKind, ArtifactMeta, ArtifactStatus};let _g = ENV_LOCK.lock().await;let tmp = tempdir().unwrap();@@ -185,8 +185,8 @@ async fn a_symlinked_route_into_the_data_folder_is_rejected() {/// folder keeps resolving, because that folder is recorded as trusted.#[tokio::test]async fn files_made_before_a_folder_change_keep_resolving() {- use crate::agent::artifacts::store::{create_artifact, finalize_artifact};- use crate::agent::artifacts::{ArtifactKind, FileRoots};+ use crate::artifacts::store::{create_artifact, finalize_artifact};+ use crate::artifacts::{ArtifactKind, FileRoots};let tmp = tempdir().unwrap();let mut cfg = tmp_config(&tmp);@@ -220,7 +220,7 @@ async fn files_made_before_a_folder_change_keep_resolving() {"{:?}",cfg.files_dir_history);- let value = crate::agent::artifacts::ops::ai_get_artifact(&cfg, &meta.id)+ let value = crate::artifacts::ops::ai_get_artifact(&cfg, &meta.id).await.expect("an artifact from the previous folder still resolves").into_cli_compatible_json()diff --git a/crates/openhuman-core/src/core/all.rs b/crates/openhuman-core/src/core/all.rsindex 75192c19d1..fed3b160c3 100644--- a/crates/openhuman-core/src/core/all.rs+++ b/crates/openhuman-core/src/core/all.rs@@ -456,7 +456,7 @@ fn build_registered_controllers() -> Vec<GroupedController> {push(&mut controllers,DomainGroup::Agent,- crate::agent::artifacts::all_artifacts_registered_controllers(),+ crate::artifacts::all_artifacts_registered_controllers(),);// Read-only command palette listing: built-ins merged with skills.list /// flows.list (C5). Tagged `Agent` rather than a new `DomainGroup` variantdiff --git a/crates/openhuman-core/src/core/events.rs b/crates/openhuman-core/src/core/events.rsindex 38f968d1b6..95dc67713e 100644--- a/crates/openhuman-core/src/core/events.rs+++ b/crates/openhuman-core/src/core/events.rs@@ -721,7 +721,7 @@ pub enum DomainEvent {// ── Artifacts ───────────────────────────────────────────────────────/// An artifact transitioned to [`ArtifactStatus::Ready`] — file/// is on disk and ready to be downloaded. Published by- /// [`crate::agent::artifacts::store::finalize_artifact`].+ /// [`crate::artifacts::store::finalize_artifact`]./// Bridged to the web channel as an `artifact_ready` socket event/// when the publishing turn carries an `ApprovalChatContext`/// (see [`crate::security::approval::ApprovalChatContext`]).@@ -790,7 +790,7 @@ pub enum DomainEvent {/// An artifact record has been **created** (`ArtifactStatus::Pending`)/// but no bytes are on disk yet — the producing tool has only just/// reserved the row. Published by- /// [`crate::agent::artifacts::store::create_artifact`].+ /// [`crate::artifacts::store::create_artifact`]./// Bridged to the web channel as an `artifact_pending` socket event/// so the frontend can render an in-progress / "Generating…" card the/// moment the tool dispatches, instead of waiting until the filediff --git a/crates/openhuman-core/src/integrations/file_storage/artifact_publisher.rs b/crates/openhuman-core/src/integrations/file_storage/artifact_publisher.rsindex 4b949e693a..1609b62dd1 100644--- a/crates/openhuman-core/src/integrations/file_storage/artifact_publisher.rs+++ b/crates/openhuman-core/src/integrations/file_storage/artifact_publisher.rs@@ -81,7 +81,7 @@ async fn upload_body(let resolved = tokio::fs::canonicalize(path).await.map_err(|e| anyhow::anyhow!("cannot read the artifact's file: {e}"))?;- if let Some(reason) = crate::agent::artifacts::tiny_store::refused_path(&resolved) {+ if let Some(reason) = crate::artifacts::tiny_store::refused_path(&resolved) {anyhow::bail!("[policy-blocked] cannot share this artifact: {reason}");}let bytes = tokio::fs::read(&resolved)diff --git a/crates/openhuman-core/src/integrations/file_storage/artifact_publisher_tests.rs b/crates/openhuman-core/src/integrations/file_storage/artifact_publisher_tests.rsindex b7d0afad23..c8d7ab612d 100644--- a/crates/openhuman-core/src/integrations/file_storage/artifact_publisher_tests.rs+++ b/crates/openhuman-core/src/integrations/file_storage/artifact_publisher_tests.rs@@ -9,7 +9,7 @@ use wiremock::matchers::{body_string_contains, method, path};use wiremock::{Mock, MockServer, ResponseTemplate};use super::*;-use crate::agent::artifacts::tiny_store::versioned_store;+use crate::artifacts::tiny_store::versioned_store;use crate::security::AutonomyLevel;fn publisher(server_uri: String, autonomy: AutonomyLevel) -> StorageArtifactPublisher {diff --git a/crates/openhuman-core/src/media/generation/artifact_tool.rs b/crates/openhuman-core/src/media/generation/artifact_tool.rsindex e5b068c927..265cfe13d2 100644--- a/crates/openhuman-core/src/media/generation/artifact_tool.rs+++ b/crates/openhuman-core/src/media/generation/artifact_tool.rs@@ -36,8 +36,8 @@ use tinytools::{};use tokio::io::AsyncWriteExt;-use crate::agent::artifacts::production::Production;-use crate::agent::artifacts::ArtifactKind;+use crate::artifacts::production::Production;+use crate::artifacts::ArtifactKind;use crate::security::approval::ApprovalChatContext;use crate::tools::host_extensions::tool_call_id;use tinyagents_harness::tinyinference_video::ProgressFn;@@ -57,7 +57,7 @@ const FILE_REFERENCE_FIELDS: [&str; 8] = [/// Whether a media call references an absolute path under a trusted Files root./// Only these requests need a durable-artifact refresh before tool execution.-fn has_reusable_files_reference(args: &Value, files: &crate::agent::artifacts::FileRoots) -> bool {+fn has_reusable_files_reference(args: &Value, files: &crate::artifacts::FileRoots) -> bool {for field in FILE_REFERENCE_FIELDS {let Some(value) = args.get(field) else {continue;@@ -89,7 +89,7 @@ pub struct MediaArtifactTool<T: Tool> {kind: ArtifactKind,workspace_dir: PathBuf,/// Visible folder each generated file is moved into (#5505).- files_dir: crate::agent::artifacts::FileRoots,+ files_dir: crate::artifacts::FileRoots,blobs: Option<Arc<dyn tinystoragedrivers::BlobStore>>,allowed_references: Option<super::tools::MediaReferenceAllowlist>,/// Builds the inner tool for one call around that call's poll observer.@@ -111,7 +111,7 @@ impl<T: Tool> MediaArtifactTool<T> {inner: T,kind: ArtifactKind,workspace_dir: impl Into<PathBuf>,- files_dir: impl Into<crate::agent::artifacts::FileRoots>,+ files_dir: impl Into<crate::artifacts::FileRoots>,) -> Self {Self {inner,@@ -358,7 +358,7 @@ impl<T: Tool> MediaArtifactTool<T> {.lock().unwrap_or_else(std::sync::PoisonError::into_inner).clone();- let artifacts = match crate::agent::artifacts::store::list_artifacts(+ let artifacts = match crate::artifacts::store::list_artifacts(&self.workspace_dir,0,usize::MAX,@@ -382,9 +382,9 @@ impl<T: Tool> MediaArtifactTool<T> {for meta in artifacts.iter().filter(|meta| {matches!(&meta.kind, ArtifactKind::Image | ArtifactKind::Video)- && matches!(&meta.status, crate::agent::artifacts::ArtifactStatus::Ready)+ && matches!(&meta.status, crate::artifacts::ArtifactStatus::Ready)}) {- let Ok(path) = crate::agent::artifacts::resolve_ready_file_meta(+ let Ok(path) = crate::artifacts::resolve_ready_file_meta(&self.workspace_dir,&self.files_dir,meta,diff --git a/crates/openhuman-core/src/media/generation/artifact_tool_tests.rs b/crates/openhuman-core/src/media/generation/artifact_tool_tests.rsindex f26e5e565d..919b67df3c 100644--- a/crates/openhuman-core/src/media/generation/artifact_tool_tests.rs+++ b/crates/openhuman-core/src/media/generation/artifact_tool_tests.rs@@ -7,7 +7,7 @@ use tinystoragedrivers::BlobStore;use tinytools::{PermissionLevel, Tool, ToolCategory, ToolContent, ToolResult};use super::{copy_blob_to_file, has_reusable_files_reference, MediaArtifactTool};-use crate::agent::artifacts::{ArtifactKind, ArtifactStatus, FileRoots};+use crate::artifacts::{ArtifactKind, ArtifactStatus, FileRoots};#[test]fn artifact_history_is_refreshed_only_for_absolute_paths_in_files_roots() {@@ -208,7 +208,7 @@ async fn files_a_blob_backed_generated_artifact() {let artifact_id = artifact["artifact_id"].as_str().unwrap_or_else(|| panic!("blob-backed media was not filed: {artifact:?}"));- let record = crate::agent::artifacts::store::get_artifact(&workspace, artifact_id)+ let record = crate::artifacts::store::get_artifact(&workspace, artifact_id).await.expect("artifact record");let file = record.file.expect("visible file");@@ -228,7 +228,7 @@ async fn files_a_blob_backed_generated_artifact() {.unwrap().is_none());- let (_, failed_file) = crate::agent::artifacts::create_artifact_for_call(+ let (_, failed_file) = crate::artifacts::create_artifact_for_call(&workspace,files_dir.clone(),ArtifactKind::Video,@@ -240,14 +240,14 @@ async fn files_a_blob_backed_generated_artifact() {.await.unwrap();std::fs::write(&failed_file, b"failed output").unwrap();- let failed = crate::agent::artifacts::store::list_artifacts(&workspace, 0, 10, None)+ let failed = crate::artifacts::store::list_artifacts(&workspace, 0, 10, None).await.unwrap().0.into_iter().find(|meta| meta.title == "Failed generated clip").expect("failed artifact record");- crate::agent::artifacts::fail_artifact(+ crate::artifacts::fail_artifact(&workspace,files_dir.clone(),&failed.id,@@ -275,7 +275,7 @@ async fn files_a_blob_backed_generated_artifact() {assert!(!allowed.contains(&failed_file.canonicalize().unwrap()));}- crate::agent::artifacts::fail_artifact(+ crate::artifacts::fail_artifact(&workspace,fresh.files_dir.clone(),artifact_id,@@ -338,7 +338,7 @@ async fn keeps_source_blob_when_artifact_finalization_fails() {.with_blobs(Arc::clone(&blobs));// An artifact whose file is gone cannot be completed.- let production = crate::agent::artifacts::production::Production::start(+ let production = crate::artifacts::production::Production::start(&tool.workspace_dir,tool.files_dir.clone(),tiny_artifacts::ArtifactKind::Image,@@ -392,7 +392,7 @@ async fn files_a_single_generated_artifact() {assert!(!staging.join("stub-0.png").exists());// The artifact record lives in the document store (no `meta.json`); resolve// it through the store and verify its user-facing Files-folder path.- let meta = crate::agent::artifacts::store::get_artifact(&workspace, artifact_id)+ let meta = crate::artifacts::store::get_artifact(&workspace, artifact_id).await.expect("artifact metadata is persisted");assert_eq!(meta.kind, ArtifactKind::Image);@@ -429,7 +429,7 @@ async fn files_every_artifact_when_n_greater_than_one() {for entry in artifacts {let id = entry["artifact_id"].as_str().expect("artifact_id set");assert!(ids.insert(id.to_string()), "artifact ids must be unique");- let meta = crate::agent::artifacts::store::get_artifact(&workspace, id)+ let meta = crate::artifacts::store::get_artifact(&workspace, id).await.expect("artifact metadata is persisted");assert_eq!(meta.status, ArtifactStatus::Ready);diff --git a/crates/openhuman-core/src/media/generation/tools.rs b/crates/openhuman-core/src/media/generation/tools.rsindex 78d14e8ef4..366d63ae4c 100644--- a/crates/openhuman-core/src/media/generation/tools.rs+++ b/crates/openhuman-core/src/media/generation/tools.rs@@ -20,7 +20,7 @@ use tinytools::{PermissionLevel, Tool, ToolCategory, ToolResult};use super::artifact_tool::MediaArtifactTool;use super::provider::{managed_generators, MediaGenerators};-use crate::agent::artifacts::ArtifactKind;+use crate::artifacts::ArtifactKind;use crate::config::Config;/// Image tool name (pinned by the `media` pack and agent allowlists).@@ -71,7 +71,7 @@ pub(crate) fn build_media_tools_with_allowlist(generators,action_dir,&root_config.workspace_dir,- crate::agent::artifacts::FileRoots::from_config(root_config),+ crate::artifacts::FileRoots::from_config(root_config),// Each poll's job state feeds the call's progress heartbeat// (`super::progress`, wired per call by `MediaArtifactTool`), so a// multi-minute wait is not silent.@@ -87,7 +87,7 @@ pub fn media_tools_from(generators: MediaGenerators,action_dir: &Path,workspace_dir: &Path,- files_dir: impl Into<crate::agent::artifacts::FileRoots>,+ files_dir: impl Into<crate::artifacts::FileRoots>,video_wait: WaitPolicy,) -> Vec<Box<dyn Tool>> {media_tools_from_with_allowlist(@@ -104,7 +104,7 @@ fn media_tools_from_with_allowlist(generators: MediaGenerators,action_dir: &Path,workspace_dir: &Path,- files_dir: impl Into<crate::agent::artifacts::FileRoots>,+ files_dir: impl Into<crate::artifacts::FileRoots>,video_wait: WaitPolicy,allowed_artifacts: MediaReferenceAllowlist,) -> Vec<Box<dyn Tool>> {diff --git a/crates/openhuman-core/src/security/policy/path_checks.rs b/crates/openhuman-core/src/security/policy/path_checks.rsindex ebf447b411..d5d96824c0 100644--- a/crates/openhuman-core/src/security/policy/path_checks.rs+++ b/crates/openhuman-core/src/security/policy/path_checks.rs@@ -678,7 +678,7 @@ impl SecurityPolicy {return false;}- let artifacts = match crate::agent::artifacts::store::list_artifacts(+ let artifacts = match crate::artifacts::store::list_artifacts(&self.workspace_dir,0,usize::MAX,@@ -700,12 +700,12 @@ impl SecurityPolicy {for meta in artifacts.iter().filter(|meta| {matches!(&meta.kind,- crate::agent::artifacts::ArtifactKind::Image- | crate::agent::artifacts::ArtifactKind::Video- ) && matches!(&meta.status, crate::agent::artifacts::ArtifactStatus::Ready)+ crate::artifacts::ArtifactKind::Image+ | crate::artifacts::ArtifactKind::Video+ ) && matches!(&meta.status, crate::artifacts::ArtifactStatus::Ready)}) {let Ok(ready_path) =- crate::agent::artifacts::resolve_ready_file_meta(&self.workspace_dir, &roots, meta)+ crate::artifacts::resolve_ready_file_meta(&self.workspace_dir, &roots, meta).awaitelse {continue;diff --git a/crates/openhuman-core/src/security/policy/policy_media_artifact_tests.rs b/crates/openhuman-core/src/security/policy/policy_media_artifact_tests.rsindex 854296beef..9fc01a02c7 100644--- a/crates/openhuman-core/src/security/policy/policy_media_artifact_tests.rs+++ b/crates/openhuman-core/src/security/policy/policy_media_artifact_tests.rs@@ -1,5 +1,5 @@use super::*;-use crate::agent::artifacts::{create_artifact, finalize_artifact, ArtifactKind, FileRoots};+use crate::artifacts::{create_artifact, finalize_artifact, ArtifactKind, FileRoots};use std::sync::Arc;use tempfile::TempDir;@@ -77,7 +77,7 @@ async fn ready_media_artifacts_are_readable_but_other_files_are_not() {.await.is_err());- crate::agent::artifacts::store::delete_artifact(&workspace, FileRoots::new(files), &image.id)+ crate::artifacts::store::delete_artifact(&workspace, FileRoots::new(files), &image.id).await.unwrap();tokio::fs::write(&image_path, b"unrelated replacement")diff --git a/crates/openhuman-core/src/security/policy/types.rs b/crates/openhuman-core/src/security/policy/types.rsindex c2f36c2ec0..d02a708ba3 100644--- a/crates/openhuman-core/src/security/policy/types.rs+++ b/crates/openhuman-core/src/security/policy/types.rs@@ -268,7 +268,7 @@ pub struct SecurityPolicy {/// Configured Files roots used to resolve Ready artifact records after a/// session is rebuilt.#[doc(hidden)]- pub media_files_roots: Arc<std::sync::Mutex<Option<crate::agent::artifacts::FileRoots>>>,+ pub media_files_roots: Arc<std::sync::Mutex<Option<crate::artifacts::FileRoots>>>,/// Whether the agent may install OS packages via the `install_tool` tool.pub allow_tool_install: bool,/// Tool names the user has pre-approved ("Always allow"). The `ApprovalGate`diff --git a/crates/openhuman-core/src/threads/artifact_rows.rs b/crates/openhuman-core/src/threads/artifact_rows.rsindex 7e5dc50ee4..4b95f53875 100644--- a/crates/openhuman-core/src/threads/artifact_rows.rs+++ b/crates/openhuman-core/src/threads/artifact_rows.rs@@ -27,7 +27,7 @@ use chrono::{DateTime, Utc};use serde_json::json;use tinybus::{EventHandler, SubscriptionHandle};-use crate::agent::artifacts::types::{ArtifactMeta, ArtifactStatus};+use crate::artifacts::types::{ArtifactMeta, ArtifactStatus};use crate::core::events::DomainEvent;use crate::core::runtime::DispatchCtx;use crate::threads::store::{self as conversations, ConversationMessage};@@ -184,7 +184,7 @@ pub async fn backfill_artifact_rows() -> Result<Vec<ConversationMessage>, String> {let mut artifacts = Vec::new();loop {- let (page, total) = crate::agent::artifacts::store::list_artifacts(+ let (page, total) = crate::artifacts::store::list_artifacts(workspace_dir,artifacts.len(),BACKFILL_PAGE,diff --git a/crates/openhuman-core/src/threads/artifact_rows_tests.rs b/crates/openhuman-core/src/threads/artifact_rows_tests.rsindex 569192e1cf..06f629b5b1 100644--- a/crates/openhuman-core/src/threads/artifact_rows_tests.rs+++ b/crates/openhuman-core/src/threads/artifact_rows_tests.rs@@ -4,7 +4,7 @@ use chrono::{DateTime, TimeZone, Utc};use serde_json::json;use super::*;-use crate::agent::artifacts::types::{ArtifactKind, ArtifactMeta, ArtifactStatus};+use crate::artifacts::types::{ArtifactKind, ArtifactMeta, ArtifactStatus};use crate::core::runtime::DispatchCtx;use crate::threads::store::{self as conversations, CreateConversationThread};diff --git a/crates/openhuman-core/src/tools/impl/document/mod.rs b/crates/openhuman-core/src/tools/impl/document/mod.rsindex 6ef7b66061..799c8753d5 100644--- a/crates/openhuman-core/src/tools/impl/document/mod.rs+++ b/crates/openhuman-core/src/tools/impl/document/mod.rs@@ -32,7 +32,7 @@ use std::time::Duration;use async_trait::async_trait;use serde_json::{json, Value};-use crate::agent::artifacts::production::Production;+use crate::artifacts::production::Production;use crate::security::SecurityPolicy;use tinytools::{PermissionLevel, Tool, ToolResult};@@ -72,7 +72,7 @@ pub const TOOL_NAME: &str = "generate_document";pub struct DocumentTool {workspace_dir: PathBuf,/// Visible folder the generated document is written into (#5505).- files_dir: crate::agent::artifacts::FileRoots,+ files_dir: crate::artifacts::FileRoots,/// Retained for constructor parity with [`PresentationTool`] (both are/// registered identically in `tools::ops`) and for future features/// (e.g. embedding a `File`-source image) that will need the same@@ -88,7 +88,7 @@ impl DocumentTool {/// both tools register with an identical call).pub fn new(workspace_dir: PathBuf,- files_dir: impl Into<crate::agent::artifacts::FileRoots>,+ files_dir: impl Into<crate::artifacts::FileRoots>,security: Arc<SecurityPolicy>,) -> Self {Self {@@ -103,7 +103,7 @@ impl DocumentTool {pub fn for_config(config: &crate::config::Config, security: Arc<SecurityPolicy>) -> Self {Self::new(config.workspace_dir.clone(),- crate::agent::artifacts::FileRoots::from_config(config),+ crate::artifacts::FileRoots::from_config(config),security,)}@@ -276,7 +276,7 @@ impl DocumentTool {// Retry can re-dispatch this exact spec (#3162). Best-effort: a// write failure only forfeits regeneration, never aborts an// otherwise-successful generation.- if let Err(err) = crate::agent::artifacts::store::save_artifact_args(+ if let Err(err) = crate::artifacts::store::save_artifact_args(&self.workspace_dir,production.id(),&args,diff --git a/crates/openhuman-core/src/tools/impl/presentation/mod.rs b/crates/openhuman-core/src/tools/impl/presentation/mod.rsindex e5db47f616..dfd315ea27 100644--- a/crates/openhuman-core/src/tools/impl/presentation/mod.rs+++ b/crates/openhuman-core/src/tools/impl/presentation/mod.rs@@ -35,8 +35,8 @@ use std::time::Duration;use async_trait::async_trait;use serde_json::{json, Value};-use crate::agent::artifacts::production::Production;-use crate::agent::artifacts::read_artifact_bytes;+use crate::artifacts::production::Production;+use crate::artifacts::read_artifact_bytes;use crate::security::SecurityPolicy;use tinytools::{PermissionLevel, Tool, ToolResult};@@ -107,7 +107,7 @@ impl ImageInspector for ModuleImageInspector<'_> {pub struct PresentationTool {workspace_dir: PathBuf,/// Visible folder the generated deck is written into (#5505).- files_dir: crate::agent::artifacts::FileRoots,+ files_dir: crate::artifacts::FileRoots,/// Existing host config when the caller already owns the authoritative/// runtime snapshot. Keeping this optional preserves the ordinary agent/// constructor while avoiding a process-global config reload during@@ -130,7 +130,7 @@ impl PresentationTool {/// active [`SecurityPolicy`] for validating `File`-source image paths.pub fn new(workspace_dir: PathBuf,- files_dir: impl Into<crate::agent::artifacts::FileRoots>,+ files_dir: impl Into<crate::artifacts::FileRoots>,security: Arc<SecurityPolicy>,) -> Self {Self {@@ -147,7 +147,7 @@ impl PresentationTool {pub fn for_config(config: &crate::config::Config, security: Arc<SecurityPolicy>) -> Self {Self::with_config(config.workspace_dir.clone(),- crate::agent::artifacts::FileRoots::from_config(config),+ crate::artifacts::FileRoots::from_config(config),security,config.clone(),)@@ -156,7 +156,7 @@ impl PresentationTool {/// Construct the tool with an authoritative host config snapshot.pub(crate) fn with_config(workspace_dir: PathBuf,- files_dir: impl Into<crate::agent::artifacts::FileRoots>,+ files_dir: impl Into<crate::artifacts::FileRoots>,security: Arc<SecurityPolicy>,config: crate::config::Config,) -> Self {@@ -381,7 +381,7 @@ impl PresentationTool {// Retry can re-dispatch this exact spec deterministically (#3162).// Best-effort: a write failure only forfeits future regeneration,// it must not abort an otherwise-successful generation.- if let Err(err) = crate::agent::artifacts::store::save_artifact_args(+ if let Err(err) = crate::artifacts::store::save_artifact_args(&self.workspace_dir,production.id(),&args,diff --git a/crates/openhuman-core/src/tools/impl/presentation/types.rs b/crates/openhuman-core/src/tools/impl/presentation/types.rsindex 8a2f9d4b52..7359b11f70 100644--- a/crates/openhuman-core/src/tools/impl/presentation/types.rs+++ b/crates/openhuman-core/src/tools/impl/presentation/types.rs@@ -19,7 +19,7 @@ pub(super) use crate::tools::implementations::document::format::spec::presentatipub enum SlideImageSource {/// Bytes from a workspace artifact (e.g. a chart the agent produced/// earlier via another tool). Resolved through- /// [`crate::agent::artifacts::read_artifact_bytes`].+ /// [`crate::artifacts::read_artifact_bytes`].Artifact { artifact_id: String },/// Bytes from a local filesystem path the agent already has read/// access to (e.g. a screenshot saved under the action dir).diff --git a/crates/openhuman-core/src/tools/ops.rs b/crates/openhuman-core/src/tools/ops.rsindex dfa8b509e2..d9e10ee254 100644--- a/crates/openhuman-core/src/tools/ops.rs+++ b/crates/openhuman-core/src/tools/ops.rs@@ -168,9 +168,9 @@ pub fn all_tools_with_runtime(// default-OFF via `tools::user_filter` (their toggle IDs default off// in onboarding). The per-call permission ladder still gates them.]);- tools.extend(crate::agent::artifacts::tiny_store::registered_tools(+ tools.extend(crate::artifacts::tiny_store::registered_tools(&config.workspace_dir,- crate::agent::artifacts::FileRoots::from_config(&config),+ crate::artifacts::FileRoots::from_config(&config),action_dir,crate::integrations::file_storage::artifact_publisher(&config),));@@ -413,7 +413,7 @@ pub fn all_tools_with_runtime(.media_files_roots.lock().unwrap_or_else(std::sync::PoisonError::into_inner) =- Some(crate::agent::artifacts::FileRoots::from_config(root_config));+ Some(crate::artifacts::FileRoots::from_config(root_config));tools.extend(crate::media::generation::build_media_tools_with_allowlist(root_config,action_dir,diff --git a/crates/openhuman-core/src/tools/ops_tests_default_registry_tests.rs b/crates/openhuman-core/src/tools/ops_tests_default_registry_tests.rsindex 6695e34b93..df5b6e8be6 100644--- a/crates/openhuman-core/src/tools/ops_tests_default_registry_tests.rs+++ b/crates/openhuman-core/src/tools/ops_tests_default_registry_tests.rs@@ -568,7 +568,7 @@ async fn document_tool_writes_into_the_configured_files_folder() {.await;let (artifacts, _) =- crate::agent::artifacts::store::list_artifacts(&cfg.workspace_dir, 0, 10, None)+ crate::artifacts::store::list_artifacts(&cfg.workspace_dir, 0, 10, None).await.expect("list artifacts");assert_eq!(artifacts.len(), 1, "{artifacts:?}");diff --git a/crates/openhuman-embed/src/artifacts.rs b/crates/openhuman-embed/src/artifacts.rsindex 8bc9708aa8..8dd7a43c18 100644--- a/crates/openhuman-embed/src/artifacts.rs+++ b/crates/openhuman-embed/src/artifacts.rs@@ -4,9 +4,9 @@//! The constructors below the line exist for host tests that need a real//! artifact on disk; production hosts only resolve.-pub use openhuman_core::agent::artifacts::{resolve_ready_file, FileRoots};+pub use openhuman_core::artifacts::{resolve_ready_file, FileRoots};#[doc(hidden)]-pub use openhuman_core::agent::artifacts::{+pub use openhuman_core::artifacts::{create_artifact, finalize_artifact, ArtifactKind, ArtifactMeta, ArtifactStatus,};diff --git a/vendor/tinyagents b/vendor/tinyagentsindex 9af6b67739..a90b49492d 160000--- a/vendor/tinyagents+++ b/vendor/tinyagents@@ -1 +1 @@-Subproject commit 9af6b677393c74a589f2062413c42689ecf935cd+Subproject commit a90b49492d7613f7f4a7a1bc652af9d201841893