import { n as HistoryMediaEntry, t as HistoryEntry } from "./history.types-Bc8mCALh.js"; //#region src/auto-reply/reply/history.d.ts declare const HISTORY_CONTEXT_MARKER = "[Chat messages since your last reply - for context]"; declare const DEFAULT_GROUP_HISTORY_LIMIT = 50; /** * Evict oldest keys from a history map when it exceeds MAX_HISTORY_KEYS. * Uses Map's insertion order for LRU-like behavior. */ declare function evictOldHistoryKeys(historyMap: Map, maxKeys?: number): void; /** Wraps previous chat history and the current message in the prompt context marker format. */ declare function buildHistoryContext(params: { historyText: string; currentMessage: string; lineBreak?: string; }): string; /** * @deprecated Plugin message-turn code should use `createChannelHistoryWindow(...).record(...)`. * This helper remains for core internals and older plugin compatibility. */ declare function recordPendingHistoryEntry(params: { historyMap: Map; historyKey: string; entry: T; limit: number; }): T[]; /** * @deprecated Plugin message-turn code should use `createChannelHistoryWindow(...).record(...)`. * This helper remains for core internals and older plugin compatibility. */ declare function recordPendingHistoryEntryIfEnabled(params: { historyMap: Map; historyKey: string; entry?: T | null; limit: number; }): T[]; type MaybePromise = T | Promise; /** Filters history media to local image entries safe to re-attach to prompt context. */ declare function normalizeHistoryMediaEntries(params: { media?: readonly HistoryMediaEntry[] | null; limit?: number; messageId?: string; }): HistoryMediaEntry[]; /** * @deprecated Plugin message-turn code should use * `createChannelHistoryWindow(...).recordWithMedia(...)`. This helper remains * for core internals and older plugin compatibility. */ declare function recordPendingHistoryEntryWithMedia(params: { historyMap: Map; historyKey: string; entry?: T | null; limit: number; media?: readonly HistoryMediaEntry[] | null | (() => MaybePromise); mediaLimit?: number; messageId?: string; shouldRecord?: () => boolean; }): Promise; /** * @deprecated Plugin message-turn code should use * `createChannelHistoryWindow(...).buildPendingContext(...)`. This helper remains * for core internals and older plugin compatibility. */ declare function buildPendingHistoryContextFromMap(params: { historyMap: Map; historyKey: string; limit: number; currentMessage: string; formatEntry: (entry: HistoryEntry) => string; lineBreak?: string; }): string; /** * @deprecated Plugin message-turn code should use * `createChannelHistoryWindow(...).buildInboundHistory(...)`. This helper remains * for core internals and older plugin compatibility. */ declare function buildInboundHistoryFromMap(params: { historyMap: Map; historyKey: string; limit: number; }): HistoryEntry[] | undefined; /** Builds structured inbound history entries from an existing window. */ declare function buildInboundHistoryFromEntries(params: { entries: readonly HistoryEntry[]; limit: number; }): HistoryEntry[] | undefined; /** * @deprecated Prefer `buildHistoryContextFromEntries(...)` for existing entry * arrays, or `createChannelHistoryWindow(...)` when working from a history map. * This helper remains for older plugin compatibility. */ declare function buildHistoryContextFromMap(params: { historyMap: Map; historyKey: string; limit: number; entry?: HistoryEntry; currentMessage: string; formatEntry: (entry: HistoryEntry) => string; lineBreak?: string; excludeLast?: boolean; }): string; /** * @deprecated Plugin message-turn code should use `createChannelHistoryWindow(...).clear(...)`. * This helper remains for core internals and older plugin compatibility. */ declare function clearHistoryEntries(params: { historyMap: Map; historyKey: string; }): void; /** * @deprecated Plugin message-turn code should use `createChannelHistoryWindow(...).clear(...)`. * This helper remains for core internals and older plugin compatibility. */ declare function clearHistoryEntriesIfEnabled(params: { historyMap: Map; historyKey: string; limit: number; }): void; /** Builds prompt text from already-recorded history entries. */ declare function buildHistoryContextFromEntries(params: { entries: HistoryEntry[]; currentMessage: string; formatEntry: (entry: HistoryEntry) => string; lineBreak?: string; excludeLast?: boolean; }): string; //#endregion export { buildHistoryContextFromMap as a, buildPendingHistoryContextFromMap as c, evictOldHistoryKeys as d, normalizeHistoryMediaEntries as f, recordPendingHistoryEntryWithMedia as h, buildHistoryContextFromEntries as i, clearHistoryEntries as l, recordPendingHistoryEntryIfEnabled as m, HISTORY_CONTEXT_MARKER as n, buildInboundHistoryFromEntries as o, recordPendingHistoryEntry as p, buildHistoryContext as r, buildInboundHistoryFromMap as s, DEFAULT_GROUP_HISTORY_LIMIT as t, clearHistoryEntriesIfEnabled as u };