@browserbasehq/orca 3.7.1-preview.0 → 3.7.2-preview.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/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.js +34 -20
- package/dist/cjs/lib/v3/handlers/v3CuaAgentHandler.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/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/options.d.ts +13 -0
- package/dist/cjs/lib/v3/types/public/options.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 +15 -0
- package/dist/cjs/lib/v3/understudy/page.js +50 -0
- 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 +39 -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/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.js +34 -20
- package/dist/esm/lib/v3/handlers/v3CuaAgentHandler.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/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/options.d.ts +13 -0
- package/dist/esm/lib/v3/types/public/options.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 +15 -0
- package/dist/esm/lib/v3/understudy/page.js +50 -0
- 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 +39 -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 +1 -1
package/dist/esm/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/esm/lib/v3/v3.js
CHANGED
|
@@ -191,27 +191,52 @@ let V3 = (() => {
|
|
|
191
191
|
get isAdvancedStealth() {
|
|
192
192
|
return this.isVerified;
|
|
193
193
|
}
|
|
194
|
+
/**
|
|
195
|
+
* Whether coordinate pointer actions should actuate as touch instead of mouse.
|
|
196
|
+
*
|
|
197
|
+
* Explicit opt-in via the `useTouch` option — no session-derived or probed
|
|
198
|
+
* detection, so the answer is known before the first action, is stable for the
|
|
199
|
+
* whole run, and never surprises a caller who didn't ask for touch.
|
|
200
|
+
*/
|
|
201
|
+
get usesTouch() {
|
|
202
|
+
return this.opts.useTouch === true;
|
|
203
|
+
}
|
|
194
204
|
/**
|
|
195
205
|
* Returns the configured viewport dimensions from launch options.
|
|
196
206
|
* Falls back to default 1288x711 if not configured.
|
|
197
207
|
*/
|
|
198
208
|
get configuredViewport() {
|
|
199
|
-
const
|
|
200
|
-
const defaultHeight = 711;
|
|
201
|
-
if (this.opts.env === "BROWSERBASE") {
|
|
202
|
-
const vp = this.opts.browserbaseSessionCreateParams?.browserSettings?.viewport;
|
|
203
|
-
return {
|
|
204
|
-
width: vp?.width ?? defaultWidth,
|
|
205
|
-
height: vp?.height ?? defaultHeight,
|
|
206
|
-
};
|
|
207
|
-
}
|
|
208
|
-
// LOCAL env
|
|
209
|
-
const vp = this.opts.localBrowserLaunchOptions?.viewport;
|
|
209
|
+
const viewport = this.rawConfiguredViewport();
|
|
210
210
|
return {
|
|
211
|
-
width:
|
|
212
|
-
height:
|
|
211
|
+
width: viewport?.width ?? 1288,
|
|
212
|
+
height: viewport?.height ?? 711,
|
|
213
213
|
};
|
|
214
214
|
}
|
|
215
|
+
get hasConfiguredViewport() {
|
|
216
|
+
return this.rawConfiguredViewport() !== undefined;
|
|
217
|
+
}
|
|
218
|
+
rawConfiguredViewport() {
|
|
219
|
+
if (this.opts.env === "BROWSERBASE") {
|
|
220
|
+
return this.opts.browserbaseSessionCreateParams?.browserSettings
|
|
221
|
+
?.viewport;
|
|
222
|
+
}
|
|
223
|
+
return this.opts.localBrowserLaunchOptions?.viewport;
|
|
224
|
+
}
|
|
225
|
+
async resolveViewport() {
|
|
226
|
+
const configured = this.rawConfiguredViewport();
|
|
227
|
+
if (configured)
|
|
228
|
+
return this.configuredViewport;
|
|
229
|
+
try {
|
|
230
|
+
const page = await this.context.awaitActivePage();
|
|
231
|
+
const { width, height } = await page.mainFrame().evaluate("({ width: window.innerWidth, height: window.innerHeight })");
|
|
232
|
+
if (width && height)
|
|
233
|
+
return { width, height };
|
|
234
|
+
}
|
|
235
|
+
catch {
|
|
236
|
+
//
|
|
237
|
+
}
|
|
238
|
+
return this.configuredViewport;
|
|
239
|
+
}
|
|
215
240
|
_onCdpClosed = (why) => {
|
|
216
241
|
if (this.state.kind === "BROWSERBASE") {
|
|
217
242
|
void this._logBrowserbaseSessionStatus();
|
|
@@ -859,6 +884,7 @@ let V3 = (() => {
|
|
|
859
884
|
verbose: this.verbose,
|
|
860
885
|
systemPrompt: this.opts.systemPrompt,
|
|
861
886
|
selfHeal: this.opts.selfHeal,
|
|
887
|
+
useTouch: this.opts.useTouch,
|
|
862
888
|
browserbaseSessionCreateParams: createSessionPayload,
|
|
863
889
|
browserbaseSessionID: this.opts.browserbaseSessionID,
|
|
864
890
|
});
|