import { MastraBundler } from '@mastra/core/bundler';
import type { Config } from '@mastra/core/mastra';
import type { InputOptions, OutputOptions } from 'rollup';
import { analyzeBundle } from '../build/analyze/index.js';
import type { BundlerOptions } from '../build/types.js';
import type { BundlerPlatform } from '../build/utils.js';
export type { BundlerOptions } from '../build/types.js';
export type { BundlerPlatform } from '../build/utils.js';
export declare const IS_DEFAULT: unique symbol;
export declare abstract class Bundler extends MastraBundler {
    protected analyzeOutputDir: string;
    protected outputDir: string;
    protected platform: BundlerPlatform;
    constructor(name: string, component?: 'BUNDLER' | 'DEPLOYER');
    prepare(outputDirectory: string): Promise<void>;
    writePackageJson(outputDirectory: string, dependencies: Map<string, string>, resolutions?: Record<string, string>): Promise<void>;
    protected createBundler(inputOptions: InputOptions, outputOptions: Partial<OutputOptions> & {
        dir: string;
    }): Promise<{
        write: () => Promise<import("rollup").RollupOutput>;
        close: () => Promise<void>;
    }>;
    protected getUserBundlerOptions(mastraEntryFile: string, outputDirectory: string): Promise<NonNullable<Config['bundler']>>;
    protected analyze(entry: string | string[], mastraFile: string, outputDirectory: string): Promise<{
        externalDependencies: Map<string, import("../build/types").ExternalDependencyInfo>;
        dependencies: Map<string, string>;
        workspaceMap: Map<string, import("./workspaceDependencies").WorkspacePackageInfo>;
    }>;
    protected installDependencies(outputDirectory: string, rootDir?: string): Promise<void>;
    /**
     * Generate a package-lock.json for the output directory so that deploy targets
     * can use `npm ci` instead of `npm install`, skipping version resolution entirely.
     * This is a lockfile-only operation — no packages are downloaded.
     *
     * Temporarily moves node_modules out of the way because pnpm's symlink-based
     * layout confuses npm's arborist, then restores it afterwards so that
     * `mastra start` (or wrangler) can still resolve dependencies at runtime.
     */
    private generateNpmLockfile;
    protected copyPublic(mastraDir: string, outputDirectory: string): Promise<void>;
    protected copyDOTNPMRC({ rootDir, outputDirectory, }: {
        rootDir?: string;
        outputDirectory: string;
    }): Promise<void>;
    protected getBundlerOptions(serverFile: string, mastraEntryFile: string, analyzedBundleInfo: Awaited<ReturnType<typeof analyzeBundle>>, toolsPaths: (string | string[])[], { enableSourcemap, enableEsmShim, externals }: BundlerOptions): Promise<InputOptions>;
    getAllToolPaths(mastraDir: string, toolsPaths?: (string | string[])[]): (string | string[])[];
    listToolsInputOptions(toolsPaths: (string | string[])[]): Promise<Record<string, string>>;
    protected _bundle(serverFile: string, mastraEntryFile: string, { projectRoot, outputDirectory, enableEsmShim, }: {
        projectRoot: string;
        outputDirectory: string;
        enableEsmShim?: boolean;
    }, toolsPaths?: (string | string[])[], bundleLocation?: string): Promise<void>;
    lint(_entryFile: string, _outputDirectory: string, toolsPaths: (string | string[])[]): Promise<void>;
}
//# sourceMappingURL=index.d.ts.map