2026-07-16 04:05:37 +07:00
|
|
|
//! Context management: token counting, cross-call tool-result dedup,
|
|
|
|
|
//! per-result compression, budget-based shaping, and shared
|
|
|
|
|
//! context-window resolution — replaces `runtime::shortsend`.
|
|
|
|
|
//!
|
|
|
|
|
//! No facade function here: `dedup`, `shaping`, and `tokens` are called
|
|
|
|
|
//! directly from each call site (the per-turn auto-compaction loop in
|
|
|
|
|
//! `actions::run_agent_turn`, and `Action::Compact`), matching this
|
|
|
|
|
//! codebase's "no DI, call modules directly" convention. An orchestration
|
|
|
|
|
//! layer would only serve one of the two callers generically — the
|
|
|
|
|
//! auto-loop already needs per-stage control to decide when to emit
|
|
|
|
|
//! `TurnEvent::Compacted`.
|
2026-07-16 04:21:14 +07:00
|
|
|
pub mod dedup;
|
2026-07-16 04:52:59 +07:00
|
|
|
pub mod shaping;
|
2026-07-16 04:42:35 +07:00
|
|
|
pub mod squash;
|
2026-07-16 04:05:37 +07:00
|
|
|
pub mod tokens;
|
2026-07-16 04:09:27 +07:00
|
|
|
pub mod window;
|