📄 index.ts  •  853 bytes
/**
 * CmdCode V0.6 - 容错系统
 * Phase 4: 错误分类 + 重试策略
 */

// 导出类型
export type {
  ErrorSeverity,
  ErrorCategory,
  ErrorClassification,
  RetryStrategy,
  RetryConfig,
  RetryState,
  RetryHistoryItem,
  ExecutionResult,
  FallbackStrategy,
  ClassifierConfig,
} from './types'

// 导出错误分类器
export {
  classifyError,
  classifyErrors,
  isRetryable,
  getErrorSeverity,
  clearCache,
  getCacheStats,
} from './classifier'

// 导出重试执行器
export {
  withRetry,
  withFallback,
  withRetryParallel,
  withTimeout,
  calculateDelay,
  createRetryState,
  formatRetryState,
  getRetryStats,
} from './retry'

// 导出常量
export {
  DEFAULT_RETRY_CONFIG,
  CATEGORY_LABELS,
  SEVERITY_LABELS,
  STRATEGY_LABELS,
} from './types'

/** 版本信息 */
export const RESILIENCE_VERSION = '0.6.0-phase4'