import { ActiveRecallChatType, ActiveRecallQueryMode, ActiveRecallPromptStyle, ActiveRecallThinking, ActiveRecallModelFallbackPolicy } from './types.js';
import './index-1qIcnbG1.js';

interface ActiveRecallTurn {
    role: "user" | "assistant";
    content: string;
}
interface ActiveRecallInput {
    sessionKey: string;
    agentId: string;
    chatType: ActiveRecallChatType;
    recentTurns: ActiveRecallTurn[];
    currentMessage: string;
}
interface ActiveRecallConfig {
    enabled: boolean;
    agents: string[] | null;
    allowedChatTypes: ActiveRecallChatType[];
    queryMode: ActiveRecallQueryMode;
    promptStyle: ActiveRecallPromptStyle;
    customInstruction: string | null;
    promptAppend: string | null;
    maxSummaryChars: number;
    recentUserTurns: number;
    recentAssistantTurns: number;
    recentUserChars: number;
    recentAssistantChars: number;
    thinking: ActiveRecallThinking;
    timeoutMs: number;
    cacheTtlMs: number;
    persistTranscripts: boolean;
    transcriptDir: string;
    entityGraphDepth: number;
    includeCausalTrajectories: boolean;
    includeDaySummary: boolean;
    attachRecallExplain: boolean;
    modelOverride: string | null;
    modelFallbackPolicy: ActiveRecallModelFallbackPolicy;
}
interface ActiveRecallResult {
    summary: string | null;
    citations: Array<{
        memoryId: string;
        relevance: number;
    }>;
    latencyMs: number;
    cacheHit: boolean;
    modelUsed: string;
    transcriptPath: string | null;
}
interface ActiveRecallDependencies {
    recall(query: string, sessionKey: string): Promise<string | null>;
    getLastRecallSnapshot?(sessionKey: string): {
        memoryIds?: string[];
    } | null;
    walkEntityGraph?(params: {
        sessionKey: string;
        query: string;
        depth: number;
    }): Promise<string[]>;
    loadCausalTrajectories?(params: {
        sessionKey: string;
        query: string;
    }): Promise<string[]>;
    loadDaySummary?(sessionKey: string): Promise<string | null>;
    explainLastRecall?(sessionKey: string): Promise<string | null>;
    generateSummary?(params: {
        prompt: string;
        sessionKey: string;
        agentId: string;
        model: string;
        timeoutMs: number;
        thinking: ActiveRecallThinking;
        fallbackPolicy: ActiveRecallModelFallbackPolicy;
    }): Promise<{
        text: string | null;
        modelUsed?: string;
        cacheHit?: boolean;
    }>;
    now?: () => number;
}
declare function buildActiveRecallQueryBundle(input: ActiveRecallInput, config: ActiveRecallConfig): string;
declare function normalizeActiveRecallSummary(value: string | null, maxChars: number): string | null;
declare function buildActiveRecallPrompt(params: {
    config: ActiveRecallConfig;
    queryBundle: string;
    recallContext: string | null;
    graphContext: string[];
    causalContext: string[];
    daySummary: string | null;
    recallExplain: string | null;
}): string;
declare function createActiveRecallEngine(deps: ActiveRecallDependencies, config: ActiveRecallConfig): {
    run(input: ActiveRecallInput): Promise<ActiveRecallResult>;
};

export { type ActiveRecallConfig, type ActiveRecallDependencies, type ActiveRecallInput, type ActiveRecallResult, type ActiveRecallTurn, buildActiveRecallPrompt, buildActiveRecallQueryBundle, createActiveRecallEngine, normalizeActiveRecallSummary };
