@vibe-validate/core 0.14.3 → 0.15.0-rc.1

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 (39) hide show
  1. package/README.md +24 -0
  2. package/dist/index.d.ts +9 -3
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +7 -2
  5. package/dist/index.js.map +1 -1
  6. package/dist/output-capture-schema.d.ts +144 -0
  7. package/dist/output-capture-schema.d.ts.map +1 -0
  8. package/dist/output-capture-schema.js +52 -0
  9. package/dist/output-capture-schema.js.map +1 -0
  10. package/dist/process-utils.d.ts +84 -0
  11. package/dist/process-utils.d.ts.map +1 -1
  12. package/dist/process-utils.js +176 -1
  13. package/dist/process-utils.js.map +1 -1
  14. package/dist/result-schema.d.ts +1352 -88
  15. package/dist/result-schema.d.ts.map +1 -1
  16. package/dist/result-schema.js +114 -57
  17. package/dist/result-schema.js.map +1 -1
  18. package/dist/run-output-parser.d.ts +47 -0
  19. package/dist/run-output-parser.d.ts.map +1 -0
  20. package/dist/run-output-parser.js +109 -0
  21. package/dist/run-output-parser.js.map +1 -0
  22. package/dist/runner.d.ts +35 -2
  23. package/dist/runner.d.ts.map +1 -1
  24. package/dist/runner.js +105 -167
  25. package/dist/runner.js.map +1 -1
  26. package/dist/schema-utils.d.ts +57 -0
  27. package/dist/schema-utils.d.ts.map +1 -0
  28. package/dist/schema-utils.js +67 -0
  29. package/dist/schema-utils.js.map +1 -0
  30. package/dist/scripts/generate-result-schema.d.ts +1 -1
  31. package/dist/scripts/generate-result-schema.js +3 -3
  32. package/dist/scripts/generate-result-schema.js.map +1 -1
  33. package/dist/types.js +5 -1
  34. package/dist/types.js.map +1 -1
  35. package/package.json +6 -5
  36. package/validate-result.schema.json +245 -0
  37. package/dist/types.d.ts +0 -138
  38. package/dist/types.d.ts.map +0 -1
  39. package/validation-result.schema.json +0 -100
@@ -5,238 +5,1502 @@
5
5
  * runtime validation and JSON Schema generation for documentation.
6
6
  */
7
7
  import { z } from 'zod';
8
+ /**
9
+ * Base: Command Execution Schema
10
+ *
11
+ * Shared by all command executions (RunResult, StepResult).
12
+ * Every command execution has:
13
+ * - What ran (command)
14
+ * - How it ended (exitCode)
15
+ * - How long it took (durationSecs)
16
+ * - What errors occurred (extraction)
17
+ */
18
+ export declare const CommandExecutionSchema: z.ZodObject<{
19
+ /** Command that was executed */
20
+ command: z.ZodString;
21
+ /** Exit code from the command */
22
+ exitCode: z.ZodNumber;
23
+ /** Execution duration in seconds */
24
+ durationSecs: z.ZodNumber;
25
+ /** Extracted error information (LLM-optimized, structured errors) */
26
+ extraction: z.ZodOptional<z.ZodObject<{
27
+ summary: z.ZodString;
28
+ totalErrors: z.ZodNumber;
29
+ errors: z.ZodArray<z.ZodObject<{
30
+ file: z.ZodOptional<z.ZodString>;
31
+ line: z.ZodOptional<z.ZodNumber>;
32
+ column: z.ZodOptional<z.ZodNumber>;
33
+ message: z.ZodString;
34
+ code: z.ZodOptional<z.ZodString>;
35
+ severity: z.ZodOptional<z.ZodEnum<["error", "warning"]>>;
36
+ context: z.ZodOptional<z.ZodString>;
37
+ guidance: z.ZodOptional<z.ZodString>;
38
+ }, "strip", z.ZodTypeAny, {
39
+ message: string;
40
+ file?: string | undefined;
41
+ line?: number | undefined;
42
+ column?: number | undefined;
43
+ code?: string | undefined;
44
+ severity?: "error" | "warning" | undefined;
45
+ context?: string | undefined;
46
+ guidance?: string | undefined;
47
+ }, {
48
+ message: string;
49
+ file?: string | undefined;
50
+ line?: number | undefined;
51
+ column?: number | undefined;
52
+ code?: string | undefined;
53
+ severity?: "error" | "warning" | undefined;
54
+ context?: string | undefined;
55
+ guidance?: string | undefined;
56
+ }>, "many">;
57
+ guidance: z.ZodOptional<z.ZodString>;
58
+ errorSummary: z.ZodOptional<z.ZodString>;
59
+ metadata: z.ZodOptional<z.ZodObject<{
60
+ detection: z.ZodOptional<z.ZodObject<{
61
+ extractor: z.ZodString;
62
+ confidence: z.ZodNumber;
63
+ patterns: z.ZodArray<z.ZodString, "many">;
64
+ reason: z.ZodString;
65
+ }, "strip", z.ZodTypeAny, {
66
+ extractor: string;
67
+ confidence: number;
68
+ patterns: string[];
69
+ reason: string;
70
+ }, {
71
+ extractor: string;
72
+ confidence: number;
73
+ patterns: string[];
74
+ reason: string;
75
+ }>>;
76
+ confidence: z.ZodNumber;
77
+ completeness: z.ZodNumber;
78
+ issues: z.ZodArray<z.ZodString, "many">;
79
+ suggestions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
80
+ }, "strip", z.ZodTypeAny, {
81
+ issues: string[];
82
+ confidence: number;
83
+ completeness: number;
84
+ detection?: {
85
+ extractor: string;
86
+ confidence: number;
87
+ patterns: string[];
88
+ reason: string;
89
+ } | undefined;
90
+ suggestions?: string[] | undefined;
91
+ }, {
92
+ issues: string[];
93
+ confidence: number;
94
+ completeness: number;
95
+ detection?: {
96
+ extractor: string;
97
+ confidence: number;
98
+ patterns: string[];
99
+ reason: string;
100
+ } | undefined;
101
+ suggestions?: string[] | undefined;
102
+ }>>;
103
+ }, "strip", z.ZodTypeAny, {
104
+ summary: string;
105
+ totalErrors: number;
106
+ errors: {
107
+ message: string;
108
+ file?: string | undefined;
109
+ line?: number | undefined;
110
+ column?: number | undefined;
111
+ code?: string | undefined;
112
+ severity?: "error" | "warning" | undefined;
113
+ context?: string | undefined;
114
+ guidance?: string | undefined;
115
+ }[];
116
+ guidance?: string | undefined;
117
+ errorSummary?: string | undefined;
118
+ metadata?: {
119
+ issues: string[];
120
+ confidence: number;
121
+ completeness: number;
122
+ detection?: {
123
+ extractor: string;
124
+ confidence: number;
125
+ patterns: string[];
126
+ reason: string;
127
+ } | undefined;
128
+ suggestions?: string[] | undefined;
129
+ } | undefined;
130
+ }, {
131
+ summary: string;
132
+ totalErrors: number;
133
+ errors: {
134
+ message: string;
135
+ file?: string | undefined;
136
+ line?: number | undefined;
137
+ column?: number | undefined;
138
+ code?: string | undefined;
139
+ severity?: "error" | "warning" | undefined;
140
+ context?: string | undefined;
141
+ guidance?: string | undefined;
142
+ }[];
143
+ guidance?: string | undefined;
144
+ errorSummary?: string | undefined;
145
+ metadata?: {
146
+ issues: string[];
147
+ confidence: number;
148
+ completeness: number;
149
+ detection?: {
150
+ extractor: string;
151
+ confidence: number;
152
+ patterns: string[];
153
+ reason: string;
154
+ } | undefined;
155
+ suggestions?: string[] | undefined;
156
+ } | undefined;
157
+ }>>;
158
+ }, "strip", z.ZodTypeAny, {
159
+ command: string;
160
+ exitCode: number;
161
+ durationSecs: number;
162
+ extraction?: {
163
+ summary: string;
164
+ totalErrors: number;
165
+ errors: {
166
+ message: string;
167
+ file?: string | undefined;
168
+ line?: number | undefined;
169
+ column?: number | undefined;
170
+ code?: string | undefined;
171
+ severity?: "error" | "warning" | undefined;
172
+ context?: string | undefined;
173
+ guidance?: string | undefined;
174
+ }[];
175
+ guidance?: string | undefined;
176
+ errorSummary?: string | undefined;
177
+ metadata?: {
178
+ issues: string[];
179
+ confidence: number;
180
+ completeness: number;
181
+ detection?: {
182
+ extractor: string;
183
+ confidence: number;
184
+ patterns: string[];
185
+ reason: string;
186
+ } | undefined;
187
+ suggestions?: string[] | undefined;
188
+ } | undefined;
189
+ } | undefined;
190
+ }, {
191
+ command: string;
192
+ exitCode: number;
193
+ durationSecs: number;
194
+ extraction?: {
195
+ summary: string;
196
+ totalErrors: number;
197
+ errors: {
198
+ message: string;
199
+ file?: string | undefined;
200
+ line?: number | undefined;
201
+ column?: number | undefined;
202
+ code?: string | undefined;
203
+ severity?: "error" | "warning" | undefined;
204
+ context?: string | undefined;
205
+ guidance?: string | undefined;
206
+ }[];
207
+ guidance?: string | undefined;
208
+ errorSummary?: string | undefined;
209
+ metadata?: {
210
+ issues: string[];
211
+ confidence: number;
212
+ completeness: number;
213
+ detection?: {
214
+ extractor: string;
215
+ confidence: number;
216
+ patterns: string[];
217
+ reason: string;
218
+ } | undefined;
219
+ suggestions?: string[] | undefined;
220
+ } | undefined;
221
+ } | undefined;
222
+ }>;
223
+ /**
224
+ * Output Files Schema
225
+ *
226
+ * Shared by RunResult and StepResult.
227
+ * Provides paths to organized output files for debugging and inspection.
228
+ */
229
+ export declare const OutputFilesSchema: z.ZodObject<{
230
+ /** Path to stdout.log (omitted if empty) */
231
+ stdout: z.ZodOptional<z.ZodString>;
232
+ /** Path to stderr.log (omitted if empty) */
233
+ stderr: z.ZodOptional<z.ZodString>;
234
+ /** Path to combined.jsonl (chronological, ANSI-stripped) */
235
+ combined: z.ZodString;
236
+ }, "strip", z.ZodTypeAny, {
237
+ combined: string;
238
+ stdout?: string | undefined;
239
+ stderr?: string | undefined;
240
+ }, {
241
+ combined: string;
242
+ stdout?: string | undefined;
243
+ stderr?: string | undefined;
244
+ }>;
245
+ /**
246
+ * Base: Operation Metadata Schema
247
+ *
248
+ * Shared by top-level operations (RunResult, ValidationResult).
249
+ * Every operation has:
250
+ * - When it ran (timestamp)
251
+ * - What code state (treeHash)
252
+ */
253
+ export declare const OperationMetadataSchema: z.ZodObject<{
254
+ /** When the operation was executed (ISO 8601) */
255
+ timestamp: z.ZodString;
256
+ /** Git tree hash identifying the code state */
257
+ treeHash: z.ZodString;
258
+ }, "strip", z.ZodTypeAny, {
259
+ timestamp: string;
260
+ treeHash: string;
261
+ }, {
262
+ timestamp: string;
263
+ treeHash: string;
264
+ }>;
8
265
  /**
9
266
  * Validation Step Result Schema
267
+ *
268
+ * Extends CommandExecutionSchema with step-specific fields.
269
+ *
270
+ * Field ordering is optimized for LLM consumption:
271
+ * - What step (name)
272
+ * - Did it pass? (passed)
273
+ * - Command execution details (command, exitCode, durationSecs, extraction)
274
+ * - Debug resources (outputFiles)
275
+ *
276
+ * v0.15.0 BREAKING CHANGES:
277
+ * - Now extends CommandExecutionSchema (adds command, exitCode)
278
+ * - Removed extractionQuality (use extraction.metadata instead)
279
+ * - Removed output field (use extraction instead)
280
+ * - Removed failedTests field (use extraction.errors instead)
281
+ * - Added isCachedResult to indicate when result came from cache
282
+ * - Added .strict() to reject unknown properties (prevents internal fields from leaking)
283
+ *
284
+ * v0.15.1 ENHANCEMENTS:
285
+ * - Added outputFiles for debugging (stdout.log, stderr.log, combined.jsonl)
10
286
  */
11
287
  export declare const StepResultSchema: z.ZodObject<{
288
+ /** Command that was executed */
289
+ command: z.ZodString;
290
+ /** Exit code from the command */
291
+ exitCode: z.ZodNumber;
292
+ /** Execution duration in seconds */
293
+ durationSecs: z.ZodNumber;
294
+ /** Extracted error information (LLM-optimized, structured errors) */
295
+ extraction: z.ZodOptional<z.ZodObject<{
296
+ summary: z.ZodString;
297
+ totalErrors: z.ZodNumber;
298
+ errors: z.ZodArray<z.ZodObject<{
299
+ file: z.ZodOptional<z.ZodString>;
300
+ line: z.ZodOptional<z.ZodNumber>;
301
+ column: z.ZodOptional<z.ZodNumber>;
302
+ message: z.ZodString;
303
+ code: z.ZodOptional<z.ZodString>;
304
+ severity: z.ZodOptional<z.ZodEnum<["error", "warning"]>>;
305
+ context: z.ZodOptional<z.ZodString>;
306
+ guidance: z.ZodOptional<z.ZodString>;
307
+ }, "strip", z.ZodTypeAny, {
308
+ message: string;
309
+ file?: string | undefined;
310
+ line?: number | undefined;
311
+ column?: number | undefined;
312
+ code?: string | undefined;
313
+ severity?: "error" | "warning" | undefined;
314
+ context?: string | undefined;
315
+ guidance?: string | undefined;
316
+ }, {
317
+ message: string;
318
+ file?: string | undefined;
319
+ line?: number | undefined;
320
+ column?: number | undefined;
321
+ code?: string | undefined;
322
+ severity?: "error" | "warning" | undefined;
323
+ context?: string | undefined;
324
+ guidance?: string | undefined;
325
+ }>, "many">;
326
+ guidance: z.ZodOptional<z.ZodString>;
327
+ errorSummary: z.ZodOptional<z.ZodString>;
328
+ metadata: z.ZodOptional<z.ZodObject<{
329
+ detection: z.ZodOptional<z.ZodObject<{
330
+ extractor: z.ZodString;
331
+ confidence: z.ZodNumber;
332
+ patterns: z.ZodArray<z.ZodString, "many">;
333
+ reason: z.ZodString;
334
+ }, "strip", z.ZodTypeAny, {
335
+ extractor: string;
336
+ confidence: number;
337
+ patterns: string[];
338
+ reason: string;
339
+ }, {
340
+ extractor: string;
341
+ confidence: number;
342
+ patterns: string[];
343
+ reason: string;
344
+ }>>;
345
+ confidence: z.ZodNumber;
346
+ completeness: z.ZodNumber;
347
+ issues: z.ZodArray<z.ZodString, "many">;
348
+ suggestions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
349
+ }, "strip", z.ZodTypeAny, {
350
+ issues: string[];
351
+ confidence: number;
352
+ completeness: number;
353
+ detection?: {
354
+ extractor: string;
355
+ confidence: number;
356
+ patterns: string[];
357
+ reason: string;
358
+ } | undefined;
359
+ suggestions?: string[] | undefined;
360
+ }, {
361
+ issues: string[];
362
+ confidence: number;
363
+ completeness: number;
364
+ detection?: {
365
+ extractor: string;
366
+ confidence: number;
367
+ patterns: string[];
368
+ reason: string;
369
+ } | undefined;
370
+ suggestions?: string[] | undefined;
371
+ }>>;
372
+ }, "strip", z.ZodTypeAny, {
373
+ summary: string;
374
+ totalErrors: number;
375
+ errors: {
376
+ message: string;
377
+ file?: string | undefined;
378
+ line?: number | undefined;
379
+ column?: number | undefined;
380
+ code?: string | undefined;
381
+ severity?: "error" | "warning" | undefined;
382
+ context?: string | undefined;
383
+ guidance?: string | undefined;
384
+ }[];
385
+ guidance?: string | undefined;
386
+ errorSummary?: string | undefined;
387
+ metadata?: {
388
+ issues: string[];
389
+ confidence: number;
390
+ completeness: number;
391
+ detection?: {
392
+ extractor: string;
393
+ confidence: number;
394
+ patterns: string[];
395
+ reason: string;
396
+ } | undefined;
397
+ suggestions?: string[] | undefined;
398
+ } | undefined;
399
+ }, {
400
+ summary: string;
401
+ totalErrors: number;
402
+ errors: {
403
+ message: string;
404
+ file?: string | undefined;
405
+ line?: number | undefined;
406
+ column?: number | undefined;
407
+ code?: string | undefined;
408
+ severity?: "error" | "warning" | undefined;
409
+ context?: string | undefined;
410
+ guidance?: string | undefined;
411
+ }[];
412
+ guidance?: string | undefined;
413
+ errorSummary?: string | undefined;
414
+ metadata?: {
415
+ issues: string[];
416
+ confidence: number;
417
+ completeness: number;
418
+ detection?: {
419
+ extractor: string;
420
+ confidence: number;
421
+ patterns: string[];
422
+ reason: string;
423
+ } | undefined;
424
+ suggestions?: string[] | undefined;
425
+ } | undefined;
426
+ }>>;
427
+ } & {
12
428
  /** Step name */
13
429
  name: z.ZodString;
14
- /** Did the step pass? */
430
+ /** Did the step pass? (derived from exitCode === 0) */
15
431
  passed: z.ZodBoolean;
16
- /** Execution duration in seconds */
17
- durationSecs: z.ZodNumber;
18
- /** Output from the step (stdout + stderr) */
19
- output: z.ZodOptional<z.ZodString>;
20
- }, "strip", z.ZodTypeAny, {
432
+ /** Was this result retrieved from cache? (v0.15.0+) */
433
+ isCachedResult: z.ZodOptional<z.ZodBoolean>;
434
+ /** Output files from step execution (v0.15.1+) */
435
+ outputFiles: z.ZodOptional<z.ZodObject<{
436
+ /** Path to stdout.log (omitted if empty) */
437
+ stdout: z.ZodOptional<z.ZodString>;
438
+ /** Path to stderr.log (omitted if empty) */
439
+ stderr: z.ZodOptional<z.ZodString>;
440
+ /** Path to combined.jsonl (chronological, ANSI-stripped) */
441
+ combined: z.ZodString;
442
+ }, "strip", z.ZodTypeAny, {
443
+ combined: string;
444
+ stdout?: string | undefined;
445
+ stderr?: string | undefined;
446
+ }, {
447
+ combined: string;
448
+ stdout?: string | undefined;
449
+ stderr?: string | undefined;
450
+ }>>;
451
+ }, "strict", z.ZodTypeAny, {
452
+ command: string;
453
+ exitCode: number;
21
454
  durationSecs: number;
22
455
  name: string;
23
456
  passed: boolean;
24
- output?: string | undefined;
457
+ extraction?: {
458
+ summary: string;
459
+ totalErrors: number;
460
+ errors: {
461
+ message: string;
462
+ file?: string | undefined;
463
+ line?: number | undefined;
464
+ column?: number | undefined;
465
+ code?: string | undefined;
466
+ severity?: "error" | "warning" | undefined;
467
+ context?: string | undefined;
468
+ guidance?: string | undefined;
469
+ }[];
470
+ guidance?: string | undefined;
471
+ errorSummary?: string | undefined;
472
+ metadata?: {
473
+ issues: string[];
474
+ confidence: number;
475
+ completeness: number;
476
+ detection?: {
477
+ extractor: string;
478
+ confidence: number;
479
+ patterns: string[];
480
+ reason: string;
481
+ } | undefined;
482
+ suggestions?: string[] | undefined;
483
+ } | undefined;
484
+ } | undefined;
485
+ isCachedResult?: boolean | undefined;
486
+ outputFiles?: {
487
+ combined: string;
488
+ stdout?: string | undefined;
489
+ stderr?: string | undefined;
490
+ } | undefined;
25
491
  }, {
492
+ command: string;
493
+ exitCode: number;
26
494
  durationSecs: number;
27
495
  name: string;
28
496
  passed: boolean;
29
- output?: string | undefined;
497
+ extraction?: {
498
+ summary: string;
499
+ totalErrors: number;
500
+ errors: {
501
+ message: string;
502
+ file?: string | undefined;
503
+ line?: number | undefined;
504
+ column?: number | undefined;
505
+ code?: string | undefined;
506
+ severity?: "error" | "warning" | undefined;
507
+ context?: string | undefined;
508
+ guidance?: string | undefined;
509
+ }[];
510
+ guidance?: string | undefined;
511
+ errorSummary?: string | undefined;
512
+ metadata?: {
513
+ issues: string[];
514
+ confidence: number;
515
+ completeness: number;
516
+ detection?: {
517
+ extractor: string;
518
+ confidence: number;
519
+ patterns: string[];
520
+ reason: string;
521
+ } | undefined;
522
+ suggestions?: string[] | undefined;
523
+ } | undefined;
524
+ } | undefined;
525
+ isCachedResult?: boolean | undefined;
526
+ outputFiles?: {
527
+ combined: string;
528
+ stdout?: string | undefined;
529
+ stderr?: string | undefined;
530
+ } | undefined;
30
531
  }>;
31
532
  /**
32
533
  * Validation Phase Result Schema
534
+ *
535
+ * Field ordering optimized for LLM consumption:
536
+ * - Phase identification (name)
537
+ * - Status (passed)
538
+ * - Duration (durationSecs)
539
+ * - Step details (steps with extraction for failed steps)
33
540
  */
34
541
  export declare const PhaseResultSchema: z.ZodObject<{
35
542
  /** Phase name */
36
543
  name: z.ZodString;
37
- /** Phase execution duration in seconds */
38
- durationSecs: z.ZodNumber;
39
544
  /** Did the phase pass? */
40
545
  passed: z.ZodBoolean;
546
+ /** Phase execution duration in seconds */
547
+ durationSecs: z.ZodNumber;
41
548
  /** Results from individual steps */
42
549
  steps: z.ZodArray<z.ZodObject<{
550
+ /** Command that was executed */
551
+ command: z.ZodString;
552
+ /** Exit code from the command */
553
+ exitCode: z.ZodNumber;
554
+ /** Execution duration in seconds */
555
+ durationSecs: z.ZodNumber;
556
+ /** Extracted error information (LLM-optimized, structured errors) */
557
+ extraction: z.ZodOptional<z.ZodObject<{
558
+ summary: z.ZodString;
559
+ totalErrors: z.ZodNumber;
560
+ errors: z.ZodArray<z.ZodObject<{
561
+ file: z.ZodOptional<z.ZodString>;
562
+ line: z.ZodOptional<z.ZodNumber>;
563
+ column: z.ZodOptional<z.ZodNumber>;
564
+ message: z.ZodString;
565
+ code: z.ZodOptional<z.ZodString>;
566
+ severity: z.ZodOptional<z.ZodEnum<["error", "warning"]>>;
567
+ context: z.ZodOptional<z.ZodString>;
568
+ guidance: z.ZodOptional<z.ZodString>;
569
+ }, "strip", z.ZodTypeAny, {
570
+ message: string;
571
+ file?: string | undefined;
572
+ line?: number | undefined;
573
+ column?: number | undefined;
574
+ code?: string | undefined;
575
+ severity?: "error" | "warning" | undefined;
576
+ context?: string | undefined;
577
+ guidance?: string | undefined;
578
+ }, {
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
+ }>, "many">;
588
+ guidance: z.ZodOptional<z.ZodString>;
589
+ errorSummary: z.ZodOptional<z.ZodString>;
590
+ metadata: z.ZodOptional<z.ZodObject<{
591
+ detection: z.ZodOptional<z.ZodObject<{
592
+ extractor: z.ZodString;
593
+ confidence: z.ZodNumber;
594
+ patterns: z.ZodArray<z.ZodString, "many">;
595
+ reason: z.ZodString;
596
+ }, "strip", z.ZodTypeAny, {
597
+ extractor: string;
598
+ confidence: number;
599
+ patterns: string[];
600
+ reason: string;
601
+ }, {
602
+ extractor: string;
603
+ confidence: number;
604
+ patterns: string[];
605
+ reason: string;
606
+ }>>;
607
+ confidence: z.ZodNumber;
608
+ completeness: z.ZodNumber;
609
+ issues: z.ZodArray<z.ZodString, "many">;
610
+ suggestions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
611
+ }, "strip", z.ZodTypeAny, {
612
+ issues: string[];
613
+ confidence: number;
614
+ completeness: number;
615
+ detection?: {
616
+ extractor: string;
617
+ confidence: number;
618
+ patterns: string[];
619
+ reason: string;
620
+ } | undefined;
621
+ suggestions?: string[] | undefined;
622
+ }, {
623
+ issues: string[];
624
+ confidence: number;
625
+ completeness: number;
626
+ detection?: {
627
+ extractor: string;
628
+ confidence: number;
629
+ patterns: string[];
630
+ reason: string;
631
+ } | undefined;
632
+ suggestions?: string[] | undefined;
633
+ }>>;
634
+ }, "strip", z.ZodTypeAny, {
635
+ summary: string;
636
+ totalErrors: number;
637
+ errors: {
638
+ message: string;
639
+ file?: string | undefined;
640
+ line?: number | undefined;
641
+ column?: number | undefined;
642
+ code?: string | undefined;
643
+ severity?: "error" | "warning" | undefined;
644
+ context?: string | undefined;
645
+ guidance?: string | undefined;
646
+ }[];
647
+ guidance?: string | undefined;
648
+ errorSummary?: string | undefined;
649
+ metadata?: {
650
+ issues: string[];
651
+ confidence: number;
652
+ completeness: number;
653
+ detection?: {
654
+ extractor: string;
655
+ confidence: number;
656
+ patterns: string[];
657
+ reason: string;
658
+ } | undefined;
659
+ suggestions?: string[] | undefined;
660
+ } | undefined;
661
+ }, {
662
+ summary: string;
663
+ totalErrors: number;
664
+ errors: {
665
+ message: string;
666
+ file?: string | undefined;
667
+ line?: number | undefined;
668
+ column?: number | undefined;
669
+ code?: string | undefined;
670
+ severity?: "error" | "warning" | undefined;
671
+ context?: string | undefined;
672
+ guidance?: string | undefined;
673
+ }[];
674
+ guidance?: string | undefined;
675
+ errorSummary?: string | undefined;
676
+ metadata?: {
677
+ issues: string[];
678
+ confidence: number;
679
+ completeness: number;
680
+ detection?: {
681
+ extractor: string;
682
+ confidence: number;
683
+ patterns: string[];
684
+ reason: string;
685
+ } | undefined;
686
+ suggestions?: string[] | undefined;
687
+ } | undefined;
688
+ }>>;
689
+ } & {
43
690
  /** Step name */
44
691
  name: z.ZodString;
45
- /** Did the step pass? */
692
+ /** Did the step pass? (derived from exitCode === 0) */
46
693
  passed: z.ZodBoolean;
47
- /** Execution duration in seconds */
48
- durationSecs: z.ZodNumber;
49
- /** Output from the step (stdout + stderr) */
50
- output: z.ZodOptional<z.ZodString>;
51
- }, "strip", z.ZodTypeAny, {
694
+ /** Was this result retrieved from cache? (v0.15.0+) */
695
+ isCachedResult: z.ZodOptional<z.ZodBoolean>;
696
+ /** Output files from step execution (v0.15.1+) */
697
+ outputFiles: z.ZodOptional<z.ZodObject<{
698
+ /** Path to stdout.log (omitted if empty) */
699
+ stdout: z.ZodOptional<z.ZodString>;
700
+ /** Path to stderr.log (omitted if empty) */
701
+ stderr: z.ZodOptional<z.ZodString>;
702
+ /** Path to combined.jsonl (chronological, ANSI-stripped) */
703
+ combined: z.ZodString;
704
+ }, "strip", z.ZodTypeAny, {
705
+ combined: string;
706
+ stdout?: string | undefined;
707
+ stderr?: string | undefined;
708
+ }, {
709
+ combined: string;
710
+ stdout?: string | undefined;
711
+ stderr?: string | undefined;
712
+ }>>;
713
+ }, "strict", z.ZodTypeAny, {
714
+ command: string;
715
+ exitCode: number;
52
716
  durationSecs: number;
53
717
  name: string;
54
718
  passed: boolean;
55
- output?: string | undefined;
719
+ extraction?: {
720
+ summary: string;
721
+ totalErrors: number;
722
+ errors: {
723
+ message: string;
724
+ file?: string | undefined;
725
+ line?: number | undefined;
726
+ column?: number | undefined;
727
+ code?: string | undefined;
728
+ severity?: "error" | "warning" | undefined;
729
+ context?: string | undefined;
730
+ guidance?: string | undefined;
731
+ }[];
732
+ guidance?: string | undefined;
733
+ errorSummary?: string | undefined;
734
+ metadata?: {
735
+ issues: string[];
736
+ confidence: number;
737
+ completeness: number;
738
+ detection?: {
739
+ extractor: string;
740
+ confidence: number;
741
+ patterns: string[];
742
+ reason: string;
743
+ } | undefined;
744
+ suggestions?: string[] | undefined;
745
+ } | undefined;
746
+ } | undefined;
747
+ isCachedResult?: boolean | undefined;
748
+ outputFiles?: {
749
+ combined: string;
750
+ stdout?: string | undefined;
751
+ stderr?: string | undefined;
752
+ } | undefined;
56
753
  }, {
754
+ command: string;
755
+ exitCode: number;
57
756
  durationSecs: number;
58
757
  name: string;
59
758
  passed: boolean;
60
- output?: string | undefined;
759
+ extraction?: {
760
+ summary: string;
761
+ totalErrors: number;
762
+ errors: {
763
+ message: string;
764
+ file?: string | undefined;
765
+ line?: number | undefined;
766
+ column?: number | undefined;
767
+ code?: string | undefined;
768
+ severity?: "error" | "warning" | undefined;
769
+ context?: string | undefined;
770
+ guidance?: string | undefined;
771
+ }[];
772
+ guidance?: string | undefined;
773
+ errorSummary?: string | undefined;
774
+ metadata?: {
775
+ issues: string[];
776
+ confidence: number;
777
+ completeness: number;
778
+ detection?: {
779
+ extractor: string;
780
+ confidence: number;
781
+ patterns: string[];
782
+ reason: string;
783
+ } | undefined;
784
+ suggestions?: string[] | undefined;
785
+ } | undefined;
786
+ } | undefined;
787
+ isCachedResult?: boolean | undefined;
788
+ outputFiles?: {
789
+ combined: string;
790
+ stdout?: string | undefined;
791
+ stderr?: string | undefined;
792
+ } | undefined;
61
793
  }>, "many">;
62
- /** Output from failed step (if any) */
63
- output: z.ZodOptional<z.ZodString>;
64
- }, "strip", z.ZodTypeAny, {
794
+ }, "strict", z.ZodTypeAny, {
65
795
  durationSecs: number;
66
796
  name: string;
67
797
  passed: boolean;
68
798
  steps: {
799
+ command: string;
800
+ exitCode: number;
69
801
  durationSecs: number;
70
802
  name: string;
71
803
  passed: boolean;
72
- output?: string | undefined;
804
+ extraction?: {
805
+ summary: string;
806
+ totalErrors: number;
807
+ errors: {
808
+ message: string;
809
+ file?: string | undefined;
810
+ line?: number | undefined;
811
+ column?: number | undefined;
812
+ code?: string | undefined;
813
+ severity?: "error" | "warning" | undefined;
814
+ context?: string | undefined;
815
+ guidance?: string | undefined;
816
+ }[];
817
+ guidance?: string | undefined;
818
+ errorSummary?: string | undefined;
819
+ metadata?: {
820
+ issues: string[];
821
+ confidence: number;
822
+ completeness: number;
823
+ detection?: {
824
+ extractor: string;
825
+ confidence: number;
826
+ patterns: string[];
827
+ reason: string;
828
+ } | undefined;
829
+ suggestions?: string[] | undefined;
830
+ } | undefined;
831
+ } | undefined;
832
+ isCachedResult?: boolean | undefined;
833
+ outputFiles?: {
834
+ combined: string;
835
+ stdout?: string | undefined;
836
+ stderr?: string | undefined;
837
+ } | undefined;
73
838
  }[];
74
- output?: string | undefined;
75
839
  }, {
76
840
  durationSecs: number;
77
841
  name: string;
78
842
  passed: boolean;
79
843
  steps: {
844
+ command: string;
845
+ exitCode: number;
80
846
  durationSecs: number;
81
847
  name: string;
82
848
  passed: boolean;
83
- output?: string | undefined;
849
+ extraction?: {
850
+ summary: string;
851
+ totalErrors: number;
852
+ errors: {
853
+ message: string;
854
+ file?: string | undefined;
855
+ line?: number | undefined;
856
+ column?: number | undefined;
857
+ code?: string | undefined;
858
+ severity?: "error" | "warning" | undefined;
859
+ context?: string | undefined;
860
+ guidance?: string | undefined;
861
+ }[];
862
+ guidance?: string | undefined;
863
+ errorSummary?: string | undefined;
864
+ metadata?: {
865
+ issues: string[];
866
+ confidence: number;
867
+ completeness: number;
868
+ detection?: {
869
+ extractor: string;
870
+ confidence: number;
871
+ patterns: string[];
872
+ reason: string;
873
+ } | undefined;
874
+ suggestions?: string[] | undefined;
875
+ } | undefined;
876
+ } | undefined;
877
+ isCachedResult?: boolean | undefined;
878
+ outputFiles?: {
879
+ combined: string;
880
+ stdout?: string | undefined;
881
+ stderr?: string | undefined;
882
+ } | undefined;
84
883
  }[];
85
- output?: string | undefined;
86
884
  }>;
87
885
  /**
88
886
  * Validation Result Schema
89
887
  *
888
+ * Extends OperationMetadataSchema with validation-specific fields.
889
+ *
90
890
  * This schema defines the validation result structure returned by the validation
91
891
  * runner and stored in git notes (v0.12.0+) for history tracking.
892
+ *
893
+ * Field ordering optimized for LLM consumption:
894
+ * - Status first (passed, summary)
895
+ * - Operation metadata (timestamp, treeHash)
896
+ * - Cache indicator (isCachedResult) - v0.15.0+
897
+ * - Quick navigation (failedStep)
898
+ * - Detailed breakdown (phases with step-level extraction, each step has command)
899
+ * - Metadata last (fullLogFile)
900
+ *
901
+ * v0.15.0 BREAKING CHANGES:
902
+ * - Removed rerunCommand (use phases[].steps[].command instead)
903
+ * - Removed failedStepOutput (use phases[].steps[].extraction instead)
904
+ * - Added .strict() to reject unknown properties (prevents internal fields
905
+ * like _fromCache from leaking into public API)
92
906
  */
93
907
  export declare const ValidationResultSchema: z.ZodObject<{
94
- /** Did validation pass? */
95
- passed: z.ZodBoolean;
96
- /** ISO 8601 timestamp */
908
+ /** When the operation was executed (ISO 8601) */
97
909
  timestamp: z.ZodString;
98
- /** Git tree hash (if in git repo) */
910
+ /** Git tree hash identifying the code state */
99
911
  treeHash: z.ZodString;
100
- /** Results from each phase */
912
+ } & {
913
+ /** Did validation pass? */
914
+ passed: z.ZodBoolean;
915
+ /** One-line summary for LLMs (e.g., "Validation passed" or "TypeScript type check failed") */
916
+ summary: z.ZodOptional<z.ZodString>;
917
+ /** Was this entire validation result retrieved from cache? (v0.15.0+) */
918
+ isCachedResult: z.ZodOptional<z.ZodBoolean>;
919
+ /** Name of failed step (if any) - for quick navigation */
920
+ failedStep: z.ZodOptional<z.ZodString>;
921
+ /** Results from each phase (steps include extraction for failures) */
101
922
  phases: z.ZodOptional<z.ZodArray<z.ZodObject<{
102
923
  /** Phase name */
103
924
  name: z.ZodString;
104
- /** Phase execution duration in seconds */
105
- durationSecs: z.ZodNumber;
106
925
  /** Did the phase pass? */
107
926
  passed: z.ZodBoolean;
927
+ /** Phase execution duration in seconds */
928
+ durationSecs: z.ZodNumber;
108
929
  /** Results from individual steps */
109
930
  steps: z.ZodArray<z.ZodObject<{
931
+ /** Command that was executed */
932
+ command: z.ZodString;
933
+ /** Exit code from the command */
934
+ exitCode: z.ZodNumber;
935
+ /** Execution duration in seconds */
936
+ durationSecs: z.ZodNumber;
937
+ /** Extracted error information (LLM-optimized, structured errors) */
938
+ extraction: z.ZodOptional<z.ZodObject<{
939
+ summary: z.ZodString;
940
+ totalErrors: z.ZodNumber;
941
+ errors: z.ZodArray<z.ZodObject<{
942
+ file: z.ZodOptional<z.ZodString>;
943
+ line: z.ZodOptional<z.ZodNumber>;
944
+ column: z.ZodOptional<z.ZodNumber>;
945
+ message: z.ZodString;
946
+ code: z.ZodOptional<z.ZodString>;
947
+ severity: z.ZodOptional<z.ZodEnum<["error", "warning"]>>;
948
+ context: z.ZodOptional<z.ZodString>;
949
+ guidance: z.ZodOptional<z.ZodString>;
950
+ }, "strip", z.ZodTypeAny, {
951
+ message: string;
952
+ file?: string | undefined;
953
+ line?: number | undefined;
954
+ column?: number | undefined;
955
+ code?: string | undefined;
956
+ severity?: "error" | "warning" | undefined;
957
+ context?: string | undefined;
958
+ guidance?: string | undefined;
959
+ }, {
960
+ message: string;
961
+ file?: string | undefined;
962
+ line?: number | undefined;
963
+ column?: number | undefined;
964
+ code?: string | undefined;
965
+ severity?: "error" | "warning" | undefined;
966
+ context?: string | undefined;
967
+ guidance?: string | undefined;
968
+ }>, "many">;
969
+ guidance: z.ZodOptional<z.ZodString>;
970
+ errorSummary: z.ZodOptional<z.ZodString>;
971
+ metadata: z.ZodOptional<z.ZodObject<{
972
+ detection: z.ZodOptional<z.ZodObject<{
973
+ extractor: z.ZodString;
974
+ confidence: z.ZodNumber;
975
+ patterns: z.ZodArray<z.ZodString, "many">;
976
+ reason: z.ZodString;
977
+ }, "strip", z.ZodTypeAny, {
978
+ extractor: string;
979
+ confidence: number;
980
+ patterns: string[];
981
+ reason: string;
982
+ }, {
983
+ extractor: string;
984
+ confidence: number;
985
+ patterns: string[];
986
+ reason: string;
987
+ }>>;
988
+ confidence: z.ZodNumber;
989
+ completeness: z.ZodNumber;
990
+ issues: z.ZodArray<z.ZodString, "many">;
991
+ suggestions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
992
+ }, "strip", z.ZodTypeAny, {
993
+ issues: string[];
994
+ confidence: number;
995
+ completeness: number;
996
+ detection?: {
997
+ extractor: string;
998
+ confidence: number;
999
+ patterns: string[];
1000
+ reason: string;
1001
+ } | undefined;
1002
+ suggestions?: string[] | undefined;
1003
+ }, {
1004
+ issues: string[];
1005
+ confidence: number;
1006
+ completeness: number;
1007
+ detection?: {
1008
+ extractor: string;
1009
+ confidence: number;
1010
+ patterns: string[];
1011
+ reason: string;
1012
+ } | undefined;
1013
+ suggestions?: string[] | undefined;
1014
+ }>>;
1015
+ }, "strip", z.ZodTypeAny, {
1016
+ summary: string;
1017
+ totalErrors: number;
1018
+ errors: {
1019
+ message: string;
1020
+ file?: string | undefined;
1021
+ line?: number | undefined;
1022
+ column?: number | undefined;
1023
+ code?: string | undefined;
1024
+ severity?: "error" | "warning" | undefined;
1025
+ context?: string | undefined;
1026
+ guidance?: string | undefined;
1027
+ }[];
1028
+ guidance?: string | undefined;
1029
+ errorSummary?: string | undefined;
1030
+ metadata?: {
1031
+ issues: string[];
1032
+ confidence: number;
1033
+ completeness: number;
1034
+ detection?: {
1035
+ extractor: string;
1036
+ confidence: number;
1037
+ patterns: string[];
1038
+ reason: string;
1039
+ } | undefined;
1040
+ suggestions?: string[] | undefined;
1041
+ } | undefined;
1042
+ }, {
1043
+ summary: string;
1044
+ totalErrors: number;
1045
+ errors: {
1046
+ message: string;
1047
+ file?: string | undefined;
1048
+ line?: number | undefined;
1049
+ column?: number | undefined;
1050
+ code?: string | undefined;
1051
+ severity?: "error" | "warning" | undefined;
1052
+ context?: string | undefined;
1053
+ guidance?: string | undefined;
1054
+ }[];
1055
+ guidance?: string | undefined;
1056
+ errorSummary?: string | undefined;
1057
+ metadata?: {
1058
+ issues: string[];
1059
+ confidence: number;
1060
+ completeness: number;
1061
+ detection?: {
1062
+ extractor: string;
1063
+ confidence: number;
1064
+ patterns: string[];
1065
+ reason: string;
1066
+ } | undefined;
1067
+ suggestions?: string[] | undefined;
1068
+ } | undefined;
1069
+ }>>;
1070
+ } & {
110
1071
  /** Step name */
111
1072
  name: z.ZodString;
112
- /** Did the step pass? */
1073
+ /** Did the step pass? (derived from exitCode === 0) */
113
1074
  passed: z.ZodBoolean;
114
- /** Execution duration in seconds */
115
- durationSecs: z.ZodNumber;
116
- /** Output from the step (stdout + stderr) */
117
- output: z.ZodOptional<z.ZodString>;
118
- }, "strip", z.ZodTypeAny, {
1075
+ /** Was this result retrieved from cache? (v0.15.0+) */
1076
+ isCachedResult: z.ZodOptional<z.ZodBoolean>;
1077
+ /** Output files from step execution (v0.15.1+) */
1078
+ outputFiles: z.ZodOptional<z.ZodObject<{
1079
+ /** Path to stdout.log (omitted if empty) */
1080
+ stdout: z.ZodOptional<z.ZodString>;
1081
+ /** Path to stderr.log (omitted if empty) */
1082
+ stderr: z.ZodOptional<z.ZodString>;
1083
+ /** Path to combined.jsonl (chronological, ANSI-stripped) */
1084
+ combined: z.ZodString;
1085
+ }, "strip", z.ZodTypeAny, {
1086
+ combined: string;
1087
+ stdout?: string | undefined;
1088
+ stderr?: string | undefined;
1089
+ }, {
1090
+ combined: string;
1091
+ stdout?: string | undefined;
1092
+ stderr?: string | undefined;
1093
+ }>>;
1094
+ }, "strict", z.ZodTypeAny, {
1095
+ command: string;
1096
+ exitCode: number;
119
1097
  durationSecs: number;
120
1098
  name: string;
121
1099
  passed: boolean;
122
- output?: string | undefined;
1100
+ extraction?: {
1101
+ summary: string;
1102
+ totalErrors: number;
1103
+ errors: {
1104
+ message: string;
1105
+ file?: string | undefined;
1106
+ line?: number | undefined;
1107
+ column?: number | undefined;
1108
+ code?: string | undefined;
1109
+ severity?: "error" | "warning" | undefined;
1110
+ context?: string | undefined;
1111
+ guidance?: string | undefined;
1112
+ }[];
1113
+ guidance?: string | undefined;
1114
+ errorSummary?: string | undefined;
1115
+ metadata?: {
1116
+ issues: string[];
1117
+ confidence: number;
1118
+ completeness: number;
1119
+ detection?: {
1120
+ extractor: string;
1121
+ confidence: number;
1122
+ patterns: string[];
1123
+ reason: string;
1124
+ } | undefined;
1125
+ suggestions?: string[] | undefined;
1126
+ } | undefined;
1127
+ } | undefined;
1128
+ isCachedResult?: boolean | undefined;
1129
+ outputFiles?: {
1130
+ combined: string;
1131
+ stdout?: string | undefined;
1132
+ stderr?: string | undefined;
1133
+ } | undefined;
123
1134
  }, {
1135
+ command: string;
1136
+ exitCode: number;
124
1137
  durationSecs: number;
125
1138
  name: string;
126
1139
  passed: boolean;
127
- output?: string | undefined;
1140
+ extraction?: {
1141
+ summary: string;
1142
+ totalErrors: number;
1143
+ errors: {
1144
+ message: string;
1145
+ file?: string | undefined;
1146
+ line?: number | undefined;
1147
+ column?: number | undefined;
1148
+ code?: string | undefined;
1149
+ severity?: "error" | "warning" | undefined;
1150
+ context?: string | undefined;
1151
+ guidance?: string | undefined;
1152
+ }[];
1153
+ guidance?: string | undefined;
1154
+ errorSummary?: string | undefined;
1155
+ metadata?: {
1156
+ issues: string[];
1157
+ confidence: number;
1158
+ completeness: number;
1159
+ detection?: {
1160
+ extractor: string;
1161
+ confidence: number;
1162
+ patterns: string[];
1163
+ reason: string;
1164
+ } | undefined;
1165
+ suggestions?: string[] | undefined;
1166
+ } | undefined;
1167
+ } | undefined;
1168
+ isCachedResult?: boolean | undefined;
1169
+ outputFiles?: {
1170
+ combined: string;
1171
+ stdout?: string | undefined;
1172
+ stderr?: string | undefined;
1173
+ } | undefined;
128
1174
  }>, "many">;
129
- /** Output from failed step (if any) */
130
- output: z.ZodOptional<z.ZodString>;
131
- }, "strip", z.ZodTypeAny, {
1175
+ }, "strict", z.ZodTypeAny, {
132
1176
  durationSecs: number;
133
1177
  name: string;
134
1178
  passed: boolean;
135
1179
  steps: {
1180
+ command: string;
1181
+ exitCode: number;
136
1182
  durationSecs: number;
137
1183
  name: string;
138
1184
  passed: boolean;
139
- output?: string | undefined;
1185
+ extraction?: {
1186
+ summary: string;
1187
+ totalErrors: number;
1188
+ errors: {
1189
+ message: string;
1190
+ file?: string | undefined;
1191
+ line?: number | undefined;
1192
+ column?: number | undefined;
1193
+ code?: string | undefined;
1194
+ severity?: "error" | "warning" | undefined;
1195
+ context?: string | undefined;
1196
+ guidance?: string | undefined;
1197
+ }[];
1198
+ guidance?: string | undefined;
1199
+ errorSummary?: string | undefined;
1200
+ metadata?: {
1201
+ issues: string[];
1202
+ confidence: number;
1203
+ completeness: number;
1204
+ detection?: {
1205
+ extractor: string;
1206
+ confidence: number;
1207
+ patterns: string[];
1208
+ reason: string;
1209
+ } | undefined;
1210
+ suggestions?: string[] | undefined;
1211
+ } | undefined;
1212
+ } | undefined;
1213
+ isCachedResult?: boolean | undefined;
1214
+ outputFiles?: {
1215
+ combined: string;
1216
+ stdout?: string | undefined;
1217
+ stderr?: string | undefined;
1218
+ } | undefined;
140
1219
  }[];
141
- output?: string | undefined;
142
1220
  }, {
143
1221
  durationSecs: number;
144
1222
  name: string;
145
1223
  passed: boolean;
146
1224
  steps: {
1225
+ command: string;
1226
+ exitCode: number;
147
1227
  durationSecs: number;
148
1228
  name: string;
149
1229
  passed: boolean;
150
- output?: string | undefined;
1230
+ extraction?: {
1231
+ summary: string;
1232
+ totalErrors: number;
1233
+ errors: {
1234
+ message: string;
1235
+ file?: string | undefined;
1236
+ line?: number | undefined;
1237
+ column?: number | undefined;
1238
+ code?: string | undefined;
1239
+ severity?: "error" | "warning" | undefined;
1240
+ context?: string | undefined;
1241
+ guidance?: string | undefined;
1242
+ }[];
1243
+ guidance?: string | undefined;
1244
+ errorSummary?: string | undefined;
1245
+ metadata?: {
1246
+ issues: string[];
1247
+ confidence: number;
1248
+ completeness: number;
1249
+ detection?: {
1250
+ extractor: string;
1251
+ confidence: number;
1252
+ patterns: string[];
1253
+ reason: string;
1254
+ } | undefined;
1255
+ suggestions?: string[] | undefined;
1256
+ } | undefined;
1257
+ } | undefined;
1258
+ isCachedResult?: boolean | undefined;
1259
+ outputFiles?: {
1260
+ combined: string;
1261
+ stdout?: string | undefined;
1262
+ stderr?: string | undefined;
1263
+ } | undefined;
151
1264
  }[];
152
- output?: string | undefined;
153
1265
  }>, "many">>;
154
- /** Name of failed step (if any) */
155
- failedStep: z.ZodOptional<z.ZodString>;
156
- /** Command to re-run failed step */
157
- rerunCommand: z.ZodOptional<z.ZodString>;
158
- /** Output from the failed step */
159
- failedStepOutput: z.ZodOptional<z.ZodString>;
160
- /** Failed test names (if applicable) */
161
- failedTests: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
162
1266
  /** Path to full log file */
163
1267
  fullLogFile: z.ZodOptional<z.ZodString>;
164
- /** Summary message */
165
- summary: z.ZodOptional<z.ZodString>;
166
- }, "strip", z.ZodTypeAny, {
167
- passed: boolean;
1268
+ }, "strict", z.ZodTypeAny, {
168
1269
  timestamp: string;
169
1270
  treeHash: string;
1271
+ passed: boolean;
1272
+ isCachedResult?: boolean | undefined;
1273
+ summary?: string | undefined;
170
1274
  failedStep?: string | undefined;
171
1275
  phases?: {
172
1276
  durationSecs: number;
173
1277
  name: string;
174
1278
  passed: boolean;
175
1279
  steps: {
1280
+ command: string;
1281
+ exitCode: number;
176
1282
  durationSecs: number;
177
1283
  name: string;
178
1284
  passed: boolean;
179
- output?: string | undefined;
1285
+ extraction?: {
1286
+ summary: string;
1287
+ totalErrors: number;
1288
+ errors: {
1289
+ message: string;
1290
+ file?: string | undefined;
1291
+ line?: number | undefined;
1292
+ column?: number | undefined;
1293
+ code?: string | undefined;
1294
+ severity?: "error" | "warning" | undefined;
1295
+ context?: string | undefined;
1296
+ guidance?: string | undefined;
1297
+ }[];
1298
+ guidance?: string | undefined;
1299
+ errorSummary?: string | undefined;
1300
+ metadata?: {
1301
+ issues: string[];
1302
+ confidence: number;
1303
+ completeness: number;
1304
+ detection?: {
1305
+ extractor: string;
1306
+ confidence: number;
1307
+ patterns: string[];
1308
+ reason: string;
1309
+ } | undefined;
1310
+ suggestions?: string[] | undefined;
1311
+ } | undefined;
1312
+ } | undefined;
1313
+ isCachedResult?: boolean | undefined;
1314
+ outputFiles?: {
1315
+ combined: string;
1316
+ stdout?: string | undefined;
1317
+ stderr?: string | undefined;
1318
+ } | undefined;
180
1319
  }[];
181
- output?: string | undefined;
182
1320
  }[] | undefined;
183
- rerunCommand?: string | undefined;
184
- failedStepOutput?: string | undefined;
185
- failedTests?: string[] | undefined;
186
1321
  fullLogFile?: string | undefined;
187
- summary?: string | undefined;
188
1322
  }, {
189
- passed: boolean;
190
1323
  timestamp: string;
191
1324
  treeHash: string;
1325
+ passed: boolean;
1326
+ isCachedResult?: boolean | undefined;
1327
+ summary?: string | undefined;
192
1328
  failedStep?: string | undefined;
193
1329
  phases?: {
194
1330
  durationSecs: number;
195
1331
  name: string;
196
1332
  passed: boolean;
197
1333
  steps: {
1334
+ command: string;
1335
+ exitCode: number;
198
1336
  durationSecs: number;
199
1337
  name: string;
200
1338
  passed: boolean;
201
- output?: string | undefined;
1339
+ extraction?: {
1340
+ summary: string;
1341
+ totalErrors: number;
1342
+ errors: {
1343
+ message: string;
1344
+ file?: string | undefined;
1345
+ line?: number | undefined;
1346
+ column?: number | undefined;
1347
+ code?: string | undefined;
1348
+ severity?: "error" | "warning" | undefined;
1349
+ context?: string | undefined;
1350
+ guidance?: string | undefined;
1351
+ }[];
1352
+ guidance?: string | undefined;
1353
+ errorSummary?: string | undefined;
1354
+ metadata?: {
1355
+ issues: string[];
1356
+ confidence: number;
1357
+ completeness: number;
1358
+ detection?: {
1359
+ extractor: string;
1360
+ confidence: number;
1361
+ patterns: string[];
1362
+ reason: string;
1363
+ } | undefined;
1364
+ suggestions?: string[] | undefined;
1365
+ } | undefined;
1366
+ } | undefined;
1367
+ isCachedResult?: boolean | undefined;
1368
+ outputFiles?: {
1369
+ combined: string;
1370
+ stdout?: string | undefined;
1371
+ stderr?: string | undefined;
1372
+ } | undefined;
202
1373
  }[];
203
- output?: string | undefined;
204
1374
  }[] | undefined;
205
- rerunCommand?: string | undefined;
206
- failedStepOutput?: string | undefined;
207
- failedTests?: string[] | undefined;
208
1375
  fullLogFile?: string | undefined;
209
- summary?: string | undefined;
210
1376
  }>;
211
1377
  /**
212
1378
  * Inferred TypeScript types from Zod schemas
213
1379
  */
1380
+ export type OutputFiles = z.infer<typeof OutputFilesSchema>;
214
1381
  export type StepResult = z.infer<typeof StepResultSchema>;
215
1382
  export type PhaseResult = z.infer<typeof PhaseResultSchema>;
216
1383
  export type ValidationResult = z.infer<typeof ValidationResultSchema>;
217
1384
  /**
218
- * Safe validation function
219
- *
220
- * Validates a validation result object against the schema.
221
- *
222
- * @param data - Data to validate
223
- * @returns Validation result with success/error information
1385
+ * Safe validation function (uses shared utility)
224
1386
  */
225
- export declare function safeValidateResult(data: unknown): {
1387
+ export declare const safeValidateResult: (data: unknown) => {
226
1388
  success: true;
227
- data: ValidationResult;
1389
+ data: {
1390
+ timestamp: string;
1391
+ treeHash: string;
1392
+ passed: boolean;
1393
+ isCachedResult?: boolean | undefined;
1394
+ summary?: string | undefined;
1395
+ failedStep?: string | undefined;
1396
+ phases?: {
1397
+ durationSecs: number;
1398
+ name: string;
1399
+ passed: boolean;
1400
+ steps: {
1401
+ command: string;
1402
+ exitCode: number;
1403
+ durationSecs: number;
1404
+ name: string;
1405
+ passed: boolean;
1406
+ extraction?: {
1407
+ summary: string;
1408
+ totalErrors: number;
1409
+ errors: {
1410
+ message: string;
1411
+ file?: string | undefined;
1412
+ line?: number | undefined;
1413
+ column?: number | undefined;
1414
+ code?: string | undefined;
1415
+ severity?: "error" | "warning" | undefined;
1416
+ context?: string | undefined;
1417
+ guidance?: string | undefined;
1418
+ }[];
1419
+ guidance?: string | undefined;
1420
+ errorSummary?: string | undefined;
1421
+ metadata?: {
1422
+ issues: string[];
1423
+ confidence: number;
1424
+ completeness: number;
1425
+ detection?: {
1426
+ extractor: string;
1427
+ confidence: number;
1428
+ patterns: string[];
1429
+ reason: string;
1430
+ } | undefined;
1431
+ suggestions?: string[] | undefined;
1432
+ } | undefined;
1433
+ } | undefined;
1434
+ isCachedResult?: boolean | undefined;
1435
+ outputFiles?: {
1436
+ combined: string;
1437
+ stdout?: string | undefined;
1438
+ stderr?: string | undefined;
1439
+ } | undefined;
1440
+ }[];
1441
+ }[] | undefined;
1442
+ fullLogFile?: string | undefined;
1443
+ };
228
1444
  } | {
229
1445
  success: false;
230
1446
  errors: string[];
231
1447
  };
232
1448
  /**
233
- * Strict validation function
234
- *
235
- * Validates and throws on error.
236
- *
237
- * @param data - Data to validate
238
- * @returns Validated result
239
- * @throws {Error} If validation fails
1449
+ * Strict validation function (uses shared utility)
240
1450
  */
241
- export declare function validateResult(data: unknown): ValidationResult;
1451
+ export declare const validateResult: (data: unknown) => {
1452
+ timestamp: string;
1453
+ treeHash: string;
1454
+ passed: boolean;
1455
+ isCachedResult?: boolean | undefined;
1456
+ summary?: string | undefined;
1457
+ failedStep?: string | undefined;
1458
+ phases?: {
1459
+ durationSecs: number;
1460
+ name: string;
1461
+ passed: boolean;
1462
+ steps: {
1463
+ command: string;
1464
+ exitCode: number;
1465
+ durationSecs: number;
1466
+ name: string;
1467
+ passed: boolean;
1468
+ extraction?: {
1469
+ summary: string;
1470
+ totalErrors: number;
1471
+ errors: {
1472
+ message: string;
1473
+ file?: string | undefined;
1474
+ line?: number | undefined;
1475
+ column?: number | undefined;
1476
+ code?: string | undefined;
1477
+ severity?: "error" | "warning" | undefined;
1478
+ context?: string | undefined;
1479
+ guidance?: string | undefined;
1480
+ }[];
1481
+ guidance?: string | undefined;
1482
+ errorSummary?: string | undefined;
1483
+ metadata?: {
1484
+ issues: string[];
1485
+ confidence: number;
1486
+ completeness: number;
1487
+ detection?: {
1488
+ extractor: string;
1489
+ confidence: number;
1490
+ patterns: string[];
1491
+ reason: string;
1492
+ } | undefined;
1493
+ suggestions?: string[] | undefined;
1494
+ } | undefined;
1495
+ } | undefined;
1496
+ isCachedResult?: boolean | undefined;
1497
+ outputFiles?: {
1498
+ combined: string;
1499
+ stdout?: string | undefined;
1500
+ stderr?: string | undefined;
1501
+ } | undefined;
1502
+ }[];
1503
+ }[] | undefined;
1504
+ fullLogFile?: string | undefined;
1505
+ };
242
1506
  //# sourceMappingURL=result-schema.d.ts.map