Commit Graph

59 Commits

Author SHA1 Message Date
Laith Weinberger 1737c5bea4 lint 2026-02-08 16:36:45 -05:00
Laith Weinberger 4d05218d7d fix: redirect logging to stderr so MCP stdio doesn't break (#2748) 2026-02-08 16:29:05 -05:00
mertunsall 839ef52d3e quick hack 2025-11-26 10:40:34 -08:00
reformedot b4e9ffa984 refactor: implement error handling for asyncio tasks across various components
- 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.
2025-11-11 17:27:54 -08:00
zhenhuae 9bfdb4ac85 feat: support amazon bedrock model fix check style 2025-10-14 21:03:09 +08:00
zhenhuae a95d4db9c5 feat: support amazon bedrock model fix check style 2025-10-14 21:03:09 +08:00
zhenhuae 9a7eeb7eab feat: support amazon bedrock model 2025-10-14 21:03:09 +08:00
Magnus Müller b53a7c116a Update outdated function names 2025-10-05 19:12:52 -07:00
Mert Unsal f0beb014a9 Merge branch 'main' into fix/MCP-Server-extract_content-always-returning-"No-content-extracted" 2025-09-23 03:17:54 +02:00
Chris Schnabl 03608b62a2 Remove unused paramter 2025-09-21 21:38:42 -07:00
Saurav Panda 126d800df4 remove sensitive data from agent history and logging 2025-09-16 14:41:24 -07:00
Saurav Panda 43359143fc fix: session management tool placement 2025-09-07 20:14:23 -07:00
Saurav Panda 12a0c76a32 feat: fix MCP server JSON-RPC corruption and removed http mode 2025-09-07 19:22:59 -07:00
lienminhquang 491df67c3e fix: typo
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
2025-09-03 09:30:30 +07:00
lienminhquang 64b220453d Merge branch 'browser-use:main' into fix/MCP-Server-extract_content-always-returning-"No-content-extracted" 2025-09-02 12:37:34 +07:00
quanglm 8406528c08 fix: MCP Server extract_content always returning 'No content extracted' 2025-09-02 12:34:17 +07:00
krishna f430e2fc69 Minor documentation changes for consistency. 2025-08-27 20:36:52 +05:30
Magnus Müller f36279b7f3 Merge remote-tracking branch 'origin/main' into dev 2025-08-27 00:41:27 -07:00
Magnus Müller 6fc8fd5b75 Fix mcp import 2025-08-26 16:50:35 -07:00
Magnus Müller 78cb7e5466 Remove 25 unused parameters 2025-08-26 16:19:53 -07:00
Magnus Müller caa0e7ef1b Rename controller to tools instances 2025-08-26 11:30:39 -07:00
Magnus Müller 13dd73b23a Update Tool imports in docs, readme, and docstrings 2025-08-26 11:13:27 -07:00
Magnus Müller e89e78842c Rename controller file to tools 2025-08-26 11:06:28 -07:00
Magnus Müller 2a83442f17 Rename Controller to Tools 2025-08-26 11:04:16 -07:00
Tyler Folkman b2da2fec89 fix: correct JSON schema type definitions in MCP server tools
- 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>
2025-08-24 10:04:19 -06:00
Nick Sweeting 99a0e5a3bd rename ClickElementEvent.new_tab to while_holding_ctrl 2025-08-16 16:25:15 -07:00
Nick Sweeting 8d86832095 fix SwitchTab by using TargetID for all tab_ids 2025-08-15 16:45:27 -07:00
Anirudha619 eaad171101 add StreamableHttp to mcp 2025-08-14 00:32:50 +05:30
Nick Sweeting 3bb8fb0fee improve focus tracking 2025-08-08 07:15:04 -07:00
Nick Sweeting db4c4e9b49 fix duplicate typed keystrokes 2025-08-08 04:13:44 -07:00
Nick Sweeting e9add2d745 add screenshot watchdog 2025-08-07 17:49:25 -07:00
Nick Sweeting daa430435d working cli 2025-08-06 06:23:45 -07:00
Nick Sweeting 46dd9bd584 wip 2025-08-05 17:45:48 -07:00
Nick Sweeting 328a4b5be4 Merge branch 'feature/new-dom-extraction-layer' into local-remote-split 2025-08-05 03:12:48 -07:00
Gregor Žunič 0aa3d54233 Merge commit '9b882faa10c54be5a870cc5d8abd6ddb19d0682f' into feature/new-dom-extraction-layer 2025-08-02 11:41:28 -07:00
Nick Sweeting ebc3a3846f wip cleanup flow] 2025-07-31 22:10:25 -07:00
claude[bot] 5465163cd9 feat(mcp): add array type inference for MCP tool parameters
- Enhanced _json_schema_to_python_type to recursively handle array item types
- Arrays with ''items'' schema now properly return list[item_type] instead of plain list
- Supports nested types like list[str], list[float], and list[CustomModel]
- Added comprehensive test for array type inference in test_mcp_array_type_inference

This allows MCP tools with array parameters to have proper type hints and validation,
fixing issues where array parameters were losing their item type information.

Co-authored-by: Nick Sweeting <pirate@users.noreply.github.com>
2025-07-30 18:55:33 +00:00
Nick Sweeting aa5f80f881 Merge branch 'main' into claude/issue-2453-20250715_190029 2025-07-30 11:45:24 -07:00
Nick Sweeting 650a956efb fix retry handling for singletonLock case 2025-07-29 11:16:27 -07:00
Nick Sweeting 6445a746aa fix uvx browser-use examples to use cli optionals 2025-07-29 11:16:05 -07:00
Magnus Müller c688056d37 Wait before get state so that we can check require_healthy_browser for get_state and dont check page in _get_updated_state 2025-07-18 23:09:41 +02:00
Magnus Müller 99f285e25a Merge branch 'main' into extraction-magnus-revert-with-main-with-extension 2025-07-16 21:51:42 +02:00
claude[bot] 3183a3ae73 Fix ruff formatting in __init__.py
Add missing blank line after import statement to comply with ruff formatting rules.

Co-authored-by: Nick Sweeting <pirate@users.noreply.github.com>
2025-07-16 02:23:49 +00:00
claude[bot] 6d5ce080b4 Move MCP server logging configuration before browser_use imports
- 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>
2025-07-15 22:02:42 +00:00
claude[bot] 98aecf6701 Fix failing tests and type checking errors
- Fix test assertion: change assert result.success to assert result.success is not False
- Fix MCP parameter serialization: use model_dump(exclude_none=True) to exclude None values
- Fix pyright type checking errors: add proper type guards and use getattr for dynamic access

Co-authored-by: Nick Sweeting <pirate@users.noreply.github.com>
2025-07-15 21:55:59 +00:00
claude[bot] e3bc64d22c Fix: Only configure MCP server logging when server is instantiated, not on import
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>
2025-07-15 21:54:51 +00:00
claude[bot] 0e88c866b2 Fix nested object parameter handling in MCP client
- Add ConfigDict import from pydantic
- Fix default value handling for optional fields with proper type annotations
- Improve nested model creation with error handling and ConfigDict configuration
- Apply same improvements to main parameter model creation

Co-authored-by: Nick Sweeting <pirate@users.noreply.github.com>
2025-07-15 21:34:22 +00:00
claude[bot] 9c9e8df254 fix(mcp): properly handle nested objects in tool parameters
- Modified _json_schema_to_python_type to recursively create nested Pydantic models for object types with properties
- Fixed issue where nested object properties were being lost during parameter processing
- Added test_mcp_nested_object_parameters to verify nested objects are properly preserved
- Updated MockMCPServer to include process_trace_update tool with nested object schema

Fixes #2453

Co-authored-by: Nick Sweeting <pirate@users.noreply.github.com>
2025-07-15 19:06:25 +00:00
Gregor Žunič 7bf17064f6 started migration to pure cdp 2025-07-11 14:19:22 +02:00
Nick Sweeting af0697f12b fix tests and other improvements 2025-07-08 02:41:48 -07:00