/** * Agentic QE v3 - Production Intelligence Service * Gathers and analyzes production intelligence for learning optimization */ import { Result, DomainName } from '../../../shared/types/index.js'; import { MemoryBackend } from '../../../kernel/interfaces.js'; import { TimeRange } from '../../../shared/value-objects/index.js'; import { MinedInsights, TrendPoint, Milestone } from '../interfaces.js'; /** * Configuration for production intelligence */ export interface ProductionIntelConfig { metricsRetentionDays: number; anomalyThreshold: number; trendWindowSize: number; alertThresholds: Record; } /** * Production metric snapshot */ export interface ProductionMetric { readonly id: string; readonly name: string; readonly value: number; readonly unit: string; readonly domain: DomainName; readonly tags: string[]; readonly timestamp: Date; } /** * Production incident for learning */ export interface ProductionIncident { readonly id: string; readonly severity: 'critical' | 'high' | 'medium' | 'low'; readonly title: string; readonly description: string; readonly domain: DomainName; readonly metrics: Record; readonly rootCause?: string; readonly resolution?: string; readonly startedAt: Date; readonly resolvedAt?: Date; } /** * Production health summary */ export interface ProductionHealth { readonly overall: 'healthy' | 'degraded' | 'unhealthy'; readonly domains: Record; activeIncidents: number; }>; readonly metrics: Record; readonly trends: TrendPoint[]; readonly recentIncidents: ProductionIncident[]; readonly recommendations: string[]; } /** * Production Intelligence Service * Collects and analyzes production data for learning optimization */ export declare class ProductionIntelService { private readonly memory; private readonly config; constructor(memory: MemoryBackend, config?: Partial); /** * Record a production metric */ recordMetric(name: string, value: number, unit: string, domain: DomainName, tags?: string[]): Promise>; /** * Record multiple metrics in batch */ recordMetricsBatch(metrics: Array<{ name: string; value: number; unit: string; domain: DomainName; tags?: string[]; }>): Promise>; /** * Get metrics history for a specific metric name */ getMetricsHistory(metricName: string, timeRange: TimeRange, domain?: DomainName): Promise>; /** * Record a production incident */ recordIncident(severity: ProductionIncident['severity'], title: string, description: string, domain: DomainName, metrics: Record): Promise>; /** * Resolve an incident */ resolveIncident(incidentId: string, rootCause: string, resolution: string): Promise>; /** * Get recent incidents */ getRecentIncidents(limit?: number, domain?: DomainName): Promise>; /** * Get current production health status */ getProductionHealth(): Promise>; /** * Get health status for a specific domain */ private getDomainHealth; /** * Calculate metric trends */ private calculateTrends; /** * Generate health recommendations */ private generateHealthRecommendations; /** * Extract insights from production data */ extractInsights(timeRange: TimeRange, domain?: DomainName): Promise>; /** * Record production milestone */ recordMilestone(name: string, domain: DomainName, metrics?: Record): Promise>; /** * Get recent milestones */ getRecentMilestones(limit?: number): Promise>; private indexMetric; private indexIncident; private checkForAnomalies; private createExperienceFromIncident; private updateExperienceWithResolution; private calculateIncidentReward; private calculateRewardFromIncidents; private generateInsightRecommendations; private detectMetricAnomalies; private calculateTrendDirection; } //# sourceMappingURL=production-intel.d.ts.map