Skip to content
1 min read · 245 words

Interface: WorkingToolCall

Defined in: src/batteries/context/thrift/contracts.ts:195

A prior-turn (or this-turn) tool call in the working set, carrying the PRE-COMPUTED token cost of its rendered result — the pass never renders a tool result itself (it would need to await an artifact reader, breaking synchrony), so the caller measures the result via its own renderer and hands the cost here.

Properties

PropertyTypeDescriptionDefined in
createdAtMsnumberChronological order key — oldest tool results shed first among the sheddable pool.src/batteries/context/thrift/contracts.ts:202
refunknownOpaque handle back to the caller's own call record, returned unchanged so the caller can reconcile which calls survived the shed (e.g. against a Set of live tool-call ids).src/batteries/context/thrift/contracts.ts:198
thisTurn?booleantrue when this call was made during the CURRENT turn (the model just made it this dispatch). Such results are the turn's active working set and are protected from ordinary budget-shedding — evicting a result the model just fetched makes it immediately re-request the same call. Only prior-turn results (falsy/absent) are eligible for ordinary shedding; this-turn results are only shed by the newest-N backstop (thisTurnResultKeep) as a last resort. See @nhtio/adk/batteries/context/thrift/subtractive_pass!subtractToFit.src/batteries/context/thrift/contracts.ts:211
tokenCostnumberToken cost of this call's model-facing rendered result, measured by the caller.src/batteries/context/thrift/contracts.ts:200