Rulvar API reference / @rulvar/rulvar / UsageSlice
Interface: UsageSlice
Defined in: packages/core/dist/index.d.ts
One (invocation role, serving model) slice of an agent call's usage. role is the phase that PAID the slice (v1.19.0 review P1-2: the loop, extract, finalize, and summarize phases of one agent call must land in their own CostReport.byRole buckets even when a single model serves several of them). Absent on slices written before roles shipped: readers fall back to the entry's primary costAttribution.role, exactly like the other documented fallbacks. Policy, never identity.
Properties
| Property | Type | Defined in |
|---|---|---|
role? | InvocationRole | packages/core/dist/index.d.ts |
servedBy | `${string}:${string}` | packages/core/dist/index.d.ts |
usage | Usage | packages/core/dist/index.d.ts |