export interface ModuleFolderEntry { dir: string; id: string; isImplementor?: boolean; } export interface ResponsibleModuleResult { module?: string; lastInterface: string; } /** * Walk the trace to decide which module is responsible for the current call. * * Rules: * 1. `node_modules` and generic `node:internal/` frames are skipped. * 2. `node:internal/modules/...` (the require loader) is a hard boundary: * frames above it belong to the module currently being loaded (owning * the side effect); frames below it belong to whoever triggered the * require and must not be credited. * 3. The first non-implementor match wins — that is user code. If only * implementor modules match, the first implementor is used as a * fallback so framework-level registrations still have an owner. */ export declare function findResponsibleFile(trace: NodeJS.CallSite[], entries?: ModuleFolderEntry[]): ResponsibleModuleResult;