Skip to content

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

fix(threads): handle missing thread store gracefully

Steven Enamakel2986122e615c
diff --git a/crates/openhuman-core/src/threads/mod.rs b/crates/openhuman-core/src/threads/mod.rs
index e4b271310b..c18ac79a6a 100644
--- a/crates/openhuman-core/src/threads/mod.rs
+++ b/crates/openhuman-core/src/threads/mod.rs
@@ -1,12 +1,13 @@
//! Conversation thread and message management.
//!
//! Thread lifecycle (create, list, delete, purge) and per-thread message
-//! CRUD. Storage delegates to `memory::conversations` JSONL files; this
-//! module owns the RPC surface and controller registry.
+//! CRUD. Storage is [`store`] (JSONL files over `tinyagents_session::threads`);
+//! this module owns the RPC surface and controller registry.
pub mod error;
pub mod ops;
pub mod schemas;
+pub mod store;
#[cfg(test)]
mod transcript_host_tests;
pub mod turn_state;
diff --git a/crates/openhuman-core/src/threads/store/mod.rs b/crates/openhuman-core/src/threads/store/mod.rs
index 14b0a6b771..5e4c731aeb 100644
--- a/crates/openhuman-core/src/threads/store/mod.rs
+++ b/crates/openhuman-core/src/threads/store/mod.rs
@@ -1,19 +1,19 @@
-//! Workspace-backed conversation thread/message storage — the whole thing,
-//! store and wiring both.
+//! Workspace-backed chat thread/message storage (`threads::store`).
//!
//! Conversations are JSONL files under `<workspace>/memory/conversations/`:
//! thread metadata as an append-only upsert/delete log in `threads.jsonl`, and
//! each thread's messages in a dedicated file under
//! `threads/<hex(thread_id)>.jsonl`. This is **transcript persistence** — the
//! raw records plus a trigram/CJK-bigram index for cross-thread substring
-//! search over them. The summary-tree archival of the same transcripts is
-//! [`crate::memory::tree`], a different index answering a different
-//! question.
+//! search over them. It is not memory: memory v2 (`crate::memory`) only
+//! *ingests* committed turns through its own bus subscriber.
//!
//! The store itself (on-disk format, locking, warm index cache, CRUD and
-//! search) is the `tinymemory-conversations` crate, re-exported below so
-//! callers keep naming `crate::threads::store::{...}`. What stays here
-//! is host wiring:
+//! search) is `tinyagents_session::threads`, re-exported below so callers
+//! name `crate::threads::store::{...}`. The two message types keep their
+//! historical host spelling (`ConversationMessage`, `ConversationMessagePatch`)
+//! as aliases of `ThreadMessage` / `ThreadMessagePatch`; type names never
+//! reach the disk. What stays here is host wiring:
//!
//! - [`blocking`] - `spawn_blocking` wrappers. Every store entry point is
//! synchronous and can take `parking_lot` locks across fsync'd file IO, so an
@@ -29,13 +29,13 @@
pub mod blocking;
mod bus;
-use tinymemory_conversations as store;
+use tinyagents_session::threads as store;
pub use bus::register_conversation_persistence_subscriber;
pub use store::{
append_message, delete_messages_from, delete_thread, ensure_thread, get_messages,
is_deterministic_message_id, list_threads, purge_threads, reply_run_id, run_reply_message_id,
- update_message, update_thread_labels, update_thread_title, ConversationMessage,
- ConversationMessagePatch, ConversationPurgeStats, ConversationStore, ConversationThread,
- CreateConversationThread, CrossThreadHit,
+ update_message, update_thread_labels, update_thread_title, ConversationPurgeStats,
+ ConversationStore, ConversationThread, CreateConversationThread, CrossThreadHit,
+ ThreadMessage as ConversationMessage, ThreadMessagePatch as ConversationMessagePatch,
};