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
refactor(flows): make engine-compatible graph lookup async
Steven Enamakel60e2f12cfaa3
diff --git a/crates/openhuman-core/src/flows/ops/definitions.rs b/crates/openhuman-core/src/flows/ops/definitions.rsindex 30f4179077..bde9d4d11f 100644--- a/crates/openhuman-core/src/flows/ops/definitions.rs+++ b/crates/openhuman-core/src/flows/ops/definitions.rs@@ -176,13 +176,13 @@ pub fn load_flow_graph(config: &Config, id: &str) -> Result<Option<WorkflowGraph/// Resolver-only saved-graph lookup. Authoring tools use [`load_flow_graph`]/// so a legacy draft can still be opened and repaired; execution resolves only/// graphs the current engine can run safely.-pub(crate) fn load_engine_compatible_flow_graph(+pub(crate) async fn load_engine_compatible_flow_graph(config: &Config,id: &str,) -> Result<Option<WorkflowGraph>, String> {let graph = load_flow_graph(config, id)?;if let Some(graph) = graph.as_ref() {- ensure_config_aware_engine_compatible(config, graph)+ ensure_config_aware_engine_compatible(config, graph).await.map_err(|error| format!("workflow_id '{id}' is engine-incompatible: {error}"))?;}Ok(graph)diff --git a/crates/openhuman-core/src/flows/tinyflows/caps/resolver.rs b/crates/openhuman-core/src/flows/tinyflows/caps/resolver.rsindex 168c97653f..7bfb6db87e 100644--- a/crates/openhuman-core/src/flows/tinyflows/caps/resolver.rs+++ b/crates/openhuman-core/src/flows/tinyflows/caps/resolver.rs@@ -40,13 +40,7 @@ impl WorkflowResolver for OpenHumanWorkflowResolver {%workflow_id,"[flows] sub_workflow resolver: resolving workflow_id to a saved flow graph");- let config = self.config.clone();- let workflow_id_owned = workflow_id.to_string();- let loaded = tokio::task::spawn_blocking(move || {- flows::ops::load_engine_compatible_flow_graph(&config, &workflow_id_owned)- })- .await- .map_err(|e| EngineError::Capability(format!("sub_workflow resolver task failed: {e}")))?;+ let loaded = flows::ops::load_engine_compatible_flow_graph(&self.config, workflow_id).await;match loaded {Ok(Some(graph)) => {tracing::debug!(