@burdenoff/ui-engine 2026.1204.1 → 2026.1204.3
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/README.md +28 -4
- package/dist/analyze/analyze.d.ts +25 -3
- package/dist/analyze/context.d.ts +25 -9
- package/dist/analyze/index.d.ts +6 -4
- package/dist/analyze/messages.d.ts +5 -0
- package/dist/analyze/rules/ai-step-no-allowlist.d.ts +29 -0
- package/dist/analyze/rules/index.d.ts +1 -0
- package/dist/analyze/rules/run-command-from-variable.d.ts +2 -0
- package/dist/analyze/rules/sequence-too-long.d.ts +4 -0
- package/dist/analyze/rules/single-method-image-target.d.ts +7 -0
- package/dist/analyze/rules/unnamed-step.d.ts +10 -0
- package/dist/analyze/sensitive.d.ts +2 -2
- package/dist/analyze/types.d.ts +33 -4
- package/dist/analyze.js +8 -2
- package/dist/desk.d.ts +13 -0
- package/dist/desk.js +29 -0
- package/dist/dom-runtime.iife.js +1 -1
- package/dist/dom-runtime.js +2 -2
- package/dist/drivers/desk-backend.d.ts +40 -0
- package/dist/drivers/desk-driver.d.ts +41 -0
- package/dist/drivers/desk-errors.d.ts +19 -0
- package/dist/drivers/desk-tree.d.ts +28 -0
- package/dist/drivers/desk-wire.d.ts +237 -0
- package/dist/drivers/index.d.ts +3 -1
- package/dist/drivers.js +10 -7
- package/dist/heal.js +5 -5
- package/dist/index-0ps53dhe.js +85 -0
- package/dist/index-552x2bnm.js +56 -0
- package/dist/index-6m0chbhq.js +64 -0
- package/dist/{index-gvavb597.js → index-93hfbk5c.js} +10 -0
- package/dist/index-a8s39bse.js +920 -0
- package/dist/index-b5a306v7.js +43 -0
- package/dist/index-bx4bsvg0.js +458 -0
- package/dist/{index-9xgz8dxt.js → index-e2pk74e6.js} +4 -4
- package/dist/{index-vnv9tp11.js → index-e7pgqd60.js} +2 -2
- package/dist/index-hdq3y007.js +246 -0
- package/dist/{index-vpm1gnmy.js → index-mv0r8wrh.js} +219 -34
- package/dist/{index-zagmp5ya.js → index-n3nfhjrj.js} +2 -2
- package/dist/{index-wnch00m6.js → index-nmsg2wze.js} +2 -2
- package/dist/{index-zhbwhdya.js → index-q2jbva7c.js} +5 -3
- package/dist/{index-n7ah1jn7.js → index-rbem2yms.js} +16 -243
- package/dist/{index-mhv6a02p.js → index-reef7e8m.js} +1 -1
- package/dist/{index-dwp10g62.js → index-v3nw2n2g.js} +182 -54
- package/dist/{index-3r2y0mnc.js → index-wdbn4xjc.js} +5 -5
- package/dist/{index-ptrmf779.js → index-wk6416m8.js} +3 -3
- package/dist/{index-8eb4xd1j.js → index-x8fc4r4h.js} +101 -426
- package/dist/{index-0tfzfxx9.js → index-yhzykhdj.js} +1 -43
- package/dist/{index-t55wvhvh.js → index-z2v8prer.js} +1 -61
- package/dist/{index-5pv673wd.js → index-zj3zhbac.js} +2 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +83 -31
- package/dist/interpret/driver.d.ts +109 -18
- package/dist/interpret/events.d.ts +5 -2
- package/dist/interpret/index.d.ts +4 -3
- package/dist/interpret/run.d.ts +28 -1
- package/dist/interpret.js +16 -9
- package/dist/script/adapters/recording-desktop.d.ts +52 -0
- package/dist/script/describe.d.ts +7 -2
- package/dist/script/desk-roles.d.ts +33 -0
- package/dist/script/desktop-capabilities.d.ts +7 -2
- package/dist/script/desktop-schema.d.ts +2 -0
- package/dist/script/index.d.ts +3 -1
- package/dist/script.js +35 -19
- package/dist/target/types.d.ts +10 -4
- package/dist/target.js +20 -16
- package/dist/testing.js +5 -3
- package/package.json +7 -3
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import {
|
|
2
|
+
looksLikeSecretField
|
|
3
|
+
} from "./index-552x2bnm.js";
|
|
1
4
|
import {
|
|
2
5
|
describeTarget2
|
|
3
|
-
} from "./index-
|
|
6
|
+
} from "./index-93hfbk5c.js";
|
|
4
7
|
import {
|
|
5
8
|
UI_FLOW_ACTIONS2,
|
|
6
9
|
walkSteps2,
|
|
@@ -204,6 +207,12 @@ function elementInfoFromTarget2(target, elementName) {
|
|
|
204
207
|
}
|
|
205
208
|
|
|
206
209
|
// src/analyze/context.ts
|
|
210
|
+
function webOnlyStep(step) {
|
|
211
|
+
return step;
|
|
212
|
+
}
|
|
213
|
+
function webOnlyTarget(target) {
|
|
214
|
+
return target;
|
|
215
|
+
}
|
|
207
216
|
function stepNumber2(path) {
|
|
208
217
|
return path.split(".").filter((part) => part !== "then" && part !== "steps").map((part) => /^\d+$/.test(part) ? String(Number(part) + 1) : part).join(".");
|
|
209
218
|
}
|
|
@@ -241,6 +250,14 @@ function variablesRead(expression) {
|
|
|
241
250
|
});
|
|
242
251
|
return names;
|
|
243
252
|
}
|
|
253
|
+
function inputsRead(expression) {
|
|
254
|
+
const names = [];
|
|
255
|
+
visitExpression2(expression, (node) => {
|
|
256
|
+
if (node !== null && typeof node === "object" && "input" in node)
|
|
257
|
+
names.push(node.input);
|
|
258
|
+
});
|
|
259
|
+
return names;
|
|
260
|
+
}
|
|
244
261
|
function stepVariablesRead(step) {
|
|
245
262
|
return stepExpressions2(step).flatMap(([, expression]) => variablesRead(expression));
|
|
246
263
|
}
|
|
@@ -289,7 +306,12 @@ var UI_SCRIPT_PROBLEM_MESSAGES2 = {
|
|
|
289
306
|
popupHandlerAction: "Pop-up handler step {{step}} uses {{action}}. A handler may only click, check, press keys, hover, scroll or wait.",
|
|
290
307
|
popupHandlerConsequential: "Pop-up handler step {{step}} acts on {{target}}, which looks like a {{consequence}} control. A handler never acts on such a control.",
|
|
291
308
|
popupHandlerWait: "Pop-up handler step {{step}} waits {{milliseconds}} ms. A handler step waits at most 5,000 ms, so a pop-up never holds up a run.",
|
|
292
|
-
popupHandlerNoAction: "The pop-up handler has no step that clicks, checks or presses a key, so it cannot clear the pop-up."
|
|
309
|
+
popupHandlerNoAction: "The pop-up handler has no step that clicks, checks or presses a key, so it cannot clear the pop-up.",
|
|
310
|
+
runCommandFromVariable: "Step {{step}} runs a command built from {{name}}. A value read from the screen, a file or another node could change what the command does. Use a fixed command, or check the value in an earlier step.",
|
|
311
|
+
singleMethodImageTarget: "Step {{step}} finds {{target}} by an image only. An image match breaks when the theme, the display scale or the resolution changes. Add a selector or a text method.",
|
|
312
|
+
aiStepNoAllowlist: "The AI Step has no allowed sites that limit where it may go, so it could go to any site a page or the model sends it to. Add the sites it may visit.",
|
|
313
|
+
unnamedStep: "Step {{step}} has no name. Name it after what it does, so the run log and the problems list say which step is meant.",
|
|
314
|
+
sequenceTooLong: "The sequence that holds step {{step}} has {{count}} steps that run, more than {{limit}}. Split it into shared sequences or several nodes, so it stays easy to read and to fix."
|
|
293
315
|
};
|
|
294
316
|
function problemMessageKey2(name) {
|
|
295
317
|
return `${UI_SCRIPT_PROBLEM_KEY_PREFIX2}${name}`;
|
|
@@ -298,6 +320,37 @@ function problemMessage2(name, vars) {
|
|
|
298
320
|
return UI_SCRIPT_PROBLEM_MESSAGES2[name].replace(/\{\{(\w+)\}\}/g, (_match, variable) => String(vars[variable] ?? ""));
|
|
299
321
|
}
|
|
300
322
|
|
|
323
|
+
// src/analyze/rules/ai-step-no-allowlist.ts
|
|
324
|
+
var aiStepNoAllowlistRule = {
|
|
325
|
+
id: "aiStepNoAllowlist",
|
|
326
|
+
group: "security",
|
|
327
|
+
severity: "error",
|
|
328
|
+
description: "An AI Step whose allowed-site list is missing, empty or allows every site.",
|
|
329
|
+
check: (context) => {
|
|
330
|
+
const aiStep = context.options.aiStep;
|
|
331
|
+
if (aiStep === undefined || hasAllowedSites(aiStep))
|
|
332
|
+
return [];
|
|
333
|
+
return [{ message: "aiStepNoAllowlist", vars: {}, field: "allowedHosts", order: -1 }];
|
|
334
|
+
}
|
|
335
|
+
};
|
|
336
|
+
function hasAllowedSites(settings) {
|
|
337
|
+
const hosts = settings.allowedHosts;
|
|
338
|
+
if (typeof hosts === "string")
|
|
339
|
+
return hosts.trim().length > 0;
|
|
340
|
+
if (!Array.isArray(hosts))
|
|
341
|
+
return false;
|
|
342
|
+
return hosts.some(restrictsSites);
|
|
343
|
+
}
|
|
344
|
+
function restrictsSites(entry) {
|
|
345
|
+
if (typeof entry !== "string")
|
|
346
|
+
return false;
|
|
347
|
+
const host = entry.trim();
|
|
348
|
+
const rest = host.startsWith("*.") ? host.slice(2) : host;
|
|
349
|
+
if (rest.length === 0 || rest.includes("*"))
|
|
350
|
+
return false;
|
|
351
|
+
return rest === host || rest.includes(".");
|
|
352
|
+
}
|
|
353
|
+
|
|
301
354
|
// src/analyze/rules/rule.ts
|
|
302
355
|
function stepFinding(active, message, vars = {}, field) {
|
|
303
356
|
return {
|
|
@@ -411,12 +464,13 @@ var healConsequentialRule = {
|
|
|
411
464
|
const alwaysAsk = new Set(healing.alwaysAskStepIds ?? []);
|
|
412
465
|
const findings = [];
|
|
413
466
|
for (const active of context.steps) {
|
|
414
|
-
const step = active.step;
|
|
467
|
+
const step = webOnlyStep(active.step);
|
|
415
468
|
if (!HEALABLE_ACTIONS2.has(step.action) || alwaysAsk.has(step.id) || !("target" in step) || !step.target)
|
|
416
469
|
continue;
|
|
417
|
-
const
|
|
418
|
-
if (!
|
|
470
|
+
const found = context.targetOf(step.target);
|
|
471
|
+
if (!found)
|
|
419
472
|
continue;
|
|
473
|
+
const target = webOnlyTarget(found);
|
|
420
474
|
const name = "element" in step.target ? context.elements[step.target.element]?.name : undefined;
|
|
421
475
|
const verdict = classifyConsequence2(elementInfoFromTarget2(target, name), { action: step.action, ...step.action === "type" && step.pressEnter === true ? { pressEnter: true } : {} }, healing.keywords);
|
|
422
476
|
const vars = { target: context.describeTarget(step.target) };
|
|
@@ -474,48 +528,6 @@ var noCleanupRule = {
|
|
|
474
528
|
}
|
|
475
529
|
};
|
|
476
530
|
|
|
477
|
-
// src/analyze/sensitive.ts
|
|
478
|
-
var SECRET_FIELD = /password|passcode|passwd|\bpin\b|\botp\b|one[\s-]?time|\bverification\b|security code|auth(?:entication)? code|\bcvv\b|\bcvc\b|card number|\bsecrets?\b|\btokens?\b|\brecovery\b/i;
|
|
479
|
-
var PASSWORD_TYPE = /type\s*=\s*["']?password/i;
|
|
480
|
-
function words(text) {
|
|
481
|
-
return text.replace(/([a-z])([A-Z])/g, "$1 $2").replace(/[^\p{L}\p{N}]+/gu, " ").trim();
|
|
482
|
-
}
|
|
483
|
-
function readsLikeSecret(text) {
|
|
484
|
-
return PASSWORD_TYPE.test(text) || SECRET_FIELD.test(words(text));
|
|
485
|
-
}
|
|
486
|
-
function targetWords(target) {
|
|
487
|
-
const texts = [];
|
|
488
|
-
for (const method of target.methods) {
|
|
489
|
-
switch (method.kind) {
|
|
490
|
-
case "role":
|
|
491
|
-
case "fuzzy":
|
|
492
|
-
texts.push(method.name);
|
|
493
|
-
break;
|
|
494
|
-
case "css":
|
|
495
|
-
texts.push(method.selector);
|
|
496
|
-
break;
|
|
497
|
-
case "testId":
|
|
498
|
-
texts.push(method.value);
|
|
499
|
-
break;
|
|
500
|
-
case "xpath":
|
|
501
|
-
texts.push(method.xpath);
|
|
502
|
-
break;
|
|
503
|
-
case "anchor":
|
|
504
|
-
texts.push(method.anchor.kind === "text" ? method.anchor.text : method.anchor.name);
|
|
505
|
-
break;
|
|
506
|
-
default:
|
|
507
|
-
texts.push(method.text);
|
|
508
|
-
break;
|
|
509
|
-
}
|
|
510
|
-
}
|
|
511
|
-
return texts;
|
|
512
|
-
}
|
|
513
|
-
function looksLikeSecretField(target, elementName) {
|
|
514
|
-
if (elementName !== undefined && readsLikeSecret(elementName))
|
|
515
|
-
return true;
|
|
516
|
-
return target !== undefined && targetWords(target).some(readsLikeSecret);
|
|
517
|
-
}
|
|
518
|
-
|
|
519
531
|
// src/analyze/rules/plain-text-secret.ts
|
|
520
532
|
var plainTextSecretRule = {
|
|
521
533
|
id: "plainTextSecret",
|
|
@@ -533,6 +545,28 @@ var plainTextSecretRule = {
|
|
|
533
545
|
})
|
|
534
546
|
};
|
|
535
547
|
|
|
548
|
+
// src/analyze/rules/run-command-from-variable.ts
|
|
549
|
+
var runCommandFromVariableRule = {
|
|
550
|
+
id: "runCommandFromVariable",
|
|
551
|
+
group: "security",
|
|
552
|
+
severity: "warning",
|
|
553
|
+
description: "A Run command step whose command is built from a variable or an input.",
|
|
554
|
+
check: (context) => {
|
|
555
|
+
const findings = [];
|
|
556
|
+
for (const active of context.steps) {
|
|
557
|
+
const step = active.step;
|
|
558
|
+
if (step.action !== "runCommand")
|
|
559
|
+
continue;
|
|
560
|
+
const names = [...variablesRead(step.command), ...inputsRead(step.command)];
|
|
561
|
+
const [first] = names;
|
|
562
|
+
if (first === undefined)
|
|
563
|
+
continue;
|
|
564
|
+
findings.push(stepFinding(active, "runCommandFromVariable", { name: `[${first}]` }, "command"));
|
|
565
|
+
}
|
|
566
|
+
return findings;
|
|
567
|
+
}
|
|
568
|
+
};
|
|
569
|
+
|
|
536
570
|
// src/heal/popup-limits.ts
|
|
537
571
|
var MAX_POPUP_HANDLERS_PER_STEP2 = 2;
|
|
538
572
|
var MAX_POPUP_HANDLERS_PER_APPLICATION2 = 50;
|
|
@@ -561,7 +595,7 @@ var popupHandlerLoopRule = {
|
|
|
561
595
|
const findings = [];
|
|
562
596
|
let clears = false;
|
|
563
597
|
for (const active of context.steps) {
|
|
564
|
-
const step = active.step;
|
|
598
|
+
const step = webOnlyStep(active.step);
|
|
565
599
|
if (FLOW.has(step.action)) {
|
|
566
600
|
findings.push(stepFinding(active, "popupHandlerFlow", { action: step.action }, "action"));
|
|
567
601
|
continue;
|
|
@@ -581,7 +615,7 @@ var popupHandlerLoopRule = {
|
|
|
581
615
|
const target = context.targetOf(step.target);
|
|
582
616
|
if (!target)
|
|
583
617
|
continue;
|
|
584
|
-
const verdict = classifyConsequence2(elementInfoFromTarget2(target), { action: step.action });
|
|
618
|
+
const verdict = classifyConsequence2(elementInfoFromTarget2(webOnlyTarget(target)), { action: step.action });
|
|
585
619
|
if (verdict.consequence) {
|
|
586
620
|
findings.push(stepFinding(active, "popupHandlerConsequential", { target: context.describeTarget(step.target), consequence: CONSEQUENCE_WORDS2[verdict.consequence] }, "target"));
|
|
587
621
|
}
|
|
@@ -601,6 +635,38 @@ var secretOriginRule = {
|
|
|
601
635
|
check: (context) => context.steps.flatMap((active) => active.step.action === "typeSecret" && active.step.expectedOrigin === undefined ? [stepFinding(active, "secretOrigin", {}, "expectedOrigin")] : [])
|
|
602
636
|
};
|
|
603
637
|
|
|
638
|
+
// src/analyze/rules/sequence-too-long.ts
|
|
639
|
+
var UI_ANALYZER_SEQUENCE_LIMIT2 = 200;
|
|
640
|
+
var sequenceTooLongRule = {
|
|
641
|
+
id: "sequenceTooLong",
|
|
642
|
+
group: "maintainability",
|
|
643
|
+
severity: "warning",
|
|
644
|
+
description: `A sequence (the main steps, the clean-up block or a block of a flow step) with more than ${UI_ANALYZER_SEQUENCE_LIMIT2} steps that run.`,
|
|
645
|
+
check: (context) => {
|
|
646
|
+
const sequences = new Map;
|
|
647
|
+
for (const active of context.steps) {
|
|
648
|
+
const key = sequenceOf(active.path);
|
|
649
|
+
const list = sequences.get(key);
|
|
650
|
+
if (list === undefined)
|
|
651
|
+
sequences.set(key, [active]);
|
|
652
|
+
else
|
|
653
|
+
list.push(active);
|
|
654
|
+
}
|
|
655
|
+
const findings = [];
|
|
656
|
+
for (const list of sequences.values()) {
|
|
657
|
+
const first = list[UI_ANALYZER_SEQUENCE_LIMIT2];
|
|
658
|
+
if (first === undefined)
|
|
659
|
+
continue;
|
|
660
|
+
findings.push(stepFinding(first, "sequenceTooLong", { count: list.length, limit: UI_ANALYZER_SEQUENCE_LIMIT2 }));
|
|
661
|
+
}
|
|
662
|
+
return findings;
|
|
663
|
+
}
|
|
664
|
+
};
|
|
665
|
+
function sequenceOf(path) {
|
|
666
|
+
const cut = path.lastIndexOf(".");
|
|
667
|
+
return cut === -1 ? "" : path.slice(0, cut);
|
|
668
|
+
}
|
|
669
|
+
|
|
604
670
|
// src/analyze/rules/sensitive-screenshot.ts
|
|
605
671
|
var sensitiveScreenshotRule = {
|
|
606
672
|
id: "sensitiveScreenshot",
|
|
@@ -625,6 +691,36 @@ var sensitiveScreenshotRule = {
|
|
|
625
691
|
}
|
|
626
692
|
};
|
|
627
693
|
|
|
694
|
+
// src/analyze/rules/single-method-image-target.ts
|
|
695
|
+
var singleMethodImageTargetRule = {
|
|
696
|
+
id: "singleMethodImageTarget",
|
|
697
|
+
group: "reliability",
|
|
698
|
+
severity: "warning",
|
|
699
|
+
description: "A target found by an image only.",
|
|
700
|
+
check: (context) => {
|
|
701
|
+
const findings = [];
|
|
702
|
+
const seenElements = new Set;
|
|
703
|
+
for (const active of context.steps) {
|
|
704
|
+
for (const [field, ref] of stepTargets2(active.step)) {
|
|
705
|
+
if ("element" in ref) {
|
|
706
|
+
if (seenElements.has(ref.element))
|
|
707
|
+
continue;
|
|
708
|
+
seenElements.add(ref.element);
|
|
709
|
+
}
|
|
710
|
+
const target = context.targetOf(ref);
|
|
711
|
+
if (!target || !isImageOnly(target.methods))
|
|
712
|
+
continue;
|
|
713
|
+
findings.push(stepFinding(active, "singleMethodImageTarget", { target: context.describeTarget(ref) }, field));
|
|
714
|
+
}
|
|
715
|
+
}
|
|
716
|
+
return findings;
|
|
717
|
+
}
|
|
718
|
+
};
|
|
719
|
+
function isImageOnly(methods) {
|
|
720
|
+
const enabled = methods.filter((method) => method.enabled !== false);
|
|
721
|
+
return enabled.length === 1 && enabled[0]?.kind === "image";
|
|
722
|
+
}
|
|
723
|
+
|
|
628
724
|
// src/analyze/rules/single-method-target.ts
|
|
629
725
|
var singleMethodTargetRule = {
|
|
630
726
|
id: "singleMethodTarget",
|
|
@@ -645,7 +741,7 @@ var singleMethodTargetRule = {
|
|
|
645
741
|
if (!target)
|
|
646
742
|
continue;
|
|
647
743
|
const enabled = target.methods.filter((method) => method.enabled !== false).length;
|
|
648
|
-
if (enabled > 1)
|
|
744
|
+
if (enabled > 1 || isImageOnly(target.methods))
|
|
649
745
|
continue;
|
|
650
746
|
findings.push(stepFinding(active, enabled === 0 ? "noEnabledMethod" : "singleMethodTarget", { target: context.describeTarget(ref) }, field));
|
|
651
747
|
}
|
|
@@ -712,6 +808,15 @@ var unknownVariableRule = {
|
|
|
712
808
|
}
|
|
713
809
|
};
|
|
714
810
|
|
|
811
|
+
// src/analyze/rules/unnamed-step.ts
|
|
812
|
+
var unnamedStepRule = {
|
|
813
|
+
id: "unnamedStep",
|
|
814
|
+
group: "maintainability",
|
|
815
|
+
severity: "info",
|
|
816
|
+
description: "A step with no name (intent) of its own.",
|
|
817
|
+
check: (context) => context.steps.filter((active) => (active.step.intent ?? "").trim().length === 0).map((active) => stepFinding(active, "unnamedStep", {}, "intent"))
|
|
818
|
+
};
|
|
819
|
+
|
|
715
820
|
// src/analyze/rules/unused-value.ts
|
|
716
821
|
var LOCAL_PREFIX = "__";
|
|
717
822
|
var unusedValueRule = {
|
|
@@ -782,11 +887,16 @@ var UI_ANALYZER_RULES2 = [
|
|
|
782
887
|
inlineTargetRule,
|
|
783
888
|
unusedValueRule,
|
|
784
889
|
healConsequentialRule,
|
|
785
|
-
popupHandlerLoopRule
|
|
890
|
+
popupHandlerLoopRule,
|
|
891
|
+
runCommandFromVariableRule,
|
|
892
|
+
singleMethodImageTargetRule,
|
|
893
|
+
aiStepNoAllowlistRule,
|
|
894
|
+
unnamedStepRule,
|
|
895
|
+
sequenceTooLongRule
|
|
786
896
|
];
|
|
787
897
|
|
|
788
898
|
// src/analyze/types.ts
|
|
789
|
-
var UI_PROBLEM_SEVERITIES2 = ["warning", "info"];
|
|
899
|
+
var UI_PROBLEM_SEVERITIES2 = ["error", "warning", "info"];
|
|
790
900
|
var UI_ANALYZER_RULE_GROUPS2 = ["reliability", "security", "maintainability"];
|
|
791
901
|
var UI_ANALYZER_RULE_IDS2 = [
|
|
792
902
|
"fixedWait",
|
|
@@ -801,7 +911,12 @@ var UI_ANALYZER_RULE_IDS2 = [
|
|
|
801
911
|
"inlineTarget",
|
|
802
912
|
"unusedValue",
|
|
803
913
|
"healConsequential",
|
|
804
|
-
"popupHandlerLoop"
|
|
914
|
+
"popupHandlerLoop",
|
|
915
|
+
"runCommandFromVariable",
|
|
916
|
+
"singleMethodImageTarget",
|
|
917
|
+
"aiStepNoAllowlist",
|
|
918
|
+
"unnamedStep",
|
|
919
|
+
"sequenceTooLong"
|
|
805
920
|
];
|
|
806
921
|
|
|
807
922
|
// src/analyze/analyze.ts
|
|
@@ -812,6 +927,19 @@ function severitySetting(setting, fallback) {
|
|
|
812
927
|
return UI_PROBLEM_SEVERITIES2.find((severity) => severity === setting) ?? fallback;
|
|
813
928
|
}
|
|
814
929
|
function analyzeUiScript2(script, options = {}) {
|
|
930
|
+
return analyze(script, options);
|
|
931
|
+
}
|
|
932
|
+
function analyzeDesktopUiScript2(script, options = {}) {
|
|
933
|
+
return analyze(script, {
|
|
934
|
+
...options.severity === undefined ? {} : { severity: options.severity },
|
|
935
|
+
...options.externalReads === undefined ? {} : { externalReads: options.externalReads }
|
|
936
|
+
});
|
|
937
|
+
}
|
|
938
|
+
var NO_SAVED_SCRIPT = Object.freeze({ scriptVersion: 1, steps: [] });
|
|
939
|
+
function analyzeAiStep2(settings, savedScript, options = {}) {
|
|
940
|
+
return analyze(savedScript ?? NO_SAVED_SCRIPT, { ...options, aiStep: settings });
|
|
941
|
+
}
|
|
942
|
+
function analyze(script, options) {
|
|
815
943
|
const context = createContext(script, options);
|
|
816
944
|
const found = [];
|
|
817
945
|
UI_ANALYZER_RULES2.forEach((rule, rank) => {
|
|
@@ -840,4 +968,4 @@ function analyzeUiScript2(script, options = {}) {
|
|
|
840
968
|
return found.sort((a, b) => a.order - b.order || a.rank - b.rank || a.seq - b.seq).map(({ problem }) => problem);
|
|
841
969
|
}
|
|
842
970
|
|
|
843
|
-
export { MAX_HEAL_KEYWORDS2, MAX_HEAL_KEYWORD_LENGTH2, CONSEQUENCE_KEYWORDS2, keywordWords2, usableKeywords2, isActingStep, classifyConsequence2, elementInfoFromTarget2, stepNumber2, UI_SCRIPT_PROBLEM_KEY_PREFIX2, UI_SCRIPT_PROBLEM_MESSAGES2, problemMessageKey2, problemMessage2, HEALABLE_ACTIONS2, compatibleRoles2, VALUE_ACTIONS2, ACTIONABLE_ROLES, MAX_POPUP_HANDLERS_PER_STEP2, MAX_POPUP_HANDLERS_PER_APPLICATION2, MAX_POPUP_HANDLER_STEPS2, MAX_POPUP_URL_PATTERN2, POPUP_HANDLER_STEP_WAIT_MS2, UI_ANALYZER_RULES2, UI_PROBLEM_SEVERITIES2, UI_ANALYZER_RULE_GROUPS2, UI_ANALYZER_RULE_IDS2, UI_ANALYZER_DEFAULT_SEVERITY2, analyzeUiScript2 };
|
|
971
|
+
export { MAX_HEAL_KEYWORDS2, MAX_HEAL_KEYWORD_LENGTH2, CONSEQUENCE_KEYWORDS2, keywordWords2, usableKeywords2, isActingStep, classifyConsequence2, elementInfoFromTarget2, stepNumber2, UI_SCRIPT_PROBLEM_KEY_PREFIX2, UI_SCRIPT_PROBLEM_MESSAGES2, problemMessageKey2, problemMessage2, HEALABLE_ACTIONS2, compatibleRoles2, VALUE_ACTIONS2, ACTIONABLE_ROLES, MAX_POPUP_HANDLERS_PER_STEP2, MAX_POPUP_HANDLERS_PER_APPLICATION2, MAX_POPUP_HANDLER_STEPS2, MAX_POPUP_URL_PATTERN2, POPUP_HANDLER_STEP_WAIT_MS2, UI_ANALYZER_SEQUENCE_LIMIT2, UI_ANALYZER_RULES2, UI_PROBLEM_SEVERITIES2, UI_ANALYZER_RULE_GROUPS2, UI_ANALYZER_RULE_IDS2, UI_ANALYZER_DEFAULT_SEVERITY2, analyzeUiScript2, analyzeDesktopUiScript2, analyzeAiStep2 };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
UiDriverError2
|
|
3
|
-
} from "./index-
|
|
3
|
+
} from "./index-yhzykhdj.js";
|
|
4
4
|
import {
|
|
5
5
|
CAPABILITY_IDS2
|
|
6
6
|
} from "./index-zpxk3fzd.js";
|
|
@@ -9,22 +9,22 @@ import {
|
|
|
9
9
|
} from "./index-20bbwwc9.js";
|
|
10
10
|
import {
|
|
11
11
|
createDomRuntime2
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-n3nfhjrj.js";
|
|
13
13
|
import {
|
|
14
14
|
MAX_READ_TEXT2,
|
|
15
15
|
performDomAction2
|
|
16
|
-
} from "./index-
|
|
16
|
+
} from "./index-e7pgqd60.js";
|
|
17
17
|
import {
|
|
18
18
|
enterFrames2,
|
|
19
19
|
describeCandidate2,
|
|
20
20
|
resolveWebTarget2,
|
|
21
21
|
resolveAllWebTargets2,
|
|
22
22
|
serializeTreeSnapshot2
|
|
23
|
-
} from "./index-
|
|
23
|
+
} from "./index-rbem2yms.js";
|
|
24
24
|
import {
|
|
25
25
|
isElementVisible2,
|
|
26
26
|
isSensitiveElement2
|
|
27
|
-
} from "./index-
|
|
27
|
+
} from "./index-reef7e8m.js";
|
|
28
28
|
import {
|
|
29
29
|
redactCredentials2
|
|
30
30
|
} from "./index-mgztm37r.js";
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
uiStepSchema2,
|
|
4
4
|
UiScriptError2,
|
|
5
5
|
parseUiScript2
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-zj3zhbac.js";
|
|
7
7
|
import {
|
|
8
8
|
HEALABLE_ACTIONS2,
|
|
9
9
|
compatibleRoles2,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
MAX_POPUP_HANDLER_STEPS2,
|
|
13
13
|
MAX_POPUP_URL_PATTERN2,
|
|
14
14
|
analyzeUiScript2
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-v3nw2n2g.js";
|
|
16
16
|
import {
|
|
17
17
|
stepTargets2
|
|
18
18
|
} from "./index-axph39g0.js";
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
indexSnapshot2,
|
|
25
25
|
snapshotName2,
|
|
26
26
|
snapshotFrameDepth2
|
|
27
|
-
} from "./index-
|
|
27
|
+
} from "./index-q2jbva7c.js";
|
|
28
28
|
|
|
29
29
|
// src/heal/types.ts
|
|
30
30
|
var UI_HEAL_MODES2 = ["off", "suggest", "heal_with_approval", "heal_and_continue"];
|