Full Chromium serves both headed and headless sessions. The separate shell duplicates the browser payload and is not needed for either mode. Remove the shell from PM and Docker. Select the managed Chromium executable for agent-browser and the full Chromium channel for direct Playwright callers. Route setup through PM and remove retired packages from cached bundle stores without changing the user's tool store. Update signing, architecture checks, launch probes and install guidance. Leave llama packages and Docker archive cleanup unchanged. Verification: - Real agent-browser navigation, clicks, DOM reads and screenshots pass in headed and headless modes with the same Chromium executable. - The direct Playwright doctor probe passes. - Focused Python and desktop packaging tests pass, as do six Docker checks and both real-browser task-scroll tests. - The built linux/amd64 image is 1.393 GB compressed, 223.6 MB smaller. - The broader PM suite and two unrelated setup tests still fail. Those failures reproduce on unchanged HEAD. - Five updated eval scripts parse; their full scenarios were not run.
17 lines
498 B
Python
17 lines
498 B
Python
"""Read-only full-Chromium selection shared by browser launchers."""
|
|
|
|
from __future__ import annotations
|
|
|
|
import os
|
|
|
|
import pm
|
|
|
|
|
|
def chromium_executable() -> str | None:
|
|
"""Prefer an explicit override, then PM; None leaves resolution to Playwright."""
|
|
override = os.environ.get("AGENT_BROWSER_EXECUTABLE_PATH")
|
|
if override:
|
|
return override
|
|
installed = pm.installed_package("chromium")
|
|
return str(installed.binary) if installed and installed.binary is not None else None
|