Skip to content

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

chore: files changed src/openhuman/flows/builder_tools.rs,src/openhuman/flows/medulla_bridge.rs,src/

Steven Enamakel702e6a4fccb5
diff --git a/src/openhuman/flows/builder_tools.rs b/src/openhuman/flows/builder_tools.rs
index 7cd59457cc..b6f3eab068 100644
--- a/src/openhuman/flows/builder_tools.rs
+++ b/src/openhuman/flows/builder_tools.rs
@@ -1256,9 +1256,10 @@ impl Tool for CreateWorkflowTool {
"properties": { "nodes": { "type": "array" }, "edges": { "type": "array" } },
"required": ["nodes", "edges"]
},
- "require_approval": { "type": "boolean", "description": "Force the approval gate (defaults true)." }
+ "require_approval": { "type": "boolean", "description": "Force the approval gate (defaults true)." },
+ "description": { "type": "string", "description": "One line saying what this automation is for, in the user's terms. Shown in the skills catalogue and ranked by skill_search — without it the catalogue can only report the graph's shape." }
},
- "required": ["name", "graph"],
+ "required": ["name", "graph", "description"],
"additionalProperties": false
})
}
@@ -1285,6 +1286,15 @@ impl Tool for CreateWorkflowTool {
.get("require_approval")
.and_then(Value::as_bool)
.unwrap_or(true);
+ // Required in the schema, but not enforced here: a missing description
+ // costs the catalogue a line of prose, and refusing an otherwise valid
+ // graph over it would trade a working automation for a nicer listing.
+ let description = args
+ .get("description")
+ .and_then(Value::as_str)
+ .map(str::trim)
+ .unwrap_or_default()
+ .to_string();
// Same structural + hard-gate stack an agent save must pass.
if let Err(msg) = ops::strict_gate(&self.config, &graph_json).await {
@@ -1294,7 +1304,15 @@ impl Tool for CreateWorkflowTool {
}
tracing::info!(target: "flows", %name, "[flows] create_workflow: agent-initiated create (born disabled)");
- let flow = match ops::flows_create(&self.config, name, graph_json, require_approval).await {
+ let flow = match ops::flows_create(
+ &self.config,
+ name,
+ description,
+ graph_json,
+ require_approval,
+ )
+ .await
+ {
Ok(outcome) => outcome.value,
Err(e) => return Ok(ToolResult::error(format!("Could not create flow: {e}"))),
};
diff --git a/src/openhuman/flows/medulla_bridge.rs b/src/openhuman/flows/medulla_bridge.rs
index ea639d9184..92be5ae56b 100644
--- a/src/openhuman/flows/medulla_bridge.rs
+++ b/src/openhuman/flows/medulla_bridge.rs
@@ -505,7 +505,15 @@ async fn apply_proposal(
.to_string();
// `true`, not the proposal's own value: nothing authored by a remote
// instruction acts outward without a human decision at run time.
- let flow = ops::flows_create(config, name, graph, true).await?.value;
+ let description = proposal
+ .get("description")
+ .and_then(Value::as_str)
+ .map(str::trim)
+ .unwrap_or_default()
+ .to_string();
+ let flow = ops::flows_create(config, name, description, graph, true)
+ .await?
+ .value;
Ok(AppliedProposal {
flow,
created: true,
diff --git a/src/openhuman/flows/ops.rs b/src/openhuman/flows/ops.rs
index 65872dfa52..ff129c78b7 100644
--- a/src/openhuman/flows/ops.rs
+++ b/src/openhuman/flows/ops.rs
@@ -8118,6 +8118,10 @@ pub async fn flows_draft_promote(
flows_create(
config,
draft.name.clone(),
+ // Drafts carry no description field; promoting one leaves the
+ // catalogue to describe the graph's shape until an author
+ // writes one.
+ String::new(),
draft.graph.clone(),
require_approval.unwrap_or(false),
)
diff --git a/src/openhuman/flows/schemas.rs b/src/openhuman/flows/schemas.rs
index bab480ed27..e598af83b7 100644
--- a/src/openhuman/flows/schemas.rs
+++ b/src/openhuman/flows/schemas.rs
@@ -1415,6 +1415,13 @@ fn handle_create(params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let name = read_required::<String>(&params, "name")?;
+ // Optional: the canvas can save a flow before its author has written
+ // one, and every flow saved before this field existed has none.
+ let description = params
+ .get("description")
+ .and_then(Value::as_str)
+ .unwrap_or_default()
+ .to_string();
let graph = read_required::<Value>(&params, "graph")?;
let require_approval = params
.get("require_approval")
@@ -1430,7 +1437,7 @@ fn handle_create(params: Map<String, Value>) -> ControllerFuture {
{
ops::strict_gate(&config, &graph).await?;
}
- to_json(ops::flows_create(&config, name, graph, require_approval).await?)
+ to_json(ops::flows_create(&config, name, description, graph, require_approval).await?)
})
}
@@ -1849,6 +1856,13 @@ fn handle_draft_create(params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let name = read_required::<String>(&params, "name")?;
+ // Optional: the canvas can save a flow before its author has written
+ // one, and every flow saved before this field existed has none.
+ let description = params
+ .get("description")
+ .and_then(Value::as_str)
+ .unwrap_or_default()
+ .to_string();
let graph = read_required::<Value>(&params, "graph")?;
let flow_id = params
.get("flow_id")