/** * Bundle packing (design: docs/designs/clustly-cli.md §5; build-plan slice 2.6). ustar tar of * the collected file set via the system `tar` binary (zero-dep rule; ustar matches Hangar's * existing /releases intake). Deterministic: the sorted file list is passed explicitly (-T), * never directory globs — what the scanner saw is exactly what ships. Size-capped. */ import { BUNDLE_MAX_BYTES } from "./limits"; import type { CollectedFiles } from "./scanner"; /** * The bundle cap — and it is the cap the HOSTING SIDE actually enforces, not an aspiration. * * This was 250 MiB, which was never true anywhere: hosting's intake refuses past 50 MiB * (`DEFAULT_MAX_BUNDLE_BYTES`), so a 100 MiB bundle packed cleanly, uploaded, and was rejected * at the far end after the builder had already waited through the transfer. Failing here — the * first place that knows the size — is the whole point of having a cap in the CLI. * * The number is hosting's; if hosting raises its `MAX_BUNDLE_BYTES`, this follows, never leads. */ export { BUNDLE_MAX_BYTES }; export interface PackResult { tarPath: string; bytes: number; fileCount: number; } /** The workspace is over hosting's cap — the BUILDER's bundle, fixed by `exclude:`, never a * platform fault (it used to surface as one, "retry may succeed": staging matrix 2026-09-06). */ export declare class BundleTooLargeError extends Error { readonly totalBytes: number; readonly maxBytes: number; constructor(totalBytes: number, maxBytes: number); } export declare function packBundle(workspace: string, collected: CollectedFiles, maxBytes?: number): PackResult;