@burdenoff/ui-engine 2026.1127.1 → 2026.1127.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.
@@ -0,0 +1,489 @@
1
+ /**
2
+ * UI script v1: the portable form of a UI sequence that a desk runs
3
+ * (spec 03 section 5, spec 05, plan P0-04).
4
+ *
5
+ * These are the TypeScript types; `schema.ts` holds the zod schema that
6
+ * validates them and `schema/ui-script-v1.schema.json` the JSON Schema
7
+ * generated from it. A script holds data only. Optional fields are left out
8
+ * rather than defaulted, so parsing never rewrites a script and a parsed
9
+ * script serialises back to exactly what was stored; each field documents
10
+ * the default an interpreter applies when it is absent.
11
+ */
12
+ /**
13
+ * The operators of the expression language. An expression is a JSON tree
14
+ * (no text to parse), side-effect free, evaluated over the script's inputs
15
+ * and variables only (spec 03 section 5.1). `if` evaluates only the branch
16
+ * it takes, and `and`/`or` short-circuit.
17
+ */
18
+ export declare const UI_EXPRESSION_OPS: readonly ["eq", "ne", "lt", "le", "gt", "ge", "and", "or", "not", "add", "sub", "mul", "div", "mod", "neg", "abs", "round", "min", "max", "concat", "contains", "startsWith", "endsWith", "lower", "upper", "trim", "replace", "split", "join", "length", "toNumber", "toText", "toBoolean", "isEmpty", "coalesce", "if", "get", "now", "formatDate", "addDays"];
19
+ export type UiExpressionOp = (typeof UI_EXPRESSION_OPS)[number];
20
+ /** A path into a structured value: object keys and list indexes. */
21
+ export type UiValuePath = Array<string | number>;
22
+ /**
23
+ * An expression: a literal (text, number, true or false, null), a reference
24
+ * to an input or a variable (with an optional path into it), a list or an
25
+ * object of expressions, or an operator applied to arguments.
26
+ */
27
+ export type UiExpression = string | number | boolean | null | {
28
+ input: string;
29
+ path?: UiValuePath;
30
+ } | {
31
+ var: string;
32
+ path?: UiValuePath;
33
+ } | {
34
+ list: UiExpression[];
35
+ } | {
36
+ object: Record<string, UiExpression>;
37
+ } | {
38
+ op: UiExpressionOp;
39
+ args: UiExpression[];
40
+ };
41
+ interface MethodBase {
42
+ /** The editor's on or off switch for this method. Absent means on. */
43
+ enabled?: boolean;
44
+ }
45
+ /**
46
+ * Strict accessibility match: role and accessible name, the n-th among equal
47
+ * matches. A superset of the Stewards saved-step target (`app` and `window`
48
+ * for desktop desks), so a saved step maps onto a UI script without loss.
49
+ */
50
+ export interface UiRoleMethod extends MethodBase {
51
+ kind: 'role';
52
+ role: string;
53
+ name: string;
54
+ /** Which of several equal matches (0 = the first). Absent means 0. */
55
+ nth?: number;
56
+ app?: string;
57
+ window?: string;
58
+ }
59
+ /** Strict DOM match by a CSS selector (the extension's selector generator output). */
60
+ export interface UiCssMethod extends MethodBase {
61
+ kind: 'css';
62
+ selector: string;
63
+ }
64
+ /** Strict DOM match by a test id attribute. */
65
+ export interface UiTestIdMethod extends MethodBase {
66
+ kind: 'testId';
67
+ value: string;
68
+ /** The attribute that holds the id. Absent means `data-testid`. */
69
+ attribute?: string;
70
+ }
71
+ /** Strict DOM match by an XPath expression. */
72
+ export interface UiXPathMethod extends MethodBase {
73
+ kind: 'xpath';
74
+ xpath: string;
75
+ }
76
+ /** Fuzzy match: role and name with a similarity threshold on the name. */
77
+ export interface UiFuzzyMethod extends MethodBase {
78
+ kind: 'fuzzy';
79
+ role?: string;
80
+ name: string;
81
+ /** Lowest accepted similarity, 0.5 to 1. Absent means 0.8. */
82
+ threshold?: number;
83
+ }
84
+ /** What an anchor method is anchored to: a visible text or an accessible element. */
85
+ export type UiAnchor = {
86
+ kind: 'text';
87
+ text: string;
88
+ } | {
89
+ kind: 'role';
90
+ role: string;
91
+ name: string;
92
+ };
93
+ /** The relation between the anchor and the element. */
94
+ export declare const UI_ANCHOR_RELATIONS: readonly ["leftOf", "rightOf", "above", "below", "inside", "sameRow"];
95
+ export type UiAnchorRelation = (typeof UI_ANCHOR_RELATIONS)[number];
96
+ /** Anchor match: the element of a role that stands in a relation to an anchor (usually its label). */
97
+ export interface UiAnchorMethod extends MethodBase {
98
+ kind: 'anchor';
99
+ anchor: UiAnchor;
100
+ relation: UiAnchorRelation;
101
+ /** The element's own role, to tell it from other elements beside the anchor. */
102
+ role?: string;
103
+ }
104
+ /** Visible text match, the n-th occurrence. */
105
+ export interface UiTextMethod extends MethodBase {
106
+ kind: 'text';
107
+ text: string;
108
+ /** Whole-text match. Absent means a case-insensitive contains match. */
109
+ exact?: boolean;
110
+ /** Which occurrence (0 = the first). Absent means 0. */
111
+ nth?: number;
112
+ }
113
+ /** The target methods of v1, in the order the spec lists them. Image and model methods come later. */
114
+ export declare const UI_TARGET_METHOD_KINDS: readonly ["role", "css", "testId", "xpath", "fuzzy", "anchor", "text"];
115
+ export type UiTargetMethodKind = (typeof UI_TARGET_METHOD_KINDS)[number];
116
+ export type UiTargetMethod = UiRoleMethod | UiCssMethod | UiTestIdMethod | UiXPathMethod | UiFuzzyMethod | UiAnchorMethod | UiTextMethod;
117
+ /**
118
+ * A target: an ordered list of methods. The engine tries them in order and
119
+ * uses the first that finds exactly one visible, enabled element (spec 05
120
+ * section 3.1).
121
+ */
122
+ export interface UiTarget {
123
+ methods: UiTargetMethod[];
124
+ /** Web: the chain of frames and shadow hosts (CSS selectors, outermost first) the element sits in. */
125
+ frame?: string[];
126
+ }
127
+ /** A reference to a library element the script pins (a key of `UiScript.elements`). */
128
+ export interface UiElementRef {
129
+ element: string;
130
+ }
131
+ /** Where a step acts: an inline target, or a pinned library element. */
132
+ export type UiTargetRef = UiTarget | UiElementRef;
133
+ /** A library element pinned by version. The worker fills `target` when it compiles the script. */
134
+ export interface UiScriptElement {
135
+ elementId: string;
136
+ version: number;
137
+ name?: string;
138
+ target?: UiTarget;
139
+ }
140
+ /** An expected outcome checked after a step acts (spec 05 section 3.3). */
141
+ export type UiVerify = {
142
+ kind: 'elementVisible';
143
+ target: UiTargetRef;
144
+ timeoutMs?: number;
145
+ } | {
146
+ kind: 'elementGone';
147
+ target: UiTargetRef;
148
+ timeoutMs?: number;
149
+ } | {
150
+ kind: 'urlContains';
151
+ value: UiExpression;
152
+ timeoutMs?: number;
153
+ } | {
154
+ kind: 'textPresent';
155
+ text: UiExpression;
156
+ timeoutMs?: number;
157
+ } | {
158
+ kind: 'valueEquals';
159
+ target: UiTargetRef;
160
+ value: UiExpression;
161
+ timeoutMs?: number;
162
+ };
163
+ /** Fields every step may carry. */
164
+ export interface UiStepBase {
165
+ /** Unique within the script, across nested blocks. */
166
+ id: string;
167
+ /** What the step does, in the author's words (the Stewards saved-step intent). */
168
+ intent?: string;
169
+ /** A note for the author, such as the recorder's "fill this in" hint. */
170
+ note?: string;
171
+ /** Keeps the step's result under this name: a variable, and a key of the node's `results`. */
172
+ saveAs?: string;
173
+ /** A disabled step is skipped. */
174
+ disabled?: boolean;
175
+ /** Test runs pause before this step; production runs never do. */
176
+ breakpoint?: boolean;
177
+ /** How long the step waits for its target, in ms. Absent means the script settings. */
178
+ timeoutMs?: number;
179
+ /** Retries of the step after a failure. Absent means none. */
180
+ retry?: {
181
+ attempts: number;
182
+ delayMs?: number;
183
+ };
184
+ /** What a failure does after the retries. Absent means `fail` (the node fails). */
185
+ onError?: 'fail' | 'continue';
186
+ /** An outcome to check after acting. A failed check retries the step within its retry limit. */
187
+ verify?: UiVerify;
188
+ /** Screenshot policy for this step. Absent means the script settings. */
189
+ screenshot?: 'never' | 'onFailure' | 'always';
190
+ /** Input method (spec 05 section 4). Absent means `auto`. */
191
+ inputMethod?: 'auto' | 'direct' | 'hardware';
192
+ /** The step can run again after an interruption without a second outward effect. Absent means false. */
193
+ safeToRepeat?: boolean;
194
+ /** A masked screenshot of the step (storage key), from a Stewards recording. */
195
+ screenshotRef?: string;
196
+ /** Integrity check over the step's action and target (`uiStepFingerprint`); a changed target fails to parse. */
197
+ fingerprint?: string;
198
+ }
199
+ /** A field an extract step reads. */
200
+ export interface UiExtractField {
201
+ name: string;
202
+ target: UiTargetRef;
203
+ /** `text`, `html`, `value` or an attribute name. Absent means text, or the value of a form control. */
204
+ attribute?: string;
205
+ /** Read every match as a list. Absent means the single match. */
206
+ all?: boolean;
207
+ }
208
+ export interface UiNavigateStep extends UiStepBase {
209
+ action: 'navigate';
210
+ url: UiExpression;
211
+ /** Absent means `load`. */
212
+ waitUntil?: 'load' | 'domcontentloaded' | 'networkidle' | 'commit';
213
+ }
214
+ export interface UiGoBackStep extends UiStepBase {
215
+ action: 'goBack';
216
+ }
217
+ export interface UiReloadStep extends UiStepBase {
218
+ action: 'reload';
219
+ }
220
+ export interface UiCloseTabStep extends UiStepBase {
221
+ action: 'closeTab';
222
+ }
223
+ export interface UiClickStep extends UiStepBase {
224
+ action: 'click';
225
+ target: UiTargetRef;
226
+ /** Absent means `left`. */
227
+ button?: 'left' | 'right';
228
+ }
229
+ export interface UiDoubleClickStep extends UiStepBase {
230
+ action: 'doubleClick';
231
+ target: UiTargetRef;
232
+ /** Absent means `left`. */
233
+ button?: 'left' | 'right';
234
+ }
235
+ export interface UiHoverStep extends UiStepBase {
236
+ action: 'hover';
237
+ target: UiTargetRef;
238
+ }
239
+ export interface UiTypeStep extends UiStepBase {
240
+ action: 'type';
241
+ /** Absent means the focused element. */
242
+ target?: UiTargetRef;
243
+ /**
244
+ * Absent when the recorder masked the value. A step with neither text nor
245
+ * `masked` (possible in a Stewards recording) types nothing until an author
246
+ * gives it a value.
247
+ */
248
+ text?: UiExpression;
249
+ /** The recorder masked the typed value: the step carries no text and needs a value before it can run. */
250
+ masked?: boolean;
251
+ /** Replace the field's content. Absent means true. */
252
+ clear?: boolean;
253
+ /** Press Enter after typing. Absent means false. */
254
+ pressEnter?: boolean;
255
+ /** Type character by character with this delay, in ms. Absent means set the value at once. */
256
+ delayMs?: number;
257
+ }
258
+ export interface UiTypeSecretStep extends UiStepBase {
259
+ action: 'typeSecret';
260
+ target: UiTargetRef;
261
+ /** A secret reference (vault or connection field); the value never appears in the script. */
262
+ secretRef: string;
263
+ /** The page origin the secret may be typed into. */
264
+ expectedOrigin?: string;
265
+ }
266
+ export interface UiClearStep extends UiStepBase {
267
+ action: 'clear';
268
+ target: UiTargetRef;
269
+ }
270
+ export interface UiSelectStep extends UiStepBase {
271
+ action: 'select';
272
+ target: UiTargetRef;
273
+ /** Option values or labels; more than one for a multiple select. */
274
+ values: UiExpression[];
275
+ }
276
+ export interface UiCheckStep extends UiStepBase {
277
+ action: 'check';
278
+ target: UiTargetRef;
279
+ /** Absent means true (check). */
280
+ checked?: boolean;
281
+ }
282
+ export interface UiPressKeyStep extends UiStepBase {
283
+ action: 'pressKey';
284
+ /** Keys pressed together, such as ["Enter"] or ["Control", "A"]. */
285
+ keys: string[];
286
+ /** Absent means the focused element. */
287
+ target?: UiTargetRef;
288
+ }
289
+ export interface UiScrollStep extends UiStepBase {
290
+ action: 'scroll';
291
+ /** The element to scroll into view or to scroll inside. Absent means the page. */
292
+ target?: UiTargetRef;
293
+ dx?: number;
294
+ dy?: number;
295
+ to?: 'top' | 'bottom';
296
+ }
297
+ export interface UiWaitForStep extends UiStepBase {
298
+ action: 'waitFor';
299
+ /** Exactly one of target, text, urlContains and milliseconds. */
300
+ target?: UiTargetRef;
301
+ text?: UiExpression;
302
+ urlContains?: UiExpression;
303
+ milliseconds?: number;
304
+ /** With a target. Absent means `visible`. */
305
+ state?: 'visible' | 'hidden' | 'attached' | 'detached';
306
+ }
307
+ export interface UiExtractStep extends UiStepBase {
308
+ action: 'extract';
309
+ fields: UiExtractField[];
310
+ }
311
+ export interface UiExtractListStep extends UiStepBase {
312
+ action: 'extractList';
313
+ /** Each repeated item; the field targets are searched inside it. */
314
+ item: UiTargetRef;
315
+ fields: UiExtractField[];
316
+ /** Absent means 100. */
317
+ maxItems?: number;
318
+ /** The control that opens the next page. */
319
+ next?: UiTargetRef;
320
+ /** Absent means 1. */
321
+ maxPages?: number;
322
+ }
323
+ export interface UiGetTextStep extends UiStepBase {
324
+ action: 'getText';
325
+ target: UiTargetRef;
326
+ }
327
+ export interface UiGetValueStep extends UiStepBase {
328
+ action: 'getValue';
329
+ target: UiTargetRef;
330
+ }
331
+ export interface UiGetAttributeStep extends UiStepBase {
332
+ action: 'getAttribute';
333
+ target: UiTargetRef;
334
+ attribute: string;
335
+ }
336
+ export interface UiElementExistsStep extends UiStepBase {
337
+ action: 'elementExists';
338
+ target: UiTargetRef;
339
+ }
340
+ export interface UiGetPageTextStep extends UiStepBase {
341
+ action: 'getPageText';
342
+ }
343
+ export interface UiGetPageHtmlStep extends UiStepBase {
344
+ action: 'getPageHtml';
345
+ }
346
+ export interface UiScreenshotStep extends UiStepBase {
347
+ action: 'screenshot';
348
+ /** Absent means the visible page. */
349
+ target?: UiTargetRef;
350
+ fullPage?: boolean;
351
+ }
352
+ /** Sign in through the node's Browser Login connection (remote browsers). Absent targets use the defaults. */
353
+ export interface UiLoginStep extends UiStepBase {
354
+ action: 'login';
355
+ username?: UiTargetRef;
356
+ password?: UiTargetRef;
357
+ submit?: UiTargetRef;
358
+ success?: UiTargetRef;
359
+ }
360
+ export interface UiFocusWindowStep extends UiStepBase {
361
+ action: 'focusWindow';
362
+ app: string;
363
+ title?: string;
364
+ }
365
+ export interface UiIfStep extends UiStepBase {
366
+ action: 'if';
367
+ /** Exactly one of condition and elementExists. */
368
+ condition?: UiExpression;
369
+ elementExists?: UiTargetRef;
370
+ then: UiStep[];
371
+ else?: UiStep[];
372
+ }
373
+ export interface UiForEachStep extends UiStepBase {
374
+ action: 'forEach';
375
+ /** Exactly one: a list expression, or every element a target matches. */
376
+ in?: UiExpression;
377
+ elements?: UiTargetRef;
378
+ /** The variable that holds the current item. */
379
+ as: string;
380
+ /** The variable that holds the current index, from 0. */
381
+ index?: string;
382
+ /** Most iterations. Absent means the engine limit. */
383
+ max?: number;
384
+ steps: UiStep[];
385
+ }
386
+ export interface UiWhileStep extends UiStepBase {
387
+ action: 'while';
388
+ /** Exactly one of condition and elementExists. */
389
+ condition?: UiExpression;
390
+ elementExists?: UiTargetRef;
391
+ /** Mandatory: a while block always has a limit. */
392
+ maxIterations: number;
393
+ steps: UiStep[];
394
+ }
395
+ export interface UiRetryScopeStep extends UiStepBase {
396
+ action: 'retryScope';
397
+ attempts: number;
398
+ delayMs?: number;
399
+ steps: UiStep[];
400
+ }
401
+ export interface UiSetStep extends UiStepBase {
402
+ action: 'set';
403
+ name: string;
404
+ value: UiExpression;
405
+ }
406
+ export interface UiLogStep extends UiStepBase {
407
+ action: 'log';
408
+ /** Absent means `info`. */
409
+ level?: 'debug' | 'info' | 'warn' | 'error';
410
+ message: UiExpression;
411
+ }
412
+ /** A call to a shared sequence, pinned by version. The worker inlines calls when it compiles the script. */
413
+ export interface UiCallStep extends UiStepBase {
414
+ action: 'call';
415
+ sequenceId: string;
416
+ version: number;
417
+ args?: Record<string, UiExpression>;
418
+ }
419
+ export type UiWebStep = UiNavigateStep | UiGoBackStep | UiReloadStep | UiCloseTabStep | UiClickStep | UiDoubleClickStep | UiHoverStep | UiTypeStep | UiTypeSecretStep | UiClearStep | UiSelectStep | UiCheckStep | UiPressKeyStep | UiScrollStep | UiWaitForStep | UiExtractStep | UiExtractListStep | UiGetTextStep | UiGetValueStep | UiGetAttributeStep | UiElementExistsStep | UiGetPageTextStep | UiGetPageHtmlStep | UiScreenshotStep | UiLoginStep;
420
+ export type UiDesktopStep = UiFocusWindowStep;
421
+ export type UiFlowStep = UiIfStep | UiForEachStep | UiWhileStep | UiRetryScopeStep | UiSetStep | UiLogStep | UiCallStep;
422
+ export type UiStep = UiWebStep | UiDesktopStep | UiFlowStep;
423
+ export type UiStepAction = UiStep['action'];
424
+ /** Web actions: run on a paired browser, a remote browser or a robot's managed browser. */
425
+ export declare const UI_WEB_ACTIONS: readonly ["navigate", "goBack", "reload", "closeTab", "click", "doubleClick", "hover", "type", "typeSecret", "clear", "select", "check", "pressKey", "scroll", "waitFor", "extract", "extractList", "getText", "getValue", "getAttribute", "elementExists", "getPageText", "getPageHtml", "screenshot", "login"];
426
+ /** Actions that only a desktop desk runs; they arrive from Stewards recordings. */
427
+ export declare const UI_DESKTOP_ACTIONS: readonly ["focusWindow"];
428
+ /** Flow actions inside a sequence. */
429
+ export declare const UI_FLOW_ACTIONS: readonly ["if", "forEach", "while", "retryScope", "set", "log", "call"];
430
+ /** Every v1 action. */
431
+ export declare const UI_STEP_ACTIONS: readonly ["navigate", "goBack", "reload", "closeTab", "click", "doubleClick", "hover", "type", "typeSecret", "clear", "select", "check", "pressKey", "scroll", "waitFor", "extract", "extractList", "getText", "getValue", "getAttribute", "elementExists", "getPageText", "getPageHtml", "screenshot", "login", "focusWindow", "if", "forEach", "while", "retryScope", "set", "log", "call"];
432
+ export declare const UI_VALUE_TYPES: readonly ["text", "number", "boolean", "list", "object", "any"];
433
+ export type UiValueType = (typeof UI_VALUE_TYPES)[number];
434
+ /** A named value the workflow supplies at dispatch. Secrets are never inputs: they are referenced by `typeSecret`. */
435
+ export interface UiScriptInput {
436
+ name: string;
437
+ /** Absent means `any`. */
438
+ type?: UiValueType;
439
+ /** Absent means false. */
440
+ required?: boolean;
441
+ default?: UiExpression;
442
+ description?: string;
443
+ }
444
+ /** A named value the script returns to the workflow, evaluated when the script ends. */
445
+ export interface UiScriptOutput {
446
+ name: string;
447
+ type?: UiValueType;
448
+ value: UiExpression;
449
+ description?: string;
450
+ }
451
+ /** A script-local variable with an optional initial value. */
452
+ export interface UiScriptVariable {
453
+ name: string;
454
+ type?: UiValueType;
455
+ initial?: UiExpression;
456
+ }
457
+ /** The application or page the script works on. */
458
+ export interface UiScriptApplication {
459
+ name?: string;
460
+ /** Pages the script expects, with `*` wildcards (such as `https://portal.example.com/*`). */
461
+ urlPattern?: string;
462
+ }
463
+ /** Script-wide settings. */
464
+ export interface UiScriptSettings {
465
+ /** Wait for the first step on a screen, in ms. Absent means 30000 (spec 05 section 3.3). */
466
+ firstWaitMs?: number;
467
+ /** Wait for later steps, in ms. Absent means 10000. */
468
+ waitMs?: number;
469
+ /** Screenshot policy. Absent means `onFailure`. */
470
+ screenshots?: 'never' | 'onFailure' | 'everyStep';
471
+ /** Absent means `auto`. */
472
+ inputMethod?: 'auto' | 'direct' | 'hardware';
473
+ }
474
+ /** A UI script, version 1. */
475
+ export interface UiScript {
476
+ scriptVersion: 1;
477
+ name?: string;
478
+ application?: UiScriptApplication;
479
+ settings?: UiScriptSettings;
480
+ inputs?: UiScriptInput[];
481
+ outputs?: UiScriptOutput[];
482
+ variables?: UiScriptVariable[];
483
+ /** Library elements the steps refer to, by key. */
484
+ elements?: Record<string, UiScriptElement>;
485
+ steps: UiStep[];
486
+ /** Steps that run when the script ends, after a failure or a cancel too. */
487
+ cleanup?: UiStep[];
488
+ }
489
+ export {};
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Walking a UI script's steps, nested blocks included, with a stable path for
3
+ * each step. A path names a step by its position: `"2"` is the third
4
+ * top-level step, `"2.then.0"` the first step of its `then` block, and
5
+ * `"cleanup.0"` the first clean-up step. The interpreter's step ranges and
6
+ * the step events use the same paths.
7
+ */
8
+ import type { UiExpression, UiScript, UiStep, UiTargetRef } from './types.js';
9
+ /** The nested blocks of a step, by block name. */
10
+ export declare function childBlocks(step: UiStep): Array<[string, UiStep[]]>;
11
+ /** One step with where it sits. */
12
+ export interface WalkedStep {
13
+ step: UiStep;
14
+ path: string;
15
+ /** Flow blocks around the step (0 for a top-level or clean-up step). */
16
+ depth: number;
17
+ }
18
+ /** Every step of a script in document order: the main steps, then the clean-up block. */
19
+ export declare function walkSteps(script: Pick<UiScript, 'steps' | 'cleanup'>): Generator<WalkedStep>;
20
+ /** Total steps in a script, nested blocks and the clean-up block included. */
21
+ export declare function countSteps(script: Pick<UiScript, 'steps' | 'cleanup'>): number;
22
+ /** The step at a path, or undefined. */
23
+ export declare function stepAtPath(script: Pick<UiScript, 'steps' | 'cleanup'>, path: string): UiStep | undefined;
24
+ /** Every target reference a step holds, with the field it sits in (the step's own blocks excluded). */
25
+ export declare function stepTargets(step: UiStep): Array<[string, UiTargetRef]>;
26
+ /** Every expression a step holds, with the field it sits in (the step's own blocks excluded). */
27
+ export declare function stepExpressions(step: UiStep): Array<[string, UiExpression]>;
28
+ /** Calls `visit` on an expression and every expression inside it, with its depth (the root is 1). */
29
+ export declare function visitExpression(expression: UiExpression, visit: (node: UiExpression, depth: number) => void, depth?: number): void;
@@ -0,0 +1,2 @@
1
+ /** `@burdenoff/ui-engine/script`: UI script v1 (schema, parsing, capabilities, adapters, descriptions). */
2
+ export * from './script/index.js';
package/dist/script.js ADDED
@@ -0,0 +1,175 @@
1
+ import {
2
+ UI_EXPRESSION_OPS2,
3
+ UI_ANCHOR_RELATIONS2,
4
+ UI_TARGET_METHOD_KINDS2,
5
+ UI_WEB_ACTIONS2,
6
+ UI_DESKTOP_ACTIONS2,
7
+ UI_FLOW_ACTIONS2,
8
+ UI_STEP_ACTIONS2,
9
+ UI_VALUE_TYPES2,
10
+ UI_SCRIPT_VERSION2,
11
+ MAX_SCRIPT_STEPS2,
12
+ MAX_SCRIPT_BYTES2,
13
+ MAX_FLOW_DEPTH2,
14
+ MAX_EXPRESSION_DEPTH2,
15
+ MAX_EXPRESSION_ITEMS2,
16
+ MAX_OPERATOR_ARGS2,
17
+ MAX_SCRIPT_INPUTS2,
18
+ MAX_SCRIPT_OUTPUTS2,
19
+ MAX_SCRIPT_VARIABLES2,
20
+ MAX_SCRIPT_ELEMENTS2,
21
+ MAX_TARGET_METHODS2,
22
+ MAX_FRAME_DEPTH2,
23
+ MAX_EXTRACT_FIELDS2,
24
+ MAX_LIST_ITEMS2,
25
+ MAX_LIST_PAGES2,
26
+ MAX_LOOP_ITERATIONS2,
27
+ MAX_RETRY_ATTEMPTS2,
28
+ MAX_STEP_TIMEOUT_MS2,
29
+ MAX_DELAY_MS2,
30
+ MAX_KEYS2,
31
+ MAX_SELECT_VALUES2,
32
+ MAX_SELECTOR_LENGTH2,
33
+ MAX_URL_LENGTH2,
34
+ MAX_LABEL_LENGTH2,
35
+ MAX_TEXT_LENGTH2,
36
+ MAX_INTENT_LENGTH2,
37
+ MAX_NAME_LENGTH2,
38
+ LEGACY_MAX_BROWSER_STEPS2,
39
+ LEGACY_MAX_STEPS_BYTES2,
40
+ jsonByteLength2,
41
+ uiScriptRegistry2,
42
+ NAME_PATTERN2,
43
+ STEP_ID_PATTERN2,
44
+ ELEMENT_KEY_PATTERN2,
45
+ uiExpressionSchema2,
46
+ uiTargetMethodSchema2,
47
+ uiTargetSchema2,
48
+ uiTargetRefSchema2,
49
+ uiStepSchema2,
50
+ uiScriptSchema2,
51
+ canonicalJson2,
52
+ childBlocks2,
53
+ walkSteps2,
54
+ countSteps2,
55
+ stepAtPath2,
56
+ stepTargets2,
57
+ stepExpressions2,
58
+ visitExpression2,
59
+ RECORDING_ACTION_OF2,
60
+ uiStepFingerprint2,
61
+ withFingerprint2,
62
+ UiScriptError2,
63
+ UI_EXPRESSION_ARITY2,
64
+ parseUiScript2,
65
+ safeParseUiScript2,
66
+ UI_SCRIPT_SCHEMA_HASH2,
67
+ schemaHashOf2,
68
+ UI_SCRIPT_SCHEMA_TITLE2,
69
+ uiScriptJsonSchema2,
70
+ CAPABILITY_IDS2,
71
+ SCRIPT_CAPABILITY2,
72
+ requiredCapabilities2,
73
+ missingCapabilities2,
74
+ UI_SCRIPT_STEP_KEY_PREFIX2,
75
+ UI_SCRIPT_STEP_MESSAGES2,
76
+ stepMessageKey2,
77
+ describeTarget2,
78
+ describeExpression2,
79
+ describeStep2,
80
+ BROWSER_STEP_ACTIONS2,
81
+ fromBrowserActionSteps2,
82
+ toBrowserActionSteps2,
83
+ targetFromPlaywrightSelector2,
84
+ fromRemoteBrowserSteps2,
85
+ fromRecording2,
86
+ toRecording2
87
+ } from "./index-tqffkt91.js";
88
+ import"./index-c6pmt2rg.js";
89
+ export {
90
+ BROWSER_STEP_ACTIONS2 as BROWSER_STEP_ACTIONS,
91
+ CAPABILITY_IDS2 as CAPABILITY_IDS,
92
+ ELEMENT_KEY_PATTERN2 as ELEMENT_KEY_PATTERN,
93
+ LEGACY_MAX_BROWSER_STEPS2 as LEGACY_MAX_BROWSER_STEPS,
94
+ LEGACY_MAX_STEPS_BYTES2 as LEGACY_MAX_STEPS_BYTES,
95
+ MAX_DELAY_MS2 as MAX_DELAY_MS,
96
+ MAX_EXPRESSION_DEPTH2 as MAX_EXPRESSION_DEPTH,
97
+ MAX_EXPRESSION_ITEMS2 as MAX_EXPRESSION_ITEMS,
98
+ MAX_EXTRACT_FIELDS2 as MAX_EXTRACT_FIELDS,
99
+ MAX_FLOW_DEPTH2 as MAX_FLOW_DEPTH,
100
+ MAX_FRAME_DEPTH2 as MAX_FRAME_DEPTH,
101
+ MAX_INTENT_LENGTH2 as MAX_INTENT_LENGTH,
102
+ MAX_KEYS2 as MAX_KEYS,
103
+ MAX_LABEL_LENGTH2 as MAX_LABEL_LENGTH,
104
+ MAX_LIST_ITEMS2 as MAX_LIST_ITEMS,
105
+ MAX_LIST_PAGES2 as MAX_LIST_PAGES,
106
+ MAX_LOOP_ITERATIONS2 as MAX_LOOP_ITERATIONS,
107
+ MAX_NAME_LENGTH2 as MAX_NAME_LENGTH,
108
+ MAX_OPERATOR_ARGS2 as MAX_OPERATOR_ARGS,
109
+ MAX_RETRY_ATTEMPTS2 as MAX_RETRY_ATTEMPTS,
110
+ MAX_SCRIPT_BYTES2 as MAX_SCRIPT_BYTES,
111
+ MAX_SCRIPT_ELEMENTS2 as MAX_SCRIPT_ELEMENTS,
112
+ MAX_SCRIPT_INPUTS2 as MAX_SCRIPT_INPUTS,
113
+ MAX_SCRIPT_OUTPUTS2 as MAX_SCRIPT_OUTPUTS,
114
+ MAX_SCRIPT_STEPS2 as MAX_SCRIPT_STEPS,
115
+ MAX_SCRIPT_VARIABLES2 as MAX_SCRIPT_VARIABLES,
116
+ MAX_SELECTOR_LENGTH2 as MAX_SELECTOR_LENGTH,
117
+ MAX_SELECT_VALUES2 as MAX_SELECT_VALUES,
118
+ MAX_STEP_TIMEOUT_MS2 as MAX_STEP_TIMEOUT_MS,
119
+ MAX_TARGET_METHODS2 as MAX_TARGET_METHODS,
120
+ MAX_TEXT_LENGTH2 as MAX_TEXT_LENGTH,
121
+ MAX_URL_LENGTH2 as MAX_URL_LENGTH,
122
+ NAME_PATTERN2 as NAME_PATTERN,
123
+ RECORDING_ACTION_OF2 as RECORDING_ACTION_OF,
124
+ SCRIPT_CAPABILITY2 as SCRIPT_CAPABILITY,
125
+ STEP_ID_PATTERN2 as STEP_ID_PATTERN,
126
+ UI_ANCHOR_RELATIONS2 as UI_ANCHOR_RELATIONS,
127
+ UI_DESKTOP_ACTIONS2 as UI_DESKTOP_ACTIONS,
128
+ UI_EXPRESSION_ARITY2 as UI_EXPRESSION_ARITY,
129
+ UI_EXPRESSION_OPS2 as UI_EXPRESSION_OPS,
130
+ UI_FLOW_ACTIONS2 as UI_FLOW_ACTIONS,
131
+ UI_SCRIPT_SCHEMA_HASH2 as UI_SCRIPT_SCHEMA_HASH,
132
+ UI_SCRIPT_SCHEMA_TITLE2 as UI_SCRIPT_SCHEMA_TITLE,
133
+ UI_SCRIPT_STEP_KEY_PREFIX2 as UI_SCRIPT_STEP_KEY_PREFIX,
134
+ UI_SCRIPT_STEP_MESSAGES2 as UI_SCRIPT_STEP_MESSAGES,
135
+ UI_SCRIPT_VERSION2 as UI_SCRIPT_VERSION,
136
+ UI_STEP_ACTIONS2 as UI_STEP_ACTIONS,
137
+ UI_TARGET_METHOD_KINDS2 as UI_TARGET_METHOD_KINDS,
138
+ UI_VALUE_TYPES2 as UI_VALUE_TYPES,
139
+ UI_WEB_ACTIONS2 as UI_WEB_ACTIONS,
140
+ UiScriptError2 as UiScriptError,
141
+ canonicalJson2 as canonicalJson,
142
+ childBlocks2 as childBlocks,
143
+ countSteps2 as countSteps,
144
+ describeExpression2 as describeExpression,
145
+ describeStep2 as describeStep,
146
+ describeTarget2 as describeTarget,
147
+ fromBrowserActionSteps2 as fromBrowserActionSteps,
148
+ fromRecording2 as fromRecording,
149
+ fromRemoteBrowserSteps2 as fromRemoteBrowserSteps,
150
+ jsonByteLength2 as jsonByteLength,
151
+ missingCapabilities2 as missingCapabilities,
152
+ parseUiScript2 as parseUiScript,
153
+ requiredCapabilities2 as requiredCapabilities,
154
+ safeParseUiScript2 as safeParseUiScript,
155
+ schemaHashOf2 as schemaHashOf,
156
+ stepAtPath2 as stepAtPath,
157
+ stepExpressions2 as stepExpressions,
158
+ stepMessageKey2 as stepMessageKey,
159
+ stepTargets2 as stepTargets,
160
+ targetFromPlaywrightSelector2 as targetFromPlaywrightSelector,
161
+ toBrowserActionSteps2 as toBrowserActionSteps,
162
+ toRecording2 as toRecording,
163
+ uiExpressionSchema2 as uiExpressionSchema,
164
+ uiScriptJsonSchema2 as uiScriptJsonSchema,
165
+ uiScriptRegistry2 as uiScriptRegistry,
166
+ uiScriptSchema2 as uiScriptSchema,
167
+ uiStepFingerprint2 as uiStepFingerprint,
168
+ uiStepSchema2 as uiStepSchema,
169
+ uiTargetMethodSchema2 as uiTargetMethodSchema,
170
+ uiTargetRefSchema2 as uiTargetRefSchema,
171
+ uiTargetSchema2 as uiTargetSchema,
172
+ visitExpression2 as visitExpression,
173
+ walkSteps2 as walkSteps,
174
+ withFingerprint2 as withFingerprint
175
+ };