Class: AgUiProtocol::Core::Events::StepStartedEvent

Inherits:
BaseEvent show all
Defined in:
lib/ag_ui_protocol/core/events.rb

Overview

Signals the start of a step within an agent run.

“‘ruby

event = AgUiProtocol::Core::Events::StepStartedEvent.new(step_name: “s1”)

“‘

Instance Attribute Summary collapse

Attributes inherited from BaseEvent

#raw_event, #timestamp, #type

Instance Method Summary collapse

Methods inherited from Types::Model

#as_json, #to_json

Constructor Details

#initialize(step_name:, timestamp: nil, raw_event: nil) ⇒ StepStartedEvent

Returns a new instance of StepStartedEvent.



1102
1103
1104
1105
# File 'lib/ag_ui_protocol/core/events.rb', line 1102

def initialize(step_name:, timestamp: nil, raw_event: nil)
  super(type: EventType::STEP_STARTED, timestamp: timestamp, raw_event: raw_event)
  @step_name = step_name
end

Instance Attribute Details

#step_nameObject (readonly)

Returns the value of attribute step_name.



1096
1097
1098
# File 'lib/ag_ui_protocol/core/events.rb', line 1096

def step_name
  @step_name
end

Instance Method Details

#to_hObject



1108
1109
1110
# File 'lib/ag_ui_protocol/core/events.rb', line 1108

def to_h
  super.merge(step_name: @step_name)
end