pub struct PlanTodoReinjector {
pub todos: Arc<RwLock<Vec<TodoItem>>>,
pub plan_gate: Arc<PlanApprovalGate>,
}Expand description
Post-compaction re-injector for the pending plan and task list.
After an LLM-summary compaction, the plan text and todo checklist are
folded into prose or dropped entirely — the model loses track of the
pending plan and outstanding tasks, and may re-propose a plan or forget
about pending checklist items. This reinjector recovers both from the
shared runtime state and emits [Role::System] attachment messages
(plan first, then todos).
Only emits [Role::System] messages — no [Role::Tool] messages, so
no orphan tool result can be created (invariant #8 safe).
Fields§
§todos: Arc<RwLock<Vec<TodoItem>>>Shared task list (same Arc used by TodoWriteTool).
plan_gate: Arc<PlanApprovalGate>Shared plan-approval gate (same Arc used by EnterPlanModeTool /
ExitPlanModeTool).
Implementations§
Source§impl PlanTodoReinjector
impl PlanTodoReinjector
Sourcepub fn new(
todos: Arc<RwLock<Vec<TodoItem>>>,
plan_gate: Arc<PlanApprovalGate>,
) -> Self
pub fn new( todos: Arc<RwLock<Vec<TodoItem>>>, plan_gate: Arc<PlanApprovalGate>, ) -> Self
Create a new PlanTodoReinjector.
Trait Implementations§
Source§impl Clone for PlanTodoReinjector
impl Clone for PlanTodoReinjector
Auto Trait Implementations§
impl Freeze for PlanTodoReinjector
impl RefUnwindSafe for PlanTodoReinjector
impl Send for PlanTodoReinjector
impl Sync for PlanTodoReinjector
impl Unpin for PlanTodoReinjector
impl UnsafeUnpin for PlanTodoReinjector
impl UnwindSafe for PlanTodoReinjector
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoMaybeUndefined<T> for T
impl<T> IntoMaybeUndefined<T> for T
Source§fn into_maybe_undefined(self) -> MaybeUndefined<T>
fn into_maybe_undefined(self) -> MaybeUndefined<T>
Converts this value into a three-state builder argument.
Source§impl<T> IntoOption<T> for T
impl<T> IntoOption<T> for T
Source§fn into_option(self) -> Option<T>
fn into_option(self) -> Option<T>
Converts this value into an optional builder argument.