struct

GameLoop::TurnResult

Inherits Struct < Value < Object

Query Claude with the player's action Uses Anthropic API with Tool Runner for automatic tool execution. Returns the DM narration plus how many tool calls were made this turn (used for autopilot metrics) and the accumulated token usage (input/output/cache).

Constructors

new(text : String, tool_calls : Int32 = 0, usage : UsageTotals = UsageTotals.new)
Source

Instance methods

clone
Source
copy_with(text _text = @text, tool_calls _tool_calls = @tool_calls, usage _usage = @usage)
Source
text
tool_calls
usage