Skip to content

ConversationTurnResult

Defined in: _worktrees/docs-release/gaunt-sloth/packages/core/src/runtime/conversation.ts:29

One turn’s result inside a runConversation run: the per-turn ok/answer plus that turn’s run stats (GS2-16 GthRunStats — token usage + invoked tools), captured PER TURN (a per-invoke delta, not the cumulative conversation total). ok is false when that turn’s agent invocation failed (error set, answer empty). Extends GthRunStats rather than restating its fields — same shape ../runtime/singleShot.js SingleShotResult uses.

answer: string

Defined in: _worktrees/docs-release/gaunt-sloth/packages/core/src/runtime/conversation.ts:33

This turn’s full answer text (runner.processMessages()’s return value). Empty on failure.


optional error?: string

Defined in: _worktrees/docs-release/gaunt-sloth/packages/core/src/runtime/conversation.ts:35

Set when ok is false: why this turn failed.


ok: boolean

Defined in: _worktrees/docs-release/gaunt-sloth/packages/core/src/runtime/conversation.ts:31

true when this turn completed without error, false when it failed.


optional tokensInput?: number

Defined in: _worktrees/docs-release/gaunt-sloth/packages/core/src/core/types.ts:41

Total prompt/input tokens across the run’s LLM calls, when the provider reported usage.

GthRunStats.tokensInput


optional tokensOutput?: number

Defined in: _worktrees/docs-release/gaunt-sloth/packages/core/src/core/types.ts:43

Total completion/output tokens across the run’s LLM calls, when the provider reported usage.

GthRunStats.tokensOutput


optional toolResults?: GthToolResult[]

Defined in: _worktrees/docs-release/gaunt-sloth/packages/core/src/core/types.ts:53

BATCH-21 — one record per executed tool result (ToolMessage) observed during the run, in arrival order and NOT deduplicated (a tool called twice yields two records), so gth eval’s tool-RESULT assertions (must_error / tool_result_json_path) can grade what a tool returned, not just that it was called. Optional (additive): producers that predate the field simply omit it; runStats.js finalizeRunStats always sets it.

GthRunStats.toolResults


tools: string[]

Defined in: _worktrees/docs-release/gaunt-sloth/packages/core/src/core/types.ts:45

Names of tools invoked during the run (deduplicated); empty when no tools were used.

GthRunStats.tools