@browserbasehq/orca 3.0.1 → 3.0.2-test-cua-base-url
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/index.js +30 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7443,7 +7443,7 @@ var import_path5 = __toESM(require("path"));
|
|
|
7443
7443
|
var import_process2 = __toESM(require("process"));
|
|
7444
7444
|
|
|
7445
7445
|
// lib/version.ts
|
|
7446
|
-
var STAGEHAND_VERSION = "3.0.
|
|
7446
|
+
var STAGEHAND_VERSION = "3.0.2-test-cua-base-url";
|
|
7447
7447
|
|
|
7448
7448
|
// lib/v3/types/public/sdkErrors.ts
|
|
7449
7449
|
var StagehandError = class extends Error {
|
|
@@ -9700,6 +9700,7 @@ var SupportedPlaywrightAction = /* @__PURE__ */ ((SupportedPlaywrightAction2) =>
|
|
|
9700
9700
|
SupportedPlaywrightAction2["NEXT_CHUNK"] = "nextChunk";
|
|
9701
9701
|
SupportedPlaywrightAction2["PREV_CHUNK"] = "prevChunk";
|
|
9702
9702
|
SupportedPlaywrightAction2["SELECT_OPTION_FROM_DROPDOWN"] = "selectOptionFromDropdown";
|
|
9703
|
+
SupportedPlaywrightAction2["HOVER"] = "hover";
|
|
9703
9704
|
return SupportedPlaywrightAction2;
|
|
9704
9705
|
})(SupportedPlaywrightAction || {});
|
|
9705
9706
|
|
|
@@ -9810,7 +9811,8 @@ var METHOD_HANDLER_MAP = {
|
|
|
9810
9811
|
nextChunk: scrollToNextChunk,
|
|
9811
9812
|
prevChunk: scrollToPreviousChunk,
|
|
9812
9813
|
selectOptionFromDropdown: selectOption,
|
|
9813
|
-
selectOption
|
|
9814
|
+
selectOption,
|
|
9815
|
+
hover
|
|
9814
9816
|
};
|
|
9815
9817
|
function selectOption(ctx) {
|
|
9816
9818
|
return __async(this, null, function* () {
|
|
@@ -10153,6 +10155,26 @@ function scrollByElementHeight(ctx, direction) {
|
|
|
10153
10155
|
}
|
|
10154
10156
|
});
|
|
10155
10157
|
}
|
|
10158
|
+
function hover(ctx) {
|
|
10159
|
+
return __async(this, null, function* () {
|
|
10160
|
+
const { locator, xpath } = ctx;
|
|
10161
|
+
try {
|
|
10162
|
+
yield locator.hover();
|
|
10163
|
+
} catch (e) {
|
|
10164
|
+
v3Logger({
|
|
10165
|
+
category: "action",
|
|
10166
|
+
message: "error attempting to hover",
|
|
10167
|
+
level: 0,
|
|
10168
|
+
auxiliary: {
|
|
10169
|
+
error: { value: e.message, type: "string" },
|
|
10170
|
+
trace: { value: e.stack, type: "string" },
|
|
10171
|
+
xpath: { value: xpath, type: "string" }
|
|
10172
|
+
}
|
|
10173
|
+
});
|
|
10174
|
+
throw new UnderstudyCommandException(e.message);
|
|
10175
|
+
}
|
|
10176
|
+
});
|
|
10177
|
+
}
|
|
10156
10178
|
function getFrameUrl(frame) {
|
|
10157
10179
|
return __async(this, null, function* () {
|
|
10158
10180
|
const url = yield frame.evaluate("location.href");
|
|
@@ -13126,9 +13148,11 @@ var GoogleCUAClient = class extends AgentClient {
|
|
|
13126
13148
|
this.environment = "ENVIRONMENT_BROWSER";
|
|
13127
13149
|
this.tools = tools;
|
|
13128
13150
|
this.apiKey = (clientOptions == null ? void 0 : clientOptions.apiKey) || process.env.GEMINI_API_KEY || process.env.GOOGLE_GENERATIVE_AI_API_KEY || "";
|
|
13129
|
-
this.
|
|
13151
|
+
this.baseURL = clientOptions == null ? void 0 : clientOptions.baseURL;
|
|
13152
|
+
const genAIOptions = __spreadValues({
|
|
13130
13153
|
apiKey: this.apiKey
|
|
13131
|
-
});
|
|
13154
|
+
}, this.baseURL ? { httpOptions: { baseUrl: this.baseURL } } : {});
|
|
13155
|
+
this.client = new import_genai3.GoogleGenAI(genAIOptions);
|
|
13132
13156
|
if ((clientOptions == null ? void 0 : clientOptions.environment) && typeof clientOptions.environment === "string") {
|
|
13133
13157
|
this.environment = clientOptions.environment;
|
|
13134
13158
|
}
|
|
@@ -13148,9 +13172,9 @@ var GoogleCUAClient = class extends AgentClient {
|
|
|
13148
13172
|
}
|
|
13149
13173
|
]
|
|
13150
13174
|
};
|
|
13151
|
-
this.clientOptions = {
|
|
13175
|
+
this.clientOptions = __spreadValues({
|
|
13152
13176
|
apiKey: this.apiKey
|
|
13153
|
-
};
|
|
13177
|
+
}, this.baseURL ? { baseURL: this.baseURL } : {});
|
|
13154
13178
|
if (this.tools && Object.keys(this.tools).length > 0) {
|
|
13155
13179
|
this.updateGenerateContentConfig();
|
|
13156
13180
|
}
|
package/package.json
CHANGED