deploy
This commit is contained in:
@@ -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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
2
a2a.yaml
2
a2a.yaml
@@ -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
|
||||||
|
|||||||
9
agent.py
9
agent.py
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user