Skip to content

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

refactor(flows): move authoring gate validators into host_gates module

Steven Enamakel0572d657fd27
diff --git a/crates/openhuman-core/src/flows/authoring_host.rs b/crates/openhuman-core/src/flows/authoring_host.rs
index 77b9b9e529..07df84d989 100644
--- a/crates/openhuman-core/src/flows/authoring_host.rs
+++ b/crates/openhuman-core/src/flows/authoring_host.rs
@@ -63,15 +63,15 @@ impl Callbacks {
let graph: tinyflows::model::WorkflowGraph =
serde_json::from_value(graph).map_err(|error| error.to_string())?;
match stage.as_str() {
- tinyflows_bus::host::TOOL_POLICY => Ok(ops::validate_upload_paths(&graph)),
+ tinyflows_bus::host::TOOL_POLICY => Ok(crate::flows::host_gates::validate_upload_paths(&graph)),
tinyflows_bus::host::AGENT_REFERENCES => {
- Ok(ops::validate_agent_refs(&context, &config, &graph).await)
+ Ok(crate::flows::host_gates::validate_agent_refs(&context, &config, &graph).await)
}
tinyflows_bus::host::CONNECTIONS => {
- Ok(ops::validate_connection_refs(&context, &config, &graph).await)
+ Ok(crate::flows::host_gates::validate_connection_refs(&context, &config, &graph).await)
}
tinyflows_bus::host::TOOL_CONTRACTS => {
- Ok(ops::validate_tool_contracts(&config, &graph).await)
+ Ok(crate::flows::host_gates::validate_tool_contracts(&config, &graph).await)
}
_ => Err(format!("unknown TinyFlows authoring gate `{stage}`")),
}
diff --git a/crates/openhuman-core/src/flows/mod.rs b/crates/openhuman-core/src/flows/mod.rs
index 545066b21c..a204402147 100644
--- a/crates/openhuman-core/src/flows/mod.rs
+++ b/crates/openhuman-core/src/flows/mod.rs
@@ -29,6 +29,7 @@ pub(crate) mod builder_tools;
mod builder_tools_connection_reads;
pub mod bus;
pub(crate) mod authoring_host;
+pub(crate) mod host_gates;
pub mod catalogue;
mod copilot_bus;
mod draft_store;
diff --git a/crates/openhuman-core/src/flows/ops.rs b/crates/openhuman-core/src/flows/ops.rs
index e995478379..ca9906fbfb 100644
--- a/crates/openhuman-core/src/flows/ops.rs
+++ b/crates/openhuman-core/src/flows/ops.rs
@@ -132,7 +132,6 @@ mod builder;
mod builder_gates;
mod builder_toolset;
mod catalog;
-mod connection_ref_gate;
mod connections;
mod definitions;
mod discovery;
@@ -144,7 +143,6 @@ mod run;
mod run_management;
mod run_rows;
mod streaming;
-mod tool_contract_gate;
mod trail_off;
mod triggers;
mod updates;
@@ -156,7 +154,6 @@ pub use builder::*;
pub(crate) use builder_gates::*;
use builder_toolset::*;
pub use catalog::*;
-pub(crate) use connection_ref_gate::*;
pub use connections::*;
pub use definitions::*;
pub use discovery::*;
@@ -168,7 +165,6 @@ pub use run::*;
pub use run_management::*;
use run_rows::*;
pub use streaming::*;
-pub(crate) use tool_contract_gate::*;
use trail_off::*;
pub use triggers::*;
pub use updates::*;