import type ChatPool from "./chat_pool";
import type Chats from "./interfaces/chats";
type ShardWorker<T> = (shard: {
    [key: string]: string;
}, chats: Chats) => Promise<T>;
/**
 * Share the "build shards, assign a pool triple, run in parallel"
 * scaffold that both pipelines need. The pipeline supplies only the
 * per-shard body via `work`.
 *
 * Groups stay whole within a shard so each worker's chat history
 * accumulates related items. `concurrency` is implicit in `pool.size`.
 */
export declare function runAcrossShards<T>(flatInput: {
    [key: string]: string;
}, groups: Array<{
    [key: string]: string;
}>, pool: ChatPool, work: ShardWorker<T>): Promise<T[]>;
export {};
