From 1958c539fc8791102c2562db1de5781fe2f738e3 Mon Sep 17 00:00:00 2001 From: a2a-platform Date: Sat, 27 Jun 2026 16:21:11 +0000 Subject: [PATCH] deploy --- .a2a/agent.dsl.json | 4 ++-- a2a.yaml | 3 ++- agent.py | 20 ++++++++++++++++++-- 3 files changed, 22 insertions(+), 5 deletions(-) diff --git a/.a2a/agent.dsl.json b/.a2a/agent.dsl.json index 011dea1..a1c0aeb 100644 --- a/.a2a/agent.dsl.json +++ b/.a2a/agent.dsl.json @@ -3,7 +3,7 @@ "language": "python", "name": "seleniumbase-website-scraper", "description": "SeleniumBase-style browser agent that turns observed website traffic into OpenAPI specs, coverage reports, samples, and a replay client.", - "version": "0.2.2", + "version": "0.2.3", "entrypoint": { "module": "agent", "class_name": "BrowserToApiAgent", @@ -364,7 +364,7 @@ "source": "python-a2a-pack", "project_manifest": { "name": "seleniumbase-website-scraper", - "version": "0.2.2", + "version": "0.2.3", "entrypoint": "agent:BrowserToApiAgent" } } diff --git a/a2a.yaml b/a2a.yaml index 463380f..d68ff50 100644 --- a/a2a.yaml +++ b/a2a.yaml @@ -1,5 +1,5 @@ name: seleniumbase-website-scraper -version: 0.2.2 +version: 0.2.3 entrypoint: agent:BrowserToApiAgent expose: public: true @@ -38,4 +38,5 @@ runtime: - libxfixes3 - libxkbcommon0 - libxrandr2 + - xvfb - xdg-utils diff --git a/agent.py b/agent.py index bbe435c..688a8ae 100644 --- a/agent.py +++ b/agent.py @@ -127,7 +127,7 @@ class BrowserToApiAgent(A2AAgent[BrowserToApiConfig, NoAuth]): "SeleniumBase-style browser agent that turns observed website traffic " "into OpenAPI specs, coverage reports, samples, and a replay client." ) - version = "0.2.2" + version = "0.2.3" config_model = BrowserToApiConfig auth_model = NoAuth @@ -394,7 +394,7 @@ def seleniumbase_stealth_prep( return [], [f"seleniumbase warning: import failed: {type(exc).__name__}: {exc}"] try: - with SB(uc=True, test=True, locale="en-US", use_chromium=True) as sb: + with SB(**_seleniumbase_options()) as sb: log.append("seleniumbase: started UC/CDP stealth session") try: sb.uc_open_with_reconnect(url, reconnect_time=3) @@ -435,6 +435,22 @@ def seleniumbase_stealth_prep( return cookies, log +def _seleniumbase_options() -> dict[str, Any]: + options: dict[str, Any] = { + "uc": True, + "test": True, + "locale": "en-US", + "xvfb": True, + "chromium_arg": "--no-sandbox,--disable-dev-shm-usage,--disable-gpu", + } + system_chromium = _system_chromium_path() + if system_chromium: + options["binary_location"] = system_chromium + else: + options["use_chromium"] = True + return options + + def _seleniumbase_sleep(sb: Any, seconds: int) -> None: try: sb.sleep(seconds)