import type { ImportViolation } from "./plugin.ts"; /** The subset of Bun's `BuildMetafile` the gate reads. */ export interface MetafileInputs { inputs: Record; }>; } export interface Problem { message: string; /** Entry point first, offending module last; absolute paths. */ chain: string[]; } /** Metafile keys are relative to the process cwd; namespaced keys (`ns:path`) are left as-is. */ export declare function metafileKeyToPath(key: string, cwd: string): string; /** child → first importer, over resolved (non-external) imports. */ export declare function importerGraph(metafile: MetafileInputs, cwd: string): Map; export declare function importerChain(file: string, parents: ReadonlyMap): string[]; /** Source with comments and types removed, so prose mentioning `Bun.x` is not flagged. */ export declare function codeOf(file: string, source: string): string | undefined; /** Problems visible in one module's own code (not its imports). */ export declare function scanModule(file: string, code: string, importedSpecifiers: readonly string[]): string[]; export declare function collectProblems(metafile: MetafileInputs, violations: readonly ImportViolation[], cwd: string): Problem[]; export declare function formatProblems(problems: readonly Problem[], cwd: string): string;