Interfaces

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 on

Properties

basis

readonly basis: object

Defined in: src/lib/time-travel/receipt.ts:343

epoch

readonly epoch: number

model

readonly model: string

provider

readonly provider: string

runId

readonly runId: string


cache

readonly cache: object

Defined in: src/lib/time-travel/receipt.ts:309

markersApplied

readonly markersApplied: readonly ReceiptCacheMarker[]

The breakpoints the strategy actually applied, in the order it applied them — see ReceiptCacheMarker. Empty when it applied none.

transform

readonly transform: "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, and transformHash fingerprints 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

readonly transformHash: string | null

Hash of the request the cache strategy handed back, when it differed from the one it was given; null otherwise.


messages

readonly messages: object

Defined in: src/lib/time-travel/receipt.ts:296

count

readonly count: number

entries

readonly entries: readonly ReceiptMessage[]

requestOnly

readonly requestOnly: readonly ReceiptRequestOnlyMessage[]


omittedForAttention?

readonly optional omittedForAttention?: 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

readonly params: ReceiptParams

Defined in: src/lib/time-travel/receipt.ts:333

The sampling knobs the call went out with — see ReceiptParams.


system

readonly system: object

Defined in: src/lib/time-travel/receipt.ts:291

chars

readonly chars: number

hash

readonly hash: string

pieces

readonly pieces: readonly ReceiptPiece[]


tools

readonly tools: object

Defined in: src/lib/time-travel/receipt.ts:301

forced

readonly forced: string | null

The tool the model was forced to answer through, or null.

names

readonly names: readonly string[]

schemaHashes

readonly schemaHashes: Readonly<Record<string, string>>

withheld

readonly withheld: "wrap-up" | null

Why the tool list is empty when it would not otherwise be.

On this page