import { SyncWorkspace } from '../../agent-utils/index.js';
import { AgentContext } from '../agent/index.js';
import { LocalCollection, LocalDocument } from '../embeddings/index.js';
export type Recombiner<TItem, TRecombine> = (results: () => Promise<AsyncGenerator<LocalDocument<{
    index: number;
}>>>, originalItems: TItem[]) => Promise<TRecombine>;
export declare class QueryWithRecombine<TItem> {
    private readonly queryOrVector;
    private readonly collection;
    private readonly _items;
    private readonly addToCollectionPromise;
    constructor(queryOrVector: string | number[], collection: LocalCollection<{
        index: number;
    }>, _items: TItem[], addToCollectionPromise: () => Promise<unknown>);
    recombine<TRecombine>(recombiner: Recombiner<TItem, TRecombine>): Promise<TRecombine>;
}
export declare class StandardRagBuilder<TItem> {
    private _selector;
    private readonly collection;
    private _items;
    private lastAddedItemIndex;
    constructor(context: AgentContext, collectionName?: string, workspace?: SyncWorkspace, items?: TItem[]);
    addItems(items: TItem[]): StandardRagBuilder<TItem>;
    forceAddItemsToCollection(): Promise<StandardRagBuilder<TItem>>;
    selector(selector: (item: TItem) => string): StandardRagBuilder<TItem>;
    query(queryOrVector: string | number[]): QueryWithRecombine<TItem>;
    private addItemsToCollection;
}
