fix: add browser_console to browser toolset and core tools list (#1084)
browser_console was registered in the tool registry but missing from all toolset definitions (TOOLSETS, _HERMES_CORE_TOOLS, _LEGACY_TOOLSET_MAP), so the agent could never discover or use it. Added to all 4 locations + 4 wiring tests. Cherry-picked from PR #1084 by @0xbyt4 (authorship preserved in tests).
This commit is contained in:
parent
7d91b436e4
commit
68fbcdaa06
3 changed files with 25 additions and 4 deletions
|
|
@ -149,7 +149,7 @@ _LEGACY_TOOLSET_MAP = {
|
||||||
"browser_navigate", "browser_snapshot", "browser_click",
|
"browser_navigate", "browser_snapshot", "browser_click",
|
||||||
"browser_type", "browser_scroll", "browser_back",
|
"browser_type", "browser_scroll", "browser_back",
|
||||||
"browser_press", "browser_close", "browser_get_images",
|
"browser_press", "browser_close", "browser_get_images",
|
||||||
"browser_vision"
|
"browser_vision", "browser_console"
|
||||||
],
|
],
|
||||||
"cronjob_tools": ["cronjob"],
|
"cronjob_tools": ["cronjob"],
|
||||||
"rl_tools": [
|
"rl_tools": [
|
||||||
|
|
|
||||||
|
|
@ -117,6 +117,27 @@ class TestBrowserConsoleSchema:
|
||||||
assert props["clear"]["type"] == "boolean"
|
assert props["clear"]["type"] == "boolean"
|
||||||
|
|
||||||
|
|
||||||
|
class TestBrowserConsoleToolsetWiring:
|
||||||
|
"""browser_console must be reachable via toolset resolution."""
|
||||||
|
|
||||||
|
def test_in_browser_toolset(self):
|
||||||
|
from toolsets import TOOLSETS
|
||||||
|
assert "browser_console" in TOOLSETS["browser"]["tools"]
|
||||||
|
|
||||||
|
def test_in_hermes_core_tools(self):
|
||||||
|
from toolsets import _HERMES_CORE_TOOLS
|
||||||
|
assert "browser_console" in _HERMES_CORE_TOOLS
|
||||||
|
|
||||||
|
def test_in_legacy_toolset_map(self):
|
||||||
|
from model_tools import _LEGACY_TOOLSET_MAP
|
||||||
|
assert "browser_console" in _LEGACY_TOOLSET_MAP["browser_tools"]
|
||||||
|
|
||||||
|
def test_in_registry(self):
|
||||||
|
from tools.registry import registry
|
||||||
|
from tools import browser_tool # noqa: F401
|
||||||
|
assert "browser_console" in registry._tools
|
||||||
|
|
||||||
|
|
||||||
# ── browser_vision annotate ──────────────────────────────────────────
|
# ── browser_vision annotate ──────────────────────────────────────────
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ _HERMES_CORE_TOOLS = [
|
||||||
"browser_navigate", "browser_snapshot", "browser_click",
|
"browser_navigate", "browser_snapshot", "browser_click",
|
||||||
"browser_type", "browser_scroll", "browser_back",
|
"browser_type", "browser_scroll", "browser_back",
|
||||||
"browser_press", "browser_close", "browser_get_images",
|
"browser_press", "browser_close", "browser_get_images",
|
||||||
"browser_vision",
|
"browser_vision", "browser_console",
|
||||||
# Text-to-speech
|
# Text-to-speech
|
||||||
"text_to_speech",
|
"text_to_speech",
|
||||||
# Planning & memory
|
# Planning & memory
|
||||||
|
|
@ -119,7 +119,7 @@ TOOLSETS = {
|
||||||
"browser_navigate", "browser_snapshot", "browser_click",
|
"browser_navigate", "browser_snapshot", "browser_click",
|
||||||
"browser_type", "browser_scroll", "browser_back",
|
"browser_type", "browser_scroll", "browser_back",
|
||||||
"browser_press", "browser_close", "browser_get_images",
|
"browser_press", "browser_close", "browser_get_images",
|
||||||
"browser_vision", "web_search"
|
"browser_vision", "browser_console", "web_search"
|
||||||
],
|
],
|
||||||
"includes": []
|
"includes": []
|
||||||
},
|
},
|
||||||
|
|
@ -236,7 +236,7 @@ TOOLSETS = {
|
||||||
"browser_navigate", "browser_snapshot", "browser_click",
|
"browser_navigate", "browser_snapshot", "browser_click",
|
||||||
"browser_type", "browser_scroll", "browser_back",
|
"browser_type", "browser_scroll", "browser_back",
|
||||||
"browser_press", "browser_close", "browser_get_images",
|
"browser_press", "browser_close", "browser_get_images",
|
||||||
"browser_vision",
|
"browser_vision", "browser_console",
|
||||||
"todo", "memory",
|
"todo", "memory",
|
||||||
"session_search",
|
"session_search",
|
||||||
"execute_code", "delegate_task",
|
"execute_code", "delegate_task",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue