webpilot-engine 2.0.1__tar.gz → 2.0.3__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.
- {webpilot_engine-2.0.1 → webpilot_engine-2.0.3}/PKG-INFO +2 -2
- {webpilot_engine-2.0.1 → webpilot_engine-2.0.3}/adapters/browser_adapter.py +9 -5
- {webpilot_engine-2.0.1 → webpilot_engine-2.0.3}/adapters/live_session_manager.py +17 -13
- {webpilot_engine-2.0.1 → webpilot_engine-2.0.3}/mcp_server.py +1 -1
- {webpilot_engine-2.0.1 → webpilot_engine-2.0.3}/pyproject.toml +3 -2
- {webpilot_engine-2.0.1 → webpilot_engine-2.0.3}/supervisor/client.py +11 -6
- {webpilot_engine-2.0.1 → webpilot_engine-2.0.3}/supervisor/master_daemon.py +17 -10
- {webpilot_engine-2.0.1 → webpilot_engine-2.0.3}/tests/test_live_session.py +2 -0
- {webpilot_engine-2.0.1 → webpilot_engine-2.0.3}/webpilot_engine.egg-info/PKG-INFO +2 -2
- {webpilot_engine-2.0.1 → webpilot_engine-2.0.3}/README.md +0 -0
- {webpilot_engine-2.0.1 → webpilot_engine-2.0.3}/adapters/__init__.py +0 -0
- {webpilot_engine-2.0.1 → webpilot_engine-2.0.3}/adapters/base.py +0 -0
- {webpilot_engine-2.0.1 → webpilot_engine-2.0.3}/adapters/dom_scripts.py +0 -0
- {webpilot_engine-2.0.1 → webpilot_engine-2.0.3}/adapters/envelope_builder.py +0 -0
- {webpilot_engine-2.0.1 → webpilot_engine-2.0.3}/adapters/upload_adapter.py +0 -0
- {webpilot_engine-2.0.1 → webpilot_engine-2.0.3}/builder.py +0 -0
- {webpilot_engine-2.0.1 → webpilot_engine-2.0.3}/cli.py +0 -0
- {webpilot_engine-2.0.1 → webpilot_engine-2.0.3}/config/__init__.py +0 -0
- {webpilot_engine-2.0.1 → webpilot_engine-2.0.3}/config/settings.py +0 -0
- {webpilot_engine-2.0.1 → webpilot_engine-2.0.3}/constants/__init__.py +0 -0
- {webpilot_engine-2.0.1 → webpilot_engine-2.0.3}/constants/contracts.py +0 -0
- {webpilot_engine-2.0.1 → webpilot_engine-2.0.3}/constants/selectors.py +0 -0
- {webpilot_engine-2.0.1 → webpilot_engine-2.0.3}/constants/timeouts.py +0 -0
- {webpilot_engine-2.0.1 → webpilot_engine-2.0.3}/core/__init__.py +0 -0
- {webpilot_engine-2.0.1 → webpilot_engine-2.0.3}/core/exceptions.py +0 -0
- {webpilot_engine-2.0.1 → webpilot_engine-2.0.3}/core/models.py +0 -0
- {webpilot_engine-2.0.1 → webpilot_engine-2.0.3}/engine.py +0 -0
- {webpilot_engine-2.0.1 → webpilot_engine-2.0.3}/exceptions.py +0 -0
- {webpilot_engine-2.0.1 → webpilot_engine-2.0.3}/models.py +0 -0
- {webpilot_engine-2.0.1 → webpilot_engine-2.0.3}/orchestration/__init__.py +0 -0
- {webpilot_engine-2.0.1 → webpilot_engine-2.0.3}/orchestration/context.py +0 -0
- {webpilot_engine-2.0.1 → webpilot_engine-2.0.3}/orchestration/flow_orchestrator.py +0 -0
- {webpilot_engine-2.0.1 → webpilot_engine-2.0.3}/orchestration/session_coordinator.py +0 -0
- {webpilot_engine-2.0.1 → webpilot_engine-2.0.3}/services/__init__.py +0 -0
- {webpilot_engine-2.0.1 → webpilot_engine-2.0.3}/services/auth_navigation_service.py +0 -0
- {webpilot_engine-2.0.1 → webpilot_engine-2.0.3}/services/field_interaction_service.py +0 -0
- {webpilot_engine-2.0.1 → webpilot_engine-2.0.3}/services/form_filler_service.py +0 -0
- {webpilot_engine-2.0.1 → webpilot_engine-2.0.3}/services/inspection_formatter_service.py +0 -0
- {webpilot_engine-2.0.1 → webpilot_engine-2.0.3}/services/inspection_service.py +0 -0
- {webpilot_engine-2.0.1 → webpilot_engine-2.0.3}/services/reactive_interaction_service.py +0 -0
- {webpilot_engine-2.0.1 → webpilot_engine-2.0.3}/setup.cfg +0 -0
- {webpilot_engine-2.0.1 → webpilot_engine-2.0.3}/supervisor/__init__.py +0 -0
- {webpilot_engine-2.0.1 → webpilot_engine-2.0.3}/supervisor/contracts.py +0 -0
- {webpilot_engine-2.0.1 → webpilot_engine-2.0.3}/supervisor/shell.py +0 -0
- {webpilot_engine-2.0.1 → webpilot_engine-2.0.3}/supervisor/worker_process.py +0 -0
- {webpilot_engine-2.0.1 → webpilot_engine-2.0.3}/tests/test_config_and_builder.py +0 -0
- {webpilot_engine-2.0.1 → webpilot_engine-2.0.3}/tests/test_contracts.py +0 -0
- {webpilot_engine-2.0.1 → webpilot_engine-2.0.3}/tests/test_engine_facade.py +0 -0
- {webpilot_engine-2.0.1 → webpilot_engine-2.0.3}/tests/test_mcp_server.py +0 -0
- {webpilot_engine-2.0.1 → webpilot_engine-2.0.3}/tests/test_orchestration.py +0 -0
- {webpilot_engine-2.0.1 → webpilot_engine-2.0.3}/tests/test_redaction.py +0 -0
- {webpilot_engine-2.0.1 → webpilot_engine-2.0.3}/tests/test_services.py +0 -0
- {webpilot_engine-2.0.1 → webpilot_engine-2.0.3}/tests/test_supervisor.py +0 -0
- {webpilot_engine-2.0.1 → webpilot_engine-2.0.3}/validators/__init__.py +0 -0
- {webpilot_engine-2.0.1 → webpilot_engine-2.0.3}/validators/form_validator.py +0 -0
- {webpilot_engine-2.0.1 → webpilot_engine-2.0.3}/validators/payload_validator.py +0 -0
- {webpilot_engine-2.0.1 → webpilot_engine-2.0.3}/webpilot_engine.egg-info/SOURCES.txt +0 -0
- {webpilot_engine-2.0.1 → webpilot_engine-2.0.3}/webpilot_engine.egg-info/dependency_links.txt +0 -0
- {webpilot_engine-2.0.1 → webpilot_engine-2.0.3}/webpilot_engine.egg-info/entry_points.txt +0 -0
- {webpilot_engine-2.0.1 → webpilot_engine-2.0.3}/webpilot_engine.egg-info/requires.txt +0 -0
- {webpilot_engine-2.0.1 → webpilot_engine-2.0.3}/webpilot_engine.egg-info/top_level.txt +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: webpilot-engine
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.3
|
|
4
4
|
Summary: WebPilot: Enterprise Autonomous Browser Engine, Universal Form Inspector & AI Agent Web Runtime
|
|
5
|
-
Author:
|
|
5
|
+
Author: Abdulkarim Salih, WebPilot Core Team
|
|
6
6
|
License: MIT
|
|
7
7
|
Keywords: webpilot,browser-runtime,ai-agent,web-automation,playwright,form-filler,ats-automation,sap-successfactors,workday,browser-supervisor,process-isolation
|
|
8
8
|
Classifier: Development Status :: 5 - Production/Stable
|
|
@@ -253,11 +253,15 @@ class BrowserAdapter(BrowserAdapterProtocol):
|
|
|
253
253
|
args=["--disable-blink-features=AutomationControlled"],
|
|
254
254
|
)
|
|
255
255
|
try:
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
256
|
+
if sys.platform == "win32":
|
|
257
|
+
ps_c = f'(Get-CimInstance Win32_Process | Where-Object {{ $_.ParentProcessId -eq {os.getpid()} }}).ProcessId | Select-Object -First 1'
|
|
258
|
+
out = subprocess.check_output(["powershell", "-NoProfile", "-Command", ps_c], text=True).strip()
|
|
259
|
+
if out.isdigit():
|
|
260
|
+
self.browser_pid = int(out)
|
|
261
|
+
else:
|
|
262
|
+
out = subprocess.check_output(["pgrep", "-P", str(os.getpid())], text=True).strip().split()
|
|
263
|
+
if out and out[0].isdigit():
|
|
264
|
+
self.browser_pid = int(out[0])
|
|
261
265
|
except Exception:
|
|
262
266
|
pass
|
|
263
267
|
|
|
@@ -188,15 +188,16 @@ class LiveSessionManager:
|
|
|
188
188
|
proc_pid = cls._launch_wmi_process(cmd_str)
|
|
189
189
|
|
|
190
190
|
if proc_pid is None:
|
|
191
|
-
|
|
191
|
+
popen_kwargs: Dict[str, Any] = {
|
|
192
|
+
"stdout": subprocess.DEVNULL,
|
|
193
|
+
"stderr": subprocess.DEVNULL,
|
|
194
|
+
}
|
|
192
195
|
if sys.platform == "win32":
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
creationflags=flags,
|
|
199
|
-
)
|
|
196
|
+
popen_kwargs["creationflags"] = subprocess.DETACHED_PROCESS | subprocess.CREATE_NEW_PROCESS_GROUP
|
|
197
|
+
else:
|
|
198
|
+
popen_kwargs["start_new_session"] = True
|
|
199
|
+
|
|
200
|
+
proc = subprocess.Popen(args, **popen_kwargs)
|
|
200
201
|
proc_pid = proc.pid
|
|
201
202
|
|
|
202
203
|
# Wait up to 5 seconds for CDP port to become active
|
|
@@ -303,16 +304,19 @@ if ($proc.ReturnValue -eq 0) {{
|
|
|
303
304
|
if wmi_pid is not None:
|
|
304
305
|
return
|
|
305
306
|
|
|
306
|
-
|
|
307
|
+
popen_kwargs: Dict[str, Any] = {
|
|
308
|
+
"stdout": subprocess.DEVNULL,
|
|
309
|
+
"stderr": subprocess.DEVNULL,
|
|
310
|
+
}
|
|
307
311
|
if sys.platform == "win32":
|
|
308
|
-
|
|
312
|
+
popen_kwargs["creationflags"] = subprocess.DETACHED_PROCESS | subprocess.CREATE_NEW_PROCESS_GROUP
|
|
313
|
+
else:
|
|
314
|
+
popen_kwargs["start_new_session"] = True
|
|
309
315
|
|
|
310
316
|
try:
|
|
311
317
|
subprocess.Popen(
|
|
312
318
|
[sys.executable, "-m", "adapters.live_session_manager", str(browser_pid), str(port), str(timeout_seconds)],
|
|
313
|
-
|
|
314
|
-
stderr=subprocess.DEVNULL,
|
|
315
|
-
creationflags=flags,
|
|
319
|
+
**popen_kwargs,
|
|
316
320
|
)
|
|
317
321
|
except Exception:
|
|
318
322
|
pass
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"""WebPilot MCP Server (Model Context Protocol).
|
|
2
2
|
|
|
3
3
|
Exposes WebPilot's autonomous multi-tier browser engine as standard MCP tools
|
|
4
|
-
for AI Agents (Claude,
|
|
4
|
+
for AI Agents (Claude, OpenCode, Cursor, etc.).
|
|
5
5
|
|
|
6
6
|
Features:
|
|
7
7
|
- Persistent browser state across tool calls (no restarting between actions)
|
|
@@ -4,11 +4,12 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "webpilot-engine"
|
|
7
|
-
version = "2.0.
|
|
7
|
+
version = "2.0.3"
|
|
8
8
|
description = "WebPilot: Enterprise Autonomous Browser Engine, Universal Form Inspector & AI Agent Web Runtime"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
authors = [
|
|
11
|
-
{ name = "
|
|
11
|
+
{ name = "Abdulkarim Salih" },
|
|
12
|
+
{ name = "WebPilot Core Team" }
|
|
12
13
|
]
|
|
13
14
|
license = { text = "MIT" }
|
|
14
15
|
requires-python = ">=3.10"
|
|
@@ -49,15 +49,12 @@ class SupervisorClient:
|
|
|
49
49
|
script_path = os.path.join(PROJECT_ROOT, "supervisor", "master_daemon.py")
|
|
50
50
|
py_exe = sys.executable
|
|
51
51
|
|
|
52
|
-
# Launch detached via WMI outside any parent terminal Job Object
|
|
52
|
+
# Launch detached via WMI outside any parent terminal Job Object on Windows
|
|
53
53
|
if sys.platform == "win32":
|
|
54
54
|
if getattr(sys, "frozen", False):
|
|
55
|
-
py_exe = sys.executable
|
|
56
55
|
cwd = os.path.dirname(py_exe)
|
|
57
56
|
cmd_line = f'`"{py_exe}`" --run-daemon'
|
|
58
57
|
else:
|
|
59
|
-
script_path = os.path.join(PROJECT_ROOT, "supervisor", "master_daemon.py")
|
|
60
|
-
py_exe = sys.executable
|
|
61
58
|
cwd = PROJECT_ROOT
|
|
62
59
|
cmd_line = f'`"{py_exe}`" `"{script_path}`"'
|
|
63
60
|
|
|
@@ -79,12 +76,20 @@ if ($proc.ReturnValue -eq 0) {{
|
|
|
79
76
|
timeout=5,
|
|
80
77
|
)
|
|
81
78
|
else:
|
|
79
|
+
# POSIX / Linux / macOS
|
|
80
|
+
if getattr(sys, "frozen", False):
|
|
81
|
+
cmd = [py_exe, "--run-daemon"]
|
|
82
|
+
cwd = os.path.dirname(py_exe)
|
|
83
|
+
else:
|
|
84
|
+
cmd = [py_exe, script_path]
|
|
85
|
+
cwd = PROJECT_ROOT
|
|
86
|
+
|
|
82
87
|
subprocess.Popen(
|
|
83
|
-
|
|
88
|
+
cmd,
|
|
84
89
|
stdout=subprocess.DEVNULL,
|
|
85
90
|
stderr=subprocess.DEVNULL,
|
|
86
91
|
start_new_session=True,
|
|
87
|
-
cwd=
|
|
92
|
+
cwd=cwd,
|
|
88
93
|
)
|
|
89
94
|
|
|
90
95
|
# Wait up to 4 seconds for supervisor to become active
|
|
@@ -87,15 +87,18 @@ class MasterSupervisor:
|
|
|
87
87
|
worker_cmd = [sys.executable, "-m", "supervisor.worker_process"]
|
|
88
88
|
worker_cwd = PROJECT_ROOT
|
|
89
89
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
90
|
+
popen_kwargs: Dict[str, Any] = {
|
|
91
|
+
"stdin": subprocess.PIPE,
|
|
92
|
+
"stdout": subprocess.PIPE,
|
|
93
|
+
"stderr": subprocess.PIPE,
|
|
94
|
+
"text": True,
|
|
95
|
+
"bufsize": 1,
|
|
96
|
+
"cwd": worker_cwd,
|
|
97
|
+
}
|
|
98
|
+
if sys.platform != "win32":
|
|
99
|
+
popen_kwargs["start_new_session"] = True
|
|
100
|
+
|
|
101
|
+
self.worker_process = subprocess.Popen(worker_cmd, **popen_kwargs)
|
|
99
102
|
return self.worker_process
|
|
100
103
|
|
|
101
104
|
def execute_action(self, req: SupervisorActionRequest) -> SupervisorActionResponse:
|
|
@@ -193,7 +196,11 @@ class MasterSupervisor:
|
|
|
193
196
|
stderr=subprocess.DEVNULL,
|
|
194
197
|
)
|
|
195
198
|
else:
|
|
196
|
-
|
|
199
|
+
try:
|
|
200
|
+
import signal
|
|
201
|
+
os.killpg(os.getpgid(proc.pid), signal.SIGKILL)
|
|
202
|
+
except Exception:
|
|
203
|
+
proc.kill()
|
|
197
204
|
except Exception:
|
|
198
205
|
pass
|
|
199
206
|
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import os
|
|
4
4
|
import subprocess
|
|
5
|
+
import sys
|
|
5
6
|
import time
|
|
6
7
|
import urllib.request
|
|
7
8
|
import pytest
|
|
@@ -10,6 +11,7 @@ from playwright.sync_api import sync_playwright
|
|
|
10
11
|
from adapters.live_session_manager import LiveSessionManager, DEFAULT_CDP_PORT
|
|
11
12
|
|
|
12
13
|
|
|
14
|
+
@pytest.mark.skipif(sys.platform != "win32", reason="WMI is only available on Windows")
|
|
13
15
|
def test_wmi_launch():
|
|
14
16
|
"""Verify _launch_wmi_process returns a real PID."""
|
|
15
17
|
p = sync_playwright().start()
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: webpilot-engine
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.3
|
|
4
4
|
Summary: WebPilot: Enterprise Autonomous Browser Engine, Universal Form Inspector & AI Agent Web Runtime
|
|
5
|
-
Author:
|
|
5
|
+
Author: Abdulkarim Salih, WebPilot Core Team
|
|
6
6
|
License: MIT
|
|
7
7
|
Keywords: webpilot,browser-runtime,ai-agent,web-automation,playwright,form-filler,ats-automation,sap-successfactors,workday,browser-supervisor,process-isolation
|
|
8
8
|
Classifier: Development Status :: 5 - Production/Stable
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{webpilot_engine-2.0.1 → webpilot_engine-2.0.3}/webpilot_engine.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|