Class: AgUiProtocol::Core::Events::StepFinishedEvent

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

Overview

Signals the completion of a step within an agent run.

“‘ruby

event = AgUiProtocol::Core::Events::StepFinishedEvent.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) ⇒ StepFinishedEvent

Returns a new instance of StepFinishedEvent.



1130
1131
1132
1133
# File 'lib/ag_ui_protocol/core/events.rb', line 1130

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

Instance Attribute Details

#step_nameObject (readonly)

Returns the value of attribute step_name.



1124
1125
1126
# File 'lib/ag_ui_protocol/core/events.rb', line 1124

def step_name
  @step_name
end

Instance Method Details

#to_hObject



1136
1137
1138
# File 'lib/ag_ui_protocol/core/events.rb', line 1136

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