intertools
Version:
🚀 Professional development assistant with Backend Engineer Mode. Auto-starts with full functionality, no prompts, iterative problem solving. Features: AI chat orchestrator, terminal monitoring, file analysis, error correction, performance optimization. C
162 lines • 3.85 kB
TypeScript
export interface TerminalLogEntry {
command: string;
output: string;
timestamp: Date;
exitCode?: number;
workingDirectory: string;
duration?: number;
type: 'command' | 'output' | 'error';
}
export interface BuildProcessInfo {
buildTime: number;
bundleSize: string;
warnings: number;
errors: number;
optimizations: string[];
dependencies: number;
outputFiles: string[];
}
export interface DebugProgress {
currentTask: string;
progress: number;
status: 'scanning' | 'analyzing' | 'fixing' | 'complete' | 'error';
context: {
currentFile?: string;
currentDirectory?: string;
filesScanned: number;
totalFiles: number;
errorsFound: number;
bugsFixed: number;
};
recentActivity: string[];
}
export declare class TerminalMonitor {
private isMonitoring;
private logs;
private maxLogs;
private debugProgress;
private progressCallbacks;
constructor(options?: {
maxLogs?: number;
});
/**
* Add progress callback for real-time updates
*/
onProgress(callback: (progress: DebugProgress) => void): void;
/**
* Update progress and notify callbacks
*/
private updateProgress;
/**
* Start monitoring terminal activity with real-time progress
*/
startMonitoring(): Promise<void>;
/**
* Start comprehensive debugging with progress tracking
*/
startDebugging(): Promise<void>;
/**
* Scan project structure with progress updates
*/
private scanProjectStructure;
/**
* Analyze console logs with progress updates
*/
private analyzeConsoleLogs;
/**
* Check for common issues with progress updates
*/
private checkCommonIssues;
/**
* Generate debug report
*/
private generateDebugReport;
/**
* Get all project files
*/
private getAllProjectFiles;
/**
* Get current debug progress
*/
getDebugProgress(): DebugProgress | null;
/**
* Stop monitoring terminal activity
*/
stopMonitoring(): void;
/**
* Get captured terminal logs
*/
getTerminalLogs(): TerminalLogEntry[];
/**
* Monitor common development commands
*/
private monitorDevelopmentCommands;
/**
* Check for running development processes
*/
private checkRunningProcesses;
/**
* Extract command from process line
*/
private extractCommand;
/**
* Add log entry
*/
private addLog;
/**
* Capture terminal logs (simulated for demo)
*/
captureTerminalLogs(): Promise<TerminalLogEntry[]>;
/**
* Analyze build process
*/
analyzeBuildProcess(): Promise<BuildProcessInfo>;
/**
* Monitor development server logs
*/
monitorDevServer(port?: number): Promise<{
status: 'running' | 'stopped' | 'error';
uptime: number;
requests: number;
errors: number;
lastActivity: Date;
}>;
/**
* Extract bundle size from build output
*/
private extractBundleSize;
/**
* Count warnings in output
*/
private countWarnings;
/**
* Count errors in output
*/
private countErrors;
/**
* Extract optimization information
*/
private extractOptimizations;
/**
* Count dependencies
*/
private countDependencies;
/**
* Extract output files
*/
private extractOutputFiles;
/**
* Get terminal statistics
*/
getStats(): {
totalLogs: number;
commandsRun: number;
errorsFound: number;
averageDuration: number;
mostUsedCommands: {
command: string;
count: number;
}[];
};
}
//# sourceMappingURL=terminal-monitor.d.ts.map