@browserbasehq/orca 3.7.0-preview.1 → 3.7.2-preview.0
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/modelUtils.d.ts +10 -0
- package/dist/cjs/lib/modelUtils.js +11 -0
- package/dist/cjs/lib/modelUtils.js.map +1 -1
- package/dist/cjs/lib/v3/agent/AgentProvider.js +3 -0
- package/dist/cjs/lib/v3/agent/AgentProvider.js.map +1 -1
- package/dist/cjs/lib/v3/agent/tools/click.js +15 -4
- package/dist/cjs/lib/v3/agent/tools/click.js.map +1 -1
- package/dist/cjs/lib/v3/agent/tools/fillFormVision.js +12 -4
- package/dist/cjs/lib/v3/agent/tools/fillFormVision.js.map +1 -1
- package/dist/cjs/lib/v3/agent/tools/type.js +12 -3
- package/dist/cjs/lib/v3/agent/tools/type.js.map +1 -1
- package/dist/cjs/lib/v3/agent/utils/handleDoneToolCall.js +3 -1
- package/dist/cjs/lib/v3/agent/utils/handleDoneToolCall.js.map +1 -1
- package/dist/cjs/lib/v3/api.d.ts +1 -1
- package/dist/cjs/lib/v3/api.js +11 -1
- package/dist/cjs/lib/v3/api.js.map +1 -1
- package/dist/cjs/lib/v3/cache/AgentCache.js +6 -1
- package/dist/cjs/lib/v3/cache/AgentCache.js.map +1 -1
- package/dist/cjs/lib/v3/external_clients/aisdk.js +2 -0
- package/dist/cjs/lib/v3/external_clients/aisdk.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/v3AgentHandler.js +5 -4
- package/dist/cjs/lib/v3/handlers/v3AgentHandler.js.map +1 -1
- package/dist/cjs/lib/v3/handlers/v3CuaAgentHandler.js +32 -0
- package/dist/cjs/lib/v3/handlers/v3CuaAgentHandler.js.map +1 -1
- package/dist/cjs/lib/v3/index.d.ts +1 -1
- package/dist/cjs/lib/v3/llm/LLMProvider.js +9 -2
- package/dist/cjs/lib/v3/llm/LLMProvider.js.map +1 -1
- package/dist/cjs/lib/v3/llm/aisdk.js +2 -0
- package/dist/cjs/lib/v3/llm/aisdk.js.map +1 -1
- package/dist/cjs/lib/v3/llm/providerOptions.d.ts +7 -0
- package/dist/cjs/lib/v3/llm/providerOptions.js +9 -0
- package/dist/cjs/lib/v3/llm/providerOptions.js.map +1 -0
- package/dist/cjs/lib/v3/types/private/agent.d.ts +1 -1
- package/dist/cjs/lib/v3/types/private/agent.js +1 -0
- package/dist/cjs/lib/v3/types/private/agent.js.map +1 -1
- package/dist/cjs/lib/v3/types/public/agent.d.ts +1 -1
- package/dist/cjs/lib/v3/types/public/agent.js +3 -0
- package/dist/cjs/lib/v3/types/public/agent.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 +7 -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/capture.js +4 -3
- package/dist/cjs/lib/v3/understudy/a11y/snapshot/capture.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 +8 -0
- package/dist/cjs/lib/v3/v3.js +50 -3
- package/dist/cjs/lib/v3/v3.js.map +1 -1
- package/dist/cjs/lib/v3/verifier/types.d.ts +3 -2
- package/dist/cjs/lib/v3/verifier/types.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/modelUtils.d.ts +10 -0
- package/dist/esm/lib/modelUtils.js +9 -0
- package/dist/esm/lib/modelUtils.js.map +1 -1
- package/dist/esm/lib/v3/agent/AgentProvider.js +3 -0
- package/dist/esm/lib/v3/agent/AgentProvider.js.map +1 -1
- package/dist/esm/lib/v3/agent/tools/click.js +15 -4
- package/dist/esm/lib/v3/agent/tools/click.js.map +1 -1
- package/dist/esm/lib/v3/agent/tools/fillFormVision.js +12 -4
- package/dist/esm/lib/v3/agent/tools/fillFormVision.js.map +1 -1
- package/dist/esm/lib/v3/agent/tools/type.js +12 -3
- package/dist/esm/lib/v3/agent/tools/type.js.map +1 -1
- package/dist/esm/lib/v3/agent/utils/handleDoneToolCall.js +3 -1
- package/dist/esm/lib/v3/agent/utils/handleDoneToolCall.js.map +1 -1
- package/dist/esm/lib/v3/api.d.ts +1 -1
- package/dist/esm/lib/v3/api.js +11 -1
- package/dist/esm/lib/v3/api.js.map +1 -1
- package/dist/esm/lib/v3/cache/AgentCache.js +6 -1
- package/dist/esm/lib/v3/cache/AgentCache.js.map +1 -1
- package/dist/esm/lib/v3/external_clients/aisdk.js +2 -0
- package/dist/esm/lib/v3/external_clients/aisdk.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/v3AgentHandler.js +5 -4
- package/dist/esm/lib/v3/handlers/v3AgentHandler.js.map +1 -1
- package/dist/esm/lib/v3/handlers/v3CuaAgentHandler.js +32 -0
- package/dist/esm/lib/v3/handlers/v3CuaAgentHandler.js.map +1 -1
- package/dist/esm/lib/v3/index.d.ts +1 -1
- package/dist/esm/lib/v3/llm/LLMProvider.js +9 -2
- package/dist/esm/lib/v3/llm/LLMProvider.js.map +1 -1
- package/dist/esm/lib/v3/llm/aisdk.js +2 -0
- package/dist/esm/lib/v3/llm/aisdk.js.map +1 -1
- package/dist/esm/lib/v3/llm/providerOptions.d.ts +7 -0
- package/dist/esm/lib/v3/llm/providerOptions.js +6 -0
- package/dist/esm/lib/v3/llm/providerOptions.js.map +1 -0
- package/dist/esm/lib/v3/types/private/agent.d.ts +1 -1
- package/dist/esm/lib/v3/types/private/agent.js +1 -0
- package/dist/esm/lib/v3/types/private/agent.js.map +1 -1
- package/dist/esm/lib/v3/types/public/agent.d.ts +1 -1
- package/dist/esm/lib/v3/types/public/agent.js +3 -0
- package/dist/esm/lib/v3/types/public/agent.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 +7 -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/capture.js +4 -3
- package/dist/esm/lib/v3/understudy/a11y/snapshot/capture.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 +8 -0
- package/dist/esm/lib/v3/v3.js +51 -4
- package/dist/esm/lib/v3/v3.js.map +1 -1
- package/dist/esm/lib/v3/verifier/types.d.ts +3 -2
- package/dist/esm/lib/v3/verifier/types.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
|
@@ -126,6 +126,7 @@ let Page = (() => {
|
|
|
126
126
|
let _waitForSelector_decorators;
|
|
127
127
|
let _evaluate_decorators;
|
|
128
128
|
let _click_decorators;
|
|
129
|
+
let _tap_decorators;
|
|
129
130
|
let _hover_decorators;
|
|
130
131
|
let _scroll_decorators;
|
|
131
132
|
let _dragAndDrop_decorators;
|
|
@@ -155,6 +156,7 @@ let Page = (() => {
|
|
|
155
156
|
})];
|
|
156
157
|
_evaluate_decorators = [FlowLogger_js_1.FlowLogger.wrapWithLogging({ eventType: "PageEvaluate" })];
|
|
157
158
|
_click_decorators = [FlowLogger_js_1.FlowLogger.wrapWithLogging({ eventType: "PageClick" })];
|
|
159
|
+
_tap_decorators = [FlowLogger_js_1.FlowLogger.wrapWithLogging({ eventType: "PageTap" })];
|
|
158
160
|
_hover_decorators = [FlowLogger_js_1.FlowLogger.wrapWithLogging({ eventType: "PageHover" })];
|
|
159
161
|
_scroll_decorators = [FlowLogger_js_1.FlowLogger.wrapWithLogging({ eventType: "PageScroll" })];
|
|
160
162
|
_dragAndDrop_decorators = [FlowLogger_js_1.FlowLogger.wrapWithLogging({
|
|
@@ -175,6 +177,7 @@ let Page = (() => {
|
|
|
175
177
|
__esDecorate(this, null, _waitForSelector_decorators, { kind: "method", name: "waitForSelector", static: false, private: false, access: { has: obj => "waitForSelector" in obj, get: obj => obj.waitForSelector }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
176
178
|
__esDecorate(this, null, _evaluate_decorators, { kind: "method", name: "evaluate", static: false, private: false, access: { has: obj => "evaluate" in obj, get: obj => obj.evaluate }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
177
179
|
__esDecorate(this, null, _click_decorators, { kind: "method", name: "click", static: false, private: false, access: { has: obj => "click" in obj, get: obj => obj.click }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
180
|
+
__esDecorate(this, null, _tap_decorators, { kind: "method", name: "tap", static: false, private: false, access: { has: obj => "tap" in obj, get: obj => obj.tap }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
178
181
|
__esDecorate(this, null, _hover_decorators, { kind: "method", name: "hover", static: false, private: false, access: { has: obj => "hover" in obj, get: obj => obj.hover }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
179
182
|
__esDecorate(this, null, _scroll_decorators, { kind: "method", name: "scroll", static: false, private: false, access: { has: obj => "scroll" in obj, get: obj => obj.scroll }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
180
183
|
__esDecorate(this, null, _dragAndDrop_decorators, { kind: "method", name: "dragAndDrop", static: false, private: false, access: { has: obj => "dragAndDrop" in obj, get: obj => obj.dragAndDrop }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
@@ -1523,6 +1526,53 @@ let Page = (() => {
|
|
|
1523
1526
|
await Promise.all(dispatches);
|
|
1524
1527
|
return xpathResult ?? "";
|
|
1525
1528
|
}
|
|
1529
|
+
/**
|
|
1530
|
+
* Tap at absolute page coordinates (CSS pixels) with a real (trusted) touch.
|
|
1531
|
+
* Mirrors {@link click} but synthesizes touch input via `Input.dispatchTouchEvent`
|
|
1532
|
+
* instead of mouse input, so mobile layouts that gate their handlers on
|
|
1533
|
+
* touch/pointer events (`pointerType: "touch"`) — where a synthesized mouse click
|
|
1534
|
+
* never registers — respond correctly. Coordinates are relative to the viewport
|
|
1535
|
+
* origin (top-left). Does not scroll.
|
|
1536
|
+
*
|
|
1537
|
+
* Does not require touch emulation: CDP delivers a trusted touch sequence even on
|
|
1538
|
+
* a session reporting `maxTouchPoints: 0`. Whether the agent *chooses* this over
|
|
1539
|
+
* {@link click} is decided by `V3.usesTouch`.
|
|
1540
|
+
*/
|
|
1541
|
+
async tap(x, y, options) {
|
|
1542
|
+
let xpathResult;
|
|
1543
|
+
if (options?.returnXpath) {
|
|
1544
|
+
// Resolve the deepest node at the tap coordinates so a recorded/replayed
|
|
1545
|
+
// step can target it by XPath, mirroring click's returnXpath path.
|
|
1546
|
+
try {
|
|
1547
|
+
const hit = await (0, index_js_1.resolveXpathForLocation)(this, x, y);
|
|
1548
|
+
if (hit) {
|
|
1549
|
+
xpathResult = hit.absoluteXPath;
|
|
1550
|
+
}
|
|
1551
|
+
}
|
|
1552
|
+
catch {
|
|
1553
|
+
// best-effort; fall through if resolution fails
|
|
1554
|
+
}
|
|
1555
|
+
}
|
|
1556
|
+
// Keep the cursor overlay in sync with the action, like every other
|
|
1557
|
+
// coordinate action (click/hover/drag), even though touch has no cursor.
|
|
1558
|
+
await this.updateCursor(x, y);
|
|
1559
|
+
// Dispatch touchStart/touchEnd as one pipelined burst, the same way click
|
|
1560
|
+
// batches press/release. CDP processes commands on a session in the order
|
|
1561
|
+
// they were written, so the pair still arrives ordered; awaiting each in
|
|
1562
|
+
// turn only adds a round trip of latency (a full network RTT when the
|
|
1563
|
+
// browser is remote).
|
|
1564
|
+
await Promise.all([
|
|
1565
|
+
this.mainSession.send("Input.dispatchTouchEvent", {
|
|
1566
|
+
type: "touchStart",
|
|
1567
|
+
touchPoints: [{ x, y }],
|
|
1568
|
+
}),
|
|
1569
|
+
this.mainSession.send("Input.dispatchTouchEvent", {
|
|
1570
|
+
type: "touchEnd",
|
|
1571
|
+
touchPoints: [],
|
|
1572
|
+
}),
|
|
1573
|
+
]);
|
|
1574
|
+
return xpathResult ?? "";
|
|
1575
|
+
}
|
|
1526
1576
|
/**
|
|
1527
1577
|
* Hover at absolute page coordinates (CSS pixels).
|
|
1528
1578
|
* Dispatches mouseMoved via CDP Input domain on the top-level page target's
|