agentic-qe 2.6.0 → 2.6.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 (63) hide show
  1. package/CHANGELOG.md +85 -0
  2. package/README.md +1 -1
  3. package/dist/agents/pool/AgentPool.d.ts +112 -0
  4. package/dist/agents/pool/AgentPool.d.ts.map +1 -0
  5. package/dist/agents/pool/AgentPool.js +573 -0
  6. package/dist/agents/pool/AgentPool.js.map +1 -0
  7. package/dist/agents/pool/QEAgentPoolFactory.d.ts +118 -0
  8. package/dist/agents/pool/QEAgentPoolFactory.d.ts.map +1 -0
  9. package/dist/agents/pool/QEAgentPoolFactory.js +251 -0
  10. package/dist/agents/pool/QEAgentPoolFactory.js.map +1 -0
  11. package/dist/agents/pool/index.d.ts +34 -0
  12. package/dist/agents/pool/index.d.ts.map +1 -0
  13. package/dist/agents/pool/index.js +44 -0
  14. package/dist/agents/pool/index.js.map +1 -0
  15. package/dist/agents/pool/types.d.ts +227 -0
  16. package/dist/agents/pool/types.d.ts.map +1 -0
  17. package/dist/agents/pool/types.js +28 -0
  18. package/dist/agents/pool/types.js.map +1 -0
  19. package/dist/mcp/handlers/agent-spawn.d.ts +71 -5
  20. package/dist/mcp/handlers/agent-spawn.d.ts.map +1 -1
  21. package/dist/mcp/handlers/agent-spawn.js +336 -110
  22. package/dist/mcp/handlers/agent-spawn.js.map +1 -1
  23. package/dist/mcp/handlers/fleet-init.d.ts +24 -0
  24. package/dist/mcp/handlers/fleet-init.d.ts.map +1 -1
  25. package/dist/mcp/handlers/fleet-init.js +56 -4
  26. package/dist/mcp/handlers/fleet-init.js.map +1 -1
  27. package/dist/mcp/server-instructions.d.ts +1 -1
  28. package/dist/mcp/server-instructions.js +1 -1
  29. package/dist/memory/HNSWPatternStore.d.ts.map +1 -1
  30. package/dist/memory/HNSWPatternStore.js.map +1 -1
  31. package/dist/plugins/BasePlugin.d.ts +111 -0
  32. package/dist/plugins/BasePlugin.d.ts.map +1 -0
  33. package/dist/plugins/BasePlugin.js +154 -0
  34. package/dist/plugins/BasePlugin.js.map +1 -0
  35. package/dist/plugins/PluginManager.d.ts +145 -0
  36. package/dist/plugins/PluginManager.d.ts.map +1 -0
  37. package/dist/plugins/PluginManager.js +862 -0
  38. package/dist/plugins/PluginManager.js.map +1 -0
  39. package/dist/plugins/adapters/McpToolsPlugin.d.ts +98 -0
  40. package/dist/plugins/adapters/McpToolsPlugin.d.ts.map +1 -0
  41. package/dist/plugins/adapters/McpToolsPlugin.js +518 -0
  42. package/dist/plugins/adapters/McpToolsPlugin.js.map +1 -0
  43. package/dist/plugins/adapters/PlaywrightPlugin.d.ts +63 -0
  44. package/dist/plugins/adapters/PlaywrightPlugin.d.ts.map +1 -0
  45. package/dist/plugins/adapters/PlaywrightPlugin.js +451 -0
  46. package/dist/plugins/adapters/PlaywrightPlugin.js.map +1 -0
  47. package/dist/plugins/adapters/VitestPlugin.d.ts +74 -0
  48. package/dist/plugins/adapters/VitestPlugin.d.ts.map +1 -0
  49. package/dist/plugins/adapters/VitestPlugin.js +589 -0
  50. package/dist/plugins/adapters/VitestPlugin.js.map +1 -0
  51. package/dist/plugins/adapters/index.d.ts +8 -0
  52. package/dist/plugins/adapters/index.d.ts.map +1 -0
  53. package/dist/plugins/adapters/index.js +17 -0
  54. package/dist/plugins/adapters/index.js.map +1 -0
  55. package/dist/plugins/index.d.ts +32 -0
  56. package/dist/plugins/index.d.ts.map +1 -0
  57. package/dist/plugins/index.js +48 -0
  58. package/dist/plugins/index.js.map +1 -0
  59. package/dist/plugins/types.d.ts +528 -0
  60. package/dist/plugins/types.d.ts.map +1 -0
  61. package/dist/plugins/types.js +61 -0
  62. package/dist/plugins/types.js.map +1 -0
  63. package/package.json +4 -1
@@ -0,0 +1,589 @@
1
+ "use strict";
2
+ /**
3
+ * Vitest Test Framework Plugin
4
+ * Phase 3 B2: Reference Plugin Implementation
5
+ *
6
+ * Provides Vitest test generation, parsing, and execution capabilities.
7
+ * Designed as a Jest alternative with modern ESM support.
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.VitestPlugin = void 0;
11
+ exports.createVitestPlugin = createVitestPlugin;
12
+ const child_process_1 = require("child_process");
13
+ const types_1 = require("../types");
14
+ const BasePlugin_1 = require("../BasePlugin");
15
+ /**
16
+ * Vitest Plugin - Test framework adapter for Vitest
17
+ */
18
+ class VitestPlugin extends BasePlugin_1.BasePlugin {
19
+ constructor() {
20
+ super(...arguments);
21
+ this.metadata = (0, BasePlugin_1.createPluginMetadata)({
22
+ id: '@agentic-qe/vitest-adapter',
23
+ name: 'Vitest Test Adapter',
24
+ version: '1.0.0',
25
+ description: 'Generate, parse, and execute Vitest tests - modern Jest alternative',
26
+ author: 'Agentic QE Team',
27
+ category: types_1.PluginCategory.TEST_FRAMEWORK,
28
+ minAgenticQEVersion: '2.6.0',
29
+ });
30
+ this.filePatterns = [
31
+ '**/*.test.ts',
32
+ '**/*.test.js',
33
+ '**/*.spec.ts',
34
+ '**/*.spec.js',
35
+ '**/__tests__/**/*.ts',
36
+ '**/__tests__/**/*.js',
37
+ ];
38
+ this.frameworkId = 'vitest';
39
+ this.initialized = false;
40
+ }
41
+ async onActivate(context) {
42
+ await super.onActivate(context);
43
+ // Register as test framework service
44
+ this.registerService('testFramework:vitest', this);
45
+ this.initialized = true;
46
+ this.log('info', 'Vitest adapter ready');
47
+ }
48
+ async onDeactivate(context) {
49
+ this.initialized = false;
50
+ await super.onDeactivate(context);
51
+ }
52
+ /**
53
+ * Generate Vitest test from specification
54
+ */
55
+ async generateTest(spec) {
56
+ this.log('debug', 'Generating Vitest test', { sourceFile: spec.sourceFilePath });
57
+ const imports = this.generateImports(spec);
58
+ const testCode = this.generateTestCode(spec);
59
+ const filePath = spec.targetFilePath || this.inferTestFilePath(spec.sourceFilePath);
60
+ return {
61
+ code: `${imports}\n\n${testCode}`,
62
+ filePath,
63
+ imports: ['vitest'],
64
+ dependencies: [
65
+ { name: 'vitest', version: '^1.0.0', dev: true },
66
+ ],
67
+ metadata: {
68
+ testCount: this.countTests(testCode),
69
+ coveredFunctions: this.extractCoveredFunctions(spec.sourceCode),
70
+ coverageEstimate: 0.75,
71
+ },
72
+ };
73
+ }
74
+ /**
75
+ * Parse existing Vitest test file
76
+ */
77
+ async parseTestFile(filePath, content) {
78
+ this.log('debug', 'Parsing Vitest test file', { filePath });
79
+ const suites = [];
80
+ const imports = [];
81
+ const hooks = [];
82
+ const lines = content.split('\n');
83
+ // Extract imports
84
+ for (let i = 0; i < lines.length; i++) {
85
+ const line = lines[i];
86
+ if (line.match(/^import\s/)) {
87
+ imports.push(line);
88
+ }
89
+ }
90
+ // Parse test structure
91
+ const describeRegex = /describe\s*\(\s*['"`](.+?)['"`]/g;
92
+ const testRegex = /(?:test|it)\s*\(\s*['"`](.+?)['"`]/g;
93
+ const beforeAllRegex = /beforeAll\s*\(/g;
94
+ const afterAllRegex = /afterAll\s*\(/g;
95
+ const beforeEachRegex = /beforeEach\s*\(/g;
96
+ const afterEachRegex = /afterEach\s*\(/g;
97
+ let match;
98
+ // Find describes (suites)
99
+ while ((match = describeRegex.exec(content)) !== null) {
100
+ const line = content.substring(0, match.index).split('\n').length;
101
+ suites.push({
102
+ name: match[1],
103
+ tests: [],
104
+ nestedSuites: [],
105
+ hooks: [],
106
+ line,
107
+ });
108
+ }
109
+ // Find tests
110
+ const tests = [];
111
+ while ((match = testRegex.exec(content)) !== null) {
112
+ const line = content.substring(0, match.index).split('\n').length;
113
+ const contextBefore = content.substring(Math.max(0, match.index - 20), match.index);
114
+ const isSkipped = contextBefore.includes('.skip');
115
+ const isOnly = contextBefore.includes('.only');
116
+ const isTodo = contextBefore.includes('.todo');
117
+ tests.push({
118
+ name: match[1],
119
+ line,
120
+ isSkipped: isSkipped || isTodo,
121
+ isOnly,
122
+ });
123
+ }
124
+ // Assign tests to suites or create default suite
125
+ if (suites.length === 0 && tests.length > 0) {
126
+ suites.push({
127
+ name: 'Default Suite',
128
+ tests,
129
+ nestedSuites: [],
130
+ hooks: [],
131
+ line: 1,
132
+ });
133
+ }
134
+ else if (suites.length > 0) {
135
+ // Simplified: assign all tests to first suite
136
+ suites[0].tests = tests;
137
+ }
138
+ // Find hooks
139
+ const hookPatterns = [
140
+ [beforeAllRegex, 'beforeAll'],
141
+ [afterAllRegex, 'afterAll'],
142
+ [beforeEachRegex, 'beforeEach'],
143
+ [afterEachRegex, 'afterEach'],
144
+ ];
145
+ for (const [regex, type] of hookPatterns) {
146
+ while ((match = regex.exec(content)) !== null) {
147
+ const line = content.substring(0, match.index).split('\n').length;
148
+ hooks.push({ type, line });
149
+ }
150
+ }
151
+ return { suites, imports, hooks };
152
+ }
153
+ /**
154
+ * Execute Vitest tests - REAL IMPLEMENTATION
155
+ */
156
+ async executeTests(options) {
157
+ this.log('info', 'Executing Vitest tests', {
158
+ files: options.testFiles.length,
159
+ parallel: options.parallel,
160
+ });
161
+ const startTime = Date.now();
162
+ try {
163
+ // Build command arguments
164
+ const args = ['vitest', 'run', '--reporter=json'];
165
+ if (options.testFiles.length > 0) {
166
+ args.push(...options.testFiles);
167
+ }
168
+ if (options.testNamePattern) {
169
+ args.push('--testNamePattern', options.testNamePattern);
170
+ }
171
+ if (options.parallel === false) {
172
+ args.push('--pool=forks', '--poolOptions.forks.singleFork');
173
+ }
174
+ else if (options.maxWorkers) {
175
+ args.push('--poolOptions.threads.maxThreads', String(options.maxWorkers));
176
+ }
177
+ if (options.coverage?.enabled) {
178
+ args.push('--coverage', '--coverage.reporter=json');
179
+ if (options.coverage.reporters) {
180
+ for (const reporter of options.coverage.reporters) {
181
+ args.push(`--coverage.reporter=${reporter}`);
182
+ }
183
+ }
184
+ }
185
+ if (options.timeout) {
186
+ args.push('--testTimeout', String(options.timeout));
187
+ }
188
+ // Actually execute via child process
189
+ const result = await this.spawnProcess('npx', args, options.env);
190
+ const duration = Date.now() - startTime;
191
+ // Parse JSON output from Vitest
192
+ const { tests, coverage } = this.parseVitestOutput(result.stdout, result.stderr, options.coverage?.enabled);
193
+ return {
194
+ success: result.exitCode === 0,
195
+ tests,
196
+ duration,
197
+ coverage,
198
+ output: result.stdout || result.stderr,
199
+ };
200
+ }
201
+ catch (error) {
202
+ return {
203
+ success: false,
204
+ tests: [],
205
+ duration: Date.now() - startTime,
206
+ output: `Error: ${error instanceof Error ? error.message : String(error)}`,
207
+ };
208
+ }
209
+ }
210
+ /**
211
+ * Spawn a child process and capture output
212
+ */
213
+ spawnProcess(command, args, env) {
214
+ return new Promise((resolve, reject) => {
215
+ const child = (0, child_process_1.spawn)(command, args, {
216
+ env: { ...process.env, ...env },
217
+ shell: true,
218
+ cwd: process.cwd(),
219
+ });
220
+ let stdout = '';
221
+ let stderr = '';
222
+ child.stdout?.on('data', (data) => {
223
+ stdout += data.toString();
224
+ });
225
+ child.stderr?.on('data', (data) => {
226
+ stderr += data.toString();
227
+ });
228
+ child.on('close', (code) => {
229
+ resolve({
230
+ stdout,
231
+ stderr,
232
+ exitCode: code ?? 1,
233
+ });
234
+ });
235
+ child.on('error', (error) => {
236
+ reject(error);
237
+ });
238
+ });
239
+ }
240
+ /**
241
+ * Parse Vitest JSON output into TestResult array and CoverageData
242
+ */
243
+ parseVitestOutput(stdout, stderr, includeCoverage) {
244
+ const tests = [];
245
+ let coverage;
246
+ try {
247
+ // Try to parse JSON output
248
+ const jsonMatch = stdout.match(/\{[\s\S]*"testResults"[\s\S]*\}/);
249
+ if (jsonMatch) {
250
+ const report = JSON.parse(jsonMatch[0]);
251
+ // Extract test results from Vitest JSON format
252
+ for (const file of report.testResults || []) {
253
+ for (const test of file.assertionResults || []) {
254
+ tests.push({
255
+ name: test.title || test.fullName,
256
+ suite: file.name || 'Unknown Suite',
257
+ status: this.mapVitestStatus(test.status),
258
+ duration: test.duration || 0,
259
+ error: test.failureMessages?.length ? {
260
+ message: test.failureMessages[0],
261
+ stack: test.failureMessages.join('\n'),
262
+ } : undefined,
263
+ });
264
+ }
265
+ }
266
+ // Extract coverage if available
267
+ if (includeCoverage && report.coverageMap) {
268
+ coverage = this.parseCoverageMap(report.coverageMap);
269
+ }
270
+ }
271
+ }
272
+ catch {
273
+ // If JSON parsing fails, try to parse text output
274
+ this.log('debug', 'Failed to parse JSON, falling back to text parsing');
275
+ const passedMatch = stdout.match(/(\d+) passed/);
276
+ const failedMatch = stdout.match(/(\d+) failed/);
277
+ const skippedMatch = stdout.match(/(\d+) skipped/);
278
+ if (passedMatch || failedMatch || skippedMatch) {
279
+ const passed = parseInt(passedMatch?.[1] || '0', 10);
280
+ const failed = parseInt(failedMatch?.[1] || '0', 10);
281
+ const skipped = parseInt(skippedMatch?.[1] || '0', 10);
282
+ for (let i = 0; i < passed; i++) {
283
+ tests.push({ name: `Test ${i + 1}`, suite: 'Suite', status: 'passed', duration: 0 });
284
+ }
285
+ for (let i = 0; i < failed; i++) {
286
+ tests.push({ name: `Failed Test ${i + 1}`, suite: 'Suite', status: 'failed', duration: 0 });
287
+ }
288
+ for (let i = 0; i < skipped; i++) {
289
+ tests.push({ name: `Skipped Test ${i + 1}`, suite: 'Suite', status: 'skipped', duration: 0 });
290
+ }
291
+ }
292
+ // Try to parse coverage from text output
293
+ if (includeCoverage) {
294
+ coverage = this.parseCoverageFromText(stdout);
295
+ }
296
+ }
297
+ return { tests, coverage };
298
+ }
299
+ /**
300
+ * Parse coverage map from Vitest JSON output
301
+ */
302
+ parseCoverageMap(coverageMap) {
303
+ let totalLines = 0, coveredLines = 0;
304
+ let totalBranches = 0, coveredBranches = 0;
305
+ let totalFunctions = 0, coveredFunctions = 0;
306
+ let totalStatements = 0, coveredStatements = 0;
307
+ for (const file of Object.values(coverageMap)) {
308
+ // Lines
309
+ const lines = file.s || {};
310
+ for (const count of Object.values(lines)) {
311
+ totalLines++;
312
+ if (count > 0)
313
+ coveredLines++;
314
+ }
315
+ // Branches
316
+ const branches = file.b || {};
317
+ for (const branchCounts of Object.values(branches)) {
318
+ for (const count of branchCounts) {
319
+ totalBranches++;
320
+ if (count > 0)
321
+ coveredBranches++;
322
+ }
323
+ }
324
+ // Functions
325
+ const functions = file.f || {};
326
+ for (const count of Object.values(functions)) {
327
+ totalFunctions++;
328
+ if (count > 0)
329
+ coveredFunctions++;
330
+ }
331
+ // Statements (same as lines in most cases)
332
+ totalStatements = totalLines;
333
+ coveredStatements = coveredLines;
334
+ }
335
+ return {
336
+ lines: {
337
+ total: totalLines,
338
+ covered: coveredLines,
339
+ percentage: totalLines > 0 ? (coveredLines / totalLines) * 100 : 0,
340
+ },
341
+ branches: {
342
+ total: totalBranches,
343
+ covered: coveredBranches,
344
+ percentage: totalBranches > 0 ? (coveredBranches / totalBranches) * 100 : 0,
345
+ },
346
+ functions: {
347
+ total: totalFunctions,
348
+ covered: coveredFunctions,
349
+ percentage: totalFunctions > 0 ? (coveredFunctions / totalFunctions) * 100 : 0,
350
+ },
351
+ statements: {
352
+ total: totalStatements,
353
+ covered: coveredStatements,
354
+ percentage: totalStatements > 0 ? (coveredStatements / totalStatements) * 100 : 0,
355
+ },
356
+ };
357
+ }
358
+ /**
359
+ * Parse coverage from text output (fallback)
360
+ */
361
+ parseCoverageFromText(stdout) {
362
+ // Try to match coverage summary lines like "All files | 80.5 | 75.2 | 90.1 | 80.5"
363
+ const coverageMatch = stdout.match(/All files\s*\|\s*([\d.]+)\s*\|\s*([\d.]+)\s*\|\s*([\d.]+)\s*\|\s*([\d.]+)/);
364
+ if (coverageMatch) {
365
+ const [, stmts, branch, funcs, lines] = coverageMatch;
366
+ return {
367
+ statements: { total: 100, covered: parseFloat(stmts), percentage: parseFloat(stmts) },
368
+ branches: { total: 100, covered: parseFloat(branch), percentage: parseFloat(branch) },
369
+ functions: { total: 100, covered: parseFloat(funcs), percentage: parseFloat(funcs) },
370
+ lines: { total: 100, covered: parseFloat(lines), percentage: parseFloat(lines) },
371
+ };
372
+ }
373
+ return undefined;
374
+ }
375
+ /**
376
+ * Map Vitest status to our status type
377
+ */
378
+ mapVitestStatus(status) {
379
+ switch (status) {
380
+ case 'passed':
381
+ return 'passed';
382
+ case 'failed':
383
+ return 'failed';
384
+ case 'skipped':
385
+ case 'todo':
386
+ return 'skipped';
387
+ case 'pending':
388
+ default:
389
+ return 'pending';
390
+ }
391
+ }
392
+ /**
393
+ * Get Vitest framework configuration
394
+ */
395
+ getFrameworkConfig() {
396
+ return {
397
+ configFileName: 'vitest.config.ts',
398
+ defaultTestDir: 'tests',
399
+ configTemplate: this.getConfigTemplate(),
400
+ dependencies: [
401
+ { name: 'vitest', version: '^1.0.0', dev: true },
402
+ { name: '@vitest/coverage-v8', version: '^1.0.0', dev: true },
403
+ ],
404
+ };
405
+ }
406
+ // === Private Methods ===
407
+ generateImports(spec) {
408
+ const imports = [
409
+ "import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest';",
410
+ ];
411
+ // Add source import
412
+ const sourceModule = this.extractModuleName(spec.sourceFilePath);
413
+ if (sourceModule) {
414
+ const relativePath = this.getRelativeImportPath(spec.targetFilePath || this.inferTestFilePath(spec.sourceFilePath), spec.sourceFilePath);
415
+ imports.push(`import { ${sourceModule} } from '${relativePath}';`);
416
+ }
417
+ return imports.join('\n');
418
+ }
419
+ generateTestCode(spec) {
420
+ const functionNames = this.extractFunctionNames(spec.sourceCode);
421
+ const className = this.extractClassName(spec.sourceCode);
422
+ const tests = [];
423
+ if (spec.testType === 'unit') {
424
+ tests.push(this.generateUnitTests(spec, className, functionNames));
425
+ }
426
+ else if (spec.testType === 'integration') {
427
+ tests.push(this.generateIntegrationTests(spec, className, functionNames));
428
+ }
429
+ else {
430
+ tests.push(this.generateGenericTests(spec, className, functionNames));
431
+ }
432
+ const suiteName = className || this.extractModuleName(spec.sourceFilePath) || 'Module';
433
+ return `describe('${suiteName}', () => {\n${tests.join('\n\n')}\n});`;
434
+ }
435
+ generateUnitTests(spec, className, functionNames) {
436
+ const tests = [];
437
+ // Generate tests for each function
438
+ for (const fn of functionNames) {
439
+ tests.push(` describe('${fn}', () => {
440
+ it('should return expected result for valid input', () => {
441
+ // Arrange
442
+ const input = {};
443
+
444
+ // Act
445
+ const result = ${fn}(input);
446
+
447
+ // Assert
448
+ expect(result).toBeDefined();
449
+ });
450
+
451
+ it('should handle edge cases', () => {
452
+ // Test edge cases
453
+ expect(() => ${fn}(null)).not.toThrow();
454
+ });
455
+
456
+ it('should throw for invalid input', () => {
457
+ // Test error handling
458
+ expect(() => ${fn}(undefined)).toThrow();
459
+ });
460
+ });`);
461
+ }
462
+ if (tests.length === 0) {
463
+ tests.push(` it('should be implemented', () => {
464
+ expect(true).toBe(true);
465
+ });`);
466
+ }
467
+ return tests.join('\n\n');
468
+ }
469
+ generateIntegrationTests(spec, className, functionNames) {
470
+ const tests = [];
471
+ const name = className || 'Module';
472
+ tests.push(` describe('integration', () => {
473
+ beforeEach(() => {
474
+ // Setup before each test
475
+ });
476
+
477
+ afterEach(() => {
478
+ // Cleanup after each test
479
+ });
480
+
481
+ it('should integrate components correctly', async () => {
482
+ // Integration test
483
+ expect(true).toBe(true);
484
+ });
485
+
486
+ it('should handle async operations', async () => {
487
+ // Async integration test
488
+ await expect(Promise.resolve(true)).resolves.toBe(true);
489
+ });
490
+ });`);
491
+ return tests.join('\n\n');
492
+ }
493
+ generateGenericTests(spec, className, functionNames) {
494
+ const tests = [];
495
+ for (const fn of functionNames.slice(0, 5)) {
496
+ tests.push(` it('${fn} should work correctly', () => {
497
+ // Test ${fn}
498
+ expect(true).toBe(true);
499
+ });`);
500
+ }
501
+ if (tests.length === 0) {
502
+ tests.push(` it('should pass', () => {
503
+ expect(true).toBe(true);
504
+ });`);
505
+ }
506
+ return tests.join('\n\n');
507
+ }
508
+ extractFunctionNames(sourceCode) {
509
+ const patterns = [
510
+ /export\s+(?:async\s+)?function\s+(\w+)/g,
511
+ /export\s+const\s+(\w+)\s*=\s*(?:async\s*)?\(/g,
512
+ /(?:public|private|protected)?\s*(?:async\s+)?(\w+)\s*\([^)]*\)\s*(?::\s*\w+)?\s*{/g,
513
+ ];
514
+ const names = new Set();
515
+ for (const pattern of patterns) {
516
+ let match;
517
+ while ((match = pattern.exec(sourceCode)) !== null) {
518
+ const name = match[1];
519
+ if (name && !['constructor', 'if', 'for', 'while', 'switch', 'catch'].includes(name)) {
520
+ names.add(name);
521
+ }
522
+ }
523
+ }
524
+ return Array.from(names);
525
+ }
526
+ extractClassName(sourceCode) {
527
+ const match = sourceCode.match(/(?:export\s+)?class\s+(\w+)/);
528
+ return match ? match[1] : null;
529
+ }
530
+ extractModuleName(filePath) {
531
+ const fileName = filePath.replace(/^.*\//, '').replace(/\.(ts|js|tsx|jsx)$/, '');
532
+ return fileName.charAt(0).toUpperCase() + fileName.slice(1);
533
+ }
534
+ extractCoveredFunctions(sourceCode) {
535
+ return this.extractFunctionNames(sourceCode);
536
+ }
537
+ countTests(testCode) {
538
+ const matches = testCode.match(/it\s*\(/g);
539
+ return matches ? matches.length : 0;
540
+ }
541
+ inferTestFilePath(sourceFilePath) {
542
+ const dir = sourceFilePath.replace(/\/[^/]+$/, '');
543
+ const fileName = sourceFilePath.replace(/^.*\//, '').replace(/\.(ts|js|tsx|jsx)$/, '');
544
+ return `${dir}/__tests__/${fileName}.test.ts`;
545
+ }
546
+ getRelativeImportPath(fromPath, toPath) {
547
+ // Simplified relative path calculation
548
+ const fromDir = fromPath.replace(/\/[^/]+$/, '');
549
+ const toDir = toPath.replace(/\/[^/]+$/, '');
550
+ const fileName = toPath.replace(/^.*\//, '').replace(/\.(ts|js|tsx|jsx)$/, '');
551
+ if (fromDir === toDir) {
552
+ return `./${fileName}`;
553
+ }
554
+ // Go up one level from __tests__
555
+ return `../${fileName}`;
556
+ }
557
+ getConfigTemplate() {
558
+ return `import { defineConfig } from 'vitest/config';
559
+
560
+ export default defineConfig({
561
+ test: {
562
+ globals: true,
563
+ environment: 'node',
564
+ include: ['**/*.{test,spec}.{js,ts}'],
565
+ coverage: {
566
+ provider: 'v8',
567
+ reporter: ['text', 'json', 'html'],
568
+ exclude: [
569
+ 'node_modules/**',
570
+ 'dist/**',
571
+ '**/*.d.ts',
572
+ '**/*.test.ts',
573
+ '**/*.spec.ts',
574
+ ],
575
+ },
576
+ testTimeout: 10000,
577
+ hookTimeout: 10000,
578
+ },
579
+ });`;
580
+ }
581
+ }
582
+ exports.VitestPlugin = VitestPlugin;
583
+ /**
584
+ * Factory function for plugin registration
585
+ */
586
+ function createVitestPlugin() {
587
+ return new VitestPlugin();
588
+ }
589
+ //# sourceMappingURL=VitestPlugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VitestPlugin.js","sourceRoot":"","sources":["../../../src/plugins/adapters/VitestPlugin.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AA4rBH,gDAEC;AA5rBD,iDAAsC;AACtC,oCAgBkB;AAClB,8CAAiE;AAEjE;;GAEG;AACH,MAAa,YAAa,SAAQ,uBAAU;IAA5C;;QACW,aAAQ,GAAmB,IAAA,iCAAoB,EAAC;YACvD,EAAE,EAAE,4BAA4B;YAChC,IAAI,EAAE,qBAAqB;YAC3B,OAAO,EAAE,OAAO;YAChB,WAAW,EAAE,qEAAqE;YAClF,MAAM,EAAE,iBAAiB;YACzB,QAAQ,EAAE,sBAAc,CAAC,cAAc;YACvC,mBAAmB,EAAE,OAAO;SAC7B,CAAC,CAAC;QAEM,iBAAY,GAAG;YACtB,cAAc;YACd,cAAc;YACd,cAAc;YACd,cAAc;YACd,sBAAsB;YACtB,sBAAsB;SACvB,CAAC;QAEO,gBAAW,GAAG,QAAQ,CAAC;QAExB,gBAAW,GAAG,KAAK,CAAC;IAwoB9B,CAAC;IAtoBC,KAAK,CAAC,UAAU,CAAC,OAAsB;QACrC,MAAM,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;QAEhC,qCAAqC;QACrC,IAAI,CAAC,eAAe,CAAC,sBAAsB,EAAE,IAAI,CAAC,CAAC;QAEnD,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;QACxB,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,sBAAsB,CAAC,CAAC;IAC3C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QAAgB,EAAE,MAAc;QAC5D,uCAAuC;QACvC,MAAM,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;QACjD,MAAM,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;QAC7C,MAAM,QAAQ,GAAG,MAAM,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,oBAAoB,EAAE,EAAE,CAAC,CAAC;QAE/E,IAAI,OAAO,KAAK,KAAK,EAAE,CAAC;YACtB,OAAO,KAAK,QAAQ,EAAE,CAAC;QACzB,CAAC;QAED,iCAAiC;QACjC,OAAO,MAAM,QAAQ,EAAE,CAAC;IAC1B,CAAC;IAEO,iBAAiB;QACvB,OAAO;;;;;;;;;;;;;;;;;;;;;IAqBP,CAAC;IACH,CAAC;CACF;AA9pBD,oCA8pBC;AAED;;GAEG;AACH,SAAgB,kBAAkB;IAChC,OAAO,IAAI,YAAY,EAAE,CAAC;AAC5B,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Plugin Adapters Index
3
+ * Phase 3 B2: Reference Plugin Implementations
4
+ */
5
+ export { PlaywrightPlugin, createPlaywrightPlugin } from './PlaywrightPlugin';
6
+ export { VitestPlugin, createVitestPlugin } from './VitestPlugin';
7
+ export { McpToolsPlugin, createMcpToolsPlugin, McpToolCapability } from './McpToolsPlugin';
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/adapters/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC9E,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC"}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ /**
3
+ * Plugin Adapters Index
4
+ * Phase 3 B2: Reference Plugin Implementations
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.createMcpToolsPlugin = exports.McpToolsPlugin = exports.createVitestPlugin = exports.VitestPlugin = exports.createPlaywrightPlugin = exports.PlaywrightPlugin = void 0;
8
+ var PlaywrightPlugin_1 = require("./PlaywrightPlugin");
9
+ Object.defineProperty(exports, "PlaywrightPlugin", { enumerable: true, get: function () { return PlaywrightPlugin_1.PlaywrightPlugin; } });
10
+ Object.defineProperty(exports, "createPlaywrightPlugin", { enumerable: true, get: function () { return PlaywrightPlugin_1.createPlaywrightPlugin; } });
11
+ var VitestPlugin_1 = require("./VitestPlugin");
12
+ Object.defineProperty(exports, "VitestPlugin", { enumerable: true, get: function () { return VitestPlugin_1.VitestPlugin; } });
13
+ Object.defineProperty(exports, "createVitestPlugin", { enumerable: true, get: function () { return VitestPlugin_1.createVitestPlugin; } });
14
+ var McpToolsPlugin_1 = require("./McpToolsPlugin");
15
+ Object.defineProperty(exports, "McpToolsPlugin", { enumerable: true, get: function () { return McpToolsPlugin_1.McpToolsPlugin; } });
16
+ Object.defineProperty(exports, "createMcpToolsPlugin", { enumerable: true, get: function () { return McpToolsPlugin_1.createMcpToolsPlugin; } });
17
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/plugins/adapters/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,uDAA8E;AAArE,oHAAA,gBAAgB,OAAA;AAAE,0HAAA,sBAAsB,OAAA;AACjD,+CAAkE;AAAzD,4GAAA,YAAY,OAAA;AAAE,kHAAA,kBAAkB,OAAA;AACzC,mDAA2F;AAAlF,gHAAA,cAAc,OAAA;AAAE,sHAAA,oBAAoB,OAAA"}