UNPKG

github-mcp-auto-git

Version:

GitHub MCP Auto Git v3.0 - メモリ効率化・統合MCP・モジュール化完了の完全自動Git操作システム

119 lines 3.21 kB
/** * Resilient Executor - 堅牢な実行環境 * 重要な操作に対する包括的なエラーハンドリングとリカバリー */ import { ErrorRecoverySystem } from './error-recovery.js'; export interface ExecutionOptions { maxRetries?: number; timeoutMs?: number; critical?: boolean; fallbackRequired?: boolean; description?: string; claudeCodeOptimized?: boolean; adaptiveTimeout?: boolean; priorityLevel?: 'low' | 'medium' | 'high' | 'critical'; } export interface ExecutionResult<T> { success: boolean; data?: T; error?: Error; attempts: number; executionTime: number; warnings: string[]; } export declare class ResilientExecutor { private errorRecovery; private executionHistory; constructor(); /** * 堅牢な関数実行 */ execute<T>(operation: () => Promise<T>, context: { name: string; workingDir: string; files?: string[]; metadata?: Record<string, any>; }, options?: ExecutionOptions): Promise<ExecutionResult<T>>; /** * タイムアウト付き実行 */ private executeWithTimeout; /** * クリティカルエラー判定 */ private isCriticalError; /** * フォールバック処理 */ private executeFallback; /** * バッチ実行(複数操作の堅牢な実行) */ executeBatch<T>(operations: Array<{ name: string; operation: () => Promise<T>; options?: ExecutionOptions; context: { workingDir: string; files?: string[]; metadata?: Record<string, any>; }; }>): Promise<Array<ExecutionResult<T>>>; /** * 状況把握とレポート */ getHealthReport(): { status: 'healthy' | 'warning' | 'critical'; errorStats: ReturnType<ErrorRecoverySystem['getErrorStatistics']>; systemHealth: ReturnType<ErrorRecoverySystem['checkSystemHealth']>; recommendations: string[]; }; /** * 緊急停止(Emergency Stop) */ emergencyStop(reason: string): void; /** * Claude Code最適化処理 */ private optimizeForClaudeCode; /** * 最適タイムアウト計算 */ private calculateOptimalTimeout; /** * リトライ時のタイムアウト調整 */ private adjustTimeoutForRetry; /** * 実行時間記録 */ private recordExecutionTime; /** * 平均実行時間取得 */ private getAverageExecutionTime; /** * 非クリティカル操作の一時停止 */ private pauseNonCriticalOperations; /** * パフォーマンス統計取得 */ getPerformanceStats(): { operations: Record<string, { averageTime: number; totalExecutions: number; successRate: number; }>; systemHealth: 'optimal' | 'good' | 'warning' | 'critical'; }; /** * メンテナンス関数 */ performMaintenance(): Promise<{ errorsCleared: number; status: string; performanceOptimized: boolean; }>; } //# sourceMappingURL=resilient-executor.d.ts.map