Commit Graph

1467 Commits

Author SHA1 Message Date
Mert Unsal ca11fbb80e Merge branch 'main' into main 2025-11-26 12:49:07 -08:00
Mert Unsal 4a7334ae77 Merge branch 'main' into fix/temp-dir-cleanup-bug 2025-11-26 12:45:53 -08:00
mertunsall 7e98622594 Remove wrong log{ 2025-11-26 12:40:47 -08:00
Mert Unsal ca2bed58fe Merge branch 'main' into main 2025-11-26 12:36:02 -08:00
Mert Unsal cb21a1b70e Merge branch 'main' into mert/fix_screenshot_bug 2025-11-26 12:32:47 -08:00
mertunsall ce3d222f2a safety checks 2025-11-26 12:32:15 -08:00
mertunsall d7600603a2 dont change agent focus outside? 2025-11-26 12:25:40 -08:00
Mert Unsal 89990d360d Merge branch 'main' into main 2025-11-26 11:02:10 -08:00
Mert Unsal 885ec7cc6f Merge branch 'main' into mert/fix_more 2025-11-26 10:33:39 -08:00
mertunsall ad1c9b070e fix 2025-11-26 10:33:06 -08:00
Mert Unsal 8808474a39 Merge branch 'main' into kalil0321/har_watchdog 2025-11-26 10:32:40 -08:00
Mert Unsal b53a593d33 Merge branch 'main' into kalil0321/har_watchdog 2025-11-26 10:28:34 -08:00
Mert Unsal 81fe5c0573 Merge branch 'main' into kalil0321/demo-mode 2025-11-26 10:28:04 -08:00
Cursor Agent 717845c4a7 Increase ScreenshotEvent timeout to 15 seconds
Co-authored-by: mailmertunsal <mailmertunsal@gmail.com>
2025-11-26 17:29:29 +00:00
tomerwave 00462f9282 fix: use default_factory for event_timeout to allow runtime env var configuration 2025-11-26 10:20:56 +02:00
mertunsall b2c56f63c7 better 2025-11-24 12:37:57 -08:00
mertunsall 0f315be2bd Small fix 2025-11-24 12:26:01 -08:00
Cursor Agent 36b2b93d9b Replace broken mouse click with ClickCoordinateEvent
- Add ClickCoordinateEvent to handle coordinate-based clicking via CDP
- Replace broken page.mouse.click() with CDP Input.dispatchMouseEvent
- Add safety checks for file inputs, select elements, and print dialogs
- Add get_dom_element_at_coordinates() to BrowserSession for element detection
- Add force parameter to ClickElementAction to optionally skip safety checks
- Update _click_by_coordinate to dispatch ClickCoordinateEvent instead of using mouse

This fixes coordinate clicking functionality by using CDP directly instead of
the broken Actor mouse object, matching the implementation from mert/everything_coordinates.
2025-11-24 19:55:48 +00:00
Mert Unsal 1ed439156c Merge branch 'main' into mert/fix_allowed_domains 2025-11-24 11:22:53 -08:00
mertunsall 375bc6a283 fix 2025-11-24 11:22:24 -08:00
Shubham Singh 66f2da3abc Merge branch 'main' into fix/3587-cdp-url-with-query-params 2025-11-23 19:27:10 +05:30
mertunsall a396927435 Fix scroll action 2025-11-22 21:27:01 -08:00
Shubham Singh 652e94ed82 Merge branch 'main' into fix/3587-cdp-url-with-query-params 2025-11-22 19:19:58 +05:30
shubham-021 b03d450c70 fix/linting_issue 2025-11-22 19:19:37 +05:30
shubham-021 73c294f7a3 fix/cdp_url_parsing 2025-11-22 18:47:36 +05:30
kalil0321 bdc8fb08ef Merge branch 'main' into kalil0321/demo-mode 2025-11-21 14:54:32 +01:00
Magnus Müller d301f629fd Merge main into fix-framework-events 2025-11-20 23:09:23 -08:00
Pyry Takala 8bb61d906a Fix: Preserve in-use temporary user_data_dir during browser launch
Previously, when browser launch succeeded after retry using a temporary
directory, the code immediately deleted ALL temporary directories including
the one actively being used by the running browser process. This caused
browser crashes and data corruption when Chrome tried to write to the
deleted user_data_dir during normal operation.

The fix:
- Only clean up unused temporary directories after successful launch
- Preserve the currently used temporary directory until browser cleanup
- Update _temp_dirs_to_cleanup to track only the in-use directory for
  proper cleanup during BrowserKillEvent
2025-11-21 02:39:10 +00:00
kalil0321 50bafbd9aa Change log level from info to debug for session data clearing and browser session reset messages 2025-11-18 18:52:43 +01:00
kalil0321 574b9e3472 Address cubic issue 2025-11-18 18:49:04 +01:00
kalil0321 1de03304e1 Address cubic 2025-11-18 18:25:38 +01:00
kalil0321 85a866e700 Fix some UI inconsistencies 2025-11-18 17:59:23 +01:00
kalil0321 7160f5cf1b Add demo panel script generator and update profile for demo mode display 2025-11-18 17:30:52 +01:00
kalil0321 5c41ea9112 implementlogs persistence 2025-11-18 17:30:07 +01:00
kalil0321 506d0705bf Improved panel 2025-11-18 14:53:24 +01:00
kalil0321 73f4138b10 Merge branch 'main' into attempt-fix-real-browser 2025-11-16 11:58:58 +01:00
reformedot 2d433dca4b refactor: change logging level from info to debug in BrowserSession methods
Updated the logging level for session management methods in BrowserSession to debug for more granular logging. This change applies to the reset, kill, and stop methods, enhancing the clarity of log outputs during browser session operations without cluttering the info logs.
2025-11-14 13:49:20 -08:00
reformedot 6c1f772a2d Enhance SessionManager and BrowserSession with defensive checks and connection management
- Added defensive checks in SessionManager to skip target attachment and focus recovery if the browser is shutting down (i.e., _cdp_client_root is None).
- Introduced a connection lock in BrowserSession to prevent concurrent connection attempts, ensuring safe CDP client management.
- Improved logging for session reset and connection handling, providing clearer insights into the browser session state during operations.
- Enhanced error handling when stopping the CDP client and clearing session manager state on initialization failures.

These changes improve the robustness and reliability of session management in the browser environment.
2025-11-14 13:05:18 -08:00
kalil0321 1c85a8a688 Fix lint 2025-11-13 15:49:43 +01:00
kalil0321 0988199776 Merge branch 'main' into kalil0321/demo-mode 2025-11-13 15:34:49 +01:00
LarsenCundric a3e1ed7274 Skip if none 2025-11-12 22:24:56 -08:00
mertunsall 1f758178da log too much 2025-11-12 21:20:49 -08:00
Aitor c662b29b31 Merge branch 'main' into feat/improve-navigation 2025-11-13 05:37:09 +01:00
mertunsall a2e81f17d7 more logging 2025-11-12 20:28:23 -08:00
reformedot b741c429d7 refactor: streamline event handling in BrowserSession
- Adjusted the structure of event handling for 'networkIdle' and 'load' events to improve readability and maintainability.
- Ensured that logging for page readiness is consistently executed within the event handling logic.
2025-11-12 20:02:38 -08:00
reformedot 78042d56a5 refactor: enhance error handling in DOMWatchdog tasks
- Updated the `create_task_with_error_handling` calls in `DOMWatchdog` to include the `suppress_exceptions` parameter, improving error management during DOM tree building and screenshot capturing.
- This change allows for better handling of exceptions without interrupting the flow of task execution.
2025-11-12 19:59:39 -08:00
reformedot 77d7f161fb refactor: enhance session management and error handling in BrowserSession
- Improved the `create_task_with_error_handling` function to allow for better exception logging and retrieval based on the `suppress_exceptions` parameter.
- Updated `SessionManager` to implement event-driven recovery for stale agent focus, replacing polling with efficient event handling.
- Refactored session retrieval methods to ensure focus validation and recovery are handled automatically.
- Enhanced logging for recovery processes and session management to provide clearer insights into state changes and errors.
- Adjusted various watchdogs to utilize the new session management methods, ensuring they correctly handle focus validation and session retrieval.
2025-11-12 19:42:24 -08:00
reformedot 91e82ae85e chore: update cdp-use dependency version and increase max WebSocket frame size in BrowserSession
- Updated cdp-use dependency to version 1.4.4 for improved functionality.
- Increased max WebSocket frame size to 200MB in BrowserSession to accommodate large DOMs.
2025-11-12 18:00:14 -08:00
reformedot 060ab445a9 refactor: streamline target validation in BrowserSession 2025-11-12 16:44:07 -08:00
reformedot 74775cab9a refactor: update target discovery to include iframe types in session management 2025-11-12 16:12:22 -08:00