browser-automation-cli 0.2.0__tar.gz → 0.2.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {browser_automation_cli-0.2.0 → browser_automation_cli-0.2.1}/PKG-INFO +2 -2
- {browser_automation_cli-0.2.0 → browser_automation_cli-0.2.1}/cli/main.py +4 -3
- {browser_automation_cli-0.2.0 → browser_automation_cli-0.2.1}/daemon/browser.py +3 -3
- {browser_automation_cli-0.2.0 → browser_automation_cli-0.2.1}/daemon/session.py +2 -2
- {browser_automation_cli-0.2.0 → browser_automation_cli-0.2.1}/pyproject.toml +2 -2
- {browser_automation_cli-0.2.0 → browser_automation_cli-0.2.1}/.gitignore +0 -0
- {browser_automation_cli-0.2.0 → browser_automation_cli-0.2.1}/AGENTS.md +0 -0
- {browser_automation_cli-0.2.0 → browser_automation_cli-0.2.1}/LICENSE.txt +0 -0
- {browser_automation_cli-0.2.0 → browser_automation_cli-0.2.1}/Makefile +0 -0
- {browser_automation_cli-0.2.0 → browser_automation_cli-0.2.1}/README.md +0 -0
- {browser_automation_cli-0.2.0 → browser_automation_cli-0.2.1}/SKILL.md +0 -0
- {browser_automation_cli-0.2.0 → browser_automation_cli-0.2.1}/daemon/server.py +0 -0
- {browser_automation_cli-0.2.0 → browser_automation_cli-0.2.1}/setup.sh +0 -0
- {browser_automation_cli-0.2.0 → browser_automation_cli-0.2.1}/uv.lock +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: browser-automation-cli
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.1
|
|
4
4
|
Summary: Browser automation daemon + CLI for coding agents. Persistent sessions, no MCP, no extensions.
|
|
5
5
|
Project-URL: Homepage, https://github.com/jshan9078/browser-automation-cli
|
|
6
6
|
Project-URL: Repository, https://github.com/jshan9078/browser-automation-cli
|
|
@@ -28,7 +28,7 @@ License: MIT License
|
|
|
28
28
|
SOFTWARE.
|
|
29
29
|
License-File: LICENSE.txt
|
|
30
30
|
Keywords: agent,automation,browser,cli,playwright
|
|
31
|
-
Requires-Python: >=3.
|
|
31
|
+
Requires-Python: >=3.9
|
|
32
32
|
Requires-Dist: playwright>=1.40.0
|
|
33
33
|
Description-Content-Type: text/markdown
|
|
34
34
|
|
|
@@ -6,11 +6,12 @@ import logging
|
|
|
6
6
|
import subprocess
|
|
7
7
|
import sys
|
|
8
8
|
from pathlib import Path
|
|
9
|
+
from typing import Optional
|
|
9
10
|
|
|
10
11
|
SOCKET_PATH = Path.home() / ".browser-daemon" / "socket"
|
|
11
12
|
|
|
12
13
|
|
|
13
|
-
async def cmd_capture(url: str, full_page: bool = True, output: str
|
|
14
|
+
async def cmd_capture(url: str, full_page: bool = True, output: Optional[str] = None):
|
|
14
15
|
"""Standalone screenshot capture without daemon. Saves to /tmp."""
|
|
15
16
|
from playwright.async_api import async_playwright
|
|
16
17
|
import time
|
|
@@ -143,7 +144,7 @@ async def cmd_navigate(session_id: str, url: str):
|
|
|
143
144
|
print_json(result)
|
|
144
145
|
|
|
145
146
|
|
|
146
|
-
async def cmd_snapshot(session_id: str, selector: str
|
|
147
|
+
async def cmd_snapshot(session_id: str, selector: Optional[str]):
|
|
147
148
|
params = {"selector": selector} if selector else {}
|
|
148
149
|
result = await send_request({"action": "snapshot", "session_id": session_id, "params": params})
|
|
149
150
|
print_json(result)
|
|
@@ -174,7 +175,7 @@ async def cmd_press_key(session_id: str, key: str):
|
|
|
174
175
|
print_json(result)
|
|
175
176
|
|
|
176
177
|
|
|
177
|
-
async def cmd_screenshot(session_id: str, selector: str
|
|
178
|
+
async def cmd_screenshot(session_id: str, selector: Optional[str], output: Optional[str] = None):
|
|
178
179
|
params = {}
|
|
179
180
|
if selector:
|
|
180
181
|
params["selector"] = selector
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import base64
|
|
2
2
|
import logging
|
|
3
|
-
from typing import Any
|
|
3
|
+
from typing import Any, Optional
|
|
4
4
|
|
|
5
5
|
from playwright.async_api import Page
|
|
6
6
|
|
|
@@ -22,7 +22,7 @@ async def navigate(page: Page, url: str) -> dict[str, Any]:
|
|
|
22
22
|
return {"success": False, "error": str(e)}
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
async def snapshot(page: Page, selector: str
|
|
25
|
+
async def snapshot(page: Page, selector: Optional[str] = None) -> dict[str, Any]:
|
|
26
26
|
logger.debug(f"Taking snapshot (selector={selector})")
|
|
27
27
|
try:
|
|
28
28
|
# Use page.evaluate to get element data and page state
|
|
@@ -158,7 +158,7 @@ async def press_key(page: Page, key: str) -> dict[str, Any]:
|
|
|
158
158
|
return {"success": False, "error": str(e)}
|
|
159
159
|
|
|
160
160
|
|
|
161
|
-
async def screenshot(page: Page, selector: str
|
|
161
|
+
async def screenshot(page: Page, selector: Optional[str] = None, output: Optional[str] = None) -> dict[str, Any]:
|
|
162
162
|
logger.debug(f"Taking screenshot (selector={selector})")
|
|
163
163
|
try:
|
|
164
164
|
from pathlib import Path
|
|
@@ -3,7 +3,7 @@ import logging
|
|
|
3
3
|
import time
|
|
4
4
|
import uuid
|
|
5
5
|
from dataclasses import dataclass, field
|
|
6
|
-
from typing import Any
|
|
6
|
+
from typing import Any, Optional
|
|
7
7
|
|
|
8
8
|
from playwright.async_api import Browser, BrowserContext, Page
|
|
9
9
|
|
|
@@ -59,7 +59,7 @@ class SessionManager:
|
|
|
59
59
|
logger.info(f"Created session {session_id}")
|
|
60
60
|
return session
|
|
61
61
|
|
|
62
|
-
async def get(self, session_id: str) -> Session
|
|
62
|
+
async def get(self, session_id: str) -> Optional[Session]:
|
|
63
63
|
async with self._lock:
|
|
64
64
|
return self._sessions.get(session_id)
|
|
65
65
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "browser-automation-cli"
|
|
3
|
-
version = "0.2.
|
|
3
|
+
version = "0.2.1"
|
|
4
4
|
description = "Browser automation daemon + CLI for coding agents. Persistent sessions, no MCP, no extensions."
|
|
5
|
-
requires-python = ">=3.
|
|
5
|
+
requires-python = ">=3.9"
|
|
6
6
|
readme = "README.md"
|
|
7
7
|
license = {file = "LICENSE.txt"}
|
|
8
8
|
authors = [
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|