@browserbasehq/orca 3.0.0-preview.6 → 3.0.0-test.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/index.d.ts +175 -87
  2. package/dist/index.js +2339 -1596
  3. package/package.json +7 -4
package/dist/index.d.ts CHANGED
@@ -1,17 +1,17 @@
1
- import { ZodType, z, ZodError, ZodTypeAny } from 'zod/v3';
1
+ import { ZodType, z, ZodError, ZodTypeAny } from 'zod';
2
2
  import { ClientOptions as ClientOptions$2 } from '@anthropic-ai/sdk';
3
3
  import { LanguageModelV2 } from '@ai-sdk/provider';
4
4
  import { ClientOptions as ClientOptions$1 } from 'openai';
5
5
  import { generateObject, generateText, streamText, streamObject, experimental_generateImage, embed, embedMany, experimental_transcribe, experimental_generateSpeech, ToolSet } from 'ai';
6
- import { Protocol } from 'devtools-protocol';
7
- import { Buffer as Buffer$1 } from 'buffer';
6
+ import { Client, ClientOptions as ClientOptions$3 } from '@modelcontextprotocol/sdk/client/index.js';
8
7
  import { Page as Page$1 } from 'playwright-core';
9
8
  export { Page as PlaywrightPage } from 'playwright-core';
10
- import { Page as Page$3 } from 'patchright-core';
11
- export { Page as PatchrightPage } from 'patchright-core';
12
9
  import { Page as Page$2 } from 'puppeteer-core';
13
10
  export { Page as PuppeteerPage } from 'puppeteer-core';
14
- import { Client, ClientOptions as ClientOptions$3 } from '@modelcontextprotocol/sdk/client/index.js';
11
+ import { Page as Page$3 } from 'patchright-core';
12
+ export { Page as PatchrightPage } from 'patchright-core';
13
+ import { Protocol } from 'devtools-protocol';
14
+ import { Buffer as Buffer$1 } from 'buffer';
15
15
  import Browserbase from '@browserbasehq/sdk';
16
16
  import { ToolSet as ToolSet$1 } from 'ai/dist';
17
17
  import { Schema } from '@google/genai';
@@ -140,6 +140,14 @@ interface CreateChatCompletionOptions {
140
140
  logger: (message: LogLine) => void;
141
141
  retries?: number;
142
142
  }
143
+ interface LLMParsedResponse<T> {
144
+ data: T;
145
+ usage?: {
146
+ prompt_tokens: number;
147
+ completion_tokens: number;
148
+ total_tokens: number;
149
+ };
150
+ }
143
151
  declare abstract class LLMClient {
144
152
  type: "openai" | "anthropic" | "cerebras" | "groq" | (string & {});
145
153
  modelName: AvailableModel | (string & {});
@@ -147,9 +155,15 @@ declare abstract class LLMClient {
147
155
  clientOptions: ClientOptions;
148
156
  userProvidedInstructions?: string;
149
157
  constructor(modelName: AvailableModel, userProvidedInstructions?: string);
150
- abstract createChatCompletion<T = LLMResponse & {
151
- usage?: LLMResponse["usage"];
152
- }>(options: CreateChatCompletionOptions): Promise<T>;
158
+ abstract createChatCompletion<T>(options: CreateChatCompletionOptions & {
159
+ options: {
160
+ response_model: {
161
+ name: string;
162
+ schema: ZodType;
163
+ };
164
+ };
165
+ }): Promise<LLMParsedResponse<T>>;
166
+ abstract createChatCompletion<T = LLMResponse>(options: CreateChatCompletionOptions): Promise<T>;
153
167
  generateObject: typeof generateObject;
154
168
  generateText: typeof generateText;
155
169
  streamText: typeof streamText;
@@ -522,6 +536,15 @@ declare class DeepLocatorDelegate {
522
536
  composed?: boolean;
523
537
  detail?: number;
524
538
  }): Promise<void>;
539
+ setInputFiles(files: string | string[] | {
540
+ name: string;
541
+ mimeType: string;
542
+ buffer: ArrayBuffer | Uint8Array | Buffer | string;
543
+ } | Array<{
544
+ name: string;
545
+ mimeType: string;
546
+ buffer: ArrayBuffer | Uint8Array | Buffer | string;
547
+ }>): Promise<void>;
525
548
  first(): DeepLocatorDelegate;
526
549
  nth(index: number): DeepLocatorDelegate;
527
550
  }
@@ -573,6 +596,27 @@ declare class LocatorDelegate {
573
596
  type AnyPage = Page$1 | Page$2 | Page$3 | Page;
574
597
  type LoadState = "load" | "domcontentloaded" | "networkidle";
575
598
 
599
+ declare class StagehandAPIClient {
600
+ private apiKey;
601
+ private projectId;
602
+ private sessionId?;
603
+ private modelApiKey;
604
+ private logger;
605
+ private fetchWithCookies;
606
+ constructor({ apiKey, projectId, logger }: StagehandAPIConstructorParams);
607
+ init({ modelName, modelApiKey, domSettleTimeoutMs, verbose, systemPrompt, selfHeal, browserbaseSessionCreateParams, browserbaseSessionID, }: StartSessionParams): Promise<StartSessionResult>;
608
+ act({ input, options, frameId }: APIActParameters): Promise<ActResult>;
609
+ extract<T extends z.ZodObject>({ instruction, schema: zodSchema, options, frameId, }: APIExtractParameters): Promise<ExtractResult<T>>;
610
+ observe({ instruction, options, frameId, }: APIObserveParameters): Promise<Action[]>;
611
+ goto(url: string, options?: {
612
+ waitUntil?: "load" | "domcontentloaded" | "networkidle";
613
+ }, frameId?: string): Promise<void>;
614
+ agentExecute(agentConfig: AgentConfig, executeOptions: AgentExecuteOptions | string, frameId?: string): Promise<AgentResult>;
615
+ end(): Promise<Response>;
616
+ private execute;
617
+ private request;
618
+ }
619
+
576
620
  declare class Page {
577
621
  private readonly conn;
578
622
  private readonly mainSession;
@@ -592,7 +636,11 @@ declare class Page {
592
636
  private readonly pageId;
593
637
  /** Cached current URL for synchronous page.url() */
594
638
  private _currentUrl;
639
+ private navigationCommandSeq;
640
+ private latestNavigationCommandId;
595
641
  private readonly networkManager;
642
+ /** Optional API client for routing page operations to the API */
643
+ private readonly apiClient;
596
644
  private constructor();
597
645
  private cursorEnabled;
598
646
  private ensureCursorScript;
@@ -602,7 +650,7 @@ declare class Page {
602
650
  * Factory: create Page and seed registry with the shallow tree from Page.getFrameTree.
603
651
  * Assumes Page domain is already enabled on the session passed in.
604
652
  */
605
- static create(conn: CdpConnection, session: CDPSessionLike, targetId: string): Promise<Page>;
653
+ static create(conn: CdpConnection, session: CDPSessionLike, targetId: string, apiClient?: StagehandAPIClient | null, localBrowserLaunchOptions?: LocalBrowserLaunchOptions | null): Promise<Page>;
606
654
  /**
607
655
  * Parent/child session emitted a `frameAttached`.
608
656
  * Topology update + ownership stamped to **emitting session**.
@@ -682,6 +730,8 @@ declare class Page {
682
730
  * Return the current page URL (synchronous, cached from navigation events).
683
731
  */
684
732
  url(): string;
733
+ private beginNavigationCommand;
734
+ isCurrentNavigationCommand(id: number): boolean;
685
735
  /**
686
736
  * Return the current page title.
687
737
  * Prefers reading from the active document via Runtime.evaluate to reflect dynamic changes.
@@ -840,65 +890,6 @@ declare class Page {
840
890
  waitForMainLoadState(state: LoadState, timeoutMs?: number): Promise<void>;
841
891
  }
842
892
 
843
- /**
844
- * Represents a path through a Zod schema from the root object down to a
845
- * particular field. The `segments` array describes the chain of keys/indices.
846
- *
847
- * - **String** segments indicate object property names.
848
- * - **Number** segments indicate array indices.
849
- *
850
- * For example, `["users", 0, "homepage"]` might describe reaching
851
- * the `homepage` field in `schema.users[0].homepage`.
852
- */
853
- interface ZodPathSegments {
854
- /**
855
- * The ordered list of keys/indices leading from the schema root
856
- * to the targeted field.
857
- */
858
- segments: Array<string | number>;
859
- }
860
-
861
- type EvaluateOptions = {
862
- /** The question to ask about the task state */
863
- question: string;
864
- /** The answer to the question */
865
- answer?: string;
866
- /** Whether to take a screenshot of the task state, or array of screenshots to evaluate */
867
- screenshot?: boolean | Buffer[];
868
- /** Custom system prompt for the evaluator */
869
- systemPrompt?: string;
870
- /** Delay in milliseconds before taking the screenshot @default 250 */
871
- screenshotDelayMs?: number;
872
- /** The agent's reasoning/thought process for completing the task */
873
- agentReasoning?: string;
874
- };
875
- type BatchAskOptions = {
876
- /** Array of questions with optional answers */
877
- questions: Array<{
878
- question: string;
879
- answer?: string;
880
- }>;
881
- /** Whether to take a screenshot of the task state */
882
- screenshot?: boolean;
883
- /** Custom system prompt for the evaluator */
884
- systemPrompt?: string;
885
- /** Delay in milliseconds before taking the screenshot @default 1000 */
886
- screenshotDelayMs?: number;
887
- };
888
- /**
889
- * Result of an evaluation
890
- */
891
- interface EvaluationResult {
892
- /**
893
- * The evaluation result ('YES', 'NO', or 'INVALID' if parsing failed or value was unexpected)
894
- */
895
- evaluation: "YES" | "NO" | "INVALID";
896
- /**
897
- * The reasoning behind the evaluation
898
- */
899
- reasoning: string;
900
- }
901
-
902
893
  interface AgentAction {
903
894
  type: string;
904
895
  reasoning?: string;
@@ -1084,7 +1075,7 @@ interface ActResult {
1084
1075
  actionDescription: string;
1085
1076
  actions: Action[];
1086
1077
  }
1087
- type ExtractResult<T extends z.AnyZodObject> = z.infer<T>;
1078
+ type ExtractResult<T extends z.ZodObject> = z.infer<T>;
1088
1079
  interface Action {
1089
1080
  selector: string;
1090
1081
  description: string;
@@ -1092,7 +1083,7 @@ interface Action {
1092
1083
  arguments?: string[];
1093
1084
  }
1094
1085
  interface HistoryEntry {
1095
- method: "act" | "extract" | "observe" | "navigate";
1086
+ method: "act" | "extract" | "observe" | "navigate" | "agent";
1096
1087
  parameters: unknown;
1097
1088
  result: unknown;
1098
1089
  timestamp: string;
@@ -1105,18 +1096,10 @@ interface ExtractOptions {
1105
1096
  }
1106
1097
  declare const defaultExtractSchema: z.ZodObject<{
1107
1098
  extraction: z.ZodString;
1108
- }, "strip", z.ZodTypeAny, {
1109
- extraction?: string;
1110
- }, {
1111
- extraction?: string;
1112
- }>;
1099
+ }, z.core.$strip>;
1113
1100
  declare const pageTextSchema: z.ZodObject<{
1114
1101
  pageText: z.ZodString;
1115
- }, "strip", z.ZodTypeAny, {
1116
- pageText?: string;
1117
- }, {
1118
- pageText?: string;
1119
- }>;
1102
+ }, z.core.$strip>;
1120
1103
  interface ObserveOptions {
1121
1104
  model?: ModelConfiguration;
1122
1105
  timeout?: number;
@@ -1130,7 +1113,7 @@ declare enum V3FunctionName {
1130
1113
  AGENT = "AGENT"
1131
1114
  }
1132
1115
 
1133
- interface V3Metrics {
1116
+ interface StagehandMetrics {
1134
1117
  actPromptTokens: number;
1135
1118
  actCompletionTokens: number;
1136
1119
  actInferenceTimeMs: number;
@@ -1207,6 +1190,7 @@ interface V3Options {
1207
1190
  /** Directory used to persist cached actions for act(). */
1208
1191
  cacheDir?: string;
1209
1192
  domSettleTimeout?: number;
1193
+ disableAPI?: boolean;
1210
1194
  }
1211
1195
 
1212
1196
  declare class StagehandError extends Error {
@@ -1313,6 +1297,103 @@ declare class StagehandShadowSegmentNotFoundError extends StagehandError {
1313
1297
  constructor(segment: string, hint?: string);
1314
1298
  }
1315
1299
 
1300
+ interface StagehandAPIConstructorParams {
1301
+ apiKey: string;
1302
+ projectId: string;
1303
+ logger: (message: LogLine) => void;
1304
+ }
1305
+ interface StartSessionParams {
1306
+ modelName: string;
1307
+ modelApiKey: string;
1308
+ domSettleTimeoutMs: number;
1309
+ verbose: number;
1310
+ systemPrompt?: string;
1311
+ browserbaseSessionCreateParams?: Omit<Browserbase.Sessions.SessionCreateParams, "projectId"> & {
1312
+ projectId?: string;
1313
+ };
1314
+ selfHeal?: boolean;
1315
+ browserbaseSessionID?: string;
1316
+ }
1317
+ interface StartSessionResult {
1318
+ sessionId: string;
1319
+ available?: boolean;
1320
+ }
1321
+ interface APIActParameters {
1322
+ input: string | Action;
1323
+ options?: ActOptions;
1324
+ frameId?: string;
1325
+ }
1326
+ interface APIExtractParameters {
1327
+ instruction?: string;
1328
+ schema?: ZodTypeAny;
1329
+ options?: ExtractOptions;
1330
+ frameId?: string;
1331
+ }
1332
+ interface APIObserveParameters {
1333
+ instruction?: string;
1334
+ options?: ObserveOptions;
1335
+ frameId?: string;
1336
+ }
1337
+
1338
+ /**
1339
+ * Represents a path through a Zod schema from the root object down to a
1340
+ * particular field. The `segments` array describes the chain of keys/indices.
1341
+ *
1342
+ * - **String** segments indicate object property names.
1343
+ * - **Number** segments indicate array indices.
1344
+ *
1345
+ * For example, `["users", 0, "homepage"]` might describe reaching
1346
+ * the `homepage` field in `schema.users[0].homepage`.
1347
+ */
1348
+ interface ZodPathSegments {
1349
+ /**
1350
+ * The ordered list of keys/indices leading from the schema root
1351
+ * to the targeted field.
1352
+ */
1353
+ segments: Array<string | number>;
1354
+ }
1355
+
1356
+ type EvaluateOptions = {
1357
+ /** The question to ask about the task state */
1358
+ question: string;
1359
+ /** The answer to the question */
1360
+ answer?: string;
1361
+ /** Whether to take a screenshot of the task state, or array of screenshots to evaluate */
1362
+ screenshot?: boolean | Buffer[];
1363
+ /** Custom system prompt for the evaluator */
1364
+ systemPrompt?: string;
1365
+ /** Delay in milliseconds before taking the screenshot @default 250 */
1366
+ screenshotDelayMs?: number;
1367
+ /** The agent's reasoning/thought process for completing the task */
1368
+ agentReasoning?: string;
1369
+ };
1370
+ type BatchAskOptions = {
1371
+ /** Array of questions with optional answers */
1372
+ questions: Array<{
1373
+ question: string;
1374
+ answer?: string;
1375
+ }>;
1376
+ /** Whether to take a screenshot of the task state */
1377
+ screenshot?: boolean;
1378
+ /** Custom system prompt for the evaluator */
1379
+ systemPrompt?: string;
1380
+ /** Delay in milliseconds before taking the screenshot @default 1000 */
1381
+ screenshotDelayMs?: number;
1382
+ };
1383
+ /**
1384
+ * Result of an evaluation
1385
+ */
1386
+ interface EvaluationResult {
1387
+ /**
1388
+ * The evaluation result ('YES', 'NO', or 'INVALID' if parsing failed or value was unexpected)
1389
+ */
1390
+ evaluation: "YES" | "NO" | "INVALID";
1391
+ /**
1392
+ * The reasoning behind the evaluation
1393
+ */
1394
+ reasoning: string;
1395
+ }
1396
+
1316
1397
  /**
1317
1398
  * V3Context
1318
1399
  *
@@ -1327,6 +1408,8 @@ declare class StagehandShadowSegmentNotFoundError extends StagehandError {
1327
1408
  declare class V3Context {
1328
1409
  readonly conn: CdpConnection;
1329
1410
  private readonly env;
1411
+ private readonly apiClient;
1412
+ private readonly localBrowserLaunchOptions;
1330
1413
  private constructor();
1331
1414
  private readonly _piercerInstalled;
1332
1415
  private _lastPopupSignalAt;
@@ -1346,6 +1429,8 @@ declare class V3Context {
1346
1429
  */
1347
1430
  static create(wsUrl: string, opts?: {
1348
1431
  env?: "LOCAL" | "BROWSERBASE";
1432
+ apiClient?: StagehandAPIClient | null;
1433
+ localBrowserLaunchOptions?: LocalBrowserLaunchOptions | null;
1349
1434
  }): Promise<V3Context>;
1350
1435
  /**
1351
1436
  * Wait until at least one top-level Page has been created and registered.
@@ -1509,8 +1594,10 @@ declare class V3 {
1509
1594
  private _onCdpClosed;
1510
1595
  readonly experimental: boolean;
1511
1596
  readonly logInferenceToFile: boolean;
1597
+ readonly disableAPI: boolean;
1512
1598
  private externalLogger?;
1513
1599
  verbose: 0 | 1 | 2;
1600
+ private stagehandLogger;
1514
1601
  private _history;
1515
1602
  private readonly instanceId;
1516
1603
  private static _processGuardsInstalled;
@@ -1518,12 +1605,14 @@ declare class V3 {
1518
1605
  private cacheStorage;
1519
1606
  private actCache;
1520
1607
  private agentCache;
1521
- v3Metrics: V3Metrics;
1608
+ private apiClient;
1609
+ stagehandMetrics: StagehandMetrics;
1610
+ constructor(opts: V3Options);
1522
1611
  /**
1523
1612
  * Async property for metrics so callers can `await v3.metrics`.
1524
1613
  * Returning a Promise future-proofs async aggregation/storage.
1525
1614
  */
1526
- get metrics(): Promise<V3Metrics>;
1615
+ get metrics(): Promise<StagehandMetrics>;
1527
1616
  private resolveLlmClient;
1528
1617
  private beginAgentReplayRecording;
1529
1618
  private endAgentReplayRecording;
@@ -1539,7 +1628,6 @@ declare class V3 {
1539
1628
  addToHistory(method: HistoryEntry["method"], parameters: unknown, result?: unknown): void;
1540
1629
  updateMetrics(functionName: V3FunctionName, promptTokens: number, completionTokens: number, inferenceTimeMs: number): void;
1541
1630
  private updateTotalMetrics;
1542
- constructor(opts: V3Options);
1543
1631
  private _immediateShutdown;
1544
1632
  private static _installProcessGuards;
1545
1633
  /**
@@ -1676,7 +1764,7 @@ declare function injectUrls(obj: unknown, path: Array<string | number>, idToUrlM
1676
1764
  /**
1677
1765
  * Mapping from LLM provider names to their corresponding environment variable names for API keys.
1678
1766
  */
1679
- declare const providerEnvVarMap: Partial<Record<ModelProvider | string, string>>;
1767
+ declare const providerEnvVarMap: Partial<Record<ModelProvider | string, string | Array<string>>>;
1680
1768
  /**
1681
1769
  * Loads an API key for a provider, checking environment variables.
1682
1770
  * @param provider The name of the provider (e.g., 'openai', 'anthropic')
@@ -1734,4 +1822,4 @@ declare class V3Evaluator {
1734
1822
  private _evaluateWithMultipleScreenshots;
1735
1823
  }
1736
1824
 
1737
- export { type AISDKCustomProvider, type AISDKProvider, AVAILABLE_CUA_MODELS, type ActOptions, type ActResult, type Action, type ActionExecutionResult, type AgentAction, type AgentConfig, type AgentExecuteOptions, type AgentExecutionOptions, type AgentHandlerOptions, type AgentInstance, type AgentModelConfig, AgentProvider, type AgentProviderType, type AgentResult, AgentScreenshotProviderError, type AgentType, AnnotatedScreenshotText, type AnthropicContentBlock, type AnthropicJsonSchemaObject, type AnthropicMessage, type AnthropicTextBlock, type AnthropicToolResult, type AnyPage, type AvailableCuaModel, type AvailableModel, BrowserbaseSessionNotFoundError, CaptchaTimeoutError, type ChatCompletionOptions, type ChatMessage, type ChatMessageContent, type ChatMessageImageContent, type ChatMessageTextContent, type ClientOptions, type ComputerCallItem, ContentFrameNotFoundError, type CreateChatCompletionOptions, CreateChatCompletionResponseError, ExperimentalApiConflictError, ExperimentalNotConfiguredError, type ExtractOptions, type ExtractResult, type FunctionCallItem, HandlerNotInitializedError, type HistoryEntry, InvalidAISDKModelFormatError, type JsonSchema, type JsonSchemaProperty, LLMClient, type LLMResponse, LLMResponseError, type LLMTool, LOG_LEVEL_NAMES, type LoadState, type LocalBrowserLaunchOptions, type LogLevel, type LogLine, type Logger, MCPConnectionError, MissingEnvironmentVariableError, MissingLLMConfigurationError, type ModelConfiguration, type ModelProvider, type ObserveOptions, type ResponseInputItem, type ResponseItem, V3 as Stagehand, StagehandAPIError, StagehandAPIUnauthorizedError, StagehandClickError, StagehandDefaultError, StagehandDomProcessError, StagehandElementNotFoundError, StagehandEnvironmentError, StagehandError, StagehandEvalError, StagehandHttpError, StagehandIframeError, StagehandInitError, StagehandInvalidArgumentError, StagehandMissingArgumentError, StagehandNotInitializedError, StagehandResponseBodyError, StagehandResponseParseError, StagehandServerError, StagehandShadowRootMissingError, StagehandShadowSegmentEmptyError, StagehandShadowSegmentNotFoundError, type ToolUseItem, UnsupportedAISDKModelProviderError, UnsupportedModelError, UnsupportedModelProviderError, V3, type V3Env, V3Evaluator, V3FunctionName, type V3Metrics, type V3Options, XPathResolutionError, ZodSchemaValidationError, connectToMCPServer, defaultExtractSchema, getZodType, injectUrls, isRunningInBun, jsonSchemaToZod, loadApiKeyFromEnv, modelToAgentProviderMap, pageTextSchema, providerEnvVarMap, toGeminiSchema, transformSchema, trimTrailingTextNode, validateZodSchema };
1825
+ export { type AISDKCustomProvider, type AISDKProvider, AVAILABLE_CUA_MODELS, type ActOptions, type ActResult, type Action, type ActionExecutionResult, type AgentAction, type AgentConfig, type AgentExecuteOptions, type AgentExecutionOptions, type AgentHandlerOptions, type AgentInstance, type AgentModelConfig, AgentProvider, type AgentProviderType, type AgentResult, AgentScreenshotProviderError, type AgentType, AnnotatedScreenshotText, type AnthropicContentBlock, type AnthropicJsonSchemaObject, type AnthropicMessage, type AnthropicTextBlock, type AnthropicToolResult, type AnyPage, type AvailableCuaModel, type AvailableModel, BrowserbaseSessionNotFoundError, CaptchaTimeoutError, type ChatCompletionOptions, type ChatMessage, type ChatMessageContent, type ChatMessageImageContent, type ChatMessageTextContent, type ClientOptions, type ComputerCallItem, ContentFrameNotFoundError, type CreateChatCompletionOptions, CreateChatCompletionResponseError, ExperimentalApiConflictError, ExperimentalNotConfiguredError, type ExtractOptions, type ExtractResult, type FunctionCallItem, HandlerNotInitializedError, type HistoryEntry, InvalidAISDKModelFormatError, type JsonSchema, type JsonSchemaProperty, LLMClient, type LLMParsedResponse, type LLMResponse, LLMResponseError, type LLMTool, LOG_LEVEL_NAMES, type LoadState, type LocalBrowserLaunchOptions, type LogLevel, type LogLine, type Logger, MCPConnectionError, MissingEnvironmentVariableError, MissingLLMConfigurationError, type ModelConfiguration, type ModelProvider, type ObserveOptions, type ResponseInputItem, type ResponseItem, V3 as Stagehand, StagehandAPIError, StagehandAPIUnauthorizedError, StagehandClickError, StagehandDefaultError, StagehandDomProcessError, StagehandElementNotFoundError, StagehandEnvironmentError, StagehandError, StagehandEvalError, StagehandHttpError, StagehandIframeError, StagehandInitError, StagehandInvalidArgumentError, type StagehandMetrics, StagehandMissingArgumentError, StagehandNotInitializedError, StagehandResponseBodyError, StagehandResponseParseError, StagehandServerError, StagehandShadowRootMissingError, StagehandShadowSegmentEmptyError, StagehandShadowSegmentNotFoundError, type ToolUseItem, UnsupportedAISDKModelProviderError, UnsupportedModelError, UnsupportedModelProviderError, V3, type V3Env, V3Evaluator, V3FunctionName, type V3Options, XPathResolutionError, ZodSchemaValidationError, connectToMCPServer, defaultExtractSchema, getZodType, injectUrls, isRunningInBun, jsonSchemaToZod, loadApiKeyFromEnv, modelToAgentProviderMap, pageTextSchema, providerEnvVarMap, toGeminiSchema, transformSchema, trimTrailingTextNode, validateZodSchema };