@burdenoff/ui-engine 2026.1127.4 → 2026.1129.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/README.md +68 -4
- package/dist/analyze/analyze.d.ts +19 -0
- package/dist/analyze/context.d.ts +40 -0
- package/dist/analyze/index.d.ts +10 -0
- package/dist/analyze/messages.d.ts +46 -0
- package/dist/analyze/rules/fixed-wait.d.ts +6 -0
- package/dist/analyze/rules/hardware-input.d.ts +2 -0
- package/dist/analyze/rules/heal-consequential.d.ts +2 -0
- package/dist/analyze/rules/index.d.ts +3 -0
- package/dist/analyze/rules/inline-target.d.ts +2 -0
- package/dist/analyze/rules/masked-value.d.ts +8 -0
- package/dist/analyze/rules/no-cleanup.d.ts +2 -0
- package/dist/analyze/rules/plain-text-secret.d.ts +2 -0
- package/dist/analyze/rules/popup-handler-loop.d.ts +2 -0
- package/dist/analyze/rules/rule.d.ts +15 -0
- package/dist/analyze/rules/secret-origin.d.ts +7 -0
- package/dist/analyze/rules/sensitive-screenshot.d.ts +2 -0
- package/dist/analyze/rules/single-method-target.d.ts +2 -0
- package/dist/analyze/rules/unknown-variable.d.ts +2 -0
- package/dist/analyze/rules/unused-value.d.ts +2 -0
- package/dist/analyze/sensitive.d.ts +14 -0
- package/dist/analyze/types.d.ts +89 -0
- package/dist/analyze.d.ts +2 -0
- package/dist/analyze.js +26 -0
- package/dist/dom-runtime.iife.js +1 -1
- package/dist/dom-runtime.js +2 -2
- package/dist/drivers.js +13 -9
- package/dist/heal/answer.d.ts +26 -0
- package/dist/heal/consequence.d.ts +74 -0
- package/dist/heal/index.d.ts +19 -0
- package/dist/heal/modes.d.ts +25 -0
- package/dist/heal/popup-limits.d.ts +11 -0
- package/dist/heal/popup.d.ts +48 -0
- package/dist/heal/question.d.ts +41 -0
- package/dist/heal/target-from-node.d.ts +9 -0
- package/dist/heal/types.d.ts +134 -0
- package/dist/heal/verify-rules.d.ts +19 -0
- package/dist/heal/verify.d.ts +52 -0
- package/dist/heal.d.ts +2 -0
- package/dist/heal.js +106 -0
- package/dist/index-20bbwwc9.js +37 -0
- package/dist/{index-pm13mvvc.js → index-2g060ryg.js} +3 -196
- package/dist/index-6h7ah1dw.js +328 -0
- package/dist/{index-h88y5qgv.js → index-6kva2gvd.js} +6 -4
- package/dist/{index-ct2xctrq.js → index-70vm0qz8.js} +2 -2
- package/dist/{index-3f1j8386.js → index-8w31tpfq.js} +38 -19
- package/dist/{index-zzhysbkj.js → index-eff47v1g.js} +436 -20
- package/dist/{index-3jymbm5t.js → index-g7724awk.js} +1 -92
- package/dist/index-gvavb597.js +195 -0
- package/dist/index-hw5npwsv.js +63 -0
- package/dist/{index-ycs2bz1a.js → index-mhv6a02p.js} +11 -166
- package/dist/index-p5823rpv.js +0 -0
- package/dist/{index-5k26keah.js → index-qg9yfr7r.js} +16 -67
- package/dist/{index-895kscx3.js → index-qmv3ar39.js} +7 -5
- package/dist/index-t55wvhvh.js +229 -0
- package/dist/{index-77pcz6n3.js → index-vnv9tp11.js} +4 -2
- package/dist/index-w9jc25y9.js +306 -0
- package/dist/index-xdtanv9b.js +843 -0
- package/dist/{index-vg8r40y7.js → index-yc0jgph6.js} +7 -0
- package/dist/index-zhbwhdya.js +407 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +156 -26
- package/dist/interpret/driver.d.ts +14 -0
- package/dist/interpret/errors.d.ts +11 -2
- package/dist/interpret/events.d.ts +4 -0
- package/dist/interpret/run.d.ts +33 -0
- package/dist/interpret.js +5 -4
- package/dist/script.js +29 -23
- package/dist/target/index.d.ts +2 -0
- package/dist/target/roles.d.ts +11 -0
- package/dist/target/snapshot-mask.d.ts +49 -0
- package/dist/target/snapshot-tree.d.ts +65 -0
- package/dist/target/snapshot-url.d.ts +6 -0
- package/dist/target/snapshot.d.ts +1 -6
- package/dist/target.js +55 -13
- package/dist/testing.js +2 -2
- package/package.json +11 -3
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@ bun add @burdenoff/ui-engine zod
|
|
|
14
14
|
|
|
15
15
|
## Modules
|
|
16
16
|
|
|
17
|
-
Each module is a subpath export. The root entry re-exports the data and planning modules (`recording` to `script`, and `
|
|
17
|
+
Each module is a subpath export. The root entry re-exports the data and planning modules (`recording` to `script`, `interpret`, `analyze` and `heal`); the DOM modules (`target`, `dom-runtime`, `drivers`, `testing`) are subpath-only, so a consumer without DOM types, such as a service, never loads them through the root.
|
|
18
18
|
|
|
19
19
|
| Import | What it holds |
|
|
20
20
|
|---|---|
|
|
@@ -28,6 +28,8 @@ Each module is a subpath export. The root entry re-exports the data and planning
|
|
|
28
28
|
| `@burdenoff/ui-engine/dom-runtime` | The DOM runtime a desk injects into a page (`createDomRuntime`, `installDomRuntime`): resolve, act, highlight, snapshot |
|
|
29
29
|
| `@burdenoff/ui-engine/dom-runtime.iife.js` | The same runtime as one self-contained script (at most 60 KB minified) that installs itself on `globalThis.__burdenoffUiRuntime` |
|
|
30
30
|
| `@burdenoff/ui-engine/interpret` | The UI script interpreter (`runUiScript`), the compiler a worker runs before it parks a node (`compileUiScript`, `applyPins`, `inlineCalls`, `stripBreakpoints`), the expression evaluator, the desk driver interface and every run-time error code with its node error family (`UI_ERROR_CODES`) |
|
|
31
|
+
| `@burdenoff/ui-engine/analyze` | The UI script analyzer: `analyzeUiScript`, the 11 rules of v1 and the 2 healing rules (`UI_ANALYZER_RULES`), problem message keys under `fluidgrids.builder.uiScript.problem.*` with English templates (`UI_SCRIPT_PROBLEM_MESSAGES`), and `stepNumber` (see below) |
|
|
32
|
+
| `@burdenoff/ui-engine/heal` | UI step healing (plan P4-06a): the heal request and answer types, `buildHealQuestion`, `parseHealAnswer`, `verifyHealCandidate`, `classifyConsequence`, `targetFromSnapshotNode`, `maskSnapshot`, healing modes (`capHealMode`, `decideHeal`) and pop-up handlers (`parseUiPopupHandler`, `analyzeUiPopupHandler`, `matchesUrlPattern`). Needs no DOM (see below) |
|
|
31
33
|
| `@burdenoff/ui-engine/drivers` | Desk drivers over a DOM: `createDomDriver` (the DOM runtime in the interpreter's own world) and `createSnapshotDriver` with `replayUiScriptOnSnapshot` (snapshot replay with no browser) |
|
|
32
34
|
| `@burdenoff/ui-engine/testing` | Copies of the RPA playground fixture pages (`RPA_FIXTURES`), `mountFixture` for test DOMs, and `createFakeWebDriver`, a fake web desk over them |
|
|
33
35
|
|
|
@@ -98,7 +100,7 @@ The runtime must be injected into an isolated world (a content script, or a CDP
|
|
|
98
100
|
|
|
99
101
|
**Semantics.**
|
|
100
102
|
|
|
101
|
-
- *Preflight*: the run parses the script with `resolved: true`, checks the driver's capabilities, the step range and the inputs, and refuses a masked `type` step without a value. A problem ends the run before any step runs, with only a FINISHED event.
|
|
103
|
+
- *Preflight*: the run parses the script with `resolved: true`, checks the driver's capabilities, the step range and the inputs, and refuses a masked `type` step without a value (a disabled step, or one inside a disabled block, never runs and is not checked). A problem ends the run before any step runs, with only a FINISHED event.
|
|
102
104
|
- *Waits*: a step that needs a target polls the driver (every 250 ms) until the target resolves to exactly one element in the required state or the wait runs out: the step's `timeoutMs`, else `settings.firstWaitMs` (30 s) for the first targeted step on a screen and `settings.waitMs` (10 s) afterwards. An ambiguous target is never acted on. Action problems (`NOT_EDITABLE` and the others) and sensitive reads end the wait at once.
|
|
103
105
|
- *Retries and verification*: `retry.attempts` more attempts after a failure (default delay 1 s); a failed `verify` fails the attempt with `VERIFY_FAILED`. Failures of the VALIDATION, AUTHORIZATION and CANCELLED families are not retried. `onError: continue` records the failure, stores null under `saveAs` and goes on.
|
|
104
106
|
- *Flow*: `if` (a condition, or an element that exists once), `forEach` (a list, or the visible text of every element a target matches; `max` caps it), `while` (stops at `maxIterations` with a warning), `retryScope`, `set` and `log` (messages pass through `redactCredentials`). Reads that may legitimately be empty (`elementExists`, the first page of `extractList`) wait only when the step sets `timeoutMs`. Existence checks fail with `ELEMENT_AMBIGUOUS` when several elements match, like the runtime's `exists`: make the target match one element. A `waitFor` with `state: hidden` and a `verify` of `elementGone` count an element that is still in the page but hidden as gone; `state: detached` needs it removed.
|
|
@@ -113,7 +115,7 @@ The runtime must be injected into an isolated world (a content script, or a CDP
|
|
|
113
115
|
|
|
114
116
|
| Family | Codes |
|
|
115
117
|
|---|---|
|
|
116
|
-
| DEPENDENCY | `ELEMENT_NOT_FOUND`, `ELEMENT_AMBIGUOUS`, `WINDOW_NOT_FOUND`, `UNEXPECTED_WINDOW`, `ACTION_FAILED` (the desk problem in `detail.problem`), `SECRET_UNAVAILABLE` |
|
|
118
|
+
| DEPENDENCY | `ELEMENT_NOT_FOUND`, `ELEMENT_AMBIGUOUS`, `WINDOW_NOT_FOUND`, `UNEXPECTED_WINDOW`, `ACTION_FAILED` (the desk problem in `detail.problem`), `SECRET_UNAVAILABLE`, `HEAL_APPROVAL_REQUIRED` (never retried; see Healing) |
|
|
117
119
|
| TRANSIENT | `ELEMENT_NOT_INTERACTABLE`, `VERIFY_FAILED`, `NAVIGATION_TIMEOUT`, `NAVIGATION_FAILED`, `WAIT_TIMEOUT`, `APPLICATION_NOT_RESPONDING`, `ROBOT_LOST`, `INTERRUPTED`, `DRIVER_ERROR` |
|
|
118
120
|
| VALIDATION | `UNSUPPORTED_ON_DESK`, `INVALID_SCRIPT`, `INVALID_INPUT` and `INVALID_STEP_RANGE` (all four before any step runs), `EXPRESSION_ERROR`, `SENSITIVE_ELEMENT`, `URL_NOT_ALLOWED` |
|
|
119
121
|
| AUTHORIZATION | `LOGIN_FAILED` |
|
|
@@ -122,12 +124,74 @@ The runtime must be injected into an isolated world (a content script, or a CDP
|
|
|
122
124
|
|
|
123
125
|
`ELEMENT_AMBIGUOUS` is DEPENDENCY, not VALIDATION: ambiguity is observed on the live page at run time, like `ELEMENT_NOT_FOUND`, and is never raised before a step runs (BOFF-17109).
|
|
124
126
|
|
|
125
|
-
**Drivers.** A desk implements `UiDriver` (`driver.ts`): `resolve`, `act`, `read`, `readAll`, `listItems`, `pressKeys`, navigation, page text and HTML, `scrollPage`, and optionally `typeSecret`, `login` and `screenshot`, plus its `capabilities` and an optional `clock`. A driver makes one attempt per call; the interpreter owns waiting. A desk failure is a thrown `UiDriverError` with an engine code; anything else becomes `DRIVER_ERROR`. `createDomDriver` never reads a sensitive element, and its page text and HTML leave sensitive content, scripts, handlers and field values out.
|
|
127
|
+
**Drivers.** A desk implements `UiDriver` (`driver.ts`): `resolve`, `act`, `read`, `readAll`, `listItems`, `pressKeys`, navigation, page text and HTML, `scrollPage`, and optionally `typeSecret`, `login` and `screenshot`, plus its `capabilities` and an optional `clock`. For healing it may add `treeSnapshot` (the page's value-free snapshot now) and `frameOrigin` (the origin a frame chain leads to); `createDomDriver` has both, and the snapshot driver returns its stored snapshot. A driver makes one attempt per call; the interpreter owns waiting. A desk failure is a thrown `UiDriverError` with an engine code; anything else becomes `DRIVER_ERROR`. `createDomDriver` never reads a sensitive element, and its page text and HTML leave sensitive content, scripts, handlers and field values out. Its `readAll` and `listItems` return the resolution of the method that found the elements, so extract and extract-list steps report `resolvedBy`.
|
|
126
128
|
|
|
127
129
|
**Snapshot replay.** `replayUiScriptOnSnapshot(script, { document, snapshot, stepPath?, elementKeys? })` rebuilds a tree snapshot into an empty, inert document and replays a resolved script on it with a dry-run DOM driver, a virtual clock and one attempt per target. Verification, paging and waits that are not for a target to appear are skipped. A run snapshot taken at a step checks only that step; an element version's snapshot checks the steps that use the given element keys. It returns `{ passed, failedStepPath, errorCode, steps: [{ stepPath, verdict, resolvedBy }] }` with verdicts `passed`, `failed`, `skipped` and `unchecked` (contract `UiSnapshotReplay`).
|
|
128
130
|
|
|
129
131
|
**Expressions.** `evaluateExpression` implements every operator of `UI_EXPRESSION_OPS`. Comparison of two texts is by code unit, otherwise by number; `add`, `sub`, `mul`, `div`, `mod` take numbers or numeric text; `concat` joins text; `replace` replaces every literal occurrence (no regular expressions); `join` uses `,` by default; dates are ISO 8601 text in UTC (`formatDate` tokens `YYYY`, `MM`, `DD`, `HH`, `mm`, `ss`). Results are bounded (1,000,000 characters, 10,000 list items, finite numbers), and errors are `EXPRESSION_ERROR` with messages that name the operator, never a value.
|
|
130
132
|
|
|
133
|
+
## The analyzer
|
|
134
|
+
|
|
135
|
+
`analyzeUiScript(script, options?)` reads a parsed UI script (call `parseUiScript` first) and returns the problems an author should know about before it runs (spec 14 section 3). It is pure, browser-safe and service-safe, never throws for a script that parsed, and gives the same problems in the builder and in the workflow service. Every problem is advice: the builder shows it on save and never blocks a save (spec 19, M1), and the service reports it as a validation warning. A script that cannot run fails to parse instead, so there is no error severity.
|
|
136
|
+
|
|
137
|
+
A problem is `{ rule, group, severity, messageKey, vars, message, path?, stepId?, field? }`. `messageKey` sits under `fluidgrids.builder.uiScript.problem.*`; the front end translates it with `tr(messageKey, vars)`, and the service, the CLI and logs use the English `message`. `vars.step` is the step number as an author reads it (`stepNumber`: `"5.then.1"` reads `6.2`, `"5.else.0"` reads `6.else.1`, `"cleanup.0"` reads `cleanup.1`), and `vars.target` a quoted target description. Problems are listed with the whole script's first, then each step's in document order (main steps, then clean-up), then the outputs'; within one step, in rule order. Disabled steps, and every step inside a disabled block, are skipped.
|
|
138
|
+
|
|
139
|
+
| Rule | Group | Default | Reports |
|
|
140
|
+
|---|---|---|---|
|
|
141
|
+
| `fixedWait` | reliability | warning | A Wait step that waits a fixed time instead of for an element, a text or an address |
|
|
142
|
+
| `singleMethodTarget` | reliability | warning | A target with only one method switched on (`singleMethodTarget`) or none (`noEnabledMethod`); a library element is reported once, at its first use |
|
|
143
|
+
| `hardwareInput` | reliability | warning | Hardware input for the whole script (`hardwareInputSettings`, only when a running page step inherits it) or for one step |
|
|
144
|
+
| `unknownVariable` | reliability | warning | A variable that a step (`unknownVariable`), an output (`unknownVariableOutput`), a variable's initial value (`unknownVariableInitial`) or an input's default (`unknownVariableDefault`) reads, but that no running step sets and the script does not declare (it reads as empty) |
|
|
145
|
+
| `maskedValue` | reliability | warning | A Type step whose value was masked during recording (`maskedValue`, the run stops with `INVALID_SCRIPT`) or that has no value at all (`typeWithoutValue`) |
|
|
146
|
+
| `noCleanup` | reliability | warning | A script that signs in or types a secret with no clean-up step that runs, once, at the first sign-in |
|
|
147
|
+
| `plainTextSecret` | security | warning | A plain Type step into a field whose name, label, selector or library element name reads like a password or code field (the capture rule's word list, with the short words otp, token, secret, verification and recovery matched as whole words, plus `type=password` selectors) |
|
|
148
|
+
| `secretOrigin` | security | warning | A Type secret step without `expectedOrigin` |
|
|
149
|
+
| `sensitiveScreenshot` | security | warning | A step that signs in or types a secret and takes a screenshot every time, by its own policy (`sensitiveScreenshot`) or by the script's `everyStep` (`sensitiveScreenshotSettings`); a step that sets `never` or `onFailure` is not reported |
|
|
150
|
+
| `inlineTarget` | maintainability | info | A step's first inline target, which could be an Element library element |
|
|
151
|
+
| `healConsequential` | security | info | Only with `healing` options: a step whose control looks like a payment, delete, send-outside or security control (`healConsequential`), or matches a workspace always-ask phrase (`healAlwaysAskKeyword`). Healing never changes such a step's target without a person's approval. Steps listed in `alwaysAskStepIds` are not reported |
|
|
152
|
+
| `popupHandlerLoop` | reliability | warning | Only with `popupHandler` (set by `analyzeUiPopupHandler`): a pop-up handler step that is a flow block (`popupHandlerFlow`), takes an action a handler may not take (`popupHandlerAction`), acts on a consequential control (`popupHandlerConsequential`), waits longer than 5,000 ms (`popupHandlerWait`), or a handler with no step that clicks, checks or presses a key (`popupHandlerNoAction`) |
|
|
153
|
+
| `unusedValue` | maintainability | info | A declared variable nothing reads (`unusedVariable`), and a `set` or `saveAs` value no step, output or later node reads (`unusedValue`). A `set` or `saveAs` value is a key of the node's results, so it is reported only when `externalReads` is given, except a `__` name, which never reaches the results |
|
|
154
|
+
|
|
155
|
+
Options:
|
|
156
|
+
|
|
157
|
+
- `severity`: a workspace's setting per rule, `warning`, `info` or `off` (drops the rule's problems). Any other stored value is ignored and the rule keeps its default. `UI_ANALYZER_DEFAULT_SEVERITY` holds the defaults.
|
|
158
|
+
- `externalReads`: the result names other nodes of the workflow read. A `set` or `saveAs` value is a key of the node's results, so without this list it is never reported as unused; the builder passes it, the service may leave it out.
|
|
159
|
+
- `healing`: `{ alwaysAskStepIds?, keywords? }`, the node's and workspace's healing settings, for `healConsequential`.
|
|
160
|
+
- `popupHandler`: `{ match }`, set when the script is a pop-up handler's steps, for `popupHandlerLoop`.
|
|
161
|
+
|
|
162
|
+
## Healing
|
|
163
|
+
|
|
164
|
+
Healing repairs a step whose own target is no longer found (spec 10 section 3, plan P4-06a, BOFF-17301). The engine supplies the pieces; the workflow service (P4-13) makes the model call, and the remote-browser worker (P4-15) and the extension (P4-16) run the interpreter with the hook. The UI script schema does not change (`UI_SCRIPT_SCHEMA_HASH` keeps its P1-02 value, D-P4-9). Everything in `./heal` is pure and needs no DOM, except `verifyHealCandidate`, which asks the desk driver.
|
|
165
|
+
|
|
166
|
+
**Interpreter options** (all optional; without them, or with mode `off`, a run behaves exactly as before):
|
|
167
|
+
|
|
168
|
+
- `targetOverrides: { [stepId]: UiTarget }`: targets that replace steps' own targets, for the rerun after a person approves a heal (D-P4-11). Each must be a valid target of a step healing repairs, else the run fails `INVALID_SCRIPT` before any step runs. A passed step's event carries `detail.targetOverride: true`.
|
|
169
|
+
- `popupHandlers: UiPopupHandler[]`: `{ id, match: { urlPattern?, target }, steps }`. When a step's own target still fails with `ELEMENT_NOT_FOUND` or `ELEMENT_NOT_INTERACTABLE` after its retries, up to 2 handlers whose pattern matches the page address and whose `match.target` is visible run (every wait of a handler step is capped at 5 s, and the `popupHandlerLoop` rule refuses a handler step that asks for longer), each followed by one more attempt of the step. A handler that does not parse, has more than 10 steps, or trips the `popupHandlerLoop` rule is never used and is listed in a LOG event (`detail.popupHandlersRejected`); at most 50 are used. Handlers never run inside handlers, and no healing happens inside them. Patterns are `*` wildcards, compared without case against the address without query or fragment, never regular expressions. A pattern with `scheme://` is matched in parts: the scheme exactly, the host label by label (a leading `*.` stands for one or more labels; any other `*` stays inside one label, so `https://app.test*` never matches `https://app.test.evil.test`), and the path with `*` matching anything.
|
|
170
|
+
- `onTargetNotFound(request, { signal })`: asked once per step id per run, when the step's own target still fails with `ELEMENT_NOT_FOUND` or `ELEMENT_AMBIGUOUS` after its retries and pop-up handlers, for the actions `click`, `doubleClick`, `hover`, `type`, `clear`, `check`, `select`, `getText`, `getValue`, `getAttribute` and `waitFor` (never `typeSecret` or `login`). The request carries the step, the failed target, its description and the page address, and the page snapshot (`driver.treeSnapshot`) **masked by the engine** (`maskSnapshot`), with `maskedPaths` and `screenshotMask` (the rectangles a desk paints over its screenshot before upload). The hook returns `{ answer, mode, alwaysAsk?, consequence?, proposalId? }`.
|
|
171
|
+
- `healing: { alwaysAskStepIds?, keywords?, maskedPaths? }`: the node's always-ask steps, the workspace's always-ask phrases, and extra paths to mask.
|
|
172
|
+
|
|
173
|
+
**What happens to an answer.** The engine checks the host's answer again (the node path must be in the masked snapshot and the target valid), then runs `verifyHealCandidate` on the live page and `classifyConsequence` on the element. Then the mode decides (`decideHeal`):
|
|
174
|
+
|
|
175
|
+
| Mode | A verified candidate | Run result |
|
|
176
|
+
|---|---|---|
|
|
177
|
+
| `off` | not used | the step fails exactly as without healing |
|
|
178
|
+
| `suggest` | reported | the step fails with its own code; `error.heal.outcome` is `suggested`, with the candidate and `proposalId` |
|
|
179
|
+
| `heal_with_approval` | reported | the run stops with `HEAL_APPROVAL_REQUIRED` and `error.heal` (`approval_required`); the desk parks the run for a person |
|
|
180
|
+
| `heal_and_continue` | used | the step runs on the candidate; STEP_PASSED carries `detail.healed: { method: 'model', nodePath, proposalId }`, the step log `healed: true`, and the result `repairs.healed`. Later runs of that step id in the run use the healed target. A consequential candidate (payment, delete, send outside, security), a step whose own lost target or library element reads as consequential, an acting control with no readable words (an icon, or one inside a sensitive region), an always-ask step or phrase, or the service's `alwaysAsk` stops with `HEAL_APPROVAL_REQUIRED` instead |
|
|
181
|
+
|
|
182
|
+
`HEAL_APPROVAL_REQUIRED` ends the run even when the step has `onError: continue`, and is never retried by a step retry or a retry scope. A candidate that fails the check, an answer of `not_present` or `unavailable`, a hook that throws, or a desk without snapshots fail the step with its own code and `error.heal.outcome` set to `check_failed` (with the reason), `not_present` or `unavailable`. When a step run on a healed target fails there (its action may already have taken effect, for example before a `verify` failed), that failure's code is the step's, and the report carries `reason: STEP_FAILED`, `stepFailureCode` and `attempted: true`. The request's `url` is cleaned like a snapshot address (no query, fragment or reset token). `UiRunResult.repairs` (`{ healed, popupsHandled }`) is present only when a repair happened.
|
|
183
|
+
|
|
184
|
+
**The pieces** (threats R1, R2, R3, R7 and C4 of fluidgrids-specs document 24):
|
|
185
|
+
|
|
186
|
+
- `maskSnapshot(snapshot, { maskedPaths?, sensitive? })`: masked paths and, by default, every password, one-time-code, card or secret field, anything inside one and anything marked sensitive keep their tag, bounds and identifying attributes and lose their texts and descriptive attributes, descendants, shadow content and frames included; they gain `data-fg-sensitive`. Texts become empty strings, so node paths do not move, and the address is cleaned again. Returns `{ snapshot, maskedPaths, screenshotMask }` (rectangles in the top page's coordinates, frames included) and never changes its input.
|
|
187
|
+
- `buildHealQuestion(request)`: one narrow question: at most 400 visible elements (the ones most like the lost target, listed in page order), each with node path, role, name (at most 100 characters), a value placeholder and bounds; masked elements are listed with `masked: true` and no name. Page text goes in only as JSON values, under a system message that says it is data.
|
|
188
|
+
- `parseHealAnswer(text, snapshot, { listedPaths? })`: only `{"nodePath": "...", "confidence": 0..1}` or `{"notPresent": true}`, one JSON object (a single code fence is tolerated). The path must name a visible element (and one the question listed); any other text, key or path is `not_present`, so an answer can never carry an action, a value or an address.
|
|
189
|
+
- `verifyHealCandidate(driver, candidate, step, context)`: exactly one element, visible and enabled for a step that acts, a control type that fits the action (a click needs a button, link, checkbox, menu item, tab, option, radio, switch, combo box or grid cell; typing a text box, search box, combo box, number field or editable region), the same frame as the failed step (by origin when the desk reports one, else the same frame chain), never a password, secret or masked field for typing, and in the top document the snapshot node's position (within 24 px).
|
|
190
|
+
- `classifyConsequence(element, step, keywords?)`: English keyword phrases matched as whole words over the name, link address, hints and, for a submit button or a field that Enter or a key submits, its form's words; only for steps that can set something off (clicks, checks, choices, keys, and typing with Enter). Workspace phrases are case-folded keyword phrases, at most 50 of at most 100 characters (D-P4-12). Accepted residual risk: a control labelled in another language may not be classified.
|
|
191
|
+
- `targetFromSnapshotNode(path, snapshot)`: a multi-method target for a snapshot node (test id, `#id`, role and name, a control's `name`, exact text, fuzzy, then a structural CSS path), each method only when it names the element alone in its document, frame or shadow root, with the frame chain built the same way.
|
|
192
|
+
|
|
193
|
+
Node paths are `/` for the root, then `c<n>` (n-th child, texts counted), `s<n>` (n-th shadow child) and `f` (a frame's document element), for example `/c1/c0/s2/c0`.
|
|
194
|
+
|
|
131
195
|
## Compatibility with Stewards
|
|
132
196
|
|
|
133
197
|
The modules were copied from `wspace-botmanor-svc` `src/modules/stewards/teach/` at commit `6558d8b` (BOFF-16873). The differences are:
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `analyzeUiScript`: runs every analyzer rule over a parsed UI script
|
|
3
|
+
* (spec 14 section 3, plan P1-02b).
|
|
4
|
+
*
|
|
5
|
+
* The analyzer is pure: it reads the script and nothing else, never throws
|
|
6
|
+
* for a script `parseUiScript` accepted, and returns the same problems in the
|
|
7
|
+
* browser (the builder) and on the server (the workflow service validator).
|
|
8
|
+
* Problems are advice; none blocks a save.
|
|
9
|
+
*/
|
|
10
|
+
import type { UiScript } from '../script/types.js';
|
|
11
|
+
import { type UiAnalyzeOptions, type UiAnalyzerRuleId, type UiProblemSeverity, type UiScriptProblem } from './types.js';
|
|
12
|
+
/** The default severity of every rule, by id. */
|
|
13
|
+
export declare const UI_ANALYZER_DEFAULT_SEVERITY: Readonly<Record<UiAnalyzerRuleId, UiProblemSeverity>>;
|
|
14
|
+
/**
|
|
15
|
+
* The problems of a script, in document order: problems of the whole script
|
|
16
|
+
* first, then each step's (main steps, then clean-up), then the outputs';
|
|
17
|
+
* within one place, in rule order. Pass the script `parseUiScript` returned.
|
|
18
|
+
*/
|
|
19
|
+
export declare function analyzeUiScript(script: UiScript, options?: UiAnalyzeOptions): UiScriptProblem[];
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { UiExpression, UiScript, UiScriptElement, UiStep, UiTarget, UiTargetRef } from '../script/types.js';
|
|
2
|
+
import type { UiAnalyzeOptions } from './types.js';
|
|
3
|
+
/** A step that runs (not disabled, and not inside a disabled block), with where it sits. */
|
|
4
|
+
export interface ActiveStep {
|
|
5
|
+
step: UiStep;
|
|
6
|
+
path: string;
|
|
7
|
+
/** The step's number as an author reads it (`stepNumber`). */
|
|
8
|
+
number: string;
|
|
9
|
+
/** The step's index among every step in document order, disabled ones included; problems sort by it. */
|
|
10
|
+
order: number;
|
|
11
|
+
}
|
|
12
|
+
export interface AnalyzeContext {
|
|
13
|
+
script: UiScript;
|
|
14
|
+
options: UiAnalyzeOptions;
|
|
15
|
+
elements: Readonly<Record<string, UiScriptElement>>;
|
|
16
|
+
/** The steps that run, in document order: the main steps, then the clean-up block. */
|
|
17
|
+
steps: readonly ActiveStep[];
|
|
18
|
+
/** Every step, disabled ones included; outputs sort after the last. */
|
|
19
|
+
totalSteps: number;
|
|
20
|
+
/** The target a reference stands for: the inline target, or the pinned element's target when the script carries it. */
|
|
21
|
+
targetOf(ref: UiTargetRef): UiTarget | undefined;
|
|
22
|
+
/** A quoted, short description of a target, for messages. */
|
|
23
|
+
describeTarget(ref: UiTargetRef): string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* The number of a step as an author reads it: positions count from 1, the
|
|
27
|
+
* `then` and `steps` blocks add a level, an `else` block adds `else`, and the
|
|
28
|
+
* clean-up block starts with `cleanup`. `"5.then.1"` is `"6.2"`,
|
|
29
|
+
* `"5.else.0"` is `"6.else.1"` and `"cleanup.0"` is `"cleanup.1"`.
|
|
30
|
+
*/
|
|
31
|
+
export declare function stepNumber(path: string): string;
|
|
32
|
+
export declare function createContext(script: UiScript, options: UiAnalyzeOptions): AnalyzeContext;
|
|
33
|
+
/** The names of the variables an expression reads. */
|
|
34
|
+
export declare function variablesRead(expression: UiExpression): string[];
|
|
35
|
+
/** The variables a step reads through its own expressions (its nested blocks excluded). */
|
|
36
|
+
export declare function stepVariablesRead(step: UiStep): string[];
|
|
37
|
+
/** The variable names a step sets: its `saveAs`, a `set` name, and a for-each item and index. */
|
|
38
|
+
export declare function stepVariablesSet(step: UiStep): string[];
|
|
39
|
+
/** True for a step that signs in: a sign-in step or a secret typed into a field. */
|
|
40
|
+
export declare function signsIn(step: UiStep): boolean;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The UI script analyzer (plan P1-02b): `analyzeUiScript`, the rules of v1,
|
|
3
|
+
* their message keys under `fluidgrids.builder.uiScript.problem.*` and the
|
|
4
|
+
* English templates.
|
|
5
|
+
*/
|
|
6
|
+
export { UI_ANALYZER_DEFAULT_SEVERITY, analyzeUiScript } from './analyze.js';
|
|
7
|
+
export { UI_ANALYZER_RULE_GROUPS, UI_ANALYZER_RULE_IDS, UI_PROBLEM_SEVERITIES, type UiAnalyzeOptions, type UiAnalyzerRuleGroup, type UiAnalyzerRuleId, type UiProblemSeverity, type UiProblemSeveritySetting, type UiRuleFinding, type UiScriptProblem, } from './types.js';
|
|
8
|
+
export { UI_SCRIPT_PROBLEM_KEY_PREFIX, UI_SCRIPT_PROBLEM_MESSAGES, type UiScriptProblemMessageKey, type UiScriptProblemMessageName, problemMessage, problemMessageKey, } from './messages.js';
|
|
9
|
+
export { UI_ANALYZER_RULES, type UiAnalyzerRule } from './rules/index.js';
|
|
10
|
+
export { type ActiveStep, type AnalyzeContext, stepNumber } from './context.js';
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The analyzer's messages (plan P1-02b).
|
|
3
|
+
*
|
|
4
|
+
* Each problem carries a message key under `fluidgrids.builder.uiScript.problem.*`,
|
|
5
|
+
* its variables, and an English fallback. The builder translates the key with
|
|
6
|
+
* `tr(key, vars)` so `i18n:extract` sees it; the service, the CLI and logs use
|
|
7
|
+
* the fallback. `{{step}}` is the step's number as an author reads it
|
|
8
|
+
* (`stepNumber`), `{{target}}` a quoted target description (`describeTarget`).
|
|
9
|
+
*/
|
|
10
|
+
/** The prefix of every problem message key. */
|
|
11
|
+
export declare const UI_SCRIPT_PROBLEM_KEY_PREFIX = "fluidgrids.builder.uiScript.problem.";
|
|
12
|
+
/** English templates of every problem message, by name; the key is the prefix plus the name. */
|
|
13
|
+
export declare const UI_SCRIPT_PROBLEM_MESSAGES: {
|
|
14
|
+
readonly fixedWait: "Step {{step}} waits a fixed {{milliseconds}} ms. Wait for an element, a text or an address instead, so the step neither fails on a slow page nor wastes time on a fast one.";
|
|
15
|
+
readonly singleMethodTarget: "Step {{step}} finds {{target}} by one method only. Add another method so a page change does not break the step.";
|
|
16
|
+
readonly noEnabledMethod: "Step {{step}} has every method of {{target}} switched off, so it can never find the element. Switch a method on.";
|
|
17
|
+
readonly hardwareInput: "Step {{step}} uses hardware input, which needs the browser window in front and the screen unlocked. Use automatic input unless the page refuses it.";
|
|
18
|
+
readonly hardwareInputSettings: "The script uses hardware input for every step, which needs the browser window in front and the screen unlocked. Use automatic input unless a page refuses it.";
|
|
19
|
+
readonly unknownVariable: "Step {{step}} reads {{name}}, but no step sets it and the script does not declare it, so it is empty when the step runs.";
|
|
20
|
+
readonly unknownVariableOutput: "The output {{output}} reads {{name}}, but no step sets it and the script does not declare it, so the output is always empty.";
|
|
21
|
+
readonly unknownVariableInitial: "The initial value of the variable {{variable}} reads {{name}}, but no step sets it and the script does not declare it, so it reads as empty.";
|
|
22
|
+
readonly unknownVariableDefault: "The default of the input {{input}} reads {{name}}, but no step sets it and the script does not declare it, so it reads as empty.";
|
|
23
|
+
readonly maskedValue: "Step {{step}} types a value that was hidden during recording. Give it a value, such as a workflow input, or the run stops at this step.";
|
|
24
|
+
readonly typeWithoutValue: "Step {{step}} has no value to type, so it types nothing. Give it a value or remove the step.";
|
|
25
|
+
readonly noCleanup: "The script signs in at step {{step}} but has no clean-up steps. Add clean-up steps that sign out or close the tab, so a failed run does not leave the session open.";
|
|
26
|
+
readonly plainTextSecret: "Step {{step}} types into {{target}}, which looks like a password or code field, with a plain Type step. Use Type secret with a connection so the value is never stored or shown.";
|
|
27
|
+
readonly secretOrigin: "Step {{step}} types a secret without an expected site. Set the site the secret may be typed into, so it is never typed into another page.";
|
|
28
|
+
readonly sensitiveScreenshot: "Step {{step}} signs in or types a secret and takes a screenshot every time it runs. Take screenshots of this step on failure only.";
|
|
29
|
+
readonly sensitiveScreenshotSettings: "The script takes a screenshot of every step, including step {{step}}, which signs in or types a secret. Take screenshots on failure only, or turn them off for that step.";
|
|
30
|
+
readonly inlineTarget: "Step {{step}} uses an inline target. Add it to the Element library so other workflows can reuse it.";
|
|
31
|
+
readonly unusedValue: "Step {{step}} stores {{name}}, but no step, output or later node reads it.";
|
|
32
|
+
readonly unusedVariable: "The variable {{name}} is declared, but no step reads it.";
|
|
33
|
+
readonly healConsequential: "Step {{step}} acts on {{target}}, which looks like a {{consequence}} control. If healing finds a new target for it, a person must approve the change before the step runs.";
|
|
34
|
+
readonly healAlwaysAskKeyword: "Step {{step}} acts on {{target}}, which matches the always-ask phrase {{keyword}}. If healing finds a new target for it, a person must approve the change before the step runs.";
|
|
35
|
+
readonly popupHandlerFlow: "Pop-up handler step {{step}} is a {{action}} block. A handler is a short, straight list of steps, so it can never loop.";
|
|
36
|
+
readonly popupHandlerAction: "Pop-up handler step {{step}} uses {{action}}. A handler may only click, check, press keys, hover, scroll or wait.";
|
|
37
|
+
readonly popupHandlerConsequential: "Pop-up handler step {{step}} acts on {{target}}, which looks like a {{consequence}} control. A handler never acts on such a control.";
|
|
38
|
+
readonly 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.";
|
|
39
|
+
readonly popupHandlerNoAction: "The pop-up handler has no step that clicks, checks or presses a key, so it cannot clear the pop-up.";
|
|
40
|
+
};
|
|
41
|
+
export type UiScriptProblemMessageName = keyof typeof UI_SCRIPT_PROBLEM_MESSAGES;
|
|
42
|
+
export type UiScriptProblemMessageKey = `fluidgrids.builder.uiScript.problem.${UiScriptProblemMessageName}`;
|
|
43
|
+
/** The full message key of a problem message name. */
|
|
44
|
+
export declare function problemMessageKey(name: UiScriptProblemMessageName): UiScriptProblemMessageKey;
|
|
45
|
+
/** The English sentence of a message with its variables filled in. */
|
|
46
|
+
export declare function problemMessage(name: UiScriptProblemMessageName, vars: Record<string, string | number>): string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reliability: a Type step with no value. A value the recorder masked stops
|
|
3
|
+
* the run with `INVALID_SCRIPT` until an author gives it a value; a step with
|
|
4
|
+
* neither a value nor the mask (possible in a Stewards recording) types
|
|
5
|
+
* nothing at all.
|
|
6
|
+
*/
|
|
7
|
+
import type { UiAnalyzerRule } from './rule.js';
|
|
8
|
+
export declare const maskedValueRule: UiAnalyzerRule;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** The shape every analyzer rule has, and the helpers rules share. */
|
|
2
|
+
import type { ActiveStep, AnalyzeContext } from '../context.js';
|
|
3
|
+
import type { UiScriptProblemMessageName } from '../messages.js';
|
|
4
|
+
import type { UiAnalyzerRuleGroup, UiAnalyzerRuleId, UiProblemSeverity, UiRuleFinding } from '../types.js';
|
|
5
|
+
export interface UiAnalyzerRule {
|
|
6
|
+
id: UiAnalyzerRuleId;
|
|
7
|
+
group: UiAnalyzerRuleGroup;
|
|
8
|
+
/** The severity a workspace gets unless it sets another. */
|
|
9
|
+
severity: UiProblemSeverity;
|
|
10
|
+
/** What the rule looks for, in one sentence (for documentation and the CLI). */
|
|
11
|
+
description: string;
|
|
12
|
+
check(context: AnalyzeContext): UiRuleFinding[];
|
|
13
|
+
}
|
|
14
|
+
/** A finding on one step; the step's number is added to the variables as `step`. */
|
|
15
|
+
export declare function stepFinding(active: ActiveStep, message: UiScriptProblemMessageName, vars?: Record<string, string | number>, field?: string): UiRuleFinding;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Security: a Type secret step with no expected site. Sign-in stays bound to
|
|
3
|
+
* an origin (spec 05 section 8): with `expectedOrigin` set, a desk refuses to
|
|
4
|
+
* type the secret into any other page, such as one a redirect landed on.
|
|
5
|
+
*/
|
|
6
|
+
import type { UiAnalyzerRule } from './rule.js';
|
|
7
|
+
export declare const secretOriginRule: UiAnalyzerRule;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Whether a stored target reads like a password or code field, from its
|
|
3
|
+
* words alone (no page): the analyzer's form of the capture rule for field
|
|
4
|
+
* names (`./capture`, and `isSecretFieldName` in `./target`). A test keeps
|
|
5
|
+
* the word list in step with the DOM rule. The short words (otp, token,
|
|
6
|
+
* secret, verification, recovery) must stand alone here, because the analyzer
|
|
7
|
+
* reads whole selectors and labels, where they also occur inside other words
|
|
8
|
+
* ("footprint", "hotpot", "secretary").
|
|
9
|
+
*/
|
|
10
|
+
import type { UiTarget } from '../script/types.js';
|
|
11
|
+
/** True when a name, label or selector reads like a secret field. */
|
|
12
|
+
export declare function readsLikeSecret(text: string): boolean;
|
|
13
|
+
/** True when a target, or the library element's name, reads like a password or code field. */
|
|
14
|
+
export declare function looksLikeSecretField(target: UiTarget | undefined, elementName?: string): boolean;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Types of the UI script analyzer (spec 14 section 3, plan P1-02b).
|
|
3
|
+
*
|
|
4
|
+
* The analyzer reads a parsed UI script and reports problems an author should
|
|
5
|
+
* know about before the script runs. Every problem is advice: the builder
|
|
6
|
+
* shows it on save and never blocks a save (spec 19, M1), and the workflow
|
|
7
|
+
* service reports it as a validation warning (plan P1-08).
|
|
8
|
+
*/
|
|
9
|
+
import type { UiTarget } from '../script/types.js';
|
|
10
|
+
import type { UiScriptProblemMessageKey, UiScriptProblemMessageName } from './messages.js';
|
|
11
|
+
/** How much a problem matters. Analyzer v1 never reports an error: a script that cannot run fails to parse instead. */
|
|
12
|
+
export declare const UI_PROBLEM_SEVERITIES: readonly ["warning", "info"];
|
|
13
|
+
export type UiProblemSeverity = (typeof UI_PROBLEM_SEVERITIES)[number];
|
|
14
|
+
/** A workspace's setting for one rule: a severity, or `off` to drop the rule's problems. */
|
|
15
|
+
export type UiProblemSeveritySetting = UiProblemSeverity | 'off';
|
|
16
|
+
/** The rule groups of spec 14 section 3 that v1 covers. */
|
|
17
|
+
export declare const UI_ANALYZER_RULE_GROUPS: readonly ["reliability", "security", "maintainability"];
|
|
18
|
+
export type UiAnalyzerRuleGroup = (typeof UI_ANALYZER_RULE_GROUPS)[number];
|
|
19
|
+
/** The rules of analyzer v1, in the order their problems are listed within one step. */
|
|
20
|
+
export declare const UI_ANALYZER_RULE_IDS: readonly ["fixedWait", "singleMethodTarget", "hardwareInput", "unknownVariable", "maskedValue", "noCleanup", "plainTextSecret", "secretOrigin", "sensitiveScreenshot", "inlineTarget", "unusedValue", "healConsequential", "popupHandlerLoop"];
|
|
21
|
+
export type UiAnalyzerRuleId = (typeof UI_ANALYZER_RULE_IDS)[number];
|
|
22
|
+
/** One problem the analyzer found. */
|
|
23
|
+
export interface UiScriptProblem {
|
|
24
|
+
rule: UiAnalyzerRuleId;
|
|
25
|
+
group: UiAnalyzerRuleGroup;
|
|
26
|
+
severity: UiProblemSeverity;
|
|
27
|
+
/** The message key under `fluidgrids.builder.uiScript.problem.*`; the front end translates it with `tr(key, vars)`. */
|
|
28
|
+
messageKey: UiScriptProblemMessageKey;
|
|
29
|
+
/** The values the message's `{{name}}` placeholders take. */
|
|
30
|
+
vars: Record<string, string | number>;
|
|
31
|
+
/** The English sentence, for consumers that do not translate (logs, the service, the CLI). */
|
|
32
|
+
message: string;
|
|
33
|
+
/** The step's path (as `walkSteps` gives it), when the problem belongs to a step. */
|
|
34
|
+
path?: string;
|
|
35
|
+
/** The step's id, when the problem belongs to a step. */
|
|
36
|
+
stepId?: string;
|
|
37
|
+
/** The field of the step or the script the problem points at, such as `target` or `settings.inputMethod`. */
|
|
38
|
+
field?: string;
|
|
39
|
+
}
|
|
40
|
+
/** Options of `analyzeUiScript`. */
|
|
41
|
+
export interface UiAnalyzeOptions {
|
|
42
|
+
/**
|
|
43
|
+
* Per-rule severity, as a workspace sets it (spec 14 section 3). A rule
|
|
44
|
+
* left out keeps its default severity; `off` drops its problems.
|
|
45
|
+
*/
|
|
46
|
+
severity?: Partial<Record<UiAnalyzerRuleId, UiProblemSeveritySetting>>;
|
|
47
|
+
/**
|
|
48
|
+
* The names of the node's results (`set` and `saveAs` names) that other
|
|
49
|
+
* nodes of the workflow read. The builder knows them; the service may not.
|
|
50
|
+
* When this is left out, a `set` or `saveAs` value is never reported as
|
|
51
|
+
* unused (unless its name starts with `__`), because a later node may read it.
|
|
52
|
+
*/
|
|
53
|
+
externalReads?: readonly string[];
|
|
54
|
+
/**
|
|
55
|
+
* The node's healing settings (plan P4-06a). When given, the
|
|
56
|
+
* `healConsequential` rule tells the author which steps act on a control
|
|
57
|
+
* a heal never changes without a person's approval. Absent means the rule
|
|
58
|
+
* reports nothing.
|
|
59
|
+
*/
|
|
60
|
+
healing?: {
|
|
61
|
+
alwaysAskStepIds?: readonly string[];
|
|
62
|
+
/** The workspace's always-ask keyword phrases. */
|
|
63
|
+
keywords?: readonly string[];
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* The script is a pop-up handler's steps (plan P4-06a, threat R7). When
|
|
67
|
+
* given, the `popupHandlerLoop` rule checks them; absent means the rule
|
|
68
|
+
* reports nothing. `analyzeUiPopupHandler` sets it.
|
|
69
|
+
*/
|
|
70
|
+
popupHandler?: {
|
|
71
|
+
match: {
|
|
72
|
+
urlPattern?: string;
|
|
73
|
+
target: UiTarget;
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
/** A problem as a rule reports it, before the analyzer adds the severity and the message. */
|
|
78
|
+
export interface UiRuleFinding {
|
|
79
|
+
message: UiScriptProblemMessageName;
|
|
80
|
+
vars: Record<string, string | number>;
|
|
81
|
+
path?: string;
|
|
82
|
+
stepId?: string;
|
|
83
|
+
field?: string;
|
|
84
|
+
/**
|
|
85
|
+
* Where the problem sorts: the step's index in document order, -1 for a
|
|
86
|
+
* problem of the whole script, or past the last step for an output.
|
|
87
|
+
*/
|
|
88
|
+
order: number;
|
|
89
|
+
}
|
package/dist/analyze.js
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import {
|
|
2
|
+
stepNumber2,
|
|
3
|
+
UI_SCRIPT_PROBLEM_KEY_PREFIX2,
|
|
4
|
+
UI_SCRIPT_PROBLEM_MESSAGES2,
|
|
5
|
+
problemMessageKey2,
|
|
6
|
+
problemMessage2,
|
|
7
|
+
UI_ANALYZER_RULES2,
|
|
8
|
+
UI_PROBLEM_SEVERITIES2,
|
|
9
|
+
UI_ANALYZER_RULE_GROUPS2,
|
|
10
|
+
UI_ANALYZER_RULE_IDS2,
|
|
11
|
+
UI_ANALYZER_DEFAULT_SEVERITY2,
|
|
12
|
+
analyzeUiScript2
|
|
13
|
+
} from "./index-xdtanv9b.js";
|
|
14
|
+
export {
|
|
15
|
+
UI_ANALYZER_DEFAULT_SEVERITY2 as UI_ANALYZER_DEFAULT_SEVERITY,
|
|
16
|
+
UI_ANALYZER_RULES2 as UI_ANALYZER_RULES,
|
|
17
|
+
UI_ANALYZER_RULE_GROUPS2 as UI_ANALYZER_RULE_GROUPS,
|
|
18
|
+
UI_ANALYZER_RULE_IDS2 as UI_ANALYZER_RULE_IDS,
|
|
19
|
+
UI_PROBLEM_SEVERITIES2 as UI_PROBLEM_SEVERITIES,
|
|
20
|
+
UI_SCRIPT_PROBLEM_KEY_PREFIX2 as UI_SCRIPT_PROBLEM_KEY_PREFIX,
|
|
21
|
+
UI_SCRIPT_PROBLEM_MESSAGES2 as UI_SCRIPT_PROBLEM_MESSAGES,
|
|
22
|
+
analyzeUiScript2 as analyzeUiScript,
|
|
23
|
+
problemMessage2 as problemMessage,
|
|
24
|
+
problemMessageKey2 as problemMessageKey,
|
|
25
|
+
stepNumber2 as stepNumber
|
|
26
|
+
};
|