/** * Pipeline Base Module - Base module for pipeline components with enhanced debug capabilities * 流水线基础模块 - 具有增强调试功能的流水线组件基础模块 */ import { BaseModule } from 'rcc-basemodule'; import { DebugCenter } from 'rcc-debugcenter'; import { ErrorHandlingCenter } from 'rcc-errorhandling'; /** * IO Tracking Configuration * IO跟踪配置 */ interface IOTrackingConfig { enabled?: boolean; baseDirectory?: string; maxFiles?: number; maxSize?: number; autoRecord?: boolean; saveIndividualFiles?: boolean; saveSessionFiles?: boolean; ioDirectory?: string; includeTimestamp?: boolean; includeDuration?: boolean; maxEntriesPerFile?: number; } /** * Pipeline-specific module configuration * 流水线特定模块配置 */ export interface PipelineModuleConfig { id: string; name: string; version: string; description: string; type: 'provider' | 'scheduler' | 'tracker' | 'pipeline'; providerName?: string; endpoint?: string; supportedModels?: string[]; defaultModel?: string; maxConcurrentRequests?: number; requestTimeout?: number; enableTwoPhaseDebug?: boolean; debugBaseDirectory?: string; enableIOTracking?: boolean; ioTrackingConfig?: IOTrackingConfig; } /** * Pipeline Base Module with enhanced debug capabilities * 具有增强调试功能的流水线基础模块 */ export declare class PipelineBaseModule extends BaseModule { protected pipelineConfig: PipelineModuleConfig; protected errorHandler: ErrorHandlingCenter; protected debugCenter: DebugCenter | null; constructor(config: PipelineModuleConfig); /** * Enable two-phase debug system * 启用两阶段调试系统 */ protected enableTwoPhaseDebug(enabled: boolean, baseDirectory?: string, ioTrackingConfig?: IOTrackingConfig): void; /** * Get debug center instance * 获取调试中心实例 */ protected getDebugCenter(): DebugCenter | null; /** * Get pipeline configuration * 获取流水线配置 */ getPipelineConfig(): PipelineModuleConfig; /** * Update pipeline configuration * 更新流水线配置 */ updatePipelineConfig(newConfig: Partial): void; /** * Get provider information * 获取提供者信息 */ getProviderInfo(): { name: string; endpoint: string | undefined; supportedModels: string[]; defaultModel: string | undefined; type: "provider" | "scheduler" | "tracker" | "pipeline"; }; /** * Track pipeline operation with I/O tracking * 跟踪流水线操作并记录I/O */ trackPipelineOperation(operationId: string, operation: () => Promise, inputData?: any, operationType?: string): Promise; /** * Record pipeline stage * 记录流水线阶段 */ recordPipelineStage(stageName: string, stageData: any, status?: 'started' | 'completed' | 'failed'): void; /** * Handle pipeline errors with enhanced error handling * 处理流水线错误并提供增强的错误处理 */ handlePipelineError(error: Error, context: { operation?: string; stage?: string; requestId?: string; additionalData?: Record; }): void; /** * Get pipeline metrics * 获取流水线指标 */ getPipelineMetrics(): { debugEnabled: boolean; ioTrackingEnabled: boolean; debugConfig: import("rcc-basemodule").DebugConfig; pipelineEntries: import("rcc-debugcenter").PipelineIOEntry[]; stats: import("rcc-debugcenter").RecordingStats | null; } | { debugEnabled: boolean; ioTrackingEnabled: boolean; debugConfig: import("rcc-basemodule").DebugConfig; pipelineEntries?: undefined; stats?: undefined; }; /** * Override destroy method to ensure proper cleanup * 重写destroy方法以确保正确的清理 */ destroy(): Promise; } export {}; //# sourceMappingURL=PipelineBaseModule.d.ts.map