@vibe-validate/cli 0.17.6 → 0.18.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 (88) hide show
  1. package/dist/bin/vibe-validate +4 -0
  2. package/dist/bin/vibe-validate.js +4 -0
  3. package/dist/bin/vibe-validate.js.map +1 -1
  4. package/dist/bin/vv +4 -0
  5. package/dist/bin.js +12 -4
  6. package/dist/bin.js.map +1 -1
  7. package/dist/commands/cleanup.d.ts +4 -1
  8. package/dist/commands/cleanup.d.ts.map +1 -1
  9. package/dist/commands/cleanup.js +168 -122
  10. package/dist/commands/cleanup.js.map +1 -1
  11. package/dist/commands/config.d.ts.map +1 -1
  12. package/dist/commands/config.js +35 -21
  13. package/dist/commands/config.js.map +1 -1
  14. package/dist/commands/create-extractor.d.ts.map +1 -1
  15. package/dist/commands/create-extractor.js +29 -14
  16. package/dist/commands/create-extractor.js.map +1 -1
  17. package/dist/commands/doctor.d.ts.map +1 -1
  18. package/dist/commands/doctor.js +12 -23
  19. package/dist/commands/doctor.js.map +1 -1
  20. package/dist/commands/generate-workflow.d.ts.map +1 -1
  21. package/dist/commands/generate-workflow.js +6 -2
  22. package/dist/commands/generate-workflow.js.map +1 -1
  23. package/dist/commands/history.d.ts.map +1 -1
  24. package/dist/commands/history.js +19 -9
  25. package/dist/commands/history.js.map +1 -1
  26. package/dist/commands/init.d.ts.map +1 -1
  27. package/dist/commands/init.js +3 -1
  28. package/dist/commands/init.js.map +1 -1
  29. package/dist/commands/pre-commit.d.ts.map +1 -1
  30. package/dist/commands/pre-commit.js +3 -1
  31. package/dist/commands/pre-commit.js.map +1 -1
  32. package/dist/commands/run.d.ts.map +1 -1
  33. package/dist/commands/run.js +21 -13
  34. package/dist/commands/run.js.map +1 -1
  35. package/dist/commands/state.d.ts.map +1 -1
  36. package/dist/commands/state.js +11 -6
  37. package/dist/commands/state.js.map +1 -1
  38. package/dist/commands/watch-pr.d.ts +16 -0
  39. package/dist/commands/watch-pr.d.ts.map +1 -1
  40. package/dist/commands/watch-pr.js +574 -320
  41. package/dist/commands/watch-pr.js.map +1 -1
  42. package/dist/schemas/watch-pr-result.schema.d.ts +2071 -0
  43. package/dist/schemas/watch-pr-result.schema.d.ts.map +1 -0
  44. package/dist/schemas/watch-pr-result.schema.js +346 -0
  45. package/dist/schemas/watch-pr-result.schema.js.map +1 -0
  46. package/dist/schemas/watch-pr-schema.d.ts +6 -6
  47. package/dist/services/cache-manager.d.ts +113 -0
  48. package/dist/services/cache-manager.d.ts.map +1 -0
  49. package/dist/services/cache-manager.js +211 -0
  50. package/dist/services/cache-manager.js.map +1 -0
  51. package/dist/services/ci-providers/github-actions.d.ts.map +1 -1
  52. package/dist/services/ci-providers/github-actions.js +10 -16
  53. package/dist/services/ci-providers/github-actions.js.map +1 -1
  54. package/dist/services/external-check-extractor.d.ts +66 -0
  55. package/dist/services/external-check-extractor.d.ts.map +1 -0
  56. package/dist/services/external-check-extractor.js +114 -0
  57. package/dist/services/external-check-extractor.js.map +1 -0
  58. package/dist/services/extraction-mode-detector.d.ts +85 -0
  59. package/dist/services/extraction-mode-detector.d.ts.map +1 -0
  60. package/dist/services/extraction-mode-detector.js +200 -0
  61. package/dist/services/extraction-mode-detector.js.map +1 -0
  62. package/dist/services/github-fetcher.d.ts +234 -0
  63. package/dist/services/github-fetcher.d.ts.map +1 -0
  64. package/dist/services/github-fetcher.js +441 -0
  65. package/dist/services/github-fetcher.js.map +1 -0
  66. package/dist/services/history-summary-builder.d.ts +74 -0
  67. package/dist/services/history-summary-builder.d.ts.map +1 -0
  68. package/dist/services/history-summary-builder.js +199 -0
  69. package/dist/services/history-summary-builder.js.map +1 -0
  70. package/dist/services/watch-pr-orchestrator.d.ts +132 -0
  71. package/dist/services/watch-pr-orchestrator.d.ts.map +1 -0
  72. package/dist/services/watch-pr-orchestrator.js +451 -0
  73. package/dist/services/watch-pr-orchestrator.js.map +1 -0
  74. package/dist/utils/command-name.d.ts +21 -0
  75. package/dist/utils/command-name.d.ts.map +1 -0
  76. package/dist/utils/command-name.js +45 -0
  77. package/dist/utils/command-name.js.map +1 -0
  78. package/dist/utils/pid-lock.d.ts.map +1 -1
  79. package/dist/utils/pid-lock.js +3 -3
  80. package/dist/utils/pid-lock.js.map +1 -1
  81. package/dist/utils/secret-scanning.d.ts.map +1 -1
  82. package/dist/utils/secret-scanning.js +45 -17
  83. package/dist/utils/secret-scanning.js.map +1 -1
  84. package/dist/utils/temp-files.d.ts +1 -2
  85. package/dist/utils/temp-files.d.ts.map +1 -1
  86. package/dist/utils/temp-files.js +4 -4
  87. package/dist/utils/temp-files.js.map +1 -1
  88. package/package.json +8 -8
@@ -0,0 +1,2071 @@
1
+ /**
2
+ * Zod Schema for Watch PR Results
3
+ *
4
+ * CRITICAL PROJECT REQUIREMENT: All YAML-serializable types MUST be Zod schemas.
5
+ * Use z.infer<> to derive TypeScript types. Manual interfaces only for non-serializable data.
6
+ *
7
+ * This schema defines the complete structure of watch-pr command output,
8
+ * enabling runtime validation and JSON Schema generation.
9
+ *
10
+ * Output follows "Newspaper Philosophy" ordering: most important info first.
11
+ *
12
+ * @packageDocumentation
13
+ */
14
+ import { z } from 'zod';
15
+ /**
16
+ * Check Status Enum
17
+ *
18
+ * GitHub check run status
19
+ */
20
+ export declare const CheckStatusSchema: z.ZodEnum<["queued", "in_progress", "completed"]>;
21
+ /**
22
+ * Check Conclusion Enum
23
+ *
24
+ * GitHub check run conclusion (present when status is 'completed')
25
+ */
26
+ export declare const CheckConclusionSchema: z.ZodEnum<["success", "failure", "neutral", "cancelled", "skipped", "timed_out", "action_required"]>;
27
+ /**
28
+ * Merge State Status Enum
29
+ *
30
+ * GitHub PR merge state status
31
+ */
32
+ export declare const MergeStateStatusSchema: z.ZodEnum<["BEHIND", "BLOCKED", "CLEAN", "DIRTY", "DRAFT", "HAS_HOOKS", "UNKNOWN", "UNSTABLE"]>;
33
+ /**
34
+ * Severity Enum
35
+ *
36
+ * Severity level for guidance and external checks
37
+ */
38
+ export declare const SeveritySchema: z.ZodEnum<["error", "warning", "info"]>;
39
+ /**
40
+ * Linked Issue Schema
41
+ *
42
+ * GitHub issue linked to the PR (via closing keywords or manually)
43
+ */
44
+ export declare const LinkedIssueSchema: z.ZodObject<{
45
+ /** Issue number */
46
+ number: z.ZodNumber;
47
+ /** Issue title */
48
+ title: z.ZodString;
49
+ /** Issue URL */
50
+ url: z.ZodString;
51
+ }, "strip", z.ZodTypeAny, {
52
+ number: number;
53
+ title: string;
54
+ url: string;
55
+ }, {
56
+ number: number;
57
+ title: string;
58
+ url: string;
59
+ }>;
60
+ /**
61
+ * PR Metadata Schema
62
+ *
63
+ * Complete PR context including metadata, labels, and linked issues
64
+ */
65
+ export declare const PRMetadataSchema: z.ZodObject<{
66
+ /** PR number */
67
+ number: z.ZodNumber;
68
+ /** PR title */
69
+ title: z.ZodString;
70
+ /** PR URL */
71
+ url: z.ZodString;
72
+ /** Head branch name */
73
+ branch: z.ZodString;
74
+ /** Base branch name (usually 'main' or 'develop') */
75
+ base_branch: z.ZodString;
76
+ /** PR author username */
77
+ author: z.ZodString;
78
+ /** Is this a draft PR? */
79
+ draft: z.ZodBoolean;
80
+ /** Is the PR mergeable? */
81
+ mergeable: z.ZodBoolean;
82
+ /** Merge state status (CLEAN, UNSTABLE, BLOCKED, etc.) */
83
+ merge_state_status: z.ZodEnum<["BEHIND", "BLOCKED", "CLEAN", "DIRTY", "DRAFT", "HAS_HOOKS", "UNKNOWN", "UNSTABLE"]>;
84
+ /** PR labels */
85
+ labels: z.ZodArray<z.ZodString, "many">;
86
+ /** Issues linked to this PR (via closing keywords) */
87
+ linked_issues: z.ZodOptional<z.ZodArray<z.ZodObject<{
88
+ /** Issue number */
89
+ number: z.ZodNumber;
90
+ /** Issue title */
91
+ title: z.ZodString;
92
+ /** Issue URL */
93
+ url: z.ZodString;
94
+ }, "strip", z.ZodTypeAny, {
95
+ number: number;
96
+ title: string;
97
+ url: string;
98
+ }, {
99
+ number: number;
100
+ title: string;
101
+ url: string;
102
+ }>, "many">>;
103
+ }, "strip", z.ZodTypeAny, {
104
+ number: number;
105
+ author: string;
106
+ title: string;
107
+ url: string;
108
+ branch: string;
109
+ base_branch: string;
110
+ draft: boolean;
111
+ mergeable: boolean;
112
+ merge_state_status: "BEHIND" | "BLOCKED" | "CLEAN" | "DIRTY" | "DRAFT" | "HAS_HOOKS" | "UNKNOWN" | "UNSTABLE";
113
+ labels: string[];
114
+ linked_issues?: {
115
+ number: number;
116
+ title: string;
117
+ url: string;
118
+ }[] | undefined;
119
+ }, {
120
+ number: number;
121
+ author: string;
122
+ title: string;
123
+ url: string;
124
+ branch: string;
125
+ base_branch: string;
126
+ draft: boolean;
127
+ mergeable: boolean;
128
+ merge_state_status: "BEHIND" | "BLOCKED" | "CLEAN" | "DIRTY" | "DRAFT" | "HAS_HOOKS" | "UNKNOWN" | "UNSTABLE";
129
+ labels: string[];
130
+ linked_issues?: {
131
+ number: number;
132
+ title: string;
133
+ url: string;
134
+ }[] | undefined;
135
+ }>;
136
+ /**
137
+ * GitHub Actions Check Schema
138
+ *
139
+ * Check run from GitHub Actions workflow.
140
+ * Includes run_id for drilling down with `gh run view`.
141
+ * May include job_id for matrix strategy jobs (required for per-job log extraction).
142
+ * May include extraction (from matrix or non-matrix mode).
143
+ */
144
+ export declare const GitHubActionCheckSchema: z.ZodObject<{
145
+ /** Check name */
146
+ name: z.ZodString;
147
+ /** Check status (queued, in_progress, completed) */
148
+ status: z.ZodEnum<["queued", "in_progress", "completed"]>;
149
+ /** Check conclusion (present when completed) */
150
+ conclusion: z.ZodOptional<z.ZodEnum<["success", "failure", "neutral", "cancelled", "skipped", "timed_out", "action_required"]>>;
151
+ /** GitHub run ID for this check */
152
+ run_id: z.ZodNumber;
153
+ /**
154
+ * GitHub job ID for this check (optional)
155
+ *
156
+ * Present for matrix strategy jobs. Used to fetch job-specific logs via:
157
+ * `gh run view <run-id> --log --job <job-id>`
158
+ *
159
+ * Without job_id, `gh run view <run-id> --log` returns combined logs from ALL jobs,
160
+ * which makes error extraction unreliable for matrix runs.
161
+ */
162
+ job_id: z.ZodOptional<z.ZodNumber>;
163
+ /** Workflow name */
164
+ workflow: z.ZodString;
165
+ /** When the check started (ISO 8601) */
166
+ started_at: z.ZodString;
167
+ /** Human-readable duration (e.g., "2m15s") */
168
+ duration: z.ZodString;
169
+ /** Local path to cached log file (if cached) */
170
+ log_file: z.ZodOptional<z.ZodString>;
171
+ /**
172
+ * Extraction result (CRITICAL: NEW FEATURE)
173
+ *
174
+ * Errors extracted from check logs using one of two modes:
175
+ * - Matrix mode: Parsed from validate YAML output, passed through faithfully
176
+ * - Non-matrix mode: Extracted from raw test output using extractors
177
+ *
178
+ * Both modes produce ErrorExtractorResult schema (from @vibe-validate/extractors)
179
+ */
180
+ extraction: z.ZodOptional<z.ZodObject<{
181
+ summary: z.ZodString;
182
+ totalErrors: z.ZodNumber;
183
+ errors: z.ZodArray<z.ZodObject<{
184
+ file: z.ZodOptional<z.ZodString>;
185
+ line: z.ZodOptional<z.ZodNumber>;
186
+ column: z.ZodOptional<z.ZodNumber>;
187
+ message: z.ZodString;
188
+ code: z.ZodOptional<z.ZodString>;
189
+ severity: z.ZodOptional<z.ZodEnum<["error", "warning"]>>;
190
+ context: z.ZodOptional<z.ZodString>;
191
+ guidance: z.ZodOptional<z.ZodString>;
192
+ }, "strip", z.ZodTypeAny, {
193
+ message: string;
194
+ file?: string | undefined;
195
+ line?: number | undefined;
196
+ column?: number | undefined;
197
+ code?: string | undefined;
198
+ severity?: "error" | "warning" | undefined;
199
+ context?: string | undefined;
200
+ guidance?: string | undefined;
201
+ }, {
202
+ message: string;
203
+ file?: string | undefined;
204
+ line?: number | undefined;
205
+ column? /** Total number of workflow runs for this PR branch */: number | undefined;
206
+ code?: string | undefined;
207
+ severity?: "error" | "warning" | undefined;
208
+ context?: string | undefined;
209
+ guidance?: string | undefined;
210
+ }>, "many">;
211
+ guidance: z.ZodOptional<z.ZodString>;
212
+ errorSummary: z.ZodOptional<z.ZodString>;
213
+ metadata: z.ZodOptional<z.ZodObject<{
214
+ detection: z.ZodOptional<z.ZodObject<{
215
+ extractor: z.ZodString;
216
+ confidence: z.ZodNumber;
217
+ patterns: z.ZodArray<z.ZodString, "many">;
218
+ reason: z.ZodString;
219
+ }, "strip", z.ZodTypeAny, {
220
+ extractor: string;
221
+ confidence: number;
222
+ patterns: string[];
223
+ reason: string;
224
+ }, {
225
+ extractor: string;
226
+ confidence: number;
227
+ patterns: string[];
228
+ reason: string;
229
+ }>>;
230
+ confidence: z.ZodNumber;
231
+ completeness: z.ZodNumber;
232
+ issues: z.ZodArray<z.ZodString, "many">;
233
+ suggestions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
234
+ }, "strip", z.ZodTypeAny, {
235
+ issues: string[];
236
+ confidence: number;
237
+ completeness: number;
238
+ detection?: {
239
+ extractor: string;
240
+ confidence: number;
241
+ patterns: string[];
242
+ reason: string;
243
+ } | undefined;
244
+ suggestions?: string[] | undefined;
245
+ }, {
246
+ issues: string[];
247
+ confidence: number;
248
+ completeness: number;
249
+ detection?: {
250
+ extractor: string;
251
+ confidence: number;
252
+ patterns: string[];
253
+ reason: string;
254
+ } | undefined;
255
+ suggestions?: string[] | undefined;
256
+ }>>;
257
+ }, "strip", z.ZodTypeAny, {
258
+ summary: string;
259
+ totalErrors: number;
260
+ errors: {
261
+ message: string;
262
+ file?: string | undefined;
263
+ line?: number | undefined;
264
+ column?: number | undefined;
265
+ code?: string | undefined;
266
+ severity?: "error" | "warning" | undefined;
267
+ context?: string | undefined;
268
+ guidance?: string | undefined;
269
+ }[];
270
+ guidance?: string | undefined;
271
+ errorSummary?: string | undefined;
272
+ metadata?: {
273
+ issues: string[];
274
+ confidence: number;
275
+ completeness: number;
276
+ detection?: {
277
+ extractor: string;
278
+ confidence: number;
279
+ patterns: string[];
280
+ reason: string;
281
+ } | undefined;
282
+ suggestions?: string[] | undefined;
283
+ } | undefined;
284
+ }, {
285
+ summary: string;
286
+ totalErrors: number;
287
+ errors: {
288
+ message: string;
289
+ file?: string | undefined;
290
+ line?: number | undefined;
291
+ column?: number | undefined;
292
+ code?: string | undefined;
293
+ severity?: "error" | "warning" | undefined;
294
+ context
295
+ /** Cache directory location */
296
+ ? /** Cache directory location */: string | undefined;
297
+ guidance?: string | undefined;
298
+ }[];
299
+ guidance?: string | undefined;
300
+ errorSummary?: string | undefined;
301
+ metadata?: {
302
+ issues: string[];
303
+ confidence: number;
304
+ completeness: number;
305
+ detection?: {
306
+ extractor: string;
307
+ confidence: number;
308
+ patterns: string[];
309
+ reason: string;
310
+ } | undefined;
311
+ suggestions?: string[] | undefined;
312
+ } | undefined;
313
+ }>>;
314
+ }, "strip", z.ZodTypeAny, {
315
+ name: string;
316
+ workflow: string;
317
+ status: "queued" | "in_progress" | "completed";
318
+ run_id: number;
319
+ started_at: string;
320
+ duration: string;
321
+ extraction?: {
322
+ summary: string;
323
+ totalErrors: number;
324
+ errors: {
325
+ message: string;
326
+ file?: string | undefined;
327
+ line?: number | undefined;
328
+ column?: number | undefined;
329
+ code?: string | undefined;
330
+ severity?: "error" | "warning" | undefined;
331
+ context?: string | undefined;
332
+ guidance?: string | undefined;
333
+ }[];
334
+ guidance?: string | undefined;
335
+ errorSummary?: string | undefined;
336
+ metadata?: {
337
+ issues: string[];
338
+ confidence: number;
339
+ completeness: number;
340
+ detection?: {
341
+ extractor: string;
342
+ confidence: number;
343
+ patterns: string[];
344
+ reason: string;
345
+ } | undefined;
346
+ suggestions?: string[] | undefined;
347
+ } | undefined;
348
+ } | undefined;
349
+ conclusion?: "success" | "failure" | "neutral" | "cancelled" | "skipped" | "timed_out" | "action_required" | undefined;
350
+ job_id?: number | undefined;
351
+ log_file?: string | undefined;
352
+ }, {
353
+ name: string;
354
+ workflow: string;
355
+ status: "queued" | "in_progress" | "completed";
356
+ run_id: number;
357
+ started_at: string;
358
+ duration: string;
359
+ extraction?: {
360
+ summary: string;
361
+ totalErrors: number;
362
+ errors: {
363
+ message: string;
364
+ file?: string | undefined;
365
+ line?: number | undefined;
366
+ column?: number | undefined;
367
+ code?: string | undefined;
368
+ severity?: "error" | "warning" | undefined;
369
+ context
370
+ /** Cache directory location */
371
+ ? /** Cache directory location */: string | undefined;
372
+ guidance?: string | undefined;
373
+ }[];
374
+ guidance?: string | undefined;
375
+ errorSummary?: string | undefined;
376
+ metadata?: {
377
+ issues: string[];
378
+ confidence: number;
379
+ completeness: number;
380
+ detection?: {
381
+ extractor: string;
382
+ confidence: number;
383
+ patterns: string[];
384
+ reason: string;
385
+ } | undefined;
386
+ suggestions?: string[] | undefined;
387
+ } | undefined;
388
+ } | undefined;
389
+ conclusion?: "success" | "failure" | "neutral" | "cancelled" | "skipped" | "timed_out" | "action_required" | undefined;
390
+ job_id?: number | undefined;
391
+ log_file?: string | undefined;
392
+ }>;
393
+ /**
394
+ * External Check Details Schema
395
+ *
396
+ * Details extracted from external checks (codecov, SonarCloud, etc.)
397
+ */
398
+ export declare const ExternalCheckDetailsSchema: z.ZodObject<{
399
+ /** Human-readable summary of the check result */
400
+ summary: z.ZodString;
401
+ /** Additional details (provider-specific) */
402
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
403
+ /** Severity level */
404
+ severity: z.ZodOptional<z.ZodEnum<["error", "warning", "info"]>>;
405
+ }, "strip", z.ZodTypeAny, {
406
+ summary: string;
407
+ details?: Record<string, any> | undefined;
408
+ severity?: "error" | "warning" | "info" | undefined;
409
+ }, {
410
+ summary: string;
411
+ details?: Record<string, any> | undefined;
412
+ severity?: "error" | "warning" | "info" | undefined;
413
+ }>;
414
+ /**
415
+ * External Check Schema
416
+ *
417
+ * Status check from external provider (codecov, SonarCloud, etc.)
418
+ * These don't have GitHub run IDs, only detailsUrl.
419
+ */
420
+ export declare const ExternalCheckSchema: z.ZodObject<{
421
+ /** Check name (e.g., "codecov/patch", "SonarCloud Code Analysis") */
422
+ name: z.ZodString;
423
+ /** Check status */
424
+ status: z.ZodEnum<["queued", "in_progress", "completed"]>;
425
+ /** Check conclusion (present when completed) */
426
+ conclusion: z.ZodOptional<z.ZodEnum<["success", "failure", "neutral", "cancelled", "skipped", "timed_out", "action_required"]>>;
427
+ /** URL to view check details on external provider */
428
+ url: z.ZodString;
429
+ /** Provider name (e.g., "codecov", "sonarcloud") */
430
+ provider: z.ZodOptional<z.ZodString>;
431
+ /** Extracted details (if extraction succeeded) */
432
+ extracted: z.ZodNullable<z.ZodOptional<z.ZodObject<{
433
+ /** Human-readable summary of the check result */
434
+ summary: z.ZodString;
435
+ /** Additional details (provider-specific) */
436
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
437
+ /** Severity level */
438
+ severity: z.ZodOptional<z.ZodEnum<["error", "warning", "info"]>>;
439
+ }, "strip", z.ZodTypeAny, {
440
+ summary: string;
441
+ details?: Record<string, any> | undefined;
442
+ severity?: "error" | "warning" | "info" | undefined;
443
+ }, {
444
+ summary: string;
445
+ details?: Record<string, any> | undefined;
446
+ severity?: "error" | "warning" | "info" | undefined;
447
+ }>>>;
448
+ /** Error message if extraction failed */
449
+ extraction_error: z.ZodOptional<z.ZodString>;
450
+ }, "strip", z.ZodTypeAny, {
451
+ name: string;
452
+ status: "queued" | "in_progress" | "completed";
453
+ url: string;
454
+ conclusion?: "success" | "failure" | "neutral" | "cancelled" | "skipped" | "timed_out" | "action_required" | undefined;
455
+ provider?: string | undefined;
456
+ extracted?: {
457
+ summary: string;
458
+ details?: Record<string, any> | undefined;
459
+ severity?: "error" | "warning" | "info" | undefined;
460
+ } | null | undefined;
461
+ extraction_error?: string | undefined;
462
+ }, {
463
+ name: string;
464
+ status: "queued" | "in_progress" | "completed";
465
+ url: string;
466
+ conclusion?: "success" | "failure" | "neutral" | "cancelled" | "skipped" | "timed_out" | "action_required" | undefined;
467
+ provider?: string | undefined;
468
+ extracted?: {
469
+ summary: string;
470
+ details?: Record<string, any> | undefined;
471
+ severity?: "error" | "warning" | "info" | undefined;
472
+ } | null | undefined;
473
+ extraction_error?: string | undefined;
474
+ }>;
475
+ /**
476
+ * Check History Summary Schema
477
+ *
478
+ * Condensed history for pattern recognition (~75 tokens)
479
+ * Provides recent pattern and success rate without full history details.
480
+ */
481
+ export declare const CheckHistorySummarySchema: z.ZodObject<{
482
+ /** Total number of workflow runs for this PR branch */
483
+ total_runs: z.ZodNumber;
484
+ /** Recent pattern description (e.g., "Passed last 2 runs", "Failed last 3 runs") */
485
+ recent_pattern: z.ZodString;
486
+ /** Success rate percentage (e.g., "75%") based on last 10 runs */
487
+ success_rate: z.ZodOptional<z.ZodString>;
488
+ }, "strip", z.ZodTypeAny, {
489
+ total_runs: number;
490
+ recent_pattern: string;
491
+ success_rate?: string | undefined;
492
+ }, {
493
+ total_runs: number;
494
+ recent_pattern: string;
495
+ success_rate?: string | undefined;
496
+ }>;
497
+ /**
498
+ * Checks Summary Schema
499
+ *
500
+ * Complete check results with history context.
501
+ * Ordered by newspaper philosophy: failed checks before passed checks.
502
+ */
503
+ export declare const ChecksSummarySchema: z.ZodObject<{
504
+ /** Total number of checks */
505
+ total: z.ZodNumber;
506
+ /** Number of passed checks */
507
+ passed: z.ZodNumber;
508
+ /** Number of failed checks */
509
+ failed: z.ZodNumber;
510
+ /** Number of pending checks */
511
+ pending: z.ZodNumber;
512
+ /** Condensed history for pattern recognition (cheap tokens, high value) */
513
+ history_summary: z.ZodOptional<z.ZodObject<{
514
+ /** Total number of workflow runs for this PR branch */
515
+ total_runs: z.ZodNumber;
516
+ /** Recent pattern description (e.g., "Passed last 2 runs", "Failed last 3 runs") */
517
+ recent_pattern: z.ZodString;
518
+ /** Success rate percentage (e.g., "75%") based on last 10 runs */
519
+ success_rate: z.ZodOptional<z.ZodString>;
520
+ }, "strip", z.ZodTypeAny, {
521
+ total_runs: number;
522
+ recent_pattern: string;
523
+ success_rate?: string | undefined;
524
+ }, {
525
+ total_runs: number;
526
+ recent_pattern: string;
527
+ success_rate?: string | undefined;
528
+ }>>;
529
+ /** GitHub Actions checks (with run_id and optional extraction) */
530
+ github_actions: z.ZodArray<z.ZodObject<{
531
+ /** Check name */
532
+ name: z.ZodString;
533
+ /** Check status (queued, in_progress, completed) */
534
+ status: z.ZodEnum<["queued", "in_progress", "completed"]>;
535
+ /** Check conclusion (present when completed) */
536
+ conclusion: z.ZodOptional<z.ZodEnum<["success", "failure", "neutral", "cancelled", "skipped", "timed_out", "action_required"]>>;
537
+ /** GitHub run ID for this check */
538
+ run_id: z.ZodNumber;
539
+ /**
540
+ * GitHub job ID for this check (optional)
541
+ *
542
+ * Present for matrix strategy jobs. Used to fetch job-specific logs via:
543
+ * `gh run view <run-id> --log --job <job-id>`
544
+ *
545
+ * Without job_id, `gh run view <run-id> --log` returns combined logs from ALL jobs,
546
+ * which makes error extraction unreliable for matrix runs.
547
+ */
548
+ job_id: z.ZodOptional<z.ZodNumber>;
549
+ /** Workflow name */
550
+ workflow: z.ZodString;
551
+ /** When the check started (ISO 8601) */
552
+ started_at: z.ZodString;
553
+ /** Human-readable duration (e.g., "2m15s") */
554
+ duration: z.ZodString;
555
+ /** Local path to cached log file (if cached) */
556
+ log_file: z.ZodOptional<z.ZodString>;
557
+ /**
558
+ * Extraction result (CRITICAL: NEW FEATURE)
559
+ *
560
+ * Errors extracted from check logs using one of two modes:
561
+ * - Matrix mode: Parsed from validate YAML output, passed through faithfully
562
+ * - Non-matrix mode: Extracted from raw test output using extractors
563
+ *
564
+ * Both modes produce ErrorExtractorResult schema (from @vibe-validate/extractors)
565
+ */
566
+ extraction: z.ZodOptional<z.ZodObject<{
567
+ summary: z.ZodString;
568
+ totalErrors: z.ZodNumber;
569
+ errors: z.ZodArray<z.ZodObject<{
570
+ file: z.ZodOptional<z.ZodString>;
571
+ line: z.ZodOptional<z.ZodNumber>;
572
+ column: z.ZodOptional<z.ZodNumber>;
573
+ message: z.ZodString;
574
+ code: z.ZodOptional<z.ZodString>;
575
+ severity: z.ZodOptional<z.ZodEnum<["error", "warning"]>>;
576
+ context: z.ZodOptional<z.ZodString>;
577
+ guidance: z.ZodOptional<z.ZodString>;
578
+ }, "strip", z.ZodTypeAny, {
579
+ message: string;
580
+ file?: string | undefined;
581
+ line?: number | undefined;
582
+ column?: number | undefined;
583
+ code?: string | undefined;
584
+ severity?: "error" | "warning" | undefined;
585
+ context?: string | undefined;
586
+ guidance?: string | undefined;
587
+ }, {
588
+ message: string;
589
+ file?: string | undefined;
590
+ line?: number | undefined;
591
+ column? /** Total number of workflow runs for this PR branch */: number | undefined;
592
+ code?: string | undefined;
593
+ severity?: "error" | "warning" | undefined;
594
+ context?: string | undefined;
595
+ guidance?: string | undefined;
596
+ }>, "many">;
597
+ guidance: z.ZodOptional<z.ZodString>;
598
+ errorSummary: z.ZodOptional<z.ZodString>;
599
+ metadata: z.ZodOptional<z.ZodObject<{
600
+ detection: z.ZodOptional<z.ZodObject<{
601
+ extractor: z.ZodString;
602
+ confidence: z.ZodNumber;
603
+ patterns: z.ZodArray<z.ZodString, "many">;
604
+ reason: z.ZodString;
605
+ }, "strip", z.ZodTypeAny, {
606
+ extractor: string;
607
+ confidence: number;
608
+ patterns: string[];
609
+ reason: string;
610
+ }, {
611
+ extractor: string;
612
+ confidence: number;
613
+ patterns: string[];
614
+ reason: string;
615
+ }>>;
616
+ confidence: z.ZodNumber;
617
+ completeness: z.ZodNumber;
618
+ issues: z.ZodArray<z.ZodString, "many">;
619
+ suggestions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
620
+ }, "strip", z.ZodTypeAny, {
621
+ issues: string[];
622
+ confidence: number;
623
+ completeness: number;
624
+ detection?: {
625
+ extractor: string;
626
+ confidence: number;
627
+ patterns: string[];
628
+ reason: string;
629
+ } | undefined;
630
+ suggestions?: string[] | undefined;
631
+ }, {
632
+ issues: string[];
633
+ confidence: number;
634
+ completeness: number;
635
+ detection?: {
636
+ extractor: string;
637
+ confidence: number;
638
+ patterns: string[];
639
+ reason: string;
640
+ } | undefined;
641
+ suggestions?: string[] | undefined;
642
+ }>>;
643
+ }, "strip", z.ZodTypeAny, {
644
+ summary: string;
645
+ totalErrors: number;
646
+ errors: {
647
+ message: string;
648
+ file?: string | undefined;
649
+ line?: number | undefined;
650
+ column?: number | undefined;
651
+ code?: string | undefined;
652
+ severity?: "error" | "warning" | undefined;
653
+ context?: string | undefined;
654
+ guidance?: string | undefined;
655
+ }[];
656
+ guidance?: string | undefined;
657
+ errorSummary?: string | undefined;
658
+ metadata?: {
659
+ issues: string[];
660
+ confidence: number;
661
+ completeness: number;
662
+ detection?: {
663
+ extractor: string;
664
+ confidence: number;
665
+ patterns: string[];
666
+ reason: string;
667
+ } | undefined;
668
+ suggestions?: string[] | undefined;
669
+ } | undefined;
670
+ }, {
671
+ summary: string;
672
+ totalErrors: number;
673
+ errors: {
674
+ message: string;
675
+ file?: string | undefined;
676
+ line?: number | undefined;
677
+ column?: number | undefined;
678
+ code?: string | undefined;
679
+ severity?: "error" | "warning" | undefined;
680
+ context
681
+ /** Cache directory location */
682
+ ? /** Cache directory location */: string | undefined;
683
+ guidance?: string | undefined;
684
+ }[];
685
+ guidance?: string | undefined;
686
+ errorSummary?: string | undefined;
687
+ metadata?: {
688
+ issues: string[];
689
+ confidence: number;
690
+ completeness: number;
691
+ detection?: {
692
+ extractor: string;
693
+ confidence: number;
694
+ patterns: string[];
695
+ reason: string;
696
+ } | undefined;
697
+ suggestions?: string[] | undefined;
698
+ } | undefined;
699
+ }>>;
700
+ }, "strip", z.ZodTypeAny, {
701
+ name: string;
702
+ workflow: string;
703
+ status: "queued" | "in_progress" | "completed";
704
+ run_id: number;
705
+ started_at: string;
706
+ duration: string;
707
+ extraction?: {
708
+ summary: string;
709
+ totalErrors: number;
710
+ errors: {
711
+ message: string;
712
+ file?: string | undefined;
713
+ line?: number | undefined;
714
+ column?: number | undefined;
715
+ code?: string | undefined;
716
+ severity?: "error" | "warning" | undefined;
717
+ context?: string | undefined;
718
+ guidance?: string | undefined;
719
+ }[];
720
+ guidance?: string | undefined;
721
+ errorSummary?: string | undefined;
722
+ metadata?: {
723
+ issues: string[];
724
+ confidence: number;
725
+ completeness: number;
726
+ detection?: {
727
+ extractor: string;
728
+ confidence: number;
729
+ patterns: string[];
730
+ reason: string;
731
+ } | undefined;
732
+ suggestions?: string[] | undefined;
733
+ } | undefined;
734
+ } | undefined;
735
+ conclusion?: "success" | "failure" | "neutral" | "cancelled" | "skipped" | "timed_out" | "action_required" | undefined;
736
+ job_id?: number | undefined;
737
+ log_file?: string | undefined;
738
+ }, {
739
+ name: string;
740
+ workflow: string;
741
+ status: "queued" | "in_progress" | "completed";
742
+ run_id: number;
743
+ started_at: string;
744
+ duration: string;
745
+ extraction?: {
746
+ summary: string;
747
+ totalErrors: number;
748
+ errors: {
749
+ message: string;
750
+ file?: string | undefined;
751
+ line?: number | undefined;
752
+ column?: number | undefined;
753
+ code?: string | undefined;
754
+ severity?: "error" | "warning" | undefined;
755
+ context
756
+ /** Cache directory location */
757
+ ? /** Cache directory location */: string | undefined;
758
+ guidance?: string | undefined;
759
+ }[];
760
+ guidance?: string | undefined;
761
+ errorSummary?: string | undefined;
762
+ metadata?: {
763
+ issues: string[];
764
+ confidence: number;
765
+ completeness: number;
766
+ detection?: {
767
+ extractor: string;
768
+ confidence: number;
769
+ patterns: string[];
770
+ reason: string;
771
+ } | undefined;
772
+ suggestions?: string[] | undefined;
773
+ } | undefined;
774
+ } | undefined;
775
+ conclusion?: "success" | "failure" | "neutral" | "cancelled" | "skipped" | "timed_out" | "action_required" | undefined;
776
+ job_id?: number | undefined;
777
+ log_file?: string | undefined;
778
+ }>, "many">;
779
+ /** External checks (with detailsUrl and optional extraction) */
780
+ external_checks: z.ZodArray<z.ZodObject<{
781
+ /** Check name (e.g., "codecov/patch", "SonarCloud Code Analysis") */
782
+ name: z.ZodString;
783
+ /** Check status */
784
+ status: z.ZodEnum<["queued", "in_progress", "completed"]>;
785
+ /** Check conclusion (present when completed) */
786
+ conclusion: z.ZodOptional<z.ZodEnum<["success", "failure", "neutral", "cancelled", "skipped", "timed_out", "action_required"]>>;
787
+ /** URL to view check details on external provider */
788
+ url: z.ZodString;
789
+ /** Provider name (e.g., "codecov", "sonarcloud") */
790
+ provider: z.ZodOptional<z.ZodString>;
791
+ /** Extracted details (if extraction succeeded) */
792
+ extracted: z.ZodNullable<z.ZodOptional<z.ZodObject<{
793
+ /** Human-readable summary of the check result */
794
+ summary: z.ZodString;
795
+ /** Additional details (provider-specific) */
796
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
797
+ /** Severity level */
798
+ severity: z.ZodOptional<z.ZodEnum<["error", "warning", "info"]>>;
799
+ }, "strip", z.ZodTypeAny, {
800
+ summary: string;
801
+ details?: Record<string, any> | undefined;
802
+ severity?: "error" | "warning" | "info" | undefined;
803
+ }, {
804
+ summary: string;
805
+ details?: Record<string, any> | undefined;
806
+ severity?: "error" | "warning" | "info" | undefined;
807
+ }>>>;
808
+ /** Error message if extraction failed */
809
+ extraction_error: z.ZodOptional<z.ZodString>;
810
+ }, "strip", z.ZodTypeAny, {
811
+ name: string;
812
+ status: "queued" | "in_progress" | "completed";
813
+ url: string;
814
+ conclusion?: "success" | "failure" | "neutral" | "cancelled" | "skipped" | "timed_out" | "action_required" | undefined;
815
+ provider?: string | undefined;
816
+ extracted?: {
817
+ summary: string;
818
+ details?: Record<string, any> | undefined;
819
+ severity?: "error" | "warning" | "info" | undefined;
820
+ } | null | undefined;
821
+ extraction_error?: string | undefined;
822
+ }, {
823
+ name: string;
824
+ status: "queued" | "in_progress" | "completed";
825
+ url: string;
826
+ conclusion?: "success" | "failure" | "neutral" | "cancelled" | "skipped" | "timed_out" | "action_required" | undefined;
827
+ provider?: string | undefined;
828
+ extracted?: {
829
+ summary: string;
830
+ details?: Record<string, any> | undefined;
831
+ severity?: "error" | "warning" | "info" | undefined;
832
+ } | null | undefined;
833
+ extraction_error?: string | undefined;
834
+ }>, "many">;
835
+ }, "strip", z.ZodTypeAny, {
836
+ passed: number;
837
+ failed: number;
838
+ total: number;
839
+ pending: number;
840
+ github_actions: {
841
+ name: string;
842
+ workflow: string;
843
+ status: "queued" | "in_progress" | "completed";
844
+ run_id: number;
845
+ started_at: string;
846
+ duration: string;
847
+ extraction?: {
848
+ summary: string;
849
+ totalErrors: number;
850
+ errors: {
851
+ message: string;
852
+ file?: string | undefined;
853
+ line?: number | undefined;
854
+ column?: number | undefined;
855
+ code?: string | undefined;
856
+ severity?: "error" | "warning" | undefined;
857
+ context?: string | undefined;
858
+ guidance?: string | undefined;
859
+ }[];
860
+ guidance?: string | undefined;
861
+ errorSummary?: string | undefined;
862
+ metadata?: {
863
+ issues: string[];
864
+ confidence: number;
865
+ completeness: number;
866
+ detection?: {
867
+ extractor: string;
868
+ confidence: number;
869
+ patterns: string[];
870
+ reason: string;
871
+ } | undefined;
872
+ suggestions?: string[] | undefined;
873
+ } | undefined;
874
+ } | undefined;
875
+ conclusion?: "success" | "failure" | "neutral" | "cancelled" | "skipped" | "timed_out" | "action_required" | undefined;
876
+ job_id?: number | undefined;
877
+ log_file?: string | undefined;
878
+ }[];
879
+ external_checks: {
880
+ name: string;
881
+ status: "queued" | "in_progress" | "completed";
882
+ url: string;
883
+ conclusion?: "success" | "failure" | "neutral" | "cancelled" | "skipped" | "timed_out" | "action_required" | undefined;
884
+ provider?: string | undefined;
885
+ extracted?: {
886
+ summary: string;
887
+ details?: Record<string, any> | undefined;
888
+ severity?: "error" | "warning" | "info" | undefined;
889
+ } | null | undefined;
890
+ extraction_error?: string | undefined;
891
+ }[];
892
+ history_summary?: {
893
+ total_runs: number;
894
+ recent_pattern: string;
895
+ success_rate?: string | undefined;
896
+ } | undefined;
897
+ }, {
898
+ passed: number;
899
+ failed: number;
900
+ total: number;
901
+ pending: number;
902
+ github_actions: {
903
+ name: string;
904
+ workflow: string;
905
+ status: "queued" | "in_progress" | "completed";
906
+ run_id: number;
907
+ started_at: string;
908
+ duration: string;
909
+ extraction?: {
910
+ summary: string;
911
+ totalErrors: number;
912
+ errors: {
913
+ message: string;
914
+ file?: string | undefined;
915
+ line?: number | undefined;
916
+ column?: number | undefined;
917
+ code?: string | undefined;
918
+ severity?: "error" | "warning" | undefined;
919
+ context
920
+ /** Cache directory location */
921
+ ? /** Cache directory location */: string | undefined;
922
+ guidance?: string | undefined;
923
+ }[];
924
+ guidance?: string | undefined;
925
+ errorSummary?: string | undefined;
926
+ metadata?: {
927
+ issues: string[];
928
+ confidence: number;
929
+ completeness: number;
930
+ detection?: {
931
+ extractor: string;
932
+ confidence: number;
933
+ patterns: string[];
934
+ reason: string;
935
+ } | undefined;
936
+ suggestions?: string[] | undefined;
937
+ } | undefined;
938
+ } | undefined;
939
+ conclusion?: "success" | "failure" | "neutral" | "cancelled" | "skipped" | "timed_out" | "action_required" | undefined;
940
+ job_id?: number | undefined;
941
+ log_file?: string | undefined;
942
+ }[];
943
+ external_checks: {
944
+ name: string;
945
+ status: "queued" | "in_progress" | "completed";
946
+ url: string;
947
+ conclusion?: "success" | "failure" | "neutral" | "cancelled" | "skipped" | "timed_out" | "action_required" | undefined;
948
+ provider?: string | undefined;
949
+ extracted?: {
950
+ summary: string;
951
+ details?: Record<string, any> | undefined;
952
+ severity?: "error" | "warning" | "info" | undefined;
953
+ } | null | undefined;
954
+ extraction_error?: string | undefined;
955
+ }[];
956
+ history_summary?: {
957
+ total_runs: number;
958
+ recent_pattern: string;
959
+ success_rate?: string | undefined;
960
+ } | undefined;
961
+ }>;
962
+ /**
963
+ * File Change Schema
964
+ *
965
+ * Git diff statistics for a single file
966
+ */
967
+ export declare const FileChangeSchema: z.ZodObject<{
968
+ /** File path */
969
+ file: z.ZodString;
970
+ /** Number of lines inserted */
971
+ insertions: z.ZodNumber;
972
+ /** Number of lines deleted */
973
+ deletions: z.ZodNumber;
974
+ /** Is this a new file? */
975
+ new_file: z.ZodOptional<z.ZodBoolean>;
976
+ }, "strip", z.ZodTypeAny, {
977
+ file: string;
978
+ insertions: number;
979
+ deletions: number;
980
+ new_file?: boolean | undefined;
981
+ }, {
982
+ file: string;
983
+ insertions: number;
984
+ deletions: number;
985
+ new_file?: boolean | undefined;
986
+ }>;
987
+ /**
988
+ * Changes Context Schema
989
+ *
990
+ * File change statistics for the PR
991
+ * Helps understand scope and potential impact areas.
992
+ */
993
+ export declare const ChangesContextSchema: z.ZodObject<{
994
+ /** Total number of files changed */
995
+ files_changed: z.ZodNumber;
996
+ /** Total lines inserted across all files */
997
+ insertions: z.ZodNumber;
998
+ /** Total lines deleted across all files */
999
+ deletions: z.ZodNumber;
1000
+ /** Number of commits in the PR */
1001
+ commits: z.ZodNumber;
1002
+ /** Top files by lines changed (limited to 10 for token efficiency) */
1003
+ top_files: z.ZodOptional<z.ZodArray<z.ZodObject<{
1004
+ /** File path */
1005
+ file: z.ZodString;
1006
+ /** Number of lines inserted */
1007
+ insertions: z.ZodNumber;
1008
+ /** Number of lines deleted */
1009
+ deletions: z.ZodNumber;
1010
+ /** Is this a new file? */
1011
+ new_file: z.ZodOptional<z.ZodBoolean>;
1012
+ }, "strip", z.ZodTypeAny, {
1013
+ file: string;
1014
+ insertions: number;
1015
+ deletions: number;
1016
+ new_file?: boolean | undefined;
1017
+ }, {
1018
+ file: string;
1019
+ insertions: number;
1020
+ deletions: number;
1021
+ new_file?: boolean | undefined;
1022
+ }>, "many">>;
1023
+ }, "strip", z.ZodTypeAny, {
1024
+ insertions: number;
1025
+ deletions: number;
1026
+ files_changed: number;
1027
+ commits: number;
1028
+ top_files?: {
1029
+ file: string;
1030
+ insertions: number;
1031
+ deletions: number;
1032
+ new_file?: boolean | undefined;
1033
+ }[] | undefined;
1034
+ }, {
1035
+ insertions: number;
1036
+ deletions: number;
1037
+ files_changed: number;
1038
+ commits: number;
1039
+ top_files?: {
1040
+ file: string;
1041
+ insertions: number;
1042
+ deletions: number;
1043
+ new_file?: boolean | undefined;
1044
+ }[] | undefined;
1045
+ }>;
1046
+ /**
1047
+ * Next Step Schema
1048
+ *
1049
+ * Actionable next step with severity and context
1050
+ */
1051
+ export declare const NextStepSchema: z.ZodObject<{
1052
+ /** Action description */
1053
+ action: z.ZodString;
1054
+ /** URL to perform the action (if applicable) */
1055
+ url: z.ZodOptional<z.ZodString>;
1056
+ /** Severity level (prioritization) */
1057
+ severity: z.ZodEnum<["error", "warning", "info"]>;
1058
+ /** Reason or context for this action */
1059
+ reason: z.ZodOptional<z.ZodString>;
1060
+ }, "strip", z.ZodTypeAny, {
1061
+ severity: "error" | "warning" | "info";
1062
+ action: string;
1063
+ url?: string | undefined;
1064
+ reason?: string | undefined;
1065
+ }, {
1066
+ severity: "error" | "warning" | "info";
1067
+ action: string;
1068
+ url?: string | undefined;
1069
+ reason?: string | undefined;
1070
+ }>;
1071
+ /**
1072
+ * Guidance Schema
1073
+ *
1074
+ * Intelligent guidance based on check results.
1075
+ * Provides context-aware next steps with severity-based prioritization.
1076
+ */
1077
+ export declare const GuidanceSchema: z.ZodObject<{
1078
+ /** Overall status (passed, failed, pending) */
1079
+ status: z.ZodEnum<["passed", "failed", "pending"]>;
1080
+ /** Does this failure block merging? */
1081
+ blocking: z.ZodBoolean;
1082
+ /** Overall severity */
1083
+ severity: z.ZodEnum<["error", "warning", "info"]>;
1084
+ /** Human-readable summary */
1085
+ summary: z.ZodString;
1086
+ /** Prioritized list of next steps */
1087
+ next_steps: z.ZodOptional<z.ZodArray<z.ZodObject<{
1088
+ /** Action description */
1089
+ action: z.ZodString;
1090
+ /** URL to perform the action (if applicable) */
1091
+ url: z.ZodOptional<z.ZodString>;
1092
+ /** Severity level (prioritization) */
1093
+ severity: z.ZodEnum<["error", "warning", "info"]>;
1094
+ /** Reason or context for this action */
1095
+ reason: z.ZodOptional<z.ZodString>;
1096
+ }, "strip", z.ZodTypeAny, {
1097
+ severity: "error" | "warning" | "info";
1098
+ action: string;
1099
+ url?: string | undefined;
1100
+ reason?: string | undefined;
1101
+ }, {
1102
+ severity: "error" | "warning" | "info";
1103
+ action: string;
1104
+ url?: string | undefined;
1105
+ reason?: string | undefined;
1106
+ }>, "many">>;
1107
+ }, "strip", z.ZodTypeAny, {
1108
+ summary: string;
1109
+ status: "passed" | "failed" | "pending";
1110
+ severity: "error" | "warning" | "info";
1111
+ blocking: boolean;
1112
+ next_steps?: {
1113
+ severity: "error" | "warning" | "info";
1114
+ action: string;
1115
+ url?: string | undefined;
1116
+ reason?: string | undefined;
1117
+ }[] | undefined;
1118
+ }, {
1119
+ summary: string;
1120
+ status: "passed" | "failed" | "pending";
1121
+ severity: "error" | "warning" | "info";
1122
+ blocking: boolean;
1123
+ next_steps?: {
1124
+ severity: "error" | "warning" | "info";
1125
+ action: string;
1126
+ url?: string | undefined;
1127
+ reason?: string | undefined;
1128
+ }[] | undefined;
1129
+ }>;
1130
+ /**
1131
+ * Cache Info Schema
1132
+ *
1133
+ * Metadata about the local cache
1134
+ */
1135
+ export declare const CacheInfoSchema: z.ZodObject<{
1136
+ /** Cache directory location */
1137
+ location: z.ZodString;
1138
+ /** When the cache was created (ISO 8601) */
1139
+ cached_at: z.ZodString;
1140
+ /** When the cache expires (ISO 8601) */
1141
+ expires_at: z.ZodString;
1142
+ }, "strip", z.ZodTypeAny, {
1143
+ location: string;
1144
+ cached_at: string;
1145
+ expires_at: string;
1146
+ }, {
1147
+ location: string;
1148
+ cached_at: string;
1149
+ expires_at: string;
1150
+ }>;
1151
+ /**
1152
+ * Watch PR Result Schema
1153
+ *
1154
+ * Complete result structure from watch-pr command.
1155
+ *
1156
+ * Field ordering follows "Newspaper Philosophy":
1157
+ * 1. PR context & status (always needed)
1158
+ * 2. Check summary + history (quick overview)
1159
+ * 3. Failed checks FIRST (most actionable)
1160
+ * 4. Passed checks (confirmation)
1161
+ * 5. Guidance (what to do next)
1162
+ * 6. Changes (context)
1163
+ * 7. Cache (metadata, least important)
1164
+ *
1165
+ * If output is truncated, LLM still sees critical details.
1166
+ */
1167
+ export declare const WatchPRResultSchema: z.ZodObject<{
1168
+ /** PR metadata (number, title, branch, mergeable, labels, linked issues) */
1169
+ pr: z.ZodObject<{
1170
+ /** PR number */
1171
+ number: z.ZodNumber;
1172
+ /** PR title */
1173
+ title: z.ZodString;
1174
+ /** PR URL */
1175
+ url: z.ZodString;
1176
+ /** Head branch name */
1177
+ branch: z.ZodString;
1178
+ /** Base branch name (usually 'main' or 'develop') */
1179
+ base_branch: z.ZodString;
1180
+ /** PR author username */
1181
+ author: z.ZodString;
1182
+ /** Is this a draft PR? */
1183
+ draft: z.ZodBoolean;
1184
+ /** Is the PR mergeable? */
1185
+ mergeable: z.ZodBoolean;
1186
+ /** Merge state status (CLEAN, UNSTABLE, BLOCKED, etc.) */
1187
+ merge_state_status: z.ZodEnum<["BEHIND", "BLOCKED", "CLEAN", "DIRTY", "DRAFT", "HAS_HOOKS", "UNKNOWN", "UNSTABLE"]>;
1188
+ /** PR labels */
1189
+ labels: z.ZodArray<z.ZodString, "many">;
1190
+ /** Issues linked to this PR (via closing keywords) */
1191
+ linked_issues: z.ZodOptional<z.ZodArray<z.ZodObject<{
1192
+ /** Issue number */
1193
+ number: z.ZodNumber;
1194
+ /** Issue title */
1195
+ title: z.ZodString;
1196
+ /** Issue URL */
1197
+ url: z.ZodString;
1198
+ }, "strip", z.ZodTypeAny, {
1199
+ number: number;
1200
+ title: string;
1201
+ url: string;
1202
+ }, {
1203
+ number: number;
1204
+ title: string;
1205
+ url: string;
1206
+ }>, "many">>;
1207
+ }, "strip", z.ZodTypeAny, {
1208
+ number: number;
1209
+ author: string;
1210
+ title: string;
1211
+ url: string;
1212
+ branch: string;
1213
+ base_branch: string;
1214
+ draft: boolean;
1215
+ mergeable: boolean;
1216
+ merge_state_status: "BEHIND" | "BLOCKED" | "CLEAN" | "DIRTY" | "DRAFT" | "HAS_HOOKS" | "UNKNOWN" | "UNSTABLE";
1217
+ labels: string[];
1218
+ linked_issues?: {
1219
+ number: number;
1220
+ title: string;
1221
+ url: string;
1222
+ }[] | undefined;
1223
+ }, {
1224
+ number: number;
1225
+ author: string;
1226
+ title: string;
1227
+ url: string;
1228
+ branch: string;
1229
+ base_branch: string;
1230
+ draft: boolean;
1231
+ mergeable: boolean;
1232
+ merge_state_status: "BEHIND" | "BLOCKED" | "CLEAN" | "DIRTY" | "DRAFT" | "HAS_HOOKS" | "UNKNOWN" | "UNSTABLE";
1233
+ labels: string[];
1234
+ linked_issues?: {
1235
+ number: number;
1236
+ title: string;
1237
+ url: string;
1238
+ }[] | undefined;
1239
+ }>;
1240
+ /** Overall status (passed, failed, pending) */
1241
+ status: z.ZodEnum<["passed", "failed", "pending"]>;
1242
+ /** Check results with history context */
1243
+ checks: z.ZodObject<{
1244
+ /** Total number of checks */
1245
+ total: z.ZodNumber;
1246
+ /** Number of passed checks */
1247
+ passed: z.ZodNumber;
1248
+ /** Number of failed checks */
1249
+ failed: z.ZodNumber;
1250
+ /** Number of pending checks */
1251
+ pending: z.ZodNumber;
1252
+ /** Condensed history for pattern recognition (cheap tokens, high value) */
1253
+ history_summary: z.ZodOptional<z.ZodObject<{
1254
+ /** Total number of workflow runs for this PR branch */
1255
+ total_runs: z.ZodNumber;
1256
+ /** Recent pattern description (e.g., "Passed last 2 runs", "Failed last 3 runs") */
1257
+ recent_pattern: z.ZodString;
1258
+ /** Success rate percentage (e.g., "75%") based on last 10 runs */
1259
+ success_rate: z.ZodOptional<z.ZodString>;
1260
+ }, "strip", z.ZodTypeAny, {
1261
+ total_runs: number;
1262
+ recent_pattern: string;
1263
+ success_rate?: string | undefined;
1264
+ }, {
1265
+ total_runs: number;
1266
+ recent_pattern: string;
1267
+ success_rate?: string | undefined;
1268
+ }>>;
1269
+ /** GitHub Actions checks (with run_id and optional extraction) */
1270
+ github_actions: z.ZodArray<z.ZodObject<{
1271
+ /** Check name */
1272
+ name: z.ZodString;
1273
+ /** Check status (queued, in_progress, completed) */
1274
+ status: z.ZodEnum<["queued", "in_progress", "completed"]>;
1275
+ /** Check conclusion (present when completed) */
1276
+ conclusion: z.ZodOptional<z.ZodEnum<["success", "failure", "neutral", "cancelled", "skipped", "timed_out", "action_required"]>>;
1277
+ /** GitHub run ID for this check */
1278
+ run_id: z.ZodNumber;
1279
+ /**
1280
+ * GitHub job ID for this check (optional)
1281
+ *
1282
+ * Present for matrix strategy jobs. Used to fetch job-specific logs via:
1283
+ * `gh run view <run-id> --log --job <job-id>`
1284
+ *
1285
+ * Without job_id, `gh run view <run-id> --log` returns combined logs from ALL jobs,
1286
+ * which makes error extraction unreliable for matrix runs.
1287
+ */
1288
+ job_id: z.ZodOptional<z.ZodNumber>;
1289
+ /** Workflow name */
1290
+ workflow: z.ZodString;
1291
+ /** When the check started (ISO 8601) */
1292
+ started_at: z.ZodString;
1293
+ /** Human-readable duration (e.g., "2m15s") */
1294
+ duration: z.ZodString;
1295
+ /** Local path to cached log file (if cached) */
1296
+ log_file: z.ZodOptional<z.ZodString>;
1297
+ /**
1298
+ * Extraction result (CRITICAL: NEW FEATURE)
1299
+ *
1300
+ * Errors extracted from check logs using one of two modes:
1301
+ * - Matrix mode: Parsed from validate YAML output, passed through faithfully
1302
+ * - Non-matrix mode: Extracted from raw test output using extractors
1303
+ *
1304
+ * Both modes produce ErrorExtractorResult schema (from @vibe-validate/extractors)
1305
+ */
1306
+ extraction: z.ZodOptional<z.ZodObject<{
1307
+ summary: z.ZodString;
1308
+ totalErrors: z.ZodNumber;
1309
+ errors: z.ZodArray<z.ZodObject<{
1310
+ file: z.ZodOptional<z.ZodString>;
1311
+ line: z.ZodOptional<z.ZodNumber>;
1312
+ column: z.ZodOptional<z.ZodNumber>;
1313
+ message: z.ZodString;
1314
+ code: z.ZodOptional<z.ZodString>;
1315
+ severity: z.ZodOptional<z.ZodEnum<["error", "warning"]>>;
1316
+ context: z.ZodOptional<z.ZodString>;
1317
+ guidance: z.ZodOptional<z.ZodString>;
1318
+ }, "strip", z.ZodTypeAny, {
1319
+ message: string;
1320
+ file?: string | undefined;
1321
+ line?: number | undefined;
1322
+ column?: number | undefined;
1323
+ code?: string | undefined;
1324
+ severity?: "error" | "warning" | undefined;
1325
+ context?: string | undefined;
1326
+ guidance?: string | undefined;
1327
+ }, {
1328
+ message: string;
1329
+ file?: string | undefined;
1330
+ line?: number | undefined;
1331
+ column? /** Total number of workflow runs for this PR branch */: number | undefined;
1332
+ code?: string | undefined;
1333
+ severity?: "error" | "warning" | undefined;
1334
+ context?: string | undefined;
1335
+ guidance?: string | undefined;
1336
+ }>, "many">;
1337
+ guidance: z.ZodOptional<z.ZodString>;
1338
+ errorSummary: z.ZodOptional<z.ZodString>;
1339
+ metadata: z.ZodOptional<z.ZodObject<{
1340
+ detection: z.ZodOptional<z.ZodObject<{
1341
+ extractor: z.ZodString;
1342
+ confidence: z.ZodNumber;
1343
+ patterns: z.ZodArray<z.ZodString, "many">;
1344
+ reason: z.ZodString;
1345
+ }, "strip", z.ZodTypeAny, {
1346
+ extractor: string;
1347
+ confidence: number;
1348
+ patterns: string[];
1349
+ reason: string;
1350
+ }, {
1351
+ extractor: string;
1352
+ confidence: number;
1353
+ patterns: string[];
1354
+ reason: string;
1355
+ }>>;
1356
+ confidence: z.ZodNumber;
1357
+ completeness: z.ZodNumber;
1358
+ issues: z.ZodArray<z.ZodString, "many">;
1359
+ suggestions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1360
+ }, "strip", z.ZodTypeAny, {
1361
+ issues: string[];
1362
+ confidence: number;
1363
+ completeness: number;
1364
+ detection?: {
1365
+ extractor: string;
1366
+ confidence: number;
1367
+ patterns: string[];
1368
+ reason: string;
1369
+ } | undefined;
1370
+ suggestions?: string[] | undefined;
1371
+ }, {
1372
+ issues: string[];
1373
+ confidence: number;
1374
+ completeness: number;
1375
+ detection?: {
1376
+ extractor: string;
1377
+ confidence: number;
1378
+ patterns: string[];
1379
+ reason: string;
1380
+ } | undefined;
1381
+ suggestions?: string[] | undefined;
1382
+ }>>;
1383
+ }, "strip", z.ZodTypeAny, {
1384
+ summary: string;
1385
+ totalErrors: number;
1386
+ errors: {
1387
+ message: string;
1388
+ file?: string | undefined;
1389
+ line?: number | undefined;
1390
+ column?: number | undefined;
1391
+ code?: string | undefined;
1392
+ severity?: "error" | "warning" | undefined;
1393
+ context?: string | undefined;
1394
+ guidance?: string | undefined;
1395
+ }[];
1396
+ guidance?: string | undefined;
1397
+ errorSummary?: string | undefined;
1398
+ metadata?: {
1399
+ issues: string[];
1400
+ confidence: number;
1401
+ completeness: number;
1402
+ detection?: {
1403
+ extractor: string;
1404
+ confidence: number;
1405
+ patterns: string[];
1406
+ reason: string;
1407
+ } | undefined;
1408
+ suggestions?: string[] | undefined;
1409
+ } | undefined;
1410
+ }, {
1411
+ summary: string;
1412
+ totalErrors: number;
1413
+ errors: {
1414
+ message: string;
1415
+ file?: string | undefined;
1416
+ line?: number | undefined;
1417
+ column?: number | undefined;
1418
+ code?: string | undefined;
1419
+ severity?: "error" | "warning" | undefined;
1420
+ context
1421
+ /** Cache directory location */
1422
+ ? /** Cache directory location */: string | undefined;
1423
+ guidance?: string | undefined;
1424
+ }[];
1425
+ guidance?: string | undefined;
1426
+ errorSummary?: string | undefined;
1427
+ metadata?: {
1428
+ issues: string[];
1429
+ confidence: number;
1430
+ completeness: number;
1431
+ detection?: {
1432
+ extractor: string;
1433
+ confidence: number;
1434
+ patterns: string[];
1435
+ reason: string;
1436
+ } | undefined;
1437
+ suggestions?: string[] | undefined;
1438
+ } | undefined;
1439
+ }>>;
1440
+ }, "strip", z.ZodTypeAny, {
1441
+ name: string;
1442
+ workflow: string;
1443
+ status: "queued" | "in_progress" | "completed";
1444
+ run_id: number;
1445
+ started_at: string;
1446
+ duration: string;
1447
+ extraction?: {
1448
+ summary: string;
1449
+ totalErrors: number;
1450
+ errors: {
1451
+ message: string;
1452
+ file?: string | undefined;
1453
+ line?: number | undefined;
1454
+ column?: number | undefined;
1455
+ code?: string | undefined;
1456
+ severity?: "error" | "warning" | undefined;
1457
+ context?: string | undefined;
1458
+ guidance?: string | undefined;
1459
+ }[];
1460
+ guidance?: string | undefined;
1461
+ errorSummary?: string | undefined;
1462
+ metadata?: {
1463
+ issues: string[];
1464
+ confidence: number;
1465
+ completeness: number;
1466
+ detection?: {
1467
+ extractor: string;
1468
+ confidence: number;
1469
+ patterns: string[];
1470
+ reason: string;
1471
+ } | undefined;
1472
+ suggestions?: string[] | undefined;
1473
+ } | undefined;
1474
+ } | undefined;
1475
+ conclusion?: "success" | "failure" | "neutral" | "cancelled" | "skipped" | "timed_out" | "action_required" | undefined;
1476
+ job_id?: number | undefined;
1477
+ log_file?: string | undefined;
1478
+ }, {
1479
+ name: string;
1480
+ workflow: string;
1481
+ status: "queued" | "in_progress" | "completed";
1482
+ run_id: number;
1483
+ started_at: string;
1484
+ duration: string;
1485
+ extraction?: {
1486
+ summary: string;
1487
+ totalErrors: number;
1488
+ errors: {
1489
+ message: string;
1490
+ file?: string | undefined;
1491
+ line?: number | undefined;
1492
+ column?: number | undefined;
1493
+ code?: string | undefined;
1494
+ severity?: "error" | "warning" | undefined;
1495
+ context
1496
+ /** Cache directory location */
1497
+ ? /** Cache directory location */: string | undefined;
1498
+ guidance?: string | undefined;
1499
+ }[];
1500
+ guidance?: string | undefined;
1501
+ errorSummary?: string | undefined;
1502
+ metadata?: {
1503
+ issues: string[];
1504
+ confidence: number;
1505
+ completeness: number;
1506
+ detection?: {
1507
+ extractor: string;
1508
+ confidence: number;
1509
+ patterns: string[];
1510
+ reason: string;
1511
+ } | undefined;
1512
+ suggestions?: string[] | undefined;
1513
+ } | undefined;
1514
+ } | undefined;
1515
+ conclusion?: "success" | "failure" | "neutral" | "cancelled" | "skipped" | "timed_out" | "action_required" | undefined;
1516
+ job_id?: number | undefined;
1517
+ log_file?: string | undefined;
1518
+ }>, "many">;
1519
+ /** External checks (with detailsUrl and optional extraction) */
1520
+ external_checks: z.ZodArray<z.ZodObject<{
1521
+ /** Check name (e.g., "codecov/patch", "SonarCloud Code Analysis") */
1522
+ name: z.ZodString;
1523
+ /** Check status */
1524
+ status: z.ZodEnum<["queued", "in_progress", "completed"]>;
1525
+ /** Check conclusion (present when completed) */
1526
+ conclusion: z.ZodOptional<z.ZodEnum<["success", "failure", "neutral", "cancelled", "skipped", "timed_out", "action_required"]>>;
1527
+ /** URL to view check details on external provider */
1528
+ url: z.ZodString;
1529
+ /** Provider name (e.g., "codecov", "sonarcloud") */
1530
+ provider: z.ZodOptional<z.ZodString>;
1531
+ /** Extracted details (if extraction succeeded) */
1532
+ extracted: z.ZodNullable<z.ZodOptional<z.ZodObject<{
1533
+ /** Human-readable summary of the check result */
1534
+ summary: z.ZodString;
1535
+ /** Additional details (provider-specific) */
1536
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
1537
+ /** Severity level */
1538
+ severity: z.ZodOptional<z.ZodEnum<["error", "warning", "info"]>>;
1539
+ }, "strip", z.ZodTypeAny, {
1540
+ summary: string;
1541
+ details?: Record<string, any> | undefined;
1542
+ severity?: "error" | "warning" | "info" | undefined;
1543
+ }, {
1544
+ summary: string;
1545
+ details?: Record<string, any> | undefined;
1546
+ severity?: "error" | "warning" | "info" | undefined;
1547
+ }>>>;
1548
+ /** Error message if extraction failed */
1549
+ extraction_error: z.ZodOptional<z.ZodString>;
1550
+ }, "strip", z.ZodTypeAny, {
1551
+ name: string;
1552
+ status: "queued" | "in_progress" | "completed";
1553
+ url: string;
1554
+ conclusion?: "success" | "failure" | "neutral" | "cancelled" | "skipped" | "timed_out" | "action_required" | undefined;
1555
+ provider?: string | undefined;
1556
+ extracted?: {
1557
+ summary: string;
1558
+ details?: Record<string, any> | undefined;
1559
+ severity?: "error" | "warning" | "info" | undefined;
1560
+ } | null | undefined;
1561
+ extraction_error?: string | undefined;
1562
+ }, {
1563
+ name: string;
1564
+ status: "queued" | "in_progress" | "completed";
1565
+ url: string;
1566
+ conclusion?: "success" | "failure" | "neutral" | "cancelled" | "skipped" | "timed_out" | "action_required" | undefined;
1567
+ provider?: string | undefined;
1568
+ extracted?: {
1569
+ summary: string;
1570
+ details?: Record<string, any> | undefined;
1571
+ severity?: "error" | "warning" | "info" | undefined;
1572
+ } | null | undefined;
1573
+ extraction_error?: string | undefined;
1574
+ }>, "many">;
1575
+ }, "strip", z.ZodTypeAny, {
1576
+ passed: number;
1577
+ failed: number;
1578
+ total: number;
1579
+ pending: number;
1580
+ github_actions: {
1581
+ name: string;
1582
+ workflow: string;
1583
+ status: "queued" | "in_progress" | "completed";
1584
+ run_id: number;
1585
+ started_at: string;
1586
+ duration: string;
1587
+ extraction?: {
1588
+ summary: string;
1589
+ totalErrors: number;
1590
+ errors: {
1591
+ message: string;
1592
+ file?: string | undefined;
1593
+ line?: number | undefined;
1594
+ column?: number | undefined;
1595
+ code?: string | undefined;
1596
+ severity?: "error" | "warning" | undefined;
1597
+ context?: string | undefined;
1598
+ guidance?: string | undefined;
1599
+ }[];
1600
+ guidance?: string | undefined;
1601
+ errorSummary?: string | undefined;
1602
+ metadata?: {
1603
+ issues: string[];
1604
+ confidence: number;
1605
+ completeness: number;
1606
+ detection?: {
1607
+ extractor: string;
1608
+ confidence: number;
1609
+ patterns: string[];
1610
+ reason: string;
1611
+ } | undefined;
1612
+ suggestions?: string[] | undefined;
1613
+ } | undefined;
1614
+ } | undefined;
1615
+ conclusion?: "success" | "failure" | "neutral" | "cancelled" | "skipped" | "timed_out" | "action_required" | undefined;
1616
+ job_id?: number | undefined;
1617
+ log_file?: string | undefined;
1618
+ }[];
1619
+ external_checks: {
1620
+ name: string;
1621
+ status: "queued" | "in_progress" | "completed";
1622
+ url: string;
1623
+ conclusion?: "success" | "failure" | "neutral" | "cancelled" | "skipped" | "timed_out" | "action_required" | undefined;
1624
+ provider?: string | undefined;
1625
+ extracted?: {
1626
+ summary: string;
1627
+ details?: Record<string, any> | undefined;
1628
+ severity?: "error" | "warning" | "info" | undefined;
1629
+ } | null | undefined;
1630
+ extraction_error?: string | undefined;
1631
+ }[];
1632
+ history_summary?: {
1633
+ total_runs: number;
1634
+ recent_pattern: string;
1635
+ success_rate?: string | undefined;
1636
+ } | undefined;
1637
+ }, {
1638
+ passed: number;
1639
+ failed: number;
1640
+ total: number;
1641
+ pending: number;
1642
+ github_actions: {
1643
+ name: string;
1644
+ workflow: string;
1645
+ status: "queued" | "in_progress" | "completed";
1646
+ run_id: number;
1647
+ started_at: string;
1648
+ duration: string;
1649
+ extraction?: {
1650
+ summary: string;
1651
+ totalErrors: number;
1652
+ errors: {
1653
+ message: string;
1654
+ file?: string | undefined;
1655
+ line?: number | undefined;
1656
+ column?: number | undefined;
1657
+ code?: string | undefined;
1658
+ severity?: "error" | "warning" | undefined;
1659
+ context
1660
+ /** Cache directory location */
1661
+ ? /** Cache directory location */: string | undefined;
1662
+ guidance?: string | undefined;
1663
+ }[];
1664
+ guidance?: string | undefined;
1665
+ errorSummary?: string | undefined;
1666
+ metadata?: {
1667
+ issues: string[];
1668
+ confidence: number;
1669
+ completeness: number;
1670
+ detection?: {
1671
+ extractor: string;
1672
+ confidence: number;
1673
+ patterns: string[];
1674
+ reason: string;
1675
+ } | undefined;
1676
+ suggestions?: string[] | undefined;
1677
+ } | undefined;
1678
+ } | undefined;
1679
+ conclusion?: "success" | "failure" | "neutral" | "cancelled" | "skipped" | "timed_out" | "action_required" | undefined;
1680
+ job_id?: number | undefined;
1681
+ log_file?: string | undefined;
1682
+ }[];
1683
+ external_checks: {
1684
+ name: string;
1685
+ status: "queued" | "in_progress" | "completed";
1686
+ url: string;
1687
+ conclusion?: "success" | "failure" | "neutral" | "cancelled" | "skipped" | "timed_out" | "action_required" | undefined;
1688
+ provider?: string | undefined;
1689
+ extracted?: {
1690
+ summary: string;
1691
+ details?: Record<string, any> | undefined;
1692
+ severity?: "error" | "warning" | "info" | undefined;
1693
+ } | null | undefined;
1694
+ extraction_error?: string | undefined;
1695
+ }[];
1696
+ history_summary?: {
1697
+ total_runs: number;
1698
+ recent_pattern: string;
1699
+ success_rate?: string | undefined;
1700
+ } | undefined;
1701
+ }>;
1702
+ /** File change context (optional, helps understand scope) */
1703
+ changes: z.ZodOptional<z.ZodObject<{
1704
+ /** Total number of files changed */
1705
+ files_changed: z.ZodNumber;
1706
+ /** Total lines inserted across all files */
1707
+ insertions: z.ZodNumber;
1708
+ /** Total lines deleted across all files */
1709
+ deletions: z.ZodNumber;
1710
+ /** Number of commits in the PR */
1711
+ commits: z.ZodNumber;
1712
+ /** Top files by lines changed (limited to 10 for token efficiency) */
1713
+ top_files: z.ZodOptional<z.ZodArray<z.ZodObject<{
1714
+ /** File path */
1715
+ file: z.ZodString;
1716
+ /** Number of lines inserted */
1717
+ insertions: z.ZodNumber;
1718
+ /** Number of lines deleted */
1719
+ deletions: z.ZodNumber;
1720
+ /** Is this a new file? */
1721
+ new_file: z.ZodOptional<z.ZodBoolean>;
1722
+ }, "strip", z.ZodTypeAny, {
1723
+ file: string;
1724
+ insertions: number;
1725
+ deletions: number;
1726
+ new_file?: boolean | undefined;
1727
+ }, {
1728
+ file: string;
1729
+ insertions: number;
1730
+ deletions: number;
1731
+ new_file?: boolean | undefined;
1732
+ }>, "many">>;
1733
+ }, "strip", z.ZodTypeAny, {
1734
+ insertions: number;
1735
+ deletions: number;
1736
+ files_changed: number;
1737
+ commits: number;
1738
+ top_files?: {
1739
+ file: string;
1740
+ insertions: number;
1741
+ deletions: number;
1742
+ new_file?: boolean | undefined;
1743
+ }[] | undefined;
1744
+ }, {
1745
+ insertions: number;
1746
+ deletions: number;
1747
+ files_changed: number;
1748
+ commits: number;
1749
+ top_files?: {
1750
+ file: string;
1751
+ insertions: number;
1752
+ deletions: number;
1753
+ new_file?: boolean | undefined;
1754
+ }[] | undefined;
1755
+ }>>;
1756
+ /** Intelligent guidance with next steps (optional) */
1757
+ guidance: z.ZodOptional<z.ZodObject<{
1758
+ /** Overall status (passed, failed, pending) */
1759
+ status: z.ZodEnum<["passed", "failed", "pending"]>;
1760
+ /** Does this failure block merging? */
1761
+ blocking: z.ZodBoolean;
1762
+ /** Overall severity */
1763
+ severity: z.ZodEnum<["error", "warning", "info"]>;
1764
+ /** Human-readable summary */
1765
+ summary: z.ZodString;
1766
+ /** Prioritized list of next steps */
1767
+ next_steps: z.ZodOptional<z.ZodArray<z.ZodObject<{
1768
+ /** Action description */
1769
+ action: z.ZodString;
1770
+ /** URL to perform the action (if applicable) */
1771
+ url: z.ZodOptional<z.ZodString>;
1772
+ /** Severity level (prioritization) */
1773
+ severity: z.ZodEnum<["error", "warning", "info"]>;
1774
+ /** Reason or context for this action */
1775
+ reason: z.ZodOptional<z.ZodString>;
1776
+ }, "strip", z.ZodTypeAny, {
1777
+ severity: "error" | "warning" | "info";
1778
+ action: string;
1779
+ url?: string | undefined;
1780
+ reason?: string | undefined;
1781
+ }, {
1782
+ severity: "error" | "warning" | "info";
1783
+ action: string;
1784
+ url?: string | undefined;
1785
+ reason?: string | undefined;
1786
+ }>, "many">>;
1787
+ }, "strip", z.ZodTypeAny, {
1788
+ summary: string;
1789
+ status: "passed" | "failed" | "pending";
1790
+ severity: "error" | "warning" | "info";
1791
+ blocking: boolean;
1792
+ next_steps?: {
1793
+ severity: "error" | "warning" | "info";
1794
+ action: string;
1795
+ url?: string | undefined;
1796
+ reason?: string | undefined;
1797
+ }[] | undefined;
1798
+ }, {
1799
+ summary: string;
1800
+ status: "passed" | "failed" | "pending";
1801
+ severity: "error" | "warning" | "info";
1802
+ blocking: boolean;
1803
+ next_steps?: {
1804
+ severity: "error" | "warning" | "info";
1805
+ action: string;
1806
+ url?: string | undefined;
1807
+ reason?: string | undefined;
1808
+ }[] | undefined;
1809
+ }>>;
1810
+ /** Cache metadata (optional) */
1811
+ cache: z.ZodOptional<z.ZodObject<{
1812
+ /** Cache directory location */
1813
+ location: z.ZodString;
1814
+ /** When the cache was created (ISO 8601) */
1815
+ cached_at: z.ZodString;
1816
+ /** When the cache expires (ISO 8601) */
1817
+ expires_at: z.ZodString;
1818
+ }, "strip", z.ZodTypeAny, {
1819
+ location: string;
1820
+ cached_at: string;
1821
+ expires_at: string;
1822
+ }, {
1823
+ location: string;
1824
+ cached_at: string;
1825
+ expires_at: string;
1826
+ }>>;
1827
+ }, "strip", z.ZodTypeAny, {
1828
+ checks: {
1829
+ passed: number;
1830
+ failed: number;
1831
+ total: number;
1832
+ pending: number;
1833
+ github_actions: {
1834
+ name: string;
1835
+ workflow: string;
1836
+ status: "queued" | "in_progress" | "completed";
1837
+ run_id: number;
1838
+ started_at: string;
1839
+ duration: string;
1840
+ extraction?: {
1841
+ summary: string;
1842
+ totalErrors: number;
1843
+ errors: {
1844
+ message: string;
1845
+ file?: string | undefined;
1846
+ line?: number | undefined;
1847
+ column?: number | undefined;
1848
+ code?: string | undefined;
1849
+ severity?: "error" | "warning" | undefined;
1850
+ context?: string | undefined;
1851
+ guidance?: string | undefined;
1852
+ }[];
1853
+ guidance?: string | undefined;
1854
+ errorSummary?: string | undefined;
1855
+ metadata?: {
1856
+ issues: string[];
1857
+ confidence: number;
1858
+ completeness: number;
1859
+ detection?: {
1860
+ extractor: string;
1861
+ confidence: number;
1862
+ patterns: string[];
1863
+ reason: string;
1864
+ } | undefined;
1865
+ suggestions?: string[] | undefined;
1866
+ } | undefined;
1867
+ } | undefined;
1868
+ conclusion?: "success" | "failure" | "neutral" | "cancelled" | "skipped" | "timed_out" | "action_required" | undefined;
1869
+ job_id?: number | undefined;
1870
+ log_file?: string | undefined;
1871
+ }[];
1872
+ external_checks: {
1873
+ name: string;
1874
+ status: "queued" | "in_progress" | "completed";
1875
+ url: string;
1876
+ conclusion?: "success" | "failure" | "neutral" | "cancelled" | "skipped" | "timed_out" | "action_required" | undefined;
1877
+ provider?: string | undefined;
1878
+ extracted?: {
1879
+ summary: string;
1880
+ details?: Record<string, any> | undefined;
1881
+ severity?: "error" | "warning" | "info" | undefined;
1882
+ } | null | undefined;
1883
+ extraction_error?: string | undefined;
1884
+ }[];
1885
+ history_summary?: {
1886
+ total_runs: number;
1887
+ recent_pattern: string;
1888
+ success_rate?: string | undefined;
1889
+ } | undefined;
1890
+ };
1891
+ status: "passed" | "failed" | "pending";
1892
+ pr: {
1893
+ number: number;
1894
+ author: string;
1895
+ title: string;
1896
+ url: string;
1897
+ branch: string;
1898
+ base_branch: string;
1899
+ draft: boolean;
1900
+ mergeable: boolean;
1901
+ merge_state_status: "BEHIND" | "BLOCKED" | "CLEAN" | "DIRTY" | "DRAFT" | "HAS_HOOKS" | "UNKNOWN" | "UNSTABLE";
1902
+ labels: string[];
1903
+ linked_issues?: {
1904
+ number: number;
1905
+ title: string;
1906
+ url: string;
1907
+ }[] | undefined;
1908
+ };
1909
+ cache?: {
1910
+ location: string;
1911
+ cached_at: string;
1912
+ expires_at: string;
1913
+ } | undefined;
1914
+ changes?: {
1915
+ insertions: number;
1916
+ deletions: number;
1917
+ files_changed: number;
1918
+ commits: number;
1919
+ top_files?: {
1920
+ file: string;
1921
+ insertions: number;
1922
+ deletions: number;
1923
+ new_file?: boolean | undefined;
1924
+ }[] | undefined;
1925
+ } | undefined;
1926
+ guidance?: {
1927
+ summary: string;
1928
+ status: "passed" | "failed" | "pending";
1929
+ severity: "error" | "warning" | "info";
1930
+ blocking: boolean;
1931
+ next_steps?: {
1932
+ severity: "error" | "warning" | "info";
1933
+ action: string;
1934
+ url?: string | undefined;
1935
+ reason?: string | undefined;
1936
+ }[] | undefined;
1937
+ } | undefined;
1938
+ }, {
1939
+ checks: {
1940
+ passed: number;
1941
+ failed: number;
1942
+ total: number;
1943
+ pending: number;
1944
+ github_actions: {
1945
+ name: string;
1946
+ workflow: string;
1947
+ status: "queued" | "in_progress" | "completed";
1948
+ run_id: number;
1949
+ started_at: string;
1950
+ duration: string;
1951
+ extraction?: {
1952
+ summary: string;
1953
+ totalErrors: number;
1954
+ errors: {
1955
+ message: string;
1956
+ file?: string | undefined;
1957
+ line?: number | undefined;
1958
+ column?: number | undefined;
1959
+ code?: string | undefined;
1960
+ severity?: "error" | "warning" | undefined;
1961
+ context
1962
+ /** Cache directory location */
1963
+ ? /** Cache directory location */: string | undefined;
1964
+ guidance?: string | undefined;
1965
+ }[];
1966
+ guidance?: string | undefined;
1967
+ errorSummary?: string | undefined;
1968
+ metadata?: {
1969
+ issues: string[];
1970
+ confidence: number;
1971
+ completeness: number;
1972
+ detection?: {
1973
+ extractor: string;
1974
+ confidence: number;
1975
+ patterns: string[];
1976
+ reason: string;
1977
+ } | undefined;
1978
+ suggestions?: string[] | undefined;
1979
+ } | undefined;
1980
+ } | undefined;
1981
+ conclusion?: "success" | "failure" | "neutral" | "cancelled" | "skipped" | "timed_out" | "action_required" | undefined;
1982
+ job_id?: number | undefined;
1983
+ log_file?: string | undefined;
1984
+ }[];
1985
+ external_checks: {
1986
+ name: string;
1987
+ status: "queued" | "in_progress" | "completed";
1988
+ url: string;
1989
+ conclusion?: "success" | "failure" | "neutral" | "cancelled" | "skipped" | "timed_out" | "action_required" | undefined;
1990
+ provider?: string | undefined;
1991
+ extracted?: {
1992
+ summary: string;
1993
+ details?: Record<string, any> | undefined;
1994
+ severity?: "error" | "warning" | "info" | undefined;
1995
+ } | null | undefined;
1996
+ extraction_error?: string | undefined;
1997
+ }[];
1998
+ history_summary?: {
1999
+ total_runs: number;
2000
+ recent_pattern: string;
2001
+ success_rate?: string | undefined;
2002
+ } | undefined;
2003
+ };
2004
+ status: "passed" | "failed" | "pending";
2005
+ pr: {
2006
+ number: number;
2007
+ author: string;
2008
+ title: string;
2009
+ url: string;
2010
+ branch: string;
2011
+ base_branch: string;
2012
+ draft: boolean;
2013
+ mergeable: boolean;
2014
+ merge_state_status: "BEHIND" | "BLOCKED" | "CLEAN" | "DIRTY" | "DRAFT" | "HAS_HOOKS" | "UNKNOWN" | "UNSTABLE";
2015
+ labels: string[];
2016
+ linked_issues?: {
2017
+ number: number;
2018
+ title: string;
2019
+ url: string;
2020
+ }[] | undefined;
2021
+ };
2022
+ cache?: {
2023
+ location: string;
2024
+ cached_at: string;
2025
+ expires_at: string;
2026
+ } | undefined;
2027
+ changes?: {
2028
+ insertions: number;
2029
+ deletions: number;
2030
+ files_changed: number;
2031
+ commits: number;
2032
+ top_files?: {
2033
+ file: string;
2034
+ insertions: number;
2035
+ deletions: number;
2036
+ new_file?: boolean | undefined;
2037
+ }[] | undefined;
2038
+ } | undefined;
2039
+ guidance?: {
2040
+ summary: string;
2041
+ status: "passed" | "failed" | "pending";
2042
+ severity: "error" | "warning" | "info";
2043
+ blocking: boolean;
2044
+ next_steps?: {
2045
+ severity: "error" | "warning" | "info";
2046
+ action: string;
2047
+ url?: string | undefined;
2048
+ reason?: string | undefined;
2049
+ }[] | undefined;
2050
+ } | undefined;
2051
+ }>;
2052
+ export type CheckStatus = z.infer<typeof CheckStatusSchema>;
2053
+ export type CheckConclusion = z.infer<typeof CheckConclusionSchema>;
2054
+ export type MergeStateStatus = z.infer<typeof MergeStateStatusSchema>;
2055
+ export type Severity = z.infer<typeof SeveritySchema>;
2056
+ export type LinkedIssue = z.infer<typeof LinkedIssueSchema>;
2057
+ /** PR overall status type */
2058
+ export type PRStatus = 'passed' | 'failed' | 'pending';
2059
+ export type PRMetadata = z.infer<typeof PRMetadataSchema>;
2060
+ export type GitHubActionCheck = z.infer<typeof GitHubActionCheckSchema>;
2061
+ export type ExternalCheckDetails = z.infer<typeof ExternalCheckDetailsSchema>;
2062
+ export type ExternalCheck = z.infer<typeof ExternalCheckSchema>;
2063
+ export type CheckHistorySummary = z.infer<typeof CheckHistorySummarySchema>;
2064
+ export type ChecksSummary = z.infer<typeof ChecksSummarySchema>;
2065
+ export type FileChange = z.infer<typeof FileChangeSchema>;
2066
+ export type ChangesContext = z.infer<typeof ChangesContextSchema>;
2067
+ export type NextStep = z.infer<typeof NextStepSchema>;
2068
+ export type Guidance = z.infer<typeof GuidanceSchema>;
2069
+ export type CacheInfo = z.infer<typeof CacheInfoSchema>;
2070
+ export type WatchPRResult = z.infer<typeof WatchPRResultSchema>;
2071
+ //# sourceMappingURL=watch-pr-result.schema.d.ts.map