mcp-image 0.1.0 → 0.2.0
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/README.md +41 -17
- package/dist/api/geminiClient.d.ts +2 -12
- package/dist/api/geminiClient.d.ts.map +1 -1
- package/dist/api/geminiClient.js +28 -56
- package/dist/api/geminiClient.js.map +1 -1
- package/dist/api/geminiTextClient.d.ts +42 -0
- package/dist/api/geminiTextClient.d.ts.map +1 -0
- package/dist/api/geminiTextClient.js +198 -0
- package/dist/api/geminiTextClient.js.map +1 -0
- package/dist/business/__tests__/mocks/mcpSamplingClient.mock.d.ts +84 -0
- package/dist/business/__tests__/mocks/mcpSamplingClient.mock.d.ts.map +1 -0
- package/dist/business/__tests__/mocks/mcpSamplingClient.mock.js +100 -0
- package/dist/business/__tests__/mocks/mcpSamplingClient.mock.js.map +1 -0
- package/dist/business/bestPracticesEngine.d.ts +149 -0
- package/dist/business/bestPracticesEngine.d.ts.map +1 -0
- package/dist/business/bestPracticesEngine.js +781 -0
- package/dist/business/bestPracticesEngine.js.map +1 -0
- package/dist/business/complexityAssessment.d.ts +132 -0
- package/dist/business/complexityAssessment.d.ts.map +1 -0
- package/dist/business/complexityAssessment.js +488 -0
- package/dist/business/complexityAssessment.js.map +1 -0
- package/dist/business/fallbackStrategies.d.ts +177 -0
- package/dist/business/fallbackStrategies.d.ts.map +1 -0
- package/dist/business/fallbackStrategies.js +368 -0
- package/dist/business/fallbackStrategies.js.map +1 -0
- package/dist/business/imageGenerator.d.ts.map +1 -1
- package/dist/business/imageGenerator.js +26 -5
- package/dist/business/imageGenerator.js.map +1 -1
- package/dist/business/multiImage/aspectRatioController.d.ts +77 -0
- package/dist/business/multiImage/aspectRatioController.d.ts.map +1 -0
- package/dist/business/multiImage/aspectRatioController.js +580 -0
- package/dist/business/multiImage/aspectRatioController.js.map +1 -0
- package/dist/business/multiImage/multiImageCoordinator.d.ts +142 -0
- package/dist/business/multiImage/multiImageCoordinator.d.ts.map +1 -0
- package/dist/business/multiImage/multiImageCoordinator.js +801 -0
- package/dist/business/multiImage/multiImageCoordinator.js.map +1 -0
- package/dist/business/pomlTemplateEngine.d.ts +206 -0
- package/dist/business/pomlTemplateEngine.d.ts.map +1 -0
- package/dist/business/pomlTemplateEngine.js +737 -0
- package/dist/business/pomlTemplateEngine.js.map +1 -0
- package/dist/business/promptOrchestrator.d.ts +173 -0
- package/dist/business/promptOrchestrator.d.ts.map +1 -0
- package/dist/business/promptOrchestrator.js +490 -0
- package/dist/business/promptOrchestrator.js.map +1 -0
- package/dist/business/responseBuilder.d.ts +2 -2
- package/dist/business/responseBuilder.d.ts.map +1 -1
- package/dist/business/responseBuilder.js +6 -1
- package/dist/business/responseBuilder.js.map +1 -1
- package/dist/business/structuredPromptGenerator.d.ts +54 -0
- package/dist/business/structuredPromptGenerator.d.ts.map +1 -0
- package/dist/business/structuredPromptGenerator.js +208 -0
- package/dist/business/structuredPromptGenerator.js.map +1 -0
- package/dist/business/templateNormalizer.d.ts +81 -0
- package/dist/business/templateNormalizer.d.ts.map +1 -0
- package/dist/business/templateNormalizer.js +659 -0
- package/dist/business/templateNormalizer.js.map +1 -0
- package/dist/documentation/apiContractValidation.d.ts +62 -0
- package/dist/documentation/apiContractValidation.d.ts.map +1 -0
- package/dist/documentation/apiContractValidation.js +305 -0
- package/dist/documentation/apiContractValidation.js.map +1 -0
- package/dist/infrastructure/concurrency/concurrencyManager.d.ts +101 -0
- package/dist/infrastructure/concurrency/concurrencyManager.d.ts.map +1 -0
- package/dist/infrastructure/concurrency/concurrencyManager.js +345 -0
- package/dist/infrastructure/concurrency/concurrencyManager.js.map +1 -0
- package/dist/infrastructure/config/secureConfigManager.d.ts +319 -0
- package/dist/infrastructure/config/secureConfigManager.d.ts.map +1 -0
- package/dist/infrastructure/config/secureConfigManager.js +600 -0
- package/dist/infrastructure/config/secureConfigManager.js.map +1 -0
- package/dist/infrastructure/errorHandling/orchestrationErrorHandler.d.ts +229 -0
- package/dist/infrastructure/errorHandling/orchestrationErrorHandler.d.ts.map +1 -0
- package/dist/infrastructure/errorHandling/orchestrationErrorHandler.js +61 -0
- package/dist/infrastructure/errorHandling/orchestrationErrorHandler.js.map +1 -0
- package/dist/infrastructure/errorHandling/orchestrationErrorHandlerImpl.d.ts +133 -0
- package/dist/infrastructure/errorHandling/orchestrationErrorHandlerImpl.d.ts.map +1 -0
- package/dist/infrastructure/errorHandling/orchestrationErrorHandlerImpl.js +569 -0
- package/dist/infrastructure/errorHandling/orchestrationErrorHandlerImpl.js.map +1 -0
- package/dist/infrastructure/mcp/MCPSamplingClient.d.ts +19 -0
- package/dist/infrastructure/mcp/MCPSamplingClient.d.ts.map +1 -0
- package/dist/infrastructure/mcp/MCPSamplingClient.js +31 -0
- package/dist/infrastructure/mcp/MCPSamplingClient.js.map +1 -0
- package/dist/infrastructure/mcp/RealMCPSamplingClient.d.ts +59 -0
- package/dist/infrastructure/mcp/RealMCPSamplingClient.d.ts.map +1 -0
- package/dist/infrastructure/mcp/RealMCPSamplingClient.js +271 -0
- package/dist/infrastructure/mcp/RealMCPSamplingClient.js.map +1 -0
- package/dist/infrastructure/metadata/generationMetadata.d.ts +72 -0
- package/dist/infrastructure/metadata/generationMetadata.d.ts.map +1 -0
- package/dist/infrastructure/metadata/generationMetadata.js +228 -0
- package/dist/infrastructure/metadata/generationMetadata.js.map +1 -0
- package/dist/infrastructure/monitoring/OrchestrationMetrics.d.ts +106 -0
- package/dist/infrastructure/monitoring/OrchestrationMetrics.d.ts.map +1 -0
- package/dist/infrastructure/monitoring/OrchestrationMetrics.js +456 -0
- package/dist/infrastructure/monitoring/OrchestrationMetrics.js.map +1 -0
- package/dist/infrastructure/monitoring/alertingSystem.d.ts +135 -0
- package/dist/infrastructure/monitoring/alertingSystem.d.ts.map +1 -0
- package/dist/infrastructure/monitoring/alertingSystem.js +549 -0
- package/dist/infrastructure/monitoring/alertingSystem.js.map +1 -0
- package/dist/infrastructure/optimization/performanceOptimizer.d.ts +89 -0
- package/dist/infrastructure/optimization/performanceOptimizer.d.ts.map +1 -0
- package/dist/infrastructure/optimization/performanceOptimizer.js +375 -0
- package/dist/infrastructure/optimization/performanceOptimizer.js.map +1 -0
- package/dist/infrastructure/security/AdvancedContentFilter.d.ts +99 -0
- package/dist/infrastructure/security/AdvancedContentFilter.d.ts.map +1 -0
- package/dist/infrastructure/security/AdvancedContentFilter.js +363 -0
- package/dist/infrastructure/security/AdvancedContentFilter.js.map +1 -0
- package/dist/infrastructure/security/MCPSecurityValidator.d.ts +62 -0
- package/dist/infrastructure/security/MCPSecurityValidator.d.ts.map +1 -0
- package/dist/infrastructure/security/MCPSecurityValidator.js +129 -0
- package/dist/infrastructure/security/MCPSecurityValidator.js.map +1 -0
- package/dist/infrastructure/security/OrchestrationSecurityMiddleware.d.ts +304 -0
- package/dist/infrastructure/security/OrchestrationSecurityMiddleware.d.ts.map +1 -0
- package/dist/infrastructure/security/OrchestrationSecurityMiddleware.js +61 -0
- package/dist/infrastructure/security/OrchestrationSecurityMiddleware.js.map +1 -0
- package/dist/infrastructure/security/OrchestrationSecurityMiddlewareImpl.d.ts +62 -0
- package/dist/infrastructure/security/OrchestrationSecurityMiddlewareImpl.d.ts.map +1 -0
- package/dist/infrastructure/security/OrchestrationSecurityMiddlewareImpl.js +591 -0
- package/dist/infrastructure/security/OrchestrationSecurityMiddlewareImpl.js.map +1 -0
- package/dist/infrastructure/security/SecureMCPClient.d.ts +154 -0
- package/dist/infrastructure/security/SecureMCPClient.d.ts.map +1 -0
- package/dist/infrastructure/security/SecureMCPClient.js +292 -0
- package/dist/infrastructure/security/SecureMCPClient.js.map +1 -0
- package/dist/infrastructure/security/SecurityIncidentManager.d.ts +142 -0
- package/dist/infrastructure/security/SecurityIncidentManager.d.ts.map +1 -0
- package/dist/infrastructure/security/SecurityIncidentManager.js +260 -0
- package/dist/infrastructure/security/SecurityIncidentManager.js.map +1 -0
- package/dist/infrastructure/security/apiKeyManager.d.ts +297 -0
- package/dist/infrastructure/security/apiKeyManager.d.ts.map +1 -0
- package/dist/infrastructure/security/apiKeyManager.js +254 -0
- package/dist/infrastructure/security/apiKeyManager.js.map +1 -0
- package/dist/infrastructure/security/dataSanitizer.d.ts +157 -0
- package/dist/infrastructure/security/dataSanitizer.d.ts.map +1 -0
- package/dist/infrastructure/security/dataSanitizer.js +525 -0
- package/dist/infrastructure/security/dataSanitizer.js.map +1 -0
- package/dist/infrastructure/validation/inputValidator.d.ts +54 -0
- package/dist/infrastructure/validation/inputValidator.d.ts.map +1 -0
- package/dist/infrastructure/validation/inputValidator.js +362 -0
- package/dist/infrastructure/validation/inputValidator.js.map +1 -0
- package/dist/integration/parameterOptimizer.d.ts +69 -0
- package/dist/integration/parameterOptimizer.d.ts.map +1 -0
- package/dist/integration/parameterOptimizer.js +317 -0
- package/dist/integration/parameterOptimizer.js.map +1 -0
- package/dist/integration/twoStageProcessor.d.ts +66 -0
- package/dist/integration/twoStageProcessor.d.ts.map +1 -0
- package/dist/integration/twoStageProcessor.js +348 -0
- package/dist/integration/twoStageProcessor.js.map +1 -0
- package/dist/server/handlers/structuredPromptHandler.d.ts +65 -0
- package/dist/server/handlers/structuredPromptHandler.d.ts.map +1 -0
- package/dist/server/handlers/structuredPromptHandler.js +314 -0
- package/dist/server/handlers/structuredPromptHandler.js.map +1 -0
- package/dist/server/mcpServer.d.ts +16 -35
- package/dist/server/mcpServer.d.ts.map +1 -1
- package/dist/server/mcpServer.js +111 -150
- package/dist/server/mcpServer.js.map +1 -1
- package/dist/server/mcpServerWithOrchestration.d.ts +98 -0
- package/dist/server/mcpServerWithOrchestration.d.ts.map +1 -0
- package/dist/server/mcpServerWithOrchestration.js +284 -0
- package/dist/server/mcpServerWithOrchestration.js.map +1 -0
- package/dist/types/mcpOrchestrationTypes.d.ts +135 -0
- package/dist/types/mcpOrchestrationTypes.d.ts.map +1 -0
- package/dist/types/mcpOrchestrationTypes.js +28 -0
- package/dist/types/mcpOrchestrationTypes.js.map +1 -0
- package/dist/types/multiImageTypes.d.ts +328 -0
- package/dist/types/multiImageTypes.d.ts.map +1 -0
- package/dist/types/multiImageTypes.js +27 -0
- package/dist/types/multiImageTypes.js.map +1 -0
- package/dist/types/performanceTypes.d.ts +300 -0
- package/dist/types/performanceTypes.d.ts.map +1 -0
- package/dist/types/performanceTypes.js +50 -0
- package/dist/types/performanceTypes.js.map +1 -0
- package/dist/types/twoStageTypes.d.ts +123 -0
- package/dist/types/twoStageTypes.d.ts.map +1 -0
- package/dist/types/twoStageTypes.js +7 -0
- package/dist/types/twoStageTypes.js.map +1 -0
- package/dist/utils/config.d.ts +1 -0
- package/dist/utils/config.d.ts.map +1 -1
- package/dist/utils/config.js +1 -0
- package/dist/utils/config.js.map +1 -1
- package/package.json +11 -4
- package/vitest.config.mjs +0 -47
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Comprehensive orchestration metrics collection system
|
|
3
|
+
* Provides performance monitoring, cost tracking, and alerting capabilities
|
|
4
|
+
*/
|
|
5
|
+
import { type AlertStatus, type CostAnalysis, type CurrentMetrics, type FallbackTier, type OrchestrationMetrics as IOrchestrationMetrics, type MemoryMetrics, type PerformanceReport, ProcessingStage, ReportingPeriod, type TimeRange } from '../../types/performanceTypes';
|
|
6
|
+
/**
|
|
7
|
+
* OrchestrationMetrics implementation
|
|
8
|
+
* Comprehensive monitoring system for structured prompt generation performance
|
|
9
|
+
*/
|
|
10
|
+
export declare class OrchestrationMetrics implements IOrchestrationMetrics {
|
|
11
|
+
private performanceRecords;
|
|
12
|
+
private memoryRecords;
|
|
13
|
+
private apiUsageRecords;
|
|
14
|
+
private errorRecords;
|
|
15
|
+
private fallbackEvents;
|
|
16
|
+
private alertStatuses;
|
|
17
|
+
private readonly maxRecords;
|
|
18
|
+
private readonly cleanupInterval;
|
|
19
|
+
private cleanupTimer;
|
|
20
|
+
constructor();
|
|
21
|
+
/**
|
|
22
|
+
* Record processing time for a specific stage
|
|
23
|
+
*/
|
|
24
|
+
recordProcessingTime(stage: ProcessingStage, duration: number): void;
|
|
25
|
+
/**
|
|
26
|
+
* Record memory usage for an operation
|
|
27
|
+
*/
|
|
28
|
+
recordMemoryUsage(operation: string, usage: MemoryMetrics): void;
|
|
29
|
+
/**
|
|
30
|
+
* Record API call with cost and success information
|
|
31
|
+
*/
|
|
32
|
+
recordAPICall(client: string, cost: number, success: boolean, tokens?: number): void;
|
|
33
|
+
/**
|
|
34
|
+
* Record fallback event
|
|
35
|
+
*/
|
|
36
|
+
recordFallbackEvent(tier: FallbackTier, reason: string): void;
|
|
37
|
+
/**
|
|
38
|
+
* Record error occurrence
|
|
39
|
+
*/
|
|
40
|
+
recordError(stage: ProcessingStage, error: Error): void;
|
|
41
|
+
/**
|
|
42
|
+
* Generate comprehensive performance report
|
|
43
|
+
*/
|
|
44
|
+
getPerformanceReport(timeRange: TimeRange): Promise<PerformanceReport>;
|
|
45
|
+
/**
|
|
46
|
+
* Generate cost analysis report
|
|
47
|
+
*/
|
|
48
|
+
getCostAnalysis(period: ReportingPeriod): Promise<CostAnalysis>;
|
|
49
|
+
/**
|
|
50
|
+
* Get current alert status for all configured alerts
|
|
51
|
+
*/
|
|
52
|
+
getAlertStatus(): Promise<AlertStatus[]>;
|
|
53
|
+
/**
|
|
54
|
+
* Get current metrics snapshot
|
|
55
|
+
*/
|
|
56
|
+
getCurrentMetrics(): CurrentMetrics;
|
|
57
|
+
/**
|
|
58
|
+
* Calculate memory efficiency metrics
|
|
59
|
+
*/
|
|
60
|
+
private calculateMemoryEfficiency;
|
|
61
|
+
/**
|
|
62
|
+
* Analyze performance bottlenecks
|
|
63
|
+
*/
|
|
64
|
+
private analyzeBottlenecks;
|
|
65
|
+
/**
|
|
66
|
+
* Generate optimization recommendations for a stage
|
|
67
|
+
*/
|
|
68
|
+
private generateOptimizationRecommendations;
|
|
69
|
+
/**
|
|
70
|
+
* Detect memory leaks from memory usage patterns
|
|
71
|
+
*/
|
|
72
|
+
private detectMemoryLeaks;
|
|
73
|
+
/**
|
|
74
|
+
* Calculate garbage collection impact
|
|
75
|
+
*/
|
|
76
|
+
private calculateGCImpact;
|
|
77
|
+
/**
|
|
78
|
+
* Generate cost optimization suggestions
|
|
79
|
+
*/
|
|
80
|
+
private generateOptimizationSuggestions;
|
|
81
|
+
/**
|
|
82
|
+
* Detect cost anomalies
|
|
83
|
+
*/
|
|
84
|
+
private detectCostAnomalies;
|
|
85
|
+
/**
|
|
86
|
+
* Project monthly cost based on period data
|
|
87
|
+
*/
|
|
88
|
+
private projectMonthlyCost;
|
|
89
|
+
/**
|
|
90
|
+
* Get time range for reporting period
|
|
91
|
+
*/
|
|
92
|
+
private getTimeRangeForPeriod;
|
|
93
|
+
/**
|
|
94
|
+
* Maintain record limits to prevent memory issues
|
|
95
|
+
*/
|
|
96
|
+
private maintainRecordLimit;
|
|
97
|
+
/**
|
|
98
|
+
* Start cleanup timer for old records
|
|
99
|
+
*/
|
|
100
|
+
private startCleanupTimer;
|
|
101
|
+
/**
|
|
102
|
+
* Cleanup resources
|
|
103
|
+
*/
|
|
104
|
+
destroy(): void;
|
|
105
|
+
}
|
|
106
|
+
//# sourceMappingURL=OrchestrationMetrics.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OrchestrationMetrics.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/monitoring/OrchestrationMetrics.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAEL,KAAK,WAAW,EAEhB,KAAK,YAAY,EAEjB,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,oBAAoB,IAAI,qBAAqB,EAGlD,KAAK,aAAa,EAElB,KAAK,iBAAiB,EACtB,eAAe,EACf,eAAe,EACf,KAAK,SAAS,EACf,MAAM,8BAA8B,CAAA;AAgCrC;;;GAGG;AACH,qBAAa,oBAAqB,YAAW,qBAAqB;IAChE,OAAO,CAAC,kBAAkB,CAAgC;IAC1D,OAAO,CAAC,aAAa,CAA0B;IAC/C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C;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAmC3B;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAe1B;;OAEG;IACH,OAAO,CAAC,qBAAqB;IAe7B;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAe3B;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAYzB;;OAEG;IACH,OAAO,IAAI,IAAI;CAahB"}
|
|
@@ -0,0 +1,456 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Comprehensive orchestration metrics collection system
|
|
4
|
+
* Provides performance monitoring, cost tracking, and alerting capabilities
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.OrchestrationMetrics = void 0;
|
|
8
|
+
const performanceTypes_1 = require("../../types/performanceTypes");
|
|
9
|
+
/**
|
|
10
|
+
* OrchestrationMetrics implementation
|
|
11
|
+
* Comprehensive monitoring system for structured prompt generation performance
|
|
12
|
+
*/
|
|
13
|
+
class OrchestrationMetrics {
|
|
14
|
+
constructor() {
|
|
15
|
+
this.performanceRecords = [];
|
|
16
|
+
this.memoryRecords = [];
|
|
17
|
+
this.apiUsageRecords = [];
|
|
18
|
+
this.errorRecords = [];
|
|
19
|
+
this.fallbackEvents = [];
|
|
20
|
+
this.alertStatuses = new Map();
|
|
21
|
+
// Configuration
|
|
22
|
+
this.maxRecords = 10000; // Maximum records to keep in memory
|
|
23
|
+
this.cleanupInterval = 60000; // Cleanup interval in milliseconds
|
|
24
|
+
this.startCleanupTimer();
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Record processing time for a specific stage
|
|
28
|
+
*/
|
|
29
|
+
recordProcessingTime(stage, duration) {
|
|
30
|
+
const record = {
|
|
31
|
+
timestamp: Date.now(),
|
|
32
|
+
stage,
|
|
33
|
+
duration,
|
|
34
|
+
success: true,
|
|
35
|
+
};
|
|
36
|
+
this.performanceRecords.push(record);
|
|
37
|
+
this.maintainRecordLimit();
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Record memory usage for an operation
|
|
41
|
+
*/
|
|
42
|
+
recordMemoryUsage(operation, usage) {
|
|
43
|
+
const record = {
|
|
44
|
+
timestamp: Date.now(),
|
|
45
|
+
operation,
|
|
46
|
+
metrics: usage,
|
|
47
|
+
};
|
|
48
|
+
this.memoryRecords.push(record);
|
|
49
|
+
this.maintainRecordLimit();
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Record API call with cost and success information
|
|
53
|
+
*/
|
|
54
|
+
recordAPICall(client, cost, success, tokens = 0) {
|
|
55
|
+
const record = {
|
|
56
|
+
timestamp: Date.now(),
|
|
57
|
+
client,
|
|
58
|
+
operation: 'api_call',
|
|
59
|
+
tokens,
|
|
60
|
+
cost,
|
|
61
|
+
success,
|
|
62
|
+
processingTime: 0, // Will be updated by performance tracking
|
|
63
|
+
};
|
|
64
|
+
this.apiUsageRecords.push(record);
|
|
65
|
+
this.maintainRecordLimit();
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Record fallback event
|
|
69
|
+
*/
|
|
70
|
+
recordFallbackEvent(tier, reason) {
|
|
71
|
+
this.fallbackEvents.push({
|
|
72
|
+
timestamp: Date.now(),
|
|
73
|
+
tier,
|
|
74
|
+
reason,
|
|
75
|
+
});
|
|
76
|
+
// Mark related performance records with fallback tier
|
|
77
|
+
const recentRecords = this.performanceRecords.filter((r) => Date.now() - r.timestamp < 10000 // Last 10 seconds
|
|
78
|
+
);
|
|
79
|
+
for (const record of recentRecords) {
|
|
80
|
+
record.fallbackTier = tier;
|
|
81
|
+
}
|
|
82
|
+
this.maintainRecordLimit();
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Record error occurrence
|
|
86
|
+
*/
|
|
87
|
+
recordError(stage, error) {
|
|
88
|
+
const record = {
|
|
89
|
+
timestamp: Date.now(),
|
|
90
|
+
stage,
|
|
91
|
+
error: error.message,
|
|
92
|
+
stack: error.stack,
|
|
93
|
+
};
|
|
94
|
+
this.errorRecords.push(record);
|
|
95
|
+
// Mark corresponding performance records as failed
|
|
96
|
+
const recentRecords = this.performanceRecords.filter((r) => r.stage === stage && Date.now() - r.timestamp < 5000 // Last 5 seconds
|
|
97
|
+
);
|
|
98
|
+
for (const record of recentRecords) {
|
|
99
|
+
record.success = false;
|
|
100
|
+
}
|
|
101
|
+
this.maintainRecordLimit();
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Generate comprehensive performance report
|
|
105
|
+
*/
|
|
106
|
+
async getPerformanceReport(timeRange) {
|
|
107
|
+
const filteredRecords = this.performanceRecords.filter((record) => record.timestamp >= timeRange.start && record.timestamp <= timeRange.end);
|
|
108
|
+
const successfulRecords = filteredRecords.filter((r) => r.success);
|
|
109
|
+
const durations = successfulRecords.map((r) => r.duration);
|
|
110
|
+
const averageProcessingTime = durations.length > 0 ? durations.reduce((sum, d) => sum + d, 0) / durations.length : 0;
|
|
111
|
+
// Calculate 95th percentile
|
|
112
|
+
const sortedDurations = [...durations].sort((a, b) => a - b);
|
|
113
|
+
const p95Index = Math.floor(sortedDurations.length * 0.95);
|
|
114
|
+
const p95ProcessingTime = sortedDurations[p95Index] || 0;
|
|
115
|
+
const successRate = filteredRecords.length > 0 ? successfulRecords.length / filteredRecords.length : 1;
|
|
116
|
+
const fallbackRecords = filteredRecords.filter((r) => r.fallbackTier !== undefined);
|
|
117
|
+
const fallbackRate = filteredRecords.length > 0 ? fallbackRecords.length / filteredRecords.length : 0;
|
|
118
|
+
const memoryEfficiency = await this.calculateMemoryEfficiency(timeRange);
|
|
119
|
+
const bottleneckAnalysis = this.analyzeBottlenecks(filteredRecords);
|
|
120
|
+
return {
|
|
121
|
+
averageProcessingTime,
|
|
122
|
+
p95ProcessingTime,
|
|
123
|
+
successRate,
|
|
124
|
+
fallbackRate,
|
|
125
|
+
memoryEfficiency,
|
|
126
|
+
bottleneckAnalysis,
|
|
127
|
+
totalRequests: filteredRecords.length,
|
|
128
|
+
timeRange,
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Generate cost analysis report
|
|
133
|
+
*/
|
|
134
|
+
async getCostAnalysis(period) {
|
|
135
|
+
const timeRange = this.getTimeRangeForPeriod(period);
|
|
136
|
+
const filteredUsage = this.apiUsageRecords.filter((record) => record.timestamp >= timeRange.start && record.timestamp <= timeRange.end);
|
|
137
|
+
const totalCost = filteredUsage.reduce((sum, record) => sum + record.cost, 0);
|
|
138
|
+
const costByClient = filteredUsage.reduce((acc, record) => {
|
|
139
|
+
acc[record.client] = (acc[record.client] || 0) + record.cost;
|
|
140
|
+
return acc;
|
|
141
|
+
}, {});
|
|
142
|
+
const projectedMonthlyCost = this.projectMonthlyCost(filteredUsage, period);
|
|
143
|
+
const costOptimizationSuggestions = this.generateOptimizationSuggestions(filteredUsage);
|
|
144
|
+
const anomalyDetection = this.detectCostAnomalies(filteredUsage);
|
|
145
|
+
return {
|
|
146
|
+
totalCost,
|
|
147
|
+
costByClient,
|
|
148
|
+
projectedMonthlyCost,
|
|
149
|
+
costOptimizationSuggestions,
|
|
150
|
+
anomalyDetection,
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Get current alert status for all configured alerts
|
|
155
|
+
*/
|
|
156
|
+
async getAlertStatus() {
|
|
157
|
+
return Array.from(this.alertStatuses.values());
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Get current metrics snapshot
|
|
161
|
+
*/
|
|
162
|
+
getCurrentMetrics() {
|
|
163
|
+
const now = Date.now();
|
|
164
|
+
const recentWindow = 300000; // 5 minutes
|
|
165
|
+
const recentPerformance = this.performanceRecords.filter((r) => now - r.timestamp < recentWindow);
|
|
166
|
+
const processingTime = {};
|
|
167
|
+
for (const stage of Object.values(performanceTypes_1.ProcessingStage)) {
|
|
168
|
+
processingTime[stage] = recentPerformance
|
|
169
|
+
.filter((r) => r.stage === stage && r.success)
|
|
170
|
+
.map((r) => r.duration);
|
|
171
|
+
}
|
|
172
|
+
const recentMemory = this.memoryRecords[this.memoryRecords.length - 1]?.metrics || {
|
|
173
|
+
heapUsed: 0,
|
|
174
|
+
heapTotal: 0,
|
|
175
|
+
external: 0,
|
|
176
|
+
arrayBuffers: 0,
|
|
177
|
+
timestamp: now,
|
|
178
|
+
};
|
|
179
|
+
const recentErrors = this.errorRecords.filter((e) => now - e.timestamp < recentWindow);
|
|
180
|
+
const recentSuccess = recentPerformance.filter((r) => r.success);
|
|
181
|
+
const recentCost = this.apiUsageRecords
|
|
182
|
+
.filter((r) => now - r.timestamp < recentWindow)
|
|
183
|
+
.reduce((sum, r) => sum + r.cost, 0);
|
|
184
|
+
return {
|
|
185
|
+
processingTime,
|
|
186
|
+
memoryUsage: recentMemory,
|
|
187
|
+
errorCount: recentErrors.length,
|
|
188
|
+
successCount: recentSuccess.length,
|
|
189
|
+
totalCost: recentCost,
|
|
190
|
+
activeRequests: 0, // Would be tracked by request manager
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Calculate memory efficiency metrics
|
|
195
|
+
*/
|
|
196
|
+
async calculateMemoryEfficiency(timeRange) {
|
|
197
|
+
const filteredMemoryRecords = this.memoryRecords.filter((record) => record.timestamp >= timeRange.start && record.timestamp <= timeRange.end);
|
|
198
|
+
if (filteredMemoryRecords.length === 0) {
|
|
199
|
+
return {
|
|
200
|
+
peakMemoryUsage: 0,
|
|
201
|
+
averageMemoryUsage: 0,
|
|
202
|
+
memoryLeaks: [],
|
|
203
|
+
garbageCollectionImpact: 0,
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
const heapUsages = filteredMemoryRecords.map((r) => r.metrics.heapUsed);
|
|
207
|
+
const peakMemoryUsage = Math.max(...heapUsages);
|
|
208
|
+
const averageMemoryUsage = heapUsages.reduce((sum, usage) => sum + usage, 0) / heapUsages.length;
|
|
209
|
+
const memoryLeaks = this.detectMemoryLeaks(filteredMemoryRecords);
|
|
210
|
+
const garbageCollectionImpact = this.calculateGCImpact(filteredMemoryRecords);
|
|
211
|
+
return {
|
|
212
|
+
peakMemoryUsage,
|
|
213
|
+
averageMemoryUsage,
|
|
214
|
+
memoryLeaks,
|
|
215
|
+
garbageCollectionImpact,
|
|
216
|
+
};
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* Analyze performance bottlenecks
|
|
220
|
+
*/
|
|
221
|
+
analyzeBottlenecks(records) {
|
|
222
|
+
const stageGroups = records.reduce((acc, record) => {
|
|
223
|
+
if (!acc[record.stage])
|
|
224
|
+
acc[record.stage] = [];
|
|
225
|
+
acc[record.stage].push(record);
|
|
226
|
+
return acc;
|
|
227
|
+
}, {});
|
|
228
|
+
const totalTime = records.reduce((sum, r) => sum + r.duration, 0);
|
|
229
|
+
return Object.entries(stageGroups)
|
|
230
|
+
.map(([stage, stageRecords]) => {
|
|
231
|
+
const stageDurations = stageRecords.map((r) => r.duration);
|
|
232
|
+
const avgDuration = stageDurations.reduce((sum, d) => sum + d, 0) / stageDurations.length;
|
|
233
|
+
const stageTotal = stageDurations.reduce((sum, d) => sum + d, 0);
|
|
234
|
+
const impactPercentage = totalTime > 0 ? (stageTotal / totalTime) * 100 : 0;
|
|
235
|
+
const recommendedOptimizations = this.generateOptimizationRecommendations(stage, avgDuration);
|
|
236
|
+
return {
|
|
237
|
+
stage: stage,
|
|
238
|
+
avgDuration,
|
|
239
|
+
impactPercentage,
|
|
240
|
+
recommendedOptimizations,
|
|
241
|
+
};
|
|
242
|
+
})
|
|
243
|
+
.sort((a, b) => b.impactPercentage - a.impactPercentage);
|
|
244
|
+
}
|
|
245
|
+
/**
|
|
246
|
+
* Generate optimization recommendations for a stage
|
|
247
|
+
*/
|
|
248
|
+
generateOptimizationRecommendations(stage, avgDuration) {
|
|
249
|
+
const recommendations = [];
|
|
250
|
+
if (avgDuration > 10000) {
|
|
251
|
+
// More than 10 seconds
|
|
252
|
+
switch (stage) {
|
|
253
|
+
case performanceTypes_1.ProcessingStage.PROMPT_GENERATION:
|
|
254
|
+
recommendations.push('Consider prompt caching for similar requests');
|
|
255
|
+
recommendations.push('Implement prompt template optimization');
|
|
256
|
+
break;
|
|
257
|
+
case performanceTypes_1.ProcessingStage.IMAGE_GENERATION:
|
|
258
|
+
recommendations.push('Optimize image generation parameters');
|
|
259
|
+
recommendations.push('Consider image size optimization');
|
|
260
|
+
break;
|
|
261
|
+
case performanceTypes_1.ProcessingStage.POML_PROCESSING:
|
|
262
|
+
recommendations.push('Cache POML processing results');
|
|
263
|
+
recommendations.push('Optimize POML parsing algorithms');
|
|
264
|
+
break;
|
|
265
|
+
default:
|
|
266
|
+
recommendations.push('Consider parallel processing where possible');
|
|
267
|
+
recommendations.push('Implement intelligent caching');
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
if (recommendations.length === 0) {
|
|
271
|
+
recommendations.push('Performance within acceptable limits');
|
|
272
|
+
}
|
|
273
|
+
return recommendations;
|
|
274
|
+
}
|
|
275
|
+
/**
|
|
276
|
+
* Detect memory leaks from memory usage patterns
|
|
277
|
+
*/
|
|
278
|
+
detectMemoryLeaks(records) {
|
|
279
|
+
const leaks = [];
|
|
280
|
+
if (records.length < 10)
|
|
281
|
+
return leaks;
|
|
282
|
+
// Simple trend analysis - if memory consistently increases
|
|
283
|
+
const recentRecords = records.slice(-10);
|
|
284
|
+
const firstUsage = recentRecords[0]?.metrics.heapUsed || 0;
|
|
285
|
+
const lastUsage = recentRecords[recentRecords.length - 1]?.metrics.heapUsed || 0;
|
|
286
|
+
const trend = lastUsage - firstUsage;
|
|
287
|
+
if (trend > 50 * 1024 * 1024) {
|
|
288
|
+
// 50MB increase
|
|
289
|
+
leaks.push({
|
|
290
|
+
suspectedLocation: 'general_processing',
|
|
291
|
+
leakRate: trend / recentRecords.length,
|
|
292
|
+
severity: trend > 100 * 1024 * 1024 ? 'high' : 'medium',
|
|
293
|
+
});
|
|
294
|
+
}
|
|
295
|
+
return leaks;
|
|
296
|
+
}
|
|
297
|
+
/**
|
|
298
|
+
* Calculate garbage collection impact
|
|
299
|
+
*/
|
|
300
|
+
calculateGCImpact(records) {
|
|
301
|
+
if (records.length < 2)
|
|
302
|
+
return 0;
|
|
303
|
+
// Look for sudden memory drops (GC events)
|
|
304
|
+
let gcEvents = 0;
|
|
305
|
+
let totalDrop = 0;
|
|
306
|
+
for (let i = 1; i < records.length; i++) {
|
|
307
|
+
const prevUsage = records[i - 1]?.metrics.heapUsed || 0;
|
|
308
|
+
const currentUsage = records[i]?.metrics.heapUsed || 0;
|
|
309
|
+
const drop = prevUsage - currentUsage;
|
|
310
|
+
if (drop > 10 * 1024 * 1024) {
|
|
311
|
+
// 10MB drop suggests GC
|
|
312
|
+
gcEvents++;
|
|
313
|
+
totalDrop += drop;
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
return gcEvents > 0 ? totalDrop / records.length : 0;
|
|
317
|
+
}
|
|
318
|
+
/**
|
|
319
|
+
* Generate cost optimization suggestions
|
|
320
|
+
*/
|
|
321
|
+
generateOptimizationSuggestions(usage) {
|
|
322
|
+
const suggestions = [];
|
|
323
|
+
const failedCalls = usage.filter((r) => !r.success);
|
|
324
|
+
if (failedCalls.length > usage.length * 0.05) {
|
|
325
|
+
// More than 5% failure rate
|
|
326
|
+
suggestions.push({
|
|
327
|
+
type: 'reduce_fallback',
|
|
328
|
+
description: 'High failure rate detected - improve error handling and retry logic',
|
|
329
|
+
potentialSavings: failedCalls.reduce((sum, r) => sum + r.cost, 0),
|
|
330
|
+
implementationEffort: 'medium',
|
|
331
|
+
});
|
|
332
|
+
}
|
|
333
|
+
// Check for duplicate expensive calls (potential caching opportunity)
|
|
334
|
+
const expensiveCalls = usage.filter((r) => r.cost > 0.01); // Calls costing more than 1 cent
|
|
335
|
+
if (expensiveCalls.length > 10) {
|
|
336
|
+
suggestions.push({
|
|
337
|
+
type: 'improve_caching',
|
|
338
|
+
description: 'Multiple expensive API calls detected - implement intelligent caching',
|
|
339
|
+
potentialSavings: expensiveCalls.reduce((sum, r) => sum + r.cost, 0) * 0.3, // Assume 30% savings
|
|
340
|
+
implementationEffort: 'low',
|
|
341
|
+
});
|
|
342
|
+
}
|
|
343
|
+
return suggestions;
|
|
344
|
+
}
|
|
345
|
+
/**
|
|
346
|
+
* Detect cost anomalies
|
|
347
|
+
*/
|
|
348
|
+
detectCostAnomalies(usage) {
|
|
349
|
+
const anomalies = [];
|
|
350
|
+
if (usage.length === 0)
|
|
351
|
+
return anomalies;
|
|
352
|
+
const avgCost = usage.reduce((sum, r) => sum + r.cost, 0) / usage.length;
|
|
353
|
+
const totalCost = usage.reduce((sum, r) => sum + r.cost, 0);
|
|
354
|
+
// Check for cost spikes
|
|
355
|
+
const expensiveCalls = usage.filter((r) => r.cost > avgCost * 10);
|
|
356
|
+
if (expensiveCalls.length > 0) {
|
|
357
|
+
anomalies.push({
|
|
358
|
+
timestamp: Date.now(),
|
|
359
|
+
type: 'spike',
|
|
360
|
+
description: `Detected ${expensiveCalls.length} API calls with unusually high cost`,
|
|
361
|
+
severity: expensiveCalls.length > 5 ? 'high' : 'medium',
|
|
362
|
+
estimatedImpact: expensiveCalls.reduce((sum, r) => sum + r.cost, 0),
|
|
363
|
+
});
|
|
364
|
+
}
|
|
365
|
+
// Check for budget concerns (example threshold)
|
|
366
|
+
const dailyBudget = 10.0; // $10 daily budget example
|
|
367
|
+
if (totalCost > dailyBudget * 0.8) {
|
|
368
|
+
anomalies.push({
|
|
369
|
+
timestamp: Date.now(),
|
|
370
|
+
type: 'budget_exceeded',
|
|
371
|
+
description: `Cost approaching daily budget limit: $${totalCost.toFixed(2)} of $${dailyBudget}`,
|
|
372
|
+
severity: totalCost > dailyBudget ? 'critical' : 'medium',
|
|
373
|
+
estimatedImpact: totalCost - dailyBudget,
|
|
374
|
+
});
|
|
375
|
+
}
|
|
376
|
+
return anomalies;
|
|
377
|
+
}
|
|
378
|
+
/**
|
|
379
|
+
* Project monthly cost based on period data
|
|
380
|
+
*/
|
|
381
|
+
projectMonthlyCost(usage, period) {
|
|
382
|
+
if (usage.length === 0)
|
|
383
|
+
return 0;
|
|
384
|
+
const totalCost = usage.reduce((sum, r) => sum + r.cost, 0);
|
|
385
|
+
const multipliers = {
|
|
386
|
+
[performanceTypes_1.ReportingPeriod.LAST_HOUR]: 24 * 30, // Hour to month
|
|
387
|
+
[performanceTypes_1.ReportingPeriod.LAST_DAY]: 30, // Day to month
|
|
388
|
+
[performanceTypes_1.ReportingPeriod.LAST_WEEK]: 4.33, // Week to month
|
|
389
|
+
[performanceTypes_1.ReportingPeriod.LAST_MONTH]: 1, // Already monthly
|
|
390
|
+
};
|
|
391
|
+
return totalCost * (multipliers[period] || 1);
|
|
392
|
+
}
|
|
393
|
+
/**
|
|
394
|
+
* Get time range for reporting period
|
|
395
|
+
*/
|
|
396
|
+
getTimeRangeForPeriod(period) {
|
|
397
|
+
const now = Date.now();
|
|
398
|
+
const periods = {
|
|
399
|
+
[performanceTypes_1.ReportingPeriod.LAST_HOUR]: 60 * 60 * 1000,
|
|
400
|
+
[performanceTypes_1.ReportingPeriod.LAST_DAY]: 24 * 60 * 60 * 1000,
|
|
401
|
+
[performanceTypes_1.ReportingPeriod.LAST_WEEK]: 7 * 24 * 60 * 60 * 1000,
|
|
402
|
+
[performanceTypes_1.ReportingPeriod.LAST_MONTH]: 30 * 24 * 60 * 60 * 1000,
|
|
403
|
+
};
|
|
404
|
+
return {
|
|
405
|
+
start: now - periods[period],
|
|
406
|
+
end: now,
|
|
407
|
+
};
|
|
408
|
+
}
|
|
409
|
+
/**
|
|
410
|
+
* Maintain record limits to prevent memory issues
|
|
411
|
+
*/
|
|
412
|
+
maintainRecordLimit() {
|
|
413
|
+
if (this.performanceRecords.length > this.maxRecords) {
|
|
414
|
+
this.performanceRecords = this.performanceRecords.slice(-this.maxRecords / 2);
|
|
415
|
+
}
|
|
416
|
+
if (this.memoryRecords.length > this.maxRecords) {
|
|
417
|
+
this.memoryRecords = this.memoryRecords.slice(-this.maxRecords / 2);
|
|
418
|
+
}
|
|
419
|
+
if (this.apiUsageRecords.length > this.maxRecords) {
|
|
420
|
+
this.apiUsageRecords = this.apiUsageRecords.slice(-this.maxRecords / 2);
|
|
421
|
+
}
|
|
422
|
+
if (this.errorRecords.length > this.maxRecords) {
|
|
423
|
+
this.errorRecords = this.errorRecords.slice(-this.maxRecords / 2);
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
/**
|
|
427
|
+
* Start cleanup timer for old records
|
|
428
|
+
*/
|
|
429
|
+
startCleanupTimer() {
|
|
430
|
+
this.cleanupTimer = setInterval(() => {
|
|
431
|
+
const cutoff = Date.now() - 24 * 60 * 60 * 1000; // 24 hours
|
|
432
|
+
this.performanceRecords = this.performanceRecords.filter((r) => r.timestamp > cutoff);
|
|
433
|
+
this.memoryRecords = this.memoryRecords.filter((r) => r.timestamp > cutoff);
|
|
434
|
+
this.apiUsageRecords = this.apiUsageRecords.filter((r) => r.timestamp > cutoff);
|
|
435
|
+
this.errorRecords = this.errorRecords.filter((r) => r.timestamp > cutoff);
|
|
436
|
+
this.fallbackEvents = this.fallbackEvents.filter((r) => r.timestamp > cutoff);
|
|
437
|
+
}, this.cleanupInterval);
|
|
438
|
+
}
|
|
439
|
+
/**
|
|
440
|
+
* Cleanup resources
|
|
441
|
+
*/
|
|
442
|
+
destroy() {
|
|
443
|
+
if (this.cleanupTimer) {
|
|
444
|
+
clearInterval(this.cleanupTimer);
|
|
445
|
+
this.cleanupTimer = undefined;
|
|
446
|
+
}
|
|
447
|
+
this.performanceRecords = [];
|
|
448
|
+
this.memoryRecords = [];
|
|
449
|
+
this.apiUsageRecords = [];
|
|
450
|
+
this.errorRecords = [];
|
|
451
|
+
this.fallbackEvents = [];
|
|
452
|
+
this.alertStatuses.clear();
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
exports.OrchestrationMetrics = OrchestrationMetrics;
|
|
456
|
+
//# sourceMappingURL=OrchestrationMetrics.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OrchestrationMetrics.js","sourceRoot":"","sources":["../../../src/infrastructure/monitoring/OrchestrationMetrics.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,mEAiBqC;AAgCrC;;;GAGG;AACH,MAAa,oBAAoB;IAa/B;QAZQ,uBAAkB,GAA8B,EAAE,CAAA;QAClD,kBAAa,GAAwB,EAAE,CAAA;QACvC,oBAAe,GAAqB,EAAE,CAAA;QACtC,iBAAY,GAAkB,EAAE,CAAA;QAChC,mBAAc,GAAqE,EAAE,CAAA;QACrF,kBAAa,GAA6B,IAAI,GAAG,EAAE,CAAA;QAE3D,gBAAgB;QACC,eAAU,GAAG,KAAK,CAAA,CAAC,oCAAoC;QACvD,oBAAe,GAAG,KAAK,CAAA,CAAC,mCAAmC;QAI1E,IAAI,CAAC,iBAAiB,EAAE,CAAA;IAC1B,CAAC;IAED;;OAEG;IACH,oBAAoB,CAAC,KAAsB,EAAE,QAAgB;QAC3D,MAAM,MAAM,GAA4B;YACtC,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;YACrB,KAAK;YACL,QAAQ;YACR,OAAO,EAAE,IAAI;SACd,CAAA;QAED,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;QACpC,IAAI,CAAC,mBAAmB,EAAE,CAAA;IAC5B,CAAC;IAED;;OAEG;IACH,iBAAiB,CAAC,SAAiB,EAAE,KAAoB;QACvD,MAAM,MAAM,GAAsB;YAChC,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;YACrB,SAAS;YACT,OAAO,EAAE,KAAK;SACf,CAAA;QAED,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;QAC/B,IAAI,CAAC,mBAAmB,EAAE,CAAA;IAC5B,CAAC;IAED;;OAEG;IACH,aAAa,CAAC,MAAc,EAAE,IAAY,EAAE,OAAgB,EAAE,MAAM,GAAG,CAAC;QACtE,MAAM,MAAM,GAAmB;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