@browserbasehq/orca 3.0.8-stable-1 → 3.0.9-alpha-2

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 +46 -3
  2. package/dist/index.js +12955 -6156
  3. package/package.json +3 -2
package/dist/index.d.ts CHANGED
@@ -191,6 +191,7 @@ declare class Frame implements FrameManager {
191
191
  private getMainWorldExecutionContextId;
192
192
  }
193
193
 
194
+ type MouseButton = "left" | "right" | "middle";
194
195
  interface SetInputFilePayload {
195
196
  name: string;
196
197
  mimeType?: string;
@@ -199,7 +200,6 @@ interface SetInputFilePayload {
199
200
  }
200
201
  type SetInputFilesArgument = string | string[] | SetInputFilePayload | SetInputFilePayload[];
201
202
 
202
- type MouseButton = "left" | "right" | "middle";
203
203
  /**
204
204
  * Locator
205
205
  *
@@ -367,7 +367,7 @@ declare class Locator {
367
367
  */
368
368
  innerText(): Promise<string>;
369
369
  /**
370
- * For API parity, returns the same locator (querySelector already returns the first match).
370
+ * Return a locator narrowed to the first match.
371
371
  */
372
372
  first(): Locator;
373
373
  /** Return a locator narrowed to the element at the given zero-based index. */
@@ -380,6 +380,14 @@ declare class Locator {
380
380
  nodeId: Protocol.DOM.NodeId | null;
381
381
  objectId: Protocol.Runtime.RemoteObjectId;
382
382
  }>;
383
+ /**
384
+ * Resolve all matching nodes for this locator.
385
+ * If the locator is narrowed via nth(), only that index is returned.
386
+ */
387
+ resolveNodesForMask(): Promise<Array<{
388
+ nodeId: Protocol.DOM.NodeId | null;
389
+ objectId: Protocol.Runtime.RemoteObjectId;
390
+ }>>;
383
391
  /** Compute a center point from a BoxModel content quad */
384
392
  private centerFromBoxContent;
385
393
  }
@@ -476,7 +484,8 @@ declare class FrameLocator {
476
484
  declare class LocatorDelegate {
477
485
  private readonly fl;
478
486
  private readonly sel;
479
- constructor(fl: FrameLocator, sel: string);
487
+ private readonly nthIndex;
488
+ constructor(fl: FrameLocator, sel: string, nthIndex?: number);
480
489
  private real;
481
490
  click(options?: {
482
491
  button?: "left" | "right" | "middle";
@@ -497,6 +506,7 @@ declare class LocatorDelegate {
497
506
  innerText(): Promise<string>;
498
507
  count(): Promise<number>;
499
508
  first(): LocatorDelegate;
509
+ nth(index: number): LocatorDelegate;
500
510
  }
501
511
 
502
512
  type RemoteObject = Protocol.Runtime.RemoteObject;
@@ -1283,6 +1293,22 @@ declare const AgentConfigSchema: z$1.ZodObject<{
1283
1293
  }, z$1.core.$strip>, z$1.ZodString]>>;
1284
1294
  systemPrompt: z$1.ZodOptional<z$1.ZodString>;
1285
1295
  cua: z$1.ZodOptional<z$1.ZodBoolean>;
1296
+ mode: z$1.ZodOptional<z$1.ZodEnum<{
1297
+ cua: "cua";
1298
+ dom: "dom";
1299
+ hybrid: "hybrid";
1300
+ }>>;
1301
+ executionModel: z$1.ZodOptional<z$1.ZodUnion<readonly [z$1.ZodObject<{
1302
+ provider: z$1.ZodOptional<z$1.ZodEnum<{
1303
+ openai: "openai";
1304
+ anthropic: "anthropic";
1305
+ google: "google";
1306
+ microsoft: "microsoft";
1307
+ }>>;
1308
+ modelName: z$1.ZodString;
1309
+ apiKey: z$1.ZodOptional<z$1.ZodString>;
1310
+ baseURL: z$1.ZodOptional<z$1.ZodString>;
1311
+ }, z$1.core.$strip>, z$1.ZodString]>>;
1286
1312
  }, z$1.core.$strip>;
1287
1313
  /** Action taken by the agent during execution */
1288
1314
  declare const AgentActionSchema: z$1.ZodObject<{
@@ -1357,6 +1383,22 @@ declare const AgentExecuteRequestSchema: z$1.ZodObject<{
1357
1383
  }, z$1.core.$strip>, z$1.ZodString]>>;
1358
1384
  systemPrompt: z$1.ZodOptional<z$1.ZodString>;
1359
1385
  cua: z$1.ZodOptional<z$1.ZodBoolean>;
1386
+ mode: z$1.ZodOptional<z$1.ZodEnum<{
1387
+ cua: "cua";
1388
+ dom: "dom";
1389
+ hybrid: "hybrid";
1390
+ }>>;
1391
+ executionModel: z$1.ZodOptional<z$1.ZodUnion<readonly [z$1.ZodObject<{
1392
+ provider: z$1.ZodOptional<z$1.ZodEnum<{
1393
+ openai: "openai";
1394
+ anthropic: "anthropic";
1395
+ google: "google";
1396
+ microsoft: "microsoft";
1397
+ }>>;
1398
+ modelName: z$1.ZodString;
1399
+ apiKey: z$1.ZodOptional<z$1.ZodString>;
1400
+ baseURL: z$1.ZodOptional<z$1.ZodString>;
1401
+ }, z$1.core.$strip>, z$1.ZodString]>>;
1360
1402
  }, z$1.core.$strip>;
1361
1403
  executeOptions: z$1.ZodObject<{
1362
1404
  instruction: z$1.ZodString;
@@ -2877,6 +2919,7 @@ declare class Page {
2877
2919
  * Supports iframe hop notation with '>>' (e.g., 'iframe#checkout >> .submit-btn').
2878
2920
  *
2879
2921
  * @param selector CSS selector to wait for (supports '>>' for iframe hops)
2922
+ * @param options
2880
2923
  * @param options.state Element state to wait for: 'attached' | 'detached' | 'visible' | 'hidden' (default: 'visible')
2881
2924
  * @param options.timeout Maximum time to wait in milliseconds (default: 30000)
2882
2925
  * @param options.pierceShadow Whether to search inside shadow DOM (default: true)