The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
refactor(browser): blank-line normalisation (E302/E303/E305) after block moves
Teknium62fa7a85191a
diff --git a/tools/browser_tool.py b/tools/browser_tool.pyindex 496d94b5c00..ef8a1990704 100644--- a/tools/browser_tool.py+++ b/tools/browser_tool.py@@ -70,6 +70,7 @@ def _lazy_call_llm(*args, **kwargs):fn = __getattr__("call_llm")return fn(*args, **kwargs)+# Keys re-added to the agent-browser subprocess env AFTER credential stripping.# agent-browser is a Node process loading npm deps: a compromised transitive# dependency could read every Hermes secret from process.env, so only the@@ -98,6 +99,7 @@ def _build_browser_env() -> dict:env[_key] = os.environ[_key]return env+try:from tools.website_policy import check_website_accessexcept Exception:@@ -342,6 +344,7 @@ from tools.browser_tool_session import ( # noqa: F401 (re-exported; tests patc_run_browser_command,)+def _get_vision_model() -> Optional[str]:"""Model for browser_vision (screenshot analysis — multimodal)."""return os.getenv("AUXILIARY_VISION_MODEL", "").strip() or None@@ -739,6 +742,7 @@ def _browser_session_backend(session_key: str) -> _BrowserSessionBackend:"""Return the SuspectableBackend adapter for ``session_key``."""return _BrowserSessionBackend(session_key)+# Background cleanup thread state_cleanup_thread = None_cleanup_running = False@@ -1743,6 +1747,7 @@ from tools.browser_tool_vision import ( # noqa: F401 (re-exported; tests patch_analyze_screenshot_with_aux_llm,)+def browser_vision(question: str, annotate: bool = False, task_id: Optional[str] = None) -> Union[str, Dict[str, Any]]:"""Screenshot the current page for visual inspection (CAPTCHAs, images, layouts).