@browserbasehq/orca 3.0.0-preview.6 → 3.0.0-preview.8

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 +170 -88
  2. package/dist/index.js +2087 -1400
  3. package/package.json +5 -1
package/dist/index.d.ts CHANGED
@@ -1,17 +1,17 @@
1
- import { ZodType, z, ZodError, ZodTypeAny } from 'zod/v3';
1
+ import z, { ZodType, z as z$1, ZodError, ZodTypeAny } from 'zod/v3';
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';
@@ -522,6 +522,15 @@ declare class DeepLocatorDelegate {
522
522
  composed?: boolean;
523
523
  detail?: number;
524
524
  }): Promise<void>;
525
+ setInputFiles(files: string | string[] | {
526
+ name: string;
527
+ mimeType: string;
528
+ buffer: ArrayBuffer | Uint8Array | Buffer | string;
529
+ } | Array<{
530
+ name: string;
531
+ mimeType: string;
532
+ buffer: ArrayBuffer | Uint8Array | Buffer | string;
533
+ }>): Promise<void>;
525
534
  first(): DeepLocatorDelegate;
526
535
  nth(index: number): DeepLocatorDelegate;
527
536
  }
@@ -573,6 +582,27 @@ declare class LocatorDelegate {
573
582
  type AnyPage = Page$1 | Page$2 | Page$3 | Page;
574
583
  type LoadState = "load" | "domcontentloaded" | "networkidle";
575
584
 
585
+ declare class StagehandAPIClient {
586
+ private apiKey;
587
+ private projectId;
588
+ private sessionId?;
589
+ private modelApiKey;
590
+ private logger;
591
+ private fetchWithCookies;
592
+ constructor({ apiKey, projectId, logger }: StagehandAPIConstructorParams);
593
+ init({ modelName, modelApiKey, domSettleTimeoutMs, verbose, systemPrompt, selfHeal, browserbaseSessionCreateParams, browserbaseSessionID, }: StartSessionParams): Promise<StartSessionResult>;
594
+ act({ input, options, frameId }: APIActParameters): Promise<ActResult>;
595
+ extract<T extends z.AnyZodObject>({ instruction, schema: zodSchema, options, frameId, }: APIExtractParameters): Promise<ExtractResult<T>>;
596
+ observe({ instruction, options, frameId, }: APIObserveParameters): Promise<Action[]>;
597
+ goto(url: string, options?: {
598
+ waitUntil?: "load" | "domcontentloaded" | "networkidle";
599
+ }, frameId?: string): Promise<void>;
600
+ agentExecute(agentConfig: AgentConfig, executeOptions: AgentExecuteOptions | string, frameId?: string): Promise<AgentResult>;
601
+ end(): Promise<Response>;
602
+ private execute;
603
+ private request;
604
+ }
605
+
576
606
  declare class Page {
577
607
  private readonly conn;
578
608
  private readonly mainSession;
@@ -592,7 +622,11 @@ declare class Page {
592
622
  private readonly pageId;
593
623
  /** Cached current URL for synchronous page.url() */
594
624
  private _currentUrl;
625
+ private navigationCommandSeq;
626
+ private latestNavigationCommandId;
595
627
  private readonly networkManager;
628
+ /** Optional API client for routing page operations to the API */
629
+ private readonly apiClient;
596
630
  private constructor();
597
631
  private cursorEnabled;
598
632
  private ensureCursorScript;
@@ -602,7 +636,7 @@ declare class Page {
602
636
  * Factory: create Page and seed registry with the shallow tree from Page.getFrameTree.
603
637
  * Assumes Page domain is already enabled on the session passed in.
604
638
  */
605
- static create(conn: CdpConnection, session: CDPSessionLike, targetId: string): Promise<Page>;
639
+ static create(conn: CdpConnection, session: CDPSessionLike, targetId: string, apiClient?: StagehandAPIClient | null, localBrowserLaunchOptions?: LocalBrowserLaunchOptions | null): Promise<Page>;
606
640
  /**
607
641
  * Parent/child session emitted a `frameAttached`.
608
642
  * Topology update + ownership stamped to **emitting session**.
@@ -682,6 +716,8 @@ declare class Page {
682
716
  * Return the current page URL (synchronous, cached from navigation events).
683
717
  */
684
718
  url(): string;
719
+ private beginNavigationCommand;
720
+ isCurrentNavigationCommand(id: number): boolean;
685
721
  /**
686
722
  * Return the current page title.
687
723
  * Prefers reading from the active document via Runtime.evaluate to reflect dynamic changes.
@@ -840,65 +876,6 @@ declare class Page {
840
876
  waitForMainLoadState(state: LoadState, timeoutMs?: number): Promise<void>;
841
877
  }
842
878
 
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
879
  interface AgentAction {
903
880
  type: string;
904
881
  reasoning?: string;
@@ -1084,7 +1061,7 @@ interface ActResult {
1084
1061
  actionDescription: string;
1085
1062
  actions: Action[];
1086
1063
  }
1087
- type ExtractResult<T extends z.AnyZodObject> = z.infer<T>;
1064
+ type ExtractResult<T extends z$1.AnyZodObject> = z$1.infer<T>;
1088
1065
  interface Action {
1089
1066
  selector: string;
1090
1067
  description: string;
@@ -1092,7 +1069,7 @@ interface Action {
1092
1069
  arguments?: string[];
1093
1070
  }
1094
1071
  interface HistoryEntry {
1095
- method: "act" | "extract" | "observe" | "navigate";
1072
+ method: "act" | "extract" | "observe" | "navigate" | "agent";
1096
1073
  parameters: unknown;
1097
1074
  result: unknown;
1098
1075
  timestamp: string;
@@ -1103,16 +1080,16 @@ interface ExtractOptions {
1103
1080
  selector?: string;
1104
1081
  page?: Page$1 | Page$2 | Page$3 | Page;
1105
1082
  }
1106
- declare const defaultExtractSchema: z.ZodObject<{
1107
- extraction: z.ZodString;
1108
- }, "strip", z.ZodTypeAny, {
1083
+ declare const defaultExtractSchema: z$1.ZodObject<{
1084
+ extraction: z$1.ZodString;
1085
+ }, "strip", z$1.ZodTypeAny, {
1109
1086
  extraction?: string;
1110
1087
  }, {
1111
1088
  extraction?: string;
1112
1089
  }>;
1113
- declare const pageTextSchema: z.ZodObject<{
1114
- pageText: z.ZodString;
1115
- }, "strip", z.ZodTypeAny, {
1090
+ declare const pageTextSchema: z$1.ZodObject<{
1091
+ pageText: z$1.ZodString;
1092
+ }, "strip", z$1.ZodTypeAny, {
1116
1093
  pageText?: string;
1117
1094
  }, {
1118
1095
  pageText?: string;
@@ -1130,7 +1107,7 @@ declare enum V3FunctionName {
1130
1107
  AGENT = "AGENT"
1131
1108
  }
1132
1109
 
1133
- interface V3Metrics {
1110
+ interface StagehandMetrics {
1134
1111
  actPromptTokens: number;
1135
1112
  actCompletionTokens: number;
1136
1113
  actInferenceTimeMs: number;
@@ -1207,6 +1184,7 @@ interface V3Options {
1207
1184
  /** Directory used to persist cached actions for act(). */
1208
1185
  cacheDir?: string;
1209
1186
  domSettleTimeout?: number;
1187
+ disableAPI?: boolean;
1210
1188
  }
1211
1189
 
1212
1190
  declare class StagehandError extends Error {
@@ -1313,6 +1291,103 @@ declare class StagehandShadowSegmentNotFoundError extends StagehandError {
1313
1291
  constructor(segment: string, hint?: string);
1314
1292
  }
1315
1293
 
1294
+ interface StagehandAPIConstructorParams {
1295
+ apiKey: string;
1296
+ projectId: string;
1297
+ logger: (message: LogLine) => void;
1298
+ }
1299
+ interface StartSessionParams {
1300
+ modelName: string;
1301
+ modelApiKey: string;
1302
+ domSettleTimeoutMs: number;
1303
+ verbose: number;
1304
+ systemPrompt?: string;
1305
+ browserbaseSessionCreateParams?: Omit<Browserbase.Sessions.SessionCreateParams, "projectId"> & {
1306
+ projectId?: string;
1307
+ };
1308
+ selfHeal?: boolean;
1309
+ browserbaseSessionID?: string;
1310
+ }
1311
+ interface StartSessionResult {
1312
+ sessionId: string;
1313
+ available?: boolean;
1314
+ }
1315
+ interface APIActParameters {
1316
+ input: string | Action;
1317
+ options?: ActOptions;
1318
+ frameId?: string;
1319
+ }
1320
+ interface APIExtractParameters {
1321
+ instruction?: string;
1322
+ schema?: ZodTypeAny;
1323
+ options?: ExtractOptions;
1324
+ frameId?: string;
1325
+ }
1326
+ interface APIObserveParameters {
1327
+ instruction?: string;
1328
+ options?: ObserveOptions;
1329
+ frameId?: string;
1330
+ }
1331
+
1332
+ /**
1333
+ * Represents a path through a Zod schema from the root object down to a
1334
+ * particular field. The `segments` array describes the chain of keys/indices.
1335
+ *
1336
+ * - **String** segments indicate object property names.
1337
+ * - **Number** segments indicate array indices.
1338
+ *
1339
+ * For example, `["users", 0, "homepage"]` might describe reaching
1340
+ * the `homepage` field in `schema.users[0].homepage`.
1341
+ */
1342
+ interface ZodPathSegments {
1343
+ /**
1344
+ * The ordered list of keys/indices leading from the schema root
1345
+ * to the targeted field.
1346
+ */
1347
+ segments: Array<string | number>;
1348
+ }
1349
+
1350
+ type EvaluateOptions = {
1351
+ /** The question to ask about the task state */
1352
+ question: string;
1353
+ /** The answer to the question */
1354
+ answer?: string;
1355
+ /** Whether to take a screenshot of the task state, or array of screenshots to evaluate */
1356
+ screenshot?: boolean | Buffer[];
1357
+ /** Custom system prompt for the evaluator */
1358
+ systemPrompt?: string;
1359
+ /** Delay in milliseconds before taking the screenshot @default 250 */
1360
+ screenshotDelayMs?: number;
1361
+ /** The agent's reasoning/thought process for completing the task */
1362
+ agentReasoning?: string;
1363
+ };
1364
+ type BatchAskOptions = {
1365
+ /** Array of questions with optional answers */
1366
+ questions: Array<{
1367
+ question: string;
1368
+ answer?: string;
1369
+ }>;
1370
+ /** Whether to take a screenshot of the task state */
1371
+ screenshot?: boolean;
1372
+ /** Custom system prompt for the evaluator */
1373
+ systemPrompt?: string;
1374
+ /** Delay in milliseconds before taking the screenshot @default 1000 */
1375
+ screenshotDelayMs?: number;
1376
+ };
1377
+ /**
1378
+ * Result of an evaluation
1379
+ */
1380
+ interface EvaluationResult {
1381
+ /**
1382
+ * The evaluation result ('YES', 'NO', or 'INVALID' if parsing failed or value was unexpected)
1383
+ */
1384
+ evaluation: "YES" | "NO" | "INVALID";
1385
+ /**
1386
+ * The reasoning behind the evaluation
1387
+ */
1388
+ reasoning: string;
1389
+ }
1390
+
1316
1391
  /**
1317
1392
  * V3Context
1318
1393
  *
@@ -1327,6 +1402,8 @@ declare class StagehandShadowSegmentNotFoundError extends StagehandError {
1327
1402
  declare class V3Context {
1328
1403
  readonly conn: CdpConnection;
1329
1404
  private readonly env;
1405
+ private readonly apiClient;
1406
+ private readonly localBrowserLaunchOptions;
1330
1407
  private constructor();
1331
1408
  private readonly _piercerInstalled;
1332
1409
  private _lastPopupSignalAt;
@@ -1346,6 +1423,8 @@ declare class V3Context {
1346
1423
  */
1347
1424
  static create(wsUrl: string, opts?: {
1348
1425
  env?: "LOCAL" | "BROWSERBASE";
1426
+ apiClient?: StagehandAPIClient | null;
1427
+ localBrowserLaunchOptions?: LocalBrowserLaunchOptions | null;
1349
1428
  }): Promise<V3Context>;
1350
1429
  /**
1351
1430
  * Wait until at least one top-level Page has been created and registered.
@@ -1509,8 +1588,10 @@ declare class V3 {
1509
1588
  private _onCdpClosed;
1510
1589
  readonly experimental: boolean;
1511
1590
  readonly logInferenceToFile: boolean;
1591
+ readonly disableAPI: boolean;
1512
1592
  private externalLogger?;
1513
1593
  verbose: 0 | 1 | 2;
1594
+ private stagehandLogger;
1514
1595
  private _history;
1515
1596
  private readonly instanceId;
1516
1597
  private static _processGuardsInstalled;
@@ -1518,12 +1599,14 @@ declare class V3 {
1518
1599
  private cacheStorage;
1519
1600
  private actCache;
1520
1601
  private agentCache;
1521
- v3Metrics: V3Metrics;
1602
+ private apiClient;
1603
+ stagehandMetrics: StagehandMetrics;
1604
+ constructor(opts: V3Options);
1522
1605
  /**
1523
1606
  * Async property for metrics so callers can `await v3.metrics`.
1524
1607
  * Returning a Promise future-proofs async aggregation/storage.
1525
1608
  */
1526
- get metrics(): Promise<V3Metrics>;
1609
+ get metrics(): Promise<StagehandMetrics>;
1527
1610
  private resolveLlmClient;
1528
1611
  private beginAgentReplayRecording;
1529
1612
  private endAgentReplayRecording;
@@ -1539,7 +1622,6 @@ declare class V3 {
1539
1622
  addToHistory(method: HistoryEntry["method"], parameters: unknown, result?: unknown): void;
1540
1623
  updateMetrics(functionName: V3FunctionName, promptTokens: number, completionTokens: number, inferenceTimeMs: number): void;
1541
1624
  private updateTotalMetrics;
1542
- constructor(opts: V3Options);
1543
1625
  private _immediateShutdown;
1544
1626
  private static _installProcessGuards;
1545
1627
  /**
@@ -1569,10 +1651,10 @@ declare class V3 {
1569
1651
  * - extract(instruction, schema) → schema-inferred
1570
1652
  * - extract(instruction, schema, options)
1571
1653
  */
1572
- extract(): Promise<z.infer<typeof pageTextSchema>>;
1573
- extract(options: ExtractOptions): Promise<z.infer<typeof pageTextSchema>>;
1574
- extract(instruction: string, options?: ExtractOptions): Promise<z.infer<typeof defaultExtractSchema>>;
1575
- extract<T extends ZodTypeAny>(instruction: string, schema: T, options?: ExtractOptions): Promise<z.infer<T>>;
1654
+ extract(): Promise<z$1.infer<typeof pageTextSchema>>;
1655
+ extract(options: ExtractOptions): Promise<z$1.infer<typeof pageTextSchema>>;
1656
+ extract(instruction: string, options?: ExtractOptions): Promise<z$1.infer<typeof defaultExtractSchema>>;
1657
+ extract<T extends ZodTypeAny>(instruction: string, schema: T, options?: ExtractOptions): Promise<z$1.infer<T>>;
1576
1658
  /**
1577
1659
  * Run an "observe" instruction through the ObserveHandler.
1578
1660
  */
@@ -1644,14 +1726,14 @@ declare class AgentProvider {
1644
1726
  static getAgentProvider(modelName: string): AgentProviderType;
1645
1727
  }
1646
1728
 
1647
- declare function validateZodSchema(schema: z.ZodTypeAny, data: unknown): boolean;
1729
+ declare function validateZodSchema(schema: z$1.ZodTypeAny, data: unknown): boolean;
1648
1730
  /**
1649
1731
  * Detects if the code is running in the Bun runtime environment.
1650
1732
  * @returns {boolean} True if running in Bun, false otherwise.
1651
1733
  */
1652
1734
  declare function isRunningInBun(): boolean;
1653
- declare function toGeminiSchema(zodSchema: z.ZodTypeAny): Schema;
1654
- declare function getZodType(schema: z.ZodTypeAny): string;
1735
+ declare function toGeminiSchema(zodSchema: z$1.ZodTypeAny): Schema;
1736
+ declare function getZodType(schema: z$1.ZodTypeAny): string;
1655
1737
  /**
1656
1738
  * Recursively traverses a given Zod schema, scanning for any fields of type `z.string().url()`.
1657
1739
  * For each such field, it replaces the `z.string().url()` with `z.number()`.
@@ -1665,7 +1747,7 @@ declare function getZodType(schema: z.ZodTypeAny): string;
1665
1747
  * 1. The updated Zod schema, with any `.url()` fields replaced by `z.number()`.
1666
1748
  * 2. An array of {@link ZodPathSegments} objects representing each replaced field, including the path segments.
1667
1749
  */
1668
- declare function transformSchema(schema: z.ZodTypeAny, currentPath: Array<string | number>): [z.ZodTypeAny, ZodPathSegments[]];
1750
+ declare function transformSchema(schema: z$1.ZodTypeAny, currentPath: Array<string | number>): [z$1.ZodTypeAny, ZodPathSegments[]];
1669
1751
  /**
1670
1752
  * Once we get the final extracted object that has numeric IDs in place of URLs,
1671
1753
  * use `injectUrls` to walk the object and replace numeric IDs
@@ -1676,7 +1758,7 @@ declare function injectUrls(obj: unknown, path: Array<string | number>, idToUrlM
1676
1758
  /**
1677
1759
  * Mapping from LLM provider names to their corresponding environment variable names for API keys.
1678
1760
  */
1679
- declare const providerEnvVarMap: Partial<Record<ModelProvider | string, string>>;
1761
+ declare const providerEnvVarMap: Partial<Record<ModelProvider | string, string | Array<string>>>;
1680
1762
  /**
1681
1763
  * Loads an API key for a provider, checking environment variables.
1682
1764
  * @param provider The name of the provider (e.g., 'openai', 'anthropic')
@@ -1734,4 +1816,4 @@ declare class V3Evaluator {
1734
1816
  private _evaluateWithMultipleScreenshots;
1735
1817
  }
1736
1818
 
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 };
1819
+ 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, 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 };