Smith::PlanSession
Inherits Reference < Object
The state of a plan-mode run. Deliberately separate from the tool that ends it, so the CLI, the renderers and the subagent supervisor can consult it without knowing about the tool registry — the same split TodoList uses.
Everything that has to happen on a mode switch (swapping the registry's
approver, rebuilding the system prompt, clamping subagents) is wired by the
CLI through on_mode_change, which keeps that policy out of the core.
Constructors
new(mode : Mode = Mode::Normal, gate : PlanGate = HaltingPlanGate.new)
SourceInstance methods
gate
Sourcegate=(gate : PlanGate)
Sourcemode
Sourcemode=(mode : Mode) : Nil
Sourceon_halt
Sourceon_halt=(on_halt : Proc(Nil) | Nil)
Sourceon_mode_change
Sourceon_mode_change=(on_mode_change : Proc(Mode, Nil) | Nil)
Sourceon_plan
Sourceon_plan=(on_plan : Proc(String, Nil) | Nil)
Sourceplan_mode?
Sourcepresent(plan : String) : String
Called by exit_plan_mode; the return value is what the model sees.