agentic-qe 1.3.2 → 1.3.4
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/.claude/agents/qe-api-contract-validator.md +20 -0
- package/.claude/agents/qe-chaos-engineer.md +20 -0
- package/.claude/agents/qe-coverage-analyzer.md +21 -0
- package/.claude/agents/qe-deployment-readiness.md +20 -0
- package/.claude/agents/qe-flaky-test-hunter.md +20 -0
- package/.claude/agents/qe-fleet-commander.md +20 -0
- package/.claude/agents/qe-performance-tester.md +21 -0
- package/.claude/agents/qe-production-intelligence.md +20 -0
- package/.claude/agents/qe-quality-analyzer.md +20 -0
- package/.claude/agents/qe-quality-gate.md +20 -0
- package/.claude/agents/qe-regression-risk-analyzer.md +20 -0
- package/.claude/agents/qe-requirements-validator.md +20 -0
- package/.claude/agents/qe-security-scanner.md +21 -0
- package/.claude/agents/qe-test-data-architect.md +19 -0
- package/.claude/agents/qe-test-executor.md +20 -0
- package/.claude/agents/qe-test-generator.md +22 -0
- package/.claude/agents/qe-visual-tester.md +22 -0
- package/CHANGELOG.md +114 -0
- package/README.md +322 -991
- package/README.md.backup-20251026 +1366 -0
- package/bin/aqe-mcp +65 -0
- package/dist/agents/BaseAgent.js +1 -1
- package/dist/agents/BaseAgent.js.map +1 -1
- package/dist/agents/CoverageAnalyzerAgent.js +16 -16
- package/dist/agents/CoverageAnalyzerAgent.js.map +1 -1
- package/dist/agents/FlakyTestHunterAgent.js +1 -1
- package/dist/agents/FlakyTestHunterAgent.js.map +1 -1
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +71 -37
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/core/memory/EnhancedAgentDBService.d.ts +127 -0
- package/dist/core/memory/EnhancedAgentDBService.d.ts.map +1 -0
- package/dist/core/memory/EnhancedAgentDBService.js +298 -0
- package/dist/core/memory/EnhancedAgentDBService.js.map +1 -0
- package/dist/core/neural/NeuralTrainer.js +2 -2
- package/dist/core/neural/NeuralTrainer.js.map +1 -1
- package/dist/learning/FixRecommendationEngine.d.ts +68 -0
- package/dist/learning/FixRecommendationEngine.d.ts.map +1 -0
- package/dist/learning/FixRecommendationEngine.js +500 -0
- package/dist/learning/FixRecommendationEngine.js.map +1 -0
- package/dist/learning/FlakyTestDetector.d.ts +19 -0
- package/dist/learning/FlakyTestDetector.d.ts.map +1 -1
- package/dist/learning/FlakyTestDetector.js +121 -2
- package/dist/learning/FlakyTestDetector.js.map +1 -1
- package/dist/learning/index.d.ts +2 -0
- package/dist/learning/index.d.ts.map +1 -1
- package/dist/learning/index.js +5 -0
- package/dist/learning/index.js.map +1 -1
- package/dist/learning/types.d.ts +11 -0
- package/dist/learning/types.d.ts.map +1 -1
- package/dist/reasoning/PatternQualityScorer.d.ts +134 -0
- package/dist/reasoning/PatternQualityScorer.d.ts.map +1 -0
- package/dist/reasoning/PatternQualityScorer.js +340 -0
- package/dist/reasoning/PatternQualityScorer.js.map +1 -0
- package/dist/reasoning/QEReasoningBank.d.ts +51 -4
- package/dist/reasoning/QEReasoningBank.d.ts.map +1 -1
- package/dist/reasoning/QEReasoningBank.js +173 -11
- package/dist/reasoning/QEReasoningBank.js.map +1 -1
- package/dist/reasoning/VectorSimilarity.d.ts +131 -0
- package/dist/reasoning/VectorSimilarity.d.ts.map +1 -0
- package/dist/reasoning/VectorSimilarity.js +250 -0
- package/dist/reasoning/VectorSimilarity.js.map +1 -0
- package/dist/reasoning/index.d.ts +8 -1
- package/dist/reasoning/index.d.ts.map +1 -1
- package/dist/reasoning/index.js +13 -2
- package/dist/reasoning/index.js.map +1 -1
- package/dist/streaming/BaseStreamHandler.d.ts +89 -0
- package/dist/streaming/BaseStreamHandler.d.ts.map +1 -0
- package/dist/streaming/BaseStreamHandler.js +168 -0
- package/dist/streaming/BaseStreamHandler.js.map +1 -0
- package/dist/streaming/TestGenerateStreamHandler.d.ts +103 -0
- package/dist/streaming/TestGenerateStreamHandler.d.ts.map +1 -0
- package/dist/streaming/TestGenerateStreamHandler.js +321 -0
- package/dist/streaming/TestGenerateStreamHandler.js.map +1 -0
- package/dist/streaming/index.d.ts +16 -0
- package/dist/streaming/index.d.ts.map +1 -0
- package/dist/streaming/index.js +39 -0
- package/dist/streaming/index.js.map +1 -0
- package/dist/utils/Database.d.ts.map +1 -1
- package/dist/utils/Database.js +15 -1
- package/dist/utils/Database.js.map +1 -1
- package/dist/utils/__mocks__/Logger.d.ts +26 -0
- package/dist/utils/__mocks__/Logger.d.ts.map +1 -0
- package/dist/utils/__mocks__/Logger.js +42 -0
- package/dist/utils/__mocks__/Logger.js.map +1 -0
- package/package.json +19 -6
- package/dist/agents/mixins/NeuralCapableMixin.d.ts +0 -130
- package/dist/agents/mixins/NeuralCapableMixin.d.ts.map +0 -1
- package/dist/agents/mixins/NeuralCapableMixin.js +0 -358
- package/dist/agents/mixins/NeuralCapableMixin.js.map +0 -1
- package/dist/agents/mixins/QUICCapableMixin.d.ts +0 -34
- package/dist/agents/mixins/QUICCapableMixin.d.ts.map +0 -1
- package/dist/agents/mixins/QUICCapableMixin.js +0 -346
- package/dist/agents/mixins/QUICCapableMixin.js.map +0 -1
- package/dist/core/security/CertificateValidator.d.ts +0 -130
- package/dist/core/security/CertificateValidator.d.ts.map +0 -1
- package/dist/core/security/CertificateValidator.js +0 -376
- package/dist/core/security/CertificateValidator.js.map +0 -1
- package/dist/core/transport/QUICTransport.d.ts +0 -62
- package/dist/core/transport/QUICTransport.d.ts.map +0 -1
- package/dist/core/transport/QUICTransport.js +0 -381
- package/dist/core/transport/QUICTransport.js.map +0 -1
- package/dist/core/transport/SecureQUICTransport.d.ts +0 -71
- package/dist/core/transport/SecureQUICTransport.d.ts.map +0 -1
- package/dist/core/transport/SecureQUICTransport.js +0 -253
- package/dist/core/transport/SecureQUICTransport.js.map +0 -1
- package/dist/learning/AdvancedFeatureExtractor.d.ts +0 -123
- package/dist/learning/AdvancedFeatureExtractor.d.ts.map +0 -1
- package/dist/learning/AdvancedFeatureExtractor.js +0 -423
- package/dist/learning/AdvancedFeatureExtractor.js.map +0 -1
- package/dist/learning/NeuralPatternMatcher.d.ts +0 -184
- package/dist/learning/NeuralPatternMatcher.d.ts.map +0 -1
- package/dist/learning/NeuralPatternMatcher.js +0 -702
- package/dist/learning/NeuralPatternMatcher.js.map +0 -1
- package/dist/learning/NeuralTrainer.d.ts +0 -209
- package/dist/learning/NeuralTrainer.d.ts.map +0 -1
- package/dist/learning/NeuralTrainer.js +0 -478
- package/dist/learning/NeuralTrainer.js.map +0 -1
- package/dist/transport/QUICTransport.d.ts +0 -340
- package/dist/transport/QUICTransport.d.ts.map +0 -1
- package/dist/transport/QUICTransport.js +0 -814
- package/dist/transport/QUICTransport.js.map +0 -1
- package/dist/transport/UDPTransport.d.ts +0 -348
- package/dist/transport/UDPTransport.d.ts.map +0 -1
- package/dist/transport/UDPTransport.js +0 -820
- package/dist/transport/UDPTransport.js.map +0 -1
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Mock Logger for Testing
|
|
4
|
+
*
|
|
5
|
+
* This is a Jest manual mock that automatically replaces the real Logger
|
|
6
|
+
* when jest.mock('@utils/Logger') is called in tests.
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.Logger = exports.LogLevel = void 0;
|
|
10
|
+
var LogLevel;
|
|
11
|
+
(function (LogLevel) {
|
|
12
|
+
LogLevel["ERROR"] = "error";
|
|
13
|
+
LogLevel["WARN"] = "warn";
|
|
14
|
+
LogLevel["INFO"] = "info";
|
|
15
|
+
LogLevel["DEBUG"] = "debug";
|
|
16
|
+
})(LogLevel || (exports.LogLevel = LogLevel = {}));
|
|
17
|
+
class Logger {
|
|
18
|
+
constructor() {
|
|
19
|
+
this.info = jest.fn();
|
|
20
|
+
this.warn = jest.fn();
|
|
21
|
+
this.error = jest.fn();
|
|
22
|
+
this.debug = jest.fn();
|
|
23
|
+
this.log = jest.fn();
|
|
24
|
+
this.setLevel = jest.fn();
|
|
25
|
+
this.getLevel = jest.fn().mockReturnValue('info');
|
|
26
|
+
this.child = jest.fn(function () {
|
|
27
|
+
return this;
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
static getInstance() {
|
|
31
|
+
if (!Logger.mockInstance) {
|
|
32
|
+
Logger.mockInstance = new Logger();
|
|
33
|
+
}
|
|
34
|
+
return Logger.mockInstance;
|
|
35
|
+
}
|
|
36
|
+
static resetInstance() {
|
|
37
|
+
Logger.mockInstance = null;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
exports.Logger = Logger;
|
|
41
|
+
Logger.mockInstance = null;
|
|
42
|
+
//# sourceMappingURL=Logger.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Logger.js","sourceRoot":"","sources":["../../../src/utils/__mocks__/Logger.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,IAAY,QAKX;AALD,WAAY,QAAQ;IAClB,2BAAe,CAAA;IACf,yBAAa,CAAA;IACb,yBAAa,CAAA;IACb,2BAAe,CAAA;AACjB,CAAC,EALW,QAAQ,wBAAR,QAAQ,QAKnB;AAED,MAAa,MAAM;IAAnB;QAcE,SAAI,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;QACjB,SAAI,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;QACjB,UAAK,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;QAClB,UAAK,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;QAClB,QAAG,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;QAChB,aAAQ,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;QACrB,aAAQ,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;QAC7C,UAAK,GAAG,IAAI,CAAC,EAAE,CAAC;YACd,OAAO,IAAI,CAAC;QACd,CAAC,CAAC,CAAC;IACL,CAAC;IArBC,MAAM,CAAC,WAAW;QAChB,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE,CAAC;YACzB,MAAM,CAAC,YAAY,GAAG,IAAI,MAAM,EAAE,CAAC;QACrC,CAAC;QACD,OAAO,MAAM,CAAC,YAAY,CAAC;IAC7B,CAAC;IAED,MAAM,CAAC,aAAa;QAClB,MAAM,CAAC,YAAY,GAAG,IAAI,CAAC;IAC7B,CAAC;;AAZH,wBAwBC;AAvBgB,mBAAY,GAAkB,IAAI,AAAtB,CAAuB"}
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agentic-qe",
|
|
3
|
-
"version": "1.3.
|
|
4
|
-
"description": "Agentic Quality Engineering Fleet System - AI-driven quality management platform with learning, pattern reuse, ML-based flaky detection, Multi-Model Router (70-81% cost savings), streaming progress updates, and native TypeScript hooks",
|
|
3
|
+
"version": "1.3.4",
|
|
4
|
+
"description": "Agentic Quality Engineering Fleet System - AI-driven quality management platform with 34 QE skills, learning, pattern reuse, ML-based flaky detection, Multi-Model Router (70-81% cost savings), streaming progress updates, 61 MCP tools, and native TypeScript hooks",
|
|
5
5
|
"main": "dist/cli/index.js",
|
|
6
6
|
"types": "dist/cli/index.d.ts",
|
|
7
7
|
"bin": {
|
|
8
8
|
"agentic-qe": "./bin/agentic-qe",
|
|
9
|
-
"aqe": "./bin/aqe"
|
|
9
|
+
"aqe": "./bin/aqe",
|
|
10
|
+
"aqe-mcp": "./bin/aqe-mcp"
|
|
10
11
|
},
|
|
11
12
|
"scripts": {
|
|
12
13
|
"build": "tsc",
|
|
@@ -42,6 +43,9 @@
|
|
|
42
43
|
"test:mcp": "node --expose-gc --max-old-space-size=512 --no-compilation-cache node_modules/.bin/jest tests/mcp --runInBand",
|
|
43
44
|
"test:cli": "node --expose-gc --max-old-space-size=512 --no-compilation-cache node_modules/.bin/jest tests/cli --runInBand",
|
|
44
45
|
"test:utils": "node --expose-gc --max-old-space-size=768 --no-compilation-cache node_modules/.bin/jest tests/utils --runInBand",
|
|
46
|
+
"test:streaming": "node --expose-gc --max-old-space-size=512 --no-compilation-cache node_modules/.bin/jest tests/streaming --runInBand",
|
|
47
|
+
"test:agentdb": "node --expose-gc --max-old-space-size=1024 --no-compilation-cache node_modules/.bin/jest tests/agentdb --runInBand",
|
|
48
|
+
"test:benchmark": "node --expose-gc --max-old-space-size=2048 --no-compilation-cache node_modules/.bin/jest tests/agentdb/performance-benchmark.test.ts --runInBand --forceExit",
|
|
45
49
|
"pretest:integration:phase2": "node scripts/check-memory-before-test.js",
|
|
46
50
|
"test:integration:phase2": "node --expose-gc --max-old-space-size=1024 --no-compilation-cache node_modules/.bin/jest tests/integration/phase2 --runInBand --forceExit",
|
|
47
51
|
"pretest:integration:phase2:agents": "node scripts/check-memory-before-test.js",
|
|
@@ -63,13 +67,18 @@
|
|
|
63
67
|
"clean": "rimraf dist",
|
|
64
68
|
"prepare": "npm run build",
|
|
65
69
|
"prepublishOnly": "npm run typecheck && npm run build",
|
|
66
|
-
"mcp:start": "
|
|
67
|
-
"mcp:dev": "nodemon --watch src/mcp -e ts --exec
|
|
70
|
+
"mcp:start": "node dist/mcp/start.js",
|
|
71
|
+
"mcp:dev": "nodemon --watch src/mcp -e ts --exec \"npm run build && node dist/mcp/start.js\"",
|
|
68
72
|
"docs:api": "typedoc --out docs/api src --exclude '**/*.test.ts' --excludePrivate",
|
|
69
73
|
"docs:serve": "npx http-server docs/api -p 8080",
|
|
70
74
|
"orchestrator": "ts-node scripts/final-go-orchestrator.ts",
|
|
71
75
|
"orchestrator:test": "ts-node scripts/test-orchestrator.ts",
|
|
72
|
-
"query-memory": "ts-node scripts/query-aqe-memory-single.ts"
|
|
76
|
+
"query-memory": "ts-node scripts/query-aqe-memory-single.ts",
|
|
77
|
+
"verify:counts": "tsx scripts/verify-counts.ts",
|
|
78
|
+
"verify:agent-skills": "tsx scripts/verify-agent-skills.ts",
|
|
79
|
+
"verify:features": "tsx scripts/verify-features.ts",
|
|
80
|
+
"verify:all": "npm run verify:counts && npm run verify:agent-skills && npm run verify:features",
|
|
81
|
+
"update:counts": "tsx scripts/update-documentation-counts.ts"
|
|
73
82
|
},
|
|
74
83
|
"keywords": [
|
|
75
84
|
"quality-engineering",
|
|
@@ -97,10 +106,13 @@
|
|
|
97
106
|
"dependencies": {
|
|
98
107
|
"@anthropic-ai/sdk": "^0.64.0",
|
|
99
108
|
"@babel/parser": "^7.24.0",
|
|
109
|
+
"@babel/traverse": "^7.24.0",
|
|
100
110
|
"@faker-js/faker": "^10.0.0",
|
|
101
111
|
"@modelcontextprotocol/sdk": "^1.18.2",
|
|
102
112
|
"@xenova/transformers": "^2.6.0",
|
|
113
|
+
"agentdb": "^1.0.0",
|
|
103
114
|
"agentic-flow": "^1.7.3",
|
|
115
|
+
"agentic-qe": "^1.3.3",
|
|
104
116
|
"ajv": "^8.17.1",
|
|
105
117
|
"ajv-formats": "^3.0.1",
|
|
106
118
|
"better-sqlite3": "^12.4.1",
|
|
@@ -153,6 +165,7 @@
|
|
|
153
165
|
"stack-utils": "^2.0.6",
|
|
154
166
|
"ts-jest": "^29.4.4",
|
|
155
167
|
"ts-node": "^10.9.1",
|
|
168
|
+
"tsx": "^4.20.6",
|
|
156
169
|
"typedoc": "^0.28.13",
|
|
157
170
|
"typescript": "^5.9.3",
|
|
158
171
|
"uuid": "^11.0.5",
|
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* NeuralCapableMixin - Reusable Neural Capabilities for QE Agents
|
|
3
|
-
*
|
|
4
|
-
* Provides common neural pattern matching, prediction, and learning
|
|
5
|
-
* capabilities that can be mixed into any QE agent for intelligent
|
|
6
|
-
* test generation, coverage analysis, and defect prediction.
|
|
7
|
-
*
|
|
8
|
-
* Features:
|
|
9
|
-
* - Pattern matching with confidence scoring
|
|
10
|
-
* - Neural predictions with caching
|
|
11
|
-
* - Graceful degradation when neural features fail
|
|
12
|
-
* - Performance tracking and optimization
|
|
13
|
-
* - Feature flag support for opt-in activation
|
|
14
|
-
*
|
|
15
|
-
* @module NeuralCapableMixin
|
|
16
|
-
*/
|
|
17
|
-
export interface NeuralMatcher {
|
|
18
|
-
/**
|
|
19
|
-
* Predict outcomes using trained neural model
|
|
20
|
-
*/
|
|
21
|
-
predict(input: NeuralInput): Promise<NeuralPrediction>;
|
|
22
|
-
/**
|
|
23
|
-
* Train neural model with new data
|
|
24
|
-
*/
|
|
25
|
-
train(trainingData: NeuralTrainingData): Promise<NeuralTrainingResult>;
|
|
26
|
-
/**
|
|
27
|
-
* Get model status and metrics
|
|
28
|
-
*/
|
|
29
|
-
getStatus(): NeuralMatcherStatus;
|
|
30
|
-
/**
|
|
31
|
-
* Check if neural features are available
|
|
32
|
-
*/
|
|
33
|
-
isAvailable(): boolean;
|
|
34
|
-
}
|
|
35
|
-
export interface NeuralInput {
|
|
36
|
-
type: 'test-generation' | 'coverage-gap' | 'flakiness' | 'risk-score';
|
|
37
|
-
data: any;
|
|
38
|
-
context?: Record<string, any>;
|
|
39
|
-
}
|
|
40
|
-
export interface NeuralPrediction {
|
|
41
|
-
result: any;
|
|
42
|
-
confidence: number;
|
|
43
|
-
reasoning?: string[];
|
|
44
|
-
features?: Record<string, number>;
|
|
45
|
-
modelVersion?: string;
|
|
46
|
-
timestamp: Date;
|
|
47
|
-
}
|
|
48
|
-
export interface NeuralTrainingData {
|
|
49
|
-
samples: Array<{
|
|
50
|
-
input: any;
|
|
51
|
-
expectedOutput: any;
|
|
52
|
-
metadata?: Record<string, any>;
|
|
53
|
-
}>;
|
|
54
|
-
validationSplit?: number;
|
|
55
|
-
}
|
|
56
|
-
export interface NeuralTrainingResult {
|
|
57
|
-
success: boolean;
|
|
58
|
-
metrics: {
|
|
59
|
-
accuracy: number;
|
|
60
|
-
precision: number;
|
|
61
|
-
recall: number;
|
|
62
|
-
f1Score: number;
|
|
63
|
-
};
|
|
64
|
-
trainingTime: number;
|
|
65
|
-
modelVersion: string;
|
|
66
|
-
}
|
|
67
|
-
export interface NeuralMatcherStatus {
|
|
68
|
-
available: boolean;
|
|
69
|
-
trained: boolean;
|
|
70
|
-
modelVersion?: string;
|
|
71
|
-
lastTraining?: Date;
|
|
72
|
-
predictions: number;
|
|
73
|
-
avgConfidence: number;
|
|
74
|
-
cacheHitRate: number;
|
|
75
|
-
}
|
|
76
|
-
export interface NeuralConfig {
|
|
77
|
-
enabled: boolean;
|
|
78
|
-
model?: 'default' | 'custom' | string;
|
|
79
|
-
confidence: number;
|
|
80
|
-
cacheEnabled: boolean;
|
|
81
|
-
cacheTTL: number;
|
|
82
|
-
maxCacheSize: number;
|
|
83
|
-
fallbackEnabled: boolean;
|
|
84
|
-
}
|
|
85
|
-
export declare const DEFAULT_NEURAL_CONFIG: NeuralConfig;
|
|
86
|
-
export declare class DefaultNeuralMatcher implements NeuralMatcher {
|
|
87
|
-
private flakyModel;
|
|
88
|
-
private config;
|
|
89
|
-
private predictionCache;
|
|
90
|
-
private stats;
|
|
91
|
-
constructor(config?: Partial<NeuralConfig>);
|
|
92
|
-
predict(input: NeuralInput): Promise<NeuralPrediction>;
|
|
93
|
-
train(trainingData: NeuralTrainingData): Promise<NeuralTrainingResult>;
|
|
94
|
-
getStatus(): NeuralMatcherStatus;
|
|
95
|
-
isAvailable(): boolean;
|
|
96
|
-
private predictFlakiness;
|
|
97
|
-
private predictTestCandidates;
|
|
98
|
-
private predictCoverageGaps;
|
|
99
|
-
private predictRiskScore;
|
|
100
|
-
private getCacheKey;
|
|
101
|
-
private getCachedPrediction;
|
|
102
|
-
private cachePrediction;
|
|
103
|
-
private getFallbackPrediction;
|
|
104
|
-
}
|
|
105
|
-
/**
|
|
106
|
-
* Create a neural matcher instance with configuration
|
|
107
|
-
*/
|
|
108
|
-
export declare function createNeuralMatcher(config?: Partial<NeuralConfig>): NeuralMatcher | null;
|
|
109
|
-
/**
|
|
110
|
-
* Safe neural prediction with error handling
|
|
111
|
-
*/
|
|
112
|
-
export declare function safeNeuralPredict(matcher: NeuralMatcher | null | undefined, input: NeuralInput): Promise<NeuralPrediction | null>;
|
|
113
|
-
/**
|
|
114
|
-
* Merge neural predictions with traditional analysis
|
|
115
|
-
*/
|
|
116
|
-
export declare function mergeWithNeuralPrediction<T>(traditionalResult: T, neuralPrediction: NeuralPrediction | null, mergeStrategy?: 'neural-first' | 'traditional-first' | 'weighted'): T & {
|
|
117
|
-
neural?: NeuralPrediction;
|
|
118
|
-
};
|
|
119
|
-
/**
|
|
120
|
-
* Export neural prediction metrics for monitoring
|
|
121
|
-
*/
|
|
122
|
-
export interface NeuralMetrics {
|
|
123
|
-
enabled: boolean;
|
|
124
|
-
predictions: number;
|
|
125
|
-
avgConfidence: number;
|
|
126
|
-
cacheHitRate: number;
|
|
127
|
-
avgPredictionTime?: number;
|
|
128
|
-
}
|
|
129
|
-
export declare function getNeuralMetrics(matcher: NeuralMatcher | null): NeuralMetrics;
|
|
130
|
-
//# sourceMappingURL=NeuralCapableMixin.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NeuralCapableMixin.d.ts","sourceRoot":"","sources":["../../../src/agents/mixins/NeuralCapableMixin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAWH,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,OAAO,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAEvD;;OAEG;IACH,KAAK,CAAC,YAAY,EAAE,kBAAkB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAEvE;;OAEG;IACH,SAAS,IAAI,mBAAmB,CAAC;IAEjC;;OAEG;IACH,WAAW,IAAI,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,iBAAiB,GAAG,cAAc,GAAG,WAAW,GAAG,YAAY,CAAC;IACtE,IAAI,EAAE,GAAG,CAAC;IACV,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAA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;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI,GAAG,aAAa,CAiB7E"}
|
|
@@ -1,358 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* NeuralCapableMixin - Reusable Neural Capabilities for QE Agents
|
|
4
|
-
*
|
|
5
|
-
* Provides common neural pattern matching, prediction, and learning
|
|
6
|
-
* capabilities that can be mixed into any QE agent for intelligent
|
|
7
|
-
* test generation, coverage analysis, and defect prediction.
|
|
8
|
-
*
|
|
9
|
-
* Features:
|
|
10
|
-
* - Pattern matching with confidence scoring
|
|
11
|
-
* - Neural predictions with caching
|
|
12
|
-
* - Graceful degradation when neural features fail
|
|
13
|
-
* - Performance tracking and optimization
|
|
14
|
-
* - Feature flag support for opt-in activation
|
|
15
|
-
*
|
|
16
|
-
* @module NeuralCapableMixin
|
|
17
|
-
*/
|
|
18
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
-
exports.DefaultNeuralMatcher = exports.DEFAULT_NEURAL_CONFIG = void 0;
|
|
20
|
-
exports.createNeuralMatcher = createNeuralMatcher;
|
|
21
|
-
exports.safeNeuralPredict = safeNeuralPredict;
|
|
22
|
-
exports.mergeWithNeuralPrediction = mergeWithNeuralPrediction;
|
|
23
|
-
exports.getNeuralMetrics = getNeuralMetrics;
|
|
24
|
-
const FlakyPredictionModel_1 = require("../../learning/FlakyPredictionModel");
|
|
25
|
-
exports.DEFAULT_NEURAL_CONFIG = {
|
|
26
|
-
enabled: false, // Opt-in by default
|
|
27
|
-
model: 'default',
|
|
28
|
-
confidence: 0.7,
|
|
29
|
-
cacheEnabled: true,
|
|
30
|
-
cacheTTL: 5 * 60 * 1000, // 5 minutes
|
|
31
|
-
maxCacheSize: 1000,
|
|
32
|
-
fallbackEnabled: true
|
|
33
|
-
};
|
|
34
|
-
// ============================================================================
|
|
35
|
-
// Neural Matcher Implementation
|
|
36
|
-
// ============================================================================
|
|
37
|
-
class DefaultNeuralMatcher {
|
|
38
|
-
constructor(config = {}) {
|
|
39
|
-
this.predictionCache = new Map();
|
|
40
|
-
this.stats = {
|
|
41
|
-
predictions: 0,
|
|
42
|
-
cacheHits: 0,
|
|
43
|
-
totalConfidence: 0
|
|
44
|
-
};
|
|
45
|
-
this.config = { ...exports.DEFAULT_NEURAL_CONFIG, ...config };
|
|
46
|
-
this.flakyModel = new FlakyPredictionModel_1.FlakyPredictionModel();
|
|
47
|
-
}
|
|
48
|
-
async predict(input) {
|
|
49
|
-
// Check cache first
|
|
50
|
-
if (this.config.cacheEnabled) {
|
|
51
|
-
const cached = this.getCachedPrediction(input);
|
|
52
|
-
if (cached) {
|
|
53
|
-
this.stats.cacheHits++;
|
|
54
|
-
return cached;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
const startTime = Date.now();
|
|
58
|
-
let prediction;
|
|
59
|
-
try {
|
|
60
|
-
switch (input.type) {
|
|
61
|
-
case 'flakiness':
|
|
62
|
-
prediction = await this.predictFlakiness(input);
|
|
63
|
-
break;
|
|
64
|
-
case 'test-generation':
|
|
65
|
-
prediction = await this.predictTestCandidates(input);
|
|
66
|
-
break;
|
|
67
|
-
case 'coverage-gap':
|
|
68
|
-
prediction = await this.predictCoverageGaps(input);
|
|
69
|
-
break;
|
|
70
|
-
case 'risk-score':
|
|
71
|
-
prediction = await this.predictRiskScore(input);
|
|
72
|
-
break;
|
|
73
|
-
default:
|
|
74
|
-
throw new Error(`Unsupported prediction type: ${input.type}`);
|
|
75
|
-
}
|
|
76
|
-
// Update stats
|
|
77
|
-
this.stats.predictions++;
|
|
78
|
-
this.stats.totalConfidence += prediction.confidence;
|
|
79
|
-
// Cache result
|
|
80
|
-
if (this.config.cacheEnabled) {
|
|
81
|
-
this.cachePrediction(input, prediction);
|
|
82
|
-
}
|
|
83
|
-
return prediction;
|
|
84
|
-
}
|
|
85
|
-
catch (error) {
|
|
86
|
-
// Graceful degradation
|
|
87
|
-
if (this.config.fallbackEnabled) {
|
|
88
|
-
return this.getFallbackPrediction(input, error);
|
|
89
|
-
}
|
|
90
|
-
throw error;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
async train(trainingData) {
|
|
94
|
-
const startTime = Date.now();
|
|
95
|
-
try {
|
|
96
|
-
// Prepare training data for flaky model
|
|
97
|
-
const testResultsMap = new Map();
|
|
98
|
-
const labelsMap = new Map();
|
|
99
|
-
trainingData.samples.forEach((sample, idx) => {
|
|
100
|
-
const testName = `test_${idx}`;
|
|
101
|
-
testResultsMap.set(testName, sample.input.results || []);
|
|
102
|
-
labelsMap.set(testName, sample.expectedOutput.isFlaky || false);
|
|
103
|
-
});
|
|
104
|
-
// Train the model
|
|
105
|
-
const metrics = this.flakyModel.train(testResultsMap, labelsMap);
|
|
106
|
-
const trainingTime = Date.now() - startTime;
|
|
107
|
-
return {
|
|
108
|
-
success: true,
|
|
109
|
-
metrics: {
|
|
110
|
-
accuracy: metrics.accuracy,
|
|
111
|
-
precision: metrics.precision,
|
|
112
|
-
recall: metrics.recall,
|
|
113
|
-
f1Score: metrics.f1Score
|
|
114
|
-
},
|
|
115
|
-
trainingTime,
|
|
116
|
-
modelVersion: `v${Date.now()}`
|
|
117
|
-
};
|
|
118
|
-
}
|
|
119
|
-
catch (error) {
|
|
120
|
-
return {
|
|
121
|
-
success: false,
|
|
122
|
-
metrics: {
|
|
123
|
-
accuracy: 0,
|
|
124
|
-
precision: 0,
|
|
125
|
-
recall: 0,
|
|
126
|
-
f1Score: 0
|
|
127
|
-
},
|
|
128
|
-
trainingTime: Date.now() - startTime,
|
|
129
|
-
modelVersion: 'failed'
|
|
130
|
-
};
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
getStatus() {
|
|
134
|
-
return {
|
|
135
|
-
available: this.config.enabled,
|
|
136
|
-
trained: true, // Simplified - check model state in production
|
|
137
|
-
predictions: this.stats.predictions,
|
|
138
|
-
avgConfidence: this.stats.predictions > 0
|
|
139
|
-
? this.stats.totalConfidence / this.stats.predictions
|
|
140
|
-
: 0,
|
|
141
|
-
cacheHitRate: this.stats.predictions > 0
|
|
142
|
-
? this.stats.cacheHits / this.stats.predictions
|
|
143
|
-
: 0
|
|
144
|
-
};
|
|
145
|
-
}
|
|
146
|
-
isAvailable() {
|
|
147
|
-
return this.config.enabled;
|
|
148
|
-
}
|
|
149
|
-
// ============================================================================
|
|
150
|
-
// Private Prediction Methods
|
|
151
|
-
// ============================================================================
|
|
152
|
-
async predictFlakiness(input) {
|
|
153
|
-
const { testName, results } = input.data;
|
|
154
|
-
// Fallback: Use simple statistical heuristic (model training is optional)
|
|
155
|
-
const passRate = results.filter((r) => r.passed).length / results.length;
|
|
156
|
-
const variance = results.reduce((acc, r, i, arr) => {
|
|
157
|
-
const avg = arr.reduce((sum, r) => sum + r.duration, 0) / arr.length;
|
|
158
|
-
return acc + Math.pow(r.duration - avg, 2);
|
|
159
|
-
}, 0) / results.length;
|
|
160
|
-
const isFlaky = passRate > 0.2 && passRate < 0.95 && variance > 1000;
|
|
161
|
-
const confidence = 0.7 + (Math.abs(0.5 - passRate) * 0.2); // 0.7-0.9 based on pass rate
|
|
162
|
-
return {
|
|
163
|
-
result: {
|
|
164
|
-
isFlaky,
|
|
165
|
-
confidence,
|
|
166
|
-
reasoning: [`Pass rate: ${(passRate * 100).toFixed(1)}%`, `Variance: ${variance.toFixed(0)}`]
|
|
167
|
-
},
|
|
168
|
-
confidence,
|
|
169
|
-
reasoning: [
|
|
170
|
-
'Statistical heuristic analysis',
|
|
171
|
-
`Pass rate: ${(passRate * 100).toFixed(1)}%`,
|
|
172
|
-
`Duration variance: ${variance.toFixed(0)}ms²`,
|
|
173
|
-
`Flaky: ${isFlaky ? 'YES' : 'NO'}`
|
|
174
|
-
],
|
|
175
|
-
timestamp: new Date()
|
|
176
|
-
};
|
|
177
|
-
}
|
|
178
|
-
async predictTestCandidates(input) {
|
|
179
|
-
// Simplified prediction for test generation
|
|
180
|
-
const { codeSignature, framework } = input.data;
|
|
181
|
-
// Use historical patterns to suggest test candidates
|
|
182
|
-
const confidence = 0.75 + Math.random() * 0.2; // 75-95% confidence
|
|
183
|
-
return {
|
|
184
|
-
result: {
|
|
185
|
-
suggestedTests: [
|
|
186
|
-
{ name: 'unit test for core function', priority: 'high' },
|
|
187
|
-
{ name: 'integration test for API', priority: 'medium' },
|
|
188
|
-
{ name: 'edge case test for boundary values', priority: 'high' }
|
|
189
|
-
],
|
|
190
|
-
framework,
|
|
191
|
-
coverage: 0.85
|
|
192
|
-
},
|
|
193
|
-
confidence,
|
|
194
|
-
reasoning: [
|
|
195
|
-
'Historical patterns suggest high-priority unit tests',
|
|
196
|
-
'Code complexity indicates need for edge case coverage',
|
|
197
|
-
'API surface suggests integration test value'
|
|
198
|
-
],
|
|
199
|
-
timestamp: new Date()
|
|
200
|
-
};
|
|
201
|
-
}
|
|
202
|
-
async predictCoverageGaps(input) {
|
|
203
|
-
const { currentCoverage, codebase } = input.data;
|
|
204
|
-
const confidence = 0.8;
|
|
205
|
-
return {
|
|
206
|
-
result: {
|
|
207
|
-
gaps: [
|
|
208
|
-
{ location: 'module.ts:45-52', severity: 'high', likelihood: 0.9 },
|
|
209
|
-
{ location: 'service.ts:120-135', severity: 'medium', likelihood: 0.75 }
|
|
210
|
-
],
|
|
211
|
-
suggestedTests: [
|
|
212
|
-
'Add test for uncovered error path',
|
|
213
|
-
'Test boundary conditions in loop'
|
|
214
|
-
]
|
|
215
|
-
},
|
|
216
|
-
confidence,
|
|
217
|
-
reasoning: [
|
|
218
|
-
'ML model predicts high defect likelihood in uncovered regions',
|
|
219
|
-
'Historical data shows similar gaps led to production issues'
|
|
220
|
-
],
|
|
221
|
-
timestamp: new Date()
|
|
222
|
-
};
|
|
223
|
-
}
|
|
224
|
-
async predictRiskScore(input) {
|
|
225
|
-
const { changes, historicalData } = input.data;
|
|
226
|
-
const confidence = 0.82;
|
|
227
|
-
return {
|
|
228
|
-
result: {
|
|
229
|
-
riskScore: 7.5,
|
|
230
|
-
riskLevel: 'HIGH',
|
|
231
|
-
factors: {
|
|
232
|
-
codeComplexity: 0.8,
|
|
233
|
-
changeFrequency: 0.7,
|
|
234
|
-
historicalFailures: 0.9
|
|
235
|
-
}
|
|
236
|
-
},
|
|
237
|
-
confidence,
|
|
238
|
-
reasoning: [
|
|
239
|
-
'High code complexity in changed files',
|
|
240
|
-
'Historical failures in similar changes',
|
|
241
|
-
'Critical path dependency detected'
|
|
242
|
-
],
|
|
243
|
-
timestamp: new Date()
|
|
244
|
-
};
|
|
245
|
-
}
|
|
246
|
-
// ============================================================================
|
|
247
|
-
// Cache Management
|
|
248
|
-
// ============================================================================
|
|
249
|
-
getCacheKey(input) {
|
|
250
|
-
return `${input.type}:${JSON.stringify(input.data)}`;
|
|
251
|
-
}
|
|
252
|
-
getCachedPrediction(input) {
|
|
253
|
-
const key = this.getCacheKey(input);
|
|
254
|
-
const cached = this.predictionCache.get(key);
|
|
255
|
-
if (!cached)
|
|
256
|
-
return null;
|
|
257
|
-
// Check TTL
|
|
258
|
-
if (Date.now() - cached.timestamp > this.config.cacheTTL) {
|
|
259
|
-
this.predictionCache.delete(key);
|
|
260
|
-
return null;
|
|
261
|
-
}
|
|
262
|
-
return cached.prediction;
|
|
263
|
-
}
|
|
264
|
-
cachePrediction(input, prediction) {
|
|
265
|
-
const key = this.getCacheKey(input);
|
|
266
|
-
// Enforce cache size limit
|
|
267
|
-
if (this.predictionCache.size >= this.config.maxCacheSize) {
|
|
268
|
-
// Remove oldest entry
|
|
269
|
-
const firstKey = this.predictionCache.keys().next().value;
|
|
270
|
-
if (firstKey) {
|
|
271
|
-
this.predictionCache.delete(firstKey);
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
this.predictionCache.set(key, {
|
|
275
|
-
prediction,
|
|
276
|
-
timestamp: Date.now()
|
|
277
|
-
});
|
|
278
|
-
}
|
|
279
|
-
getFallbackPrediction(input, error) {
|
|
280
|
-
// Return conservative fallback when neural prediction fails
|
|
281
|
-
return {
|
|
282
|
-
result: null,
|
|
283
|
-
confidence: 0.5,
|
|
284
|
-
reasoning: [
|
|
285
|
-
'Neural prediction unavailable',
|
|
286
|
-
`Error: ${error.message}`,
|
|
287
|
-
'Using fallback conservative prediction'
|
|
288
|
-
],
|
|
289
|
-
timestamp: new Date()
|
|
290
|
-
};
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
exports.DefaultNeuralMatcher = DefaultNeuralMatcher;
|
|
294
|
-
// ============================================================================
|
|
295
|
-
// Mixin Helper Functions
|
|
296
|
-
// ============================================================================
|
|
297
|
-
/**
|
|
298
|
-
* Create a neural matcher instance with configuration
|
|
299
|
-
*/
|
|
300
|
-
function createNeuralMatcher(config = {}) {
|
|
301
|
-
const finalConfig = { ...exports.DEFAULT_NEURAL_CONFIG, ...config };
|
|
302
|
-
if (!finalConfig.enabled) {
|
|
303
|
-
return null;
|
|
304
|
-
}
|
|
305
|
-
return new DefaultNeuralMatcher(finalConfig);
|
|
306
|
-
}
|
|
307
|
-
/**
|
|
308
|
-
* Safe neural prediction with error handling
|
|
309
|
-
*/
|
|
310
|
-
async function safeNeuralPredict(matcher, input) {
|
|
311
|
-
if (!matcher || !matcher.isAvailable()) {
|
|
312
|
-
return null;
|
|
313
|
-
}
|
|
314
|
-
try {
|
|
315
|
-
return await matcher.predict(input);
|
|
316
|
-
}
|
|
317
|
-
catch (error) {
|
|
318
|
-
console.warn('[NeuralCapable] Prediction failed:', error);
|
|
319
|
-
return null;
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
/**
|
|
323
|
-
* Merge neural predictions with traditional analysis
|
|
324
|
-
*/
|
|
325
|
-
function mergeWithNeuralPrediction(traditionalResult, neuralPrediction, mergeStrategy = 'weighted') {
|
|
326
|
-
if (!neuralPrediction) {
|
|
327
|
-
return { ...traditionalResult };
|
|
328
|
-
}
|
|
329
|
-
const result = { ...traditionalResult, neural: neuralPrediction };
|
|
330
|
-
// Apply merge strategy based on confidence
|
|
331
|
-
if (mergeStrategy === 'neural-first' && neuralPrediction.confidence > 0.8) {
|
|
332
|
-
return { ...result, ...neuralPrediction.result };
|
|
333
|
-
}
|
|
334
|
-
if (mergeStrategy === 'weighted') {
|
|
335
|
-
// Weighted merge based on neural confidence
|
|
336
|
-
// This is simplified - implement proper weighted merge in production
|
|
337
|
-
return result;
|
|
338
|
-
}
|
|
339
|
-
return result;
|
|
340
|
-
}
|
|
341
|
-
function getNeuralMetrics(matcher) {
|
|
342
|
-
if (!matcher) {
|
|
343
|
-
return {
|
|
344
|
-
enabled: false,
|
|
345
|
-
predictions: 0,
|
|
346
|
-
avgConfidence: 0,
|
|
347
|
-
cacheHitRate: 0
|
|
348
|
-
};
|
|
349
|
-
}
|
|
350
|
-
const status = matcher.getStatus();
|
|
351
|
-
return {
|
|
352
|
-
enabled: status.available,
|
|
353
|
-
predictions: status.predictions,
|
|
354
|
-
avgConfidence: status.avgConfidence,
|
|
355
|
-
cacheHitRate: status.cacheHitRate
|
|
356
|
-
};
|
|
357
|
-
}
|
|
358
|
-
//# sourceMappingURL=NeuralCapableMixin.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NeuralCapableMixin.js","sourceRoot":"","sources":["../../../src/agents/mixins/NeuralCapableMixin.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;AA2ZH,kDAQC;AAKD,8CAcC;AAKD,8DAuBC;AAaD,4CAiBC;AA9eD,8EAA2E;AA2F9D,QAAA,qBAAqB,GAAiB;IACjD,OAAO,EAAE,KAAK,EAAE,oBAAoB;IACpC,KAAK,EAAE,SAAS;IAChB,UAAU,EAAE,GAAG;IACf,YAAY,EAAE,IAAI;IACl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AM,EAAE,CAAC;IACnD,CAAC;IAED,IAAI,aAAa,KAAK,UAAU,EAAE,CAAC;QACjC,4CAA4C;QAC5C,qEAAqE;QACrE,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AAaD,SAAgB,gBAAgB,CAAC,OAA6B;IAC5D,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OAAO;YACL,OAAO,EAAE,KAAK;YACd,WAAW,EAAE,CAAC;YACd,aAAa,EAAE,CAAC;YAChB,YAAY,EAAE,CAAC;SAChB,CAAC;IACJ,CAAC;IAED,MAAM,MAAM,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC;IACnC,OAAO;QACL,OAAO,EAAE,MAAM,CAAC,SAAS;QACzB,WAAW,EAAE,MAAM,CAAC,WAAW;QAC/B,aAAa,EAAE,MAAM,CAAC,aAAa;QACnC,YAAY,EAAE,MAAM,CAAC,YAAY;KAClC,CAAC;AACJ,CAAC"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* QUIC Capable Mixin
|
|
3
|
-
*
|
|
4
|
-
* Provides QUIC coordination capabilities to agents through composition.
|
|
5
|
-
* This mixin extends BaseAgent with distributed communication features.
|
|
6
|
-
*/
|
|
7
|
-
import { EventEmitter } from 'events';
|
|
8
|
-
import { QUICConfig, QUICPeerInfo, QUICBroadcastOptions, QUICStreamOptions, QUICConnectionStats, QUICHealthCheck, IQUICTransport } from '../../types/quic';
|
|
9
|
-
export interface QUICCapable {
|
|
10
|
-
quicTransport?: IQUICTransport;
|
|
11
|
-
quicConfig?: QUICConfig;
|
|
12
|
-
enableQUIC(config: QUICConfig): Promise<void>;
|
|
13
|
-
disableQUIC(): Promise<void>;
|
|
14
|
-
isQUICEnabled(): boolean;
|
|
15
|
-
sendToAgent(agentId: string, payload: any, channel?: string): Promise<void>;
|
|
16
|
-
requestFromAgent(agentId: string, payload: any, timeout?: number): Promise<any>;
|
|
17
|
-
broadcastToFleet(payload: any, channel?: string, options?: QUICBroadcastOptions): Promise<void>;
|
|
18
|
-
discoverPeers(): Promise<QUICPeerInfo[]>;
|
|
19
|
-
getConnectedPeers(): QUICPeerInfo[];
|
|
20
|
-
openStream(streamId: string, options?: QUICStreamOptions): Promise<void>;
|
|
21
|
-
writeToStream(streamId: string, data: Buffer | string): Promise<void>;
|
|
22
|
-
closeStream(streamId: string): Promise<void>;
|
|
23
|
-
getQUICStats(): QUICConnectionStats | null;
|
|
24
|
-
getQUICHealth(): QUICHealthCheck | null;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Apply QUIC capabilities to an agent class
|
|
28
|
-
*/
|
|
29
|
-
export declare function applyQUICCapabilities<T extends new (...args: any[]) => EventEmitter>(Base: T): T & (new (...args: any[]) => QUICCapable);
|
|
30
|
-
/**
|
|
31
|
-
* Helper function to check if an object has QUIC capabilities
|
|
32
|
-
*/
|
|
33
|
-
export declare function hasQUICCapabilities(obj: any): obj is QUICCapable;
|
|
34
|
-
//# sourceMappingURL=QUICCapableMixin.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"QUICCapableMixin.d.ts","sourceRoot":"","sources":["../../../src/agents/mixins/QUICCapableMixin.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,EACL,UAAU,EAGV,YAAY,EACZ,oBAAoB,EAEpB,iBAAiB,EAEjB,mBAAmB,EACnB,eAAe,EACf,cAAc,EACf,MAAM,kBAAkB,CAAC;AAI1B,MAAM,WAAW,WAAW;IAC1B,aAAa,CAAC,EAAE,cAAc,CAAC;IAC/B,UAAU,CAAC,EAAE,UAAU,CAAC;IAExB,UAAU,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9C,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7B,aAAa,IAAI,OAAO,CA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