Skip to content

Rulvar API reference


Rulvar API reference / @rulvar/core / UsageSlice

Interface: UsageSlice

Defined in: packages/core/src/l0/entries.ts:100

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

PropertyTypeDefined in
role?InvocationRolepackages/core/src/l0/entries.ts:103
servedBy`${string}:${string}`packages/core/src/l0/entries.ts:101
usageUsagepackages/core/src/l0/entries.ts:102