diff --git a/plugins/browser/_common.py b/plugins/browser/_common.py index c0aef2e687..490ef7dc3b 100644 --- a/plugins/browser/_common.py +++ b/plugins/browser/_common.py @@ -1,11 +1,7 @@ -"""Shared base for the bundled cloud-browser provider plugins. - -Every vendor (Browserbase, Browser Use, Firecrawl) speaks the same REST shape: -POST to create a session, one request to release it. :class:`CloudBrowserProvider` -owns that lifecycle; subclasses supply class attributes and small hooks. Log -messages carry the vendor label and go to the subclass module's logger so the -emitted text matches the pre-refactor per-vendor modules. -""" +"""Shared base for the bundled cloud-browser plugins. Every vendor speaks the same REST shape +(POST to create a session, one request to release it); :class:`CloudBrowserProvider` owns that +lifecycle, subclasses supply attributes + hooks. Logs go to the subclass module's logger with the +vendor label so emitted text matches the pre-refactor per-vendor modules.""" from __future__ import annotations @@ -21,26 +17,19 @@ _CLOSE_OK = {200, 201, 204} class CloudBrowserProvider(BrowserProvider): - """REST cloud-browser provider driven by class attributes + hooks. - - Subclasses set ``provider_id`` / ``label``, ``release_method`` / ``release_path`` - (``{session_id}`` placeholder, appended to ``config["base_url"]``), implement - ``_get_config_or_none()`` and ``_headers(config)``, and write ``create_session`` - on top of :meth:`_post_create` / :meth:`_check_created` / :meth:`_session_name`. - """ + """Subclasses set ``provider_id``/``label``, ``release_method``/``release_path`` (``{session_id}`` + placeholder appended to ``config["base_url"]``), implement ``_get_config_or_none()`` and + ``_headers(config)``, and build ``create_session`` on ``_post_create``/``_check_created``.""" provider_id: str label: str release_method: str release_path: str missing_credentials_error: str = "" - # Setup-picker metadata; ``setup_tag=None`` hides the provider from the picker. - setup_tag: Optional[str] = None + setup_tag: Optional[str] = None # ``None`` hides the provider from the setup picker setup_env_vars: List[Dict[str, str]] = [] - # Rendered noun in "Failed to create