Skip to content

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

chore: files changed crates/openhuman-core/src/agent/session_store/mod.rs,crates/openhuman-core/src/

Steven Enamakel7c1fa1e1fd00
diff --git a/crates/openhuman-core/src/agent/session_store/mod.rs b/crates/openhuman-core/src/agent/session_store/mod.rs
index 33e6419fec..1a7c92bf2f 100644
--- a/crates/openhuman-core/src/agent/session_store/mod.rs
+++ b/crates/openhuman-core/src/agent/session_store/mod.rs
@@ -18,7 +18,6 @@ use std::collections::HashMap;
use std::sync::{Arc, LazyLock, Mutex, PoisonError, RwLock};
use tinyagents_session::port::{AgentStores, SessionStoreProvider};
-use tinyagents_session::transcript::agent_transcript_root;
pub mod ledger_sync;
mod rebound;
@@ -196,28 +195,6 @@ pub fn workspace_transcripts(
}
}
-/// The workspace root transcripts are written under: the agent's own
-/// directory under an embedded agent's context, else `workspace_dir` — which
-/// for a SaaS profile's default agent is that profile's own workspace.
-#[must_use]
-pub fn transcript_root(workspace_dir: &std::path::Path) -> std::path::PathBuf {
- match current_embedded_agent() {
- Some(agent) => agent_transcript_root(workspace_dir, &agent),
- None => workspace_dir.to_path_buf(),
- }
-}
-
-/// The embedded agent the calling tenant runs as, if any. A SaaS profile's
-/// default agent has none: its transcripts live at its workspace root, which
-/// no other profile shares. A SaaS task with no scope has none either; the
-/// workspace it was handed is the only one it touches.
-#[must_use]
-pub fn current_embedded_agent() -> Option<String> {
- crate::core::runtime::current_tenant()
- .ok()
- .and_then(|tenant| tenant.agent)
-}
-
/// The stores of the tenant the current [`CoreContext`] works for, keyed by
/// [`session_key`](crate::core::runtime::session_key): the agent it was
/// derived for ([`CoreContext::session_agent`]), else [`DEFAULT_AGENT`],
diff --git a/crates/openhuman-core/src/agent/session_store/mod_tests.rs b/crates/openhuman-core/src/agent/session_store/mod_tests.rs
index 6a1a062451..4cb06a5b5e 100644
--- a/crates/openhuman-core/src/agent/session_store/mod_tests.rs
+++ b/crates/openhuman-core/src/agent/session_store/mod_tests.rs
@@ -171,23 +171,19 @@ async fn under<T>(ctx: Arc<crate::core::runtime::CoreContext>, f: impl FnOnce()
}
#[tokio::test]
-async fn desktop_session_keys_and_transcript_roots_are_unchanged() {
- let ws = std::path::Path::new("/ws");
+async fn desktop_session_keys_are_unchanged() {
assert_eq!(current_agent_key_or("orchestrator"), "orchestrator");
- assert_eq!(transcript_root(ws), ws.to_path_buf());
- let (key, root) = under(derived(None, Some("alpha")), || {
- (current_agent_key_or("orchestrator"), transcript_root(ws))
+ let key = under(derived(None, Some("alpha")), || {
+ current_agent_key_or("orchestrator")
})
.await;
assert_eq!(key, "alpha");
- assert_eq!(root, agent_transcript_root(ws, "alpha"));
}
#[tokio::test]
async fn two_profiles_default_agents_keep_separate_session_keys_and_stores() {
- let ws = std::path::Path::new("/ws-profile");
- let (alice_key, alice_root) = under(derived(Some("alice"), None), || {
- (current_agent_key_or("orchestrator"), transcript_root(ws))
+ let alice_key = under(derived(Some("alice"), None), || {
+ current_agent_key_or("orchestrator")
})
.await;
let bob_key = under(derived(Some("bob"), None), || {
@@ -196,8 +192,6 @@ async fn two_profiles_default_agents_keep_separate_session_keys_and_stores() {
.await;
assert_eq!(alice_key, "alice~default");
assert_eq!(bob_key, "bob~default");
- // The default agent's transcripts sit at the profile's workspace root.
- assert_eq!(alice_root, ws.to_path_buf());
let provider: Arc<dyn SessionStoreProvider> = Arc::new(InMemorySessionStores::new());
let stores_of = |profile: &'static str| {