Receipt
Interface: Receipt
Defined in: src/lib/time-travel/receipt.ts:290
THE RECEIPT. One per composed request, committed at the call-llm stop.
Example
import { receiptAt } from 'agentfootprint';
// Epochs are the run's OWN iteration numbers and start at 1.
const receipt = receiptAt(agent.getSnapshot()!, 1);
receipt?.tools.withheld; // 'wrap-up' on the out-of-budget call
receipt?.messages.count; // how many turns went out
receipt?.params.temperature; // the dial this turn went out onProperties
basis
readonlybasis:object
Defined in: src/lib/time-travel/receipt.ts:343
epoch
readonlyepoch:number
model
readonlymodel:string
provider
readonlyprovider:string
runId
readonlyrunId:string
cache
readonlycache:object
Defined in: src/lib/time-travel/receipt.ts:309
markersApplied
readonlymarkersApplied: readonlyReceiptCacheMarker[]
The breakpoints the strategy actually applied, in the order it applied them — see ReceiptCacheMarker. Empty when it applied none.
transform
readonlytransform:"unchanged"|"rewritten"|"unknown"
What the comparison between the request handed TO the cache strategy and
the one it handed back could establish. BRANCH ON THIS, never on
transformHash === null:
'unchanged'— the two serialize identically.'rewritten'— they do not, andtransformHashfingerprints the result.'unknown'— one of them could not be serialized at all, so the receipt refuses to claim either.
It scopes to the CACHE STRATEGY and to nothing else — see RECEIPT_BOUNDARY.
transformHash
readonlytransformHash:string|null
Hash of the request the cache strategy handed back, when it differed
from the one it was given; null otherwise.
messages
readonlymessages:object
Defined in: src/lib/time-travel/receipt.ts:296
count
readonlycount:number
entries
readonlyentries: readonlyReceiptMessage[]
requestOnly
readonlyrequestOnly: readonlyReceiptRequestOnlyMessage[]
omittedForAttention?
readonlyoptionalomittedForAttention?:ReceiptAttentionOmission
Defined in: src/lib/time-travel/receipt.ts:342
Absent when no slot reported a drop — which, measured on 9.88.0, is EVERY
run in both chart shapes: no boundary bubbles slotCompositions out of the
slot subflow that writes it, so request assembly has nothing to pass. It is
a key of servedView.ts · UNGAPPED_FIELDS for that reason: its absence
is universal and says nothing about any particular recording. Absent means
nobody recorded a drop, never that nothing was dropped.
params
readonlyparams:ReceiptParams
Defined in: src/lib/time-travel/receipt.ts:333
The sampling knobs the call went out with — see ReceiptParams.
system
readonlysystem:object
Defined in: src/lib/time-travel/receipt.ts:291
chars
readonlychars:number
hash
readonlyhash:string
pieces
readonlypieces: readonlyReceiptPiece[]
tools
readonlytools:object
Defined in: src/lib/time-travel/receipt.ts:301
forced
readonlyforced:string|null
The tool the model was forced to answer through, or null.
names
readonlynames: readonlystring[]
schemaHashes
readonlyschemaHashes:Readonly<Record<string,string>>
withheld
readonlywithheld:"wrap-up"|null
Why the tool list is empty when it would not otherwise be.
