import { CausalEdge } from './causal-chain.js';
import './causal-trajectory.js';
import './objective-state.js';

/**
 * causal-retrieval.ts — CMC Phase 3: Causal Retrieval Channel
 *
 * Walks upstream/downstream causal chains during recall to surface
 * connected trajectories. Branching points (multiple outgoing edges
 * with different outcomes) get a counterfactual boost as they represent
 * decision points worth surfacing.
 */

interface CausalRetrievalConfig {
    maxDepth: number;
    maxChars: number;
    counterfactualBoost: number;
}
interface CausalRetrievalResult {
    trajectoryId: string;
    direction: "upstream" | "downstream" | "seed";
    depth: number;
    score: number;
    edgeType?: CausalEdge["edgeType"];
    edgeConfidence?: number;
    isCounterfactual: boolean;
    summary: string;
}
declare function formatCausalRetrievalSection(results: CausalRetrievalResult[], maxChars: number): string | null;
/**
 * Retrieve causal chain context for a recall query.
 * 1. Use existing causal trajectory search for seed trajectories
 * 2. Walk upstream/downstream from seeds
 * 3. Format as recall section
 */
declare function retrieveCausalChains(options: {
    memoryDir: string;
    causalTrajectoryStoreDir?: string;
    query: string;
    sessionKey?: string;
    config: CausalRetrievalConfig;
}): Promise<string | null>;

export { type CausalRetrievalConfig, type CausalRetrievalResult, formatCausalRetrievalSection, retrieveCausalChains };
