/**
 * Build coordinator for coalescing concurrent build requests.
 *
 * Ensures only one build runs per content hash. Subsequent requests
 * for the same hash coalesce on the same Promise, avoiding duplicate
 * compilation work.
 *
 * On success: all waiters resolve.
 * On failure: all waiters reject with the build error.
 * On timeout: all waiters reject with a timeout error.
 */
export declare class BuildCoordinator {
    private readonly inFlight;
    private readonly timeoutMs;
    constructor(options?: {
        timeoutMs?: number;
    });
    /**
     * Ensure a build is running for the given content hash.
     *
     * If already in-flight, returns the existing promise (coalescing).
     * If not, calls triggerBuild() and tracks the promise.
     *
     * @param contentHash - The content hash identifying the bundle to build
     * @param triggerBuild - Async function that performs the actual build
     */
    ensureBuild(contentHash: string, triggerBuild: () => Promise<void>): Promise<void>;
    /**
     * Check if a build is currently in-flight for a content hash.
     */
    isBuilding(contentHash: string): boolean;
    /**
     * Get the number of in-flight builds (for metrics/debugging).
     */
    getInFlightCount(): number;
    /**
     * Run triggerBuild with a timeout. Rejects with a descriptive
     * error if the build exceeds timeoutMs.
     */
    private runWithTimeout;
}
//# sourceMappingURL=build-coordinator.d.ts.map