@burdenoff/ui-engine 2026.1204.1 → 2026.1204.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -4
- package/dist/analyze/analyze.d.ts +25 -3
- package/dist/analyze/context.d.ts +25 -9
- package/dist/analyze/index.d.ts +6 -4
- package/dist/analyze/messages.d.ts +5 -0
- package/dist/analyze/rules/ai-step-no-allowlist.d.ts +29 -0
- package/dist/analyze/rules/index.d.ts +1 -0
- package/dist/analyze/rules/run-command-from-variable.d.ts +2 -0
- package/dist/analyze/rules/sequence-too-long.d.ts +4 -0
- package/dist/analyze/rules/single-method-image-target.d.ts +7 -0
- package/dist/analyze/rules/unnamed-step.d.ts +10 -0
- package/dist/analyze/sensitive.d.ts +2 -2
- package/dist/analyze/types.d.ts +33 -4
- package/dist/analyze.js +8 -2
- package/dist/desk.d.ts +13 -0
- package/dist/desk.js +29 -0
- package/dist/dom-runtime.iife.js +1 -1
- package/dist/dom-runtime.js +2 -2
- package/dist/drivers/desk-backend.d.ts +40 -0
- package/dist/drivers/desk-driver.d.ts +41 -0
- package/dist/drivers/desk-errors.d.ts +19 -0
- package/dist/drivers/desk-tree.d.ts +28 -0
- package/dist/drivers/desk-wire.d.ts +237 -0
- package/dist/drivers/index.d.ts +3 -1
- package/dist/drivers.js +10 -7
- package/dist/heal.js +5 -5
- package/dist/index-0ps53dhe.js +85 -0
- package/dist/index-552x2bnm.js +56 -0
- package/dist/index-6m0chbhq.js +64 -0
- package/dist/{index-gvavb597.js → index-93hfbk5c.js} +10 -0
- package/dist/index-a8s39bse.js +920 -0
- package/dist/index-b5a306v7.js +43 -0
- package/dist/index-bx4bsvg0.js +458 -0
- package/dist/{index-9xgz8dxt.js → index-e2pk74e6.js} +4 -4
- package/dist/{index-vnv9tp11.js → index-e7pgqd60.js} +2 -2
- package/dist/index-hdq3y007.js +246 -0
- package/dist/{index-vpm1gnmy.js → index-mv0r8wrh.js} +219 -34
- package/dist/{index-zagmp5ya.js → index-n3nfhjrj.js} +2 -2
- package/dist/{index-wnch00m6.js → index-nmsg2wze.js} +2 -2
- package/dist/{index-zhbwhdya.js → index-q2jbva7c.js} +5 -3
- package/dist/{index-n7ah1jn7.js → index-rbem2yms.js} +16 -243
- package/dist/{index-mhv6a02p.js → index-reef7e8m.js} +1 -1
- package/dist/{index-dwp10g62.js → index-v3nw2n2g.js} +182 -54
- package/dist/{index-3r2y0mnc.js → index-wdbn4xjc.js} +5 -5
- package/dist/{index-ptrmf779.js → index-wk6416m8.js} +3 -3
- package/dist/{index-8eb4xd1j.js → index-x8fc4r4h.js} +101 -426
- package/dist/{index-0tfzfxx9.js → index-yhzykhdj.js} +1 -43
- package/dist/{index-t55wvhvh.js → index-z2v8prer.js} +1 -61
- package/dist/{index-5pv673wd.js → index-zj3zhbac.js} +2 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +83 -31
- package/dist/interpret/driver.d.ts +109 -18
- package/dist/interpret/events.d.ts +5 -2
- package/dist/interpret/index.d.ts +4 -3
- package/dist/interpret/run.d.ts +28 -1
- package/dist/interpret.js +16 -9
- package/dist/script/adapters/recording-desktop.d.ts +52 -0
- package/dist/script/describe.d.ts +7 -2
- package/dist/script/desk-roles.d.ts +33 -0
- package/dist/script/desktop-capabilities.d.ts +7 -2
- package/dist/script/desktop-schema.d.ts +2 -0
- package/dist/script/index.d.ts +3 -1
- package/dist/script.js +35 -19
- package/dist/target/types.d.ts +10 -4
- package/dist/target.js +20 -16
- package/dist/testing.js +5 -3
- package/package.json +7 -3
|
@@ -411,6 +411,7 @@ var MAX_DESK_GET_ATTRIBUTES2 = 32;
|
|
|
411
411
|
var MAX_DESK_FILE_BYTES2 = 10 * 1024 * 1024;
|
|
412
412
|
var DEFAULT_DESK_FILE_BYTES2 = 1024 * 1024;
|
|
413
413
|
var MAX_DESK_PATH_LENGTH2 = 1024;
|
|
414
|
+
var MAX_DESK_SET_VALUE2 = 1e4;
|
|
414
415
|
var desktopUiScriptRegistry2 = z2.registry();
|
|
415
416
|
uiExpressionSchema2.register(desktopUiScriptRegistry2, { id: "UiExpression" });
|
|
416
417
|
var selectorString = z2.string().min(1).max(MAX_DESK_SELECTOR_STRING2);
|
|
@@ -1119,4 +1120,4 @@ function imageProblem(method) {
|
|
|
1119
1120
|
return;
|
|
1120
1121
|
}
|
|
1121
1122
|
|
|
1122
|
-
export { DESKTOP_SCRIPT_SURFACE2, UI_DESKTOP_TARGET_METHOD_KINDS2, UI_DESKTOP_GET_WHAT2, UI_DESKTOP_ONLY_ACTIONS2, uiScriptRegistry2, NAME_PATTERN2, STEP_ID_PATTERN2, ELEMENT_KEY_PATTERN2, uiExpressionSchema2, uiTargetMethodSchema2, uiTargetSchema2, uiTargetRefSchema2, uiStepSchema2, uiScriptSchema2, MAX_DESK_SELECTOR_STRING2, MAX_DESK_SELECTOR_PATH2, MAX_DESK_SELECTOR_INDEX2, MAX_DESK_IMAGE_BYTES2, MAX_DESK_IMAGE_PIXELS2, MAX_DESK_IMAGE_BASE642, MAX_DESK_TEXT_TARGET2, MAX_DESK_TEXT_OCCURRENCE2, MAX_DESK_RECORDED_SCALE2, MAX_DESK_COORDINATE2, MAX_DESK_OPEN_APP_ARGS2, MAX_DESK_GET_ATTRIBUTES2, MAX_DESK_FILE_BYTES2, DEFAULT_DESK_FILE_BYTES2, MAX_DESK_PATH_LENGTH2, desktopUiScriptRegistry2, desktopUiTargetMethodSchema2, desktopUiTargetSchema2, desktopUiTargetRefSchema2, desktopUiStepSchema2, desktopUiScriptSchema2, canonicalJson2, RECORDING_ACTION_OF2, soleRoleMethod, uiStepFingerprint2, desktopStepFingerprint2, withFingerprint2, withDesktopFingerprint2, UiScriptError2, UI_EXPRESSION_ARITY2, parseUiScript2, safeParseUiScript2, parseDesktopUiScript2, safeParseDesktopUiScript2, isWorkspaceRelativePath2, isApplicationName2 };
|
|
1123
|
+
export { DESKTOP_SCRIPT_SURFACE2, UI_DESKTOP_TARGET_METHOD_KINDS2, UI_DESKTOP_GET_WHAT2, UI_DESKTOP_ONLY_ACTIONS2, uiScriptRegistry2, NAME_PATTERN2, STEP_ID_PATTERN2, ELEMENT_KEY_PATTERN2, uiExpressionSchema2, uiTargetMethodSchema2, uiTargetSchema2, uiTargetRefSchema2, uiStepSchema2, uiScriptSchema2, MAX_DESK_SELECTOR_STRING2, MAX_DESK_SELECTOR_PATH2, MAX_DESK_SELECTOR_INDEX2, MAX_DESK_IMAGE_BYTES2, MAX_DESK_IMAGE_PIXELS2, MAX_DESK_IMAGE_BASE642, MAX_DESK_TEXT_TARGET2, MAX_DESK_TEXT_OCCURRENCE2, MAX_DESK_RECORDED_SCALE2, MAX_DESK_COORDINATE2, MAX_DESK_OPEN_APP_ARGS2, MAX_DESK_GET_ATTRIBUTES2, MAX_DESK_FILE_BYTES2, DEFAULT_DESK_FILE_BYTES2, MAX_DESK_PATH_LENGTH2, MAX_DESK_SET_VALUE2, desktopUiScriptRegistry2, desktopUiTargetMethodSchema2, desktopUiTargetSchema2, desktopUiTargetRefSchema2, desktopUiStepSchema2, desktopUiScriptSchema2, canonicalJson2, RECORDING_ACTION_OF2, soleRoleMethod, uiStepFingerprint2, desktopStepFingerprint2, withFingerprint2, withDesktopFingerprint2, UiScriptError2, UI_EXPRESSION_ARITY2, parseUiScript2, safeParseUiScript2, parseDesktopUiScript2, safeParseDesktopUiScript2, isWorkspaceRelativePath2, isApplicationName2 };
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -61,6 +61,7 @@ import {
|
|
|
61
61
|
MAX_DESK_FILE_BYTES2,
|
|
62
62
|
DEFAULT_DESK_FILE_BYTES2,
|
|
63
63
|
MAX_DESK_PATH_LENGTH2,
|
|
64
|
+
MAX_DESK_SET_VALUE2,
|
|
64
65
|
desktopUiScriptRegistry2,
|
|
65
66
|
desktopUiTargetMethodSchema2,
|
|
66
67
|
desktopUiTargetSchema2,
|
|
@@ -81,28 +82,12 @@ import {
|
|
|
81
82
|
safeParseDesktopUiScript2,
|
|
82
83
|
isWorkspaceRelativePath2,
|
|
83
84
|
isApplicationName2
|
|
84
|
-
} from "./index-
|
|
85
|
+
} from "./index-zj3zhbac.js";
|
|
85
86
|
import {
|
|
86
|
-
UI_SCRIPT_SCHEMA_HASH2,
|
|
87
|
-
DESKTOP_SCRIPT_SCHEMA_HASH2,
|
|
88
|
-
schemaHashOf2,
|
|
89
87
|
UI_SCRIPT_SCHEMA_TITLE2,
|
|
90
88
|
uiScriptJsonSchema2,
|
|
91
89
|
UI_DESKTOP_SCRIPT_SCHEMA_TITLE2,
|
|
92
90
|
desktopUiScriptJsonSchema2,
|
|
93
|
-
DESKTOP_DESK_CONTRACT_VERSION2,
|
|
94
|
-
DESK_ACTION_NAMES2,
|
|
95
|
-
DESK_TARGET_KIND_NAMES2,
|
|
96
|
-
DESK_SELECTOR_PLATFORM_NAMES2,
|
|
97
|
-
DESK_SHELL_ACTIONS2,
|
|
98
|
-
COMMAND_INTERPRETER_APPS2,
|
|
99
|
-
isCommandInterpreterApp2,
|
|
100
|
-
deskFeaturesOfMethod2,
|
|
101
|
-
deskHasFeature2,
|
|
102
|
-
desktopScriptDeskNeeds2,
|
|
103
|
-
desktopShellSteps2,
|
|
104
|
-
checkDesktopScriptShell2,
|
|
105
|
-
checkDesktopScriptForDesk2,
|
|
106
91
|
BROWSER_STEP_ACTIONS2,
|
|
107
92
|
fromBrowserActionSteps2,
|
|
108
93
|
toBrowserActionSteps2,
|
|
@@ -110,6 +95,9 @@ import {
|
|
|
110
95
|
fromRemoteBrowserSteps2,
|
|
111
96
|
fromRecording2,
|
|
112
97
|
toRecording2,
|
|
98
|
+
selectorMethodOfRecordedTarget2,
|
|
99
|
+
desktopTargetOfRecordedTarget2,
|
|
100
|
+
fromRecordingForDesk2,
|
|
113
101
|
COMPUTER_USE_ACTIONS2,
|
|
114
102
|
MAX_COMPUTER_USE_ACTIONS2,
|
|
115
103
|
COMPUTER_USE_MAX_WAIT_MS2,
|
|
@@ -118,7 +106,7 @@ import {
|
|
|
118
106
|
COMPUTER_USE_SKIP_REASONS2,
|
|
119
107
|
targetFromUiFingerprint2,
|
|
120
108
|
scriptFromComputerUseActions2
|
|
121
|
-
} from "./index-
|
|
109
|
+
} from "./index-x8fc4r4h.js";
|
|
122
110
|
import {
|
|
123
111
|
UI_HEAL_MODES2,
|
|
124
112
|
UI_HEAL_MODE_RANK2,
|
|
@@ -136,7 +124,20 @@ import {
|
|
|
136
124
|
matchesUrlPattern2,
|
|
137
125
|
HEAL_POSITION_TOLERANCE_PX2,
|
|
138
126
|
verifyHealCandidate2
|
|
139
|
-
} from "./index-
|
|
127
|
+
} from "./index-wk6416m8.js";
|
|
128
|
+
import {
|
|
129
|
+
engineCodeOfDeskError2,
|
|
130
|
+
engineDetailOfDeskError2,
|
|
131
|
+
deskNodeInState2,
|
|
132
|
+
matchDeskTreeMethod2,
|
|
133
|
+
isDeskWireTreeSnapshot2,
|
|
134
|
+
DESK_FIND_MAX2,
|
|
135
|
+
DESK_FIND_ALL_MAX2,
|
|
136
|
+
DEFAULT_DESK_SNAPSHOT_NODES2,
|
|
137
|
+
deskTargetOfMethod2,
|
|
138
|
+
createDeskDriver2,
|
|
139
|
+
deskBackendFromAct2
|
|
140
|
+
} from "./index-a8s39bse.js";
|
|
140
141
|
import {
|
|
141
142
|
MAX_CALL_DEPTH2,
|
|
142
143
|
COMPILED_NAME_PREFIX2,
|
|
@@ -144,7 +145,7 @@ import {
|
|
|
144
145
|
stripBreakpoints2,
|
|
145
146
|
inlineCalls2,
|
|
146
147
|
compileUiScript2
|
|
147
|
-
} from "./index-
|
|
148
|
+
} from "./index-nmsg2wze.js";
|
|
148
149
|
import {
|
|
149
150
|
MAX_HEAL_QUESTION_NODES2,
|
|
150
151
|
MAX_HEAL_NODE_NAME2,
|
|
@@ -153,7 +154,7 @@ import {
|
|
|
153
154
|
targetFromSnapshotNode2,
|
|
154
155
|
MAX_HEAL_ANSWER_LENGTH2,
|
|
155
156
|
parseHealAnswer2
|
|
156
|
-
} from "./index-
|
|
157
|
+
} from "./index-e2pk74e6.js";
|
|
157
158
|
import {
|
|
158
159
|
MAX_VALUE_TEXT2,
|
|
159
160
|
MAX_VALUE_ITEMS2,
|
|
@@ -175,8 +176,10 @@ import {
|
|
|
175
176
|
MAX_EVENTS_LIMIT2,
|
|
176
177
|
MAX_PAGE_TEXT2,
|
|
177
178
|
DEFAULT_LIST_ITEMS2,
|
|
178
|
-
runUiScript2
|
|
179
|
-
|
|
179
|
+
runUiScript2,
|
|
180
|
+
DEFAULT_COMMAND_TIMEOUT_MS2,
|
|
181
|
+
runDesktopUiScript2
|
|
182
|
+
} from "./index-mv0r8wrh.js";
|
|
180
183
|
import {
|
|
181
184
|
MAX_HEAL_KEYWORDS2,
|
|
182
185
|
MAX_HEAL_KEYWORD_LENGTH2,
|
|
@@ -198,13 +201,20 @@ import {
|
|
|
198
201
|
MAX_POPUP_HANDLER_STEPS2,
|
|
199
202
|
MAX_POPUP_URL_PATTERN2,
|
|
200
203
|
POPUP_HANDLER_STEP_WAIT_MS2,
|
|
204
|
+
UI_ANALYZER_SEQUENCE_LIMIT2,
|
|
201
205
|
UI_ANALYZER_RULES2,
|
|
202
206
|
UI_PROBLEM_SEVERITIES2,
|
|
203
207
|
UI_ANALYZER_RULE_GROUPS2,
|
|
204
208
|
UI_ANALYZER_RULE_IDS2,
|
|
205
209
|
UI_ANALYZER_DEFAULT_SEVERITY2,
|
|
206
|
-
analyzeUiScript2
|
|
207
|
-
|
|
210
|
+
analyzeUiScript2,
|
|
211
|
+
analyzeDesktopUiScript2,
|
|
212
|
+
analyzeAiStep2
|
|
213
|
+
} from "./index-v3nw2n2g.js";
|
|
214
|
+
import {
|
|
215
|
+
realClock2,
|
|
216
|
+
createVirtualClock2
|
|
217
|
+
} from "./index-b5a306v7.js";
|
|
208
218
|
import {
|
|
209
219
|
UI_ERROR_FAMILIES2,
|
|
210
220
|
UI_ERROR_CODES2,
|
|
@@ -213,10 +223,8 @@ import {
|
|
|
213
223
|
errorFamilyOf2,
|
|
214
224
|
isRetryableInScript2,
|
|
215
225
|
UiRunError2,
|
|
216
|
-
UiDriverError2
|
|
217
|
-
|
|
218
|
-
createVirtualClock2
|
|
219
|
-
} from "./index-0tfzfxx9.js";
|
|
226
|
+
UiDriverError2
|
|
227
|
+
} from "./index-yhzykhdj.js";
|
|
220
228
|
import {
|
|
221
229
|
UI_SCRIPT_STEP_KEY_PREFIX2,
|
|
222
230
|
UI_SCRIPT_STEP_MESSAGES2,
|
|
@@ -224,7 +232,29 @@ import {
|
|
|
224
232
|
describeTarget2,
|
|
225
233
|
describeExpression2,
|
|
226
234
|
describeStep2
|
|
227
|
-
} from "./index-
|
|
235
|
+
} from "./index-93hfbk5c.js";
|
|
236
|
+
import {
|
|
237
|
+
platformRole2,
|
|
238
|
+
rolesMatch2
|
|
239
|
+
} from "./index-0ps53dhe.js";
|
|
240
|
+
import {
|
|
241
|
+
UI_SCRIPT_SCHEMA_HASH2,
|
|
242
|
+
DESKTOP_SCRIPT_SCHEMA_HASH2,
|
|
243
|
+
schemaHashOf2,
|
|
244
|
+
DESKTOP_DESK_CONTRACT_VERSION2,
|
|
245
|
+
DESK_ACTION_NAMES2,
|
|
246
|
+
DESK_TARGET_KIND_NAMES2,
|
|
247
|
+
DESK_SELECTOR_PLATFORM_NAMES2,
|
|
248
|
+
DESK_SHELL_ACTIONS2,
|
|
249
|
+
COMMAND_INTERPRETER_APPS2,
|
|
250
|
+
isCommandInterpreterApp2,
|
|
251
|
+
deskFeaturesOfMethod2,
|
|
252
|
+
deskHasFeature2,
|
|
253
|
+
desktopScriptDeskNeeds2,
|
|
254
|
+
desktopShellSteps2,
|
|
255
|
+
checkDesktopScriptShell2,
|
|
256
|
+
checkDesktopScriptForDesk2
|
|
257
|
+
} from "./index-bx4bsvg0.js";
|
|
228
258
|
import {
|
|
229
259
|
CAPABILITY_IDS2,
|
|
230
260
|
SCRIPT_CAPABILITY2,
|
|
@@ -292,7 +322,7 @@ import {
|
|
|
292
322
|
MASKED_MARKER2,
|
|
293
323
|
MAX_MASKED_PATHS2,
|
|
294
324
|
maskSnapshot2
|
|
295
|
-
} from "./index-
|
|
325
|
+
} from "./index-q2jbva7c.js";
|
|
296
326
|
import {
|
|
297
327
|
REDACTED2,
|
|
298
328
|
redactCredentials2
|
|
@@ -307,7 +337,9 @@ export {
|
|
|
307
337
|
COMPUTER_USE_MAX_WAIT_MS2 as COMPUTER_USE_MAX_WAIT_MS,
|
|
308
338
|
COMPUTER_USE_SKIP_REASONS2 as COMPUTER_USE_SKIP_REASONS,
|
|
309
339
|
CONSEQUENCE_KEYWORDS2 as CONSEQUENCE_KEYWORDS,
|
|
340
|
+
DEFAULT_COMMAND_TIMEOUT_MS2 as DEFAULT_COMMAND_TIMEOUT_MS,
|
|
310
341
|
DEFAULT_DESK_FILE_BYTES2 as DEFAULT_DESK_FILE_BYTES,
|
|
342
|
+
DEFAULT_DESK_SNAPSHOT_NODES2 as DEFAULT_DESK_SNAPSHOT_NODES,
|
|
311
343
|
DEFAULT_FIRST_WAIT_MS2 as DEFAULT_FIRST_WAIT_MS,
|
|
312
344
|
DEFAULT_LIST_ITEMS2 as DEFAULT_LIST_ITEMS,
|
|
313
345
|
DEFAULT_LOGIN_SECRET_REFS2 as DEFAULT_LOGIN_SECRET_REFS,
|
|
@@ -319,6 +351,8 @@ export {
|
|
|
319
351
|
DESKTOP_SCRIPT_SCHEMA_HASH2 as DESKTOP_SCRIPT_SCHEMA_HASH,
|
|
320
352
|
DESKTOP_SCRIPT_SURFACE2 as DESKTOP_SCRIPT_SURFACE,
|
|
321
353
|
DESK_ACTION_NAMES2 as DESK_ACTION_NAMES,
|
|
354
|
+
DESK_FIND_ALL_MAX2 as DESK_FIND_ALL_MAX,
|
|
355
|
+
DESK_FIND_MAX2 as DESK_FIND_MAX,
|
|
322
356
|
DESK_SELECTOR_PLATFORM_NAMES2 as DESK_SELECTOR_PLATFORM_NAMES,
|
|
323
357
|
DESK_SHELL_ACTIONS2 as DESK_SHELL_ACTIONS,
|
|
324
358
|
DESK_TARGET_KIND_NAMES2 as DESK_TARGET_KIND_NAMES,
|
|
@@ -345,6 +379,7 @@ export {
|
|
|
345
379
|
MAX_DESK_SELECTOR_INDEX2 as MAX_DESK_SELECTOR_INDEX,
|
|
346
380
|
MAX_DESK_SELECTOR_PATH2 as MAX_DESK_SELECTOR_PATH,
|
|
347
381
|
MAX_DESK_SELECTOR_STRING2 as MAX_DESK_SELECTOR_STRING,
|
|
382
|
+
MAX_DESK_SET_VALUE2 as MAX_DESK_SET_VALUE,
|
|
348
383
|
MAX_DESK_TEXT_OCCURRENCE2 as MAX_DESK_TEXT_OCCURRENCE,
|
|
349
384
|
MAX_DESK_TEXT_TARGET2 as MAX_DESK_TEXT_TARGET,
|
|
350
385
|
MAX_EVENTS_LIMIT2 as MAX_EVENTS_LIMIT,
|
|
@@ -408,6 +443,7 @@ export {
|
|
|
408
443
|
UI_ANALYZER_RULES2 as UI_ANALYZER_RULES,
|
|
409
444
|
UI_ANALYZER_RULE_GROUPS2 as UI_ANALYZER_RULE_GROUPS,
|
|
410
445
|
UI_ANALYZER_RULE_IDS2 as UI_ANALYZER_RULE_IDS,
|
|
446
|
+
UI_ANALYZER_SEQUENCE_LIMIT2 as UI_ANALYZER_SEQUENCE_LIMIT,
|
|
411
447
|
UI_ANCHOR_RELATIONS2 as UI_ANCHOR_RELATIONS,
|
|
412
448
|
UI_CONSEQUENCES2 as UI_CONSEQUENCES,
|
|
413
449
|
UI_DESKTOP_ACTIONS2 as UI_DESKTOP_ACTIONS,
|
|
@@ -443,6 +479,8 @@ export {
|
|
|
443
479
|
UiScriptError2 as UiScriptError,
|
|
444
480
|
VALUE_ACTIONS2 as VALUE_ACTIONS,
|
|
445
481
|
afterReplayCall2 as afterReplayCall,
|
|
482
|
+
analyzeAiStep2 as analyzeAiStep,
|
|
483
|
+
analyzeDesktopUiScript2 as analyzeDesktopUiScript,
|
|
446
484
|
analyzeUiPopupHandler2 as analyzeUiPopupHandler,
|
|
447
485
|
analyzeUiScript2 as analyzeUiScript,
|
|
448
486
|
applyPins2 as applyPins,
|
|
@@ -457,16 +495,21 @@ export {
|
|
|
457
495
|
compatibleRoles2 as compatibleRoles,
|
|
458
496
|
compileUiScript2 as compileUiScript,
|
|
459
497
|
countSteps2 as countSteps,
|
|
498
|
+
createDeskDriver2 as createDeskDriver,
|
|
460
499
|
createVirtualClock2 as createVirtualClock,
|
|
461
500
|
decideHeal2 as decideHeal,
|
|
462
501
|
describeExpression2 as describeExpression,
|
|
463
502
|
describeStep2 as describeStep,
|
|
464
503
|
describeTarget2 as describeTarget,
|
|
504
|
+
deskBackendFromAct2 as deskBackendFromAct,
|
|
465
505
|
deskFeaturesOfMethod2 as deskFeaturesOfMethod,
|
|
466
506
|
deskHasFeature2 as deskHasFeature,
|
|
507
|
+
deskNodeInState2 as deskNodeInState,
|
|
508
|
+
deskTargetOfMethod2 as deskTargetOfMethod,
|
|
467
509
|
desktopScriptDeskNeeds2 as desktopScriptDeskNeeds,
|
|
468
510
|
desktopShellSteps2 as desktopShellSteps,
|
|
469
511
|
desktopStepFingerprint2 as desktopStepFingerprint,
|
|
512
|
+
desktopTargetOfRecordedTarget2 as desktopTargetOfRecordedTarget,
|
|
470
513
|
desktopUiScriptJsonSchema2 as desktopUiScriptJsonSchema,
|
|
471
514
|
desktopUiScriptRegistry2 as desktopUiScriptRegistry,
|
|
472
515
|
desktopUiScriptSchema2 as desktopUiScriptSchema,
|
|
@@ -475,16 +518,20 @@ export {
|
|
|
475
518
|
desktopUiTargetRefSchema2 as desktopUiTargetRefSchema,
|
|
476
519
|
desktopUiTargetSchema2 as desktopUiTargetSchema,
|
|
477
520
|
elementInfoFromTarget2 as elementInfoFromTarget,
|
|
521
|
+
engineCodeOfDeskError2 as engineCodeOfDeskError,
|
|
522
|
+
engineDetailOfDeskError2 as engineDetailOfDeskError,
|
|
478
523
|
errorFamilyOf2 as errorFamilyOf,
|
|
479
524
|
evaluateExpression2 as evaluateExpression,
|
|
480
525
|
finishFallback2 as finishFallback,
|
|
481
526
|
fromBrowserActionSteps2 as fromBrowserActionSteps,
|
|
482
527
|
fromRecording2 as fromRecording,
|
|
528
|
+
fromRecordingForDesk2 as fromRecordingForDesk,
|
|
483
529
|
fromRemoteBrowserSteps2 as fromRemoteBrowserSteps,
|
|
484
530
|
indexSnapshot2 as indexSnapshot,
|
|
485
531
|
inlineCalls2 as inlineCalls,
|
|
486
532
|
isApplicationName2 as isApplicationName,
|
|
487
533
|
isCommandInterpreterApp2 as isCommandInterpreterApp,
|
|
534
|
+
isDeskWireTreeSnapshot2 as isDeskWireTreeSnapshot,
|
|
488
535
|
isRetryableInScript2 as isRetryableInScript,
|
|
489
536
|
isSavedStepAuthor2 as isSavedStepAuthor,
|
|
490
537
|
isSnapshotPath2 as isSnapshotPath,
|
|
@@ -495,6 +542,7 @@ export {
|
|
|
495
542
|
markFallbackAsked2 as markFallbackAsked,
|
|
496
543
|
maskSnapshot2 as maskSnapshot,
|
|
497
544
|
maskUrl2 as maskUrl,
|
|
545
|
+
matchDeskTreeMethod2 as matchDeskTreeMethod,
|
|
498
546
|
matchesUrlPattern2 as matchesUrlPattern,
|
|
499
547
|
missingCapabilities2 as missingCapabilities,
|
|
500
548
|
parseDesktopUiScript2 as parseDesktopUiScript,
|
|
@@ -504,6 +552,7 @@ export {
|
|
|
504
552
|
parseUiPopupHandler2 as parseUiPopupHandler,
|
|
505
553
|
parseUiScript2 as parseUiScript,
|
|
506
554
|
planReplay2 as planReplay,
|
|
555
|
+
platformRole2 as platformRole,
|
|
507
556
|
popupHandlerScript2 as popupHandlerScript,
|
|
508
557
|
problemMessage2 as problemMessage,
|
|
509
558
|
problemMessageKey2 as problemMessageKey,
|
|
@@ -519,11 +568,14 @@ export {
|
|
|
519
568
|
replayStateFrom2 as replayStateFrom,
|
|
520
569
|
requiredCapabilities2 as requiredCapabilities,
|
|
521
570
|
resolveTarget2 as resolveTarget,
|
|
571
|
+
rolesMatch2 as rolesMatch,
|
|
572
|
+
runDesktopUiScript2 as runDesktopUiScript,
|
|
522
573
|
runUiScript2 as runUiScript,
|
|
523
574
|
safeParseDesktopUiScript2 as safeParseDesktopUiScript,
|
|
524
575
|
safeParseUiScript2 as safeParseUiScript,
|
|
525
576
|
schemaHashOf2 as schemaHashOf,
|
|
526
577
|
scriptFromComputerUseActions2 as scriptFromComputerUseActions,
|
|
578
|
+
selectorMethodOfRecordedTarget2 as selectorMethodOfRecordedTarget,
|
|
527
579
|
sha256Hex2 as sha256Hex,
|
|
528
580
|
snapshotNodeAt2 as snapshotNodeAt,
|
|
529
581
|
stepAtPath2 as stepAtPath,
|
|
@@ -17,6 +17,8 @@
|
|
|
17
17
|
*/
|
|
18
18
|
import type { DomAction, DomActionProblem } from '../dom-runtime/actions.js';
|
|
19
19
|
import type { DomResolution } from '../dom-runtime/runtime.js';
|
|
20
|
+
import type { DeskCapabilitiesLike } from '../script/desktop-capabilities.js';
|
|
21
|
+
import type { DesktopUiGetWhat, DesktopUiStepAction, DesktopUiTarget } from '../script/desktop-types.js';
|
|
20
22
|
import type { UiStepAction, UiTarget } from '../script/types.js';
|
|
21
23
|
import type { UiTreeSnapshot } from '../target/snapshot.js';
|
|
22
24
|
import type { WebElementState, WebTargetErrorCode } from '../target/types.js';
|
|
@@ -25,11 +27,21 @@ export interface UiStepContext {
|
|
|
25
27
|
/** The step path (`"2"`, `"2.then.0"`, `"cleanup.0"`). */
|
|
26
28
|
path: string;
|
|
27
29
|
stepId: string;
|
|
28
|
-
action
|
|
30
|
+
/** A web action, or a desktop action in a desktop run. */
|
|
31
|
+
action: UiStepAction | DesktopUiStepAction;
|
|
29
32
|
/** 1 for the first attempt of the step, then 2, 3 for its retries. */
|
|
30
33
|
attempt: number;
|
|
31
34
|
/** Aborted when the run is cancelled; a driver that can stop a call early listens to it. */
|
|
32
35
|
signal?: AbortSignal;
|
|
36
|
+
/**
|
|
37
|
+
* Desktop runs only: the step's input method (the step's own, else the
|
|
38
|
+
* script's, else `auto`). A desk driver acts through the control's pattern
|
|
39
|
+
* for `direct`, with real input for `hardware`, and prefers the pattern for
|
|
40
|
+
* `auto` (document 05 section 4).
|
|
41
|
+
*/
|
|
42
|
+
inputMethod?: 'auto' | 'direct' | 'hardware';
|
|
43
|
+
/** Desktop runs only: the step's own timeout, so a desk driver can bound one action. */
|
|
44
|
+
timeoutMs?: number;
|
|
33
45
|
}
|
|
34
46
|
/** Time as the interpreter sees it. A snapshot or test driver passes a virtual clock so waits take no real time. */
|
|
35
47
|
export interface UiClock {
|
|
@@ -79,9 +91,9 @@ export type UiDriverListResult<T> = {
|
|
|
79
91
|
resolution?: DomResolution;
|
|
80
92
|
} | UiDriverFailure;
|
|
81
93
|
/** One field of a list row: its target is searched inside each item. */
|
|
82
|
-
export interface UiListField {
|
|
94
|
+
export interface UiListField<T extends DesktopUiTarget = UiTarget> {
|
|
83
95
|
name: string;
|
|
84
|
-
target:
|
|
96
|
+
target: T;
|
|
85
97
|
read: UiReadKind;
|
|
86
98
|
/** Read every match inside the item as a list. */
|
|
87
99
|
all: boolean;
|
|
@@ -89,13 +101,18 @@ export interface UiListField {
|
|
|
89
101
|
/** A row of an extracted list: field name to value. */
|
|
90
102
|
export type UiListRow = Record<string, UiReadValue | UiReadValue[]>;
|
|
91
103
|
/** The targets of a `login` step; absent targets use the desk's defaults. */
|
|
92
|
-
export interface UiLoginTargets {
|
|
93
|
-
username?:
|
|
94
|
-
password?:
|
|
95
|
-
submit?:
|
|
96
|
-
success?:
|
|
104
|
+
export interface UiLoginTargets<T extends DesktopUiTarget = UiTarget> {
|
|
105
|
+
username?: T;
|
|
106
|
+
password?: T;
|
|
107
|
+
submit?: T;
|
|
108
|
+
success?: T;
|
|
97
109
|
}
|
|
98
|
-
|
|
110
|
+
/**
|
|
111
|
+
* A desk the interpreter runs on. `T` is the target type it resolves: web
|
|
112
|
+
* targets for a web desk (the default), desktop targets for a desk driver
|
|
113
|
+
* (`UiDeskDriver`, `runDesktopUiScript`).
|
|
114
|
+
*/
|
|
115
|
+
export interface UiDriver<T extends DesktopUiTarget = UiTarget> {
|
|
99
116
|
/** The capability ids this desk supports (`CAPABILITY_IDS` of the script module). */
|
|
100
117
|
readonly capabilities: readonly string[];
|
|
101
118
|
/** Absent means real time. */
|
|
@@ -111,21 +128,21 @@ export interface UiDriver {
|
|
|
111
128
|
*/
|
|
112
129
|
readonly replay?: boolean;
|
|
113
130
|
/** Resolve a target once, in the given state. */
|
|
114
|
-
resolve(target:
|
|
131
|
+
resolve(target: T, options: {
|
|
115
132
|
state: WebElementState;
|
|
116
133
|
}, context: UiStepContext): Promise<DomResolution>;
|
|
117
134
|
/** Act on the one element a target resolves to, or on the focused element when `target` is null. */
|
|
118
|
-
act(target:
|
|
135
|
+
act(target: T | null, action: DomAction, options: {
|
|
119
136
|
state?: WebElementState;
|
|
120
137
|
}, context: UiStepContext): Promise<UiDriverResult>;
|
|
121
138
|
/** Read from the one element a target resolves to (it must be visible). */
|
|
122
|
-
read(target:
|
|
139
|
+
read(target: T, read: UiReadKind, context: UiStepContext): Promise<UiDriverResult>;
|
|
123
140
|
/** Read from every visible element the first matching method finds, in document order. */
|
|
124
|
-
readAll(target:
|
|
141
|
+
readAll(target: T, read: UiReadKind, context: UiStepContext): Promise<UiDriverListResult<UiReadValue>>;
|
|
125
142
|
/** Read up to `maxItems` rows: every element `item` matches, with each field searched inside it. */
|
|
126
|
-
listItems(item:
|
|
143
|
+
listItems(item: T, fields: readonly UiListField<T>[], maxItems: number, context: UiStepContext): Promise<UiDriverListResult<UiListRow>>;
|
|
127
144
|
/** Press keys together (one key, or modifiers and a key) on a target, or on the focused element when null. */
|
|
128
|
-
pressKeys(target:
|
|
145
|
+
pressKeys(target: T | null, keys: readonly string[], context: UiStepContext): Promise<UiDriverResult>;
|
|
129
146
|
navigate(url: string, options: {
|
|
130
147
|
waitUntil: 'load' | 'domcontentloaded' | 'networkidle' | 'commit';
|
|
131
148
|
timeoutMs: number;
|
|
@@ -147,17 +164,17 @@ export interface UiDriver {
|
|
|
147
164
|
to?: 'top' | 'bottom';
|
|
148
165
|
}, context: UiStepContext): Promise<void>;
|
|
149
166
|
/** Type a secret the desk redeems itself; the value never reaches the interpreter. */
|
|
150
|
-
typeSecret?(target:
|
|
167
|
+
typeSecret?(target: T, secret: {
|
|
151
168
|
secretRef: string;
|
|
152
169
|
expectedOrigin?: string;
|
|
153
170
|
}, context: UiStepContext): Promise<UiDriverResult>;
|
|
154
171
|
/** Sign in through the node's Browser Login connection (remote browsers). Throws `LOGIN_FAILED`. */
|
|
155
|
-
login?(targets: UiLoginTargets
|
|
172
|
+
login?(targets: UiLoginTargets<T>, options: {
|
|
156
173
|
timeoutMs: number;
|
|
157
174
|
}, context: UiStepContext): Promise<void>;
|
|
158
175
|
/** Take a screenshot; returns a reference the host can store (a Files id), or null. */
|
|
159
176
|
screenshot?(options: {
|
|
160
|
-
target?:
|
|
177
|
+
target?: T;
|
|
161
178
|
fullPage?: boolean;
|
|
162
179
|
}, context: UiStepContext): Promise<string | null>;
|
|
163
180
|
/**
|
|
@@ -174,6 +191,80 @@ export interface UiDriver {
|
|
|
174
191
|
*/
|
|
175
192
|
frameOrigin?(frame: readonly string[] | undefined, context: UiStepContext): Promise<string | null>;
|
|
176
193
|
}
|
|
194
|
+
/** A value a desk `get` returns: text, a flag, a number, bounds or named attributes. */
|
|
195
|
+
export type UiDeskReadValue = UiReadValue | number | {
|
|
196
|
+
[name: string]: string | number;
|
|
197
|
+
};
|
|
198
|
+
/** The result of a control-pattern action or a `get` on a desk. */
|
|
199
|
+
export type UiDeskDriverResult = {
|
|
200
|
+
ok: true;
|
|
201
|
+
value?: UiDeskReadValue;
|
|
202
|
+
resolution?: DomResolution;
|
|
203
|
+
} | UiDriverFailure;
|
|
204
|
+
/** What a desktop step does to the one element its target resolves to (desk contract v3 section 5). */
|
|
205
|
+
export type UiDeskPatternAction = {
|
|
206
|
+
kind: 'invoke';
|
|
207
|
+
} | {
|
|
208
|
+
kind: 'setValue';
|
|
209
|
+
value: string;
|
|
210
|
+
} | {
|
|
211
|
+
kind: 'toggle';
|
|
212
|
+
state?: 'on' | 'off';
|
|
213
|
+
} | {
|
|
214
|
+
kind: 'expand';
|
|
215
|
+
state?: 'expanded' | 'collapsed';
|
|
216
|
+
} | {
|
|
217
|
+
kind: 'get';
|
|
218
|
+
what: DesktopUiGetWhat;
|
|
219
|
+
attributes?: readonly string[];
|
|
220
|
+
};
|
|
221
|
+
/** An open window, as a desktop step reports it. Screen text: untrusted. */
|
|
222
|
+
export interface UiDeskWindow {
|
|
223
|
+
app: string;
|
|
224
|
+
title: string;
|
|
225
|
+
processName?: string;
|
|
226
|
+
state: 'normal' | 'minimized' | 'maximized';
|
|
227
|
+
focused: boolean;
|
|
228
|
+
bounds: {
|
|
229
|
+
x: number;
|
|
230
|
+
y: number;
|
|
231
|
+
w: number;
|
|
232
|
+
h: number;
|
|
233
|
+
};
|
|
234
|
+
}
|
|
235
|
+
/**
|
|
236
|
+
* A desk driver: a desk that runs desktop scripts (RPA plan package P2-03b).
|
|
237
|
+
* It resolves desktop targets, and runs the desktop actions the interpreter
|
|
238
|
+
* hands it one at a time. Like every driver it makes one attempt per call;
|
|
239
|
+
* the interpreter waits and retries.
|
|
240
|
+
*/
|
|
241
|
+
export interface UiDeskDriver extends UiDriver<DesktopUiTarget> {
|
|
242
|
+
/** Marks a desk driver. */
|
|
243
|
+
readonly desk: true;
|
|
244
|
+
/** The desk's capabilities, for the run's preflight check (`checkDesktopScriptForDesk`). */
|
|
245
|
+
deskCapabilities(): DeskCapabilitiesLike;
|
|
246
|
+
/** Does the page or screen show this text now (Wait for text, the textPresent check). */
|
|
247
|
+
containsText(text: string, context: UiStepContext): Promise<boolean>;
|
|
248
|
+
focusWindow(app: string, title: string | undefined, context: UiStepContext): Promise<void>;
|
|
249
|
+
openApp(app: string, options: {
|
|
250
|
+
args?: readonly string[];
|
|
251
|
+
waitForTitle?: string;
|
|
252
|
+
}, context: UiStepContext): Promise<UiDeskWindow[]>;
|
|
253
|
+
closeApp(app: string, title: string | undefined, context: UiStepContext): Promise<void>;
|
|
254
|
+
windowState(app: string, title: string | undefined, state: UiDeskWindow['state'], context: UiStepContext): Promise<UiDeskWindow[]>;
|
|
255
|
+
listWindows(app: string | undefined, context: UiStepContext): Promise<UiDeskWindow[]>;
|
|
256
|
+
/** A control-pattern action or a read on the one element a target resolves to. */
|
|
257
|
+
pattern(target: DesktopUiTarget, action: UiDeskPatternAction, context: UiStepContext): Promise<UiDeskDriverResult>;
|
|
258
|
+
/** Run a command in the workspace folder (or a folder inside it); returns its output. */
|
|
259
|
+
runCommand(command: string, options: {
|
|
260
|
+
cwd?: string;
|
|
261
|
+
timeoutMs: number;
|
|
262
|
+
}, context: UiStepContext): Promise<string>;
|
|
263
|
+
/** Read a file inside the workspace folder as text. */
|
|
264
|
+
readFile(path: string, maxBytes: number, context: UiStepContext): Promise<string>;
|
|
265
|
+
/** Write text to a file inside the workspace folder. */
|
|
266
|
+
writeFile(path: string, content: string, context: UiStepContext): Promise<void>;
|
|
267
|
+
}
|
|
177
268
|
/** Real time. */
|
|
178
269
|
export declare const realClock: UiClock;
|
|
179
270
|
/**
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* LOG summary with `detail.truncated: true`, drops the rest, and still emits
|
|
11
11
|
* the final FINISHED event (the service keeps FINISHED past its own cap).
|
|
12
12
|
*/
|
|
13
|
+
import type { DesktopUiStepAction } from '../script/desktop-types.js';
|
|
13
14
|
import type { UiStepAction } from '../script/types.js';
|
|
14
15
|
import type { UiErrorCode } from './errors.js';
|
|
15
16
|
/** The event kinds (contract `UiTaskEventKind`). */
|
|
@@ -28,7 +29,8 @@ export interface UiRunEvent {
|
|
|
28
29
|
kind: UiRunEventKind;
|
|
29
30
|
stepPath?: string;
|
|
30
31
|
stepId?: string;
|
|
31
|
-
action
|
|
32
|
+
/** A web action, or a desktop action in a desktop run. */
|
|
33
|
+
action?: UiStepAction | DesktopUiStepAction;
|
|
32
34
|
/** The target method kind that found the element. */
|
|
33
35
|
resolvedBy?: string;
|
|
34
36
|
durationMs?: number;
|
|
@@ -45,7 +47,8 @@ export type UiRunEventDraft = Omit<UiRunEvent, 'seq' | 'at'>;
|
|
|
45
47
|
export interface UiStepLogEntry {
|
|
46
48
|
path: string;
|
|
47
49
|
stepId: string;
|
|
48
|
-
action
|
|
50
|
+
/** A web action, or a desktop action in a desktop run. */
|
|
51
|
+
action: UiStepAction | DesktopUiStepAction;
|
|
49
52
|
status: 'passed' | 'failed' | 'skipped';
|
|
50
53
|
/** The target method kind that found the element. */
|
|
51
54
|
method?: string;
|
|
@@ -3,11 +3,12 @@
|
|
|
3
3
|
* `errors.ts` holds every run-time error code with its node error family,
|
|
4
4
|
* `expr.ts` the expression evaluator, `driver.ts` the desk driver interface,
|
|
5
5
|
* `compile.ts` the compiler a worker runs before it parks a node, `run.ts` the
|
|
6
|
-
* interpreter and `
|
|
6
|
+
* interpreter (`runUiScript`, and `runDesktopUiScript` for desktop scripts on a
|
|
7
|
+
* desk driver, plan P2-03b) and `events.ts` the step events and step log.
|
|
7
8
|
*/
|
|
8
9
|
export { UI_ERROR_CODES, UI_ERROR_CODE_LIST, UI_ERROR_FAMILIES, type UiErrorCode, type UiErrorCodeInfo, type UiErrorDetail, type UiErrorFamily, UiDriverError, UiRunError, errorFamilyOf, isRetryableInScript, isUiErrorCode, } from './errors.js';
|
|
9
10
|
export { type ExpressionScope, MAX_VALUE_ITEMS, MAX_VALUE_TEXT, type UiValue, evaluateExpression, readPath, toNumber, toText, toUiValue, truthy, valuesEqual, } from './expr.js';
|
|
10
|
-
export { type UiClock, type UiDriver, type UiDriverFailure, type UiDriverListResult, type UiDriverResult, type UiListField, type UiListRow, type UiLoginTargets, type UiReadKind, type UiReadValue, type UiStepContext, createVirtualClock, realClock, } from './driver.js';
|
|
11
|
+
export { type UiClock, type UiDeskDriver, type UiDeskDriverResult, type UiDeskPatternAction, type UiDeskReadValue, type UiDeskWindow, type UiDriver, type UiDriverFailure, type UiDriverListResult, type UiDriverResult, type UiListField, type UiListRow, type UiLoginTargets, type UiReadKind, type UiReadValue, type UiStepContext, createVirtualClock, realClock, } from './driver.js';
|
|
11
12
|
export { DEFAULT_MAX_EVENTS, MAX_EVENT_MESSAGE, MAX_STEP_LOG_ENTRIES, UI_RUN_EVENT_KINDS, type UiRunEvent, type UiRunEventKind, type UiStepLogEntry, } from './events.js';
|
|
12
13
|
export { COMPILED_NAME_PREFIX, type CompileUiScriptOptions, type CompiledUiScript, type InlinedCall, MAX_CALL_DEPTH, type ResolvedUiElement, type ResolvedUiSequence, applyPins, compileUiScript, inlineCalls, stripBreakpoints, } from './compile.js';
|
|
13
|
-
export { DEFAULT_FIRST_WAIT_MS, DEFAULT_LIST_ITEMS, DEFAULT_POLL_INTERVAL_MS, DEFAULT_RETRY_DELAY_MS, DEFAULT_WAIT_MS, MAX_EVENTS_LIMIT, MAX_PAGE_TEXT, type RunUiScriptOptions, type UiRunFailure, type UiRunResult, type UiTaskCommand, runUiScript, } from './run.js';
|
|
14
|
+
export { DEFAULT_FIRST_WAIT_MS, DEFAULT_LIST_ITEMS, DEFAULT_POLL_INTERVAL_MS, DEFAULT_RETRY_DELAY_MS, DEFAULT_WAIT_MS, MAX_EVENTS_LIMIT, MAX_PAGE_TEXT, DEFAULT_COMMAND_TIMEOUT_MS, type RunDesktopUiScriptOptions, type RunUiScriptOptions, type UiRunFailure, type UiRunResult, type UiTaskCommand, runDesktopUiScript, runUiScript, } from './run.js';
|
package/dist/interpret/run.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type UiPopupHandler } from '../heal/popup.js';
|
|
2
2
|
import { type UiHealHook, type UiHealReport, type UiHealSettings } from '../heal/types.js';
|
|
3
3
|
import type { UiTarget } from '../script/types.js';
|
|
4
|
-
import { type UiDriver } from './driver.js';
|
|
4
|
+
import { type UiDeskDriver, type UiDriver } from './driver.js';
|
|
5
5
|
import { type UiErrorCode, type UiErrorFamily } from './errors.js';
|
|
6
6
|
import { type UiRunEvent, type UiStepLogEntry } from './events.js';
|
|
7
7
|
import { type UiValue } from './expr.js';
|
|
@@ -108,3 +108,30 @@ export interface UiRunResult {
|
|
|
108
108
|
}
|
|
109
109
|
/** Run a UI script on a desk. Never throws for a script problem: the result carries it. */
|
|
110
110
|
export declare function runUiScript(script: unknown, driver: UiDriver, options?: RunUiScriptOptions): Promise<UiRunResult>;
|
|
111
|
+
/** The default timeout of a Run command step without its own. */
|
|
112
|
+
export declare const DEFAULT_COMMAND_TIMEOUT_MS = 60000;
|
|
113
|
+
/**
|
|
114
|
+
* Options of a desktop run. Repairs (pop-up handlers, healing and target
|
|
115
|
+
* overrides) are web only: a desktop run never uses them.
|
|
116
|
+
*/
|
|
117
|
+
export interface RunDesktopUiScriptOptions extends Omit<RunUiScriptOptions, 'onTargetNotFound' | 'healing' | 'popupHandlers' | 'targetOverrides'> {
|
|
118
|
+
/**
|
|
119
|
+
* The pool's or the automation grant's `allowShell` (the `run` request's
|
|
120
|
+
* `allowShell`). False refuses a script with Run command or file-write
|
|
121
|
+
* steps with `SHELL_NOT_ALLOWED`; absent leaves it to the desk's own
|
|
122
|
+
* `allowShell` (document 26 DR5b).
|
|
123
|
+
*/
|
|
124
|
+
allowShell?: boolean;
|
|
125
|
+
/** The schema hash the `run` request carries. Absent means `DESKTOP_SCRIPT_SCHEMA_HASH`. */
|
|
126
|
+
schemaHash?: string;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Run a desktop UI script on a desk driver (RPA plan package P2-03b; desk
|
|
130
|
+
* contract v3 section 7): the same waits, retries, verification, flow steps,
|
|
131
|
+
* clean-up, step ranges and events as a web run. Before any step it parses
|
|
132
|
+
* the script (`parseDesktopUiScript`, compiled: elements carry targets) and
|
|
133
|
+
* checks it against the desk's capabilities (`checkDesktopScriptForDesk`):
|
|
134
|
+
* `INVALID_SCRIPT`, `UNSUPPORTED_ON_DESK`, `SHELL_NOT_ALLOWED`. Never throws
|
|
135
|
+
* for a script problem: the result carries it.
|
|
136
|
+
*/
|
|
137
|
+
export declare function runDesktopUiScript(script: unknown, driver: UiDeskDriver, options?: RunDesktopUiScriptOptions): Promise<UiRunResult>;
|
package/dist/interpret.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import"./index-dcs2pe49.js";
|
|
2
|
-
import"./index-
|
|
3
|
-
import"./index-
|
|
2
|
+
import"./index-zj3zhbac.js";
|
|
3
|
+
import"./index-wk6416m8.js";
|
|
4
4
|
import {
|
|
5
5
|
MAX_CALL_DEPTH2,
|
|
6
6
|
COMPILED_NAME_PREFIX2,
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
stripBreakpoints2,
|
|
9
9
|
inlineCalls2,
|
|
10
10
|
compileUiScript2
|
|
11
|
-
} from "./index-
|
|
11
|
+
} from "./index-nmsg2wze.js";
|
|
12
12
|
import {
|
|
13
13
|
MAX_VALUE_TEXT2,
|
|
14
14
|
MAX_VALUE_ITEMS2,
|
|
@@ -30,8 +30,14 @@ import {
|
|
|
30
30
|
MAX_EVENTS_LIMIT2,
|
|
31
31
|
MAX_PAGE_TEXT2,
|
|
32
32
|
DEFAULT_LIST_ITEMS2,
|
|
33
|
-
runUiScript2
|
|
34
|
-
|
|
33
|
+
runUiScript2,
|
|
34
|
+
DEFAULT_COMMAND_TIMEOUT_MS2,
|
|
35
|
+
runDesktopUiScript2
|
|
36
|
+
} from "./index-mv0r8wrh.js";
|
|
37
|
+
import {
|
|
38
|
+
realClock2,
|
|
39
|
+
createVirtualClock2
|
|
40
|
+
} from "./index-b5a306v7.js";
|
|
35
41
|
import {
|
|
36
42
|
UI_ERROR_FAMILIES2,
|
|
37
43
|
UI_ERROR_CODES2,
|
|
@@ -40,12 +46,12 @@ import {
|
|
|
40
46
|
errorFamilyOf2,
|
|
41
47
|
isRetryableInScript2,
|
|
42
48
|
UiRunError2,
|
|
43
|
-
UiDriverError2
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
} from "./index-0tfzfxx9.js";
|
|
49
|
+
UiDriverError2
|
|
50
|
+
} from "./index-yhzykhdj.js";
|
|
51
|
+
import"./index-bx4bsvg0.js";
|
|
47
52
|
export {
|
|
48
53
|
COMPILED_NAME_PREFIX2 as COMPILED_NAME_PREFIX,
|
|
54
|
+
DEFAULT_COMMAND_TIMEOUT_MS2 as DEFAULT_COMMAND_TIMEOUT_MS,
|
|
49
55
|
DEFAULT_FIRST_WAIT_MS2 as DEFAULT_FIRST_WAIT_MS,
|
|
50
56
|
DEFAULT_LIST_ITEMS2 as DEFAULT_LIST_ITEMS,
|
|
51
57
|
DEFAULT_MAX_EVENTS2 as DEFAULT_MAX_EVENTS,
|
|
@@ -75,6 +81,7 @@ export {
|
|
|
75
81
|
isUiErrorCode2 as isUiErrorCode,
|
|
76
82
|
readPath2 as readPath,
|
|
77
83
|
realClock2 as realClock,
|
|
84
|
+
runDesktopUiScript2 as runDesktopUiScript,
|
|
78
85
|
runUiScript2 as runUiScript,
|
|
79
86
|
stripBreakpoints2 as stripBreakpoints,
|
|
80
87
|
toNumber2 as toNumber,
|