Skip to content

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

fix(subagent-host): resolve flow archetype config without type ambiguity

Steven Enamakel71781d08d7a7
diff --git a/crates/openhuman-core/src/agent/subagent_host/ops/runner.rs b/crates/openhuman-core/src/agent/subagent_host/ops/runner.rs
index 0520695735..c0cd15cd7d 100644
--- a/crates/openhuman-core/src/agent/subagent_host/ops/runner.rs
+++ b/crates/openhuman-core/src/agent/subagent_host/ops/runner.rs
@@ -556,7 +556,7 @@ async fn load_typed_prompt_source(
) -> Result<String, SubagentRunError> {
#[cfg(feature = "flows")]
let flow_archetype_text = crate::agent::prompts::flow_archetype::load_for_definition(
- config.as_ref().ok().map(AsRef::as_ref),
+ config.as_ref().ok().map(|config| config.as_ref()),
definition,
)
.await?;
diff --git a/tests/tinyflows_published_prompt_e2e.rs b/tests/tinyflows_published_prompt_e2e.rs
index 32b5cac40e..bb9514978b 100644
--- a/tests/tinyflows_published_prompt_e2e.rs
+++ b/tests/tinyflows_published_prompt_e2e.rs
@@ -2,9 +2,16 @@
#[path = "support/published_tinyflows.rs"]
mod published_tinyflows;
+#[path = "support/env_guard.rs"]
+mod env_guard;
+
+use env_guard::EnvVarGuard;
#[tokio::test]
async fn published_module_prompts_render_through_the_normal_host_path() {
+ let _source_guard = EnvVarGuard::unset("OPENHUMAN_MODULE_SOURCE");
+ let _source_dir_guard = EnvVarGuard::unset("OPENHUMAN_MODULE_SOURCE_DIR");
+ let _tinyflows_source_guard = EnvVarGuard::unset("OPENHUMAN_MODULE_SOURCE_TINYFLOWS");
let (library, _) = published_tinyflows::staged_v0_8_26_module();
let temp = tempfile::tempdir().expect("scratch directory");
let workspace = temp.path().join("workspace");