Enable CDPDownloadInterceptor for remote browser connections by wintonzheng · Pull Request #4921 · Skyvern-AI/skyvern · GitHub
Skip to content

Enable CDPDownloadInterceptor for remote browser connections - #4921

Merged
wintonzheng merged 1 commit into
mainfrom
repo-sync/shu/cdp-download-interceptor-remote-browser
Feb 28, 2026
Merged

wintonzheng merged 1 commit into
mainfrom
repo-sync/shu/cdp-download-interceptor-remote-browser

Conversation

@wintonzheng

Copy link
Copy Markdown
Contributor

Synced from cloud PR: https://github.com/Skyvern-AI/skyvern-cloud/pull/9042
Author: @wintonzheng

Summary

  • Enables file download capture via CDP Fetch domain for remote browser connections (browser_address)
  • Downloads are streamed over WebSocket to the Skyvern worker disk, eliminating the need for a separate file server
  • Adds browser serve CLI command for easy local Chrome + ngrok setup

Changes

  1. cloud/webeye/special_browsers.py: Add CDPDownloadInterceptor to create_persistent_cdp_browser - this is the function called for remote browser connections with browser_address

  2. skyvern/cli/commands/browser.py: Add browser serve command that launches:

  • Local Chrome with CDP enabled
  • Unified server that proxies CDP WebSocket and optionally serves files
  1. skyvern/forge/sdk/artifact/storage/s3.py & azure.py: Update save_downloaded_files to use local directory. The browser_address and browser_api_key parameters are kept for backward compatibility but are no longer used since CDPDownloadInterceptor handles downloads.

  2. skyvern/forge/agent.py: Add explanatory comments about CDPDownloadInterceptor handling remote browser downloads

  3. skyvern/webeye/browser_factory.py: Add CDPDownloadInterceptor support with enable_cdp_download_interceptor parameter

Test plan

  • End-to-end test with local Skyvern + browser serve + ngrok
  • Verified CDPDownloadInterceptor is enabled on remote browser pages
  • Workflow completes successfully with remote browser connection
  • Compile checks pass
  • Pre-commit hooks pass

🤖 Generated with Claude Code

Synced from cloud PR: Skyvern-AI/skyvern-cloud#9042
Author: @wintonzheng

## Summary

- Enables file download capture via CDP Fetch domain for remote browser connections (`browser_address`)
- Downloads are streamed over WebSocket to the Skyvern worker disk, eliminating the need for a separate file server
- Adds `browser serve` CLI command for easy local Chrome + ngrok setup

## Changes

1. **cloud/webeye/special_browsers.py**: Add CDPDownloadInterceptor to `create_persistent_cdp_browser` - this is the function called for remote browser connections with `browser_address`

2. **skyvern/cli/commands/browser.py**: Add `browser serve` command that launches:
   - Local Chrome with CDP enabled
   - Unified server that proxies CDP WebSocket and optionally serves files

3. **skyvern/forge/sdk/artifact/storage/s3.py & azure.py**: Update `save_downloaded_files` to use local directory. The `browser_address` and `browser_api_key` parameters are kept for backward compatibility but are no longer used since CDPDownloadInterceptor handles downloads.

4. **skyvern/forge/agent.py**: Add explanatory comments about CDPDownloadInterceptor handling remote browser downloads

5. **skyvern/webeye/browser_factory.py**: Add CDPDownloadInterceptor support with `enable_cdp_download_interceptor` parameter

## Test plan

- [x] End-to-end test with local Skyvern + browser serve + ngrok
- [x] Verified CDPDownloadInterceptor is enabled on remote browser pages
- [x] Workflow completes successfully with remote browser connection
- [x] Compile checks pass
- [x] Pre-commit hooks pass

🤖 Generated with [Claude Code](https://claude.ai/code)
@wintonzheng
wintonzheng merged commit 74340ad into main Feb 28, 2026
11 checks passed
@wintonzheng
wintonzheng deleted the repo-sync/shu/cdp-download-interceptor-remote-browser branch February 28, 2026 01:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant