import { type ConnectedContextPack, type ExplorationBudget, type RetrievalQuery, type SelectedScope } from "@oscharko-dev/keiko-contracts/connected-context";
import { type ClarificationPrompt, type ExplorationPlan, type MicroIndex } from "@oscharko-dev/keiko-workflows";
import { DEFAULT_SEARCH_LIMITS, type WorkspaceFs, type WorkspaceInfo } from "@oscharko-dev/keiko-workspace";
import { type GroundedAnswerPayload } from "./grounded-answer.js";
export interface GroundedAnswerer {
    answer(question: string, pack: ConnectedContextPack): Promise<GroundedAnswerPayload>;
}
export interface OrchestratorInput {
    readonly scope: SelectedScope;
    readonly query: RetrievalQuery;
    readonly workspaceRoot: string;
    readonly budget?: ExplorationBudget;
}
export interface OrchestratorDeps {
    readonly answerer: GroundedAnswerer;
    readonly nowMs?: () => number;
    readonly signal?: AbortSignal | undefined;
    readonly fs?: WorkspaceFs;
    readonly detectWorkspace?: (root: string, fs: WorkspaceFs) => WorkspaceInfo;
    readonly recordPlan?: (plan: ExplorationPlan) => void;
    readonly microIndex?: MicroIndex;
}
export interface OrchestratorOutput {
    readonly pack: ConnectedContextPack;
    readonly assistantContent: string;
    readonly elapsedMs: number;
    readonly plan?: ExplorationPlan;
}
export interface RetrievalOnlyOutput {
    readonly pack: ConnectedContextPack;
    readonly elapsedMs: number;
    readonly plan: ExplorationPlan;
}
export declare class ClarificationNeededError extends Error {
    readonly clarification: ClarificationPrompt;
    constructor(clarification: ClarificationPrompt);
}
export declare const echoAnswerer: GroundedAnswerer;
export declare function retrieveConnectedContextPack(input: OrchestratorInput, deps: OrchestratorDeps): Promise<RetrievalOnlyOutput>;
export declare function runGroundedExploration(input: OrchestratorInput, deps: OrchestratorDeps): Promise<OrchestratorOutput>;
export { DEFAULT_SEARCH_LIMITS };
//# sourceMappingURL=grounded-orchestrator.d.ts.map