Skip to content

GthRunStats

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

GS2-16 — per-run analytics harvested from a finished agent turn, threaded into the opt-in history recorder (recordSessionSafe) so gth insights reports real numbers instead of zeros. All fields are best-effort: token counts are only present when the provider actually reported usage_metadata (otherwise omitted so the recorder stores NULL and the insights formatter suppresses the misleading 0), and tools lists the names of tools invoked during the run (deduplicated, order-insensitive). There is no costUsd — cost requires a reliable price table this project does not carry, so it is deliberately never invented here.

optional tokensInput?: number

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

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


optional tokensOutput?: number

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

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


optional toolResults?: GthToolResult[]

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

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.


tools: string[]

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

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