Class: Events::SessionStateChanged
- Inherits:
-
Object
- Object
- Events::SessionStateChanged
- Defined in:
- lib/events/session_state_changed.rb
Overview
Emitted when a session’s transport-level state changes. Carries the AASM state after a transition (+“idle”/“awaiting”/“executing”+) or a transient UI signal (+“interrupting”+).
Subscribers broadcast the state over ActionCable so the TUI spinner and sub-agent HUD update in sync.
Constant Summary collapse
- TYPE =
"session.state_changed"
Instance Attribute Summary collapse
-
#session_id ⇒ Object
readonly
Returns the value of attribute session_id.
-
#state ⇒ Object
readonly
Returns the value of attribute state.
Instance Method Summary collapse
- #event_name ⇒ Object
-
#initialize(session_id:, state:) ⇒ SessionStateChanged
constructor
A new instance of SessionStateChanged.
- #to_h ⇒ Object
Constructor Details
#initialize(session_id:, state:) ⇒ SessionStateChanged
Returns a new instance of SessionStateChanged.
17 18 19 20 |
# File 'lib/events/session_state_changed.rb', line 17 def initialize(session_id:, state:) @session_id = session_id @state = state end |
Instance Attribute Details
#session_id ⇒ Object (readonly)
Returns the value of attribute session_id.
13 14 15 |
# File 'lib/events/session_state_changed.rb', line 13 def session_id @session_id end |
#state ⇒ Object (readonly)
Returns the value of attribute state.
13 14 15 |
# File 'lib/events/session_state_changed.rb', line 13 def state @state end |