/** * Versioned Recall Envelope 构建与预算裁剪。 */ export interface EnvelopeRecord { role: string; occurredAt: string; sessionId: string; entryId: string; contentHash: string; text: string; score: number; } export interface RecallBundle { requestId: string; prompt: string; records: EnvelopeRecord[]; envelopeText: string; estimatedTokens: number; trustRuleAppended: boolean; } /** * 转义正文中的冲突 marker 字符序列。 */ export declare function escapeEnvelopeMarkers(text: string): string; /** * 按 4 records / 600 tokens 从最低分开始移除,构建 envelope。 */ export declare function buildRecallBundle(requestId: string, prompt: string, ranked: EnvelopeRecord[]): RecallBundle | null; /** * 渲染 envelope 文本。 */ export declare function renderEnvelope(requestId: string, records: EnvelopeRecord[]): string; /** * 消息中是否已含冲突/既有 envelope marker。 */ export declare function messagesContainEnvelopeMarker(messages: unknown[]): boolean; //# sourceMappingURL=envelope.d.ts.map