/**
 * Scanner Public API
 *
 * Re-exports from stage modules. All prior exports preserved.
 */

// ============================================================================
// Core Scanner API
// ============================================================================

// Pipeline orchestrator — main entry point
export { runScan, type ScanOptions } from './pipeline'

// Summary utilities (public API for backfilling legacy scans etc.)
export { computeIssueMixFromVulnerabilities } from './report/summary'

// ============================================================================
// Re-export types and utilities
// ============================================================================

export * from './shared/types'
export { runLayer1Scan } from './detect/secrets'
export { runLayer2Scan } from './detect/structural'
export { buildProjectContext, type ProjectContext } from './model/project-context'
export { validateFindingsWithAI, type ValidationStats, type AIValidationResult } from './validate'
export { createCancellationToken } from './shared/types'

// Confidence scoring exports (Phase 2B)
export {
  scoreFindings,
  buildAdjustmentContext,
  buildConfidenceLog,
  DEPTH_CONFIGS,
  type ScoredFinding,
  type ConfidenceComputation,
  type ConfidenceAdjustment,
  type ConfidenceLog,
  type AdjustmentRule,
  type AdjustmentContext,
  type DepthConfig,
} from './score'

// Context Engine types
export type { ContextEngineResult } from './model/taint-types'

// Suppression system exports
export {
  SuppressionManager,
  computeFindingHash,
  loadSuppressionConfig,
  addFindingSuppression,
  removeFindingSuppression,
  addRuleSuppression,
  listSuppressions,
  parseInlineSuppressions,
  generateSuppressionComment,
  isValidHash,
  type SuppressionConfig,
  type FindingSuppression,
  type RuleSuppression,
  type SuppressionResult,
  type SuppressedVulnerability,
} from './postprocess/suppression'

// Baseline system exports
export {
  BaselineManager,
  computeDiff,
  hasNewBlockingIssues,
  formatDiffSummary,
  BASELINE_FILE_PATH,
  OCULUM_DIR,
  type BaselineData,
  type BaselineFinding,
  type DiffResult,
  type BaselineDiff,
  type BaselineManagerOptions,
  type LoadBaselineResult,
  type SaveBaselineResult,
  type ClearBaselineResult,
} from './shared/baseline'

// Rule metadata exports (PRO-82)
export {
  RULE_REGISTRY,
  getRuleMetadata,
  getAllCategories,
  hasMetadata,
  type RuleMetadata,
} from './shared/rules'

// AI Context exports
export {
  AIContextManager,
  AI_CONTEXT_FILE,
  AI_CONTEXT_PATH,
  type AIContextManagerOptions,
  type SaveContextResult,
  type LoadContextResult,
  type ClearContextResult,
} from './shared/ai-context'

// Category filter exports (Phase 2: Category-Based Filtering)
export {
  CATEGORY_GROUPS,
  ALL_CATEGORIES,
  normalizeCategory,
  expandCategoryPattern,
  matchesAnyCategory,
  shouldFailOnCategories,
  getMatchingCategories,
  parseCategoryList,
  validateCategories,
  getAvailableCategoryGroups,
  getCategoryGroupCounts,
} from './shared/category-filter'
