@leg3ndy/otto-bridge 0.8.0 → 0.8.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/executors/native_macos.js +22 -19
- package/dist/types.js +1 -1
- package/package.json +1 -1
|
@@ -1254,7 +1254,12 @@ export class NativeMacOSJobExecutor {
|
|
|
1254
1254
|
await this.triggerMacOSMediaTransport(nativeMediaTransport);
|
|
1255
1255
|
let validated = false;
|
|
1256
1256
|
let validationReason = "";
|
|
1257
|
-
if (
|
|
1257
|
+
if (browserApp) {
|
|
1258
|
+
const browserValidation = await this.confirmBrowserClick(browserApp, initialBrowserState, targetDescription, null);
|
|
1259
|
+
validated = browserValidation.ok;
|
|
1260
|
+
validationReason = browserValidation.reason;
|
|
1261
|
+
}
|
|
1262
|
+
if (!validated && action.verification_prompt) {
|
|
1258
1263
|
const verification = await this.validateVisualClickWithVision(job.job_id, targetDescription, action.verification_prompt, progressPercent, reporter, artifacts, "native_media_transport_result");
|
|
1259
1264
|
if (verification.unavailable) {
|
|
1260
1265
|
lastFailureReason = verification.reason;
|
|
@@ -1263,12 +1268,7 @@ export class NativeMacOSJobExecutor {
|
|
|
1263
1268
|
validated = verification.ok;
|
|
1264
1269
|
validationReason = verification.reason;
|
|
1265
1270
|
}
|
|
1266
|
-
else if (browserApp) {
|
|
1267
|
-
const browserValidation = await this.confirmBrowserClick(browserApp, initialBrowserState, targetDescription, null);
|
|
1268
|
-
validated = browserValidation.ok;
|
|
1269
|
-
validationReason = browserValidation.reason;
|
|
1270
|
-
}
|
|
1271
|
-
else {
|
|
1271
|
+
else if (!browserApp) {
|
|
1272
1272
|
validated = true;
|
|
1273
1273
|
}
|
|
1274
1274
|
if (validated) {
|
|
@@ -1293,7 +1293,12 @@ export class NativeMacOSJobExecutor {
|
|
|
1293
1293
|
if (domClick?.clicked) {
|
|
1294
1294
|
let validated = false;
|
|
1295
1295
|
let validationReason = "";
|
|
1296
|
-
if (
|
|
1296
|
+
if (browserApp) {
|
|
1297
|
+
const browserValidation = await this.confirmBrowserClick(browserApp, initialBrowserState, targetDescription, domClick.matchedHref || null);
|
|
1298
|
+
validated = browserValidation.ok;
|
|
1299
|
+
validationReason = browserValidation.reason;
|
|
1300
|
+
}
|
|
1301
|
+
if (!validated && action.verification_prompt) {
|
|
1297
1302
|
const verification = await this.validateVisualClickWithVision(job.job_id, targetDescription, action.verification_prompt, progressPercent, reporter, artifacts, "dom_click_result");
|
|
1298
1303
|
if (verification.unavailable) {
|
|
1299
1304
|
lastFailureReason = verification.reason;
|
|
@@ -1302,10 +1307,8 @@ export class NativeMacOSJobExecutor {
|
|
|
1302
1307
|
validated = verification.ok;
|
|
1303
1308
|
validationReason = verification.reason;
|
|
1304
1309
|
}
|
|
1305
|
-
else {
|
|
1306
|
-
|
|
1307
|
-
validated = browserValidation.ok;
|
|
1308
|
-
validationReason = browserValidation.reason;
|
|
1310
|
+
else if (!browserApp) {
|
|
1311
|
+
validated = true;
|
|
1309
1312
|
}
|
|
1310
1313
|
if (validated) {
|
|
1311
1314
|
this.lastVisualTargetDescription = targetDescription;
|
|
@@ -1336,7 +1339,12 @@ export class NativeMacOSJobExecutor {
|
|
|
1336
1339
|
if (ocrClick.clicked) {
|
|
1337
1340
|
let validated = false;
|
|
1338
1341
|
let validationReason = "";
|
|
1339
|
-
if (
|
|
1342
|
+
if (browserApp) {
|
|
1343
|
+
const browserValidation = await this.confirmBrowserClick(browserApp, visualBeforeState, targetDescription, null);
|
|
1344
|
+
validated = browserValidation.ok;
|
|
1345
|
+
validationReason = browserValidation.reason;
|
|
1346
|
+
}
|
|
1347
|
+
if (!validated && action.verification_prompt) {
|
|
1340
1348
|
const verification = await this.validateVisualClickWithVision(job.job_id, targetDescription, action.verification_prompt, progressPercent, reporter, artifacts, "local_ocr_click_result");
|
|
1341
1349
|
if (verification.unavailable) {
|
|
1342
1350
|
lastFailureReason = verification.reason;
|
|
@@ -1345,12 +1353,7 @@ export class NativeMacOSJobExecutor {
|
|
|
1345
1353
|
validated = verification.ok;
|
|
1346
1354
|
validationReason = verification.reason;
|
|
1347
1355
|
}
|
|
1348
|
-
else if (browserApp) {
|
|
1349
|
-
const browserValidation = await this.confirmBrowserClick(browserApp, visualBeforeState, targetDescription, null);
|
|
1350
|
-
validated = browserValidation.ok;
|
|
1351
|
-
validationReason = browserValidation.reason;
|
|
1352
|
-
}
|
|
1353
|
-
else {
|
|
1356
|
+
else if (!browserApp) {
|
|
1354
1357
|
validated = true;
|
|
1355
1358
|
}
|
|
1356
1359
|
if (validated) {
|
package/dist/types.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export const BRIDGE_CONFIG_VERSION = 1;
|
|
2
|
-
export const BRIDGE_VERSION = "0.8.
|
|
2
|
+
export const BRIDGE_VERSION = "0.8.1";
|
|
3
3
|
export const BRIDGE_PACKAGE_NAME = "@leg3ndy/otto-bridge";
|
|
4
4
|
export const DEFAULT_API_BASE_URL = "http://localhost:8000";
|
|
5
5
|
export const DEFAULT_POLL_INTERVAL_MS = 3000;
|