import type { AgentQueryMessage } from "../types/agent.js"; export interface MicroCompactOptions { /** 保留最近 N 条可压缩工具结果(默认 3)。 */ keepRecent?: number; /** 触发阈值:可压缩工具结果数超过此值才清理(默认 20)。 */ triggerThreshold?: number; } export interface MicroCompactResult { messages: AgentQueryMessage[]; /** 本次清理了多少条工具结果 */ clearedCount: number; } /** * 微压缩:清理旧的可压缩工具结果。 * 策略: * 1. 统计所有 role="tool" 的消息,筛选可压缩工具 * 2. 保留最近 keepRecent 条,其余 content 替换为占位文本 * 3. 可压缩工具结果数 <= triggerThreshold 时不操作 */ export declare function microCompact(messages: AgentQueryMessage[], options?: MicroCompactOptions): MicroCompactResult;