From 4b7338a0769e501f83bdb1514c0532d26388e354 Mon Sep 17 00:00:00 2001 From: Ed_ Date: Mon, 2 Mar 2026 16:46:56 -0500 Subject: [PATCH] feat(gui): expand AGENT_TOOL_NAMES to all 26 MCP tools with mutating tools grouped --- gui_2.py | 10 +++++++++- tests/test_arch_boundary_phase2.py | 12 ++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/gui_2.py b/gui_2.py index 1815888..00e0a24 100644 --- a/gui_2.py +++ b/gui_2.py @@ -79,7 +79,15 @@ KIND_COLORS: dict[str, tuple[float, ...]] = {"request": C_REQ, "response": C_RES HEAVY_KEYS: set[str] = {"message", "text", "script", "output", "content"} DISC_ROLES: list[str] = ["User", "AI", "Vendor API", "System"] -AGENT_TOOL_NAMES: list[str] = ["run_powershell", "read_file", "list_directory", "search_files", "get_file_summary", "web_search", "fetch_url"] +AGENT_TOOL_NAMES: list[str] = [ + "run_powershell", "read_file", "list_directory", "search_files", "get_file_summary", + "web_search", "fetch_url", "py_get_skeleton", "py_get_code_outline", "get_file_slice", + "py_get_definition", "py_get_signature", "py_get_class_summary", "py_get_var_declaration", + "get_git_diff", "py_find_usages", "py_get_imports", "py_check_syntax", "py_get_hierarchy", + "py_get_docstring", "get_tree", "get_ui_performance", + # Mutating tools — disabled by default + "set_file_slice", "py_update_definition", "py_set_signature", "py_set_var_declaration", +] def truncate_entries(entries: list[dict[str, Any]], max_pairs: int) -> list[dict[str, Any]]: if max_pairs <= 0: diff --git a/tests/test_arch_boundary_phase2.py b/tests/test_arch_boundary_phase2.py index dd1ea63..f38347d 100644 --- a/tests/test_arch_boundary_phase2.py +++ b/tests/test_arch_boundary_phase2.py @@ -55,3 +55,15 @@ def test_default_project_mutating_tools_disabled(): for tool in MUTATING_TOOLS: assert tool in tools, f"{tool} missing from default_project" assert tools[tool] is False, f"Mutating tool '{tool}' should default to False" + + +# --------------------------------------------------------------------------- +# Task 2.2: AGENT_TOOL_NAMES in gui_2.py exposes all dispatch tools +# --------------------------------------------------------------------------- + +def test_gui_agent_tool_names_exposes_all_dispatch_tools(): + """AGENT_TOOL_NAMES in gui_2.py must include every tool in mcp_client.dispatch().""" + from gui_2 import AGENT_TOOL_NAMES + gui_tools = set(AGENT_TOOL_NAMES) + missing = ALL_DISPATCH_TOOLS - gui_tools + assert not missing, f"Tools missing from gui_2.AGENT_TOOL_NAMES: {missing}"