class

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)
Source

Instance methods

gate
Source
gate=(gate : PlanGate)
Source
mode
Source
mode=(mode : Mode) : Nil
Source
on_halt
Source
on_halt=(on_halt : Proc(Nil) | Nil)
Source
on_mode_change
Source
on_mode_change=(on_mode_change : Proc(Mode, Nil) | Nil)
Source
on_plan
Source
on_plan=(on_plan : Proc(String, Nil) | Nil)
Source
plan_mode?
Source
present(plan : String) : String

Called by exit_plan_mode; the return value is what the model sees.

Source