Skip to main content

Module compaction

Module compaction 

Source

Structs§

AssistantActionGroup
A grouped assistant-action slice of message history.
CompactionCapabilities
Capability descriptor used to decide whether a provider-specific compaction optimization may be attempted.
CompactionResult
Result of a successful compaction.
PreparedCompaction
Output of the deterministic pre-summary compaction-prep pipeline.

Enums§

CompactionStrategy
Strategy selection for compaction execution.

Constants§

COMPACTION_SUMMARY_PREFIX
Prefix prepended to the summary in the compaction entry so that later context assembly can mark it clearly for the model.
DEFAULT_KEEP_RECENT_GROUPS
Default number of recent assistant-action groups to preserve verbatim.

Functions§

assistant_action_groups
Partition a message list into assistant-action groups.
execute_compaction_with_retry
Execute manual compaction with overflow retry.
execute_manual_compaction
Execute a manual compaction on the current branch of a session.
prepare_messages_for_compaction
Deterministically prepare history for a later summary-generation step.
select_compaction_strategy
Select the preferred compaction strategy for a provider/model pair.
shrink_messages_for_summary
Replace tool-result bodies with lightweight placeholders while keeping tool name, truncated arguments, and byte counts for debugging continuity.