Class: Pikuri::Agent::Event::UserTurn

Inherits:
Data
  • Object
show all
Defined in:
lib/pikuri/agent/event.rb

Overview

User input for a turn (+mid_loop: false+, the default) or a host injection delivered mid-loop (+mid_loop: true+, drained from Control::Interloper). The flag lets a listener treating UserTurn as a turn boundary tell a fresh turn from an in-loop injection. Emitted by Pikuri::Agent#run_loop at turn start, and when an interloper item drains in after a tool batch.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(content:, mid_loop: false) ⇒ UserTurn

Returns a new instance of UserTurn.

Parameters:

  • content (String)

    user-supplied text

  • mid_loop (Boolean) (defaults to: false)

    true when drained from Control::Interloper; default false



26
27
28
# File 'lib/pikuri/agent/event.rb', line 26

def initialize(content:, mid_loop: false)
  super
end

Instance Attribute Details

#contentObject (readonly)

Returns the value of attribute content

Returns:

  • (Object)

    the current value of content



22
23
24
# File 'lib/pikuri/agent/event.rb', line 22

def content
  @content
end

#mid_loopObject (readonly)

Returns the value of attribute mid_loop

Returns:

  • (Object)

    the current value of mid_loop



22
23
24
# File 'lib/pikuri/agent/event.rb', line 22

def mid_loop
  @mid_loop
end