{"version":3,"sources":["../src/index.ts","../src/analyzer/scan-health.ts","../src/analyzer/scan-cache.ts","../src/analyzer/diff-scan.ts","../src/analyzer/git-utils.ts","../src/analyzer/load-project.ts","../src/analyzer/build-graph.ts","../src/analyzer/node-id.ts","../src/analyzer/filter-sources.ts","../src/analyzer/classify-any-sources.ts","../src/analyzer/classify-explicit-any.ts","../src/analyzer/run-scan.ts","../src/format/report-json.ts","../src/format/to-sarif.ts","../src/commands/diff-failure.ts","../src/format/to-dot.ts","../src/analyzer/trace.ts"],"sourcesContent":["export type {\n  AnySource,\n  BlastChangedSource,\n  DiffSummary,\n  GreedyCoverPick,\n  ScanHealth,\n  ScanSummary,\n  SetCoverDistinctiveness,\n  SourceKind,\n  SourceRanked,\n} from \"./types.js\";\nexport { computeScanHealth } from \"./analyzer/scan-health.js\";\nexport { readScanCache, writeScanCache } from \"./analyzer/scan-cache.js\";\nexport type { CreateProgramOptions } from \"./analyzer/load-project.js\";\nexport {\n  toScanReport,\n  toDiffReport,\n  type ReportVersion,\n  type ScanReportV2,\n  type DiffReportV2,\n} from \"./format/report-json.js\";\nexport {\n  scanSummaryToSarif,\n  diffSummaryToSarif,\n  setSarifToolVersion,\n} from \"./format/to-sarif.js\";\nexport {\n  evaluateDiffFailure,\n  type DiffFailureOptions,\n} from \"./commands/diff-failure.js\";\nexport {\n  applyTopToScanSummary,\n  buildScanOptions,\n  classifyScan,\n  runFullScan,\n} from \"./analyzer/run-scan.js\";\nexport {\n  applyTopToDiffSummary,\n  diffScan,\n  summarizeDiffTotals,\n} from \"./analyzer/diff-scan.js\";\nexport type {\n  FullScanResult,\n  ScanOptions,\n  ScanResult,\n} from \"./analyzer/run-scan.js\";\nexport type { DiffScanOptions } from \"./analyzer/diff-scan.js\";\nexport {\n  filterSources,\n  parseIgnoreGlobsList,\n  parseSourceKindsList,\n} from \"./analyzer/filter-sources.js\";\nexport type { SourceFilters } from \"./analyzer/filter-sources.js\";\nexport { serializedGraphToDot } from \"./format/to-dot.js\";\nexport {\n  createProgramForDirectory,\n  resolveScanRoot,\n  countProjectSourceFiles,\n} from \"./analyzer/load-project.js\";\nexport { findAnySources } from \"./analyzer/classify-any-sources.js\";\nexport { findExplicitAnySources } from \"./analyzer/classify-explicit-any.js\";\nexport type {\n  EdgeReason,\n  GraphEdge,\n  GraphNodeKind,\n  SerializedGraph,\n  SerializedGraphNode,\n} from \"./analyzer/graph-types.js\";\nexport { GraphBuilder, buildSerializedGraph } from \"./analyzer/build-graph.js\";\nexport { makeNodeId } from \"./analyzer/node-id.js\";\nexport { parseTraceLocation, traceSymbol } from \"./analyzer/trace.js\";\nexport type { TraceOptions } from \"./analyzer/trace.js\";\nexport type {\n  TraceHop,\n  TracePathSegment,\n  TracePathToSource,\n  TraceReport,\n} from \"./analyzer/trace-types.js\";\n","import type { GraphBuilder } from \"./build-graph.js\";\nimport type {\n  ScanHealth,\n  ScanSummary,\n  SetCoverDistinctiveness,\n} from \"../types.js\";\n\nexport type { ScanHealth, SetCoverDistinctiveness };\n\nconst OVERLAP_LOW_THRESHOLD = 0.15;\n\nfunction top3GreedyPct(summary: ScanSummary): number {\n  const picks = summary.greedyCoverPicks;\n  if (picks.length === 0) return 100;\n  return picks[Math.min(2, picks.length - 1)]!.cumulativeCoveragePct;\n}\n\nfunction jaccard(a: Set<string>, b: Set<string>): number {\n  if (a.size === 0 && b.size === 0) return 0;\n  let inter = 0;\n  const smaller = a.size <= b.size ? a : b;\n  const larger = a.size <= b.size ? b : a;\n  for (const id of smaller) {\n    if (larger.has(id)) inter++;\n  }\n  const union = a.size + b.size - inter;\n  return union === 0 ? 0 : inter / union;\n}\n\nfunction median(values: number[]): number {\n  if (values.length === 0) return 0;\n  const sorted = [...values].sort((x, y) => x - y);\n  const mid = Math.floor(sorted.length / 2);\n  if (sorted.length % 2 === 1) return sorted[mid]!;\n  return (sorted[mid - 1]! + sorted[mid]!) / 2;\n}\n\nfunction buildSummaryLine(\n  top3: number,\n  overlap: number,\n  distinctiveness: SetCoverDistinctiveness,\n  sourceCount: number,\n  infectedCount: number,\n): string {\n  if (sourceCount === 0) {\n    return \"No any sources detected.\";\n  }\n  const overlapPct = Math.round(overlap * 100);\n  if (distinctiveness === \"low\") {\n    return `Top-3 greedy covers ${top3}% of infected nodes; sources overlap heavily (median Jaccard ${overlapPct}%). Few high-blast fixes may not clear most infection—prefer a long-tail strategy or blast-radius sprints.`;\n  }\n  return `Top-3 greedy covers ${top3}% of ${infectedCount} infected node(s); median source overlap ${overlapPct}% (${distinctiveness} set-cover signal). Greedy fix order is meaningfully distinct from blast ranking.`;\n}\n\n/**\n * Health metrics for interpreting blast vs greedy rankings on this repo.\n */\nexport function computeScanHealth(\n  builder: GraphBuilder,\n  summary: ScanSummary,\n): ScanHealth {\n  const top3 = top3GreedyPct(summary);\n  const perSource = builder.getInfectedNodeSetsPerSource();\n  const sets = [...perSource.values()];\n  const overlaps: number[] = [];\n  for (let i = 0; i < sets.length; i++) {\n    for (let j = i + 1; j < sets.length; j++) {\n      overlaps.push(jaccard(sets[i]!, sets[j]!));\n    }\n  }\n  const medianPairwiseOverlap = median(overlaps);\n  const setCoverDistinctiveness: SetCoverDistinctiveness =\n    medianPairwiseOverlap < OVERLAP_LOW_THRESHOLD ? \"low\" : \"high\";\n  const summaryLine = buildSummaryLine(\n    top3,\n    medianPairwiseOverlap,\n    setCoverDistinctiveness,\n    summary.sources.length,\n    summary.infectedNodeCount,\n  );\n  return {\n    top3GreedyPct: top3,\n    medianPairwiseOverlap,\n    setCoverDistinctiveness,\n    summaryLine,\n  };\n}\n","import crypto from \"node:crypto\";\nimport fs from \"node:fs\";\nimport path from \"node:path\";\nimport type { ScanSummary } from \"../types.js\";\n\nconst CACHE_DIR = \".any-map-cache\";\n\nfunction cacheRoot(repoRoot: string): string {\n  return path.join(repoRoot, CACHE_DIR);\n}\n\nfunction cacheKey(\n  commit: string,\n  scanRoot: string,\n  sourceKinds?: string[],\n  ignoreGlobs?: string[],\n): string {\n  const payload = JSON.stringify({\n    commit,\n    scanRoot: path.resolve(scanRoot),\n    sourceKinds: sourceKinds ?? [],\n    ignoreGlobs: ignoreGlobs ?? [],\n  });\n  return crypto.createHash(\"sha256\").update(payload).digest(\"hex\");\n}\n\nfunction cachePath(repoRoot: string, key: string): string {\n  return path.join(cacheRoot(repoRoot), `${key}.json`);\n}\n\nexport function readScanCache(\n  repoRoot: string,\n  commit: string,\n  scanRoot: string,\n  sourceKinds?: string[],\n  ignoreGlobs?: string[],\n): ScanSummary | undefined {\n  const file = cachePath(\n    repoRoot,\n    cacheKey(commit, scanRoot, sourceKinds, ignoreGlobs),\n  );\n  if (!fs.existsSync(file)) return undefined;\n  try {\n    return JSON.parse(fs.readFileSync(file, \"utf8\")) as ScanSummary;\n  } catch {\n    return undefined;\n  }\n}\n\nexport function writeScanCache(\n  repoRoot: string,\n  commit: string,\n  scanRoot: string,\n  summary: ScanSummary,\n  sourceKinds?: string[],\n  ignoreGlobs?: string[],\n): void {\n  const dir = cacheRoot(repoRoot);\n  fs.mkdirSync(dir, { recursive: true });\n  const file = cachePath(\n    repoRoot,\n    cacheKey(commit, scanRoot, sourceKinds, ignoreGlobs),\n  );\n  fs.writeFileSync(file, JSON.stringify(summary), \"utf8\");\n}\n","import path from \"node:path\";\nimport type {\n  BlastChangedSource,\n  DiffSummary,\n  ScanSummary,\n  SourceRanked,\n} from \"../types.js\";\nimport type { SourceFilters } from \"./filter-sources.js\";\nimport {\n  listChangedRepoPaths,\n  resolveCommit,\n  resolveGitWorkspace,\n  resolveMergeBase,\n  withSnapshotWorktrees,\n} from \"./git-utils.js\";\nimport { readScanCache, writeScanCache } from \"./scan-cache.js\";\nimport {\n  applyTopToScanSummary,\n  buildScanOptions,\n  runFullScan,\n} from \"./run-scan.js\";\n\nexport interface DiffScanOptions extends SourceFilters {\n  targetPath: string;\n  baseRef: string;\n  headRef: string;\n  top?: number;\n  maxFiles?: number;\n  /** Persist scan summaries under `.any-map-cache/` in the git repo root. */\n  useCache?: boolean;\n}\n\nconst SOURCE_EXTENSIONS = new Set([\n  \".ts\",\n  \".tsx\",\n  \".mts\",\n  \".cts\",\n  \".js\",\n  \".jsx\",\n  \".mjs\",\n  \".cjs\",\n]);\n\nconst LOCKFILE_BASENAMES = new Set([\n  \"package-lock.json\",\n  \"pnpm-lock.yaml\",\n  \"yarn.lock\",\n  \"bun.lock\",\n  \"bun.lockb\",\n  \"npm-shrinkwrap.json\",\n]);\n\nfunction top3Coverage(summary: ScanSummary): number {\n  const picks = summary.greedyCoverPicks;\n  return picks.length === 0\n    ? 100\n    : picks[Math.min(2, picks.length - 1)]!.cumulativeCoveragePct;\n}\n\nfunction sourceKey(\n  source: Pick<\n    SourceRanked,\n    \"filePath\" | \"line\" | \"column\" | \"name\" | \"sourceKind\"\n  >,\n): string {\n  return `${source.filePath}:${source.line}:${source.column}:${source.name}:${source.sourceKind}`;\n}\n\nfunction isSourcePath(filePath: string): boolean {\n  return SOURCE_EXTENSIONS.has(path.posix.extname(filePath).toLowerCase());\n}\n\nfunction isFallbackTrigger(filePath: string): boolean {\n  const basename = path.posix.basename(filePath);\n  return (\n    filePath.endsWith(\".d.ts\") ||\n    basename === \"package.json\" ||\n    LOCKFILE_BASENAMES.has(basename) ||\n    (basename.startsWith(\"tsconfig\") && basename.endsWith(\".json\"))\n  );\n}\n\nfunction toScanRelativePath(\n  repoRelativePath: string,\n  scanRootRepoRelative: string,\n): string {\n  if (scanRootRepoRelative.length === 0) return repoRelativePath;\n  if (repoRelativePath === scanRootRepoRelative) return \"\";\n  return repoRelativePath.slice(scanRootRepoRelative.length + 1);\n}\n\nfunction filterRankedByFiles(\n  summary: ScanSummary,\n  changedFiles: Set<string>,\n): SourceRanked[] {\n  return summary.sourcesRankedByBlast.filter((source) =>\n    changedFiles.has(source.filePath),\n  );\n}\n\nfunction sortBlastChangedSources(\n  changed: BlastChangedSource[],\n): BlastChangedSource[] {\n  return changed.sort(\n    (a, b) =>\n      Math.abs(b.deltaBlastRadius) - Math.abs(a.deltaBlastRadius) ||\n      b.after.blastRadius - a.after.blastRadius ||\n      a.after.filePath.localeCompare(b.after.filePath) ||\n      a.after.line - b.after.line ||\n      a.after.column - b.after.column ||\n      a.after.name.localeCompare(b.after.name),\n  );\n}\n\nfunction buildBlastChangedSources(\n  beforeSources: SourceRanked[],\n  afterSources: SourceRanked[],\n): BlastChangedSource[] {\n  const beforeByKey = new Map(\n    beforeSources.map((source) => [sourceKey(source), source]),\n  );\n  const changed: BlastChangedSource[] = [];\n  for (const afterSource of afterSources) {\n    const beforeSource = beforeByKey.get(sourceKey(afterSource));\n    if (!beforeSource) continue;\n    const deltaBlastRadius = afterSource.blastRadius - beforeSource.blastRadius;\n    if (deltaBlastRadius === 0) continue;\n    changed.push({\n      before: beforeSource,\n      after: afterSource,\n      deltaBlastRadius,\n    });\n  }\n  return sortBlastChangedSources(changed);\n}\n\nfunction buildAddedSources(\n  beforeSources: SourceRanked[],\n  afterSources: SourceRanked[],\n): SourceRanked[] {\n  const beforeKeys = new Set(beforeSources.map(sourceKey));\n  return afterSources.filter((source) => !beforeKeys.has(sourceKey(source)));\n}\n\nfunction buildRemovedSources(\n  beforeSources: SourceRanked[],\n  afterSources: SourceRanked[],\n): SourceRanked[] {\n  const afterKeys = new Set(afterSources.map(sourceKey));\n  return beforeSources.filter((source) => !afterKeys.has(sourceKey(source)));\n}\n\nexport function applyTopToDiffSummary(\n  summary: DiffSummary,\n  top?: number,\n): DiffSummary {\n  if (top === undefined || top <= 0) return summary;\n  return {\n    ...summary,\n    before: applyTopToScanSummary(summary.before, top),\n    after: applyTopToScanSummary(summary.after, top),\n    addedSources: summary.addedSources.slice(0, top),\n    removedSources: summary.removedSources.slice(0, top),\n    blastChangedSources: summary.blastChangedSources.slice(0, top),\n  };\n}\n\nfunction runFullDiffScan(options: Omit<DiffScanOptions, \"top\">): DiffSummary {\n  const workspace = resolveGitWorkspace(options.targetPath);\n  const effectiveHeadRef = resolveCommit(workspace.repoRoot, options.headRef);\n  const effectiveBaseRef = resolveMergeBase(\n    workspace.repoRoot,\n    options.baseRef,\n    effectiveHeadRef,\n  );\n\n  const changedRepoPaths = listChangedRepoPaths(\n    workspace.repoRoot,\n    effectiveBaseRef,\n    effectiveHeadRef,\n    workspace.scanRootRepoRelative,\n  );\n  const changedFiles = changedRepoPaths.map((repoRelativePath) =>\n    toScanRelativePath(repoRelativePath, workspace.scanRootRepoRelative),\n  );\n  const scope = changedFiles.some(isFallbackTrigger)\n    ? \"full-project-fallback\"\n    : \"changed-files\";\n\n  return withSnapshotWorktrees(\n    workspace.repoRoot,\n    effectiveBaseRef,\n    effectiveHeadRef,\n    ({ baseRoot, headRoot }) => {\n      const baseTargetPath =\n        workspace.scanRootRepoRelative.length === 0\n          ? baseRoot\n          : path.join(baseRoot, workspace.scanRootRepoRelative);\n      const headTargetPath =\n        workspace.scanRootRepoRelative.length === 0\n          ? headRoot\n          : path.join(headRoot, workspace.scanRootRepoRelative);\n\n      const useCache = options.useCache !== false;\n      const scanOpts = (target: string) =>\n        buildScanOptions(\n          target,\n          options.sourceKinds,\n          options.ignoreGlobs,\n          undefined,\n          options.maxFiles,\n        );\n\n      let baseScan = useCache\n        ? readScanCache(\n            workspace.repoRoot,\n            effectiveBaseRef,\n            baseTargetPath,\n            options.sourceKinds,\n            options.ignoreGlobs,\n          )\n        : undefined;\n      if (!baseScan) {\n        baseScan = runFullScan(scanOpts(baseTargetPath)).summary;\n        if (useCache) {\n          writeScanCache(\n            workspace.repoRoot,\n            effectiveBaseRef,\n            baseTargetPath,\n            baseScan,\n            options.sourceKinds,\n            options.ignoreGlobs,\n          );\n        }\n      }\n\n      let headScan = useCache\n        ? readScanCache(\n            workspace.repoRoot,\n            effectiveHeadRef,\n            headTargetPath,\n            options.sourceKinds,\n            options.ignoreGlobs,\n          )\n        : undefined;\n      if (!headScan) {\n        headScan = runFullScan(scanOpts(headTargetPath)).summary;\n        if (useCache) {\n          writeScanCache(\n            workspace.repoRoot,\n            effectiveHeadRef,\n            headTargetPath,\n            headScan,\n            options.sourceKinds,\n            options.ignoreGlobs,\n          );\n        }\n      }\n\n      const deltaFiles =\n        scope === \"full-project-fallback\"\n          ? undefined\n          : new Set(changedFiles.filter(isSourcePath));\n      const beforeRelevant =\n        deltaFiles === undefined\n          ? baseScan.sourcesRankedByBlast\n          : filterRankedByFiles(baseScan, deltaFiles);\n      const afterRelevant =\n        deltaFiles === undefined\n          ? headScan.sourcesRankedByBlast\n          : filterRankedByFiles(headScan, deltaFiles);\n\n      return {\n        requestedBaseRef: options.baseRef,\n        requestedHeadRef: options.headRef,\n        effectiveBaseRef,\n        effectiveHeadRef,\n        compareMode: \"merge-base\",\n        scope,\n        changedFiles,\n        before: baseScan,\n        after: headScan,\n        addedSources: buildAddedSources(beforeRelevant, afterRelevant),\n        removedSources: buildRemovedSources(beforeRelevant, afterRelevant),\n        blastChangedSources: buildBlastChangedSources(\n          beforeRelevant,\n          afterRelevant,\n        ),\n      };\n    },\n  );\n}\n\nexport function diffScan(options: DiffScanOptions): DiffSummary {\n  const { top, ...rest } = options;\n  return applyTopToDiffSummary(runFullDiffScan(rest), top);\n}\n\nexport function summarizeDiffTotals(summary: DiffSummary): {\n  beforeSourceCount: number;\n  afterSourceCount: number;\n  sourceDelta: number;\n  beforeInfectedNodeCount: number;\n  afterInfectedNodeCount: number;\n  infectedNodeDelta: number;\n  beforeTop3CoveragePct: number;\n  afterTop3CoveragePct: number;\n  top3CoverageDeltaPct: number;\n} {\n  const beforeTop3CoveragePct = top3Coverage(summary.before);\n  const afterTop3CoveragePct = top3Coverage(summary.after);\n  return {\n    beforeSourceCount: summary.before.sources.length,\n    afterSourceCount: summary.after.sources.length,\n    sourceDelta: summary.after.sources.length - summary.before.sources.length,\n    beforeInfectedNodeCount: summary.before.infectedNodeCount,\n    afterInfectedNodeCount: summary.after.infectedNodeCount,\n    infectedNodeDelta:\n      summary.after.infectedNodeCount - summary.before.infectedNodeCount,\n    beforeTop3CoveragePct,\n    afterTop3CoveragePct,\n    top3CoverageDeltaPct: afterTop3CoveragePct - beforeTop3CoveragePct,\n  };\n}\n","import { execFileSync } from \"node:child_process\";\nimport fs from \"node:fs\";\nimport os from \"node:os\";\nimport path from \"node:path\";\nimport { resolveScanRoot } from \"./load-project.js\";\n\nexport interface GitWorkspace {\n  repoRoot: string;\n  scanRoot: string;\n  /** POSIX path from repo root to the requested scan root. Empty for repo root. */\n  scanRootRepoRelative: string;\n}\n\nexport interface SnapshotWorktrees {\n  baseRoot: string;\n  headRoot: string;\n}\n\nfunction toPosix(p: string): string {\n  return p.split(path.sep).join(path.posix.sep);\n}\n\nfunction runGit(cwd: string, args: string[]): string {\n  try {\n    return execFileSync(\"git\", args, {\n      cwd,\n      encoding: \"utf8\",\n      stdio: [\"ignore\", \"pipe\", \"pipe\"],\n    }).trim();\n  } catch (error) {\n    const message =\n      error instanceof Error && \"stderr\" in error\n        ? String((error as { stderr?: string }).stderr ?? \"\").trim()\n        : \"\";\n    const suffix = message.length > 0 ? `\\n${message}` : \"\";\n    throw new Error(`git ${args.join(\" \")} failed.${suffix}`);\n  }\n}\n\nfunction ensureInsideRepo(repoRoot: string, targetPath: string): string {\n  const rel = path.relative(repoRoot, targetPath);\n  if (rel.startsWith(\"..\") || path.isAbsolute(rel)) {\n    throw new Error(\n      `Path ${targetPath} is outside git repository root ${repoRoot}.`,\n    );\n  }\n  return rel === \"\" ? \"\" : toPosix(rel);\n}\n\nexport function resolveGitWorkspace(targetPath: string): GitWorkspace {\n  const scanRoot = resolveScanRoot(targetPath);\n  const repoRoot = runGit(scanRoot, [\"rev-parse\", \"--show-toplevel\"]);\n  return {\n    repoRoot,\n    scanRoot,\n    scanRootRepoRelative: ensureInsideRepo(repoRoot, scanRoot),\n  };\n}\n\nexport function resolveCommit(repoRoot: string, ref: string): string {\n  return runGit(repoRoot, [\"rev-parse\", \"--verify\", `${ref}^{commit}`]);\n}\n\nexport function resolveMergeBase(\n  repoRoot: string,\n  baseRef: string,\n  headRef: string,\n): string {\n  return runGit(repoRoot, [\"merge-base\", baseRef, headRef]);\n}\n\nfunction parseChangedPaths(output: string): string[] {\n  const paths = new Set<string>();\n  for (const line of output.split(/\\r?\\n/)) {\n    const trimmed = line.trim();\n    if (trimmed.length === 0) continue;\n    const fields = line.split(\"\\t\").slice(1);\n    for (const filePath of fields) {\n      const normalized = filePath.trim();\n      if (normalized.length > 0) paths.add(normalized);\n    }\n  }\n  return [...paths].sort((a, b) => a.localeCompare(b));\n}\n\nexport function listChangedRepoPaths(\n  repoRoot: string,\n  baseRef: string,\n  headRef: string,\n  scanRootRepoRelative: string,\n): string[] {\n  const args = [\n    \"diff\",\n    \"--name-status\",\n    \"--find-renames\",\n    \"--find-copies\",\n    baseRef,\n    headRef,\n  ];\n  if (scanRootRepoRelative.length > 0) {\n    args.push(\"--\", scanRootRepoRelative);\n  }\n  return parseChangedPaths(runGit(repoRoot, args));\n}\n\nfunction attachNodeModulesLink(repoRoot: string, worktreeRoot: string): void {\n  const source = path.join(repoRoot, \"node_modules\");\n  if (!fs.existsSync(source)) return;\n  const linkPath = path.join(worktreeRoot, \"node_modules\");\n  if (fs.existsSync(linkPath)) return;\n  fs.symlinkSync(\n    source,\n    linkPath,\n    process.platform === \"win32\" ? \"junction\" : \"dir\",\n  );\n}\n\nfunction removeNodeModulesLink(worktreeRoot: string): void {\n  const linkPath = path.join(worktreeRoot, \"node_modules\");\n  if (!fs.existsSync(linkPath)) return;\n  fs.rmSync(linkPath, { recursive: true, force: true });\n}\n\nfunction cleanupWorktree(repoRoot: string, worktreeRoot: string): void {\n  if (!fs.existsSync(worktreeRoot)) return;\n  removeNodeModulesLink(worktreeRoot);\n  try {\n    runGit(repoRoot, [\"worktree\", \"remove\", \"--force\", worktreeRoot]);\n  } catch {\n    fs.rmSync(worktreeRoot, { recursive: true, force: true });\n  }\n}\n\nexport function withSnapshotWorktrees<T>(\n  repoRoot: string,\n  baseRef: string,\n  headRef: string,\n  run: (worktrees: SnapshotWorktrees) => T,\n): T {\n  const tempRoot = fs.mkdtempSync(path.join(os.tmpdir(), \"any-map-diff-\"));\n  const baseRoot = path.join(tempRoot, \"base\");\n  const headRoot = path.join(tempRoot, \"head\");\n\n  try {\n    runGit(repoRoot, [\"worktree\", \"add\", \"--detach\", baseRoot, baseRef]);\n    runGit(repoRoot, [\"worktree\", \"add\", \"--detach\", headRoot, headRef]);\n    attachNodeModulesLink(repoRoot, baseRoot);\n    attachNodeModulesLink(repoRoot, headRoot);\n    return run({ baseRoot, headRoot });\n  } finally {\n    cleanupWorktree(repoRoot, headRoot);\n    cleanupWorktree(repoRoot, baseRoot);\n    fs.rmSync(tempRoot, { recursive: true, force: true });\n  }\n}\n","import fs from \"node:fs\";\nimport path from \"node:path\";\nimport ts from \"typescript\";\n\nexport function countProjectSourceFiles(program: ts.Program): number {\n  let n = 0;\n  for (const sf of program.getSourceFiles()) {\n    if (!isFromNodeModulesOrDts(sf)) n += 1;\n  }\n  return n;\n}\n\nfunction toPosix(p: string): string {\n  return p.split(path.sep).join(path.posix.sep);\n}\n\n/**\n * Resolve a user path to an absolute directory (file → its dirname).\n */\nexport function resolveScanRoot(userPath: string): string {\n  const abs = path.resolve(userPath);\n  return fs.existsSync(abs) && fs.statSync(abs).isFile()\n    ? path.dirname(abs)\n    : abs;\n}\n\nexport interface CreateProgramOptions {\n  /** Cap the number of root source files (after tsconfig expansion). */\n  maxFiles?: number;\n}\n\n/**\n * Create a TypeScript program for the tsconfig that governs `rootDir`.\n */\nexport function createProgramForDirectory(\n  rootDir: string,\n  opts?: CreateProgramOptions,\n): ts.Program {\n  const configPath = ts.findConfigFile(\n    rootDir,\n    ts.sys.fileExists,\n    \"tsconfig.json\",\n  );\n  if (!configPath) {\n    throw new Error(\n      `Could not find tsconfig.json under ${rootDir}. Add one or pass a path that contains it.`,\n    );\n  }\n\n  const readResult = ts.readConfigFile(configPath, ts.sys.readFile);\n  if (readResult.error) {\n    throw new Error(ts.formatDiagnostic(readResult.error, formatHost));\n  }\n\n  const parsed = ts.parseJsonConfigFileContent(\n    readResult.config,\n    ts.sys,\n    path.dirname(configPath),\n    undefined,\n    configPath,\n  );\n\n  if (parsed.errors.length > 0) {\n    const msg = parsed.errors\n      .map((d) => ts.formatDiagnostic(d, formatHost))\n      .join(\"\\n\");\n    throw new Error(msg);\n  }\n\n  let rootNames = parsed.fileNames;\n  if (opts?.maxFiles !== undefined && opts.maxFiles > 0) {\n    rootNames = rootNames.slice(0, opts.maxFiles);\n  }\n\n  const programOptions: ts.CreateProgramOptions = {\n    rootNames,\n    options: parsed.options,\n  };\n  if (\n    parsed.projectReferences !== undefined &&\n    parsed.projectReferences.length > 0\n  ) {\n    programOptions.projectReferences = parsed.projectReferences;\n  }\n  return ts.createProgram(programOptions);\n}\n\nconst formatHost: ts.FormatDiagnosticsHost = {\n  getCanonicalFileName: (f) => f,\n  getCurrentDirectory: ts.sys.getCurrentDirectory,\n  getNewLine: () => ts.sys.newLine,\n};\n\n/**\n * Strip root prefix and normalize to project-relative POSIX paths.\n */\nexport function toProjectRelativePath(\n  absoluteFile: string,\n  rootDir: string,\n): string {\n  const rel = path.relative(rootDir, absoluteFile);\n  if (rel.startsWith(\"..\")) {\n    return toPosix(absoluteFile);\n  }\n  return toPosix(rel);\n}\n\nexport function isFromNodeModulesOrDts(sf: ts.SourceFile): boolean {\n  return (\n    sf.isDeclarationFile ||\n    sf.fileName.includes(`${path.sep}node_modules${path.sep}`)\n  );\n}\n\n/**\n * Plain JS inputs under `allowJs`: untyped parameters/returns/imports/catch resolve to `any` by language\n * design, not \"developer chose any\". Sources that use only type inference must skip these files.\n */\nexport function isJavaScriptInputFile(sf: ts.SourceFile): boolean {\n  const ext = path.extname(sf.fileName).toLowerCase();\n  return ext === \".js\" || ext === \".jsx\" || ext === \".mjs\" || ext === \".cjs\";\n}\n","import ts from \"typescript\";\nimport type {\n  AnySource,\n  GreedyCoverPick,\n  SourceKind,\n  SourceRanked,\n} from \"../types.js\";\nimport type {\n  EdgeReason,\n  GraphEdge,\n  GraphNodeKind,\n  GraphNodeMutable,\n  SerializedGraph,\n} from \"./graph-types.js\";\nimport type { TraceHop } from \"./trace-types.js\";\nimport {\n  isFromNodeModulesOrDts,\n  toProjectRelativePath,\n} from \"./load-project.js\";\nimport { makeNodeId } from \"./node-id.js\";\n\nfunction getEnclosingFunctionLike(\n  node: ts.Node,\n): ts.FunctionLikeDeclaration | undefined {\n  let p: ts.Node | undefined = node.parent;\n  while (p) {\n    if (\n      ts.isFunctionDeclaration(p) ||\n      ts.isFunctionExpression(p) ||\n      ts.isArrowFunction(p) ||\n      ts.isMethodDeclaration(p) ||\n      ts.isConstructorDeclaration(p) ||\n      ts.isGetAccessorDeclaration(p) ||\n      ts.isSetAccessorDeclaration(p)\n    ) {\n      return p;\n    }\n    p = p.parent;\n  }\n  return undefined;\n}\n\nfunction isCallableFunctionLike(\n  node: ts.Node,\n): node is\n  | ts.FunctionDeclaration\n  | ts.FunctionExpression\n  | ts.ArrowFunction\n  | ts.MethodDeclaration {\n  return (\n    ts.isFunctionDeclaration(node) ||\n    ts.isFunctionExpression(node) ||\n    ts.isArrowFunction(node) ||\n    ts.isMethodDeclaration(node)\n  );\n}\n\nfunction propertyNameText(name: ts.PropertyName): string | undefined {\n  if (ts.isIdentifier(name) || ts.isPrivateIdentifier(name)) return name.text;\n  if (ts.isStringLiteralLike(name) || ts.isNumericLiteral(name)) {\n    return name.text;\n  }\n  return undefined;\n}\n\nexport class GraphBuilder {\n  private readonly checker: ts.TypeChecker;\n  private readonly nodes = new Map<string, GraphNodeMutable>();\n  private readonly edgeList: GraphEdge[] = [];\n  /** Type flows `from` → `to` (PLAN §5.2). */\n  private readonly outgoing = new Map<string, GraphEdge[]>();\n  private readonly exportChainCache = new Map<string, string | undefined>();\n\n  constructor(\n    private readonly program: ts.Program,\n    private readonly projectRootAbs: string,\n  ) {\n    this.checker = program.getTypeChecker();\n  }\n\n  private rel(sf: ts.SourceFile): string {\n    return toProjectRelativePath(sf.fileName, this.projectRootAbs);\n  }\n\n  private isUserSourceFile(sf: ts.SourceFile): boolean {\n    return !isFromNodeModulesOrDts(sf);\n  }\n\n  private addEdge(from: string, to: string, reason: EdgeReason): void {\n    if (from === to) return;\n    const edge: GraphEdge = { from, to, reason };\n    this.edgeList.push(edge);\n    const list = this.outgoing.get(from);\n    if (list) list.push(edge);\n    else this.outgoing.set(from, [edge]);\n  }\n\n  private typeStringAt(node: ts.Node): string {\n    const t = this.checker.getTypeAtLocation(node);\n    return this.checker.typeToString(\n      t,\n      undefined,\n      ts.TypeFormatFlags.NoTruncation,\n    );\n  }\n\n  private ensureNamedDecl(\n    decl: ts.NamedDeclaration,\n    kind: GraphNodeKind,\n    discriminator = \"\",\n  ): string | undefined {\n    if (!decl.name || !ts.isIdentifier(decl.name)) return undefined;\n    const sf = decl.getSourceFile();\n    if (!this.isUserSourceFile(sf)) return undefined;\n    const filePath = this.rel(sf);\n    const name = decl.name;\n    const start = name.getStart(sf, false);\n    const { line, character } = sf.getLineAndCharacterOfPosition(start);\n    const line1 = line + 1;\n    const col1 = character + 1;\n    const id = makeNodeId(filePath, line1, col1, name.text, discriminator);\n    if (!this.nodes.has(id)) {\n      this.nodes.set(id, {\n        id,\n        filePath,\n        line: line1,\n        column: col1,\n        name: name.text,\n        kind,\n        typeString: this.typeStringAt(name),\n        isSource: false,\n        infectedBy: new Set(),\n      });\n    }\n    return id;\n  }\n\n  private ensurePropertyNamedNode(\n    name: ts.PropertyName,\n    discriminator = \"\",\n  ): string | undefined {\n    const text = propertyNameText(name);\n    if (!text) return undefined;\n    const sf = name.getSourceFile();\n    if (!this.isUserSourceFile(sf)) return undefined;\n    const filePath = this.rel(sf);\n    const start = name.getStart(sf, false);\n    const { line, character } = sf.getLineAndCharacterOfPosition(start);\n    const line1 = line + 1;\n    const col1 = character + 1;\n    const id = makeNodeId(filePath, line1, col1, text, discriminator);\n    if (!this.nodes.has(id)) {\n      this.nodes.set(id, {\n        id,\n        filePath,\n        line: line1,\n        column: col1,\n        name: text,\n        kind: \"property\",\n        typeString: this.typeStringAt(name),\n        isSource: false,\n        infectedBy: new Set(),\n      });\n    }\n    return id;\n  }\n\n  private declarationForSymbol(\n    sym: ts.Symbol | undefined,\n  ): ts.Declaration | undefined {\n    return (\n      sym?.declarations?.find(\n        (decl) =>\n          ts.isImportClause(decl) ||\n          ts.isImportSpecifier(decl) ||\n          ts.isNamespaceImport(decl) ||\n          ts.isImportEqualsDeclaration(decl),\n      ) ?? sym?.valueDeclaration\n    );\n  }\n\n  private propertySymbolForElementAccess(\n    expr: ts.ElementAccessExpression,\n  ): ts.Symbol | undefined {\n    const arg = expr.argumentExpression;\n    if (!arg || (!ts.isStringLiteralLike(arg) && !ts.isNumericLiteral(arg))) {\n      return undefined;\n    }\n    const key = arg.text;\n    const baseType = this.checker.getTypeAtLocation(expr.expression);\n    const apparent = this.checker.getApparentType(baseType);\n    return (\n      this.checker.getPropertyOfType(apparent, key) ??\n      this.checker.getPropertyOfType(baseType, key)\n    );\n  }\n\n  private reasonForValueRead(expr: ts.Expression): EdgeReason {\n    if (ts.isParenthesizedExpression(expr)) {\n      return this.reasonForValueRead(expr.expression);\n    }\n    if (\n      ts.isAsExpression(expr) ||\n      ts.isTypeAssertionExpression(expr) ||\n      ts.isSatisfiesExpression(expr) ||\n      ts.isNonNullExpression(expr)\n    ) {\n      return this.reasonForValueRead(expr.expression);\n    }\n    if (ts.isPropertyAccessExpression(expr)) return \"property-access\";\n    if (ts.isElementAccessExpression(expr)) return \"index-access\";\n    return \"assignment\";\n  }\n\n  private ensureFromValueDeclaration(vd: ts.Declaration): string | undefined {\n    if (ts.isImportClause(vd) && vd.name) {\n      return this.ensureImportBinding(vd.name);\n    }\n    if (ts.isImportSpecifier(vd) && ts.isIdentifier(vd.name)) {\n      return this.ensureImportBinding(vd.name);\n    }\n    if (ts.isNamespaceImport(vd)) {\n      return this.ensureImportBinding(vd.name);\n    }\n    if (ts.isImportEqualsDeclaration(vd)) {\n      return this.ensureImportBinding(vd.name);\n    }\n    if (ts.isVariableDeclaration(vd) && ts.isIdentifier(vd.name)) {\n      return this.ensureNamedDecl(vd, \"variable\");\n    }\n    if (ts.isFunctionDeclaration(vd) && vd.name) {\n      return this.ensureNamedDecl(vd, \"variable\");\n    }\n    if (ts.isParameter(vd) && ts.isIdentifier(vd.name)) {\n      return this.ensureNamedDecl(vd, \"parameter\");\n    }\n    if (ts.isPropertyDeclaration(vd) && ts.isIdentifier(vd.name)) {\n      return this.ensureNamedDecl(vd, \"property\");\n    }\n    if (ts.isGetAccessorDeclaration(vd)) {\n      return this.ensurePropertyNamedNode(vd.name, \"getter\");\n    }\n    if (ts.isPropertyAssignment(vd)) {\n      return this.ensurePropertyNamedNode(vd.name, \"object\");\n    }\n    if (ts.isShorthandPropertyAssignment(vd)) {\n      return this.ensurePropertyNamedNode(vd.name, \"object\");\n    }\n    return undefined;\n  }\n\n  private ensureImportBinding(ident: ts.Identifier): string | undefined {\n    const sf = ident.getSourceFile();\n    if (!this.isUserSourceFile(sf)) return undefined;\n    const filePath = this.rel(sf);\n    const start = ident.getStart(sf, false);\n    const { line, character } = sf.getLineAndCharacterOfPosition(start);\n    const line1 = line + 1;\n    const col1 = character + 1;\n    const nid = makeNodeId(filePath, line1, col1, ident.text, \"\");\n    if (!this.nodes.has(nid)) {\n      this.nodes.set(nid, {\n        id: nid,\n        filePath,\n        line: line1,\n        column: col1,\n        name: ident.text,\n        kind: \"import-binding\",\n        typeString: this.typeStringAt(ident),\n        isSource: false,\n        infectedBy: new Set(),\n      });\n    }\n    return nid;\n  }\n\n  private ensureExportBinding(\n    exportNameNode: ts.Node,\n    exportNameText: string,\n    discriminator = \"\",\n  ): string | undefined {\n    const sf = exportNameNode.getSourceFile();\n    if (!this.isUserSourceFile(sf)) return undefined;\n    const filePath = this.rel(sf);\n    const start = exportNameNode.getStart(sf, false);\n    const { line, character } = sf.getLineAndCharacterOfPosition(start);\n    const line1 = line + 1;\n    const col1 = character + 1;\n    const nid = makeNodeId(\n      filePath,\n      line1,\n      col1,\n      exportNameText,\n      discriminator,\n    );\n    if (!this.nodes.has(nid)) {\n      this.nodes.set(nid, {\n        id: nid,\n        filePath,\n        line: line1,\n        column: col1,\n        name: exportNameText,\n        kind: \"export-binding\",\n        typeString: this.typeStringAt(exportNameNode),\n        isSource: false,\n        infectedBy: new Set(),\n      });\n    }\n    return nid;\n  }\n\n  private ensureBindingElement(el: ts.BindingElement): string | undefined {\n    if (!ts.isIdentifier(el.name)) return undefined;\n    const sf = el.getSourceFile();\n    if (!this.isUserSourceFile(sf)) return undefined;\n    const filePath = this.rel(sf);\n    const name = el.name;\n    const start = name.getStart(sf, false);\n    const { line, character } = sf.getLineAndCharacterOfPosition(start);\n    const line1 = line + 1;\n    const col1 = character + 1;\n    const id = makeNodeId(filePath, line1, col1, name.text, \"bind\");\n    if (!this.nodes.has(id)) {\n      this.nodes.set(id, {\n        id,\n        filePath,\n        line: line1,\n        column: col1,\n        name: name.text,\n        kind: \"variable\",\n        typeString: this.typeStringAt(name),\n        isSource: false,\n        infectedBy: new Set(),\n      });\n    }\n    return id;\n  }\n\n  private symbolName(sym: ts.Symbol): string {\n    return sym.escapedName.toString();\n  }\n\n  private resolveAliasedSymbol(sym: ts.Symbol): ts.Symbol {\n    return (sym.flags & ts.SymbolFlags.Alias) !== 0\n      ? this.checker.getAliasedSymbol(sym)\n      : sym;\n  }\n\n  private moduleSymbolForSpecifier(\n    moduleSpecifier: ts.Expression | undefined,\n  ): ts.Symbol | undefined {\n    if (!moduleSpecifier || !ts.isStringLiteral(moduleSpecifier))\n      return undefined;\n    return this.checker.getSymbolAtLocation(moduleSpecifier);\n  }\n\n  private moduleKey(moduleSym: ts.Symbol, exportName: string): string {\n    const decl = moduleSym.declarations?.[0];\n    if (decl) {\n      return `${this.rel(decl.getSourceFile())}\\0${exportName}`;\n    }\n    return `${this.symbolName(moduleSym)}\\0${exportName}`;\n  }\n\n  private exportedSymbolByName(\n    moduleSym: ts.Symbol,\n    exportName: string,\n  ): ts.Symbol | undefined {\n    return this.checker\n      .getExportsOfModule(moduleSym)\n      .find((sym) => this.symbolName(sym) === exportName);\n  }\n\n  private sourceFileForModuleSymbol(\n    moduleSym: ts.Symbol,\n  ): ts.SourceFile | undefined {\n    const decl = moduleSym.declarations?.[0];\n    if (!decl) return undefined;\n    const sf = decl.getSourceFile();\n    return this.isUserSourceFile(sf) ? sf : undefined;\n  }\n\n  private exportChainMatches(\n    moduleSym: ts.Symbol,\n    exportName: string,\n    target: ts.Symbol,\n  ): boolean {\n    const candidate = this.exportedSymbolByName(moduleSym, exportName);\n    if (!candidate) return false;\n    return this.resolveAliasedSymbol(candidate) === target;\n  }\n\n  private buildExportChain(\n    moduleSym: ts.Symbol,\n    exportName: string,\n    seen = new Set<string>(),\n  ): string | undefined {\n    const cacheKey = this.moduleKey(moduleSym, exportName);\n    if (this.exportChainCache.has(cacheKey)) {\n      return this.exportChainCache.get(cacheKey);\n    }\n    if (seen.has(cacheKey)) return undefined;\n    const nextSeen = new Set(seen);\n    nextSeen.add(cacheKey);\n\n    const exportSym = this.exportedSymbolByName(moduleSym, exportName);\n    if (!exportSym) {\n      this.exportChainCache.set(cacheKey, undefined);\n      return undefined;\n    }\n\n    const exportSpecifierDecl = exportSym.declarations?.find(\n      ts.isExportSpecifier,\n    );\n    if (exportSpecifierDecl) {\n      const exportId = this.ensureExportBinding(\n        exportSpecifierDecl.name,\n        exportSpecifierDecl.name.text,\n      );\n      const exportDecl = exportSpecifierDecl.parent.parent;\n      const sourceExportName =\n        exportSpecifierDecl.propertyName?.text ?? exportSpecifierDecl.name.text;\n      let upstreamId: string | undefined;\n\n      if (exportDecl.moduleSpecifier) {\n        const upstreamModule = this.moduleSymbolForSpecifier(\n          exportDecl.moduleSpecifier,\n        );\n        if (upstreamModule) {\n          upstreamId = this.buildExportChain(\n            upstreamModule,\n            sourceExportName,\n            nextSeen,\n          );\n        }\n      } else {\n        const localRef =\n          exportSpecifierDecl.propertyName ?? exportSpecifierDecl.name;\n        const localSym = this.checker.getSymbolAtLocation(localRef);\n        const localDecl =\n          localSym &&\n          this.declarationForSymbol(this.resolveAliasedSymbol(localSym));\n        if (localDecl) upstreamId = this.ensureFromValueDeclaration(localDecl);\n      }\n\n      if (upstreamId && exportId)\n        this.addEdge(upstreamId, exportId, \"re-export\");\n      const resolvedId = exportId ?? upstreamId;\n      this.exportChainCache.set(cacheKey, resolvedId);\n      return resolvedId;\n    }\n\n    const resolvedExportSym = this.resolveAliasedSymbol(exportSym);\n    const moduleSf = this.sourceFileForModuleSymbol(moduleSym);\n    if (moduleSf) {\n      for (const stmt of moduleSf.statements) {\n        if (\n          !ts.isExportDeclaration(stmt) ||\n          stmt.isTypeOnly ||\n          stmt.exportClause !== undefined\n        ) {\n          continue;\n        }\n        const upstreamModule = this.moduleSymbolForSpecifier(\n          stmt.moduleSpecifier,\n        );\n        if (!upstreamModule) continue;\n        if (\n          !this.exportChainMatches(\n            upstreamModule,\n            exportName,\n            resolvedExportSym,\n          )\n        ) {\n          continue;\n        }\n        const exportId = this.ensureExportBinding(\n          stmt.moduleSpecifier!,\n          exportName,\n          \"star\",\n        );\n        const upstreamId = this.buildExportChain(\n          upstreamModule,\n          exportName,\n          nextSeen,\n        );\n        if (upstreamId && exportId)\n          this.addEdge(upstreamId, exportId, \"re-export\");\n        const resolvedId = exportId ?? upstreamId;\n        this.exportChainCache.set(cacheKey, resolvedId);\n        return resolvedId;\n      }\n    }\n\n    const originDecl = this.declarationForSymbol(resolvedExportSym);\n    const resolvedId = originDecl\n      ? this.ensureFromValueDeclaration(originDecl)\n      : undefined;\n    this.exportChainCache.set(cacheKey, resolvedId);\n    return resolvedId;\n  }\n\n  private returnAnchor(\n    fn: ts.FunctionLikeDeclaration,\n  ):\n    | { filePath: string; line: number; column: number; displayName: string }\n    | undefined {\n    const sf = fn.getSourceFile();\n    const filePath = this.rel(sf);\n    const vp = fn.parent;\n    if (ts.isVariableDeclaration(vp) && ts.isIdentifier(vp.name)) {\n      const pos = vp.name.getStart(sf, false);\n      const { line, character } = sf.getLineAndCharacterOfPosition(pos);\n      return {\n        filePath,\n        line: line + 1,\n        column: character + 1,\n        displayName: vp.name.text,\n      };\n    }\n    if (\n      ts.isPropertyDeclaration(vp) &&\n      ts.isIdentifier(vp.name) &&\n      (ts.isArrowFunction(fn) || ts.isFunctionExpression(fn))\n    ) {\n      const pos = vp.name.getStart(sf, false);\n      const { line, character } = sf.getLineAndCharacterOfPosition(pos);\n      return {\n        filePath,\n        line: line + 1,\n        column: character + 1,\n        displayName: vp.name.text,\n      };\n    }\n    if (ts.isFunctionDeclaration(fn) && fn.name) {\n      const pos = fn.name.getStart(sf, false);\n      const { line, character } = sf.getLineAndCharacterOfPosition(pos);\n      return {\n        filePath,\n        line: line + 1,\n        column: character + 1,\n        displayName: fn.name.text,\n      };\n    }\n    if (ts.isMethodDeclaration(fn) && ts.isIdentifier(fn.name)) {\n      const pos = fn.name.getStart(sf, false);\n      const { line, character } = sf.getLineAndCharacterOfPosition(pos);\n      return {\n        filePath,\n        line: line + 1,\n        column: character + 1,\n        displayName: fn.name.text,\n      };\n    }\n    return undefined;\n  }\n\n  private ensureReturnNode(fn: ts.FunctionLikeDeclaration): string | undefined {\n    const anchor = this.returnAnchor(fn);\n    if (!anchor) return undefined;\n    const { filePath, line, column, displayName } = anchor;\n    const id = makeNodeId(filePath, line, column, displayName, \"return\");\n    if (!this.nodes.has(id)) {\n      const sig = this.checker.getSignatureFromDeclaration(fn);\n      const rt = sig\n        ? this.checker.getReturnTypeOfSignature(sig)\n        : this.checker.getTypeAtLocation(fn);\n      const typeString = this.checker.typeToString(\n        rt,\n        undefined,\n        ts.TypeFormatFlags.NoTruncation,\n      );\n      this.nodes.set(id, {\n        id,\n        filePath,\n        line,\n        column,\n        name: displayName,\n        kind: \"return\",\n        typeString,\n        isSource: false,\n        infectedBy: new Set(),\n      });\n    }\n    return id;\n  }\n\n  /** Value-flow sources: identifiers / simple references with a registered declaration. */\n  exprToNodeId(expr: ts.Expression): string | undefined {\n    if (ts.isParenthesizedExpression(expr)) {\n      return this.exprToNodeId(expr.expression);\n    }\n    if (\n      ts.isAsExpression(expr) ||\n      ts.isTypeAssertionExpression(expr) ||\n      ts.isSatisfiesExpression(expr) ||\n      ts.isNonNullExpression(expr)\n    ) {\n      return this.exprToNodeId(expr.expression);\n    }\n\n    let sym: ts.Symbol | undefined;\n    if (ts.isIdentifier(expr)) {\n      sym = this.checker.getSymbolAtLocation(expr);\n    } else if (ts.isPropertyAccessExpression(expr)) {\n      sym =\n        this.checker.getSymbolAtLocation(expr.name) ??\n        this.checker.getSymbolAtLocation(expr);\n    } else if (ts.isElementAccessExpression(expr)) {\n      sym = this.propertySymbolForElementAccess(expr);\n    } else {\n      return undefined;\n    }\n\n    const vd = this.declarationForSymbol(sym);\n    if (!vd) return undefined;\n    return this.ensureFromValueDeclaration(vd);\n  }\n\n  private visitImportDeclaration(node: ts.ImportDeclaration): void {\n    if (!node.importClause || node.importClause.isTypeOnly) return;\n    if (!ts.isStringLiteral(node.moduleSpecifier)) return;\n    const modSym = this.checker.getSymbolAtLocation(node.moduleSpecifier);\n    if (!modSym) return;\n\n    if (node.importClause.name && !node.importClause.isTypeOnly) {\n      const importId = this.ensureImportBinding(node.importClause.name);\n      const exportId = this.buildExportChain(modSym, \"default\");\n      if (exportId && importId) this.addEdge(exportId, importId, \"import\");\n    }\n\n    if (\n      node.importClause.namedBindings &&\n      ts.isNamedImports(node.importClause.namedBindings)\n    ) {\n      for (const el of node.importClause.namedBindings.elements) {\n        if (el.isTypeOnly) continue;\n        const importId = this.ensureImportBinding(el.name);\n        const exportName = el.propertyName?.text ?? el.name.text;\n        const exportId = this.buildExportChain(modSym, exportName);\n        if (exportId && importId) this.addEdge(exportId, importId, \"import\");\n      }\n    } else if (\n      node.importClause.namedBindings &&\n      ts.isNamespaceImport(node.importClause.namedBindings)\n    ) {\n      const importId = this.ensureImportBinding(\n        node.importClause.namedBindings.name,\n      );\n      const localSym = this.checker.getSymbolAtLocation(\n        node.importClause.namedBindings.name,\n      );\n      if (!localSym) return;\n      const aliased = this.checker.getAliasedSymbol(localSym);\n      const expDecl = aliased.valueDeclaration;\n      if (!expDecl) return;\n      const expSf = expDecl.getSourceFile();\n      if (!this.isUserSourceFile(expSf)) return;\n      const exportId = this.ensureFromValueDeclaration(expDecl);\n      if (exportId && importId) this.addEdge(exportId, importId, \"import\");\n    }\n  }\n\n  private edgesFromCall(call: ts.CallExpression, lhsId?: string): void {\n    const sig = this.checker.getResolvedSignature(call);\n    if (!sig) return;\n    const decl = sig.getDeclaration();\n    if (!decl || !isCallableFunctionLike(decl)) {\n      return;\n    }\n    if (!this.isUserSourceFile(decl.getSourceFile())) return;\n\n    const ret = this.ensureReturnNode(decl);\n    if (lhsId && ret) this.addEdge(ret, lhsId, \"call-return\");\n\n    const params = decl.parameters;\n    for (let i = 0; i < call.arguments.length; i++) {\n      const arg = call.arguments[i];\n      const param = params[i];\n      if (arg === undefined || !param || !ts.isIdentifier(param.name)) continue;\n      const argId = this.exprToNodeId(arg as ts.Expression);\n      const paramId = this.ensureNamedDecl(param, \"parameter\");\n      if (argId && paramId) this.addEdge(argId, paramId, \"parameter-binding\");\n    }\n  }\n\n  private edgesFromObjectLiteral(\n    obj: ts.ObjectLiteralExpression,\n    vd: ts.VariableDeclaration,\n  ): void {\n    if (!ts.isIdentifier(vd.name)) return;\n    const lhs = this.ensureNamedDecl(vd, \"variable\");\n    if (!lhs) return;\n    for (const p of obj.properties) {\n      if (ts.isSpreadAssignment(p)) {\n        const sid = this.exprToNodeId(p.expression);\n        if (sid) this.addEdge(sid, lhs, \"spread\");\n        continue;\n      }\n      if (ts.isPropertyAssignment(p)) {\n        const pid = this.ensureFromValueDeclaration(p);\n        const rhs = this.exprToNodeId(p.initializer);\n        if (pid && rhs) {\n          this.addEdge(rhs, pid, this.reasonForValueRead(p.initializer));\n        }\n        continue;\n      }\n      if (ts.isShorthandPropertyAssignment(p)) {\n        const pid = this.ensureFromValueDeclaration(p);\n        const rhs = this.exprToNodeId(p.name);\n        if (pid && rhs) this.addEdge(rhs, pid, \"assignment\");\n      }\n    }\n  }\n\n  private visitExpressionStatement(node: ts.ExpressionStatement): void {\n    const e = node.expression;\n    if (ts.isCallExpression(e)) {\n      this.edgesFromCall(e);\n      return;\n    }\n    if (\n      ts.isBinaryExpression(e) &&\n      e.operatorToken.kind === ts.SyntaxKind.EqualsToken\n    ) {\n      const lhsId = this.exprToNodeId(e.left);\n      if (!lhsId) return;\n      if (ts.isCallExpression(e.right)) {\n        this.edgesFromCall(e.right, lhsId);\n        return;\n      }\n      const rhsId = this.exprToNodeId(e.right);\n      if (rhsId) this.addEdge(rhsId, lhsId, this.reasonForValueRead(e.right));\n    }\n  }\n\n  private visitVariableDeclaration(node: ts.VariableDeclaration): void {\n    if (ts.isIdentifier(node.name)) {\n      const lhs = this.ensureNamedDecl(node, \"variable\");\n      const init = node.initializer;\n      if (!init || !lhs) return;\n\n      if (ts.isIdentifier(init)) {\n        const rhs = this.exprToNodeId(init);\n        if (rhs) this.addEdge(rhs, lhs, \"assignment\");\n        return;\n      }\n      if (ts.isCallExpression(init)) {\n        this.edgesFromCall(init, lhs);\n        return;\n      }\n      const rhs = this.exprToNodeId(init);\n      if (rhs) {\n        this.addEdge(rhs, lhs, this.reasonForValueRead(init));\n        return;\n      }\n      if (ts.isObjectLiteralExpression(init)) {\n        this.edgesFromObjectLiteral(init, node);\n      }\n    } else if (ts.isObjectBindingPattern(node.name) && node.initializer) {\n      const rhsId = this.exprToNodeId(node.initializer);\n      if (!rhsId) return;\n      for (const el of node.name.elements) {\n        if (!ts.isBindingElement(el) || el.dotDotDotToken) continue;\n        const bid = this.ensureBindingElement(el);\n        if (bid) this.addEdge(rhsId, bid, \"destructure\");\n      }\n    }\n  }\n\n  private visitReturnStatement(node: ts.ReturnStatement): void {\n    if (!node.expression) return;\n    const fn = getEnclosingFunctionLike(node);\n    if (!fn) return;\n    const retId = this.ensureReturnNode(fn);\n    const exId = this.exprToNodeId(node.expression);\n    if (retId && exId) {\n      this.addEdge(exId, retId, this.reasonForValueRead(node.expression));\n    }\n  }\n\n  private visitPropertyDeclaration(node: ts.PropertyDeclaration): void {\n    if (!node.initializer || !ts.isIdentifier(node.name)) return;\n    const lhs = this.ensureNamedDecl(node, \"property\");\n    const rhs = this.exprToNodeId(node.initializer);\n    if (lhs && rhs) this.addEdge(rhs, lhs, \"class-member\");\n  }\n\n  private visitFunctionLike(fn: ts.FunctionLikeDeclaration): void {\n    if (ts.isFunctionDeclaration(fn) && fn.name) {\n      this.ensureNamedDecl(fn, \"variable\");\n    }\n    if (ts.isMethodDeclaration(fn) && ts.isIdentifier(fn.name)) {\n      this.ensureNamedDecl(fn, \"property\");\n    }\n    for (const p of fn.parameters) {\n      if (ts.isIdentifier(p.name)) {\n        this.ensureNamedDecl(p, \"parameter\");\n      }\n    }\n  }\n\n  private visit(node: ts.Node): void {\n    if (ts.isSourceFile(node)) {\n      if (!this.isUserSourceFile(node)) return;\n      ts.forEachChild(node, (c) => this.visit(c));\n      return;\n    }\n\n    if (ts.isImportDeclaration(node)) this.visitImportDeclaration(node);\n    else if (ts.isExpressionStatement(node))\n      this.visitExpressionStatement(node);\n    else if (ts.isVariableDeclaration(node))\n      this.visitVariableDeclaration(node);\n    else if (ts.isReturnStatement(node)) this.visitReturnStatement(node);\n    else if (ts.isPropertyDeclaration(node))\n      this.visitPropertyDeclaration(node);\n    else if (\n      ts.isFunctionDeclaration(node) ||\n      ts.isArrowFunction(node) ||\n      ts.isMethodDeclaration(node) ||\n      ts.isFunctionExpression(node)\n    ) {\n      this.visitFunctionLike(node);\n    }\n\n    ts.forEachChild(node, (c) => this.visit(c));\n  }\n\n  build(): void {\n    for (const sf of this.program.getSourceFiles()) {\n      if (!this.isUserSourceFile(sf)) continue;\n      this.visit(sf);\n    }\n  }\n\n  applySources(sources: AnySource[]): void {\n    for (const s of sources) {\n      const matches = [...this.nodes.values()].filter(\n        (n) =>\n          n.filePath === s.filePath &&\n          n.line === s.line &&\n          n.column === s.column &&\n          n.name === s.name,\n      );\n      if (matches.length === 0) continue;\n\n      const useReturnSlot =\n        s.sourceKind === \"untyped-return\" ||\n        (s.sourceKind === \"explicit-any\" &&\n          matches.some((n) => n.kind === \"return\" && n.typeString === \"any\") &&\n          matches.some((n) => n.kind !== \"return\" && n.typeString !== \"any\"));\n      const target = useReturnSlot\n        ? matches.find((n) => n.kind === \"return\")\n        : matches.find((n) => n.kind !== \"return\");\n      if (target) {\n        target.isSource = true;\n        target.sourceKind = s.sourceKind;\n      }\n    }\n  }\n\n  /**\n   * Forward propagation (PLAN §5.3): along edges `from` → `to`, each source id tags reachable nodes in `infectedBy`.\n   */\n  propagate(): void {\n    const sourceIds = [...this.nodes.values()]\n      .filter((n) => n.isSource)\n      .map((n) => n.id);\n    for (const s of sourceIds) {\n      const origin = this.nodes.get(s);\n      if (!origin) continue;\n      origin.infectedBy.add(s);\n      const q: string[] = [s];\n      while (q.length > 0) {\n        const u = q.shift()!;\n        for (const e of this.outgoing.get(u) ?? []) {\n          const target = this.nodes.get(e.to);\n          if (!target) continue;\n          if (target.infectedBy.has(s)) continue;\n          target.infectedBy.add(s);\n          q.push(e.to);\n        }\n      }\n    }\n  }\n\n  countInfectedBy(sourceId: string): number {\n    let c = 0;\n    for (const n of this.nodes.values()) {\n      if (n.infectedBy.has(sourceId)) c += 1;\n    }\n    return c;\n  }\n\n  /** Count of graph nodes with non-empty `infectedBy` after `propagate()`. */\n  getInfectedNodeCount(): number {\n    let c = 0;\n    for (const n of this.nodes.values()) {\n      if (n.infectedBy.size > 0) c += 1;\n    }\n    return c;\n  }\n\n  getEdges(): GraphEdge[] {\n    return this.edgeList;\n  }\n\n  /** Infected graph node ids per `any` source id (post-`propagate()`). */\n  getInfectedNodeSetsPerSource(): Map<string, Set<string>> {\n    const sourceIds = [...this.nodes.values()]\n      .filter((n) => n.isSource && n.sourceKind !== undefined)\n      .map((n) => n.id);\n    const infectedNodesPerSource = new Map<string, Set<string>>();\n    for (const sid of sourceIds) {\n      const set = new Set<string>();\n      for (const n of this.nodes.values()) {\n        if (n.infectedBy.has(sid)) set.add(n.id);\n      }\n      infectedNodesPerSource.set(sid, set);\n    }\n    return infectedNodesPerSource;\n  }\n\n  /**\n   * Greedy set-cover: repeatedly pick the `any` source that covers the most still-uncovered infected nodes.\n   * Uses per-source infected sets so each pass is O(sources × min(|infected(s)|, |uncovered|)), not O(sources × |nodes|).\n   */\n  greedySetCoverPicks(blastRanked: SourceRanked[]): GreedyCoverPick[] {\n    const universeSize = this.getInfectedNodeCount();\n    if (universeSize === 0) return [];\n\n    const meta = new Map<string, SourceRanked>();\n    for (const r of blastRanked) {\n      if (r.graphNodeId) meta.set(r.graphNodeId, r);\n    }\n\n    const universe = new Set<string>();\n    for (const n of this.nodes.values()) {\n      if (n.infectedBy.size > 0) universe.add(n.id);\n    }\n\n    const infectedNodesPerSource = this.getInfectedNodeSetsPerSource();\n    const sourceIds = [...infectedNodesPerSource.keys()];\n\n    const uncovered = new Set(universe);\n    const picks: GreedyCoverPick[] = [];\n    let cumulative = 0;\n    let pickNum = 0;\n\n    while (uncovered.size > 0) {\n      let bestId: string | undefined;\n      let bestGain = -1;\n\n      for (const sid of sourceIds) {\n        const infected = infectedNodesPerSource.get(sid)!;\n        let gain = 0;\n        if (infected.size <= uncovered.size) {\n          for (const id of infected) {\n            if (uncovered.has(id)) gain++;\n          }\n        } else {\n          for (const id of uncovered) {\n            if (infected.has(id)) gain++;\n          }\n        }\n\n        if (gain > bestGain) {\n          bestGain = gain;\n          bestId = sid;\n        } else if (gain === bestGain && gain > 0 && bestId !== undefined) {\n          const b1 = meta.get(bestId)?.blastRadius ?? 0;\n          const b2 = meta.get(sid)?.blastRadius ?? 0;\n          if (b2 > b1) bestId = sid;\n          else if (b2 === b1 && sid.localeCompare(bestId) < 0) bestId = sid;\n        }\n      }\n\n      if (bestGain <= 0 || bestId === undefined) break;\n\n      let newCov = 0;\n      for (const id of infectedNodesPerSource.get(bestId)!) {\n        if (uncovered.delete(id)) newCov++;\n      }\n\n      cumulative += newCov;\n      pickNum++;\n      const m = meta.get(bestId)!;\n      const node = this.nodes.get(bestId)!;\n      picks.push({\n        pick: pickNum,\n        graphNodeId: bestId,\n        filePath: node.filePath,\n        line: node.line,\n        column: node.column,\n        name: node.name,\n        sourceKind: node.sourceKind!,\n        blastRadius: m.blastRadius,\n        blastRank: m.rank,\n        newlyCoveredNodes: newCov,\n        cumulativeCoveredNodes: cumulative,\n        cumulativeCoveragePct: Math.round((100 * cumulative) / universeSize),\n      });\n    }\n\n    return picks;\n  }\n\n  /**\n   * Exact match on project-relative path (forward slashes) and reported identifier position.\n   */\n  getTraceHop(nodeId: string): TraceHop | undefined {\n    const n = this.nodes.get(nodeId);\n    if (!n) return undefined;\n    return {\n      nodeId: n.id,\n      filePath: n.filePath,\n      line: n.line,\n      column: n.column,\n      name: n.name,\n      kind: n.kind,\n    };\n  }\n\n  /** Source ids in `targetId`'s infection set that are graph `any` origins. */\n  listInfectedSourceIds(targetId: string): string[] {\n    const n = this.nodes.get(targetId);\n    if (!n) return [];\n    return [...n.infectedBy]\n      .filter((id) => {\n        const s = this.nodes.get(id);\n        return Boolean(s?.isSource && s.sourceKind);\n      })\n      .sort((a, b) => a.localeCompare(b));\n  }\n\n  getAnySourceRow(nodeId: string):\n    | {\n        filePath: string;\n        line: number;\n        column: number;\n        name: string;\n        sourceKind: SourceKind;\n      }\n    | undefined {\n    const n = this.nodes.get(nodeId);\n    if (!n?.isSource || !n.sourceKind) return undefined;\n    return {\n      filePath: n.filePath,\n      line: n.line,\n      column: n.column,\n      name: n.name,\n      sourceKind: n.sourceKind,\n    };\n  }\n\n  findNodeIdAtLocation(\n    filePath: string,\n    line: number,\n    column: number,\n  ): string | undefined {\n    const norm = filePath.replace(/\\\\/g, \"/\");\n    const matches = [...this.nodes.values()].filter(\n      (n) => n.filePath === norm && n.line === line && n.column === column,\n    );\n    if (matches.length === 0) return undefined;\n    matches.sort((a, b) => a.id.localeCompare(b.id));\n    return matches[0]!.id;\n  }\n\n  rankSourcesByBlast(): SourceRanked[] {\n    const rows = [...this.nodes.values()]\n      .filter((n) => n.isSource && n.sourceKind !== undefined)\n      .map((n) => ({\n        n,\n        blast: this.countInfectedBy(n.id),\n      }))\n      .sort(\n        (a, b) =>\n          b.blast - a.blast ||\n          a.n.filePath.localeCompare(b.n.filePath) ||\n          a.n.line - b.n.line ||\n          a.n.column - b.n.column ||\n          a.n.name.localeCompare(b.n.name),\n      );\n\n    return rows.map((row, i): SourceRanked => {\n      const { n } = row;\n      return {\n        rank: i + 1,\n        blastRadius: row.blast,\n        graphNodeId: n.id,\n        filePath: n.filePath,\n        line: n.line,\n        column: n.column,\n        name: n.name,\n        sourceKind: n.sourceKind!,\n      };\n    });\n  }\n\n  serialize(): SerializedGraph {\n    const edgeKeys = new Set<string>();\n    const edges: GraphEdge[] = [];\n    for (const e of this.edgeList) {\n      const k = `${e.from}\\0${e.to}\\0${e.reason}`;\n      if (edgeKeys.has(k)) continue;\n      edgeKeys.add(k);\n      edges.push(e);\n    }\n    edges.sort(\n      (a, b) =>\n        a.from.localeCompare(b.from) ||\n        a.to.localeCompare(b.to) ||\n        a.reason.localeCompare(b.reason),\n    );\n    const nodes = [...this.nodes.values()]\n      .map((n) => {\n        const infectedBy = [...n.infectedBy].sort();\n        const base = {\n          id: n.id,\n          filePath: n.filePath,\n          line: n.line,\n          column: n.column,\n          name: n.name,\n          kind: n.kind,\n          typeString: n.typeString,\n          isSource: n.isSource,\n          infectedBy,\n        };\n        return n.sourceKind !== undefined\n          ? { ...base, sourceKind: n.sourceKind }\n          : base;\n      })\n      .sort(\n        (a, b) =>\n          a.filePath.localeCompare(b.filePath) ||\n          a.line - b.line ||\n          a.column - b.column ||\n          a.id.localeCompare(b.id),\n      );\n    return { nodes, edges };\n  }\n}\n\nexport function buildSerializedGraph(\n  program: ts.Program,\n  projectRootAbs: string,\n  sources: AnySource[],\n): SerializedGraph {\n  const b = new GraphBuilder(program, projectRootAbs);\n  b.build();\n  b.applySources(sources);\n  b.propagate();\n  return b.serialize();\n}\n","import { createHash } from \"node:crypto\";\n\n/**\n * Stable node id (PLAN §4): SHA-1 of path, position, name, and optional discriminator.\n */\nexport function makeNodeId(\n  filePath: string,\n  line: number,\n  column: number,\n  name: string,\n  discriminator = \"\",\n): string {\n  const payload = [\n    filePath,\n    String(line),\n    String(column),\n    name,\n    discriminator,\n  ].join(\"\\0\");\n  return createHash(\"sha1\").update(payload).digest(\"hex\");\n}\n","import picomatch from \"picomatch\";\nimport type { AnySource, SourceKind } from \"../types.js\";\n\nexport interface SourceFilters {\n  /** If set, only these classifier kinds are kept. */\n  sourceKinds?: SourceKind[];\n  /** Picomatch globs (POSIX paths); matching `filePath` rows are dropped. */\n  ignoreGlobs?: string[];\n}\n\nconst ALL_KINDS: SourceKind[] = [\n  \"explicit-any\",\n  \"as-any\",\n  \"untyped-import\",\n  \"untyped-return\",\n  \"catch-binding\",\n  \"implicit-param\",\n];\n\nexport function parseSourceKindsList(csv: string): SourceKind[] {\n  const parts = csv\n    .split(\",\")\n    .map((s) => s.trim())\n    .filter(Boolean);\n  const out: SourceKind[] = [];\n  for (const p of parts) {\n    if (!ALL_KINDS.includes(p as SourceKind)) {\n      throw new Error(\n        `Unknown source kind \"${p}\". Expected one of: ${ALL_KINDS.join(\", \")}`,\n      );\n    }\n    out.push(p as SourceKind);\n  }\n  return out;\n}\n\nexport function parseIgnoreGlobsList(csv: string): string[] {\n  return csv\n    .split(\",\")\n    .map((s) => s.trim())\n    .filter(Boolean);\n}\n\nexport function filterSources(\n  sources: AnySource[],\n  filters: SourceFilters,\n): AnySource[] {\n  let out = sources;\n  if (filters.sourceKinds && filters.sourceKinds.length > 0) {\n    const set = new Set(filters.sourceKinds);\n    out = out.filter((s) => set.has(s.sourceKind));\n  }\n  if (filters.ignoreGlobs && filters.ignoreGlobs.length > 0) {\n    const matchers = filters.ignoreGlobs.map((g) =>\n      picomatch(g, { dot: true }),\n    );\n    out = out.filter((s) => !matchers.some((m) => m(s.filePath)));\n  }\n  return out;\n}\n","import ts from \"typescript\";\nimport type { AnySource } from \"../types.js\";\nimport { findExplicitAnySources } from \"./classify-explicit-any.js\";\nimport {\n  isFromNodeModulesOrDts,\n  isJavaScriptInputFile,\n  toProjectRelativePath,\n} from \"./load-project.js\";\n\nfunction isErrorType(t: ts.Type): boolean {\n  return (t as ts.Type & { intrinsicName?: string }).intrinsicName === \"error\";\n}\n\nfunction isAnyType(t: ts.Type): boolean {\n  return !isErrorType(t) && (t.flags & ts.TypeFlags.Any) !== 0;\n}\n\nfunction getDisplayName(decl: ts.Node): string {\n  if (ts.isFunctionDeclaration(decl) && !decl.name) {\n    return \"(default)\";\n  }\n  const name = ts.getNameOfDeclaration(decl as ts.Declaration);\n  if (name && ts.isIdentifier(name)) return name.text;\n  if (name && ts.isPrivateIdentifier(name)) return name.text;\n  if (ts.isVariableDeclaration(decl) && decl.initializer) {\n    if (\n      ts.isArrowFunction(decl.initializer) ||\n      ts.isFunctionExpression(decl.initializer)\n    ) {\n      return \"(anonymous)\";\n    }\n  }\n  if (ts.isArrowFunction(decl) || ts.isFunctionExpression(decl)) {\n    return \"(anonymous)\";\n  }\n  return \"(unknown)\";\n}\n\nfunction locationForReport(decl: ts.Node): ts.Node {\n  const name = ts.getNameOfDeclaration(decl as ts.Declaration);\n  if (name) return name;\n  return decl;\n}\n\nfunction positionOfNode(\n  node: ts.Node,\n  sf: ts.SourceFile,\n): { line: number; column: number } {\n  const start = node.getStart(sf, false);\n  const { line, character } = sf.getLineAndCharacterOfPosition(start);\n  return { line: line + 1, column: character + 1 };\n}\n\nfunction findAncestorFunctionLike(\n  node: ts.Node,\n): ts.FunctionLikeDeclaration | undefined {\n  let n: ts.Node | undefined = node.parent;\n  while (n) {\n    if (\n      ts.isFunctionDeclaration(n) ||\n      ts.isFunctionExpression(n) ||\n      ts.isArrowFunction(n) ||\n      ts.isMethodDeclaration(n) ||\n      ts.isGetAccessorDeclaration(n) ||\n      ts.isSetAccessorDeclaration(n)\n    ) {\n      return n;\n    }\n    n = n.parent;\n  }\n  return undefined;\n}\n\nfunction reportNodeForFunctionLike(fn: ts.FunctionLikeDeclaration): ts.Node {\n  const p = fn.parent;\n  if (ts.isVariableDeclaration(p) && p.initializer === fn) return p;\n  if (ts.isPropertyDeclaration(p) && p.initializer === fn) return p;\n  if (ts.isPropertyAssignment(p) && p.initializer === fn) return p;\n  return fn;\n}\n\nfunction resolveAssertionLikeReportTarget(\n  node: ts.AssertionExpression | ts.SatisfiesExpression,\n): {\n  report: ts.Node;\n  name: string;\n} {\n  const p = node.parent;\n  if (ts.isVariableDeclaration(p) && p.initializer === node) {\n    return { report: locationForReport(p), name: getDisplayName(p) };\n  }\n  if (ts.isPropertyDeclaration(p) && p.initializer === node) {\n    return { report: locationForReport(p), name: getDisplayName(p) };\n  }\n  if (ts.isReturnStatement(p) && p.expression === node) {\n    const fn = findAncestorFunctionLike(p);\n    if (!fn) {\n      return { report: node, name: \"(as-any)\" };\n    }\n    const owner = reportNodeForFunctionLike(fn);\n    const report = locationForReport(owner);\n    return { report, name: getDisplayName(owner) };\n  }\n  if (ts.isExpressionStatement(p) && p.expression === node) {\n    return { report: node, name: \"(expr)\" };\n  }\n  return { report: node, name: \"(as-any)\" };\n}\n\nfunction findAsAnySources(\n  program: ts.Program,\n  projectRootAbs: string,\n  checker: ts.TypeChecker,\n): AnySource[] {\n  const out: AnySource[] = [];\n\n  const visit = (node: ts.Node): void => {\n    if (\n      ts.isAsExpression(node) ||\n      ts.isTypeAssertionExpression(node) ||\n      ts.isSatisfiesExpression(node)\n    ) {\n      if (!isAnyType(checker.getTypeAtLocation(node))) {\n        ts.forEachChild(node, visit);\n        return;\n      }\n      const target = resolveAssertionLikeReportTarget(node);\n      const sf = target.report.getSourceFile();\n      const pos = positionOfNode(target.report, sf);\n      out.push({\n        filePath: toProjectRelativePath(sf.fileName, projectRootAbs),\n        line: pos.line,\n        column: pos.column,\n        name: target.name,\n        sourceKind: \"as-any\",\n      });\n    }\n    ts.forEachChild(node, visit);\n  };\n\n  for (const sf of program.getSourceFiles()) {\n    if (isFromNodeModulesOrDts(sf)) continue;\n    visit(sf);\n  }\n  return out;\n}\n\nfunction findUntypedImportSources(\n  program: ts.Program,\n  projectRootAbs: string,\n  checker: ts.TypeChecker,\n): AnySource[] {\n  const out: AnySource[] = [];\n\n  const isTrueUntypedImport = (id: ts.Identifier): boolean => {\n    const localSym = checker.getSymbolAtLocation(id);\n    if (!localSym) return true;\n    const aliased =\n      (localSym.flags & ts.SymbolFlags.Alias) !== 0\n        ? checker.getAliasedSymbol(localSym)\n        : localSym;\n    const originDecl = aliased.valueDeclaration ?? aliased.declarations?.[0];\n    if (!originDecl) return true;\n    const originSf = originDecl.getSourceFile();\n    if (isJavaScriptInputFile(originSf)) return true;\n    if (originSf.isDeclarationFile) return true;\n    return isFromNodeModulesOrDts(originSf);\n  };\n\n  const checkBinding = (id: ts.Identifier): void => {\n    const t = checker.getTypeAtLocation(id);\n    if (!isAnyType(t)) return;\n    if (!isTrueUntypedImport(id)) return;\n    const sf = id.getSourceFile();\n    const pos = positionOfNode(id, sf);\n    out.push({\n      filePath: toProjectRelativePath(sf.fileName, projectRootAbs),\n      line: pos.line,\n      column: pos.column,\n      name: id.text,\n      sourceKind: \"untyped-import\",\n    });\n  };\n\n  const visit = (node: ts.Node): void => {\n    if (\n      ts.isImportDeclaration(node) &&\n      node.importClause &&\n      !node.importClause.isTypeOnly\n    ) {\n      const clause = node.importClause;\n      if (clause.name) {\n        checkBinding(clause.name);\n      }\n      if (clause.namedBindings) {\n        if (ts.isNamespaceImport(clause.namedBindings)) {\n          checkBinding(clause.namedBindings.name);\n        } else {\n          for (const spec of clause.namedBindings.elements) {\n            if (!spec.isTypeOnly) {\n              checkBinding(spec.name);\n            }\n          }\n        }\n      }\n    }\n    ts.forEachChild(node, visit);\n  };\n\n  for (const sf of program.getSourceFiles()) {\n    if (isFromNodeModulesOrDts(sf)) continue;\n    if (isJavaScriptInputFile(sf)) continue;\n    visit(sf);\n  }\n  return out;\n}\n\nfunction findUntypedReturnSources(\n  program: ts.Program,\n  projectRootAbs: string,\n  checker: ts.TypeChecker,\n): AnySource[] {\n  const out: AnySource[] = [];\n\n  const visitFn = (fn: ts.FunctionLikeDeclaration): void => {\n    if (ts.isConstructorDeclaration(fn)) return;\n    if (fn.type) return;\n    const sig = checker.getSignatureFromDeclaration(fn);\n    if (!sig) return;\n    const ret = checker.getReturnTypeOfSignature(sig);\n    if (!isAnyType(ret)) return;\n\n    const reportNode = reportNodeForFunctionLike(fn);\n    const at = locationForReport(reportNode);\n    const sf = at.getSourceFile();\n    const pos = positionOfNode(at, sf);\n    out.push({\n      filePath: toProjectRelativePath(sf.fileName, projectRootAbs),\n      line: pos.line,\n      column: pos.column,\n      name: getDisplayName(reportNode),\n      sourceKind: \"untyped-return\",\n    });\n  };\n\n  const visit = (node: ts.Node): void => {\n    if (\n      ts.isFunctionDeclaration(node) ||\n      ts.isFunctionExpression(node) ||\n      ts.isArrowFunction(node) ||\n      ts.isMethodDeclaration(node) ||\n      ts.isGetAccessorDeclaration(node) ||\n      ts.isSetAccessorDeclaration(node)\n    ) {\n      visitFn(node);\n    }\n    ts.forEachChild(node, visit);\n  };\n\n  for (const sf of program.getSourceFiles()) {\n    if (isFromNodeModulesOrDts(sf)) continue;\n    if (isJavaScriptInputFile(sf)) continue;\n    visit(sf);\n  }\n  return out;\n}\n\nfunction findCatchBindingSources(\n  program: ts.Program,\n  projectRootAbs: string,\n  checker: ts.TypeChecker,\n): AnySource[] {\n  const out: AnySource[] = [];\n  if (program.getCompilerOptions().useUnknownInCatchVariables === true) {\n    return out;\n  }\n\n  const visit = (node: ts.Node): void => {\n    if (ts.isCatchClause(node) && node.variableDeclaration) {\n      const vd = node.variableDeclaration;\n      if (vd.type) {\n        ts.forEachChild(node, visit);\n        return;\n      }\n      const t = checker.getTypeAtLocation(vd.name);\n      if (!isAnyType(t)) {\n        ts.forEachChild(node, visit);\n        return;\n      }\n      const report = vd.name;\n      const sf = report.getSourceFile();\n      const pos = positionOfNode(report, sf);\n      const name = ts.isIdentifier(report) ? report.text : \"(binding)\";\n      out.push({\n        filePath: toProjectRelativePath(sf.fileName, projectRootAbs),\n        line: pos.line,\n        column: pos.column,\n        name,\n        sourceKind: \"catch-binding\",\n      });\n    }\n    ts.forEachChild(node, visit);\n  };\n\n  for (const sf of program.getSourceFiles()) {\n    if (isFromNodeModulesOrDts(sf)) continue;\n    if (isJavaScriptInputFile(sf)) continue;\n    visit(sf);\n  }\n  return out;\n}\n\nfunction findImplicitParamSources(\n  program: ts.Program,\n  projectRootAbs: string,\n  checker: ts.TypeChecker,\n): AnySource[] {\n  const out: AnySource[] = [];\n  if (program.getCompilerOptions().noImplicitAny === true) {\n    return out;\n  }\n\n  const visit = (node: ts.Node): void => {\n    if (ts.isParameter(node)) {\n      if (!ts.isIdentifier(node.name)) {\n        ts.forEachChild(node, visit);\n        return;\n      }\n      if (node.type) {\n        ts.forEachChild(node, visit);\n        return;\n      }\n      const t = checker.getTypeAtLocation(node.name);\n      if (!isAnyType(t)) {\n        ts.forEachChild(node, visit);\n        return;\n      }\n      const report = node.name;\n      const sf = report.getSourceFile();\n      const pos = positionOfNode(report, sf);\n      const name = node.name.text;\n      out.push({\n        filePath: toProjectRelativePath(sf.fileName, projectRootAbs),\n        line: pos.line,\n        column: pos.column,\n        name,\n        sourceKind: \"implicit-param\",\n      });\n    }\n    ts.forEachChild(node, visit);\n  };\n\n  for (const sf of program.getSourceFiles()) {\n    if (isFromNodeModulesOrDts(sf)) continue;\n    if (isJavaScriptInputFile(sf)) continue;\n    visit(sf);\n  }\n  return out;\n}\n\nfunction sourceKey(s: AnySource): string {\n  return `${s.sourceKind}\\0${s.filePath}\\0${s.line}\\0${s.column}\\0${s.name}`;\n}\n\nfunction sortSources(a: AnySource, b: AnySource): number {\n  if (a.filePath !== b.filePath) return a.filePath.localeCompare(b.filePath);\n  if (a.line !== b.line) return a.line - b.line;\n  if (a.column !== b.column) return a.column - b.column;\n  return a.sourceKind.localeCompare(b.sourceKind as string);\n}\n\n/**\n * All six v1 source kinds (PLAN §4), merged and de-duplicated by report location + kind.\n */\nexport function findAnySources(\n  program: ts.Program,\n  projectRootAbs: string,\n): AnySource[] {\n  const checker = program.getTypeChecker();\n  const buckets: AnySource[] = [\n    ...findExplicitAnySources(program, projectRootAbs),\n    ...findAsAnySources(program, projectRootAbs, checker),\n    ...findUntypedImportSources(program, projectRootAbs, checker),\n    ...findUntypedReturnSources(program, projectRootAbs, checker),\n    ...findCatchBindingSources(program, projectRootAbs, checker),\n    ...findImplicitParamSources(program, projectRootAbs, checker),\n  ];\n\n  const seen = new Set<string>();\n  const out: AnySource[] = [];\n  for (const s of buckets) {\n    const k = sourceKey(s);\n    if (seen.has(k)) continue;\n    seen.add(k);\n    out.push(s);\n  }\n  out.sort(sortSources);\n  return out;\n}\n","import ts from \"typescript\";\nimport type { AnySource } from \"../types.js\";\nimport {\n  isFromNodeModulesOrDts,\n  toProjectRelativePath,\n} from \"./load-project.js\";\n\nconst SOURCE_KIND = \"explicit-any\" as const;\n\nfunction isAsAnyAssertion(anyKw: ts.Node): boolean {\n  const p = anyKw.parent;\n  return (\n    (ts.isAsExpression(p) && p.type === anyKw) ||\n    (ts.isTypeAssertionExpression(p) && p.type === anyKw) ||\n    (ts.isSatisfiesExpression(p) && p.type === anyKw)\n  );\n}\n\nfunction typeSubtreeContains(\n  root: ts.TypeNode | undefined,\n  anyKw: ts.Node,\n): boolean {\n  if (!root) return false;\n  let found = false;\n  const visit = (n: ts.Node): void => {\n    if (found) return;\n    if (n === anyKw) {\n      found = true;\n      return;\n    }\n    ts.forEachChild(n, visit);\n  };\n  visit(root);\n  return found;\n}\n\nfunction declarationOwnsAnyInAnnotatedType(\n  decl: ts.Node,\n  anyKw: ts.Node,\n): boolean {\n  if (\n    ts.isFunctionDeclaration(decl) ||\n    ts.isFunctionExpression(decl) ||\n    ts.isArrowFunction(decl) ||\n    ts.isMethodDeclaration(decl) ||\n    ts.isConstructorDeclaration(decl) ||\n    ts.isGetAccessorDeclaration(decl) ||\n    ts.isSetAccessorDeclaration(decl)\n  ) {\n    return typeSubtreeContains(decl.type, anyKw);\n  }\n  if (\n    ts.isVariableDeclaration(decl) ||\n    ts.isParameter(decl) ||\n    ts.isPropertyDeclaration(decl) ||\n    ts.isPropertySignature(decl) ||\n    ts.isTypeAliasDeclaration(decl) ||\n    ts.isIndexSignatureDeclaration(decl)\n  ) {\n    return typeSubtreeContains(decl.type, anyKw);\n  }\n  return false;\n}\n\nfunction findOwningNamedDeclaration(anyKw: ts.Node): ts.Node | undefined {\n  let n: ts.Node | undefined = anyKw.parent;\n  while (n) {\n    if (\n      ts.isVariableDeclaration(n) ||\n      ts.isParameter(n) ||\n      ts.isPropertyDeclaration(n) ||\n      ts.isPropertySignature(n) ||\n      ts.isTypeAliasDeclaration(n) ||\n      ts.isIndexSignatureDeclaration(n) ||\n      ts.isFunctionDeclaration(n) ||\n      ts.isMethodDeclaration(n) ||\n      ts.isConstructorDeclaration(n) ||\n      ts.isGetAccessorDeclaration(n) ||\n      ts.isSetAccessorDeclaration(n) ||\n      ts.isFunctionExpression(n) ||\n      ts.isArrowFunction(n)\n    ) {\n      if (declarationOwnsAnyInAnnotatedType(n, anyKw)) {\n        return n;\n      }\n    }\n    n = n.parent;\n  }\n  return undefined;\n}\n\nfunction getDisplayName(decl: ts.Node): string {\n  const name = ts.getNameOfDeclaration(decl as ts.Declaration);\n  if (name && ts.isIdentifier(name)) return name.text;\n  if (name && ts.isPrivateIdentifier(name)) return name.text;\n  if (ts.isVariableDeclaration(decl) && decl.initializer) {\n    if (\n      ts.isArrowFunction(decl.initializer) ||\n      ts.isFunctionExpression(decl.initializer)\n    ) {\n      return \"(anonymous)\";\n    }\n  }\n  if (ts.isArrowFunction(decl) || ts.isFunctionExpression(decl)) {\n    return \"(anonymous)\";\n  }\n  return \"(unknown)\";\n}\n\nfunction locationForReport(decl: ts.Node): ts.Node {\n  const name = ts.getNameOfDeclaration(decl as ts.Declaration);\n  if (name) return name;\n  return decl;\n}\n\n/**\n * Collect every explicit `: any`-style annotation (including `any[]`, `Record<string, any>`, etc.),\n * excluding `as any` / `<any>` / `satisfies any` assertions (handled in m2).\n */\nexport function findExplicitAnySources(\n  program: ts.Program,\n  projectRootAbs: string,\n): AnySource[] {\n  const checker = program.getTypeChecker();\n  const byDeclaration = new Map<ts.Node, AnySource>();\n\n  const visit = (node: ts.Node): void => {\n    if (node.kind === ts.SyntaxKind.AnyKeyword) {\n      const anyKw = node;\n      if (isAsAnyAssertion(anyKw)) {\n        ts.forEachChild(node, visit);\n        return;\n      }\n\n      const decl = findOwningNamedDeclaration(anyKw);\n      if (!decl) {\n        ts.forEachChild(node, visit);\n        return;\n      }\n\n      const typeNode: ts.TypeNode | undefined =\n        ts.isVariableDeclaration(decl) ||\n        ts.isParameter(decl) ||\n        ts.isPropertyDeclaration(decl) ||\n        ts.isPropertySignature(decl) ||\n        ts.isTypeAliasDeclaration(decl) ||\n        ts.isIndexSignatureDeclaration(decl) ||\n        ts.isFunctionDeclaration(decl) ||\n        ts.isFunctionExpression(decl) ||\n        ts.isArrowFunction(decl) ||\n        ts.isMethodDeclaration(decl) ||\n        ts.isConstructorDeclaration(decl) ||\n        ts.isGetAccessorDeclaration(decl) ||\n        ts.isSetAccessorDeclaration(decl)\n          ? decl.type\n          : undefined;\n\n      if (!typeNode || !typeSubtreeContains(typeNode, anyKw)) {\n        ts.forEachChild(node, visit);\n        return;\n      }\n\n      const at = locationForReport(decl);\n      const sf = at.getSourceFile();\n      const start = at.getStart(sf, false);\n      const { line, character } = sf.getLineAndCharacterOfPosition(start);\n\n      const t = checker.getTypeAtLocation(typeNode);\n      if (\n        (t as ts.Type & { intrinsicName?: string }).intrinsicName === \"error\"\n      ) {\n        ts.forEachChild(node, visit);\n        return;\n      }\n      if ((t.flags & ts.TypeFlags.Any) === 0) {\n        ts.forEachChild(node, visit);\n        return;\n      }\n\n      const filePath = toProjectRelativePath(sf.fileName, projectRootAbs);\n      const name = getDisplayName(decl);\n\n      const source: AnySource = {\n        filePath,\n        line: line + 1,\n        column: character + 1,\n        name,\n        sourceKind: SOURCE_KIND,\n      };\n\n      const existing = byDeclaration.get(decl);\n      if (!existing) {\n        byDeclaration.set(decl, source);\n      }\n    }\n    ts.forEachChild(node, visit);\n  };\n\n  for (const sf of program.getSourceFiles()) {\n    if (isFromNodeModulesOrDts(sf)) continue;\n    visit(sf);\n  }\n\n  return [...byDeclaration.values()].sort((a, b) => {\n    if (a.filePath !== b.filePath) return a.filePath.localeCompare(b.filePath);\n    if (a.line !== b.line) return a.line - b.line;\n    return a.column - b.column;\n  });\n}\n","import type {\n  AnySource,\n  ScanSummary,\n  SourceKind,\n  SourceRanked,\n} from \"../types.js\";\nimport { GraphBuilder } from \"./build-graph.js\";\nimport { computeScanHealth } from \"./scan-health.js\";\nimport type { SourceFilters } from \"./filter-sources.js\";\nimport { filterSources } from \"./filter-sources.js\";\nimport { findAnySources } from \"./classify-any-sources.js\";\nimport type { SerializedGraph } from \"./graph-types.js\";\nimport {\n  countProjectSourceFiles,\n  createProgramForDirectory,\n  resolveScanRoot,\n} from \"./load-project.js\";\n\nexport interface ScanOptions extends SourceFilters {\n  targetPath: string;\n  json?: boolean;\n  dumpGraph?: boolean;\n  /** Limit display / JSON list fields to N rows; full scan is computed first. */\n  top?: number;\n  maxFiles?: number;\n}\n\n/**\n * Build `ScanOptions` for `exactOptionalPropertyTypes`: only set keys when arguments are defined\n * (avoid `{ sourceKinds: undefined }` object literals).\n */\nexport function buildScanOptions(\n  targetPath: string,\n  sourceKinds?: SourceKind[],\n  ignoreGlobs?: string[],\n  top?: number,\n  maxFiles?: number,\n): ScanOptions {\n  const o: ScanOptions = { targetPath };\n  if (sourceKinds !== undefined) o.sourceKinds = sourceKinds;\n  if (ignoreGlobs !== undefined) o.ignoreGlobs = ignoreGlobs;\n  if (top !== undefined) o.top = top;\n  if (maxFiles !== undefined) o.maxFiles = maxFiles;\n  return o;\n}\n\nexport type ScanResult = ScanSummary | SerializedGraph;\n\nexport interface FullScanResult {\n  summary: ScanSummary;\n  serializedGraph: SerializedGraph;\n}\n\nfunction sourceKey(\n  s: Pick<AnySource, \"filePath\" | \"line\" | \"column\" | \"name\">,\n): string {\n  return `${s.filePath}:${s.line}:${s.column}:${s.name}`;\n}\n\n/**\n * Classifier rows that never matched a graph node (e.g. reporting position mismatch) still appear with blast 0.\n */\nfunction mergeRankedWithOrphans(\n  ranked: SourceRanked[],\n  allSources: AnySource[],\n): SourceRanked[] {\n  const keys = new Set(ranked.map(sourceKey));\n  const out: SourceRanked[] = ranked.map((r, i) => ({ ...r, rank: i + 1 }));\n  let nextRank = out.length + 1;\n  const extras = allSources\n    .filter((s) => !keys.has(sourceKey(s)))\n    .sort(\n      (a, b) =>\n        a.filePath.localeCompare(b.filePath) ||\n        a.line - b.line ||\n        a.column - b.column ||\n        a.name.localeCompare(b.name),\n    );\n  for (const s of extras) {\n    out.push({\n      rank: nextRank++,\n      blastRadius: 0,\n      graphNodeId: \"\",\n      filePath: s.filePath,\n      line: s.line,\n      column: s.column,\n      name: s.name,\n      sourceKind: s.sourceKind,\n    });\n  }\n  return out;\n}\n\n/**\n * Limit table / JSON list views. Does not change totals (`sources`, `infectedNodeCount`).\n * CI `--fail-coverage` must run on the **untruncated** summary from `runFullScan`.\n */\nexport function applyTopToScanSummary(\n  summary: ScanSummary,\n  top?: number,\n): ScanSummary {\n  if (top === undefined || top <= 0) return summary;\n  const ranked = summary.sourcesRankedByBlast\n    .slice(0, top)\n    .map((r, i): SourceRanked => ({ ...r, rank: i + 1 }));\n  return {\n    ...summary,\n    sourcesRankedByBlast: ranked,\n    greedyCoverPicks: summary.greedyCoverPicks.slice(0, top),\n  };\n}\n\n/**\n * Single graph build: summary + serialized graph (for DOT / `--dump-graph` / CI).\n */\nexport function runFullScan(options: ScanOptions): FullScanResult {\n  const root = resolveScanRoot(options.targetPath);\n  const programOpts =\n    options.maxFiles !== undefined ? { maxFiles: options.maxFiles } : undefined;\n  const program = createProgramForDirectory(root, programOpts);\n  let sources = findAnySources(program, root);\n  sources = filterSources(sources, options);\n  const fileCount = countProjectSourceFiles(program);\n\n  const builder = new GraphBuilder(program, root);\n  builder.build();\n  builder.applySources(sources);\n  builder.propagate();\n\n  const blastRanked = builder.rankSourcesByBlast();\n  const infectedNodeCount = builder.getInfectedNodeCount();\n  const greedyCoverPicks = builder.greedySetCoverPicks(blastRanked);\n\n  const ranked = mergeRankedWithOrphans(blastRanked, sources);\n\n  const summary: ScanSummary = {\n    sources,\n    fileCount,\n    infectedNodeCount,\n    greedyCoverPicks,\n    sourcesRankedByBlast: ranked,\n    health: computeScanHealth(builder, {\n      sources,\n      fileCount,\n      infectedNodeCount,\n      greedyCoverPicks,\n      sourcesRankedByBlast: ranked,\n    }),\n  };\n\n  return { summary, serializedGraph: builder.serialize() };\n}\n\n/**\n * Classify `any` sources (m2), build the project flow graph + propagation + blast ranking (m4), optional graph JSON (m3).\n */\nexport function classifyScan(\n  options: ScanOptions & { dumpGraph: true },\n): SerializedGraph;\nexport function classifyScan(options?: ScanOptions): ScanSummary;\nexport function classifyScan(\n  options: ScanOptions = { targetPath: \".\" },\n): ScanResult {\n  if (options.dumpGraph) {\n    const { top, dumpGraph: _dumpGraph, ...rest } = options;\n    void top;\n    return runFullScan(rest).serializedGraph;\n  }\n  const { top, ...rest } = options;\n  const { summary } = runFullScan(rest);\n  return applyTopToScanSummary(summary, top);\n}\n","import type { DiffSummary, ScanSummary } from \"../types.js\";\nimport { summarizeDiffTotals } from \"../analyzer/diff-scan.js\";\n\nexport type ReportVersion = 1 | 2;\n\nexport interface ScanReportV1 extends ScanSummary {}\n\nexport interface ScanReportV2 {\n  reportVersion: 2;\n  health?: ScanSummary[\"health\"];\n  summary: {\n    sources: ScanSummary[\"sources\"];\n    fileCount: number;\n    infectedNodeCount: number;\n  };\n  rankings: {\n    greedyCoverPicks: ScanSummary[\"greedyCoverPicks\"];\n    sourcesRankedByBlast: ScanSummary[\"sourcesRankedByBlast\"];\n  };\n}\n\nexport interface DiffReportV2 {\n  reportVersion: 2;\n  meta: Pick<\n    DiffSummary,\n    | \"requestedBaseRef\"\n    | \"requestedHeadRef\"\n    | \"effectiveBaseRef\"\n    | \"effectiveHeadRef\"\n    | \"compareMode\"\n    | \"scope\"\n    | \"changedFiles\"\n  >;\n  health: {\n    before?: ScanSummary[\"health\"];\n    after?: ScanSummary[\"health\"];\n  };\n  totals: ReturnType<typeof summarizeDiffTotals>;\n  rankings: {\n    before: ReturnType<typeof scanRankings>;\n    after: ReturnType<typeof scanRankings>;\n  };\n  diff: {\n    addedSources: DiffSummary[\"addedSources\"];\n    removedSources: DiffSummary[\"removedSources\"];\n    blastChangedSources: DiffSummary[\"blastChangedSources\"];\n  };\n}\n\nfunction scanRankings(summary: ScanSummary) {\n  return {\n    greedyCoverPicks: summary.greedyCoverPicks,\n    sourcesRankedByBlast: summary.sourcesRankedByBlast,\n  };\n}\n\nexport function toScanReport(\n  summary: ScanSummary,\n  version: ReportVersion,\n): ScanReportV1 | ScanReportV2 {\n  if (version === 1) return summary;\n  const report: ScanReportV2 = {\n    reportVersion: 2,\n    summary: {\n      sources: summary.sources,\n      fileCount: summary.fileCount,\n      infectedNodeCount: summary.infectedNodeCount,\n    },\n    rankings: scanRankings(summary),\n  };\n  if (summary.health !== undefined) report.health = summary.health;\n  return report;\n}\n\nexport function toDiffReport(\n  summary: DiffSummary,\n  version: ReportVersion,\n): DiffSummary | DiffReportV2 {\n  if (version === 1) return summary;\n  const totals = summarizeDiffTotals(summary);\n  const report: DiffReportV2 = {\n    reportVersion: 2,\n    meta: {\n      requestedBaseRef: summary.requestedBaseRef,\n      requestedHeadRef: summary.requestedHeadRef,\n      effectiveBaseRef: summary.effectiveBaseRef,\n      effectiveHeadRef: summary.effectiveHeadRef,\n      compareMode: summary.compareMode,\n      scope: summary.scope,\n      changedFiles: summary.changedFiles,\n    },\n    health: {\n      before: summary.before.health,\n      after: summary.after.health,\n    },\n    totals,\n    rankings: {\n      before: scanRankings(summary.before),\n      after: scanRankings(summary.after),\n    },\n    diff: {\n      addedSources: summary.addedSources,\n      removedSources: summary.removedSources,\n      blastChangedSources: summary.blastChangedSources,\n    },\n  };\n  return report;\n}\n","import type {\n  DiffSummary,\n  ScanSummary,\n  SourceKind,\n  SourceRanked,\n} from \"../types.js\";\n\nconst TOOL_NAME = \"any-map\";\nlet toolVersion = \"0.0.0\";\n\nexport function setSarifToolVersion(version: string): void {\n  toolVersion = version;\n}\nconst SARIF_VERSION = \"2.1.0\";\n\nconst SOURCE_KIND_RULES: SourceKind[] = [\n  \"explicit-any\",\n  \"as-any\",\n  \"untyped-import\",\n  \"untyped-return\",\n  \"catch-binding\",\n  \"implicit-param\",\n];\n\nfunction ruleId(kind: SourceKind): string {\n  return `any-map/${kind}`;\n}\n\nfunction buildRules() {\n  return SOURCE_KIND_RULES.map((kind) => ({\n    id: ruleId(kind),\n    name: kind,\n    shortDescription: { text: `TypeScript any source: ${kind}` },\n    fullDescription: {\n      text: `Classifier reported an any source of kind ${kind}.`,\n    },\n    defaultConfiguration: { level: \"warning\" as const },\n  }));\n}\n\nfunction locationFor(\n  source: Pick<SourceRanked, \"filePath\" | \"line\" | \"column\">,\n) {\n  return {\n    physicalLocation: {\n      artifactLocation: { uri: source.filePath },\n      region: { startLine: source.line, startColumn: source.column },\n    },\n  };\n}\n\nfunction resultFromSource(\n  source: SourceRanked,\n  messageText: string,\n): Record<string, unknown> {\n  return {\n    ruleId: ruleId(source.sourceKind),\n    level: \"warning\",\n    message: { text: messageText },\n    locations: [{ location: locationFor(source) }],\n  };\n}\n\nexport function scanSummaryToSarif(\n  summary: ScanSummary,\n): Record<string, unknown> {\n  const results = summary.sourcesRankedByBlast.map((s) =>\n    resultFromSource(\n      s,\n      `any source (blast ${s.blastRadius})${summary.health ? ` — ${summary.health.summaryLine}` : \"\"}`,\n    ),\n  );\n  return {\n    version: SARIF_VERSION,\n    $schema:\n      \"https://raw.githubusercontent.com/oasis-tcs/sarif-spec/master/Schemata/sarif-schema-2.1.0.json\",\n    runs: [\n      {\n        tool: {\n          driver: {\n            name: TOOL_NAME,\n            version: toolVersion,\n            informationUri: \"https://github.com/anasm266/any-map\",\n            rules: buildRules(),\n          },\n        },\n        results,\n      },\n    ],\n  };\n}\n\nexport function diffSummaryToSarif(\n  summary: DiffSummary,\n): Record<string, unknown> {\n  const results: Record<string, unknown>[] = [];\n  for (const s of summary.addedSources) {\n    results.push(\n      resultFromSource(s, `New any source on branch (blast ${s.blastRadius})`),\n    );\n  }\n  for (const c of summary.blastChangedSources) {\n    if (c.deltaBlastRadius <= 0) continue;\n    results.push(\n      resultFromSource(\n        c.after,\n        `Blast radius increased by ${c.deltaBlastRadius} (${c.before.blastRadius} -> ${c.after.blastRadius})`,\n      ),\n    );\n  }\n  return {\n    version: SARIF_VERSION,\n    $schema:\n      \"https://raw.githubusercontent.com/oasis-tcs/sarif-spec/master/Schemata/sarif-schema-2.1.0.json\",\n    runs: [\n      {\n        tool: {\n          driver: {\n            name: TOOL_NAME,\n            version: toolVersion,\n            informationUri: \"https://github.com/anasm266/any-map\",\n            rules: buildRules(),\n          },\n        },\n        results,\n      },\n    ],\n  };\n}\n","import type { DiffSummary } from \"../types.js\";\nimport { summarizeDiffTotals } from \"../analyzer/diff-scan.js\";\n\nexport interface DiffFailureOptions {\n  failOnNewSources?: boolean;\n  failOnInfectedIncrease?: boolean;\n  failOnBlastIncrease?: boolean;\n  maxNewSources?: number;\n}\n\nexport function evaluateDiffFailure(\n  summary: DiffSummary,\n  opts: DiffFailureOptions,\n): { failed: boolean; message?: string } {\n  const totals = summarizeDiffTotals(summary);\n  const newCount = summary.addedSources.length;\n\n  if (opts.maxNewSources !== undefined && newCount > opts.maxNewSources) {\n    return {\n      failed: true,\n      message: `any-map diff: ${newCount} new any source(s) exceeds --max-new-sources ${opts.maxNewSources}`,\n    };\n  }\n\n  if (opts.failOnNewSources === true && newCount > 0) {\n    return {\n      failed: true,\n      message: `any-map diff: ${newCount} new any source(s) in scope`,\n    };\n  }\n\n  if (opts.failOnInfectedIncrease === true && totals.infectedNodeDelta > 0) {\n    return {\n      failed: true,\n      message: `any-map diff: infected nodes increased by ${totals.infectedNodeDelta}`,\n    };\n  }\n\n  if (opts.failOnBlastIncrease === true) {\n    const regressions = summary.blastChangedSources.filter(\n      (c) => c.deltaBlastRadius > 0,\n    );\n    if (regressions.length > 0) {\n      return {\n        failed: true,\n        message: `any-map diff: ${regressions.length} source(s) with increased blast radius`,\n      };\n    }\n  }\n\n  return { failed: false };\n}\n\nexport function applyDiffFailureResult(result: {\n  failed: boolean;\n  message?: string;\n}): void {\n  if (result.failed && result.message) {\n    console.error(result.message);\n    process.exitCode = 1;\n  }\n}\n","import { createHash } from \"node:crypto\";\nimport type { SerializedGraph } from \"../analyzer/graph-types.js\";\n\nfunction escLabel(s: string): string {\n  return s.replace(/\\\\/g, \"\\\\\\\\\").replace(/\"/g, '\\\\\"').replace(/\\r?\\n/g, \" \");\n}\n\nfunction dotName(rawId: string): string {\n  return \"n_\" + createHash(\"sha256\").update(rawId).digest(\"hex\").slice(0, 20);\n}\n\n/**\n * Graphviz DOT for an intra-module type-flow snapshot (`--format dot`, `any-map graph`).\n */\nexport function serializedGraphToDot(\n  g: SerializedGraph,\n  title = \"any-map\",\n): string {\n  const lines: string[] = [\n    `digraph \"${escLabel(title)}\" {`,\n    `  rankdir=LR;`,\n    `  node [fontname=\"Helvetica\", fontsize=10];`,\n    `  edge [fontname=\"Helvetica\", fontsize=8];`,\n  ];\n\n  for (const n of g.nodes) {\n    const label = `${n.name}\\\\n${n.filePath}:${n.line}:${n.column}\\\\n${n.kind}`;\n    const shape = n.isSource\n      ? `shape=box, style=filled, fillcolor=\"#ffcccc\"`\n      : `shape=ellipse`;\n    const id = dotName(n.id);\n    lines.push(`  ${id} [label=\"${escLabel(label)}\", ${shape}];`);\n  }\n\n  const idOf = (raw: string) => dotName(raw);\n\n  for (const e of g.edges) {\n    lines.push(\n      `  ${idOf(e.from)} -> ${idOf(e.to)} [label=\"${escLabel(e.reason)}\"];`,\n    );\n  }\n\n  lines.push(`}`);\n  return lines.join(\"\\n\");\n}\n","import path from \"node:path\";\nimport { GraphBuilder } from \"./build-graph.js\";\nimport { findAnySources } from \"./classify-any-sources.js\";\nimport type { GraphEdge } from \"./graph-types.js\";\nimport {\n  createProgramForDirectory,\n  resolveScanRoot,\n  toProjectRelativePath,\n} from \"./load-project.js\";\nimport type {\n  TracePathSegment,\n  TracePathToSource,\n  TraceReport,\n} from \"./trace-types.js\";\n\n/**\n * Parse `file:line` or `file:line:column` (column defaults to 1).\n * The file segment may be project-relative; drive letters on Windows use `C:\\...` — use `path\\file.ts:line:col` without extra colons in the path, or a relative path.\n */\nexport function parseTraceLocation(loc: string): {\n  filePath: string;\n  line: number;\n  column: number;\n} {\n  const lastColon = loc.lastIndexOf(\":\");\n  if (lastColon <= 0) {\n    throw new Error(\n      `Invalid location \"${loc}\" (expected file:line or file:line:column)`,\n    );\n  }\n  const tail = loc.slice(lastColon + 1);\n  if (!/^\\d+$/.test(tail)) {\n    throw new Error(`Invalid location \"${loc}\" (line/column must be numeric)`);\n  }\n  const lastNum = Number.parseInt(tail, 10);\n  const rest = loc.slice(0, lastColon);\n  const prevColon = rest.lastIndexOf(\":\");\n  if (prevColon === -1) {\n    return { filePath: rest, line: lastNum, column: 1 };\n  }\n  const mid = rest.slice(prevColon + 1);\n  if (!/^\\d+$/.test(mid)) {\n    throw new Error(`Invalid location \"${loc}\"`);\n  }\n  return {\n    filePath: rest.slice(0, prevColon),\n    line: Number.parseInt(mid, 10),\n    column: lastNum,\n  };\n}\n\nfunction forwardPathEdges(\n  edges: GraphEdge[],\n  sourceId: string,\n  targetId: string,\n): GraphEdge[] | undefined {\n  if (sourceId === targetId) return [];\n\n  const backward = new Map<string, GraphEdge[]>();\n  for (const e of edges) {\n    const arr = backward.get(e.to);\n    if (arr) arr.push(e);\n    else backward.set(e.to, [e]);\n  }\n\n  const q: string[] = [targetId];\n  const parent = new Map<string, { next: string; edge: GraphEdge }>();\n  const seen = new Set<string>([targetId]);\n\n  while (q.length > 0) {\n    const cur = q.shift()!;\n    if (cur === sourceId) break;\n    for (const e of backward.get(cur) ?? []) {\n      const from = e.from;\n      if (seen.has(from)) continue;\n      seen.add(from);\n      parent.set(from, { next: cur, edge: e });\n      q.push(from);\n    }\n  }\n\n  if (sourceId !== targetId && !parent.has(sourceId)) return undefined;\n\n  const out: GraphEdge[] = [];\n  let x = sourceId;\n  while (x !== targetId) {\n    const p = parent.get(x);\n    if (!p) return undefined;\n    out.push(p.edge);\n    x = p.next;\n  }\n  return out;\n}\n\nexport interface TraceOptions {\n  targetPath: string;\n  /** `relative/file.ts:line:column` or `file.ts:line` */\n  loc: string;\n}\n\nexport function traceSymbol(options: TraceOptions): TraceReport {\n  const root = resolveScanRoot(options.targetPath);\n  const { filePath: rawPath, line, column } = parseTraceLocation(options.loc);\n  const absCandidate = path.isAbsolute(rawPath)\n    ? rawPath\n    : path.join(root, rawPath);\n  const rel = toProjectRelativePath(path.normalize(absCandidate), root);\n\n  const program = createProgramForDirectory(root);\n  const sources = findAnySources(program, root);\n  const builder = new GraphBuilder(program, root);\n  builder.build();\n  builder.applySources(sources);\n  builder.propagate();\n\n  const targetId = builder.findNodeIdAtLocation(rel, line, column);\n  if (!targetId) {\n    throw new Error(\n      `No graph node at ${rel}:${line}:${column}. Use an identifier location from \\`any-map scan --dump-graph\\` (file + line:column of the \\`name\\` field).`,\n    );\n  }\n\n  const targetHop = builder.getTraceHop(targetId);\n  if (!targetHop) {\n    throw new Error(`Internal error: missing node ${targetId}`);\n  }\n\n  const edges = builder.getEdges();\n  const paths: TracePathToSource[] = [];\n\n  for (const sourceId of builder.listInfectedSourceIds(targetId)) {\n    const row = builder.getAnySourceRow(sourceId);\n    if (!row) continue;\n\n    const hopEdges = forwardPathEdges(edges, sourceId, targetId);\n    if (hopEdges === undefined) continue;\n\n    const segments: TracePathSegment[] = [];\n    let x = sourceId;\n    for (const e of hopEdges) {\n      const fromH = builder.getTraceHop(x);\n      const toH = builder.getTraceHop(e.to);\n      if (!fromH || !toH) break;\n      segments.push({ from: fromH, to: toH, reason: e.reason });\n      x = e.to;\n    }\n\n    paths.push({\n      sourceId,\n      filePath: row.filePath,\n      line: row.line,\n      column: row.column,\n      name: row.name,\n      sourceKind: row.sourceKind,\n      segments,\n    });\n  }\n\n  paths.sort(\n    (a, b) =>\n      a.filePath.localeCompare(b.filePath) ||\n      a.line - b.line ||\n      a.column - b.column ||\n      a.name.localeCompare(b.name),\n  );\n\n  return {\n    targetPath: root,\n    loc: options.loc,\n    target: targetHop,\n    paths,\n  };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACSA,IAAM,wBAAwB;AAE9B,SAAS,cAAc,SAA8B;AACnD,QAAM,QAAQ,QAAQ;AACtB,MAAI,MAAM,WAAW,EAAG,QAAO;AAC/B,SAAO,MAAM,KAAK,IAAI,GAAG,MAAM,SAAS,CAAC,CAAC,EAAG;AAC/C;AAEA,SAAS,QAAQ,GAAgB,GAAwB;AACvD,MAAI,EAAE,SAAS,KAAK,EAAE,SAAS,EAAG,QAAO;AACzC,MAAI,QAAQ;AACZ,QAAM,UAAU,EAAE,QAAQ,EAAE,OAAO,IAAI;AACvC,QAAM,SAAS,EAAE,QAAQ,EAAE,OAAO,IAAI;AACtC,aAAW,MAAM,SAAS;AACxB,QAAI,OAAO,IAAI,EAAE,EAAG;AAAA,EACtB;AACA,QAAM,QAAQ,EAAE,OAAO,EAAE,OAAO;AAChC,SAAO,UAAU,IAAI,IAAI,QAAQ;AACnC;AA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AI;AAAA,MACV,YAAY,IAAI;AAAA,MAChB;AAAA,IACF,CAAC;AAAA,EACH;AAEA,QAAM;AAAA,IACJ,CAAC,GAAG,MACF,EAAE,SAAS,cAAc,EAAE,QAAQ,KACnC,EAAE,OAAO,EAAE,QACX,EAAE,SAAS,EAAE,UACb,EAAE,KAAK,cAAc,EAAE,IAAI;AAAA,EAC/B;AAEA,SAAO;AAAA,IACL,YAAY;AAAA,IACZ,KAAK,QAAQ;AAAA,IACb,QAAQ;AAAA,IACR;AAAA,EACF;AACF;","names":["path","crypto","fs","import_node_path","import_node_fs","import_node_path","import_node_fs","import_node_path","path","fs","ts","toPosix","path","fs","os","import_typescript","import_node_crypto","ts","cacheKey","resolvedId","rhs","picomatch","import_typescript","import_typescript","ts","ts","getDisplayName","locationForReport","sourceKey","top","rest","sourceKey","path","import_node_crypto","import_node_path","path"]}