Commit Graph

320 Commits

Author SHA1 Message Date
mertunsall
550a2a2552 feat: enhance file handling capabilities with JSON and CSV support
- Added new file types: JsonFile and CsvFile to the file system.
- Updated read_file method to handle external files with .json and .csv extensions.
- Modified write_file action to allow .json and .csv file extensions in addition to .md and .txt.
- Introduced pypdf dependency for PDF file handling.

This update improves the flexibility of file operations within the application.
2025-07-05 01:36:04 +02:00
Cursor Agent
ee2c1d2ad0 Remove optional xpath from ClickElementAction model
Co-authored-by: mailmertunsal <mailmertunsal@gmail.com>
2025-07-02 07:43:21 +00:00
Cursor Agent
c24d5b4320 Remove optional xpath parameter from InputTextAction model
Co-authored-by: mamagnus00 <mamagnus00@gmail.com>
2025-07-01 21:51:05 +00:00
mertunsall
ef30980fe9 add extract_links to structured data 2025-07-01 10:34:23 +02:00
mertunsall
649b2d5277 Refactor URL navigation and scrolling actions
- Updated GoToUrlAction to include a new_tab parameter for opening URLs in a new tab or navigating in the current tab.
- Removed the OpenTabAction as its functionality is now integrated into GoToUrlAction.
- Enhanced scroll action to allow scrolling up or down based on a boolean parameter.
- Cleaned up commented-out code related to accessibility tree retrieval for better readability.
2025-06-29 22:48:40 +02:00
mertunsall
dd0f65b956 Merge branch 'main' into mert/remove_save_pdf 2025-06-29 21:57:41 +02:00
mertunsall
e9b8cfb9f7 remove the default save_pdf option 2025-06-29 21:51:56 +02:00
mertunsall
640d1a15fe Add upload file action 2025-06-29 21:36:15 +02:00
Gregor Žunič
184fa8efb7 tests for schema generator 2025-06-29 18:09:25 +02:00
Gregor Žunič
48ae2d19cf much better structured output + utils for generating pydantic schema 2025-06-29 17:42:19 +02:00
Gregor Žunič
0691500c6a wip 2025-06-29 16:22:19 +02:00
Magnus Müller
37cdaa0fee Clarify purpose of model_rebuild() in ExtendedOutputModel for eval service 2025-06-28 22:45:18 +02:00
Cursor Agent
bf9ca5baad Fix ExtendedOutputModel schema validation by adding model_rebuild()
Co-authored-by: mamagnus00 <mamagnus00@gmail.com>
2025-06-28 19:52:57 +00:00
Gregor Žunič
5d9fca7c4b optimized schema for all models 2025-06-28 09:28:54 +02:00
Gregor Žunič
8635ccbdec implemented proper functions for reducing token count in json schema 2025-06-27 23:40:59 +02:00
Gregor Žunič
ea00a9ebee removed drag and drop from default controller, moved to example 2025-06-27 23:20:34 +02:00
Gregor Žunič
11cef6eb1c wip 2025-06-27 23:02:21 +02:00
mertunsall
7f8d935000 Files are displayed by default in done text 2025-06-27 14:01:33 +02:00
Magnus Müller
03893b8adf Update comment to 40000 in service.py 2025-06-26 17:16:43 +02:00
Magnus Müller
4844bd048f Set default parameter - no memory, actions per step 10, and extraction input size 2025-06-26 17:08:15 +02:00
Magnus Müller
54736224eb Remove unused controller telemetry functionality
- Remove ControllerRegisteredFunctionsTelemetryEvent and RegisteredFunction classes
- Remove telemetry capture call from controller registry service
- Clean up unused imports in telemetry module
- Simplify telemetry __all__ exports

This removes dead code that was capturing registered function telemetry
data but wasn't being used anywhere in the application.
2025-06-26 15:06:17 +02:00
mertunsall
47b2b7f2fa fix more 2025-06-26 01:02:50 +02:00
mertunsall
6b4953e922 rewrite file system 2025-06-26 00:41:56 +02:00
Gregor Žunič
1e93ca5a9f fixed UnionType type error 2025-06-25 11:13:42 +02:00
Gregor Žunič
cda43e9573 fixed types 2025-06-25 11:06:38 +02:00
Gregor Žunič
5d55435491 fixed controller registry types 2025-06-25 10:52:38 +02:00
Magnus Müller
7cf9667127 Enhance ActionModelUnion to maintain interface and delegate methods
Refactors the ActionModelUnion class to ensure it properly maintains the ActionModel interface by delegating methods like get_index, set_index, and model_dump to the underlying action model. This improves the usability and consistency of the union type in handling action models.
2025-06-24 23:21:18 +02:00
Magnus Müller
f138b522cc Fix output model for openai 2025-06-24 23:08:06 +02:00
Mert Unsal
92ec19de0d Merge branch 'main' into fix/input-detection-logic 2025-06-24 20:00:00 +02:00
Daniel T.
72fe90377f Enhances null handling in file input check
Prevents NoneType error by adding a null check before assessing
if an element is a file input, ensuring robust functionality in
file upload checks.
2025-06-24 19:28:34 +02:00
Daniel Tremer
9bb69bd3d4 Update browser_use/controller/service.py
Co-authored-by: Mert Unsal <mertunsal1905@gmail.com>
2025-06-24 14:46:41 +02:00
Daniel T.
18452798f8 Improves file input detection logic
Refines the conditional check for identifying file input elements
to enhance accuracy by reorganizing the code logic for better
readability and maintainability.
2025-06-24 13:11:22 +02:00
Daniel T.
bf4887bb26 Refines file input detection logic
Enhances logic to accurately identify file input elements by
checking element's tag and type attributes, reducing false
positives in file upload detection.
2025-06-24 13:06:19 +02:00
Gregor Žunič
1a807d1d5d Merge branch 'main' into feature/squashed-langchain-to-native 2025-06-24 12:35:06 +02:00
Gregor Žunič
7a10ae0c96 Squashed commit langchain to native 2025-06-24 12:26:55 +02:00
mertunsall
4158611b2b fix 2025-06-24 11:12:58 +02:00
mertunsall
3ff2443c9a update emoji in extracted_content 2025-06-24 10:59:07 +02:00
Mert Unsal
6e1a2172db Merge branch 'main' into mert/click_download 2025-06-24 10:49:03 +02:00
mertunsall
d92a960983 fix download memory in clicking 2025-06-24 10:42:41 +02:00
mertunsall
87e3529e85 bugfix 2025-06-24 01:14:00 +02:00
Mert Unsal
4f9793b065 move filesystem controllers (#2065)
Moved file system action controllers from agent/service.py to
controller/service.py to centralize file operations. 
Fixed a bug with read_file.
2025-06-24 00:08:30 +02:00
Nick Sweeting
01b9580743 show full error text, check for missing special args, dont check browser tabs for connection status 2025-06-23 15:03:02 -07:00
mertunsall
9edffbdd10 move filesystem controllers 2025-06-23 23:56:51 +02:00
mertunsall
15d25f4b61 fix click element upload_index problem
update file upload example
2025-06-23 21:46:17 +02:00
mertunsall
ab6819885e Extracted content is automatically saved to a file and leaving better description to the memory for better agent context 2025-06-23 13:56:13 +02:00
mertunsall
b3ccedf632 Update action description for input_text to clarify functionality 2025-06-22 17:56:53 +02:00
mertunsall
258d0b0bec Implemented a try-except block to handle exceptions when inputting text into DOM elements. If an error occurs, a descriptive message is returned to indicate the failure, improving robustness in browser interactions. 2025-06-22 15:34:37 +02:00
Nick Sweeting
b67be37490 fix type hint errors 2025-06-21 04:35:24 -07:00
Magnus Müller
4a8cf30dac Merge branch 'main' into mert/new_everything 2025-06-20 12:27:19 +02:00
Magnus Müller
4c2952d640 Squashed commit of the following:
commit a9cf53a1b1
Merge: 5aa62c11 0f9ffa10
Author: Magnus Müller <67061560+MagMueller@users.noreply.github.com>
Date:   Fri Jun 20 10:41:19 2025 +0200

    Set user_data_dir to None (#2015)

    <!-- This is an auto-generated description by cubic. -->
    Changed browser session setup to use incognito mode by setting
    user_data_dir to None, preventing persistent state between evaluation
    runs.

    <!-- End of auto-generated description by cubic. -->

commit 0f9ffa1072
Author: Magnus Müller <67061560+MagMueller@users.noreply.github.com>
Date:   Fri Jun 20 10:38:01 2025 +0200

    Set user_data_dir to None

commit 5aa62c1113
Merge: d8a9d21b e559ff5e
Author: Nick Sweeting <git@sweeting.me>
Date:   Thu Jun 19 23:01:49 2025 -0700

    Fix cross-origin iframe DOM retrieval (#1965)

commit d8a9d21b00
Merge: 3e5f3049 b6be1583
Author: Nick Sweeting <git@sweeting.me>
Date:   Thu Jun 19 23:01:21 2025 -0700

    Fix critical domain restriction bypass vulnerability (#2006)

commit b6be158319
Author: Sahar <saharhashai@gmail.com>
Date:   Thu Jun 19 02:28:34 2025 -0700

    Delete tests/ci/test_security_url_validation.py

commit aca4b57329
Author: Sahar <saharhashai@gmail.com>
Date:   Thu Jun 19 02:27:57 2025 -0700

    Delete SECURITY_FIX_REPORT.md

commit 45872c1e45
Author: Your Name <your.email@example.com>
Date:   Thu Jun 19 11:24:50 2025 +0200

    fix(security): prevent domain restriction bypass in controller actions

    - Add domain validation to controller.click() and controller.type() methods
    - Implement comprehensive security checks before executing actions
    - Prevent potential prompt injection and unauthorized data access
    - Add extensive test coverage for domain validation scenarios
    - Update documentation with security considerations

    This critical fix prevents complete bypass of domain restrictions that
    could enable attackers to perform unauthorized actions on any domain.

commit e559ff5eaa
Merge: 19ae8a11 f348e0c5
Author: Nick Sweeting <git@sweeting.me>
Date:   Sat Jun 14 01:56:09 2025 -0700

    Merge branch 'main' into main

commit 19ae8a1146
Merge: e1b3ff9e 08ed0be3
Author: Nick Sweeting <git@sweeting.me>
Date:   Sat Jun 14 00:31:30 2025 -0700

    Merge branch 'main' into main

commit e1b3ff9e9d
Author: Ilya Biryukov <ilbiryuk@microsoft.com>
Date:   Thu Jun 12 17:40:40 2025 -0700

    Revert changes to  examples/features/multiple_agents_same_browser.py

commit d20a3b55d6
Author: Ilya Biryukov <ilbiryuk@microsoft.com>
Date:   Thu Jun 12 17:30:59 2025 -0700

    Fix pre-commit lint issues and compile error in multiple_agents_same_browser

commit 13d5468aa2
Author: Ilya Biryukov <ilbiryuk@microsoft.com>
Date:   Thu Jun 12 14:07:21 2025 -0700

    Fix cross-origin iframe DOM retrieval
2025-06-20 10:51:06 +02:00