import { Message } from '../../types/messages.js'; /** * Check if a message is pinned, including tool-pair partner protection. * Returns `true` if the message at `index` is pinned, or if it is the * adjacent tool-pair partner (toolUse/toolResult) of a pinned message, * matched by toolUseId. * * @param messages - The full messages array. * @param index - The index to check. * @returns `true` if the message or its tool-pair partner is pinned. */ export declare function isPinned(messages: Message[], index: number): boolean; /** * Pin a message so it is protected from eviction during context reduction. * Mutates the message in place by setting `metadata.custom.pinned = true`. * * @param messages - The messages array containing the message to pin. * @param index - The index of the message to pin. */ export declare function pinMessage(messages: Message[], index: number): void; /** * Pin the first N messages in the array permanently. * * @param messages - The messages array. * @param count - Number of messages from the start to pin. */ export declare function applyPinFirst(messages: Message[], count: number): void; /** * Partition a range of messages into pinned (protected) and unpinned arrays. * * @param messages - The full messages array. * @param start - Start index of the range (inclusive). * @param end - End index of the range (exclusive). * @returns A tuple of [pinned, unpinned] message arrays. */ export declare function partitionPinned(messages: Message[], start: number, end: number): [Message[], Message[]]; /** * Unpin a message so it can be evicted during context reduction. * Mutates the message in place by removing the `pinned` flag from metadata. * * @param messages - The messages array containing the message to unpin. * @param index - The index of the message to unpin. */ export declare function unpinMessage(messages: Message[], index: number): void; //# sourceMappingURL=pin-message.d.ts.map