Files
Alessandro Frau 9469543f5e Run the shared guest Chromium over its private DevTools pipe
Launch Chromium against the existing guest profile and keep native window restoration, scoped handles, the private viewer and lazy startup. Follow iframe history through document readiness, authenticate proxies before restoring tabs and finish bounded shutdown before reopening the profile.

Adopt the installed guest browser offline or install Debian Chromium on first use. Keep interrupted setup retryable and retain the scoped outer SDK cleanup on source upgrades. Exercise the pipe, DOM isolation, provisioning and migration with disposable fixtures.
2026-11-22 12:16:36 +01:00

32 lines
1.3 KiB
Python

import asyncio
from helpers.api import ApiHandler, Request
from plugins._browser.helpers.config import CHROMIUM_EXECUTABLE, describe_browser_extensions, get_browser_config
from plugins._browser.helpers.interactive_view import collect_status as collect_interactive_status
from plugins._browser.helpers.sandbox import worker
from plugins._browser.helpers.runtime import known_context_ids, browser_startup_status
class Status(ApiHandler):
async def process(self, input: dict, request: Request) -> dict:
try:
from plugins._a0_connector.helpers.ws_runtime import all_host_browser_metadata
except ImportError:
host_browser = {"connectors": []}
else:
host_browser = {"connectors": all_host_browser_metadata()}
return {
"plugin": "_browser",
"startup": await asyncio.to_thread(browser_startup_status, str(input.get('context_id') or '')),
"chromium": {
"transport": "cdp-pipe",
"ready": worker.ready,
"binary_path": CHROMIUM_EXECUTABLE if worker.ready else "",
},
"extensions": describe_browser_extensions(get_browser_config()),
"host_browser": host_browser,
"interactive_view": collect_interactive_status(),
"contexts": known_context_ids(),
}