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
feat(builder_tools): add module-level doc comments and standardise imports
Steven Enamakelacda976c9f49
diff --git a/crates/openhuman-core/src/flows/builder_tools/catalog_search.rs b/crates/openhuman-core/src/flows/builder_tools/catalog_search.rsindex 01c9b3b18c..123038ee13 100644--- a/crates/openhuman-core/src/flows/builder_tools/catalog_search.rs+++ b/crates/openhuman-core/src/flows/builder_tools/catalog_search.rs@@ -1,3 +1,14 @@+//! `search_tool_catalog`: live Composio catalog search with per-keyword fallback ranking.++use std::sync::Arc;++use async_trait::async_trait;+use serde_json::{json, Value};++use crate::config::Config;+use crate::flows::ops;+use crate::tools::traits::{PermissionLevel, Tool, ToolResult};+// ─────────────────────────────────────────────────────────────────────────────// search_tool_catalog — read-only: real Composio tool slugs from the FULL// LIVE catalog (systemic tool-contract fix, Part 1)diff --git a/crates/openhuman-core/src/flows/builder_tools/connection_reads.rs b/crates/openhuman-core/src/flows/builder_tools/connection_reads.rsindex 7495a1a3fc..4eac015e4e 100644--- a/crates/openhuman-core/src/flows/builder_tools/connection_reads.rs+++ b/crates/openhuman-core/src/flows/builder_tools/connection_reads.rs@@ -1,3 +1,14 @@+//! Read-only connection tools: connectable toolkits and connection refs (ids/names only).++use std::sync::Arc;++use async_trait::async_trait;+use serde_json::{json, Value};++use crate::config::Config;+use crate::flows::ops;+use crate::tools::traits::{PermissionLevel, Tool, ToolResult};+/// `list_connectable_toolkits`: read-only list of the Composio toolkits the/// builder can wire, each tagged connected/unconnected — so the agent can steerdiff --git a/crates/openhuman-core/src/flows/builder_tools/draft_edit.rs b/crates/openhuman-core/src/flows/builder_tools/draft_edit.rsindex f77e6464b2..4fa994da08 100644--- a/crates/openhuman-core/src/flows/builder_tools/draft_edit.rs+++ b/crates/openhuman-core/src/flows/builder_tools/draft_edit.rs@@ -1,3 +1,14 @@+//! `edit_workflow`: structured incremental edits on a draft (proposal only, F1).++use std::sync::Arc;++use async_trait::async_trait;+use serde_json::{json, Value};++use crate::config::Config;+use crate::flows::ops;+use crate::tools::traits::{PermissionLevel, Tool, ToolResult};+/// Comma list of the valid `op` tag values, for the missing-/unknown-`op`/// parse errors surfaced by [`EditWorkflowTool`].const VALID_OP_TYPES: &str = "add_node, update_node_config, set_node_name, rename_node, \diff --git a/crates/openhuman-core/src/flows/builder_tools/draft_revise.rs b/crates/openhuman-core/src/flows/builder_tools/draft_revise.rsindex bf4cb9a1dc..7fe575339b 100644--- a/crates/openhuman-core/src/flows/builder_tools/draft_revise.rs+++ b/crates/openhuman-core/src/flows/builder_tools/draft_revise.rs@@ -1,3 +1,16 @@+//! `revise_workflow`: validate a revised draft and emit a proposal (never persists).++use std::sync::Arc;++use async_trait::async_trait;+use serde_json::{json, Value};++use crate::config::Config;+use crate::flows::ops;+use crate::flows::ops::validate_and_migrate_graph;+use crate::flows::tools;+use crate::tools::traits::{PermissionLevel, Tool, ToolResult};+// ─────────────────────────────────────────────────────────────────────────────// revise_workflow — iterative refine of an existing draft (proposal only)// ─────────────────────────────────────────────────────────────────────────────diff --git a/crates/openhuman-core/src/flows/builder_tools/draft_validate.rs b/crates/openhuman-core/src/flows/builder_tools/draft_validate.rsindex ab36c277ad..8397c96775 100644--- a/crates/openhuman-core/src/flows/builder_tools/draft_validate.rs+++ b/crates/openhuman-core/src/flows/builder_tools/draft_validate.rs@@ -1,3 +1,14 @@+//! `validate_workflow`: run the full gate stack on a draft without proposing (F3).++use std::sync::Arc;++use async_trait::async_trait;+use serde_json::{json, Value};++use crate::config::Config;+use crate::flows::ops;+use crate::tools::traits::{PermissionLevel, Tool, ToolResult};+// ─────────────────────────────────────────────────────────────────────────────// validate_workflow — standalone check without proposing (F3)// ─────────────────────────────────────────────────────────────────────────────diff --git a/crates/openhuman-core/src/flows/builder_tools/dry_run.rs b/crates/openhuman-core/src/flows/builder_tools/dry_run.rsindex a0e9e21dc7..f333b85fb1 100644--- a/crates/openhuman-core/src/flows/builder_tools/dry_run.rs+++ b/crates/openhuman-core/src/flows/builder_tools/dry_run.rs@@ -1,3 +1,21 @@+//! `dry_run_workflow`: execute a DRAFT against tinyflows MOCK capabilities (ungated, F7).++use std::sync::Arc;++use async_trait::async_trait;+use serde_json::{json, Value};+use tinyflows::model::WorkflowGraph;++use crate::config::Config;+use crate::flows::ops;+use crate::flows::ops::validate_and_migrate_graph;+use crate::tools::traits::{PermissionLevel, Tool, ToolResult};++use super::dry_run_diagnostics::{+ find_upstream_condition, tool_call_arg_null_entries, tool_call_error_message,+ CapturingObserver,+};+/// Wall-clock bound on a single `dry_run_workflow` mock execution. A malformed/// or pathological draft graph must never hang the agent tool-loop; the mockdiff --git a/crates/openhuman-core/src/flows/builder_tools/dry_run_diagnostics.rs b/crates/openhuman-core/src/flows/builder_tools/dry_run_diagnostics.rsindex 1b589028ff..bdf78b3628 100644--- a/crates/openhuman-core/src/flows/builder_tools/dry_run_diagnostics.rs+++ b/crates/openhuman-core/src/flows/builder_tools/dry_run_diagnostics.rs@@ -1,3 +1,11 @@+//! Diagnostic helpers for `dry_run_workflow`: null-resolution entries, upstream+//! condition lookup, routed tool-call error extraction, and the capturing observer.++use serde_json::{json, Value};+use tinyflows::model::WorkflowGraph;++use crate::flows::ops;+/// Builds one `null_resolutions` diagnostic entry for a `tool_call` node's/// null-resolved `args.*` config expression.///diff --git a/crates/openhuman-core/src/flows/builder_tools/flow_reads.rs b/crates/openhuman-core/src/flows/builder_tools/flow_reads.rsindex def6a99a18..889a1df8db 100644--- a/crates/openhuman-core/src/flows/builder_tools/flow_reads.rs+++ b/crates/openhuman-core/src/flows/builder_tools/flow_reads.rs@@ -1,3 +1,14 @@+//! Read-only saved-flow tools: history, run listing, flow listing, one flow, one run.++use std::sync::Arc;++use async_trait::async_trait;+use serde_json::{json, Value};++use crate::config::Config;+use crate::flows::ops;+use crate::tools::traits::{PermissionLevel, Tool, ToolResult};+// ─────────────────────────────────────────────────────────────────────────────// get_flow_history — read-only: prior graph snapshots (F6)// ─────────────────────────────────────────────────────────────────────────────diff --git a/crates/openhuman-core/src/flows/builder_tools/kind_reads.rs b/crates/openhuman-core/src/flows/builder_tools/kind_reads.rsindex a12b5031c4..d680ba07a8 100644--- a/crates/openhuman-core/src/flows/builder_tools/kind_reads.rs+++ b/crates/openhuman-core/src/flows/builder_tools/kind_reads.rs@@ -1,3 +1,10 @@+//! Read-only DSL/registry tools: agent profiles, node kinds, and node-kind contracts (F2).++use async_trait::async_trait;+use serde_json::{json, Value};++use crate::tools::traits::{PermissionLevel, Tool, ToolResult};+// ─────────────────────────────────────────────────────────────────────────────// list_agent_profiles — read-only: selectable agent kinds for an `agent` node// ─────────────────────────────────────────────────────────────────────────────diff --git a/crates/openhuman-core/src/flows/builder_tools/persistence.rs b/crates/openhuman-core/src/flows/builder_tools/persistence.rsindex b80ce899db..c47dd7c32d 100644--- a/crates/openhuman-core/src/flows/builder_tools/persistence.rs+++ b/crates/openhuman-core/src/flows/builder_tools/persistence.rs@@ -1,3 +1,17 @@+//! Persistence tools: `create_workflow`, `duplicate_flow`, and `save_workflow`.+//! Created/duplicated flows are always born DISABLED; save never touches enablement.++use std::sync::Arc;++use async_trait::async_trait;+use serde_json::{json, Value};++use crate::config::Config;+use crate::flows::ops;+use crate::flows::ops::validate_and_migrate_graph;+use crate::flows::tools;+use crate::tools::traits::{PermissionLevel, Tool, ToolResult};+/// `create_workflow`: the gated create tool (audit F4/F12). Persists a NEW/// flow, always **born disabled** (enable stays human-only) and behind the/// forced `require_approval` floor for side-effect graphs. Write + approvaldiff --git a/crates/openhuman-core/src/flows/builder_tools/run_control.rs b/crates/openhuman-core/src/flows/builder_tools/run_control.rsindex 439ad5cc50..7e97b70077 100644--- a/crates/openhuman-core/src/flows/builder_tools/run_control.rs+++ b/crates/openhuman-core/src/flows/builder_tools/run_control.rs@@ -1,3 +1,14 @@+//! Run control: resume a run parked on approval, cancel an in-flight run.++use std::sync::Arc;++use async_trait::async_trait;+use serde_json::{json, Value};++use crate::config::Config;+use crate::flows::ops;+use crate::tools::traits::{PermissionLevel, Tool, ToolResult};+// ─────────────────────────────────────────────────────────────────────────────// Phase 4 — the self-debug loop + gated create (F4, F7)// ─────────────────────────────────────────────────────────────────────────────diff --git a/crates/openhuman-core/src/flows/builder_tools/tool_contract.rs b/crates/openhuman-core/src/flows/builder_tools/tool_contract.rsindex 643c0d466d..a09c7d2f99 100644--- a/crates/openhuman-core/src/flows/builder_tools/tool_contract.rs+++ b/crates/openhuman-core/src/flows/builder_tools/tool_contract.rs@@ -1,3 +1,14 @@+//! `get_tool_contract` and the B12 `get_tool_output_sample` read-only probe.++use std::sync::Arc;++use async_trait::async_trait;+use serde_json::{json, Value};++use crate::config::Config;+use crate::flows::ops;+use crate::tools::traits::{PermissionLevel, Tool, ToolResult};+// ─────────────────────────────────────────────────────────────────────────────// get_tool_contract — read-only: the FULL live contract for one action slug// ─────────────────────────────────────────────────────────────────────────────