/** * The import depth: run the loadability checks and turn what they find into findings. * * The checks themselves live in Python, next to the loader the scaffold uses before its own first * tick — so a package that passes has satisfied the contract production applies. This side spawns * that checker, one process per scanner, and translates its output. * * ## Why a process per scanner * * Importing puts the scanner's directory at the front of the module search path, and two scanners * routinely contain files of the same name. Checking several in one interpreter lets one scanner's * `scoring` satisfy another's import of a file that does not exist — a broken package reporting * clean. Production spawns a process per scanner for the same reason, so this matches it. */ import type { Finding } from "./types.js"; /** One scanner to check: where its code lives and which file is the entry. */ export interface ScannerTarget { /** Recipe name, or a stand-in when checking a bare directory. */ name: string; root: string; entrypoint?: string; } /** Raw shape emitted by the Python checker. Field presence varies by code. */ interface RawFinding { code: string; file?: string; line?: number | null; message?: string; module?: string; error_type?: string; where?: { file: string; line: number; } | null; import_chain?: string[]; traceback?: string; } /** The directory the `scaffold` package is importable from, in dev and in the built package alike. */ export declare function scaffoldPackageDir(): string; /** * Turn one raw result into findings. * * The Python side reports *what it observed*; the reasons and remedies are composed here, so all * message policy lives in one language rather than being split across the boundary. */ export declare function toFindings(scanner: ScannerTarget, raw: RawFinding): Finding[]; /** Run the Python checker for one scanner. */ export declare function checkScanner(scanner: ScannerTarget, options?: { pythonBin?: string; cwd?: string; budgetMs?: number; }): Promise; /** Absolute scanner root for a declared path, resolved against the recipe's directory. */ export declare function resolveRoot(declared: string, baseDir: string | undefined): string | undefined; export {}; //# sourceMappingURL=import-stage.d.ts.map