@aspiresys/visor 1.0.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.
@@ -0,0 +1,875 @@
1
+ import { Key, Button, Point } from "@nut-tree-fork/nut-js";
2
+ export declare class Visor {
3
+ mouse: import("@nut-tree-fork/nut-js").MouseClass;
4
+ keyboard: import("@nut-tree-fork/nut-js").KeyboardClass;
5
+ Key: typeof Key;
6
+ Button: typeof Button;
7
+ /**
8
+ * Finds an image on screen using OpenCV
9
+ * and performs a left mouse click
10
+ * on the matched region.
11
+ *
12
+ * @param image Optional image filename or path.
13
+ *
14
+ * @param confidence Match confidence threshold.
15
+ *
16
+ * Accepted range:
17
+ * 0.0 to 1.0
18
+ *
19
+ * Default:
20
+ * 0.8
21
+ *
22
+ * Recommended values:
23
+ * - 0.7 for dynamic UI
24
+ * - 0.8 for standard usage
25
+ * - 0.9+ for strict matching
26
+ *
27
+ * Lower confidence increases
28
+ * flexibility but may increase
29
+ * false positives.
30
+ *
31
+ * @example
32
+ * await visor.click("save.png");
33
+ *
34
+ * @example
35
+ * await visor.click("./images/save.png", 0.9);
36
+ */
37
+ click(image?: string, confidence?: number): Promise<void>;
38
+ /**
39
+ * Performs a right mouse click.
40
+ *
41
+ * If an image is provided, the framework
42
+ * first finds the image on screen and
43
+ * moves the mouse to the matched region
44
+ * before performing the click.
45
+ *
46
+ * @param image Image filename or path.
47
+ * @param confidence Match confidence threshold.
48
+ *
49
+ * Accepted range:
50
+ * 0.0 to 1.0
51
+ *
52
+ * Default:
53
+ * 0.8
54
+ * @throws Error if image is not found.
55
+ *
56
+ * @example
57
+ * await visor.rightClick("file.png");
58
+ *
59
+ * @example
60
+ * await visor.rightClick();
61
+ */
62
+ rightClick(image?: string, confidence?: number): Promise<void>;
63
+ /**
64
+ * Performs a double left mouse click.
65
+ *
66
+ * If an image is provided, the framework
67
+ * first finds the image on screen and
68
+ * moves the mouse to the matched region
69
+ * before performing the click.
70
+ *
71
+ * @param image Image filename or path.
72
+ * @param confidence Match confidence threshold.
73
+ *
74
+ * Accepted range:
75
+ * 0.0 to 1.0
76
+ *
77
+ * Default:
78
+ * 0.8
79
+ *
80
+ * @throws Error if image is not found.
81
+ *
82
+ * @example
83
+ * await visor.doubleClick("folder.png");
84
+ *
85
+ * @example
86
+ * await visor.doubleClick();
87
+ */
88
+ doubleClick(image?: string, confidence?: number): Promise<void>;
89
+ /**
90
+ * Finds the best matching image on screen
91
+ * using OpenCV template matching.
92
+ *
93
+ * @param image Image filename or path.
94
+ *
95
+ * @param confidence Match confidence threshold.
96
+ *
97
+ * Accepted range:
98
+ * 0.0 to 1.0
99
+ *
100
+ * Default:
101
+ * 0.8
102
+ *
103
+ * Recommended values:
104
+ * - 0.7 for dynamic UI
105
+ * - 0.8 for standard usage
106
+ * - 0.9+ for strict matching
107
+ *
108
+ * Higher confidence improves
109
+ * matching accuracy but may fail
110
+ * on scaled or slightly modified UI.
111
+ *
112
+ * @returns Best matched region or null.
113
+ *
114
+ * @example
115
+ * const region =
116
+ * await visor.find("save.png");
117
+ */
118
+ find(image: string, confidence?: number): Promise<import("./types").Region>;
119
+ /**
120
+ * Checks whether an image exists
121
+ * on the current screen.
122
+ *
123
+ * @param image Image filename or path.
124
+ * @param confidence Match confidence threshold.
125
+ *
126
+ * Accepted range:
127
+ * 0.0 to 1.0
128
+ *
129
+ * Default:
130
+ * 0.8
131
+ *
132
+ * @returns True if image exists.
133
+ *
134
+ * @example
135
+ * const exists =
136
+ * await visor.exists("login.png");
137
+ */
138
+ exists(image: string, confidence?: number): Promise<boolean>;
139
+ /**
140
+ * Finds all matching occurrences of an image
141
+ * on the current screen using OpenCV.
142
+ *
143
+ * @param image Image filename or path.
144
+ * @param confidence Match confidence threshold.
145
+ *
146
+ * Accepted range:
147
+ * 0.0 to 1.0
148
+ *
149
+ * Default:
150
+ * 0.8
151
+ *
152
+ * Lower confidence may return
153
+ * more false-positive matches.
154
+ *
155
+ * @returns Array of matched regions.
156
+ *
157
+ * @example
158
+ * const matches =
159
+ * await visor.findAll("icon.png");
160
+ */
161
+ findAll(image: string, confidence?: number): Promise<import("./types").Region[]>;
162
+ /**
163
+ * Finds all image matches and prints
164
+ * a formatted match preview including
165
+ * coordinates and confidence values.
166
+ *
167
+ * Useful for debugging and visual
168
+ * automation tuning.
169
+ *
170
+ * @param image Image filename or path.
171
+ * @param confidence Match confidence threshold.
172
+ *
173
+ * Accepted range:
174
+ * 0.0 to 1.0
175
+ *
176
+ * Default:
177
+ * 0.8
178
+ *
179
+ * @returns Array of matched regions.
180
+ *
181
+ * @example
182
+ * await visor.previewMatches("button.png");
183
+ */
184
+ previewMatches(image: string, confidence?: number): Promise<import("./types").Region[]>;
185
+ /**
186
+ * Waits until an image appears
187
+ * on the screen.
188
+ *
189
+ * @param image Image filename or path.
190
+ *
191
+ * @param confidence Match confidence threshold.
192
+ *
193
+ * Accepted range:
194
+ * 0.0 to 1.0
195
+ *
196
+ * Default:
197
+ * 0.8
198
+ *
199
+ * Recommended values:
200
+ * - 0.7 for dynamic UI
201
+ * - 0.8 for standard usage
202
+ * - 0.9+ for strict matching
203
+ *
204
+ * @param timeout Timeout duration
205
+ * in milliseconds.
206
+ *
207
+ * Default:
208
+ * 5000ms
209
+ *
210
+ * Recommended range:
211
+ * 1000ms to 30000ms
212
+ *
213
+ * @throws Error if timeout occurs.
214
+ *
215
+ * @example
216
+ * await visor.wait("loading-done.png");
217
+ */
218
+ wait(image: string, confidence?: number, timeout?: number): Promise<boolean>;
219
+ /**
220
+ * Waits until an image disappears
221
+ * from the screen.
222
+ *
223
+ * @param image Image filename or path.
224
+ * @param confidence Match confidence threshold.
225
+ *
226
+ * Accepted range:
227
+ * 0.0 to 1.0
228
+ *
229
+ * Default:
230
+ * 0.8
231
+ * @param timeout Timeout duration
232
+ * in milliseconds.
233
+ *
234
+ * Default:
235
+ * 5000ms
236
+ *
237
+ * Recommended range:
238
+ * 1000ms to 30000ms
239
+ * @throws Error if timeout occurs.
240
+ *
241
+ * @example
242
+ * await visor.waitToVanish("spinner.png");
243
+ */
244
+ waitToVanish(image: string, confidence?: number, timeout?: number): Promise<boolean>;
245
+ /**
246
+ * Waits until specific text appears
247
+ * on screen using OCR.
248
+ *
249
+ * Performance Note:
250
+ * OCR operations are computationally
251
+ * expensive and may take 1–5 seconds
252
+ * depending on screen complexity.
253
+ *
254
+ * @param text Text to search for.
255
+ *
256
+ * @param timeout Timeout duration
257
+ * in milliseconds.
258
+ *
259
+ * Default:
260
+ * 5000ms
261
+ *
262
+ * Recommended range:
263
+ * 1000ms to 30000ms
264
+ *
265
+ * @throws Error if timeout occurs.
266
+ *
267
+ * @example
268
+ * await visor.waitText("Success");
269
+ */
270
+ waitText(text: string, timeout?: number): Promise<boolean>;
271
+ /**
272
+ * Waits until specific text disappears
273
+ * from screen using OCR.
274
+ * Performance Note:
275
+ * OCR operations are computationally
276
+ * expensive and may take 1–5 seconds
277
+ * depending on screen complexity.
278
+ *
279
+ * @param text Text to search for.
280
+ * @param timeout Timeout duration
281
+ * in milliseconds.
282
+ *
283
+ * Default:
284
+ * 5000ms
285
+ *
286
+ * Recommended range:
287
+ * 1000ms to 30000ms
288
+ *
289
+ * @throws Error if timeout occurs.
290
+ *
291
+ * @example
292
+ * await visor.waitTextToVanish("Loading");
293
+ */
294
+ waitTextToVanish(text: string, timeout?: number): Promise<boolean>;
295
+ /**
296
+ * Finds text on screen using OCR
297
+ * and performs a left mouse click
298
+ * on the matched text region.
299
+ *
300
+ * @param text Text to search for.
301
+ *
302
+ * @throws Error if text is not found.
303
+ *
304
+ * @example
305
+ * await visor.clickText("Login");
306
+ */
307
+ clickText(text: string): Promise<void>;
308
+ /**
309
+ * Finds text on screen or inside
310
+ * a specific region using OCR.
311
+ *
312
+ * @param text Text to search for.
313
+ * @param region Optional search region.
314
+ *
315
+ * @returns Matched text region or null.
316
+ *
317
+ * @example
318
+ * const region =
319
+ * await visor.findText("Submit");
320
+ */
321
+ findText(text: string, region?: {
322
+ x: number;
323
+ y: number;
324
+ width: number;
325
+ height: number;
326
+ }): Promise<import("./types").Region>;
327
+ /**
328
+ * Checks whether specific text exists
329
+ * on screen using OCR.
330
+ *
331
+ * @param text Text to search for.
332
+ * @param region Optional search region.
333
+ *
334
+ * @returns True if text exists.
335
+ *
336
+ * @example
337
+ * const exists =
338
+ * await visor.existsText("Teams");
339
+ */
340
+ existsText(text: string, region?: {
341
+ x: number;
342
+ y: number;
343
+ width: number;
344
+ height: number;
345
+ }): Promise<boolean>;
346
+ /**
347
+ * Performs OCR on a specific
348
+ * screen region.
349
+ *
350
+ * @param region Screen region coordinates.
351
+ *
352
+ * @returns OCR result object.
353
+ *
354
+ * @example
355
+ * const result =
356
+ * await visor.readRegion({
357
+ * x: 100,
358
+ * y: 100,
359
+ * width: 500,
360
+ * height: 300
361
+ * });
362
+ */
363
+ readRegion(region: {
364
+ x: number;
365
+ y: number;
366
+ width: number;
367
+ height: number;
368
+ }): Promise<any>;
369
+ /**
370
+ * Performs OCR on the entire screen
371
+ * using Tesseract OCR.
372
+ *
373
+ * Captures the current screen,
374
+ * preprocesses the image, and
375
+ * extracts readable text content.
376
+ *
377
+ * Performance Note:
378
+ * OCR is computationally expensive
379
+ * and may take 1–5 seconds depending
380
+ * on:
381
+ * - screen complexity
382
+ * - text density
383
+ * - display resolution
384
+ * - system performance
385
+ *
386
+ * Returns:
387
+ * - extracted text
388
+ * - OCR metadata
389
+ * - TSV layout information
390
+ * - HOCR data
391
+ *
392
+ * @returns OCR result object.
393
+ *
394
+ * @example
395
+ * const result =
396
+ * await visor.readScreen();
397
+ *
398
+ * console.log(result.text);
399
+ */
400
+ readScreen(): Promise<any>;
401
+ /**
402
+ * Captures a screenshot of the
403
+ * current screen and saves it
404
+ * to the specified path.
405
+ *
406
+ * Supported formats depend on
407
+ * the output file extension.
408
+ *
409
+ * @param path Output image path.
410
+ *
411
+ * @example
412
+ * await visor.captureScreenshot(
413
+ * "./screenshots/home.png"
414
+ * );
415
+ */
416
+ captureScreenshot(path: string): Promise<void>;
417
+ /**
418
+ * Opens a desktop application,
419
+ * executable, file, folder,
420
+ * or URL using Windows shell.
421
+ *
422
+ * Performance Note:
423
+ * Some Electron-based applications
424
+ * may require additional startup
425
+ * stabilization time.
426
+ *
427
+ * @param command App name, executable,
428
+ * file path, or URL.
429
+ *
430
+ * @example
431
+ * await visor.openApp("notepad");
432
+ *
433
+ * @example
434
+ * await visor.openApp("chrome.exe");
435
+ */
436
+ openApp(command: string): Promise<void>;
437
+ /**
438
+ * Drags one visual element and
439
+ * drops it onto another using
440
+ * image matching.
441
+ *
442
+ * @param source Source image.
443
+ *
444
+ * @param target Target image.
445
+ *
446
+ * @param confidence Match confidence threshold.
447
+ *
448
+ * Accepted range:
449
+ * 0.0 to 1.0
450
+ *
451
+ * Default:
452
+ * 0.8
453
+ *
454
+ * Recommended values:
455
+ * - 0.7 for dynamic UI
456
+ * - 0.8 for standard usage
457
+ * - 0.9+ for strict matching
458
+ *
459
+ * @throws Error if source or target
460
+ * image is not found.
461
+ *
462
+ * @example
463
+ * await visor.dragDrop(
464
+ * "file.png",
465
+ * "folder.png"
466
+ * );
467
+ */
468
+ dragDrop(source: string, target: string, confidence?: number): Promise<void>;
469
+ /**
470
+ * Moves the mouse cursor to the
471
+ * matched image location without
472
+ * performing a click.
473
+ *
474
+ * @param image Image filename or path.
475
+ * @param confidence Match confidence threshold.
476
+ *
477
+ * Accepted range:
478
+ * 0.0 to 1.0
479
+ *
480
+ * Default:
481
+ * 0.8
482
+ *
483
+ * @throws Error if image is not found.
484
+ *
485
+ * @example
486
+ * await visor.hover("menu.png");
487
+ */
488
+ hover(image: string, confidence?: number): Promise<void>;
489
+ /**
490
+ * Scrolls the mouse wheel downward.
491
+ *
492
+ * @param amount Scroll amount.
493
+ *
494
+ * Default:
495
+ * 500
496
+ *
497
+ * Recommended range:
498
+ * 100 to 3000
499
+ *
500
+ * @example
501
+ * await visor.scrollDown(1000);
502
+ */
503
+ scrollDown(amount?: number): Promise<void>;
504
+ /**
505
+ * Scrolls the mouse wheel upward.
506
+ *
507
+ * @param amount Scroll amount.
508
+ *
509
+ * Default:
510
+ * 500
511
+ *
512
+ * Recommended range:
513
+ * 100 to 3000
514
+ *
515
+ * @example
516
+ * await visor.scrollUp(1000);
517
+ */
518
+ scrollUp(amount?: number): Promise<void>;
519
+ /**
520
+ * Types text using keyboard automation.
521
+ *
522
+ * @param text Text to type.
523
+ *
524
+ * @example
525
+ * await visor.type("Hello World");
526
+ */
527
+ type(text: string): Promise<void>;
528
+ /**
529
+ * Presses one or more keyboard keys.
530
+ *
531
+ * Supports both single key presses
532
+ * and hotkey combinations.
533
+ *
534
+ * @param keys Keyboard keys to press.
535
+ *
536
+ * @example
537
+ * await visor.press(visor.Key.Enter);
538
+ *
539
+ * @example
540
+ * await visor.press(
541
+ * visor.Key.LeftControl,
542
+ * visor.Key.S
543
+ * );
544
+ */
545
+ press(...keys: any[]): Promise<void>;
546
+ /**
547
+ * Pauses execution for a specified
548
+ * duration.
549
+ *
550
+ * Useful for:
551
+ * - UI stabilization
552
+ * - animation completion
553
+ * - Electron rendering delays
554
+ * - OCR synchronization
555
+ * - desktop transition handling
556
+ *
557
+ * Recommended for short stabilization
558
+ * waits rather than long fixed delays.
559
+ *
560
+ * @param ms Delay duration
561
+ * in milliseconds.
562
+ *
563
+ * Recommended range:
564
+ * 200ms to 5000ms
565
+ *
566
+ * Excessive sleep usage may
567
+ * slow automation execution.
568
+ *
569
+ * @example
570
+ * await visor.sleep(2000);
571
+ */
572
+ sleep(ms: number): Promise<unknown>;
573
+ /**
574
+ * Moves the mouse cursor to the
575
+ * specified screen coordinates.
576
+ *
577
+ * Coordinates should match the
578
+ * current display scaling setup.
579
+ *
580
+ * @param x X coordinate.
581
+ * @param y Y coordinate.
582
+ *
583
+ * @example
584
+ * await visor.moveMouse(500, 300);
585
+ */
586
+ moveMouse(x: number, y: number): Promise<void>;
587
+ /**
588
+ * Returns the current mouse cursor
589
+ * position.
590
+ *
591
+ * @returns Current mouse coordinates.
592
+ *
593
+ * @example
594
+ * const pos =
595
+ * await visor.getMousePosition();
596
+ */
597
+ getMousePosition(): Promise<Point>;
598
+ /**
599
+ * Sets the display scaling factor
600
+ * used for coordinate normalization
601
+ * and image matching.
602
+ *
603
+ * Required for:
604
+ * - high-DPI displays
605
+ * - Windows display scaling
606
+ * - accurate mouse positioning
607
+ * - reliable template matching
608
+ *
609
+ * Common values:
610
+ * - 1.0 = 100% scaling
611
+ * - 1.25 = 125% scaling
612
+ * - 1.5 = 150% scaling
613
+ * - 2.0 = 200% scaling
614
+ *
615
+ * Incorrect scaling values may cause:
616
+ * - inaccurate clicks
617
+ * - failed image matching
618
+ * - incorrect OCR regions
619
+ * - offset mouse movement
620
+ *
621
+ * @param scale Display scaling factor.
622
+ *
623
+ * Recommended range:
624
+ * 1.0 to 2.0
625
+ *
626
+ * @example
627
+ * visor.setScaleFactor(1.5);
628
+ */
629
+ setScaleFactor(scale: number): void;
630
+ /**
631
+ * Returns the current display
632
+ * scaling factor.
633
+ *
634
+ * @returns Current scale factor.
635
+ *
636
+ * @example
637
+ * const scale =
638
+ * visor.getScaleFactor();
639
+ */
640
+ getScaleFactor(): number;
641
+ /**
642
+ * Enables or disables debug logging.
643
+ *
644
+ * @param mode Debug mode state.
645
+ *
646
+ * @example
647
+ * visor.setDebug(true);
648
+ */
649
+ setDebug(mode: boolean): void;
650
+ /**
651
+ * Sets the default image search path
652
+ * used for visual automation APIs.
653
+ *
654
+ * @param path Image directory path.
655
+ *
656
+ * @example
657
+ * visor.setImagePath("./images");
658
+ */
659
+ setImagePath(path: string): void;
660
+ /**
661
+ * Returns the current default
662
+ * image search path.
663
+ *
664
+ * @returns Image path.
665
+ *
666
+ * @example
667
+ * const path =
668
+ * visor.getImagePath();
669
+ */
670
+ getImagePath(): string;
671
+ /**
672
+ * Closes a desktop application
673
+ * using Windows taskkill.
674
+ *
675
+ * @param processName Process executable name.
676
+ *
677
+ * @example
678
+ * await visor.closeApp("notepad.exe");
679
+ *
680
+ * @example
681
+ * await visor.closeApp("ms-teams.exe");
682
+ */
683
+ closeApp(processName: string): Promise<void>;
684
+ /**
685
+ * Loads multiple framework settings
686
+ * at once from a configuration object.
687
+ *
688
+ * Useful for centralized framework
689
+ * initialization and project setup.
690
+ *
691
+ * Supported settings:
692
+ * - scaleFactor
693
+ * - imagePath
694
+ * - debug
695
+ *
696
+ * @param config Framework configuration object.
697
+ *
698
+ * @example
699
+ * visor.loadConfig({
700
+ * scaleFactor: 1.5,
701
+ * imagePath: "./images",
702
+ * debug: true
703
+ * });
704
+ */
705
+ loadConfig(config: {
706
+ scaleFactor?: number;
707
+ imagePath?: string;
708
+ debug?: boolean;
709
+ }): void;
710
+ /**
711
+ * Finds the first matching image
712
+ * from a list of possible images.
713
+ *
714
+ * Useful for handling:
715
+ * - light/dark themes
716
+ * - UI variations
717
+ * - multiple visual states
718
+ *
719
+ * @param images Array of image filenames or paths.
720
+ * @param confidence Match confidence threshold.
721
+ *
722
+ * Accepted range:
723
+ * 0.0 to 1.0
724
+ *
725
+ * Default:
726
+ * 0.8
727
+ *
728
+ * @returns Object containing matched image
729
+ * and region, or null if none matched.
730
+ *
731
+ * @example
732
+ * const result =
733
+ * await visor.findAny([
734
+ * "chat-light.png",
735
+ * "chat-dark.png"
736
+ * ]);
737
+ */
738
+ findAny(images: string[], confidence?: number): Promise<{
739
+ image: string;
740
+ region: import("./types").Region;
741
+ }>;
742
+ /**
743
+ * Checks whether any image from
744
+ * a list exists on the current screen.
745
+ *
746
+ * Useful for handling:
747
+ * - multiple themes
748
+ * - alternate UI layouts
749
+ * - dynamic visual states
750
+ *
751
+ * @param images Array of image filenames or paths.
752
+ * @param confidence Match confidence threshold.
753
+ *
754
+ * Accepted range:
755
+ * 0.0 to 1.0
756
+ *
757
+ * Default:
758
+ * 0.8
759
+ *
760
+ * @returns True if any image exists.
761
+ *
762
+ * @example
763
+ * const exists =
764
+ * await visor.existsAny([
765
+ * "save-light.png",
766
+ * "save-dark.png"
767
+ * ]);
768
+ */
769
+ existsAny(images: string[], confidence?: number): Promise<boolean>;
770
+ /**
771
+ * Finds the first matching image
772
+ * from a list and performs a
773
+ * left mouse click on it.
774
+ *
775
+ * Useful for handling:
776
+ * - light/dark themes
777
+ * - UI variations
778
+ * - dynamic buttons/icons
779
+ *
780
+ * @param images Array of image
781
+ * filenames or paths.
782
+ *
783
+ * @param confidence Match confidence threshold.
784
+ *
785
+ * Accepted range:
786
+ * 0.0 to 1.0
787
+ *
788
+ * Default:
789
+ * 0.8
790
+ *
791
+ * Recommended values:
792
+ * - 0.7 for dynamic UI
793
+ * - 0.8 for standard usage
794
+ * - 0.9+ for strict matching
795
+ *
796
+ * Lower confidence increases
797
+ * flexibility but may increase
798
+ * false positives.
799
+ *
800
+ * @throws Error if none of the
801
+ * images are found.
802
+ *
803
+ * @example
804
+ * await visor.clickAny([
805
+ * "send-light.png",
806
+ * "send-dark.png"
807
+ * ]);
808
+ */
809
+ clickAny(images: string[], confidence?: number): Promise<void>;
810
+ /**
811
+ * Waits until any image from
812
+ * a list appears on screen.
813
+ *
814
+ * Useful for handling:
815
+ * - multiple themes
816
+ * - alternate UI layouts
817
+ * - dynamic application states
818
+ *
819
+ * @param images Array of image
820
+ * filenames or paths.
821
+ *
822
+ * @param confidence Match confidence threshold.
823
+ *
824
+ * Accepted range:
825
+ * 0.0 to 1.0
826
+ *
827
+ * Default:
828
+ * 0.8
829
+ *
830
+ * Recommended values:
831
+ * - 0.7 for dynamic UI
832
+ * - 0.8 for standard usage
833
+ * - 0.9+ for strict matching
834
+ *
835
+ * Lower confidence increases
836
+ * flexibility but may increase
837
+ * false positives.
838
+ *
839
+ * @param timeout Timeout duration
840
+ * in milliseconds.
841
+ *
842
+ * Default:
843
+ * 5000ms
844
+ *
845
+ * Recommended range:
846
+ * 1000ms to 30000ms
847
+ *
848
+ * @returns Object containing matched image
849
+ * and region.
850
+ *
851
+ * @throws Error if timeout occurs.
852
+ *
853
+ * @example
854
+ * await visor.waitAny([
855
+ * "home-light.png",
856
+ * "home-dark.png"
857
+ * ]);
858
+ */
859
+ waitAny(images: string[], confidence?: number, timeout?: number): Promise<boolean>;
860
+ /**
861
+ * Terminates shared OCR worker.
862
+ *
863
+ * Useful for framework cleanup
864
+ * after long automation sessions.
865
+ *
866
+ * Recommended for:
867
+ * - long-running automation
868
+ * - memory cleanup
869
+ * - graceful framework shutdown
870
+ * @example
871
+ * await visor.terminateOCR();
872
+ */
873
+ terminateOCR(): Promise<void>;
874
+ }
875
+ export declare const visor: Visor;