import type { AgentMessage } from "@earendil-works/pi-agent-core";
export declare function pruneToolResults(messages: AgentMessage[], contextWindow: number, budgetRatio: number): AgentMessage[];
export declare function truncateContextMessages(messages: AgentMessage[]): AgentMessage[];
/**
 * Sticky engage/release state for {@link hardLimitEmergencyPrune}. Callers that
 * issue many requests for one session share a single latch so the emitted context
 * shape stays stable while the estimate hovers around the engage threshold.
 */
export interface EmergencyPruneLatch {
    engaged: boolean;
}
export declare function createEmergencyPruneLatch(): EmergencyPruneLatch;
export declare function hardLimitEmergencyPrune(messages: AgentMessage[], contextWindow: number, latch?: EmergencyPruneLatch): {
    messages: AgentMessage[];
    needsAggressiveCompaction: boolean;
};
//# sourceMappingURL=emergency-prune.d.ts.map