Class: Agentilda::Transcript::Progress

Inherits:
Data
  • Object
show all
Defined in:
lib/agentilda/transcript.rb

Overview

What one line of the display knows: the phrase, and the meter beside it.

Yielded whole rather than as loose arguments so a caller cannot render half an update, and frozen so the reader thread and the drawing thread are never looking at the same mutable object.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(pid: nil, **rest) ⇒ Progress

Returns a new instance of Progress.



51
# File 'lib/agentilda/transcript.rb', line 51

def initialize(pid: nil, **rest) = super

Instance Attribute Details

#activityString? (readonly)

Returns the last thing the agent was seen doing.

Returns:

  • (String, nil)

    the last thing the agent was seen doing



50
51
52
# File 'lib/agentilda/transcript.rb', line 50

Progress = Data.define(:activity, :up, :down, :subagents, :pid) do
  def initialize(pid: nil, **rest) = super
end

#downInteger (readonly)

Returns tokens generated.

Returns:

  • (Integer)

    tokens generated



50
51
52
# File 'lib/agentilda/transcript.rb', line 50

Progress = Data.define(:activity, :up, :down, :subagents, :pid) do
  def initialize(pid: nil, **rest) = super
end

#pidInteger? (readonly)

Returns the claude process, once the harness has found it — nil until then, and for callers that never look.

Returns:

  • (Integer, nil)

    the claude process, once the harness has found it — nil until then, and for callers that never look



50
51
52
# File 'lib/agentilda/transcript.rb', line 50

Progress = Data.define(:activity, :up, :down, :subagents, :pid) do
  def initialize(pid: nil, **rest) = super
end

#subagentsInteger (readonly)

Returns sub-agents spawned so far.

Returns:

  • (Integer)

    sub-agents spawned so far



50
51
52
# File 'lib/agentilda/transcript.rb', line 50

Progress = Data.define(:activity, :up, :down, :subagents, :pid) do
  def initialize(pid: nil, **rest) = super
end

#upInteger (readonly)

Returns tokens sent, cache reads included.

Returns:

  • (Integer)

    tokens sent, cache reads included



50
51
52
# File 'lib/agentilda/transcript.rb', line 50

Progress = Data.define(:activity, :up, :down, :subagents, :pid) do
  def initialize(pid: nil, **rest) = super
end