/**
 * Concurrency Pool
 *
 * Shared utility for bounded-concurrency parallel execution.
 * Replaces duplicated Promise.all batching patterns across the codebase.
 *
 * Uses getMaxParallel() for auto-detection with UAP_MAX_PARALLEL env override.
 */
/**
 * Map over items with bounded concurrency.
 *
 * Unlike Promise.all(items.map(fn)), this limits the number of
 * in-flight promises to prevent overwhelming local inference
 * endpoints or exhausting file descriptors.
 *
 * @param items - Array of items to process
 * @param fn - Async function to apply to each item
 * @param options - Concurrency options
 * @returns Results in the same order as input items
 *
 * @example
 * ```ts
 * // Auto-detect concurrency from vCPUs
 * const results = await concurrentMap(urls, url => fetch(url));
 *
 * // Explicit limit
 * const results = await concurrentMap(tasks, runTask, { maxConcurrent: 4 });
 *
 * // CPU-bound mode (reserves cores for OS)
 * const results = await concurrentMap(files, compress, { mode: 'cpu' });
 * ```
 */
export declare function concurrentMap<T, R>(items: T[], fn: (item: T, index: number) => Promise<R>, options?: {
    /** Maximum concurrent operations. Overrides auto-detection. */
    maxConcurrent?: number;
    /** 'cpu' reserves cores for OS/inference, 'io' allows higher concurrency */
    mode?: 'cpu' | 'io';
}): Promise<R[]>;
/**
 * Map over items with bounded concurrency, settling all promises.
 *
 * Like concurrentMap but uses Promise.allSettled semantics --
 * failures don't abort other in-flight operations.
 *
 * @returns Array of PromiseSettledResult in input order
 */
export declare function concurrentMapSettled<T, R>(items: T[], fn: (item: T, index: number) => Promise<R>, options?: {
    maxConcurrent?: number;
    mode?: 'cpu' | 'io';
}): Promise<PromiseSettledResult<R>[]>;
//# sourceMappingURL=concurrency-pool.d.ts.map