gm-gc 2.0.233 → 2.0.234
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.
package/gemini-extension.json
CHANGED
|
@@ -368,7 +368,15 @@ const run = () => {
|
|
|
368
368
|
} else if (lang === 'agent-browser') {
|
|
369
369
|
// agent-browser reads agent-browser.json from cwd automatically (headed, profile, session, etc.)
|
|
370
370
|
// Just run with shell:true so .cmd wrappers resolve, and use process.cwd() so config is picked up
|
|
371
|
-
const
|
|
371
|
+
const abNative = (() => {
|
|
372
|
+
const abDir = path.join(TOOLS_DIR, 'node_modules', 'agent-browser', 'bin');
|
|
373
|
+
const ext = IS_WIN ? '.exe' : '';
|
|
374
|
+
const archMap = { x64: 'x64', arm64: 'arm64', ia32: 'x64' };
|
|
375
|
+
const osMap = { win32: 'win32', darwin: 'darwin', linux: 'linux' };
|
|
376
|
+
const candidate = path.join(abDir, `agent-browser-${osMap[process.platform] || process.platform}-${archMap[process.arch] || process.arch}${ext}`);
|
|
377
|
+
return fs.existsSync(candidate) ? candidate : null;
|
|
378
|
+
})();
|
|
379
|
+
const abBin = abNative || (fs.existsSync(localBin('agent-browser')) ? localBin('agent-browser') : 'agent-browser');
|
|
372
380
|
const AB_CMDS = new Set(['open','goto','navigate','close','quit','exit','back','forward','reload','click','dblclick','type','fill','press','check','uncheck','select','drag','upload','hover','focus','scroll','scrollintoview','wait','screenshot','pdf','snapshot','get','is','find','eval','connect','tab','frame','dialog','state','session','network','cookies','storage','set','trace','profiler','record','console','errors','highlight','inspect','diff','keyboard','mouse','install','upgrade','confirm','deny','auth','device','window']);
|
|
373
381
|
const AB_GLOBAL_FLAGS = new Set(['--cdp','--headed','--headless','--session','--session-name','--auto-connect','--profile','--allow-file-access','--color-scheme','-p','--platform','--device']);
|
|
374
382
|
const AB_GLOBAL_FLAGS_WITH_VALUE = new Set(['--cdp','--session','--session-name','--profile','--color-scheme','-p','--platform','--device']);
|