This commit is contained in:
a2a-platform
2026-06-27 17:00:28 +00:00
parent 6fa8ee19fa
commit 116dc861bd
3 changed files with 11 additions and 4 deletions

View File

@@ -3,7 +3,7 @@
"language": "python", "language": "python",
"name": "seleniumbase-website-scraper", "name": "seleniumbase-website-scraper",
"description": "SeleniumBase-style browser agent that turns observed website traffic into OpenAPI specs, coverage reports, samples, and a replay client.", "description": "SeleniumBase-style browser agent that turns observed website traffic into OpenAPI specs, coverage reports, samples, and a replay client.",
"version": "0.2.6", "version": "0.2.7",
"entrypoint": { "entrypoint": {
"module": "agent", "module": "agent",
"class_name": "BrowserToApiAgent", "class_name": "BrowserToApiAgent",
@@ -381,7 +381,7 @@
"source": "python-a2a-pack", "source": "python-a2a-pack",
"project_manifest": { "project_manifest": {
"name": "seleniumbase-website-scraper", "name": "seleniumbase-website-scraper",
"version": "0.2.6", "version": "0.2.7",
"entrypoint": "agent:BrowserToApiAgent" "entrypoint": "agent:BrowserToApiAgent"
} }
} }

View File

@@ -1,5 +1,5 @@
name: seleniumbase-website-scraper name: seleniumbase-website-scraper
version: 0.2.6 version: 0.2.7
entrypoint: agent:BrowserToApiAgent entrypoint: agent:BrowserToApiAgent
expose: expose:
public: true public: true

View File

@@ -129,7 +129,7 @@ class BrowserToApiAgent(A2AAgent[BrowserToApiConfig, NoAuth]):
"SeleniumBase-style browser agent that turns observed website traffic " "SeleniumBase-style browser agent that turns observed website traffic "
"into OpenAPI specs, coverage reports, samples, and a replay client." "into OpenAPI specs, coverage reports, samples, and a replay client."
) )
version = "0.2.6" version = "0.2.7"
config_model = BrowserToApiConfig config_model = BrowserToApiConfig
auth_model = NoAuth auth_model = NoAuth
@@ -1641,6 +1641,13 @@ def _try_json_object(text: str) -> dict[str, Any] | None:
return parsed if isinstance(parsed, dict) else None return parsed if isinstance(parsed, dict) else None
def _truncate_text(value: Any, limit: int = 240) -> str:
text = str(value or "").replace("\n", " ").strip()
if len(text) <= limit:
return text
return f"{text[: max(0, limit - 3)]}..."
def _json_loads(line: str) -> Any: def _json_loads(line: str) -> Any:
try: try:
return json.loads(line) return json.loads(line)