/**
 * Known package managers whose lockfiles must be regenerated when Lisa's apply
 * mutates package.json (e.g., adds/updates resolutions or overrides entries).
 */
export type PackageManager = "bun" | "npm" | "pnpm" | "yarn";
/**
 * Description of a package manager's lockfile file + the command Lisa should run
 * to rebuild the lockfile without running install scripts.
 */
export interface LockfileRegenPlan {
    readonly pm: PackageManager;
    readonly lockfile: string;
    /** Additional lockfile names for the same PM (e.g. bun.lockb for bun). */
    readonly lockfileAlternatives?: readonly string[];
    readonly command: string;
    readonly args: readonly string[];
}
/**
 * Per-PM lockfile + regen command mapping. The regen commands are all
 * "sync lockfile without running scripts" variants — we do NOT want to
 * re-run lifecycle scripts (that would re-trigger the trampoline).
 *
 * bun: `bun install` is the canonical way to sync bun.lock after package.json
 * changes. As of bun 1.x there is no `--lockfile-only` flag; `bun install`
 * is already fast when node_modules is up-to-date and will simply update
 * bun.lock to match package.json. We pass `--ignore-scripts` to avoid re-running
 * the parent PM's lifecycle hooks (which triggered this trampoline to begin with).
 */
export declare const LOCKFILE_REGEN_PLANS: Readonly<Record<PackageManager, LockfileRegenPlan>>;
/**
 * Read the set of package managers a project explicitly opts OUT of via its
 * package.json `engines` field. The repo-wide convention is to pin an unwanted
 * package manager to a sentinel string such as `"please-use-npm"` (e.g. an
 * npm-only project sets `engines.bun = "please-use-npm"`). Such a manager must
 * never have its lockfile regenerated — even if a stray lockfile for it is
 * present — because doing so re-creates the stray lockfile via that manager's
 * `install`. That is the SE-5221 regression: a stray `bun.lock` in an npm-only
 * project kept alive by `bun install`, which then misroutes the pre-push hook's
 * package-manager detection to the bun branch.
 * @param projectDir - Absolute path to the project directory
 * @returns Set of package managers the project forbids (possibly empty)
 */
export declare function enginesForbiddenManagers(projectDir: string): ReadonlySet<PackageManager>;
/**
 * Detect which package managers the project uses based on lockfile presence,
 * excluding any manager the project explicitly forbids via `engines`.
 *
 * A project may have more than one lockfile (the CDK dual-lockfile pattern
 * keeps `bun.lock` for local dev while publishing `package-lock.json` for
 * consumers), in which case every present lockfile must be regenerated so both
 * stay in sync with package.json.
 *
 * Managers opted out via an `engines` sentinel (e.g. `bun = "please-use-npm"`)
 * are dropped even when their lockfile is present, so the reconciliation never
 * re-creates a stray lockfile the project deliberately disallows (SE-5221).
 * @param projectDir - Absolute path to the project directory
 * @returns Ordered list of detected package managers (possibly empty)
 */
export declare function detectPackageManagers(projectDir: string): readonly PackageManager[];
/**
 * Get the regen plan (command/args/lockfile) for a given package manager.
 * @param pm - Package manager to look up
 * @returns Regen plan describing which command to spawn
 */
export declare function getLockfileRegenPlan(pm: PackageManager): LockfileRegenPlan;
//# sourceMappingURL=package-manager-detect.d.ts.map