Skip to content

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

refactor(subagent_host): expose lifecycle persistence path helpers to the module

Steven Enamakel3b6509adfe5d
diff --git a/crates/openhuman-core/src/agent/subagent_host/lifecycle/persistence.rs b/crates/openhuman-core/src/agent/subagent_host/lifecycle/persistence.rs
index 496a773320..3973cfca83 100644
--- a/crates/openhuman-core/src/agent/subagent_host/lifecycle/persistence.rs
+++ b/crates/openhuman-core/src/agent/subagent_host/lifecycle/persistence.rs
@@ -91,7 +91,10 @@ impl OpenHumanPersistence {
.expect("valid subagent pause key has a persistence path")
}
- fn legacy_pause_path(&self, key: &SubagentTaskKey) -> std::path::PathBuf {
+ pub(in crate::agent::subagent_host) fn legacy_pause_path(
+ &self,
+ key: &SubagentTaskKey,
+ ) -> std::path::PathBuf {
self.checkpoint_dir
.join("lifecycle")
.join(format!("{}.pause.json", Self::key_component(key)))
@@ -103,7 +106,7 @@ impl OpenHumanPersistence {
.join(format!("{}.terminal.json", Self::key_component(key)))
}
- fn index_path(&self, task_id: &str) -> std::path::PathBuf {
+ pub(in crate::agent::subagent_host) fn index_path(&self, task_id: &str) -> std::path::PathBuf {
self.checkpoint_dir
.join("lifecycle")
.join(format!("task-{}.index.json", Self::task_component(task_id)))
diff --git a/crates/openhuman-core/src/agent/subagent_host/lifecycle_tests.rs b/crates/openhuman-core/src/agent/subagent_host/lifecycle_tests.rs
index 6efd0de938..5ca06e50b7 100644
--- a/crates/openhuman-core/src/agent/subagent_host/lifecycle_tests.rs
+++ b/crates/openhuman-core/src/agent/subagent_host/lifecycle_tests.rs
@@ -2,6 +2,7 @@ use std::{
collections::HashMap,
sync::{Arc, Mutex},
};
+use crate::agent::subagent_host::types::SubagentCheckpointData;
use tinyagents_orchestration::subagent::{
PersistedSubagentPause, SubagentOutcome, SubagentOutcomeKind, SubagentPause,
SubagentPausePersistenceDisposition, SubagentPersistence, SubagentResume, SubagentTaskKey,