import type { QMemoryCategory } from "./categories.js";
/** Detected query scenario with preferred categories. */
export interface RecallCategoryHint {
    /** Detected scenario label. */
    scenario: QueryScenario;
    /** Preferred categories for this scenario (ordered by priority). */
    preferred: QMemoryCategory[];
    /** Categories to deprioritize (still recalled but scored lower). */
    deprioritized: QMemoryCategory[];
    /** Confidence of scenario detection (0.0-1.0). */
    confidence: number;
}
/** Known query scenarios. */
export type QueryScenario = "coding" | "config" | "conversation" | "learning" | "decision" | "general";
/**
 * Detect the query scenario and return category preferences.
 *
 * Uses pattern matching on the user query to infer intent.
 * Returns "general" (no filtering) when confidence is below threshold.
 *
 * @param query - User query text
 * @returns Category hint with preferred/deprioritized categories
 */
export declare function detectRecallCategories(query: string): RecallCategoryHint;
/**
 * Apply category boost/penalty to a recall score.
 *
 * Used by recall hooks to adjust memory scores based on category alignment.
 *
 * @param baseScore - Original relevance score (0.0-1.0)
 * @param memoryCategory - Category of the memory entry (if known)
 * @param hint - Category hint from detectRecallCategories()
 * @returns Adjusted score
 */
export declare function applyCategoryBoost(baseScore: number, memoryCategory: string | undefined | null, hint: RecallCategoryHint): number;
/**
 * Filter and re-rank a list of recalled memories based on category preferences.
 *
 * @param memories - Raw recalled memories with optional category
 * @param hint - Category hint from detectRecallCategories()
 * @param minScore - Minimum adjusted score to keep (default: 0)
 * @returns Re-ranked memories (highest adjusted score first)
 */
export declare function filterByCategory<T extends {
    score?: number;
    category?: string | null;
}>(memories: T[], hint: RecallCategoryHint, minScore?: number): T[];
/**
 * Infer memory category from filename prefix convention.
 * E.g. "lesson-docker.md" → "lesson", "fact-ports.md" → "fact"
 *
 * Exported for use by recall hooks.
 */
export declare function inferCategoryFromFilename(filename: string): QMemoryCategory | null;
