feat(cli): 默认开启 stealth 并支持 wait 区间超时
This commit is contained in:
@@ -450,6 +450,7 @@ export async function startDaemon(options?: {
|
||||
|
||||
const ignoreHTTPSErrors = process.env.AGENT_BROWSER_IGNORE_HTTPS_ERRORS === '1';
|
||||
const allowFileAccess = process.env.AGENT_BROWSER_ALLOW_FILE_ACCESS === '1';
|
||||
const stealth = process.env.AGENT_BROWSER_STEALTH !== '0';
|
||||
const colorSchemeEnv = process.env.AGENT_BROWSER_COLOR_SCHEME;
|
||||
const colorScheme =
|
||||
colorSchemeEnv === 'dark' ||
|
||||
@@ -470,6 +471,7 @@ export async function startDaemon(options?: {
|
||||
proxy,
|
||||
ignoreHTTPSErrors: ignoreHTTPSErrors,
|
||||
allowFileAccess: allowFileAccess,
|
||||
stealth,
|
||||
colorScheme,
|
||||
autoStateFilePath: getSessionAutoStatePath(),
|
||||
});
|
||||
|
||||
@@ -32,6 +32,7 @@ export interface LaunchCommand extends BaseCommand {
|
||||
ignoreHTTPSErrors?: boolean;
|
||||
allowFileAccess?: boolean; // Enable file:// URL access and cross-origin file requests
|
||||
colorScheme?: 'light' | 'dark' | 'no-preference'; // Persistent color scheme override
|
||||
stealth?: boolean; // Enable stealth mode to avoid automation detection
|
||||
// Auto-load state file for session persistence
|
||||
autoStateFilePath?: string;
|
||||
}
|
||||
@@ -828,6 +829,7 @@ export interface WaitCommand extends BaseCommand {
|
||||
action: 'wait';
|
||||
selector?: string;
|
||||
timeout?: number;
|
||||
timeoutMax?: number; // When set with timeout, waits a random duration in [timeout, timeoutMax]
|
||||
state?: 'attached' | 'detached' | 'visible' | 'hidden';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user