Rulvar API reference / @rulvar/rulvar / ToolBudgetSummary
Interface: ToolBudgetSummary
Defined in: packages/core/dist/index.d.ts
The tool budget pressure snapshot (RV304, the seventh comparison experiment): how close one agent invocation came to its tool budget, visible BEFORE the terminal 'limit' a starved worker would settle with. Attached to the full AgentResult and to the live agent:end event whenever maxToolCalls, toolUnits, or toolBudgetExtension is configured. The durable subset: since RV3002 the terminal entry journals used and the effective cap at settle, so a replayed result restores them unconditionally on new journals; an extension grant and the finalization-window entry journal as decision entries the moment they fire (RV509) and merge into the restored summary as extensionsGranted and finalizationWindowEntered. A journal written before the entry field shipped keeps the RV509 behavior byte for byte: used from the terminal checkpoint plus the decision-backed fields, present exactly when the invocation journaled at least one decision. Every other field (unitsUsed/unitsMax, noticesFired, finalizationReserveUsed, limiter) is live-only fidelity, exactly like transportRetries, and stays absent on replay.