Class: AgentCliRuntime::ParsedRun

Inherits:
Data
  • Object
show all
Defined in:
lib/agent_cli_runtime/values.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(session_id:, terminal_message_id:, terminal_reason:, final_message:, preliminary_usage:, unknown_events: [], final_message_truncated: false) ⇒ ParsedRun

Returns a new instance of ParsedRun.



514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
# File 'lib/agent_cli_runtime/values.rb', line 514

def initialize(session_id:, terminal_message_id:, terminal_reason:,
               final_message:, preliminary_usage:, unknown_events: [],
               final_message_truncated: false)
  unless preliminary_usage.is_a?(NormalizedUsage)
    raise ArgumentError, "preliminary_usage must be NormalizedUsage"
  end

  super(
    session_id: Immutable.string(session_id),
    terminal_message_id: Immutable.string(terminal_message_id),
    terminal_reason: Immutable.string(terminal_reason),
    final_message: Immutable.string(final_message),
    final_message_truncated: final_message_truncated == true,
    preliminary_usage: preliminary_usage,
    unknown_events: Immutable.strings(unknown_events)
  )
end

Instance Attribute Details

#final_messageObject (readonly)

Returns the value of attribute final_message

Returns:

  • (Object)

    the current value of final_message



510
511
512
# File 'lib/agent_cli_runtime/values.rb', line 510

def final_message
  @final_message
end

#final_message_truncatedObject (readonly)

Returns the value of attribute final_message_truncated

Returns:

  • (Object)

    the current value of final_message_truncated



510
511
512
# File 'lib/agent_cli_runtime/values.rb', line 510

def final_message_truncated
  @final_message_truncated
end

#preliminary_usageObject (readonly)

Returns the value of attribute preliminary_usage

Returns:

  • (Object)

    the current value of preliminary_usage



510
511
512
# File 'lib/agent_cli_runtime/values.rb', line 510

def preliminary_usage
  @preliminary_usage
end

#session_idObject (readonly)

Returns the value of attribute session_id

Returns:

  • (Object)

    the current value of session_id



510
511
512
# File 'lib/agent_cli_runtime/values.rb', line 510

def session_id
  @session_id
end

#terminal_message_idObject (readonly)

Returns the value of attribute terminal_message_id

Returns:

  • (Object)

    the current value of terminal_message_id



510
511
512
# File 'lib/agent_cli_runtime/values.rb', line 510

def terminal_message_id
  @terminal_message_id
end

#terminal_reasonObject (readonly)

Returns the value of attribute terminal_reason

Returns:

  • (Object)

    the current value of terminal_reason



510
511
512
# File 'lib/agent_cli_runtime/values.rb', line 510

def terminal_reason
  @terminal_reason
end

#unknown_eventsObject (readonly)

Returns the value of attribute unknown_events

Returns:

  • (Object)

    the current value of unknown_events



510
511
512
# File 'lib/agent_cli_runtime/values.rb', line 510

def unknown_events
  @unknown_events
end