Skip to content

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

test(agent): read prompt-rendered delegate catalogue

Steven Enamakel15b7cde0e338
diff --git a/tests/agent_prompt_comprehension_e2e.rs b/tests/agent_prompt_comprehension_e2e.rs
index 6592a6e727..ac6c211542 100644
--- a/tests/agent_prompt_comprehension_e2e.rs
+++ b/tests/agent_prompt_comprehension_e2e.rs
@@ -204,6 +204,14 @@ fn advertised_tool_names(request: &Value) -> Vec<String> {
{
names.push(name.to_string());
}
+ if let Some(name) = line
+ .strip_prefix("def ")
+ .and_then(|signature| signature.split_once('('))
+ .map(|(name, _)| name)
+ .filter(|name| !name.is_empty() && !name.contains(char::is_whitespace))
+ {
+ names.push(name.to_string());
+ }
if in_available_tools {
if let Some(name) = line
.strip_prefix("**")