import { Benchify } from "../client.mjs"; export interface FileData { path: string; contents: string; } export interface BinaryFileData { path: string; contents: string | Uint8Array; mode?: string; } export declare function collectFiles({ basePath, patterns, ignore, }?: { basePath?: string; patterns?: string[]; ignore?: string[]; }): Promise; export declare function applyChanges({ files, basePath, }: { files: FileData[]; basePath?: string; }): void; /** * Normalize path to POSIX format and remove ./ and // patterns * Throws on absolute paths or path traversal attempts */ export declare function normalizePath(path: string): string; /** * Pack files into tar.zst format * Used by both Sandbox and Fixer APIs * Note: Assumes paths are already normalized */ export declare function packTarZst(files: BinaryFileData[], options?: { buildTime?: number; }): Promise; /** * Calculate tree hash for content-addressable verification * Algorithm matches API specification exactly * * @internal Assumes paths are already normalized - only called by packWithManifest */ export declare function calculateTreeHash(files: BinaryFileData[]): string; /** * Manifest format matching API specification */ export interface Manifest { manifest_version: '1'; bundle: { digest: string; size: number; format: 'tar.zst'; compression: 'zstd'; }; files: Array<{ path: string; digest: string; size: number; type: 'file'; mode: string; }>; tree_hash: string; } /** * Pack files and create manifest in one operation * Returns both the packed buffer and the manifest */ export declare function packWithManifest(files: BinaryFileData[], options?: { buildTime?: number; }): Promise<{ buffer: Buffer; manifest: Manifest; }>; /** * Unpack tar.zst format back to files * Used by both Sandbox and Fixer APIs */ export declare function unpackTarZst(bundleBuffer: Buffer): Promise; export interface BundleProjectResult { url?: string; files: Array<{ path: string; contents: string; }>; } /** * Bundle wrapper: * - Packs Files into tar.zst and generates manifest * - Adds required entrypoint and optional host_code to manifest * - Uploads via multipart/form-data to /v1/stacks/bundle-multipart * - Decodes returned base64 bundle and extracts into outputDir * - If return_url=true, also returns the hosted URL (from response.path) * - If minify=true, the manifest will be minified */ export declare function BundleProject(client: Benchify, files: Array<{ path: string; contents: string; }>, entrypoint?: string, return_url?: boolean, minify?: boolean): Promise; //# sourceMappingURL=helpers.d.mts.map