Class: Pikuri::Agent::Event::UserTurn
- Inherits:
-
Data
- Object
- Data
- Pikuri::Agent::Event::UserTurn
- Defined in:
- lib/pikuri/agent/event.rb
Overview
User’s input for a turn (+mid_loop: false+, the default) or a host-supplied injection delivered while the loop is running (+mid_loop: true+, drained from Control::Interloper). The flag exists so listeners that treat the UserTurn as a turn boundary can distinguish a fresh turn from an in-loop injection (additional context for the same turn, not a new one). Controls themselves no longer see this event — the Agent pokes their reset! / tick! entry points directly at the right boundaries.
Emitted in two places: by Pikuri::Agent#run_loop at the start of each turn (with mid_loop: false), and by Pikuri::Agent‘s after_tool_result wiring when a queued Control::Interloper item drains into the chat history (with mid_loop: true).
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
Returns the value of attribute content.
-
#mid_loop ⇒ Object
readonly
Returns the value of attribute mid_loop.
Instance Method Summary collapse
-
#initialize(content:, mid_loop: false) ⇒ UserTurn
constructor
A new instance of UserTurn.
Constructor Details
#initialize(content:, mid_loop: false) ⇒ UserTurn
Returns a new instance of UserTurn.
43 44 45 |
# File 'lib/pikuri/agent/event.rb', line 43 def initialize(content:, mid_loop: false) super end |
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content
38 39 40 |
# File 'lib/pikuri/agent/event.rb', line 38 def content @content end |
#mid_loop ⇒ Object (readonly)
Returns the value of attribute mid_loop
38 39 40 |
# File 'lib/pikuri/agent/event.rb', line 38 def mid_loop @mid_loop end |