Skip to content

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

feat(flows): add tinyflows-copilot dependency and tool wording tests

Steven Enamakel71e473335520
diff --git a/Cargo.lock b/Cargo.lock
index b5b7b15c1a..15b40f5397 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -4158,6 +4158,7 @@ dependencies = [
"tinydocs-bus",
"tinyflows",
"tinyflows-catalog",
+ "tinyflows-copilot",
"tinyflows-sqlite",
"tinyhosts",
"tinyhumans-sdk",
@@ -6489,6 +6490,14 @@ dependencies = [
"tracing",
]
+[[package]]
+name = "tinyflows-copilot"
+version = "0.1.0"
+dependencies = [
+ "serde",
+ "serde_json",
+]
+
[[package]]
name = "tinyflows-sqlite"
version = "0.1.0"
diff --git a/Cargo.toml b/Cargo.toml
index 42999e24d7..dcd6998866 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -157,6 +157,12 @@ tinyflows = { version = "0.8", features = ["mock"], optional = true }
# same reason the engine is.
tinyflows-catalog = { path = "vendor/tinyflows/crates/tinyflows-catalog", optional = true }
tinyflows-sqlite = { path = "vendor/tinyflows/crates/tinyflows-sqlite", optional = true }
+# The authoring copilot's words: the `workflow_builder` / `flow_discovery`
+# standing archetypes and the turn brief that opens a builder turn. Harness-free
+# by construction — it names no tool trait and no model client — so this host
+# keeps only the wiring: the `Tool` impls, the agent registry entries, and the
+# prompt assembly that appends its own runtime sections.
+tinyflows-copilot = { path = "vendor/tinyflows/crates/tinyflows-copilot", optional = true }
# TinyAgents — Rust LLM orchestration framework (LangGraph/LangChain-style):
# durable state graphs, agent-loop harness, model/tool registries, REPL +
# `.rag` workflow language. openhuman's agent engine + orchestration run on this
@@ -1026,7 +1032,7 @@ media = []
# runtime `DomainSet::flows` flag (#4796): the feature narrows the compile-time
# surface, `DomainSet` gates it at runtime.
# NOTE: this gate does NOT drop `tinyagents` itself — 26+ domains consume it.
-flows = ["dep:tinyflows", "dep:tinyflows-catalog", "dep:tinyflows-sqlite"]
+flows = ["dep:tinyflows", "dep:tinyflows-catalog", "dep:tinyflows-copilot", "dep:tinyflows-sqlite"]
# Skills domains: `openhuman::skills` (metadata/discovery/install),
# `openhuman::skill_runtime` (SKILL.md execution + the skill_executor agent),
# and `openhuman::skill_registry` (remote catalogs + the skill_setup agent).
diff --git a/src/openhuman/flows/agents/workflow_builder/mod.rs b/src/openhuman/flows/agents/workflow_builder/mod.rs
index 4b8fda0e38..c53fa84bbf 100644
--- a/src/openhuman/flows/agents/workflow_builder/mod.rs
+++ b/src/openhuman/flows/agents/workflow_builder/mod.rs
@@ -14,5 +14,9 @@
pub mod prompt;
+#[cfg(test)]
+#[path = "tool_wording_tests.rs"]
+mod tool_wording_tests;
+
/// The harness-independent turn brief, from `tinyflows-copilot`.
pub use tinyflows_copilot::builder as builder_prompt;
diff --git a/src/openhuman/flows/agents/workflow_builder/tool_wording_tests.rs b/src/openhuman/flows/agents/workflow_builder/tool_wording_tests.rs
new file mode 100644
index 0000000000..a2a6ebb5d9
--- /dev/null
+++ b/src/openhuman/flows/agents/workflow_builder/tool_wording_tests.rs
@@ -0,0 +1,37 @@
+//! Host-side coverage for the copilot's tool-facing wording.
+//!
+//! `tinyflows-copilot` pins what the standing archetype says. It cannot pin
+//! what *this host's* tool descriptions say, and the two have to agree: the
+//! archetype tells the model that an `agent_ref` step runs the selected
+//! specialist's full tool loop, and `list_agent_profiles`' own description used
+//! to contradict that with stale "follow-up" / "for now" wording.
+
+#[cfg(test)]
+mod tests {
+ /// `list_agent_profiles`'s own tool description used to discourage
+ /// `agent_ref` with stale "follow-up"/"for now" wording (issue B37, Gap
+ /// 1) — pin that it now correctly describes the harness's full tool
+ /// loop instead.
+ #[test]
+ fn list_agent_profiles_tool_description_has_no_stale_followup_language() {
+ use crate::openhuman::flows::builder_tools::ListAgentProfilesTool;
+ use crate::openhuman::tools::traits::Tool;
+
+ let description = ListAgentProfilesTool::new().description().to_string();
+
+ for banned in ["is a follow-up", "for now"] {
+ assert!(
+ !description.contains(banned),
+ "list_agent_profiles description must not carry the stale \
+ phrasing `{banned}` — an agent_ref step already gets the \
+ selected specialist's full tool loop"
+ );
+ }
+ assert!(
+ description.contains("tool loop"),
+ "list_agent_profiles description must describe agent_ref as running \
+ the specialist's full tool loop"
+ );
+ }
+
+}