Skip to main content

Module compression_tooling

Module compression_tooling 

Source

Structs§

CompressionCandidatePlan
Immutable archive selection produced before any summarization request is sent. The final summary must represent exactly this set.
CompressionPlan
A compression plan describing which active historical messages should be archived and summarized.
ContextCompressionExposure
Metadata about current context pressure, used to decide when compression should be requested by host-side control flow.

Enums§

CompressionPlanError
Structured reason why a compression plan could not be built.

Constants§

DEFAULT_SUMMARY_TARGET_RATIO

Functions§

active_messages_for_budget
apply_compression_plan
build_compression_plan_with_summary
Build a compression plan that archives older active messages and replaces them with a caller-provided summary.
build_forced_compression_candidate_plan
Select the exact archive candidates before invoking the summarization model.
build_forced_compression_candidate_plan_with_fixed_tokens
Variant of build_forced_compression_candidate_plan that accounts for fixed prompt blocks rendered outside Session.messages (for example task, plan, workflow, project-resource, and external-memory context blocks).
build_forced_compression_plan_with_summary
Build a compression plan while bypassing “tool exposure” gating.
build_summary_prompt
compression_summary_message
context_window_usage_percent
estimate_context_compression_exposure
Estimate whether context pressure has crossed the configured threshold for compression eligibility.
finalize_compression_candidate_plan
Bind a completed summary to a previously selected candidate set and verify the real post-compression prompt before any session mutation occurs.
normalized_summary_target_ratio
normalized_trigger_percent
summary_source_messages