import type { BundleFile } from './BundleStore';
export declare class PrototypeBuildError extends Error {
    /** Tail of the failing step's stderr, for surfacing in the UI toast. */
    readonly detail?: string | undefined;
    constructor(message: string, 
    /** Tail of the failing step's stderr, for surfacing in the UI toast. */
    detail?: string | undefined);
}
export interface BuildResult {
    files: BundleFile[];
    /** Total decoded byte size of the bundle (pre-base64). */
    totalBytes: number;
}
/**
 * Builds a fresh-project (Vite) variant into a static bundle ready to upload to
 * the Prototype Preview Host.
 *
 * The variant snapshot under `.rivet/variants/.../files/` is treated as
 * immutable, so we copy it to an OS temp scratch dir and build there. We run
 * `vite build --base=./` directly (not `npm run build`) so a `tsc` type error
 * in agent-generated code doesn't block a purely visual deploy, and so asset
 * URLs are relative (the host serves under `/p/<deployId>/` and injects a
 * matching `<base href>`).
 */
export declare class PrototypeBuildService {
    /** Build `filesDir` (the variant's `files/`) and return the packed bundle. */
    build(filesDir: string): Promise<BuildResult>;
    /**
     * Pack an already-built static bundle (a variant's `files/` dir) for upload
     * without a build step. Used for history static-preview variants, which are
     * already servable static sites — there's nothing to compile.
     */
    packStatic(filesDir: string): Promise<BuildResult>;
    /** Walk a directory and return every file base64-encoded. */
    private packDir;
    private runStep;
}
//# sourceMappingURL=PrototypeBuildService.d.ts.map