@burdenoff/ui-engine 2026.1204.1 → 2026.1204.2
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 +20 -2
- package/dist/analyze/analyze.d.ts +10 -0
- package/dist/analyze/context.d.ts +25 -9
- package/dist/analyze/index.d.ts +3 -2
- package/dist/analyze/messages.d.ts +2 -0
- package/dist/analyze/rules/run-command-from-variable.d.ts +2 -0
- package/dist/analyze/rules/single-method-image-target.d.ts +7 -0
- package/dist/analyze/sensitive.d.ts +2 -2
- package/dist/analyze/types.d.ts +6 -2
- package/dist/analyze.js +4 -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-ptrmf779.js → index-2q0hh6we.js} +3 -3
- package/dist/index-552x2bnm.js +56 -0
- package/dist/index-6m0chbhq.js +64 -0
- package/dist/{index-dwp10g62.js → index-7gfzv5n8.js} +96 -53
- 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-cc49ykn5.js} +4 -4
- package/dist/{index-vpm1gnmy.js → index-e557vzdd.js} +219 -34
- package/dist/{index-vnv9tp11.js → index-e7pgqd60.js} +2 -2
- package/dist/index-hdq3y007.js +246 -0
- 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-3r2y0mnc.js → index-wdbn4xjc.js} +5 -5
- 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 +79 -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
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Stewards saved-step recordings (version 1) to desktop UI scripts with
|
|
3
|
+
* strict selectors (RPA plan package P2-03b; spec 18 section 6; desk contract
|
|
4
|
+
* v3 section 4).
|
|
5
|
+
*
|
|
6
|
+
* A saved step names its element the way a person sees it: the application,
|
|
7
|
+
* the window title, the accessibility role and label, and which of several
|
|
8
|
+
* equal matches it was. `fromRecording` keeps that as a role method, which
|
|
9
|
+
* the engine resolves on a snapshot exactly as Stewards replays it.
|
|
10
|
+
* `fromRecordingForDesk` keeps that role method first and adds the same
|
|
11
|
+
* description as a strict selector in the platform's own role names (UI
|
|
12
|
+
* Automation, macOS Accessibility or AT-SPI), which the desk resolves itself
|
|
13
|
+
* without a snapshot.
|
|
14
|
+
*
|
|
15
|
+
* The selector comes second, and only for a target recorded as the first of
|
|
16
|
+
* its equal matches (`nth` 0), because a saved step does not record the path
|
|
17
|
+
* from the window down to the element: a one-node selector matches the
|
|
18
|
+
* window's direct children only (desk contract v3 section 4), and its
|
|
19
|
+
* position among them is not the recorded position in the whole tree. Left
|
|
20
|
+
* without an `index`, the desk refuses it when several children match, so it
|
|
21
|
+
* never acts on another element than the role method would. It serves a desk
|
|
22
|
+
* that cannot take tree snapshots, and gives the target a second method.
|
|
23
|
+
*
|
|
24
|
+
* The recording is validated first (`parseRecording`: a tampered target fails
|
|
25
|
+
* there). Each converted step is fingerprinted again over both methods
|
|
26
|
+
* (`withDesktopFingerprint`), because the integrity check covers every method
|
|
27
|
+
* of a target. `fromRecording`, `toRecording` and their goldens are unchanged.
|
|
28
|
+
*/
|
|
29
|
+
import { type RecordedTarget } from '../../recording.js';
|
|
30
|
+
import { type DeskRolePlatform } from '../desk-roles.js';
|
|
31
|
+
import type { DesktopUiScript, DesktopUiTarget, DesktopUiTargetMethod } from '../desktop-types.js';
|
|
32
|
+
export interface FromRecordingForDeskOptions {
|
|
33
|
+
/** The accessibility interface of the desk the script will run on. */
|
|
34
|
+
platform: DeskRolePlatform;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* The strict selector method for a recorded target on a platform, or
|
|
38
|
+
* undefined when it has no exact form there: a target recorded as one of
|
|
39
|
+
* several equal matches (`nth` above 0), a role with no counterpart on the
|
|
40
|
+
* platform, a label or title longer than a selector string, or an
|
|
41
|
+
* application that is not a plain application name.
|
|
42
|
+
*/
|
|
43
|
+
export declare function selectorMethodOfRecordedTarget(target: RecordedTarget, platform: DeskRolePlatform): DesktopUiTargetMethod | undefined;
|
|
44
|
+
/** A recorded target as a desktop target: the role method first, then the strict selector when there is one. */
|
|
45
|
+
export declare function desktopTargetOfRecordedTarget(target: RecordedTarget, platform: DeskRolePlatform): DesktopUiTarget;
|
|
46
|
+
/**
|
|
47
|
+
* A Stewards recording as a desktop UI script for a desk of the given
|
|
48
|
+
* platform. Every step keeps its id, intent, masked screenshot, masked typing
|
|
49
|
+
* and secret reference; targets gain the strict selector. The result passes
|
|
50
|
+
* `parseDesktopUiScript`.
|
|
51
|
+
*/
|
|
52
|
+
export declare function fromRecordingForDesk(value: unknown, options: FromRecordingForDeskOptions): DesktopUiScript;
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
* Stewards intents) use the fallback. `UI_SCRIPT_STEP_MESSAGES` holds the
|
|
9
9
|
* English template of every key, with `{{name}}` placeholders.
|
|
10
10
|
*/
|
|
11
|
+
import type { DesktopUiScriptElement, DesktopUiTargetRef } from './desktop-types.js';
|
|
11
12
|
import type { UiExpression, UiScriptElement, UiStep, UiTargetRef } from './types.js';
|
|
12
13
|
/** The prefix of every step message key. */
|
|
13
14
|
export declare const UI_SCRIPT_STEP_KEY_PREFIX = "fluidgrids.uiScript.step.";
|
|
@@ -75,8 +76,12 @@ export interface StepDescription {
|
|
|
75
76
|
/** The English sentence, for consumers that do not translate. */
|
|
76
77
|
fallback: string;
|
|
77
78
|
}
|
|
78
|
-
/**
|
|
79
|
-
|
|
79
|
+
/**
|
|
80
|
+
* How a target reads in a sentence: the element's name, else what its first
|
|
81
|
+
* enabled method looks for. Desktop targets (plan P2-03b) read as the last
|
|
82
|
+
* selector node's name, automation id or role, an OCR text, or "image".
|
|
83
|
+
*/
|
|
84
|
+
export declare function describeTarget(ref: UiTargetRef | DesktopUiTargetRef | undefined, elements?: Readonly<Record<string, UiScriptElement | DesktopUiScriptElement>>): string;
|
|
80
85
|
/** How a value reads in a sentence: literals quoted, inputs and variables as [name], anything else as …. */
|
|
81
86
|
export declare function describeExpression(expression: UiExpression | undefined): string;
|
|
82
87
|
/** The description of one step. `elements` are the script's pinned elements, for their names. */
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Role names across accessibility interfaces (RPA plan package P2-03b).
|
|
3
|
+
*
|
|
4
|
+
* A Stewards saved step and a web role method name an element by an
|
|
5
|
+
* accessibility role such as `button` or `textbox`; a desktop desk names it
|
|
6
|
+
* by the platform's own role: a UI Automation ControlType (`Button`), a macOS
|
|
7
|
+
* Accessibility role (`AXButton`) or an AT-SPI role (`push button`). The
|
|
8
|
+
* legacy Windows snapshot reports lower-case control types (`edit`,
|
|
9
|
+
* `button`), which are listed here too.
|
|
10
|
+
*
|
|
11
|
+
* `platformRole` turns a recorded role into the platform's role for a strict
|
|
12
|
+
* selector, or returns undefined when there is no exact counterpart (the
|
|
13
|
+
* saved-step adapter then keeps only the role method). `rolesMatch` is the
|
|
14
|
+
* looser comparison the engine uses when it resolves a role method on a desk
|
|
15
|
+
* tree snapshot: equal ignoring case, or the same role across interfaces.
|
|
16
|
+
*/
|
|
17
|
+
import type { DesktopUiOnlyTargetMethodKind } from './desktop-types.js';
|
|
18
|
+
/** The selector platforms a recorded role can map to. */
|
|
19
|
+
export type DeskRolePlatform = Extract<DesktopUiOnlyTargetMethodKind, 'uia' | 'ax' | 'atspi'>;
|
|
20
|
+
/**
|
|
21
|
+
* The platform's own role name for a recorded role, or undefined when the
|
|
22
|
+
* role has no exact counterpart. A role already written in the platform's
|
|
23
|
+
* own form (`Button` for UI Automation, `AXButton` for macOS, `push button`
|
|
24
|
+
* for AT-SPI) is kept as it is.
|
|
25
|
+
*/
|
|
26
|
+
export declare function platformRole(role: string, platform: DeskRolePlatform): string | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* Whether a desk node's role is the role a method names: the same name, or
|
|
29
|
+
* the same role across interfaces (`button`, `Button`, `AXButton` and
|
|
30
|
+
* `push button` all match each other). A role the table does not know
|
|
31
|
+
* matches only itself, ignoring case.
|
|
32
|
+
*/
|
|
33
|
+
export declare function rolesMatch(wanted: string, actual: string): boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DesktopUiScript, DesktopUiStepAction, DesktopUiTargetMethod } from './desktop-types.js';
|
|
1
|
+
import type { DesktopUiScript, DesktopUiStepAction, DesktopUiTarget, DesktopUiTargetMethod } from './desktop-types.js';
|
|
2
2
|
/** The desk contract version whose `run` entry takes desktop scripts. */
|
|
3
3
|
export declare const DESKTOP_DESK_CONTRACT_VERSION = 3;
|
|
4
4
|
/** Desk contract v3 actions, in `DESK_ACTION_TYPES` order (`@vibecontrols/plugin-sdk/desk-types`). */
|
|
@@ -88,8 +88,13 @@ export interface DesktopDeskCheckOptions {
|
|
|
88
88
|
* The desk features one target method needs, or undefined when no desk
|
|
89
89
|
* resolves it (an XPath). The desk driver (P2-03b) skips a method whose
|
|
90
90
|
* features the desk lacks.
|
|
91
|
+
*
|
|
92
|
+
* A `css` or `testId` method is sent to a desk as a `css` selector node,
|
|
93
|
+
* which a desk finds by role first (desk contract v3 section 4): it needs
|
|
94
|
+
* an enabled role method in the same target (pass `target`), and a test id
|
|
95
|
+
* must sit in `data-testid` or `id`, the attributes a desk matches.
|
|
91
96
|
*/
|
|
92
|
-
export declare function deskFeaturesOfMethod(method: DesktopUiTargetMethod): DeskFeature[] | undefined;
|
|
97
|
+
export declare function deskFeaturesOfMethod(method: DesktopUiTargetMethod, target?: DesktopUiTarget): DeskFeature[] | undefined;
|
|
93
98
|
/** Whether the capabilities include a feature. */
|
|
94
99
|
export declare function deskHasFeature(capabilities: DeskCapabilitiesLike, feature: DeskFeature): boolean;
|
|
95
100
|
/**
|
|
@@ -38,6 +38,8 @@ export declare const MAX_DESK_FILE_BYTES: number;
|
|
|
38
38
|
export declare const DEFAULT_DESK_FILE_BYTES: number;
|
|
39
39
|
/** A literal workspace-relative path or folder, at most. */
|
|
40
40
|
export declare const MAX_DESK_PATH_LENGTH = 1024;
|
|
41
|
+
/** The longest value a desk's `set_value` takes (desk contract v3 section 5). */
|
|
42
|
+
export declare const MAX_DESK_SET_VALUE = 10000;
|
|
41
43
|
/** Ids of the named parts of the desktop schema, used as `$defs` names in its JSON Schema. */
|
|
42
44
|
export declare const desktopUiScriptRegistry: z.core.$ZodRegistry<{
|
|
43
45
|
id: string;
|
package/dist/script/index.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export * from './types.js';
|
|
|
13
13
|
export * from './limits.js';
|
|
14
14
|
export * from './desktop-types.js';
|
|
15
15
|
export { ELEMENT_KEY_PATTERN, NAME_PATTERN, STEP_ID_PATTERN, uiExpressionSchema, uiScriptRegistry, uiScriptSchema, uiStepSchema, uiTargetMethodSchema, uiTargetRefSchema, uiTargetSchema, } from './schema.js';
|
|
16
|
-
export { DEFAULT_DESK_FILE_BYTES, MAX_DESK_COORDINATE, MAX_DESK_FILE_BYTES, MAX_DESK_GET_ATTRIBUTES, MAX_DESK_IMAGE_BASE64, MAX_DESK_IMAGE_BYTES, MAX_DESK_IMAGE_PIXELS, MAX_DESK_OPEN_APP_ARGS, MAX_DESK_PATH_LENGTH, MAX_DESK_RECORDED_SCALE, MAX_DESK_SELECTOR_INDEX, MAX_DESK_SELECTOR_PATH, MAX_DESK_SELECTOR_STRING, MAX_DESK_TEXT_OCCURRENCE, MAX_DESK_TEXT_TARGET, desktopUiScriptRegistry, desktopUiScriptSchema, desktopUiStepSchema, desktopUiTargetMethodSchema, desktopUiTargetRefSchema, desktopUiTargetSchema, } from './desktop-schema.js';
|
|
16
|
+
export { DEFAULT_DESK_FILE_BYTES, MAX_DESK_COORDINATE, MAX_DESK_FILE_BYTES, MAX_DESK_GET_ATTRIBUTES, MAX_DESK_IMAGE_BASE64, MAX_DESK_IMAGE_BYTES, MAX_DESK_IMAGE_PIXELS, MAX_DESK_OPEN_APP_ARGS, MAX_DESK_PATH_LENGTH, MAX_DESK_RECORDED_SCALE, MAX_DESK_SELECTOR_INDEX, MAX_DESK_SELECTOR_PATH, MAX_DESK_SELECTOR_STRING, MAX_DESK_SET_VALUE, MAX_DESK_TEXT_OCCURRENCE, MAX_DESK_TEXT_TARGET, desktopUiScriptRegistry, desktopUiScriptSchema, desktopUiStepSchema, desktopUiTargetMethodSchema, desktopUiTargetRefSchema, desktopUiTargetSchema, } from './desktop-schema.js';
|
|
17
17
|
export { type ParseUiScriptOptions, UI_EXPRESSION_ARITY, UiScriptError, type UiScriptErrorCode, isApplicationName, isWorkspaceRelativePath, parseDesktopUiScript, parseUiScript, safeParseDesktopUiScript, safeParseUiScript, } from './parse.js';
|
|
18
18
|
export { RECORDING_ACTION_OF, desktopStepFingerprint, uiStepFingerprint, withDesktopFingerprint, withFingerprint, } from './fingerprint.js';
|
|
19
19
|
export { canonicalJson } from './canonical.js';
|
|
@@ -28,4 +28,6 @@ export { fromBrowserActionSteps } from './adapters/from-browser-action.js';
|
|
|
28
28
|
export { type LowerOptions, toBrowserActionSteps } from './adapters/to-browser-action.js';
|
|
29
29
|
export { fromRemoteBrowserSteps, targetFromPlaywrightSelector } from './adapters/from-remote-browser.js';
|
|
30
30
|
export { fromRecording, toRecording } from './adapters/recording.js';
|
|
31
|
+
export { type FromRecordingForDeskOptions, desktopTargetOfRecordedTarget, fromRecordingForDesk, selectorMethodOfRecordedTarget, } from './adapters/recording-desktop.js';
|
|
32
|
+
export { type DeskRolePlatform, platformRole, rolesMatch } from './desk-roles.js';
|
|
31
33
|
export { COMPUTER_USE_ACTIONS, COMPUTER_USE_DEFAULT_WAIT_MS, COMPUTER_USE_MAX_WAIT_MS, COMPUTER_USE_SKIP_REASONS, type ComputerUseAction, type ComputerUseActionRecord, type ComputerUseConversion, type ComputerUseProposedElement, type ComputerUseSkipReason, type ComputerUseSkippedAction, type ComputerUseUiTarget, DEFAULT_LOGIN_SECRET_REFS, MAX_COMPUTER_USE_ACTIONS, type ScriptFromComputerUseOptions, scriptFromComputerUseActions, targetFromUiFingerprint, } from './adapters/from-computer-use.js';
|
package/dist/script.js
CHANGED
|
@@ -28,6 +28,7 @@ import {
|
|
|
28
28
|
MAX_DESK_FILE_BYTES2,
|
|
29
29
|
DEFAULT_DESK_FILE_BYTES2,
|
|
30
30
|
MAX_DESK_PATH_LENGTH2,
|
|
31
|
+
MAX_DESK_SET_VALUE2,
|
|
31
32
|
desktopUiScriptRegistry2,
|
|
32
33
|
desktopUiTargetMethodSchema2,
|
|
33
34
|
desktopUiTargetSchema2,
|
|
@@ -48,29 +49,13 @@ import {
|
|
|
48
49
|
safeParseDesktopUiScript2,
|
|
49
50
|
isWorkspaceRelativePath2,
|
|
50
51
|
isApplicationName2
|
|
51
|
-
} from "./index-
|
|
52
|
+
} from "./index-zj3zhbac.js";
|
|
52
53
|
import"./index-dcs2pe49.js";
|
|
53
54
|
import {
|
|
54
|
-
UI_SCRIPT_SCHEMA_HASH2,
|
|
55
|
-
DESKTOP_SCRIPT_SCHEMA_HASH2,
|
|
56
|
-
schemaHashOf2,
|
|
57
55
|
UI_SCRIPT_SCHEMA_TITLE2,
|
|
58
56
|
uiScriptJsonSchema2,
|
|
59
57
|
UI_DESKTOP_SCRIPT_SCHEMA_TITLE2,
|
|
60
58
|
desktopUiScriptJsonSchema2,
|
|
61
|
-
DESKTOP_DESK_CONTRACT_VERSION2,
|
|
62
|
-
DESK_ACTION_NAMES2,
|
|
63
|
-
DESK_TARGET_KIND_NAMES2,
|
|
64
|
-
DESK_SELECTOR_PLATFORM_NAMES2,
|
|
65
|
-
DESK_SHELL_ACTIONS2,
|
|
66
|
-
COMMAND_INTERPRETER_APPS2,
|
|
67
|
-
isCommandInterpreterApp2,
|
|
68
|
-
deskFeaturesOfMethod2,
|
|
69
|
-
deskHasFeature2,
|
|
70
|
-
desktopScriptDeskNeeds2,
|
|
71
|
-
desktopShellSteps2,
|
|
72
|
-
checkDesktopScriptShell2,
|
|
73
|
-
checkDesktopScriptForDesk2,
|
|
74
59
|
BROWSER_STEP_ACTIONS2,
|
|
75
60
|
fromBrowserActionSteps2,
|
|
76
61
|
toBrowserActionSteps2,
|
|
@@ -78,6 +63,9 @@ import {
|
|
|
78
63
|
fromRemoteBrowserSteps2,
|
|
79
64
|
fromRecording2,
|
|
80
65
|
toRecording2,
|
|
66
|
+
selectorMethodOfRecordedTarget2,
|
|
67
|
+
desktopTargetOfRecordedTarget2,
|
|
68
|
+
fromRecordingForDesk2,
|
|
81
69
|
COMPUTER_USE_ACTIONS2,
|
|
82
70
|
MAX_COMPUTER_USE_ACTIONS2,
|
|
83
71
|
COMPUTER_USE_MAX_WAIT_MS2,
|
|
@@ -86,7 +74,7 @@ import {
|
|
|
86
74
|
COMPUTER_USE_SKIP_REASONS2,
|
|
87
75
|
targetFromUiFingerprint2,
|
|
88
76
|
scriptFromComputerUseActions2
|
|
89
|
-
} from "./index-
|
|
77
|
+
} from "./index-x8fc4r4h.js";
|
|
90
78
|
import"./index-5xqsjeqj.js";
|
|
91
79
|
import {
|
|
92
80
|
UI_SCRIPT_STEP_KEY_PREFIX2,
|
|
@@ -95,7 +83,29 @@ import {
|
|
|
95
83
|
describeTarget2,
|
|
96
84
|
describeExpression2,
|
|
97
85
|
describeStep2
|
|
98
|
-
} from "./index-
|
|
86
|
+
} from "./index-93hfbk5c.js";
|
|
87
|
+
import {
|
|
88
|
+
platformRole2,
|
|
89
|
+
rolesMatch2
|
|
90
|
+
} from "./index-0ps53dhe.js";
|
|
91
|
+
import {
|
|
92
|
+
UI_SCRIPT_SCHEMA_HASH2,
|
|
93
|
+
DESKTOP_SCRIPT_SCHEMA_HASH2,
|
|
94
|
+
schemaHashOf2,
|
|
95
|
+
DESKTOP_DESK_CONTRACT_VERSION2,
|
|
96
|
+
DESK_ACTION_NAMES2,
|
|
97
|
+
DESK_TARGET_KIND_NAMES2,
|
|
98
|
+
DESK_SELECTOR_PLATFORM_NAMES2,
|
|
99
|
+
DESK_SHELL_ACTIONS2,
|
|
100
|
+
COMMAND_INTERPRETER_APPS2,
|
|
101
|
+
isCommandInterpreterApp2,
|
|
102
|
+
deskFeaturesOfMethod2,
|
|
103
|
+
deskHasFeature2,
|
|
104
|
+
desktopScriptDeskNeeds2,
|
|
105
|
+
desktopShellSteps2,
|
|
106
|
+
checkDesktopScriptShell2,
|
|
107
|
+
checkDesktopScriptForDesk2
|
|
108
|
+
} from "./index-bx4bsvg0.js";
|
|
99
109
|
import {
|
|
100
110
|
CAPABILITY_IDS2,
|
|
101
111
|
SCRIPT_CAPABILITY2,
|
|
@@ -188,6 +198,7 @@ export {
|
|
|
188
198
|
MAX_DESK_SELECTOR_INDEX2 as MAX_DESK_SELECTOR_INDEX,
|
|
189
199
|
MAX_DESK_SELECTOR_PATH2 as MAX_DESK_SELECTOR_PATH,
|
|
190
200
|
MAX_DESK_SELECTOR_STRING2 as MAX_DESK_SELECTOR_STRING,
|
|
201
|
+
MAX_DESK_SET_VALUE2 as MAX_DESK_SET_VALUE,
|
|
191
202
|
MAX_DESK_TEXT_OCCURRENCE2 as MAX_DESK_TEXT_OCCURRENCE,
|
|
192
203
|
MAX_DESK_TEXT_TARGET2 as MAX_DESK_TEXT_TARGET,
|
|
193
204
|
MAX_EXPRESSION_DEPTH2 as MAX_EXPRESSION_DEPTH,
|
|
@@ -252,6 +263,7 @@ export {
|
|
|
252
263
|
desktopScriptDeskNeeds2 as desktopScriptDeskNeeds,
|
|
253
264
|
desktopShellSteps2 as desktopShellSteps,
|
|
254
265
|
desktopStepFingerprint2 as desktopStepFingerprint,
|
|
266
|
+
desktopTargetOfRecordedTarget2 as desktopTargetOfRecordedTarget,
|
|
255
267
|
desktopUiScriptJsonSchema2 as desktopUiScriptJsonSchema,
|
|
256
268
|
desktopUiScriptRegistry2 as desktopUiScriptRegistry,
|
|
257
269
|
desktopUiScriptSchema2 as desktopUiScriptSchema,
|
|
@@ -261,6 +273,7 @@ export {
|
|
|
261
273
|
desktopUiTargetSchema2 as desktopUiTargetSchema,
|
|
262
274
|
fromBrowserActionSteps2 as fromBrowserActionSteps,
|
|
263
275
|
fromRecording2 as fromRecording,
|
|
276
|
+
fromRecordingForDesk2 as fromRecordingForDesk,
|
|
264
277
|
fromRemoteBrowserSteps2 as fromRemoteBrowserSteps,
|
|
265
278
|
isApplicationName2 as isApplicationName,
|
|
266
279
|
isCommandInterpreterApp2 as isCommandInterpreterApp,
|
|
@@ -269,11 +282,14 @@ export {
|
|
|
269
282
|
missingCapabilities2 as missingCapabilities,
|
|
270
283
|
parseDesktopUiScript2 as parseDesktopUiScript,
|
|
271
284
|
parseUiScript2 as parseUiScript,
|
|
285
|
+
platformRole2 as platformRole,
|
|
272
286
|
requiredCapabilities2 as requiredCapabilities,
|
|
287
|
+
rolesMatch2 as rolesMatch,
|
|
273
288
|
safeParseDesktopUiScript2 as safeParseDesktopUiScript,
|
|
274
289
|
safeParseUiScript2 as safeParseUiScript,
|
|
275
290
|
schemaHashOf2 as schemaHashOf,
|
|
276
291
|
scriptFromComputerUseActions2 as scriptFromComputerUseActions,
|
|
292
|
+
selectorMethodOfRecordedTarget2 as selectorMethodOfRecordedTarget,
|
|
277
293
|
stepAtPath2 as stepAtPath,
|
|
278
294
|
stepExpressions2 as stepExpressions,
|
|
279
295
|
stepMessageKey2 as stepMessageKey,
|
package/dist/target/types.d.ts
CHANGED
|
@@ -4,7 +4,13 @@
|
|
|
4
4
|
* Everything a resolution reports is plain JSON (no element references), so the
|
|
5
5
|
* DOM runtime can hand it across an isolated-world or CDP boundary unchanged.
|
|
6
6
|
*/
|
|
7
|
-
import type {
|
|
7
|
+
import type { DesktopUiTargetMethodKind } from '../script/desktop-types.js';
|
|
8
|
+
import type { UiAnchor } from '../script/types.js';
|
|
9
|
+
/**
|
|
10
|
+
* The method a resolution names: a web method, or on a desk (plan P2-03b) a
|
|
11
|
+
* desktop method (`uia`, `ax`, `atspi`, `image`, `ocr`).
|
|
12
|
+
*/
|
|
13
|
+
export type WebResolvedMethodKind = DesktopUiTargetMethodKind;
|
|
8
14
|
/** Bounds in CSS pixels, relative to the top viewport (frame offsets added). */
|
|
9
15
|
export interface WebRect {
|
|
10
16
|
x: number;
|
|
@@ -41,7 +47,7 @@ export type WebMethodOutcome = 'found' | 'none' | 'ambiguous' | 'notInteractable
|
|
|
41
47
|
/** The result of one method, in target order. */
|
|
42
48
|
export interface WebMethodAttempt {
|
|
43
49
|
index: number;
|
|
44
|
-
method:
|
|
50
|
+
method: WebResolvedMethodKind;
|
|
45
51
|
outcome: WebMethodOutcome;
|
|
46
52
|
/** Elements the method matched in the required state. */
|
|
47
53
|
matches: number;
|
|
@@ -65,7 +71,7 @@ export interface WebCandidate {
|
|
|
65
71
|
name: string;
|
|
66
72
|
bounds: WebRect;
|
|
67
73
|
/** The method that matched this element. */
|
|
68
|
-
method:
|
|
74
|
+
method: WebResolvedMethodKind;
|
|
69
75
|
/** The position of that method in the target. */
|
|
70
76
|
methodIndex: number;
|
|
71
77
|
/**
|
|
@@ -84,7 +90,7 @@ export interface WebFrameProblem {
|
|
|
84
90
|
export interface WebTargetFound<E> {
|
|
85
91
|
status: 'found';
|
|
86
92
|
element: E;
|
|
87
|
-
method:
|
|
93
|
+
method: WebResolvedMethodKind;
|
|
88
94
|
methodIndex: number;
|
|
89
95
|
/** True when a method other than the first enabled one found the element (spec 05: method drift is reported). */
|
|
90
96
|
fallback: boolean;
|
package/dist/target.js
CHANGED
|
@@ -18,18 +18,8 @@ import {
|
|
|
18
18
|
MASKED_MARKER2,
|
|
19
19
|
MAX_MASKED_PATHS2,
|
|
20
20
|
maskSnapshot2
|
|
21
|
-
} from "./index-
|
|
21
|
+
} from "./index-q2jbva7c.js";
|
|
22
22
|
import {
|
|
23
|
-
WEB_TARGET_ERROR_CODES2,
|
|
24
|
-
MAX_CANDIDATES2,
|
|
25
|
-
MAX_CANDIDATE_NAME2,
|
|
26
|
-
DEFAULT_FUZZY_THRESHOLD2,
|
|
27
|
-
FUZZY_MARGIN2,
|
|
28
|
-
ANCHOR_MARGIN_PX2,
|
|
29
|
-
MAX_XPATH_RESULTS2,
|
|
30
|
-
INTERACTIVE_ROLES2,
|
|
31
|
-
relationDistance2,
|
|
32
|
-
matchMethod2,
|
|
33
23
|
MAX_CONTAINER_DEPTH2,
|
|
34
24
|
MAX_CONTAINER_CHECKS2,
|
|
35
25
|
MAX_CONTAINER_CHECKS_PER_RESOLUTION2,
|
|
@@ -49,7 +39,22 @@ import {
|
|
|
49
39
|
MAX_SNAPSHOT_TEXT2,
|
|
50
40
|
serializeTreeSnapshot2,
|
|
51
41
|
hydrateTreeSnapshot2
|
|
52
|
-
} from "./index-
|
|
42
|
+
} from "./index-rbem2yms.js";
|
|
43
|
+
import {
|
|
44
|
+
snapshotUrl2
|
|
45
|
+
} from "./index-6m0chbhq.js";
|
|
46
|
+
import {
|
|
47
|
+
WEB_TARGET_ERROR_CODES2,
|
|
48
|
+
MAX_CANDIDATES2,
|
|
49
|
+
MAX_CANDIDATE_NAME2,
|
|
50
|
+
DEFAULT_FUZZY_THRESHOLD2,
|
|
51
|
+
FUZZY_MARGIN2,
|
|
52
|
+
ANCHOR_MARGIN_PX2,
|
|
53
|
+
MAX_XPATH_RESULTS2,
|
|
54
|
+
INTERACTIVE_ROLES2,
|
|
55
|
+
relationDistance2,
|
|
56
|
+
matchMethod2
|
|
57
|
+
} from "./index-hdq3y007.js";
|
|
53
58
|
import {
|
|
54
59
|
MAX_NAME_LENGTH3,
|
|
55
60
|
MAX_VISIBLE_TEXT2,
|
|
@@ -66,7 +71,7 @@ import {
|
|
|
66
71
|
elementsUnder2,
|
|
67
72
|
isSecretFieldName2,
|
|
68
73
|
isSensitiveElement2
|
|
69
|
-
} from "./index-
|
|
74
|
+
} from "./index-reef7e8m.js";
|
|
70
75
|
import {
|
|
71
76
|
SENSITIVE_MARKERS2,
|
|
72
77
|
hasSensitiveMarker2,
|
|
@@ -76,9 +81,8 @@ import {
|
|
|
76
81
|
containsText2,
|
|
77
82
|
editDistance2,
|
|
78
83
|
textSimilarity2,
|
|
79
|
-
clip2
|
|
80
|
-
|
|
81
|
-
} from "./index-t55wvhvh.js";
|
|
84
|
+
clip2
|
|
85
|
+
} from "./index-z2v8prer.js";
|
|
82
86
|
export {
|
|
83
87
|
ANCHOR_MARGIN_PX2 as ANCHOR_MARGIN_PX,
|
|
84
88
|
CONTAINER_ROLES2 as CONTAINER_ROLES,
|
package/dist/testing.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createDomDriver2
|
|
3
|
-
} from "./index-
|
|
3
|
+
} from "./index-wdbn4xjc.js";
|
|
4
4
|
import {
|
|
5
|
-
UiDriverError2,
|
|
6
5
|
createVirtualClock2
|
|
7
|
-
} from "./index-
|
|
6
|
+
} from "./index-b5a306v7.js";
|
|
7
|
+
import {
|
|
8
|
+
UiDriverError2
|
|
9
|
+
} from "./index-yhzykhdj.js";
|
|
8
10
|
|
|
9
11
|
// src/testing/fixtures/ambiguous.ts
|
|
10
12
|
var AMBIGUOUS_HTML = `<!doctype html>
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@burdenoff/ui-engine",
|
|
3
|
-
"version": "2026.1204.
|
|
4
|
-
"description": "Shared, browser-safe UI automation engine: recordings, capture-time masking, target resolution, replay, the UI script v1 contract, the multi-method web target resolver and DOM runtime, the UI script interpreter, the UI script analyzer, UI step healing
|
|
3
|
+
"version": "2026.1204.2",
|
|
4
|
+
"description": "Shared, browser-safe UI automation engine: recordings, capture-time masking, target resolution, replay, the UI script v1 contract, the multi-method web target resolver and DOM runtime, the UI script interpreter, the UI script analyzer, UI step healing, the desktop script schema with its desk capability check, and the desk driver that runs desktop scripts for FluidGrids RPA and BotManor Stewards.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Burdenoff Consultancy Services Pvt. Ltd.",
|
|
7
7
|
"repository": {
|
|
@@ -62,6 +62,10 @@
|
|
|
62
62
|
"types": "./dist/drivers.d.ts",
|
|
63
63
|
"import": "./dist/drivers.js"
|
|
64
64
|
},
|
|
65
|
+
"./desk": {
|
|
66
|
+
"types": "./dist/desk.d.ts",
|
|
67
|
+
"import": "./dist/desk.js"
|
|
68
|
+
},
|
|
65
69
|
"./testing": {
|
|
66
70
|
"types": "./dist/testing.d.ts",
|
|
67
71
|
"import": "./dist/testing.js"
|
|
@@ -77,7 +81,7 @@
|
|
|
77
81
|
"LICENSE"
|
|
78
82
|
],
|
|
79
83
|
"scripts": {
|
|
80
|
-
"build": "rm -rf dist && bun build src/index.ts src/recording.ts src/capture.ts src/resolve.ts src/replay.ts src/script.ts src/target.ts src/dom-runtime.ts src/interpret.ts src/analyze.ts src/heal.ts src/drivers.ts src/testing.ts --outdir dist --root src --target browser --format esm --splitting --packages external && bun build src/dom-runtime/iife.ts --outfile dist/dom-runtime.iife.js --target browser --format iife --minify && tsc -p tsconfig.build.json",
|
|
84
|
+
"build": "rm -rf dist && bun build src/index.ts src/recording.ts src/capture.ts src/resolve.ts src/replay.ts src/script.ts src/target.ts src/dom-runtime.ts src/interpret.ts src/analyze.ts src/heal.ts src/drivers.ts src/desk.ts src/testing.ts --outdir dist --root src --target browser --format esm --splitting --packages external && bun build src/dom-runtime/iife.ts --outfile dist/dom-runtime.iife.js --target browser --format iife --minify && tsc -p tsconfig.build.json",
|
|
81
85
|
"type:check": "boff gate -- bun check --no-pretty",
|
|
82
86
|
"lint": "eslint .",
|
|
83
87
|
"lint:fix": "eslint . --fix",
|