/**
 * Port: Reads the public symbol surface of an installed package.
 *
 * The W0198 symbol-resolution preflight resolves candidate imports against
 * the actual package surface (its `.d.ts`) to answer "does symbol X export
 * from package Y" deterministically. This port lets the preflight do that
 * without depending on a specific resolution mechanism — adapters decide
 * whether to read installed `node_modules`, an in-memory map (tests), or a
 * future cached snapshot.
 *
 * Adapters:
 * - `DtsPackageSurface` (`packages/eval/src/adapters/package-surface/`) —
 *   reads installed `.d.ts` from `node_modules/<pkg>`, follows one hop of
 *   `export * from "./other"`.
 * - `InMemoryPackageSurface` — test double; maps package names to a fixed
 *   surface for deterministic unit tests.
 *
 * @see docs/design-docs/two-stage-grader-symbol-preflight.md
 */
/**
 * Adapters throw a `PackageSurfaceResolverError` when they cannot answer
 * a `resolveExports` call. The `reason` field maps directly to the
 * `unresolved` finding kinds the W0198 preflight surfaces — callers
 * catch this error and convert it into a per-binding `unresolved`
 * finding rather than a `missing` deduction.
 */
export class PackageSurfaceResolverError extends Error {
    pkg;
    reason;
    constructor(reason, pkg, message) {
        super(message);
        this.name = "PackageSurfaceResolverError";
        this.pkg = pkg;
        this.reason = reason;
    }
}
