import type { ModelPort } from "@oscharko-dev/keiko-harness";
import { type KnowledgeStore, type RetrievalResult } from "@oscharko-dev/keiko-local-knowledge";
import { type ChatLocalKnowledgeScope } from "@oscharko-dev/keiko-contracts/bff-wire";
import type { RouteResult } from "./routes.js";
import type { UiHandlerDeps } from "./deps.js";
import type { Chat } from "./store/index.js";
import { type GroundedRetriever } from "./grounded-qa-multi-source.js";
import { type SelectedLocalKnowledgeScope } from "./local-knowledge-grounded-qa.js";
import { type GroundedAnswerPayload } from "./grounded-answer.js";
export declare function buildLocalKnowledgeScopes(chat: Chat): readonly ChatLocalKnowledgeScope[];
export declare function connectorLabels(rawLabels: readonly string[]): readonly string[];
export type FolderRetriever = GroundedRetriever;
export type ConnectorRetrieve = (store: KnowledgeStore, scope: ChatLocalKnowledgeScope, selected: SelectedLocalKnowledgeScope) => Promise<RetrievalResult>;
export type HybridAnswerer = (system: string, user: string) => Promise<GroundedAnswerPayload>;
export interface HybridGroundedAskCtx {
    readonly chat: Chat;
    readonly content: string;
    readonly modelId: string;
    readonly deps: UiHandlerDeps;
    readonly signal: AbortSignal;
    readonly folderRetriever?: FolderRetriever;
    readonly connectorRetrieve?: ConnectorRetrieve;
    readonly answer?: HybridAnswerer;
}
export declare function createHybridAnswerer(model: ModelPort, modelId: string, signal: AbortSignal): HybridAnswerer;
export declare function runHybridGroundedAsk(ctx: HybridGroundedAskCtx): Promise<RouteResult>;
//# sourceMappingURL=grounded-qa-hybrid.d.ts.map