Added
-
Compaction hook improvements: The
before_compactsession event now includes:previousSummary: Summary from the last compaction (if any), so hooks can preserve accumulated contextmessagesToKeep: Messages that will be kept after the summary (recent turns), in addition tomessagesToSummarizeresolveApiKey: Function to resolve API keys for any model (checks settings, OAuth, env vars)- Removed
apiKeystring in favor ofresolveApiKeyfor more flexibility
-
SessionManager API cleanup:
- Renamed
loadSessionFromEntries()tobuildSessionContext()(builds LLM context from entries, handling compaction) - Renamed
loadEntries()togetEntries()(returns defensive copy of all session entries) - Added
buildSessionContext()method to SessionManager
- Renamed