Skip to content

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

refactor(storage): widen session agent helper visibility to crate

Steven Enamakel9ef5c627b930
diff --git a/crates/openhuman-core/src/storage/import/sessions/agents.rs b/crates/openhuman-core/src/storage/import/sessions/agents.rs
index ffa3ce14d9..e31bf7b4d2 100644
--- a/crates/openhuman-core/src/storage/import/sessions/agents.rs
+++ b/crates/openhuman-core/src/storage/import/sessions/agents.rs
@@ -4,7 +4,7 @@ use tinyagents_session::transcript::{session_stem, SessionRef};
/// The agent definitions a stem may belong to, by the component their ids
/// encode to in a stem.
-pub(super) fn known_agents() -> HashMap<String, String> {
+pub(crate) fn known_agents() -> HashMap<String, String> {
let mut ids: Vec<String> =
crate::agent_registry::host_definition::AgentDefinitionRegistry::builtins_only()
.list()
@@ -31,7 +31,7 @@ fn agent_component(id: &str) -> Option<String> {
}
/// The agent whose component `stem` carries, if it is one of `known`.
-pub(super) fn agent_of(stem: &str, known: &HashMap<String, String>) -> Option<String> {
+pub(crate) fn agent_of(stem: &str, known: &HashMap<String, String>) -> Option<String> {
// Sub-agent transcripts (`parent__child`) belong to their root's agent.
let root = stem.split("__").next().unwrap_or(stem);
let mut parts: Vec<&str> = root.split('.').collect();