fix(pm): ship full chromium without headless shell
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.
This commit is contained in:
@@ -4,7 +4,7 @@ import { execFileSync } from 'node:child_process'
|
||||
const a=process.env.ASYNC_REPORT_ARTIFACT_DIR
|
||||
if (!a) throw new Error('Set ASYNC_REPORT_ARTIFACT_DIR to an offline artifact directory')
|
||||
const tag=process.argv[2]??'after'
|
||||
const browser=await chromium.launch({headless:true,args:['--no-sandbox']})
|
||||
const browser=await chromium.launch({channel:'chromium',executablePath:process.env.AGENT_BROWSER_EXECUTABLE_PATH,headless:true,args:['--no-sandbox']})
|
||||
const page=await browser.newPage({viewport:{width:1400,height:1000}})
|
||||
const errors=[];page.on('pageerror',e=>errors.push(String(e)))
|
||||
const producer=JSON.parse(fs.readFileSync(`${a}/producer.json`,'utf8'))
|
||||
|
||||
@@ -3,7 +3,7 @@ import fs from 'node:fs'
|
||||
import { execFileSync } from 'node:child_process'
|
||||
const artifact = process.env.NAVIGATION_ARTIFACT_DIR ?? '/home/teknium/.hermes/cache/desktop-bugs-74848ed3/navigation-markdown'
|
||||
const tag = process.argv[2] ?? 'after'
|
||||
const browser = await chromium.launch({headless: true, args: ['--no-sandbox']})
|
||||
const browser = await chromium.launch({channel: 'chromium', executablePath: process.env.AGENT_BROWSER_EXECUTABLE_PATH, headless: true, args: ['--no-sandbox']})
|
||||
const context = await browser.newContext({permissions: ['clipboard-read', 'clipboard-write']})
|
||||
const page = await context.newPage()
|
||||
const errors = []
|
||||
|
||||
@@ -3,7 +3,7 @@ import fs from 'node:fs';
|
||||
import assert from 'node:assert/strict';
|
||||
const out=process.env.THREAD_SCROLL_OUTPUT;
|
||||
assert.ok(out);
|
||||
const browser=await chromium.launch({headless:true,args:['--no-sandbox']});
|
||||
const browser=await chromium.launch({channel:'chromium',executablePath:process.env.AGENT_BROWSER_EXECUTABLE_PATH,headless:true,args:['--no-sandbox']});
|
||||
const result={};
|
||||
try {
|
||||
const page=await browser.newPage({viewport:{width:1200,height:800}});
|
||||
|
||||
@@ -5,7 +5,7 @@ const out=process.env.THREAD_SCROLL_OUTPUT;
|
||||
assert.ok(out, 'Set THREAD_SCROLL_OUTPUT to the isolated artifact directory');
|
||||
fs.mkdirSync(out,{recursive:true});
|
||||
const url=process.env.THREAD_SCROLL_URL ?? 'http://127.0.0.1:18480/scroll-campaign-probe.html?thread';
|
||||
const browser=await chromium.launch({headless:true,args:['--no-sandbox']});
|
||||
const browser=await chromium.launch({channel:'chromium',executablePath:process.env.AGENT_BROWSER_EXECUTABLE_PATH,headless:true,args:['--no-sandbox']});
|
||||
try {
|
||||
const page=await browser.newPage({viewport:{width:1200,height:800}});
|
||||
const errors=[];page.on('pageerror',e=>errors.push(e.message));
|
||||
|
||||
@@ -90,6 +90,8 @@ const server = http.createServer(async (req, res) => {
|
||||
})
|
||||
await new Promise(r => server.listen(0, '127.0.0.1', r))
|
||||
const browser = await chromium.launch({
|
||||
channel: 'chromium',
|
||||
executablePath: process.env.AGENT_BROWSER_EXECUTABLE_PATH,
|
||||
headless: true,
|
||||
args: ['--no-sandbox'],
|
||||
...(process.env.CHROMIUM_EXECUTABLE ? { executablePath: process.env.CHROMIUM_EXECUTABLE } : {})
|
||||
|
||||
Reference in New Issue
Block a user