/** * Deterministic, repository-derived vocabulary used to widen keyword recall. * * The artifact is deliberately query-side: the BM25 corpus is never expanded. * Entries are accepted only when both terms exist in that corpus, and the * sidecar is tied to the corpus content stamp so an incremental mutation fails * closed to ordinary keyword retrieval. */ export declare const REPO_VOCABULARY_SCHEMA_VERSION = 1; export declare const REPO_VOCABULARY_FILE = "repo-vocabulary.json"; export declare const REPO_VOCABULARY_EXPANSIONS_PER_TOKEN = 5; export declare const REPO_VOCABULARY_MINING_BUDGET_MS = 250; /** The only links allowed without two repository binding sites. */ export declare const UNIVERSAL_PROGRAMMING_ABBREVIATIONS: Readonly<{ readonly auth: "authentication"; readonly cfg: "config"; readonly repo: "repository"; readonly svc: "service"; readonly txn: "transaction"; }>; export interface RepositoryVocabularySource { id: string; name: string; className?: string; signature?: string; docstring?: string; filePath: string; text?: string; } export interface RepositoryVocabulary { schemaVersion: number; tokenizerVersion: number; contentStamp: string; status: 'complete' | 'partial'; omittedCandidateInputCount: number; /** Stable, sorted term -> sorted expansion list. */ entries: Array<[string, string[]]>; payloadHash: string; } export interface VocabularyQueryExpansion { originalTokens: string[]; expansionTokens: string[]; vocabularyAvailable: boolean; } export interface VocabularyRankScore { id: string; score: number; expansionScore: number; } /** Strict original-match tier, then ordinary score ordering within each tier. */ export declare function compareVocabularyRank(a: VocabularyRankScore, b: VocabularyRankScore): number; /** * Mine a bounded vocabulary from already-resident index records. * Candidate generation uses first-character/length buckets; no all-pairs walk. */ export declare function mineRepositoryVocabulary(sources: readonly RepositoryVocabularySource[], corpusDf: ReadonlyMap, contentStamp: string, options?: { budgetMs?: number; now?: () => number; contextForSource?: (source: RepositoryVocabularySource) => string | undefined; callEdges?: readonly { callerId: string; calleeId: string; }[]; }): RepositoryVocabulary; export declare function persistRepositoryVocabulary(dbPath: string, vocabulary: RepositoryVocabulary): Promise; export declare function invalidateRepositoryVocabulary(dbPath: string, strict?: boolean): void; /** Load only when both the lexicon and authoritative code-corpus stamps agree. */ export declare function loadRepositoryVocabulary(outputDir: string): RepositoryVocabulary | null; export declare function _resetRepositoryVocabularyCacheForTesting(): void; export declare function expandVocabularyQuery(outputDir: string, originalTokens: string[], enabled?: boolean): VocabularyQueryExpansion; /** Expansion terms that made a non-zero contribution to one result. */ export declare function scoredExpansionTerms(expansionTokens: readonly string[], termFrequencies: ReadonlyMap): string[]; //# sourceMappingURL=repo-vocabulary.d.ts.map