UNPKG

donobu

Version:

Create browser automations with an LLM agent and replay them as Playwright scripts.

65 lines 2.28 kB
import { BrowserStateReference } from './BrowserStateFlowReference'; /** * Broadly follows the HTTP body fields described in... * https://docs.browserbase.com/reference/api/create-a-session */ export type BrowserBaseSessionArgs = { /** * If the project ID contains "${env.VARIABLE_NAME}", then it will be expanded * to the value of the specified environment variable. */ readonly projectId: string; readonly extensionId?: string; readonly browserSettings?: { readonly context?: { readonly id: string; }; readonly extensionId?: string; readonly viewport?: { readonly width: number; readonly height: number; }; readonly blockAds?: boolean; readonly solveCaptchas?: boolean; readonly advancedStealth?: boolean; }; /** * Duration in seconds after which the session will automatically end. */ readonly timeout?: number; readonly proxies?: boolean; readonly region?: string; readonly userMetadata?: Record<string, string>; }; export type BrowserConfig = { /** * When starting the flow, initialize the browser state from here. **/ readonly initialState?: BrowserStateReference; /** If set to true, saves the browser state at the end of the flow. */ readonly persistState?: boolean; readonly using: { readonly type: 'device'; /** * The name of the device to run the flow with. See `devices.json` for details. * If not specified, defaults to 'Desktop Chromium'. */ readonly deviceName?: string; /** * If true, will not open a real browser window to perform the flow. */ readonly headless?: boolean; } | { readonly type: 'remoteInstance'; /** * The URL of a remote browser instance to connect to using the Chrome DevTools * Protocol (CDP). If the URL contains "${env.VARIABLE_NAME}", then it will be * expanded to the value of the specified environment variable. */ readonly url: string; } | { readonly type: 'browserBase'; readonly sessionArgs: BrowserBaseSessionArgs; }; }; //# sourceMappingURL=BrowserConfig.d.ts.map