ConstReadonlycallbacks: Partial<IHistoryInstanceCallbacks>ReadonlyclientId: stringDisposes of the history, clearing all data if agentName is null. Invokes onDispose callback if provided.
Iterates over history messages, applying filters and system prompts if configured. Invokes onRead callbacks during iteration if provided.
Removes and returns the last message from the history, updating persistent storage. Invokes onPop and onChange callbacks if provided.
Adds a new message to the history, persisting it to storage. Invokes onPush and onChange callbacks if provided.
Initializes the history for an agent, loading data from persistent storage if needed.
Manages a persistent history of messages, storing them in memory and on disk.