@vitest-agent/sdk 2.5.0 → 3.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,963 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://vitest-agent.dev/schemas/run-report-file-1.0.0.json",
4
+ "$ref": "#/$defs/RunReportFile",
5
+ "$defs": {
6
+ "IsoInstant": {
7
+ "type": "string",
8
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?(?:Z|[+-]\\d{2}:\\d{2})$",
9
+ "description": "An ISO-8601 instant, the shape Date.prototype.toISOString produces."
10
+ },
11
+ "TestRunReason": {
12
+ "type": "string",
13
+ "enum": ["passed", "failed", "interrupted"]
14
+ },
15
+ "ReportSummary": {
16
+ "type": "object",
17
+ "properties": {
18
+ "total": {
19
+ "anyOf": [
20
+ {
21
+ "type": "number"
22
+ },
23
+ {
24
+ "type": "string",
25
+ "enum": ["Infinity", "-Infinity", "NaN"]
26
+ }
27
+ ]
28
+ },
29
+ "passed": {
30
+ "anyOf": [
31
+ {
32
+ "type": "number"
33
+ },
34
+ {
35
+ "type": "string",
36
+ "enum": ["Infinity", "-Infinity", "NaN"]
37
+ }
38
+ ]
39
+ },
40
+ "failed": {
41
+ "anyOf": [
42
+ {
43
+ "type": "number"
44
+ },
45
+ {
46
+ "type": "string",
47
+ "enum": ["Infinity", "-Infinity", "NaN"]
48
+ }
49
+ ]
50
+ },
51
+ "skipped": {
52
+ "anyOf": [
53
+ {
54
+ "type": "number"
55
+ },
56
+ {
57
+ "type": "string",
58
+ "enum": ["Infinity", "-Infinity", "NaN"]
59
+ }
60
+ ]
61
+ },
62
+ "duration": {
63
+ "anyOf": [
64
+ {
65
+ "type": "number"
66
+ },
67
+ {
68
+ "type": "string",
69
+ "enum": ["Infinity", "-Infinity", "NaN"]
70
+ }
71
+ ]
72
+ },
73
+ "modules": {
74
+ "anyOf": [
75
+ {
76
+ "anyOf": [
77
+ {
78
+ "type": "number"
79
+ },
80
+ {
81
+ "type": "string",
82
+ "enum": ["Infinity", "-Infinity", "NaN"]
83
+ }
84
+ ]
85
+ },
86
+ {
87
+ "type": "null"
88
+ }
89
+ ]
90
+ }
91
+ },
92
+ "required": ["total", "passed", "failed", "skipped", "duration"],
93
+ "additionalProperties": false
94
+ },
95
+ "TestState": {
96
+ "type": "string",
97
+ "enum": ["passed", "failed", "skipped", "pending"]
98
+ },
99
+ "ReportError": {
100
+ "type": "object",
101
+ "properties": {
102
+ "message": {
103
+ "type": "string"
104
+ },
105
+ "stack": {
106
+ "anyOf": [
107
+ {
108
+ "type": "string"
109
+ },
110
+ {
111
+ "type": "null"
112
+ }
113
+ ]
114
+ },
115
+ "diff": {
116
+ "anyOf": [
117
+ {
118
+ "type": "string"
119
+ },
120
+ {
121
+ "type": "null"
122
+ }
123
+ ]
124
+ },
125
+ "expected": {
126
+ "anyOf": [
127
+ {
128
+ "type": "string"
129
+ },
130
+ {
131
+ "type": "null"
132
+ }
133
+ ]
134
+ },
135
+ "received": {
136
+ "anyOf": [
137
+ {
138
+ "type": "string"
139
+ },
140
+ {
141
+ "type": "null"
142
+ }
143
+ ]
144
+ }
145
+ },
146
+ "required": ["message"],
147
+ "additionalProperties": false
148
+ },
149
+ "TestClassification": {
150
+ "type": "string",
151
+ "enum": ["stable", "new-failure", "persistent", "flaky", "recovered"]
152
+ },
153
+ "TestReport": {
154
+ "type": "object",
155
+ "properties": {
156
+ "name": {
157
+ "type": "string"
158
+ },
159
+ "fullName": {
160
+ "type": "string"
161
+ },
162
+ "state": {
163
+ "$ref": "#/$defs/TestState"
164
+ },
165
+ "duration": {
166
+ "anyOf": [
167
+ {
168
+ "anyOf": [
169
+ {
170
+ "type": "number"
171
+ },
172
+ {
173
+ "type": "string",
174
+ "enum": ["Infinity", "-Infinity", "NaN"]
175
+ }
176
+ ]
177
+ },
178
+ {
179
+ "type": "null"
180
+ }
181
+ ]
182
+ },
183
+ "flaky": {
184
+ "anyOf": [
185
+ {
186
+ "type": "boolean"
187
+ },
188
+ {
189
+ "type": "null"
190
+ }
191
+ ]
192
+ },
193
+ "slow": {
194
+ "anyOf": [
195
+ {
196
+ "type": "boolean"
197
+ },
198
+ {
199
+ "type": "null"
200
+ }
201
+ ]
202
+ },
203
+ "errors": {
204
+ "anyOf": [
205
+ {
206
+ "type": "array",
207
+ "items": {
208
+ "$ref": "#/$defs/ReportError"
209
+ }
210
+ },
211
+ {
212
+ "type": "null"
213
+ }
214
+ ]
215
+ },
216
+ "classification": {
217
+ "anyOf": [
218
+ {
219
+ "$ref": "#/$defs/TestClassification"
220
+ },
221
+ {
222
+ "type": "null"
223
+ }
224
+ ]
225
+ }
226
+ },
227
+ "required": ["name", "fullName", "state"],
228
+ "additionalProperties": false
229
+ },
230
+ "ModuleReport": {
231
+ "type": "object",
232
+ "properties": {
233
+ "file": {
234
+ "type": "string"
235
+ },
236
+ "state": {
237
+ "$ref": "#/$defs/TestState"
238
+ },
239
+ "duration": {
240
+ "anyOf": [
241
+ {
242
+ "anyOf": [
243
+ {
244
+ "type": "number"
245
+ },
246
+ {
247
+ "type": "string",
248
+ "enum": ["Infinity", "-Infinity", "NaN"]
249
+ }
250
+ ]
251
+ },
252
+ {
253
+ "type": "null"
254
+ }
255
+ ]
256
+ },
257
+ "errors": {
258
+ "anyOf": [
259
+ {
260
+ "type": "array",
261
+ "items": {
262
+ "$ref": "#/$defs/ReportError"
263
+ }
264
+ },
265
+ {
266
+ "type": "null"
267
+ }
268
+ ]
269
+ },
270
+ "tests": {
271
+ "type": "array",
272
+ "items": {
273
+ "$ref": "#/$defs/TestReport"
274
+ }
275
+ }
276
+ },
277
+ "required": ["file", "state", "tests"],
278
+ "additionalProperties": false
279
+ },
280
+ "CoverageTotals": {
281
+ "type": "object",
282
+ "properties": {
283
+ "statements": {
284
+ "anyOf": [
285
+ {
286
+ "type": "number"
287
+ },
288
+ {
289
+ "type": "string",
290
+ "enum": ["Infinity", "-Infinity", "NaN"]
291
+ }
292
+ ]
293
+ },
294
+ "branches": {
295
+ "anyOf": [
296
+ {
297
+ "type": "number"
298
+ },
299
+ {
300
+ "type": "string",
301
+ "enum": ["Infinity", "-Infinity", "NaN"]
302
+ }
303
+ ]
304
+ },
305
+ "functions": {
306
+ "anyOf": [
307
+ {
308
+ "type": "number"
309
+ },
310
+ {
311
+ "type": "string",
312
+ "enum": ["Infinity", "-Infinity", "NaN"]
313
+ }
314
+ ]
315
+ },
316
+ "lines": {
317
+ "anyOf": [
318
+ {
319
+ "type": "number"
320
+ },
321
+ {
322
+ "type": "string",
323
+ "enum": ["Infinity", "-Infinity", "NaN"]
324
+ }
325
+ ]
326
+ }
327
+ },
328
+ "required": ["statements", "branches", "functions", "lines"],
329
+ "additionalProperties": false
330
+ },
331
+ "MetricThresholds": {
332
+ "type": "object",
333
+ "properties": {
334
+ "lines": {
335
+ "anyOf": [
336
+ {
337
+ "anyOf": [
338
+ {
339
+ "type": "number"
340
+ },
341
+ {
342
+ "type": "string",
343
+ "enum": ["Infinity", "-Infinity", "NaN"]
344
+ }
345
+ ]
346
+ },
347
+ {
348
+ "type": "null"
349
+ }
350
+ ]
351
+ },
352
+ "functions": {
353
+ "anyOf": [
354
+ {
355
+ "anyOf": [
356
+ {
357
+ "type": "number"
358
+ },
359
+ {
360
+ "type": "string",
361
+ "enum": ["Infinity", "-Infinity", "NaN"]
362
+ }
363
+ ]
364
+ },
365
+ {
366
+ "type": "null"
367
+ }
368
+ ]
369
+ },
370
+ "branches": {
371
+ "anyOf": [
372
+ {
373
+ "anyOf": [
374
+ {
375
+ "type": "number"
376
+ },
377
+ {
378
+ "type": "string",
379
+ "enum": ["Infinity", "-Infinity", "NaN"]
380
+ }
381
+ ]
382
+ },
383
+ {
384
+ "type": "null"
385
+ }
386
+ ]
387
+ },
388
+ "statements": {
389
+ "anyOf": [
390
+ {
391
+ "anyOf": [
392
+ {
393
+ "type": "number"
394
+ },
395
+ {
396
+ "type": "string",
397
+ "enum": ["Infinity", "-Infinity", "NaN"]
398
+ }
399
+ ]
400
+ },
401
+ {
402
+ "type": "null"
403
+ }
404
+ ]
405
+ }
406
+ },
407
+ "additionalProperties": false
408
+ },
409
+ "PerFileThresholds": {
410
+ "anyOf": [
411
+ {
412
+ "type": "boolean"
413
+ },
414
+ {
415
+ "$ref": "#/$defs/MetricThresholds"
416
+ }
417
+ ]
418
+ },
419
+ "PatternMetricThresholds": {
420
+ "type": "object",
421
+ "properties": {
422
+ "lines": {
423
+ "anyOf": [
424
+ {
425
+ "anyOf": [
426
+ {
427
+ "type": "number"
428
+ },
429
+ {
430
+ "type": "string",
431
+ "enum": ["Infinity", "-Infinity", "NaN"]
432
+ }
433
+ ]
434
+ },
435
+ {
436
+ "type": "null"
437
+ }
438
+ ]
439
+ },
440
+ "functions": {
441
+ "anyOf": [
442
+ {
443
+ "anyOf": [
444
+ {
445
+ "type": "number"
446
+ },
447
+ {
448
+ "type": "string",
449
+ "enum": ["Infinity", "-Infinity", "NaN"]
450
+ }
451
+ ]
452
+ },
453
+ {
454
+ "type": "null"
455
+ }
456
+ ]
457
+ },
458
+ "branches": {
459
+ "anyOf": [
460
+ {
461
+ "anyOf": [
462
+ {
463
+ "type": "number"
464
+ },
465
+ {
466
+ "type": "string",
467
+ "enum": ["Infinity", "-Infinity", "NaN"]
468
+ }
469
+ ]
470
+ },
471
+ {
472
+ "type": "null"
473
+ }
474
+ ]
475
+ },
476
+ "statements": {
477
+ "anyOf": [
478
+ {
479
+ "anyOf": [
480
+ {
481
+ "type": "number"
482
+ },
483
+ {
484
+ "type": "string",
485
+ "enum": ["Infinity", "-Infinity", "NaN"]
486
+ }
487
+ ]
488
+ },
489
+ {
490
+ "type": "null"
491
+ }
492
+ ]
493
+ },
494
+ "perFile": {
495
+ "$ref": "#/$defs/PerFileThresholds"
496
+ }
497
+ },
498
+ "additionalProperties": false
499
+ },
500
+ "PatternThresholds": {
501
+ "type": "array",
502
+ "maxItems": 2,
503
+ "minItems": 2,
504
+ "items": [
505
+ {
506
+ "type": "string"
507
+ },
508
+ {
509
+ "$ref": "#/$defs/PatternMetricThresholds"
510
+ }
511
+ ]
512
+ },
513
+ "FileCoverageReport": {
514
+ "type": "object",
515
+ "properties": {
516
+ "file": {
517
+ "type": "string"
518
+ },
519
+ "summary": {
520
+ "$ref": "#/$defs/CoverageTotals"
521
+ },
522
+ "uncoveredLines": {
523
+ "type": "string"
524
+ }
525
+ },
526
+ "required": ["file", "summary", "uncoveredLines"],
527
+ "additionalProperties": false
528
+ },
529
+ "CoverageReport": {
530
+ "type": "object",
531
+ "properties": {
532
+ "totals": {
533
+ "$ref": "#/$defs/CoverageTotals"
534
+ },
535
+ "thresholds": {
536
+ "type": "object",
537
+ "properties": {
538
+ "global": {
539
+ "$ref": "#/$defs/MetricThresholds"
540
+ },
541
+ "patterns": {
542
+ "type": "array",
543
+ "items": {
544
+ "$ref": "#/$defs/PatternThresholds"
545
+ }
546
+ }
547
+ },
548
+ "required": ["global"],
549
+ "additionalProperties": false
550
+ },
551
+ "targets": {
552
+ "anyOf": [
553
+ {
554
+ "type": "object",
555
+ "properties": {
556
+ "global": {
557
+ "$ref": "#/$defs/MetricThresholds"
558
+ },
559
+ "patterns": {
560
+ "type": "array",
561
+ "items": {
562
+ "$ref": "#/$defs/PatternThresholds"
563
+ }
564
+ }
565
+ },
566
+ "required": ["global"],
567
+ "additionalProperties": false
568
+ },
569
+ {
570
+ "type": "null"
571
+ }
572
+ ]
573
+ },
574
+ "baselines": {
575
+ "anyOf": [
576
+ {
577
+ "type": "object",
578
+ "properties": {
579
+ "global": {
580
+ "$ref": "#/$defs/MetricThresholds"
581
+ },
582
+ "patterns": {
583
+ "type": "array",
584
+ "items": {
585
+ "$ref": "#/$defs/PatternThresholds"
586
+ }
587
+ }
588
+ },
589
+ "required": ["global"],
590
+ "additionalProperties": false
591
+ },
592
+ {
593
+ "type": "null"
594
+ }
595
+ ]
596
+ },
597
+ "scoped": {
598
+ "type": "boolean"
599
+ },
600
+ "scopedFiles": {
601
+ "anyOf": [
602
+ {
603
+ "type": "array",
604
+ "items": {
605
+ "type": "string"
606
+ }
607
+ },
608
+ {
609
+ "type": "null"
610
+ }
611
+ ]
612
+ },
613
+ "totalFiles": {
614
+ "anyOf": [
615
+ {
616
+ "anyOf": [
617
+ {
618
+ "type": "number"
619
+ },
620
+ {
621
+ "type": "string",
622
+ "enum": ["Infinity", "-Infinity", "NaN"]
623
+ }
624
+ ]
625
+ },
626
+ {
627
+ "type": "null"
628
+ }
629
+ ]
630
+ },
631
+ "lowCoverage": {
632
+ "type": "array",
633
+ "items": {
634
+ "$ref": "#/$defs/FileCoverageReport"
635
+ }
636
+ },
637
+ "lowCoverageFiles": {
638
+ "type": "array",
639
+ "items": {
640
+ "type": "string"
641
+ }
642
+ },
643
+ "belowTarget": {
644
+ "anyOf": [
645
+ {
646
+ "type": "array",
647
+ "items": {
648
+ "$ref": "#/$defs/FileCoverageReport"
649
+ }
650
+ },
651
+ {
652
+ "type": "null"
653
+ }
654
+ ]
655
+ },
656
+ "belowTargetFiles": {
657
+ "anyOf": [
658
+ {
659
+ "type": "array",
660
+ "items": {
661
+ "type": "string"
662
+ }
663
+ },
664
+ {
665
+ "type": "null"
666
+ }
667
+ ]
668
+ }
669
+ },
670
+ "required": ["totals", "thresholds", "lowCoverage", "lowCoverageFiles"],
671
+ "additionalProperties": false
672
+ },
673
+ "TagCountEntry": {
674
+ "type": "object",
675
+ "properties": {
676
+ "passed": {
677
+ "anyOf": [
678
+ {
679
+ "anyOf": [
680
+ {
681
+ "type": "number"
682
+ },
683
+ {
684
+ "type": "string",
685
+ "enum": ["Infinity", "-Infinity", "NaN"]
686
+ }
687
+ ]
688
+ },
689
+ {
690
+ "type": "null"
691
+ }
692
+ ]
693
+ },
694
+ "failed": {
695
+ "anyOf": [
696
+ {
697
+ "anyOf": [
698
+ {
699
+ "type": "number"
700
+ },
701
+ {
702
+ "type": "string",
703
+ "enum": ["Infinity", "-Infinity", "NaN"]
704
+ }
705
+ ]
706
+ },
707
+ {
708
+ "type": "null"
709
+ }
710
+ ]
711
+ },
712
+ "skipped": {
713
+ "anyOf": [
714
+ {
715
+ "anyOf": [
716
+ {
717
+ "type": "number"
718
+ },
719
+ {
720
+ "type": "string",
721
+ "enum": ["Infinity", "-Infinity", "NaN"]
722
+ }
723
+ ]
724
+ },
725
+ {
726
+ "type": "null"
727
+ }
728
+ ]
729
+ }
730
+ },
731
+ "additionalProperties": false
732
+ },
733
+ "ConsoleLeakFile": {
734
+ "type": "object",
735
+ "properties": {
736
+ "file": {
737
+ "type": "string"
738
+ },
739
+ "stdout": {
740
+ "anyOf": [
741
+ {
742
+ "type": "number"
743
+ },
744
+ {
745
+ "type": "string",
746
+ "enum": ["Infinity", "-Infinity", "NaN"]
747
+ }
748
+ ]
749
+ },
750
+ "stderr": {
751
+ "anyOf": [
752
+ {
753
+ "type": "number"
754
+ },
755
+ {
756
+ "type": "string",
757
+ "enum": ["Infinity", "-Infinity", "NaN"]
758
+ }
759
+ ]
760
+ },
761
+ "tests": {
762
+ "anyOf": [
763
+ {
764
+ "type": "array",
765
+ "items": {
766
+ "type": "string"
767
+ }
768
+ },
769
+ {
770
+ "type": "null"
771
+ }
772
+ ]
773
+ },
774
+ "sample": {
775
+ "anyOf": [
776
+ {
777
+ "type": "string"
778
+ },
779
+ {
780
+ "type": "null"
781
+ }
782
+ ]
783
+ }
784
+ },
785
+ "required": ["file", "stdout", "stderr"],
786
+ "additionalProperties": false
787
+ },
788
+ "ConsoleLeaksFromFailingTests": {
789
+ "type": "object",
790
+ "properties": {
791
+ "total": {
792
+ "anyOf": [
793
+ {
794
+ "type": "number"
795
+ },
796
+ {
797
+ "type": "string",
798
+ "enum": ["Infinity", "-Infinity", "NaN"]
799
+ }
800
+ ]
801
+ },
802
+ "files": {
803
+ "anyOf": [
804
+ {
805
+ "type": "number"
806
+ },
807
+ {
808
+ "type": "string",
809
+ "enum": ["Infinity", "-Infinity", "NaN"]
810
+ }
811
+ ]
812
+ }
813
+ },
814
+ "required": ["total", "files"],
815
+ "additionalProperties": false
816
+ },
817
+ "ConsoleLeaks": {
818
+ "type": "object",
819
+ "properties": {
820
+ "total": {
821
+ "anyOf": [
822
+ {
823
+ "type": "number"
824
+ },
825
+ {
826
+ "type": "string",
827
+ "enum": ["Infinity", "-Infinity", "NaN"]
828
+ }
829
+ ]
830
+ },
831
+ "byFile": {
832
+ "type": "array",
833
+ "items": {
834
+ "$ref": "#/$defs/ConsoleLeakFile"
835
+ }
836
+ },
837
+ "truncated": {
838
+ "anyOf": [
839
+ {
840
+ "type": "boolean"
841
+ },
842
+ {
843
+ "type": "null"
844
+ }
845
+ ]
846
+ },
847
+ "fromFailingTests": {
848
+ "anyOf": [
849
+ {
850
+ "$ref": "#/$defs/ConsoleLeaksFromFailingTests"
851
+ },
852
+ {
853
+ "type": "null"
854
+ }
855
+ ]
856
+ }
857
+ },
858
+ "required": ["total", "byFile"],
859
+ "additionalProperties": false
860
+ },
861
+ "AgentReport": {
862
+ "type": "object",
863
+ "properties": {
864
+ "timestamp": {
865
+ "type": "string"
866
+ },
867
+ "project": {
868
+ "anyOf": [
869
+ {
870
+ "type": "string"
871
+ },
872
+ {
873
+ "type": "null"
874
+ }
875
+ ]
876
+ },
877
+ "reason": {
878
+ "$ref": "#/$defs/TestRunReason"
879
+ },
880
+ "summary": {
881
+ "$ref": "#/$defs/ReportSummary"
882
+ },
883
+ "failed": {
884
+ "type": "array",
885
+ "items": {
886
+ "$ref": "#/$defs/ModuleReport"
887
+ }
888
+ },
889
+ "unhandledErrors": {
890
+ "type": "array",
891
+ "items": {
892
+ "$ref": "#/$defs/ReportError"
893
+ }
894
+ },
895
+ "failedFiles": {
896
+ "type": "array",
897
+ "items": {
898
+ "type": "string"
899
+ }
900
+ },
901
+ "coverage": {
902
+ "anyOf": [
903
+ {
904
+ "$ref": "#/$defs/CoverageReport"
905
+ },
906
+ {
907
+ "type": "null"
908
+ }
909
+ ]
910
+ },
911
+ "tagCounts": {
912
+ "anyOf": [
913
+ {
914
+ "type": "object",
915
+ "additionalProperties": {
916
+ "$ref": "#/$defs/TagCountEntry"
917
+ }
918
+ },
919
+ {
920
+ "type": "null"
921
+ }
922
+ ]
923
+ },
924
+ "consoleLeaks": {
925
+ "anyOf": [
926
+ {
927
+ "$ref": "#/$defs/ConsoleLeaks"
928
+ },
929
+ {
930
+ "type": "null"
931
+ }
932
+ ]
933
+ }
934
+ },
935
+ "required": ["timestamp", "reason", "summary", "failed", "unhandledErrors", "failedFiles"],
936
+ "additionalProperties": false
937
+ },
938
+ "RunReportFile": {
939
+ "type": "object",
940
+ "properties": {
941
+ "$schema": {
942
+ "type": "string"
943
+ },
944
+ "schemaVersion": {
945
+ "type": "number",
946
+ "enum": [1]
947
+ },
948
+ "generatedAt": {
949
+ "$ref": "#/$defs/IsoInstant"
950
+ },
951
+ "reports": {
952
+ "type": "array",
953
+ "items": {
954
+ "$ref": "#/$defs/AgentReport"
955
+ }
956
+ }
957
+ },
958
+ "required": ["schemaVersion", "generatedAt", "reports"],
959
+ "additionalProperties": false,
960
+ "description": "The vitest-agent run report file (.vitest/vitest-agent/run.json): one AgentReport per Vitest project from the most recent run. Read reports[].summary for pass/fail counts and reports[].failed for the failing modules and their tests. schemaVersion is the envelope contract version; generatedAt is when the run finished."
961
+ }
962
+ }
963
+ }