Skip to content

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

test(toolpacks): align pack tests with renamed workflow tools

Steven Enamakelc8ab97d7864f
diff --git a/crates/openhuman-core/src/tools/toolpacks/toolpacks_tests.rs b/crates/openhuman-core/src/tools/toolpacks/toolpacks_tests.rs
index e30b507870..90e07e4788 100644
--- a/crates/openhuman-core/src/tools/toolpacks/toolpacks_tests.rs
+++ b/crates/openhuman-core/src/tools/toolpacks/toolpacks_tests.rs
@@ -332,8 +332,6 @@ fn every_pack_declares_the_tools_it_is_named_for() {
(
"media",
&[
- "create_image",
- "create_video",
"media_generate_image",
"media_generate_video",
"media_list_models",
diff --git a/crates/openhuman-core/src/tools/toolpacks/toolpacks_tests_scoping_and_visibility_tests.rs b/crates/openhuman-core/src/tools/toolpacks/toolpacks_tests_scoping_and_visibility_tests.rs
index 132748d788..a46907929d 100644
--- a/crates/openhuman-core/src/tools/toolpacks/toolpacks_tests_scoping_and_visibility_tests.rs
+++ b/crates/openhuman-core/src/tools/toolpacks/toolpacks_tests_scoping_and_visibility_tests.rs
@@ -2,13 +2,13 @@
//! execution distinction the whole pack mechanism rests on.
use super::*;
-use tinyagents_harness_tools::skills::{route_sentence, USE_SKILL};
+use tinyagents_harness_tools::skills::USE_SKILL;
// ── the index must agree with the gate too ──────────────────────────────────
/// A spec shaped like the one `UseSkillTool` publishes.
fn use_skill_spec() -> tinytools::ToolSpec {
- let tools = registry_with_all(&["build_workflow"]);
+ let tools = registry_with_all(&["run_workflow"]);
let tool = find(&tools, USE_SKILL);
tinytools::ToolSpec {
name: tool.name().to_string(),
@@ -119,7 +119,7 @@ fn scoping_the_index_only_ever_shrinks_it() {
fn a_withheld_packed_tool_is_hidden_but_not_denied() {
use tinytools::{ToolPolicyAction, ToolPolicyEngine};
- let tools = registry_with_all(&["goal_set", "build_workflow"]);
+ let tools = registry_with_all(&["goal_set", "run_workflow"]);
// The real shape: the harness seeds `visible` with everything, then
// `strip_packed_from_visible` removes the packed names for a non-owner.
let mut visible: HashSet<String> = tools.iter().map(|t| t.name().to_string()).collect();
@@ -240,7 +240,7 @@ fn rebinding_a_pack_handle_repoints_it_at_the_new_registry() {
/// not mention a tool that gate will refuse.
#[test]
fn a_non_owner_listing_omits_the_tools_the_gate_will_refuse() {
- let tools = registry_with_all(&["build_workflow", "propose_workflow"]);
+ let tools = registry_with_all(&["run_workflow", "propose_workflow"]);
let handle = crate::tools::host_extensions::pack_registry_handle(find(&tools, USE_SKILL))
.expect("use_skill carries the pack handle");
@@ -254,7 +254,7 @@ fn a_non_owner_listing_omits_the_tools_the_gate_will_refuse() {
.expect("the pack still has a callable tool");
assert!(
- rendered.contains("build_workflow"),
+ rendered.contains("run_workflow"),
"a tool the session CAN call must still be listed: {rendered}"
);
assert!(
@@ -267,11 +267,11 @@ fn a_non_owner_listing_omits_the_tools_the_gate_will_refuse() {
/// way out. A bare "no tools available" is the dead end the model retried into.
#[test]
fn a_listing_with_nothing_callable_names_the_route_out() {
- let tools = registry_with_all(&["build_workflow", "propose_workflow"]);
+ let tools = registry_with_all(&["run_workflow", "propose_workflow"]);
let handle = crate::tools::host_extensions::pack_registry_handle(find(&tools, USE_SKILL))
.expect("use_skill carries the pack handle");
- let route = route_sentence(&["build_workflow".to_string()], &["workflow_builder"]);
+ let route = "Call `spawn_subagent` with agent_id `workflow_builder`.";
let err = tinyagents_harness_tools::skills::render_pack_filtered(
&CATALOG,
"workflows",
@@ -282,8 +282,8 @@ fn a_listing_with_nothing_callable_names_the_route_out() {
.expect_err("nothing callable must not render a menu");
assert!(
- err.contains("build_workflow"),
- "the denial must name the delegate to call instead: {err}"
+ err.contains("spawn_subagent") && err.contains("workflow_builder"),
+ "the denial must name the single spawn route and specialist id: {err}"
);
}