class RubyLLM::AgUI::ResumeEntry

One answer to one interrupt, as the client sends it on the run that continues from an interrupted one.

A resume entry is a request, never a permission grant: the run still checks that the interrupt exists, belongs to the most recent interrupted run on this thread, has not been redeemed, and has not expired, and the host still re-authorizes before any tool runs.

Constants

CANCELLED
RESOLVED

The protocol’s two statuses.

STATUSES

Attributes

interrupt_id[R]

Identifies the interrupt this entry answers.

payload[R]

The answer the client supplies, for an interrupt that asked for one.

status[R]

“resolved” or “cancelled”.

Public Class Methods

new(interrupt_id:, status:, payload: nil) click to toggle source
# File lib/ruby_llm/ag_ui/resume_entry.rb, line 27
def initialize(interrupt_id:, status:, payload: nil)
  @interrupt_id = interrupt_id
  @status = status
  @payload = payload
  freeze
end

Public Instance Methods

cancelled?() click to toggle source

Whether the client abandoned the interrupt.

# File lib/ruby_llm/ag_ui/resume_entry.rb, line 40
def cancelled?
  status == CANCELLED
end
resolved?() click to toggle source

Whether the client answered the interrupt.

# File lib/ruby_llm/ag_ui/resume_entry.rb, line 35
def resolved?
  status == RESOLVED
end
to_h() click to toggle source
# File lib/ruby_llm/ag_ui/resume_entry.rb, line 44
def to_h
  { 'interruptId' => interrupt_id, 'status' => status, 'payload' => payload }
end