@browserbasehq/orca 3.7.1-preview.0 → 3.7.2-gemini-cua
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/dist/cjs/lib/v3/agent/GoogleCUAClient.d.ts +23 -0
- package/dist/cjs/lib/v3/agent/GoogleCUAClient.js +363 -206
- package/dist/cjs/lib/v3/agent/GoogleCUAClient.js.map +1 -1
- package/dist/cjs/lib/v3/agent/tools/click.js +16 -5
- package/dist/cjs/lib/v3/agent/tools/click.js.map +1 -1
- package/dist/cjs/lib/v3/agent/tools/clickAndHold.js +1 -1
- package/dist/cjs/lib/v3/agent/tools/clickAndHold.js.map +1 -1
- package/dist/cjs/lib/v3/agent/tools/dragAndDrop.js +2 -2
- package/dist/cjs/lib/v3/agent/tools/dragAndDrop.js.map +1 -1
- package/dist/cjs/lib/v3/agent/tools/fillFormVision.js +18 -7
- package/dist/cjs/lib/v3/agent/tools/fillFormVision.js.map +1 -1
- package/dist/cjs/lib/v3/agent/tools/scroll.js +1 -1
- package/dist/cjs/lib/v3/agent/tools/scroll.js.map +1 -1
- package/dist/cjs/lib/v3/agent/tools/type.js +13 -4
- package/dist/cjs/lib/v3/agent/tools/type.js.map +1 -1
- package/dist/cjs/lib/v3/agent/utils/coordinateNormalization.d.ts +5 -2
- package/dist/cjs/lib/v3/agent/utils/coordinateNormalization.js +5 -7
- package/dist/cjs/lib/v3/agent/utils/coordinateNormalization.js.map +1 -1
- package/dist/cjs/lib/v3/api.d.ts +1 -1
- package/dist/cjs/lib/v3/api.js +2 -1
- package/dist/cjs/lib/v3/api.js.map +1 -1
- package/dist/cjs/lib/v3/handlers/handlerUtils/actHandlerUtils.js +20 -0
- package/dist/cjs/lib/v3/handlers/handlerUtils/actHandlerUtils.js.map +1 -1
- package/dist/cjs/lib/v3/handlers/v3CuaAgentHandler.d.ts +4 -0
- package/dist/cjs/lib/v3/handlers/v3CuaAgentHandler.js +126 -20
- package/dist/cjs/lib/v3/handlers/v3CuaAgentHandler.js.map +1 -1
- package/dist/cjs/lib/v3/launch/local.js +1 -1
- package/dist/cjs/lib/v3/launch/local.js.map +1 -1
- package/dist/cjs/lib/v3/llm/aisdk.js +3 -3
- package/dist/cjs/lib/v3/llm/aisdk.js.map +1 -1
- package/dist/cjs/lib/v3/runtimePaths.js +0 -1
- package/dist/cjs/lib/v3/runtimePaths.js.map +1 -1
- package/dist/cjs/lib/v3/types/public/api.d.ts +53 -0
- package/dist/cjs/lib/v3/types/public/api.js +8 -0
- package/dist/cjs/lib/v3/types/public/api.js.map +1 -1
- package/dist/cjs/lib/v3/types/public/model.d.ts +5 -0
- package/dist/cjs/lib/v3/types/public/model.js.map +1 -1
- package/dist/cjs/lib/v3/types/public/options.d.ts +13 -0
- package/dist/cjs/lib/v3/types/public/options.js.map +1 -1
- package/dist/cjs/lib/v3/understudy/a11y/snapshot/coordinateResolver.js +39 -1
- package/dist/cjs/lib/v3/understudy/a11y/snapshot/coordinateResolver.js.map +1 -1
- package/dist/cjs/lib/v3/understudy/locator.d.ts +12 -0
- package/dist/cjs/lib/v3/understudy/locator.js +44 -0
- package/dist/cjs/lib/v3/understudy/locator.js.map +1 -1
- package/dist/cjs/lib/v3/understudy/page.d.ts +22 -3
- package/dist/cjs/lib/v3/understudy/page.js +55 -1
- package/dist/cjs/lib/v3/understudy/page.js.map +1 -1
- package/dist/cjs/lib/v3/v3.d.ts +14 -0
- package/dist/cjs/lib/v3/v3.js +42 -13
- package/dist/cjs/lib/v3/v3.js.map +1 -1
- package/dist/cjs/lib/version.d.ts +1 -1
- package/dist/cjs/lib/version.js +1 -1
- package/dist/cjs/lib/version.js.map +1 -1
- package/dist/esm/lib/v3/agent/GoogleCUAClient.d.ts +23 -0
- package/dist/esm/lib/v3/agent/GoogleCUAClient.js +363 -206
- package/dist/esm/lib/v3/agent/GoogleCUAClient.js.map +1 -1
- package/dist/esm/lib/v3/agent/tools/click.js +16 -5
- package/dist/esm/lib/v3/agent/tools/click.js.map +1 -1
- package/dist/esm/lib/v3/agent/tools/clickAndHold.js +1 -1
- package/dist/esm/lib/v3/agent/tools/clickAndHold.js.map +1 -1
- package/dist/esm/lib/v3/agent/tools/dragAndDrop.js +2 -2
- package/dist/esm/lib/v3/agent/tools/dragAndDrop.js.map +1 -1
- package/dist/esm/lib/v3/agent/tools/fillFormVision.js +19 -8
- package/dist/esm/lib/v3/agent/tools/fillFormVision.js.map +1 -1
- package/dist/esm/lib/v3/agent/tools/scroll.js +1 -1
- package/dist/esm/lib/v3/agent/tools/scroll.js.map +1 -1
- package/dist/esm/lib/v3/agent/tools/type.js +13 -4
- package/dist/esm/lib/v3/agent/tools/type.js.map +1 -1
- package/dist/esm/lib/v3/agent/utils/coordinateNormalization.d.ts +5 -2
- package/dist/esm/lib/v3/agent/utils/coordinateNormalization.js +5 -7
- package/dist/esm/lib/v3/agent/utils/coordinateNormalization.js.map +1 -1
- package/dist/esm/lib/v3/api.d.ts +1 -1
- package/dist/esm/lib/v3/api.js +2 -1
- package/dist/esm/lib/v3/api.js.map +1 -1
- package/dist/esm/lib/v3/handlers/handlerUtils/actHandlerUtils.js +20 -0
- package/dist/esm/lib/v3/handlers/handlerUtils/actHandlerUtils.js.map +1 -1
- package/dist/esm/lib/v3/handlers/v3CuaAgentHandler.d.ts +4 -0
- package/dist/esm/lib/v3/handlers/v3CuaAgentHandler.js +126 -20
- package/dist/esm/lib/v3/handlers/v3CuaAgentHandler.js.map +1 -1
- package/dist/esm/lib/v3/launch/local.js +1 -1
- package/dist/esm/lib/v3/launch/local.js.map +1 -1
- package/dist/esm/lib/v3/llm/aisdk.js +3 -3
- package/dist/esm/lib/v3/llm/aisdk.js.map +1 -1
- package/dist/esm/lib/v3/runtimePaths.js +0 -1
- package/dist/esm/lib/v3/runtimePaths.js.map +1 -1
- package/dist/esm/lib/v3/types/public/api.d.ts +53 -0
- package/dist/esm/lib/v3/types/public/api.js +8 -0
- package/dist/esm/lib/v3/types/public/api.js.map +1 -1
- package/dist/esm/lib/v3/types/public/model.d.ts +5 -0
- package/dist/esm/lib/v3/types/public/model.js.map +1 -1
- package/dist/esm/lib/v3/types/public/options.d.ts +13 -0
- package/dist/esm/lib/v3/types/public/options.js.map +1 -1
- package/dist/esm/lib/v3/understudy/a11y/snapshot/coordinateResolver.js +39 -1
- package/dist/esm/lib/v3/understudy/a11y/snapshot/coordinateResolver.js.map +1 -1
- package/dist/esm/lib/v3/understudy/locator.d.ts +12 -0
- package/dist/esm/lib/v3/understudy/locator.js +44 -0
- package/dist/esm/lib/v3/understudy/locator.js.map +1 -1
- package/dist/esm/lib/v3/understudy/page.d.ts +22 -3
- package/dist/esm/lib/v3/understudy/page.js +55 -1
- package/dist/esm/lib/v3/understudy/page.js.map +1 -1
- package/dist/esm/lib/v3/v3.d.ts +14 -0
- package/dist/esm/lib/v3/v3.js +42 -13
- package/dist/esm/lib/v3/v3.js.map +1 -1
- package/dist/esm/lib/version.d.ts +1 -1
- package/dist/esm/lib/version.js +1 -1
- package/dist/esm/lib/version.js.map +1 -1
- package/package.json +3 -3
package/dist/cjs/lib/v3/v3.d.ts
CHANGED
|
@@ -73,6 +73,14 @@ export declare class V3 {
|
|
|
73
73
|
* @deprecated Use `isVerified` instead. This alias will be removed in a future version.
|
|
74
74
|
*/
|
|
75
75
|
get isAdvancedStealth(): boolean;
|
|
76
|
+
/**
|
|
77
|
+
* Whether coordinate pointer actions should actuate as touch instead of mouse.
|
|
78
|
+
*
|
|
79
|
+
* Explicit opt-in via the `useTouch` option — no session-derived or probed
|
|
80
|
+
* detection, so the answer is known before the first action, is stable for the
|
|
81
|
+
* whole run, and never surprises a caller who didn't ask for touch.
|
|
82
|
+
*/
|
|
83
|
+
get usesTouch(): boolean;
|
|
76
84
|
/**
|
|
77
85
|
* Returns the configured viewport dimensions from launch options.
|
|
78
86
|
* Falls back to default 1288x711 if not configured.
|
|
@@ -81,6 +89,12 @@ export declare class V3 {
|
|
|
81
89
|
width: number;
|
|
82
90
|
height: number;
|
|
83
91
|
};
|
|
92
|
+
get hasConfiguredViewport(): boolean;
|
|
93
|
+
private rawConfiguredViewport;
|
|
94
|
+
resolveViewport(): Promise<{
|
|
95
|
+
width: number;
|
|
96
|
+
height: number;
|
|
97
|
+
}>;
|
|
84
98
|
private _onCdpClosed;
|
|
85
99
|
readonly experimental: boolean;
|
|
86
100
|
readonly logInferenceToFile: boolean;
|
package/dist/cjs/lib/v3/v3.js
CHANGED
|
@@ -231,27 +231,55 @@ let V3 = (() => {
|
|
|
231
231
|
get isAdvancedStealth() {
|
|
232
232
|
return this.isVerified;
|
|
233
233
|
}
|
|
234
|
+
/**
|
|
235
|
+
* Whether coordinate pointer actions should actuate as touch instead of mouse.
|
|
236
|
+
*
|
|
237
|
+
* Explicit opt-in via the `useTouch` option — no session-derived or probed
|
|
238
|
+
* detection, so the answer is known before the first action, is stable for the
|
|
239
|
+
* whole run, and never surprises a caller who didn't ask for touch.
|
|
240
|
+
*/
|
|
241
|
+
get usesTouch() {
|
|
242
|
+
return this.opts.useTouch === true;
|
|
243
|
+
}
|
|
234
244
|
/**
|
|
235
245
|
* Returns the configured viewport dimensions from launch options.
|
|
236
246
|
* Falls back to default 1288x711 if not configured.
|
|
237
247
|
*/
|
|
238
248
|
get configuredViewport() {
|
|
239
|
-
const
|
|
240
|
-
const defaultHeight = 711;
|
|
241
|
-
if (this.opts.env === "BROWSERBASE") {
|
|
242
|
-
const vp = this.opts.browserbaseSessionCreateParams?.browserSettings?.viewport;
|
|
243
|
-
return {
|
|
244
|
-
width: vp?.width ?? defaultWidth,
|
|
245
|
-
height: vp?.height ?? defaultHeight,
|
|
246
|
-
};
|
|
247
|
-
}
|
|
248
|
-
// LOCAL env
|
|
249
|
-
const vp = this.opts.localBrowserLaunchOptions?.viewport;
|
|
249
|
+
const viewport = this.rawConfiguredViewport();
|
|
250
250
|
return {
|
|
251
|
-
width:
|
|
252
|
-
height:
|
|
251
|
+
width: viewport?.width ?? 1288,
|
|
252
|
+
height: viewport?.height ?? 711,
|
|
253
253
|
};
|
|
254
254
|
}
|
|
255
|
+
get hasConfiguredViewport() {
|
|
256
|
+
return this.rawConfiguredViewport() !== undefined;
|
|
257
|
+
}
|
|
258
|
+
rawConfiguredViewport() {
|
|
259
|
+
if (this.opts.env === "BROWSERBASE") {
|
|
260
|
+
return this.opts.browserbaseSessionCreateParams?.browserSettings
|
|
261
|
+
?.viewport;
|
|
262
|
+
}
|
|
263
|
+
return this.opts.localBrowserLaunchOptions?.viewport;
|
|
264
|
+
}
|
|
265
|
+
async resolveViewport() {
|
|
266
|
+
// Verified / advanced-stealth sessions do not honor the requested
|
|
267
|
+
// viewport (Browserbase picks a real-device size, e.g. 1280x720 for a
|
|
268
|
+
// requested 2560x1440), so trust the configured value only otherwise.
|
|
269
|
+
const configured = this.rawConfiguredViewport();
|
|
270
|
+
if (configured && !this.isVerified)
|
|
271
|
+
return this.configuredViewport;
|
|
272
|
+
try {
|
|
273
|
+
const page = await this.context.awaitActivePage();
|
|
274
|
+
const { width, height } = await page.mainFrame().evaluate("({ width: window.innerWidth, height: window.innerHeight })");
|
|
275
|
+
if (width && height)
|
|
276
|
+
return { width, height };
|
|
277
|
+
}
|
|
278
|
+
catch {
|
|
279
|
+
//
|
|
280
|
+
}
|
|
281
|
+
return this.configuredViewport;
|
|
282
|
+
}
|
|
255
283
|
_onCdpClosed = (why) => {
|
|
256
284
|
if (this.state.kind === "BROWSERBASE") {
|
|
257
285
|
void this._logBrowserbaseSessionStatus();
|
|
@@ -899,6 +927,7 @@ let V3 = (() => {
|
|
|
899
927
|
verbose: this.verbose,
|
|
900
928
|
systemPrompt: this.opts.systemPrompt,
|
|
901
929
|
selfHeal: this.opts.selfHeal,
|
|
930
|
+
useTouch: this.opts.useTouch,
|
|
902
931
|
browserbaseSessionCreateParams: createSessionPayload,
|
|
903
932
|
browserbaseSessionID: this.opts.browserbaseSessionID,
|
|
904
933
|
});
|