pub struct DeterministicCompaction {
pub max_steps: u32,
pub drop_kinds: Vec<StepKind>,
}Expand description
Deterministic drop-by-rule compaction. Default policy.
- Keeps the most recent
max_stepsverbatim. - Drops any step whose
kindmatchesdrop_kindsfirst. - When still over
max_steps, the older overflow steps are replaced by a single summary step (kind =ToolCall, name ="compacted", input ={ "dropped_count": N }). - Re-indexes
Step::idxafter compaction.
Fields§
§max_steps: u32Maximum number of Steps kept verbatim. Older overflow becomes a single summary step.
drop_kinds: Vec<StepKind>Step kinds dropped unconditionally before the max_steps truncation runs.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DeterministicCompaction
impl RefUnwindSafe for DeterministicCompaction
impl Send for DeterministicCompaction
impl Sync for DeterministicCompaction
impl Unpin for DeterministicCompaction
impl UnsafeUnpin for DeterministicCompaction
impl UnwindSafe for DeterministicCompaction
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more