Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

MagMueller
Copy link
Collaborator

@MagMueller MagMueller commented Sep 6, 2025

Auto-generated PR for branch: feat/cdp-add-origins-storage-state


Summary by cubic

Add CDP support to capture localStorage and sessionStorage per origin and include them in storage state alongside cookies. Improves session persistence for apps that store auth tokens in web storage.

  • New Features
    • Added _cdp_get_origins to enumerate unique origins via Page.getFrameTree.
    • Retrieved localStorage/sessionStorage with DOMStorage.getDOMStorageItems.
    • Updated _cdp_get_storage_state to return an origins array (only when data exists).
    • Ensured DOMStorage is enabled/disabled safely and logged per-origin errors without failing the call.

jtanningbed and others added 3 commits August 28, 2025 16:43
Implements _cdp_get_origins() method to capture localStorage and sessionStorage
using cdp-use's typed DOMStorage client. This enables proper session
persistence for applications that store authentication tokens in browser storage
rather than cookies.

- Adds _cdp_get_origins() to enumerate all frames and extract unique origins
- Uses cdp-use's DOMStorage.getDOMStorageItems to retrieve localStorage/sessionStorage
- Updates _cdp_get_storage_state() to include origins in storage state
- Handles errors gracefully with debug logging for individual storage failures
- Uses try-finally to ensure DOMStorage is properly disabled even on errors
- Encapsulates storage extraction logic in helper functions for clarity
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

@MagMueller MagMueller merged commit a28e7a3 into main Sep 6, 2025
56 checks passed
@MagMueller MagMueller deleted the feat/cdp-add-origins-storage-state branch September 6, 2025 20:08
Copy link

github-actions bot commented Sep 6, 2025

Agent Task Evaluation Results: 2/4 (50%)

View detailed results
Task Result Reason
amazon_laptop ✅ Pass The agent successfully navigated to amazon.com, performed a search for 'laptop', and returned the name and details of the first laptop product result. The output includes the product title, price, rating, number of reviews, and delivery information, fulfilling the task requirements.
google_maps_3d ❌ Fail The agent successfully searched for ETH Zurich Hauptgebäude on www.google.com/maps, closed the side panel, switched to Satellite View, and panned the map to show both ETH Zurich Hauptgebäude and Zurich Lake. However, it failed to enable 3D mode as the 3D button remained disabled, and it was unable to capture a screenshot. Since enabling 3D mode is a required step for success, the task is considered unsuccessful.
browser_use_pip ❌ Fail The agent failed to find and provide the required pip installation command 'pip install browser-use'. The output explicitly states that the repository page with installation instructions was not found, and thus the task is incomplete. Therefore, the success criteria were not met.
captcha_cloudflare ✅ Pass The agent successfully solved the captcha, clicked on 'Check', waited for the process to complete, and extracted the hostname value as 'example.com' from the displayed dictionary. This meets all the criteria for success.

Check the evaluate-tasks job for detailed task execution logs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants