Commit Graph

23 Commits

Author SHA1 Message Date
Saurav Panda 782535c34f Keep plain BrowserErrors recoverable: only structured ones bypass the generic handler
An unconditional re-raise sent BrowserErrors without long_term_memory (e.g.
upload_file's failure paths) into Tools.act's handle_browser_error, which
re-raises exactly those — escaping act() as an exception where callers
previously got a recoverable ActionResult(error=...).

Guard the bypass on long_term_memory being present (the exact condition
handle_browser_error formats without re-raising; short_term_memory alone
would still re-raise), and flatten plain BrowserErrors to RuntimeError as
before. Regression test covers the plain-BrowserError path through
tools.act.
2026-07-06 15:04:37 -07:00
Saurav Panda f30c3952c9 Preserve BrowserError's structured memory through execute_action
Registry.execute_action's catch-all handler flattened BrowserError into a
generic 'Error executing action ...' RuntimeError, destroying the structured
short_term_memory/long_term_memory the error carries to steer the LLM's next
action (e.g. the list of available dropdown options when clicking a select).
The 'except BrowserError' branch in Tools.act that formats those memories
into an ActionResult was dead code for any action that let a BrowserError
propagate (upload_file, dropdown_options via event_result, extraction
handlers).

Re-raise BrowserError before the generic handlers so handle_browser_error
becomes the single formatting point again.
2026-07-06 14:52:39 -07:00
laithrw f469617aa7 Merge branch 'main' into fix/issue-3970-browser-behavior 2026-02-09 14:28:52 -05:00
Saurav Panda defe37dd28 Improve multiact for agent 2026-02-02 12:50:03 -08:00
Saurav Panda db832bcb83 added extraction schema 2026-02-01 20:26:50 -08:00
mo1998 3a304997ca fix: Add support for replacing literal secret names in LLM output. 2026-01-29 14:57:34 +02:00
LarsenCundric dd8a63ce41 Improve placeholder handling for 2FA secrets in registry service 2026-01-16 17:05:50 -08:00
mertunsall e00ad12c40 lint 2025-11-22 00:16:09 -08:00
Cursor Agent 444825f307 Checkpoint before follow-up message
Co-authored-by: mailmertunsal <mailmertunsal@gmail.com>
2025-11-22 08:08:44 +00:00
reformedot bff596f2e7 refactor: remove target type caching and streamline target retrieval in session management
- Eliminated the caching of target types in SessionManager, simplifying the management of target information.
- Updated various components to directly access target types from the Target objects, enhancing clarity and reducing redundancy.
- Adjusted related methods in BrowserSession, CrashWatchdog, and DomService to reflect the changes in target type retrieval.
2025-11-12 15:19:34 -08:00
Magnus Müller b53a7c116a Update outdated function names 2025-10-05 19:12:52 -07:00
Magnus Müller 1248c07e83 Remove descripitons 2025-10-05 13:02:43 -07:00
Saurav Panda 126d800df4 remove sensitive data from agent history and logging 2025-09-16 14:41:24 -07:00
Magnus Müller fa5bed2891 Update 2FA secret handling in Registry class
- Changed the placeholder check from '2fa_code' to 'bu_2fa_code' to align with recent updates in sensitive data terminology.
- This modification enhances consistency in the handling of 2FA secrets across the codebase.
2025-09-06 08:42:11 -07:00
Magnus Müller bf385a3f34 Update 2FA implementation to standardize sensitive data references
- Changed the key in sensitive_data from 'otp_secret' to '2fa_code' for consistency across files.
- Updated instructions in the 2FA example to reflect the new key and improve clarity on user input.

These changes enhance the clarity and maintainability of the 2FA implementation.
2025-09-06 08:38:14 -07:00
Magnus Müller 91e077a98f Refactor secret replacement logic in Registry class
- Improved handling of sensitive data replacement by ensuring that the correct replacement value is assigned based on the placeholder type.
- Added comments for clarity on the logic used for generating TOTP codes for 2FA secrets.

This change enhances the maintainability and readability of the code.
2025-09-06 07:34:08 -07:00
Magnus Müller 57d1870978 Merge branch 'main' into mkopecki/native-2fa 2025-09-06 06:49:19 -07:00
Mert Unsal c695bb05e4 Update browser_use/tools/registry/service.py
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
2025-08-30 21:06:36 +02:00
mertunsall b177f3166e better exception handling from browser events -> LLM 2025-08-30 20:50:42 +02:00
Magnus Müller 9802142c9b Remove outdated get_current_page 2025-08-26 21:21:48 -07:00
Magnus Müller 49ea4ff03a Remove context 2025-08-26 15:13:30 -07:00
Magnus Müller caa0e7ef1b Rename controller to tools instances 2025-08-26 11:30:39 -07:00
Magnus Müller e89e78842c Rename controller file to tools 2025-08-26 11:06:28 -07:00