@burdenoff/ui-engine 2026.1202.2 → 2026.1204.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.
Files changed (42) hide show
  1. package/README.md +2 -0
  2. package/dist/analyze.js +1 -1
  3. package/dist/dom-runtime.iife.js +1 -1
  4. package/dist/dom-runtime.js +1 -1
  5. package/dist/drivers.js +9 -9
  6. package/dist/heal.js +4 -4
  7. package/dist/{index-yc0jgph6.js → index-0tfzfxx9.js} +5 -0
  8. package/dist/{index-8w31tpfq.js → index-3r2y0mnc.js} +4 -4
  9. package/dist/index-5pv673wd.js +1122 -0
  10. package/dist/{index-pfdm8evf.js → index-8eb4xd1j.js} +433 -2
  11. package/dist/{index-6h7ah1dw.js → index-9xgz8dxt.js} +1 -1
  12. package/dist/{index-g7724awk.js → index-axph39g0.js} +22 -0
  13. package/dist/{index-xdtanv9b.js → index-dwp10g62.js} +1 -1
  14. package/dist/{index-qg9yfr7r.js → index-n7ah1jn7.js} +144 -3
  15. package/dist/{index-qm9nd548.js → index-ptrmf779.js} +3 -3
  16. package/dist/{index-3hsp44k5.js → index-vpm1gnmy.js} +6 -6
  17. package/dist/{index-rs3yzt5q.js → index-wnch00m6.js} +4 -4
  18. package/dist/{index-70vm0qz8.js → index-zagmp5ya.js} +1 -1
  19. package/dist/{index-hw5npwsv.js → index-zpxk3fzd.js} +1 -1
  20. package/dist/index.js +105 -11
  21. package/dist/interpret/errors.d.ts +7 -1
  22. package/dist/interpret.js +5 -5
  23. package/dist/script/desktop-capabilities.d.ts +120 -0
  24. package/dist/script/desktop-schema.d.ts +279 -0
  25. package/dist/script/desktop-types.d.ts +265 -0
  26. package/dist/script/fingerprint.d.ts +10 -1
  27. package/dist/script/hash.d.ts +9 -0
  28. package/dist/script/index.d.ts +12 -4
  29. package/dist/script/json-schema.d.ts +8 -0
  30. package/dist/script/parse.d.ts +29 -0
  31. package/dist/script/schema.d.ts +2098 -1
  32. package/dist/script/walk.d.ts +18 -4
  33. package/dist/script.js +99 -5
  34. package/dist/target/container.d.ts +47 -0
  35. package/dist/target/index.d.ts +1 -0
  36. package/dist/target/methods.d.ts +2 -0
  37. package/dist/target/types.d.ts +18 -1
  38. package/dist/target.js +19 -1
  39. package/dist/testing.js +2 -2
  40. package/package.json +4 -2
  41. package/schema/ui-script-desktop-v1.schema.json +12181 -0
  42. package/dist/index-68x61c7a.js +0 -743
@@ -3,7 +3,7 @@ import {
3
3
  uiStepSchema2,
4
4
  UiScriptError2,
5
5
  parseUiScript2
6
- } from "./index-68x61c7a.js";
6
+ } from "./index-5pv673wd.js";
7
7
  import {
8
8
  HEALABLE_ACTIONS2,
9
9
  compatibleRoles2,
@@ -12,10 +12,10 @@ import {
12
12
  MAX_POPUP_HANDLER_STEPS2,
13
13
  MAX_POPUP_URL_PATTERN2,
14
14
  analyzeUiScript2
15
- } from "./index-xdtanv9b.js";
15
+ } from "./index-dwp10g62.js";
16
16
  import {
17
17
  stepTargets2
18
- } from "./index-g7724awk.js";
18
+ } from "./index-axph39g0.js";
19
19
  import {
20
20
  attributeOf2,
21
21
  isSnapshotEditingHost2,
@@ -2,7 +2,7 @@ import {
2
2
  uiTargetSchema2,
3
3
  UiScriptError2,
4
4
  parseUiScript2
5
- } from "./index-68x61c7a.js";
5
+ } from "./index-5pv673wd.js";
6
6
  import {
7
7
  UI_CONSEQUENCES2,
8
8
  parseHealMode2,
@@ -10,7 +10,7 @@ import {
10
10
  usablePopupHandlers2,
11
11
  matchesUrlPattern2,
12
12
  verifyHealCandidate2
13
- } from "./index-qm9nd548.js";
13
+ } from "./index-ptrmf779.js";
14
14
  import {
15
15
  isActingStep,
16
16
  classifyConsequence2,
@@ -18,25 +18,25 @@ import {
18
18
  HEALABLE_ACTIONS2,
19
19
  MAX_POPUP_HANDLERS_PER_STEP2,
20
20
  POPUP_HANDLER_STEP_WAIT_MS2
21
- } from "./index-xdtanv9b.js";
21
+ } from "./index-dwp10g62.js";
22
22
  import {
23
23
  isUiErrorCode2,
24
24
  isRetryableInScript2,
25
25
  UiRunError2,
26
26
  UiDriverError2,
27
27
  realClock2
28
- } from "./index-yc0jgph6.js";
28
+ } from "./index-0tfzfxx9.js";
29
29
  import {
30
30
  describeTarget2,
31
31
  describeStep2
32
32
  } from "./index-gvavb597.js";
33
33
  import {
34
34
  missingCapabilities2
35
- } from "./index-hw5npwsv.js";
35
+ } from "./index-zpxk3fzd.js";
36
36
  import {
37
37
  walkSteps2,
38
38
  stepTargets2
39
- } from "./index-g7724awk.js";
39
+ } from "./index-axph39g0.js";
40
40
  import {
41
41
  isSnapshotPath2,
42
42
  indexSnapshot2,
@@ -9,17 +9,17 @@ import {
9
9
  withFingerprint2,
10
10
  UiScriptError2,
11
11
  parseUiScript2
12
- } from "./index-68x61c7a.js";
12
+ } from "./index-5pv673wd.js";
13
13
  import {
14
14
  UiRunError2
15
- } from "./index-yc0jgph6.js";
15
+ } from "./index-0tfzfxx9.js";
16
16
  import {
17
17
  requiredCapabilities2,
18
18
  missingCapabilities2
19
- } from "./index-hw5npwsv.js";
19
+ } from "./index-zpxk3fzd.js";
20
20
  import {
21
21
  walkSteps2
22
- } from "./index-g7724awk.js";
22
+ } from "./index-axph39g0.js";
23
23
  // src/interpret/compile.ts
24
24
  var MAX_CALL_DEPTH2 = 4;
25
25
  var COMPILED_NAME_PREFIX2 = "__c";
@@ -6,7 +6,7 @@ import {
6
6
  import {
7
7
  resolveWebTarget2,
8
8
  serializeTreeSnapshot2
9
- } from "./index-qg9yfr7r.js";
9
+ } from "./index-n7ah1jn7.js";
10
10
 
11
11
  // src/dom-runtime/runtime.ts
12
12
  var DOM_RUNTIME_VERSION2 = 1;
@@ -3,7 +3,7 @@ import {
3
3
  UI_STEP_ACTIONS2,
4
4
  walkSteps2,
5
5
  stepTargets2
6
- } from "./index-g7724awk.js";
6
+ } from "./index-axph39g0.js";
7
7
 
8
8
  // src/script/capabilities.ts
9
9
  var CAPABILITY_IDS2 = [
package/dist/index.js CHANGED
@@ -32,6 +32,10 @@ import {
32
32
  replayReasons2
33
33
  } from "./index-eg57f5cf.js";
34
34
  import {
35
+ DESKTOP_SCRIPT_SURFACE2,
36
+ UI_DESKTOP_TARGET_METHOD_KINDS2,
37
+ UI_DESKTOP_GET_WHAT2,
38
+ UI_DESKTOP_ONLY_ACTIONS2,
35
39
  uiScriptRegistry2,
36
40
  NAME_PATTERN2,
37
41
  STEP_ID_PATTERN2,
@@ -42,20 +46,63 @@ import {
42
46
  uiTargetRefSchema2,
43
47
  uiStepSchema2,
44
48
  uiScriptSchema2,
49
+ MAX_DESK_SELECTOR_STRING2,
50
+ MAX_DESK_SELECTOR_PATH2,
51
+ MAX_DESK_SELECTOR_INDEX2,
52
+ MAX_DESK_IMAGE_BYTES2,
53
+ MAX_DESK_IMAGE_PIXELS2,
54
+ MAX_DESK_IMAGE_BASE642,
55
+ MAX_DESK_TEXT_TARGET2,
56
+ MAX_DESK_TEXT_OCCURRENCE2,
57
+ MAX_DESK_RECORDED_SCALE2,
58
+ MAX_DESK_COORDINATE2,
59
+ MAX_DESK_OPEN_APP_ARGS2,
60
+ MAX_DESK_GET_ATTRIBUTES2,
61
+ MAX_DESK_FILE_BYTES2,
62
+ DEFAULT_DESK_FILE_BYTES2,
63
+ MAX_DESK_PATH_LENGTH2,
64
+ desktopUiScriptRegistry2,
65
+ desktopUiTargetMethodSchema2,
66
+ desktopUiTargetSchema2,
67
+ desktopUiTargetRefSchema2,
68
+ desktopUiStepSchema2,
69
+ desktopUiScriptSchema2,
45
70
  canonicalJson2,
46
71
  RECORDING_ACTION_OF2,
47
72
  uiStepFingerprint2,
73
+ desktopStepFingerprint2,
48
74
  withFingerprint2,
75
+ withDesktopFingerprint2,
49
76
  UiScriptError2,
50
77
  UI_EXPRESSION_ARITY2,
51
78
  parseUiScript2,
52
- safeParseUiScript2
53
- } from "./index-68x61c7a.js";
79
+ safeParseUiScript2,
80
+ parseDesktopUiScript2,
81
+ safeParseDesktopUiScript2,
82
+ isWorkspaceRelativePath2,
83
+ isApplicationName2
84
+ } from "./index-5pv673wd.js";
54
85
  import {
55
86
  UI_SCRIPT_SCHEMA_HASH2,
87
+ DESKTOP_SCRIPT_SCHEMA_HASH2,
56
88
  schemaHashOf2,
57
89
  UI_SCRIPT_SCHEMA_TITLE2,
58
90
  uiScriptJsonSchema2,
91
+ UI_DESKTOP_SCRIPT_SCHEMA_TITLE2,
92
+ 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,
59
106
  BROWSER_STEP_ACTIONS2,
60
107
  fromBrowserActionSteps2,
61
108
  toBrowserActionSteps2,
@@ -71,7 +118,7 @@ import {
71
118
  COMPUTER_USE_SKIP_REASONS2,
72
119
  targetFromUiFingerprint2,
73
120
  scriptFromComputerUseActions2
74
- } from "./index-pfdm8evf.js";
121
+ } from "./index-8eb4xd1j.js";
75
122
  import {
76
123
  UI_HEAL_MODES2,
77
124
  UI_HEAL_MODE_RANK2,
@@ -89,7 +136,7 @@ import {
89
136
  matchesUrlPattern2,
90
137
  HEAL_POSITION_TOLERANCE_PX2,
91
138
  verifyHealCandidate2
92
- } from "./index-qm9nd548.js";
139
+ } from "./index-ptrmf779.js";
93
140
  import {
94
141
  MAX_CALL_DEPTH2,
95
142
  COMPILED_NAME_PREFIX2,
@@ -97,7 +144,7 @@ import {
97
144
  stripBreakpoints2,
98
145
  inlineCalls2,
99
146
  compileUiScript2
100
- } from "./index-rs3yzt5q.js";
147
+ } from "./index-wnch00m6.js";
101
148
  import {
102
149
  MAX_HEAL_QUESTION_NODES2,
103
150
  MAX_HEAL_NODE_NAME2,
@@ -106,7 +153,7 @@ import {
106
153
  targetFromSnapshotNode2,
107
154
  MAX_HEAL_ANSWER_LENGTH2,
108
155
  parseHealAnswer2
109
- } from "./index-6h7ah1dw.js";
156
+ } from "./index-9xgz8dxt.js";
110
157
  import {
111
158
  MAX_VALUE_TEXT2,
112
159
  MAX_VALUE_ITEMS2,
@@ -129,7 +176,7 @@ import {
129
176
  MAX_PAGE_TEXT2,
130
177
  DEFAULT_LIST_ITEMS2,
131
178
  runUiScript2
132
- } from "./index-3hsp44k5.js";
179
+ } from "./index-vpm1gnmy.js";
133
180
  import {
134
181
  MAX_HEAL_KEYWORDS2,
135
182
  MAX_HEAL_KEYWORD_LENGTH2,
@@ -157,7 +204,7 @@ import {
157
204
  UI_ANALYZER_RULE_IDS2,
158
205
  UI_ANALYZER_DEFAULT_SEVERITY2,
159
206
  analyzeUiScript2
160
- } from "./index-xdtanv9b.js";
207
+ } from "./index-dwp10g62.js";
161
208
  import {
162
209
  UI_ERROR_FAMILIES2,
163
210
  UI_ERROR_CODES2,
@@ -169,7 +216,7 @@ import {
169
216
  UiDriverError2,
170
217
  realClock2,
171
218
  createVirtualClock2
172
- } from "./index-yc0jgph6.js";
219
+ } from "./index-0tfzfxx9.js";
173
220
  import {
174
221
  UI_SCRIPT_STEP_KEY_PREFIX2,
175
222
  UI_SCRIPT_STEP_MESSAGES2,
@@ -183,7 +230,7 @@ import {
183
230
  SCRIPT_CAPABILITY2,
184
231
  requiredCapabilities2,
185
232
  missingCapabilities2
186
- } from "./index-hw5npwsv.js";
233
+ } from "./index-zpxk3fzd.js";
187
234
  import {
188
235
  UI_SCRIPT_VERSION2,
189
236
  MAX_SCRIPT_STEPS2,
@@ -234,7 +281,7 @@ import {
234
281
  stepTargets2,
235
282
  stepExpressions2,
236
283
  visitExpression2
237
- } from "./index-g7724awk.js";
284
+ } from "./index-axph39g0.js";
238
285
  import {
239
286
  SNAPSHOT_ROOT_PATH2,
240
287
  MAX_SNAPSHOT_PATH_LENGTH2,
@@ -253,12 +300,14 @@ import {
253
300
  export {
254
301
  BROWSER_STEP_ACTIONS2 as BROWSER_STEP_ACTIONS,
255
302
  CAPABILITY_IDS2 as CAPABILITY_IDS,
303
+ COMMAND_INTERPRETER_APPS2 as COMMAND_INTERPRETER_APPS,
256
304
  COMPILED_NAME_PREFIX2 as COMPILED_NAME_PREFIX,
257
305
  COMPUTER_USE_ACTIONS2 as COMPUTER_USE_ACTIONS,
258
306
  COMPUTER_USE_DEFAULT_WAIT_MS2 as COMPUTER_USE_DEFAULT_WAIT_MS,
259
307
  COMPUTER_USE_MAX_WAIT_MS2 as COMPUTER_USE_MAX_WAIT_MS,
260
308
  COMPUTER_USE_SKIP_REASONS2 as COMPUTER_USE_SKIP_REASONS,
261
309
  CONSEQUENCE_KEYWORDS2 as CONSEQUENCE_KEYWORDS,
310
+ DEFAULT_DESK_FILE_BYTES2 as DEFAULT_DESK_FILE_BYTES,
262
311
  DEFAULT_FIRST_WAIT_MS2 as DEFAULT_FIRST_WAIT_MS,
263
312
  DEFAULT_LIST_ITEMS2 as DEFAULT_LIST_ITEMS,
264
313
  DEFAULT_LOGIN_SECRET_REFS2 as DEFAULT_LOGIN_SECRET_REFS,
@@ -266,6 +315,13 @@ export {
266
315
  DEFAULT_POLL_INTERVAL_MS2 as DEFAULT_POLL_INTERVAL_MS,
267
316
  DEFAULT_RETRY_DELAY_MS2 as DEFAULT_RETRY_DELAY_MS,
268
317
  DEFAULT_WAIT_MS2 as DEFAULT_WAIT_MS,
318
+ DESKTOP_DESK_CONTRACT_VERSION2 as DESKTOP_DESK_CONTRACT_VERSION,
319
+ DESKTOP_SCRIPT_SCHEMA_HASH2 as DESKTOP_SCRIPT_SCHEMA_HASH,
320
+ DESKTOP_SCRIPT_SURFACE2 as DESKTOP_SCRIPT_SURFACE,
321
+ DESK_ACTION_NAMES2 as DESK_ACTION_NAMES,
322
+ DESK_SELECTOR_PLATFORM_NAMES2 as DESK_SELECTOR_PLATFORM_NAMES,
323
+ DESK_SHELL_ACTIONS2 as DESK_SHELL_ACTIONS,
324
+ DESK_TARGET_KIND_NAMES2 as DESK_TARGET_KIND_NAMES,
269
325
  ELEMENT_KEY_PATTERN2 as ELEMENT_KEY_PATTERN,
270
326
  HEALABLE_ACTIONS2 as HEALABLE_ACTIONS,
271
327
  HEAL_POSITION_TOLERANCE_PX2 as HEAL_POSITION_TOLERANCE_PX,
@@ -277,6 +333,20 @@ export {
277
333
  MAX_CALL_DEPTH2 as MAX_CALL_DEPTH,
278
334
  MAX_COMPUTER_USE_ACTIONS2 as MAX_COMPUTER_USE_ACTIONS,
279
335
  MAX_DELAY_MS2 as MAX_DELAY_MS,
336
+ MAX_DESK_COORDINATE2 as MAX_DESK_COORDINATE,
337
+ MAX_DESK_FILE_BYTES2 as MAX_DESK_FILE_BYTES,
338
+ MAX_DESK_GET_ATTRIBUTES2 as MAX_DESK_GET_ATTRIBUTES,
339
+ MAX_DESK_IMAGE_BASE642 as MAX_DESK_IMAGE_BASE64,
340
+ MAX_DESK_IMAGE_BYTES2 as MAX_DESK_IMAGE_BYTES,
341
+ MAX_DESK_IMAGE_PIXELS2 as MAX_DESK_IMAGE_PIXELS,
342
+ MAX_DESK_OPEN_APP_ARGS2 as MAX_DESK_OPEN_APP_ARGS,
343
+ MAX_DESK_PATH_LENGTH2 as MAX_DESK_PATH_LENGTH,
344
+ MAX_DESK_RECORDED_SCALE2 as MAX_DESK_RECORDED_SCALE,
345
+ MAX_DESK_SELECTOR_INDEX2 as MAX_DESK_SELECTOR_INDEX,
346
+ MAX_DESK_SELECTOR_PATH2 as MAX_DESK_SELECTOR_PATH,
347
+ MAX_DESK_SELECTOR_STRING2 as MAX_DESK_SELECTOR_STRING,
348
+ MAX_DESK_TEXT_OCCURRENCE2 as MAX_DESK_TEXT_OCCURRENCE,
349
+ MAX_DESK_TEXT_TARGET2 as MAX_DESK_TEXT_TARGET,
280
350
  MAX_EVENTS_LIMIT2 as MAX_EVENTS_LIMIT,
281
351
  MAX_EVENT_MESSAGE2 as MAX_EVENT_MESSAGE,
282
352
  MAX_EXPRESSION_DEPTH2 as MAX_EXPRESSION_DEPTH,
@@ -341,6 +411,10 @@ export {
341
411
  UI_ANCHOR_RELATIONS2 as UI_ANCHOR_RELATIONS,
342
412
  UI_CONSEQUENCES2 as UI_CONSEQUENCES,
343
413
  UI_DESKTOP_ACTIONS2 as UI_DESKTOP_ACTIONS,
414
+ UI_DESKTOP_GET_WHAT2 as UI_DESKTOP_GET_WHAT,
415
+ UI_DESKTOP_ONLY_ACTIONS2 as UI_DESKTOP_ONLY_ACTIONS,
416
+ UI_DESKTOP_SCRIPT_SCHEMA_TITLE2 as UI_DESKTOP_SCRIPT_SCHEMA_TITLE,
417
+ UI_DESKTOP_TARGET_METHOD_KINDS2 as UI_DESKTOP_TARGET_METHOD_KINDS,
344
418
  UI_ERROR_CODES2 as UI_ERROR_CODES,
345
419
  UI_ERROR_CODE_LIST2 as UI_ERROR_CODE_LIST,
346
420
  UI_ERROR_FAMILIES2 as UI_ERROR_FAMILIES,
@@ -376,6 +450,8 @@ export {
376
450
  canonicalJson2 as canonicalJson,
377
451
  capHealMode2 as capHealMode,
378
452
  captureRecording2 as captureRecording,
453
+ checkDesktopScriptForDesk2 as checkDesktopScriptForDesk,
454
+ checkDesktopScriptShell2 as checkDesktopScriptShell,
379
455
  childBlocks2 as childBlocks,
380
456
  classifyConsequence2 as classifyConsequence,
381
457
  compatibleRoles2 as compatibleRoles,
@@ -386,6 +462,18 @@ export {
386
462
  describeExpression2 as describeExpression,
387
463
  describeStep2 as describeStep,
388
464
  describeTarget2 as describeTarget,
465
+ deskFeaturesOfMethod2 as deskFeaturesOfMethod,
466
+ deskHasFeature2 as deskHasFeature,
467
+ desktopScriptDeskNeeds2 as desktopScriptDeskNeeds,
468
+ desktopShellSteps2 as desktopShellSteps,
469
+ desktopStepFingerprint2 as desktopStepFingerprint,
470
+ desktopUiScriptJsonSchema2 as desktopUiScriptJsonSchema,
471
+ desktopUiScriptRegistry2 as desktopUiScriptRegistry,
472
+ desktopUiScriptSchema2 as desktopUiScriptSchema,
473
+ desktopUiStepSchema2 as desktopUiStepSchema,
474
+ desktopUiTargetMethodSchema2 as desktopUiTargetMethodSchema,
475
+ desktopUiTargetRefSchema2 as desktopUiTargetRefSchema,
476
+ desktopUiTargetSchema2 as desktopUiTargetSchema,
389
477
  elementInfoFromTarget2 as elementInfoFromTarget,
390
478
  errorFamilyOf2 as errorFamilyOf,
391
479
  evaluateExpression2 as evaluateExpression,
@@ -395,10 +483,13 @@ export {
395
483
  fromRemoteBrowserSteps2 as fromRemoteBrowserSteps,
396
484
  indexSnapshot2 as indexSnapshot,
397
485
  inlineCalls2 as inlineCalls,
486
+ isApplicationName2 as isApplicationName,
487
+ isCommandInterpreterApp2 as isCommandInterpreterApp,
398
488
  isRetryableInScript2 as isRetryableInScript,
399
489
  isSavedStepAuthor2 as isSavedStepAuthor,
400
490
  isSnapshotPath2 as isSnapshotPath,
401
491
  isUiErrorCode2 as isUiErrorCode,
492
+ isWorkspaceRelativePath2 as isWorkspaceRelativePath,
402
493
  jsonByteLength2 as jsonByteLength,
403
494
  keywordWords2 as keywordWords,
404
495
  markFallbackAsked2 as markFallbackAsked,
@@ -406,6 +497,7 @@ export {
406
497
  maskUrl2 as maskUrl,
407
498
  matchesUrlPattern2 as matchesUrlPattern,
408
499
  missingCapabilities2 as missingCapabilities,
500
+ parseDesktopUiScript2 as parseDesktopUiScript,
409
501
  parseHealAnswer2 as parseHealAnswer,
410
502
  parseHealMode2 as parseHealMode,
411
503
  parseRecording2 as parseRecording,
@@ -428,6 +520,7 @@ export {
428
520
  requiredCapabilities2 as requiredCapabilities,
429
521
  resolveTarget2 as resolveTarget,
430
522
  runUiScript2 as runUiScript,
523
+ safeParseDesktopUiScript2 as safeParseDesktopUiScript,
431
524
  safeParseUiScript2 as safeParseUiScript,
432
525
  schemaHashOf2 as schemaHashOf,
433
526
  scriptFromComputerUseActions2 as scriptFromComputerUseActions,
@@ -466,5 +559,6 @@ export {
466
559
  visitExpression2 as visitExpression,
467
560
  walkSnapshot2 as walkSnapshot,
468
561
  walkSteps2 as walkSteps,
562
+ withDesktopFingerprint2 as withDesktopFingerprint,
469
563
  withFingerprint2 as withFingerprint
470
564
  };
@@ -32,7 +32,8 @@ export interface UiErrorCodeInfo {
32
32
  * Every run-time error code, with its family. Spec 05 section 10 lists the
33
33
  * first ten; the rest are the engine's own codes for web desks, and
34
34
  * `INTERRUPTED` and `STOPPED_BY_USER` come from the contract (README section 7),
35
- * and `HEAL_APPROVAL_REQUIRED` from the phase 4 contract (README section 24).
35
+ * `HEAL_APPROVAL_REQUIRED` from the phase 4 contract (README section 24), and
36
+ * `SHELL_NOT_ALLOWED` from desk contract v3 (README section 37).
36
37
  */
37
38
  export declare const UI_ERROR_CODES: {
38
39
  readonly ELEMENT_NOT_FOUND: {
@@ -170,6 +171,11 @@ export declare const UI_ERROR_CODES: {
170
171
  readonly preflight: false;
171
172
  readonly meaning: "Healing found and checked a new target, but a person must approve it first (heal with approval, an always-ask step or keyword, or a consequential control); the run stops with the candidate in error.heal and the desk parks it for approval. Never retried in the script";
172
173
  };
174
+ readonly SHELL_NOT_ALLOWED: {
175
+ readonly family: "VALIDATION";
176
+ readonly preflight: true;
177
+ readonly meaning: "The script has Run command or file-write steps and the pool or grant, or the machine (desk.allow-shell), does not allow them; no step ran";
178
+ };
173
179
  };
174
180
  export type UiErrorCode = keyof typeof UI_ERROR_CODES;
175
181
  /** Every error code, in table order. */
package/dist/interpret.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import"./index-dcs2pe49.js";
2
- import"./index-68x61c7a.js";
3
- import"./index-qm9nd548.js";
2
+ import"./index-5pv673wd.js";
3
+ import"./index-ptrmf779.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-rs3yzt5q.js";
11
+ } from "./index-wnch00m6.js";
12
12
  import {
13
13
  MAX_VALUE_TEXT2,
14
14
  MAX_VALUE_ITEMS2,
@@ -31,7 +31,7 @@ import {
31
31
  MAX_PAGE_TEXT2,
32
32
  DEFAULT_LIST_ITEMS2,
33
33
  runUiScript2
34
- } from "./index-3hsp44k5.js";
34
+ } from "./index-vpm1gnmy.js";
35
35
  import {
36
36
  UI_ERROR_FAMILIES2,
37
37
  UI_ERROR_CODES2,
@@ -43,7 +43,7 @@ import {
43
43
  UiDriverError2,
44
44
  realClock2,
45
45
  createVirtualClock2
46
- } from "./index-yc0jgph6.js";
46
+ } from "./index-0tfzfxx9.js";
47
47
  export {
48
48
  COMPILED_NAME_PREFIX2 as COMPILED_NAME_PREFIX,
49
49
  DEFAULT_FIRST_WAIT_MS2 as DEFAULT_FIRST_WAIT_MS,
@@ -0,0 +1,120 @@
1
+ import type { DesktopUiScript, DesktopUiStepAction, DesktopUiTargetMethod } from './desktop-types.js';
2
+ /** The desk contract version whose `run` entry takes desktop scripts. */
3
+ export declare const DESKTOP_DESK_CONTRACT_VERSION = 3;
4
+ /** Desk contract v3 actions, in `DESK_ACTION_TYPES` order (`@vibecontrols/plugin-sdk/desk-types`). */
5
+ export declare const DESK_ACTION_NAMES: readonly ["screenshot", "snapshot", "click", "type", "secret_fill", "key", "scroll", "navigate", "focus_window", "shell", "read_file", "write_file", "find", "get", "invoke", "set_value", "toggle", "select", "expand", "list_windows", "open_app", "close_app", "window_state", "highlight"];
6
+ export type DeskActionName = (typeof DESK_ACTION_NAMES)[number];
7
+ /** Desk contract v3 target kinds and selector platforms. */
8
+ export declare const DESK_TARGET_KIND_NAMES: readonly ["ref", "point", "window", "selector", "image", "text"];
9
+ export type DeskTargetKindName = (typeof DESK_TARGET_KIND_NAMES)[number];
10
+ export declare const DESK_SELECTOR_PLATFORM_NAMES: readonly ["uia", "ax", "atspi", "css"];
11
+ export type DeskSelectorPlatformName = (typeof DESK_SELECTOR_PLATFORM_NAMES)[number];
12
+ /** One thing a desk may support: a desk action, a target kind or a selector platform. */
13
+ export type DeskFeature = `action:${DeskActionName}` | `target:${DeskTargetKindName}` | `platform:${DeskSelectorPlatformName}`;
14
+ /**
15
+ * The fields of a desk's `capabilities()` this check reads. The plugin SDK's
16
+ * `DeskCapabilities` (`@vibecontrols/plugin-sdk/desk-types`) fits it; the
17
+ * engine does not depend on the SDK at run time.
18
+ */
19
+ export interface DeskCapabilitiesLike {
20
+ deskContractVersion: number;
21
+ actions: readonly string[];
22
+ targetKinds: readonly string[];
23
+ selectorPlatforms: readonly string[];
24
+ scriptVersions: readonly number[];
25
+ scriptSchemaHashes: readonly string[];
26
+ allowShell: boolean;
27
+ }
28
+ /** What one step, or one of its targets, needs from a desk. */
29
+ export interface DeskNeed {
30
+ path: string;
31
+ stepId: string;
32
+ action: DesktopUiStepAction;
33
+ /** `action` for the step's own action; otherwise the field that holds the target or the option. */
34
+ field: string;
35
+ /** Any one alternative is enough; an alternative needs every feature it lists. Empty: no desk can do it. */
36
+ anyOf: DeskFeature[][];
37
+ /** Why no desk can do it, when `anyOf` is empty. */
38
+ reason?: string;
39
+ }
40
+ /** The actions that run commands or change files on the machine (shell-gated, DR5b). */
41
+ export declare const DESK_SHELL_ACTIONS: readonly ["runCommand", "fileWrite", "fileCopy", "fileDelete", "openApp"];
42
+ export type DeskShellAction = (typeof DESK_SHELL_ACTIONS)[number];
43
+ /**
44
+ * Command interpreters, script hosts and terminals, by lower-case name
45
+ * without `.exe` or `.app`. Opening one is a shell step even without
46
+ * arguments. The desk's own allow list stays the primary control; this list
47
+ * keeps the obvious ones behind `allowShell` too.
48
+ */
49
+ export declare const COMMAND_INTERPRETER_APPS: readonly string[];
50
+ /** Whether an application name is a command interpreter, script host or terminal. */
51
+ export declare function isCommandInterpreterApp(app: string): boolean;
52
+ /** A step that needs shell steps allowed. */
53
+ export interface DeskShellStep {
54
+ path: string;
55
+ stepId: string;
56
+ action: DeskShellAction;
57
+ }
58
+ /** Something the desk lacks. Desk-level problems have no step. */
59
+ export interface DeskShortfall {
60
+ path?: string;
61
+ stepId?: string;
62
+ action?: DesktopUiStepAction;
63
+ field: string;
64
+ /** The features of the closest alternative that the desk lacks; empty when no desk can do it. */
65
+ missing: DeskFeature[];
66
+ reason: string;
67
+ }
68
+ export type DesktopDeskCheck = {
69
+ ok: true;
70
+ } | {
71
+ ok: false;
72
+ code: 'UNSUPPORTED_ON_DESK';
73
+ message: string;
74
+ shortfalls: DeskShortfall[];
75
+ } | {
76
+ ok: false;
77
+ code: 'SHELL_NOT_ALLOWED';
78
+ message: string;
79
+ steps: DeskShellStep[];
80
+ };
81
+ export interface DesktopDeskCheckOptions {
82
+ /** The pool's or the automation grant's `allowShell` (default off on both). Absent: only the desk decides. */
83
+ allowShell?: boolean;
84
+ /** The schema hash the request carries. Absent means `DESKTOP_SCRIPT_SCHEMA_HASH`. */
85
+ schemaHash?: string;
86
+ }
87
+ /**
88
+ * The desk features one target method needs, or undefined when no desk
89
+ * resolves it (an XPath). The desk driver (P2-03b) skips a method whose
90
+ * features the desk lacks.
91
+ */
92
+ export declare function deskFeaturesOfMethod(method: DesktopUiTargetMethod): DeskFeature[] | undefined;
93
+ /** Whether the capabilities include a feature. */
94
+ export declare function deskHasFeature(capabilities: DeskCapabilitiesLike, feature: DeskFeature): boolean;
95
+ /**
96
+ * Everything the script needs from a desk, step by step: the step's action,
97
+ * its options and each of its targets. A pinned element needs what its
98
+ * target uses when the script carries it (a compiled script always does).
99
+ */
100
+ export declare function desktopScriptDeskNeeds(script: DesktopUiScript): DeskNeed[];
101
+ /**
102
+ * The steps that run commands or change files, which need shell steps allowed
103
+ * (DR5b). Check the compiled script: a `call` is refused by
104
+ * `checkDesktopScriptForDesk` until it is inlined.
105
+ */
106
+ export declare function desktopShellSteps(script: DesktopUiScript): DeskShellStep[];
107
+ /**
108
+ * The shell check alone, for the service at save time and at dispatch: a
109
+ * script with Run command or file-write steps needs `allowShell` on the pool
110
+ * or the grant. Refused with `SHELL_NOT_ALLOWED`. Run it on the compiled
111
+ * script (shared sequences inlined), or the steps of a `call` are not seen.
112
+ */
113
+ export declare function checkDesktopScriptShell(script: DesktopUiScript, allowShell: boolean): DesktopDeskCheck;
114
+ /**
115
+ * Whether a desk can run the script, before dispatch. `UNSUPPORTED_ON_DESK`
116
+ * comes first (the desk checks capabilities before shell, desk contract v3
117
+ * section 7.1); then `SHELL_NOT_ALLOWED` when the script has shell steps and
118
+ * the desk's `allowShell` or `options.allowShell` is false.
119
+ */
120
+ export declare function checkDesktopScriptForDesk(script: DesktopUiScript, capabilities: DeskCapabilitiesLike | null | undefined, options?: DesktopDeskCheckOptions): DesktopDeskCheck;