/** * Phase: scopeResolution * * Generic registry-primary resolution phase (RFC #909 Ring 3). * * For every language whose provider is registered in `SCOPE_RESOLVERS`: * 1. Filter scanned files by language extension. * 2. Read file contents. * 3. Drive the scope-based pipeline end-to-end via the generic * `runScopeResolution(input, provider)` orchestrator. * 4. Emit IMPORTS / CALLS / ACCESSES / INHERITS / USES edges. * * This is the sole resolution path — RING4-1 (#942) deleted the legacy * call-resolution DAG, so there is no longer a per-language flag gating * registry-vs-legacy. * * Adding a language is one change: implement `ScopeResolver` in * `languages//scope-resolver.ts` and register it in * `scope-resolution/pipeline/registry.ts`. * * @deps parse (needs Symbol nodes already in the graph so emit-references * can attach edges to existing Function/Method/Class nodes) * @reads scannedFiles * @writes graph (IMPORTS, CALLS, ACCESSES, INHERITS, USES) */ import type { PipelinePhase } from '../../pipeline-phases/types.js'; import { SupportedLanguages } from '../../../../_shared/index.js'; import type { ResolutionOutcome } from '../resolution-outcome.js'; import type { FunctionSummary } from '../../taint/summary-model.js'; import type { CallSummary } from '../../taint/call-summary-model.js'; import { type PdgEmitManifest } from '../../../lbug/pdg-emit-sink.js'; export interface ScopeResolutionOutput { /** True when at least one language ran. */ readonly ran: boolean; /** Files seen across all languages. `0` when `ran === false`. */ readonly filesProcessed: number; /** IMPORTS edges emitted across all languages. */ readonly importsEmitted: number; /** Reference (CALLS / ACCESSES / INHERITS / USES) edges emitted. */ readonly referenceEdgesEmitted: number; /** Additive stream of resolver diagnostics; does not affect graph edges. */ readonly resolutionOutcomes: readonly ResolutionOutcome[]; /** Per-language breakdown for telemetry. */ readonly perLanguage: ReadonlyMap; /** * Per-function taint summaries harvested in the pdg window (#2084 M4 U1), * across all languages. Empty unless `--pdg` and a registered taint model. * The `taintSummaries` phase composes these over the `CALLS` graph. */ readonly functionSummaries: readonly FunctionSummary[]; /** * Per-function RETURN-VALUE ASCENT summaries harvested in the pdg window * (PDG FU-C, U-C2), across all languages. Empty unless `--pdg`. The * `callSummaries` phase materialises one `CALL_SUMMARY` self-loop edge per * entry once the resolved call graph is known. */ readonly callSummaries: readonly CallSummary[]; /** * Streamed PDG-emit COPY manifest (#2202). Present only when streaming was on * (full rebuild + `--pdg` + enabled): the BasicBlock node CSV + per-pair PDG * edge CSVs that were flushed to disk during the emit loop, for the persistence * step to COPY alongside the structural CSVs. Absent ⇒ the PDG layer (if any) * is in the in-memory graph and persists via the normal whole-graph emit. */ readonly pdgEmitManifest?: PdgEmitManifest; } export declare const scopeResolutionPhase: PipelinePhase;