pub struct ContextReminders { /* private fields */ }Expand description
Every lane’s reminder state, its limit and the meter of its context use.
Implementations§
Source§impl ContextReminders
impl ContextReminders
pub fn new(settings: ReminderSettings) -> ContextReminders
pub fn settings(&self) -> ReminderSettings
Sourcepub fn set_meter(&self, meter: ContextMeter)
pub fn set_meter(&self, meter: ContextMeter)
Where the lane’s context use comes from (the session actor’s durable conversations).
Sourcepub fn set_limit(&self, lane: &str, limit: Option<Limit>)
pub fn set_limit(&self, lane: &str, limit: Option<Limit>)
The limit of lane from now on: its model and compaction settings; None (a lane on Claude Code, a model
without a known window): no reminders.
Sourcepub fn set_lane_meter(&self, lane: &str, meter: Option<LaneMeter>)
pub fn set_lane_meter(&self, lane: &str, meter: Option<LaneMeter>)
lane’s own context meter (an in-memory subagent’s loop, crate::memory_children), its limit unchanged;
None returns it to the session’s meter.
Sourcepub fn set_frame_lane(&self, lane: &str, frame: Option<(Limit, LaneMeter)>)
pub fn set_frame_lane(&self, lane: &str, frame: Option<(Limit, LaneMeter)>)
An inference frame’s lane (crate::frames): its own meter (the frame conversation’s estimate) and its limit,
the frame model’s window (frames never compact). None ends both (the frame ended).
pub fn limit(&self, lane: &str) -> Option<Limit>
Sourcepub fn rearm(&self, lane: &str)
pub fn rearm(&self, lane: &str)
The lane’s context was compacted: its next result past the trigger reminds again.
Sourcepub fn observe(&self, lane: &str, measure: Measure) -> Option<String>
pub fn observe(&self, lane: &str, measure: Measure) -> Option<String>
The lane’s use is measure: the reminder line when it reached the trigger and the lane was not reminded
in this approach; below the trigger (or in a new epoch) the lane is re-armed.
Sourcepub fn reminder(&self, lane: &str, text: &str, images: usize) -> Option<String>
pub fn reminder(&self, lane: &str, text: &str, images: usize) -> Option<String>
The reminder for lane’s result text with images images: the meter’s use plus the result’s own estimate,
as the harness estimates a tool result (ceil(chars / 4), an image counting
ESTIMATED_IMAGE_CHARS). A lane with its own meter (a frame) reads that one.