Skip to content

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

refactor(flows): update flow connection and catalog usage

Steven Enamakelf3878dae8e17
diff --git a/crates/openhuman-core/src/flows/authoring_host_tests.rs b/crates/openhuman-core/src/flows/authoring_host_tests.rs
index 5351853815..f2abd8c28f 100644
--- a/crates/openhuman-core/src/flows/authoring_host_tests.rs
+++ b/crates/openhuman-core/src/flows/authoring_host_tests.rs
@@ -141,14 +141,15 @@ async fn saved_workflow_callback_uses_its_captured_profile_over_the_bus() {
let config = config.clone();
CoreContext::scope(core, async move {
let graph = tinyflows::migrate::deserialize_graph(graph).unwrap();
- let mut flow = crate::flows::store::create_flow(
+ let result = crate::flows::store::create_flow(
&config,
"scoped child".into(),
- graph,
+ serde_json::to_value(graph).unwrap(),
false,
false,
)
.unwrap();
+ let mut flow = result.workflow;
flow.id = shared_id.into();
crate::flows::test_support::seed_flow(&config, &flow).unwrap();
})
@@ -308,7 +309,7 @@ async fn saved_workflow_callback_uses_its_captured_profile_over_the_bus() {
None,
"Scoped parent".into(),
candidate,
- tinyflows_catalog::DraftOrigin::Chat,
+ tinyflows_bus::catalog::DraftOrigin::Chat,
)
.unwrap()
.value
diff --git a/crates/openhuman-core/src/flows/host_gates/connections.rs b/crates/openhuman-core/src/flows/host_gates/connections.rs
index f368f17421..02578608df 100644
--- a/crates/openhuman-core/src/flows/host_gates/connections.rs
+++ b/crates/openhuman-core/src/flows/host_gates/connections.rs
@@ -1,8 +1,7 @@
use super::graph_json::nodes;
use crate::config::Config;
-use crate::flows::ops::build_flow_connections;
+use crate::flows::ops::{build_flow_connections, FlowConnection};
use serde_json::Value;
-use tinyflows_catalog::FlowConnection;
// ─────────────────────────────────────────────────────────────────────────────
// Connection-ref gate (WS3): a Composio tool_call's `connection_ref` must name
diff --git a/crates/openhuman-core/src/flows/host_gates/mod.rs b/crates/openhuman-core/src/flows/host_gates/mod.rs
index 7c211e798b..973dcfd7d9 100644
--- a/crates/openhuman-core/src/flows/host_gates/mod.rs
+++ b/crates/openhuman-core/src/flows/host_gates/mod.rs
@@ -10,7 +10,7 @@ pub(crate) use agent_refs::validate_agent_refs;
pub(crate) use connections::validate_connection_refs;
#[cfg(test)]
pub(crate) use connections::validate_connection_refs_against;
-pub(crate) use graph_json::{nodes, validate_host_gate_input_shape, GraphNode};
+pub(crate) use graph_json::{nodes, validate_host_gate_input_shape};
pub(crate) use tool_contracts::validate_tool_contracts;
pub(crate) use upload_paths::validate_upload_paths;
diff --git a/crates/openhuman-core/src/flows/host_gates/mod_tests.rs b/crates/openhuman-core/src/flows/host_gates/mod_tests.rs
index 0378816e37..30b2fc0577 100644
--- a/crates/openhuman-core/src/flows/host_gates/mod_tests.rs
+++ b/crates/openhuman-core/src/flows/host_gates/mod_tests.rs
@@ -3,7 +3,7 @@ use crate::config::Config;
use crate::integrations::composio::catalog::{seed_live_catalog_cache, ToolContract};
use serde_json::{json, Value};
use tempfile::TempDir;
-use tinyflows_catalog::FlowConnection;
+use crate::flows::ops::FlowConnection;
fn test_config(tmp: &TempDir) -> Config {
let config = Config {