Structs§
Enums§
- Compaction
Stage - Progressive compaction stages, ordered from least to most aggressive.
- Complexity
Level
Functions§
- build_
compaction_ prompt - Build a summarization prompt from trimmed messages.
- build_
context - Assembles context messages within the token budget for the given complexity level.
- build_
context_ with_ budget - Like
build_contextbut uses the supplied budget configuration. - build_
context_ with_ budget_ footprint - Like
build_context_with_budgetbut also returns token/depth accounting. - classify_
context_ snapshot - Classify token allocation from finalized messages.
- compact_
to_ stage - Apply progressive compaction to a slice of messages at the requested stage.
- compress_
context - Compress assembled context messages using the
PromptCompressor. - count_
tokens - determine_
level - determine_
level_ with_ minimum - Determine complexity level with an enforced minimum floor. Channel-sourced messages use this to avoid L0 budgets that cause personality degradation with large FIRMWARE.toml files.
- estimate_
tokens - Rough estimate: ~4 characters per token.
- extract_
trimmable - Extract messages that would be trimmed (for summarization).
- inject_
instruction_ reminder - Inject an instruction anti-fade micro-reminder into the message list.
- insert_
compaction_ summary - Insert a compaction summary as a system message after the original system messages.
- needs_
hard_ clear - needs_
pruning - soft_
trim - Soft trim: remove oldest non-system messages while preserving the most recent N.
- token_
budget - token_
budget_ with_ config