@probelabs/visor 0.1.72 → 0.1.74

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.
@@ -1,3 +1,66 @@
1
+ interface AIDebugInfo {
2
+ /** The prompt sent to the AI */
3
+ prompt: string;
4
+ /** Raw response from the AI service */
5
+ rawResponse: string;
6
+ /** Provider used (google, anthropic, openai) */
7
+ provider: string;
8
+ /** Model used */
9
+ model: string;
10
+ /** API key source (for privacy, just show which env var) */
11
+ apiKeySource: string;
12
+ /** Processing time in milliseconds */
13
+ processingTime: number;
14
+ /** Prompt length in characters */
15
+ promptLength: number;
16
+ /** Response length in characters */
17
+ responseLength: number;
18
+ /** Any errors encountered */
19
+ errors?: string[];
20
+ /** Whether JSON parsing succeeded */
21
+ jsonParseSuccess: boolean;
22
+ /** Schema used for response validation */
23
+ schema?: string;
24
+ /** Schema name/type requested */
25
+ schemaName?: string;
26
+ /** Checks executed during this review */
27
+ checksExecuted?: string[];
28
+ /** Whether parallel execution was used */
29
+ parallelExecution?: boolean;
30
+ /** Timestamp when request was made */
31
+ timestamp: string;
32
+ /** Total API calls made */
33
+ totalApiCalls?: number;
34
+ /** Details about API calls made */
35
+ apiCallDetails?: Array<{
36
+ checkName: string;
37
+ provider: string;
38
+ model: string;
39
+ processingTime: number;
40
+ success: boolean;
41
+ }>;
42
+ }
43
+
44
+ interface ReviewIssue {
45
+ file: string;
46
+ line: number;
47
+ endLine?: number;
48
+ ruleId: string;
49
+ message: string;
50
+ severity: 'info' | 'warning' | 'error' | 'critical';
51
+ category: 'security' | 'performance' | 'style' | 'logic' | 'documentation';
52
+ checkName?: string;
53
+ group?: string;
54
+ schema?: string;
55
+ timestamp?: number;
56
+ suggestion?: string;
57
+ replacement?: string;
58
+ }
59
+ interface ReviewSummary {
60
+ issues?: ReviewIssue[];
61
+ debug?: AIDebugInfo;
62
+ }
63
+
1
64
  /**
2
65
  * Types for Visor configuration system
3
66
  */
@@ -429,67 +492,41 @@ interface VisorConfig {
429
492
  routing?: RoutingDefaults;
430
493
  }
431
494
 
432
- interface AIDebugInfo {
433
- /** The prompt sent to the AI */
434
- prompt: string;
435
- /** Raw response from the AI service */
436
- rawResponse: string;
437
- /** Provider used (google, anthropic, openai) */
438
- provider: string;
439
- /** Model used */
440
- model: string;
441
- /** API key source (for privacy, just show which env var) */
442
- apiKeySource: string;
443
- /** Processing time in milliseconds */
444
- processingTime: number;
445
- /** Prompt length in characters */
446
- promptLength: number;
447
- /** Response length in characters */
448
- responseLength: number;
449
- /** Any errors encountered */
450
- errors?: string[];
451
- /** Whether JSON parsing succeeded */
452
- jsonParseSuccess: boolean;
453
- /** Schema used for response validation */
454
- schema?: string;
455
- /** Schema name/type requested */
456
- schemaName?: string;
457
- /** Checks executed during this review */
458
- checksExecuted?: string[];
459
- /** Whether parallel execution was used */
460
- parallelExecution?: boolean;
461
- /** Timestamp when request was made */
462
- timestamp: string;
463
- /** Total API calls made */
464
- totalApiCalls?: number;
465
- /** Details about API calls made */
466
- apiCallDetails?: Array<{
467
- checkName: string;
468
- provider: string;
469
- model: string;
470
- processingTime: number;
471
- success: boolean;
472
- }>;
473
- }
474
-
475
- interface ReviewIssue {
476
- file: string;
477
- line: number;
478
- endLine?: number;
479
- ruleId: string;
480
- message: string;
481
- severity: 'info' | 'warning' | 'error' | 'critical';
482
- category: 'security' | 'performance' | 'style' | 'logic' | 'documentation';
483
- checkName?: string;
484
- group?: string;
485
- schema?: string;
486
- timestamp?: number;
487
- suggestion?: string;
488
- replacement?: string;
495
+ /**
496
+ * Statistics for a single check execution
497
+ */
498
+ interface CheckExecutionStats {
499
+ checkName: string;
500
+ totalRuns: number;
501
+ successfulRuns: number;
502
+ failedRuns: number;
503
+ skipped: boolean;
504
+ skipReason?: 'if_condition' | 'fail_fast' | 'dependency_failed';
505
+ skipCondition?: string;
506
+ totalDuration: number;
507
+ perIterationDuration?: number[];
508
+ issuesFound: number;
509
+ issuesBySeverity: {
510
+ critical: number;
511
+ error: number;
512
+ warning: number;
513
+ info: number;
514
+ };
515
+ outputsProduced?: number;
516
+ errorMessage?: string;
517
+ forEachPreview?: string[];
489
518
  }
490
- interface ReviewSummary {
491
- issues?: ReviewIssue[];
492
- debug?: AIDebugInfo;
519
+ /**
520
+ * Overall execution statistics for all checks
521
+ */
522
+ interface ExecutionStatistics {
523
+ totalChecksConfigured: number;
524
+ totalExecutions: number;
525
+ successfulExecutions: number;
526
+ failedExecutions: number;
527
+ skippedChecks: number;
528
+ totalDuration: number;
529
+ checks: CheckExecutionStats[];
493
530
  }
494
531
 
495
532
  interface GitFileChange {
@@ -520,8 +557,10 @@ interface AnalysisResult {
520
557
  executionTime: number;
521
558
  timestamp: string;
522
559
  checksExecuted: string[];
560
+ executionStatistics?: ExecutionStatistics;
523
561
  debug?: DebugInfo;
524
562
  failureConditions?: FailureConditionResult[];
563
+ isCodeReview?: boolean;
525
564
  }
526
565
  interface DebugInfo {
527
566
  provider?: string;
package/dist/sdk/sdk.d.ts CHANGED
@@ -1,3 +1,66 @@
1
+ interface AIDebugInfo {
2
+ /** The prompt sent to the AI */
3
+ prompt: string;
4
+ /** Raw response from the AI service */
5
+ rawResponse: string;
6
+ /** Provider used (google, anthropic, openai) */
7
+ provider: string;
8
+ /** Model used */
9
+ model: string;
10
+ /** API key source (for privacy, just show which env var) */
11
+ apiKeySource: string;
12
+ /** Processing time in milliseconds */
13
+ processingTime: number;
14
+ /** Prompt length in characters */
15
+ promptLength: number;
16
+ /** Response length in characters */
17
+ responseLength: number;
18
+ /** Any errors encountered */
19
+ errors?: string[];
20
+ /** Whether JSON parsing succeeded */
21
+ jsonParseSuccess: boolean;
22
+ /** Schema used for response validation */
23
+ schema?: string;
24
+ /** Schema name/type requested */
25
+ schemaName?: string;
26
+ /** Checks executed during this review */
27
+ checksExecuted?: string[];
28
+ /** Whether parallel execution was used */
29
+ parallelExecution?: boolean;
30
+ /** Timestamp when request was made */
31
+ timestamp: string;
32
+ /** Total API calls made */
33
+ totalApiCalls?: number;
34
+ /** Details about API calls made */
35
+ apiCallDetails?: Array<{
36
+ checkName: string;
37
+ provider: string;
38
+ model: string;
39
+ processingTime: number;
40
+ success: boolean;
41
+ }>;
42
+ }
43
+
44
+ interface ReviewIssue {
45
+ file: string;
46
+ line: number;
47
+ endLine?: number;
48
+ ruleId: string;
49
+ message: string;
50
+ severity: 'info' | 'warning' | 'error' | 'critical';
51
+ category: 'security' | 'performance' | 'style' | 'logic' | 'documentation';
52
+ checkName?: string;
53
+ group?: string;
54
+ schema?: string;
55
+ timestamp?: number;
56
+ suggestion?: string;
57
+ replacement?: string;
58
+ }
59
+ interface ReviewSummary {
60
+ issues?: ReviewIssue[];
61
+ debug?: AIDebugInfo;
62
+ }
63
+
1
64
  /**
2
65
  * Types for Visor configuration system
3
66
  */
@@ -429,67 +492,41 @@ interface VisorConfig {
429
492
  routing?: RoutingDefaults;
430
493
  }
431
494
 
432
- interface AIDebugInfo {
433
- /** The prompt sent to the AI */
434
- prompt: string;
435
- /** Raw response from the AI service */
436
- rawResponse: string;
437
- /** Provider used (google, anthropic, openai) */
438
- provider: string;
439
- /** Model used */
440
- model: string;
441
- /** API key source (for privacy, just show which env var) */
442
- apiKeySource: string;
443
- /** Processing time in milliseconds */
444
- processingTime: number;
445
- /** Prompt length in characters */
446
- promptLength: number;
447
- /** Response length in characters */
448
- responseLength: number;
449
- /** Any errors encountered */
450
- errors?: string[];
451
- /** Whether JSON parsing succeeded */
452
- jsonParseSuccess: boolean;
453
- /** Schema used for response validation */
454
- schema?: string;
455
- /** Schema name/type requested */
456
- schemaName?: string;
457
- /** Checks executed during this review */
458
- checksExecuted?: string[];
459
- /** Whether parallel execution was used */
460
- parallelExecution?: boolean;
461
- /** Timestamp when request was made */
462
- timestamp: string;
463
- /** Total API calls made */
464
- totalApiCalls?: number;
465
- /** Details about API calls made */
466
- apiCallDetails?: Array<{
467
- checkName: string;
468
- provider: string;
469
- model: string;
470
- processingTime: number;
471
- success: boolean;
472
- }>;
473
- }
474
-
475
- interface ReviewIssue {
476
- file: string;
477
- line: number;
478
- endLine?: number;
479
- ruleId: string;
480
- message: string;
481
- severity: 'info' | 'warning' | 'error' | 'critical';
482
- category: 'security' | 'performance' | 'style' | 'logic' | 'documentation';
483
- checkName?: string;
484
- group?: string;
485
- schema?: string;
486
- timestamp?: number;
487
- suggestion?: string;
488
- replacement?: string;
495
+ /**
496
+ * Statistics for a single check execution
497
+ */
498
+ interface CheckExecutionStats {
499
+ checkName: string;
500
+ totalRuns: number;
501
+ successfulRuns: number;
502
+ failedRuns: number;
503
+ skipped: boolean;
504
+ skipReason?: 'if_condition' | 'fail_fast' | 'dependency_failed';
505
+ skipCondition?: string;
506
+ totalDuration: number;
507
+ perIterationDuration?: number[];
508
+ issuesFound: number;
509
+ issuesBySeverity: {
510
+ critical: number;
511
+ error: number;
512
+ warning: number;
513
+ info: number;
514
+ };
515
+ outputsProduced?: number;
516
+ errorMessage?: string;
517
+ forEachPreview?: string[];
489
518
  }
490
- interface ReviewSummary {
491
- issues?: ReviewIssue[];
492
- debug?: AIDebugInfo;
519
+ /**
520
+ * Overall execution statistics for all checks
521
+ */
522
+ interface ExecutionStatistics {
523
+ totalChecksConfigured: number;
524
+ totalExecutions: number;
525
+ successfulExecutions: number;
526
+ failedExecutions: number;
527
+ skippedChecks: number;
528
+ totalDuration: number;
529
+ checks: CheckExecutionStats[];
493
530
  }
494
531
 
495
532
  interface GitFileChange {
@@ -520,8 +557,10 @@ interface AnalysisResult {
520
557
  executionTime: number;
521
558
  timestamp: string;
522
559
  checksExecuted: string[];
560
+ executionStatistics?: ExecutionStatistics;
523
561
  debug?: DebugInfo;
524
562
  failureConditions?: FailureConditionResult[];
563
+ isCodeReview?: boolean;
525
564
  }
526
565
  interface DebugInfo {
527
566
  provider?: string;