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.
- package/CHANGELOG.md +85 -0
- package/README.md +1 -1
- package/dist/agents/pool/AgentPool.d.ts +112 -0
- package/dist/agents/pool/AgentPool.d.ts.map +1 -0
- package/dist/agents/pool/AgentPool.js +573 -0
- package/dist/agents/pool/AgentPool.js.map +1 -0
- package/dist/agents/pool/QEAgentPoolFactory.d.ts +118 -0
- package/dist/agents/pool/QEAgentPoolFactory.d.ts.map +1 -0
- package/dist/agents/pool/QEAgentPoolFactory.js +251 -0
- package/dist/agents/pool/QEAgentPoolFactory.js.map +1 -0
- package/dist/agents/pool/index.d.ts +34 -0
- package/dist/agents/pool/index.d.ts.map +1 -0
- package/dist/agents/pool/index.js +44 -0
- package/dist/agents/pool/index.js.map +1 -0
- package/dist/agents/pool/types.d.ts +227 -0
- package/dist/agents/pool/types.d.ts.map +1 -0
- package/dist/agents/pool/types.js +28 -0
- package/dist/agents/pool/types.js.map +1 -0
- package/dist/mcp/handlers/agent-spawn.d.ts +71 -5
- package/dist/mcp/handlers/agent-spawn.d.ts.map +1 -1
- package/dist/mcp/handlers/agent-spawn.js +336 -110
- package/dist/mcp/handlers/agent-spawn.js.map +1 -1
- package/dist/mcp/handlers/fleet-init.d.ts +24 -0
- package/dist/mcp/handlers/fleet-init.d.ts.map +1 -1
- package/dist/mcp/handlers/fleet-init.js +56 -4
- package/dist/mcp/handlers/fleet-init.js.map +1 -1
- package/dist/mcp/server-instructions.d.ts +1 -1
- package/dist/mcp/server-instructions.js +1 -1
- package/dist/memory/HNSWPatternStore.d.ts.map +1 -1
- package/dist/memory/HNSWPatternStore.js.map +1 -1
- package/dist/plugins/BasePlugin.d.ts +111 -0
- package/dist/plugins/BasePlugin.d.ts.map +1 -0
- package/dist/plugins/BasePlugin.js +154 -0
- package/dist/plugins/BasePlugin.js.map +1 -0
- package/dist/plugins/PluginManager.d.ts +145 -0
- package/dist/plugins/PluginManager.d.ts.map +1 -0
- package/dist/plugins/PluginManager.js +862 -0
- package/dist/plugins/PluginManager.js.map +1 -0
- package/dist/plugins/adapters/McpToolsPlugin.d.ts +98 -0
- package/dist/plugins/adapters/McpToolsPlugin.d.ts.map +1 -0
- package/dist/plugins/adapters/McpToolsPlugin.js +518 -0
- package/dist/plugins/adapters/McpToolsPlugin.js.map +1 -0
- package/dist/plugins/adapters/PlaywrightPlugin.d.ts +63 -0
- package/dist/plugins/adapters/PlaywrightPlugin.d.ts.map +1 -0
- package/dist/plugins/adapters/PlaywrightPlugin.js +451 -0
- package/dist/plugins/adapters/PlaywrightPlugin.js.map +1 -0
- package/dist/plugins/adapters/VitestPlugin.d.ts +74 -0
- package/dist/plugins/adapters/VitestPlugin.d.ts.map +1 -0
- package/dist/plugins/adapters/VitestPlugin.js +589 -0
- package/dist/plugins/adapters/VitestPlugin.js.map +1 -0
- package/dist/plugins/adapters/index.d.ts +8 -0
- package/dist/plugins/adapters/index.d.ts.map +1 -0
- package/dist/plugins/adapters/index.js +17 -0
- package/dist/plugins/adapters/index.js.map +1 -0
- package/dist/plugins/index.d.ts +32 -0
- package/dist/plugins/index.d.ts.map +1 -0
- package/dist/plugins/index.js +48 -0
- package/dist/plugins/index.js.map +1 -0
- package/dist/plugins/types.d.ts +528 -0
- package/dist/plugins/types.d.ts.map +1 -0
- package/dist/plugins/types.js +61 -0
- package/dist/plugins/types.js.map +1 -0
- package/package.json +4 -1
|
@@ -0,0 +1,518 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* MCP Tools Integration Plugin
|
|
4
|
+
* Phase 3 B2: Reference Plugin Implementation
|
|
5
|
+
*
|
|
6
|
+
* Provides integration with the agentic-qe MCP server tools.
|
|
7
|
+
* Enables plugin-based access to test generation, execution, and memory services.
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.McpToolsPlugin = void 0;
|
|
11
|
+
exports.createMcpToolsPlugin = createMcpToolsPlugin;
|
|
12
|
+
const types_1 = require("../types");
|
|
13
|
+
const BasePlugin_1 = require("../BasePlugin");
|
|
14
|
+
/**
|
|
15
|
+
* Default MCP server configuration
|
|
16
|
+
*/
|
|
17
|
+
const DEFAULT_MCP_CONFIG = {
|
|
18
|
+
endpoint: process.env.MCP_SERVER_URL || 'http://localhost:3001/mcp',
|
|
19
|
+
timeout: 30000,
|
|
20
|
+
verifyOnConnect: true,
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* MCP Tools Plugin - Integration with agentic-qe MCP server
|
|
24
|
+
*/
|
|
25
|
+
class McpToolsPlugin extends BasePlugin_1.BasePlugin {
|
|
26
|
+
constructor() {
|
|
27
|
+
super(...arguments);
|
|
28
|
+
this.metadata = (0, BasePlugin_1.createPluginMetadata)({
|
|
29
|
+
id: '@agentic-qe/mcp-tools',
|
|
30
|
+
name: 'MCP Tools Integration',
|
|
31
|
+
version: '1.0.0',
|
|
32
|
+
description: 'Access agentic-qe MCP server tools through the plugin system',
|
|
33
|
+
author: 'Agentic QE Team',
|
|
34
|
+
category: types_1.PluginCategory.MCP_TOOLS,
|
|
35
|
+
minAgenticQEVersion: '2.6.0',
|
|
36
|
+
});
|
|
37
|
+
this.initialized = false;
|
|
38
|
+
this.cachedCapabilities = [];
|
|
39
|
+
this.mcpConfig = DEFAULT_MCP_CONFIG;
|
|
40
|
+
this.requestId = 0;
|
|
41
|
+
this.serverConnected = false;
|
|
42
|
+
}
|
|
43
|
+
async onActivate(context) {
|
|
44
|
+
await super.onActivate(context);
|
|
45
|
+
// Load MCP config from plugin config if available
|
|
46
|
+
const configEndpoint = context.config.get('mcp.endpoint');
|
|
47
|
+
const configTimeout = context.config.get('mcp.timeout');
|
|
48
|
+
const configApiKey = context.config.get('mcp.apiKey');
|
|
49
|
+
if (configEndpoint) {
|
|
50
|
+
this.mcpConfig.endpoint = configEndpoint;
|
|
51
|
+
}
|
|
52
|
+
if (configTimeout) {
|
|
53
|
+
this.mcpConfig.timeout = configTimeout;
|
|
54
|
+
}
|
|
55
|
+
if (configApiKey) {
|
|
56
|
+
this.mcpConfig.apiKey = configApiKey;
|
|
57
|
+
}
|
|
58
|
+
// Register as MCP tools service
|
|
59
|
+
this.registerService('mcpTools:agentic-qe', this);
|
|
60
|
+
// Try to connect to MCP server and discover capabilities
|
|
61
|
+
try {
|
|
62
|
+
await this.connectToServer();
|
|
63
|
+
this.cachedCapabilities = await this.discoverCapabilitiesFromServer();
|
|
64
|
+
this.serverConnected = true;
|
|
65
|
+
this.log('info', `Connected to MCP server with ${this.cachedCapabilities.length} capabilities`);
|
|
66
|
+
}
|
|
67
|
+
catch (error) {
|
|
68
|
+
// Fall back to static capabilities if server not available
|
|
69
|
+
this.log('warn', 'MCP server not available, using static capabilities', error);
|
|
70
|
+
this.cachedCapabilities = this.getStaticCapabilities();
|
|
71
|
+
this.serverConnected = false;
|
|
72
|
+
}
|
|
73
|
+
this.initialized = true;
|
|
74
|
+
this.log('info', `MCP Tools plugin ready with ${this.cachedCapabilities.length} capabilities`);
|
|
75
|
+
}
|
|
76
|
+
async onDeactivate(context) {
|
|
77
|
+
this.initialized = false;
|
|
78
|
+
this.cachedCapabilities = [];
|
|
79
|
+
await super.onDeactivate(context);
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Get all available MCP tool capabilities
|
|
83
|
+
*/
|
|
84
|
+
getCapabilities() {
|
|
85
|
+
return [...this.cachedCapabilities];
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Check if a specific tool is available
|
|
89
|
+
*/
|
|
90
|
+
hasCapability(toolName) {
|
|
91
|
+
return this.cachedCapabilities.some(c => c.name === toolName && c.available);
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Get capability by name
|
|
95
|
+
*/
|
|
96
|
+
getCapability(toolName) {
|
|
97
|
+
return this.cachedCapabilities.find(c => c.name === toolName);
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Check if connected to MCP server
|
|
101
|
+
*/
|
|
102
|
+
isConnected() {
|
|
103
|
+
return this.serverConnected;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Invoke an MCP tool via JSON-RPC
|
|
107
|
+
*/
|
|
108
|
+
async invokeTool(toolName, params) {
|
|
109
|
+
this.log('debug', `Invoking MCP tool: ${toolName}`, params);
|
|
110
|
+
const capability = this.getCapability(toolName);
|
|
111
|
+
if (!capability) {
|
|
112
|
+
throw new Error(`MCP tool not found: ${toolName}`);
|
|
113
|
+
}
|
|
114
|
+
if (!capability.available) {
|
|
115
|
+
throw new Error(`MCP tool not available: ${toolName}`);
|
|
116
|
+
}
|
|
117
|
+
// Use real MCP server if connected, otherwise fall back to stub
|
|
118
|
+
if (this.serverConnected) {
|
|
119
|
+
return this.executeToolViaServer(toolName, params);
|
|
120
|
+
}
|
|
121
|
+
else {
|
|
122
|
+
this.log('warn', `MCP server not connected, using stub for ${toolName}`);
|
|
123
|
+
return this.executeToolStub(toolName, params);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Execute tool via real MCP server connection
|
|
128
|
+
*/
|
|
129
|
+
async executeToolViaServer(toolName, params) {
|
|
130
|
+
const request = {
|
|
131
|
+
jsonrpc: '2.0',
|
|
132
|
+
id: ++this.requestId,
|
|
133
|
+
method: 'tools/call',
|
|
134
|
+
params: {
|
|
135
|
+
name: toolName,
|
|
136
|
+
arguments: params,
|
|
137
|
+
},
|
|
138
|
+
};
|
|
139
|
+
try {
|
|
140
|
+
const response = await this.sendRequest(request);
|
|
141
|
+
if (response.error) {
|
|
142
|
+
throw new Error(`MCP error ${response.error.code}: ${response.error.message}`);
|
|
143
|
+
}
|
|
144
|
+
return response.result;
|
|
145
|
+
}
|
|
146
|
+
catch (error) {
|
|
147
|
+
this.log('error', `Failed to execute tool ${toolName}`, error);
|
|
148
|
+
// If server connection failed, mark as disconnected and retry with stub
|
|
149
|
+
if (error instanceof Error && error.message.includes('fetch')) {
|
|
150
|
+
this.serverConnected = false;
|
|
151
|
+
this.log('warn', 'MCP server connection lost, falling back to stub');
|
|
152
|
+
return this.executeToolStub(toolName, params);
|
|
153
|
+
}
|
|
154
|
+
throw error;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Send JSON-RPC request to MCP server
|
|
159
|
+
*/
|
|
160
|
+
async sendRequest(request) {
|
|
161
|
+
const controller = new AbortController();
|
|
162
|
+
const timeoutId = setTimeout(() => controller.abort(), this.mcpConfig.timeout);
|
|
163
|
+
try {
|
|
164
|
+
const headers = {
|
|
165
|
+
'Content-Type': 'application/json',
|
|
166
|
+
};
|
|
167
|
+
if (this.mcpConfig.apiKey) {
|
|
168
|
+
headers['Authorization'] = `Bearer ${this.mcpConfig.apiKey}`;
|
|
169
|
+
}
|
|
170
|
+
const response = await fetch(this.mcpConfig.endpoint, {
|
|
171
|
+
method: 'POST',
|
|
172
|
+
headers,
|
|
173
|
+
body: JSON.stringify(request),
|
|
174
|
+
signal: controller.signal,
|
|
175
|
+
});
|
|
176
|
+
if (!response.ok) {
|
|
177
|
+
throw new Error(`MCP server error: ${response.status} ${response.statusText}`);
|
|
178
|
+
}
|
|
179
|
+
const jsonResponse = await response.json();
|
|
180
|
+
return jsonResponse;
|
|
181
|
+
}
|
|
182
|
+
finally {
|
|
183
|
+
clearTimeout(timeoutId);
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Connect to MCP server and verify connection
|
|
188
|
+
*/
|
|
189
|
+
async connectToServer() {
|
|
190
|
+
if (!this.mcpConfig.verifyOnConnect) {
|
|
191
|
+
return;
|
|
192
|
+
}
|
|
193
|
+
const request = {
|
|
194
|
+
jsonrpc: '2.0',
|
|
195
|
+
id: ++this.requestId,
|
|
196
|
+
method: 'initialize',
|
|
197
|
+
params: {
|
|
198
|
+
protocolVersion: '2024-11-05',
|
|
199
|
+
capabilities: {},
|
|
200
|
+
clientInfo: {
|
|
201
|
+
name: 'agentic-qe-plugin',
|
|
202
|
+
version: this.metadata.version,
|
|
203
|
+
},
|
|
204
|
+
},
|
|
205
|
+
};
|
|
206
|
+
const response = await this.sendRequest(request);
|
|
207
|
+
if (response.error) {
|
|
208
|
+
throw new Error(`MCP initialization failed: ${response.error.message}`);
|
|
209
|
+
}
|
|
210
|
+
this.log('debug', 'MCP server connection verified', response.result);
|
|
211
|
+
}
|
|
212
|
+
/**
|
|
213
|
+
* Discover capabilities from MCP server
|
|
214
|
+
*/
|
|
215
|
+
async discoverCapabilitiesFromServer() {
|
|
216
|
+
const request = {
|
|
217
|
+
jsonrpc: '2.0',
|
|
218
|
+
id: ++this.requestId,
|
|
219
|
+
method: 'tools/list',
|
|
220
|
+
};
|
|
221
|
+
const response = await this.sendRequest(request);
|
|
222
|
+
if (response.error) {
|
|
223
|
+
throw new Error(`Failed to list tools: ${response.error.message}`);
|
|
224
|
+
}
|
|
225
|
+
const tools = response.result?.tools || [];
|
|
226
|
+
return tools.map(tool => ({
|
|
227
|
+
name: tool.name,
|
|
228
|
+
description: tool.description,
|
|
229
|
+
inputSchema: tool.inputSchema,
|
|
230
|
+
available: true,
|
|
231
|
+
}));
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* Get tools by category
|
|
235
|
+
*/
|
|
236
|
+
getToolsByCategory(category) {
|
|
237
|
+
return this.cachedCapabilities.filter(c => c.name.startsWith(`mcp__agentic_qe__${category}`));
|
|
238
|
+
}
|
|
239
|
+
// === Private Methods ===
|
|
240
|
+
/**
|
|
241
|
+
* Get static capability definitions (fallback when server unavailable)
|
|
242
|
+
*/
|
|
243
|
+
getStaticCapabilities() {
|
|
244
|
+
// These are the known MCP tools exposed by agentic-qe
|
|
245
|
+
return [
|
|
246
|
+
// Fleet Management
|
|
247
|
+
{
|
|
248
|
+
name: 'mcp__agentic_qe__fleet_init',
|
|
249
|
+
description: 'Initialize a QE fleet with specified topology and configuration',
|
|
250
|
+
inputSchema: {
|
|
251
|
+
type: 'object',
|
|
252
|
+
properties: {
|
|
253
|
+
config: {
|
|
254
|
+
type: 'object',
|
|
255
|
+
properties: {
|
|
256
|
+
topology: { enum: ['hierarchical', 'mesh', 'ring', 'adaptive'] },
|
|
257
|
+
maxAgents: { type: 'number', minimum: 5, maximum: 50 },
|
|
258
|
+
frameworks: { type: 'array', items: { type: 'string' } },
|
|
259
|
+
testingFocus: { type: 'array', items: { type: 'string' } },
|
|
260
|
+
},
|
|
261
|
+
required: ['topology', 'maxAgents'],
|
|
262
|
+
},
|
|
263
|
+
},
|
|
264
|
+
required: ['config'],
|
|
265
|
+
},
|
|
266
|
+
available: true,
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
name: 'mcp__agentic_qe__agent_spawn',
|
|
270
|
+
description: 'Spawn a specialized QE agent with specific capabilities',
|
|
271
|
+
inputSchema: {
|
|
272
|
+
type: 'object',
|
|
273
|
+
properties: {
|
|
274
|
+
spec: {
|
|
275
|
+
type: 'object',
|
|
276
|
+
properties: {
|
|
277
|
+
type: { enum: ['test-generator', 'coverage-analyzer', 'quality-gate', 'performance-tester', 'security-scanner', 'chaos-engineer', 'visual-tester'] },
|
|
278
|
+
capabilities: { type: 'array', items: { type: 'string' } },
|
|
279
|
+
name: { type: 'string' },
|
|
280
|
+
},
|
|
281
|
+
required: ['type', 'capabilities'],
|
|
282
|
+
},
|
|
283
|
+
},
|
|
284
|
+
required: ['spec'],
|
|
285
|
+
},
|
|
286
|
+
available: true,
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
name: 'mcp__agentic_qe__fleet_status',
|
|
290
|
+
description: 'Get QE fleet and agent status',
|
|
291
|
+
inputSchema: {
|
|
292
|
+
type: 'object',
|
|
293
|
+
properties: {
|
|
294
|
+
fleetId: { type: 'string' },
|
|
295
|
+
includeMetrics: { type: 'boolean', default: true },
|
|
296
|
+
includeAgentDetails: { type: 'boolean', default: false },
|
|
297
|
+
},
|
|
298
|
+
},
|
|
299
|
+
available: true,
|
|
300
|
+
},
|
|
301
|
+
// Test Generation
|
|
302
|
+
{
|
|
303
|
+
name: 'mcp__agentic_qe__test_generate_enhanced',
|
|
304
|
+
description: 'AI test generation with pattern recognition and anti-pattern detection',
|
|
305
|
+
inputSchema: {
|
|
306
|
+
type: 'object',
|
|
307
|
+
properties: {
|
|
308
|
+
sourceCode: { type: 'string', description: 'Source code to analyze' },
|
|
309
|
+
language: { enum: ['javascript', 'typescript', 'python', 'java', 'go'] },
|
|
310
|
+
testType: { enum: ['unit', 'integration', 'e2e', 'property-based', 'mutation'] },
|
|
311
|
+
coverageGoal: { type: 'number', minimum: 0, maximum: 100 },
|
|
312
|
+
aiEnhancement: { type: 'boolean', default: true },
|
|
313
|
+
detectAntiPatterns: { type: 'boolean', default: false },
|
|
314
|
+
},
|
|
315
|
+
required: ['sourceCode', 'language', 'testType'],
|
|
316
|
+
},
|
|
317
|
+
available: true,
|
|
318
|
+
},
|
|
319
|
+
// Test Execution
|
|
320
|
+
{
|
|
321
|
+
name: 'mcp__agentic_qe__test_execute',
|
|
322
|
+
description: 'Execute test suites with parallel orchestration',
|
|
323
|
+
inputSchema: {
|
|
324
|
+
type: 'object',
|
|
325
|
+
properties: {
|
|
326
|
+
spec: {
|
|
327
|
+
type: 'object',
|
|
328
|
+
properties: {
|
|
329
|
+
testSuites: { type: 'array', items: { type: 'string' } },
|
|
330
|
+
parallelExecution: { type: 'boolean', default: true },
|
|
331
|
+
environments: { type: 'array', items: { type: 'string' } },
|
|
332
|
+
retryCount: { type: 'number', default: 3, minimum: 0, maximum: 5 },
|
|
333
|
+
timeoutSeconds: { type: 'number', default: 300, minimum: 10 },
|
|
334
|
+
reportFormat: { enum: ['junit', 'tap', 'json', 'html'], default: 'json' },
|
|
335
|
+
},
|
|
336
|
+
required: ['testSuites'],
|
|
337
|
+
},
|
|
338
|
+
},
|
|
339
|
+
required: ['spec'],
|
|
340
|
+
},
|
|
341
|
+
available: true,
|
|
342
|
+
},
|
|
343
|
+
{
|
|
344
|
+
name: 'mcp__agentic_qe__test_execute_parallel',
|
|
345
|
+
description: 'Execute tests with workers, retry, and load balancing',
|
|
346
|
+
inputSchema: {
|
|
347
|
+
type: 'object',
|
|
348
|
+
properties: {
|
|
349
|
+
testFiles: { type: 'array', items: { type: 'string' } },
|
|
350
|
+
parallelism: { type: 'number', default: 4, minimum: 1, maximum: 16 },
|
|
351
|
+
retryFailures: { type: 'boolean', default: true },
|
|
352
|
+
maxRetries: { type: 'number', default: 3 },
|
|
353
|
+
loadBalancing: { enum: ['round-robin', 'least-loaded', 'random'], default: 'round-robin' },
|
|
354
|
+
collectCoverage: { type: 'boolean', default: false },
|
|
355
|
+
},
|
|
356
|
+
required: ['testFiles'],
|
|
357
|
+
},
|
|
358
|
+
available: true,
|
|
359
|
+
},
|
|
360
|
+
// Memory Management
|
|
361
|
+
{
|
|
362
|
+
name: 'mcp__agentic_qe__memory_store',
|
|
363
|
+
description: 'Store QE data with TTL and namespacing for coordination',
|
|
364
|
+
inputSchema: {
|
|
365
|
+
type: 'object',
|
|
366
|
+
properties: {
|
|
367
|
+
key: { type: 'string' },
|
|
368
|
+
value: { description: 'Value to store (any type)' },
|
|
369
|
+
namespace: { type: 'string', default: 'default' },
|
|
370
|
+
ttl: { type: 'number', description: 'Time to live in seconds (0 for persistent)' },
|
|
371
|
+
persist: { type: 'boolean', default: false },
|
|
372
|
+
},
|
|
373
|
+
required: ['key', 'value'],
|
|
374
|
+
},
|
|
375
|
+
available: true,
|
|
376
|
+
},
|
|
377
|
+
{
|
|
378
|
+
name: 'mcp__agentic_qe__memory_retrieve',
|
|
379
|
+
description: 'Retrieve QE data with optional metadata',
|
|
380
|
+
inputSchema: {
|
|
381
|
+
type: 'object',
|
|
382
|
+
properties: {
|
|
383
|
+
key: { type: 'string' },
|
|
384
|
+
namespace: { type: 'string', default: 'default' },
|
|
385
|
+
includeMetadata: { type: 'boolean', default: false },
|
|
386
|
+
},
|
|
387
|
+
required: ['key'],
|
|
388
|
+
},
|
|
389
|
+
available: true,
|
|
390
|
+
},
|
|
391
|
+
{
|
|
392
|
+
name: 'mcp__agentic_qe__memory_query',
|
|
393
|
+
description: 'Query memory with pattern matching and filtering',
|
|
394
|
+
inputSchema: {
|
|
395
|
+
type: 'object',
|
|
396
|
+
properties: {
|
|
397
|
+
pattern: { type: 'string', description: 'Key pattern (supports wildcards)' },
|
|
398
|
+
namespace: { type: 'string' },
|
|
399
|
+
limit: { type: 'number', default: 100, minimum: 1, maximum: 1000 },
|
|
400
|
+
offset: { type: 'number', default: 0 },
|
|
401
|
+
includeExpired: { type: 'boolean', default: false },
|
|
402
|
+
},
|
|
403
|
+
},
|
|
404
|
+
available: true,
|
|
405
|
+
},
|
|
406
|
+
// Task Orchestration
|
|
407
|
+
{
|
|
408
|
+
name: 'mcp__agentic_qe__task_orchestrate',
|
|
409
|
+
description: 'Orchestrate QE tasks across multiple agents',
|
|
410
|
+
inputSchema: {
|
|
411
|
+
type: 'object',
|
|
412
|
+
properties: {
|
|
413
|
+
task: {
|
|
414
|
+
type: 'object',
|
|
415
|
+
properties: {
|
|
416
|
+
type: { enum: ['comprehensive-testing', 'quality-gate', 'defect-prevention', 'performance-validation'] },
|
|
417
|
+
priority: { enum: ['low', 'medium', 'high', 'critical'], default: 'medium' },
|
|
418
|
+
strategy: { enum: ['parallel', 'sequential', 'adaptive'], default: 'adaptive' },
|
|
419
|
+
maxAgents: { type: 'number', minimum: 1, maximum: 10 },
|
|
420
|
+
timeoutMinutes: { type: 'number', default: 30, minimum: 1 },
|
|
421
|
+
},
|
|
422
|
+
required: ['type'],
|
|
423
|
+
},
|
|
424
|
+
fleetId: { type: 'string' },
|
|
425
|
+
context: {
|
|
426
|
+
type: 'object',
|
|
427
|
+
properties: {
|
|
428
|
+
project: { type: 'string' },
|
|
429
|
+
environment: { type: 'string' },
|
|
430
|
+
branch: { type: 'string' },
|
|
431
|
+
},
|
|
432
|
+
},
|
|
433
|
+
},
|
|
434
|
+
required: ['task'],
|
|
435
|
+
},
|
|
436
|
+
available: true,
|
|
437
|
+
},
|
|
438
|
+
{
|
|
439
|
+
name: 'mcp__agentic_qe__task_status',
|
|
440
|
+
description: 'Check task status and progress',
|
|
441
|
+
inputSchema: {
|
|
442
|
+
type: 'object',
|
|
443
|
+
properties: {
|
|
444
|
+
taskId: { type: 'string', description: 'Task or orchestration ID' },
|
|
445
|
+
includeDetails: { type: 'boolean', default: false },
|
|
446
|
+
includeTimeline: { type: 'boolean', default: false },
|
|
447
|
+
},
|
|
448
|
+
required: ['taskId'],
|
|
449
|
+
},
|
|
450
|
+
available: true,
|
|
451
|
+
},
|
|
452
|
+
// Reporting
|
|
453
|
+
{
|
|
454
|
+
name: 'mcp__agentic_qe__test_report_comprehensive',
|
|
455
|
+
description: 'Generate test reports in multiple formats',
|
|
456
|
+
inputSchema: {
|
|
457
|
+
type: 'object',
|
|
458
|
+
properties: {
|
|
459
|
+
results: {
|
|
460
|
+
type: 'object',
|
|
461
|
+
properties: {
|
|
462
|
+
total: { type: 'number' },
|
|
463
|
+
passed: { type: 'number' },
|
|
464
|
+
failed: { type: 'number' },
|
|
465
|
+
skipped: { type: 'number' },
|
|
466
|
+
duration: { type: 'number' },
|
|
467
|
+
suites: { type: 'array' },
|
|
468
|
+
},
|
|
469
|
+
required: ['total', 'passed', 'failed'],
|
|
470
|
+
},
|
|
471
|
+
format: { enum: ['html', 'json', 'junit', 'markdown', 'pdf'] },
|
|
472
|
+
includeSummary: { type: 'boolean', default: true },
|
|
473
|
+
includeDetails: { type: 'boolean', default: false },
|
|
474
|
+
includeTrends: { type: 'boolean', default: false },
|
|
475
|
+
includeCharts: { type: 'boolean', default: false },
|
|
476
|
+
},
|
|
477
|
+
required: ['results', 'format'],
|
|
478
|
+
},
|
|
479
|
+
available: true,
|
|
480
|
+
},
|
|
481
|
+
];
|
|
482
|
+
}
|
|
483
|
+
async executeToolStub(toolName, params) {
|
|
484
|
+
// Stub implementation - in real usage, this would call the MCP server
|
|
485
|
+
// This demonstrates the plugin pattern for MCP tool access
|
|
486
|
+
this.log('debug', `Stub execution for ${toolName}`, params);
|
|
487
|
+
switch (toolName) {
|
|
488
|
+
case 'mcp__agentic_qe__fleet_status':
|
|
489
|
+
return {
|
|
490
|
+
status: 'active',
|
|
491
|
+
agentCount: 0,
|
|
492
|
+
topology: 'none',
|
|
493
|
+
message: 'No fleet initialized',
|
|
494
|
+
};
|
|
495
|
+
case 'mcp__agentic_qe__memory_retrieve':
|
|
496
|
+
return {
|
|
497
|
+
found: false,
|
|
498
|
+
key: params.key,
|
|
499
|
+
namespace: params.namespace || 'default',
|
|
500
|
+
};
|
|
501
|
+
default:
|
|
502
|
+
return {
|
|
503
|
+
success: true,
|
|
504
|
+
tool: toolName,
|
|
505
|
+
params,
|
|
506
|
+
message: 'Tool executed via plugin stub',
|
|
507
|
+
};
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
exports.McpToolsPlugin = McpToolsPlugin;
|
|
512
|
+
/**
|
|
513
|
+
* Factory function for plugin registration
|
|
514
|
+
*/
|
|
515
|
+
function createMcpToolsPlugin() {
|
|
516
|
+
return new McpToolsPlugin();
|
|
517
|
+
}
|
|
518
|
+
//# sourceMappingURL=McpToolsPlugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"McpToolsPlugin.js","sourceRoot":"","sources":["../../../src/plugins/adapters/McpToolsPlugin.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAonBH,oDAEC;AApnBD,oCAKkB;AAClB,8CAAiE;AA4DjE;;GAEG;AACH,MAAM,kBAAkB,GAAoB;IAC1C,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,cAAc,IAAI,2BAA2B;IACnE,OAAO,EAAE,KAAK;IACd,eAAe,EAAE,IAAI;CACtB,CAAC;AAEF;;GAEG;AACH,MAAa,cAAe,SAAQ,uBAAU;IAA9C;;QACW,aAAQ,GAAmB,I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;YAEJ;gBACE,OAAO;oBACL,OAAO,EAAE,IAAI;oBACb,IAAI,EAAE,QAAQ;oBACd,MAAM;oBACN,OAAO,EAAE,+BAA+B;iBACzC,CAAC;QACN,CAAC;IACH,CAAC;CACF;AA/hBD,wCA+hBC;AAED;;GAEG;AACH,SAAgB,oBAAoB;IAClC,OAAO,IAAI,cAAc,EAAE,CAAC;AAC9B,CAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Playwright Test Framework Plugin
|
|
3
|
+
* Phase 3 B2: Reference Plugin Implementation
|
|
4
|
+
*
|
|
5
|
+
* Provides Playwright test generation, parsing, and execution capabilities.
|
|
6
|
+
*/
|
|
7
|
+
import { TestFrameworkPlugin, PluginMetadata, PluginContext, TestGenerationSpec, GeneratedTest, ParsedTestFile, TestExecutionOptions, TestExecutionResult, FrameworkConfig } from '../types';
|
|
8
|
+
import { BasePlugin } from '../BasePlugin';
|
|
9
|
+
/**
|
|
10
|
+
* Playwright Plugin - Test framework adapter for Playwright
|
|
11
|
+
*/
|
|
12
|
+
export declare class PlaywrightPlugin extends BasePlugin implements TestFrameworkPlugin {
|
|
13
|
+
readonly metadata: PluginMetadata;
|
|
14
|
+
readonly filePatterns: string[];
|
|
15
|
+
readonly frameworkId = "playwright";
|
|
16
|
+
private initialized;
|
|
17
|
+
onActivate(context: PluginContext): Promise<void>;
|
|
18
|
+
onDeactivate(context: PluginContext): Promise<void>;
|
|
19
|
+
/**
|
|
20
|
+
* Generate Playwright test from specification
|
|
21
|
+
*/
|
|
22
|
+
generateTest(spec: TestGenerationSpec): Promise<GeneratedTest>;
|
|
23
|
+
/**
|
|
24
|
+
* Parse existing Playwright test file
|
|
25
|
+
*/
|
|
26
|
+
parseTestFile(filePath: string, content: string): Promise<ParsedTestFile>;
|
|
27
|
+
/**
|
|
28
|
+
* Execute Playwright tests - REAL IMPLEMENTATION
|
|
29
|
+
*/
|
|
30
|
+
executeTests(options: TestExecutionOptions): Promise<TestExecutionResult>;
|
|
31
|
+
/**
|
|
32
|
+
* Spawn a child process and capture output
|
|
33
|
+
*/
|
|
34
|
+
private spawnProcess;
|
|
35
|
+
/**
|
|
36
|
+
* Parse Playwright JSON output into TestResult array
|
|
37
|
+
*/
|
|
38
|
+
private parsePlaywrightOutput;
|
|
39
|
+
/**
|
|
40
|
+
* Map Playwright status to our status type
|
|
41
|
+
*/
|
|
42
|
+
private mapPlaywrightStatus;
|
|
43
|
+
/**
|
|
44
|
+
* Get Playwright framework configuration
|
|
45
|
+
*/
|
|
46
|
+
getFrameworkConfig(): FrameworkConfig;
|
|
47
|
+
private generateImports;
|
|
48
|
+
private generateTestCode;
|
|
49
|
+
private generateE2ETests;
|
|
50
|
+
private generateComponentTests;
|
|
51
|
+
private generateUnitTests;
|
|
52
|
+
private extractFunctionNames;
|
|
53
|
+
private extractClassName;
|
|
54
|
+
private extractCoveredFunctions;
|
|
55
|
+
private countTests;
|
|
56
|
+
private inferTestFilePath;
|
|
57
|
+
private getConfigTemplate;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Factory function for plugin registration
|
|
61
|
+
*/
|
|
62
|
+
export declare function createPlaywrightPlugin(): PlaywrightPlugin;
|
|
63
|
+
//# sourceMappingURL=PlaywrightPlugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PlaywrightPlugin.d.ts","sourceRoot":"","sources":["../../../src/plugins/adapters/PlaywrightPlugin.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,aAAa,EAEb,kBAAkB,EAClB,aAAa,EACb,cAAc,EAId,oBAAoB,EACpB,mBAAmB,EAEnB,eAAe,EAChB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,UAAU,EAAwB,MAAM,eAAe,CAAC;AAEjE;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,UAAW,YAAW,mBAAmB;IAC7E,QAAQ,CAAC,QAA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