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
style(flows): reflow long lines and reorder imports
Steven Enamakel97732fe1b03b
diff --git a/crates/openhuman-core/src/flows/builder_host.rs b/crates/openhuman-core/src/flows/builder_host.rsindex 88684e75cf..72dd1cf945 100644--- a/crates/openhuman-core/src/flows/builder_host.rs+++ b/crates/openhuman-core/src/flows/builder_host.rs@@ -77,12 +77,7 @@ impl FlowStore for FlowsHost {ops::load_flow_graph(&self.config, id)}- async fn create(- &self,- name: String,- graph: Value,- require_approval: bool,- ) -> PortResult<Flow> {+ async fn create(&self, name: String, graph: Value, require_approval: bool) -> PortResult<Flow> {ops::flows_create(&self.config, name, graph, require_approval).await.map(|o| o.value)@@ -109,7 +104,9 @@ impl FlowStore for FlowsHost {}async fn duplicate(&self, id: &str) -> PortResult<Flow> {- ops::flows_duplicate(&self.config, id).await.map(|o| o.value)+ ops::flows_duplicate(&self.config, id)+ .await+ .map(|o| o.value)}async fn history(&self, id: &str, limit: usize) -> PortResult<Vec<FlowRevision>> {@@ -123,7 +120,9 @@ impl FlowStore for FlowsHost {}async fn get_run(&self, run_id: &str) -> PortResult<FlowRun> {- ops::flows_get_run(&self.config, run_id).await.map(|o| o.value)+ ops::flows_get_run(&self.config, run_id)+ .await+ .map(|o| o.value)}async fn resume(diff --git a/crates/openhuman-core/src/flows/ops_run_status_and_prompt_binding_tests.rs b/crates/openhuman-core/src/flows/ops_run_status_and_prompt_binding_tests.rsindex b4069964b5..9e34032c32 100644--- a/crates/openhuman-core/src/flows/ops_run_status_and_prompt_binding_tests.rs+++ b/crates/openhuman-core/src/flows/ops_run_status_and_prompt_binding_tests.rs@@ -126,15 +126,17 @@ async fn flows_build_hides_the_live_run_tool_from_the_builder_belt() {live_runner.external_effect(),"the flows live-runner must be external-effect for the #4593 concern to apply");- let resumer =- crate::flows::builder_tools::tests_support::resume_flow_run_tool(std::sync::Arc::new(config.clone()));+ let resumer = crate::flows::builder_tools::tests_support::resume_flow_run_tool(+ std::sync::Arc::new(config.clone()),+ );assert!(resumer.external_effect(),"resume_flow_run advances a real run's outbound effects, so it must be \external-effect for the same #4593/#4881 concern to apply");- let canceller =- crate::flows::builder_tools::tests_support::cancel_flow_run_tool(std::sync::Arc::new(config.clone()));+ let canceller = crate::flows::builder_tools::tests_support::cancel_flow_run_tool(+ std::sync::Arc::new(config.clone()),+ );assert!(canceller.external_effect(),"cancel_flow_run is external-effect since the T-M3 fix — it stays hidden on THIS \diff --git a/crates/openhuman-core/src/flows/registration.rs b/crates/openhuman-core/src/flows/registration.rsindex d0853c6f3e..df6e60aeb4 100644--- a/crates/openhuman-core/src/flows/registration.rs+++ b/crates/openhuman-core/src/flows/registration.rs@@ -5,6 +5,11 @@ use super::builder_tools::{GetToolContractTool, GetToolOutputSampleTool, ListConnectableToolkitsTool,ListFlowConnectionsTool, SearchToolCatalogTool,};+use super::memory_tools::{FlowMemoryRecallTool, FlowMemoryRememberTool};+use super::tools::{ProposeWorkflowTool, RunFlowTool};+use crate::config::Config;+use crate::security::SecurityPolicy;+use std::sync::Arc;use tinyflows_copilot::tools::{CancelFlowRunTool, CreateWorkflowTool, DryRunWorkflowTool, DuplicateFlowTool, EditWorkflowTool,GetFlowHistoryTool, GetFlowRunTool, GetFlowTool, GetNodeKindContractTool,@@ -12,11 +17,6 @@ use tinyflows_copilot::tools::{ResumeFlowRunTool, ReviseWorkflowTool, SaveWorkflowTool, SuggestWorkflowsTool,ValidateWorkflowTool,};-use super::memory_tools::{FlowMemoryRecallTool, FlowMemoryRememberTool};-use super::tools::{ProposeWorkflowTool, RunFlowTool};-use crate::config::Config;-use crate::security::SecurityPolicy;-use std::sync::Arc;use tinytools::Tool;/// Build the flow tool family in its persisted catalogue order.@@ -43,11 +43,19 @@ pub(crate) fn tools(config: Arc<Config>, security: &Arc<SecurityPolicy>) -> Vec<// graph (saved flow or inline) instead of re-emitting the whole graph,// then validate + gate + return a proposal (same contract as revise).// Proposal-only — never persists.- Box::new(EditWorkflowTool::new(host.clone(), host.clone(), host.clone())),+ Box::new(EditWorkflowTool::new(+ host.clone(),+ host.clone(),+ host.clone(),+ )),// Standalone validate (F3): run the SAME structural + hard-gate stack// the propose/save tools use, without emitting a proposal — a pure// check so the agent can self-verify a draft mid-build. Read-only.- Box::new(ValidateWorkflowTool::new(host.clone(), host.clone(), host.clone())),+ Box::new(ValidateWorkflowTool::new(+ host.clone(),+ host.clone(),+ host.clone(),+ )),// Read a saved flow's revision history (F6) — prior graph snapshots the// agent can inspect / pick a rollback target from. Read-only.Box::new(GetFlowHistoryTool::new(host.clone())),@@ -93,7 +101,11 @@ pub(crate) fn tools(config: Arc<Config>, security: &Arc<SecurityPolicy>) -> Vec<// not rely on prompt prose or memory for node config shapes. Read-only.Box::new(ListNodeKindsTool::new(kinds.clone())),Box::new(GetNodeKindContractTool::new(kinds)),- Box::new(DryRunWorkflowTool::new(host.clone(), host.clone(), host.clone())),+ Box::new(DryRunWorkflowTool::new(+ host.clone(),+ host.clone(),+ host.clone(),+ )),// Real end-to-end test run of a SAVED flow (Write / external-effect). The// workflow-builder prompt requires it to ask the user for confirmation// first, and the flow's own approval gate still pauses outbound nodes.@@ -103,7 +115,11 @@ pub(crate) fn tools(config: Arc<Config>, security: &Arc<SecurityPolicy>) -> Vec<// turn from the Flows prompt bar is propose-only (see #4596) — Accept// + the canvas's own Save persist the graph. The tool itself can// never create a flow or change enabled/require_approval.- Box::new(SaveWorkflowTool::new(host.clone(), host.clone(), host.clone())),+ Box::new(SaveWorkflowTool::new(+ host.clone(),+ host.clone(),+ host.clone(),+ )),// Flow Scout discovery: the `flow_discovery` agent's terminal emit// sink. Read-only reasoning over the user's data ends by calling// `suggest_workflows`, which persists workflow ideas for the Flows pagediff --git a/crates/openhuman-core/src/flows/tinyflows/caps/llm.rs b/crates/openhuman-core/src/flows/tinyflows/caps/llm.rsindex 37aef9ae18..5c895a6cbb 100644--- a/crates/openhuman-core/src/flows/tinyflows/caps/llm.rs+++ b/crates/openhuman-core/src/flows/tinyflows/caps/llm.rs@@ -105,7 +105,8 @@ impl LlmProvider for OpenHumanLlm {.map_err(|e| EngineError::Capability(e.to_string()))?;// `create_chat_provider` handed back the role's default model. If the node// pinned a raw/BYOK id, forward it verbatim instead (issue #4598).- let model = agent_prompt::resolve_completion_model(node_model, model, is_raw_passthrough_model);+ let model =+ agent_prompt::resolve_completion_model(node_model, model, is_raw_passthrough_model);let mut model_request = ModelRequest::new(messagesdiff --git a/crates/openhuman-core/src/flows/tinyflows/caps/ops_schema_and_structured_output_tests.rs b/crates/openhuman-core/src/flows/tinyflows/caps/ops_schema_and_structured_output_tests.rsindex e22d90e554..e8aa7cb828 100644--- a/crates/openhuman-core/src/flows/tinyflows/caps/ops_schema_and_structured_output_tests.rs+++ b/crates/openhuman-core/src/flows/tinyflows/caps/ops_schema_and_structured_output_tests.rs@@ -9,11 +9,19 @@ fn resolve_completion_model_forwards_raw_byok_node_model_verbatim() {// default model — but the pinned id is what the user selected and must// be the model the completion runs on.assert_eq!(- agent_prompt::resolve_completion_model(Some("claude-opus-4"), "chat-v1".to_string(), is_raw_passthrough_model),+ agent_prompt::resolve_completion_model(+ Some("claude-opus-4"),+ "chat-v1".to_string(),+ is_raw_passthrough_model+ ),"claude-opus-4");assert_eq!(- agent_prompt::resolve_completion_model(Some("deepseek-v4-pro"), "chat-v1".to_string(), is_raw_passthrough_model),+ agent_prompt::resolve_completion_model(+ Some("deepseek-v4-pro"),+ "chat-v1".to_string(),+ is_raw_passthrough_model+ ),"deepseek-v4-pro");}@@ -22,24 +30,44 @@ fn resolve_completion_model_forwards_raw_byok_node_model_verbatim() {fn resolve_completion_model_leaves_managed_tier_and_hint_node_models_untouched() {// Managed tiers and every `hint:*` alias keep the role-resolved model.assert_eq!(- agent_prompt::resolve_completion_model(Some("chat-v1"), "chat-v1".to_string(), is_raw_passthrough_model),+ agent_prompt::resolve_completion_model(+ Some("chat-v1"),+ "chat-v1".to_string(),+ is_raw_passthrough_model+ ),"chat-v1");assert_eq!(- agent_prompt::resolve_completion_model(Some("hint:reasoning"), "reasoning-v1".to_string(), is_raw_passthrough_model),+ agent_prompt::resolve_completion_model(+ Some("hint:reasoning"),+ "reasoning-v1".to_string(),+ is_raw_passthrough_model+ ),"reasoning-v1");assert_eq!(- agent_prompt::resolve_completion_model(Some("hint:garbage"), "reasoning-v1".to_string(), is_raw_passthrough_model),+ agent_prompt::resolve_completion_model(+ Some("hint:garbage"),+ "reasoning-v1".to_string(),+ is_raw_passthrough_model+ ),"reasoning-v1");// No pinned model, or a whitespace-only pin, keeps the resolved default.assert_eq!(- agent_prompt::resolve_completion_model(None, "chat-v1".to_string(), is_raw_passthrough_model),+ agent_prompt::resolve_completion_model(+ None,+ "chat-v1".to_string(),+ is_raw_passthrough_model+ ),"chat-v1");assert_eq!(- agent_prompt::resolve_completion_model(Some(" "), "chat-v1".to_string(), is_raw_passthrough_model),+ agent_prompt::resolve_completion_model(+ Some(" "),+ "chat-v1".to_string(),+ is_raw_passthrough_model+ ),"chat-v1");}