SingleShotResult
Defined in: packages/core/src/runtime/singleShot.ts:39
Result of a runSingleShot run: the pass/fail contract callers such as ask/exec have
always used (ok), plus the SUT’s answer text and run stats (GS2-16’s GthRunStats) that
were already computed internally but previously discarded. Extends GthRunStats rather than
restating tokensInput/tokensOutput/tools as parallel fields.
Extends
Section titled “Extends”Properties
Section titled “Properties”advertisedTools?
Section titled “advertisedTools?”
optionaladvertisedTools?:GthAdvertisedTools
Defined in: packages/core/src/runtime/singleShot.ts:51
BATCH-32 — what the agent ADVERTISED to the model for this run: the full pre-allowedTools
inventory, the tools the allow-list removed, and the count of nameless ones.
A sibling of the run stats rather than a field inside them: GthRunStats is the per-turn tally
the accumulator folds messages into, and this is fixed at init. undefined means no
inventory was observed (an agent that does not report one), which is a different answer from an
inventory listing no tools.
answer
Section titled “answer”answer:
string
Defined in: packages/core/src/runtime/singleShot.ts:53
The SUT’s full answer text (runner.processMessages()’s return value). Empty on failure.
conversation?
Section titled “conversation?”
optionalconversation?:object
Defined in: packages/core/src/runtime/singleShot.ts:82
GS2-106 — the conversation this run was recorded under, with its stable run id; absent when the
run was not recorded (history off, or the store could not be written). What a caller needs to
tell a person how to come back to this run; the continue hint prints it for ask and exec.
conversationId
Section titled “conversationId”conversationId:
number
runId:
string|null
ok:
boolean
Defined in: packages/core/src/runtime/singleShot.ts:41
true when the run completed without error, false when it failed.
recap:
GthRunRecap|null
Defined in: packages/core/src/runtime/singleShot.ts:76
[[EXT-178]] — the end-of-run recap, when one was requested and produced; null otherwise.
The fact, not the prose. The same principle [[EXT-159]] states for the termination reason
and [[EXT-158]] for the outstanding-work value: the classification a caller (and a test) reads
is this object, so no user-facing string is the only carrier of it. An embedder that wants to
render a recap its own way — or to ask whether the run reported itself complete — reads
recap.complete and recap.work rather than matching the sentence on the console.
null collapses every “no recap” outcome deliberately; see requestRunRecap for why the
failures are a maintainer’s question and not a user’s.
resumability?
Section titled “resumability?”
optionalresumability?:SingleShotResumability
Defined in: packages/core/src/runtime/singleShot.ts:88
GS2-106 — whether this conversation can be continued, and if not why: the fact behind the continue hint, so a caller or a test reads the value rather than the line on stderr. Present only when the caller asked for the hint (SingleShotOptions.announceResumeHint).
terminationReason
Section titled “terminationReason”terminationReason:
GthTerminationReason|null
Defined in: packages/core/src/runtime/singleShot.ts:63
[[EXT-159]] — why the run ended, as a value.
The structural twin of the line this runtime prints: a caller (and a test) reads the
classification here rather than matching the prose on the console, so no user-facing string is
the only carrier of it. null means no site classified the ending, which by this taxonomy’s
contract is a site we missed — never a stand-in for an ordinary finish, which is recorded as
completed.
tokensInput?
Section titled “tokensInput?”
optionaltokensInput?:number
Defined in: packages/core/src/core/types.ts:123
Total prompt/input tokens across the run’s LLM calls, when the provider reported usage.
Inherited from
Section titled “Inherited from”tokensOutput?
Section titled “tokensOutput?”
optionaltokensOutput?:number
Defined in: packages/core/src/core/types.ts:125
Total completion/output tokens across the run’s LLM calls, when the provider reported usage.
Inherited from
Section titled “Inherited from”toolResults?
Section titled “toolResults?”
optionaltoolResults?:GthToolResult[]
Defined in: packages/core/src/core/types.ts:135
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; finalizeRunStats always sets it.
Inherited from
Section titled “Inherited from”tools:
string[]
Defined in: packages/core/src/core/types.ts:127
Names of tools invoked during the run (deduplicated); empty when no tools were used.