class RubyLLM::AgUI::Protocol::CancelledOutcome

RunFinishedOutcome with the 1.0 “cancelled” discriminator.

A cancelled run was stopped before it completed and did not fail. It carries no interrupts, so the next run on the thread is an ordinary new run rather than a resume.

Constants

TYPE

The discriminator value the 1.0 schema requires.

Attributes

type[R]

Public Class Methods

new(type: nil) click to toggle source
Calls superclass method
# File lib/ruby_llm/ag_ui/protocol.rb, line 39
def initialize(type: nil)
  raise ArgumentError, "CancelledOutcome.type must be #{TYPE.inspect}" if !type.nil? && type != TYPE

  super()
  @type = TYPE
end

Public Instance Methods

to_h() click to toggle source
# File lib/ruby_llm/ag_ui/protocol.rb, line 46
def to_h
  { type: @type }
end