import type { CodeAgentSessionSource } from '../contract/intake/code-agent-session';
import type { RunRecord } from '../run-record';
import { type AnalyzeBeliefPolicyOptions } from './report';
import type { BeliefDecisionExtractionReport, BeliefDecisionKind, BeliefDecisionPoint, BeliefPolicyEvaluationReport, BeliefSelectivePolicy } from './types';
export type CodeAgentBeliefDecisionTargetId = 'failure-recovery' | 'tool-selection' | 'graph-completion';
export interface ExtractCodeAgentBeliefDecisionPointsOptions {
    source: CodeAgentSessionSource;
    entries: unknown[];
    run: Pick<RunRecord, 'runId' | 'scenarioId' | 'outcome' | 'costUsd'>;
    sourcePath?: string;
}
export interface BeliefDecisionInventoryBucket {
    id: string;
    kind?: BeliefDecisionKind;
    targetId?: CodeAgentBeliefDecisionTargetId;
    n: number;
    withOutcome: number;
    withConfidence: number;
    withCandidateActions: number;
    withBehaviorProb: number;
    withTargetProb: number;
    successRate: number | null;
    meanScore: number | null;
    meanConfidence: number | null;
}
export interface BeliefDecisionInventoryReport {
    n: number;
    byKind: BeliefDecisionInventoryBucket[];
    byTarget: BeliefDecisionInventoryBucket[];
    diagnostics: string[];
}
export interface BeliefDecisionTargetSelection {
    id: CodeAgentBeliefDecisionTargetId;
    label: string;
    points: BeliefDecisionPoint[];
    support: BeliefDecisionInventoryBucket;
    reasons: string[];
}
export interface SelectBeliefDecisionTargetOptions {
    minN?: number;
    minOutcomeCoverage?: number;
    preferredTargets?: CodeAgentBeliefDecisionTargetId[];
}
export interface AnalyzeBeliefDecisionCorpusOptions {
    points: BeliefDecisionPoint[];
    targetId?: CodeAgentBeliefDecisionTargetId;
    minN?: number;
    minOutcomeCoverage?: number;
    minAccepted?: number;
    confidenceThreshold?: number;
    policy?: BeliefSelectivePolicy;
    requireOpe?: boolean;
    policyOptions?: Partial<AnalyzeBeliefPolicyOptions>;
}
export interface BeliefDecisionCorpusEvaluation {
    inventory: BeliefDecisionInventoryReport;
    target?: BeliefDecisionTargetSelection;
    policy?: BeliefSelectivePolicy;
    evaluation?: BeliefPolicyEvaluationReport;
    diagnostics: string[];
}
export declare function extractCodeAgentBeliefDecisionPoints(options: ExtractCodeAgentBeliefDecisionPointsOptions): BeliefDecisionExtractionReport;
export declare function inventoryBeliefDecisionPoints(points: BeliefDecisionPoint[]): BeliefDecisionInventoryReport;
export declare function selectBeliefDecisionTarget(points: BeliefDecisionPoint[], options?: SelectBeliefDecisionTargetOptions): BeliefDecisionTargetSelection | null;
export declare function analyzeBeliefDecisionCorpus(options: AnalyzeBeliefDecisionCorpusOptions): BeliefDecisionCorpusEvaluation;
//# sourceMappingURL=code-agent-corpus.d.ts.map