SYMBOL INDEX (2353 symbols across 284 files) FILE: packages/cli/src/index.ts type BrowseContext (line 25) | type BrowseContext = Stagehand["context"]; constant SOCKET_DIR (line 29) | const SOCKET_DIR = os.tmpdir(); function getSocketPath (line 31) | function getSocketPath(session: string): string { function getLockPath (line 35) | function getLockPath(session: string): string { function acquireLock (line 43) | async function acquireLock( function releaseLock (line 79) | async function releaseLock(session: string): Promise { function isSocketConnectable (line 88) | async function isSocketConnectable( function waitForSocketReady (line 115) | async function waitForSocketReady( function getPidPath (line 130) | function getPidPath(session: string): string { function getWsPath (line 134) | function getWsPath(session: string): string { function getChromePidPath (line 138) | function getChromePidPath(session: string): string { function getNetworkDir (line 142) | function getNetworkDir(session: string): string { function getModePath (line 146) | function getModePath(session: string): string { function getModeOverridePath (line 150) | function getModeOverridePath(session: string): string { function getContextPath (line 154) | function getContextPath(session: string): string { type BrowseMode (line 158) | type BrowseMode = "browserbase" | "local"; function hasBrowserbaseCredentials (line 160) | function hasBrowserbaseCredentials(): boolean { function assertModeSupported (line 164) | function assertModeSupported(mode: BrowseMode): void { function toModeTarget (line 172) | function toModeTarget(mode: BrowseMode): "local" | "remote" { function readCurrentMode (line 176) | async function readCurrentMode(session: string): Promise { function isDaemonRunning (line 199) | async function isDaemonRunning(session: string): Promise { function cleanupStaleFiles (line 226) | async function cleanupStaleFiles(session: string): Promise { function cleanupDaemonStateFiles (line 241) | async function cleanupDaemonStateFiles(session: string): Promise { function killChromeProcesses (line 250) | async function killChromeProcesses(session: string): Promise { type DaemonRequest (line 275) | interface DaemonRequest { type DaemonResponse (line 280) | interface DaemonResponse { constant DEFAULT_VIEWPORT (line 289) | const DEFAULT_VIEWPORT = { width: 1288, height: 711 }; function runDaemon (line 291) | async function runDaemon(session: string, headless: boolean): Promise { function ensureDaemon (line 1347) | async function ensureDaemon(session: string, headless: boolean): Promise... type GlobalOpts (line 1433) | interface GlobalOpts { function getSession (line 1441) | function getSession(opts: GlobalOpts): string { function isHeadless (line 1445) | function isHeadless(opts: GlobalOpts): boolean { function output (line 1449) | function output(data: unknown, json: boolean): void { function runCommand (line 1459) | async function runCommand(command: string, args: unknown[]): Promise>(output: string): T { function cleanupSession (line 56) | async function cleanupSession(session: string): Promise { FILE: packages/cli/tests/mode.test.ts constant CLI_PATH (line 7) | const CLI_PATH = path.join(__dirname, "../dist/index.js"); constant TEST_SESSION (line 8) | const TEST_SESSION = `env-test-${Date.now()}`; function browse (line 10) | async function browse( function parseJson (line 29) | function parseJson>(output: string): T { function cleanupSession (line 37) | async function cleanupSession(session: string): Promise { FILE: packages/core/examples/2048.ts function example (line 4) | async function example() { FILE: packages/core/examples/actionable_observe_example.ts function example (line 17) | async function example() { FILE: packages/core/examples/agent-custom-tools.ts function main (line 35) | async function main() { FILE: packages/core/examples/agent_stream_example.ts function main (line 5) | async function main() { FILE: packages/core/examples/cua-example.ts function main (line 12) | async function main() { FILE: packages/core/examples/custom_client_aisdk.ts function example (line 13) | async function example() { FILE: packages/core/examples/custom_client_langchain.ts function example (line 11) | async function example() { FILE: packages/core/examples/custom_client_openai.ts function example (line 13) | async function example() { FILE: packages/core/examples/example.ts function example (line 3) | async function example(stagehand: Stagehand) { FILE: packages/core/examples/external_clients/langchain.ts class LangchainClient (line 16) | class LangchainClient extends LLMClient { method constructor (line 20) | constructor(model: BaseChatModel) { method createChatCompletion (line 25) | async createChatCompletion({ FILE: packages/core/examples/form_filling_sensible.ts function formFillingSensible (line 9) | async function formFillingSensible() { FILE: packages/core/examples/google_enter.ts function example (line 9) | async function example() { FILE: packages/core/examples/instructions.ts function example (line 6) | async function example() { FILE: packages/core/examples/integrations/exa.ts function example (line 3) | async function example(stagehand: Stagehand) { FILE: packages/core/examples/integrations/supabase.ts function example (line 3) | async function example(stagehand: Stagehand) { FILE: packages/core/examples/operator-example.ts function main (line 13) | async function main() { FILE: packages/core/examples/oss-cua-example.ts function main (line 12) | async function main() { FILE: packages/core/examples/parameterizeApiKey.ts function example (line 14) | async function example() { FILE: packages/core/examples/persist_logs_example.ts function main (line 7) | async function main() { FILE: packages/core/examples/v3/cuaReplay.ts function runDemo (line 4) | async function runDemo(runNumber: number) { function main (line 53) | async function main() { FILE: packages/core/examples/v3/deepLocator.ts function example (line 3) | async function example(stagehand: Stagehand) { FILE: packages/core/examples/v3/dropdown.ts function example (line 3) | async function example(stagehand: Stagehand) { FILE: packages/core/examples/v3/highlight.ts function example (line 3) | async function example(stagehand: Stagehand) { FILE: packages/core/examples/v3/patchright.ts function example (line 5) | async function example(stagehand: Stagehand) { FILE: packages/core/examples/v3/playwright.ts function example (line 5) | async function example(stagehand: Stagehand) { FILE: packages/core/examples/v3/puppeteer.ts function example (line 4) | async function example(stagehand: Stagehand) { FILE: packages/core/examples/v3/recordVideo.ts function recordPlaywrightVideo (line 7) | async function recordPlaywrightVideo(stagehand: Stagehand): Promise { FILE: packages/core/examples/v3/returnXpath.ts function example (line 3) | async function example(stagehand: Stagehand) { FILE: packages/core/examples/v3/shadowRoot.ts function example (line 3) | async function example(stagehand: Stagehand) { FILE: packages/core/examples/v3/targetedExtract.ts function example (line 4) | async function example(stagehand: Stagehand) { FILE: packages/core/examples/v3/v3_agent.ts constant INSTRUCTION (line 4) | const INSTRUCTION = "scroll down and click on the last hn story"; function main (line 6) | async function main() { FILE: packages/core/examples/v3_example.ts function example (line 4) | async function example(v3: V3) { FILE: packages/core/examples/wordle.ts function example (line 3) | async function example() { FILE: packages/core/lib/inference.ts function withLlmTimeout (line 24) | function withLlmTimeout(promise: Promise, operation: string): Prom... function extract (line 32) | async function extract({ function observe (line 240) | async function observe({ function act (line 389) | async function act({ FILE: packages/core/lib/inferenceLogUtils.ts function ensureInferenceSummaryDir (line 7) | function ensureInferenceSummaryDir(): string { function appendSummary (line 18) | function appendSummary(inferenceType: string, entry: T) { function getTimestamp (line 29) | function getTimestamp(): string { function writeTimestampedTxtFile (line 40) | function writeTimestampedTxtFile( function getSummaryJsonPath (line 70) | function getSummaryJsonPath(inferenceType: string): string { function readSummaryFile (line 90) | function readSummaryFile(inferenceType: string): Record { FILE: packages/core/lib/logger.ts type LoggerOptions (line 12) | interface LoggerOptions { function createLogger (line 22) | function createLogger(options: LoggerOptions = {}) { function isTestEnvironment (line 62) | function isTestEnvironment(): boolean { class StagehandLogger (line 93) | class StagehandLogger { method constructor (line 106) | constructor( method setVerbosity (line 140) | setVerbosity(level: 0 | 1 | 2) { method log (line 162) | log(logLine: LogLine): void { method formatAuxiliaryData (line 255) | private formatAuxiliaryData(auxiliary?: LogLine["auxiliary"]) { method error (line 303) | error(message: string, data?: Record): void { method warn (line 311) | warn(message: string, data?: Record): void { method info (line 320) | info(message: string, data?: Record): void { method debug (line 328) | debug(message: string, data?: Record): void { method convertToAuxiliary (line 339) | private convertToAuxiliary( FILE: packages/core/lib/modelUtils.ts function extractModelName (line 8) | function extractModelName( function splitModelName (line 15) | function splitModelName(model: string): { function resolveModel (line 25) | function resolveModel(model: string | ModelConfiguration): { FILE: packages/core/lib/prompt.ts function buildUserInstructionsString (line 4) | function buildUserInstructionsString( function buildExtractSystemPrompt (line 20) | function buildExtractSystemPrompt( function buildExtractUserPrompt (line 65) | function buildExtractUserPrompt( function buildMetadataSystemPrompt (line 93) | function buildMetadataSystemPrompt(): ChatMessage { function buildMetadataPrompt (line 100) | function buildMetadataPrompt( function buildObserveSystemPrompt (line 112) | function buildObserveSystemPrompt( function buildObserveUserMessage (line 139) | function buildObserveUserMessage( function buildActSystemPrompt (line 150) | function buildActSystemPrompt( function buildActPrompt (line 171) | function buildActPrompt( function buildStepTwoPrompt (line 215) | function buildStepTwoPrompt( function buildOperatorSystemPrompt (line 249) | function buildOperatorSystemPrompt(goal: string): ChatMessage { function buildCuaDefaultSystemPrompt (line 284) | function buildCuaDefaultSystemPrompt(): string { function buildGoogleCUASystemPrompt (line 288) | function buildGoogleCUASystemPrompt(): ChatMessage { FILE: packages/core/lib/utils.ts constant ID_PATTERN (line 11) | const ID_PATTERN = /^\d+-\d+$/; function getZFactory (line 18) | function getZFactory(schema: StagehandZodSchema): typeof z { constant TYPE_NAME_MAP (line 22) | const TYPE_NAME_MAP: Record = { function getZ4Def (line 52) | function getZ4Def(schema: StagehandZodSchema) { function getZ4Bag (line 58) | function getZ4Bag(schema: StagehandZodSchema) { function getZ3Def (line 64) | function getZ3Def(schema: StagehandZodSchema) { function getObjectShape (line 70) | function getObjectShape( function getArrayElement (line 92) | function getArrayElement( function getInnerType (line 100) | function getInnerType( function getUnionOptions (line 108) | function getUnionOptions( function getIntersectionSides (line 121) | function getIntersectionSides(schema: StagehandZodSchema): { function getEnumValues (line 139) | function getEnumValues(schema: StagehandZodSchema): string[] | undefined { function getLiteralValues (line 148) | function getLiteralValues(schema: StagehandZodSchema): unknown[] { function getStringChecks (line 157) | function getStringChecks(schema: StagehandZodSchema): unknown[] { function getStringFormat (line 166) | function getStringFormat(schema: StagehandZodSchema): string | undefined { function getPipeEndpoints (line 179) | function getPipeEndpoints(schema: StagehandZodSchema): { function getEffectsBaseSchema (line 193) | function getEffectsBaseSchema( type SchemaInternals (line 199) | type SchemaInternals = { function validateZodSchema (line 204) | function validateZodSchema(schema: StagehandZodSchema, data: unknown) { function isRunningInBun (line 217) | function isRunningInBun(): boolean { function decorateGeminiSchema (line 228) | function decorateGeminiSchema( function toGeminiSchema (line 243) | function toGeminiSchema(zodSchema: StagehandZodSchema): Schema { function getZodType (line 360) | function getZodType(schema: StagehandZodSchema): string { function transformSchema (line 389) | function transformSchema( function injectUrls (line 605) | function injectUrls( function isKind (line 653) | function isKind(s: StagehandZodSchema, kind: string): boolean { function makeIdStringSchema (line 661) | function makeIdStringSchema(orig: StagehandZodSchema): StagehandZodSchema { function loadApiKeyFromEnv (line 706) | function loadApiKeyFromEnv( function trimTrailingTextNode (line 739) | function trimTrailingTextNode( function toTitleCase (line 745) | function toTitleCase(str: string): string { type JsonSchemaProperty (line 753) | interface JsonSchemaProperty { type JsonSchema (line 764) | interface JsonSchema extends JsonSchemaProperty { function jsonSchemaToZod (line 773) | function jsonSchemaToZod(schema: JsonSchema): ZodTypeAny { FILE: packages/core/lib/v3/agent/AgentClient.ts method constructor (line 19) | constructor( method setPreStepHook (line 49) | setPreStepHook(handler: () => Promise): void { method addContextNote (line 57) | addContextNote(note: string): void { FILE: packages/core/lib/v3/agent/AgentProvider.ts class AgentProvider (line 36) | class AgentProvider { method constructor (line 42) | constructor(logger: (message: LogLine) => void) { method getClient (line 46) | getClient( method getAgentProvider (line 115) | static getAgentProvider(modelName: string): AgentProviderType { FILE: packages/core/lib/v3/agent/AnthropicCUAClient.ts type ResponseInputItem (line 31) | type ResponseInputItem = AnthropicMessage | AnthropicToolResult; class AnthropicCUAClient (line 37) | class AnthropicCUAClient extends AgentClient { method constructor (line 49) | constructor( method setViewport (line 86) | setViewport(width: number, height: number): void { method setCurrentUrl (line 90) | setCurrentUrl(url: string): void { method setScreenshotProvider (line 94) | setScreenshotProvider(provider: () => Promise): void { method setActionHandler (line 98) | setActionHandler(handler: (action: AgentAction) => Promise): void { method setTools (line 102) | setTools(tools: ToolSet): void { method execute (line 111) | async execute(executionOptions: AgentExecutionOptions): Promise Promise): void { method setActionHandler (line 136) | setActionHandler(handler: (action: AgentAction) => Promise): void { method setTools (line 140) | setTools(tools: ToolSet): void { method setSafetyConfirmationHandler (line 145) | setSafetyConfirmationHandler(handler?: SafetyConfirmationHandler): void { method handleSafetyConfirmation (line 149) | private async handleSafetyConfirmation( method updateGenerateContentConfig (line 203) | private updateGenerateContentConfig(): void { method execute (line 227) | async execute(executionOptions: AgentExecutionOptions): Promise { method executeStep (line 345) | async executeStep(logger: (message: LogLine) => void): Promise<{ method processResponse (line 668) | private async processResponse( method convertFunctionCallToAction (line 794) | private convertFunctionCallToAction( method normalizeCoordinates (line 973) | private normalizeCoordinates(x: number, y: number): { x: number; y: nu... method captureScreenshot (line 982) | async captureScreenshot(options?: { FILE: packages/core/lib/v3/agent/MicrosoftCUAClient.ts type FaraMessage (line 18) | interface FaraMessage { type FaraMessageContent (line 23) | interface FaraMessageContent { type FaraFunctionCall (line 34) | interface FaraFunctionCall { class MicrosoftCUAClient (line 47) | class MicrosoftCUAClient extends AgentClient { method constructor (line 75) | constructor( method setViewport (line 125) | setViewport(width: number, height: number): void { method setCurrentUrl (line 131) | setCurrentUrl(url: string): void { method setScreenshotProvider (line 135) | setScreenshotProvider(provider: () => Promise): void { method setActionHandler (line 139) | setActionHandler(handler: (action: AgentAction) => Promise): void { method smartResize (line 147) | private smartResize( method generateSystemPrompt (line 179) | private generateSystemPrompt(): string { method parseThoughtsAndAction (line 309) | private parseThoughtsAndAction(response: string): { method convertFunctionCallToAction (line 364) | private convertFunctionCallToAction( method captureScreenshot (line 524) | async captureScreenshot(): Promise { method maybeRemoveOldScreenshots (line 537) | private maybeRemoveOldScreenshots( method reconstructHistory (line 605) | private reconstructHistory(): FaraMessage[] { method executeStep (line 631) | private async executeStep( method execute (line 851) | async execute(executionOptions: AgentExecutionOptions): Promise Promise): void { method setActionHandler (line 103) | setActionHandler(handler: (action: AgentAction) => Promise): void { method setTools (line 107) | setTools(tools: ToolSet): void { method setSafetyConfirmationHandler (line 111) | setSafetyConfirmationHandler(handler?: SafetyConfirmationHandler): void { method addContextNote (line 115) | addContextNote(note: string): void { method execute (line 131) | async execute(executionOptions: AgentExecutionOptions): Promise { FILE: packages/core/lib/v3/agent/tools/browserbaseSearch.ts type SearchResult (line 5) | interface SearchResult { type BrowserbaseRawResult (line 11) | interface BrowserbaseRawResult { type BrowserbaseApiResponse (line 17) | interface BrowserbaseApiResponse { function performBrowserbaseSearch (line 21) | async function performBrowserbaseSearch( FILE: packages/core/lib/v3/agent/tools/extract.ts type JsonSchema (line 7) | interface JsonSchema { function jsonSchemaToZod (line 15) | function jsonSchemaToZod(schema: JsonSchema): ZodTypeAny { FILE: packages/core/lib/v3/agent/tools/index.ts type V3AgentToolOptions (line 31) | interface V3AgentToolOptions { function filterTools (line 77) | function filterTools( function wrapToolWithTimeout (line 111) | function wrapToolWithTimeout>( function createAgentTools (line 145) | function createAgentTools(v3: V3, options?: V3AgentToolOptions) { type AgentTools (line 207) | type AgentTools = ReturnType; type AgentToolTypesMap (line 213) | type AgentToolTypesMap = { type AgentUITools (line 239) | type AgentUITools = InferUITools; type AgentToolCall (line 245) | type AgentToolCall = { type AgentToolResult (line 257) | type AgentToolResult = { FILE: packages/core/lib/v3/agent/utils/actionMapping.ts constant EXCLUDED_OUTPUT_KEYS (line 9) | const EXCLUDED_OUTPUT_KEYS = ["screenshotBase64"] as const; function stripExcludedKeys (line 14) | function stripExcludedKeys( function mapToolResultToActions (line 30) | function mapToolResultToActions({ function mapActToolResult (line 46) | function mapActToolResult( function mapFillFormToolResult (line 75) | function mapFillFormToolResult( function createStandardAction (line 114) | function createStandardAction( FILE: packages/core/lib/v3/agent/utils/captchaSolver.ts constant SOLVING_STARTED (line 4) | const SOLVING_STARTED = "browserbase-solving-started"; constant SOLVING_FINISHED (line 5) | const SOLVING_FINISHED = "browserbase-solving-finished"; constant SOLVING_ERRORED (line 6) | const SOLVING_ERRORED = "browserbase-solving-errored"; constant SOLVE_TIMEOUT_MS (line 9) | const SOLVE_TIMEOUT_MS = 90_000; constant CAPTCHA_SOLVED_MSG (line 16) | const CAPTCHA_SOLVED_MSG = constant CAPTCHA_ERRORED_MSG (line 20) | const CAPTCHA_ERRORED_MSG = constant CAPTCHA_SYSTEM_PROMPT_NOTE (line 24) | const CAPTCHA_SYSTEM_PROMPT_NOTE = constant CAPTCHA_CUA_SYSTEM_PROMPT_NOTE (line 28) | const CAPTCHA_CUA_SYSTEM_PROMPT_NOTE = class CaptchaSolver (line 41) | class CaptchaSolver { method init (line 60) | init(pageProvider: () => Promise): void { method isSolving (line 65) | isSolving(): boolean { method ensureAttached (line 74) | async ensureAttached(): Promise { method waitIfSolving (line 111) | async waitIfSolving(): Promise { method consumeSolveResult (line 137) | consumeSolveResult(): { solved: boolean; errored: boolean } { method dispose (line 150) | dispose(): void { method detachListener (line 165) | private detachListener(): void { method settle (line 182) | private settle(): void { FILE: packages/core/lib/v3/agent/utils/coordinateNormalization.ts constant STEALTH_VIEWPORT (line 4) | const STEALTH_VIEWPORT = { width: 1288, height: 711 }; function isGoogleProvider (line 6) | function isGoogleProvider(provider?: string): boolean { function normalizeGoogleCoordinates (line 13) | function normalizeGoogleCoordinates( function processCoordinates (line 26) | function processCoordinates( FILE: packages/core/lib/v3/agent/utils/cuaKeyMapping.ts constant KEY_MAP (line 10) | const KEY_MAP: Record = { function mapKeyToPlaywright (line 58) | function mapKeyToPlaywright(key: string): string { FILE: packages/core/lib/v3/agent/utils/googleCustomToolHandler.ts type CustomToolExecutionResult (line 10) | interface CustomToolExecutionResult { function executeGoogleCustomTool (line 20) | async function executeGoogleCustomTool( function isCustomTool (line 90) | function isCustomTool( function convertToolSetToFunctionDeclarations (line 101) | function convertToolSetToFunctionDeclarations( function convertToolToFunctionDeclaration (line 119) | function convertToolToFunctionDeclaration( function convertJsonSchemaToGoogleParameters (line 151) | function convertJsonSchemaToGoogleParameters(schema: { function mapJsonTypeToGoogleType (line 190) | function mapJsonTypeToGoogleType(jsonType: string): Type { FILE: packages/core/lib/v3/agent/utils/handleDoneToolCall.ts type DoneResult (line 9) | interface DoneResult { function buildBaseDoneSchema (line 16) | function buildBaseDoneSchema(factory: typeof z) { function handleDoneToolCall (line 32) | async function handleDoneToolCall(options: { FILE: packages/core/lib/v3/agent/utils/imageCompression.ts type ResponseInputItem (line 12) | type ResponseInputItem = AnthropicMessage | AnthropicToolResult; type FunctionResponseData (line 14) | interface FunctionResponseData { type AnthropicResponseInputItem (line 20) | type AnthropicResponseInputItem = AnthropicMessage | AnthropicToolResult; type SupportedInputItem (line 21) | type SupportedInputItem = function findItemsWithImages (line 31) | function findItemsWithImages(items: ResponseInputItem[]): number[] { function compressConversationImages (line 64) | function compressConversationImages( function findGoogleItemsWithImages (line 111) | function findGoogleItemsWithImages(items: GoogleContent[]): number[] { function findOpenAIItemsWithImages (line 153) | function findOpenAIItemsWithImages( function compressOpenAIConversationImages (line 189) | function compressOpenAIConversationImages( function compressGoogleConversationImages (line 229) | function compressGoogleConversationImages( FILE: packages/core/lib/v3/agent/utils/messageProcessing.ts constant VISION_ACTION_TOOLS (line 4) | const VISION_ACTION_TOOLS = [ function isToolMessage (line 13) | function isToolMessage( function isScreenshotPart (line 24) | function isScreenshotPart(part: unknown): boolean { function isVisionActionPart (line 32) | function isVisionActionPart(part: unknown): boolean { function isVisionPart (line 38) | function isVisionPart(part: unknown): boolean { function isAriaTreePart (line 42) | function isAriaTreePart(part: unknown): boolean { function processMessages (line 60) | function processMessages(messages: ModelMessage[]): number { type ToolResultPart (line 119) | interface ToolResultPart { function isContentTypeOutput (line 130) | function isContentTypeOutput(output: { function compressScreenshotMessage (line 142) | function compressScreenshotMessage(message: { function compressVisionActionMessage (line 166) | function compressVisionActionMessage(message: { function compressAriaTreeMessage (line 201) | function compressAriaTreeMessage(message: { FILE: packages/core/lib/v3/agent/utils/screenshotHandler.ts constant DEFAULT_DELAY_MS (line 7) | const DEFAULT_DELAY_MS = 500; function waitAndCaptureScreenshot (line 17) | async function waitAndCaptureScreenshot( FILE: packages/core/lib/v3/agent/utils/validateExperimentalFeatures.ts type AgentValidationOptions (line 10) | interface AgentValidationOptions { function validateExperimentalFeatures (line 35) | function validateExperimentalFeatures( FILE: packages/core/lib/v3/agent/utils/variables.ts function resolveVariableValue (line 7) | function resolveVariableValue(v: VariableValue): string { function getVariableDescription (line 18) | function getVariableDescription(v: VariableValue): string | undefined { function substituteVariables (line 29) | function substituteVariables( function flattenVariables (line 46) | function flattenVariables( FILE: packages/core/lib/v3/agent/utils/xpath.ts function ensureXPath (line 12) | function ensureXPath(value: unknown): string | null { FILE: packages/core/lib/v3/api.ts constant REGION_API_URLS (line 45) | const REGION_API_URLS: Record = { function getApiUrlForRegion (line 59) | function getApiUrlForRegion( type StagehandAPIConstructorParams (line 85) | interface StagehandAPIConstructorParams { type ClientSessionStartParams (line 104) | interface ClientSessionStartParams extends Api.SessionStartRequest { type ApiResponse (line 112) | type ApiResponse = type ApiRequestBody (line 119) | type ApiRequestBody = type ExecuteActionParams (line 129) | interface ExecuteActionParams { type ClientActParameters (line 146) | interface ClientActParameters { type ClientExtractParameters (line 157) | interface ClientExtractParameters { type ClientObserveParameters (line 169) | interface ClientObserveParameters { class StagehandAPIClient (line 175) | class StagehandAPIClient { method constructor (line 188) | constructor({ method init (line 202) | async init({ method act (line 279) | async act({ method extract (line 313) | async extract({ method observe (line 352) | async observe({ method goto (line 386) | async goto( method agentExecute (line 399) | async agentExecute( method consumeLatestAgentCacheEntry (line 456) | consumeLatestAgentCacheEntry(): AgentCacheTransferPayload | null { method end (line 462) | async end(): Promise { method getReplayMetrics (line 470) | async getReplayMetrics(): Promise { method prepareModelConfig (line 608) | private prepareModelConfig( method consumeFinishedEventData (line 644) | private consumeFinishedEventData(): T | null { method execute (line 650) | private async execute({ method attachCacheStatus (line 791) | private attachCacheStatus( method shouldUseCache (line 831) | private shouldUseCache(methodServerCache?: boolean): boolean { method request (line 840) | private async request( FILE: packages/core/lib/v3/cache/ActCache.ts class ActCache (line 16) | class ActCache { method constructor (line 23) | constructor({ method enabled (line 37) | get enabled(): boolean { method prepareContext (line 41) | async prepareContext( method tryReplay (line 67) | async tryReplay( method store (line 144) | async store(context: ActCacheContext, result: ActResult): Promise { method buildActCacheKey (line 184) | private buildActCacheKey( method replayCachedActions (line 197) | private async replayCachedActions( method haveActionsChanged (line 283) | private haveActionsChanged(original: Action[], updated: Action[]): boo... method refreshCacheEntry (line 323) | private async refreshCacheEntry( method doVariableKeysMatch (line 358) | private doVariableKeysMatch( method hasAllVariableValues (line 375) | private hasAllVariableValues( FILE: packages/core/lib/v3/cache/AgentCache.ts constant SENSITIVE_CONFIG_KEYS (line 38) | const SENSITIVE_CONFIG_KEYS = new Set(["apikey", "api_key", "api-key"]); class AgentCache (line 40) | class AgentCache { method constructor (line 55) | constructor({ method enabled (line 79) | get enabled(): boolean { method shouldAttemptCache (line 83) | shouldAttemptCache(instruction: string): boolean { method sanitizeExecuteOptions (line 87) | sanitizeExecuteOptions( method buildConfigSignature (line 107) | buildConfigSignature(agentOptions?: AgentConfig): string { method prepareContext (line 142) | async prepareContext(params: { method tryReplay (line 175) | async tryReplay( method tryReplayAsStream (line 232) | async tryReplayAsStream( method createCachedStreamResult (line 252) | private createCachedStreamResult( method wrapStreamForCaching (line 316) | wrapStreamForCaching( method store (line 346) | async store( method consumeBufferedEntry (line 398) | consumeBufferedEntry(): AgentCacheTransferPayload | null { method storeTransferredEntry (line 408) | async storeTransferredEntry( method pruneAgentResult (line 446) | private pruneAgentResult(result: AgentResult): AgentResult { method beginRecording (line 461) | beginRecording(): void { method endRecording (line 465) | endRecording(): AgentReplayStep[] { method discardRecording (line 472) | discardRecording(): void { method isRecording (line 476) | isRecording(): boolean { method recordStep (line 480) | recordStep(step: AgentReplayStep): void { method isReplayActive (line 496) | isReplayActive(): boolean { method serializeAgentModelForCache (line 500) | private serializeAgentModelForCache( method buildAgentCacheKey (line 518) | private buildAgentCacheKey( method sanitizeModelOptionsForCache (line 535) | private sanitizeModelOptionsForCache( method sanitizeModelValueForCache (line 555) | private sanitizeModelValueForCache(value: unknown): unknown { method replayAgentCacheEntry (line 572) | private async replayAgentCacheEntry( method executeAgentReplayStep (line 626) | private async executeAgentReplayStep( method replayAgentActStep (line 680) | private async replayAgentActStep( method replayAgentFillFormStep (line 722) | private async replayAgentFillFormStep( method replayAgentGotoStep (line 766) | private async replayAgentGotoStep( method replayAgentScrollStep (line 774) | private async replayAgentScrollStep( method replayAgentWaitStep (line 798) | private async replayAgentWaitStep(step: AgentReplayWaitStep): Promise<... method replayAgentNavBackStep (line 803) | private async replayAgentNavBackStep( method replayAgentKeysStep (line 811) | private async replayAgentKeysStep( method haveActionsChanged (line 830) | private haveActionsChanged(original: Action[], updated: Action[]): boo... method refreshAgentCacheEntry (line 863) | private async refreshAgentCacheEntry( FILE: packages/core/lib/v3/cache/CacheStorage.ts class CacheStorage (line 14) | class CacheStorage { method constructor (line 15) | private constructor( method create (line 21) | static create( method createMemory (line 48) | static createMemory(logger: Logger): CacheStorage { method directory (line 52) | get directory(): string | undefined { method enabled (line 56) | get enabled(): boolean { method resolvePath (line 60) | private resolvePath(fileName: string): string | null { method readJson (line 65) | async readJson(fileName: string): Promise> { method writeJson (line 91) | async writeJson(fileName: string, data: unknown): Promise(instance: V3, key: string): T { function setInternalField (line 23) | function setInternalField(instance: V3, key: string, value: unknown): vo... function createMemoryAgentCache (line 27) | function createMemoryAgentCache(stagehand: V3): AgentCache { function __internalCreateInMemoryAgentCacheHandle (line 52) | function __internalCreateInMemoryAgentCacheHandle( FILE: packages/core/lib/v3/cache/utils.ts constant DEFAULT_WAIT_TIMEOUT_MS (line 4) | const DEFAULT_WAIT_TIMEOUT_MS = 15000; function cloneForCache (line 6) | function cloneForCache(value: T): T { function safeGetPageUrl (line 10) | async function safeGetPageUrl(page: Page): Promise { function waitForCachedSelector (line 22) | async function waitForCachedSelector(params: { FILE: packages/core/lib/v3/dom/a11yScripts/index.ts function getScrollOffsets (line 1) | function getScrollOffsets(): { sx: number; sy: number } { function getBoundingRectLite (line 19) | function getBoundingRectLite(this: Element): { function resolveDeepActiveElement (line 34) | function resolveDeepActiveElement(): Element | null { function nodeToAbsoluteXPath (line 49) | function nodeToAbsoluteXPath(this: Node | null | undefined): string { function documentHasFocusStrict (line 110) | function documentHasFocusStrict(): boolean { FILE: packages/core/lib/v3/dom/genA11yScripts.ts function main (line 14) | async function main(): Promise { FILE: packages/core/lib/v3/dom/genLocatorScripts.ts function main (line 13) | async function main(): Promise { FILE: packages/core/lib/v3/dom/genScreenshotScripts.ts function main (line 13) | async function main(): Promise { FILE: packages/core/lib/v3/dom/global.d.ts type StagehandV3Backdoor (line 1) | interface StagehandV3Backdoor { type Window (line 15) | interface Window { FILE: packages/core/lib/v3/dom/locatorScripts/counts.ts type TextMatchSample (line 3) | interface TextMatchSample { type TextMatchResult (line 10) | interface TextMatchResult { function countCssMatchesPrimary (line 16) | function countCssMatchesPrimary(selectorRaw: string): number { function countCssMatchesPierce (line 68) | function countCssMatchesPierce(selectorRaw: string): number { function countTextMatches (line 141) | function countTextMatches(rawNeedle: string): TextMatchResult { function countXPathMatchesMainWorld (line 303) | function countXPathMatchesMainWorld(rawXp: string): number { FILE: packages/core/lib/v3/dom/locatorScripts/scripts.ts type ClickEventOptions (line 9) | interface ClickEventOptions { function ensureFileInputElement (line 16) | function ensureFileInputElement(this: Element): boolean { type SerializedFilePayload (line 27) | interface SerializedFilePayload { function assignFilePayloadsToInputElement (line 35) | function assignFilePayloadsToInputElement( function dispatchDomClick (line 82) | function dispatchDomClick( function scrollElementToPercent (line 106) | function scrollElementToPercent( type FillElementResult (line 184) | type FillElementResult = function prepareElementForTyping (line 189) | function prepareElementForTyping(this: Element): boolean { function fillElementValue (line 252) | function fillElementValue( function focusElement (line 375) | function focusElement(this: Element): void { function selectElementOptions (line 385) | function selectElementOptions( function isElementVisible (line 429) | function isElementVisible(this: Element): boolean { function isElementChecked (line 453) | function isElementChecked(this: Element): boolean { function readElementInputValue (line 471) | function readElementInputValue(this: Element): string { function readElementTextContent (line 492) | function readElementTextContent(this: Element): string { function readElementInnerHTML (line 500) | function readElementInnerHTML(this: Element): string { function readElementInnerText (line 508) | function readElementInnerText(this: Element): string { FILE: packages/core/lib/v3/dom/locatorScripts/selectors.ts function resolveCssSelector (line 60) | function resolveCssSelector( function resolveCssSelectorPierce (line 72) | function resolveCssSelectorPierce( function resolveTextSelector (line 148) | function resolveTextSelector( function resolveXPathMainWorld (line 306) | function resolveXPathMainWorld( FILE: packages/core/lib/v3/dom/locatorScripts/waitForSelector.ts type WaitForSelectorState (line 12) | type WaitForSelectorState = "attached" | "detached" | "visible" | "hidden"; function waitForSelector (line 223) | function waitForSelector( FILE: packages/core/lib/v3/dom/locatorScripts/xpathParser.ts type XPathPredicate (line 1) | type XPathPredicate = type XPathStep (line 23) | interface XPathStep { function parseXPathSteps (line 58) | function parseXPathSteps(input: string): XPathStep[] { function extractPredicates (line 109) | function extractPredicates(str: string): string[] { function parseStep (line 137) | function parseStep(raw: string): { function parsePredicateExpression (line 161) | function parsePredicateExpression(input: string): XPathPredicate | null { function parseAtomicPredicate (line 192) | function parseAtomicPredicate(input: string): XPathPredicate | null { function splitTopLevel (line 293) | function splitTopLevel(input: string, keyword: string): string[] { function isKeywordAt (line 340) | function isKeywordAt(input: string, index: number, keyword: string): boo... function isBoundary (line 349) | function isBoundary(ch: string): boolean { function unwrapFunctionCall (line 353) | function unwrapFunctionCall(input: string, name: string): string | null { function hasBalancedParens (line 360) | function hasBalancedParens(input: string): boolean { function textValue (line 383) | function textValue(element: Element): string { function normalizeMaybe (line 387) | function normalizeMaybe(value: string, normalize?: boolean): string { function evaluatePredicate (line 391) | function evaluatePredicate( function applyPredicates (line 443) | function applyPredicates( FILE: packages/core/lib/v3/dom/locatorScripts/xpathResolver.ts type ClosedRootGetter (line 7) | type ClosedRootGetter = (host: Element) => ShadowRoot | null; type XPathResolveOptions (line 9) | type XPathResolveOptions = { type ShadowContext (line 13) | type ShadowContext = { function resolveXPathFirst (line 24) | function resolveXPathFirst( function resolveXPathAtIndex (line 31) | function resolveXPathAtIndex( function countXPathMatches (line 59) | function countXPathMatches( function resolveXPathComposedMatches (line 82) | function resolveXPathComposedMatches( function matchesTag (line 130) | function matchesTag(element: Element, step: XPathStep): boolean { function getShadowContext (line 135) | function getShadowContext(): ShadowContext { function composedChildren (line 179) | function composedChildren( function composedDescendants (line 210) | function composedDescendants( function resolveNativeAtIndexWithError (line 233) | function resolveNativeAtIndexWithError( function resolveNativeCountWithError (line 254) | function resolveNativeCountWithError(xp: string): { FILE: packages/core/lib/v3/dom/piercer.runtime.ts type V3ShadowPatchOptions (line 1) | interface V3ShadowPatchOptions { type StagehandV3Backdoor (line 6) | interface StagehandV3Backdoor { type V3InternalState (line 19) | type V3InternalState = { type Window (line 27) | interface Window { function installV3ShadowPiercer (line 33) | function installV3ShadowPiercer(opts: V3ShadowPatchOptions = {}): void { FILE: packages/core/lib/v3/dom/rerenderMissingShadows.runtime.ts function rerenderMissingShadowHosts (line 1) | function rerenderMissingShadowHosts(): void { FILE: packages/core/lib/v3/dom/screenshotScripts/resolveMaskRect.ts type MaskRect (line 1) | type MaskRect = { function resolveMaskRect (line 9) | function resolveMaskRect( FILE: packages/core/lib/v3/external_clients/aisdk.ts class AISdkClient (line 17) | class AISdkClient extends LLMClient { method constructor (line 21) | constructor({ model }: { model: LanguageModelV2 }) { method createChatCompletion (line 26) | async createChatCompletion({ FILE: packages/core/lib/v3/external_clients/customOpenAI.ts class CustomOpenAIClient (line 28) | class CustomOpenAIClient extends LLMClient { method constructor (line 32) | constructor({ modelName, client }: { modelName: string; client: OpenAI... method createChatCompletion (line 38) | async createChatCompletion({ FILE: packages/core/lib/v3/flowlogger/EventEmitter.ts type WildcardEventListener (line 3) | type WildcardEventListener = (...args: unknown[]) => void; class EventEmitterWithWildcardSupport (line 5) | class EventEmitterWithWildcardSupport extends EventEmitter { method on (line 8) | override on( method off (line 20) | override off( method emit (line 32) | override emit(eventName: string | symbol, ...args: unknown[]): boolean { FILE: packages/core/lib/v3/flowlogger/EventSink.ts type EventSink (line 16) | interface EventSink { function matchesEventStoreQuery (line 23) | function matchesEventStoreQuery( function isWritable (line 57) | function isWritable(stream: fs.WriteStream | null): stream is fs.WriteSt... function writeToStream (line 62) | function writeToStream(stream: fs.WriteStream, value: string): Promise, fileName: string) { method emit (line 97) | async emit(event: FlowEvent): Promise { method query (line 116) | async query(): Promise { method destroy (line 121) | async destroy(): Promise { class JsonlFileEventSink (line 133) | class JsonlFileEventSink extends FileEventSink { method constructor (line 135) | constructor(sessionDirPromise: Promise) { method serialize (line 140) | protected async serialize(event: FlowEvent): Promise { class PrettyLogFileEventSink (line 145) | class PrettyLogFileEventSink extends FileEventSink { method constructor (line 147) | constructor( method serialize (line 155) | protected async serialize(event: FlowEvent): Promise { class PrettyStderrEventSink (line 161) | class PrettyStderrEventSink implements EventSink { method constructor (line 163) | constructor(private readonly store: Pick) {} /... method emit (line 166) | async emit(event: FlowEvent): Promise { method query (line 202) | async query(): Promise { method destroy (line 207) | async destroy(): Promise {} class InMemoryEventSink (line 210) | class InMemoryEventSink implements EventSink { method constructor (line 212) | constructor(protected readonly limit = Infinity) {} method storeEvent (line 217) | protected storeEvent(event: FlowEvent): FlowEvent { method emit (line 222) | async emit(event: FlowEvent): Promise { method query (line 230) | async query(query: EventStoreQuery): Promise { method destroy (line 248) | async destroy(): Promise { class ShallowInMemoryEventSink (line 253) | class ShallowInMemoryEventSink extends InMemoryEventSink { method storeEvent (line 255) | protected override storeEvent(event: FlowEvent): FlowEvent { FILE: packages/core/lib/v3/flowlogger/EventStore.ts constant DEFAULT_IN_MEMORY_EVENT_LIMIT (line 13) | const DEFAULT_IN_MEMORY_EVENT_LIMIT = 500; constant CONFIG_DIR (line 14) | const CONFIG_DIR = process.env.BROWSERBASE_CONFIG_DIR || ""; constant FLOW_LOGS_ENABLED (line 15) | const FLOW_LOGS_ENABLED = process.env.BROWSERBASE_FLOW_LOGS === "1"; constant SENSITIVE_KEYS (line 16) | const SENSITIVE_KEYS = type EventStoreQuery (line 23) | interface EventStoreQuery { type EventStoreApi (line 30) | interface EventStoreApi { function sanitizeOptions (line 42) | function sanitizeOptions(options: V3Options): Record { function getConfigDir (line 58) | function getConfigDir(): string { function createSessionDir (line 63) | async function createSessionDir( class EventStore (line 114) | class EventStore implements EventStoreApi { method constructor (line 120) | constructor( method registerSink (line 153) | private registerSink(sink: EventSink): void { method destroy (line 171) | async destroy(): Promise { FILE: packages/core/lib/v3/flowlogger/FlowLogger.ts type FlowEventData (line 21) | type FlowEventData = z.infer; type FlowEventInput (line 22) | type FlowEventInput = z.input; type FlowEventFields (line 25) | type FlowEventFields = Omit< class FlowEvent (line 36) | class FlowEvent implements FlowEventFields { method deriveEventIdSuffix (line 38) | private static deriveEventIdSuffix(eventType: string): string { method createEventId (line 50) | static createEventId(eventType: string): string { method constructor (line 65) | constructor(input: FlowEventInput) { type FlowLoggerContext (line 82) | interface FlowLoggerContext { type AsyncOriginalMethod (line 89) | type AsyncOriginalMethod< type FlowLoggerLogOptions (line 95) | type FlowLoggerLogOptions = FlowEventInput & { function dataToKb (line 103) | function dataToKb(data: string): string { type CdpLogEventType (line 111) | type CdpLogEventType = "call" | "response" | "responseError" | "message"; type CdpLogPayload (line 113) | type CdpLogPayload = { constant CDP_EVENT_NAMES (line 121) | const CDP_EVENT_NAMES: Record = { class FlowLogger (line 128) | class FlowLogger { method cloneContext (line 130) | private static cloneContext(ctx: FlowLoggerContext): FlowLoggerContext { method resolveReentryContext (line 145) | private static resolveReentryContext( method emit (line 188) | private static emit(event: FlowEventInput): FlowEvent | null { method runWithAutoStatusEventLogging (line 204) | private static async runWithAutoStatusEventLogging( method logCdpEvent (line 267) | private static logCdpEvent( method emitLlmEvent (line 298) | private static emitLlmEvent(event: FlowEventInput): void { method buildMiddlewarePromptSummary (line 310) | private static buildMiddlewarePromptSummary(params: { method buildMiddlewareOutputSummary (line 362) | private static buildMiddlewareOutputSummary(result: { method init (line 406) | static init( method close (line 422) | static async close(context?: FlowLoggerContext | null): Promise { method currentContext (line 430) | static get currentContext(): FlowLoggerContext { method resolveContext (line 442) | static resolveContext( method wrapWithLogging (line 456) | static wrapWithLogging( method runWithLogging (line 508) | static runWithLogging( method withContext (line 549) | static withContext(context: FlowLoggerContext, fn: () => T): T { method logCdpCallEvent (line 573) | static logCdpCallEvent( method logCdpResponseEvent (line 585) | static logCdpResponseEvent( method logCdpMessageEvent (line 604) | static logCdpMessageEvent( method logLlmRequest (line 624) | static logLlmRequest({ method logLlmResponse (line 644) | static logLlmResponse({ method createLlmLoggingMiddleware (line 675) | static createLlmLoggingMiddleware( type ContentPart (line 713) | type ContentPart = { type LlmMessageContent (line 722) | type LlmMessageContent = { function extractLlmMessageContent (line 731) | function extractLlmMessageContent(content: unknown[]): { function extractLlmMessageSummary (line 774) | function extractLlmMessageSummary( function extractLlmPromptSummary (line 817) | function extractLlmPromptSummary( function extractLlmCuaPromptSummary (line 838) | function extractLlmCuaPromptSummary( function extractLlmCuaResponseSummary (line 860) | function extractLlmCuaResponseSummary(output: unknown): string { FILE: packages/core/lib/v3/flowlogger/prettify.ts constant MAX_LINE_LENGTH (line 5) | const MAX_LINE_LENGTH = 160; function prettifySanitizeValue (line 14) | function prettifySanitizeValue(value: unknown): unknown { function prettifySanitizeEvent (line 36) | function prettifySanitizeEvent(event: FlowEvent): FlowEvent { function prettifyTruncateLine (line 48) | function prettifyTruncateLine(value: string, maxLen: number): string { function prettifyFormatValue (line 60) | function prettifyFormatValue(value: unknown): string { function prettifyFormatArgs (line 72) | function prettifyFormatArgs(args?: unknown | unknown[]): string { function shortId (line 85) | function shortId(id: string | null | undefined): string { function truncateCdpIds (line 90) | function truncateCdpIds(value: string): string { function prettifyFormatTimestamp (line 101) | function prettifyFormatTimestamp(date: Date): string { function prettifyRemoveQuotes (line 107) | function prettifyRemoveQuotes(value: string): string { function prettifyEventName (line 115) | function prettifyEventName(eventType: string): string { function prettifyEventAction (line 123) | function prettifyEventAction(eventType: string): string { function prettifyFormatMethodCall (line 132) | function prettifyFormatMethodCall( function prettifyIsAgentEvent (line 142) | function prettifyIsAgentEvent(event: FlowEvent): boolean { function prettifyIsStagehandEvent (line 147) | function prettifyIsStagehandEvent(event: FlowEvent): boolean { function prettifyIsActionEvent (line 152) | function prettifyIsActionEvent(event: FlowEvent): boolean { function prettifyIsCdpEvent (line 157) | function prettifyIsCdpEvent(event: FlowEvent): boolean { function prettifyIsLlmEvent (line 162) | function prettifyIsLlmEvent(event: FlowEvent): boolean { function prettifyIsCompletedEvent (line 167) | function prettifyIsCompletedEvent(event: FlowEvent): boolean { function prettifyIsErrorEvent (line 172) | function prettifyIsErrorEvent(event: FlowEvent): boolean { function prettifyFormatTag (line 177) | function prettifyFormatTag( function prettifyFormatDuration (line 186) | function prettifyFormatDuration(durationMs?: unknown): string | null { function prettifySummarizePrompt (line 193) | function prettifySummarizePrompt(value: unknown): string | undefined { function prettifyCompactValue (line 206) | function prettifyCompactValue(value: unknown): unknown { function prettifyFormatEventArgs (line 239) | function prettifyFormatEventArgs(args?: unknown | unknown[]): string { function prettifyFindNearestEvent (line 244) | function prettifyFindNearestEvent( function prettifyBuildContextTags (line 266) | function prettifyBuildContextTags( function prettifyFormatStartedDetails (line 374) | function prettifyFormatStartedDetails(event: FlowEvent): string { function prettifyFormatCompletedDetails (line 406) | function prettifyFormatCompletedDetails(event: FlowEvent): string { function prettifyFormatCdpDetails (line 419) | function prettifyFormatCdpDetails(event: FlowEvent): string { function prettifyFormatLlmDetails (line 443) | function prettifyFormatLlmDetails(event: FlowEvent): string { function prettifyEvent (line 467) | async function prettifyEvent( function prettifyColorStderrLine (line 505) | function prettifyColorStderrLine(line: string): string { FILE: packages/core/lib/v3/handlers/actHandler.ts type ActInferenceElement (line 30) | type ActInferenceElement = { type ActInferenceResponse (line 37) | type ActInferenceResponse = Awaited>; class ActHandler (line 39) | class ActHandler { method constructor (line 57) | constructor( method recordActMetrics (line 86) | private recordActMetrics(response: ActInferenceResponse): void { method getActionFromLLM (line 97) | private async getActionFromLLM({ method act (line 137) | async act(params: ActHandlerParams): Promise { method takeDeterministicAction (line 268) | async takeDeterministicAction( function normalizeActInferenceElement (line 445) | function normalizeActInferenceElement( function substituteVariablesInArguments (line 518) | function substituteVariablesInArguments( FILE: packages/core/lib/v3/handlers/extractHandler.ts function transformUrlStringsToNumericIds (line 46) | function transformUrlStringsToNumericIds( type ExtractionResponseBase (line 53) | interface ExtractionResponseBase { type ExtractionResponse (line 62) | type ExtractionResponse = ExtractionRespon... class ExtractHandler (line 65) | class ExtractHandler { method constructor (line 82) | constructor( method extract (line 109) | async extract( FILE: packages/core/lib/v3/handlers/handlerUtils/actHandlerUtils.ts type UnderstudyMethodHandlerContext (line 16) | interface UnderstudyMethodHandlerContext { function normalizeRootXPath (line 28) | function normalizeRootXPath(input: string): string { function performUnderstudyMethod (line 35) | async function performUnderstudyMethod( constant METHOD_HANDLER_MAP (line 124) | const METHOD_HANDLER_MAP: Record< function selectOption (line 146) | async function selectOption(ctx: UnderstudyMethodHandlerContext) { function scrollIntoView (line 168) | async function scrollIntoView( function scrollElementToPercentage (line 186) | async function scrollElementToPercentage( function scrollByPixelOffset (line 205) | async function scrollByPixelOffset( function wheelScroll (line 221) | async function wheelScroll(ctx: UnderstudyMethodHandlerContext): Promise... function fillOrType (line 239) | async function fillOrType(ctx: UnderstudyMethodHandlerContext): Promise<... function typeText (line 259) | async function typeText(ctx: UnderstudyMethodHandlerContext): Promise { function waitForDomNetworkQuiet (line 528) | async function waitForDomNetworkQuiet( FILE: packages/core/lib/v3/handlers/handlerUtils/timeoutGuard.ts type TimeoutGuard (line 3) | type TimeoutGuard = () => void; function createTimeoutGuard (line 5) | function createTimeoutGuard( FILE: packages/core/lib/v3/handlers/observeHandler.ts class ObserveHandler (line 22) | class ObserveHandler { method constructor (line 39) | constructor( method observe (line 66) | async observe(params: ObserveHandlerParams): Promise { FILE: packages/core/lib/v3/handlers/v3AgentHandler.ts function getErrorMessage (line 49) | function getErrorMessage(error: unknown): string { function prependSystemMessage (line 57) | function prependSystemMessage( class V3AgentHandler (line 75) | class V3AgentHandler { method constructor (line 85) | constructor( method prepareAgent (line 105) | private async prepareAgent( method createPrepareStep (line 196) | private createPrepareStep( method createStepHandler (line 245) | private createStepHandler( method execute (line 305) | public async execute( method stream (line 444) | public async stream( method consolidateMetricsAndResult (line 585) | private consolidateMetricsAndResult( method createTools (line 645) | private createTools( method handleStop (line 665) | private handleStop( method ensureDone (line 680) | private async ensureDone( FILE: packages/core/lib/v3/handlers/v3CuaAgentHandler.ts class V3CuaAgentHandler (line 29) | class V3CuaAgentHandler { method constructor (line 41) | constructor( method ensureNotClosed (line 67) | private ensureNotClosed(): void { method setupAgentClient (line 73) | private setupAgentClient(): void { method setSafetyConfirmationHandler (line 180) | setSafetyConfirmationHandler(handler?: SafetyConfirmationHandler): void { method execute (line 189) | async execute( method executeAction (line 271) | private async executeAction( method computePointerTarget (line 560) | private computePointerTarget(action: AgentAction): string | undefined { method describePointerAction (line 572) | private describePointerAction(kind: string, x: unknown, y: unknown): s... method describeTypeAction (line 581) | private describeTypeAction(text: string): string { method describeDragAction (line 586) | private describeDragAction(): string { method buildInstructionFallback (line 590) | private buildInstructionFallback( method recordCuaActStep (line 601) | private recordCuaActStep( method updateClientViewport (line 626) | private async updateClientViewport(): Promise { method updateClientUrl (line 649) | private async updateClientUrl(): Promise { method captureAndSendScreenshot (line 659) | async captureAndSendScreenshot(): Promise { method handleCaptchaSolveResult (line 684) | private handleCaptchaSolveResult(result?: { method shouldSkipSolvedCaptchaInteraction (line 711) | private async shouldSkipSolvedCaptchaInteraction( method injectCursor (line 779) | private async injectCursor(): Promise { FILE: packages/core/lib/v3/launch/browserbase.ts function createBrowserbaseSession (line 9) | async function createBrowserbaseSession( FILE: packages/core/lib/v3/launch/local.ts type LaunchLocalOptions (line 5) | interface LaunchLocalOptions { function launchLocalChrome (line 15) | async function launchLocalChrome( function waitForWebSocketDebuggerUrl (line 52) | async function waitForWebSocketDebuggerUrl( function waitForWebSocketReady (line 82) | async function waitForWebSocketReady( function probeWebSocket (line 104) | function probeWebSocket(wsUrl: string, timeoutMs: number): Promise { FILE: packages/core/lib/v3/llm/AnthropicClient.ts class AnthropicClient (line 21) | class AnthropicClient extends LLMClient { method constructor (line 26) | constructor({ method createChatCompletion (line 43) | async createChatCompletion({ FILE: packages/core/lib/v3/llm/CerebrasClient.ts class CerebrasClient (line 14) | class CerebrasClient extends LLMClient { method constructor (line 20) | constructor({ method createChatCompletion (line 43) | async createChatCompletion({ FILE: packages/core/lib/v3/llm/GoogleClient.ts class GoogleClient (line 60) | class GoogleClient extends LLMClient { method constructor (line 67) | constructor({ method formatMessages (line 91) | private formatMessages( method formatTools (line 186) | private formatTools( method createChatCompletion (line 216) | async createChatCompletion({ FILE: packages/core/lib/v3/llm/GroqClient.ts class GroqClient (line 14) | class GroqClient extends LLMClient { method constructor (line 20) | constructor({ method createChatCompletion (line 43) | async createChatCompletion({ FILE: packages/core/lib/v3/llm/LLMClient.ts type ChatMessage (line 18) | interface ChatMessage { type ChatMessageContent (line 23) | type ChatMessageContent = type ChatMessageImageContent (line 27) | interface ChatMessageImageContent { type ChatMessageTextContent (line 38) | interface ChatMessageTextContent { type ChatCompletionOptions (line 46) | interface ChatCompletionOptions { type LLMResponse (line 66) | type LLMResponse = { type CreateChatCompletionOptions (line 94) | interface CreateChatCompletionOptions { type LLMUsage (line 101) | interface LLMUsage { type LLMParsedResponse (line 112) | interface LLMParsedResponse { method constructor (line 124) | constructor(modelName: AvailableModel, userProvidedInstructions?: string) { FILE: packages/core/lib/v3/llm/LLMProvider.ts function getAISDKLanguageModel (line 102) | function getAISDKLanguageModel( class LLMProvider (line 134) | class LLMProvider { method constructor (line 137) | constructor(logger: (message: LogLine) => void) { method getClient (line 141) | getClient( method getModelProvider (line 223) | static getModelProvider(modelName: AvailableModel): ModelProvider { FILE: packages/core/lib/v3/llm/OpenAIClient.ts class OpenAIClient (line 28) | class OpenAIClient extends LLMClient { method constructor (line 33) | constructor({ method createChatCompletion (line 47) | async createChatCompletion({ FILE: packages/core/lib/v3/llm/aisdk.ts class AISdkClient (line 26) | class AISdkClient extends LLMClient { method constructor (line 31) | constructor({ method getLanguageModel (line 43) | public getLanguageModel(): LanguageModelV2 { method createChatCompletion (line 47) | async createChatCompletion({ FILE: packages/core/lib/v3/logger.ts function bindInstanceLogger (line 35) | function bindInstanceLogger( function unbindInstanceLogger (line 42) | function unbindInstanceLogger(instanceId: string): void { function withInstanceLogContext (line 46) | function withInstanceLogContext(instanceId: string, fn: () => T): T { function v3Logger (line 54) | function v3Logger(line: LogLine): void { FILE: packages/core/lib/v3/mcp/connection.ts type ConnectToMCPServerOptions (line 12) | interface ConnectToMCPServerOptions { type StdioServerConfig (line 18) | interface StdioServerConfig { FILE: packages/core/lib/v3/runtimePaths.ts constant PACKAGE_SEGMENT (line 13) | const PACKAGE_SEGMENT = "/packages/core/"; constant EVAL_FRAMES (line 14) | const EVAL_FRAMES = new Set(["[eval]", "[eval]-wrapper"]); constant INTERNAL_FRAME_NAMES (line 15) | const INTERNAL_FRAME_NAMES = new Set([ type CallSiteWithScriptName (line 44) | type CallSiteWithScriptName = NodeJS.CallSite & { FILE: packages/core/lib/v3/shutdown/cleanupLocal.ts function cleanupLocalBrowser (line 11) | async function cleanupLocalBrowser(opts: { FILE: packages/core/lib/v3/shutdown/supervisor.ts constant SIGKILL_POLL_MS (line 14) | const SIGKILL_POLL_MS = 250; constant SIGKILL_TIMEOUT_MS (line 15) | const SIGKILL_TIMEOUT_MS = 7_000; constant PID_POLL_INTERVAL_MS (line 16) | const PID_POLL_INTERVAL_MS = 500; FILE: packages/core/lib/v3/shutdown/supervisorClient.ts function startShutdownSupervisor (line 76) | function startShutdownSupervisor( FILE: packages/core/lib/v3/timeoutConfig.ts function getEnvTimeoutMs (line 3) | function getEnvTimeoutMs(name: string): number | undefined { function withTimeout (line 12) | async function withTimeout( FILE: packages/core/lib/v3/types/private/agent.ts type ActionMappingOptions (line 1) | interface ActionMappingOptions { FILE: packages/core/lib/v3/types/private/api.ts type SerializableResponse (line 3) | interface SerializableResponse { FILE: packages/core/lib/v3/types/private/cache.ts type ActFn (line 15) | type ActFn = ( type AgentCacheContext (line 20) | type AgentCacheContext = { type AgentCacheTransferPayload (line 31) | type AgentCacheTransferPayload = { type AgentCacheDeps (line 36) | type AgentCacheDeps = { type ActCacheContext (line 49) | type ActCacheContext = { type ActCacheDeps (line 57) | type ActCacheDeps = { type ReadJsonResult (line 65) | type ReadJsonResult = { type WriteJsonResult (line 71) | type WriteJsonResult = { type CachedActEntry (line 76) | interface CachedActEntry { type AgentReplayStep (line 86) | type AgentReplayStep = type AgentReplayActStep (line 96) | interface AgentReplayActStep { type AgentReplayFillFormStep (line 105) | interface AgentReplayFillFormStep { type AgentReplayGotoStep (line 112) | interface AgentReplayGotoStep { type AgentReplayScrollStep (line 118) | interface AgentReplayScrollStep { type AgentReplayWaitStep (line 125) | interface AgentReplayWaitStep { type AgentReplayNavBackStep (line 130) | interface AgentReplayNavBackStep { type AgentReplayKeysStep (line 135) | interface AgentReplayKeysStep { type SanitizedAgentExecuteOptions (line 146) | interface SanitizedAgentExecuteOptions { type CachedAgentEntry (line 151) | interface CachedAgentEntry { FILE: packages/core/lib/v3/types/private/evaluator.ts type EvaluateOptions (line 1) | type EvaluateOptions = { type BatchAskOptions (line 16) | type BatchAskOptions = { type EvaluationResult (line 33) | interface EvaluationResult { FILE: packages/core/lib/v3/types/private/handlers.ts type ActHandlerParams (line 6) | interface ActHandlerParams { type ExtractHandlerParams (line 14) | interface ExtractHandlerParams { type ObserveHandlerParams (line 23) | interface ObserveHandlerParams { type SupportedUnderstudyAction (line 32) | enum SupportedUnderstudyAction { FILE: packages/core/lib/v3/types/private/internal.ts type InitState (line 4) | type InitState = type EncodedId (line 16) | type EncodedId = `${number}-${number}`; type ZodPathSegments (line 28) | interface ZodPathSegments { type InitScriptSource (line 36) | type InitScriptSource = FILE: packages/core/lib/v3/types/private/locator.ts type NormalizedFilePayload (line 3) | interface NormalizedFilePayload { FILE: packages/core/lib/v3/types/private/network.ts type NetworkRequestInfo (line 4) | type NetworkRequestInfo = { type NetworkObserver (line 17) | interface NetworkObserver { type WaitForIdleOptions (line 24) | type WaitForIdleOptions = { constant DEFAULT_IDLE_WAIT (line 32) | const DEFAULT_IDLE_WAIT = 500; constant IGNORED_RESOURCE_TYPES (line 33) | const IGNORED_RESOURCE_TYPES = new Set< type WaitForIdleHandle (line 38) | type WaitForIdleHandle = { FILE: packages/core/lib/v3/types/private/shutdown.ts type ShutdownSupervisorConfig (line 5) | type ShutdownSupervisorConfig = type ShutdownSupervisorHandle (line 20) | interface ShutdownSupervisorHandle { FILE: packages/core/lib/v3/types/private/shutdownErrors.ts class ShutdownSupervisorError (line 5) | class ShutdownSupervisorError extends Error { method constructor (line 6) | constructor(message: string) { class ShutdownSupervisorResolveError (line 12) | class ShutdownSupervisorResolveError extends ShutdownSupervisorError { method constructor (line 13) | constructor(message: string) { class ShutdownSupervisorSpawnError (line 19) | class ShutdownSupervisorSpawnError extends ShutdownSupervisorError { method constructor (line 20) | constructor(message: string) { FILE: packages/core/lib/v3/types/private/snapshot.ts type SnapshotOptions (line 4) | type SnapshotOptions = { type HybridSnapshot (line 28) | type HybridSnapshot = { type PerFrameSnapshot (line 39) | type PerFrameSnapshot = { type SessionDomIndex (line 50) | type SessionDomIndex = { type FrameDomMaps (line 59) | type FrameDomMaps = { type ResolvedLocation (line 66) | type ResolvedLocation = { type ResolvedFocusFrame (line 72) | type ResolvedFocusFrame = { type ResolvedCssFocus (line 78) | type ResolvedCssFocus = { type Axis (line 84) | type Axis = "child" | "desc"; type Step (line 86) | type Step = { type A11yNode (line 92) | type A11yNode = { type A11yOptions (line 105) | type A11yOptions = { type AccessibilityTreeResult (line 113) | type AccessibilityTreeResult = { type FrameParentIndex (line 119) | type FrameParentIndex = Map; type FrameContext (line 127) | type FrameContext = { FILE: packages/core/lib/v3/types/public/agent.ts type VariableValue (line 49) | type VariableValue = type Variables (line 58) | type Variables = Record; type AgentContext (line 60) | interface AgentContext { type AgentState (line 70) | interface AgentState { type AgentAction (line 78) | interface AgentAction { type AgentResult (line 91) | interface AgentResult { type AgentStreamResult (line 118) | type AgentStreamResult = StreamTextResult & { type AgentCallbacks (line 125) | interface AgentCallbacks { type StreamingCallbackNotAvailable (line 145) | type StreamingCallbackNotAvailable = type SafetyConfirmationCallbackNotAvailable (line 152) | type SafetyConfirmationCallbackNotAvailable = type AgentExecuteCallbacks (line 158) | interface AgentExecuteCallbacks extends AgentCallbacks { type AgentStreamCallbacks (line 237) | interface AgentStreamCallbacks extends AgentCallbacks { type AgentExecuteOptionsBase (line 272) | interface AgentExecuteOptionsBase { type AgentExecuteOptions (line 425) | interface AgentExecuteOptions extends AgentExecuteOptionsBase { type AgentStreamExecuteOptions (line 437) | interface AgentStreamExecuteOptions extends AgentExecuteOptionsBase { type AgentType (line 444) | type AgentType = constant AVAILABLE_CUA_MODELS (line 451) | const AVAILABLE_CUA_MODELS = [ type AvailableCuaModel (line 465) | type AvailableCuaModel = (typeof AVAILABLE_CUA_MODELS)[number]; type AgentExecutionOptions (line 467) | interface AgentExecutionOptions< type AgentHandlerOptions (line 475) | interface AgentHandlerOptions { type ActionExecutionResult (line 482) | interface ActionExecutionResult { type SafetyCheck (line 493) | interface SafetyCheck { type SafetyConfirmationResponse (line 505) | interface SafetyConfirmationResponse { type SafetyConfirmationHandler (line 535) | type SafetyConfirmationHandler = ( type ToolUseItem (line 541) | interface ToolUseItem extends ResponseItem { type AnthropicMessage (line 548) | interface AnthropicMessage { type AnthropicContentBlock (line 553) | interface AnthropicContentBlock { type AnthropicTextBlock (line 558) | interface AnthropicTextBlock extends AnthropicContentBlock { type AnthropicToolResult (line 563) | interface AnthropicToolResult { type ResponseItem (line 571) | interface ResponseItem { type ComputerCallItem (line 577) | interface ComputerCallItem extends ResponseItem { type FunctionCallItem (line 591) | interface FunctionCallItem extends ResponseItem { type ResponseInputItem (line 598) | type ResponseInputItem = type AgentInstance (line 624) | interface AgentInstance { type AgentProviderType (line 630) | type AgentProviderType = AgentType; type AgentModelConfig (line 632) | type AgentModelConfig = { type AgentToolMode (line 642) | type AgentToolMode = "dom" | "hybrid" | "cua"; type AgentConfig (line 644) | type AgentConfig = { type StreamingAgentInstance (line 693) | interface StreamingAgentInstance { type NonStreamingAgentInstance (line 704) | interface NonStreamingAgentInstance { type ModelOutputContentItem (line 718) | type ModelOutputContentItem = type ClickToolResult (line 722) | interface ClickToolResult { type TypeToolResult (line 730) | interface TypeToolResult { type DragAndDropToolResult (line 738) | interface DragAndDropToolResult { type FillFormField (line 745) | interface FillFormField { type FillFormVisionToolResult (line 751) | interface FillFormVisionToolResult { type ScrollToolResult (line 758) | interface ScrollToolResult { type ScrollVisionToolResult (line 765) | interface ScrollVisionToolResult extends ScrollToolResult { type WaitToolResult (line 769) | interface WaitToolResult { FILE: packages/core/lib/v3/types/public/api.ts type Action (line 1055) | type Action = z.infer; type ModelConfig (line 1056) | type ModelConfig = z.infer; type BrowserConfig (line 1057) | type BrowserConfig = z.infer; type SessionIdParams (line 1058) | type SessionIdParams = z.infer; type SessionHeaders (line 1061) | type SessionHeaders = z.infer; type BrowserbaseViewport (line 1064) | type BrowserbaseViewport = z.infer; type BrowserbaseFingerprintScreen (line 1065) | type BrowserbaseFingerprintScreen = z.infer< type BrowserbaseFingerprint (line 1068) | type BrowserbaseFingerprint = z.infer< type BrowserbaseContext (line 1071) | type BrowserbaseContext = z.infer; type BrowserbaseBrowserSettings (line 1072) | type BrowserbaseBrowserSettings = z.infer< type BrowserbaseProxyGeolocation (line 1075) | type BrowserbaseProxyGeolocation = z.infer< type BrowserbaseProxyConfig (line 1078) | type BrowserbaseProxyConfig = z.infer< type ExternalProxyConfig (line 1081) | type ExternalProxyConfig = z.infer; type BrowserbaseRegion (line 1082) | type BrowserbaseRegion = z.infer; type BrowserbaseSessionCreateParams (line 1083) | type BrowserbaseSessionCreateParams = z.infer< type _BrowserbaseSessionCreateParamsCheck (line 1090) | type _BrowserbaseSessionCreateParamsCheck = type SessionStartRequest (line 1096) | type SessionStartRequest = z.infer; type SessionStartResult (line 1097) | type SessionStartResult = z.infer; type SessionStartResponse (line 1098) | type SessionStartResponse = z.infer; type SessionEndResult (line 1101) | type SessionEndResult = z.infer; type SessionEndResponse (line 1102) | type SessionEndResponse = z.infer; type ActRequest (line 1105) | type ActRequest = z.infer; type ActResultData (line 1106) | type ActResultData = z.infer; type ActResult (line 1107) | type ActResult = z.infer; type ActResponse (line 1108) | type ActResponse = z.infer; type ExtractRequest (line 1111) | type ExtractRequest = z.infer; type ExtractResult (line 1112) | type ExtractResult = z.infer; type ExtractResponse (line 1113) | type ExtractResponse = z.infer; type ObserveRequest (line 1116) | type ObserveRequest = z.infer; type ObserveResult (line 1117) | type ObserveResult = z.infer; type ObserveResponse (line 1118) | type ObserveResponse = z.infer; type AgentAction (line 1121) | type AgentAction = z.infer; type AgentUsage (line 1122) | type AgentUsage = z.infer; type AgentResultData (line 1123) | type AgentResultData = z.infer; type AgentExecuteRequest (line 1124) | type AgentExecuteRequest = z.infer; type AgentExecuteResult (line 1125) | type AgentExecuteResult = z.infer; type AgentExecuteResponse (line 1126) | type AgentExecuteResponse = z.infer; type NavigateRequest (line 1129) | type NavigateRequest = z.infer; type NavigateResult (line 1130) | type NavigateResult = z.infer; type NavigateResponse (line 1131) | type NavigateResponse = z.infer; type TokenUsage (line 1134) | type TokenUsage = z.infer; type ReplayAction (line 1135) | type ReplayAction = z.infer; type ReplayPage (line 1136) | type ReplayPage = z.infer; type ReplayResult (line 1137) | type ReplayResult = z.infer; type ReplayResponse (line 1138) | type ReplayResponse = z.infer; type StreamEventStatus (line 1141) | type StreamEventStatus = z.infer; type StreamEventType (line 1142) | type StreamEventType = z.infer; type StreamEventSystemData (line 1143) | type StreamEventSystemData = z.infer; type StreamEventLogData (line 1144) | type StreamEventLogData = z.infer; type StreamEvent (line 1145) | type StreamEvent = z.infer; FILE: packages/core/lib/v3/types/public/apiErrors.ts class StagehandAPIError (line 1) | class StagehandAPIError extends Error { method constructor (line 2) | constructor(message: string) { class StagehandAPIUnauthorizedError (line 8) | class StagehandAPIUnauthorizedError extends StagehandAPIError { method constructor (line 9) | constructor(message?: string) { class StagehandHttpError (line 14) | class StagehandHttpError extends StagehandAPIError { method constructor (line 15) | constructor(message: string) { class StagehandServerError (line 20) | class StagehandServerError extends StagehandAPIError { method constructor (line 21) | constructor(message: string) { class StagehandResponseBodyError (line 26) | class StagehandResponseBodyError extends StagehandAPIError { method constructor (line 27) | constructor() { class StagehandResponseParseError (line 32) | class StagehandResponseParseError extends StagehandAPIError { method constructor (line 33) | constructor(message: string) { FILE: packages/core/lib/v3/types/public/context.ts type Cookie (line 2) | interface Cookie { type CookieParam (line 15) | interface CookieParam { type ClearCookieOptions (line 30) | interface ClearCookieOptions { FILE: packages/core/lib/v3/types/public/locator.ts type MouseButton (line 3) | type MouseButton = "left" | "right" | "middle"; type SetInputFilePayload (line 5) | interface SetInputFilePayload { type SetInputFilesArgument (line 12) | type SetInputFilesArgument = FILE: packages/core/lib/v3/types/public/logs.ts type LogLevel (line 1) | type LogLevel = 0 | 1 | 2; constant LOG_LEVEL_NAMES (line 10) | const LOG_LEVEL_NAMES: Record = { type LogLine (line 16) | type LogLine = { type Logger (line 30) | type Logger = (logLine: LogLine) => void; FILE: packages/core/lib/v3/types/public/methods.ts type ActOptions (line 13) | interface ActOptions { type ActResult (line 26) | interface ActResult { type ExtractResult (line 34) | type ExtractResult = type Action (line 39) | interface Action { type HistoryEntry (line 46) | interface HistoryEntry { type ExtractOptions (line 53) | interface ExtractOptions { type ObserveOptions (line 74) | interface ObserveOptions { type ObserveResult (line 93) | type ObserveResult = Action[] & { cacheStatus?: "HIT" | "MISS" }; type V3FunctionName (line 95) | enum V3FunctionName { FILE: packages/core/lib/v3/types/public/metrics.ts type StagehandMetrics (line 1) | interface StagehandMetrics { FILE: packages/core/lib/v3/types/public/model.ts type OpenAIClientOptions (line 7) | type OpenAIClientOptions = Pick< type AnthropicClientOptions (line 12) | type AnthropicClientOptions = Pick< type GoogleServiceAccountCredentials (line 17) | interface GoogleServiceAccountCredentials { type GoogleVertexProviderSettings (line 31) | type GoogleVertexProviderSettings = Pick< type AnthropicJsonSchemaObject (line 40) | type AnthropicJsonSchemaObject = { type LLMTool (line 51) | interface LLMTool { type AISDKProvider (line 58) | type AISDKProvider = (modelName: string) => LanguageModelV2; type AISDKCustomProvider (line 60) | type AISDKCustomProvider = (options: ClientOptions) => AISDKProvider; type AvailableModel (line 62) | type AvailableModel = type ModelProvider (line 89) | type ModelProvider = type ClientOptions (line 97) | type ClientOptions = ( type ModelConfiguration (line 121) | type ModelConfiguration = FILE: packages/core/lib/v3/types/public/options.ts type V3Env (line 10) | type V3Env = "LOCAL" | "BROWSERBASE"; type LocalBrowserLaunchOptions (line 15) | type LocalBrowserLaunchOptions = z.infer< type V3Options (line 20) | interface V3Options { FILE: packages/core/lib/v3/types/public/page.ts type AnyPage (line 7) | type AnyPage = PlaywrightPage | PuppeteerPage | PatchrightPage | Page; type LoadState (line 12) | type LoadState = "load" | "domcontentloaded" | "networkidle"; type SnapshotResult (line 15) | type SnapshotResult = { type PageSnapshotOptions (line 21) | type PageSnapshotOptions = { FILE: packages/core/lib/v3/types/public/screenshotTypes.ts type ScreenshotAnimationsOption (line 3) | type ScreenshotAnimationsOption = "disabled" | "allow"; type ScreenshotCaretOption (line 4) | type ScreenshotCaretOption = "hide" | "initial"; type ScreenshotScaleOption (line 5) | type ScreenshotScaleOption = "css" | "device"; type ScreenshotClip (line 7) | interface ScreenshotClip { type ScreenshotOptions (line 14) | interface ScreenshotOptions { FILE: packages/core/lib/v3/types/public/sdkErrors.ts class StagehandError (line 5) | class StagehandError extends Error { method constructor (line 8) | constructor(message: string, cause?: unknown) { class StagehandDefaultError (line 17) | class StagehandDefaultError extends StagehandError { method constructor (line 18) | constructor(error?: unknown) { class StagehandEnvironmentError (line 27) | class StagehandEnvironmentError extends StagehandError { method constructor (line 28) | constructor( class MissingEnvironmentVariableError (line 40) | class MissingEnvironmentVariableError extends StagehandError { method constructor (line 41) | constructor(missingEnvironmentVariable: string, feature: string) { class UnsupportedModelError (line 49) | class UnsupportedModelError extends StagehandError { method constructor (line 50) | constructor(supportedModels: string[], feature?: string) { class UnsupportedModelProviderError (line 63) | class UnsupportedModelProviderError extends StagehandError { method constructor (line 64) | constructor(supportedProviders: string[], feature?: string) { class UnsupportedAISDKModelProviderError (line 73) | class UnsupportedAISDKModelProviderError extends StagehandError { method constructor (line 74) | constructor(provider: string, supportedProviders: string[]) { class InvalidAISDKModelFormatError (line 81) | class InvalidAISDKModelFormatError extends StagehandError { method constructor (line 82) | constructor(modelName: string) { class StagehandNotInitializedError (line 89) | class StagehandNotInitializedError extends StagehandError { method constructor (line 90) | constructor(prop: string) { class BrowserbaseSessionNotFoundError (line 99) | class BrowserbaseSessionNotFoundError extends StagehandError { method constructor (line 100) | constructor() { class CaptchaTimeoutError (line 105) | class CaptchaTimeoutError extends StagehandError { method constructor (line 106) | constructor() { class MissingLLMConfigurationError (line 111) | class MissingLLMConfigurationError extends StagehandError { method constructor (line 112) | constructor() { class HandlerNotInitializedError (line 120) | class HandlerNotInitializedError extends StagehandError { method constructor (line 121) | constructor(handlerType: string) { class StagehandInvalidArgumentError (line 126) | class StagehandInvalidArgumentError extends StagehandError { method constructor (line 127) | constructor(message: string) { class CookieValidationError (line 132) | class CookieValidationError extends StagehandError { method constructor (line 133) | constructor(message: string) { class CookieSetError (line 138) | class CookieSetError extends StagehandError { method constructor (line 139) | constructor(message: string) { class StagehandElementNotFoundError (line 144) | class StagehandElementNotFoundError extends StagehandError { method constructor (line 145) | constructor(xpaths: string[]) { class AgentScreenshotProviderError (line 150) | class AgentScreenshotProviderError extends StagehandError { method constructor (line 151) | constructor(message: string) { class StagehandMissingArgumentError (line 156) | class StagehandMissingArgumentError extends StagehandError { method constructor (line 157) | constructor(message: string) { class CreateChatCompletionResponseError (line 162) | class CreateChatCompletionResponseError extends StagehandError { method constructor (line 163) | constructor(message: string) { class StagehandEvalError (line 168) | class StagehandEvalError extends StagehandError { method constructor (line 169) | constructor(message: string) { class StagehandDomProcessError (line 174) | class StagehandDomProcessError extends StagehandError { method constructor (line 175) | constructor(message: string) { class StagehandLocatorError (line 180) | class StagehandLocatorError extends StagehandError { method constructor (line 181) | constructor(action: string, selector: string, message: string) { class StagehandClickError (line 188) | class StagehandClickError extends StagehandError { method constructor (line 189) | constructor(message: string, selector: string) { class LLMResponseError (line 196) | class LLMResponseError extends StagehandError { method constructor (line 197) | constructor(primitive: string, message: string) { class StagehandIframeError (line 202) | class StagehandIframeError extends StagehandError { method constructor (line 203) | constructor(frameUrl: string, message: string) { class ContentFrameNotFoundError (line 210) | class ContentFrameNotFoundError extends StagehandError { method constructor (line 211) | constructor(selector: string) { class XPathResolutionError (line 216) | class XPathResolutionError extends StagehandError { method constructor (line 217) | constructor(xpath: string) { class ExperimentalApiConflictError (line 222) | class ExperimentalApiConflictError extends StagehandError { method constructor (line 223) | constructor() { class ExperimentalNotConfiguredError (line 232) | class ExperimentalNotConfiguredError extends StagehandError { method constructor (line 233) | constructor(featureName: string) { class CuaModelRequiredError (line 241) | class CuaModelRequiredError extends StagehandError { method constructor (line 242) | constructor(availableModels: readonly string[]) { class ZodSchemaValidationError (line 250) | class ZodSchemaValidationError extends Error { method constructor (line 251) | constructor( class StagehandInitError (line 266) | class StagehandInitError extends StagehandError { method constructor (line 267) | constructor(message: string) { class MCPConnectionError (line 272) | class MCPConnectionError extends StagehandError { method constructor (line 276) | constructor(serverUrl: string, originalError: unknown) { class StagehandShadowRootMissingError (line 292) | class StagehandShadowRootMissingError extends StagehandError { method constructor (line 293) | constructor(detail?: string) { class StagehandShadowSegmentEmptyError (line 301) | class StagehandShadowSegmentEmptyError extends StagehandError { method constructor (line 302) | constructor() { class StagehandShadowSegmentNotFoundError (line 307) | class StagehandShadowSegmentNotFoundError extends StagehandError { method constructor (line 308) | constructor(segment: string, hint?: string) { class ElementNotVisibleError (line 316) | class ElementNotVisibleError extends StagehandError { method constructor (line 317) | constructor(selector: string) { class ResponseBodyError (line 322) | class ResponseBodyError extends StagehandError { method constructor (line 323) | constructor(message: string) { class ResponseParseError (line 328) | class ResponseParseError extends StagehandError { method constructor (line 329) | constructor(message: string) { class TimeoutError (line 334) | class TimeoutError extends StagehandError { method constructor (line 335) | constructor(operation: string, timeoutMs: number) { class ActTimeoutError (line 340) | class ActTimeoutError extends TimeoutError { method constructor (line 341) | constructor(timeoutMs: number) { class ExtractTimeoutError (line 347) | class ExtractTimeoutError extends TimeoutError { method constructor (line 348) | constructor(timeoutMs: number) { class ObserveTimeoutError (line 354) | class ObserveTimeoutError extends TimeoutError { method constructor (line 355) | constructor(timeoutMs: number) { class PageNotFoundError (line 361) | class PageNotFoundError extends StagehandError { method constructor (line 362) | constructor(identifier: string) { class ConnectionTimeoutError (line 367) | class ConnectionTimeoutError extends StagehandError { method constructor (line 368) | constructor(message: string) { class StreamingCallbacksInNonStreamingModeError (line 373) | class StreamingCallbacksInNonStreamingModeError extends StagehandError { method constructor (line 376) | constructor(invalidCallbacks: string[]) { class AgentAbortError (line 385) | class AgentAbortError extends StagehandError { method constructor (line 388) | constructor(reason?: string) { class StagehandClosedError (line 397) | class StagehandClosedError extends StagehandError { method constructor (line 398) | constructor() { class CdpConnectionClosedError (line 403) | class CdpConnectionClosedError extends StagehandError { method constructor (line 404) | constructor(reason: string) { class StagehandSetExtraHTTPHeadersError (line 409) | class StagehandSetExtraHTTPHeadersError extends StagehandError { method constructor (line 412) | constructor(failures: string[]) { class StagehandSnapshotError (line 420) | class StagehandSnapshotError extends StagehandError { method constructor (line 421) | constructor(cause?: unknown) { class UnderstudyCommandException (line 432) | class UnderstudyCommandException extends StagehandError { method constructor (line 433) | constructor(message: string, cause?: unknown) { FILE: packages/core/lib/v3/understudy/a11y/snapshot/a11yTree.ts function a11yForFrame (line 18) | async function a11yForFrame( function decorateRoles (line 102) | function decorateRoles( function buildHierarchicalTree (line 147) | async function buildHierarchicalTree( function isStructural (line 213) | function isStructural(role: string): boolean { function extractUrlFromAXNode (line 218) | function extractUrlFromAXNode( function removeRedundantStaticTextChildren (line 227) | function removeRedundantStaticTextChildren( FILE: packages/core/lib/v3/understudy/a11y/snapshot/activeElement.ts function computeActiveElementXpath (line 18) | async function computeActiveElementXpath( FILE: packages/core/lib/v3/understudy/a11y/snapshot/capture.ts function captureHybridSnapshot (line 45) | async function captureHybridSnapshot( function buildFrameContext (line 98) | function buildFrameContext(page: Page): FrameContext { function tryScopedSnapshot (line 119) | async function tryScopedSnapshot( function buildSessionIndexes (line 241) | async function buildSessionIndexes( function collectPerFrameMaps (line 268) | async function collectPerFrameMaps( function computeFramePrefixes (line 348) | async function computeFramePrefixes( function mergeFramesIntoSnapshot (line 417) | function mergeFramesIntoSnapshot( FILE: packages/core/lib/v3/understudy/a11y/snapshot/coordinateResolver.ts function resolveXpathForLocation (line 15) | async function resolveXpathForLocation( FILE: packages/core/lib/v3/understudy/a11y/snapshot/domTree.ts constant DOM_DEPTH_ATTEMPTS (line 12) | const DOM_DEPTH_ATTEMPTS = [-1, 256, 128, 64, 32, 16, 8, 4, 2, 1]; constant DESCRIBE_DEPTH_ATTEMPTS (line 13) | const DESCRIBE_DEPTH_ATTEMPTS = [-1, 64, 32, 16, 8, 4, 2, 1]; function isCborStackError (line 16) | function isCborStackError(message: string): boolean { function shouldExpandNode (line 25) | function shouldExpandNode(node: Protocol.DOM.Node): boolean { function mergeDomNodes (line 32) | function mergeDomNodes( function collectDomTraversalTargets (line 43) | function collectDomTraversalTargets( function hydrateDomTree (line 57) | async function hydrateDomTree( function getDomTreeWithFallback (line 138) | async function getDomTreeWithFallback( function domMapsForSession (line 177) | async function domMapsForSession( function buildSessionDomIndex (line 257) | async function buildSessionDomIndex( function relativizeXPath (line 318) | function relativizeXPath(baseAbs: string, nodeAbs: string): string { function findNodeByBackendId (line 332) | function findNodeByBackendId( FILE: packages/core/lib/v3/understudy/a11y/snapshot/focusSelectors.ts function parseXPathToSteps (line 20) | function parseXPathToSteps(path: string): Step[] { function buildXPathFromSteps (line 45) | function buildXPathFromSteps(steps: ReadonlyArray): string { constant IFRAME_STEP_RE (line 54) | const IFRAME_STEP_RE = /^i?frame(?:\[\d+])?$/i; function resolveFocusFrameAndTail (line 62) | async function resolveFocusFrameAndTail( function resolveCssFocusFrameAndTail (line 139) | async function resolveCssFocusFrameAndTail( function resolveObjectIdForXPath (line 203) | async function resolveObjectIdForXPath( function resolveObjectIdForCss (line 238) | async function resolveObjectIdForCss( function listChildrenOf (line 283) | function listChildrenOf( FILE: packages/core/lib/v3/understudy/a11y/snapshot/sessions.ts function ownerSession (line 12) | function ownerSession(page: Page, frameId: string): CDPSessionLike { function parentSession (line 21) | function parentSession( FILE: packages/core/lib/v3/understudy/a11y/snapshot/treeFormatUtils.ts function formatTreeLine (line 8) | function formatTreeLine(node: A11yNode, level = 0): string { function injectSubtrees (line 21) | function injectSubtrees( function indentBlock (line 59) | function indentBlock(block: string, indent: string): string { function diffCombinedTrees (line 72) | function diffCombinedTrees(prevTree: string, nextTree: string): string { function cleanText (line 108) | function cleanText(input: string): string { function normaliseSpaces (line 135) | function normaliseSpaces(s: string): string { FILE: packages/core/lib/v3/understudy/a11y/snapshot/xpathUtils.ts function buildAbsoluteXPathFromChain (line 9) | async function buildAbsoluteXPathFromChain( function absoluteXPathForBackendNode (line 38) | async function absoluteXPathForBackendNode( function prefixXPath (line 71) | function prefixXPath(parentAbs: string, child: string): string { function normalizeXPath (line 81) | function normalizeXPath(x?: string): string { function buildChildXPathSegments (line 90) | function buildChildXPathSegments(kids: Protocol.DOM.Node[]): string[] { function joinXPath (line 111) | function joinXPath(base: string, step: string): string { FILE: packages/core/lib/v3/understudy/a11yInvocation.ts function buildA11yInvocation (line 13) | function buildA11yInvocation( FILE: packages/core/lib/v3/understudy/cdp.ts type CDPSessionLike (line 23) | interface CDPSessionLike { type Inflight (line 31) | type Inflight = { type EventHandler (line 43) | type EventHandler = (params: unknown) => void; type SessionDispatchWaiter (line 44) | type SessionDispatchWaiter = { type RawMessage (line 52) | type RawMessage = class CdpConnection (line 61) | class CdpConnection implements CDPSessionLike { method onTransportClosed (line 83) | public onTransportClosed(handler: (why: string) => void): void { method offTransportClosed (line 86) | public offTransportClosed(handler: (why: string) => void): void { method emitTransportClosed (line 90) | private emitTransportClosed(why: string) { method constructor (line 100) | private constructor(ws: WebSocket) { method connect (line 117) | static async connect( method enableAutoAttach (line 135) | async enableAutoAttach(): Promise { method send (line 144) | async send(method: string, params?: object): Promise { method on (line 181) | on

(event: string, handler: (params: P) => void): void { method off (line 187) | off

(event: string, handler: (params: P) => void): void { method close (line 192) | async close(): Promise { method rejectAllInflight (line 200) | private rejectAllInflight(why: string): void { method getSession (line 211) | getSession(sessionId: string): CdpSession | undefined { method waitForSessionDispatch (line 215) | waitForSessionDispatch( method attachToTarget (line 238) | async attachToTarget(targetId: string): Promise { method getTargets (line 253) | async getTargets(): Promise { method onMessage (line 260) | private onMessage(json: string): void { method _sendViaSession (line 429) | _sendViaSession( method _onSessionEvent (line 485) | _onSessionEvent( method _offSessionEvent (line 496) | _offSessionEvent( method _dispatchToSession (line 506) | _dispatchToSession(sessionId: string, event: string, params: unknown):... class CdpSession (line 513) | class CdpSession implements CDPSessionLike { method constructor (line 514) | constructor( method send (line 519) | send(method: string, params?: object): Promise { method on (line 523) | on

(event: string, handler: (params: P) => void): void { method off (line 527) | off

(event: string, handler: (params: P) => void): void { method close (line 531) | async close(): Promise { method dispatch (line 537) | dispatch(event: string, params: unknown): void { FILE: packages/core/lib/v3/understudy/consoleMessage.ts type RemoteObject (line 4) | type RemoteObject = Protocol.Runtime.RemoteObject; type ConsoleListener (line 6) | type ConsoleListener = (message: ConsoleMessage) => void; function formatRemoteObject (line 8) | function formatRemoteObject(obj: RemoteObject | undefined): string { class ConsoleMessage (line 28) | class ConsoleMessage { method constructor (line 29) | constructor( method type (line 34) | type(): Protocol.Runtime.ConsoleAPICalledEvent["type"] { method text (line 38) | text(): string { method args (line 47) | args(): RemoteObject[] { method location (line 51) | location(): { url?: string; lineNumber?: number; columnNumber?: number... method page (line 60) | page(): Page | undefined { method timestamp (line 64) | timestamp(): number | undefined { method raw (line 68) | raw(): Protocol.Runtime.ConsoleAPICalledEvent { method toString (line 72) | toString(): string { FILE: packages/core/lib/v3/understudy/context.ts type TargetId (line 32) | type TargetId = string; type SessionId (line 33) | type SessionId = string; type TargetType (line 35) | type TargetType = "page" | "iframe" | string; function hasInjectableDOM (line 43) | function hasInjectableDOM(url: string | undefined): boolean { function isNonWebTarget (line 62) | function isNonWebTarget(info: Protocol.Target.TargetInfo): boolean { function isTopLevelPage (line 69) | function isTopLevelPage(info: Protocol.Target.TargetInfo): boolean { constant DEFAULT_FIRST_TOP_LEVEL_PAGE_TIMEOUT_MS (line 74) | const DEFAULT_FIRST_TOP_LEVEL_PAGE_TIMEOUT_MS = 5000; constant CI_FIRST_TOP_LEVEL_PAGE_TIMEOUT_MS (line 75) | const CI_FIRST_TOP_LEVEL_PAGE_TIMEOUT_MS = 30000; constant FIRST_TOP_LEVEL_PAGE_TIMEOUT_ENV (line 76) | const FIRST_TOP_LEVEL_PAGE_TIMEOUT_ENV = constant WAIT_FOR_FIRST_TOP_LEVEL_PAGE_OPERATION (line 78) | const WAIT_FOR_FIRST_TOP_LEVEL_PAGE_OPERATION = function getFirstTopLevelPageTimeoutMs (line 81) | function getFirstTopLevelPageTimeoutMs(): number { class V3Context (line 101) | class V3Context { method constructor (line 102) | private constructor( method installTargetSessionListeners (line 127) | private installTargetSessionListeners(session: CDPSessionLike): void { method create (line 156) | static async create( method hasTopLevelPage (line 207) | private hasTopLevelPage(): boolean { method ensureFirstTopLevelPage (line 216) | private async ensureFirstTopLevelPage(timeoutMs: number): Promise { method waitForFirstTopLevelPage (line 241) | private async waitForFirstTopLevelPage(timeoutMs: number): Promise { method _pushActive (line 300) | private _pushActive(tid: TargetId): void { method _removeFromOrder (line 308) | private _removeFromOrder(tid: TargetId): void { method activePage (line 314) | public activePage(): Page | undefined { method setActivePage (line 337) | public setActivePage(page: Page): void { method addInitScript (line 361) | public async addInitScript( method setExtraHTTPHeaders (line 372) | public async setExtraHTTPHeaders( method pages (line 420) | pages(): Page[] { method applyInitScriptsToPage (line 431) | private async applyInitScriptsToPage( method resolvePageByMainFrameId (line 450) | resolvePageByMainFrameId(frameId: string): Page | undefined { method getFullFrameTreeByMainFrameId (line 458) | async getFullFrameTreeByMainFrameId( method newPage (line 470) | public async newPage(url = "about:blank"): Promise { method close (line 504) | async close(): Promise { method bootstrap (line 522) | private async bootstrap(): Promise { method onAttachedToTarget (line 586) | private async onAttachedToTarget( method onDetachedFromTarget (line 892) | private onDetachedFromTarget( method cleanupByTarget (line 920) | private cleanupByTarget(targetId: TargetId): void { method installFrameEventBridges (line 948) | private installFrameEventBridges(sessionId: SessionId, owner: Page): v... method wireSessionToOwnerPage (line 1020) | private wireSessionToOwnerPage(sessionId: SessionId, owner: Page): void { method findTargetIdByPage (line 1027) | private findTargetIdByPage(page: Page): TargetId | undefined { method _notePopupSignal (line 1034) | private _notePopupSignal(): void { method awaitActivePage (line 1042) | async awaitActivePage(timeoutMs?: number): Promise { method cookies (line 1083) | async cookies(urls?: string | string[]): Promise { method addCookies (line 1112) | async addCookies(cookies: CookieParam[]): Promise { method clearCookies (line 1141) | async clearCookies(options?: ClearCookieOptions): Promise { FILE: packages/core/lib/v3/understudy/cookies.ts function filterCookies (line 19) | function filterCookies(cookies: Cookie[], urls: string[]): Cookie[] { function normalizeCookieParams (line 64) | function normalizeCookieParams(cookies: CookieParam[]): CookieParam[] { function toCdpCookieParam (line 133) | function toCdpCookieParam( function cookieMatchesFilter (line 152) | function cookieMatchesFilter( FILE: packages/core/lib/v3/understudy/deepLocator.ts type Axis (line 8) | type Axis = "child" | "desc"; type Step (line 9) | type Step = { axis: Axis; raw: string; name: string }; type ResolvedLocatorTarget (line 11) | type ResolvedLocatorTarget = { function parseXPath (line 17) | function parseXPath(path: string): Step[] { function buildXPathFromSteps (line 42) | function buildXPathFromSteps(steps: ReadonlyArray): string { function deepLocatorThroughIframes (line 52) | async function deepLocatorThroughIframes( function resolveLocatorTarget (line 65) | async function resolveLocatorTarget( function resolveLocatorWithHops (line 94) | async function resolveLocatorWithHops( class DeepLocatorDelegate (line 110) | class DeepLocatorDelegate { method constructor (line 111) | constructor( method real (line 118) | private async real(): Promise { method click (line 128) | async click(options?: { method count (line 134) | async count() { method hover (line 137) | async hover() { method fill (line 140) | async fill(value: string) { method type (line 143) | async type(text: string, options?: { delay?: number }) { method selectOption (line 146) | async selectOption(values: string | string[]) { method scrollTo (line 149) | async scrollTo(percent: number | string) { method isVisible (line 152) | async isVisible() { method isChecked (line 155) | async isChecked() { method inputValue (line 158) | async inputValue() { method textContent (line 161) | async textContent() { method innerHtml (line 164) | async innerHtml() { method innerText (line 167) | async innerText() { method centroid (line 170) | async centroid() { method backendNodeId (line 173) | async backendNodeId() { method highlight (line 176) | async highlight(options?: { method sendClickEvent (line 183) | async sendClickEvent(options?: { method setInputFiles (line 191) | async setInputFiles( method first (line 208) | first() { method nth (line 211) | nth(index: number): DeepLocatorDelegate { function deepLocatorFromPage (line 232) | function deepLocatorFromPage( function resolveDeepXPathTarget (line 240) | async function resolveDeepXPathTarget( FILE: packages/core/lib/v3/understudy/executionContextRegistry.ts type FrameId (line 4) | type FrameId = Protocol.Page.FrameId; type ExecId (line 5) | type ExecId = Protocol.Runtime.ExecutionContextId; class ExecutionContextRegistry (line 7) | class ExecutionContextRegistry { method attachSession (line 15) | attachSession(session: CDPSessionLike): void { method getMainWorld (line 48) | getMainWorld(session: CDPSessionLike, frameId: FrameId): ExecId | null { method waitForMainWorld (line 52) | async waitForMainWorld( method register (line 94) | private register( FILE: packages/core/lib/v3/understudy/fileUploadUtils.ts constant DEFAULT_MIME_TYPE (line 11) | const DEFAULT_MIME_TYPE = "application/octet-stream"; function normalizeInputFiles (line 19) | async function normalizeInputFiles( function statFile (line 78) | async function statFile(absolutePath: string): Promise { function toBuffer (line 92) | function toBuffer( FILE: packages/core/lib/v3/understudy/frame.ts type FrameManager (line 8) | interface FrameManager { class Frame (line 22) | class Frame implements FrameManager { method constructor (line 26) | constructor( method isBrowserRemote (line 36) | public isBrowserRemote(): boolean { method getNodeAtLocation (line 41) | async getNodeAtLocation(x: number, y: number): Promise( method screenshot (line 187) | async screenshot(options?: { method childFrames (line 238) | async childFrames(): Promise { method waitForLoadState (line 263) | async waitForLoadState( method locator (line 308) | locator( method getMainWorldExecutionContextId (line 316) | private async getMainWorldExecutionContextId(): Promise { FILE: packages/core/lib/v3/understudy/frameLocator.ts class FrameLocator (line 15) | class FrameLocator { method constructor (line 21) | constructor( method frameLocator (line 34) | frameLocator(selector: string): FrameLocator { method resolveFrame (line 39) | async resolveFrame(): Promise { method locator (line 88) | locator(selector: string): LocatorDelegate { class LocatorDelegate (line 94) | class LocatorDelegate { method constructor (line 95) | constructor( method real (line 101) | private async real(): Promise { method click (line 109) | async click(options?: { method hover (line 115) | async hover() { method fill (line 118) | async fill(value: string) { method type (line 121) | async type(text: string, options?: { delay?: number }) { method selectOption (line 124) | async selectOption(values: string | string[]) { method scrollTo (line 127) | async scrollTo(percent: number | string) { method isVisible (line 130) | async isVisible() { method isChecked (line 133) | async isChecked() { method inputValue (line 136) | async inputValue() { method textContent (line 139) | async textContent() { method innerHtml (line 142) | async innerHtml() { method innerText (line 145) | async innerText() { method count (line 148) | async count() { method first (line 151) | first(): LocatorDelegate { method nth (line 154) | nth(index: number): LocatorDelegate { function frameLocatorFromFrame (line 170) | function frameLocatorFromFrame( function listDirectChildFrameIdsFromRegistry (line 178) | async function listDirectChildFrameIdsFromRegistry( function findFrameNode (line 197) | function findFrameNode( function ensureChildFrameReady (line 214) | async function ensureChildFrameReady( FILE: packages/core/lib/v3/understudy/frameRegistry.ts type FrameId (line 22) | type FrameId = string; type SessionId (line 23) | type SessionId = string; type FrameInfo (line 25) | type FrameInfo = { function shellFrame (line 44) | function shellFrame(id: FrameId): Protocol.Page.Frame { class FrameRegistry (line 58) | class FrameRegistry { method constructor (line 71) | constructor(ownerTargetId: string, mainFrameId: FrameId) { method onFrameAttached (line 85) | onFrameAttached( method onFrameNavigated (line 118) | onFrameNavigated(frame: Protocol.Page.Frame, sessionId: SessionId): vo... method onNavigatedWithinDocument (line 136) | onNavigatedWithinDocument( method onFrameDetached (line 152) | onFrameDetached( method adoptChildSession (line 202) | adoptChildSession( method seedFromFrameTree (line 216) | seedFromFrameTree( method setOwnerBackendNodeId (line 240) | setOwnerBackendNodeId(childFrameId: FrameId, backendNodeId: number): v... method mainFrameId (line 247) | mainFrameId(): FrameId { method getOwnerSessionId (line 254) | getOwnerSessionId(frameId: FrameId): SessionId | undefined { method getOwnerBackendNodeId (line 262) | getOwnerBackendNodeId(frameId: FrameId): number | undefined { method getParent (line 269) | getParent(frameId: FrameId): FrameId | null { method listAllFrames (line 276) | listAllFrames(): FrameId[] { method asProtocolFrameTree (line 290) | asProtocolFrameTree(rootId: FrameId): Protocol.Page.FrameTree { method sessionsForFrame (line 310) | sessionsForFrame(frameId: FrameId): SessionId[] { method framesForSession (line 318) | framesForSession(sessionId: SessionId): FrameId[] { method ensureNode (line 324) | private ensureNode(fid: FrameId): void { method renameNodeId (line 335) | private renameNodeId(oldId: FrameId, newId: FrameId): void { method setOwnerSessionIdInternal (line 372) | private setOwnerSessionIdInternal( FILE: packages/core/lib/v3/understudy/initScripts.ts constant DEFAULT_CALLER (line 5) | const DEFAULT_CALLER = "context.addInitScript"; function appendSourceURL (line 7) | function appendSourceURL(source: string, filePath: string): string { function normalizeInitScriptSource (line 12) | async function normalizeInitScriptSource( FILE: packages/core/lib/v3/understudy/lifecycleWatcher.ts class LifecycleWatcher (line 26) | class LifecycleWatcher { method constructor (line 52) | constructor(params: { method setExpectedLoaderId (line 77) | public setExpectedLoaderId(loaderId: string | undefined): void { method wait (line 86) | public async wait(): Promise { method dispose (line 125) | public dispose(): void { method installSessionListeners (line 147) | private installSessionListeners(): void { method timeRemaining (line 202) | private timeRemaining(deadline: number): number { method awaitWithAbort (line 211) | private async awaitWithAbort(operation: Promise): Promise { method triggerAbort (line 221) | private triggerAbort(error: Error): void { method waitForNetworkIdle (line 229) | private waitForNetworkIdle(deadline: number): Promise { method shouldRestartAfterFollowup (line 247) | private shouldRestartAfterFollowup(error: unknown): boolean { method adoptNewMainLoader (line 255) | private adoptNewMainLoader(loaderId: string): void { method buildIdleFilter (line 271) | private buildIdleFilter(): (info: NetworkRequestInfo) => boolean { FILE: packages/core/lib/v3/understudy/locator.ts constant MAX_REMOTE_UPLOAD_BYTES (line 26) | const MAX_REMOTE_UPLOAD_BYTES = 50 * 1024 * 1024; class Locator (line 47) | class Locator { method constructor (line 55) | constructor( method getFrame (line 68) | public getFrame(): Frame { method setInputFiles (line 81) | public async setInputFiles(files: SetInputFilesArgument): Promise { method assignFilesViaPayloadInjection (line 169) | private async assignFilesViaPayloadInjection( method backendNodeId (line 217) | async backendNodeId(): Promise { method count (line 235) | public async count(): Promise { method centroid (line 246) | public async centroid(): Promise<{ x: number; y: number }> { method highlight (line 272) | public async highlight(options?: { method hover (line 349) | async hover(): Promise { method click (line 385) | async click(options?: { method sendClickEvent (line 456) | async sendClickEvent(options?: { method scrollTo (line 497) | async scrollTo(percent: number | string): Promise { method fill (line 523) | async fill(value: string): Promise { method type (line 652) | async type(text: string, options?: { delay?: number }): Promise { method selectOption (line 696) | async selectOption(values: string | string[]): Promise { method isVisible (line 721) | async isVisible(): Promise { method isChecked (line 743) | async isChecked(): Promise { method inputValue (line 764) | async inputValue(): Promise { method textContent (line 785) | async textContent(): Promise { method innerHtml (line 806) | async innerHtml(): Promise { method innerText (line 827) | async innerText(): Promise { method first (line 848) | first(): Locator { method nth (line 853) | nth(index: number): Locator { method resolveNode (line 875) | public async resolveNode(): Promise<{ method resolveNodesForMask (line 900) | public async resolveNodesForMask(): Promise< method centerFromBoxContent (line 930) | private centerFromBoxContent(content: number[]): { cx: number; cy: num... FILE: packages/core/lib/v3/understudy/locatorInvocation.ts function buildLocatorInvocation (line 13) | function buildLocatorInvocation( FILE: packages/core/lib/v3/understudy/navigationResponseTracker.ts class NavigationResponseTracker (line 24) | class NavigationResponseTracker { method constructor (line 57) | constructor(params: { method dispose (line 78) | public dispose(): void { method setExpectedLoaderId (line 92) | public setExpectedLoaderId(loaderId: string | undefined): void { method expectNavigationWithoutKnownLoader (line 107) | public expectNavigationWithoutKnownLoader(): void { method navigationCompleted (line 115) | public async navigationCompleted(): Promise { method response (line 125) | public async response(): Promise { method installListeners (line 130) | private installListeners(): void { method addListener (line 148) | private addListener(event: string, handler: (event: unknown) => void):... method onResponseReceived (line 154) | private onResponseReceived( method onResponseReceivedExtraInfo (line 187) | private onResponseReceivedExtraInfo( method onLoadingFinished (line 199) | private onLoadingFinished( method onLoadingFailed (line 208) | private onLoadingFailed(event: Protocol.Network.LoadingFailedEvent): v... method selectResponse (line 223) | private selectResponse(event: Protocol.Network.ResponseReceivedEvent):... FILE: packages/core/lib/v3/understudy/networkManager.ts class NetworkManager (line 25) | class NetworkManager { method trackSession (line 44) | public trackSession(session: CDPSessionLike): void { method untrackSession (line 161) | public untrackSession(rawSessionId: string | undefined): void { method addObserver (line 183) | public addObserver(observer: NetworkObserver): () => void { method waitForIdle (line 194) | public waitForIdle(options: WaitForIdleOptions): WaitForIdleHandle { method dispose (line 303) | public dispose(): void { method emitStart (line 314) | private emitStart(info: NetworkRequestInfo): void { method emitFinish (line 321) | private emitFinish(info: NetworkRequestInfo): void { method emitFailure (line 328) | private emitFailure(info: NetworkRequestInfo): void { method sessionKey (line 335) | private sessionKey(session: CDPSessionLike): string { method requestKey (line 340) | private requestKey(sessionId: string, requestId: string): string { FILE: packages/core/lib/v3/understudy/page.ts constant LIFECYCLE_NAME (line 74) | const LIFECYCLE_NAME: Record = { class Page (line 80) | class Page { method constructor (line 118) | private constructor( method installInitScriptOnSession (line 149) | private async installInitScriptOnSession( method applyInitScriptsToSession (line 159) | private async applyInitScriptsToSession( method registerInitScript (line 168) | public async registerInitScript(source: string): Promise { method seedInitScript (line 182) | public seedInitScript(source: string): void { method ensureCursorScript (line 189) | private async ensureCursorScript(): Promise { method enableCursorOverlay (line 266) | public async enableCursorOverlay(): Promise { method updateCursor (line 272) | private async updateCursor(x: number, y: number): Promise { method addInitScript (line 283) | public async addInitScript( method create (line 299) | static async create( method onFrameAttached (line 356) | public onFrameAttached( method onFrameDetached (line 370) | public onFrameDetached( method onFrameNavigated (line 382) | public onFrameNavigated( method onNavigatedWithinDocument (line 418) | public onNavigatedWithinDocument( method adoptOopifSession (line 441) | public adoptOopifSession( method detachOopifSession (line 516) | public detachOopifSession(sessionId: string): void { method getSessionForFrame (line 530) | public getSessionForFrame(frameId: string): CDPSessionLike { method frameForId (line 537) | public frameForId(frameId: string): Frame { method getSessionById (line 548) | public getSessionById(id: string): CDPSessionLike | undefined { method registerSessionForNetwork (line 552) | public registerSessionForNetwork(session: CDPSessionLike): void { method unregisterSessionForNetwork (line 556) | public unregisterSessionForNetwork(sessionId: string | undefined): void { method on (line 560) | public on(event: "console", listener: ConsoleListener): Page { method once (line 575) | public once(event: "console", listener: ConsoleListener): Page { method off (line 588) | public off(event: "console", listener: ConsoleListener): Page { method targetId (line 604) | public targetId(): string { method sendCDP (line 627) | public sendCDP(method: string, params?: object): Promise<... method seedCurrentUrl (line 632) | public seedCurrentUrl(url: string | undefined | null): void { method mainFrameId (line 643) | public mainFrameId(): string { method mainFrame (line 647) | public mainFrame(): Frame { method close (line 655) | public async close(): Promise { method getFullFrameTree (line 679) | public getFullFrameTree(): Protocol.Page.FrameTree { method asProtocolFrameTree (line 683) | public asProtocolFrameTree(rootMainFrameId: string): Protocol.Page.Fra... method applyExtraHTTPHeadersToSession (line 687) | private async applyExtraHTTPHeadersToSession( method ensureOrdinal (line 697) | private ensureOrdinal(frameId: string): number { method getOrdinal (line 706) | public getOrdinal(frameId: string): number { method listAllFrameIds (line 710) | public listAllFrameIds(): string[] { method ensureConsoleTaps (line 714) | private ensureConsoleTaps(): void { method installConsoleTap (line 723) | private installConsoleTap(session: CDPSessionLike): void { method sessionKey (line 741) | private sessionKey(session: CDPSessionLike): string { method resolveSessionByKey (line 745) | private resolveSessionByKey(key: string): CDPSessionLike | undefined { method teardownConsoleTap (line 755) | private teardownConsoleTap(key: string): void { method removeAllConsoleTaps (line 764) | private removeAllConsoleTaps(): void { method emitConsole (line 770) | private emitConsole(evt: Protocol.Runtime.ConsoleAPICalledEvent): void { method goto (line 800) | async goto( method reload (line 863) | async reload(options?: { method goBack (line 910) | async goBack(options?: { method goForward (line 965) | async goForward(options?: { method url (line 1017) | url(): string { method beginNavigationCommand (line 1021) | private beginNavigationCommand(): number { method isCurrentNavigationCommand (line 1027) | public isCurrentNavigationCommand(id: number): boolean { method title (line 1036) | async title(): Promise { method screenshot (line 1097) | async screenshot(options?: ScreenshotOptions): Promise { method setExtraHTTPHeaders (line 1189) | async setExtraHTTPHeaders(headers: Record): Promise { method deepLocator (line 1242) | deepLocator(selector: string) { method frameLocator (line 1250) | frameLocator(selector: string): FrameLocator { method frames (line 1258) | frames(): Frame[] { method waitForLoadState (line 1272) | async waitForLoadState(state: LoadState, timeoutMs?: number): Promise<... method waitForTimeout (line 1281) | async waitForTimeout(ms: number): Promise { method waitForSelector (line 1302) | async waitForSelector( method evaluate (line 1337) | async evaluate( method setViewportSize (line 1391) | async setViewportSize( method click (line 1424) | async click( method hover (line 1516) | async hover( method scroll (line 1567) | async scroll( method dragAndDrop (line 1612) | async dragAndDrop( method type (line 1717) | async type( method keyPress (line 1844) | async keyPress(key: string, options?: { delay?: number }): Promise { method keyDown (line 1918) | private async keyDown(key: string): Promise { method keyUp (line 1999) | private async keyUp(key: string): Promise { method normalizeModifierKey (line 2049) | private normalizeModifierKey(key: string): string { method getNamedKeys (line 2120) | private getNamedKeys(): Record< method describePrintableKey (line 2162) | private describePrintableKey(ch: string): { method isMacOS (line 2199) | private isMacOS(): boolean { method macCommandsFor (line 2211) | private macCommandsFor(code: string): string[] { method mainWorldExecutionContextId (line 2238) | private async mainWorldExecutionContextId(): Promise { method isMainLoadStateReady (line 2246) | private async isMainLoadStateReady( method waitForMainLoadState (line 2276) | async waitForMainLoadState( FILE: packages/core/lib/v3/understudy/piercer.ts function installV3PiercerIntoSession (line 7) | async function installV3PiercerIntoSession( function tapPiercerConsole (line 51) | function tapPiercerConsole( FILE: packages/core/lib/v3/understudy/response.ts type ServerAddr (line 26) | type ServerAddr = { ipAddress: string; port: number }; function isSerializableResponse (line 28) | function isSerializableResponse( type Deferred (line 46) | type Deferred = { function createDeferred (line 52) | function createDeferred(): Deferred { function normaliseHeaderName (line 63) | function normaliseHeaderName(name: string): string { function splitHeaderValues (line 68) | function splitHeaderValues(value: string): string[] { function parseHeadersText (line 79) | function parseHeadersText( class Response (line 101) | class Response { method constructor (line 129) | constructor(params: { method url (line 169) | url(): string { method status (line 174) | status(): number { method statusText (line 179) | statusText(): string { method ok (line 184) | ok(): boolean { method frame (line 190) | frame(): Frame | null { method fromServiceWorker (line 200) | fromServiceWorker(): boolean { method securityDetails (line 208) | async securityDetails(): Promise { method headers (line 221) | headers(): Record { method allHeaders (line 230) | async allHeaders(): Promise> { method headerValue (line 242) | async headerValue(name: string): Promise { method headerValues (line 249) | async headerValues(name: string): Promise { method headersArray (line 265) | async headersArray(): Promise> { method body (line 291) | async body(): Promise { method text (line 308) | async text(): Promise { method json (line 314) | async json(): Promise { method finished (line 328) | async finished(): Promise { method applyExtraInfo (line 337) | public applyExtraInfo( method fromSerializable (line 360) | public static fromSerializable( method markFinished (line 390) | public markFinished(error: Error | null): void { FILE: packages/core/lib/v3/understudy/screenshotUtils.ts type ScreenshotCleanup (line 13) | type ScreenshotCleanup = () => Promise | void; function collectFramesForScreenshot (line 15) | function collectFramesForScreenshot(page: Page): Frame[] { function normalizeScreenshotClip (line 25) | function normalizeScreenshotClip(clip: ScreenshotClip): ScreenshotClip { function computeScreenshotScale (line 48) | async function computeScreenshotScale( function setTransparentBackground (line 68) | async function setTransparentBackground( function applyStyleToFrames (line 84) | async function applyStyleToFrames( function disableAnimations (line 140) | async function disableAnimations( function hideCaret (line 190) | async function hideCaret(frames: Frame[]): Promise { function applyMaskOverlays (line 205) | async function applyMaskOverlays( function resolveMaskRects (line 338) | async function resolveMaskRects( function resolveMaskRectForObject (line 379) | async function resolveMaskRectForObject( function runScreenshotCleanups (line 427) | async function runScreenshotCleanups( FILE: packages/core/lib/v3/understudy/selectorResolver.ts type SelectorQuery (line 11) | type SelectorQuery = type ResolvedNode (line 16) | interface ResolvedNode { type ResolveManyOptions (line 21) | interface ResolveManyOptions { class FrameSelectorResolver (line 25) | class FrameSelectorResolver { method constructor (line 26) | constructor(private readonly frame: Frame) {} method parseSelector (line 28) | public static parseSelector(raw: string): SelectorQuery { method resolveFirst (line 66) | public async resolveFirst( method resolveAll (line 72) | public async resolveAll( method count (line 89) | public async count(query: SelectorQuery): Promise { method resolveAtIndex (line 102) | public async resolveAtIndex( method buildLocatorInvocation (line 111) | private buildLocatorInvocation( method resolveCss (line 119) | private async resolveCss( method resolveText (line 185) | private async resolveText( method resolveXPath (line 212) | private async resolveXPath( method countCss (line 239) | private async countCss(selector: string): Promise { method countText (line 268) | private async countText(value: string): Promise { method countXPath (line 328) | private async countXPath(value: string): Promise { method resolveFromObjectId (line 367) | private async resolveFromObjectId( method evaluateCount (line 385) | private async evaluateCount( method evaluateElement (line 415) | private async evaluateElement( FILE: packages/core/lib/v3/v3.ts constant DEFAULT_MODEL_NAME (line 94) | const DEFAULT_MODEL_NAME = "openai/gpt-4.1-mini"; constant DEFAULT_VIEWPORT (line 95) | const DEFAULT_VIEWPORT = { width: 1288, height: 711 }; constant DEFAULT_AGENT_TOOL_TIMEOUT_MS (line 96) | const DEFAULT_AGENT_TOOL_TIMEOUT_MS = 45000; type ResolvedModelConfiguration (line 98) | type ResolvedModelConfiguration = { function resolveModelConfiguration (line 103) | function resolveModelConfiguration( class V3 (line 145) | class V3 { method browserbaseSessionID (line 169) | public get browserbaseSessionID(): string | undefined { method browserbaseSessionURL (line 172) | public get browserbaseSessionURL(): string | undefined { method browserbaseDebugURL (line 175) | public get browserbaseDebugURL(): string | undefined { method isBrowserbase (line 181) | public get isBrowserbase(): boolean { method isCaptchaAutoSolveEnabled (line 189) | public get isCaptchaAutoSolveEnabled(): boolean { method isAdvancedStealth (line 200) | public get isAdvancedStealth(): boolean { method configuredViewport (line 211) | public get configuredViewport(): { width: number; height: number } { method constructor (line 288) | constructor(opts: V3Options) { method metrics (line 419) | public get metrics(): Promise { method resolveLlmClient (line 436) | private resolveLlmClient(model?: ModelConfiguration): LLMClient { method beginAgentReplayRecording (line 495) | private beginAgentReplayRecording(): void { method endAgentReplayRecording (line 499) | private endAgentReplayRecording(): AgentReplayStep[] { method discardAgentReplayRecording (line 503) | private discardAgentReplayRecording(): void { method isAgentReplayRecording (line 507) | private isAgentReplayRecording(): boolean { method isAgentReplayActive (line 511) | public isAgentReplayActive(): boolean { method recordAgentReplayStep (line 515) | public recordAgentReplayStep(step: AgentReplayStep): void { method history (line 523) | public get history(): Promise> { method addToHistory (line 527) | public addToHistory( method updateMetrics (line 540) | public updateMetrics( method updateTotalMetrics (line 590) | private updateTotalMetrics( method _immediateShutdown (line 604) | private async _immediateShutdown(reason: string): Promise { method startShutdownSupervisor (line 628) | private startShutdownSupervisor( method stopShutdownSupervisor (line 656) | private stopShutdownSupervisor(): void { method init (line 670) | async init(): Promise { method _applyPostConnectLocalOptions (line 1051) | private async _applyPostConnectLocalOptions( method _ensureBrowserbaseDownloadsEnabled (line 1071) | private async _ensureBrowserbaseDownloadsEnabled(): Promise { method resetBrowserbaseSessionMetadata (line 1085) | private resetBrowserbaseSessionMetadata(): void { method act (line 1104) | async act(input: string | Action, options?: ActOptions): Promise { method browserbaseApiKey (line 1514) | public get browserbaseApiKey(): string | undefined { method requireBrowserbaseCreds (line 1519) | private requireBrowserbaseCreds(): { method logger (line 1553) | public get logger(): (logLine: LogLine) => void { method resolveTopFrameId (line 1567) | private async resolveTopFrameId( method isPlaywrightPage (line 1599) | private isPlaywrightPage(p: unknown): p is PlaywrightPage { method isPatchrightPage (line 1607) | private isPatchrightPage(p: unknown): p is PatchrightPage { method isPuppeteerPage (line 1615) | private isPuppeteerPage(p: unknown): p is PuppeteerPage { method resolvePage (line 1624) | private async resolvePage(page?: AnyPage): Promise { method normalizeToV3Page (line 1635) | private async normalizeToV3Page(input: AnyPage): Promise { method _logBrowserbaseSessionStatus (line 1669) | private async _logBrowserbaseSessionStatus(): Promise { method prepareAgentExecution (line 1700) | private async prepareAgentExecution( method agent (line 1814) | agent(options?: AgentConfig): { function isObserveResult (line 2155) | function isObserveResult(v: unknown): v is Action { FILE: packages/core/lib/v3/zodCompat.ts type StagehandZodSchema (line 9) | type StagehandZodSchema = Zod4TypeAny | z3.ZodTypeAny; type StagehandZodObject (line 11) | type StagehandZodObject = type InferStagehandSchema (line 15) | type InferStagehandSchema = type JsonSchemaDocument (line 31) | type JsonSchemaDocument = Record; function toJsonSchema (line 33) | function toJsonSchema(schema: StagehandZodSchema): JsonSchemaDocument { FILE: packages/core/lib/v3Evaluator.ts class V3Evaluator (line 28) | class V3Evaluator { method constructor (line 34) | constructor( method getClient (line 49) | private getClient(): LLMClient { method ask (line 55) | async ask(options: EvaluateOptions): Promise { method batchAsk (line 144) | async batchAsk(options: BatchAskOptions): Promise { method _evaluateWithMultipleScreenshots (line 224) | private async _evaluateWithMultipleScreenshots(options: { FILE: packages/core/scripts/gen-version.ts type PackageJson (line 4) | type PackageJson = { version: string }; FILE: packages/core/scripts/normalize-v8-coverage.ts type CoverageRange (line 19) | type CoverageRange = { type CoverageEntry (line 25) | type CoverageEntry = { type CoverageFile (line 32) | type CoverageFile = { type SourceMapPayload (line 49) | type SourceMapPayload = RawSourceMap | RawIndexMap; type NormalizerOptions (line 113) | type NormalizerOptions = { type SourceContext (line 118) | type SourceContext = { type MappedPosition (line 124) | type MappedPosition = { type OffsetMapping (line 130) | type OffsetMapping = { FILE: packages/core/tests/cache-variables.test.ts function createFakeStorage (line 10) | function createFakeStorage(entry: T): CacheStorage { FILE: packages/core/tests/integration/agent-cache-self-heal.spec.ts function locateAgentCacheFile (line 77) | async function locateAgentCacheFile(cacheDir: string): Promise { function readCacheEntry (line 90) | async function readCacheEntry(cachePath: string): Promise { function captureFlowEventBaseline (line 39) | async function captureFlowEventBaseline(v3: V3): Promise> { function listRecordedFlowEventsSince (line 44) | async function listRecordedFlowEventsSince( function eventsOfType (line 52) | function eventsOfType(events: FlowEvent[], eventType: string): FlowEvent... function requireSingleEvent (line 56) | function requireSingleEvent(events: FlowEvent[], eventType: string): Flo... function expectRootEvent (line 62) | function expectRootEvent(event: FlowEvent): void { function expectDirectParent (line 66) | function expectDirectParent(child: FlowEvent, parent: FlowEvent): void { function assertAllParentIdsResolve (line 73) | function assertAllParentIdsResolve(events: FlowEvent[]): void { function assertSessionIds (line 86) | function assertSessionIds(events: FlowEvent[], sessionId: string): void { function directChildrenOfType (line 92) | function directChildrenOfType( function assertCompletedEnvelope (line 106) | function assertCompletedEnvelope( function assertNoFloatingLlmEvents (line 117) | function assertNoFloatingLlmEvents(events: FlowEvent[]): void { function assertNoFloatingCdpEvents (line 142) | function assertNoFloatingCdpEvents(events: FlowEvent[]): void { function assertDirectRootCdpEvents (line 168) | function assertDirectRootCdpEvents( function sortCountRecord (line 184) | function sortCountRecord( function assertNonCdpEventCounts (line 192) | function assertNonCdpEventCounts( FILE: packages/core/tests/integration/iframe-ctx-addInitScript-race.spec.ts constant DEFAULT_INIT_SCRIPT_DELAY_MS (line 7) | const DEFAULT_INIT_SCRIPT_DELAY_MS = 250; constant INIT_SCRIPT_DELAY_MS (line 8) | const INIT_SCRIPT_DELAY_MS = (() => { constant POPUP_TIMEOUT_MS (line 17) | const POPUP_TIMEOUT_MS = 20_000; constant RACE_INIT_SCRIPT_SENTINEL (line 18) | const RACE_INIT_SCRIPT_SENTINEL = "__stagehand_init_script_race_sentinel... constant INIT_SCRIPT_MARKER_KEY (line 19) | const INIT_SCRIPT_MARKER_KEY = "__stagehand_init_script_loaded__"; constant POPUP_URL (line 20) | const POPUP_URL = "https://example.com/"; constant POPUP_IFRAME_URL (line 21) | const POPUP_IFRAME_URL = "https://example.org/"; constant INIT_SCRIPT_SOURCE (line 23) | const INIT_SCRIPT_SOURCE = ` type PatchedConn (line 30) | type PatchedConn = { type SessionCommandRecord (line 38) | type SessionCommandRecord = { type PopupTriggerCase (line 45) | type PopupTriggerCase = { function closeAllPages (line 50) | async function closeAllPages(ctx: V3Context): Promise { function waitForPopupPage (line 55) | async function waitForPopupPage( function waitForChildFrame (line 79) | async function waitForChildFrame( function prepareTargetBlankPopupOpener (line 103) | async function prepareTargetBlankPopupOpener(opener: Page): Promise { function prepareWindowOpenPopupOpener (line 115) | async function prepareWindowOpenPopupOpener(opener: Page): Promise { constant POPUP_TRIGGER_CASES (line 128) | const POPUP_TRIGGER_CASES: PopupTriggerCase[] = [ FILE: packages/core/tests/integration/iframe-ctx-addInitScript.spec.ts constant MIN_TIMEOUT_MS (line 10) | const MIN_TIMEOUT_MS = 3_000; constant MAX_TIMEOUT_MS (line 11) | const MAX_TIMEOUT_MS = 120_000; constant CHILD_FRAME_TIMEOUT_MS (line 22) | const CHILD_FRAME_TIMEOUT_MS = parseBoundedTimeoutMs( constant POPUP_TIMEOUT_MS (line 26) | const POPUP_TIMEOUT_MS = parseBoundedTimeoutMs( constant POPUP_URL_TIMEOUT_MS (line 30) | const POPUP_URL_TIMEOUT_MS = parseBoundedTimeoutMs( constant DEBUG_INTERVAL_MS (line 34) | const DEBUG_INTERVAL_MS = 5_000; constant TEST_VIEWPORT (line 36) | const TEST_VIEWPORT = { width: 1288, height: 711 }; type FrameTreeNode (line 38) | type FrameTreeNode = { type ChildFrame (line 42) | type ChildFrame = ReturnType[number]; type ChildFrameProbe (line 43) | type ChildFrameProbe = { function debugLog (line 70) | function debugLog( function collectFrameSnapshot (line 90) | async function collectFrameSnapshot( function logPageDiagnostics (line 125) | async function logPageDiagnostics( function closeAllPages (line 178) | async function closeAllPages(ctx: V3Context): Promise { function waitForChildFrame (line 187) | async function waitForChildFrame( function waitForPageUrl (line 290) | async function waitForPageUrl( function preparePopupForFrameAttach (line 325) | async function preparePopupForFrameAttach( function ensurePopupViewport (line 357) | async function ensurePopupViewport(page: Page): Promise { function waitForPopupPage (line 362) | async function waitForPopupPage( FILE: packages/core/tests/integration/keep-alive.child.ts function main (line 3) | async function main(): Promise { FILE: packages/core/tests/integration/keep-alive.spec.ts type EnvKind (line 9) | type EnvKind = "LOCAL" | "BROWSERBASE"; type ScenarioKind (line 10) | type ScenarioKind = "unhandled" | "close" | "sigterm" | "sigint"; type KeepAliveCase (line 12) | type KeepAliveCase = { type ScenarioConfig (line 22) | type ScenarioConfig = { type ChildInfo (line 33) | type ChildInfo = { type ChildLogs (line 38) | type ChildLogs = { type CheckResult (line 43) | type CheckResult = { type Outcome (line 48) | type Outcome = { constant DEBUG (line 68) | const DEBUG = process.env.KEEP_ALIVE_DEBUG === "1"; constant VIEW_MS (line 69) | const VIEW_MS = Number(process.env.KEEP_ALIVE_VIEW_MS ?? "0"); constant LOCAL_TIMEOUT_MS (line 70) | const LOCAL_TIMEOUT_MS = Number( constant BB_TIMEOUT_MS (line 73) | const BB_TIMEOUT_MS = Number(process.env.KEEP_ALIVE_BB_TIMEOUT_MS ?? "30... constant STAY_OPEN_MS (line 74) | const STAY_OPEN_MS = Number(process.env.KEEP_ALIVE_STAY_OPEN_MS ?? "6000"); constant ACTION_EXIT_TIMEOUT_MS (line 75) | const ACTION_EXIT_TIMEOUT_MS = Number( constant LOCAL_INFO_TIMEOUT_MS (line 78) | const LOCAL_INFO_TIMEOUT_MS = Number( constant BB_INFO_TIMEOUT_MS (line 81) | const BB_INFO_TIMEOUT_MS = Number( function debugLog (line 89) | function debugLog(message: string): void { function parseChildInfo (line 95) | function parseChildInfo(line: string): ChildInfo | null { function runScenario (line 105) | async function runScenario(config: ScenarioConfig): Promise<{ function stopChild (line 216) | async function stopChild(child: ReturnType): Promise { function waitForChildExit (line 232) | async function waitForChildExit( function checkLocalAlive (line 246) | async function checkLocalAlive(connectURL: string): Promise { function closeLocalBrowser (line 280) | async function closeLocalBrowser(connectURL: string): Promise { function checkBrowserbaseAlive (line 301) | async function checkBrowserbaseAlive( function endBrowserbaseSession (line 326) | async function endBrowserbaseSession( function assertStaysOpen (line 343) | async function assertStaysOpen( function waitForClosed (line 366) | async function waitForClosed( function assertBrowserState (line 385) | async function assertBrowserState( function dumpLogs (line 454) | function dumpLogs(logs: ChildLogs): void { function logCaseResult (line 469) | function logCaseResult( function getKeepAliveEnvConfig (line 500) | function getKeepAliveEnvConfig(): { function buildKeepAliveCases (line 519) | function buildKeepAliveCases(testEnv: EnvKind): KeepAliveCase[] { function runKeepAliveCase (line 577) | async function runKeepAliveCase( FILE: packages/core/tests/integration/keyboard.spec.ts function dataUrl (line 6) | function dataUrl(html: string): string { FILE: packages/core/tests/integration/locator-fill.spec.ts method get (line 62) | get() { method get (line 103) | get() { FILE: packages/core/tests/integration/page-addInitScript.spec.ts constant EXAMPLE_URL (line 6) | const EXAMPLE_URL = "https://example.com"; function setPayload (line 84) | function setPayload() { FILE: packages/core/tests/integration/page-extra-http-headers.spec.ts constant TEST_URL (line 7) | const TEST_URL = FILE: packages/core/tests/integration/setinputfiles.spec.ts constant FILE_UPLOAD_IFRAME_URL (line 10) | const FILE_UPLOAD_IFRAME_URL = constant FILE_UPLOAD_V2_URL (line 12) | const FILE_UPLOAD_V2_URL = constant RESUME_INPUT (line 15) | const RESUME_INPUT = "#resumeUpload"; constant RESUME_SUCCESS (line 16) | const RESUME_SUCCESS = "#resumeSuccess"; constant IMAGES_INPUT (line 17) | const IMAGES_INPUT = "#imagesUpload"; constant IMAGES_SUCCESS (line 18) | const IMAGES_SUCCESS = "#imagesSuccess"; constant AUDIO_INPUT (line 19) | const AUDIO_INPUT = "#audioUpload"; constant AUDIO_SUCCESS (line 20) | const AUDIO_SUCCESS = "#audioSuccess"; constant IFRAME_UPLOAD_INPUT (line 21) | const IFRAME_UPLOAD_INPUT = "/html/body/div/iframe/html/body/div/div[1]/... constant IFRAME_SUCCESS (line 22) | const IFRAME_SUCCESS = FILE: packages/core/tests/integration/shadow-iframe-oopif.spec.ts type Case (line 17) | type Case = { type Framework (line 24) | type Framework = "v3" | "puppeteer" | "playwright" | "patchright"; function runCase (line 26) | async function runCase(v3: V3, c: Case, framework: Framework): Promise( constant CLOSE_TIMEOUT_MS (line 26) | const CLOSE_TIMEOUT_MS = 5_000; function settleWithTimeout (line 28) | async function settleWithTimeout( function closeV3 (line 43) | async function closeV3(v3?: V3 | null): Promise { type JsonResponseKey (line 60) | type JsonResponseKey = type JsonResponseValue (line 67) | type JsonResponseValue = type JsonResponseScript (line 71) | type JsonResponseScript = JsonResponseValue | JsonResponseValue[]; type GenerateResponseValue (line 73) | type GenerateResponseValue = type ScriptedLanguageModel (line 85) | type ScriptedLanguageModel = LanguageModelV2 & { type ScriptedGenerateResult (line 89) | type ScriptedGenerateResult = { constant DEFAULT_USAGE (line 95) | const DEFAULT_USAGE: LanguageModelV2Usage = { function consumeScriptValue (line 110) | function consumeScriptValue(value: T | T[] | undefined, fallback: T):... function resolveJsonResponseKey (line 122) | function resolveJsonResponseKey( function promptToText (line 151) | function promptToText( function findEncodedIds (line 167) | function findEncodedIds(options: LanguageModelV2CallOptions): string[] { function findEncodedIdForText (line 173) | function findEncodedIdForText( function findLastEncodedId (line 189) | function findLastEncodedId(options: LanguageModelV2CallOptions): string { function toolCallResponse (line 198) | function toolCallResponse( function doneToolResponse (line 221) | function doneToolResponse( function createGenerateResult (line 233) | function createGenerateResult(result: ScriptedGenerateResult): { function createScriptedAisdkTestLlmClient (line 247) | function createScriptedAisdkTestLlmClient(options?: { FILE: packages/core/tests/integration/timeouts.spec.ts type AgentToolNameWithTimeout (line 9) | type AgentToolNameWithTimeout = type ToolTimeoutTestModel (line 25) | type ToolTimeoutTestModel = { type ToolTimeoutTestLLMClient (line 44) | type ToolTimeoutTestLLMClient = LLMClient & { function createToolTimeoutTestLlmClient (line 48) | function createToolTimeoutTestLlmClient( function findToolOutput (line 144) | function findToolOutput( function runAgentToolTimeoutScenario (line 163) | async function runAgentToolTimeoutScenario( FILE: packages/core/tests/integration/v3.config.ts function getV3TestConfig (line 9) | function getV3TestConfig(overrides: Partial = {}): V3Options { FILE: packages/core/tests/integration/v3.dynamic.config.ts function getV3DynamicTestConfig (line 51) | function getV3DynamicTestConfig( FILE: packages/core/tests/unit/agent-captcha-hooks.test.ts constant SOLVING_STARTED (line 6) | const SOLVING_STARTED = "browserbase-solving-started"; constant SOLVING_FINISHED (line 7) | const SOLVING_FINISHED = "browserbase-solving-finished"; constant SOLVING_ERRORED (line 8) | const SOLVING_ERRORED = "browserbase-solving-errored"; type ConsoleListener (line 10) | type ConsoleListener = (message: { text: () => string }) => void; class MockPage (line 12) | class MockPage { method on (line 21) | on(event: string, listener: ConsoleListener): void { method off (line 27) | off(event: string, listener: ConsoleListener): void { method emitConsole (line 33) | emitConsole(text: string): void { method url (line 40) | url(): string { method screenshot (line 44) | async screenshot(): Promise { method evaluate (line 48) | async evaluate(): Promise { method mainFrame (line 52) | mainFrame(): { evaluate: () => Promise<{ w: number; h: number }> } { class FakeCuaClient (line 59) | class FakeCuaClient { method setActionHandler (line 78) | setActionHandler( method setPreStepHook (line 84) | setPreStepHook(handler: () => Promise): void { method addContextNote (line 88) | addContextNote(note: string): void { method execute (line 92) | async execute(options: unknown): Promise<{ method constructor (line 106) | constructor(logger: unknown) { method getClient (line 110) | getClient(): FakeCuaClient { function collectUserMessages (line 118) | function collectUserMessages( FILE: packages/core/tests/unit/agent-execution-model.test.ts function createMockV3 (line 11) | function createMockV3() { function resolveExecutionModel (line 142) | function resolveExecutionModel(options?: { FILE: packages/core/tests/unit/browserbase-session-accessors.test.ts constant MOCK_SESSION_ID (line 4) | const MOCK_SESSION_ID = "session-123"; constant MOCK_SESSION_URL (line 5) | const MOCK_SESSION_URL = `https://www.browserbase.com/sessions/${MOCK_SE... constant MOCK_DEBUG_URL (line 6) | const MOCK_DEBUG_URL = `https://debug.browserbase.com/${MOCK_SESSION_ID}`; class MockConnection (line 9) | class MockConnection { class MockV3Context (line 15) | class MockV3Context { method create (line 16) | static async create(): Promise { method pages (line 22) | pages(): never[] { method close (line 26) | async close(): Promise { FILE: packages/core/tests/unit/cache-llm-resolution.test.ts function createFakeStorage (line 22) | function createFakeStorage(entry: T): CacheStorage { FILE: packages/core/tests/unit/captcha-solver.test.ts constant SOLVING_STARTED (line 4) | const SOLVING_STARTED = "browserbase-solving-started"; constant SOLVING_FINISHED (line 5) | const SOLVING_FINISHED = "browserbase-solving-finished"; constant SOLVING_ERRORED (line 6) | const SOLVING_ERRORED = "browserbase-solving-errored"; type ConsoleListener (line 8) | type ConsoleListener = (message: { text: () => string }) => void; class MockPage (line 10) | class MockPage { method on (line 15) | on(event: string, listener: ConsoleListener): void { method off (line 21) | off(event: string, listener: ConsoleListener): void { method emitConsole (line 27) | emitConsole(text: string): void { method listenerCount (line 34) | listenerCount(): number { FILE: packages/core/tests/unit/cdp-connection-close.test.ts function raceTimeout (line 10) | function raceTimeout( function createPair (line 25) | async function createPair(): Promise<{ FILE: packages/core/tests/unit/context-extra-http-headers.test.ts type ContextStub (line 6) | type ContextStub = { FILE: packages/core/tests/unit/cookies.test.ts function makeCookie (line 11) | function makeCookie(overrides: Partial = {}): Cookie { function toCdpCookie (line 26) | function toCdpCookie(c: Cookie) { function makeContext (line 588) | function makeContext( function getMockConn (line 602) | function getMockConn(ctx: V3Context): MockCDPSession { FILE: packages/core/tests/unit/flowlogger-capturing-cdp.test.ts function attachEventStoreToBus (line 9) | function attachEventStoreToBus( class FakeSocket (line 25) | class FakeSocket extends EventEmitter { method send (line 29) | send(payload: string): void { method close (line 33) | close(): void { function createConnection (line 39) | function createConnection(socket: FakeSocket): CdpConnection { function requireEvent (line 48) | function requireEvent( FILE: packages/core/tests/unit/flowlogger-eventstore.test.ts function attachEventStoreToBus (line 6) | function attachEventStoreToBus( function createVerboseStoreHarness (line 22) | function createVerboseStoreHarness(): { FILE: packages/core/tests/unit/helpers/mockCDPSession.ts type Handler (line 3) | type Handler = (params?: Record) => Promise | ... class MockCDPSession (line 5) | class MockCDPSession implements CDPSessionLike { method constructor (line 12) | constructor( method send (line 19) | async send( method on (line 29) | on(): void {} method off (line 30) | off(): void {} method close (line 31) | async close(): Promise {} method callsFor (line 33) | callsFor(method: string): Array<{ params?: Record }> { FILE: packages/core/tests/unit/openai-cua-client.test.ts function createClient (line 4) | function createClient() { type ExecuteStepResult (line 94) | type ExecuteStepResult = { FILE: packages/core/tests/unit/page-extra-http-headers.test.ts type PageStub (line 6) | type PageStub = { FILE: packages/core/tests/unit/public-api/export-surface.test.ts type StagehandExports (line 59) | type StagehandExports = typeof Stagehand & { type PublicAPI (line 63) | type PublicAPI = { FILE: packages/core/tests/unit/public-api/llm-and-agents.test.ts type AISdkClientInstance (line 21) | type AISdkClientInstance = InstanceType; type CtorParams (line 33) | type CtorParams = ConstructorParameters; type AgentProviderInstance (line 63) | type AgentProviderInstance = InstanceType; type ExpectedAnnotatedScreenshotText (line 83) | type ExpectedAnnotatedScreenshotText = string; type ExpectedShape (line 93) | type ExpectedShape = { type ConsoleMessageInstance (line 108) | type ConsoleMessageInstance = InstanceType; type GetClientReturn (line 117) | type GetClientReturn = ReturnType; type ExpectedShape (line 120) | type ExpectedShape = { type ExpectedShape (line 139) | type ExpectedShape = { type ExpectedCtorParams (line 147) | type ExpectedCtorParams = [Stagehand.AvailableModel, string?]; type ExpectedBasicOptions (line 149) | type ExpectedBasicOptions = { type ExpectedWithResponseModel (line 160) | type ExpectedWithResponseModel = ExpectedBasicOptions & { type LLMClientInstance (line 169) | type LLMClientInstance = InstanceType; type Result (line 219) | type Result = { custom: string }; type ExpectedSignature (line 220) | type ExpectedSignature = ( type ExpectedModelToAgentProviderMap (line 263) | type ExpectedModelToAgentProviderMap = Record< type ExpectedShape (line 276) | type ExpectedShape = { type ResponseInstance (line 298) | type ResponseInstance = InstanceType; FILE: packages/core/tests/unit/public-api/public-error-types.test.ts type ErrorClassType (line 79) | type ErrorClassType = typeof ErrorClass; FILE: packages/core/tests/unit/public-api/public-types.test.ts type ExpectedExportedTypes (line 9) | type ExpectedExportedTypes = { type ExpectedAnyPage (line 111) | type ExpectedAnyPage = type ExpectedActOptions (line 123) | type ExpectedActOptions = { type ExpectedActResult (line 137) | type ExpectedActResult = { type ExpectedExtractOptions (line 151) | type ExpectedExtractOptions = { type ExpectedObserveOptions (line 165) | type ExpectedObserveOptions = { type ExpectedAction (line 188) | type ExpectedAction = { type TestAction (line 204) | type TestAction = { type: string } & Stagehand.AgentAction; type ExpectedAgentExecuteOptions (line 210) | type ExpectedAgentExecuteOptions = { type ExpectedAgentStreamExecuteOptions (line 231) | type ExpectedAgentStreamExecuteOptions = { type ExpectedAgentExecutionOptions (line 252) | type ExpectedAgentExecutionOptions = { type ExpectedAgentResult (line 268) | type ExpectedAgentResult = { type ExpectedAgentConfig (line 291) | type ExpectedAgentConfig = { type ExpectedAgentToolMode (line 308) | type ExpectedAgentToolMode = "dom" | "hybrid" | "cua"; type ExpectedHistoryEntry (line 316) | type ExpectedHistoryEntry = { type ExpectedCookie (line 329) | type ExpectedCookie = { type ExpectedCookieParam (line 346) | type ExpectedCookieParam = { type ExpectedClearCookieOptions (line 364) | type ExpectedClearCookieOptions = { FILE: packages/core/tests/unit/public-api/runtime-utils.test.ts type ExpectedInjectUrlsParams (line 6) | type ExpectedInjectUrlsParams = [ type ExpectedIsRunningInBunParams (line 20) | type ExpectedIsRunningInBunParams = []; type ExpectedLoadApiKeyFromEnvParams (line 30) | type ExpectedLoadApiKeyFromEnvParams = [ type ExpectedProviderEnvVarMap (line 43) | type ExpectedProviderEnvVarMap = Partial< FILE: packages/core/tests/unit/public-api/schema-utils.test.ts type ExpectedInferredType (line 6) | type ExpectedInferredType = { extraction: string }; type ExpectedGetZodTypeParams (line 16) | type ExpectedGetZodTypeParams = [Stagehand.StagehandZodSchema]; type ExpectedIsZod3SchemaParams (line 26) | type ExpectedIsZod3SchemaParams = [Stagehand.StagehandZodSchema]; type ExpectedIsZod4SchemaParams (line 36) | type ExpectedIsZod4SchemaParams = [Stagehand.StagehandZodSchema]; type ExpectedJsonSchemaToZodParams (line 46) | type ExpectedJsonSchemaToZodParams = [Stagehand.JsonSchema]; type ExpectedInferredType (line 56) | type ExpectedInferredType = { pageText: string }; type ExpectedToGeminiSchemaParams (line 66) | type ExpectedToGeminiSchemaParams = [Stagehand.StagehandZodSchema]; type ExpectedToJsonSchemaParams (line 76) | type ExpectedToJsonSchemaParams = [Stagehand.StagehandZodSchema]; type ExpectedTransformSchemaParams (line 86) | type ExpectedTransformSchemaParams = [ type ExpectedTrimTrailingTextNodeParams (line 99) | type ExpectedTrimTrailingTextNodeParams = [string | undefined]; type ExpectedValidateZodSchemaParams (line 109) | type ExpectedValidateZodSchemaParams = [ FILE: packages/core/tests/unit/public-api/v3-core.test.ts type ExpectedShape (line 6) | type ExpectedShape = { type StagehandInstance (line 36) | type StagehandInstance = InstanceType; type AgentReturn (line 67) | type AgentReturn = ReturnType; type ExpectedStagehandMetrics (line 77) | type ExpectedStagehandMetrics = { type V3EvaluatorInstance (line 119) | type V3EvaluatorInstance = InstanceType; type ExpectedServerConfig (line 155) | type ExpectedServerConfig = type ExpectedLOG_LEVEL_NAMES (line 173) | type ExpectedLOG_LEVEL_NAMES = Record; FILE: packages/core/tests/unit/safety-confirmation.test.ts type LoggerMock (line 10) | type LoggerMock = (message: LogLine) => void; function createOpenAIClient (line 32) | function createOpenAIClient(): OpenAICUAClient { function createGoogleClient (line 41) | function createGoogleClient(): GoogleCUAClient { FILE: packages/core/tests/unit/snapshot-capture-orchestration.test.ts type PageStub (line 32) | type PageStub = Pick< method send (line 141) | async send( method on (line 149) | on() {} method off (line 150) | off() {} method close (line 151) | async close() {} FILE: packages/core/tests/unit/snapshot-cbor.test.ts type Handler (line 10) | type Handler = (params?: Record) => Promise | ... function createFakePage (line 12) | function createFakePage(session: CDPSessionLike): Page { function completeDomTree (line 37) | function completeDomTree(): Protocol.DOM.Node { function truncatedDomTree (line 75) | function truncatedDomTree(): Protocol.DOM.Node { function htmlWithChildren (line 95) | function htmlWithChildren(): Protocol.DOM.Node { function simpleAxNodes (line 124) | function simpleAxNodes(): Protocol.Accessibility.AXNode[] { function makeCborError (line 153) | function makeCborError(): Error { FILE: packages/core/tests/unit/timeout-handlers.test.ts type BuildActHandlerOptions (line 1015) | interface BuildActHandlerOptions { function buildActHandler (line 1027) | function buildActHandler(options: BuildActHandlerOptions = {}): ActHandl... type BuildExtractHandlerOptions (line 1049) | interface BuildExtractHandlerOptions { function buildExtractHandler (line 1060) | function buildExtractHandler( type BuildObserveHandlerOptions (line 1083) | interface BuildObserveHandlerOptions { function buildObserveHandler (line 1094) | function buildObserveHandler( FILE: packages/core/tests/unit/understudy-command-exception.test.ts function deepFunction (line 50) | function deepFunction() { FILE: packages/core/tests/unit/xpath-resolver.test.ts type DomGlobals (line 8) | type DomGlobals = { FILE: packages/docs/language-selector.js function updateSDKReferenceVisibility (line 73) | function updateSDKReferenceVisibility() { function getVersionSwitcher (line 102) | function getVersionSwitcher() { function updateVersionSwitcherVisibility (line 115) | function updateVersionSwitcherVisibility() { function getDropdownButton (line 135) | function getDropdownButton() { function getDropdownMenu (line 146) | function getDropdownMenu() { function updateButtonText (line 150) | function updateButtonText(newText) { function updateDropdownCheckIndicator (line 160) | function updateDropdownCheckIndicator() { function simulateClick (line 206) | function simulateClick(element) { function getCodeBlockLanguageDropdown (line 222) | function getCodeBlockLanguageDropdown() { function waitForCodeBlockMenuAndSelect (line 237) | function waitForCodeBlockMenuAndSelect(targetLanguage, attempts = 0) { function selectCodeBlockLanguage (line 267) | function selectCodeBlockLanguage(targetLanguage) { function syncCodeBlockLanguage (line 280) | function syncCodeBlockLanguage() { function setupDropdownMenuObserver (line 291) | function setupDropdownMenuObserver() { function setupMenuClickHandler (line 306) | function setupMenuClickHandler() { function restoreLanguageSelection (line 359) | function restoreLanguageSelection() { function setupPageChangeObserver (line 380) | function setupPageChangeObserver() { function setupCodeBlockObserver (line 420) | function setupCodeBlockObserver() { function init (line 446) | function init() { FILE: packages/docs/scripts/runtimePaths.js constant PACKAGE_SEGMENT (line 12) | const PACKAGE_SEGMENT = "/packages/docs/"; constant EVAL_FRAMES (line 13) | const EVAL_FRAMES = new Set(["[eval]", "[eval]-wrapper"]); constant INTERNAL_FRAME_NAMES (line 14) | const INTERNAL_FRAME_NAMES = new Set([ FILE: packages/docs/scripts/sync-sdk-docs.js constant SDK_REPOS (line 20) | const SDK_REPOS = { function fetchUrl (line 50) | function fetchUrl(url) { function processReadmeContent (line 79) | function processReadmeContent(content, config) { function generateFrontmatter (line 140) | function generateFrontmatter(config) { function syncSdk (line 156) | async function syncSdk(language, config) { function main (line 188) | async function main() { FILE: packages/evals/args.ts constant HELP_REGEX (line 6) | const HELP_REGEX = /^(?:--?)?(?:h|help)$/i; constant MAN_REGEX (line 7) | const MAN_REGEX = /^(?:--?)?man$/i; constant DEFAULT_EVAL_CATEGORIES (line 82) | const DEFAULT_EVAL_CATEGORIES = process.env.EVAL_CATEGORIES function buildUsage (line 100) | function buildUsage(detailed = false): string { FILE: packages/evals/browserbaseCleanup.ts constant CLOSE_TIMEOUT_MS (line 3) | const CLOSE_TIMEOUT_MS = 5_000; function settleWithTimeout (line 5) | async function settleWithTimeout( function endBrowserbaseSession (line 20) | async function endBrowserbaseSession(v3?: V3 | null): Promise { FILE: packages/evals/cli.ts constant CONFIG_PATH (line 9) | const CONFIG_PATH = path.join(moduleDir, "evals.config.json"); type Config (line 11) | interface Config { function loadConfig (line 31) | function loadConfig(): Config { function saveConfig (line 35) | function saveConfig(config: Config): void { function printHelp (line 39) | function printHelp(): void { function handleConfig (line 108) | function handleConfig(args: string[]): void { function handleList (line 210) | function handleList(args: string[]): void { function parseArgs (line 263) | function parseArgs(rawArgs: string[]): { function handleRun (line 324) | function handleRun(args: string[]): void { function main (line 543) | function main(): void { FILE: packages/evals/index.eval.ts constant MAX_CONCURRENCY (line 64) | const MAX_CONCURRENCY = process.env.EVAL_MAX_CONCURRENCY constant TRIAL_COUNT (line 68) | const TRIAL_COUNT = process.env.EVAL_TRIAL_COUNT constant USE_API (line 72) | const USE_API: boolean = (process.env.USE_API ?? "").toLowerCase() === "... FILE: packages/evals/initV3.ts type InitV3Args (line 26) | type InitV3Args = { type V3InitResult (line 47) | type V3InitResult = { function initV3 (line 56) | async function initV3({ FILE: packages/evals/lib/AISdkClientWrapped.ts class AISdkClientWrapped (line 27) | class AISdkClientWrapped extends LLMClient { method constructor (line 32) | constructor({ method getLanguageModel (line 44) | public getLanguageModel(): LanguageModelV2 { method createChatCompletion (line 48) | async createChatCompletion({ FILE: packages/evals/logger.ts function parseLogLine (line 25) | function parseLogLine(logLine: LogLine): LogLineEval { class EvalLogger (line 68) | class EvalLogger { method constructor (line 72) | constructor() { method init (line 81) | init(stagehand?: V3) { method log (line 91) | log(logLine: LogLine) { method error (line 101) | error(logLine: LogLine) { method warn (line 111) | warn(logLine: LogLine) { method getLogs (line 121) | getLogs(): LogLineEval[] { method clear (line 130) | clear(): void { FILE: packages/evals/runtimePaths.ts constant PACKAGE_SEGMENT (line 13) | const PACKAGE_SEGMENT = "/packages/evals/"; constant EVAL_FRAMES (line 14) | const EVAL_FRAMES = new Set(["[eval]", "[eval]-wrapper"]); constant INTERNAL_FRAME_NAMES (line 15) | const INTERNAL_FRAME_NAMES = new Set([ type CallSiteWithScriptName (line 44) | type CallSiteWithScriptName = NodeJS.CallSite & { FILE: packages/evals/scoring.ts function formatTaskOutput (line 7) | function formatTaskOutput(output: unknown): string { function exactMatch (line 48) | function exactMatch( function errorMatch (line 83) | function errorMatch( FILE: packages/evals/scripts/test-evals.ts type Runtime (line 15) | type Runtime = "source" | "dist-esm"; type EvalSummaryEntry (line 17) | type EvalSummaryEntry = { type EvalSummary (line 23) | type EvalSummary = { FILE: packages/evals/suites/gaia.ts type GaiaRow (line 29) | type GaiaRow = { function isGaiaRow (line 37) | function isGaiaRow(parsed: unknown): parsed is GaiaRow { FILE: packages/evals/suites/onlineMind2Web.ts type Mind2WebRow (line 30) | type Mind2WebRow = { function isMind2WebRow (line 39) | function isMind2WebRow(parsed: unknown): parsed is Mind2WebRow { FILE: packages/evals/suites/webtailbench.ts type WebTailBenchRow (line 24) | type WebTailBenchRow = { function isWebTailBenchRow (line 32) | function isWebTailBenchRow(parsed: unknown): parsed is WebTailBenchRow { FILE: packages/evals/suites/webvoyager.ts type VoyagerRow (line 30) | type VoyagerRow = { function isVoyagerRow (line 38) | function isVoyagerRow(parsed: unknown): parsed is VoyagerRow { FILE: packages/evals/taskConfig.ts constant ALL_EVAL_MODELS (line 20) | const ALL_EVAL_MODELS = [ type TaskConfig (line 73) | type TaskConfig = { constant DEFAULT_EVAL_MODELS (line 101) | const DEFAULT_EVAL_MODELS = process.env.EVAL_MODELS constant AGENT_MODELS (line 110) | const AGENT_MODELS = process.env.EVAL_AGENT_MODELS constant AGENT_MODELS_CUA (line 115) | const AGENT_MODELS_CUA = process.env.EVAL_AGENT_MODELS_CUA constant AGENT_MODEL_ENTRIES (line 123) | const AGENT_MODEL_ENTRIES: AgentModelEntry[] = [ constant DEFAULT_AGENT_MODELS (line 128) | const DEFAULT_AGENT_MODELS = AGENT_MODEL_ENTRIES.map((e) => e.modelName); constant MODELS (line 180) | const MODELS: AvailableModel[] = getModelList().map((model) => { FILE: packages/evals/tasks/extract_press_releases.ts type PressRelease (line 22) | type PressRelease = z.infer["items"][number]; FILE: packages/evals/types/evals.ts type StagehandInitResult (line 9) | type StagehandInitResult = { type EvalFunction (line 19) | type EvalFunction = ( type EvalCategory (line 43) | type EvalCategory = z.infer; type EvalInput (line 44) | interface EvalInput { type Testcase (line 52) | interface Testcase type SummaryResult (line 84) | interface SummaryResult { type EvalArgs (line 91) | interface EvalArgs { type EvalResult (line 98) | interface EvalResult { type LogLineEval (line 103) | type LogLineEval = LogLine & { type AgentModelEntry (line 107) | type AgentModelEntry = { FILE: packages/evals/types/screenshotCollector.ts type ScreenshotCollectorOptions (line 1) | interface ScreenshotCollectorOptions { type ScreenshotCapablePage (line 12) | type ScreenshotCapablePage = { FILE: packages/evals/utils.ts function normalizeString (line 27) | function normalizeString(str: string): string { function compareStrings (line 54) | function compareStrings( function generateTimestamp (line 75) | function generateTimestamp(): string { function generateExperimentName (line 89) | function generateExperimentName({ function logLineToString (line 108) | function logLineToString(logLine: LogLine): string { function dedent (line 126) | function dedent( function sampleUniform (line 148) | function sampleUniform(arr: T[], k: number): T[] { function readJsonlFile (line 161) | function readJsonlFile(filePath: string): string[] { function parseJsonlRows (line 175) | function parseJsonlRows( function applySampling (line 193) | function applySampling( FILE: packages/evals/utils/ScreenshotCollector.ts class ScreenshotCollector (line 5) | class ScreenshotCollector { method constructor (line 17) | constructor(v3: V3, options: ScreenshotCollectorOptions = {}) { method start (line 28) | start(): void { method stop (line 51) | async stop(): Promise { method captureScreenshot (line 79) | private async captureScreenshot(trigger: string): Promise { method getScreenshots (line 134) | getScreenshots(): Buffer[] { method getScreenshotCount (line 138) | getScreenshotCount(): number { method clear (line 142) | clear(): void { method addScreenshot (line 150) | async addScreenshot(screenshot: Buffer): Promise { method calculateMSE (line 195) | private async calculateMSE(img1: Buffer, img2: Buffer): Promise { method calculateSSIM (line 217) | private async calculateSSIM(img1: Buffer, img2: Buffer): Promise { method bumpNode (line 88) | private bumpNode(node: LruNode): void { method evictLru (line 115) | private async evictLru(): Promise { method startSession (line 122) | async startSession(params: CreateSessionParams): Promise { method hasSession (line 140) | async hasSession(sessionId: string): Promise { method getOrCreateStagehand (line 153) | async getOrCreateStagehand( method buildV3Options (line 202) | private buildV3Options( method createSession (line 247) | async createSession( method deleteSession (line 280) | async deleteSession(sessionId: string): Promise { method getSessionConfig (line 307) | async getSessionConfig(sessionId: string): Promise { method updateCacheConfig (line 318) | updateCacheConfig(config: SessionCacheConfig): void { method getCacheConfig (line 341) | getCacheConfig(): SessionCacheConfig { method destroy (line 348) | async destroy(): Promise { method size (line 363) | get size(): number { FILE: packages/server-v3/src/lib/SessionStore.ts type SessionStartResult (line 11) | type SessionStartResult = Api.SessionStartResult; type CreateSessionParams (line 21) | interface CreateSessionParams { type RequestContext (line 67) | interface RequestContext { type SessionCacheConfig (line 77) | interface SessionCacheConfig { type SessionStore (line 98) | interface SessionStore { FILE: packages/server-v3/src/lib/errorHandler.ts class AppError (line 10) | class AppError extends Error { method constructor (line 14) | constructor( method getClientMessage (line 31) | getClientMessage(): string { function withErrorHandling (line 46) | function withErrorHandling< FILE: packages/server-v3/src/lib/header.ts function getModelName (line 46) | function getModelName(request: FastifyRequest): string | undefined { function getModelApiKey (line 67) | function getModelApiKey(request: FastifyRequest): string | undefined { function shouldRespondWithSSE (line 84) | function shouldRespondWithSSE(request: FastifyRequest): boolean { FILE: packages/server-v3/src/lib/response.ts type SuccessResponse (line 4) | interface SuccessResponse { type ErrorResponse (line 9) | interface ErrorResponse { type ApiResponse (line 14) | type ApiResponse = SuccessResponse | ErrorResponse; function success (line 16) | function success( function error (line 27) | function error( function isSuccessResponse (line 38) | function isSuccessResponse( function isErrorResponse (line 44) | function isErrorResponse( FILE: packages/server-v3/src/lib/sessionStoreManager.ts function initializeSessionStore (line 6) | function initializeSessionStore( function getSessionStore (line 15) | function getSessionStore(): SessionStore { function destroySessionStore (line 22) | async function destroySessionStore(): Promise { FILE: packages/server-v3/src/lib/stream.ts type StreamingResponseOptions (line 18) | interface StreamingResponseOptions { function createStreamingResponse (line 30) | async function createStreamingResponse({ FILE: packages/server-v3/src/lib/utils.ts type JSONSchema (line 8) | interface JSONSchema { function jsonSchemaToZod (line 28) | function jsonSchemaToZod(schema: JSONSchema): ZodTypeAny { function mapModelToProvider (line 184) | function mapModelToProvider(model: LegacyModel): LegacyProvider { FILE: packages/server-v3/src/server.ts constant READY_WAIT_PERIOD (line 36) | const READY_WAIT_PERIOD = 10_000; constant GRACEFUL_SHUTDOWN_PERIOD (line 37) | const GRACEFUL_SHUTDOWN_PERIOD = 30_000; method level (line 50) | level(label: string) { FILE: packages/server-v3/src/types/error.ts class UnknownModelError (line 5) | class UnknownModelError extends AppError { method constructor (line 6) | constructor(model: string) { class InvalidProviderError (line 10) | class InvalidProviderError extends AppError { method constructor (line 11) | constructor(provider: string) { class InvalidModelError (line 16) | class InvalidModelError extends AppError { method constructor (line 17) | constructor(model: string) { class UnauthorizedError (line 22) | class UnauthorizedError extends AppError { method constructor (line 23) | constructor() { class MissingHeaderError (line 28) | class MissingHeaderError extends AppError { method constructor (line 29) | constructor(header: string) { class InvalidAPIKeyError (line 34) | class InvalidAPIKeyError extends AppError { method constructor (line 35) | constructor(provider: string) { class AttemptedCloseOnNonActiveSessionError (line 40) | class AttemptedCloseOnNonActiveSessionError extends AppError { method constructor (line 41) | constructor() { type BrowserbaseError (line 49) | interface BrowserbaseError { class BrowserbaseSDKError (line 61) | class BrowserbaseSDKError extends AppError { method constructor (line 62) | constructor(error: unknown, defaultMessage: string) { FILE: packages/server-v3/src/types/fastify.d.ts type FastifyRequest (line 4) | interface FastifyRequest { FILE: packages/server-v3/src/types/model.ts constant AISDK_PROVIDERS (line 1) | const AISDK_PROVIDERS = [ type AISDKProvider (line 17) | type AISDKProvider = (typeof AISDK_PROVIDERS)[number]; type LegacyModel (line 19) | type LegacyModel = type LegacyProvider (line 40) | type LegacyProvider = "openai" | "anthropic" | "google"; FILE: packages/server-v3/src/types/rrweb.ts type Node (line 1) | interface Node { type Event (line 10) | interface Event { FILE: packages/server-v3/test/integration/api-server-cache.test.ts function extractUrl (line 37) | function extractUrl() { function extractBody (line 41) | function extractBody(instruction = "extract the page title") { FILE: packages/server-v3/test/integration/utils.ts constant HTTP_OK (line 9) | const HTTP_OK = 200; constant HTTP_BAD_REQUEST (line 10) | const HTTP_BAD_REQUEST = 400; constant HTTP_NOT_FOUND (line 11) | const HTTP_NOT_FOUND = 404; constant HTTP_GONE (line 12) | const HTTP_GONE = 410; constant HTTP_UNPROCESSABLE_ENTITY (line 13) | const HTTP_UNPROCESSABLE_ENTITY = 422; constant HTTP_INTERNAL_SERVER_ERROR (line 14) | const HTTP_INTERNAL_SERVER_ERROR = 500; constant SESSION_CLOSE_WAIT_MS (line 20) | const SESSION_CLOSE_WAIT_MS = 2000; function requireEnv (line 37) | function requireEnv(name: string, value: string | undefined): string { function getBaseUrl (line 44) | function getBaseUrl(): string { function getHeaders (line 52) | function getHeaders( type StartSessionResponse (line 68) | interface StartSessionResponse { constant SESSION_READY_DELAY_MS (line 78) | const SESSION_READY_DELAY_MS = 250; constant LOCAL_CONNECT_TIMEOUT_MS (line 79) | const LOCAL_CONNECT_TIMEOUT_MS = (() => { type SessionInfo (line 84) | interface SessionInfo { function createLocalBrowserBody (line 89) | function createLocalBrowserBody() { constant LOCAL_BROWSER_BODY (line 122) | const LOCAL_BROWSER_BODY = createLocalBrowserBody(); function readLaunchDiagnostics (line 124) | function readLaunchDiagnostics(launchOptions?: { function createSession (line 182) | async function createSession( function createSessionWithCdp (line 189) | async function createSessionWithCdp( function endSession (line 242) | async function endSession( function navigateSession (line 259) | async function navigateSession( function getMainFrameId (line 276) | async function getMainFrameId(cdpUrl: string): Promise { type SSEEvent (line 305) | interface SSEEvent { function readSSEStream (line 311) | async function readSSEStream(response: Response): Promise { type TypedSSEEvent (line 363) | interface TypedSSEEvent { function readSSEStreamRaw (line 377) | async function readSSEStreamRaw(response: Response): Promise { function parseTypedSSEEvents (line 398) | function parseTypedSSEEvents( type SSEStreamResult (line 416) | interface SSEStreamResult { function readTypedSSEStream (line 432) | async function readTypedSSEStream( function readTypedSSEStreamWithContext (line 443) | async function readTypedSSEStreamWithContext( function assertWithContext (line 481) | function assertWithContext( function assertEventExists (line 494) | function assertEventExists( function assertHttpStatus (line 511) | function assertHttpStatus( type FetchResult (line 530) | interface FetchResult { function fetchWithContext (line 551) | async function fetchWithContext( function assertFetchOk (line 624) | function assertFetchOk( function assertFetchStatus (line 637) | function assertFetchStatus( class TestSession (line 653) | class TestSession { method constructor (line 657) | constructor(headers: Record) { method start (line 661) | async start(): Promise { method navigate (line 666) | async navigate(targetUrl: string): Promise { method end (line 673) | async end(): Promise { method getSessionId (line 684) | getSessionId(): string { FILE: packages/server-v3/test/integration/v3/act.test.ts type ActResponse (line 25) | interface ActResponse { type ActResult (line 34) | interface ActResult { FILE: packages/server-v3/test/integration/v3/extract.test.ts type ExtractResult (line 23) | type ExtractResult = Record; type ExtractResponse (line 52) | interface ExtractResponse { type ExtractResponse (line 96) | interface ExtractResponse { type ExtractResponse (line 136) | interface ExtractResponse { type ExtractResponse (line 177) | interface ExtractResponse { type ExtractResponse (line 222) | interface ExtractResponse { type ExtractResponse (line 253) | interface ExtractResponse { type ExtractResponse (line 291) | interface ExtractResponse { FILE: packages/server-v3/test/integration/v3/multiRegion.test.ts type StartSuccessResponse (line 18) | interface StartSuccessResponse { type StartErrorResponse (line 27) | interface StartErrorResponse { type StartResponse (line 32) | type StartResponse = StartSuccessResponse | StartErrorResponse; function isSuccessResponse (line 34) | function isSuccessResponse( FILE: packages/server-v3/test/integration/v3/observe.test.ts type ObserveResult (line 23) | type ObserveResult = unknown[]; type ObserveResponse (line 53) | interface ObserveResponse { type ObserveResponse (line 88) | interface ObserveResponse { type ObserveResponse (line 125) | interface ObserveResponse { type ObserveResponse (line 162) | interface ObserveResponse { type ObserveResponse (line 203) | interface ObserveResponse { FILE: packages/server-v3/test/integration/v3/start.test.ts type StartSuccessResponse (line 28) | interface StartSuccessResponse { type StartUnavailableResponse (line 37) | interface StartUnavailableResponse { type StartErrorResponse (line 45) | interface StartErrorResponse { type StartResponse (line 50) | type StartResponse = function isSuccessResponse (line 55) | function isSuccessResponse( type SeaHandle (line 61) | type SeaHandle = { type SupervisorInfo (line 67) | type SupervisorInfo = { function sleep (line 97) | function sleep(ms: number): Promise { function getFreePort (line 101) | async function getFreePort(): Promise { function listProcesses (line 123) | function listProcesses(): Array<{ pid: number; args: string }> { function parseSupervisorConfigArg (line 144) | function parseSupervisorConfigArg(args: string): { function findLocalSupervisorByParentPid (line 165) | function findLocalSupervisorByParentPid( function isPidAlive (line 192) | function isPidAlive(pid: number): boolean { function waitForValue (line 203) | async function waitForValue( function waitForPidState (line 217) | async function waitForPidState( function waitForServerReady (line 234) | async function waitForServerReady(baseUrl: string, timeoutMs = 30_000) { function waitForProcessExit (line 250) | async function waitForProcessExit( function startSeaServer (line 266) | async function startSeaServer( function stopSeaServer (line 319) | async function stopSeaServer(handle: SeaHandle): Promise { function forceKillSeaServer (line 338) | async function forceKillSeaServer(handle: SeaHandle): Promise { function startKeepAliveFalseLocalSession (line 349) | async function startKeepAliveFalseLocalSession(baseUrl: string): Promise<{ function startKeepAliveFalseBrowserbaseSession (line 384) | async function startKeepAliveFalseBrowserbaseSession( function closeLocalBrowserViaCdp (line 439) | async function closeLocalBrowserViaCdp(cdpUrl: string): Promise { function waitForBrowserbaseNotRunning (line 454) | async function waitForBrowserbaseNotRunning( function requestBrowserbaseReleaseBestEffort (line 482) | async function requestBrowserbaseReleaseBestEffort(sessionId: string) { FILE: packages/server-v4/scripts/gen-openapi.ts constant OUTPUT_PATH (line 24) | const OUTPUT_PATH = path.resolve(getCurrentDirPath(), "../openapi.v4.yam... function main (line 26) | async function main() { FILE: packages/server-v4/scripts/runtimePaths.ts constant PACKAGE_SEGMENT (line 12) | const PACKAGE_SEGMENT = "/packages/server-v4/"; constant EVAL_FRAMES (line 13) | const EVAL_FRAMES = new Set(["[eval]", "[eval]-wrapper"]); constant INTERNAL_FRAME_NAMES (line 14) | const INTERNAL_FRAME_NAMES = new Set([ type CallSiteWithScriptName (line 43) | type CallSiteWithScriptName = NodeJS.CallSite & { FILE: packages/server-v4/src/routes/v4/browsersession/shared.ts function buildBrowserSession (line 18) | function buildBrowserSession(input: { type BrowserSessionRequestBody (line 65) | type BrowserSessionRequestBody = { type BrowserSessionActionHandlerContext (line 70) | type BrowserSessionActionHandlerContext = { type PageRequestQuery (line 29) | type PageRequestQuery = { type PageActionHandlerContext (line 34) | type PageActionHandlerContext = { function normalizeXPath (line 42) | function normalizeXPath(xpath: string): string { function getPageId (line 48) | function getPageId(params: unknown): string | undefined { function buildStubPageFrame (line 61) | function buildStubPageFrame(pageId = "page_stub") { function buildStubNavigationResult (line 70) | function buildStubNavigationResult(url = "https://stub.invalid") { function extractPageParams (line 83) | function extractPageParams( function createPageActionHandler (line 96) | function createPageActionHandler(options: { FILE: packages/server-v4/src/routes/v4/pluginUtils.ts type TaggedRouteSchema (line 5) | type TaggedRouteSchema = NonNullable & { type ValidationLikeError (line 9) | type ValidationLikeError = { function isValidationLikeError (line 13) | function isValidationLikeError(error: unknown): error is ValidationLikeE... function getErrorStatusCode (line 22) | function getErrorStatusCode(error: unknown): number { function withTag (line 35) | function withTag(route: RouteOptions, tag: string): RouteOptions { function normalizePluginError (line 52) | function normalizePluginError(error: unknown): { FILE: packages/server-v4/src/schemas/v4/browserSession.ts function createBrowserSessionRequestSchema (line 261) | function createBrowserSessionRequestSchema( function createBrowserSessionActionSchema (line 268) | function createBrowserSessionActionSchema< function createBrowserSessionResponseSchema (line 280) | function createBrowserSessionResponseSchema( type BrowserSessionCreateRequest (line 1172) | type BrowserSessionCreateRequest = z.infer< type BrowserSessionIdParams (line 1175) | type BrowserSessionIdParams = z.infer< type BrowserSession (line 1178) | type BrowserSession = z.infer; type BrowserSessionActionMethod (line 1179) | type BrowserSessionActionMethod = z.infer< type BrowserSessionAction (line 1182) | type BrowserSessionAction = z.infer; type BrowserSessionActionDetailsQuery (line 1183) | type BrowserSessionActionDetailsQuery = z.infer< type BrowserSessionActionListQuery (line 1186) | type BrowserSessionActionListQuery = z.infer< type BrowserSessionPage (line 1189) | type BrowserSessionPage = z.infer; function buildBrowserSessionErrorResponse (line 1191) | function buildBrowserSessionErrorResponse(input: { FILE: packages/server-v4/src/schemas/v4/page.ts function createPageRequestSchema (line 240) | function createPageRequestSchema( function createPageActionSchema (line 247) | function createPageActionSchema< function createPageResponseSchema (line 259) | function createPageResponseSchema( type PageActionMethod (line 1546) | type PageActionMethod = z.infer; type PageActionStatus (line 1547) | type PageActionStatus = z.infer; type PageAction (line 1548) | type PageAction = z.infer; type PageActionDetailsQuery (line 1549) | type PageActionDetailsQuery = z.infer< type PageActionListQuery (line 1552) | type PageActionListQuery = z.infer; function buildErrorResponse (line 1554) | function buildErrorResponse(input: { FILE: packages/server-v4/src/types/error.ts class AppError (line 3) | class AppError extends Error { method constructor (line 7) | constructor( class UnknownModelError (line 19) | class UnknownModelError extends AppError { method constructor (line 20) | constructor(model: string) { class InvalidProviderError (line 24) | class InvalidProviderError extends AppError { method constructor (line 25) | constructor(provider: string) { class InvalidModelError (line 30) | class InvalidModelError extends AppError { method constructor (line 31) | constructor(model: string) { class UnauthorizedError (line 36) | class UnauthorizedError extends AppError { method constructor (line 37) | constructor() { class MissingHeaderError (line 42) | class MissingHeaderError extends AppError { method constructor (line 43) | constructor(header: string) { class InvalidAPIKeyError (line 48) | class InvalidAPIKeyError extends AppError { method constructor (line 49) | constructor(provider: string) { class AttemptedCloseOnNonActiveSessionError (line 54) | class AttemptedCloseOnNonActiveSessionError extends AppError { method constructor (line 55) | constructor() { type BrowserbaseError (line 63) | interface BrowserbaseError { class BrowserbaseSDKError (line 75) | class BrowserbaseSDKError extends AppError { method constructor (line 76) | constructor(error: unknown, defaultMessage: string) { FILE: packages/server-v4/src/types/fastify.d.ts type FastifyRequest (line 4) | interface FastifyRequest { FILE: packages/server-v4/src/types/model.ts constant AISDK_PROVIDERS (line 1) | const AISDK_PROVIDERS = [ type AISDKProvider (line 17) | type AISDKProvider = (typeof AISDK_PROVIDERS)[number]; type LegacyModel (line 19) | type LegacyModel = type LegacyProvider (line 40) | type LegacyProvider = "openai" | "anthropic" | "google"; FILE: packages/server-v4/src/types/rrweb.ts type Node (line 1) | interface Node { type Event (line 10) | interface Event { FILE: packages/server-v4/test/integration/utils.ts constant HTTP_OK (line 9) | const HTTP_OK = 200; constant HTTP_BAD_REQUEST (line 10) | const HTTP_BAD_REQUEST = 400; constant HTTP_NOT_FOUND (line 11) | const HTTP_NOT_FOUND = 404; constant HTTP_GONE (line 12) | const HTTP_GONE = 410; constant HTTP_UNPROCESSABLE_ENTITY (line 13) | const HTTP_UNPROCESSABLE_ENTITY = 422; constant HTTP_INTERNAL_SERVER_ERROR (line 14) | const HTTP_INTERNAL_SERVER_ERROR = 500; constant SESSION_CLOSE_WAIT_MS (line 20) | const SESSION_CLOSE_WAIT_MS = 2000; function requireEnv (line 37) | function requireEnv(name: string, value: string | undefined): string { function getBaseUrl (line 44) | function getBaseUrl(): string { function getHeaders (line 52) | function getHeaders( type StartSessionResponse (line 68) | interface StartSessionResponse { constant SESSION_READY_DELAY_MS (line 80) | const SESSION_READY_DELAY_MS = 250; constant LOCAL_CONNECT_TIMEOUT_MS (line 81) | const LOCAL_CONNECT_TIMEOUT_MS = (() => { type SessionInfo (line 86) | interface SessionInfo { function createLocalBrowserBody (line 91) | function createLocalBrowserBody() { constant LOCAL_BROWSER_BODY (line 122) | const LOCAL_BROWSER_BODY = createLocalBrowserBody(); function readLaunchDiagnostics (line 124) | function readLaunchDiagnostics(launchOptions?: { function createSession (line 182) | async function createSession( function createSessionWithCdp (line 189) | async function createSessionWithCdp( function endSession (line 242) | async function endSession( function getMainFrameId (line 258) | async function getMainFrameId(cdpUrl: string): Promise { type SSEEvent (line 287) | interface SSEEvent { function readSSEStream (line 293) | async function readSSEStream(response: Response): Promise { type TypedSSEEvent (line 345) | interface TypedSSEEvent { function readSSEStreamRaw (line 359) | async function readSSEStreamRaw(response: Response): Promise { function parseTypedSSEEvents (line 380) | function parseTypedSSEEvents( type SSEStreamResult (line 398) | interface SSEStreamResult { function readTypedSSEStream (line 414) | async function readTypedSSEStream( function readTypedSSEStreamWithContext (line 425) | async function readTypedSSEStreamWithContext( function assertWithContext (line 463) | function assertWithContext( function assertEventExists (line 476) | function assertEventExists( function assertHttpStatus (line 493) | function assertHttpStatus( type FetchResult (line 512) | interface FetchResult { function fetchWithContext (line 533) | async function fetchWithContext( function assertFetchOk (line 606) | function assertFetchOk( function assertFetchStatus (line 619) | function assertFetchStatus( FILE: packages/server-v4/test/integration/v4/browsersession.test.ts type BrowserSessionRecord (line 16) | interface BrowserSessionRecord { type BrowserSessionResponse (line 25) | interface BrowserSessionResponse { FILE: packages/server-v4/test/integration/v4/page.test.ts type PageActionRecord (line 21) | interface PageActionRecord { type PageActionResponse (line 34) | interface PageActionResponse { constant GOTO_TEST_URL (line 45) | const GOTO_TEST_URL = `data:text/html;charset=utf-8,${encodeURIComponent(` constant CLICK_TEST_URL (line 58) | const CLICK_TEST_URL = `data:text/html;charset=utf-8,${encodeURIComponent(` constant METHODS_TEST_URL (line 77) | const METHODS_TEST_URL = `data:text/html;charset=utf-8,${encodeURICompon... function withSessionPage (line 141) | async function withSessionPage( function postPageRoute (line 160) | async function postPageRoute( function getPageRoute (line 178) | async function getPageRoute( function assertSuccessAction (line 199) | function assertSuccessAction( function assertSuccessActionList (line 222) | function assertSuccessActionList(