@vibe-validate/cli 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 (83) hide show
  1. package/README.md +26 -6
  2. package/bin/vibe-validate +131 -0
  3. package/config-templates/minimal.yaml +1 -1
  4. package/config-templates/typescript-library.yaml +1 -1
  5. package/config-templates/typescript-nodejs.yaml +1 -1
  6. package/config-templates/typescript-react.yaml +1 -1
  7. package/dist/bin.js +18 -4
  8. package/dist/bin.js.map +1 -1
  9. package/dist/commands/cleanup.d.ts +1 -1
  10. package/dist/commands/cleanup.d.ts.map +1 -1
  11. package/dist/commands/cleanup.js +108 -2
  12. package/dist/commands/cleanup.js.map +1 -1
  13. package/dist/commands/config.js +1 -1
  14. package/dist/commands/doctor.d.ts.map +1 -1
  15. package/dist/commands/doctor.js +45 -6
  16. package/dist/commands/doctor.js.map +1 -1
  17. package/dist/commands/generate-workflow.d.ts.map +1 -1
  18. package/dist/commands/generate-workflow.js +3 -11
  19. package/dist/commands/generate-workflow.js.map +1 -1
  20. package/dist/commands/history.d.ts.map +1 -1
  21. package/dist/commands/history.js +263 -68
  22. package/dist/commands/history.js.map +1 -1
  23. package/dist/commands/init.d.ts.map +1 -1
  24. package/dist/commands/init.js +7 -0
  25. package/dist/commands/init.js.map +1 -1
  26. package/dist/commands/pre-commit.d.ts.map +1 -1
  27. package/dist/commands/pre-commit.js +6 -2
  28. package/dist/commands/pre-commit.js.map +1 -1
  29. package/dist/commands/run.d.ts.map +1 -1
  30. package/dist/commands/run.js +618 -214
  31. package/dist/commands/run.js.map +1 -1
  32. package/dist/commands/state.d.ts.map +1 -1
  33. package/dist/commands/state.js +4 -7
  34. package/dist/commands/state.js.map +1 -1
  35. package/dist/commands/validate.d.ts.map +1 -1
  36. package/dist/commands/validate.js +5 -6
  37. package/dist/commands/validate.js.map +1 -1
  38. package/dist/commands/watch-pr.d.ts.map +1 -1
  39. package/dist/commands/watch-pr.js +33 -16
  40. package/dist/commands/watch-pr.js.map +1 -1
  41. package/dist/schemas/run-result-schema-export.d.ts +32 -0
  42. package/dist/schemas/run-result-schema-export.d.ts.map +1 -0
  43. package/dist/schemas/run-result-schema-export.js +40 -0
  44. package/dist/schemas/run-result-schema-export.js.map +1 -0
  45. package/dist/schemas/run-result-schema.d.ts +850 -0
  46. package/dist/schemas/run-result-schema.d.ts.map +1 -0
  47. package/dist/schemas/run-result-schema.js +67 -0
  48. package/dist/schemas/run-result-schema.js.map +1 -0
  49. package/dist/schemas/watch-pr-schema.d.ts +420 -22
  50. package/dist/schemas/watch-pr-schema.d.ts.map +1 -1
  51. package/dist/schemas/watch-pr-schema.js +2 -2
  52. package/dist/schemas/watch-pr-schema.js.map +1 -1
  53. package/dist/scripts/generate-run-result-schema.d.ts +10 -0
  54. package/dist/scripts/generate-run-result-schema.d.ts.map +1 -0
  55. package/dist/scripts/generate-run-result-schema.js +20 -0
  56. package/dist/scripts/generate-run-result-schema.js.map +1 -0
  57. package/dist/services/ci-provider.d.ts +21 -6
  58. package/dist/services/ci-provider.d.ts.map +1 -1
  59. package/dist/services/ci-providers/github-actions.d.ts +1 -5
  60. package/dist/services/ci-providers/github-actions.d.ts.map +1 -1
  61. package/dist/services/ci-providers/github-actions.js +9 -30
  62. package/dist/services/ci-providers/github-actions.js.map +1 -1
  63. package/dist/utils/config-error-reporter.js +1 -1
  64. package/dist/utils/config-error-reporter.js.map +1 -1
  65. package/dist/utils/pid-lock.d.ts.map +1 -1
  66. package/dist/utils/pid-lock.js +3 -6
  67. package/dist/utils/pid-lock.js.map +1 -1
  68. package/dist/utils/project-id.d.ts.map +1 -1
  69. package/dist/utils/project-id.js +3 -4
  70. package/dist/utils/project-id.js.map +1 -1
  71. package/dist/utils/runner-adapter.js +3 -2
  72. package/dist/utils/runner-adapter.js.map +1 -1
  73. package/dist/utils/temp-files.d.ts +67 -0
  74. package/dist/utils/temp-files.d.ts.map +1 -0
  75. package/dist/utils/temp-files.js +202 -0
  76. package/dist/utils/temp-files.js.map +1 -0
  77. package/dist/utils/validate-workflow.d.ts.map +1 -1
  78. package/dist/utils/validate-workflow.js +17 -12
  79. package/dist/utils/validate-workflow.js.map +1 -1
  80. package/dist/vibe-validate +131 -0
  81. package/package.json +11 -9
  82. package/run-result.schema.json +186 -0
  83. package/watch-pr-result.schema.json +128 -6
@@ -0,0 +1,850 @@
1
+ /**
2
+ * Zod Schema for Run Command Results
3
+ *
4
+ * This schema defines the structure of `vibe-validate run` output and enables
5
+ * runtime validation and JSON Schema generation for documentation.
6
+ *
7
+ * @packageDocumentation
8
+ */
9
+ import { z } from 'zod';
10
+ /**
11
+ * Run Result Schema
12
+ *
13
+ * Extends OperationMetadataSchema + CommandExecutionSchema with run-specific fields.
14
+ *
15
+ * Output structure from `vibe-validate run` command execution.
16
+ * This is the YAML written to stdout and cached in git notes.
17
+ *
18
+ * Field ordering is optimized for LLM consumption:
19
+ * - Command execution (command, exitCode, durationSecs, extraction)
20
+ * - Operation metadata (timestamp, treeHash)
21
+ * - Run-specific (outputFiles, isCachedResult, suggestedDirectCommand)
22
+ *
23
+ * v0.15.0 BREAKING CHANGES:
24
+ * - Now extends CommandExecutionSchema (consistent with StepResult)
25
+ * - Added durationSecs field
26
+ * - Added outputFiles with organized temp structure (stdout.log, stderr.log, combined.jsonl)
27
+ * - REMOVED fullOutputFile (use outputFiles.combined instead)
28
+ * - REMOVED suggestedDirectCommand (command now contains unwrapped command)
29
+ */
30
+ export declare const RunResultSchema: z.ZodObject<{
31
+ timestamp: z.ZodString;
32
+ treeHash: z.ZodString;
33
+ } & {
34
+ command: z.ZodString;
35
+ exitCode: z.ZodNumber;
36
+ durationSecs: z.ZodNumber;
37
+ extraction: z.ZodOptional<z.ZodObject<{
38
+ summary: z.ZodString;
39
+ totalErrors: z.ZodNumber;
40
+ errors: z.ZodArray<z.ZodObject<{
41
+ file: z.ZodOptional<z.ZodString>;
42
+ line: z.ZodOptional<z.ZodNumber>;
43
+ column: z.ZodOptional<z.ZodNumber>;
44
+ message: z.ZodString;
45
+ code: z.ZodOptional<z.ZodString>;
46
+ severity: z.ZodOptional<z.ZodEnum<["error", "warning"]>>;
47
+ context: z.ZodOptional<z.ZodString>;
48
+ guidance: z.ZodOptional<z.ZodString>;
49
+ }, "strip", z.ZodTypeAny, {
50
+ message: string;
51
+ file?: string | undefined;
52
+ line?: number | undefined;
53
+ column?: number | undefined;
54
+ code?: string | undefined;
55
+ severity?: "error" | "warning" | undefined;
56
+ context?: string | undefined;
57
+ guidance?: string | undefined;
58
+ }, {
59
+ message: string;
60
+ file?: string | undefined;
61
+ line?: number | undefined;
62
+ column?: number | undefined;
63
+ code?: string | undefined;
64
+ severity?: "error" | "warning" | undefined;
65
+ context?: string | undefined;
66
+ guidance?: string | undefined;
67
+ }>, "many">;
68
+ guidance: z.ZodOptional<z.ZodString>;
69
+ errorSummary: z.ZodOptional<z.ZodString>;
70
+ metadata: z.ZodOptional<z.ZodObject<{
71
+ detection: z.ZodOptional<z.ZodObject<{
72
+ extractor: z.ZodString;
73
+ confidence: z.ZodNumber;
74
+ patterns: z.ZodArray<z.ZodString, "many">;
75
+ reason: z.ZodString;
76
+ }, "strip", z.ZodTypeAny, {
77
+ extractor: string;
78
+ confidence: number;
79
+ patterns: string[];
80
+ reason: string;
81
+ }, {
82
+ extractor: string;
83
+ confidence: number;
84
+ patterns: string[];
85
+ reason: string;
86
+ }>>;
87
+ confidence: z.ZodNumber;
88
+ completeness: z.ZodNumber;
89
+ issues: z.ZodArray<z.ZodString, "many">;
90
+ suggestions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
91
+ }, "strip", z.ZodTypeAny, {
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
+ issues: string[];
104
+ confidence: number;
105
+ completeness: number;
106
+ detection?: {
107
+ extractor: string;
108
+ confidence: number;
109
+ patterns: string[];
110
+ reason: string;
111
+ } | undefined;
112
+ suggestions?: string[] | undefined;
113
+ }>>;
114
+ }, "strip", z.ZodTypeAny, {
115
+ summary: string;
116
+ totalErrors: number;
117
+ errors: {
118
+ message: string;
119
+ file?: string | undefined;
120
+ line?: number | undefined;
121
+ column?: number | undefined;
122
+ code?: string | undefined;
123
+ severity?: "error" | "warning" | undefined;
124
+ context?: string | undefined;
125
+ guidance?: string | undefined;
126
+ }[];
127
+ guidance?: string | undefined;
128
+ errorSummary?: string | undefined;
129
+ metadata?: {
130
+ issues: string[];
131
+ confidence: number;
132
+ completeness: number;
133
+ detection?: {
134
+ extractor: string;
135
+ confidence: number;
136
+ patterns: string[];
137
+ reason: string;
138
+ } | undefined;
139
+ suggestions?: string[] | undefined;
140
+ } | undefined;
141
+ }, {
142
+ summary: string;
143
+ totalErrors: number;
144
+ errors: {
145
+ message: string;
146
+ file?: string | undefined;
147
+ line?: number | undefined;
148
+ column?: number | undefined;
149
+ code?: string | undefined;
150
+ severity?: "error" | "warning" | undefined;
151
+ context?: string | undefined;
152
+ guidance?: string | undefined;
153
+ }[];
154
+ guidance?: string | undefined;
155
+ errorSummary?: string | undefined;
156
+ metadata?: {
157
+ issues: string[];
158
+ confidence: number;
159
+ completeness: number;
160
+ detection?: {
161
+ extractor: string;
162
+ confidence: number;
163
+ patterns: string[];
164
+ reason: string;
165
+ } | undefined;
166
+ suggestions?: string[] | undefined;
167
+ } | undefined;
168
+ }>>;
169
+ } & {
170
+ /** Organized output files (v0.15.0+) */
171
+ outputFiles: z.ZodOptional<z.ZodObject<{
172
+ stdout: z.ZodOptional<z.ZodString>;
173
+ stderr: z.ZodOptional<z.ZodString>;
174
+ combined: z.ZodString;
175
+ }, "strip", z.ZodTypeAny, {
176
+ combined: string;
177
+ stdout?: string | undefined;
178
+ stderr?: string | undefined;
179
+ }, {
180
+ combined: string;
181
+ stdout?: string | undefined;
182
+ stderr?: string | undefined;
183
+ }>>;
184
+ /** Whether this result is from cache (true) or fresh execution (false/omitted) */
185
+ isCachedResult: z.ZodOptional<z.ZodBoolean>;
186
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
187
+ timestamp: z.ZodString;
188
+ treeHash: z.ZodString;
189
+ } & {
190
+ command: z.ZodString;
191
+ exitCode: z.ZodNumber;
192
+ durationSecs: z.ZodNumber;
193
+ extraction: z.ZodOptional<z.ZodObject<{
194
+ summary: z.ZodString;
195
+ totalErrors: z.ZodNumber;
196
+ errors: z.ZodArray<z.ZodObject<{
197
+ file: z.ZodOptional<z.ZodString>;
198
+ line: z.ZodOptional<z.ZodNumber>;
199
+ column: z.ZodOptional<z.ZodNumber>;
200
+ message: z.ZodString;
201
+ code: z.ZodOptional<z.ZodString>;
202
+ severity: z.ZodOptional<z.ZodEnum<["error", "warning"]>>;
203
+ context: z.ZodOptional<z.ZodString>;
204
+ guidance: z.ZodOptional<z.ZodString>;
205
+ }, "strip", z.ZodTypeAny, {
206
+ message: string;
207
+ file?: string | undefined;
208
+ line?: number | undefined;
209
+ column?: number | undefined;
210
+ code?: string | undefined;
211
+ severity?: "error" | "warning" | undefined;
212
+ context?: string | undefined;
213
+ guidance?: string | undefined;
214
+ }, {
215
+ message: string;
216
+ file?: string | undefined;
217
+ line?: number | undefined;
218
+ column?: number | undefined;
219
+ code?: string | undefined;
220
+ severity?: "error" | "warning" | undefined;
221
+ context?: string | undefined;
222
+ guidance?: string | undefined;
223
+ }>, "many">;
224
+ guidance: z.ZodOptional<z.ZodString>;
225
+ errorSummary: z.ZodOptional<z.ZodString>;
226
+ metadata: z.ZodOptional<z.ZodObject<{
227
+ detection: z.ZodOptional<z.ZodObject<{
228
+ extractor: z.ZodString;
229
+ confidence: z.ZodNumber;
230
+ patterns: z.ZodArray<z.ZodString, "many">;
231
+ reason: z.ZodString;
232
+ }, "strip", z.ZodTypeAny, {
233
+ extractor: string;
234
+ confidence: number;
235
+ patterns: string[];
236
+ reason: string;
237
+ }, {
238
+ extractor: string;
239
+ confidence: number;
240
+ patterns: string[];
241
+ reason: string;
242
+ }>>;
243
+ confidence: z.ZodNumber;
244
+ completeness: z.ZodNumber;
245
+ issues: z.ZodArray<z.ZodString, "many">;
246
+ suggestions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
247
+ }, "strip", z.ZodTypeAny, {
248
+ issues: string[];
249
+ confidence: number;
250
+ completeness: number;
251
+ detection?: {
252
+ extractor: string;
253
+ confidence: number;
254
+ patterns: string[];
255
+ reason: string;
256
+ } | undefined;
257
+ suggestions?: string[] | undefined;
258
+ }, {
259
+ issues: string[];
260
+ confidence: number;
261
+ completeness: number;
262
+ detection?: {
263
+ extractor: string;
264
+ confidence: number;
265
+ patterns: string[];
266
+ reason: string;
267
+ } | undefined;
268
+ suggestions?: string[] | undefined;
269
+ }>>;
270
+ }, "strip", z.ZodTypeAny, {
271
+ summary: string;
272
+ totalErrors: number;
273
+ errors: {
274
+ message: string;
275
+ file?: string | undefined;
276
+ line?: number | undefined;
277
+ column?: number | undefined;
278
+ code?: string | undefined;
279
+ severity?: "error" | "warning" | undefined;
280
+ context?: string | undefined;
281
+ guidance?: string | undefined;
282
+ }[];
283
+ guidance?: string | undefined;
284
+ errorSummary?: string | undefined;
285
+ metadata?: {
286
+ issues: string[];
287
+ confidence: number;
288
+ completeness: number;
289
+ detection?: {
290
+ extractor: string;
291
+ confidence: number;
292
+ patterns: string[];
293
+ reason: string;
294
+ } | undefined;
295
+ suggestions?: string[] | undefined;
296
+ } | undefined;
297
+ }, {
298
+ summary: string;
299
+ totalErrors: number;
300
+ errors: {
301
+ message: string;
302
+ file?: string | undefined;
303
+ line?: number | undefined;
304
+ column?: number | undefined;
305
+ code?: string | undefined;
306
+ severity?: "error" | "warning" | undefined;
307
+ context?: string | undefined;
308
+ guidance?: string | undefined;
309
+ }[];
310
+ guidance?: string | undefined;
311
+ errorSummary?: string | undefined;
312
+ metadata?: {
313
+ issues: string[];
314
+ confidence: number;
315
+ completeness: number;
316
+ detection?: {
317
+ extractor: string;
318
+ confidence: number;
319
+ patterns: string[];
320
+ reason: string;
321
+ } | undefined;
322
+ suggestions?: string[] | undefined;
323
+ } | undefined;
324
+ }>>;
325
+ } & {
326
+ /** Organized output files (v0.15.0+) */
327
+ outputFiles: z.ZodOptional<z.ZodObject<{
328
+ stdout: z.ZodOptional<z.ZodString>;
329
+ stderr: z.ZodOptional<z.ZodString>;
330
+ combined: z.ZodString;
331
+ }, "strip", z.ZodTypeAny, {
332
+ combined: string;
333
+ stdout?: string | undefined;
334
+ stderr?: string | undefined;
335
+ }, {
336
+ combined: string;
337
+ stdout?: string | undefined;
338
+ stderr?: string | undefined;
339
+ }>>;
340
+ /** Whether this result is from cache (true) or fresh execution (false/omitted) */
341
+ isCachedResult: z.ZodOptional<z.ZodBoolean>;
342
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
343
+ timestamp: z.ZodString;
344
+ treeHash: z.ZodString;
345
+ } & {
346
+ command: z.ZodString;
347
+ exitCode: z.ZodNumber;
348
+ durationSecs: z.ZodNumber;
349
+ extraction: z.ZodOptional<z.ZodObject<{
350
+ summary: z.ZodString;
351
+ totalErrors: z.ZodNumber;
352
+ errors: z.ZodArray<z.ZodObject<{
353
+ file: z.ZodOptional<z.ZodString>;
354
+ line: z.ZodOptional<z.ZodNumber>;
355
+ column: z.ZodOptional<z.ZodNumber>;
356
+ message: z.ZodString;
357
+ code: z.ZodOptional<z.ZodString>;
358
+ severity: z.ZodOptional<z.ZodEnum<["error", "warning"]>>;
359
+ context: z.ZodOptional<z.ZodString>;
360
+ guidance: z.ZodOptional<z.ZodString>;
361
+ }, "strip", z.ZodTypeAny, {
362
+ message: string;
363
+ file?: string | undefined;
364
+ line?: number | undefined;
365
+ column?: number | undefined;
366
+ code?: string | undefined;
367
+ severity?: "error" | "warning" | undefined;
368
+ context?: string | undefined;
369
+ guidance?: string | undefined;
370
+ }, {
371
+ message: string;
372
+ file?: string | undefined;
373
+ line?: number | undefined;
374
+ column?: number | undefined;
375
+ code?: string | undefined;
376
+ severity?: "error" | "warning" | undefined;
377
+ context?: string | undefined;
378
+ guidance?: string | undefined;
379
+ }>, "many">;
380
+ guidance: z.ZodOptional<z.ZodString>;
381
+ errorSummary: z.ZodOptional<z.ZodString>;
382
+ metadata: z.ZodOptional<z.ZodObject<{
383
+ detection: z.ZodOptional<z.ZodObject<{
384
+ extractor: z.ZodString;
385
+ confidence: z.ZodNumber;
386
+ patterns: z.ZodArray<z.ZodString, "many">;
387
+ reason: z.ZodString;
388
+ }, "strip", z.ZodTypeAny, {
389
+ extractor: string;
390
+ confidence: number;
391
+ patterns: string[];
392
+ reason: string;
393
+ }, {
394
+ extractor: string;
395
+ confidence: number;
396
+ patterns: string[];
397
+ reason: string;
398
+ }>>;
399
+ confidence: z.ZodNumber;
400
+ completeness: z.ZodNumber;
401
+ issues: z.ZodArray<z.ZodString, "many">;
402
+ suggestions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
403
+ }, "strip", z.ZodTypeAny, {
404
+ issues: string[];
405
+ confidence: number;
406
+ completeness: number;
407
+ detection?: {
408
+ extractor: string;
409
+ confidence: number;
410
+ patterns: string[];
411
+ reason: string;
412
+ } | undefined;
413
+ suggestions?: string[] | undefined;
414
+ }, {
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
+ }>>;
426
+ }, "strip", z.ZodTypeAny, {
427
+ summary: string;
428
+ totalErrors: number;
429
+ errors: {
430
+ message: string;
431
+ file?: string | undefined;
432
+ line?: number | undefined;
433
+ column?: number | undefined;
434
+ code?: string | undefined;
435
+ severity?: "error" | "warning" | undefined;
436
+ context?: string | undefined;
437
+ guidance?: string | undefined;
438
+ }[];
439
+ guidance?: string | undefined;
440
+ errorSummary?: string | undefined;
441
+ metadata?: {
442
+ issues: string[];
443
+ confidence: number;
444
+ completeness: number;
445
+ detection?: {
446
+ extractor: string;
447
+ confidence: number;
448
+ patterns: string[];
449
+ reason: string;
450
+ } | undefined;
451
+ suggestions?: string[] | undefined;
452
+ } | undefined;
453
+ }, {
454
+ summary: string;
455
+ totalErrors: number;
456
+ errors: {
457
+ message: string;
458
+ file?: string | undefined;
459
+ line?: number | undefined;
460
+ column?: number | undefined;
461
+ code?: string | undefined;
462
+ severity?: "error" | "warning" | undefined;
463
+ context?: string | undefined;
464
+ guidance?: string | undefined;
465
+ }[];
466
+ guidance?: string | undefined;
467
+ errorSummary?: string | undefined;
468
+ metadata?: {
469
+ issues: string[];
470
+ confidence: number;
471
+ completeness: number;
472
+ detection?: {
473
+ extractor: string;
474
+ confidence: number;
475
+ patterns: string[];
476
+ reason: string;
477
+ } | undefined;
478
+ suggestions?: string[] | undefined;
479
+ } | undefined;
480
+ }>>;
481
+ } & {
482
+ /** Organized output files (v0.15.0+) */
483
+ outputFiles: z.ZodOptional<z.ZodObject<{
484
+ stdout: z.ZodOptional<z.ZodString>;
485
+ stderr: z.ZodOptional<z.ZodString>;
486
+ combined: z.ZodString;
487
+ }, "strip", z.ZodTypeAny, {
488
+ combined: string;
489
+ stdout?: string | undefined;
490
+ stderr?: string | undefined;
491
+ }, {
492
+ combined: string;
493
+ stdout?: string | undefined;
494
+ stderr?: string | undefined;
495
+ }>>;
496
+ /** Whether this result is from cache (true) or fresh execution (false/omitted) */
497
+ isCachedResult: z.ZodOptional<z.ZodBoolean>;
498
+ }, z.ZodTypeAny, "passthrough">>;
499
+ /**
500
+ * Inferred TypeScript types from Zod schemas
501
+ */
502
+ export type { OutputFiles } from '@vibe-validate/core';
503
+ export type RunResult = z.infer<typeof RunResultSchema>;
504
+ /**
505
+ * Safe validation function for RunResult (uses shared utility)
506
+ *
507
+ * @example
508
+ * ```typescript
509
+ * const result = safeValidateRunResult(parsedYaml);
510
+ * if (result.success) {
511
+ * console.log('Valid run result:', result.data);
512
+ * } else {
513
+ * console.error('Invalid data:', result.errors);
514
+ * }
515
+ * ```
516
+ */
517
+ export declare const safeValidateRunResult: (data: unknown) => {
518
+ success: false;
519
+ errors: string[];
520
+ } | {
521
+ success: true;
522
+ data: z.objectOutputType<{
523
+ timestamp: z.ZodString;
524
+ treeHash: z.ZodString;
525
+ } & {
526
+ command: z.ZodString;
527
+ exitCode: z.ZodNumber;
528
+ durationSecs: z.ZodNumber;
529
+ extraction: z.ZodOptional<z.ZodObject<{
530
+ summary: z.ZodString;
531
+ totalErrors: z.ZodNumber;
532
+ errors: z.ZodArray<z.ZodObject<{
533
+ file: z.ZodOptional<z.ZodString>;
534
+ line: z.ZodOptional<z.ZodNumber>;
535
+ column: z.ZodOptional<z.ZodNumber>;
536
+ message: z.ZodString;
537
+ code: z.ZodOptional<z.ZodString>;
538
+ severity: z.ZodOptional<z.ZodEnum<["error", "warning"]>>;
539
+ context: z.ZodOptional<z.ZodString>;
540
+ guidance: z.ZodOptional<z.ZodString>;
541
+ }, "strip", z.ZodTypeAny, {
542
+ message: string;
543
+ file?: string | undefined;
544
+ line?: number | undefined;
545
+ column?: number | undefined;
546
+ code?: string | undefined;
547
+ severity?: "error" | "warning" | undefined;
548
+ context?: string | undefined;
549
+ guidance?: string | undefined;
550
+ }, {
551
+ message: string;
552
+ file?: string | undefined;
553
+ line?: number | undefined;
554
+ column?: number | undefined;
555
+ code?: string | undefined;
556
+ severity?: "error" | "warning" | undefined;
557
+ context?: string | undefined;
558
+ guidance?: string | undefined;
559
+ }>, "many">;
560
+ guidance: z.ZodOptional<z.ZodString>;
561
+ errorSummary: z.ZodOptional<z.ZodString>;
562
+ metadata: z.ZodOptional<z.ZodObject<{
563
+ detection: z.ZodOptional<z.ZodObject<{
564
+ extractor: z.ZodString;
565
+ confidence: z.ZodNumber;
566
+ patterns: z.ZodArray<z.ZodString, "many">;
567
+ reason: z.ZodString;
568
+ }, "strip", z.ZodTypeAny, {
569
+ extractor: string;
570
+ confidence: number;
571
+ patterns: string[];
572
+ reason: string;
573
+ }, {
574
+ extractor: string;
575
+ confidence: number;
576
+ patterns: string[];
577
+ reason: string;
578
+ }>>;
579
+ confidence: z.ZodNumber;
580
+ completeness: z.ZodNumber;
581
+ issues: z.ZodArray<z.ZodString, "many">;
582
+ suggestions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
583
+ }, "strip", z.ZodTypeAny, {
584
+ issues: string[];
585
+ confidence: number;
586
+ completeness: number;
587
+ detection?: {
588
+ extractor: string;
589
+ confidence: number;
590
+ patterns: string[];
591
+ reason: string;
592
+ } | undefined;
593
+ suggestions?: string[] | undefined;
594
+ }, {
595
+ issues: string[];
596
+ confidence: number;
597
+ completeness: number;
598
+ detection?: {
599
+ extractor: string;
600
+ confidence: number;
601
+ patterns: string[];
602
+ reason: string;
603
+ } | undefined;
604
+ suggestions?: string[] | undefined;
605
+ }>>;
606
+ }, "strip", z.ZodTypeAny, {
607
+ summary: string;
608
+ totalErrors: number;
609
+ errors: {
610
+ message: string;
611
+ file?: string | undefined;
612
+ line?: number | undefined;
613
+ column?: number | undefined;
614
+ code?: string | undefined;
615
+ severity?: "error" | "warning" | undefined;
616
+ context?: string | undefined;
617
+ guidance?: string | undefined;
618
+ }[];
619
+ guidance?: string | undefined;
620
+ errorSummary?: string | undefined;
621
+ metadata?: {
622
+ issues: string[];
623
+ confidence: number;
624
+ completeness: number;
625
+ detection?: {
626
+ extractor: string;
627
+ confidence: number;
628
+ patterns: string[];
629
+ reason: string;
630
+ } | undefined;
631
+ suggestions?: string[] | undefined;
632
+ } | undefined;
633
+ }, {
634
+ summary: string;
635
+ totalErrors: number;
636
+ errors: {
637
+ message: string;
638
+ file?: string | undefined;
639
+ line?: number | undefined;
640
+ column?: number | undefined;
641
+ code?: string | undefined;
642
+ severity?: "error" | "warning" | undefined;
643
+ context?: string | undefined;
644
+ guidance?: string | undefined;
645
+ }[];
646
+ guidance?: string | undefined;
647
+ errorSummary?: string | undefined;
648
+ metadata?: {
649
+ issues: string[];
650
+ confidence: number;
651
+ completeness: number;
652
+ detection?: {
653
+ extractor: string;
654
+ confidence: number;
655
+ patterns: string[];
656
+ reason: string;
657
+ } | undefined;
658
+ suggestions?: string[] | undefined;
659
+ } | undefined;
660
+ }>>;
661
+ } & {
662
+ /** Organized output files (v0.15.0+) */
663
+ outputFiles: z.ZodOptional<z.ZodObject<{
664
+ stdout: z.ZodOptional<z.ZodString>;
665
+ stderr: z.ZodOptional<z.ZodString>;
666
+ combined: z.ZodString;
667
+ }, "strip", z.ZodTypeAny, {
668
+ combined: string;
669
+ stdout?: string | undefined;
670
+ stderr?: string | undefined;
671
+ }, {
672
+ combined: string;
673
+ stdout?: string | undefined;
674
+ stderr?: string | undefined;
675
+ }>>;
676
+ /** Whether this result is from cache (true) or fresh execution (false/omitted) */
677
+ isCachedResult: z.ZodOptional<z.ZodBoolean>;
678
+ }, z.ZodTypeAny, "passthrough">;
679
+ };
680
+ /**
681
+ * Strict validation function for RunResult (uses shared utility)
682
+ *
683
+ * @example
684
+ * ```typescript
685
+ * try {
686
+ * const result = validateRunResult(parsedYaml);
687
+ * // Use validated result
688
+ * } catch (error) {
689
+ * console.error('Validation failed:', error);
690
+ * }
691
+ * ```
692
+ */
693
+ export declare const validateRunResult: (data: unknown) => z.objectOutputType<{
694
+ timestamp: z.ZodString;
695
+ treeHash: z.ZodString;
696
+ } & {
697
+ command: z.ZodString;
698
+ exitCode: z.ZodNumber;
699
+ durationSecs: z.ZodNumber;
700
+ extraction: z.ZodOptional<z.ZodObject<{
701
+ summary: z.ZodString;
702
+ totalErrors: z.ZodNumber;
703
+ errors: z.ZodArray<z.ZodObject<{
704
+ file: z.ZodOptional<z.ZodString>;
705
+ line: z.ZodOptional<z.ZodNumber>;
706
+ column: z.ZodOptional<z.ZodNumber>;
707
+ message: z.ZodString;
708
+ code: z.ZodOptional<z.ZodString>;
709
+ severity: z.ZodOptional<z.ZodEnum<["error", "warning"]>>;
710
+ context: z.ZodOptional<z.ZodString>;
711
+ guidance: z.ZodOptional<z.ZodString>;
712
+ }, "strip", z.ZodTypeAny, {
713
+ message: string;
714
+ file?: string | undefined;
715
+ line?: number | undefined;
716
+ column?: number | undefined;
717
+ code?: string | undefined;
718
+ severity?: "error" | "warning" | undefined;
719
+ context?: string | undefined;
720
+ guidance?: string | undefined;
721
+ }, {
722
+ message: string;
723
+ file?: string | undefined;
724
+ line?: number | undefined;
725
+ column?: number | undefined;
726
+ code?: string | undefined;
727
+ severity?: "error" | "warning" | undefined;
728
+ context?: string | undefined;
729
+ guidance?: string | undefined;
730
+ }>, "many">;
731
+ guidance: z.ZodOptional<z.ZodString>;
732
+ errorSummary: z.ZodOptional<z.ZodString>;
733
+ metadata: z.ZodOptional<z.ZodObject<{
734
+ detection: z.ZodOptional<z.ZodObject<{
735
+ extractor: z.ZodString;
736
+ confidence: z.ZodNumber;
737
+ patterns: z.ZodArray<z.ZodString, "many">;
738
+ reason: z.ZodString;
739
+ }, "strip", z.ZodTypeAny, {
740
+ extractor: string;
741
+ confidence: number;
742
+ patterns: string[];
743
+ reason: string;
744
+ }, {
745
+ extractor: string;
746
+ confidence: number;
747
+ patterns: string[];
748
+ reason: string;
749
+ }>>;
750
+ confidence: z.ZodNumber;
751
+ completeness: z.ZodNumber;
752
+ issues: z.ZodArray<z.ZodString, "many">;
753
+ suggestions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
754
+ }, "strip", z.ZodTypeAny, {
755
+ issues: string[];
756
+ confidence: number;
757
+ completeness: number;
758
+ detection?: {
759
+ extractor: string;
760
+ confidence: number;
761
+ patterns: string[];
762
+ reason: string;
763
+ } | undefined;
764
+ suggestions?: string[] | undefined;
765
+ }, {
766
+ issues: string[];
767
+ confidence: number;
768
+ completeness: number;
769
+ detection?: {
770
+ extractor: string;
771
+ confidence: number;
772
+ patterns: string[];
773
+ reason: string;
774
+ } | undefined;
775
+ suggestions?: string[] | undefined;
776
+ }>>;
777
+ }, "strip", z.ZodTypeAny, {
778
+ summary: string;
779
+ totalErrors: number;
780
+ errors: {
781
+ message: string;
782
+ file?: string | undefined;
783
+ line?: number | undefined;
784
+ column?: number | undefined;
785
+ code?: string | undefined;
786
+ severity?: "error" | "warning" | undefined;
787
+ context?: string | undefined;
788
+ guidance?: string | undefined;
789
+ }[];
790
+ guidance?: string | undefined;
791
+ errorSummary?: string | undefined;
792
+ metadata?: {
793
+ issues: string[];
794
+ confidence: number;
795
+ completeness: number;
796
+ detection?: {
797
+ extractor: string;
798
+ confidence: number;
799
+ patterns: string[];
800
+ reason: string;
801
+ } | undefined;
802
+ suggestions?: string[] | undefined;
803
+ } | undefined;
804
+ }, {
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
+ }>>;
832
+ } & {
833
+ /** Organized output files (v0.15.0+) */
834
+ outputFiles: z.ZodOptional<z.ZodObject<{
835
+ stdout: z.ZodOptional<z.ZodString>;
836
+ stderr: z.ZodOptional<z.ZodString>;
837
+ combined: z.ZodString;
838
+ }, "strip", z.ZodTypeAny, {
839
+ combined: string;
840
+ stdout?: string | undefined;
841
+ stderr?: string | undefined;
842
+ }, {
843
+ combined: string;
844
+ stdout?: string | undefined;
845
+ stderr?: string | undefined;
846
+ }>>;
847
+ /** Whether this result is from cache (true) or fresh execution (false/omitted) */
848
+ isCachedResult: z.ZodOptional<z.ZodBoolean>;
849
+ }, z.ZodTypeAny, "passthrough">;
850
+ //# sourceMappingURL=run-result-schema.d.ts.map