import { ProductIntentRegistry } from './registry';
import type { ProductIntentMeta, ProductIntentSpec } from './spec';
import type { ContractPatchIntent, ContractSpecPatch, EvidenceChunk, ImpactReport, InsightExtraction, OpportunityBrief, TaskPack } from './types';
export interface ProductIntentRuntimeOptions<Context = unknown> {
    /**
     * Fetch evidence relevant to a discovery question.
     */
    fetchEvidence: (params: {
        query: string;
        maxChunks?: number;
        context?: Context;
    }) => Promise<EvidenceChunk[]>;
    /**
     * Default maximum number of evidence chunks to retrieve.
     */
    maxEvidenceChunks?: number;
    /**
     * Optional callback invoked after insight extraction.
     */
    onInsightsGenerated?: (insights: InsightExtraction, ctx?: Context) => Promise<void>;
    /**
     * Optional callback invoked after brief synthesis.
     */
    onBriefSynthesised?: (brief: OpportunityBrief, ctx?: Context) => Promise<void>;
    /**
     * Optional callback invoked after patch intent generation.
     */
    onPatchIntentGenerated?: (intent: ContractPatchIntent, ctx?: Context) => Promise<void>;
    /**
     * Optional callback invoked after concrete patch generation.
     */
    onPatchGenerated?: (patch: ContractSpecPatch, ctx?: Context) => Promise<void>;
    /**
     * Optional callback invoked after impact report generation.
     */
    onImpactGenerated?: (impact: ImpactReport, ctx?: Context) => Promise<void>;
    /**
     * Optional callback invoked after task pack generation.
     */
    onTasksGenerated?: (tasks: TaskPack, ctx?: Context) => Promise<void>;
}
export interface ProductIntentDiscoveryParams<Context = unknown> {
    id: string;
    meta: ProductIntentMeta;
    question: string;
    context?: Context;
    maxEvidenceChunks?: number;
}
/**
 * ProductIntentRuntime orchestrates the multi-step pipeline of evidence
 * retrieval, insight extraction, brief synthesis, patch generation and
 * task generation. Consumers should extend this class and override
 * extractInsights, synthesiseBrief, generatePatchIntent, generatePatch,
 * generateImpactReport, and generateTasks.
 */
export declare class ProductIntentRuntime<Context = unknown> {
    private registry;
    private opts;
    constructor(opts: ProductIntentRuntimeOptions<Context>, registry?: ProductIntentRegistry);
    /**
     * Register an intent spec with this runtime.
     */
    registerIntent(spec: ProductIntentSpec<Context>): void;
    /**
     * Main entrypoint for running the discovery loop.
     */
    runDiscovery(params: ProductIntentDiscoveryParams<Context>): Promise<ProductIntentSpec<Context>>;
    /**
     * Extract insights from evidence. Override in subclasses.
     */
    protected extractInsights(_question: string, _evidence: EvidenceChunk[], _context?: Context): Promise<InsightExtraction>;
    /**
     * Synthesize a brief from extracted insights. Override in subclasses.
     */
    protected synthesiseBrief(_question: string, _insights: InsightExtraction, _context?: Context): Promise<OpportunityBrief>;
    /**
     * Generate a patch intent from a brief. Override in subclasses.
     */
    protected generatePatchIntent(_brief: OpportunityBrief, _context?: Context): Promise<ContractPatchIntent>;
    /**
     * Translate a patch intent into a concrete ContractSpec patch.
     */
    protected generatePatch(_intent: ContractPatchIntent, _context?: Context): Promise<ContractSpecPatch>;
    /**
     * Produce an impact report for a given intent and patch.
     */
    protected generateImpactReport(_intent: ContractPatchIntent, _patch: ContractSpecPatch, _context?: Context): Promise<ImpactReport>;
    /**
     * Generate a task pack from the brief, intent and impact report.
     */
    protected generateTasks(_brief: OpportunityBrief, _intent: ContractPatchIntent, _impact: ImpactReport, _context?: Context): Promise<TaskPack>;
}
