Class: Pikuri::Code::PlanModeChanged
- Inherits:
-
Data
- Object
- Data
- Pikuri::Code::PlanModeChanged
- Defined in:
- lib/pikuri/code/plan_mode_changed.rb
Overview
Domain event emitted onto the listener stream whenever plan mode
transitions — model-driven (EnterPlanMode / ExitPlanMode) or
host-driven. Wired by Extension#bind through the shared
Workspace::ReadOnly flag's on_change. A pikuri-code domain
event, not a core Agent::Event — the loop never reads plan
mode; listeners that don't care no-op on it (the demo
Agent::Listener::Terminal renders it generically via #to_s).
Carries only the new posture, so a UI listener can render an indicator without touching the flag. A host flip fires on the host's thread, a model flip on the agent's — treat the boolean as the latest authoritative state.
Instance Attribute Summary collapse
-
#active ⇒ Object
readonly
Returns the value of attribute active.
Instance Method Summary collapse
-
#to_s ⇒ String
Human-facing label; the Terminal demo prints it verbatim, so the wording lives here, not in core.
Instance Attribute Details
#active ⇒ Object (readonly)
Returns the value of attribute active
16 17 18 |
# File 'lib/pikuri/code/plan_mode_changed.rb', line 16 def active @active end |
Instance Method Details
#to_s ⇒ String
Returns human-facing label; the Terminal demo prints it verbatim, so the wording lives here, not in core.
19 20 21 |
# File 'lib/pikuri/code/plan_mode_changed.rb', line 19 def to_s "plan mode: #{active ? 'on (read-only)' : 'off'}" end |