/** * InjectionPolicy — 注入策略 * 控制 token 预算、优先级排序(类型偏好 + 评分)、去重 */ import type { KnowledgeType } from '../types/index.js'; import type { FormattedBlock } from './injection-formatter.js'; import type { ScoredEntry } from './relevance-scorer.js'; export interface InjectionPolicyOptions { maxTokens: number; preferredTypes?: KnowledgeType[]; minScore?: number; deduplicateThreshold?: number; } export interface PolicyResult { selected: FormattedBlock[]; tokensUsed: number; truncated: boolean; droppedCount: number; } export declare class InjectionPolicy { private readonly maxTokens; private readonly preferredTypes; private readonly minScore; private readonly deduplicateThreshold; constructor(options: InjectionPolicyOptions); apply(scored: ScoredEntry[], blocks: FormattedBlock[]): PolicyResult; private deduplicate; } //# sourceMappingURL=injection-policy.d.ts.map