agentic-qe 2.1.0 → 2.1.2
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 +128 -0
- package/README.md +37 -11
- package/dist/agents/QXPartnerAgent.d.ts +40 -1
- package/dist/agents/QXPartnerAgent.d.ts.map +1 -1
- package/dist/agents/QXPartnerAgent.js +918 -19
- package/dist/agents/QXPartnerAgent.js.map +1 -1
- package/dist/core/MemoryManager.d.ts.map +1 -1
- package/dist/core/MemoryManager.js +4 -0
- package/dist/core/MemoryManager.js.map +1 -1
- package/dist/core/memory/ReflexionMemoryAdapter.d.ts +109 -0
- package/dist/core/memory/ReflexionMemoryAdapter.d.ts.map +1 -0
- package/dist/core/memory/ReflexionMemoryAdapter.js +306 -0
- package/dist/core/memory/ReflexionMemoryAdapter.js.map +1 -0
- package/dist/core/memory/RuVectorPatternStore.d.ts +33 -1
- package/dist/core/memory/RuVectorPatternStore.d.ts.map +1 -1
- package/dist/core/memory/RuVectorPatternStore.js +113 -1
- package/dist/core/memory/RuVectorPatternStore.js.map +1 -1
- package/dist/core/memory/SparseVectorSearch.d.ts +55 -0
- package/dist/core/memory/SparseVectorSearch.d.ts.map +1 -0
- package/dist/core/memory/SparseVectorSearch.js +130 -0
- package/dist/core/memory/SparseVectorSearch.js.map +1 -0
- package/dist/core/memory/TieredCompression.d.ts +81 -0
- package/dist/core/memory/TieredCompression.d.ts.map +1 -0
- package/dist/core/memory/TieredCompression.js +270 -0
- package/dist/core/memory/TieredCompression.js.map +1 -0
- package/dist/core/memory/index.d.ts +6 -0
- package/dist/core/memory/index.d.ts.map +1 -1
- package/dist/core/memory/index.js +29 -1
- package/dist/core/memory/index.js.map +1 -1
- package/dist/mcp/handlers/advanced/index.d.ts +3 -2
- package/dist/mcp/handlers/advanced/index.d.ts.map +1 -1
- package/dist/mcp/handlers/advanced/index.js +4 -5
- package/dist/mcp/handlers/advanced/index.js.map +1 -1
- package/dist/mcp/handlers/analysis/coverageAnalyzeSublinear.d.ts +1 -0
- package/dist/mcp/handlers/analysis/coverageAnalyzeSublinear.d.ts.map +1 -1
- package/dist/mcp/handlers/analysis/coverageAnalyzeSublinear.js +3 -0
- package/dist/mcp/handlers/analysis/coverageAnalyzeSublinear.js.map +1 -1
- package/dist/mcp/handlers/analysis/coverageGapsDetect.d.ts +1 -0
- package/dist/mcp/handlers/analysis/coverageGapsDetect.d.ts.map +1 -1
- package/dist/mcp/handlers/analysis/coverageGapsDetect.js +3 -0
- package/dist/mcp/handlers/analysis/coverageGapsDetect.js.map +1 -1
- package/dist/mcp/handlers/analysis/index.d.ts +0 -2
- package/dist/mcp/handlers/analysis/index.d.ts.map +1 -1
- package/dist/mcp/handlers/analysis/index.js +2 -3
- package/dist/mcp/handlers/analysis/index.js.map +1 -1
- package/dist/mcp/handlers/analysis/performanceMonitorRealtime.d.ts +1 -0
- package/dist/mcp/handlers/analysis/performanceMonitorRealtime.d.ts.map +1 -1
- package/dist/mcp/handlers/analysis/performanceMonitorRealtime.js +3 -0
- package/dist/mcp/handlers/analysis/performanceMonitorRealtime.js.map +1 -1
- package/dist/mcp/handlers/chaos/chaos-inject-failure.d.ts +5 -0
- package/dist/mcp/handlers/chaos/chaos-inject-failure.d.ts.map +1 -1
- package/dist/mcp/handlers/chaos/chaos-inject-failure.js +36 -2
- package/dist/mcp/handlers/chaos/chaos-inject-failure.js.map +1 -1
- package/dist/mcp/handlers/chaos/chaos-inject-latency.d.ts +5 -0
- package/dist/mcp/handlers/chaos/chaos-inject-latency.d.ts.map +1 -1
- package/dist/mcp/handlers/chaos/chaos-inject-latency.js +36 -2
- package/dist/mcp/handlers/chaos/chaos-inject-latency.js.map +1 -1
- package/dist/mcp/handlers/prediction/flaky-test-detect.d.ts.map +1 -1
- package/dist/mcp/handlers/prediction/flaky-test-detect.js +2 -0
- package/dist/mcp/handlers/prediction/flaky-test-detect.js.map +1 -1
- package/dist/mcp/handlers/prediction/index.d.ts +0 -2
- package/dist/mcp/handlers/prediction/index.d.ts.map +1 -1
- package/dist/mcp/handlers/prediction/index.js +2 -3
- package/dist/mcp/handlers/prediction/index.js.map +1 -1
- package/dist/mcp/handlers/security/index.d.ts +0 -30
- package/dist/mcp/handlers/security/index.d.ts.map +1 -1
- package/dist/mcp/handlers/security/index.js +5 -31
- package/dist/mcp/handlers/security/index.js.map +1 -1
- package/dist/mcp/lazy-loader.d.ts +156 -0
- package/dist/mcp/lazy-loader.d.ts.map +1 -0
- package/dist/mcp/lazy-loader.js +327 -0
- package/dist/mcp/lazy-loader.js.map +1 -0
- package/dist/mcp/server-instructions.d.ts +18 -0
- package/dist/mcp/server-instructions.d.ts.map +1 -0
- package/dist/mcp/server-instructions.js +133 -0
- package/dist/mcp/server-instructions.js.map +1 -0
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +236 -49
- package/dist/mcp/server.js.map +1 -1
- package/dist/mcp/tool-categories.d.ts +105 -0
- package/dist/mcp/tool-categories.d.ts.map +1 -0
- package/dist/mcp/tool-categories.js +463 -0
- package/dist/mcp/tool-categories.js.map +1 -0
- package/dist/mcp/tools.d.ts +3 -19
- package/dist/mcp/tools.d.ts.map +1 -1
- package/dist/mcp/tools.js +260 -647
- package/dist/mcp/tools.js.map +1 -1
- package/dist/types/qx.d.ts +74 -0
- package/dist/types/qx.d.ts.map +1 -1
- package/dist/types/qx.js.map +1 -1
- package/dist/utils/IntervalRegistry.d.ts +110 -0
- package/dist/utils/IntervalRegistry.d.ts.map +1 -0
- package/dist/utils/IntervalRegistry.js +190 -0
- package/dist/utils/IntervalRegistry.js.map +1 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +5 -1
- package/dist/utils/index.js.map +1 -1
- package/docs/reference/agents.md +33 -0
- package/docs/reference/usage.md +60 -0
- package/package.json +5 -2
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Global Interval Registry for Memory Leak Prevention
|
|
4
|
+
*
|
|
5
|
+
* Provides a centralized registry for tracking intervals that need cleanup.
|
|
6
|
+
* This is especially important for:
|
|
7
|
+
* - Module-level intervals that persist across tests
|
|
8
|
+
* - Intervals in singleton instances
|
|
9
|
+
* - Cleanup during graceful shutdown
|
|
10
|
+
*
|
|
11
|
+
* Usage:
|
|
12
|
+
* ```typescript
|
|
13
|
+
* import { IntervalRegistry } from './utils/IntervalRegistry';
|
|
14
|
+
*
|
|
15
|
+
* // Register an interval for cleanup
|
|
16
|
+
* const intervalId = setInterval(fn, 1000);
|
|
17
|
+
* IntervalRegistry.register('my-feature', intervalId);
|
|
18
|
+
*
|
|
19
|
+
* // Register with shutdown callback
|
|
20
|
+
* IntervalRegistry.registerWithShutdown('my-feature', {
|
|
21
|
+
* interval: intervalId,
|
|
22
|
+
* shutdown: async () => { ... }
|
|
23
|
+
* });
|
|
24
|
+
*
|
|
25
|
+
* // Cleanup specific feature
|
|
26
|
+
* await IntervalRegistry.shutdown('my-feature');
|
|
27
|
+
*
|
|
28
|
+
* // Cleanup all (for tests or process exit)
|
|
29
|
+
* await IntervalRegistry.shutdownAll();
|
|
30
|
+
* ```
|
|
31
|
+
*
|
|
32
|
+
* @module utils/IntervalRegistry
|
|
33
|
+
*/
|
|
34
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
|
+
exports.shutdownChaosFailure = exports.shutdownChaosLatency = exports.IntervalRegistry = void 0;
|
|
36
|
+
/**
|
|
37
|
+
* Global registry for tracking intervals that need cleanup
|
|
38
|
+
*/
|
|
39
|
+
class IntervalRegistryClass {
|
|
40
|
+
constructor() {
|
|
41
|
+
this.registry = new Map();
|
|
42
|
+
this.shutdownCallbacks = new Map();
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Register an interval for later cleanup
|
|
46
|
+
*
|
|
47
|
+
* @param feature - Feature/module name for grouping
|
|
48
|
+
* @param interval - The interval handle from setInterval
|
|
49
|
+
*/
|
|
50
|
+
register(feature, interval) {
|
|
51
|
+
const entry = {
|
|
52
|
+
interval,
|
|
53
|
+
registeredAt: Date.now(),
|
|
54
|
+
};
|
|
55
|
+
const existing = this.registry.get(feature) ?? [];
|
|
56
|
+
existing.push(entry);
|
|
57
|
+
this.registry.set(feature, existing);
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Register an interval with a custom shutdown callback
|
|
61
|
+
*
|
|
62
|
+
* @param feature - Feature/module name for grouping
|
|
63
|
+
* @param config - Interval and optional shutdown callback
|
|
64
|
+
*/
|
|
65
|
+
registerWithShutdown(feature, config) {
|
|
66
|
+
const entry = {
|
|
67
|
+
interval: config.interval,
|
|
68
|
+
shutdown: config.shutdown,
|
|
69
|
+
registeredAt: Date.now(),
|
|
70
|
+
};
|
|
71
|
+
const existing = this.registry.get(feature) ?? [];
|
|
72
|
+
existing.push(entry);
|
|
73
|
+
this.registry.set(feature, existing);
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Register a shutdown callback for a feature
|
|
77
|
+
* This is called even if no intervals are registered
|
|
78
|
+
*
|
|
79
|
+
* @param feature - Feature/module name
|
|
80
|
+
* @param callback - Shutdown callback
|
|
81
|
+
*/
|
|
82
|
+
registerShutdownCallback(feature, callback) {
|
|
83
|
+
this.shutdownCallbacks.set(feature, callback);
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Unregister a specific interval
|
|
87
|
+
*
|
|
88
|
+
* @param feature - Feature name
|
|
89
|
+
* @param interval - The interval to unregister
|
|
90
|
+
*/
|
|
91
|
+
unregister(feature, interval) {
|
|
92
|
+
const entries = this.registry.get(feature);
|
|
93
|
+
if (entries) {
|
|
94
|
+
const filtered = entries.filter(e => e.interval !== interval);
|
|
95
|
+
if (filtered.length === 0) {
|
|
96
|
+
this.registry.delete(feature);
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
this.registry.set(feature, filtered);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Shutdown all intervals for a specific feature
|
|
105
|
+
*
|
|
106
|
+
* @param feature - Feature name to shutdown
|
|
107
|
+
*/
|
|
108
|
+
async shutdown(feature) {
|
|
109
|
+
const entries = this.registry.get(feature);
|
|
110
|
+
if (entries) {
|
|
111
|
+
for (const entry of entries) {
|
|
112
|
+
clearInterval(entry.interval);
|
|
113
|
+
if (entry.shutdown) {
|
|
114
|
+
try {
|
|
115
|
+
await Promise.resolve(entry.shutdown());
|
|
116
|
+
}
|
|
117
|
+
catch (error) {
|
|
118
|
+
console.warn(`[IntervalRegistry] Shutdown error for ${feature}:`, error);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
this.registry.delete(feature);
|
|
123
|
+
}
|
|
124
|
+
// Call feature shutdown callback if registered
|
|
125
|
+
const callback = this.shutdownCallbacks.get(feature);
|
|
126
|
+
if (callback) {
|
|
127
|
+
try {
|
|
128
|
+
await Promise.resolve(callback());
|
|
129
|
+
}
|
|
130
|
+
catch (error) {
|
|
131
|
+
console.warn(`[IntervalRegistry] Callback error for ${feature}:`, error);
|
|
132
|
+
}
|
|
133
|
+
this.shutdownCallbacks.delete(feature);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Shutdown all registered intervals
|
|
138
|
+
* Typically called during test teardown or process exit
|
|
139
|
+
*/
|
|
140
|
+
async shutdownAll() {
|
|
141
|
+
const features = Array.from(this.registry.keys());
|
|
142
|
+
const callbacks = Array.from(this.shutdownCallbacks.keys());
|
|
143
|
+
// Combine unique features
|
|
144
|
+
const allFeatures = [...new Set([...features, ...callbacks])];
|
|
145
|
+
await Promise.all(allFeatures.map(feature => this.shutdown(feature).catch(error => {
|
|
146
|
+
console.warn(`[IntervalRegistry] Shutdown error for ${feature}:`, error);
|
|
147
|
+
})));
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Get statistics about registered intervals
|
|
151
|
+
*/
|
|
152
|
+
getStats() {
|
|
153
|
+
const byFeature = {};
|
|
154
|
+
let total = 0;
|
|
155
|
+
for (const [feature, entries] of this.registry.entries()) {
|
|
156
|
+
byFeature[feature] = entries.length;
|
|
157
|
+
total += entries.length;
|
|
158
|
+
}
|
|
159
|
+
return {
|
|
160
|
+
totalIntervals: total,
|
|
161
|
+
features: Array.from(this.registry.keys()),
|
|
162
|
+
byFeature,
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Clear all registrations without calling shutdown
|
|
167
|
+
* Use with caution - primarily for testing
|
|
168
|
+
*/
|
|
169
|
+
clear() {
|
|
170
|
+
for (const entries of this.registry.values()) {
|
|
171
|
+
for (const entry of entries) {
|
|
172
|
+
clearInterval(entry.interval);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
this.registry.clear();
|
|
176
|
+
this.shutdownCallbacks.clear();
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Singleton instance of the interval registry
|
|
181
|
+
*/
|
|
182
|
+
exports.IntervalRegistry = new IntervalRegistryClass();
|
|
183
|
+
/**
|
|
184
|
+
* Export shutdown functions for chaos handlers and other modules
|
|
185
|
+
*/
|
|
186
|
+
var chaos_inject_latency_1 = require("../mcp/handlers/chaos/chaos-inject-latency");
|
|
187
|
+
Object.defineProperty(exports, "shutdownChaosLatency", { enumerable: true, get: function () { return chaos_inject_latency_1.shutdown; } });
|
|
188
|
+
var chaos_inject_failure_1 = require("../mcp/handlers/chaos/chaos-inject-failure");
|
|
189
|
+
Object.defineProperty(exports, "shutdownChaosFailure", { enumerable: true, get: function () { return chaos_inject_failure_1.shutdown; } });
|
|
190
|
+
//# sourceMappingURL=IntervalRegistry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IntervalRegistry.js","sourceRoot":"","sources":["../../src/utils/IntervalRegistry.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;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c,EAAE,KAAK;YACrB,QAAQ,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;YAC1C,SAAS;SACV,CAAC;IACJ,CAAC;IAED;;;OAGG;IACH,KAAK;QACH,KAAK,MAAM,OAAO,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,EAAE,CAAC;YAC7C,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;gBAC5B,aAAa,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;YAChC,CAAC;QACH,CAAC;QACD,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;QACtB,IAAI,CAAC,iBAAiB,CAAC,KAAK,EAAE,CAAC;IACjC,CAAC;CACF;AAED;;GAEG;AACU,QAAA,gBAAgB,GAAG,IAAI,qBAAqB,EAAE,CAAC;AAE5D;;GAEG;AACH,mFAA8F;AAArF,4HAAA,QAAQ,OAAwB;AACzC,mFAA8F;AAArF,4HAAA,QAAQ,OAAwB"}
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export { Logger, LogLevel } from './Logger';
|
|
|
5
5
|
export { Config } from './Config';
|
|
6
6
|
export { Database } from './Database';
|
|
7
7
|
export { TestFrameworkExecutor } from './TestFrameworkExecutor';
|
|
8
|
+
export { IntervalRegistry, shutdownChaosLatency, shutdownChaosFailure, } from './IntervalRegistry';
|
|
8
9
|
export type { FleetConfig, AgentConfig, DatabaseConfig } from './Config';
|
|
9
10
|
export type { DatabaseRow } from './Database';
|
|
10
11
|
export type { TestFrameworkConfig, TestExecutionResult, TestCaseResult, CoverageData, FileCoverage } from './TestFrameworkExecutor';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AACzE,YAAY,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC9C,YAAY,EACV,mBAAmB,EACnB,mBAAmB,EACnB,cAAc,EACd,YAAY,EACZ,YAAY,EACb,MAAM,yBAAyB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EACL,gBAAgB,EAChB,oBAAoB,EACpB,oBAAoB,GACrB,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AACzE,YAAY,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC9C,YAAY,EACV,mBAAmB,EACnB,mBAAmB,EACnB,cAAc,EACd,YAAY,EACZ,YAAY,EACb,MAAM,yBAAyB,CAAC"}
|
package/dist/utils/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Utils - Export all utility classes
|
|
4
4
|
*/
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.TestFrameworkExecutor = exports.Database = exports.Config = exports.LogLevel = exports.Logger = void 0;
|
|
6
|
+
exports.shutdownChaosFailure = exports.shutdownChaosLatency = exports.IntervalRegistry = exports.TestFrameworkExecutor = exports.Database = exports.Config = exports.LogLevel = exports.Logger = void 0;
|
|
7
7
|
var Logger_1 = require("./Logger");
|
|
8
8
|
Object.defineProperty(exports, "Logger", { enumerable: true, get: function () { return Logger_1.Logger; } });
|
|
9
9
|
Object.defineProperty(exports, "LogLevel", { enumerable: true, get: function () { return Logger_1.LogLevel; } });
|
|
@@ -13,4 +13,8 @@ var Database_1 = require("./Database");
|
|
|
13
13
|
Object.defineProperty(exports, "Database", { enumerable: true, get: function () { return Database_1.Database; } });
|
|
14
14
|
var TestFrameworkExecutor_1 = require("./TestFrameworkExecutor");
|
|
15
15
|
Object.defineProperty(exports, "TestFrameworkExecutor", { enumerable: true, get: function () { return TestFrameworkExecutor_1.TestFrameworkExecutor; } });
|
|
16
|
+
var IntervalRegistry_1 = require("./IntervalRegistry");
|
|
17
|
+
Object.defineProperty(exports, "IntervalRegistry", { enumerable: true, get: function () { return IntervalRegistry_1.IntervalRegistry; } });
|
|
18
|
+
Object.defineProperty(exports, "shutdownChaosLatency", { enumerable: true, get: function () { return IntervalRegistry_1.shutdownChaosLatency; } });
|
|
19
|
+
Object.defineProperty(exports, "shutdownChaosFailure", { enumerable: true, get: function () { return IntervalRegistry_1.shutdownChaosFailure; } });
|
|
16
20
|
//# sourceMappingURL=index.js.map
|
package/dist/utils/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,mCAA4C;AAAnC,gGAAA,MAAM,OAAA;AAAE,kGAAA,QAAQ,OAAA;AACzB,mCAAkC;AAAzB,gGAAA,MAAM,OAAA;AACf,uCAAsC;AAA7B,oGAAA,QAAQ,OAAA;AACjB,iEAAgE;AAAvD,8HAAA,qBAAqB,OAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,mCAA4C;AAAnC,gGAAA,MAAM,OAAA;AAAE,kGAAA,QAAQ,OAAA;AACzB,mCAAkC;AAAzB,gGAAA,MAAM,OAAA;AACf,uCAAsC;AAA7B,oGAAA,QAAQ,OAAA;AACjB,iEAAgE;AAAvD,8HAAA,qBAAqB,OAAA;AAC9B,uDAI4B;AAH1B,oHAAA,gBAAgB,OAAA;AAChB,wHAAA,oBAAoB,OAAA;AACpB,wHAAA,oBAAoB,OAAA"}
|
package/docs/reference/agents.md
CHANGED
|
@@ -377,6 +377,39 @@ Task("Chaos testing", "Test system resilience with controlled failures", "qe-cha
|
|
|
377
377
|
|
|
378
378
|
---
|
|
379
379
|
|
|
380
|
+
## MCP Tool Discovery System
|
|
381
|
+
|
|
382
|
+
The Agentic QE Fleet uses **lazy-loaded MCP tools** to reduce initial context by 87%.
|
|
383
|
+
|
|
384
|
+
### Tool Discovery
|
|
385
|
+
|
|
386
|
+
```javascript
|
|
387
|
+
// Discover available tool domains
|
|
388
|
+
mcp__agentic_qe__tools_discover()
|
|
389
|
+
// Returns: security, coverage, test-generation, test-execution, quality-gates,
|
|
390
|
+
// fleet-management, memory, learning, patterns, reporting
|
|
391
|
+
|
|
392
|
+
// Load specific domain tools
|
|
393
|
+
mcp__agentic_qe__tools_load_domain({ domain: "security" })
|
|
394
|
+
mcp__agentic_qe__tools_load_domain({ domain: "coverage" })
|
|
395
|
+
```
|
|
396
|
+
|
|
397
|
+
### Automatic Loading
|
|
398
|
+
|
|
399
|
+
Tools are **auto-loaded based on keywords** when agents work:
|
|
400
|
+
- "security", "vulnerability" → loads security tools
|
|
401
|
+
- "coverage", "gaps" → loads coverage tools
|
|
402
|
+
- "generate", "create tests" → loads test-generation tools
|
|
403
|
+
- "execute", "run tests" → loads test-execution tools
|
|
404
|
+
|
|
405
|
+
### Benefits
|
|
406
|
+
|
|
407
|
+
- **87% context reduction** (from 15,000 to 2,000 tokens initially)
|
|
408
|
+
- **Faster agent spawning** with minimal overhead
|
|
409
|
+
- **On-demand loading** only when tools are needed
|
|
410
|
+
|
|
411
|
+
---
|
|
412
|
+
|
|
380
413
|
## Agent Coordination
|
|
381
414
|
|
|
382
415
|
All agents coordinate through the **`aqe/*` memory namespace**:
|
package/docs/reference/usage.md
CHANGED
|
@@ -71,6 +71,66 @@ claude mcp list
|
|
|
71
71
|
# Should show: agentic-qe: npm run mcp:start - ✓ Connected
|
|
72
72
|
```
|
|
73
73
|
|
|
74
|
+
### Tool Discovery System (New in v2.1.0)
|
|
75
|
+
|
|
76
|
+
The MCP server uses **lazy loading** to reduce initial context by 87%.
|
|
77
|
+
|
|
78
|
+
#### Discover Available Domains
|
|
79
|
+
|
|
80
|
+
```javascript
|
|
81
|
+
// List all available tool domains
|
|
82
|
+
mcp__agentic_qe__tools_discover()
|
|
83
|
+
|
|
84
|
+
// Returns:
|
|
85
|
+
// {
|
|
86
|
+
// domains: [
|
|
87
|
+
// "security", "coverage", "test-generation", "test-execution",
|
|
88
|
+
// "quality-gates", "fleet-management", "memory", "learning",
|
|
89
|
+
// "patterns", "reporting"
|
|
90
|
+
// ]
|
|
91
|
+
// }
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
#### Load Domain-Specific Tools
|
|
95
|
+
|
|
96
|
+
```javascript
|
|
97
|
+
// Load security tools (4 tools)
|
|
98
|
+
mcp__agentic_qe__tools_load_domain({ domain: "security" })
|
|
99
|
+
|
|
100
|
+
// Load coverage tools (3 tools)
|
|
101
|
+
mcp__agentic_qe__tools_load_domain({ domain: "coverage" })
|
|
102
|
+
|
|
103
|
+
// Load test generation tools (2 tools)
|
|
104
|
+
mcp__agentic_qe__tools_load_domain({ domain: "test-generation" })
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
#### Automatic Loading
|
|
108
|
+
|
|
109
|
+
Tools are **auto-loaded based on keywords** in agent instructions:
|
|
110
|
+
|
|
111
|
+
```javascript
|
|
112
|
+
// Keyword "security" triggers auto-load of security domain
|
|
113
|
+
Task("Security scan", "Run security checks for vulnerabilities", "qe-security-scanner")
|
|
114
|
+
|
|
115
|
+
// Keyword "coverage" triggers auto-load of coverage domain
|
|
116
|
+
Task("Coverage analysis", "Find coverage gaps in UserService", "qe-coverage-analyzer")
|
|
117
|
+
|
|
118
|
+
// Keyword "generate" triggers auto-load of test-generation domain
|
|
119
|
+
Task("Generate tests", "Create unit tests for API endpoints", "qe-test-generator")
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
**Recognized Keywords:**
|
|
123
|
+
- **security**: security, vulnerability, sast, dast, owasp
|
|
124
|
+
- **coverage**: coverage, gaps, untested, branches
|
|
125
|
+
- **test-generation**: generate, create tests, test suite
|
|
126
|
+
- **test-execution**: execute, run tests, parallel
|
|
127
|
+
- **quality-gates**: quality, gate, threshold, deployment
|
|
128
|
+
- **fleet-management**: fleet, agents, orchestrate, swarm
|
|
129
|
+
- **memory**: memory, store, retrieve, namespace
|
|
130
|
+
- **learning**: learn, patterns, q-learning, improve
|
|
131
|
+
- **patterns**: patterns, extract, search, templates
|
|
132
|
+
- **reporting**: report, metrics, dashboard, export
|
|
133
|
+
|
|
74
134
|
### Using MCP Tools in Claude Code
|
|
75
135
|
|
|
76
136
|
```javascript
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agentic-qe",
|
|
3
|
-
"version": "2.1.
|
|
4
|
-
"description": "Agentic Quality Engineering Fleet System - AI-driven quality management platform with 41 QE skills, learning, pattern reuse, ML-based flaky detection, Multi-Model Router (70-81% cost savings), streaming progress updates,
|
|
3
|
+
"version": "2.1.2",
|
|
4
|
+
"description": "Agentic Quality Engineering Fleet System - AI-driven quality management platform with 41 QE skills, learning, pattern reuse, ML-based flaky detection, Multi-Model Router (70-81% cost savings), streaming progress updates, 84 MCP tools with lazy loading (87% context reduction), and native TypeScript hooks",
|
|
5
5
|
"main": "dist/cli/index.js",
|
|
6
6
|
"types": "dist/cli/index.d.ts",
|
|
7
7
|
"bin": {
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
"test:e2e": "node --expose-gc --max-old-space-size=768 --no-compilation-cache node_modules/.bin/jest tests/e2e --runInBand --forceExit",
|
|
31
31
|
"test:agents": "node --expose-gc --max-old-space-size=512 --no-compilation-cache node_modules/.bin/jest tests/agents --runInBand --forceExit",
|
|
32
32
|
"test:mcp": "node --expose-gc --max-old-space-size=512 --no-compilation-cache node_modules/.bin/jest tests/mcp --runInBand --forceExit",
|
|
33
|
+
"test:mcp:integration": "node --expose-gc --max-old-space-size=768 --no-compilation-cache node_modules/.bin/jest tests/integration/mcp --runInBand --forceExit",
|
|
33
34
|
"test:cli": "node --expose-gc --max-old-space-size=512 --no-compilation-cache node_modules/.bin/jest tests/cli --runInBand --forceExit",
|
|
34
35
|
"test:agentdb": "node --expose-gc --max-old-space-size=1024 --no-compilation-cache node_modules/.bin/jest tests/agentdb --runInBand --forceExit",
|
|
35
36
|
"test:benchmark": "node --expose-gc --max-old-space-size=2048 --no-compilation-cache node_modules/.bin/jest tests/benchmarks --runInBand --forceExit",
|
|
@@ -45,6 +46,7 @@
|
|
|
45
46
|
"prepublishOnly": "npm run typecheck && npm run build",
|
|
46
47
|
"mcp:start": "node dist/mcp/start.js",
|
|
47
48
|
"mcp:validate": "node scripts/validate-mcp-tools.js",
|
|
49
|
+
"mcp:report": "node scripts/generate-mcp-report.js",
|
|
48
50
|
"docs:api": "typedoc --out docs/api src --exclude '**/*.test.ts' --excludePrivate",
|
|
49
51
|
"verify:counts": "tsx scripts/verify-counts.ts",
|
|
50
52
|
"verify:agent-skills": "tsx scripts/verify-agent-skills.ts",
|
|
@@ -166,6 +168,7 @@
|
|
|
166
168
|
"istanbul-lib-coverage": "^3.2.2",
|
|
167
169
|
"jest": "^30.2.0",
|
|
168
170
|
"jest-extended": "^6.0.0",
|
|
171
|
+
"jest-junit": "^16.0.0",
|
|
169
172
|
"nodemon": "^3.0.2",
|
|
170
173
|
"react": "^18.3.1",
|
|
171
174
|
"rimraf": "^6.0.1",
|