- Introduced a utility function `create_task_with_error_handling` to manage asyncio tasks with proper exception logging and suppression options.
- Updated multiple components, including `SessionManager`, `BrowserSession`, and various watchdogs, to utilize the new error handling mechanism for background tasks.
- Enhanced overall robustness of asynchronous operations by ensuring exceptions are logged and handled appropriately, improving maintainability and debugging capabilities.
- Changed 'type': 'str' to 'type': 'string' for tab_id parameters
- Fixes JSON Schema draft 2020-12 validation error with Claude Code
- Added test case to validate JSON schema correctness
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Call _configure_mcp_server_logging() at module level before any browser_use imports
- This ensures early log lines during import time are captured and redirected to stderr
- Remove redundant call from BrowserUseServer.__init__() since logging is already configured
Co-authored-by: Nick Sweeting <pirate@users.noreply.github.com>
This fixes the issue where importing MCPClient would disable logging globally.
- Move logging configuration from module-level imports to BrowserUseServer.__init__()
- Add lazy import in __init__.py to avoid importing server module when only client is needed
- Create _configure_mcp_server_logging() function that only runs when server is actually used
- Environment variables now only set when BrowserUseServer is instantiated
Fixes#2449
Co-authored-by: Nick Sweeting <pirate@users.noreply.github.com>