Skip to content

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

refactor(threads): simplify storage schema imports

Steven Enamakeldf27b1f43893
diff --git a/crates/openhuman-core/src/threads/attachments/staged.rs b/crates/openhuman-core/src/threads/attachments/staged.rs
index 4d34265447..ee822ac7de 100644
--- a/crates/openhuman-core/src/threads/attachments/staged.rs
+++ b/crates/openhuman-core/src/threads/attachments/staged.rs
@@ -25,7 +25,7 @@ pub(super) struct StagedAttachmentClaim {
}
pub(super) const STAGED_DOMAIN: &str = "threads::attachments";
-pub(super) const STAGED_COLLECTION: &str = crate::threads::store::storage_schema::STAGED_ATTACHMENTS;
+pub(super) const STAGED_COLLECTION: &str = crate::threads::store::STAGED_ATTACHMENTS;
pub(super) const STAGED_TTL_SECS: i64 = 7 * 24 * 60 * 60;
pub(super) fn staged_doc_id(opaque_id: &str) -> Result<String, String> {
diff --git a/crates/openhuman-core/src/threads/channel_projection.rs b/crates/openhuman-core/src/threads/channel_projection.rs
index 3543b48dea..120c2ddd2f 100644
--- a/crates/openhuman-core/src/threads/channel_projection.rs
+++ b/crates/openhuman-core/src/threads/channel_projection.rs
@@ -21,7 +21,7 @@ use crate::storage::{
};
const DOMAIN: &str = "threads::channel_projection";
-const COLLECTION: &str = super::store::storage_schema::CHANNEL_MESSAGES;
+const COLLECTION: &str = super::store::CHANNEL_MESSAGES;
const LOG_PREFIX: &str = "[threads:channel-projection]";
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
diff --git a/crates/openhuman-core/src/threads/store/mod.rs b/crates/openhuman-core/src/threads/store/mod.rs
index c7be4009a2..ac7b32f74a 100644
--- a/crates/openhuman-core/src/threads/store/mod.rs
+++ b/crates/openhuman-core/src/threads/store/mod.rs
@@ -39,6 +39,7 @@ mod bus;
mod legacy_import;
mod storage_schema;
pub use storage_schema::storage_schema;
+pub(crate) use storage_schema::{CHANNEL_MESSAGES, REPLY_VISEME_TIMELINES, STAGED_ATTACHMENTS};
#[cfg(test)]
#[path = "legacy_import_tests.rs"]
mod legacy_import_tests;
diff --git a/crates/openhuman-core/src/web_chat/voice_notes.rs b/crates/openhuman-core/src/web_chat/voice_notes.rs
index 25a9f9e6ce..c5972ab60a 100644
--- a/crates/openhuman-core/src/web_chat/voice_notes.rs
+++ b/crates/openhuman-core/src/web_chat/voice_notes.rs
@@ -51,7 +51,7 @@ fn viseme_repo(ctx: &crate::core::runtime::DispatchCtx, workspace: &Path) -> Res
}
const VISEME_DOMAIN: &str = "web_chat::voice_notes";
-const VISEME_COLLECTION: &str = crate::threads::store::storage_schema::REPLY_VISEME_TIMELINES;
+const VISEME_COLLECTION: &str = crate::threads::store::REPLY_VISEME_TIMELINES;
/// Largest note the store accepts (decoded bytes).
pub(crate) const MAX_NOTE_BYTES: usize = 25 * 1024 * 1024;