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

@@ -129,7 +129,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.6"
version = "0.2.7"
config_model = BrowserToApiConfig
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
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:
try:
return json.loads(line)