Skip to content

Conversation

reformedot
Copy link
Collaborator

@reformedot reformedot commented Aug 25, 2025

Added browser-use custom CDP domain + option to define CDP version + updated specification


Summary by cubic

Adds a custom BrowserUse CDP domain with captcha solver events and lets you pin the CDP spec version used by the generator. Also syncs to the latest CDP APIs and bumps the package to 1.4.0.

  • New Features

    • New BrowserUse domain with events: captchaSolverStarted and captchaSolverFinished (client, types, registration, and schema included).
    • CDPClient.emit_event(...) to dispatch synthetic/custom events (e.g., BrowserUse events) through the registry.
    • Pin protocol version via CDP_VERSION in generator/constants.py; generator now includes any JSON in cdp_use/custom_protocols/.
    • Upstream CDP updates exposed:
      • CSS: getEnvironmentVariables; computed style extra fields.
      • DOM: forceShowPopover; container queries support for anchored().
      • Emulation: screen management (getScreenInfos, addScreen, removeScreen).
      • Network: getIPProtectionProxyStatus; Response.isIpProtectionUsed.
      • Media: playerCreated event and Player type.
      • Page: Navigate.isDownload; Target.openDevTools; misc type additions and clarifications.
    • Version bump to 1.4.0.
  • Migration

    • To pin CDP, set CDP_VERSION in cdp_use/generator/constants.py and re-run the generator.
    • Add custom protocol files under cdp_use/custom_protocols/ and re-run the generator to include them.
    • For BrowserUse events: register handlers via Registration.BrowserUse.* and emit with client.emit_event("BrowserUse.captchaSolverStarted", {...}).

@reformedot reformedot requested review from pirate and gregpr07 August 25, 2025 08:57
@reformedot
Copy link
Collaborator Author

Important files to review are in:
cdp_use/cdp/browseruse/* and cdp_use/custom_protocols/browseruse.json

@gregpr07 @pirate

Copy link

@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 41 files

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.

1 participant