Skip to content

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

test(tool_prep): use PromptTool::with_schema in test helper

Steven Enamakel9461e44d9d74
diff --git a/crates/openhuman-core/src/agent/subagent_host/tool_prep_tests.rs b/crates/openhuman-core/src/agent/subagent_host/tool_prep_tests.rs
index aaf3a7f0aa..4e7ab31a6b 100644
--- a/crates/openhuman-core/src/agent/subagent_host/tool_prep_tests.rs
+++ b/crates/openhuman-core/src/agent/subagent_host/tool_prep_tests.rs
@@ -417,13 +417,11 @@ fn a_dynamic_tool_list_without_spawn_tools_is_untouched() {
/// Render the `## Tools` section the way a sub-agent prompt does, at `format`.
fn render_tools_at(format: crate::agent::prompts::ToolCallFormat, instructions: &str) -> String {
use crate::agent::prompts::{LearnedContextData, PromptTool};
- let tools = [PromptTool {
- name: "composio_execute",
- description: "Run one Composio action.",
- parameters_schema: Some(
- r#"{"type":"object","properties":{"action":{"type":"string"}}}"#.into(),
- ),
- }];
+ let tools = [PromptTool::with_schema(
+ "composio_execute",
+ "Run one Composio action.",
+ r#"{"type":"object","properties":{"action":{"type":"string"}}}"#.into(),
+ )];
let visible = std::collections::HashSet::new();
let ctx = PromptContext {
workspace_dir: std::path::Path::new("/tmp"),