Check whether compaction is needed and perform it if so. Call this BEFORE assembling the prompt for the LLM.
Returns the current message list (potentially compacted).
Optional emotionalContext: EmotionalContextGet all current messages (including any summary blocks).
Get only the raw (non-compacted) messages.
Replace the message list (e.g. after external manipulation).
Get the compaction log.
Get all compaction entries.
Get aggregate stats.
Get the summary chain for UI display.
Search the compaction log for a keyword.
Find what happened to a specific turn.
Get the compaction engine (for strategy inspection/testing).
Current config (read-only).
Whether infinite context is enabled.