/**
 * 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
 */
/**
 * One exported binding from a package's public surface.
 *
 * - `name` — the bare exported identifier (e.g. `"useEditDocument"`).
 * - `source` — provenance of the binding within the package:
 *   - `"types"` — declared in a `.d.ts` (the only source the
 *     `DtsPackageSurface` adapter currently emits).
 *   - `"runtime"` — reserved for future adapters that introspect the
 *     loaded module's runtime exports.
 */
export interface PackageSurfaceSymbol {
    readonly name: string;
    readonly source: "types" | "runtime";
}
/**
 * Resolved public surface of a single package at a single resolved version.
 *
 * - `pkg` — npm package name as the caller asked.
 * - `version` — version actually resolved on disk (from the package's
 *   `package.json`). May differ from a manifest pin's literal range; the
 *   pin says "any major-N", and this is the concrete version present.
 * - `symbols` — every top-level exported binding the adapter discovered.
 *   Order is implementation-defined (callers should not rely on it).
 */
export interface PackageSurface {
    readonly pkg: string;
    readonly version: string;
    readonly symbols: readonly PackageSurfaceSymbol[];
}
/**
 * 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 declare class PackageSurfaceResolverError extends Error {
    readonly pkg: string;
    readonly reason: PackageSurfaceUnresolvedReason;
    constructor(reason: PackageSurfaceUnresolvedReason, pkg: string, message: string);
}
export type PackageSurfaceUnresolvedReason = "package-not-installed" | "types-entry-missing" | "parse-failed";
/**
 * Reads the public symbol surface of an installed package.
 *
 * Adapters MAY cache results within a single resolver instance — same
 * `(pkg, version)` should yield the same `PackageSurface` for the
 * lifetime of the resolver.
 */
export interface PackageSurfaceResolver {
    resolveExports(pkg: string): Promise<PackageSurface>;
}
