headed mode (#607)

* headed mode

* fixes

* fixes

* docs

* fixes

* fixes

* fixes
This commit is contained in:
Chris Tate
2026-03-03 22:34:07 -06:00
committed by GitHub
parent a493d02c66
commit e5fd26eb9e
12 changed files with 308 additions and 72 deletions
+1 -1
View File
@@ -1355,7 +1355,7 @@ export class BrowserManager {
context = await launcher.launchPersistentContext(
path.join(os.tmpdir(), `agent-browser-ext-${session}`),
{
headless: false,
headless: options.headless ?? true,
executablePath: options.executablePath,
args: allArgs,
viewport,
+4 -2
View File
@@ -432,7 +432,7 @@ export async function startDaemon(options?: {
} else if (manager instanceof BrowserManager) {
// Auto-launch desktop browser
const extensions = process.env.AGENT_BROWSER_EXTENSIONS
? process.env.AGENT_BROWSER_EXTENSIONS.split(',')
? process.env.AGENT_BROWSER_EXTENSIONS.split(/[,\n]/)
.map((p) => p.trim())
.filter(Boolean)
: undefined;
@@ -468,7 +468,9 @@ export async function startDaemon(options?: {
await manager.launch({
id: 'auto',
action: 'launch' as const,
headless: process.env.AGENT_BROWSER_HEADED !== '1',
headless:
process.env.AGENT_BROWSER_HEADED !== '1' &&
process.env.AGENT_BROWSER_HEADED !== 'true',
executablePath: process.env.AGENT_BROWSER_EXECUTABLE_PATH,
extensions: extensions,
profile: process.env.AGENT_BROWSER_PROFILE,