@browserbasehq/orca 3.0.5-vertex-test → 3.0.6-alpha-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.
package/README.md CHANGED
@@ -20,7 +20,7 @@
20
20
  <img alt="MIT License" src="../../media/light_license.svg" />
21
21
  </picture>
22
22
  </a>
23
- <a href="https://join.slack.com/t/stagehand-dev/shared_invite/zt-3hgv6bwqu-s7MXXgPd7_rD53aViGo1MQ">
23
+ <a href="https://join.slack.com/t/stagehand-dev/shared_invite/zt-3kg9piw3m-rxqCIzeuYQMXG315yHigPQ">
24
24
  <picture>
25
25
  <source media="(prefers-color-scheme: dark)" srcset="../../media/dark_slack.svg" />
26
26
  <img alt="Slack Community" src="../../media/light_slack.svg" />
@@ -137,9 +137,9 @@ In your project's `package.json` set:
137
137
  ## Contributing
138
138
 
139
139
  > [!NOTE]
140
- > We highly value contributions to Stagehand! For questions or support, please join our [Slack community](https://join.slack.com/t/stagehand-dev/shared_invite/zt-3hgv6bwqu-s7MXXgPd7_rD53aViGo1MQ).
140
+ > We highly value contributions to Stagehand! For questions or support, please join our [Slack community](https://join.slack.com/t/stagehand-dev/shared_invite/zt-3kg9piw3m-rxqCIzeuYQMXG315yHigPQ).
141
141
 
142
- At a high level, we're focused on improving reliability, extensibility, speed, and cost in that order of priority. If you're interested in contributing, **bug fixes and small improvements are the best way to get started**. For more involved features, we strongly recommend reaching out to [Miguel Gonzalez](https://x.com/miguel_gonzf) or [Paul Klein](https://x.com/pk_iv) in our [Slack community](https://join.slack.com/t/stagehand-dev/shared_invite/zt-3hgv6bwqu-s7MXXgPd7_rD53aViGo1MQ) before starting to ensure that your contribution aligns with our goals.
142
+ At a high level, we're focused on improving reliability, extensibility, speed, and cost in that order of priority. If you're interested in contributing, **bug fixes and small improvements are the best way to get started**. For more involved features, we strongly recommend reaching out to [Miguel Gonzalez](https://x.com/miguel_gonzf) or [Paul Klein](https://x.com/pk_iv) in our [Slack community](https://join.slack.com/t/stagehand-dev/shared_invite/zt-3kg9piw3m-rxqCIzeuYQMXG315yHigPQ) before starting to ensure that your contribution aligns with our goals.
143
143
 
144
144
  <!-- For more information, please see our [Contributing Guide](https://docs.stagehand.dev/examples/contributing). -->
145
145
 
package/dist/index.d.ts CHANGED
@@ -5,7 +5,8 @@ import { GoogleVertexProviderSettings as GoogleVertexProviderSettings$1 } from '
5
5
  import { LanguageModelV2 } from '@ai-sdk/provider';
6
6
  import { ClientOptions as ClientOptions$1 } from 'openai';
7
7
  import { Client, ClientOptions as ClientOptions$3 } from '@modelcontextprotocol/sdk/client/index.js';
8
- import { ToolSet, StreamTextResult, ModelMessage, wrapLanguageModel, generateObject, generateText, streamText, streamObject, experimental_generateImage, embed, embedMany, experimental_transcribe, experimental_generateSpeech } from 'ai';
8
+ import { ToolSet, ModelMessage, PrepareStepFunction, GenerateTextOnStepFinishCallback, StreamTextOnStepFinishCallback, StreamTextOnErrorCallback, StreamTextOnChunkCallback, StreamTextOnFinishCallback, StepResult, StreamTextResult, wrapLanguageModel, generateObject, generateText, streamText, streamObject, experimental_generateImage, embed, embedMany, experimental_transcribe, experimental_generateSpeech } from 'ai';
9
+ export { ModelMessage } from 'ai';
9
10
  import { Page as Page$1 } from 'playwright-core';
10
11
  export { Page as PlaywrightPage } from 'playwright-core';
11
12
  import { Page as Page$2 } from 'puppeteer-core';
@@ -75,8 +76,22 @@ declare class CdpConnection implements CDPSessionLike {
75
76
  private inflight;
76
77
  private eventHandlers;
77
78
  private sessions;
79
+ /** Maps sessionId -> targetId (1:1 mapping) */
80
+ private sessionToTarget;
78
81
  readonly id: string | null;
79
82
  private transportCloseHandlers;
83
+ /** Optional CDP logger - set this to receive all outgoing CDP method calls */
84
+ cdpLogger?: (info: {
85
+ method: string;
86
+ params?: object;
87
+ targetId?: string | null;
88
+ }) => void;
89
+ /** Optional CDP event logger - set this to receive all incoming CDP events */
90
+ cdpEventLogger?: (info: {
91
+ method: string;
92
+ params?: unknown;
93
+ targetId?: string | null;
94
+ }) => void;
80
95
  onTransportClosed(handler: (why: string) => void): void;
81
96
  offTransportClosed(handler: (why: string) => void): void;
82
97
  private emitTransportClosed;
@@ -142,7 +157,7 @@ declare class Frame implements FrameManager {
142
157
  /** Accessibility.getFullAXTree (+ recurse into child frames if requested) */
143
158
  getAccessibilityTree(withFrames?: boolean): Promise<Protocol.Accessibility.AXNode[]>;
144
159
  /**
145
- * Evaluate a function or expression in this frame's isolated world.
160
+ * Evaluate a function or expression in this frame's main world.
146
161
  * - If a string is provided, treated as a JS expression.
147
162
  * - If a function is provided, it is stringified and invoked with the optional argument.
148
163
  */
@@ -169,8 +184,8 @@ declare class Frame implements FrameManager {
169
184
  deep?: boolean;
170
185
  depth?: number;
171
186
  }): Locator;
172
- /** Create/get an isolated world for this frame and return its executionContextId */
173
- private getExecutionContextId;
187
+ /** Resolve the main-world execution context id for this frame. */
188
+ private getMainWorldExecutionContextId;
174
189
  }
175
190
 
176
191
  interface SetInputFilePayload {
@@ -778,12 +793,29 @@ declare class ResponseParseError extends StagehandError {
778
793
  declare class TimeoutError extends StagehandError {
779
794
  constructor(operation: string, timeoutMs: number);
780
795
  }
796
+ declare class ActTimeoutError extends TimeoutError {
797
+ constructor(timeoutMs: number);
798
+ }
799
+ declare class ExtractTimeoutError extends TimeoutError {
800
+ constructor(timeoutMs: number);
801
+ }
802
+ declare class ObserveTimeoutError extends TimeoutError {
803
+ constructor(timeoutMs: number);
804
+ }
781
805
  declare class PageNotFoundError extends StagehandError {
782
806
  constructor(identifier: string);
783
807
  }
784
808
  declare class ConnectionTimeoutError extends StagehandError {
785
809
  constructor(message: string);
786
810
  }
811
+ declare class StreamingCallbacksInNonStreamingModeError extends StagehandError {
812
+ readonly invalidCallbacks: string[];
813
+ constructor(invalidCallbacks: string[]);
814
+ }
815
+ declare class AgentAbortError extends StagehandError {
816
+ readonly reason: string;
817
+ constructor(reason?: string);
818
+ }
787
819
 
788
820
  declare class AISdkClient extends LLMClient {
789
821
  type: "aisdk";
@@ -859,6 +891,10 @@ interface ZodPathSegments {
859
891
  */
860
892
  segments: Array<string | number>;
861
893
  }
894
+ type InitScriptSource<Arg> = string | {
895
+ path?: string;
896
+ content?: string;
897
+ } | ((arg: Arg) => unknown);
862
898
 
863
899
  type EvaluateOptions = {
864
900
  /** The question to ask about the task state */
@@ -923,10 +959,6 @@ declare class StagehandAPIClient {
923
959
  private request;
924
960
  }
925
961
 
926
- type InitScriptSource<Arg> = string | {
927
- path?: string;
928
- content?: string;
929
- } | ((arg: Arg) => unknown);
930
962
  /**
931
963
  * V3Context
932
964
  *
@@ -1296,6 +1328,7 @@ declare class Page {
1296
1328
  private ensureCursorScript;
1297
1329
  enableCursorOverlay(): Promise<void>;
1298
1330
  private updateCursor;
1331
+ addInitScript<Arg>(script: InitScriptSource<Arg>, arg?: Arg): Promise<void>;
1299
1332
  /**
1300
1333
  * Factory: create Page and seed registry with the shallow tree from Page.getFrameTree.
1301
1334
  * Assumes Page domain is already enabled on the session passed in.
@@ -1476,7 +1509,7 @@ declare class Page {
1476
1509
  */
1477
1510
  waitForLoadState(state: LoadState, timeoutMs?: number): Promise<void>;
1478
1511
  /**
1479
- * Evaluate a function or expression in the current main frame's isolated world.
1512
+ * Evaluate a function or expression in the current main frame's main world.
1480
1513
  * - If a string is provided, it is treated as a JS expression.
1481
1514
  * - If a function is provided, it is stringified and invoked with the optional argument.
1482
1515
  * - The return value should be JSON-serializable. Non-serializable objects will
@@ -1582,10 +1615,8 @@ declare class Page {
1582
1615
  * Only used on macOS to trigger system editing shortcuts (e.g., selectAll, copy, paste...).
1583
1616
  */
1584
1617
  private macCommandsFor;
1585
- /**
1586
- * Create an isolated world for the **current** main frame and return its context id.
1587
- */
1588
- private createIsolatedWorldForCurrentMain;
1618
+ /** Resolve the main-world execution context for the current main frame. */
1619
+ private mainWorldExecutionContextId;
1589
1620
  /**
1590
1621
  * Wait until the **current** main frame reaches a lifecycle state.
1591
1622
  * - Fast path via `document.readyState`.
@@ -1596,7 +1627,7 @@ declare class Page {
1596
1627
  }
1597
1628
 
1598
1629
  interface AgentContext {
1599
- options: AgentExecuteOptions;
1630
+ options: AgentExecuteOptionsBase;
1600
1631
  maxSteps: number;
1601
1632
  systemPrompt: string;
1602
1633
  allTools: ToolSet;
@@ -1635,18 +1666,191 @@ interface AgentResult {
1635
1666
  cached_input_tokens?: number;
1636
1667
  inference_time_ms: number;
1637
1668
  };
1669
+ /**
1670
+ * The conversation messages from this execution.
1671
+ * Pass these to a subsequent execute() call via the `messages` option to continue the conversation.
1672
+ * @experimental
1673
+ */
1674
+ messages?: ModelMessage[];
1638
1675
  }
1639
1676
  type AgentStreamResult = StreamTextResult<ToolSet, never> & {
1640
1677
  result: Promise<AgentResult>;
1641
1678
  };
1642
- interface AgentExecuteOptions {
1679
+ /**
1680
+ * Base callbacks shared between execute (non-streaming) and streaming modes.
1681
+ */
1682
+ interface AgentCallbacks {
1683
+ /**
1684
+ * Optional function called before each step to modify settings.
1685
+ * You can change the model, tool choices, active tools, system prompt,
1686
+ * and input messages for each step.
1687
+ */
1688
+ prepareStep?: PrepareStepFunction<ToolSet>;
1689
+ /**
1690
+ * Callback called when each step (LLM call) is finished.
1691
+ * This is called for intermediate steps as well as the final step.
1692
+ */
1693
+ onStepFinish?: GenerateTextOnStepFinishCallback<ToolSet> | StreamTextOnStepFinishCallback<ToolSet>;
1694
+ }
1695
+ /**
1696
+ * Error message type for streaming-only callbacks used in non-streaming mode.
1697
+ * This provides a clear error message when users try to use streaming callbacks without stream: true.
1698
+ */
1699
+ type StreamingCallbackNotAvailable = "This callback requires 'stream: true' in AgentConfig. Set stream: true to use streaming callbacks like onChunk, onFinish, onError, and onAbort.";
1700
+ /**
1701
+ * Callbacks specific to the non-streaming execute method.
1702
+ */
1703
+ interface AgentExecuteCallbacks extends AgentCallbacks {
1704
+ /**
1705
+ * Callback called when each step (LLM call) is finished.
1706
+ */
1707
+ onStepFinish?: GenerateTextOnStepFinishCallback<ToolSet>;
1708
+ /**
1709
+ * NOT AVAILABLE in non-streaming mode.
1710
+ * This callback requires `stream: true` in AgentConfig.
1711
+ *
1712
+ * @example
1713
+ * ```typescript
1714
+ * // Enable streaming to use onChunk:
1715
+ * const agent = stagehand.agent({ stream: true });
1716
+ * await agent.execute({
1717
+ * instruction: "...",
1718
+ * callbacks: { onChunk: async (chunk) => console.log(chunk) }
1719
+ * });
1720
+ * ```
1721
+ */
1722
+ onChunk?: StreamingCallbackNotAvailable;
1723
+ /**
1724
+ * NOT AVAILABLE in non-streaming mode.
1725
+ * This callback requires `stream: true` in AgentConfig.
1726
+ *
1727
+ * @example
1728
+ * ```typescript
1729
+ * // Enable streaming to use onFinish:
1730
+ * const agent = stagehand.agent({ stream: true });
1731
+ * await agent.execute({
1732
+ * instruction: "...",
1733
+ * callbacks: { onFinish: (event) => console.log("Done!", event) }
1734
+ * });
1735
+ * ```
1736
+ */
1737
+ onFinish?: StreamingCallbackNotAvailable;
1738
+ /**
1739
+ * NOT AVAILABLE in non-streaming mode.
1740
+ * This callback requires `stream: true` in AgentConfig.
1741
+ *
1742
+ * @example
1743
+ * ```typescript
1744
+ * // Enable streaming to use onError:
1745
+ * const agent = stagehand.agent({ stream: true });
1746
+ * await agent.execute({
1747
+ * instruction: "...",
1748
+ * callbacks: { onError: ({ error }) => console.error(error) }
1749
+ * });
1750
+ * ```
1751
+ */
1752
+ onError?: StreamingCallbackNotAvailable;
1753
+ /**
1754
+ * NOT AVAILABLE in non-streaming mode.
1755
+ * This callback requires `stream: true` in AgentConfig.
1756
+ *
1757
+ * @example
1758
+ * ```typescript
1759
+ * // Enable streaming to use onAbort:
1760
+ * const agent = stagehand.agent({ stream: true });
1761
+ * await agent.execute({
1762
+ * instruction: "...",
1763
+ * callbacks: { onAbort: (event) => console.log("Aborted", event.steps) }
1764
+ * });
1765
+ * ```
1766
+ */
1767
+ onAbort?: StreamingCallbackNotAvailable;
1768
+ }
1769
+ /**
1770
+ * Callbacks specific to the streaming mode.
1771
+ */
1772
+ interface AgentStreamCallbacks extends AgentCallbacks {
1773
+ /**
1774
+ * Callback called when each step (LLM call) is finished during streaming.
1775
+ */
1776
+ onStepFinish?: StreamTextOnStepFinishCallback<ToolSet>;
1777
+ /**
1778
+ * Callback called when an error occurs during streaming.
1779
+ * Use this to log errors or handle error states.
1780
+ */
1781
+ onError?: StreamTextOnErrorCallback;
1782
+ /**
1783
+ * Callback called for each chunk of the stream.
1784
+ * Stream processing will pause until the callback promise resolves.
1785
+ */
1786
+ onChunk?: StreamTextOnChunkCallback<ToolSet>;
1787
+ /**
1788
+ * Callback called when the stream finishes.
1789
+ */
1790
+ onFinish?: StreamTextOnFinishCallback<ToolSet>;
1791
+ /**
1792
+ * Callback called when the stream is aborted.
1793
+ */
1794
+ onAbort?: (event: {
1795
+ steps: Array<StepResult<ToolSet>>;
1796
+ }) => PromiseLike<void> | void;
1797
+ }
1798
+ /**
1799
+ * Base options for agent execution (without callbacks).
1800
+ */
1801
+ interface AgentExecuteOptionsBase {
1643
1802
  instruction: string;
1644
1803
  maxSteps?: number;
1645
1804
  page?: Page$1 | Page$2 | Page$3 | Page;
1646
1805
  highlightCursor?: boolean;
1806
+ /**
1807
+ * Previous conversation messages to continue from.
1808
+ * Pass the `messages` from a previous AgentResult to continue that conversation.
1809
+ * @experimental
1810
+ */
1811
+ messages?: ModelMessage[];
1812
+ /**
1813
+ * An AbortSignal that can be used to cancel the agent execution.
1814
+ * When aborted, the agent will stop and return a partial result.
1815
+ * @experimental
1816
+ *
1817
+ * @example
1818
+ * ```typescript
1819
+ * const controller = new AbortController();
1820
+ * setTimeout(() => controller.abort(), 30000); // 30 second timeout
1821
+ *
1822
+ * const result = await agent.execute({
1823
+ * instruction: "...",
1824
+ * signal: controller.signal
1825
+ * });
1826
+ * ```
1827
+ */
1828
+ signal?: AbortSignal;
1829
+ }
1830
+ /**
1831
+ * Options for non-streaming agent execution.
1832
+ * Only accepts AgentExecuteCallbacks (no streaming-specific callbacks like onChunk, onFinish).
1833
+ */
1834
+ interface AgentExecuteOptions extends AgentExecuteOptionsBase {
1835
+ /**
1836
+ * Callbacks for non-streaming agent execution.
1837
+ * For streaming callbacks (onChunk, onFinish, onError, onAbort), use stream: true in AgentConfig.
1838
+ */
1839
+ callbacks?: AgentExecuteCallbacks;
1840
+ }
1841
+ /**
1842
+ * Options for streaming agent execution.
1843
+ * Accepts AgentStreamCallbacks including onChunk, onFinish, onError, and onAbort.
1844
+ */
1845
+ interface AgentStreamExecuteOptions extends AgentExecuteOptionsBase {
1846
+ /**
1847
+ * Callbacks for streaming agent execution.
1848
+ * Includes streaming-specific callbacks: onChunk, onFinish, onError, onAbort.
1849
+ */
1850
+ callbacks?: AgentStreamCallbacks;
1647
1851
  }
1648
1852
  type AgentType = "openai" | "anthropic" | "google" | "microsoft";
1649
- declare const AVAILABLE_CUA_MODELS: readonly ["openai/computer-use-preview", "openai/computer-use-preview-2025-03-11", "anthropic/claude-3-7-sonnet-latest", "anthropic/claude-haiku-4-5-20251001", "anthropic/claude-sonnet-4-20250514", "anthropic/claude-sonnet-4-5-20250929", "google/gemini-2.5-computer-use-preview-10-2025", "microsoft/fara-7b"];
1853
+ declare const AVAILABLE_CUA_MODELS: readonly ["openai/computer-use-preview", "openai/computer-use-preview-2025-03-11", "anthropic/claude-3-7-sonnet-latest", "anthropic/claude-opus-4-5-20251101", "anthropic/claude-haiku-4-5-20251001", "anthropic/claude-sonnet-4-20250514", "anthropic/claude-sonnet-4-5-20250929", "google/gemini-2.5-computer-use-preview-10-2025", "microsoft/fara-7b"];
1650
1854
  type AvailableCuaModel = (typeof AVAILABLE_CUA_MODELS)[number];
1651
1855
  interface AgentExecutionOptions<TOptions extends AgentExecuteOptions = AgentExecuteOptions> {
1652
1856
  options: TOptions;
@@ -1778,13 +1982,15 @@ type AgentConfig = {
1778
1982
  /**
1779
1983
  * Agent instance returned when stream: true is set in AgentConfig.
1780
1984
  * execute() returns a streaming result that can be consumed incrementally.
1985
+ * Accepts AgentStreamExecuteOptions with streaming-specific callbacks.
1781
1986
  */
1782
1987
  interface StreamingAgentInstance {
1783
- execute: (instructionOrOptions: string | AgentExecuteOptions) => Promise<AgentStreamResult>;
1988
+ execute: (instructionOrOptions: string | AgentStreamExecuteOptions) => Promise<AgentStreamResult>;
1784
1989
  }
1785
1990
  /**
1786
1991
  * Agent instance returned when stream is false or not set in AgentConfig.
1787
1992
  * execute() returns a result after the agent completes.
1993
+ * Accepts AgentExecuteOptions with non-streaming callbacks only.
1788
1994
  */
1789
1995
  interface NonStreamingAgentInstance {
1790
1996
  execute: (instructionOrOptions: string | AgentExecuteOptions) => Promise<AgentResult>;
@@ -2117,7 +2323,7 @@ declare class V3 {
2117
2323
  agent(options: AgentConfig & {
2118
2324
  stream: true;
2119
2325
  }): {
2120
- execute: (instructionOrOptions: string | AgentExecuteOptions) => Promise<AgentStreamResult>;
2326
+ execute: (instructionOrOptions: string | AgentStreamExecuteOptions) => Promise<AgentStreamResult>;
2121
2327
  };
2122
2328
  agent(options?: AgentConfig & {
2123
2329
  stream?: false;
@@ -2251,4 +2457,4 @@ declare class V3Evaluator {
2251
2457
  private _evaluateWithMultipleScreenshots;
2252
2458
  }
2253
2459
 
2254
- export { type AISDKCustomProvider, type AISDKProvider, AISdkClient, AVAILABLE_CUA_MODELS, type ActOptions, type ActResult, type Action, type ActionExecutionResult, type AgentAction, type AgentConfig, type AgentContext, type AgentExecuteOptions, type AgentExecutionOptions, type AgentHandlerOptions, type AgentInstance, type AgentModelConfig, AgentProvider, type AgentProviderType, type AgentResult, AgentScreenshotProviderError, type AgentState, type AgentStreamResult, type AgentType, AnnotatedScreenshotText, type AnthropicClientOptions, 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, ConnectionTimeoutError, type ConsoleListener, ConsoleMessage, ContentFrameNotFoundError, type CreateChatCompletionOptions, CreateChatCompletionResponseError, CuaModelRequiredError, ElementNotVisibleError, ExperimentalApiConflictError, ExperimentalNotConfiguredError, type ExtractOptions, type ExtractResult, type FunctionCallItem, type GoogleServiceAccountCredentials, type GoogleVertexProviderSettings, HandlerNotInitializedError, type HistoryEntry, type InferStagehandSchema, InvalidAISDKModelFormatError, type JsonSchema, type JsonSchemaDocument, type JsonSchemaProperty, LLMClient, type LLMParsedResponse, type LLMResponse, LLMResponseError, type LLMTool, type LLMUsage, LOG_LEVEL_NAMES, type LoadState, type LocalBrowserLaunchOptions, type LogLevel, type LogLine, type Logger, MCPConnectionError, MissingEnvironmentVariableError, MissingLLMConfigurationError, type ModelConfiguration, type ModelProvider, type NonStreamingAgentInstance, type ObserveOptions, type OpenAIClientOptions, Page, PageNotFoundError, Response$1 as Response, ResponseBodyError, type ResponseInputItem, type ResponseItem, ResponseParseError, 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 StagehandZodObject, type StagehandZodSchema, type StreamingAgentInstance, TimeoutError, type ToolUseItem, UnsupportedAISDKModelProviderError, UnsupportedModelError, UnsupportedModelProviderError, V3, type V3Env, V3Evaluator, V3FunctionName, type V3Options, XPathResolutionError, ZodSchemaValidationError, connectToMCPServer, defaultExtractSchema, getZodType, injectUrls, isRunningInBun, isZod3Schema, isZod4Schema, jsonSchemaToZod, loadApiKeyFromEnv, modelToAgentProviderMap, pageTextSchema, providerEnvVarMap, toGeminiSchema, toJsonSchema, transformSchema, trimTrailingTextNode, validateZodSchema };
2460
+ export { type AISDKCustomProvider, type AISDKProvider, AISdkClient, AVAILABLE_CUA_MODELS, type ActOptions, type ActResult, ActTimeoutError, type Action, type ActionExecutionResult, AgentAbortError, type AgentAction, type AgentCallbacks, type AgentConfig, type AgentContext, type AgentExecuteCallbacks, type AgentExecuteOptions, type AgentExecuteOptionsBase, type AgentExecutionOptions, type AgentHandlerOptions, type AgentInstance, type AgentModelConfig, AgentProvider, type AgentProviderType, type AgentResult, AgentScreenshotProviderError, type AgentState, type AgentStreamCallbacks, type AgentStreamExecuteOptions, type AgentStreamResult, type AgentType, AnnotatedScreenshotText, type AnthropicClientOptions, 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, ConnectionTimeoutError, type ConsoleListener, ConsoleMessage, ContentFrameNotFoundError, type CreateChatCompletionOptions, CreateChatCompletionResponseError, CuaModelRequiredError, ElementNotVisibleError, ExperimentalApiConflictError, ExperimentalNotConfiguredError, type ExtractOptions, type ExtractResult, ExtractTimeoutError, type FunctionCallItem, type GoogleServiceAccountCredentials, type GoogleVertexProviderSettings, HandlerNotInitializedError, type HistoryEntry, type InferStagehandSchema, InvalidAISDKModelFormatError, type JsonSchema, type JsonSchemaDocument, type JsonSchemaProperty, LLMClient, type LLMParsedResponse, type LLMResponse, LLMResponseError, type LLMTool, type LLMUsage, LOG_LEVEL_NAMES, type LoadState, type LocalBrowserLaunchOptions, type LogLevel, type LogLine, type Logger, MCPConnectionError, MissingEnvironmentVariableError, MissingLLMConfigurationError, type ModelConfiguration, type ModelProvider, type NonStreamingAgentInstance, type ObserveOptions, ObserveTimeoutError, type OpenAIClientOptions, Page, PageNotFoundError, Response$1 as Response, ResponseBodyError, type ResponseInputItem, type ResponseItem, ResponseParseError, 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 StagehandZodObject, type StagehandZodSchema, type StreamingAgentInstance, StreamingCallbacksInNonStreamingModeError, TimeoutError, type ToolUseItem, UnsupportedAISDKModelProviderError, UnsupportedModelError, UnsupportedModelProviderError, V3, type V3Env, V3Evaluator, V3FunctionName, type V3Options, XPathResolutionError, ZodSchemaValidationError, connectToMCPServer, defaultExtractSchema, getZodType, injectUrls, isRunningInBun, isZod3Schema, isZod4Schema, jsonSchemaToZod, loadApiKeyFromEnv, modelToAgentProviderMap, pageTextSchema, providerEnvVarMap, toGeminiSchema, toJsonSchema, transformSchema, trimTrailingTextNode, validateZodSchema };