UNPKG

vibe-coder-mcp

Version:

Production-ready MCP server with complete agent integration, multi-transport support, and comprehensive development automation tools for AI-assisted workflows.

87 lines 2.87 kB
interface MemorySnapshot { timestamp: number; usage: NodeJS.MemoryUsage; heapUsed: number; heapTotal: number; external: number; rss: number; arrayBuffers: number; } interface MemoryLeakResult { hasLeak: boolean; severity: 'low' | 'medium' | 'high' | 'critical'; memoryIncrease: number; heapIncrease: number; recommendations: string[]; snapshots: MemorySnapshot[]; } interface MemoryMonitorConfig { maxHeapSizeMB: number; maxRSSizeMB: number; leakThresholdMB: number; monitoringIntervalMs: number; maxSnapshots: number; enableGCForcing: boolean; warningThresholdMB: number; } export declare class MemoryLeakDetector { private static snapshots; private static isMonitoring; private static monitoringInterval; private static isTestEnvironment; private static config; static initialize(customConfig?: Partial<MemoryMonitorConfig>): void; private static setupProcessMonitors; static startMonitoring(): void; static stopMonitoring(): void; static takeSnapshot(reason: string): MemorySnapshot; private static checkMemoryLimits; static detectLeaks(startSnapshot?: MemorySnapshot, endSnapshot?: MemorySnapshot): MemoryLeakResult; static forceGarbageCollection(): { before: MemorySnapshot; after: MemorySnapshot; freed: number; }; static getMemoryReport(): { current: MemorySnapshot; peak: MemorySnapshot; average: { heapUsed: number; rss: number; }; trend: 'increasing' | 'decreasing' | 'stable'; snapshots: MemorySnapshot[]; }; static reset(): void; static getConfig(): MemoryMonitorConfig; static updateConfig(newConfig: Partial<MemoryMonitorConfig>): void; } export declare function initializeMemoryLeakDetector(config?: Partial<MemoryMonitorConfig>): void; export declare function startMemoryMonitoring(): void; export declare function stopMemoryMonitoring(): void; export declare function takeMemorySnapshot(reason?: string): MemorySnapshot; export declare function detectMemoryLeaks(startSnapshot?: MemorySnapshot, endSnapshot?: MemorySnapshot): MemoryLeakResult; export declare function forceGarbageCollection(): { before: MemorySnapshot; after: MemorySnapshot; freed: number; }; export declare function getMemoryReport(): { current: MemorySnapshot; peak: MemorySnapshot; average: { heapUsed: number; rss: number; }; trend: 'increasing' | 'decreasing' | 'stable'; snapshots: MemorySnapshot[]; }; export declare function withMemoryMonitoring<T>(operation: () => Promise<T> | T, config?: { detectLeaks?: boolean; forceGC?: boolean; }): Promise<{ result: T; memoryResult?: MemoryLeakResult; }>; export {}; //# sourceMappingURL=memory-leak-detector.d.ts.map