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.

55 lines 2.01 kB
import { EventEmitter } from 'events'; export interface TimeoutConfig { baseTimeoutMs: number; maxTimeoutMs: number; progressCheckIntervalMs: number; exponentialBackoffFactor: number; maxRetries: number; partialResultThreshold: number; } export interface ProgressInfo { completed: number; total: number; stage: string; lastUpdate: Date; estimatedTimeRemaining?: number; } export interface TimeoutResult<T> { success: boolean; result?: T; partialResult?: Partial<T>; error?: string; timeoutOccurred: boolean; retryCount: number; totalDuration: number; progressAtTimeout?: ProgressInfo; } export interface CancellationToken { isCancelled: boolean; cancel(): void; onCancelled(callback: () => void): void; } export type ProgressCallback = (progress: ProgressInfo) => void; export type PartialResultExtractor<T> = (currentState: Record<string, unknown>) => Partial<T> | undefined; export declare class AdaptiveTimeoutManager extends EventEmitter { private static instance; private activeOperations; private constructor(); static getInstance(): AdaptiveTimeoutManager; executeWithTimeout<T>(operationId: string, operation: (cancellationToken: CancellationToken, progressCallback: ProgressCallback) => Promise<T>, config?: Partial<TimeoutConfig>, partialResultExtractor?: PartialResultExtractor<T>): Promise<TimeoutResult<T>>; createCancellationToken(): CancellationToken; cancelOperation(operationId: string): boolean; getActiveOperations(): string[]; getOperationProgress(operationId: string): ProgressInfo | undefined; private attemptOperation; private calculateAdaptiveTimeout; private adjustTimeoutBasedOnProgress; private handleTimeout; private checkProgressStagnation; private calculateBackoffDelay; private inferOperationType; private clearOperationTimeouts; private delay; shutdown(): void; } //# sourceMappingURL=adaptive-timeout-manager.d.ts.map