UNPKG

@bonginkan/maria

Version:

MARIA OS v5.9.5 – Self-Evolving Organizational Intelligence OS | Speed Improvement Phase 3: LLM Optimization + Command Refactoring | Performance Measurement + Run Evidence System | Zero ESLint/TypeScript Errors | 人とAIが役割を持ち、学び、進化し続けるための仕事のOS | GraphRAG ×

59 lines (58 loc) 1.78 kB
import { EventEmitter } from "node:events"; export interface AnomalyConfig { windowSize?: number; threshold?: number; minDataPoints?: number; modelType?: "isolation-forest" | "autoencoder" | "lstm"; updateInterval?: number; } export interface MetricPoint { timestamp: number; value: number; metadata?: Record<string, unknown>; } export interface AnomalyResult { isAnomaly: boolean; score: number; expectedRange: [number, number]; actualValue: number; timestamp: number; metric: string; severity: "low" | "medium" | "high" | "critical"; } export declare class AnomalyDetector extends EventEmitter { private windowSize; private threshold; private minDataPoints; private modelType; private models; private dataBuffers; private statistics; private updateInterval; private updateTimer?; constructor(config?: AnomalyConfig); private startUpdateTimer; addDataPoint(metric: string, point: MetricPoint): Promise<AnomalyResult | null>; private detectAnomaly; private calculateStatistics; private isolationForestDetection; private buildIsolationTree; private getPathLength; private averagePathLength; private randomSample; private autoencoderDetection; private createAutoencoderModel; private lstmDetection; private createLSTMModel; private updateModels; getAnomalyHistory(metric: string, limit?: number): MetricPoint[]; getStatistics(metric: string): { mean: number; std: number; min: number; max: number; } | undefined; evaluateMetrics(): Promise<Map<string, AnomalyResult[]>>; dispose(): void; } export declare function getAnomalyDetector(config?: AnomalyConfig): AnomalyDetector;