/**
 * Stages a framework's standalone output (e.g. Next.js `.next/standalone`)
 * into a deployable artifact directory, materializing the symlinks the output
 * carries into the workspace `node_modules` and hoisting isolated-store
 * dependencies (pnpm `.pnpm`, bun `.bun`) so Node resolution works once the
 * artifact is unpacked elsewhere.
 *
 * Location-agnostic: the workspace boundary is resolved from `appPath`, not
 * the current working directory.
 */
export declare function stageStandaloneArtifact(options: {
    standaloneDir: string;
    artifactDir: string;
    appPath: string;
    signal?: AbortSignal;
}): Promise<void>;
/** Options shared by the symlink-materializing copy walk. */
export interface MaterializeOptions {
    /** Root of the standalone output being copied (for fallback resolution). */
    standaloneRoot?: string;
    /**
     * Where `standaloneRoot` is being copied to. When set, symlinks whose target
     * resolves inside `standaloneRoot` are recreated as relative symlinks in the
     * destination instead of materialized: bun/pnpm isolated stores resolve a
     * package's dependencies through the link's *location* in the store, which
     * materializing destroys. Only out-of-tree targets are safe to materialize.
     */
    destinationRoot?: string;
    /** The app directory; symlink targets here are materialized. */
    appRoot: string;
    /** The workspace/source root; targets in its node_modules are materialized. */
    sourceRoot: string;
    /**
     * Roots a symlink may resolve into. Defaults to the app root and workspace
     * node_modules, matching standalone framework artifacts.
     */
    allowedSymlinkTargetRoots?: readonly string[];
    /** Ignore a missing source path instead of throwing. Useful for trace lists. */
    ignoreMissingSource?: boolean;
    signal?: AbortSignal;
}
/**
 * pnpm and bun (isolated linker) both keep packages in a virtual store with a
 * shared symlink farm (`.pnpm/node_modules`, `.bun/node_modules`). Hoist the
 * farm entries to the artifact's `node_modules` root so Node-style resolution
 * works after symlinks are materialized.
 */
export declare function hoistIsolatedStoreDependencies(nodeModulesDir: string, signal?: AbortSignal): Promise<void>;
export declare function copyPathMaterializingSymlinks(sourcePath: string, destinationPath: string, options: MaterializeOptions): Promise<void>;
export declare function isPathWithin(rootPath: string, candidatePath: string): boolean;
//# sourceMappingURL=artifact-stage.d.ts.map