Support CodeMode ToolDisclosure Variants (#7926)

Signed-off-by: Elias Posen <elias@posen.ch>
This commit is contained in:
Elias Posen
2026-03-19 04:55:46 -04:00
committed by GitHub
parent 5be96c1ab2
commit 28a52e36ff
14 changed files with 367 additions and 234 deletions
+3 -2
View File
@@ -27,10 +27,11 @@ run_test() {
cd "$testdir" && "$GOOSE_BIN" run --text "$prompt" --with-builtin "$BUILTINS" 2>&1
) > "$output_file" 2>&1
# Matches: "execute | code_execution", "get_function_details | code_execution",
# Matches: "execute_typescript | code_execution", "get_function_details | code_execution",
# "tool call | execute", "tool calls | execute" (old format)
# "▸ execute N tool call" (new format with tool_graph)
if grep -qE "(execute \| code_execution)|(get_function_details \| code_execution)|(tool calls? \| execute)|(▸.*execute.*tool call)" "$output_file"; then
# "▸ execute_typescript" (plain tool name in output)
if grep -qE "(execute_typescript \| code_execution)|(get_function_details \| code_execution)|(tool calls? \| execute)|(▸.*execute.*tool call)|(▸ execute_typescript)" "$output_file"; then
echo "success|code_execution tool called" > "$result_file"
else
echo "failure|no code_execution tool calls found" > "$result_file"