/** * TermInjectionStrategy — 术语专用 Prompt 注入 * FR-H02 * * 优先级提升 + deprecated 提示 + 术语专用格式化模板 */ import type { KnowledgeEntry } from '../types/index.js'; import type { StorageAdapter } from '../storage/storage-types.js'; import type { ScoredEntry } from '../injection/relevance-scorer.js'; import type { FormattedBlock } from '../injection/injection-formatter.js'; import type { TermMetadata, DictionaryConfig } from './term-types.js'; export interface TermInjectionStrategyOptions { store: StorageAdapter; config?: Partial; } export interface TermInjectionResult { blocks: FormattedBlock[]; deprecatedWarnings: FormattedBlock[]; } export declare class TermInjectionStrategy { private readonly store; private readonly config; constructor(options: TermInjectionStrategyOptions); /** * 从 query 中检索相关术语并格式化为注入块 * 返回活跃术语块 + deprecated 警告块 */ getTermBlocks(query: string, options?: { format?: 'markdown' | 'plaintext'; tokenBudget?: number; }): Promise; /** * 将术语注入块与一般知识评分合并,术语优先级提升 */ boostTermScores(termEntries: KnowledgeEntry[], scored: ScoredEntry[]): ScoredEntry[]; /** 术语专用 markdown 格式化 */ formatTermBlock(entry: KnowledgeEntry, meta: TermMetadata, format?: 'markdown' | 'plaintext'): FormattedBlock; /** 术语 plain text 格式化 (P1-3: FR-H02-AC4) */ private formatTermBlockPlainText; /** deprecated 术语警告格式化 */ private formatDeprecatedWarning; private fitWithinBudget; private queryDictionaryEntries; } //# sourceMappingURL=term-injection-strategy.d.ts.map