agentic-qe 2.3.5 → 2.4.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 (170) hide show
  1. package/CHANGELOG.md +47 -0
  2. package/README.md +1 -1
  3. package/dist/agents/BaseAgent.d.ts +56 -49
  4. package/dist/agents/BaseAgent.d.ts.map +1 -1
  5. package/dist/agents/BaseAgent.js +208 -604
  6. package/dist/agents/BaseAgent.js.map +1 -1
  7. package/dist/agents/FlakyTestHunterAgent.d.ts +2 -2
  8. package/dist/agents/FlakyTestHunterAgent.d.ts.map +1 -1
  9. package/dist/agents/FlakyTestHunterAgent.js +8 -104
  10. package/dist/agents/FlakyTestHunterAgent.js.map +1 -1
  11. package/dist/agents/TestExecutorAgent.d.ts +1 -1
  12. package/dist/agents/TestExecutorAgent.d.ts.map +1 -1
  13. package/dist/agents/TestExecutorAgent.js +4 -46
  14. package/dist/agents/TestExecutorAgent.js.map +1 -1
  15. package/dist/agents/TestGeneratorAgent.d.ts.map +1 -1
  16. package/dist/agents/TestGeneratorAgent.js +15 -35
  17. package/dist/agents/TestGeneratorAgent.js.map +1 -1
  18. package/dist/agents/adapters/CoordinatorAdapter.d.ts +47 -0
  19. package/dist/agents/adapters/CoordinatorAdapter.d.ts.map +1 -0
  20. package/dist/agents/adapters/CoordinatorAdapter.js +266 -0
  21. package/dist/agents/adapters/CoordinatorAdapter.js.map +1 -0
  22. package/dist/agents/adapters/LearningEngineAdapter.d.ts +45 -0
  23. package/dist/agents/adapters/LearningEngineAdapter.d.ts.map +1 -0
  24. package/dist/agents/adapters/LearningEngineAdapter.js +279 -0
  25. package/dist/agents/adapters/LearningEngineAdapter.js.map +1 -0
  26. package/dist/agents/adapters/LifecycleManagerAdapter.d.ts +45 -0
  27. package/dist/agents/adapters/LifecycleManagerAdapter.d.ts.map +1 -0
  28. package/dist/agents/adapters/LifecycleManagerAdapter.js +128 -0
  29. package/dist/agents/adapters/LifecycleManagerAdapter.js.map +1 -0
  30. package/dist/agents/adapters/MemoryServiceAdapter.d.ts +96 -0
  31. package/dist/agents/adapters/MemoryServiceAdapter.d.ts.map +1 -0
  32. package/dist/agents/adapters/MemoryServiceAdapter.js +266 -0
  33. package/dist/agents/adapters/MemoryServiceAdapter.js.map +1 -0
  34. package/dist/agents/adapters/index.d.ts +14 -0
  35. package/dist/agents/adapters/index.d.ts.map +1 -0
  36. package/dist/agents/adapters/index.js +25 -0
  37. package/dist/agents/adapters/index.js.map +1 -0
  38. package/dist/agents/lifecycle/AgentLifecycleManager.d.ts.map +1 -1
  39. package/dist/agents/lifecycle/AgentLifecycleManager.js +12 -6
  40. package/dist/agents/lifecycle/AgentLifecycleManager.js.map +1 -1
  41. package/dist/core/cache/BinaryCacheBuilder.d.ts +84 -0
  42. package/dist/core/cache/BinaryCacheBuilder.d.ts.map +1 -0
  43. package/dist/core/cache/BinaryCacheBuilder.js +225 -0
  44. package/dist/core/cache/BinaryCacheBuilder.js.map +1 -0
  45. package/dist/core/cache/BinaryCacheManager.d.ts +142 -0
  46. package/dist/core/cache/BinaryCacheManager.d.ts.map +1 -0
  47. package/dist/core/cache/BinaryCacheManager.js +354 -0
  48. package/dist/core/cache/BinaryCacheManager.js.map +1 -0
  49. package/dist/core/cache/BinaryCacheReader.d.ts +129 -0
  50. package/dist/core/cache/BinaryCacheReader.d.ts.map +1 -0
  51. package/dist/core/cache/BinaryCacheReader.js +243 -0
  52. package/dist/core/cache/BinaryCacheReader.js.map +1 -0
  53. package/dist/core/cache/BinaryMetadataCache.d.ts +533 -0
  54. package/dist/core/cache/BinaryMetadataCache.d.ts.map +1 -0
  55. package/dist/core/cache/BinaryMetadataCache.js +142 -0
  56. package/dist/core/cache/BinaryMetadataCache.js.map +1 -0
  57. package/dist/core/cache/CacheInvalidator.d.ts +103 -0
  58. package/dist/core/cache/CacheInvalidator.d.ts.map +1 -0
  59. package/dist/core/cache/CacheInvalidator.js +152 -0
  60. package/dist/core/cache/CacheInvalidator.js.map +1 -0
  61. package/dist/core/cache/CacheValidator.d.ts +69 -0
  62. package/dist/core/cache/CacheValidator.d.ts.map +1 -0
  63. package/dist/core/cache/CacheValidator.js +189 -0
  64. package/dist/core/cache/CacheValidator.js.map +1 -0
  65. package/dist/core/cache/MessagePackSerializer.d.ts +163 -0
  66. package/dist/core/cache/MessagePackSerializer.d.ts.map +1 -0
  67. package/dist/core/cache/MessagePackSerializer.js +274 -0
  68. package/dist/core/cache/MessagePackSerializer.js.map +1 -0
  69. package/dist/core/cache/index.d.ts +58 -0
  70. package/dist/core/cache/index.d.ts.map +1 -0
  71. package/dist/core/cache/index.js +102 -0
  72. package/dist/core/cache/index.js.map +1 -0
  73. package/dist/core/index.d.ts +2 -0
  74. package/dist/core/index.d.ts.map +1 -1
  75. package/dist/core/index.js +18 -0
  76. package/dist/core/index.js.map +1 -1
  77. package/dist/core/memory/HNSWVectorMemory.js +1 -1
  78. package/dist/core/memory/PatternStoreFactory.d.ts +28 -0
  79. package/dist/core/memory/PatternStoreFactory.d.ts.map +1 -1
  80. package/dist/core/memory/PatternStoreFactory.js +68 -3
  81. package/dist/core/memory/PatternStoreFactory.js.map +1 -1
  82. package/dist/core/platform/FileOperations.d.ts +124 -0
  83. package/dist/core/platform/FileOperations.d.ts.map +1 -0
  84. package/dist/core/platform/FileOperations.js +371 -0
  85. package/dist/core/platform/FileOperations.js.map +1 -0
  86. package/dist/core/platform/PlatformDetector.d.ts +53 -0
  87. package/dist/core/platform/PlatformDetector.d.ts.map +1 -0
  88. package/dist/core/platform/PlatformDetector.js +251 -0
  89. package/dist/core/platform/PlatformDetector.js.map +1 -0
  90. package/dist/core/platform/index.d.ts +12 -0
  91. package/dist/core/platform/index.d.ts.map +1 -0
  92. package/dist/core/platform/index.js +28 -0
  93. package/dist/core/platform/index.js.map +1 -0
  94. package/dist/core/strategies/AcceleratedLearningStrategy.d.ts +74 -0
  95. package/dist/core/strategies/AcceleratedLearningStrategy.d.ts.map +1 -0
  96. package/dist/core/strategies/AcceleratedLearningStrategy.js +200 -0
  97. package/dist/core/strategies/AcceleratedLearningStrategy.js.map +1 -0
  98. package/dist/core/strategies/AgentCoordinationStrategy.d.ts +157 -0
  99. package/dist/core/strategies/AgentCoordinationStrategy.d.ts.map +1 -0
  100. package/dist/core/strategies/AgentCoordinationStrategy.js +12 -0
  101. package/dist/core/strategies/AgentCoordinationStrategy.js.map +1 -0
  102. package/dist/core/strategies/AgentLearningStrategy.d.ts +200 -0
  103. package/dist/core/strategies/AgentLearningStrategy.d.ts.map +1 -0
  104. package/dist/core/strategies/AgentLearningStrategy.js +13 -0
  105. package/dist/core/strategies/AgentLearningStrategy.js.map +1 -0
  106. package/dist/core/strategies/AgentLifecycleStrategy.d.ts +116 -0
  107. package/dist/core/strategies/AgentLifecycleStrategy.d.ts.map +1 -0
  108. package/dist/core/strategies/AgentLifecycleStrategy.js +12 -0
  109. package/dist/core/strategies/AgentLifecycleStrategy.js.map +1 -0
  110. package/dist/core/strategies/AgentMemoryStrategy.d.ts +154 -0
  111. package/dist/core/strategies/AgentMemoryStrategy.d.ts.map +1 -0
  112. package/dist/core/strategies/AgentMemoryStrategy.js +13 -0
  113. package/dist/core/strategies/AgentMemoryStrategy.js.map +1 -0
  114. package/dist/core/strategies/DefaultCoordinationStrategy.d.ts +105 -0
  115. package/dist/core/strategies/DefaultCoordinationStrategy.d.ts.map +1 -0
  116. package/dist/core/strategies/DefaultCoordinationStrategy.js +332 -0
  117. package/dist/core/strategies/DefaultCoordinationStrategy.js.map +1 -0
  118. package/dist/core/strategies/DefaultLearningStrategy.d.ts +120 -0
  119. package/dist/core/strategies/DefaultLearningStrategy.d.ts.map +1 -0
  120. package/dist/core/strategies/DefaultLearningStrategy.js +365 -0
  121. package/dist/core/strategies/DefaultLearningStrategy.js.map +1 -0
  122. package/dist/core/strategies/DefaultLifecycleStrategy.d.ts +129 -0
  123. package/dist/core/strategies/DefaultLifecycleStrategy.d.ts.map +1 -0
  124. package/dist/core/strategies/DefaultLifecycleStrategy.js +297 -0
  125. package/dist/core/strategies/DefaultLifecycleStrategy.js.map +1 -0
  126. package/dist/core/strategies/DefaultMemoryStrategy.d.ts +91 -0
  127. package/dist/core/strategies/DefaultMemoryStrategy.d.ts.map +1 -0
  128. package/dist/core/strategies/DefaultMemoryStrategy.js +257 -0
  129. package/dist/core/strategies/DefaultMemoryStrategy.js.map +1 -0
  130. package/dist/core/strategies/DistributedMemoryStrategy.d.ts +85 -0
  131. package/dist/core/strategies/DistributedMemoryStrategy.d.ts.map +1 -0
  132. package/dist/core/strategies/DistributedMemoryStrategy.js +126 -0
  133. package/dist/core/strategies/DistributedMemoryStrategy.js.map +1 -0
  134. package/dist/core/strategies/index.d.ts +95 -0
  135. package/dist/core/strategies/index.d.ts.map +1 -0
  136. package/dist/core/strategies/index.js +65 -0
  137. package/dist/core/strategies/index.js.map +1 -0
  138. package/dist/learning/PerformanceOptimizer.js +2 -2
  139. package/dist/learning/PerformanceOptimizer.js.map +1 -1
  140. package/dist/mcp/handlers/base-handler.d.ts +28 -1
  141. package/dist/mcp/handlers/base-handler.d.ts.map +1 -1
  142. package/dist/mcp/handlers/base-handler.js +41 -0
  143. package/dist/mcp/handlers/base-handler.js.map +1 -1
  144. package/dist/mcp/server-instructions.d.ts +1 -1
  145. package/dist/mcp/server-instructions.js +1 -1
  146. package/dist/output/AIActionSuggester.d.ts +98 -0
  147. package/dist/output/AIActionSuggester.d.ts.map +1 -0
  148. package/dist/output/AIActionSuggester.js +499 -0
  149. package/dist/output/AIActionSuggester.js.map +1 -0
  150. package/dist/output/CLIOutputHelper.d.ts +169 -0
  151. package/dist/output/CLIOutputHelper.d.ts.map +1 -0
  152. package/dist/output/CLIOutputHelper.js +320 -0
  153. package/dist/output/CLIOutputHelper.js.map +1 -0
  154. package/dist/output/OutputFormatter.d.ts +764 -0
  155. package/dist/output/OutputFormatter.d.ts.map +1 -0
  156. package/dist/output/OutputFormatter.js +125 -0
  157. package/dist/output/OutputFormatter.js.map +1 -0
  158. package/dist/output/OutputFormatterImpl.d.ts +131 -0
  159. package/dist/output/OutputFormatterImpl.d.ts.map +1 -0
  160. package/dist/output/OutputFormatterImpl.js +556 -0
  161. package/dist/output/OutputFormatterImpl.js.map +1 -0
  162. package/dist/output/examples.d.ts +38 -0
  163. package/dist/output/examples.d.ts.map +1 -0
  164. package/dist/output/examples.js +503 -0
  165. package/dist/output/examples.js.map +1 -0
  166. package/dist/output/index.d.ts +16 -0
  167. package/dist/output/index.d.ts.map +1 -0
  168. package/dist/output/index.js +58 -0
  169. package/dist/output/index.js.map +1 -0
  170. package/package.json +4 -1
@@ -0,0 +1,764 @@
1
+ /**
2
+ * AI-Friendly Output Formatter
3
+ *
4
+ * Provides structured JSON output optimized for AI agent consumption,
5
+ * enabling 100x faster parsing vs natural language terminal output.
6
+ *
7
+ * @module output/OutputFormatter
8
+ * @version 1.0.0
9
+ * @see /workspaces/agentic-qe-cf/docs/design/ai-output-format-spec.md
10
+ */
11
+ /**
12
+ * Output mode enum
13
+ */
14
+ export declare enum OutputMode {
15
+ /** Human-readable terminal output with colors */
16
+ HUMAN = "human",
17
+ /** Structured JSON output for AI consumption */
18
+ AI = "ai",
19
+ /** Auto-detect based on environment variables */
20
+ AUTO = "auto"
21
+ }
22
+ /**
23
+ * Output type identifiers
24
+ */
25
+ export type OutputType = 'test_results' | 'coverage_report' | 'agent_status' | 'quality_metrics' | 'security_scan' | 'performance_metrics' | 'test_results_stream';
26
+ /**
27
+ * Execution status
28
+ */
29
+ export type ExecutionStatus = 'success' | 'failure' | 'warning' | 'error';
30
+ /**
31
+ * Priority levels for action suggestions
32
+ */
33
+ export type ActionPriority = 'critical' | 'high' | 'medium' | 'low' | 'info';
34
+ /**
35
+ * Stream types for long-running operations
36
+ */
37
+ export type StreamType = 'start' | 'progress' | 'complete' | 'error';
38
+ /**
39
+ * Base AI output schema - all outputs must include these fields
40
+ */
41
+ export interface BaseAIOutput {
42
+ /** Schema version (semantic versioning) */
43
+ schemaVersion: string;
44
+ /** Output type identifier */
45
+ outputType: OutputType;
46
+ /** ISO 8601 timestamp */
47
+ timestamp: string;
48
+ /** Unique execution identifier */
49
+ executionId: string;
50
+ /** Overall execution status */
51
+ status: ExecutionStatus;
52
+ /** Execution metadata */
53
+ metadata: ExecutionMetadata;
54
+ /** Type-specific data payload */
55
+ data: unknown;
56
+ /** Actionable suggestions for next steps */
57
+ actionSuggestions: ActionSuggestion[];
58
+ /** Non-critical warnings */
59
+ warnings: OutputWarning[];
60
+ /** Critical errors */
61
+ errors: OutputError[];
62
+ }
63
+ /**
64
+ * Execution metadata
65
+ */
66
+ export interface ExecutionMetadata {
67
+ /** Agent identifier */
68
+ agentId: string;
69
+ /** Agent version */
70
+ agentVersion: string;
71
+ /** Execution duration in milliseconds */
72
+ duration: number;
73
+ /** Environment name */
74
+ environment: 'production' | 'staging' | 'development' | 'test';
75
+ /** Optional: Test framework used */
76
+ framework?: string;
77
+ /** Optional: CI/CD information */
78
+ ci?: {
79
+ provider: string;
80
+ buildNumber: string;
81
+ buildUrl?: string;
82
+ };
83
+ /** Optional: Additional metadata */
84
+ [key: string]: unknown;
85
+ }
86
+ /**
87
+ * Action suggestion for AI agents
88
+ */
89
+ export interface ActionSuggestion {
90
+ /** Action type identifier */
91
+ action: string;
92
+ /** Priority level */
93
+ priority: ActionPriority;
94
+ /** Human-readable reason for this action */
95
+ reason: string;
96
+ /** Affected test names (for test-related actions) */
97
+ affectedTests?: string[];
98
+ /** Target file paths (for file-related actions) */
99
+ targetFiles?: string[];
100
+ /** Affected components (for architectural actions) */
101
+ affectedComponents?: string[];
102
+ /** Step-by-step guidance */
103
+ steps: string[];
104
+ /** Automation support */
105
+ automation: ActionAutomation;
106
+ /** Optional: Impact assessment */
107
+ impact?: ActionImpact;
108
+ /** Optional: Related documentation */
109
+ relatedDocs?: string[];
110
+ }
111
+ /**
112
+ * Automation support for actions
113
+ */
114
+ export interface ActionAutomation {
115
+ /** CLI command to execute */
116
+ command: string;
117
+ /** Can this action be automated? */
118
+ canAutoFix: boolean;
119
+ /** Confidence score (0-1) */
120
+ confidence: number;
121
+ /** Estimated time in minutes */
122
+ estimatedTime?: number;
123
+ /** Estimated number of tests to generate (for test generation) */
124
+ estimatedTests?: number;
125
+ }
126
+ /**
127
+ * Action impact assessment
128
+ */
129
+ export interface ActionImpact {
130
+ /** Current value */
131
+ currentValue: number;
132
+ /** Target value */
133
+ targetValue: number;
134
+ /** Estimated improvement */
135
+ estimatedImprovement: number;
136
+ /** Business value */
137
+ businessValue: 'critical' | 'high' | 'medium' | 'low';
138
+ }
139
+ /**
140
+ * Output warning
141
+ */
142
+ export interface OutputWarning {
143
+ /** Warning code */
144
+ code: string;
145
+ /** Warning message */
146
+ message: string;
147
+ /** Severity level */
148
+ severity: 'warning' | 'info';
149
+ /** Additional details */
150
+ details?: string;
151
+ }
152
+ /**
153
+ * Output error
154
+ */
155
+ export interface OutputError {
156
+ /** Error code */
157
+ code: string;
158
+ /** Error message */
159
+ message: string;
160
+ /** Error stack trace */
161
+ stack?: string;
162
+ /** Additional context */
163
+ context?: Record<string, unknown>;
164
+ }
165
+ /**
166
+ * Test results output schema
167
+ */
168
+ export interface TestResultsOutput extends BaseAIOutput {
169
+ outputType: 'test_results';
170
+ data: TestResultsData;
171
+ }
172
+ /**
173
+ * Test results data
174
+ */
175
+ export interface TestResultsData {
176
+ /** Summary statistics */
177
+ summary: TestSummary;
178
+ /** Test suites */
179
+ suites: TestSuite[];
180
+ /** Failed tests */
181
+ failures: TestFailure[];
182
+ /** Flaky tests detected */
183
+ flaky: FlakyTest[];
184
+ /** Coverage information */
185
+ coverage?: CoverageSummary;
186
+ }
187
+ /**
188
+ * Test summary
189
+ */
190
+ export interface TestSummary {
191
+ /** Total tests executed */
192
+ total: number;
193
+ /** Passed tests */
194
+ passed: number;
195
+ /** Failed tests */
196
+ failed: number;
197
+ /** Skipped tests */
198
+ skipped: number;
199
+ /** Flaky tests detected */
200
+ flaky?: number;
201
+ /** Total duration in milliseconds */
202
+ duration: number;
203
+ /** Pass rate (0-100) */
204
+ passRate: number;
205
+ /** Failure rate (0-100) */
206
+ failureRate: number;
207
+ /** Flaky rate (0-100) */
208
+ flakyRate?: number;
209
+ }
210
+ /**
211
+ * Test suite result
212
+ */
213
+ export interface TestSuite {
214
+ /** Suite name */
215
+ name: string;
216
+ /** Suite file path */
217
+ file: string;
218
+ /** Status */
219
+ status: 'passed' | 'failed' | 'skipped';
220
+ /** Total tests */
221
+ total: number;
222
+ /** Passed tests */
223
+ passed: number;
224
+ /** Failed tests */
225
+ failed: number;
226
+ /** Skipped tests */
227
+ skipped: number;
228
+ /** Duration in milliseconds */
229
+ duration: number;
230
+ }
231
+ /**
232
+ * Test failure
233
+ */
234
+ export interface TestFailure {
235
+ /** Test name */
236
+ testName: string;
237
+ /** Suite name */
238
+ suiteName: string;
239
+ /** File path */
240
+ file: string;
241
+ /** Line number */
242
+ line: number;
243
+ /** Error information */
244
+ error: {
245
+ message: string;
246
+ stack: string;
247
+ type: string;
248
+ };
249
+ /** Test duration in milliseconds */
250
+ duration: number;
251
+ /** Number of retries attempted */
252
+ retries: number;
253
+ /** Last run timestamp */
254
+ lastRun: string;
255
+ }
256
+ /**
257
+ * Flaky test
258
+ */
259
+ export interface FlakyTest {
260
+ /** Test name */
261
+ testName: string;
262
+ /** Suite name */
263
+ suiteName: string;
264
+ /** File path */
265
+ file: string;
266
+ /** Line number */
267
+ line: number;
268
+ /** Flakiness score (0-1) */
269
+ flakinessScore: number;
270
+ /** Failure rate (0-1) */
271
+ failureRate: number;
272
+ /** Total runs analyzed */
273
+ totalRuns: number;
274
+ /** Recent failures count */
275
+ recentFailures: number;
276
+ /** Pattern detected */
277
+ pattern: string;
278
+ }
279
+ /**
280
+ * Coverage report output schema
281
+ */
282
+ export interface CoverageReportOutput extends BaseAIOutput {
283
+ outputType: 'coverage_report';
284
+ data: CoverageReportData;
285
+ }
286
+ /**
287
+ * Coverage report data
288
+ */
289
+ export interface CoverageReportData {
290
+ /** Summary statistics */
291
+ summary: CoverageSummary;
292
+ /** Coverage trend */
293
+ trend?: CoverageTrend;
294
+ /** Coverage gaps */
295
+ gaps: CoverageGap[];
296
+ /** File-level coverage */
297
+ files: FileCoverage[];
298
+ }
299
+ /**
300
+ * Coverage summary
301
+ */
302
+ export interface CoverageSummary {
303
+ /** Overall coverage percentage */
304
+ overall: number;
305
+ /** Line coverage */
306
+ lines: CoverageMetric;
307
+ /** Branch coverage */
308
+ branches: CoverageMetric;
309
+ /** Function coverage */
310
+ functions: CoverageMetric;
311
+ /** Statement coverage */
312
+ statements: CoverageMetric;
313
+ }
314
+ /**
315
+ * Coverage metric
316
+ */
317
+ export interface CoverageMetric {
318
+ /** Total items */
319
+ total: number;
320
+ /** Covered items */
321
+ covered: number;
322
+ /** Uncovered items */
323
+ uncovered: number;
324
+ /** Percentage (0-100) */
325
+ percentage: number;
326
+ }
327
+ /**
328
+ * Coverage trend
329
+ */
330
+ export interface CoverageTrend {
331
+ /** Trend direction */
332
+ direction: 'improving' | 'stable' | 'degrading';
333
+ /** Percentage change */
334
+ change: number;
335
+ /** Previous coverage */
336
+ previousCoverage: number;
337
+ /** Current coverage */
338
+ currentCoverage: number;
339
+ }
340
+ /**
341
+ * Coverage gap
342
+ */
343
+ export interface CoverageGap {
344
+ /** File path */
345
+ file: string;
346
+ /** Gap type */
347
+ type: 'critical_path' | 'high_complexity' | 'error_handling' | 'edge_cases';
348
+ /** Priority */
349
+ priority: 'critical' | 'high' | 'medium' | 'low';
350
+ /** Coverage metrics for this gap */
351
+ coverage: {
352
+ lines: number;
353
+ branches: number;
354
+ functions: number;
355
+ };
356
+ /** Uncovered line numbers */
357
+ uncoveredLines: number[];
358
+ /** Uncovered branches */
359
+ uncoveredBranches: Array<{
360
+ line: number;
361
+ branch: string;
362
+ condition?: string;
363
+ }>;
364
+ /** Impact level */
365
+ impact: 'critical' | 'high' | 'medium' | 'low';
366
+ /** Reason for priority */
367
+ reason: string;
368
+ }
369
+ /**
370
+ * File coverage
371
+ */
372
+ export interface FileCoverage {
373
+ /** File path */
374
+ path: string;
375
+ /** Line coverage */
376
+ lines: CoverageMetric;
377
+ /** Branch coverage */
378
+ branches: CoverageMetric;
379
+ /** Function coverage */
380
+ functions: CoverageMetric;
381
+ /** Uncovered line numbers */
382
+ uncoveredLines: number[];
383
+ /** Uncovered branches */
384
+ uncoveredBranches: Array<{
385
+ line: number;
386
+ branch: string;
387
+ }>;
388
+ }
389
+ /**
390
+ * Agent status output schema
391
+ */
392
+ export interface AgentStatusOutput extends BaseAIOutput {
393
+ outputType: 'agent_status';
394
+ data: AgentStatusData;
395
+ }
396
+ /**
397
+ * Agent status data
398
+ */
399
+ export interface AgentStatusData {
400
+ /** Agent information */
401
+ agent: AgentInfo;
402
+ /** Dependencies status */
403
+ dependencies: DependenciesStatus;
404
+ /** Agent configuration */
405
+ configuration: AgentConfiguration;
406
+ }
407
+ /**
408
+ * Agent information
409
+ */
410
+ export interface AgentInfo {
411
+ /** Agent ID */
412
+ id: string;
413
+ /** Agent name */
414
+ name: string;
415
+ /** Agent version */
416
+ version: string;
417
+ /** Current status */
418
+ status: 'active' | 'idle' | 'busy' | 'error' | 'stopped';
419
+ /** Health status */
420
+ health: 'healthy' | 'degraded' | 'unhealthy';
421
+ /** Agent capabilities */
422
+ capabilities: string[];
423
+ /** Agent statistics */
424
+ stats: AgentStats;
425
+ /** Learning information */
426
+ learning?: LearningInfo;
427
+ }
428
+ /**
429
+ * Agent statistics
430
+ */
431
+ export interface AgentStats {
432
+ /** Total executions */
433
+ totalExecutions: number;
434
+ /** Success rate (0-100) */
435
+ successRate: number;
436
+ /** Average duration in milliseconds */
437
+ averageDuration: number;
438
+ /** Tests generated (for test generation agents) */
439
+ testsGenerated?: number;
440
+ /** Last execution timestamp */
441
+ lastExecution: string;
442
+ }
443
+ /**
444
+ * Learning information
445
+ */
446
+ export interface LearningInfo {
447
+ /** Patterns learned */
448
+ patternsLearned: number;
449
+ /** Confidence score (0-1) */
450
+ confidenceScore: number;
451
+ /** Training iterations */
452
+ trainingIterations: number;
453
+ /** Last training timestamp */
454
+ lastTraining: string;
455
+ }
456
+ /**
457
+ * Dependencies status
458
+ */
459
+ export interface DependenciesStatus {
460
+ /** Required dependencies */
461
+ required: Dependency[];
462
+ /** Optional dependencies */
463
+ optional: Dependency[];
464
+ }
465
+ /**
466
+ * Dependency
467
+ */
468
+ export interface Dependency {
469
+ /** Service name */
470
+ service: string;
471
+ /** Health status */
472
+ status: 'healthy' | 'degraded' | 'unhealthy';
473
+ /** Service version */
474
+ version?: string;
475
+ /** Latency in milliseconds */
476
+ latency?: number;
477
+ /** Provider (for LLM services) */
478
+ provider?: string;
479
+ /** Model (for LLM services) */
480
+ model?: string;
481
+ }
482
+ /**
483
+ * Agent configuration
484
+ */
485
+ export interface AgentConfiguration {
486
+ /** Max concurrency */
487
+ maxConcurrency: number;
488
+ /** Timeout in milliseconds */
489
+ timeout: number;
490
+ /** Retry attempts */
491
+ retryAttempts: number;
492
+ /** Learning enabled */
493
+ learningEnabled: boolean;
494
+ /** Memory persistence enabled */
495
+ memoryPersistence: boolean;
496
+ /** Additional configuration */
497
+ [key: string]: unknown;
498
+ }
499
+ /**
500
+ * Quality metrics output schema
501
+ */
502
+ export interface QualityMetricsOutput extends BaseAIOutput {
503
+ outputType: 'quality_metrics';
504
+ data: QualityMetricsData;
505
+ }
506
+ /**
507
+ * Quality metrics data
508
+ */
509
+ export interface QualityMetricsData {
510
+ /** Overall quality score (0-100) */
511
+ overallScore: number;
512
+ /** Quality grade */
513
+ grade: 'A+' | 'A' | 'B' | 'C' | 'D' | 'F';
514
+ /** Quality dimensions */
515
+ dimensions: QualityDimensions;
516
+ /** Quality gates */
517
+ qualityGates: QualityGates;
518
+ /** Code smells */
519
+ codeSmells: CodeSmells;
520
+ /** Technical debt */
521
+ technicalDebt: TechnicalDebt;
522
+ }
523
+ /**
524
+ * Quality dimensions
525
+ */
526
+ export interface QualityDimensions {
527
+ testCoverage: QualityDimension;
528
+ codeQuality: QualityDimension;
529
+ security: QualityDimension;
530
+ performance: QualityDimension;
531
+ maintainability: QualityDimension;
532
+ }
533
+ /**
534
+ * Quality dimension
535
+ */
536
+ export interface QualityDimension {
537
+ /** Score (0-100) */
538
+ score: number;
539
+ /** Weight in overall score (0-1) */
540
+ weight: number;
541
+ /** Status */
542
+ status: 'excellent' | 'good' | 'fair' | 'needs_improvement' | 'critical';
543
+ }
544
+ /**
545
+ * Quality gates
546
+ */
547
+ export interface QualityGates {
548
+ /** Gates passed */
549
+ passed: number;
550
+ /** Gates failed */
551
+ failed: number;
552
+ /** Total gates */
553
+ total: number;
554
+ /** Individual gate results */
555
+ gates: QualityGate[];
556
+ }
557
+ /**
558
+ * Quality gate
559
+ */
560
+ export interface QualityGate {
561
+ /** Gate name */
562
+ name: string;
563
+ /** Status */
564
+ status: 'passed' | 'failed' | 'warning';
565
+ /** Actual value */
566
+ actualValue: number;
567
+ /** Threshold */
568
+ threshold: number;
569
+ /** Operator */
570
+ operator: 'gt' | 'lt' | 'gte' | 'lte' | 'eq';
571
+ /** Optional message */
572
+ message?: string;
573
+ }
574
+ /**
575
+ * Code smells
576
+ */
577
+ export interface CodeSmells {
578
+ /** Total code smells */
579
+ total: number;
580
+ /** Code smells by type */
581
+ byType: {
582
+ duplicate_code: number;
583
+ long_method: number;
584
+ large_class: number;
585
+ long_parameter_list: number;
586
+ [key: string]: number;
587
+ };
588
+ /** Critical smells */
589
+ criticalSmells: CriticalSmell[];
590
+ }
591
+ /**
592
+ * Critical smell
593
+ */
594
+ export interface CriticalSmell {
595
+ /** Smell type */
596
+ type: string;
597
+ /** File path */
598
+ file: string;
599
+ /** Line number */
600
+ line: number;
601
+ /** Severity */
602
+ severity: 'blocker' | 'critical' | 'major' | 'minor';
603
+ /** Message */
604
+ message: string;
605
+ }
606
+ /**
607
+ * Technical debt
608
+ */
609
+ export interface TechnicalDebt {
610
+ /** Total debt */
611
+ total: number;
612
+ /** Unit (hours, days, etc.) */
613
+ unit: string;
614
+ /** Debt by category */
615
+ byCategory: {
616
+ code_smells: number;
617
+ complexity: number;
618
+ duplications: number;
619
+ [key: string]: number;
620
+ };
621
+ }
622
+ /**
623
+ * Stream start message
624
+ */
625
+ export interface StreamStart {
626
+ schemaVersion: string;
627
+ outputType: OutputType;
628
+ streamType: 'start';
629
+ executionId: string;
630
+ timestamp: string;
631
+ metadata: {
632
+ totalTests?: number;
633
+ totalFiles?: number;
634
+ estimatedDuration?: number;
635
+ [key: string]: unknown;
636
+ };
637
+ }
638
+ /**
639
+ * Stream progress message
640
+ */
641
+ export interface StreamProgress {
642
+ streamType: 'progress';
643
+ completed: number;
644
+ total: number;
645
+ passed?: number;
646
+ failed?: number;
647
+ elapsed?: number;
648
+ [key: string]: unknown;
649
+ }
650
+ /**
651
+ * Stream complete message (full schema)
652
+ */
653
+ export interface StreamComplete extends BaseAIOutput {
654
+ streamType: 'complete';
655
+ }
656
+ /**
657
+ * Stream error message
658
+ */
659
+ export interface StreamError {
660
+ streamType: 'error';
661
+ executionId: string;
662
+ timestamp: string;
663
+ error: OutputError;
664
+ }
665
+ /**
666
+ * Output formatter interface
667
+ */
668
+ export interface OutputFormatter {
669
+ /**
670
+ * Format data for output
671
+ */
672
+ format(data: unknown, outputType: OutputType, mode?: OutputMode): string;
673
+ /**
674
+ * Detect output mode based on environment
675
+ */
676
+ detectMode(): OutputMode;
677
+ /**
678
+ * Generate test results output
679
+ */
680
+ formatTestResults(results: TestResultsData, metadata: ExecutionMetadata): TestResultsOutput;
681
+ /**
682
+ * Generate coverage report output
683
+ */
684
+ formatCoverageReport(coverage: CoverageReportData, metadata: ExecutionMetadata): CoverageReportOutput;
685
+ /**
686
+ * Generate agent status output
687
+ */
688
+ formatAgentStatus(status: AgentStatusData, metadata: ExecutionMetadata): AgentStatusOutput;
689
+ /**
690
+ * Generate quality metrics output
691
+ */
692
+ formatQualityMetrics(metrics: QualityMetricsData, metadata: ExecutionMetadata): QualityMetricsOutput;
693
+ /**
694
+ * Generate action suggestions
695
+ */
696
+ generateActionSuggestions(data: unknown, outputType: OutputType): ActionSuggestion[];
697
+ /**
698
+ * Check schema version compatibility
699
+ */
700
+ isCompatibleVersion(outputVersion: string, requiredVersion: string): boolean;
701
+ }
702
+ /**
703
+ * Environment detection for AI mode
704
+ */
705
+ export declare class OutputModeDetector {
706
+ /**
707
+ * Detect output mode based on environment variables
708
+ */
709
+ static detectMode(): OutputMode;
710
+ /**
711
+ * Check if running in Claude Code
712
+ */
713
+ private static isClaudeCode;
714
+ /**
715
+ * Check if running in Cursor AI
716
+ */
717
+ private static isCursorAI;
718
+ /**
719
+ * Check if running in Aider AI
720
+ */
721
+ private static isAiderAI;
722
+ /**
723
+ * Get configured schema version
724
+ */
725
+ static getSchemaVersion(): string;
726
+ /**
727
+ * Check if pretty-print is enabled
728
+ */
729
+ static isPrettyPrintEnabled(): boolean;
730
+ /**
731
+ * Check if streaming is enabled
732
+ */
733
+ static isStreamingEnabled(): boolean;
734
+ }
735
+ /**
736
+ * Current schema version
737
+ */
738
+ export declare const SCHEMA_VERSION = "1.0.0";
739
+ /**
740
+ * Action type constants
741
+ */
742
+ export declare const ActionTypes: {
743
+ readonly FIX_TEST_FAILURES: "fix_test_failures";
744
+ readonly STABILIZE_FLAKY_TESTS: "stabilize_flaky_tests";
745
+ readonly INCREASE_COVERAGE: "increase_coverage";
746
+ readonly REDUCE_COMPLEXITY: "reduce_complexity";
747
+ readonly FIX_VULNERABILITIES: "fix_vulnerabilities";
748
+ readonly OPTIMIZE_PERFORMANCE: "optimize_performance";
749
+ readonly FIX_CODE_SMELLS: "fix_code_smells";
750
+ readonly UPDATE_DEPENDENCIES: "update_dependencies";
751
+ readonly REVIEW_COVERAGE_TREND: "review_coverage_trend";
752
+ readonly AGENT_READY: "agent_ready";
753
+ };
754
+ /**
755
+ * Priority weights for sorting
756
+ */
757
+ export declare const PriorityWeights: {
758
+ readonly critical: 1;
759
+ readonly high: 2;
760
+ readonly medium: 3;
761
+ readonly low: 4;
762
+ readonly info: 5;
763
+ };
764
+ //# sourceMappingURL=OutputFormatter.d.ts.map