/**
 * Fast Lane Predictor: Local autocomplete using weighted trie + frequency + semantic scoring.
 *
 * Two prediction modes:
 *   1. Word boundary → bigram-based next-word suggestion (grammar-filtered)
 *   2. Mid-word (≥3 chars) → trie prefix search → scoring pipeline → top result
 *
 * Scoring is delegated to scoring-pipeline.ts which handles:
 *   Stage 1 (semantic + frequency), grammar filter, Stage 2 (optional LM re-ranking).
 *
 * Context vector: average of word vectors from text before cursor (last N words).
 * Falls back to cold mode (freq-only) when vectors not yet loaded.
 *
 * Session personalization (L1): words the user types are incrementally boosted
 * via incrementSessionFreq(), called on word boundaries from the plugin.
 */
export interface WeightedTerm {
    authorFreq: number;
    docFreq: number;
    freq: number;
    word: string;
}
export interface TenantVocabulary {
    terms: WeightedTerm[];
}
interface VectorStore {
    dim: number;
    float32: Float32Array;
    wordIndex: Record<string, number>;
}
/**
 * Loads the General English vocabulary.
 * expects a simple array of strings: ["about", "above", "actually", ...]
 */
export declare const initL3Vocabulary: (l3Words: string[]) => void;
/**
 * Get predictor status for debugging.
 * vectorsLoaded: true when semantic scoring is active
 * wordCount: number of words in vector store (0 if not loaded)
 */
export declare const getPredictorStatus: () => {
    isInitialized: boolean;
    vectorsLoaded: boolean;
    vectorsLoadStarted: boolean;
    wordCount: number;
};
/**
 * Get details of the last prediction (for debugging).
 * Returns null if no prediction has run yet or debug was off.
 */
export declare const getLastPredictionDebug: () => {
    contextWords: string[];
    currentWord: string;
    mode: "cold" | "warm";
    suggestion: string | null;
    textBefore: string;
    topCandidates: Array<{
        finalScore: number;
        freqScore: number;
        lmScore: number;
        semanticScore: number;
        word: string;
    }>;
} | null;
export declare const initVocabulary: (vocabulary: TenantVocabulary) => void;
/**
 * Increment L1 session frequency for a single word.
 * Called from the plugin on word boundaries for efficient incremental boosting.
 */
export declare const incrementSessionFreq: (word: string) => void;
/**
 * Prime session frequencies from a document page string.
 *
 * Iterates through every token in `pageContent` and increments its session
 * frequency so that words already present on the page receive an L1 boost
 * before the user starts typing.
 *
 * Pass `undefined` (or omit the argument) to skip priming — useful when the
 * calling context does not yet have a page value available.
 */
export declare const ingestDocumentPage: (pageContent: string | undefined) => void;
export declare const predict: (textBefore: string) => string | null;
export declare const loadVectorsAsync: (options?: {
    getBinaryUrl?: () => Promise<string>;
    isLocalLLM?: boolean;
}) => Promise<void>;
export declare const initVectors: (store: VectorStore) => void;
export declare const loadDefaultVocabulary: (options?: {
    isLocalLLM?: boolean;
}) => Promise<void>;
export {};
