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
fix(agent): correct session import and replay logic
Steven Enamakel79fac06af382
diff --git a/crates/openhuman-core/src/agent/goals/store.rs b/crates/openhuman-core/src/agent/goals/store.rsindex 0bca501bf2..9270b8c878 100644--- a/crates/openhuman-core/src/agent/goals/store.rs+++ b/crates/openhuman-core/src/agent/goals/store.rs@@ -17,7 +17,7 @@ use std::path::Path;use std::sync::Arc;use super::ThreadGoal;-use crate::agent::session_import::ops::open_session_stores;+use tinyagents_session::transcript::import::ops::open_session_stores;use tinyagents_graph::goals::store as crate_store;use tinyagents_harness::store::Store;diff --git a/crates/openhuman-core/src/agent/session_import/live_tests.rs b/crates/openhuman-core/src/agent/session_import/live_tests.rsindex 8fa81ec7b4..ad5a627c84 100644--- a/crates/openhuman-core/src/agent/session_import/live_tests.rs+++ b/crates/openhuman-core/src/agent/session_import/live_tests.rs@@ -13,13 +13,17 @@ use std::path::Path;use tempfile::TempDir;use tinyagents_harness::store::{AppendStore, FileStore, JsonlAppendStore, Store};-use super::convert::{journal_messages, sanitize_store_name, stream_name};-use super::live::{- dual_write_enabled, shadow_read_compare, shadow_reads_enabled, write_live_turn,+use super::live::{dual_write_enabled, shadow_reads_enabled};+use super::projector::journal_message_from_transcript as project;+use tinyagents_session::transcript::import::convert::{+ journal_messages as journal_messages_with, sanitize_store_name, stream_name,+};+use tinyagents_session::transcript::import::live::{+ shadow_read_compare as shadow_read_compare_with, write_live_turn as write_live_turn_with,ShadowReadOutcome,};-use super::ops::store_root;-use super::types::{JournalMessage, SessionDescriptor, NS_SESSIONS};+use tinyagents_session::transcript::import::ops::store_root;+use tinyagents_session::transcript::import::types::{JournalMessage, SessionDescriptor, NS_SESSIONS};use crate::agent::messages::{attach_chat_tool_failure_metadata, attach_chat_turn_usage_metadata,transcript_message_from_chat, ChatMessage,@@ -29,6 +33,26 @@ use tinyagents_session::transcript::{TranscriptToolCall, TurnUsage,};+fn journal_messages(t: &SessionTranscript) -> Vec<JournalMessage> {+ journal_messages_with(t, project)+}++async fn write_live_turn(+ workspace: &Path,+ key: &str,+ t: &SessionTranscript,+) -> anyhow::Result<()> {+ write_live_turn_with(workspace, key, t, project).await+}++async fn shadow_read_compare(+ workspace: &Path,+ key: &str,+ t: &SessionTranscript,+) -> ShadowReadOutcome {+ shadow_read_compare_with(workspace, key, t, project).await+}+fn durable_messages(messages: &[ChatMessage],) -> Vec<tinyagents_session::transcript::TranscriptMessage> {diff --git a/crates/openhuman-core/src/agent/tinyagents/journal.rs b/crates/openhuman-core/src/agent/tinyagents/journal.rsindex c958522cee..a299ef481e 100644--- a/crates/openhuman-core/src/agent/tinyagents/journal.rs+++ b/crates/openhuman-core/src/agent/tinyagents/journal.rs@@ -61,7 +61,7 @@ use tinyagents_harness::observability::{};use tinyagents_harness::store::{FileStore, Store};-use crate::agent::session_import::ops::open_session_stores;+use tinyagents_session::transcript::import::ops::open_session_stores;/// KV namespace the durable per-run [`HarnessRunStatus`] snapshots live under/// (`{workspace}/tinyagents_store/kv/run_status/<run_id>.json`). Slash-free sodiff --git a/crates/openhuman-core/src/agent/tinyagents/reaper.rs b/crates/openhuman-core/src/agent/tinyagents/reaper.rsindex d7a6a9d112..a02981b2df 100644--- a/crates/openhuman-core/src/agent/tinyagents/reaper.rs+++ b/crates/openhuman-core/src/agent/tinyagents/reaper.rs@@ -21,7 +21,7 @@ use tinyagents_harness::events::HarnessRunStatus;use tinyagents_harness::ids::{ExecutionStatus, HarnessPhase};use tinyagents_harness::observability::HarnessStatusStore;-use crate::agent::session_import::ops::open_session_stores;+use tinyagents_session::transcript::import::ops::open_session_stores;use crate::agent::tinyagents::journal::FileStatusStore;/// Error recorded on a run reaped by the startup sweep. Stable + grep-friendlydiff --git a/crates/openhuman-core/src/agent/tinyagents/replay/ops.rs b/crates/openhuman-core/src/agent/tinyagents/replay/ops.rsindex 9dbc5a10e6..9fa5a6155e 100644--- a/crates/openhuman-core/src/agent/tinyagents/replay/ops.rs+++ b/crates/openhuman-core/src/agent/tinyagents/replay/ops.rs@@ -17,7 +17,7 @@ use tinyagents_harness::observability::{AgentObservation, HarnessEventJournal, HarnessStatusStore, StoreEventJournal,};-use crate::agent::session_import::ops::open_session_stores;+use tinyagents_session::transcript::import::ops::open_session_stores;use crate::agent::tinyagents::journal::FileStatusStore;/// Default page size for [`read_run_events_page`] when the caller omits `limit`.diff --git a/crates/openhuman-core/src/agent/tinyagents/todos.rs b/crates/openhuman-core/src/agent/tinyagents/todos.rsindex 9fb62a0358..bbad1d4e87 100644--- a/crates/openhuman-core/src/agent/tinyagents/todos.rs+++ b/crates/openhuman-core/src/agent/tinyagents/todos.rs@@ -14,7 +14,7 @@ use std::sync::Arc;use tinyagents_harness::store::Store;-use crate::agent::session_import::ops::open_session_stores;+use tinyagents_session::transcript::import::ops::open_session_stores;/// The `workspace`-scoped store every session's list lives in, keyed by/// session/thread id. Opened fresh per call (cheap — `FileStore` just holds a