@browserbasehq/orca 3.0.7-alpha-1 → 3.0.8-google-cua-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,10 +20,10 @@
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-3kg9piw3m-rxqCIzeuYQMXG315yHigPQ">
23
+ <a href="https://stagehand.dev/discord">
24
24
  <picture>
25
- <source media="(prefers-color-scheme: dark)" srcset="../../media/dark_slack.svg" />
26
- <img alt="Slack Community" src="../../media/light_slack.svg" />
25
+ <source media="(prefers-color-scheme: dark)" srcset="../../media/dark_discord.svg" />
26
+ <img alt="Discord Community" src="../../media/light_discord.svg" />
27
27
  </picture>
28
28
  </a>
29
29
  </p>
@@ -136,10 +136,10 @@ In your project's `package.json` set:
136
136
 
137
137
  ## Contributing
138
138
 
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-3kg9piw3m-rxqCIzeuYQMXG315yHigPQ).
139
+ > [!NOTE]
140
+ > We highly value contributions to Stagehand! For questions or support, please join our [Discord community](https://stagehand.dev/discord).
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-3kg9piw3m-rxqCIzeuYQMXG315yHigPQ) 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 [Discord community](https://stagehand.dev/discord) 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
@@ -8,7 +8,7 @@ import { ClientOptions as ClientOptions$1 } from 'openai';
8
8
  import { Client, ClientOptions as ClientOptions$3 } from '@modelcontextprotocol/sdk/client/index.js';
9
9
  import * as ai from 'ai';
10
10
  import { ToolSet, ModelMessage, PrepareStepFunction, GenerateTextOnStepFinishCallback, StreamTextOnStepFinishCallback, StreamTextOnErrorCallback, StreamTextOnChunkCallback, StreamTextOnFinishCallback, StepResult, StreamTextResult, wrapLanguageModel, generateObject, generateText, streamText, streamObject, experimental_generateImage, embed, embedMany, experimental_transcribe, experimental_generateSpeech, InferUITools } from 'ai';
11
- export { ModelMessage } from 'ai';
11
+ export { ModelMessage, Tool, tool } from 'ai';
12
12
  import { Page as Page$1 } from 'playwright-core';
13
13
  export { Page as PlaywrightPage } from 'playwright-core';
14
14
  import { Page as Page$2 } from 'puppeteer-core';
@@ -1069,6 +1069,10 @@ declare const SessionStartResponseSchema: z$1.ZodObject<{
1069
1069
  available: z$1.ZodBoolean;
1070
1070
  }, z$1.core.$strip>;
1071
1071
  }, z$1.core.$strip>;
1072
+ /** Session end request - empty JSON object (required). */
1073
+ declare const SessionEndRequestSchema: z$1.ZodObject<{
1074
+ _forceBody: z$1.ZodOptional<z$1.ZodUndefined>;
1075
+ }, z$1.core.$strict>;
1072
1076
  declare const SessionEndResultSchema: z$1.ZodObject<{}, z$1.core.$strict>;
1073
1077
  /** Session end response - just success flag, no data wrapper */
1074
1078
  declare const SessionEndResponseSchema: z$1.ZodObject<{
@@ -1819,6 +1823,7 @@ type api_ReplayResponse = ReplayResponse;
1819
1823
  declare const api_ReplayResponseSchema: typeof ReplayResponseSchema;
1820
1824
  type api_ReplayResult = ReplayResult;
1821
1825
  declare const api_ReplayResultSchema: typeof ReplayResultSchema;
1826
+ declare const api_SessionEndRequestSchema: typeof SessionEndRequestSchema;
1822
1827
  type api_SessionEndResponse = SessionEndResponse;
1823
1828
  declare const api_SessionEndResponseSchema: typeof SessionEndResponseSchema;
1824
1829
  type api_SessionEndResult = SessionEndResult;
@@ -1848,7 +1853,7 @@ declare const api_TokenUsageSchema: typeof TokenUsageSchema;
1848
1853
  declare const api_openApiLinks: typeof openApiLinks;
1849
1854
  declare const api_openApiSecuritySchemes: typeof openApiSecuritySchemes;
1850
1855
  declare namespace api {
1851
- export { api_ActOptionsSchema as ActOptionsSchema, type api_ActRequest as ActRequest, api_ActRequestSchema as ActRequestSchema, type api_ActResponse as ActResponse, api_ActResponseSchema as ActResponseSchema, type ActResult$1 as ActResult, type api_ActResultData as ActResultData, api_ActResultDataSchema as ActResultDataSchema, api_ActResultSchema as ActResultSchema, type Action$1 as Action, api_ActionSchema as ActionSchema, type AgentAction$1 as AgentAction, api_AgentActionSchema as AgentActionSchema, api_AgentConfigSchema as AgentConfigSchema, api_AgentExecuteOptionsSchema as AgentExecuteOptionsSchema, type api_AgentExecuteRequest as AgentExecuteRequest, api_AgentExecuteRequestSchema as AgentExecuteRequestSchema, type api_AgentExecuteResponse as AgentExecuteResponse, api_AgentExecuteResponseSchema as AgentExecuteResponseSchema, type api_AgentExecuteResult as AgentExecuteResult, api_AgentExecuteResultSchema as AgentExecuteResultSchema, type api_AgentResultData as AgentResultData, api_AgentResultDataSchema as AgentResultDataSchema, type api_AgentUsage as AgentUsage, api_AgentUsageSchema as AgentUsageSchema, type api_BrowserConfig as BrowserConfig, api_BrowserConfigSchema as BrowserConfigSchema, type api_BrowserbaseBrowserSettings as BrowserbaseBrowserSettings, api_BrowserbaseBrowserSettingsSchema as BrowserbaseBrowserSettingsSchema, type api_BrowserbaseContext as BrowserbaseContext, api_BrowserbaseContextSchema as BrowserbaseContextSchema, type api_BrowserbaseFingerprint as BrowserbaseFingerprint, api_BrowserbaseFingerprintSchema as BrowserbaseFingerprintSchema, type api_BrowserbaseFingerprintScreen as BrowserbaseFingerprintScreen, api_BrowserbaseFingerprintScreenSchema as BrowserbaseFingerprintScreenSchema, type api_BrowserbaseProxyConfig as BrowserbaseProxyConfig, api_BrowserbaseProxyConfigSchema as BrowserbaseProxyConfigSchema, type api_BrowserbaseProxyGeolocation as BrowserbaseProxyGeolocation, api_BrowserbaseProxyGeolocationSchema as BrowserbaseProxyGeolocationSchema, type api_BrowserbaseSessionCreateParams as BrowserbaseSessionCreateParams, api_BrowserbaseSessionCreateParamsSchema as BrowserbaseSessionCreateParamsSchema, type api_BrowserbaseViewport as BrowserbaseViewport, api_BrowserbaseViewportSchema as BrowserbaseViewportSchema, api_ErrorResponseSchema as ErrorResponseSchema, type api_ExternalProxyConfig as ExternalProxyConfig, api_ExternalProxyConfigSchema as ExternalProxyConfigSchema, api_ExtractOptionsSchema as ExtractOptionsSchema, type api_ExtractRequest as ExtractRequest, api_ExtractRequestSchema as ExtractRequestSchema, type api_ExtractResponse as ExtractResponse, api_ExtractResponseSchema as ExtractResponseSchema, type ExtractResult$1 as ExtractResult, api_ExtractResultSchema as ExtractResultSchema, api_LocalBrowserLaunchOptionsSchema as LocalBrowserLaunchOptionsSchema, type api_ModelConfig as ModelConfig, api_ModelConfigObjectSchema as ModelConfigObjectSchema, api_ModelConfigSchema as ModelConfigSchema, api_ModelNameSchema as ModelNameSchema, api_NavigateOptionsSchema as NavigateOptionsSchema, type api_NavigateRequest as NavigateRequest, api_NavigateRequestSchema as NavigateRequestSchema, type api_NavigateResponse as NavigateResponse, api_NavigateResponseSchema as NavigateResponseSchema, type api_NavigateResult as NavigateResult, api_NavigateResultSchema as NavigateResultSchema, api_ObserveOptionsSchema as ObserveOptionsSchema, type api_ObserveRequest as ObserveRequest, api_ObserveRequestSchema as ObserveRequestSchema, type api_ObserveResponse as ObserveResponse, api_ObserveResponseSchema as ObserveResponseSchema, type api_ObserveResult as ObserveResult, api_ObserveResultSchema as ObserveResultSchema, api_Operations as Operations, api_ProxyConfigSchema as ProxyConfigSchema, type api_ReplayAction as ReplayAction, api_ReplayActionSchema as ReplayActionSchema, type api_ReplayPage as ReplayPage, api_ReplayPageSchema as ReplayPageSchema, type api_ReplayResponse as ReplayResponse, api_ReplayResponseSchema as ReplayResponseSchema, type api_ReplayResult as ReplayResult, api_ReplayResultSchema as ReplayResultSchema, type api_SessionEndResponse as SessionEndResponse, api_SessionEndResponseSchema as SessionEndResponseSchema, type api_SessionEndResult as SessionEndResult, api_SessionEndResultSchema as SessionEndResultSchema, type api_SessionHeaders as SessionHeaders, api_SessionHeadersSchema as SessionHeadersSchema, type api_SessionIdParams as SessionIdParams, api_SessionIdParamsSchema as SessionIdParamsSchema, type api_SessionStartRequest as SessionStartRequest, api_SessionStartRequestSchema as SessionStartRequestSchema, type api_SessionStartResponse as SessionStartResponse, api_SessionStartResponseSchema as SessionStartResponseSchema, type api_SessionStartResult as SessionStartResult, api_SessionStartResultSchema as SessionStartResultSchema, type api_StreamEvent as StreamEvent, type api_StreamEventLogData as StreamEventLogData, api_StreamEventLogDataSchema as StreamEventLogDataSchema, api_StreamEventSchema as StreamEventSchema, type api_StreamEventStatus as StreamEventStatus, api_StreamEventStatusSchema as StreamEventStatusSchema, type api_StreamEventSystemData as StreamEventSystemData, api_StreamEventSystemDataSchema as StreamEventSystemDataSchema, type api_StreamEventType as StreamEventType, api_StreamEventTypeSchema as StreamEventTypeSchema, type api_TokenUsage as TokenUsage, api_TokenUsageSchema as TokenUsageSchema, api_openApiLinks as openApiLinks, api_openApiSecuritySchemes as openApiSecuritySchemes };
1856
+ export { api_ActOptionsSchema as ActOptionsSchema, type api_ActRequest as ActRequest, api_ActRequestSchema as ActRequestSchema, type api_ActResponse as ActResponse, api_ActResponseSchema as ActResponseSchema, type ActResult$1 as ActResult, type api_ActResultData as ActResultData, api_ActResultDataSchema as ActResultDataSchema, api_ActResultSchema as ActResultSchema, type Action$1 as Action, api_ActionSchema as ActionSchema, type AgentAction$1 as AgentAction, api_AgentActionSchema as AgentActionSchema, api_AgentConfigSchema as AgentConfigSchema, api_AgentExecuteOptionsSchema as AgentExecuteOptionsSchema, type api_AgentExecuteRequest as AgentExecuteRequest, api_AgentExecuteRequestSchema as AgentExecuteRequestSchema, type api_AgentExecuteResponse as AgentExecuteResponse, api_AgentExecuteResponseSchema as AgentExecuteResponseSchema, type api_AgentExecuteResult as AgentExecuteResult, api_AgentExecuteResultSchema as AgentExecuteResultSchema, type api_AgentResultData as AgentResultData, api_AgentResultDataSchema as AgentResultDataSchema, type api_AgentUsage as AgentUsage, api_AgentUsageSchema as AgentUsageSchema, type api_BrowserConfig as BrowserConfig, api_BrowserConfigSchema as BrowserConfigSchema, type api_BrowserbaseBrowserSettings as BrowserbaseBrowserSettings, api_BrowserbaseBrowserSettingsSchema as BrowserbaseBrowserSettingsSchema, type api_BrowserbaseContext as BrowserbaseContext, api_BrowserbaseContextSchema as BrowserbaseContextSchema, type api_BrowserbaseFingerprint as BrowserbaseFingerprint, api_BrowserbaseFingerprintSchema as BrowserbaseFingerprintSchema, type api_BrowserbaseFingerprintScreen as BrowserbaseFingerprintScreen, api_BrowserbaseFingerprintScreenSchema as BrowserbaseFingerprintScreenSchema, type api_BrowserbaseProxyConfig as BrowserbaseProxyConfig, api_BrowserbaseProxyConfigSchema as BrowserbaseProxyConfigSchema, type api_BrowserbaseProxyGeolocation as BrowserbaseProxyGeolocation, api_BrowserbaseProxyGeolocationSchema as BrowserbaseProxyGeolocationSchema, type api_BrowserbaseSessionCreateParams as BrowserbaseSessionCreateParams, api_BrowserbaseSessionCreateParamsSchema as BrowserbaseSessionCreateParamsSchema, type api_BrowserbaseViewport as BrowserbaseViewport, api_BrowserbaseViewportSchema as BrowserbaseViewportSchema, api_ErrorResponseSchema as ErrorResponseSchema, type api_ExternalProxyConfig as ExternalProxyConfig, api_ExternalProxyConfigSchema as ExternalProxyConfigSchema, api_ExtractOptionsSchema as ExtractOptionsSchema, type api_ExtractRequest as ExtractRequest, api_ExtractRequestSchema as ExtractRequestSchema, type api_ExtractResponse as ExtractResponse, api_ExtractResponseSchema as ExtractResponseSchema, type ExtractResult$1 as ExtractResult, api_ExtractResultSchema as ExtractResultSchema, api_LocalBrowserLaunchOptionsSchema as LocalBrowserLaunchOptionsSchema, type api_ModelConfig as ModelConfig, api_ModelConfigObjectSchema as ModelConfigObjectSchema, api_ModelConfigSchema as ModelConfigSchema, api_ModelNameSchema as ModelNameSchema, api_NavigateOptionsSchema as NavigateOptionsSchema, type api_NavigateRequest as NavigateRequest, api_NavigateRequestSchema as NavigateRequestSchema, type api_NavigateResponse as NavigateResponse, api_NavigateResponseSchema as NavigateResponseSchema, type api_NavigateResult as NavigateResult, api_NavigateResultSchema as NavigateResultSchema, api_ObserveOptionsSchema as ObserveOptionsSchema, type api_ObserveRequest as ObserveRequest, api_ObserveRequestSchema as ObserveRequestSchema, type api_ObserveResponse as ObserveResponse, api_ObserveResponseSchema as ObserveResponseSchema, type api_ObserveResult as ObserveResult, api_ObserveResultSchema as ObserveResultSchema, api_Operations as Operations, api_ProxyConfigSchema as ProxyConfigSchema, type api_ReplayAction as ReplayAction, api_ReplayActionSchema as ReplayActionSchema, type api_ReplayPage as ReplayPage, api_ReplayPageSchema as ReplayPageSchema, type api_ReplayResponse as ReplayResponse, api_ReplayResponseSchema as ReplayResponseSchema, type api_ReplayResult as ReplayResult, api_ReplayResultSchema as ReplayResultSchema, api_SessionEndRequestSchema as SessionEndRequestSchema, type api_SessionEndResponse as SessionEndResponse, api_SessionEndResponseSchema as SessionEndResponseSchema, type api_SessionEndResult as SessionEndResult, api_SessionEndResultSchema as SessionEndResultSchema, type api_SessionHeaders as SessionHeaders, api_SessionHeadersSchema as SessionHeadersSchema, type api_SessionIdParams as SessionIdParams, api_SessionIdParamsSchema as SessionIdParamsSchema, type api_SessionStartRequest as SessionStartRequest, api_SessionStartRequestSchema as SessionStartRequestSchema, type api_SessionStartResponse as SessionStartResponse, api_SessionStartResponseSchema as SessionStartResponseSchema, type api_SessionStartResult as SessionStartResult, api_SessionStartResultSchema as SessionStartResultSchema, type api_StreamEvent as StreamEvent, type api_StreamEventLogData as StreamEventLogData, api_StreamEventLogDataSchema as StreamEventLogDataSchema, api_StreamEventSchema as StreamEventSchema, type api_StreamEventStatus as StreamEventStatus, api_StreamEventStatusSchema as StreamEventStatusSchema, type api_StreamEventSystemData as StreamEventSystemData, api_StreamEventSystemDataSchema as StreamEventSystemDataSchema, type api_StreamEventType as StreamEventType, api_StreamEventTypeSchema as StreamEventTypeSchema, type api_TokenUsage as TokenUsage, api_TokenUsageSchema as TokenUsageSchema, api_openApiLinks as openApiLinks, api_openApiSecuritySchemes as openApiSecuritySchemes };
1852
1857
  }
1853
1858
 
1854
1859
  declare class StagehandAPIError extends Error {
@@ -2800,6 +2805,12 @@ declare class Page {
2800
2805
  * Mirrors Playwright's API signatures.
2801
2806
  */
2802
2807
  waitForLoadState(state: LoadState, timeoutMs?: number): Promise<void>;
2808
+ /**
2809
+ * Wait for a specified amount of time.
2810
+ *
2811
+ * @param ms The number of milliseconds to wait.
2812
+ */
2813
+ waitForTimeout(ms: number): Promise<void>;
2803
2814
  /**
2804
2815
  * Evaluate a function or expression in the current main frame's main world.
2805
2816
  * - If a string is provided, it is treated as a JS expression.
@@ -2944,6 +2955,12 @@ interface AgentResult {
2944
2955
  * @experimental
2945
2956
  */
2946
2957
  messages?: ModelMessage[];
2958
+ /**
2959
+ * Custom output data extracted based on the `output` schema provided in execute options.
2960
+ * Only populated if an `output` schema was provided.
2961
+ * @experimental
2962
+ */
2963
+ output?: Record<string, unknown>;
2947
2964
  }
2948
2965
  type AgentStreamResult = StreamTextResult<ToolSet, never> & {
2949
2966
  result: Promise<AgentResult>;
@@ -3166,6 +3183,26 @@ interface AgentExecuteOptionsBase {
3166
3183
  * ```
3167
3184
  */
3168
3185
  excludeTools?: string[];
3186
+ /**
3187
+ * A Zod schema defining custom output data to return when the task completes.
3188
+ * The agent will populate this data in the final close tool call.
3189
+ *
3190
+ * @experimental
3191
+ * @example
3192
+ * ```typescript
3193
+ * const result = await agent.execute({
3194
+ * instruction: "Find the cheapest flight from NYC to LA",
3195
+ * output: z.object({
3196
+ * price: z.string().describe("The price of the flight"),
3197
+ * airline: z.string().describe("The airline name"),
3198
+ * departureTime: z.string().describe("Departure time"),
3199
+ * }),
3200
+ * });
3201
+ *
3202
+ * console.log(result.output); // { price: "$199", airline: "Delta", departureTime: "8:00 AM" }
3203
+ * ```
3204
+ */
3205
+ output?: StagehandZodObject;
3169
3206
  }
3170
3207
  /**
3171
3208
  * Options for non-streaming agent execution.
@@ -3190,7 +3227,7 @@ interface AgentStreamExecuteOptions extends AgentExecuteOptionsBase {
3190
3227
  callbacks?: AgentStreamCallbacks;
3191
3228
  }
3192
3229
  type AgentType = "openai" | "anthropic" | "google" | "microsoft";
3193
- 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"];
3230
+ 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", "google/gemini-3-flash-computer-use", "microsoft/fara-7b"];
3194
3231
  type AvailableCuaModel = (typeof AVAILABLE_CUA_MODELS)[number];
3195
3232
  interface AgentExecutionOptions<TOptions extends AgentExecuteOptions = AgentExecuteOptions> {
3196
3233
  options: TOptions;
@@ -3397,6 +3434,63 @@ interface StreamingAgentInstance {
3397
3434
  interface NonStreamingAgentInstance {
3398
3435
  execute: (instructionOrOptions: string | AgentExecuteOptions) => Promise<AgentResult>;
3399
3436
  }
3437
+ /**
3438
+ * Content item type for toModelOutput return values.
3439
+ * Used in tool definitions to return text and/or media to the model.
3440
+ */
3441
+ type ModelOutputContentItem = {
3442
+ type: "text";
3443
+ text: string;
3444
+ } | {
3445
+ type: "media";
3446
+ mediaType: string;
3447
+ data: string;
3448
+ };
3449
+ interface ClickToolResult {
3450
+ success: boolean;
3451
+ describe?: string;
3452
+ coordinates?: number[];
3453
+ error?: string;
3454
+ screenshotBase64?: string;
3455
+ }
3456
+ interface TypeToolResult {
3457
+ success: boolean;
3458
+ describe?: string;
3459
+ text?: string;
3460
+ error?: string;
3461
+ screenshotBase64?: string;
3462
+ }
3463
+ interface DragAndDropToolResult {
3464
+ success: boolean;
3465
+ describe?: string;
3466
+ error?: string;
3467
+ screenshotBase64?: string;
3468
+ }
3469
+ interface FillFormField {
3470
+ action: string;
3471
+ value: string;
3472
+ coordinates: {
3473
+ x: number;
3474
+ y: number;
3475
+ };
3476
+ }
3477
+ interface FillFormVisionToolResult {
3478
+ success: boolean;
3479
+ playwrightArguments?: FillFormField[];
3480
+ error?: string;
3481
+ screenshotBase64?: string;
3482
+ }
3483
+ interface ScrollVisionToolResult {
3484
+ success: boolean;
3485
+ message: string;
3486
+ scrolledPixels: number;
3487
+ screenshotBase64?: string;
3488
+ }
3489
+ interface WaitToolResult {
3490
+ success: boolean;
3491
+ waited: number;
3492
+ screenshotBase64?: string;
3493
+ }
3400
3494
 
3401
3495
  type OpenAIClientOptions = Pick<ClientOptions$1, "baseURL" | "apiKey">;
3402
3496
  type AnthropicClientOptions = Pick<ClientOptions$2, "baseURL" | "apiKey">;
@@ -3809,12 +3903,9 @@ declare const screenshotTool: (v3: V3) => ai.Tool<Record<string, never>, {
3809
3903
  pageUrl: string;
3810
3904
  }>;
3811
3905
 
3812
- declare const waitTool: (v3: V3) => ai.Tool<{
3906
+ declare const waitTool: (v3: V3, mode?: AgentToolMode) => ai.Tool<{
3813
3907
  timeMs: number;
3814
- }, {
3815
- success: boolean;
3816
- waited: number;
3817
- }>;
3908
+ }, WaitToolResult>;
3818
3909
 
3819
3910
  declare const navBackTool: (v3: V3) => ai.Tool<{
3820
3911
  reasoningText: string;
@@ -3822,15 +3913,6 @@ declare const navBackTool: (v3: V3) => ai.Tool<{
3822
3913
  success: boolean;
3823
3914
  }>;
3824
3915
 
3825
- declare const closeTool: () => ai.Tool<{
3826
- reasoning: string;
3827
- taskComplete: boolean;
3828
- }, {
3829
- success: boolean;
3830
- reasoning: string;
3831
- taskComplete: boolean;
3832
- }>;
3833
-
3834
3916
  declare const ariaTreeTool: (v3: V3) => ai.Tool<Record<string, never>, {
3835
3917
  content: string;
3836
3918
  pageUrl: string;
@@ -3867,11 +3949,7 @@ declare const scrollVisionTool: (v3: V3, provider?: string) => ai.Tool<{
3867
3949
  direction: "up" | "down";
3868
3950
  coordinates?: number[];
3869
3951
  percentage?: number;
3870
- }, {
3871
- success: boolean;
3872
- message: string;
3873
- scrolledPixels: number;
3874
- }>;
3952
+ }, ScrollVisionToolResult>;
3875
3953
 
3876
3954
  declare const extractTool: (v3: V3, executionModel?: string, logger?: (message: LogLine) => void) => ai.Tool<{
3877
3955
  instruction: string;
@@ -3889,47 +3967,19 @@ declare const extractTool: (v3: V3, executionModel?: string, logger?: (message:
3889
3967
  declare const clickTool: (v3: V3, provider?: string) => ai.Tool<{
3890
3968
  describe: string;
3891
3969
  coordinates: number[];
3892
- }, {
3893
- success: boolean;
3894
- describe: string;
3895
- coordinates: number[];
3896
- error?: undefined;
3897
- } | {
3898
- success: boolean;
3899
- error: string;
3900
- describe?: undefined;
3901
- coordinates?: undefined;
3902
- }>;
3970
+ }, ClickToolResult>;
3903
3971
 
3904
3972
  declare const typeTool: (v3: V3, provider?: string) => ai.Tool<{
3905
3973
  describe: string;
3906
3974
  text: string;
3907
3975
  coordinates: number[];
3908
- }, {
3909
- success: boolean;
3910
- describe: string;
3911
- text: string;
3912
- error?: undefined;
3913
- } | {
3914
- success: boolean;
3915
- error: string;
3916
- describe?: undefined;
3917
- text?: undefined;
3918
- }>;
3976
+ }, TypeToolResult>;
3919
3977
 
3920
3978
  declare const dragAndDropTool: (v3: V3, provider?: string) => ai.Tool<{
3921
3979
  describe: string;
3922
3980
  startCoordinates: number[];
3923
3981
  endCoordinates: number[];
3924
- }, {
3925
- success: boolean;
3926
- describe: string;
3927
- error?: undefined;
3928
- } | {
3929
- success: boolean;
3930
- error: string;
3931
- describe?: undefined;
3932
- }>;
3982
+ }, DragAndDropToolResult>;
3933
3983
 
3934
3984
  declare const clickAndHoldTool: (v3: V3, provider?: string) => ai.Tool<{
3935
3985
  describe: string;
@@ -3978,22 +4028,7 @@ declare const fillFormVisionTool: (v3: V3, provider?: string) => ai.Tool<{
3978
4028
  y: number;
3979
4029
  };
3980
4030
  }[];
3981
- }, {
3982
- success: boolean;
3983
- playwrightArguments: {
3984
- coordinates: {
3985
- x: number;
3986
- y: number;
3987
- };
3988
- action: string;
3989
- value: string;
3990
- }[];
3991
- error?: undefined;
3992
- } | {
3993
- success: boolean;
3994
- error: string;
3995
- playwrightArguments?: undefined;
3996
- }>;
4031
+ }, FillFormVisionToolResult>;
3997
4032
 
3998
4033
  declare const thinkTool: () => ai.Tool<{
3999
4034
  reasoning: string;
@@ -4047,7 +4082,6 @@ type AgentToolTypesMap = {
4047
4082
  ariaTree: ReturnType<typeof ariaTreeTool>;
4048
4083
  click: ReturnType<typeof clickTool>;
4049
4084
  clickAndHold: ReturnType<typeof clickAndHoldTool>;
4050
- close: ReturnType<typeof closeTool>;
4051
4085
  dragAndDrop: ReturnType<typeof dragAndDropTool>;
4052
4086
  extract: ReturnType<typeof extractTool>;
4053
4087
  fillForm: ReturnType<typeof fillFormTool>;
@@ -4181,4 +4215,4 @@ declare class V3Evaluator {
4181
4215
  private _evaluateWithMultipleScreenshots;
4182
4216
  }
4183
4217
 
4184
- 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 AgentToolCall, type AgentToolMode, type AgentToolResult, type AgentToolTypesMap, type AgentTools, type AgentType, type AgentUITools, AnnotatedScreenshotText, type AnthropicClientOptions, type AnthropicContentBlock, type AnthropicJsonSchemaObject, type AnthropicMessage, type AnthropicTextBlock, type AnthropicToolResult, type AnyPage, api as Api, 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, type SafetyCheck, type SafetyConfirmationHandler, type SafetyConfirmationResponse, V3 as Stagehand, StagehandAPIError, StagehandAPIUnauthorizedError, StagehandClickError, StagehandClosedError, 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, localBrowserLaunchOptionsSchema, modelToAgentProviderMap, pageTextSchema, providerEnvVarMap, toGeminiSchema, toJsonSchema, transformSchema, trimTrailingTextNode, validateZodSchema };
4218
+ 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 AgentToolCall, type AgentToolMode, type AgentToolResult, type AgentToolTypesMap, type AgentTools, type AgentType, type AgentUITools, AnnotatedScreenshotText, type AnthropicClientOptions, type AnthropicContentBlock, type AnthropicJsonSchemaObject, type AnthropicMessage, type AnthropicTextBlock, type AnthropicToolResult, type AnyPage, api as Api, type AvailableCuaModel, type AvailableModel, BrowserbaseSessionNotFoundError, CaptchaTimeoutError, type ChatCompletionOptions, type ChatMessage, type ChatMessageContent, type ChatMessageImageContent, type ChatMessageTextContent, type ClickToolResult, type ClientOptions, type ComputerCallItem, ConnectionTimeoutError, type ConsoleListener, ConsoleMessage, ContentFrameNotFoundError, type CreateChatCompletionOptions, CreateChatCompletionResponseError, CuaModelRequiredError, type DragAndDropToolResult, ElementNotVisibleError, ExperimentalApiConflictError, ExperimentalNotConfiguredError, type ExtractOptions, type ExtractResult, ExtractTimeoutError, type FillFormField, type FillFormVisionToolResult, 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 ModelOutputContentItem, type ModelProvider, type NonStreamingAgentInstance, type ObserveOptions, ObserveTimeoutError, type OpenAIClientOptions, Page, PageNotFoundError, Response$1 as Response, ResponseBodyError, type ResponseInputItem, type ResponseItem, ResponseParseError, type SafetyCheck, type SafetyConfirmationHandler, type SafetyConfirmationResponse, type ScrollVisionToolResult, V3 as Stagehand, StagehandAPIError, StagehandAPIUnauthorizedError, StagehandClickError, StagehandClosedError, 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, type TypeToolResult, UnsupportedAISDKModelProviderError, UnsupportedModelError, UnsupportedModelProviderError, V3, type V3Env, V3Evaluator, V3FunctionName, type V3Options, type WaitToolResult, XPathResolutionError, ZodSchemaValidationError, connectToMCPServer, defaultExtractSchema, getZodType, injectUrls, isRunningInBun, isZod3Schema, isZod4Schema, jsonSchemaToZod, loadApiKeyFromEnv, localBrowserLaunchOptionsSchema, modelToAgentProviderMap, pageTextSchema, providerEnvVarMap, toGeminiSchema, toJsonSchema, transformSchema, trimTrailingTextNode, validateZodSchema };