export interface InstallOptions {
    /** Directory to install into (npm `--prefix`). Created by caller. */
    prefix: string;
    /** npm-resolvable specs: `name`, `name@version`, `git+https://...`, tarball URL, ... */
    specs: string[];
    /** Verbose logging passes through `--loglevel verbose`. */
    verbose?: boolean;
    /** Optional registry override (writes a temp `.npmrc` in prefix). */
    registry?: string;
    /**
     * Native backend only: write `<prefix>/gjsify-lock.json` after a successful
     * resolve. When the file exists on next call AND `frozen: true`, the
     * resolver is skipped and downloads use the pinned tarball URL + integrity.
     */
    lockfile?: boolean;
    /** Use `<prefix>/gjsify-lock.json` as the source of truth — fail if missing. */
    frozen?: boolean;
    /**
     * Per-package version overrides — `<name> → <range>`. Applied to every
     * edge during dependency resolution, irrespective of the requester.
     * Mirrors npm's top-level `overrides` field and yarn's `resolutions`
     * (the simple, name-only flavour; pattern keys like `typescript@*` are
     * normalised to bare `typescript` by the caller before passing in).
     *
     * Lets a workspace root pin a transitive dep version when the
     * deduplicated tree would otherwise pick a different one — e.g. for
     * forcing `typescript@~5.9` across every `typescript@*` devDep.
     */
    overrides?: Record<string, string>;
}
export interface InstallResult {
    /** Top-level packages that were requested, with the version each
     *  resolved to. Empty for the npm backend (parsing npm's stdout would
     *  be unreliable; callers that need this should set
     *  GJSIFY_INSTALL_BACKEND=native). */
    installed: Array<{
        name: string;
        version: string;
    }>;
}
export declare function installPackages(opts: InstallOptions): Promise<InstallResult>;
