/** * Cross-package edge constraint — post-resolution catalog pass. * * Mode-agnostic correction for the impossible coupling edges (`core→fitness`, * `fitness→cli`, …). Name-based resolution can link a call to a function in a * package the caller never imports: `resolveByCatalogFallback` matches a * globally-unique simple name across all packages, and cross-shard recovery * matches bare-specifier names. The type-checker, by contrast, only resolves * to symbols the caller can actually reach. * * This pass drops the false edges that the name-based resolvers invent: * for every **name-guessed** edge (`resolution` ∈ {unknown, dynamic-string, * syntactic}) it keeps only the targets whose body hash has at least one * occurrence that is a valid callee for this caller — in a package the caller * can reach (own ∪ imported) and not another package's test file (a * cross-package test file is never importable). Type-checker-backed edges * (`static`, `method-dispatch`, `jsx`, `constructor`) are left untouched, so * legitimate edges — including re-export indirection — are never dropped. * * Package identity comes from `occurrence.package` (the nearest-`package.json` * name stamped by `assignPackages`); the caller's import set is the set of * package names its module's `dependencies[]` specifiers refer to — which, for * a workspace import, IS the imported package's name, so no separate lookup is * needed. No-op in `fast` mode (no `dependencies[]`). Must run after * `assignPackages`. */ import type { Catalog } from '../types.js'; /** * Drop name-guessed call-edge targets that point into a package the caller * cannot reach. Returns a new catalog (occurrences/edges rebuilt only where a * target was removed). No-op in `fast` mode. */ export declare function constrainCrossPackageEdges(catalog: Catalog): Catalog; //# sourceMappingURL=constrain-edges.d.ts.map