agent-screenplay 0.0.0-stage → 0.1.0

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 (89) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +141 -2
  3. package/assets/editor/index.html +536 -0
  4. package/assets/fonts/Inter-Bold.ttf +0 -0
  5. package/assets/fonts/Inter-LICENSE.txt +92 -0
  6. package/assets/fonts/Inter-Medium.ttf +0 -0
  7. package/assets/fonts/Inter-Regular.ttf +0 -0
  8. package/assets/fonts/Inter-SemiBold.ttf +0 -0
  9. package/dist/cli.d.ts +2 -0
  10. package/dist/cli.js +163 -0
  11. package/dist/cli.js.map +1 -0
  12. package/dist/core.d.ts +16 -0
  13. package/dist/core.js +73 -0
  14. package/dist/core.js.map +1 -0
  15. package/dist/direct/plan.d.ts +100 -0
  16. package/dist/direct/plan.js +274 -0
  17. package/dist/direct/plan.js.map +1 -0
  18. package/dist/drivers/browser.d.ts +9 -0
  19. package/dist/drivers/browser.js +44 -0
  20. package/dist/drivers/browser.js.map +1 -0
  21. package/dist/drivers/desktop.d.ts +53 -0
  22. package/dist/drivers/desktop.js +650 -0
  23. package/dist/drivers/desktop.js.map +1 -0
  24. package/dist/drivers/pace.d.ts +11 -0
  25. package/dist/drivers/pace.js +44 -0
  26. package/dist/drivers/pace.js.map +1 -0
  27. package/dist/drivers/web.d.ts +37 -0
  28. package/dist/drivers/web.js +570 -0
  29. package/dist/drivers/web.js.map +1 -0
  30. package/dist/editor/server.d.ts +96 -0
  31. package/dist/editor/server.js +303 -0
  32. package/dist/editor/server.js.map +1 -0
  33. package/dist/ffmpeg.d.ts +5 -0
  34. package/dist/ffmpeg.js +44 -0
  35. package/dist/ffmpeg.js.map +1 -0
  36. package/dist/guide.d.ts +6 -0
  37. package/dist/guide.js +25 -0
  38. package/dist/guide.js.map +1 -0
  39. package/dist/init.d.ts +19 -0
  40. package/dist/init.js +147 -0
  41. package/dist/init.js.map +1 -0
  42. package/dist/login.d.ts +2 -0
  43. package/dist/login.js +50 -0
  44. package/dist/login.js.map +1 -0
  45. package/dist/mcp/server.d.ts +1 -0
  46. package/dist/mcp/server.js +132 -0
  47. package/dist/mcp/server.js.map +1 -0
  48. package/dist/render/compose.d.ts +68 -0
  49. package/dist/render/compose.js +361 -0
  50. package/dist/render/compose.js.map +1 -0
  51. package/dist/render/presets.d.ts +42 -0
  52. package/dist/render/presets.js +111 -0
  53. package/dist/render/presets.js.map +1 -0
  54. package/dist/render/render.d.ts +25 -0
  55. package/dist/render/render.js +257 -0
  56. package/dist/render/render.js.map +1 -0
  57. package/dist/render/sources.d.ts +15 -0
  58. package/dist/render/sources.js +146 -0
  59. package/dist/render/sources.js.map +1 -0
  60. package/dist/render/style.d.ts +37 -0
  61. package/dist/render/style.js +118 -0
  62. package/dist/render/style.js.map +1 -0
  63. package/dist/scenario/config.d.ts +43 -0
  64. package/dist/scenario/config.js +69 -0
  65. package/dist/scenario/config.js.map +1 -0
  66. package/dist/scenario/fingerprint.d.ts +10 -0
  67. package/dist/scenario/fingerprint.js +58 -0
  68. package/dist/scenario/fingerprint.js.map +1 -0
  69. package/dist/scenario/load.d.ts +36 -0
  70. package/dist/scenario/load.js +101 -0
  71. package/dist/scenario/load.js.map +1 -0
  72. package/dist/scenario/schema.d.ts +553 -0
  73. package/dist/scenario/schema.js +262 -0
  74. package/dist/scenario/schema.js.map +1 -0
  75. package/dist/scenario/target.d.ts +26 -0
  76. package/dist/scenario/target.js +40 -0
  77. package/dist/scenario/target.js.map +1 -0
  78. package/dist/take.d.ts +100 -0
  79. package/dist/take.js +15 -0
  80. package/dist/take.js.map +1 -0
  81. package/dist/version.d.ts +1 -0
  82. package/dist/version.js +2 -0
  83. package/dist/version.js.map +1 -0
  84. package/dist/voice/cartesia.d.ts +12 -0
  85. package/dist/voice/cartesia.js +103 -0
  86. package/dist/voice/cartesia.js.map +1 -0
  87. package/package.json +65 -4
  88. package/schema/scenario.schema.json +1098 -0
  89. package/skills/screenplay/SKILL.md +127 -0
@@ -0,0 +1,1098 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "type": "object",
4
+ "properties": {
5
+ "$schema": {
6
+ "type": "string"
7
+ },
8
+ "name": {
9
+ "description": "Name of the video (default: the file name).",
10
+ "type": "string"
11
+ },
12
+ "url": {
13
+ "description": "Web: the page to start on.",
14
+ "type": "string"
15
+ },
16
+ "app": {
17
+ "description": "Desktop: the application to film, as the OS names it. With \"screen\": true, the app brought to the front first (optional).",
18
+ "type": "string"
19
+ },
20
+ "screen": {
21
+ "description": "Desktop: film the whole main screen instead of one app's window, to show several apps or the menu bar. Everything on screen is filmed (notifications, other windows, the menu bar icons): close or hide what should not be seen.",
22
+ "type": "boolean"
23
+ },
24
+ "hideOthers": {
25
+ "description": "Desktop, macOS, with \"screen\": true: hide the other apps before filming (Hide Others, ⌥⌘H, in `app`). Default false.",
26
+ "type": "boolean"
27
+ },
28
+ "viewport": {
29
+ "description": "Web: browser size in CSS pixels (default 1440x900).",
30
+ "type": "object",
31
+ "properties": {
32
+ "width": {
33
+ "type": "integer",
34
+ "minimum": 320,
35
+ "maximum": 3840
36
+ },
37
+ "height": {
38
+ "type": "integer",
39
+ "minimum": 240,
40
+ "maximum": 2160
41
+ }
42
+ },
43
+ "required": [
44
+ "width",
45
+ "height"
46
+ ],
47
+ "additionalProperties": false
48
+ },
49
+ "scale": {
50
+ "description": "Web: device pixel ratio of the capture (default 2, Retina).",
51
+ "type": "number",
52
+ "minimum": 1,
53
+ "maximum": 3
54
+ },
55
+ "colorScheme": {
56
+ "type": "string",
57
+ "enum": [
58
+ "light",
59
+ "dark"
60
+ ]
61
+ },
62
+ "locale": {
63
+ "description": "Web: browser locale, e.g. fr-FR.",
64
+ "type": "string"
65
+ },
66
+ "auth": {
67
+ "type": "object",
68
+ "properties": {
69
+ "storageState": {
70
+ "type": "string",
71
+ "description": "Path to a session saved by `screenplay login`."
72
+ }
73
+ },
74
+ "required": [
75
+ "storageState"
76
+ ],
77
+ "additionalProperties": false
78
+ },
79
+ "hideScrollbars": {
80
+ "description": "Web: hide scrollbars (default true).",
81
+ "type": "boolean"
82
+ },
83
+ "typingSpeed": {
84
+ "description": "Typing speed multiplier (default 1, about 14 characters/second).",
85
+ "type": "number",
86
+ "minimum": 0.2,
87
+ "maximum": 5
88
+ },
89
+ "style": {
90
+ "type": "object",
91
+ "properties": {
92
+ "background": {
93
+ "description": "A preset (sunset, ocean, lavender, forest, midnight, mono, paper), a color like #0f172a, an image path (relative to the file that sets it), or a gradient { \"gradient\": [\"#0ea5e9\", \"#6366f1\"], \"angle\": 135 }.",
94
+ "anyOf": [
95
+ {
96
+ "type": "string"
97
+ },
98
+ {
99
+ "type": "object",
100
+ "properties": {
101
+ "gradient": {
102
+ "minItems": 2,
103
+ "maxItems": 4,
104
+ "type": "array",
105
+ "items": {
106
+ "type": "string",
107
+ "pattern": "^#([0-9a-f]{3}|[0-9a-f]{6})$"
108
+ },
109
+ "description": "2 to 4 hex colors, from the start of the gradient to its end."
110
+ },
111
+ "angle": {
112
+ "description": "Direction in degrees, as in CSS: 90 goes left to right, 180 top to bottom (default 135).",
113
+ "type": "number",
114
+ "minimum": 0,
115
+ "maximum": 360
116
+ }
117
+ },
118
+ "required": [
119
+ "gradient"
120
+ ],
121
+ "additionalProperties": false
122
+ }
123
+ ]
124
+ },
125
+ "padding": {
126
+ "description": "Space around the recording, in output pixels (default 72).",
127
+ "type": "number",
128
+ "minimum": 0,
129
+ "maximum": 400
130
+ },
131
+ "radius": {
132
+ "description": "Corner radius of the recording (default 14).",
133
+ "type": "number",
134
+ "minimum": 0,
135
+ "maximum": 80
136
+ },
137
+ "shadow": {
138
+ "description": "Drop shadow under the recording (default true).",
139
+ "type": "boolean"
140
+ },
141
+ "cursor": {
142
+ "description": "Cursor drawn in the video (default macos).",
143
+ "type": "string",
144
+ "enum": [
145
+ "macos",
146
+ "dot",
147
+ "none"
148
+ ]
149
+ },
150
+ "cursorSize": {
151
+ "description": "Cursor scale (default 1).",
152
+ "type": "number",
153
+ "minimum": 0.5,
154
+ "maximum": 3
155
+ },
156
+ "maxZoom": {
157
+ "description": "Highest automatic zoom (default 1.9). Automatic zooms also stop where the capture runs out of pixels, so a small app window that already fills the video is not zoomed; a number in a step's `zoom` still forces it.",
158
+ "type": "number",
159
+ "minimum": 1,
160
+ "maximum": 4
161
+ },
162
+ "autoZoom": {
163
+ "description": "Zoom automatically on clicks and typing (default true).",
164
+ "type": "boolean"
165
+ },
166
+ "captions": {
167
+ "description": "Show the `say` text as captions (default true).",
168
+ "type": "boolean"
169
+ },
170
+ "accent": {
171
+ "description": "Accent color for clicks, callouts and highlights (default #3b82f6).",
172
+ "type": "string"
173
+ },
174
+ "frame": {
175
+ "description": "Draw a minimal browser window bar above web recordings (default none).",
176
+ "type": "string",
177
+ "enum": [
178
+ "none",
179
+ "browser"
180
+ ]
181
+ }
182
+ },
183
+ "additionalProperties": false
184
+ },
185
+ "voice": {
186
+ "type": "object",
187
+ "properties": {
188
+ "enabled": {
189
+ "description": "Speak each step's `say` text (default false). Needs CARTESIA_API_KEY.",
190
+ "type": "boolean"
191
+ },
192
+ "language": {
193
+ "description": "Language code, e.g. en, fr, de (default en).",
194
+ "type": "string"
195
+ },
196
+ "id": {
197
+ "description": "Cartesia voice id (default: a narration voice for the language).",
198
+ "type": "string"
199
+ },
200
+ "speed": {
201
+ "type": "number",
202
+ "minimum": 0.6,
203
+ "maximum": 1.5
204
+ },
205
+ "model": {
206
+ "description": "Cartesia model (default sonic-3.6).",
207
+ "type": "string"
208
+ }
209
+ },
210
+ "additionalProperties": false
211
+ },
212
+ "output": {
213
+ "type": "object",
214
+ "properties": {
215
+ "width": {
216
+ "description": "Video width (default 1920).",
217
+ "type": "integer",
218
+ "minimum": 320,
219
+ "maximum": 3840
220
+ },
221
+ "height": {
222
+ "description": "Video height (default 1080).",
223
+ "type": "integer",
224
+ "minimum": 240,
225
+ "maximum": 2160
226
+ },
227
+ "fps": {
228
+ "description": "Frames per second (default 30).",
229
+ "anyOf": [
230
+ {
231
+ "type": "number",
232
+ "const": 24
233
+ },
234
+ {
235
+ "type": "number",
236
+ "const": 25
237
+ },
238
+ {
239
+ "type": "number",
240
+ "const": 30
241
+ },
242
+ {
243
+ "type": "number",
244
+ "const": 50
245
+ },
246
+ {
247
+ "type": "number",
248
+ "const": 60
249
+ }
250
+ ]
251
+ },
252
+ "gif": {
253
+ "description": "Also write a GIF (default false).",
254
+ "type": "boolean"
255
+ },
256
+ "path": {
257
+ "description": "Where to write the MP4 (default: next to the scenario, same name).",
258
+ "type": "string"
259
+ }
260
+ },
261
+ "additionalProperties": false
262
+ },
263
+ "steps": {
264
+ "minItems": 1,
265
+ "type": "array",
266
+ "items": {
267
+ "anyOf": [
268
+ {
269
+ "type": "object",
270
+ "properties": {
271
+ "goto": {
272
+ "type": "string",
273
+ "description": "URL or path to open (relative to the scenario url)."
274
+ },
275
+ "say": {
276
+ "description": "Narration for this step: shown as a caption, and spoken when voice is enabled. The step lasts at least as long as the sentence.",
277
+ "type": "string"
278
+ },
279
+ "zoom": {
280
+ "description": "false: keep the camera wide for this step. A number: force this zoom level (1 = no zoom).",
281
+ "anyOf": [
282
+ {
283
+ "type": "boolean"
284
+ },
285
+ {
286
+ "type": "number",
287
+ "minimum": 1,
288
+ "maximum": 4
289
+ }
290
+ ]
291
+ },
292
+ "hold": {
293
+ "description": "Extra seconds to stay on the result of this step before the next one.",
294
+ "type": "number",
295
+ "minimum": 0,
296
+ "maximum": 30
297
+ },
298
+ "app": {
299
+ "description": "Desktop: the app this step acts in (default: the scenario's app, or the last one opened). Another app than the scenario's needs \"screen\": true; there it also becomes the app the next steps act in.",
300
+ "type": "string"
301
+ },
302
+ "surface": {
303
+ "description": "Desktop: where to look for the element: window (default, the app's front window), menubar (the app's menus in the menu bar), menu (an open menu), sheet, popover or alert.",
304
+ "type": "string",
305
+ "enum": [
306
+ "window",
307
+ "menubar",
308
+ "menu",
309
+ "sheet",
310
+ "popover",
311
+ "alert"
312
+ ]
313
+ }
314
+ },
315
+ "required": [
316
+ "goto"
317
+ ],
318
+ "additionalProperties": false
319
+ },
320
+ {
321
+ "type": "object",
322
+ "properties": {
323
+ "open": {
324
+ "type": "string",
325
+ "description": "Desktop, with \"screen\": true: launch this app or bring it to the front. The next steps act in it."
326
+ },
327
+ "say": {
328
+ "description": "Narration for this step: shown as a caption, and spoken when voice is enabled. The step lasts at least as long as the sentence.",
329
+ "type": "string"
330
+ },
331
+ "zoom": {
332
+ "description": "false: keep the camera wide for this step. A number: force this zoom level (1 = no zoom).",
333
+ "anyOf": [
334
+ {
335
+ "type": "boolean"
336
+ },
337
+ {
338
+ "type": "number",
339
+ "minimum": 1,
340
+ "maximum": 4
341
+ }
342
+ ]
343
+ },
344
+ "hold": {
345
+ "description": "Extra seconds to stay on the result of this step before the next one.",
346
+ "type": "number",
347
+ "minimum": 0,
348
+ "maximum": 30
349
+ },
350
+ "app": {
351
+ "description": "Desktop: the app this step acts in (default: the scenario's app, or the last one opened). Another app than the scenario's needs \"screen\": true; there it also becomes the app the next steps act in.",
352
+ "type": "string"
353
+ },
354
+ "surface": {
355
+ "description": "Desktop: where to look for the element: window (default, the app's front window), menubar (the app's menus in the menu bar), menu (an open menu), sheet, popover or alert.",
356
+ "type": "string",
357
+ "enum": [
358
+ "window",
359
+ "menubar",
360
+ "menu",
361
+ "sheet",
362
+ "popover",
363
+ "alert"
364
+ ]
365
+ }
366
+ },
367
+ "required": [
368
+ "open"
369
+ ],
370
+ "additionalProperties": false
371
+ },
372
+ {
373
+ "type": "object",
374
+ "properties": {
375
+ "click": {
376
+ "type": "string",
377
+ "minLength": 1,
378
+ "description": "The element to act on: text=…, role=button[name='…'], label=…, placeholder=…, testid=…, css=… (web only). A bare string means text=."
379
+ },
380
+ "button": {
381
+ "type": "string",
382
+ "enum": [
383
+ "left",
384
+ "right"
385
+ ]
386
+ },
387
+ "double": {
388
+ "type": "boolean"
389
+ },
390
+ "say": {
391
+ "description": "Narration for this step: shown as a caption, and spoken when voice is enabled. The step lasts at least as long as the sentence.",
392
+ "type": "string"
393
+ },
394
+ "zoom": {
395
+ "description": "false: keep the camera wide for this step. A number: force this zoom level (1 = no zoom).",
396
+ "anyOf": [
397
+ {
398
+ "type": "boolean"
399
+ },
400
+ {
401
+ "type": "number",
402
+ "minimum": 1,
403
+ "maximum": 4
404
+ }
405
+ ]
406
+ },
407
+ "hold": {
408
+ "description": "Extra seconds to stay on the result of this step before the next one.",
409
+ "type": "number",
410
+ "minimum": 0,
411
+ "maximum": 30
412
+ },
413
+ "app": {
414
+ "description": "Desktop: the app this step acts in (default: the scenario's app, or the last one opened). Another app than the scenario's needs \"screen\": true; there it also becomes the app the next steps act in.",
415
+ "type": "string"
416
+ },
417
+ "surface": {
418
+ "description": "Desktop: where to look for the element: window (default, the app's front window), menubar (the app's menus in the menu bar), menu (an open menu), sheet, popover or alert.",
419
+ "type": "string",
420
+ "enum": [
421
+ "window",
422
+ "menubar",
423
+ "menu",
424
+ "sheet",
425
+ "popover",
426
+ "alert"
427
+ ]
428
+ }
429
+ },
430
+ "required": [
431
+ "click"
432
+ ],
433
+ "additionalProperties": false
434
+ },
435
+ {
436
+ "type": "object",
437
+ "properties": {
438
+ "type": {
439
+ "type": "string",
440
+ "description": "Text to type, letter by letter. ${ENV_VAR} is replaced from the environment."
441
+ },
442
+ "into": {
443
+ "description": "Field to click first. Omit to type where the focus already is.",
444
+ "type": "string",
445
+ "minLength": 1
446
+ },
447
+ "clear": {
448
+ "description": "Clear the field before typing.",
449
+ "type": "boolean"
450
+ },
451
+ "secret": {
452
+ "description": "Mask the text in captions, logs and the storyboard.",
453
+ "type": "boolean"
454
+ },
455
+ "submit": {
456
+ "description": "Press Enter after typing.",
457
+ "type": "boolean"
458
+ },
459
+ "say": {
460
+ "description": "Narration for this step: shown as a caption, and spoken when voice is enabled. The step lasts at least as long as the sentence.",
461
+ "type": "string"
462
+ },
463
+ "zoom": {
464
+ "description": "false: keep the camera wide for this step. A number: force this zoom level (1 = no zoom).",
465
+ "anyOf": [
466
+ {
467
+ "type": "boolean"
468
+ },
469
+ {
470
+ "type": "number",
471
+ "minimum": 1,
472
+ "maximum": 4
473
+ }
474
+ ]
475
+ },
476
+ "hold": {
477
+ "description": "Extra seconds to stay on the result of this step before the next one.",
478
+ "type": "number",
479
+ "minimum": 0,
480
+ "maximum": 30
481
+ },
482
+ "app": {
483
+ "description": "Desktop: the app this step acts in (default: the scenario's app, or the last one opened). Another app than the scenario's needs \"screen\": true; there it also becomes the app the next steps act in.",
484
+ "type": "string"
485
+ },
486
+ "surface": {
487
+ "description": "Desktop: where to look for the element: window (default, the app's front window), menubar (the app's menus in the menu bar), menu (an open menu), sheet, popover or alert.",
488
+ "type": "string",
489
+ "enum": [
490
+ "window",
491
+ "menubar",
492
+ "menu",
493
+ "sheet",
494
+ "popover",
495
+ "alert"
496
+ ]
497
+ }
498
+ },
499
+ "required": [
500
+ "type"
501
+ ],
502
+ "additionalProperties": false
503
+ },
504
+ {
505
+ "type": "object",
506
+ "properties": {
507
+ "press": {
508
+ "type": "string",
509
+ "description": "Key or chord, e.g. Enter, Escape, Meta+K."
510
+ },
511
+ "say": {
512
+ "description": "Narration for this step: shown as a caption, and spoken when voice is enabled. The step lasts at least as long as the sentence.",
513
+ "type": "string"
514
+ },
515
+ "zoom": {
516
+ "description": "false: keep the camera wide for this step. A number: force this zoom level (1 = no zoom).",
517
+ "anyOf": [
518
+ {
519
+ "type": "boolean"
520
+ },
521
+ {
522
+ "type": "number",
523
+ "minimum": 1,
524
+ "maximum": 4
525
+ }
526
+ ]
527
+ },
528
+ "hold": {
529
+ "description": "Extra seconds to stay on the result of this step before the next one.",
530
+ "type": "number",
531
+ "minimum": 0,
532
+ "maximum": 30
533
+ },
534
+ "app": {
535
+ "description": "Desktop: the app this step acts in (default: the scenario's app, or the last one opened). Another app than the scenario's needs \"screen\": true; there it also becomes the app the next steps act in.",
536
+ "type": "string"
537
+ },
538
+ "surface": {
539
+ "description": "Desktop: where to look for the element: window (default, the app's front window), menubar (the app's menus in the menu bar), menu (an open menu), sheet, popover or alert.",
540
+ "type": "string",
541
+ "enum": [
542
+ "window",
543
+ "menubar",
544
+ "menu",
545
+ "sheet",
546
+ "popover",
547
+ "alert"
548
+ ]
549
+ }
550
+ },
551
+ "required": [
552
+ "press"
553
+ ],
554
+ "additionalProperties": false
555
+ },
556
+ {
557
+ "type": "object",
558
+ "properties": {
559
+ "hover": {
560
+ "type": "string",
561
+ "minLength": 1,
562
+ "description": "The element to act on: text=…, role=button[name='…'], label=…, placeholder=…, testid=…, css=… (web only). A bare string means text=."
563
+ },
564
+ "say": {
565
+ "description": "Narration for this step: shown as a caption, and spoken when voice is enabled. The step lasts at least as long as the sentence.",
566
+ "type": "string"
567
+ },
568
+ "zoom": {
569
+ "description": "false: keep the camera wide for this step. A number: force this zoom level (1 = no zoom).",
570
+ "anyOf": [
571
+ {
572
+ "type": "boolean"
573
+ },
574
+ {
575
+ "type": "number",
576
+ "minimum": 1,
577
+ "maximum": 4
578
+ }
579
+ ]
580
+ },
581
+ "hold": {
582
+ "description": "Extra seconds to stay on the result of this step before the next one.",
583
+ "type": "number",
584
+ "minimum": 0,
585
+ "maximum": 30
586
+ },
587
+ "app": {
588
+ "description": "Desktop: the app this step acts in (default: the scenario's app, or the last one opened). Another app than the scenario's needs \"screen\": true; there it also becomes the app the next steps act in.",
589
+ "type": "string"
590
+ },
591
+ "surface": {
592
+ "description": "Desktop: where to look for the element: window (default, the app's front window), menubar (the app's menus in the menu bar), menu (an open menu), sheet, popover or alert.",
593
+ "type": "string",
594
+ "enum": [
595
+ "window",
596
+ "menubar",
597
+ "menu",
598
+ "sheet",
599
+ "popover",
600
+ "alert"
601
+ ]
602
+ }
603
+ },
604
+ "required": [
605
+ "hover"
606
+ ],
607
+ "additionalProperties": false
608
+ },
609
+ {
610
+ "type": "object",
611
+ "properties": {
612
+ "scroll": {
613
+ "anyOf": [
614
+ {
615
+ "type": "string",
616
+ "minLength": 1,
617
+ "description": "The element to act on: text=…, role=button[name='…'], label=…, placeholder=…, testid=…, css=… (web only). A bare string means text=."
618
+ },
619
+ {
620
+ "type": "string",
621
+ "enum": [
622
+ "down",
623
+ "up",
624
+ "top",
625
+ "bottom"
626
+ ]
627
+ }
628
+ ],
629
+ "description": "An element to bring into view, or a direction (down/up scroll one screen)."
630
+ },
631
+ "say": {
632
+ "description": "Narration for this step: shown as a caption, and spoken when voice is enabled. The step lasts at least as long as the sentence.",
633
+ "type": "string"
634
+ },
635
+ "zoom": {
636
+ "description": "false: keep the camera wide for this step. A number: force this zoom level (1 = no zoom).",
637
+ "anyOf": [
638
+ {
639
+ "type": "boolean"
640
+ },
641
+ {
642
+ "type": "number",
643
+ "minimum": 1,
644
+ "maximum": 4
645
+ }
646
+ ]
647
+ },
648
+ "hold": {
649
+ "description": "Extra seconds to stay on the result of this step before the next one.",
650
+ "type": "number",
651
+ "minimum": 0,
652
+ "maximum": 30
653
+ },
654
+ "app": {
655
+ "description": "Desktop: the app this step acts in (default: the scenario's app, or the last one opened). Another app than the scenario's needs \"screen\": true; there it also becomes the app the next steps act in.",
656
+ "type": "string"
657
+ },
658
+ "surface": {
659
+ "description": "Desktop: where to look for the element: window (default, the app's front window), menubar (the app's menus in the menu bar), menu (an open menu), sheet, popover or alert.",
660
+ "type": "string",
661
+ "enum": [
662
+ "window",
663
+ "menubar",
664
+ "menu",
665
+ "sheet",
666
+ "popover",
667
+ "alert"
668
+ ]
669
+ }
670
+ },
671
+ "required": [
672
+ "scroll"
673
+ ],
674
+ "additionalProperties": false
675
+ },
676
+ {
677
+ "type": "object",
678
+ "properties": {
679
+ "select": {
680
+ "type": "string",
681
+ "minLength": 1,
682
+ "description": "The element to act on: text=…, role=button[name='…'], label=…, placeholder=…, testid=…, css=… (web only). A bare string means text=."
683
+ },
684
+ "option": {
685
+ "type": "string"
686
+ },
687
+ "say": {
688
+ "description": "Narration for this step: shown as a caption, and spoken when voice is enabled. The step lasts at least as long as the sentence.",
689
+ "type": "string"
690
+ },
691
+ "zoom": {
692
+ "description": "false: keep the camera wide for this step. A number: force this zoom level (1 = no zoom).",
693
+ "anyOf": [
694
+ {
695
+ "type": "boolean"
696
+ },
697
+ {
698
+ "type": "number",
699
+ "minimum": 1,
700
+ "maximum": 4
701
+ }
702
+ ]
703
+ },
704
+ "hold": {
705
+ "description": "Extra seconds to stay on the result of this step before the next one.",
706
+ "type": "number",
707
+ "minimum": 0,
708
+ "maximum": 30
709
+ },
710
+ "app": {
711
+ "description": "Desktop: the app this step acts in (default: the scenario's app, or the last one opened). Another app than the scenario's needs \"screen\": true; there it also becomes the app the next steps act in.",
712
+ "type": "string"
713
+ },
714
+ "surface": {
715
+ "description": "Desktop: where to look for the element: window (default, the app's front window), menubar (the app's menus in the menu bar), menu (an open menu), sheet, popover or alert.",
716
+ "type": "string",
717
+ "enum": [
718
+ "window",
719
+ "menubar",
720
+ "menu",
721
+ "sheet",
722
+ "popover",
723
+ "alert"
724
+ ]
725
+ }
726
+ },
727
+ "required": [
728
+ "select",
729
+ "option"
730
+ ],
731
+ "additionalProperties": false
732
+ },
733
+ {
734
+ "type": "object",
735
+ "properties": {
736
+ "wait": {
737
+ "anyOf": [
738
+ {
739
+ "type": "string",
740
+ "minLength": 1,
741
+ "description": "The element to act on: text=…, role=button[name='…'], label=…, placeholder=…, testid=…, css=… (web only). A bare string means text=."
742
+ },
743
+ {
744
+ "type": "number",
745
+ "minimum": 0,
746
+ "maximum": 120
747
+ }
748
+ ],
749
+ "description": "An element/text to wait for, or a number of seconds. Long waits are sped up in the video."
750
+ },
751
+ "timeout": {
752
+ "description": "Seconds before giving up (default 30).",
753
+ "type": "number",
754
+ "minimum": 1,
755
+ "maximum": 300
756
+ },
757
+ "say": {
758
+ "description": "Narration for this step: shown as a caption, and spoken when voice is enabled. The step lasts at least as long as the sentence.",
759
+ "type": "string"
760
+ },
761
+ "zoom": {
762
+ "description": "false: keep the camera wide for this step. A number: force this zoom level (1 = no zoom).",
763
+ "anyOf": [
764
+ {
765
+ "type": "boolean"
766
+ },
767
+ {
768
+ "type": "number",
769
+ "minimum": 1,
770
+ "maximum": 4
771
+ }
772
+ ]
773
+ },
774
+ "hold": {
775
+ "description": "Extra seconds to stay on the result of this step before the next one.",
776
+ "type": "number",
777
+ "minimum": 0,
778
+ "maximum": 30
779
+ },
780
+ "app": {
781
+ "description": "Desktop: the app this step acts in (default: the scenario's app, or the last one opened). Another app than the scenario's needs \"screen\": true; there it also becomes the app the next steps act in.",
782
+ "type": "string"
783
+ },
784
+ "surface": {
785
+ "description": "Desktop: where to look for the element: window (default, the app's front window), menubar (the app's menus in the menu bar), menu (an open menu), sheet, popover or alert.",
786
+ "type": "string",
787
+ "enum": [
788
+ "window",
789
+ "menubar",
790
+ "menu",
791
+ "sheet",
792
+ "popover",
793
+ "alert"
794
+ ]
795
+ }
796
+ },
797
+ "required": [
798
+ "wait"
799
+ ],
800
+ "additionalProperties": false
801
+ },
802
+ {
803
+ "type": "object",
804
+ "properties": {
805
+ "pause": {
806
+ "type": "number",
807
+ "minimum": 0,
808
+ "maximum": 30,
809
+ "description": "Seconds to stay still."
810
+ },
811
+ "say": {
812
+ "description": "Narration for this step: shown as a caption, and spoken when voice is enabled. The step lasts at least as long as the sentence.",
813
+ "type": "string"
814
+ },
815
+ "zoom": {
816
+ "description": "false: keep the camera wide for this step. A number: force this zoom level (1 = no zoom).",
817
+ "anyOf": [
818
+ {
819
+ "type": "boolean"
820
+ },
821
+ {
822
+ "type": "number",
823
+ "minimum": 1,
824
+ "maximum": 4
825
+ }
826
+ ]
827
+ },
828
+ "hold": {
829
+ "description": "Extra seconds to stay on the result of this step before the next one.",
830
+ "type": "number",
831
+ "minimum": 0,
832
+ "maximum": 30
833
+ },
834
+ "app": {
835
+ "description": "Desktop: the app this step acts in (default: the scenario's app, or the last one opened). Another app than the scenario's needs \"screen\": true; there it also becomes the app the next steps act in.",
836
+ "type": "string"
837
+ },
838
+ "surface": {
839
+ "description": "Desktop: where to look for the element: window (default, the app's front window), menubar (the app's menus in the menu bar), menu (an open menu), sheet, popover or alert.",
840
+ "type": "string",
841
+ "enum": [
842
+ "window",
843
+ "menubar",
844
+ "menu",
845
+ "sheet",
846
+ "popover",
847
+ "alert"
848
+ ]
849
+ }
850
+ },
851
+ "required": [
852
+ "pause"
853
+ ],
854
+ "additionalProperties": false
855
+ },
856
+ {
857
+ "type": "object",
858
+ "properties": {
859
+ "title": {
860
+ "type": "string",
861
+ "description": "Opening card shown full screen."
862
+ },
863
+ "subtitle": {
864
+ "type": "string"
865
+ },
866
+ "duration": {
867
+ "type": "number",
868
+ "minimum": 0.5,
869
+ "maximum": 15
870
+ },
871
+ "say": {
872
+ "description": "Narration for this step: shown as a caption, and spoken when voice is enabled. The step lasts at least as long as the sentence.",
873
+ "type": "string"
874
+ }
875
+ },
876
+ "required": [
877
+ "title"
878
+ ],
879
+ "additionalProperties": false
880
+ },
881
+ {
882
+ "type": "object",
883
+ "properties": {
884
+ "end": {
885
+ "type": "string",
886
+ "description": "Closing card shown full screen (result, call to action)."
887
+ },
888
+ "subtitle": {
889
+ "type": "string"
890
+ },
891
+ "duration": {
892
+ "type": "number",
893
+ "minimum": 0.5,
894
+ "maximum": 15
895
+ },
896
+ "say": {
897
+ "description": "Narration for this step: shown as a caption, and spoken when voice is enabled. The step lasts at least as long as the sentence.",
898
+ "type": "string"
899
+ }
900
+ },
901
+ "required": [
902
+ "end"
903
+ ],
904
+ "additionalProperties": false
905
+ },
906
+ {
907
+ "type": "object",
908
+ "properties": {
909
+ "callout": {
910
+ "type": "string",
911
+ "minLength": 1,
912
+ "description": "The element to act on: text=…, role=button[name='…'], label=…, placeholder=…, testid=…, css=… (web only). A bare string means text=."
913
+ },
914
+ "text": {
915
+ "type": "string",
916
+ "description": "Text of the bubble pointing at the element."
917
+ },
918
+ "duration": {
919
+ "type": "number",
920
+ "minimum": 0.5,
921
+ "maximum": 15
922
+ },
923
+ "say": {
924
+ "description": "Narration for this step: shown as a caption, and spoken when voice is enabled. The step lasts at least as long as the sentence.",
925
+ "type": "string"
926
+ },
927
+ "zoom": {
928
+ "description": "false: keep the camera wide for this step. A number: force this zoom level (1 = no zoom).",
929
+ "anyOf": [
930
+ {
931
+ "type": "boolean"
932
+ },
933
+ {
934
+ "type": "number",
935
+ "minimum": 1,
936
+ "maximum": 4
937
+ }
938
+ ]
939
+ },
940
+ "hold": {
941
+ "description": "Extra seconds to stay on the result of this step before the next one.",
942
+ "type": "number",
943
+ "minimum": 0,
944
+ "maximum": 30
945
+ },
946
+ "app": {
947
+ "description": "Desktop: the app this step acts in (default: the scenario's app, or the last one opened). Another app than the scenario's needs \"screen\": true; there it also becomes the app the next steps act in.",
948
+ "type": "string"
949
+ },
950
+ "surface": {
951
+ "description": "Desktop: where to look for the element: window (default, the app's front window), menubar (the app's menus in the menu bar), menu (an open menu), sheet, popover or alert.",
952
+ "type": "string",
953
+ "enum": [
954
+ "window",
955
+ "menubar",
956
+ "menu",
957
+ "sheet",
958
+ "popover",
959
+ "alert"
960
+ ]
961
+ }
962
+ },
963
+ "required": [
964
+ "callout",
965
+ "text"
966
+ ],
967
+ "additionalProperties": false
968
+ },
969
+ {
970
+ "type": "object",
971
+ "properties": {
972
+ "highlight": {
973
+ "type": "string",
974
+ "minLength": 1,
975
+ "description": "The element to act on: text=…, role=button[name='…'], label=…, placeholder=…, testid=…, css=… (web only). A bare string means text=."
976
+ },
977
+ "text": {
978
+ "type": "string"
979
+ },
980
+ "duration": {
981
+ "type": "number",
982
+ "minimum": 0.5,
983
+ "maximum": 15
984
+ },
985
+ "say": {
986
+ "description": "Narration for this step: shown as a caption, and spoken when voice is enabled. The step lasts at least as long as the sentence.",
987
+ "type": "string"
988
+ },
989
+ "zoom": {
990
+ "description": "false: keep the camera wide for this step. A number: force this zoom level (1 = no zoom).",
991
+ "anyOf": [
992
+ {
993
+ "type": "boolean"
994
+ },
995
+ {
996
+ "type": "number",
997
+ "minimum": 1,
998
+ "maximum": 4
999
+ }
1000
+ ]
1001
+ },
1002
+ "hold": {
1003
+ "description": "Extra seconds to stay on the result of this step before the next one.",
1004
+ "type": "number",
1005
+ "minimum": 0,
1006
+ "maximum": 30
1007
+ },
1008
+ "app": {
1009
+ "description": "Desktop: the app this step acts in (default: the scenario's app, or the last one opened). Another app than the scenario's needs \"screen\": true; there it also becomes the app the next steps act in.",
1010
+ "type": "string"
1011
+ },
1012
+ "surface": {
1013
+ "description": "Desktop: where to look for the element: window (default, the app's front window), menubar (the app's menus in the menu bar), menu (an open menu), sheet, popover or alert.",
1014
+ "type": "string",
1015
+ "enum": [
1016
+ "window",
1017
+ "menubar",
1018
+ "menu",
1019
+ "sheet",
1020
+ "popover",
1021
+ "alert"
1022
+ ]
1023
+ }
1024
+ },
1025
+ "required": [
1026
+ "highlight"
1027
+ ],
1028
+ "additionalProperties": false
1029
+ },
1030
+ {
1031
+ "type": "object",
1032
+ "properties": {
1033
+ "zoomTo": {
1034
+ "type": "string",
1035
+ "minLength": 1,
1036
+ "description": "Frame the camera on this element without acting on it."
1037
+ },
1038
+ "duration": {
1039
+ "type": "number",
1040
+ "minimum": 0.5,
1041
+ "maximum": 15
1042
+ },
1043
+ "say": {
1044
+ "description": "Narration for this step: shown as a caption, and spoken when voice is enabled. The step lasts at least as long as the sentence.",
1045
+ "type": "string"
1046
+ },
1047
+ "zoom": {
1048
+ "description": "false: keep the camera wide for this step. A number: force this zoom level (1 = no zoom).",
1049
+ "anyOf": [
1050
+ {
1051
+ "type": "boolean"
1052
+ },
1053
+ {
1054
+ "type": "number",
1055
+ "minimum": 1,
1056
+ "maximum": 4
1057
+ }
1058
+ ]
1059
+ },
1060
+ "hold": {
1061
+ "description": "Extra seconds to stay on the result of this step before the next one.",
1062
+ "type": "number",
1063
+ "minimum": 0,
1064
+ "maximum": 30
1065
+ },
1066
+ "app": {
1067
+ "description": "Desktop: the app this step acts in (default: the scenario's app, or the last one opened). Another app than the scenario's needs \"screen\": true; there it also becomes the app the next steps act in.",
1068
+ "type": "string"
1069
+ },
1070
+ "surface": {
1071
+ "description": "Desktop: where to look for the element: window (default, the app's front window), menubar (the app's menus in the menu bar), menu (an open menu), sheet, popover or alert.",
1072
+ "type": "string",
1073
+ "enum": [
1074
+ "window",
1075
+ "menubar",
1076
+ "menu",
1077
+ "sheet",
1078
+ "popover",
1079
+ "alert"
1080
+ ]
1081
+ }
1082
+ },
1083
+ "required": [
1084
+ "zoomTo"
1085
+ ],
1086
+ "additionalProperties": false
1087
+ }
1088
+ ]
1089
+ }
1090
+ }
1091
+ },
1092
+ "required": [
1093
+ "steps"
1094
+ ],
1095
+ "additionalProperties": false,
1096
+ "$id": "https://raw.githubusercontent.com/gmpetrov/screenplay/main/schema/scenario.schema.json",
1097
+ "title": "Screenplay scenario"
1098
+ }