Class: Agent::SessionContext::ToolCall

Inherits:
Data
  • Object
show all
Defined in:
lib/agent/session_context/tool_call.rb

Overview

One tool call, paired with whatever answered it. The pairing is by CALL ID, never by position — a model can have two calls in flight at once, and pairing by position would match the wrong call to the wrong result.

result_bytes is nil, not 0, when nothing answered the call: an unanswered call and a call answered with an empty body are different facts, and defaulting the body to "" would report a 0-byte answer for a call that was never answered.

Only sizes are carried, never bodies — transcripts hold credentials and customer data, and this gem has no redaction before milestone 0.5.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#answered_in ⇒ Object (readonly)

Returns the value of attribute answered_in

Returns:

  • (Object) —

    the current value of answered_in



17
18
19
# File 'lib/agent/session_context/tool_call.rb', line 17

def answered_in
  @answered_in
end

#asked_in ⇒ Object (readonly)

Returns the value of attribute asked_in

Returns:

  • (Object) —

    the current value of asked_in



17
18
19
# File 'lib/agent/session_context/tool_call.rb', line 17

def asked_in
  @asked_in
end

#call_id ⇒ Object (readonly)

Returns the value of attribute call_id

Returns:

  • (Object) —

    the current value of call_id



17
18
19
# File 'lib/agent/session_context/tool_call.rb', line 17

def call_id
  @call_id
end

#input_bytes ⇒ Object (readonly)

Returns the value of attribute input_bytes

Returns:

  • (Object) —

    the current value of input_bytes



17
18
19
# File 'lib/agent/session_context/tool_call.rb', line 17

def input_bytes
  @input_bytes
end

#name ⇒ Object (readonly)

Returns the value of attribute name

Returns:

  • (Object) —

    the current value of name



17
18
19
# File 'lib/agent/session_context/tool_call.rb', line 17

def name
  @name
end

#result_bytes ⇒ Object (readonly)

Returns the value of attribute result_bytes

Returns:

  • (Object) —

    the current value of result_bytes



17
18
19
# File 'lib/agent/session_context/tool_call.rb', line 17

def result_bytes
  @result_bytes
end

Instance Method Details

#answered? ⇒ Boolean

Returns:

  • (Boolean)


18
# File 'lib/agent/session_context/tool_call.rb', line 18

def answered? = !result_bytes.nil?