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
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,91 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [2.6.1] - 2025-12-23
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
#### Phase 3 B2: Extensible Plugin System
|
|
15
|
+
|
|
16
|
+
A comprehensive plugin architecture enabling hot-swappable test framework adapters and community extensibility.
|
|
17
|
+
|
|
18
|
+
**Core Components (4,152 lines)**
|
|
19
|
+
- **Plugin Types** (`src/plugins/types.ts`) - 612 lines of comprehensive TypeScript interfaces
|
|
20
|
+
- `Plugin`, `TestFrameworkPlugin`, `PluginMetadata` interfaces
|
|
21
|
+
- `PluginState` enum (DISCOVERED, LOADING, LOADED, ACTIVATING, ACTIVE, DEACTIVATING, INACTIVE, ERROR)
|
|
22
|
+
- `PluginCategory` enum (TEST_FRAMEWORK, MCP_TOOLS, REPORTING, UTILITY, INTEGRATION)
|
|
23
|
+
- Full lifecycle hook definitions (onLoad, onActivate, onDeactivate, onUnload)
|
|
24
|
+
|
|
25
|
+
- **Plugin Manager** (`src/plugins/PluginManager.ts`) - 987 lines
|
|
26
|
+
- Plugin discovery from configured directories
|
|
27
|
+
- Lazy/eager loading strategies with `autoActivate` config
|
|
28
|
+
- **Real hot-reload** via `fs.watch` with 300ms debouncing
|
|
29
|
+
- **Real plugin loading** via dynamic `import()` from disk
|
|
30
|
+
- Semver-based dependency resolution
|
|
31
|
+
- Service registration and cross-plugin communication
|
|
32
|
+
- Event-driven architecture with full lifecycle events
|
|
33
|
+
|
|
34
|
+
- **Base Plugin** (`src/plugins/BasePlugin.ts`) - 189 lines
|
|
35
|
+
- Foundation class for plugin development
|
|
36
|
+
- Built-in logging, service registration, event handling
|
|
37
|
+
- Storage abstraction for plugin state
|
|
38
|
+
|
|
39
|
+
**Reference Implementations**
|
|
40
|
+
- **PlaywrightPlugin** (`src/plugins/adapters/PlaywrightPlugin.ts`) - 539 lines
|
|
41
|
+
- E2E test generation with proper imports and structure
|
|
42
|
+
- Test file parsing (describe blocks, tests, hooks)
|
|
43
|
+
- **Real test execution** via `child_process.spawn`
|
|
44
|
+
- Playwright JSON output parsing
|
|
45
|
+
|
|
46
|
+
- **VitestPlugin** (`src/plugins/adapters/VitestPlugin.ts`) - 709 lines
|
|
47
|
+
- Unit test generation for TypeScript/JavaScript
|
|
48
|
+
- Test file parsing with nested describe support
|
|
49
|
+
- **Real test execution** via `child_process.spawn`
|
|
50
|
+
- **Real coverage parsing** from Vitest JSON output
|
|
51
|
+
|
|
52
|
+
- **McpToolsPlugin** (`src/plugins/adapters/McpToolsPlugin.ts`) - 637 lines
|
|
53
|
+
- **Real MCP server connection** via JSON-RPC over HTTP
|
|
54
|
+
- Dynamic capability discovery from server (`tools/list`)
|
|
55
|
+
- Tool invocation with proper request/response handling
|
|
56
|
+
- Graceful fallback to static capabilities when server unavailable
|
|
57
|
+
- Configurable endpoint, timeout, and API key authentication
|
|
58
|
+
|
|
59
|
+
**Test Suite**
|
|
60
|
+
- **PluginManager.test.ts** (`tests/unit/plugins/`) - 395 lines, 30 tests
|
|
61
|
+
- Plugin registration, activation, deactivation
|
|
62
|
+
- Category filtering, service registration
|
|
63
|
+
- Lifecycle hook verification
|
|
64
|
+
- All tests passing
|
|
65
|
+
|
|
66
|
+
#### Phase 3 D1: Memory Pooling (Already Committed)
|
|
67
|
+
|
|
68
|
+
Pre-allocated agent pooling for dramatic spawn performance improvements.
|
|
69
|
+
|
|
70
|
+
**Performance Achieved**
|
|
71
|
+
- **1750x speedup**: 0.057ms pooled vs 100ms fresh spawn
|
|
72
|
+
- Target was 16x (<6ms) - **exceeded by 109x**
|
|
73
|
+
|
|
74
|
+
**Core Components**
|
|
75
|
+
- **AgentPool** (`src/agents/pool/AgentPool.ts`) - 744 lines
|
|
76
|
+
- Generic pool with configurable min/max/warmup sizes
|
|
77
|
+
- Health checks and automatic expansion
|
|
78
|
+
- Priority queue for concurrent acquisitions
|
|
79
|
+
|
|
80
|
+
- **QEAgentPoolFactory** (`src/agents/pool/QEAgentPoolFactory.ts`) - 289 lines
|
|
81
|
+
- QE-specific pool configurations per agent type
|
|
82
|
+
- Factory pattern for pool management
|
|
83
|
+
|
|
84
|
+
### Fixed
|
|
85
|
+
|
|
86
|
+
- **Tree-sitter peer dependency** warnings on `npm install`
|
|
87
|
+
- **Fraudulent benchmarks** in D1 implementation replaced with honest measurements
|
|
88
|
+
|
|
89
|
+
### Changed
|
|
90
|
+
|
|
91
|
+
- Enhanced `src/mcp/handlers/agent-spawn.ts` with pool integration
|
|
92
|
+
- Enhanced `src/mcp/handlers/fleet-init.ts` with pool integration
|
|
93
|
+
- Updated parser benchmark reports
|
|
94
|
+
|
|
10
95
|
## [2.6.0] - 2025-12-22
|
|
11
96
|
|
|
12
97
|
### Added
|
package/README.md
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
[](https://smithery.ai/skills?ns=proffesor-for-testing&utm_source=github&utm_medium=badge)
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
**Version 2.6.
|
|
14
|
+
**Version 2.6.1** | [Changelog](CHANGELOG.md) | [Contributors](CONTRIBUTORS.md) | [Issues](https://github.com/proffesor-for-testing/agentic-qe/issues) | [Discussions](https://github.com/proffesor-for-testing/agentic-qe/discussions)
|
|
15
15
|
|
|
16
16
|
> AI-powered test automation that learns from every task, switches between 300+ AI models on-the-fly, scores code testability, visualizes agent activity in real-time, and improves autonomously overnight — with built-in safety guardrails and full observability.
|
|
17
17
|
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent Pool Implementation
|
|
3
|
+
* Phase 3 D1: Memory Pooling for 16x Agent Spawn Speedup
|
|
4
|
+
*
|
|
5
|
+
* Target Performance:
|
|
6
|
+
* - Spawn time: <6ms (down from ~50-100ms)
|
|
7
|
+
* - Memory stable under load
|
|
8
|
+
* - Graceful degradation when exhausted
|
|
9
|
+
*
|
|
10
|
+
* Architecture:
|
|
11
|
+
* - Pre-allocated agent instances per type
|
|
12
|
+
* - Thread-safe acquire/release with mutex
|
|
13
|
+
* - Automatic pool expansion on demand
|
|
14
|
+
* - Health monitoring and recovery
|
|
15
|
+
*/
|
|
16
|
+
import { EventEmitter } from 'events';
|
|
17
|
+
import { QEAgentType } from '../../types';
|
|
18
|
+
import { AgentPoolConfig, PoolStats, AcquireOptions, ReleaseOptions, AcquireResult, IResettableAgent } from './types';
|
|
19
|
+
/**
|
|
20
|
+
* Agent Pool - Pre-allocated agent instance management
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```typescript
|
|
24
|
+
* const pool = new AgentPool(factory, config);
|
|
25
|
+
* await pool.warmup();
|
|
26
|
+
*
|
|
27
|
+
* // Fast acquisition (<6ms)
|
|
28
|
+
* const { agent, meta } = await pool.acquire('test-generator');
|
|
29
|
+
*
|
|
30
|
+
* // Use agent...
|
|
31
|
+
* await agent.executeTask(task);
|
|
32
|
+
*
|
|
33
|
+
* // Return to pool
|
|
34
|
+
* await pool.release(meta.poolId);
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
export declare class AgentPool<T extends IResettableAgent> extends EventEmitter {
|
|
38
|
+
private readonly config;
|
|
39
|
+
private readonly factory;
|
|
40
|
+
private readonly pools;
|
|
41
|
+
private readonly agentsByPoolId;
|
|
42
|
+
private readonly waitingQueues;
|
|
43
|
+
private readonly mutexes;
|
|
44
|
+
private stats;
|
|
45
|
+
private healthCheckTimer;
|
|
46
|
+
private isShuttingDown;
|
|
47
|
+
constructor(factory: AgentFactory<T>, config?: Partial<AgentPoolConfig>);
|
|
48
|
+
/**
|
|
49
|
+
* Warm up the pool by pre-creating agents
|
|
50
|
+
* Should be called during application startup
|
|
51
|
+
*/
|
|
52
|
+
warmup(types?: QEAgentType[]): Promise<void>;
|
|
53
|
+
/**
|
|
54
|
+
* Acquire an agent from the pool
|
|
55
|
+
* Returns immediately if available, otherwise waits or creates new
|
|
56
|
+
*
|
|
57
|
+
* @param type - Agent type to acquire
|
|
58
|
+
* @param options - Acquisition options
|
|
59
|
+
* @returns Acquired agent with metadata
|
|
60
|
+
*/
|
|
61
|
+
acquire(type: QEAgentType, options?: AcquireOptions): Promise<AcquireResult<T>>;
|
|
62
|
+
/**
|
|
63
|
+
* Release an agent back to the pool
|
|
64
|
+
*
|
|
65
|
+
* @param poolId - Pool ID of the agent to release
|
|
66
|
+
* @param options - Release options
|
|
67
|
+
*/
|
|
68
|
+
release(poolId: string, options?: ReleaseOptions): Promise<void>;
|
|
69
|
+
/**
|
|
70
|
+
* Get current pool statistics
|
|
71
|
+
*/
|
|
72
|
+
getStats(): PoolStats;
|
|
73
|
+
/**
|
|
74
|
+
* Shutdown the pool and dispose all agents
|
|
75
|
+
*/
|
|
76
|
+
shutdown(): Promise<void>;
|
|
77
|
+
private getPool;
|
|
78
|
+
private getTypeConfig;
|
|
79
|
+
private getConfiguredTypes;
|
|
80
|
+
private createPooledAgent;
|
|
81
|
+
private addToPool;
|
|
82
|
+
private tryAcquireFromPool;
|
|
83
|
+
private canCreateMore;
|
|
84
|
+
private getWaitingCount;
|
|
85
|
+
private waitForAgent;
|
|
86
|
+
private removeWaitingRequest;
|
|
87
|
+
private fulfillWaitingRequest;
|
|
88
|
+
private disposeAgent;
|
|
89
|
+
private replenishPool;
|
|
90
|
+
private recordAcquisition;
|
|
91
|
+
private startHealthCheck;
|
|
92
|
+
private performHealthCheck;
|
|
93
|
+
private log;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Factory interface for creating agents
|
|
97
|
+
*/
|
|
98
|
+
export interface AgentFactory<T extends IResettableAgent> {
|
|
99
|
+
/**
|
|
100
|
+
* Create a new agent instance
|
|
101
|
+
*/
|
|
102
|
+
create(type: QEAgentType): Promise<T>;
|
|
103
|
+
/**
|
|
104
|
+
* Initialize an agent (heavy async operations)
|
|
105
|
+
*/
|
|
106
|
+
initialize(agent: T): Promise<void>;
|
|
107
|
+
/**
|
|
108
|
+
* Dispose an agent (cleanup resources)
|
|
109
|
+
*/
|
|
110
|
+
dispose(agent: T): Promise<void>;
|
|
111
|
+
}
|
|
112
|
+
//# sourceMappingURL=AgentPool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AgentPool.d.ts","sourceRoot":"","sources":["../../../src/agents/pool/AgentPool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAc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