Skip to content

ConversationTurnResult

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

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.

optional advertisedTools?: GthAdvertisedTools

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

BATCH-32 — what the agent advertised to the model (gth eval’s coverage denominator).

Conversation-level, not a per-turn delta — the one field here that is not. A conversation builds its agent ONCE, so the inventory is fixed for the whole run and the same value appears on every turn. It is repeated rather than returned separately because this function’s contract is one result per turn; a caller that unions across turns gets the right answer either way.


answer: string

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

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:39

Set when ok is false: why this turn failed.


ok: boolean

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

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


terminationReason: GthTerminationReason | null

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

[[EXT-159]] — why this turn ended, as a value.

Per turn, like every other field here, and read before the next turn resets it. It is the structural carrier the console line beside it is rendered FROM, so a consumer — a multi-turn eval asking whether a run stopped because the provider faulted or because the model handed back — reads the classification instead of parsing error. null means no site classified the ending, which is a site we missed rather than a turn that went well.


optional tokensInput?: number

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

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:104

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:114

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:106

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

GthRunStats.tools